[med-svn] [python-pysam] 01/03: Imported Upstream version 0.8.0

Andreas Tille tille at debian.org
Tue Aug 19 19:27:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository python-pysam.

commit 547982fcfe6ce9451856856417591438b3fc9147
Author: Andreas Tille <tille at debian.org>
Date:   Tue Aug 19 21:25:58 2014 +0200

    Imported Upstream version 0.8.0
---
 INSTALL                                |    13 +
 MANIFEST.in                            |    82 +-
 PKG-INFO                               |     4 +-
 README.rst                             |    27 +
 doc/api.rst                            |     3 +-
 doc/conf.py                            |    14 +-
 doc/developer.rst                      |    48 +-
 doc/faq.rst                            |    10 +-
 doc/glossary.rst                       |     4 +-
 doc/{contents.rst => index.rst}        |     4 +-
 doc/release.rst                        |    26 +
 doc/usage.rst                          |    23 +-
 {tabix => htslib}/__init__.py          |     0
 htslib/bgzf.c                          |  1085 +
 htslib/bgzip.c                         |   283 +
 htslib/config.h                        |     3 +
 htslib/cram/cram.h                     |    66 +
 htslib/cram/cram_codecs.c              |  1764 ++
 htslib/cram/cram_codecs.h              |   155 +
 htslib/cram/cram_decode.c              |  2138 ++
 htslib/cram/cram_decode.h              |   112 +
 htslib/cram/cram_encode.c              |  2630 ++
 htslib/cram/cram_encode.h              |   105 +
 htslib/cram/cram_index.c               |   503 +
 htslib/cram/cram_index.h               |    98 +
 htslib/cram/cram_io.c                  |  3652 +++
 htslib/cram/cram_io.h                  |   532 +
 htslib/cram/cram_samtools.c            |   144 +
 htslib/cram/cram_samtools.h            |    97 +
 htslib/cram/cram_stats.c               |   357 +
 htslib/cram/cram_stats.h               |    59 +
 htslib/cram/cram_structs.h             |   752 +
 htslib/cram/files.c                    |    76 +
 htslib/cram/mFILE.c                    |   634 +
 htslib/cram/mFILE.h                    |    88 +
 htslib/cram/md5.c                      |   295 +
 htslib/cram/md5.h                      |    54 +
 htslib/cram/misc.h                     |   110 +
 htslib/cram/open_trace_file.c          |   386 +
 htslib/cram/open_trace_file.h          |   115 +
 htslib/cram/os.h                       |   306 +
 htslib/cram/pooled_alloc.c             |   170 +
 htslib/cram/pooled_alloc.h             |    56 +
 htslib/cram/sam_header.c               |  1222 +
 htslib/cram/sam_header.h               |   452 +
 htslib/cram/string_alloc.c             |   153 +
 htslib/cram/string_alloc.h             |    69 +
 htslib/cram/thread_pool.c              |   713 +
 htslib/cram/thread_pool.h              |   197 +
 htslib/cram/vlen.c                     |   432 +
 htslib/cram/vlen.h                     |    48 +
 htslib/cram/zfio.c                     |   185 +
 htslib/cram/zfio.h                     |    54 +
 htslib/faidx.c                         |   421 +
 htslib/hfile.c                         |   526 +
 htslib/hfile_internal.h                |    75 +
 htslib/hfile_net.c                     |    99 +
 htslib/hts.c                           |  1326 +
 {tabix => htslib/htslib}/__init__.py   |     0
 htslib/htslib/bgzf.h                   |   313 +
 htslib/htslib/faidx.h                  |   112 +
 htslib/htslib/hfile.h                  |   204 +
 htslib/htslib/hts.h                    |   311 +
 htslib/htslib/hts_defs.h               |    47 +
 htslib/htslib/kfunc.h                  |    49 +
 {tabix => htslib/htslib}/khash.h       |   339 +-
 htslib/htslib/khash_str2int.h          |    98 +
 {samtools => htslib/htslib}/klist.h    |    35 +-
 {tabix => htslib/htslib}/knetfile.h    |     4 +-
 htslib/htslib/kseq.h                   |   253 +
 {tabix => htslib/htslib}/ksort.h       |    16 +-
 htslib/htslib/kstdint.h                |    64 +
 htslib/htslib/kstring.h                |   270 +
 htslib/htslib/sam.h                    |   399 +
 htslib/htslib/synced_bcf_reader.h      |   255 +
 htslib/htslib/tbx.h                    |    52 +
 htslib/htslib/vcf.h                    |   823 +
 htslib/htslib/vcf_sweep.h              |    15 +
 htslib/htslib/vcfutils.h               |    94 +
 htslib/kfunc.c                         |   254 +
 {tabix => htslib}/knetfile.c           |    92 +-
 htslib/kstring.c                       |   229 +
 htslib/sam.c                           |  1780 ++
 htslib/synced_bcf_reader.c             |  1183 +
 htslib/tabix.c                         |   374 +
 htslib/tbx.c                           |   290 +
 htslib/vcf.c                           |  2953 ++
 htslib/vcf_sweep.c                     |   158 +
 htslib/vcfutils.c                      |   642 +
 htslib/version.h                       |     1 +
 pysam.egg-info/PKG-INFO                |     4 +-
 pysam.egg-info/SOURCES.txt             |   167 +-
 pysam.egg-info/requires.txt            |     2 +-
 pysam/TabProxies.c                     |  8374 ++---
 pysam/TabProxies.pyx                   |    46 +-
 pysam/__init__.py                      |   160 +-
 pysam/cfaidx.c                         |  8485 +++++
 pysam/cfaidx.pxd                       |    32 +
 pysam/cfaidx.pyx                       |   340 +
 pysam/chtslib.c                        |  3162 ++
 pysam/chtslib.pxd                      |   854 +
 pysam/chtslib.pyx                      |    94 +
 pysam/csamfile.c                       | 44792 ++++++++++++++++++++++++++
 pysam/csamfile.pxd                     |   200 +
 pysam/csamfile.pyx                     |  3464 +++
 pysam/csamtools.c                      | 51700 +++----------------------------
 pysam/csamtools.pxd                    |   578 +-
 pysam/csamtools.pyx                    |  3989 +--
 pysam/ctabix.c                         | 14944 ++++-----
 pysam/ctabix.pxd                       |   260 +-
 pysam/ctabix.pyx                       |   860 +-
 pysam/cvcf.c                           | 24327 +++++++--------
 pysam/cvcf.pxd                         |     1 +
 pysam/cvcf.pyx                         |    59 +-
 pysam/htslib_util.c                    |   143 +
 pysam/htslib_util.h                    |    90 +
 pysam/pysam_stream.h                   |    12 +
 pysam/pysam_util.c                     |   408 +-
 pysam/pysam_util.h                     |    70 +-
 pysam/samfile_util.c                   |   186 +
 pysam/samfile_util.h                   |    11 +
 pysam/tabix_util.h                     |     7 +-
 pysam/version.py                       |     4 +-
 samtools/bam.h                         |     4 +-
 samtools/bam_endian.h                  |     2 +-
 samtools/bam_lpileup.c.pysam.c         |     2 +-
 samtools/bam_mate.c.pysam.c            |     2 +-
 samtools/bam_pileup.c.pysam.c          |     2 +-
 samtools/bamshuf.c.pysam.c             |     3 +-
 samtools/bcftools/bcf.h                |     2 +-
 samtools/bgzf.c.pysam.c                |     2 +-
 samtools/khash.h                       |     4 +-
 samtools/klist.h                       |     4 +-
 samtools/kprobaln.c                    |   280 +
 samtools/razf.c.pysam.c                |     2 +-
 setup.cfg                              |     4 +-
 setup.py                               |   437 +-
 tabix/bam_endian.h                     |    42 -
 tabix/bedidx.c                         |   156 -
 tabix/bedidx.c.pysam.c                 |   158 -
 tabix/bgzf.c                           |   555 -
 tabix/bgzf.c.pysam.c                   |   557 -
 tabix/bgzf.h                           |   193 -
 tabix/bgzip.c                          |   206 -
 tabix/bgzip.c.pysam.c                  |   208 -
 tabix/index.c                          |   967 -
 tabix/index.c.pysam.c                  |   969 -
 tabix/knetfile.c.pysam.c               |   634 -
 tabix/kseq.h                           |   227 -
 tabix/kstring.c                        |   165 -
 tabix/kstring.c.pysam.c                |   167 -
 tabix/kstring.h                        |    68 -
 tabix/pysam.h                          |     5 -
 tabix/tabix.h                          |   145 -
 tests/Makefile                         |    52 -
 tests/ex1.fa                           |    56 -
 tests/ex1.sam.gz                       |   Bin 113194 -> 0 bytes
 tests/ex10.sam                         |    19 -
 tests/ex3.sam                          |    13 -
 tests/ex4.sam                          |     9 -
 tests/ex5.sam                          |     5 -
 tests/ex6.sam                          |     5 -
 tests/ex7.sam                          |     2 -
 tests/ex8.sam                          |     3 -
 tests/ex9_fail.bam                     |   Bin 10280 -> 0 bytes
 tests/ex9_nofail.bam                   |   Bin 10270 -> 0 bytes
 tests/example.bed.gz                   |   Bin 879 -> 0 bytes
 tests/example.bed.gz.tbi               |   Bin 245 -> 0 bytes
 tests/example.gtf.gz                   |   Bin 3825 -> 0 bytes
 tests/example.py                       |    79 -
 tests/example.vcf40                    |    23 -
 tests/example_btag.bam                 |   Bin 771 -> 0 bytes
 tests/example_btag.sam                 |     6 -
 tests/example_empty_header.bam         |   Bin 7554 -> 0 bytes
 tests/example_unmapped_reads_no_sq.sam |     3 -
 tests/example_user_header.sam          |     8 -
 tests/issue100.bam                     |   Bin 4344 -> 0 bytes
 tests/pysam_test.py                    |  2540 +-
 tests/segfault_tests.py                |    37 -
 tests/tabix_test.py                    |   951 +-
 tests/tag_bug.bam                      |   Bin 383 -> 0 bytes
 tests/test_unaligned.bam               |   Bin 514 -> 0 bytes
 tests/vcf-examples/10.vcf              |    84 -
 tests/vcf-examples/11.vcf              |   216 -
 tests/vcf-examples/12.vcf              |  1000 -
 tests/vcf-examples/13.vcf              |   220 -
 tests/vcf-examples/15.vcf              |   317 -
 tests/vcf-examples/16.vcf              |   369 -
 tests/vcf-examples/18.vcf              |  1000 -
 tests/vcf-examples/2.vcf               |   334 -
 tests/vcf-examples/20.vcf              |   307 -
 tests/vcf-examples/21.vcf              |   310 -
 tests/vcf-examples/22.vcf              |  1000 -
 tests/vcf-examples/23.vcf              |   419 -
 tests/vcf-examples/24.vcf              |   724 -
 tests/vcf-examples/3.vcf               |  1000 -
 tests/vcf-examples/4.vcf               |   318 -
 tests/vcf-examples/5.vcf               |  1000 -
 tests/vcf-examples/6.vcf               |   278 -
 tests/vcf-examples/7.vcf               |   317 -
 tests/vcf-examples/8.vcf               |    84 -
 tests/vcf-examples/9.vcf               |  1000 -
 tests/vcf-examples/issue85.vcf         |    26 -
 203 files changed, 129018 insertions(+), 93877 deletions(-)

diff --git a/INSTALL b/INSTALL
index 65330bc..4ef01e0 100644
--- a/INSTALL
+++ b/INSTALL
@@ -39,6 +39,19 @@ distribution. Type
 
 for more options.
 
+Build the documentation
+=======================
+
+Install a version of Sphinx that matches your Python version (2 or 3) and run
+
+    python setup.py build_sphinx
+
+or
+
+    python3 setup.py build_sphinx
+
+The documentation will be put into build/sphinx.
+
 Architecture specific options
 =============================
 
diff --git a/MANIFEST.in b/MANIFEST.in
index e1b78c0..7f2082e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -8,61 +8,53 @@ include COPYING
 include INSTALL
 include KNOWN_BUGS
 include THANKS
-include distribute_setup.py
-include pysam/csamtools.pxd
-include pysam/csamtools.pyx
-include pysam/csamtools.c
-include pysam/ctabix.pxd
-include pysam/ctabix.c
-include pysam/ctabix.pyx
-include pysam/TabProxies.c
-include pysam/TabProxies.pyx
-include pysam/TabProxies.pxd
-include pysam/cvcf.pyx
-include pysam/cvcf.pxd
-include pysam/cvcf.c
+include pysam/c*.pxd
+include pysam/c*.pyx
+include pysam/c*.c
 include pysam/*.c
 include pysam/*.h
-include pysam/pysam_util.h
-include pysam/tabix_util.h
 include samtools/*.h
 include samtools/*/*.h
-include tabix/*.c
-include tabix/*.h
+include htslib/*.c
+include htslib/*.h
+include htslib/htslib/*.h
+include htslib/cram/*.c
+include htslib/cram/*.h
 include pysam.py
 
 # pysam tests
 include tests/00README.txt
-include tests/Makefile
-include tests/ex1.fa
-include tests/ex1.sam.gz
-include tests/ex3.sam
-include tests/ex4.sam
-include tests/ex5.sam
-include tests/ex6.sam
-include tests/ex7.sam
-include tests/ex8.sam
-include tests/ex9_fail.bam
-include tests/ex9_nofail.bam
-include tests/ex10.sam
-include tests/example.py
-include tests/pysam_test.py
-include tests/segfault_tests.py
-include tests/example_*.sam
-include tests/example_btag.bam
-include tests/tag_bug.bam
-include tests/example.vcf40
-include tests/example_empty_header.bam
-include tests/test_unaligned.bam
-include tests/issue100.bam
+include tests/pysam_data
+include tests/tabix_data
+#ex1.fa
+#include tests/ex1.sam.gz
+#include tests/ex3.sam
+#include tests/ex4.sam
+#include tests/ex5.sam
+#include tests/ex6.sam
+#include tests/ex7.sam
+#include tests/ex8.sam
+#include tests/ex9_fail.bam
+#include tests/ex9_nofail.bam
+#include tests/ex10.sam
+#include tests/example.py
+#include tests/pysam_test.py
+#include tests/segfault_tests.py
+#include tests/example_*.sam
+#include tests/example_btag.bam
+#include tests/tag_bug.bam
+#include tests/example.vcf40
+#include tests/example_empty_header.bam
+#include tests/test_unaligned.bam
+#include tests/issue100.bam
 
 # tabix tests
-include tests/tabix_test.py
-include tests/example.gtf.gz
-include tests/example.gtf.gz.tbi
-include tests/example.bed.gz
-include tests/example.bed.gz.tbi
-include tests/vcf-examples/*.vcf
+#include tests/tabix_test.py
+#include tests/example.gtf.gz
+#include tests/example.gtf.gz.tbi
+#include tests/example.bed.gz
+#include tests/example.bed.gz.tbi
+#include tests/vcf-examples/*.vcf
 
 # documentation
 include doc/*
diff --git a/PKG-INFO b/PKG-INFO
index 663796e..41920ad 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pysam
-Version: 0.7.7
+Version: 0.8.0
 Summary: pysam
 Home-page: http://code.google.com/p/pysam/
 Author: Andreas Heger
@@ -13,4 +13,4 @@ Description:
         
         
 Platform: ALL
-Requires: cython (>=0.17)
+Requires: cython (>=0.20.1)
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..2f85ccb
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,27 @@
+=====
+Pysam
+=====
+
+Pysam is a python module for reading and manipulating files in the
+SAM/BAM format. The SAM/BAM format is a way to store efficiently large
+numbers of alignments (`Li 2009`_), such as those routinely are created by
+next-generation sequencing methods.
+
+pysam lightweight wrapper of the samtools_ C-API. Pysam also includes an
+interface for tabix_.
+
+The latest version is available through 
+`pypi <https://pypi.python.org/pypi/pysam>`_. To install, simply
+type::
+  
+   pip install pysam
+                                                      .
+Pysam documentation is available through https://readthedocs.org/ from
+`here <http://pysam.readthedocs.org/en/latest/>`_
+
+Questions and comments are very welcome and should be sent to the
+`pysam user group <http://groups.google.com/group/pysam-user-group>`_
+
+.. _samtools: http://samtools.sourceforge.net/
+.. _tabix: http://samtools.sourceforge.net/tabix.shtml
+.. _Li 2009: http://www.ncbi.nlm.nih.gov/pubmed/19505943
diff --git a/doc/api.rst b/doc/api.rst
index 1333cf8..dbb6ecb 100644
--- a/doc/api.rst
+++ b/doc/api.rst
@@ -1,3 +1,4 @@
+======================================================
 pysam - An interface for reading and writing SAM files
 ======================================================
 
@@ -113,7 +114,7 @@ More detailed usage instructions is at :ref:`usage`.
 
 
 API
-*****
+===
 
 .. automodule:: pysam
    :members:
diff --git a/doc/conf.py b/doc/conf.py
index 24abc47..7c7c097 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -18,7 +18,7 @@ import sys, os, glob
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 _libdir = "../build/lib.%s-%s-%s.%s" % (os.uname()[0].lower(), os.uname()[4],sys.version_info[0], sys.version_info[1] )
 if os.path.exists( _libdir ):
-    sys.path.append( os.path.abspath( _libdir ) )
+    sys.path.insert(0, os.path.abspath( _libdir ) )
 
 # -- General configuration -----------------------------------------------------
 
@@ -41,7 +41,7 @@ source_suffix = '.rst'
 #source_encoding = 'utf-8'
 
 # The master toctree document.
-master_doc = 'contents'
+master_doc = 'index'
 
 # General information about the project.
 project = u'pysam'
@@ -51,11 +51,9 @@ copyright = u'2009, Andreas Heger, Tildon Grant Belgrad, Martin Goodson, Kevin J
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
-sys.path.insert( 0, "../pysam")
-import version
-
+import pysam.version
 # The short X.Y version.
-version = version.__version__
+version = pysam.version.__version__
 # The full version, including alpha/beta/rc tags.
 release = version
 
@@ -130,7 +128,7 @@ html_theme = 'default'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = []
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
@@ -182,7 +180,7 @@ htmlhelp_basename = 'samtoolsdoc'
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
-  ('contents', 'samtools.tex', ur'samtools Documentation',
+  ('index', 'pysam.tex', ur'pysam documentation',
    ur'Andreas Heger, Tildon Grant Belgrad, Martin Goodson', 'manual'),
 ]
 
diff --git a/doc/developer.rst b/doc/developer.rst
index 42e042a..d7383c7 100644
--- a/doc/developer.rst
+++ b/doc/developer.rst
@@ -1,9 +1,9 @@
-*****************
+=================
 Developer's guide
-*****************
+=================
 
 Code organization
-*****************
+=================
 
 The top level directory is organized in the following 
 directories:
@@ -19,7 +19,7 @@ tests
    Examples and data for testing
 
 Importing :term:`csamtools`
-***************************
+===========================
 
 Running :file:`setup.py` will import the csamtools source code. 
 The command::
@@ -35,36 +35,24 @@ delete all :file:`*.c` and :file:`*.h` files in the :file:`samtools`
 directory first. 
 
 Unit testing
-************
+============
 
-Unit tests are currently in the script :file:`pysam_test.py`. 
+Unit tests are in the scripts :file:`pysam_test.py` and :file:`tabix_test.py`. 
 
-Unit tests for the python methods
----------------------------------
-
-Few implemented yet. This will require also writing functionality,
-hence postponed
-
-Unit tests for the command line interface
------------------------------------------
-
-The current suite of tests compare the binary files of selected
-samtools commands against running the same commands from within
-the pysam module. The general expectation is that the files
-are binary identical given that most of the code is
-from :term:`csamtools` anyway. However, differences might be
-found if the installed :term:`csamtools` version is different
-from the one wrapped with pysam.
-
-The tests create files in the current test directory. They
-are modeled on the example given within the :term:`csamtools`
-distribution. Two files are required in the working directory
-of the test script:
-
-1. :file:`ex1.fa`: a fasta file
-2. :file:`ex1.sam.gz`: a sam file
+Contributors
+============
 
+The following people have contributed to pysam:
 
+* Andreas Heger
+* Tildon Grant Belgrad
+* Kevin Jacobs
+* Florian Finkernagel
+* Ben Schiller
+* Marcel Martin
+* Gerton Lunter
+* Martin Goodson
+* Leo Goodstadt
 
 
 
diff --git a/doc/faq.rst b/doc/faq.rst
index a674e8f..8e07287 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -1,3 +1,7 @@
+===
+FAQ
+===
+
 pysam coordinates are wrong
 ===========================
 
@@ -80,7 +84,7 @@ the C-samtools package. Thus, some attention must be paid at the
 lifetime of objects. The following to code snippets will cause an
 error::
 
-    s = Samfile( 'ex1.bam' )
+    s = Samfile('ex1.bam')
     for p in s.pileup('chr1', 1000,1010):
         pass
     
@@ -90,7 +94,7 @@ error::
 The iteration has finished, thus the contents of p are invalid. A
 variation of this::
 
-    p = Samfile( 'ex1.bam' ).pileup( 'chr1', 1000, 1010).next()
+    p = next(Samfile('ex1.bam').pileup('chr1', 1000, 1010))
     for pp in p.pileups:
         print pp
 
@@ -99,7 +103,7 @@ by pileup goes out of scope. The solution is to keep a handle
 to the iterator that remains alive::
 
     i = Samfile( 'ex1.bam' ).pileup( 'chr1', 1000, 1010)
-    p = i.next()
+    p = next(i)
     for pp in p.pileups:
         print pp
 
diff --git a/doc/glossary.rst b/doc/glossary.rst
index d10fd30..aa61c40 100644
--- a/doc/glossary.rst
+++ b/doc/glossary.rst
@@ -1,6 +1,6 @@
-*********
+========
 Glossary
-*********
+========
 
 .. glossary::
    :sorted:
diff --git a/doc/contents.rst b/doc/index.rst
similarity index 92%
rename from doc/contents.rst
rename to doc/index.rst
index 3fcfdbc..9f2b9c0 100644
--- a/doc/contents.rst
+++ b/doc/index.rst
@@ -6,7 +6,7 @@
 pysam: samtools interface for python
 ====================================
 
-:Author: Andreas Heger, Tildon Grant Belgrad, Martin Goodson, Leo Goodstad, Kevin Jacobs
+:Author: Andreas Heger and contributors
 :Date: |today|
 :Version: |version|
 
@@ -19,7 +19,7 @@ and a high-level API for convenient access to the data in *SAM/BAM* formatted fi
 Also included is an interface to the tabix_ C-API for reading compressed and
 indexed tabular data.
 
-The current version wraps *samtools-0.1.18* and *tabix-0.2.6*.
+The current version wraps *samtools-0.1.19* and *tabix-0.2.6*.
 
 Contents
 --------
diff --git a/doc/release.rst b/doc/release.rst
index 062ab52..d42f13a 100644
--- a/doc/release.rst
+++ b/doc/release.rst
@@ -2,6 +2,32 @@
 Release notes
 =============
 
+Release 0.8.0
+=============
+
+  * Disabled features
+     * IteratorColumn.setMask() disabled as
+       htslib does not implement this functionality?
+
+  * Not implemented yet:
+     * reading SAM files without header
+     * samtools stepper
+
+  * tabix needs to be re-indexed
+  * tabix iterators will not return comments
+    (TODO: full iterator)
+  * tabix raises always ValueError for invalid intervals
+
+Release 0.7.8
+=============
+
+   * added AlignedRead.setTag method
+   * added AlignedRead.blocks
+   * unsetting CIGAR strings is now possible
+   * empty CIGAR string returns empty list
+   * added reopen flag to Samfile.fetch()
+   * various bugfixes
+
 Release 0.7.7
 =============
 
diff --git a/doc/usage.rst b/doc/usage.rst
index a3bc1c9..1a5e79c 100644
--- a/doc/usage.rst
+++ b/doc/usage.rst
@@ -1,8 +1,8 @@
 .. _Usage: 
 
-*************************************
+====================================
 Working with BAM/SAM-formatted files
-*************************************
+====================================
 
 In order to follow the examples below, execute
    
@@ -10,8 +10,8 @@ In order to follow the examples below, execute
 
 in the :file:`test` directory.
 
-Opening a sampfile
-------------------
+Opening a samfile
+=================
 
 The first operation is to import the pysam module and open a 
 :class:`pysam.Samfile`::
@@ -27,7 +27,7 @@ To open a :term:`SAM` file, type::
    samfile = pysam.Samfile( "ex1.bam", "r" )
 
 Fetching reads mapped to a :term:`region`
------------------------------------------
+=========================================
 
 There are two ways to obtain the reads mapped to a genomic region. The
 first method follows the :term:`csamtools` API and  works 
@@ -43,7 +43,8 @@ Using a function object, work can be done on the alignments. The
 code below simply counts aligned reads::
 
    class Counter:
-       cCounts = 0
+       def __init__(self):
+           self.counts = 0
        def __call__(self, alignment):
            self.counts += 1
    
@@ -69,7 +70,7 @@ overlapping with the :term:`region`. Thus the reads returned
 might span a region that is larger than the one queried.
 
 Using the pileup-engine
------------------------
+=======================
 
 The :term:`pileup` engine of :term:`csamtools` iterates
 over all reads that are aligned to a :term:`region`. In
@@ -94,7 +95,7 @@ The second method uses python iterators. The iterator
 Aligned reads are returned as a :class:`pysam.PileupColumn`.
 
 Using samtools commands within python
--------------------------------------
+=====================================
 
 Commands available in :term:`csamtools` are available
 as simple function calls. For example::
@@ -137,7 +138,7 @@ Note that only the output from the last invocation of a command
 is stored.
 
 Creating SAM/BAM files from scratch
------------------------------------
+===================================
 
 The following example shows how a new BAM file is constructed from scratch.
 The important part here is that the :class:`pysam.Samfile` class needs to receive
@@ -168,7 +169,7 @@ Here, we use a header dictionary::
    outfile.close()
 
 Using streams
--------------
+=============
 
 Pysam does not support reading and writing from true python file objects, but
 it does support reading and writing from stdin and stdout. The following example reads 
@@ -221,7 +222,7 @@ Note, only the file open mode needs to changed from ``r`` to ``rb``.
 .. and :class:`pysam.IteratorIndelCaller`.
 
 Extending pysam
----------------
+===============
 
 Using pyximport_, it is (relatively) straight-forward to access pysam
 internals and the underlying samtools library. An example is provided
diff --git a/tabix/__init__.py b/htslib/__init__.py
similarity index 100%
copy from tabix/__init__.py
copy to htslib/__init__.py
diff --git a/htslib/bgzf.c b/htslib/bgzf.c
new file mode 100644
index 0000000..1bf799b
--- /dev/null
+++ b/htslib/bgzf.c
@@ -0,0 +1,1085 @@
+/* The MIT License
+
+   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
+                 2011 Attractive Chaos <attractor at 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"), to deal
+   in the Software without restriction, including without limitation the rights
+   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+   copies of the Software, and to permit persons to whom the Software is
+   furnished to do so, subject to the following conditions:
+
+   The above copyright notice and this permission notice shall be included in
+   all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+   THE SOFTWARE.
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <assert.h>
+#include <pthread.h>
+#include <sys/types.h>
+#include <inttypes.h>
+
+#include "htslib/hts.h"
+#include "htslib/bgzf.h"
+#include "htslib/hfile.h"
+
+#define BLOCK_HEADER_LENGTH 18
+#define BLOCK_FOOTER_LENGTH 8
+
+
+/* BGZF/GZIP header (speciallized from RFC 1952; little endian):
+ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+ | 31|139|  8|  4|              0|  0|255|      6| 66| 67|      2|BLK_LEN|
+ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+  BGZF extension:
+                ^                              ^   ^   ^ 
+                |                              |   |   |
+               FLG.EXTRA                     XLEN  B   C
+
+  BGZF format is compatible with GZIP. It limits the size of each compressed
+  block to 2^16 bytes and adds and an extra "BC" field in the gzip header which
+  records the size.
+
+*/
+static const uint8_t g_magic[19] = "\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\0\0";
+
+#ifdef BGZF_CACHE
+typedef struct {
+	int size;
+	uint8_t *block;
+	int64_t end_offset;
+} cache_t;
+#include "htslib/khash.h"
+KHASH_MAP_INIT_INT64(cache, cache_t)
+#endif
+
+typedef struct 
+{
+    uint64_t uaddr;  // offset w.r.t. uncompressed data
+    uint64_t caddr;  // offset w.r.t. compressed data
+}
+bgzidx1_t;
+
+struct __bgzidx_t
+{
+    int noffs, moffs;       // the size of the index, n:used, m:allocated 
+    bgzidx1_t *offs;        // offsets
+    uint64_t ublock_addr;   // offset of the current block (uncompressed data)
+};
+
+void bgzf_index_destroy(BGZF *fp);
+int bgzf_index_add_block(BGZF *fp);
+
+static inline void packInt16(uint8_t *buffer, uint16_t value)
+{
+	buffer[0] = value;
+	buffer[1] = value >> 8;
+}
+
+static inline int unpackInt16(const uint8_t *buffer)
+{
+	return buffer[0] | buffer[1] << 8;
+}
+
+static inline void packInt32(uint8_t *buffer, uint32_t value)
+{
+	buffer[0] = value;
+	buffer[1] = value >> 8;
+	buffer[2] = value >> 16;
+	buffer[3] = value >> 24;
+}
+
+static BGZF *bgzf_read_init(hFILE *hfpr)
+{
+	BGZF *fp;
+	uint8_t magic[2];
+	ssize_t n = hpeek(hfpr, magic, 2);
+	if (n < 0) return NULL;
+
+	fp = (BGZF*)calloc(1, sizeof(BGZF));
+	if (fp == NULL) return NULL;
+
+	fp->is_write = 0;
+	fp->is_compressed = (n==2 && magic[0]==0x1f && magic[1]==0x8b);
+	fp->uncompressed_block = malloc(BGZF_MAX_BLOCK_SIZE);
+	fp->compressed_block = malloc(BGZF_MAX_BLOCK_SIZE);
+#ifdef BGZF_CACHE
+	fp->cache = kh_init(cache);
+#endif
+	return fp;
+}
+
+static BGZF *bgzf_write_init(int compress_level) // compress_level==-1 for the default level, -2 plain uncompressed
+{
+	BGZF *fp;
+	fp = (BGZF*)calloc(1, sizeof(BGZF));
+	fp->is_write = 1;
+    if ( compress_level==-2 )
+    {
+        fp->is_compressed = 0;
+        return fp;
+    }
+    fp->is_compressed = 1;
+	fp->uncompressed_block = malloc(BGZF_MAX_BLOCK_SIZE);
+	fp->compressed_block = malloc(BGZF_MAX_BLOCK_SIZE);
+	fp->compress_level = compress_level < 0? Z_DEFAULT_COMPRESSION : compress_level; // Z_DEFAULT_COMPRESSION==-1
+	if (fp->compress_level > 9) fp->compress_level = Z_DEFAULT_COMPRESSION;
+	return fp;
+}
+// get the compress level from the mode string
+static int mode2level(const char *__restrict mode)
+{
+	int i, compress_level = -1;
+	for (i = 0; mode[i]; ++i)
+		if (mode[i] >= '0' && mode[i] <= '9') break;
+	if (mode[i]) compress_level = (int)mode[i] - '0';
+	if (strchr(mode, 'u')) compress_level = -2;
+	return compress_level;
+}
+
+BGZF *bgzf_open(const char *path, const char *mode)
+{
+	BGZF *fp = 0;
+	assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
+	if (strchr(mode, 'r')) {
+		hFILE *fpr;
+		if ((fpr = hopen(path, mode)) == 0) return 0;
+		fp = bgzf_read_init(fpr);
+		if (fp == 0) { hclose_abruptly(fpr); return NULL; }
+		fp->fp = fpr;
+	} else if (strchr(mode, 'w') || strchr(mode, 'a')) {
+		hFILE *fpw;
+		if ((fpw = hopen(path, mode)) == 0) return 0;
+		fp = bgzf_write_init(mode2level(mode));
+		fp->fp = fpw;
+	}
+	else { errno = EINVAL; return 0; }
+
+	fp->is_be = ed_is_big();
+	return fp;
+}
+
+BGZF *bgzf_dopen(int fd, const char *mode)
+{
+	BGZF *fp = 0;
+	assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
+	if (strchr(mode, 'r')) {
+		hFILE *fpr;
+		if ((fpr = hdopen(fd, mode)) == 0) return 0;
+		fp = bgzf_read_init(fpr);
+		if (fp == 0) { hclose_abruptly(fpr); return NULL; } // FIXME this closes fd
+		fp->fp = fpr;
+	} else if (strchr(mode, 'w') || strchr(mode, 'a')) {
+		hFILE *fpw;
+		if ((fpw = hdopen(fd, mode)) == 0) return 0;
+		fp = bgzf_write_init(mode2level(mode));
+		fp->fp = fpw;
+	}
+	else { errno = EINVAL; return 0; }
+
+	fp->is_be = ed_is_big();
+	return fp;
+}
+
+BGZF *bgzf_hopen(hFILE *hfp, const char *mode)
+{
+	BGZF *fp = NULL;
+	assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
+	if (strchr(mode, 'r')) {
+		fp = bgzf_read_init(hfp);
+		if (fp == NULL) return NULL;
+	} else if (strchr(mode, 'w') || strchr(mode, 'a')) {
+		fp = bgzf_write_init(mode2level(mode));
+	}
+	else { errno = EINVAL; return 0; }
+
+	fp->fp = hfp;
+	fp->is_be = ed_is_big();
+	return fp;
+}
+
+static int bgzf_compress(void *_dst, int *dlen, void *src, int slen, int level)
+{
+	uint32_t crc;
+	z_stream zs;
+	uint8_t *dst = (uint8_t*)_dst;
+
+	// compress the body
+	zs.zalloc = NULL; zs.zfree = NULL;
+	zs.next_in  = (Bytef*)src;
+	zs.avail_in = slen;
+	zs.next_out = dst + BLOCK_HEADER_LENGTH;
+	zs.avail_out = *dlen - BLOCK_HEADER_LENGTH - BLOCK_FOOTER_LENGTH;
+	if (deflateInit2(&zs, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY) != Z_OK) return -1; // -15 to disable zlib header/footer
+	if (deflate(&zs, Z_FINISH) != Z_STREAM_END) return -1;
+	if (deflateEnd(&zs) != Z_OK) return -1;
+	*dlen = zs.total_out + BLOCK_HEADER_LENGTH + BLOCK_FOOTER_LENGTH;
+	// write the header
+	memcpy(dst, g_magic, BLOCK_HEADER_LENGTH); // the last two bytes are a place holder for the length of the block
+	packInt16(&dst[16], *dlen - 1); // write the compressed length; -1 to fit 2 bytes
+	// write the footer
+	crc = crc32(crc32(0L, NULL, 0L), (Bytef*)src, slen);
+	packInt32((uint8_t*)&dst[*dlen - 8], crc);
+	packInt32((uint8_t*)&dst[*dlen - 4], slen);
+	return 0;
+}
+
+// Deflate the block in fp->uncompressed_block into fp->compressed_block. Also adds an extra field that stores the compressed block length.
+static int deflate_block(BGZF *fp, int block_length)
+{
+	int comp_size = BGZF_MAX_BLOCK_SIZE;
+	if (bgzf_compress(fp->compressed_block, &comp_size, fp->uncompressed_block, block_length, fp->compress_level) != 0) {
+		fp->errcode |= BGZF_ERR_ZLIB;
+		return -1;
+	}
+	fp->block_offset = 0;
+	return comp_size;
+}
+
+// Inflate the block in fp->compressed_block into fp->uncompressed_block
+static int inflate_block(BGZF* fp, int block_length)
+{
+	z_stream zs;
+	zs.zalloc = NULL;
+	zs.zfree = NULL;
+	zs.next_in = (Bytef*)fp->compressed_block + 18;
+	zs.avail_in = block_length - 16;
+	zs.next_out = (Bytef*)fp->uncompressed_block;
+	zs.avail_out = BGZF_MAX_BLOCK_SIZE;
+
+	if (inflateInit2(&zs, -15) != Z_OK) {
+		fp->errcode |= BGZF_ERR_ZLIB;
+		return -1;
+	}
+	if (inflate(&zs, Z_FINISH) != Z_STREAM_END) {
+		inflateEnd(&zs);
+		fp->errcode |= BGZF_ERR_ZLIB;
+		return -1;
+	}
+	if (inflateEnd(&zs) != Z_OK) {
+		fp->errcode |= BGZF_ERR_ZLIB;
+		return -1;
+	}
+	return zs.total_out;
+}
+
+static int inflate_gzip_block(BGZF *fp, int cached)
+{
+    int ret = Z_OK;
+    do 
+    {
+        if ( !cached && fp->gz_stream->avail_out!=0 )
+        {
+            fp->gz_stream->avail_in = hread(fp->fp, fp->compressed_block, BGZF_BLOCK_SIZE);
+            if ( fp->gz_stream->avail_in<=0 ) return fp->gz_stream->avail_in;
+            if ( fp->gz_stream->avail_in==0 ) break;
+            fp->gz_stream->next_in = fp->compressed_block;
+        }
+        else cached = 0;
+        do
+        {
+            fp->gz_stream->next_out = (Bytef*)fp->uncompressed_block + fp->block_offset;
+            fp->gz_stream->avail_out = BGZF_MAX_BLOCK_SIZE - fp->block_offset;
+            ret = inflate(fp->gz_stream, Z_NO_FLUSH);
+            if ( ret<0 ) return -1;
+            unsigned int have = BGZF_MAX_BLOCK_SIZE - fp->gz_stream->avail_out;
+            if ( have ) return have; 
+        }
+        while ( fp->gz_stream->avail_out == 0 );
+    }
+    while (ret != Z_STREAM_END);
+    return BGZF_MAX_BLOCK_SIZE - fp->gz_stream->avail_out;
+}
+
+// Returns: 0 on success (BGZF header); -1 on non-BGZF GZIP header; -2 on error
+static int check_header(const uint8_t *header)
+{
+    if ( header[0] != 31 || header[1] != 139 || header[2] != 8 ) return -2;
+    return ((header[3] & 4) != 0
+            && unpackInt16((uint8_t*)&header[10]) == 6
+            && header[12] == 'B' && header[13] == 'C'
+            && unpackInt16((uint8_t*)&header[14]) == 2) ? 0 : -1;
+}
+
+#ifdef BGZF_CACHE
+static void free_cache(BGZF *fp)
+{
+	khint_t k;
+	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
+	if (fp->is_write) return;
+	for (k = kh_begin(h); k < kh_end(h); ++k)
+		if (kh_exist(h, k)) free(kh_val(h, k).block);
+	kh_destroy(cache, h);
+}
+
+static int load_block_from_cache(BGZF *fp, int64_t block_address)
+{
+	khint_t k;
+	cache_t *p;
+	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
+	k = kh_get(cache, h, block_address);
+	if (k == kh_end(h)) return 0;
+	p = &kh_val(h, k);
+	if (fp->block_length != 0) fp->block_offset = 0;
+	fp->block_address = block_address;
+	fp->block_length = p->size;
+	memcpy(fp->uncompressed_block, p->block, BGZF_MAX_BLOCK_SIZE);
+	if ( hseek(fp->fp, p->end_offset, SEEK_SET) < 0 ) 
+    {
+        // todo: move the error up
+        fprintf(stderr,"Could not hseek to %"PRId64"\n", p->end_offset);
+        exit(1);
+    }
+	return p->size;
+}
+
+static void cache_block(BGZF *fp, int size)
+{
+	int ret;
+	khint_t k;
+	cache_t *p;
+	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
+	if (BGZF_MAX_BLOCK_SIZE >= fp->cache_size) return;
+	if ((kh_size(h) + 1) * BGZF_MAX_BLOCK_SIZE > (uint32_t)fp->cache_size) {
+		/* A better way would be to remove the oldest block in the
+		 * cache, but here we remove a random one for simplicity. This
+		 * should not have a big impact on performance. */
+		for (k = kh_begin(h); k < kh_end(h); ++k)
+			if (kh_exist(h, k)) break;
+		if (k < kh_end(h)) {
+			free(kh_val(h, k).block);
+			kh_del(cache, h, k);
+		}
+	}
+	k = kh_put(cache, h, fp->block_address, &ret);
+	if (ret == 0) return; // if this happens, a bug!
+	p = &kh_val(h, k);
+	p->size = fp->block_length;
+	p->end_offset = fp->block_address + size;
+	p->block = (uint8_t*)malloc(BGZF_MAX_BLOCK_SIZE);
+	memcpy(kh_val(h, k).block, fp->uncompressed_block, BGZF_MAX_BLOCK_SIZE);
+}
+#else
+static void free_cache(BGZF *fp) {}
+static int load_block_from_cache(BGZF *fp, int64_t block_address) {return 0;}
+static void cache_block(BGZF *fp, int size) {}
+#endif
+
+int bgzf_read_block(BGZF *fp)
+{
+	uint8_t header[BLOCK_HEADER_LENGTH], *compressed_block;
+	int count, size = 0, block_length, remaining;
+
+    // Reading an uncompressed file
+    if ( !fp->is_compressed )
+    {
+        count = hread(fp->fp, fp->uncompressed_block, BGZF_MAX_BLOCK_SIZE);
+        if ( count==0 ) 
+        {
+            fp->block_length = 0;
+            return 0;
+        }
+        if (fp->block_length != 0) fp->block_offset = 0;
+        fp->block_address += count;
+        fp->block_length = count;
+        return 0;
+    }
+
+    // Reading compressed file
+	int64_t block_address;
+	block_address = htell(fp->fp);
+    if ( fp->is_gzip )
+    {
+        count = inflate_gzip_block(fp, 0);
+        if ( count<0 )
+        {
+            fp->errcode |= BGZF_ERR_ZLIB;
+            return -1;
+        }
+        fp->block_length = count;
+        fp->block_address = block_address;
+        return 0;
+    }
+	if (fp->cache_size && load_block_from_cache(fp, block_address)) return 0;
+    count = hread(fp->fp, header, sizeof(header));
+    if (count == 0) { // no data read
+        fp->block_length = 0;
+        return 0;
+    }
+    int ret;
+    if ( count != sizeof(header) || (ret=check_header(header))==-2 ) 
+    {
+        fp->errcode |= BGZF_ERR_HEADER;
+        return -1;
+    }
+    if ( ret==-1 )
+    {
+        // GZIP, not BGZF
+        uint8_t *cblock = (uint8_t*)fp->compressed_block;
+        memcpy(cblock, header, sizeof(header));
+        count = hread(fp->fp, cblock+sizeof(header), BGZF_BLOCK_SIZE - sizeof(header)) + sizeof(header);
+        int nskip = 10;
+
+        // Check optional fields to skip: FLG.FNAME,FLG.FCOMMENT,FLG.FHCRC,FLG.FEXTRA
+        // Note: Some of these fields are untested, I did not have appropriate data available
+        if ( header[3] & 0x4 ) // FLG.FEXTRA
+        {
+            nskip += unpackInt16(&cblock[nskip]) + 2;
+        }
+        if ( header[3] & 0x8 ) // FLG.FNAME
+        {
+            while ( nskip<BGZF_BLOCK_SIZE && cblock[nskip] ) nskip++;
+            if ( nskip==BGZF_BLOCK_SIZE ) 
+            {
+                fp->errcode |= BGZF_ERR_HEADER;
+                return -1;
+            }
+            nskip++;
+        }
+        if ( header[3] & 0x10 ) // FLG.FCOMMENT
+        {
+            while ( nskip<BGZF_BLOCK_SIZE && cblock[nskip] ) nskip++;
+            if ( nskip==BGZF_BLOCK_SIZE ) 
+            {
+                fp->errcode |= BGZF_ERR_HEADER;
+                return -1;
+            }
+            nskip++;
+        }
+        if ( header[3] & 0x2 ) nskip += 2;  //  FLG.FHCRC
+
+        fp->is_gzip = 1;
+        fp->gz_stream = (z_stream*) calloc(1,sizeof(z_stream));
+        int ret = inflateInit2(fp->gz_stream, -15);
+        if (ret != Z_OK) 
+        {
+            fp->errcode |= BGZF_ERR_ZLIB;
+            return -1;
+        }
+        fp->gz_stream->avail_in = count - nskip;
+        fp->gz_stream->next_in  = cblock + nskip;
+        count = inflate_gzip_block(fp, 1);
+        if ( count<0 )
+        {
+            fp->errcode |= BGZF_ERR_ZLIB;
+            return -1;
+        }
+        fp->block_length = count;
+        fp->block_address = block_address;
+        return 0;
+    }
+	size = count;
+	block_length = unpackInt16((uint8_t*)&header[16]) + 1; // +1 because when writing this number, we used "-1"
+	compressed_block = (uint8_t*)fp->compressed_block;
+	memcpy(compressed_block, header, BLOCK_HEADER_LENGTH);
+	remaining = block_length - BLOCK_HEADER_LENGTH;
+	count = hread(fp->fp, &compressed_block[BLOCK_HEADER_LENGTH], remaining);
+	if (count != remaining) {
+		fp->errcode |= BGZF_ERR_IO;
+		return -1;
+	}
+	size += count;
+	if ((count = inflate_block(fp, block_length)) < 0) return -1;
+	if (fp->block_length != 0) fp->block_offset = 0; // Do not reset offset if this read follows a seek.
+	fp->block_address = block_address;
+	fp->block_length = count;
+    if ( fp->idx_build_otf ) 
+    {
+        bgzf_index_add_block(fp);
+        fp->idx->ublock_addr += count;
+    }
+	cache_block(fp, size);
+	return 0;
+}
+
+ssize_t bgzf_read(BGZF *fp, void *data, size_t length)
+{
+	ssize_t bytes_read = 0;
+	uint8_t *output = (uint8_t*)data;
+	if (length <= 0) return 0;
+	assert(fp->is_write == 0);
+	while (bytes_read < length) {
+		int copy_length, available = fp->block_length - fp->block_offset;
+		uint8_t *buffer;
+		if (available <= 0) {
+			if (bgzf_read_block(fp) != 0) return -1;
+			available = fp->block_length - fp->block_offset;
+			if (available <= 0) break;
+		}
+		copy_length = length - bytes_read < available? length - bytes_read : available;
+		buffer = (uint8_t*)fp->uncompressed_block;
+		memcpy(output, buffer + fp->block_offset, copy_length);
+		fp->block_offset += copy_length;
+		output += copy_length;
+		bytes_read += copy_length;
+	}
+	if (fp->block_offset == fp->block_length) {
+		fp->block_address = htell(fp->fp);
+		fp->block_offset = fp->block_length = 0;
+	}
+    fp->uncompressed_address += bytes_read;
+	return bytes_read;
+}
+
+ssize_t bgzf_raw_read(BGZF *fp, void *data, size_t length)
+{
+	return hread(fp->fp, data, length);
+}
+
+#ifdef BGZF_MT
+
+typedef struct {
+	struct bgzf_mtaux_t *mt;
+	void *buf;
+	int i, errcode, toproc, compress_level;
+} worker_t;
+
+typedef struct bgzf_mtaux_t {
+	int n_threads, n_blks, curr, done;
+	volatile int proc_cnt;
+	void **blk;
+	int *len;
+	worker_t *w;
+	pthread_t *tid;
+	pthread_mutex_t lock;
+	pthread_cond_t cv;
+} mtaux_t;
+
+static int worker_aux(worker_t *w)
+{
+	int i, stop = 0;
+	// wait for condition: to process or all done
+	pthread_mutex_lock(&w->mt->lock);
+	while (!w->toproc && !w->mt->done)
+		pthread_cond_wait(&w->mt->cv, &w->mt->lock);
+	if (w->mt->done) stop = 1;
+	w->toproc = 0;
+	pthread_mutex_unlock(&w->mt->lock);
+	if (stop) return 1; // to quit the thread
+	w->errcode = 0;
+	for (i = w->i; i < w->mt->curr; i += w->mt->n_threads) {
+		int clen = BGZF_MAX_BLOCK_SIZE;
+		if (bgzf_compress(w->buf, &clen, w->mt->blk[i], w->mt->len[i], w->compress_level) != 0)
+			w->errcode |= BGZF_ERR_ZLIB;
+		memcpy(w->mt->blk[i], w->buf, clen);
+		w->mt->len[i] = clen;
+	}
+	__sync_fetch_and_add(&w->mt->proc_cnt, 1);
+	return 0;
+}
+
+static void *mt_worker(void *data)
+{
+	while (worker_aux((worker_t*)data) == 0);
+	return 0;
+}
+
+int bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks)
+{
+	int i;
+	mtaux_t *mt;
+	pthread_attr_t attr;
+	if (!fp->is_write || fp->mt || n_threads <= 1) return -1;
+	mt = (mtaux_t*)calloc(1, sizeof(mtaux_t));
+	mt->n_threads = n_threads;
+	mt->n_blks = n_threads * n_sub_blks;
+	mt->len = (int*)calloc(mt->n_blks, sizeof(int));
+	mt->blk = (void**)calloc(mt->n_blks, sizeof(void*));
+	for (i = 0; i < mt->n_blks; ++i)
+		mt->blk[i] = malloc(BGZF_MAX_BLOCK_SIZE);
+	mt->tid = (pthread_t*)calloc(mt->n_threads, sizeof(pthread_t)); // tid[0] is not used, as the worker 0 is launched by the master
+	mt->w = (worker_t*)calloc(mt->n_threads, sizeof(worker_t));
+	for (i = 0; i < mt->n_threads; ++i) {
+		mt->w[i].i = i;
+		mt->w[i].mt = mt;
+		mt->w[i].compress_level = fp->compress_level;
+		mt->w[i].buf = malloc(BGZF_MAX_BLOCK_SIZE);
+	}
+	pthread_attr_init(&attr);
+	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+	pthread_mutex_init(&mt->lock, 0);
+	pthread_cond_init(&mt->cv, 0);
+	for (i = 1; i < mt->n_threads; ++i) // worker 0 is effectively launched by the master thread
+		pthread_create(&mt->tid[i], &attr, mt_worker, &mt->w[i]);
+	fp->mt = mt;
+	return 0;
+}
+
+static void mt_destroy(mtaux_t *mt)
+{
+	int i;
+	// signal all workers to quit
+	pthread_mutex_lock(&mt->lock);
+	mt->done = 1; mt->proc_cnt = 0;
+	pthread_cond_broadcast(&mt->cv);
+	pthread_mutex_unlock(&mt->lock);
+	for (i = 1; i < mt->n_threads; ++i) pthread_join(mt->tid[i], 0); // worker 0 is effectively launched by the master thread
+	// free other data allocated on heap
+	for (i = 0; i < mt->n_blks; ++i) free(mt->blk[i]);
+	for (i = 0; i < mt->n_threads; ++i) free(mt->w[i].buf);
+	free(mt->blk); free(mt->len); free(mt->w); free(mt->tid);
+	pthread_cond_destroy(&mt->cv);
+	pthread_mutex_destroy(&mt->lock);
+	free(mt);
+}
+
+static void mt_queue(BGZF *fp)
+{
+	mtaux_t *mt = fp->mt;
+	assert(mt->curr < mt->n_blks); // guaranteed by the caller
+	memcpy(mt->blk[mt->curr], fp->uncompressed_block, fp->block_offset);
+	mt->len[mt->curr] = fp->block_offset;
+	fp->block_offset = 0;
+	++mt->curr;
+}
+
+static int mt_flush_queue(BGZF *fp)
+{
+	int i;
+	mtaux_t *mt = fp->mt;
+	// signal all the workers to compress
+	pthread_mutex_lock(&mt->lock);
+	for (i = 0; i < mt->n_threads; ++i) mt->w[i].toproc = 1;
+	mt->proc_cnt = 0;
+	pthread_cond_broadcast(&mt->cv);
+	pthread_mutex_unlock(&mt->lock);
+	// worker 0 is doing things here
+	worker_aux(&mt->w[0]);
+	// wait for all the threads to complete
+	while (mt->proc_cnt < mt->n_threads);
+	// dump data to disk
+	for (i = 0; i < mt->n_threads; ++i) fp->errcode |= mt->w[i].errcode;
+	for (i = 0; i < mt->curr; ++i)
+		if (hwrite(fp->fp, mt->blk[i], mt->len[i]) != mt->len[i]) {
+			fp->errcode |= BGZF_ERR_IO;
+			break;
+		}
+	mt->curr = 0;
+	return (fp->errcode == 0)? 0 : -1;
+}
+
+static int lazy_flush(BGZF *fp)
+{
+	if (fp->mt) {
+		if (fp->block_offset) mt_queue(fp);
+		return (fp->mt->curr < fp->mt->n_blks)? 0 : mt_flush_queue(fp);
+	}
+	else return bgzf_flush(fp);
+}
+
+#else  // ~ #ifdef BGZF_MT
+
+int bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks)
+{
+	return 0;
+}
+
+static inline int lazy_flush(BGZF *fp)
+{
+	return bgzf_flush(fp);
+}
+
+#endif // ~ #ifdef BGZF_MT
+
+int bgzf_flush(BGZF *fp)
+{
+	if (!fp->is_write) return 0;
+#ifdef BGZF_MT
+	if (fp->mt) {
+		if (fp->block_offset) mt_queue(fp); // guaranteed that assertion does not fail
+		return mt_flush_queue(fp);
+	}
+#endif
+	while (fp->block_offset > 0) {
+        if ( fp->idx_build_otf ) 
+        {
+            bgzf_index_add_block(fp);
+            fp->idx->ublock_addr += fp->block_offset;
+        }
+		int block_length = deflate_block(fp, fp->block_offset);
+		if (block_length < 0) return -1;
+		if (hwrite(fp->fp, fp->compressed_block, block_length) != block_length) {
+			fp->errcode |= BGZF_ERR_IO; // possibly truncated file
+			return -1;
+		}
+		fp->block_address += block_length;
+	}
+	return 0;
+}
+
+int bgzf_flush_try(BGZF *fp, ssize_t size)
+{
+	if (fp->block_offset + size > BGZF_BLOCK_SIZE) return lazy_flush(fp);
+	return 0;
+}
+
+ssize_t bgzf_write(BGZF *fp, const void *data, size_t length)
+{
+    if ( !fp->is_compressed )
+        return hwrite(fp->fp, data, length);
+
+	const uint8_t *input = (const uint8_t*)data;
+	ssize_t remaining = length;
+	assert(fp->is_write);
+	while (remaining > 0) {
+		uint8_t* buffer = (uint8_t*)fp->uncompressed_block;
+		int copy_length = BGZF_BLOCK_SIZE - fp->block_offset;
+		if (copy_length > remaining) copy_length = remaining;
+		memcpy(buffer + fp->block_offset, input, copy_length);
+		fp->block_offset += copy_length;
+		input += copy_length;
+		remaining -= copy_length;
+		if (fp->block_offset == BGZF_BLOCK_SIZE) {
+			if (lazy_flush(fp) != 0) return -1;
+		}
+	}
+	return length - remaining;
+}
+
+ssize_t bgzf_raw_write(BGZF *fp, const void *data, size_t length)
+{
+	return hwrite(fp->fp, data, length);
+}
+
+int bgzf_close(BGZF* fp)
+{
+	int ret, block_length;
+	if (fp == 0) return -1;
+	if (fp->is_write && fp->is_compressed) {
+		if (bgzf_flush(fp) != 0) return -1;
+		fp->compress_level = -1;
+		block_length = deflate_block(fp, 0); // write an empty block
+		if (hwrite(fp->fp, fp->compressed_block, block_length) < 0
+			|| hflush(fp->fp) != 0) {
+			fp->errcode |= BGZF_ERR_IO;
+			return -1;
+		}
+#ifdef BGZF_MT
+		if (fp->mt) mt_destroy(fp->mt);
+#endif
+	}
+    if ( fp->is_gzip )
+    {
+        (void)inflateEnd(fp->gz_stream);
+        free(fp->gz_stream);
+    }
+	ret = hclose(fp->fp);
+	if (ret != 0) return -1;
+    bgzf_index_destroy(fp);
+	free(fp->uncompressed_block);
+	free(fp->compressed_block);
+	free_cache(fp);
+	free(fp);
+	return 0;
+}
+
+void bgzf_set_cache_size(BGZF *fp, int cache_size)
+{
+	if (fp) fp->cache_size = cache_size;
+}
+
+int bgzf_check_EOF(BGZF *fp)
+{
+	uint8_t buf[28];
+	off_t offset = htell(fp->fp);
+	if (hseek(fp->fp, -28, SEEK_END) < 0) {
+		if (errno == ESPIPE) { hclearerr(fp->fp); return 2; }
+		else return -1;
+	}
+	if ( hread(fp->fp, buf, 28) != 28 ) return -1;
+	if ( hseek(fp->fp, offset, SEEK_SET) < 0 ) return -1;
+	return (memcmp("\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\033\0\3\0\0\0\0\0\0\0\0\0", buf, 28) == 0)? 1 : 0;
+}
+
+int64_t bgzf_seek(BGZF* fp, int64_t pos, int where)
+{
+	int block_offset;
+	int64_t block_address;
+
+	if (fp->is_write || where != SEEK_SET) {
+		fp->errcode |= BGZF_ERR_MISUSE;
+		return -1;
+	}
+	block_offset = pos & 0xFFFF;
+	block_address = pos >> 16;
+	if (hseek(fp->fp, block_address, SEEK_SET) < 0) {
+		fp->errcode |= BGZF_ERR_IO;
+		return -1;
+	}
+	fp->block_length = 0;  // indicates current block has not been loaded
+	fp->block_address = block_address << 16;
+	fp->block_offset = block_offset;
+	return 0;
+}
+
+int bgzf_is_bgzf(const char *fn)
+{
+	uint8_t buf[16];
+	int n;
+	hFILE *fp;
+	if ((fp = hopen(fn, "r")) == 0) return 0;
+	n = hread(fp, buf, 16);
+	if ( hclose(fp) < 0 ) return -1;
+	if (n != 16) return 0;
+	return memcmp(g_magic, buf, 16) == 0? 1 : 0;
+}
+
+int bgzf_getc(BGZF *fp)
+{
+	int c;
+	if (fp->block_offset >= fp->block_length) {
+		if (bgzf_read_block(fp) != 0) return -2; /* error */
+		if (fp->block_length == 0) return -1; /* end-of-file */
+	}
+	c = ((unsigned char*)fp->uncompressed_block)[fp->block_offset++];
+    if (fp->block_offset == fp->block_length) {
+        fp->block_address = htell(fp->fp);
+        fp->block_offset = 0;
+        fp->block_length = 0;
+    }
+    fp->uncompressed_address++;
+	return c;
+}
+
+#ifndef kroundup32
+#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
+#endif
+
+int bgzf_getline(BGZF *fp, int delim, kstring_t *str)
+{
+	int l, state = 0;
+	unsigned char *buf = (unsigned char*)fp->uncompressed_block;
+	str->l = 0;
+	do {
+		if (fp->block_offset >= fp->block_length) {
+			if (bgzf_read_block(fp) != 0) { state = -2; break; }
+			if (fp->block_length == 0) { state = -1; break; }
+		}
+		for (l = fp->block_offset; l < fp->block_length && buf[l] != delim; ++l);
+		if (l < fp->block_length) state = 1;
+		l -= fp->block_offset;
+		if (str->l + l + 1 >= str->m) {
+			str->m = str->l + l + 2;
+			kroundup32(str->m);
+			str->s = (char*)realloc(str->s, str->m);
+		}
+		memcpy(str->s + str->l, buf + fp->block_offset, l);
+		str->l += l;
+		fp->block_offset += l + 1;
+		if (fp->block_offset >= fp->block_length) {
+			fp->block_address = htell(fp->fp);
+			fp->block_offset = 0;
+			fp->block_length = 0;
+		} 
+	} while (state == 0);
+	if (str->l == 0 && state < 0) return state;
+    fp->uncompressed_address += str->l;
+	str->s[str->l] = 0;
+	return str->l;
+}
+
+void bgzf_index_destroy(BGZF *fp)
+{
+    if ( !fp->idx ) return;
+    free(fp->idx->offs);
+    free(fp->idx);
+    fp->idx = NULL;
+    fp->idx_build_otf = 0;
+}
+
+int bgzf_index_build_init(BGZF *fp)
+{
+    bgzf_index_destroy(fp);
+    fp->idx = (bgzidx_t*) calloc(1,sizeof(bgzidx_t));
+    if ( !fp->idx ) return -1;
+    fp->idx_build_otf = 1;  // build index on the fly
+    return 0;
+}
+
+int bgzf_index_add_block(BGZF *fp)
+{
+    fp->idx->noffs++;
+    if ( fp->idx->noffs > fp->idx->moffs )
+    {
+        fp->idx->moffs = fp->idx->noffs;
+        kroundup32(fp->idx->moffs);
+        fp->idx->offs = (bgzidx1_t*) realloc(fp->idx->offs, fp->idx->moffs*sizeof(bgzidx1_t));
+        if ( !fp->idx->offs ) return -1;
+    }
+    fp->idx->offs[ fp->idx->noffs-1 ].uaddr = fp->idx->ublock_addr;
+    fp->idx->offs[ fp->idx->noffs-1 ].caddr = fp->block_address;
+    return 0;
+}
+
+int bgzf_index_dump(BGZF *fp, const char *bname, const char *suffix)
+{
+    if (bgzf_flush(fp) != 0) return -1;
+
+    assert(fp->idx);
+    char *tmp = NULL;
+    if ( suffix )
+    {
+        int blen = strlen(bname);
+        int slen = strlen(suffix);
+        tmp = (char*) malloc(blen + slen + 1);
+        if ( !tmp ) return -1;
+        memcpy(tmp,bname,blen);
+        memcpy(tmp+blen,suffix,slen+1);
+    }
+
+    FILE *idx = fopen(tmp?tmp:bname,"wb");
+    if ( tmp ) free(tmp);
+    if ( !idx ) return -1;
+
+    // Note that the index contains one extra record when indexing files opened
+    // for reading. The terminating record is not present when opened for writing.
+    // This is not a bug.
+
+    int i;
+    if ( fp->is_be )
+    {
+        uint64_t x = fp->idx->noffs - 1;
+        fwrite(ed_swap_8p(&x), 1, sizeof(x), idx);
+        for (i=1; i<fp->idx->noffs; i++)
+        {
+            x = fp->idx->offs[i].caddr; fwrite(ed_swap_8p(&x), 1, sizeof(x), idx);
+            x = fp->idx->offs[i].uaddr; fwrite(ed_swap_8p(&x), 1, sizeof(x), idx);
+        }
+    }
+    else
+    {
+        uint64_t x = fp->idx->noffs - 1;
+        fwrite(&x, 1, sizeof(x), idx);
+        for (i=1; i<fp->idx->noffs; i++)
+        {
+            fwrite(&fp->idx->offs[i].caddr, 1, sizeof(fp->idx->offs[i].caddr), idx);
+            fwrite(&fp->idx->offs[i].uaddr, 1, sizeof(fp->idx->offs[i].uaddr), idx);
+        }
+    }
+    fclose(idx);
+    return 0;
+}
+
+
+int bgzf_index_load(BGZF *fp, const char *bname, const char *suffix)
+{
+    char *tmp = NULL;
+    if ( suffix )
+    {
+        int blen = strlen(bname);
+        int slen = strlen(suffix);
+        tmp = (char*) malloc(blen + slen + 1);
+        if ( !tmp ) return -1;
+        memcpy(tmp,bname,blen);
+        memcpy(tmp+blen,suffix,slen+1);
+    }
+
+    FILE *idx = fopen(tmp?tmp:bname,"rb");
+    if ( tmp ) free(tmp);
+    if ( !idx ) return -1;
+
+    fp->idx = (bgzidx_t*) calloc(1,sizeof(bgzidx_t));
+    uint64_t x;
+    if ( fread(&x, 1, sizeof(x), idx) != sizeof(x) ) return -1;
+
+    fp->idx->noffs = fp->idx->moffs = 1 + (fp->is_be ? ed_swap_8(x) : x);
+    fp->idx->offs  = (bgzidx1_t*) malloc(fp->idx->moffs*sizeof(bgzidx1_t));
+    fp->idx->offs[0].caddr = fp->idx->offs[0].uaddr = 0;
+
+    int i;
+    if ( fp->is_be )
+    {
+        int ret = 0;
+        for (i=1; i<fp->idx->noffs; i++)
+        {
+            ret += fread(&x, 1, sizeof(x), idx); fp->idx->offs[i].caddr = ed_swap_8(x);
+            ret += fread(&x, 1, sizeof(x), idx); fp->idx->offs[i].uaddr = ed_swap_8(x);
+        }
+        if ( ret != sizeof(x)*2*(fp->idx->noffs-1) ) return -1;
+    }
+    else
+    {
+        int ret = 0;
+        for (i=1; i<fp->idx->noffs; i++)
+        {
+            ret += fread(&x, 1, sizeof(x), idx); fp->idx->offs[i].caddr = x;
+            ret += fread(&x, 1, sizeof(x), idx); fp->idx->offs[i].uaddr = x;
+        }
+        if ( ret != sizeof(x)*2*(fp->idx->noffs-1) ) return -1;
+    }
+    fclose(idx);
+    return 0;
+
+}
+
+int bgzf_useek(BGZF *fp, long uoffset, int where)
+{
+    if ( !fp->is_compressed )
+    {
+        if (hseek(fp->fp, uoffset, SEEK_SET) < 0)
+        {
+            fp->errcode |= BGZF_ERR_IO;
+            return -1;
+        }
+        fp->block_length = 0;  // indicates current block has not been loaded
+        fp->block_address = uoffset;
+        fp->block_offset = 0;
+        bgzf_read_block(fp);
+        fp->uncompressed_address = uoffset;
+        return 0;
+    }
+
+    if ( !fp->idx )
+    {
+        fp->errcode |= BGZF_ERR_IO;
+        return -1;
+    }
+
+    // binary search
+    int ilo = 0, ihi = fp->idx->noffs - 1;
+    while ( ilo<=ihi )
+    {
+        int i = (ilo+ihi)*0.5;
+        if ( uoffset < fp->idx->offs[i].uaddr ) ihi = i - 1;
+        else if ( uoffset >= fp->idx->offs[i].uaddr ) ilo = i + 1;
+        else break;
+    }
+    int i = ilo-1;
+    if (hseek(fp->fp, fp->idx->offs[i].caddr, SEEK_SET) < 0)
+    {
+        fp->errcode |= BGZF_ERR_IO;
+        return -1;
+    }
+    fp->block_length = 0;  // indicates current block has not been loaded
+    fp->block_address = fp->idx->offs[i].caddr;
+    fp->block_offset = 0;
+    if ( bgzf_read_block(fp) < 0 ) return -1;
+    if ( uoffset - fp->idx->offs[i].uaddr > 0 )
+    {
+        fp->block_offset = uoffset - fp->idx->offs[i].uaddr;
+        assert( fp->block_offset <= fp->block_length );     // todo: skipped, unindexed, blocks
+    }
+    fp->uncompressed_address = uoffset;
+    return 0;
+}
+
+long bgzf_utell(BGZF *fp)
+{
+    return fp->uncompressed_address;    // currently maintained only when reading
+}
+
diff --git a/htslib/bgzip.c b/htslib/bgzip.c
new file mode 100644
index 0000000..bcd81f8
--- /dev/null
+++ b/htslib/bgzip.c
@@ -0,0 +1,283 @@
+/* The MIT License
+
+   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
+
+   Permission is hereby granted, free of charge, to any person obtaining a copy
+   of this software and associated documentation files (the "Software"), to deal
+   in the Software without restriction, including without limitation the rights
+   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+   copies of the Software, and to permit persons to whom the Software is
+   furnished to do so, subject to the following conditions:
+
+   The above copyright notice and this permission notice shall be included in
+   all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+   THE SOFTWARE.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <getopt.h>
+#include <sys/select.h>
+#include <sys/stat.h>
+#include "htslib/bgzf.h"
+#include "htslib/hts.h"
+
+static const int WINDOW_SIZE = 64 * 1024;
+
+static void error(const char *format, ...)
+{
+    va_list ap;
+    va_start(ap, format);
+    vfprintf(stderr, format, ap);
+    va_end(ap);
+    exit(EXIT_FAILURE);
+}
+
+static int write_open(const char *fn, int is_forced)
+{
+	int fd = -1;
+	char c;
+	if (!is_forced) {
+		if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0666)) < 0 && errno == EEXIST) {
+			fprintf(stderr, "[bgzip] %s already exists; do you wish to overwrite (y or n)? ", fn);
+			if ( scanf("%c", &c) != 1 ) c = 'n';
+			if (c != 'Y' && c != 'y') {
+				fprintf(stderr, "[bgzip] not overwritten\n");
+				exit(EXIT_FAILURE);
+			}
+		}
+	}
+	if (fd < 0) {
+		if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
+			fprintf(stderr, "[bgzip] %s: Fail to write\n", fn);
+			exit(EXIT_FAILURE);
+		}
+	}
+	return fd;
+}
+
+static int bgzip_main_usage(void)
+{
+	fprintf(stderr, "\n");
+	fprintf(stderr, "Version: %s\n", hts_version());
+	fprintf(stderr, "Usage:   bgzip [OPTIONS] [FILE] ...\n");
+	fprintf(stderr, "Options:\n");
+	fprintf(stderr, "   -b, --offset INT        decompress at virtual file pointer (0-based uncompressed offset)\n");
+    fprintf(stderr, "   -c, --stdout            write on standard output, keep original files unchanged\n");
+	fprintf(stderr, "   -d, --decompress        decompress\n");
+	fprintf(stderr, "   -f, --force             overwrite files without asking\n");
+	fprintf(stderr, "   -h, --help              give this help\n");
+	fprintf(stderr, "   -i, --index             compress and create BGZF index\n");
+	fprintf(stderr, "   -I, --index-name FILE   name of BGZF index file [file.gz.gzi]\n");
+	fprintf(stderr, "   -r, --reindex           (re)index compressed file\n");
+	fprintf(stderr, "   -s, --size INT          decompress INT bytes (uncompressed size)\n");
+	fprintf(stderr, "\n");
+	return 1;
+}
+
+int main(int argc, char **argv)
+{
+	int c, compress, pstdout, is_forced, index = 0, reindex = 0;
+	BGZF *fp;
+	void *buffer;
+	long start, end, size;
+    char *index_fname = NULL;
+
+    static struct option loptions[] = 
+    {
+        {"help",0,0,'h'},
+        {"offset",1,0,'b'},
+        {"stdout",0,0,'c'},
+        {"decompress",0,0,'d'},
+        {"force",0,0,'f'},
+        {"index",0,0,'i'},
+        {"index-name",1,0,'I'},
+        {"reindex",0,0,'r'},
+        {"size",1,0,'s'},
+        {0,0,0,0}
+    };
+
+	compress = 1; pstdout = 0; start = 0; size = -1; end = -1; is_forced = 0;
+	while((c  = getopt_long(argc, argv, "cdh?fb:s:iI:r",loptions,NULL)) >= 0){
+		switch(c){
+		case 'd': compress = 0; break;
+		case 'c': pstdout = 1; break;
+		case 'b': start = atol(optarg); compress = 0; pstdout = 1; break;
+		case 's': size = atol(optarg); pstdout = 1; break;
+		case 'f': is_forced = 1; break;
+        case 'i': index = 1; break;
+        case 'I': index_fname = optarg; break;
+        case 'r': reindex = 1; compress = 0; break;
+		case 'h': 
+        case '?': return bgzip_main_usage();
+		}
+	}
+	if (size >= 0) end = start + size;
+	if (end >= 0 && end < start) {
+		fprintf(stderr, "[bgzip] Illegal region: [%ld, %ld]\n", start, end);
+		return 1;
+	}
+	if (compress == 1) {
+		struct stat sbuf;
+		int f_src = fileno(stdin);
+		int f_dst = fileno(stdout);
+
+		if ( argc>optind )
+		{
+			if ( stat(argv[optind],&sbuf)<0 ) 
+			{ 
+				fprintf(stderr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
+				return 1; 
+			}
+
+			if ((f_src = open(argv[optind], O_RDONLY)) < 0) {
+				fprintf(stderr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
+				return 1;
+			}
+
+			if (pstdout)
+				f_dst = fileno(stdout);
+			else
+			{
+				char *name = malloc(strlen(argv[optind]) + 5);
+				strcpy(name, argv[optind]);
+				strcat(name, ".gz");
+				f_dst = write_open(name, is_forced);
+				if (f_dst < 0) return 1;
+				free(name);
+			}
+		}
+		else if (!pstdout && isatty(fileno((FILE *)stdout)) )
+			return bgzip_main_usage();
+        else if ( index && !index_fname )
+        {
+            fprintf(stderr, "[bgzip] Index file name expected when writing to stdout\n");
+            return 1;
+        }
+
+		fp = bgzf_fdopen(f_dst, "w");
+        if ( index ) bgzf_index_build_init(fp);
+		buffer = malloc(WINDOW_SIZE);
+		while ((c = read(f_src, buffer, WINDOW_SIZE)) > 0)
+			if (bgzf_write(fp, buffer, c) < 0) error("Could not write %d bytes: Error %d\n", c, fp->errcode);
+		// f_dst will be closed here
+        if ( index ) 
+        {
+            if ( index_fname ) bgzf_index_dump(fp, index_fname, NULL);
+            else bgzf_index_dump(fp, argv[optind], ".gz.gzi");
+        }
+		if (bgzf_close(fp) < 0) error("Close failed: Error %d", fp->errcode);
+		if (argc > optind && !pstdout) unlink(argv[optind]);
+		free(buffer);
+		close(f_src);
+		return 0;
+	}
+    else if ( reindex )
+    {
+        if ( argc>optind )
+        {
+			fp = bgzf_open(argv[optind], "r");
+            if ( !fp ) error("[bgzip] Could not open file: %s\n", argv[optind]);
+        }
+        else
+        {
+            if ( !index_fname ) error("[bgzip] Index file name expected when reading from stdin\n");
+            fp = bgzf_fdopen(fileno(stdin), "r");
+        	if ( !fp ) error("[bgzip] Could not read from stdin: %s\n", strerror(errno));
+        }
+
+        buffer = malloc(BGZF_BLOCK_SIZE);
+        bgzf_index_build_init(fp);
+        int ret;
+        while ( (ret=bgzf_read(fp, buffer, BGZF_BLOCK_SIZE))>0 ) ;
+        free(buffer);
+        if ( ret<0 ) error("Is the file gzipped or bgzipped? The latter is required for indexing.\n");
+ 
+        if ( index_fname )
+            bgzf_index_dump(fp, index_fname, NULL);
+        else 
+            bgzf_index_dump(fp, argv[optind], ".gzi");
+
+        if ( bgzf_close(fp)<0 ) error("Close failed: Error %d\n",fp->errcode);
+        return 0;
+    }
+    else
+    {
+		struct stat sbuf;
+		int f_dst;
+
+		if ( argc>optind )
+		{
+			if ( stat(argv[optind],&sbuf)<0 )
+			{
+				fprintf(stderr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
+				return 1;
+			}
+			char *name;
+			int len = strlen(argv[optind]);
+			if ( strcmp(argv[optind]+len-3,".gz") )
+			{
+				fprintf(stderr, "[bgzip] %s: unknown suffix -- ignored\n", argv[optind]);
+				return 1;
+			}
+			fp = bgzf_open(argv[optind], "r");
+			if (fp == NULL) {
+				fprintf(stderr, "[bgzip] Could not open file: %s\n", argv[optind]);
+				return 1;
+			}
+
+			if (pstdout) {
+				f_dst = fileno(stdout);
+			}
+			else {
+				name = strdup(argv[optind]);
+				name[strlen(name) - 3] = '\0';
+				f_dst = write_open(name, is_forced);
+				free(name);
+			}
+		}
+		else if (!pstdout && isatty(fileno((FILE *)stdin)) )
+			return bgzip_main_usage();
+		else
+		{
+			f_dst = fileno(stdout);
+			fp = bgzf_fdopen(fileno(stdin), "r");
+			if (fp == NULL) {
+				fprintf(stderr, "[bgzip] Could not read from stdin: %s\n", strerror(errno));
+				return 1;
+			}
+		}
+        buffer = malloc(WINDOW_SIZE);
+        if ( start>0 )
+        {
+            if ( bgzf_index_load(fp, argv[optind], ".gzi") < 0 ) error("Could not load index: %s.gzi\n", argv[optind]);
+            if ( bgzf_useek(fp, start, SEEK_SET) < 0 ) error("Could not seek to %d-th (uncompressd) byte\n", start);
+        }
+        while (1) {
+            if (end < 0) c = bgzf_read(fp, buffer, WINDOW_SIZE);
+            else c = bgzf_read(fp, buffer, (end - start > WINDOW_SIZE)? WINDOW_SIZE:(end - start));
+            if (c == 0) break;
+            if (c < 0) error("Could not read %d bytes: Error %d\n", (end - start > WINDOW_SIZE)? WINDOW_SIZE:(end - start), fp->errcode);
+            start += c;
+            if ( write(f_dst, buffer, c) != c ) error("Could not write %d bytes\n", c);
+            if (end >= 0 && start >= end) break;
+        }
+        free(buffer);
+        if (bgzf_close(fp) < 0) error("Close failed: Error %d\n",fp->errcode);
+        if (!pstdout) unlink(argv[optind]);
+        return 0;
+	}
+    return 0;
+}
diff --git a/htslib/config.h b/htslib/config.h
new file mode 100644
index 0000000..6d32bf5
--- /dev/null
+++ b/htslib/config.h
@@ -0,0 +1,3 @@
+#define _USE_KNETFILE
+#define BGZF_CACHE
+#define BGZF_MT
diff --git a/htslib/cram/cram.h b/htslib/cram/cram.h
new file mode 100644
index 0000000..0b8b291
--- /dev/null
+++ b/htslib/cram/cram.h
@@ -0,0 +1,66 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*! \file
+ * CRAM interface.
+ *
+ * Consider using the higher level scram_*() API for programs that wish to
+ * be file format agnostic.
+ *
+ * This API should be used for CRAM specific code. The specifics of the
+ * public API are implemented in cram_io.h, cram_encode.h and cram_decode.h
+ * although these should not be included directly (use this file instead).
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef SAMTOOLS
+#  include "cram/cram_samtools.h"
+#endif
+
+#ifndef _CRAM_H_
+#define _CRAM_H_
+
+#include "cram/sam_header.h"
+#include "cram_structs.h"
+#include "cram_io.h"
+#include "cram_encode.h"
+#include "cram_decode.h"
+#include "cram_stats.h"
+#include "cram_codecs.h"
+#include "cram_index.h"
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/htslib/cram/cram_codecs.c b/htslib/cram/cram_codecs.c
new file mode 100644
index 0000000..3c3d13f
--- /dev/null
+++ b/htslib/cram/cram_codecs.c
@@ -0,0 +1,1764 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+ * FIXME: add checking of cram_external_type to return NULL on unsupported
+ * {codec,type} tuples.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <limits.h>
+
+#include "cram/cram.h"
+
+static char *codec2str(enum cram_encoding codec) {
+    switch (codec) {
+    case E_NULL:            return "NULL";
+    case E_EXTERNAL:        return "EXTERNAL";
+    case E_GOLOMB:          return "GOLOMB";
+    case E_HUFFMAN:         return "HUFFMAN";
+    case E_BYTE_ARRAY_LEN:  return "BYTE_ARRAY_LEN";
+    case E_BYTE_ARRAY_STOP: return "BYTE_ARRAY_STOP";
+    case E_BETA:            return "BETA";
+    case E_SUBEXP:          return "SUBEXP";
+    case E_GOLOMB_RICE:     return "GOLOMB_RICE";
+    case E_GAMMA:           return "GAMMA";
+    }
+
+    return "(unknown)";
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ * Block bit-level I/O functions.
+ * All defined static here to promote easy inlining by the compiler.
+ */
+
+#if 0
+/* Get a single bit, MSB first */
+static signed int get_bit_MSB(cram_block *block) {
+    unsigned int val;
+
+    if (block->byte > block->alloc)
+	return -1;
+
+    val = block->data[block->byte] >> block->bit;
+    if (--block->bit == -1) {
+	block->bit = 7;
+	block->byte++;
+	//printf("(%02X)", block->data[block->byte]);
+    }
+
+    //printf("-B%d-", val&1);
+
+    return val & 1;
+}
+#endif
+
+/*
+ * Count number of successive 0 and 1 bits
+ */
+static int get_one_bits_MSB(cram_block *block) {
+    int n = 0, b;
+    do {
+	b = block->data[block->byte] >> block->bit;
+	if (--block->bit == -1) {
+	    block->bit = 7;
+	    block->byte++;
+	}
+	n++;
+    } while (b&1);
+
+    return n-1;
+}
+
+static int get_zero_bits_MSB(cram_block *block) {
+    int n = 0, b;
+    do {
+	b = block->data[block->byte] >> block->bit;
+	if (--block->bit == -1) {
+	    block->bit = 7;
+	    block->byte++;
+	}
+	n++;
+    } while (!(b&1));
+
+    return n-1;
+}
+
+#if 0
+/* Stores a single bit */
+static void store_bit_MSB(cram_block *block, unsigned int bit) {
+    if (block->byte >= block->alloc) {
+	block->alloc = block->alloc ? block->alloc*2 : 1024;
+	block->data = realloc(block->data, block->alloc);
+    }
+
+    if (bit)
+	block->data[block->byte] |= (1 << block->bit);
+
+    if (--block->bit == -1) {
+	block->bit = 7;
+	block->byte++;
+	block->data[block->byte] = 0;
+    }
+}
+#endif
+
+#if 0
+/* Rounds to the next whole byte boundary first */
+static void store_bytes_MSB(cram_block *block, char *bytes, int len) {
+    if (block->bit != 7) {
+	block->bit = 7;
+	block->byte++;
+    }
+
+    while (block->byte + len >= block->alloc) {
+	block->alloc = block->alloc ? block->alloc*2 : 1024;
+	block->data = realloc(block->data, block->alloc);
+    }
+
+    memcpy(&block->data[block->byte], bytes, len);
+    block->byte += len;
+}
+#endif
+
+/* Local optimised copy for inlining */
+static inline unsigned int get_bits_MSB(cram_block *block, int nbits) {
+    unsigned int val = 0;
+    int i;
+
+#if 0
+    // Fits within the current byte */
+    if (nbits <= block->bit+1) {
+	val = (block->data[block->byte]>>(block->bit-(nbits-1))) & ((1<<nbits)-1);
+	if ((block->bit -= nbits) == -1) {
+	    block->bit = 7;
+	    block->byte++;
+	}
+	return val;
+    }
+
+    // partial first byte
+    val = block->data[block->byte] & ((1<<(block->bit+1))-1);
+    nbits -= block->bit+1;
+    block->bit = 7;
+    block->byte++;
+
+    // whole middle bytes
+    while (nbits >= 8) {
+	val = (val << 8) | block->data[block->byte++];
+	nbits -= 8;
+    }
+
+    val <<= nbits;
+    val |= (block->data[block->byte]>>(block->bit-(nbits-1))) & ((1<<nbits)-1);
+    block->bit -= nbits;
+    return val;
+#endif
+
+#if 0
+    /* Inefficient implementation! */
+    //printf("{");
+    for (i = 0; i < nbits; i++)
+	//val = (val << 1) | get_bit_MSB(block);
+	GET_BIT_MSB(block, val);
+#endif
+
+#if 1
+    /* Combination of 1st two methods */
+    if (nbits <= block->bit+1) {
+	val = (block->data[block->byte]>>(block->bit-(nbits-1))) & ((1<<nbits)-1);
+	if ((block->bit -= nbits) == -1) {
+	    block->bit = 7;
+	    block->byte++;
+	}
+	return val;
+    }
+
+    switch(nbits) {
+//    case 15: GET_BIT_MSB(block, val);
+//    case 14: GET_BIT_MSB(block, val);
+//    case 13: GET_BIT_MSB(block, val);
+//    case 12: GET_BIT_MSB(block, val);
+//    case 11: GET_BIT_MSB(block, val);
+//    case 10: GET_BIT_MSB(block, val);
+//    case  9: GET_BIT_MSB(block, val);
+    case  8: GET_BIT_MSB(block, val);
+    case  7: GET_BIT_MSB(block, val);
+    case  6: GET_BIT_MSB(block, val);
+    case  5: GET_BIT_MSB(block, val);
+    case  4: GET_BIT_MSB(block, val);
+    case  3: GET_BIT_MSB(block, val);
+    case  2: GET_BIT_MSB(block, val);
+    case  1: GET_BIT_MSB(block, val);
+	break;
+
+    default:
+	for (i = 0; i < nbits; i++)
+	    //val = (val << 1) | get_bit_MSB(block);
+	    GET_BIT_MSB(block, val);
+    }
+#endif
+
+    //printf("=0x%x}", val);
+
+    return val;
+}
+
+/*
+ * Can store up to 24-bits worth of data encoded in an integer value
+ * Possibly we'd want to have a less optimal store_bits function when dealing
+ * with nbits > 24, but for now we assume the codes generated are never
+ * that big. (Given this is only possible with 121392 or more
+ * characters with exactly the correct frequency distribution we check
+ * for it elsewhere.)
+ */
+static int store_bits_MSB(cram_block *block, unsigned int val, int nbits) {
+    /* fprintf(stderr, " store_bits: %02x %d\n", val, nbits); */
+
+    /*
+     * Use slow mode until we tweak the huffman generator to never generate
+     * codes longer than 24-bits.
+     */
+    unsigned int mask;
+
+    if (block->byte+4 >= block->alloc) {
+	if (block->byte) {
+	    block->alloc *= 2;
+	    block->data = realloc(block->data, block->alloc + 4);
+	    if (!block->data)
+		return -1;
+	} else {
+	    block->alloc = 1024;
+	    block->data = realloc(block->data, block->alloc + 4);
+	    if (!block->data)
+		return -1;
+	    block->data[0] = 0; // initialise first byte of buffer
+	}
+    }
+
+    
+    
+    if (nbits <= block->bit+1) {
+	block->data[block->byte] |= (val << (block->bit+1-nbits));
+	if ((block->bit-=nbits) == -1) {
+	    block->bit = 7;
+	    block->byte++;
+	    block->data[block->byte] = 0;
+	}
+	return 0;
+    }
+
+    block->data[block->byte] |= (val >> (nbits -= block->bit+1));
+    block->bit = 7;
+    block->byte++;
+    block->data[block->byte] = 0;
+				 
+    mask = 1<<(nbits-1);
+    do {
+	if (val & mask)
+	    block->data[block->byte] |= (1 << block->bit);
+	if (--block->bit == -1) {
+	    block->bit = 7;
+	    block->byte++;
+	    block->data[block->byte] = 0;
+	}
+	mask >>= 1;
+    } while(--nbits);
+
+    return 0;
+}
+
+/*
+ * Returns the next 'size' bytes from a block, or NULL if insufficient
+ * data left.This is just a pointer into the block data and not an
+ * allocated object, so do not free the result.
+ */
+static char *cram_extract_block(cram_block *b, int size) {
+    char *cp = (char *)b->data + b->idx;
+    b->idx += size;
+    if (b->idx > b->uncomp_size)
+	return NULL;
+
+    return cp;
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ * EXTERNAL
+ */
+int cram_external_decode_int(cram_slice *slice, cram_codec *c,
+			     cram_block *in, char *out, int *out_size) {
+    int i;
+    char *cp;
+    cram_block *b = NULL;
+
+    /* Find the external block */
+    if (slice->block_by_id) {
+	if (!(b = slice->block_by_id[c->external.content_id]))
+	    return -1;
+    } else {
+	for (i = 0; i < slice->hdr->num_blocks; i++) {
+	    b = slice->block[i];
+	    if (b->content_type == EXTERNAL &&
+		b->content_id == c->external.content_id) {
+		break;
+	    }
+	}
+	if (i == slice->hdr->num_blocks || !b)
+	    return -1;
+    }
+
+    cp = (char *)b->data + b->idx;
+    // E_INT and E_LONG are guaranteed single item queries
+    b->idx += itf8_get(cp, (int32_t *)out);
+    *out_size = 1;
+
+    return 0;
+}
+
+int cram_external_decode_char(cram_slice *slice, cram_codec *c,
+			      cram_block *in, char *out,
+			      int *out_size) {
+    int i;
+    char *cp;
+    cram_block *b = NULL;
+
+    /* Find the external block */
+    if (slice->block_by_id) {
+	if (!(b = slice->block_by_id[c->external.content_id]))
+	    return -1;
+    } else {
+	for (i = 0; i < slice->hdr->num_blocks; i++) {
+	    b = slice->block[i];
+	    if (b->content_type == EXTERNAL &&
+		b->content_id == c->external.content_id) {
+		break;
+	    }
+	}
+	if (i == slice->hdr->num_blocks || !b)
+	    return -1;
+    }
+
+    cp = cram_extract_block(b, *out_size);
+    if (!cp)
+	return -1;
+
+    memcpy(out, cp, *out_size);
+    return 0;
+}
+
+int cram_external_decode_block(cram_slice *slice, cram_codec *c,
+			      cram_block *in, char *out_,
+			      int *out_size) {
+    int i;
+    char *cp;
+    cram_block *b = NULL;
+    cram_block *out = (cram_block *)out_;
+
+    /* Find the external block */
+    if (slice->block_by_id) {
+	if (!(b = slice->block_by_id[c->external.content_id]))
+	    return -1;
+    } else {
+	for (i = 0; i < slice->hdr->num_blocks; i++) {
+	    b = slice->block[i];
+	    if (b->content_type == EXTERNAL &&
+		b->content_id == c->external.content_id) {
+		break;
+	    }
+	}
+	if (i == slice->hdr->num_blocks || !b)
+	    return -1;
+    }
+
+    cp = cram_extract_block(b, *out_size);
+    if (!cp)
+	return -1;
+
+    BLOCK_APPEND(out, cp, *out_size);
+    return 0;
+}
+
+void cram_external_decode_free(cram_codec *c) {
+    if (c)
+	free(c);
+}
+
+cram_codec *cram_external_decode_init(char *data, int size,
+				      enum cram_external_type option,
+				      int version) {
+    cram_codec *c;
+    char *cp = data;
+
+    if (!(c = malloc(sizeof(*c))))
+	return NULL;
+
+    c->codec  = E_EXTERNAL;
+    if (option == E_INT || option == E_LONG)
+	c->decode = cram_external_decode_int;
+    else if (option == E_BYTE_ARRAY || option == E_BYTE)
+	c->decode = cram_external_decode_char;
+    else
+	c->decode = cram_external_decode_block;
+    c->free   = cram_external_decode_free;
+    
+    cp += itf8_get(cp, &c->external.content_id);
+
+    if (cp - data != size) {
+	fprintf(stderr, "Malformed external header stream\n");
+	free(c);
+	return NULL;
+    }
+
+    c->external.type = option;
+
+    return c;
+}
+
+int cram_external_encode(cram_slice *slice, cram_codec *c,
+			cram_block *out, char *in, int in_size) {
+    uint32_t *i32 = (uint32_t *)in;
+
+    itf8_put_blk(out, *i32);
+    return 0;
+}
+
+void cram_external_encode_free(cram_codec *c) {
+    if (!c)
+	return;
+    free(c);
+}
+
+int cram_external_encode_store(cram_codec *c, cram_block *b, char *prefix,
+			       int version) {
+    char tmp[99], *tp = tmp;
+    int len = 0;
+
+    if (prefix) {
+	size_t l = strlen(prefix);
+	BLOCK_APPEND(b, prefix, l);
+	len += l;
+    }
+
+    tp += itf8_put(tp, c->e_external.content_id);
+    len += itf8_put_blk(b, c->codec);
+    len += itf8_put_blk(b, tp-tmp);
+    BLOCK_APPEND(b, tmp, tp-tmp);
+    len += tp-tmp;
+
+    return len;
+}
+
+cram_codec *cram_external_encode_init(cram_stats *st,
+				      enum cram_external_type option,
+				      void *dat,
+				      int version) {
+    cram_codec *c;
+
+    c = malloc(sizeof(*c));
+    if (!c)
+	return NULL;
+    c->codec = E_EXTERNAL;
+    c->free = cram_external_encode_free;
+    c->encode = cram_external_encode;
+    c->store = cram_external_encode_store;
+
+    c->e_external.content_id = (size_t)dat;
+
+    return c;
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ * BETA
+ */
+int cram_beta_decode_int(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
+    int32_t *out_i = (int32_t *)out;
+    int i, n;
+
+    if (c->beta.nbits) {
+	for (i = 0, n = *out_size; i < n; i++)
+	    out_i[i] = get_bits_MSB(in, c->beta.nbits) - c->beta.offset;
+    } else {
+	for (i = 0, n = *out_size; i < n; i++)
+	    out_i[i] = 0;
+    }
+
+    return 0;
+}
+
+int cram_beta_decode_char(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
+    int i, n;
+
+    if (c->beta.nbits) {
+	for (i = 0, n = *out_size; i < n; i++)
+	    out[i] = get_bits_MSB(in, c->beta.nbits) - c->beta.offset;
+    } else {
+	for (i = 0, n = *out_size; i < n; i++)
+	    out[i] = 0;
+    }
+
+    return 0;
+}
+
+void cram_beta_decode_free(cram_codec *c) {
+    if (c)
+	free(c);
+}
+
+cram_codec *cram_beta_decode_init(char *data, int size,
+				  enum cram_external_type option,
+				  int version) {
+    cram_codec *c;
+    char *cp = data;
+
+    if (!(c = malloc(sizeof(*c))))
+	return NULL;
+
+    c->codec  = E_BETA;
+    if (option == E_INT || option == E_LONG)
+	c->decode = cram_beta_decode_int;
+    else if (option == E_BYTE_ARRAY || option == E_BYTE)
+	c->decode = cram_beta_decode_char;
+    else
+	abort();
+    c->free   = cram_beta_decode_free;
+    
+    cp += itf8_get(cp, &c->beta.offset);
+    cp += itf8_get(cp, &c->beta.nbits);
+
+    if (cp - data != size) {
+	fprintf(stderr, "Malformed beta header stream\n");
+	free(c);
+	return NULL;
+    }
+
+    return c;
+}
+
+int cram_beta_encode_store(cram_codec *c, cram_block *b,
+			   char *prefix, int version) {
+    int len = 0;
+
+    if (prefix) {
+	size_t l = strlen(prefix);
+	BLOCK_APPEND(b, prefix, l);
+	len += l;
+    }
+
+    len += itf8_put_blk(b, c->codec);
+    len += itf8_put_blk(b, itf8_size(c->e_beta.offset)
+			+ itf8_size(c->e_beta.nbits)); // codec length
+    len += itf8_put_blk(b, c->e_beta.offset);
+    len += itf8_put_blk(b, c->e_beta.nbits);
+
+    return len;
+}
+
+int cram_beta_encode_int(cram_slice *slice, cram_codec *c,
+			 cram_block *out, char *in, int in_size) {
+    int *syms = (int *)in;
+    int i, r = 0;
+
+    for (i = 0; i < in_size; i++)
+	r |= store_bits_MSB(out, syms[i] + c->e_beta.offset, c->e_beta.nbits);
+
+    return r;
+}
+
+int cram_beta_encode_char(cram_slice *slice, cram_codec *c,
+			 cram_block *out, char *in, int in_size) {
+    unsigned char *syms = (unsigned char *)in;
+    int i, r = 0;
+
+    for (i = 0; i < in_size; i++)
+	r |= store_bits_MSB(out, syms[i] + c->e_beta.offset, c->e_beta.nbits);
+
+    return r;
+}
+
+void cram_beta_encode_free(cram_codec *c) {
+    if (c) free(c);
+}
+
+cram_codec *cram_beta_encode_init(cram_stats *st,
+				  enum cram_external_type option,
+				  void *dat,
+				  int version) {
+    cram_codec *c;
+    int min_val, max_val, len = 0;
+
+    c = malloc(sizeof(*c));
+    if (!c)
+	return NULL;
+    c->codec  = E_BETA;
+    c->free   = cram_beta_encode_free;
+    if (option == E_INT)
+	c->encode = cram_beta_encode_int;
+    else
+	c->encode = cram_beta_encode_char;
+    c->store  = cram_beta_encode_store;
+
+    if (dat) {
+	min_val = ((int *)dat)[0];
+	max_val = ((int *)dat)[1];
+    } else {
+	min_val = INT_MAX;
+	max_val = INT_MIN;
+	int i;
+	for (i = 0; i < MAX_STAT_VAL; i++) {
+	    if (!st->freqs[i])
+		continue;
+	    if (min_val > i)
+		min_val = i;
+	    max_val = i;
+	}
+	if (st->h) {
+	    khint_t k;
+
+	    for (k = kh_begin(st->h); k != kh_end(st->h); k++) {
+		if (!kh_exist(st->h, k))
+		    continue;
+	    
+		i = kh_key(st->h, k);
+		if (min_val > i)
+		    min_val = i;
+		if (max_val < i)
+		    max_val = i;
+	    }
+	}
+    }
+
+    assert(max_val >= min_val);
+    c->e_beta.offset = -min_val;
+    max_val -= min_val;
+    while (max_val) {
+	len++;
+	max_val >>= 1;
+    }
+    c->e_beta.nbits = len;
+
+    return c;
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ * SUBEXP
+ */
+int cram_subexp_decode(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
+    int32_t *out_i = (int32_t *)out;
+    int n, count;
+    int k = c->subexp.k;
+
+    for (count = 0, n = *out_size; count < n; count++) {
+	int i = 0, tail;
+	int val;
+
+	/* Get number of 1s */
+	//while (get_bit_MSB(in) == 1) i++;
+	i = get_one_bits_MSB(in);
+
+	/*
+	 * Val is
+	 * i > 0:  2^(k+i-1) + k+i-1 bits
+	 * i = 0:  k bits
+	 */
+	if (i) {
+	    tail = i + k-1;
+	    val = 0;
+	    while (tail) {
+		//val = val<<1; val |= get_bit_MSB(in);
+		GET_BIT_MSB(in, val);
+		tail--;
+	    }
+	    val += 1 << (i + k-1);
+	} else {
+	    tail = k;
+	    val = 0;
+	    while (tail) {
+		//val = val<<1; val |= get_bit_MSB(in);
+		GET_BIT_MSB(in, val);
+		tail--;
+	    }
+	}
+
+	out_i[count] = val - c->subexp.offset;
+    }
+
+    return 0;
+}
+
+void cram_subexp_decode_free(cram_codec *c) {
+    if (c)
+	free(c);
+}
+
+cram_codec *cram_subexp_decode_init(char *data, int size,
+				    enum cram_external_type option,
+				    int version) {
+    cram_codec *c;
+    char *cp = data;
+
+    if (!(c = malloc(sizeof(*c))))
+	return NULL;
+
+    c->codec  = E_SUBEXP;
+    c->decode = cram_subexp_decode;
+    c->free   = cram_subexp_decode_free;
+    
+    cp += itf8_get(cp, &c->subexp.offset);
+    cp += itf8_get(cp, &c->subexp.k);
+
+    if (cp - data != size) {
+	fprintf(stderr, "Malformed subexp header stream\n");
+	free(c);
+	return NULL;
+    }
+
+    return c;
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ * GAMMA
+ */
+int cram_gamma_decode(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
+    int32_t *out_i = (int32_t *)out;
+    int i, n;
+
+    for (i = 0, n = *out_size; i < n; i++) {
+	int nz = 0;
+	int val;
+	//while (get_bit_MSB(in) == 0) nz++;
+	nz = get_zero_bits_MSB(in);
+	val = 1;
+	while (nz > 0) {
+	    //val <<= 1; val |= get_bit_MSB(in);
+	    GET_BIT_MSB(in, val);
+	    nz--;
+	}
+
+	out_i[i] = val - c->gamma.offset;
+    }
+
+    return 0;
+}
+
+void cram_gamma_decode_free(cram_codec *c) {
+    if (c)
+	free(c);
+}
+
+cram_codec *cram_gamma_decode_init(char *data, int size,
+				   enum cram_external_type option,
+				   int version) {
+    cram_codec *c;
+    char *cp = data;
+
+    if (!(c = malloc(sizeof(*c))))
+	return NULL;
+
+    c->codec  = E_GAMMA;
+    c->decode = cram_gamma_decode;
+    c->free   = cram_gamma_decode_free;
+    
+    cp += itf8_get(cp, &c->gamma.offset);
+
+    if (cp - data != size) {
+	fprintf(stderr, "Malformed gamma header stream\n");
+	free(c);
+	return NULL;
+    }
+
+    return c;
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ * HUFFMAN
+ */
+
+static int code_sort(const void *vp1, const void *vp2) {
+    const cram_huffman_code *c1 = (const cram_huffman_code *)vp1;
+    const cram_huffman_code *c2 = (const cram_huffman_code *)vp2;
+
+    if (c1->len != c2->len)
+	return c1->len - c2->len;
+    else
+	return c1->symbol - c2->symbol;
+}
+
+void cram_huffman_decode_free(cram_codec *c) {
+    if (!c)
+	return;
+
+    if (c->huffman.codes)
+	free(c->huffman.codes);
+    free(c);
+}
+
+int cram_huffman_decode_char0(cram_slice *slice, cram_codec *c,
+			      cram_block *in, char *out, int *out_size) {
+    int i, n;
+
+    /* Special case of 0 length codes */
+    for (i = 0, n = *out_size; i < n; i++) {
+	out[i] = c->huffman.codes[0].symbol;
+    }
+    return 0;
+}
+
+int cram_huffman_decode_char(cram_slice *slice, cram_codec *c,
+			     cram_block *in, char *out, int *out_size) {
+    int i, n, ncodes = c->huffman.ncodes;
+    const cram_huffman_code * const codes = c->huffman.codes;
+
+    for (i = 0, n = *out_size; i < n; i++) {
+	int idx = 0;
+	int val = 0, len = 0, last_len = 0;
+
+	for (;;) {
+	    int dlen = codes[idx].len - last_len;
+	    if (dlen <= 0 || (in->alloc - in->byte)*8 + in->bit + 7 < dlen)
+		return -1;
+
+	    //val <<= dlen;
+	    //val  |= get_bits_MSB(in, dlen);
+	    //last_len = (len  += dlen);
+
+	    last_len = (len  += dlen);
+	    for (; dlen; dlen--) GET_BIT_MSB(in, val);
+
+	    idx = val - codes[idx].p;
+	    if (idx >= ncodes || idx < 0)
+		return -1;
+
+	    if (codes[idx].code == val && codes[idx].len == len) {
+		out[i] = codes[idx].symbol;
+		break;
+	    }
+	}
+    }
+
+    return 0;
+}
+
+int cram_huffman_decode_int0(cram_slice *slice, cram_codec *c,
+			     cram_block *in, char *out, int *out_size) {
+    int32_t *out_i = (int32_t *)out;
+    int i, n;
+    const cram_huffman_code * const codes = c->huffman.codes;
+
+    /* Special case of 0 length codes */
+    for (i = 0, n = *out_size; i < n; i++) {
+	out_i[i] = codes[0].symbol;
+    }
+    return 0;
+}
+
+int cram_huffman_decode_int(cram_slice *slice, cram_codec *c,
+			    cram_block *in, char *out, int *out_size) {
+    int32_t *out_i = (int32_t *)out;
+    int i, n, ncodes = c->huffman.ncodes;
+    const cram_huffman_code * const codes = c->huffman.codes;
+
+    for (i = 0, n = *out_size; i < n; i++) {
+	int idx = 0;
+	int val = 0, len = 0, last_len = 0;
+
+	// Now one bit at a time for remaining checks
+	for (;;) {
+	    int dlen = codes[idx].len - last_len;
+	    if (dlen <= 0 || (in->alloc - in->byte)*8 + in->bit + 7 < dlen)
+		return -1;
+	    
+	    //val <<= dlen;
+	    //val  |= get_bits_MSB(in, dlen);
+	    //last_len = (len  += dlen);
+
+	    last_len = (len  += dlen);
+	    for (; dlen; dlen--) GET_BIT_MSB(in, val);
+
+	    idx = val - codes[idx].p;
+	    if (idx >= ncodes || idx < 0)
+		return -1;
+
+	    if (codes[idx].code == val && codes[idx].len == len) {
+		out_i[i] = codes[idx].symbol;
+		break;
+	    }
+	}
+    }
+
+    return 0;
+}
+
+/*
+ * Initialises a huffman decoder from an encoding data stream.
+ */
+cram_codec *cram_huffman_decode_init(char *data, int size,
+				     enum cram_external_type option,
+				     int version) {
+    int32_t ncodes, i, j;
+    char *cp = data, *data_end = &data[size];
+    cram_codec *h;
+    cram_huffman_code *codes;
+    int32_t val, last_len, max_len = 0;
+    
+    cp += itf8_get(cp, &ncodes);
+    h = calloc(1, sizeof(*h));
+    if (!h)
+	return NULL;
+
+    h->free   = cram_huffman_decode_free;
+
+    h->huffman.ncodes = ncodes;
+    codes = h->huffman.codes = malloc(ncodes * sizeof(*codes));
+    if (!codes) {
+	free(h);
+	return NULL;
+    }
+
+    /* Read symbols and bit-lengths */
+    for (i = 0; i < ncodes && cp < data_end; i++) {
+	cp += itf8_get(cp, &codes[i].symbol);
+    }
+
+    if (cp >= data_end) {
+	fprintf(stderr, "Malformed huffman header stream\n");
+	free(h);
+	return NULL;
+    }
+    cp += itf8_get(cp, &i);
+    if (i != ncodes) {
+	fprintf(stderr, "Malformed huffman header stream\n");
+	free(h);
+	return NULL;
+    }
+
+    if (ncodes == 0) {
+	/* NULL huffman stream */
+	return h;
+    }
+
+    for (i = 0; i < ncodes && cp < data_end; i++) {
+	cp += itf8_get(cp, &codes[i].len);
+	if (max_len < codes[i].len)
+	    max_len = codes[i].len;
+    }
+    if (cp - data != size || max_len >= ncodes) {
+	fprintf(stderr, "Malformed huffman header stream\n");
+	free(h);
+	return NULL;
+    }
+
+    /* Sort by bit length and then by symbol value */
+    qsort(codes, ncodes, sizeof(*codes), code_sort);
+
+    /* Assign canonical codes */
+    val = -1, last_len = 0;
+    for (i = 0; i < ncodes; i++) {
+	val++;
+	if (codes[i].len > last_len) {
+	    while (codes[i].len > last_len) {
+		val <<= 1;
+		last_len++;
+	    }
+	}
+	codes[i].code = val;
+    }
+
+    /*
+     * Compute the next starting point, offset by the i'th value.
+     * For example if codes 10, 11, 12, 13 are 30, 31, 32, 33 then
+     * codes[10..13].p = 30 - 10.
+     */
+    last_len = 0;
+    for (i = j = 0; i < ncodes; i++) {
+	if (codes[i].len > last_len) {
+	    j = codes[i].code - i;
+	    last_len = codes[i].len;
+	}
+	codes[i].p = j;
+    }
+
+//    puts("==HUFF LEN==");
+//    for (i = 0; i <= last_len+1; i++) {
+//	printf("len %d=%d prefix %d\n", i, h->huffman.lengths[i], h->huffman.prefix[i]); 
+//    }
+//    puts("===HUFFMAN CODES===");
+//    for (i = 0; i < ncodes; i++) {
+//	int j;
+//	printf("%d: %d %d %d ", i, codes[i].symbol, codes[i].len, codes[i].code);
+//	j = codes[i].len;
+//	while (j) {
+//	    putchar(codes[i].code & (1 << --j) ? '1' : '0');
+//	}
+//	printf(" %d\n", codes[i].code);
+//    }
+
+    h->codec  = E_HUFFMAN;
+    if (option == E_BYTE || option == E_BYTE_ARRAY) {
+	if (h->huffman.codes[0].len == 0)
+	    h->decode = cram_huffman_decode_char0;
+	else
+	    h->decode = cram_huffman_decode_char;
+    } else if (option == E_BYTE_ARRAY_BLOCK) {
+	abort();
+    } else {
+	if (h->huffman.codes[0].len == 0)
+	    h->decode = cram_huffman_decode_int0;
+	else
+	    h->decode = cram_huffman_decode_int;
+    }
+
+    return (cram_codec *)h;
+}
+
+int cram_huffman_encode_char0(cram_slice *slice, cram_codec *c,
+			      cram_block *out, char *in, int in_size) {
+    return 0;
+}
+
+int cram_huffman_encode_char(cram_slice *slice, cram_codec *c,
+			     cram_block *out, char *in, int in_size) {
+    int i, code, len, r = 0;
+    unsigned char *syms = (unsigned char *)in;
+
+    do {
+	int sym = *syms++;
+	if (sym >= -1 && sym < MAX_HUFF) {
+	    i = c->e_huffman.val2code[sym+1];
+	    assert(c->e_huffman.codes[i].symbol == sym);
+	    code = c->e_huffman.codes[i].code;
+	    len  = c->e_huffman.codes[i].len;
+	} else {
+	    /* Slow - use a lookup table for when sym < MAX_HUFF? */
+	    for (i = 0; i < c->e_huffman.nvals; i++) {
+		if (c->e_huffman.codes[i].symbol == sym)
+		    break;
+	    }
+	    if (i == c->e_huffman.nvals)
+		return -1;
+    
+	    code = c->e_huffman.codes[i].code;
+	    len  = c->e_huffman.codes[i].len;
+	}
+
+	r |= store_bits_MSB(out, code, len);
+    } while (--in_size);
+
+    return r;
+}
+
+int cram_huffman_encode_int0(cram_slice *slice, cram_codec *c,
+			     cram_block *out, char *in, int in_size) {
+    return 0;
+}
+
+int cram_huffman_encode_int(cram_slice *slice, cram_codec *c,
+			    cram_block *out, char *in, int in_size) {
+    int i, code, len, r = 0;
+    int *syms = (int *)in;
+
+    do {
+	int sym = *syms++;
+
+	if (sym >= -1 && sym < MAX_HUFF) {
+	    i = c->e_huffman.val2code[sym+1];
+	    assert(c->e_huffman.codes[i].symbol == sym);
+	    code = c->e_huffman.codes[i].code;
+	    len  = c->e_huffman.codes[i].len;
+	} else {
+	    /* Slow - use a lookup table for when sym < MAX_HUFFMAN_SYM? */
+	    for (i = 0; i < c->e_huffman.nvals; i++) {
+		if (c->e_huffman.codes[i].symbol == sym)
+		    break;
+	    }
+	    if (i == c->e_huffman.nvals)
+		return -1;
+    
+	    code = c->e_huffman.codes[i].code;
+	    len  = c->e_huffman.codes[i].len;
+	}
+
+	r |= store_bits_MSB(out, code, len);
+    } while (--in_size);
+
+    return r;
+}
+
+void cram_huffman_encode_free(cram_codec *c) {
+    if (!c)
+	return;
+
+    if (c->e_huffman.codes)
+	free(c->e_huffman.codes);
+    free(c);
+}
+
+/*
+ * Encodes a huffman tree.
+ * Returns number of bytes written.
+ */
+int cram_huffman_encode_store(cram_codec *c, cram_block *b, char *prefix,
+			      int version) {
+    int i, len = 0;
+    cram_huffman_code *codes = c->e_huffman.codes;
+    /*
+     * Up to code length 127 means 2.5e+26 bytes of data required (worst
+     * case huffman tree needs symbols with freqs matching the Fibonacci
+     * series). So guaranteed 1 byte per code.
+     *
+     * Symbols themselves could be 5 bytes (eg -1 is 5 bytes in itf8).
+     *
+     * Therefore 6*ncodes + 5 + 5 + 1 + 5 is max memory
+     */
+    char *tmp = malloc(6*c->e_huffman.nvals+16);
+    char *tp = tmp;
+
+    if (!tmp)
+	return -1;
+
+    if (prefix) {
+	size_t l = strlen(prefix);
+	BLOCK_APPEND(b, prefix, l);
+	len += l;
+    }
+
+    tp += itf8_put(tp, c->e_huffman.nvals);
+    for (i = 0; i < c->e_huffman.nvals; i++) {
+	tp += itf8_put(tp, codes[i].symbol);
+    }
+
+    tp += itf8_put(tp, c->e_huffman.nvals);
+    for (i = 0; i < c->e_huffman.nvals; i++) {
+	tp += itf8_put(tp, codes[i].len);
+    }
+
+    len += itf8_put_blk(b, c->codec);
+    len += itf8_put_blk(b, tp-tmp);
+    BLOCK_APPEND(b, tmp, tp-tmp);
+    len += tp-tmp;
+
+    free(tmp);
+
+    return len;
+}
+
+cram_codec *cram_huffman_encode_init(cram_stats *st,
+				     enum cram_external_type option,
+				     void *dat,
+				     int version) {
+    int *vals = NULL, *freqs = NULL, vals_alloc = 0, *lens, code, len;
+    int nvals, i, ntot = 0, max_val = 0, min_val = INT_MAX, k;
+    cram_codec *c;
+    cram_huffman_code *codes;
+
+    c = malloc(sizeof(*c));
+    if (!c)
+	return NULL;
+    c->codec = E_HUFFMAN;
+
+    /* Count number of unique symbols */
+    for (nvals = i = 0; i < MAX_STAT_VAL; i++) {
+	if (!st->freqs[i])
+	    continue;
+	if (nvals >= vals_alloc) {
+	    vals_alloc = vals_alloc ? vals_alloc*2 : 1024;
+	    vals  = realloc(vals,  vals_alloc * sizeof(int));
+	    freqs = realloc(freqs, vals_alloc * sizeof(int));
+	    if (!vals || !freqs) {
+		if (vals)  free(vals);
+		if (freqs) free(freqs);
+		free(c);
+		return NULL;
+	    }
+	}
+	vals[nvals] = i;
+	freqs[nvals] = st->freqs[i];
+	assert(st->freqs[i] > 0);
+	ntot += freqs[nvals];
+	if (max_val < i) max_val = i;
+	if (min_val > i) min_val = i;
+	nvals++;
+    }
+    if (st->h) {
+	khint_t k;
+
+	for (k = kh_begin(st->h); k != kh_end(st->h); k++) {
+	    if (!kh_exist(st->h, k))
+		continue;
+	    if (nvals >= vals_alloc) {
+		vals_alloc = vals_alloc ? vals_alloc*2 : 1024;
+		vals  = realloc(vals,  vals_alloc * sizeof(int));
+		freqs = realloc(freqs, vals_alloc * sizeof(int));
+		if (!vals || !freqs)
+		    return NULL;
+	    }
+	    vals[nvals]= kh_key(st->h, k);
+	    freqs[nvals] = kh_val(st->h, k);
+	    assert(freqs[nvals] > 0);
+	    ntot += freqs[nvals];
+	    if (max_val < i) max_val = i;
+	    if (min_val > i) min_val = i;
+	    nvals++;
+	}
+    }
+
+    assert(nvals > 0);
+
+    freqs = realloc(freqs, 2*nvals*sizeof(*freqs));
+    lens = calloc(2*nvals, sizeof(*lens));
+    if (!lens || !freqs)
+	return NULL;
+
+    /* Inefficient, use pointers to form chain so we can insert and maintain
+     * a sorted list? This is currently O(nvals^2) complexity.
+     */
+    for (;;) {
+	int low1 = INT_MAX, low2 = INT_MAX;
+	int ind1 = 0, ind2 = 0;
+	for (i = 0; i < nvals; i++) {
+	    if (freqs[i] < 0)
+		continue;
+	    if (low1 > freqs[i]) 
+		low2 = low1, ind2 = ind1, low1 = freqs[i], ind1 = i;
+	    else if (low2 > freqs[i])
+		low2 = freqs[i], ind2 = i;
+	}
+	if (low2 == INT_MAX)
+	    break;
+
+	freqs[nvals] = low1 + low2;
+	lens[ind1] = nvals;
+	lens[ind2] = nvals;
+	freqs[ind1] *= -1;
+	freqs[ind2] *= -1;
+	nvals++;
+    }
+    nvals = nvals/2+1;
+
+    /* Assign lengths */
+    for (i = 0; i < nvals; i++) {
+	int code_len = 0;
+	for (k = lens[i]; k; k = lens[k])
+	    code_len++;
+	lens[i] = code_len;
+	freqs[i] *= -1;
+	//fprintf(stderr, "%d / %d => %d\n", vals[i], freqs[i], lens[i]);
+    }
+
+
+    /* Sort, need in a struct */
+    if (!(codes = malloc(nvals * sizeof(*codes))))
+	return NULL;
+    for (i = 0; i < nvals; i++) {
+	codes[i].symbol = vals[i];
+	codes[i].len = lens[i];
+    }
+    qsort(codes, nvals, sizeof(*codes), code_sort);
+
+    /*
+     * Generate canonical codes from lengths.
+     * Sort by length.
+     * Start with 0.
+     * Every new code of same length is +1.
+     * Every new code of new length is +1 then <<1 per extra length.
+     *
+     * /\
+     * a/\
+     * /\/\
+     * bcd/\
+     *    ef
+     * 
+     * a 1  0
+     * b 3  4 (0+1)<<2
+     * c 3  5
+     * d 3  6
+     * e 4  14  (6+1)<<1
+     * f 5  15     
+     */
+    code = 0; len = codes[0].len;
+    for (i = 0; i < nvals; i++) {
+	while (len != codes[i].len) {
+	    code<<=1;
+	    len++;
+	}
+	codes[i].code = code++;
+
+	if (codes[i].symbol >= -1 && codes[i].symbol < MAX_HUFF)
+	    c->e_huffman.val2code[codes[i].symbol+1] = i;
+
+	//fprintf(stderr, "sym %d, code %d, len %d\n",
+	//	codes[i].symbol, codes[i].code, codes[i].len);
+    }
+
+    free(lens);
+    free(vals);
+    free(freqs);
+
+    c->e_huffman.codes = codes;
+    c->e_huffman.nvals = nvals;
+
+    c->free = cram_huffman_encode_free;
+    if (option == E_BYTE || option == E_BYTE_ARRAY) {
+	if (c->e_huffman.codes[0].len == 0)
+	    c->encode = cram_huffman_encode_char0;
+	else
+	    c->encode = cram_huffman_encode_char;
+    } else {
+	if (c->e_huffman.codes[0].len == 0)
+	    c->encode = cram_huffman_encode_int0;
+	else
+	    c->encode = cram_huffman_encode_int;
+    }
+    c->store = cram_huffman_encode_store;
+
+    return c;
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ * BYTE_ARRAY_LEN
+ */
+int cram_byte_array_len_decode(cram_slice *slice, cram_codec *c,
+			       cram_block *in, char *out,
+			       int *out_size) {
+    /* Fetch length */
+    int32_t len, one = 1;
+
+    c->byte_array_len.len_codec->decode(slice, c->byte_array_len.len_codec, in, (char *)&len, &one);
+    //printf("ByteArray Len=%d\n", len);
+
+    if (c->byte_array_len.value_codec) {
+	c->byte_array_len.value_codec->decode(slice,
+					      c->byte_array_len.value_codec,
+					      in, out, &len);
+    } else {
+	return -1;
+    }
+
+    *out_size = len;
+
+    return 0;
+}
+
+void cram_byte_array_len_decode_free(cram_codec *c) {
+    if (!c) return;
+
+    if (c->byte_array_len.len_codec)
+	c->byte_array_len.len_codec->free(c->byte_array_len.len_codec);
+
+    if (c->byte_array_len.value_codec)
+	c->byte_array_len.value_codec->free(c->byte_array_len.value_codec);
+
+    free(c);
+}
+
+cram_codec *cram_byte_array_len_decode_init(char *data, int size,
+					    enum cram_external_type option,
+					    int version) {
+    cram_codec *c;
+    char *cp = data;
+    int32_t encoding;
+    int32_t sub_size;
+
+    if (!(c = malloc(sizeof(*c))))
+	return NULL;
+
+    c->codec  = E_BYTE_ARRAY_LEN;
+    c->decode = cram_byte_array_len_decode;
+    c->free   = cram_byte_array_len_decode_free;
+    
+    cp += itf8_get(cp, &encoding);
+    cp += itf8_get(cp, &sub_size);
+    c->byte_array_len.len_codec = cram_decoder_init(encoding, cp, sub_size,
+						    E_INT, version);
+    cp += sub_size;
+
+    cp += itf8_get(cp, &encoding);
+    cp += itf8_get(cp, &sub_size);
+    c->byte_array_len.value_codec = cram_decoder_init(encoding, cp, sub_size,
+						      option, version);
+    cp += sub_size;
+
+    if (cp - data != size) {
+	fprintf(stderr, "Malformed byte_array_len header stream\n");
+	free(c);
+	return NULL;
+    }
+
+    return c;
+}
+
+int cram_byte_array_len_encode(cram_slice *slice, cram_codec *c,
+			cram_block *out, char *in, int in_size) {
+    return -1; // not imp.
+}
+
+void cram_byte_array_len_encode_free(cram_codec *c) {
+    if (!c)
+	return;
+    free(c);
+}
+
+int cram_byte_array_len_encode_store(cram_codec *c, cram_block *b,
+				     char *prefix, int version) {
+    int len = 0;
+
+    if (prefix) {
+	size_t l = strlen(prefix);
+	BLOCK_APPEND(b, prefix, l);
+	len += l;
+    }
+
+    len += itf8_put_blk(b, c->codec);
+    len += itf8_put_blk(b, c->e_byte_array_len.len_len +
+			   c->e_byte_array_len.val_len);
+    BLOCK_APPEND(b, c->e_byte_array_len.len_dat, c->e_byte_array_len.len_len);
+    len += c->e_byte_array_len.len_len;
+
+    BLOCK_APPEND(b, c->e_byte_array_len.val_dat, c->e_byte_array_len.val_len);
+    len += c->e_byte_array_len.val_len;
+
+    return len;
+}
+
+cram_codec *cram_byte_array_len_encode_init(cram_stats *st,
+					    enum cram_external_type option,
+					    void *dat,
+					    int version) {
+    cram_codec *c;
+    cram_byte_array_len_encoder *e = (cram_byte_array_len_encoder *)dat;
+
+    c = malloc(sizeof(*c));
+    if (!c)
+	return NULL;
+    c->codec = E_BYTE_ARRAY_LEN;
+    c->free = cram_byte_array_len_encode_free;
+    c->encode = cram_byte_array_len_encode;
+    c->store = cram_byte_array_len_encode_store;
+
+    c->e_byte_array_len.len_len = e->len_len;
+    c->e_byte_array_len.len_dat = e->len_dat;
+    c->e_byte_array_len.val_len = e->val_len;
+    c->e_byte_array_len.val_dat = e->val_dat;
+
+    return c;
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ * BYTE_ARRAY_STOP
+ */
+int cram_byte_array_stop_decode_char(cram_slice *slice, cram_codec *c,
+				     cram_block *in, char *out,
+				     int *out_size) {
+    int i;
+    cram_block *b = NULL;
+    char *cp, ch;
+
+    if (slice->block_by_id) {
+	if (!(b = slice->block_by_id[c->byte_array_stop.content_id]))
+	    return -1;
+    } else {
+	for (i = 0; i < slice->hdr->num_blocks; i++) {
+	    b = slice->block[i];
+	    if (b->content_type == EXTERNAL &&
+		b->content_id == c->byte_array_stop.content_id) {
+		break;
+	    }
+	}
+	if (i == slice->hdr->num_blocks || !b)
+	    return -1;
+    }
+
+    if (b->idx >= b->uncomp_size)
+	return -1;
+
+    cp = (char *)b->data + b->idx;
+    while ((ch = *cp) != (char)c->byte_array_stop.stop) {
+	if (cp - (char *)b->data >= b->uncomp_size)
+	    return -1;
+	*out++ = ch;
+	cp++;
+    }
+
+    *out_size = cp - (char *)(b->data + b->idx);
+    b->idx = cp - (char *)b->data + 1;
+
+    return 0;
+}
+
+int cram_byte_array_stop_decode_block(cram_slice *slice, cram_codec *c,
+				      cram_block *in, char *out_,
+				      int *out_size) {
+    int space = 256;
+    cram_block *b = NULL;
+    cram_block *out = (cram_block *)out_;
+    char *cp, ch, *out_cp, *cp_end, *out_end;
+    char stop;
+
+    if (slice->block_by_id) {
+	if (!(b = slice->block_by_id[c->byte_array_stop.content_id]))
+	    return -1;
+    } else {
+	int i;
+	for (i = 0; i < slice->hdr->num_blocks; i++) {
+	    b = slice->block[i];
+	    if (b->content_type == EXTERNAL &&
+		b->content_id == c->byte_array_stop.content_id) {
+		break;
+	    }
+	}
+	if (i == slice->hdr->num_blocks || !b)
+	    return -1;
+    }
+
+    if (b->idx >= b->uncomp_size)
+	return -1;
+    cp = (char *)b->data + b->idx;
+    cp_end = (char *)b->data + b->uncomp_size;
+    BLOCK_GROW(out, space);
+    out_cp = (char *)BLOCK_END(out);
+    out_end = out_cp + space;
+
+    stop = c->byte_array_stop.stop;
+    while ((ch = *cp) != stop) {
+	if (cp++ == cp_end)
+	    return -1;
+	*out_cp++ = ch;
+
+	if (out_cp == out_end) {
+	    BLOCK_SIZE(out) = out_cp - (char *)BLOCK_DATA(out);
+	    space *= 2;
+	    BLOCK_GROW(out, space);
+	    out_cp = (char *)BLOCK_END(out);
+	    out_end = out_cp + space;
+	}
+    }
+    BLOCK_SIZE(out) = out_cp - (char *)BLOCK_DATA(out);
+
+    *out_size = cp - (char *)(b->data + b->idx);
+    b->idx = cp - (char *)b->data + 1;
+
+    return 0;
+}
+
+void cram_byte_array_stop_decode_free(cram_codec *c) {
+    if (!c) return;
+
+    free(c);
+}
+
+cram_codec *cram_byte_array_stop_decode_init(char *data, int size,
+					     enum cram_external_type option,
+					     int version) {
+    cram_codec *c;
+    unsigned char *cp = (unsigned char *)data;
+
+    if (!(c = malloc(sizeof(*c))))
+	return NULL;
+
+    c->codec  = E_BYTE_ARRAY_STOP;
+    c->decode = (option == E_BYTE_ARRAY_BLOCK)
+	? cram_byte_array_stop_decode_block
+	: cram_byte_array_stop_decode_char;
+    c->free   = cram_byte_array_stop_decode_free;
+    
+    c->byte_array_stop.stop = *cp++;
+    if (version == CRAM_1_VERS) {
+	c->byte_array_stop.content_id = cp[0] + (cp[1]<<8) + (cp[2]<<16)
+	    + (cp[3]<<24);
+	cp += 4;
+    } else {
+	cp += itf8_get(cp, &c->byte_array_stop.content_id);
+    }
+
+    if ((char *)cp - data != size) {
+	fprintf(stderr, "Malformed byte_array_stop header stream\n");
+	free(c);
+	return NULL;
+    }
+
+    return c;
+}
+
+int cram_byte_array_stop_encode(cram_slice *slice, cram_codec *c,
+				cram_block *out, char *in, int in_size) {
+    return -1; // not imp.
+}
+
+void cram_byte_array_stop_encode_free(cram_codec *c) {
+    if (!c)
+	return;
+    free(c);
+}
+
+int cram_byte_array_stop_encode_store(cram_codec *c, cram_block *b,
+				      char *prefix, int version) {
+    int len = 0;
+    char buf[20], *cp = buf;
+
+    if (prefix) {
+	size_t l = strlen(prefix);
+	BLOCK_APPEND(b, prefix, l);
+	len += l;
+    }
+
+    cp += itf8_put(cp, c->codec);
+
+    if (version == CRAM_1_VERS) {
+	cp += itf8_put(cp, 5);
+	*cp++ = c->e_byte_array_stop.stop;
+	*cp++ = (c->e_byte_array_stop.content_id >>  0) & 0xff;
+	*cp++ = (c->e_byte_array_stop.content_id >>  8) & 0xff;
+	*cp++ = (c->e_byte_array_stop.content_id >> 16) & 0xff;
+	*cp++ = (c->e_byte_array_stop.content_id >> 24) & 0xff;
+    } else {
+	cp += itf8_put(cp, 1 + itf8_size(c->e_byte_array_stop.content_id));
+	*cp++ = c->e_byte_array_stop.stop;
+	cp += itf8_put(cp, c->e_byte_array_stop.content_id);
+    }
+
+    BLOCK_APPEND(b, buf, cp-buf);
+    len += cp-buf;
+
+    return len;
+}
+
+cram_codec *cram_byte_array_stop_encode_init(cram_stats *st,
+					     enum cram_external_type option,
+					     void *dat,
+					     int version) {
+    cram_codec *c;
+
+    c = malloc(sizeof(*c));
+    if (!c)
+	return NULL;
+    c->codec = E_BYTE_ARRAY_STOP;
+    c->free = cram_byte_array_stop_encode_free;
+    c->encode = cram_byte_array_stop_encode;
+    c->store = cram_byte_array_stop_encode_store;
+
+    c->e_byte_array_stop.stop = ((int *)dat)[0];
+    c->e_byte_array_stop.content_id = ((int *)dat)[1];
+
+    return c;
+}
+
+/*
+ * ---------------------------------------------------------------------------
+ */
+
+char *cram_encoding2str(enum cram_encoding t) {
+    switch (t) {
+    case E_NULL:            return "NULL";
+    case E_EXTERNAL:        return "EXTERNAL";
+    case E_GOLOMB:          return "GOLOMB";
+    case E_HUFFMAN:         return "HUFFMAN";
+    case E_BYTE_ARRAY_LEN:  return "BYTE_ARRAY_LEN";
+    case E_BYTE_ARRAY_STOP: return "BYTE_ARRAY_STOP";
+    case E_BETA:            return "BETA";
+    case E_SUBEXP:          return "SUBEXP";
+    case E_GOLOMB_RICE:     return "GOLOMB_RICE";
+    case E_GAMMA:           return "GAMMA";
+    }
+    return "?";
+}
+
+static cram_codec *(*decode_init[])(char *data,
+				    int size,
+				    enum cram_external_type option,
+				    int version) = {
+    NULL,
+    cram_external_decode_init,
+    NULL,
+    cram_huffman_decode_init,
+    cram_byte_array_len_decode_init,
+    cram_byte_array_stop_decode_init,
+    cram_beta_decode_init,
+    cram_subexp_decode_init,
+    NULL,
+    cram_gamma_decode_init,
+};
+
+cram_codec *cram_decoder_init(enum cram_encoding codec,
+			      char *data, int size,
+			      enum cram_external_type option,
+			      int version) {
+    if (decode_init[codec]) {
+	return decode_init[codec](data, size, option, version);
+    } else {
+	fprintf(stderr, "Unimplemented codec of type %s\n", codec2str(codec));
+	return NULL;
+    }
+}
+
+static cram_codec *(*encode_init[])(cram_stats *stx,
+				    enum cram_external_type option,
+				    void *opt,
+				    int version) = {
+    NULL,
+    cram_external_encode_init,
+    NULL,
+    cram_huffman_encode_init,
+    cram_byte_array_len_encode_init,
+    cram_byte_array_stop_encode_init,
+    cram_beta_encode_init,
+    NULL, //cram_subexp_encode_init,
+    NULL,
+    NULL, //cram_gamma_encode_init,
+};
+
+cram_codec *cram_encoder_init(enum cram_encoding codec,
+			      cram_stats *st,
+			      enum cram_external_type option,
+			      void *dat,
+			      int version) {
+    if (st && !st->nvals)
+	return NULL;
+
+    if (encode_init[codec]) {
+	return encode_init[codec](st, option, dat, version);
+    } else {
+	fprintf(stderr, "Unimplemented codec of type %s\n", codec2str(codec));
+	abort();
+    }
+}
diff --git a/htslib/cram/cram_codecs.h b/htslib/cram/cram_codecs.h
new file mode 100644
index 0000000..7037814
--- /dev/null
+++ b/htslib/cram/cram_codecs.h
@@ -0,0 +1,155 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _CRAM_ENCODINGS_H_
+#define _CRAM_ENCODINGS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <inttypes.h>
+
+struct cram_codec;
+
+/*
+ * Slow but simple huffman decoder to start with.
+ * Read a bit at a time, keeping track of {length, value}
+ * eg. 1 1 0 1 => {1,1},  {2,3}, {3,6}, {4,13}
+ *
+ * Keep track of this through the huffman code table.
+ * For fast scanning we have an index of where the first code of length X
+ * appears.
+ */
+typedef struct {
+    int32_t symbol;
+    int32_t p; // next code start value, minus index to codes[]
+    int32_t code;
+    int32_t len;
+} cram_huffman_code;
+
+typedef struct {
+    int ncodes;
+    cram_huffman_code *codes;
+} cram_huffman_decoder;
+
+#define MAX_HUFF 128
+typedef struct {
+    cram_huffman_code *codes;
+    int nvals;
+    int val2code[MAX_HUFF+1]; // value to code lookup for small values
+} cram_huffman_encoder;
+
+typedef struct {
+    int32_t offset;
+    int32_t nbits;
+} cram_beta_decoder;
+
+typedef struct {
+    int32_t offset;
+} cram_gamma_decoder;
+
+typedef struct {
+    int32_t offset;
+    int32_t k;
+} cram_subexp_decoder;
+
+typedef struct {
+    int32_t content_id;
+    enum cram_external_type type;
+} cram_external_decoder;
+
+typedef struct {
+    struct cram_codec *len_codec;
+    struct cram_codec *value_codec;
+} cram_byte_array_len_decoder;
+
+typedef struct {
+    unsigned char stop;
+    int32_t content_id;
+} cram_byte_array_stop_decoder;
+
+typedef struct {
+    uint32_t len_len;
+    unsigned char *len_dat;
+    uint32_t val_len;
+    unsigned char *val_dat;
+} cram_byte_array_len_encoder;
+
+/*
+ * A generic codec structure.
+ */
+typedef struct cram_codec {
+    enum cram_encoding codec;
+    void (*free)(struct cram_codec *codec);
+    int (*decode)(cram_slice *slice, struct cram_codec *codec,
+		  cram_block *in, char *out, int *out_size);
+    int (*encode)(cram_slice *slice, struct cram_codec *codec,
+		  cram_block *out, char *in, int in_size);
+    int (*store)(struct cram_codec *codec, cram_block *b, char *prefix,
+		 int version);
+    union {
+	cram_huffman_decoder         huffman;
+	cram_external_decoder        external;
+	cram_beta_decoder            beta;
+	cram_gamma_decoder           gamma;
+	cram_subexp_decoder          subexp;
+	cram_byte_array_len_decoder  byte_array_len;
+	cram_byte_array_stop_decoder byte_array_stop;
+
+	cram_huffman_encoder         e_huffman;
+	cram_external_decoder        e_external;
+	cram_byte_array_stop_decoder e_byte_array_stop;
+	cram_byte_array_len_encoder  e_byte_array_len;
+	cram_beta_decoder            e_beta;
+    };
+} cram_codec;
+
+char *cram_encoding2str(enum cram_encoding t);
+
+cram_codec *cram_decoder_init(enum cram_encoding codec, char *data, int size,
+			      enum cram_external_type option,
+			      int version);
+cram_codec *cram_encoder_init(enum cram_encoding codec, cram_stats *st,
+			      enum cram_external_type option, void *dat,
+			      int version);
+
+//int cram_decode(void *codes, char *in, int in_size, char *out, int *out_size);
+//void cram_decoder_free(void *codes);
+
+//#define GET_BIT_MSB(b,v) (void)(v<<=1, v|=(b->data[b->byte] >> b->bit)&1, (--b->bit == -1) && (b->bit = 7, b->byte++))
+
+#define GET_BIT_MSB(b,v) (void)(v<<=1, v|=(b->data[b->byte] >> b->bit)&1, b->byte += (b->bit==0), b->bit+=(b->bit==0)*8-1)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CRAM_ENCODINGS_H_ */
diff --git a/htslib/cram/cram_decode.c b/htslib/cram/cram_decode.c
new file mode 100644
index 0000000..83fdaee
--- /dev/null
+++ b/htslib/cram/cram_decode.c
@@ -0,0 +1,2138 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+ * - In-memory decoding of CRAM data structures.
+ * - Iterator for reading CRAM record by record.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <zlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <math.h>
+#include <ctype.h>
+
+#include "cram/cram.h"
+#include "cram/os.h"
+#include "cram/md5.h"
+
+//Whether CIGAR has just M or uses = and X to indicate match and mismatch
+//#define USE_X
+
+/* ----------------------------------------------------------------------
+ * CRAM compression headers
+ */
+
+/*
+ * Decodes the Tag Dictionary record in the preservation map
+ * Updates the cram compression header.
+ * 
+ * Returns number of bytes decoded on success
+ *        -1 on failure
+ */
+int cram_decode_TD(char *cp, cram_block_compression_hdr *h) {
+    char *op = cp;
+    unsigned char *dat;
+    cram_block *b;
+    int32_t blk_size;
+    int nTL, i, sz;
+
+    if (!(b = cram_new_block(0, 0)))
+	return -1;
+    h->TD_blk = b;
+
+    /* Decode */
+    cp += itf8_get(cp, &blk_size);
+    if (!blk_size) {
+	h->nTL = 0;
+	h->TL = NULL;
+	cram_free_block(b);
+        return cp - op;
+    }
+
+    BLOCK_APPEND(b, cp, blk_size);
+    cp += blk_size;
+    sz = cp - op;
+
+    // Force nul termination if missing
+    if (BLOCK_DATA(b)[BLOCK_SIZE(b)-1])
+	BLOCK_APPEND_CHAR(b, '\0');
+
+    /* Set up TL lookup table */
+    dat = BLOCK_DATA(b);
+
+    // Count
+    for (nTL = i = 0; i < BLOCK_SIZE(b); i++) {
+	nTL++;
+	while (dat[i])
+	    i++;
+    }
+
+    // Copy
+    h->nTL = nTL;
+    if (!(h->TL = calloc(h->nTL, sizeof(unsigned char *))))
+	return -1;
+    for (nTL = i = 0; i < BLOCK_SIZE(b); i++) {
+	h->TL[nTL++] = &dat[i];
+	while (dat[i])
+	    i++;
+    }
+    
+    return sz;
+}
+
+/*
+ * Decodes a CRAM block compression header.
+ * Returns header ptr on success
+ *         NULL on failure
+ */
+cram_block_compression_hdr *cram_decode_compression_header(cram_fd *fd,
+							   cram_block *b) {
+    char *cp, *cp_copy;
+    cram_block_compression_hdr *hdr = calloc(1, sizeof(*hdr));
+    int i;
+    int32_t map_size, map_count;
+
+    if (!hdr)
+	return NULL;
+
+    if (b->method != RAW) {
+	if (cram_uncompress_block(b))
+	    return NULL;
+    }
+
+    cp = (char *)b->data;
+
+    if (fd->version == CRAM_1_VERS) {
+	cp += itf8_get(cp, &hdr->ref_seq_id);
+	cp += itf8_get(cp, &hdr->ref_seq_start);
+	cp += itf8_get(cp, &hdr->ref_seq_span);
+	cp += itf8_get(cp, &hdr->num_records);
+	cp += itf8_get(cp, &hdr->num_landmarks);
+	if (!(hdr->landmark = malloc(hdr->num_landmarks * sizeof(int32_t)))) {
+	    free(hdr);
+	    return NULL;
+	}
+	for (i = 0; i < hdr->num_landmarks; i++) {
+	    cp += itf8_get(cp, &hdr->landmark[i]);
+	}
+    }
+
+    hdr->preservation_map = kh_init(map);
+
+    memset(hdr->rec_encoding_map, 0,
+	   CRAM_MAP_HASH * sizeof(hdr->rec_encoding_map[0]));
+    memset(hdr->tag_encoding_map, 0,
+	   CRAM_MAP_HASH * sizeof(hdr->tag_encoding_map[0]));
+
+    if (!hdr->preservation_map) {
+	cram_free_compression_header(hdr);
+	return NULL;
+    }
+
+    /* Initialise defaults for preservation map */
+    hdr->mapped_qs_included = 0;
+    hdr->unmapped_qs_included = 0;
+    hdr->unmapped_placed = 0;
+    hdr->qs_included = 0;
+    hdr->read_names_included = 0;
+    hdr->AP_delta = 1;
+    memcpy(hdr->substitution_matrix, "CGTNAGTNACTNACGNACGT", 20);
+
+    /* Preservation map */
+    cp += itf8_get(cp, &map_size); cp_copy = cp;
+    cp += itf8_get(cp, &map_count);
+    for (i = 0; i < map_count; i++) {
+	pmap_t hd;
+	khint_t k;
+	int r;
+
+	cp += 2;
+	switch(CRAM_KEY(cp[-2],cp[-1])) {
+	case CRAM_KEY('M','I'):
+	    hd.i = *cp++;
+	    k = kh_put(map, hdr->preservation_map, "MI", &r);
+	    if (-1 == r) {
+		cram_free_compression_header(hdr);
+                return NULL;
+            }
+
+	    kh_val(hdr->preservation_map, k) = hd;
+	    hdr->mapped_qs_included = hd.i;
+	    break;
+
+	case CRAM_KEY('U','I'):
+	    hd.i = *cp++;
+	    k = kh_put(map, hdr->preservation_map, "UI", &r);
+	    if (-1 == r) {
+		cram_free_compression_header(hdr);
+                return NULL;
+            }
+
+	    kh_val(hdr->preservation_map, k) = hd;
+	    hdr->unmapped_qs_included = hd.i;
+	    break;
+
+	case CRAM_KEY('P','I'):
+	    hd.i = *cp++;
+	    k = kh_put(map, hdr->preservation_map, "PI", &r);
+	    if (-1 == r) {
+		cram_free_compression_header(hdr);
+                return NULL;
+            }
+
+	    kh_val(hdr->preservation_map, k) = hd;
+	    hdr->unmapped_placed = hd.i;
+	    break;
+
+	case CRAM_KEY('R','N'):
+	    hd.i = *cp++;
+	    k = kh_put(map, hdr->preservation_map, "RN", &r);
+	    if (-1 == r) {
+		cram_free_compression_header(hdr);
+                return NULL;
+            }
+
+	    kh_val(hdr->preservation_map, k) = hd;
+	    hdr->read_names_included = hd.i;
+	    break;
+
+	case CRAM_KEY('A','P'):
+	    hd.i = *cp++;
+	    k = kh_put(map, hdr->preservation_map, "AP", &r);
+	    if (-1 == r) {
+		cram_free_compression_header(hdr);
+                return NULL;
+            }
+
+	    kh_val(hdr->preservation_map, k) = hd;
+	    hdr->AP_delta = hd.i;
+	    break;
+
+	case CRAM_KEY('R','R'):
+	    hd.i = *cp++;
+	    k = kh_put(map, hdr->preservation_map, "RR", &r);
+	    if (-1 == r) {
+		cram_free_compression_header(hdr);
+                return NULL;
+            }
+
+	    kh_val(hdr->preservation_map, k) = hd;
+	    fd->no_ref = !hd.i;
+	    break;
+
+	case CRAM_KEY('S','M'):
+	    hdr->substitution_matrix[0][(cp[0]>>6)&3] = 'C';
+	    hdr->substitution_matrix[0][(cp[0]>>4)&3] = 'G';
+	    hdr->substitution_matrix[0][(cp[0]>>2)&3] = 'T';
+	    hdr->substitution_matrix[0][(cp[0]>>0)&3] = 'N';
+
+	    hdr->substitution_matrix[1][(cp[1]>>6)&3] = 'A';
+	    hdr->substitution_matrix[1][(cp[1]>>4)&3] = 'G';
+	    hdr->substitution_matrix[1][(cp[1]>>2)&3] = 'T';
+	    hdr->substitution_matrix[1][(cp[1]>>0)&3] = 'N';
+
+	    hdr->substitution_matrix[2][(cp[2]>>6)&3] = 'A';
+	    hdr->substitution_matrix[2][(cp[2]>>4)&3] = 'C';
+	    hdr->substitution_matrix[2][(cp[2]>>2)&3] = 'T';
+	    hdr->substitution_matrix[2][(cp[2]>>0)&3] = 'N';
+
+	    hdr->substitution_matrix[3][(cp[3]>>6)&3] = 'A';
+	    hdr->substitution_matrix[3][(cp[3]>>4)&3] = 'C';
+	    hdr->substitution_matrix[3][(cp[3]>>2)&3] = 'G';
+	    hdr->substitution_matrix[3][(cp[3]>>0)&3] = 'N';
+
+	    hdr->substitution_matrix[4][(cp[4]>>6)&3] = 'A';
+	    hdr->substitution_matrix[4][(cp[4]>>4)&3] = 'C';
+	    hdr->substitution_matrix[4][(cp[4]>>2)&3] = 'G';
+	    hdr->substitution_matrix[4][(cp[4]>>0)&3] = 'T';
+
+	    hd.p = cp;
+	    cp += 5;
+
+	    k = kh_put(map, hdr->preservation_map, "SM", &r);
+	    if (-1 == r) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	    kh_val(hdr->preservation_map, k) = hd;
+	    break;
+
+	case CRAM_KEY('T','D'): {
+	    int sz = cram_decode_TD(cp, hdr); // tag dictionary
+	    if (sz < 0) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+
+	    hd.p = cp;
+	    cp += sz;
+
+	    k = kh_put(map, hdr->preservation_map, "TD", &r);
+	    if (-1 == r) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	    kh_val(hdr->preservation_map, k) = hd;
+	    break;
+	}
+
+	default:
+	    fprintf(stderr, "Unrecognised preservation map key %c%c\n",
+		    cp[-2], cp[-1]);
+	    // guess byte;
+	    cp++;
+	    break;
+	}
+    }
+    if (cp - cp_copy != map_size) {
+	cram_free_compression_header(hdr);
+	return NULL;
+    }
+
+    /* Record encoding map */
+    cp += itf8_get(cp, &map_size); cp_copy = cp;
+    cp += itf8_get(cp, &map_count);
+    for (i = 0; i < map_count; i++) {
+	char *key = cp;
+	int32_t encoding;
+	int32_t size;
+	cram_map *m = malloc(sizeof(*m)); // FIXME: use pooled_alloc
+
+	if (!m) {
+	    cram_free_compression_header(hdr);
+	    return NULL;
+	}
+
+	cp += 2;
+	cp += itf8_get(cp, &encoding);
+	cp += itf8_get(cp, &size);
+
+	// Fill out cram_map purely for cram_dump to dump out.
+	m->key = (key[0]<<8)|key[1];
+	m->encoding = encoding;
+	m->size     = size;
+	m->offset   = cp - (char *)b->data;
+	m->codec = NULL;
+
+	if (m->encoding == E_NULL)
+	    continue;
+
+	//printf("%s codes for %.2s\n", cram_encoding2str(encoding), key);
+
+	/*
+	 * For CRAM1.0 CF and BF are Byte and not Int.
+	 * Practically speaking it makes no difference unless we have a
+	 * 1.0 format file that stores these in EXTERNAL as only then
+	 * does Byte vs Int matter.
+	 *
+	 * Neither this C code nor Java reference implementations did this,
+	 * so we gloss over it and treat them as int.
+	 */
+
+	if (key[0] == 'B' && key[1] == 'F') {
+	    if (!(hdr->BF_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'C' && key[1] == 'F') {
+	    if (!(hdr->CF_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'R' && key[1] == 'I') {
+	    if (!(hdr->RI_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'R' && key[1] == 'L') {
+	    if (!(hdr->RL_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'A' && key[1] == 'P') {
+	    if (!(hdr->AP_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'R' && key[1] == 'G') {
+	    if (!(hdr->RG_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'M' && key[1] == 'F') {
+	    if (!(hdr->MF_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'N' && key[1] == 'S') {
+	    if (!(hdr->NS_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'N' && key[1] == 'P') {
+	    if (!(hdr->NP_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'T' && key[1] == 'S') {
+	    if (!(hdr->TS_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'N' && key[1] == 'F') {
+	    if (!(hdr->NF_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'T' && key[1] == 'C') {
+	    if (!(hdr->TC_codec = cram_decoder_init(encoding, cp, size, E_BYTE,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'T' && key[1] == 'N') {
+	    if (!(hdr->TN_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'F' && key[1] == 'N') {
+	    if (!(hdr->FN_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'F' && key[1] == 'C') {
+	    if (!(hdr->FC_codec = cram_decoder_init(encoding, cp, size, E_BYTE,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'F' && key[1] == 'P') {
+	    if (!(hdr->FP_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'B' && key[1] == 'S') {
+	    if (!(hdr->BS_codec = cram_decoder_init(encoding, cp, size, E_BYTE,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'I' && key[1] == 'N') {
+	    if (!(hdr->IN_codec = cram_decoder_init(encoding, cp, size,
+						    E_BYTE_ARRAY,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'S' && key[1] == 'C') {
+	    if (!(hdr->SC_codec = cram_decoder_init(encoding, cp, size,
+						    E_BYTE_ARRAY,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'D' && key[1] == 'L') {
+	    if (!(hdr->DL_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'B' && key[1] == 'A') {
+	    if (!(hdr->BA_codec = cram_decoder_init(encoding, cp, size, E_BYTE,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'R' && key[1] == 'S') {
+	    if (!(hdr->RS_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'P' && key[1] == 'D') {
+	    if (!(hdr->PD_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'H' && key[1] == 'C') {
+	    if (!(hdr->HC_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'M' && key[1] == 'Q') {
+	    if (!(hdr->MQ_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'R' && key[1] == 'N') {
+	    if (!(hdr->RN_codec = cram_decoder_init(encoding, cp, size,
+						    E_BYTE_ARRAY_BLOCK,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'Q' && key[1] == 'S') {
+	    if (!(hdr->QS_codec = cram_decoder_init(encoding, cp, size, E_BYTE,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	    if (!(hdr->Qs_codec = cram_decoder_init(encoding, cp, size,
+						    E_BYTE_ARRAY,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'T' && key[1] == 'L') {
+	    if (!(hdr->TL_codec = cram_decoder_init(encoding, cp, size, E_INT,
+						    fd->version))) {
+		cram_free_compression_header(hdr);
+		return NULL;
+	    }
+	} else if (key[0] == 'T' && key[1] == 'M') {
+	} else if (key[0] == 'T' && key[1] == 'V') {
+	} else
+	    fprintf(stderr, "Unrecognised key: %.2s\n", key);
+
+	cp += size;
+
+	m->next = hdr->rec_encoding_map[CRAM_MAP(key[0], key[1])];
+	hdr->rec_encoding_map[CRAM_MAP(key[0], key[1])] = m;
+    }
+    if (cp - cp_copy != map_size) {
+	cram_free_compression_header(hdr);
+	return NULL;
+    }
+
+    /* Tag encoding map */
+    cp += itf8_get(cp, &map_size); cp_copy = cp;
+    cp += itf8_get(cp, &map_count);
+    for (i = 0; i < map_count; i++) {
+	int32_t encoding;
+	int32_t size;
+	cram_map *m = malloc(sizeof(*m)); // FIXME: use pooled_alloc
+	char *key = cp+1;
+
+	if (!m) {
+	    cram_free_compression_header(hdr);
+	    return NULL;
+	}
+
+	m->key = (key[0]<<16)|(key[1]<<8)|key[2];
+
+	cp += 4; // Strictly ITF8, but this suffices
+	cp += itf8_get(cp, &encoding);
+	cp += itf8_get(cp, &size);
+
+	m->encoding = encoding;
+	m->size     = size;
+	m->offset   = cp - (char *)b->data;
+	if (!(m->codec = cram_decoder_init(encoding, cp, size,
+					   E_BYTE_ARRAY_BLOCK, fd->version))) {
+	    cram_free_compression_header(hdr);
+	    free(m);
+	    return NULL;
+	}
+	
+	cp += size;
+
+	m->next = hdr->tag_encoding_map[CRAM_MAP(key[0],key[1])];
+	hdr->tag_encoding_map[CRAM_MAP(key[0],key[1])] = m;
+    }
+    if (cp - cp_copy != map_size) {
+	cram_free_compression_header(hdr);
+	return NULL;
+    }
+
+    return hdr;
+}
+
+/* ----------------------------------------------------------------------
+ * CRAM slices
+ */
+
+/*
+ * Decodes a CRAM (un)mapped slice header block.
+ * Returns slice header ptr on success
+ *         NULL on failure
+ */
+cram_block_slice_hdr *cram_decode_slice_header(cram_fd *fd, cram_block *b) {
+    cram_block_slice_hdr *hdr;
+    char *cp = (char *)b->data;
+    int i;
+
+    if (b->content_type != MAPPED_SLICE &&
+	b->content_type != UNMAPPED_SLICE)
+	return NULL;
+
+    if (!(hdr  = calloc(1, sizeof(*hdr))))
+	return NULL;
+
+    hdr->content_type = b->content_type;
+
+    if (b->content_type == MAPPED_SLICE) {
+	cp += itf8_get(cp, &hdr->ref_seq_id);
+	cp += itf8_get(cp, &hdr->ref_seq_start);
+	cp += itf8_get(cp, &hdr->ref_seq_span);
+    }
+    cp += itf8_get(cp, &hdr->num_records);
+    if (fd->version != CRAM_1_VERS)
+	cp += itf8_get(cp, &hdr->record_counter);
+    cp += itf8_get(cp, &hdr->num_blocks);
+
+    cp += itf8_get(cp, &hdr->num_content_ids);
+    hdr->block_content_ids = malloc(hdr->num_content_ids * sizeof(int32_t));
+    if (!hdr->block_content_ids) {
+	free(hdr);
+	return NULL;
+    }
+
+    for (i = 0; i < hdr->num_content_ids; i++) {
+	cp += itf8_get(cp, &hdr->block_content_ids[i]);
+    }
+
+    if (b->content_type == MAPPED_SLICE) {
+	cp += itf8_get(cp, &hdr->ref_base_id);
+    }
+
+    if (fd->version != CRAM_1_VERS) {
+	memcpy(hdr->md5, cp, 16);
+    } else {
+	memset(hdr->md5, 0, 16);
+    }
+
+    return hdr;
+}
+
+
+#if 0
+/* Returns the number of bits set in val; it the highest bit used */
+static int nbits(int v) {
+    static const int MultiplyDeBruijnBitPosition[32] = {
+	1, 10, 2, 11, 14, 22, 3, 30, 12, 15, 17, 19, 23, 26, 4, 31,
+	9, 13, 21, 29, 16, 18, 25, 8, 20, 28, 24, 7, 27, 6, 5, 32
+    };
+
+    v |= v >> 1; // first up to set all bits 1 after the first 1 */
+    v |= v >> 2;
+    v |= v >> 4;
+    v |= v >> 8;
+    v |= v >> 16;
+
+    // DeBruijn magic to find top bit
+    return MultiplyDeBruijnBitPosition[(uint32_t)(v * 0x07C4ACDDU) >> 27];
+}
+#endif
+
+#if 0
+static int sort_freqs(const void *vp1, const void *vp2) {
+    const int i1 = *(const int *)vp1;
+    const int i2 = *(const int *)vp2;
+    return i1-i2;
+}
+#endif
+
+/* ----------------------------------------------------------------------
+ * Primary CRAM sequence decoder
+ */
+
+/*
+ * Internal part of cram_decode_slice().
+ * Generates the sequence, quality and cigar components.
+ */
+static int cram_decode_seq(cram_fd *fd, cram_container *c, cram_slice *s,
+			   cram_block *blk, cram_record *cr, SAM_hdr *bfd,
+			   int cf, char *seq, char *qual) {
+    int prev_pos = 0, f, r = 0, out_sz = 1;
+    int seq_pos = 1;
+    int cig_len = 0, ref_pos = cr->apos;
+    int32_t fn, i32;
+    enum cigar_op cig_op = BAM_CMATCH;
+    uint32_t *cigar = s->cigar;
+    uint32_t ncigar = s->ncigar;
+    uint32_t cigar_alloc = s->cigar_alloc;
+    uint32_t nm = 0, md_dist = 0;
+    int orig_aux = 0;
+    int decode_md = fd->decode_md;
+    char buf[20];
+
+    if (!(cf & CRAM_FLAG_PRESERVE_QUAL_SCORES)) {
+	memset(qual, 30, cr->len);
+    }
+
+    if (decode_md) {
+	orig_aux = BLOCK_SIZE(s->aux_blk);
+	BLOCK_APPEND(s->aux_blk, "MDZ", 3);
+    }
+    
+    if (!c->comp_hdr->FN_codec) return -1;
+    r |= c->comp_hdr->FN_codec->decode(s,c->comp_hdr->FN_codec, blk,
+				       (char *)&fn, &out_sz);
+
+    ref_pos--; // count from 0
+    cr->cigar = ncigar;
+    for (f = 0; f < fn; f++) {
+	int32_t pos;
+	char op;
+
+	if (ncigar+2 >= cigar_alloc) {
+	    cigar_alloc = cigar_alloc ? cigar_alloc*2 : 1024;
+	    s->cigar = cigar;
+	    if (!(cigar = realloc(cigar, cigar_alloc * sizeof(*cigar))))
+		return -1;
+	}
+
+	if (!c->comp_hdr->FC_codec) return -1;
+	r |= c->comp_hdr->FC_codec->decode(s, c->comp_hdr->FC_codec, blk,
+					   &op,  &out_sz);
+	if (!c->comp_hdr->FP_codec) return -1;
+	r |= c->comp_hdr->FP_codec->decode(s, c->comp_hdr->FP_codec, blk,
+					   (char *)&pos, &out_sz);
+	pos += prev_pos;
+
+	if (pos > seq_pos) {
+	    if (pos > cr->len+1)
+		return -1;
+
+	    if (s->ref && cr->ref_id >= 0) {
+		if (ref_pos + pos - seq_pos > bfd->ref[cr->ref_id].len) {
+		    static int whinged = 0;
+		    if (!whinged)
+			fprintf(stderr, "Ref pos outside of ref "
+				"sequence boundary\n");
+		    whinged = 1;
+		} else {
+		    memcpy(&seq[seq_pos-1], &s->ref[ref_pos - s->ref_start +1],
+			   pos - seq_pos);
+		}
+	    }
+#ifdef USE_X
+	    if (cig_len && cig_op != BAM_CBASE_MATCH) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    cig_op = BAM_CBASE_MATCH;
+#else
+	    if (cig_len && cig_op != BAM_CMATCH) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    cig_op = BAM_CMATCH;
+#endif
+	    cig_len += pos - seq_pos;
+	    ref_pos += pos - seq_pos;
+	    md_dist += pos - seq_pos;
+	    seq_pos = pos;
+	}
+
+	prev_pos = pos;
+
+	switch(op) {
+	case 'S': { // soft clip: IN
+	    int32_t out_sz2 = 1;
+
+	    if (cig_len) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    if (fd->version == CRAM_1_VERS) {
+		r |= c->comp_hdr->IN_codec
+		    ? c->comp_hdr->IN_codec->decode(s, c->comp_hdr->IN_codec,
+						    blk, &seq[pos-1], &out_sz2)
+		    : (seq[pos-1] = 'N', out_sz2 = 1, 0);
+	    } else {
+		r |= c->comp_hdr->SC_codec
+		    ? c->comp_hdr->SC_codec->decode(s, c->comp_hdr->SC_codec,
+						    blk, &seq[pos-1], &out_sz2)
+		    : (seq[pos-1] = 'N', out_sz2 = 1, 0);
+	    }
+	    cigar[ncigar++] = (out_sz2<<4) + BAM_CSOFT_CLIP;
+	    cig_op = BAM_CSOFT_CLIP;
+	    seq_pos += out_sz2;
+	    break;
+	}
+
+	case 'X': { // Substitution; BS
+	    unsigned char base;
+#ifdef USE_X
+	    if (cig_len && cig_op != BAM_CBASE_MISMATCH) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    if (!c->comp_hdr->BS_codec) return -1;
+	    r |= c->comp_hdr->BS_codec->decode(s, c->comp_hdr->BS_codec, blk,
+					       (char *)&base, &out_sz);
+	    seq[pos-1] = 'N'; // FIXME look up BS=base value
+	    cig_op = BAM_CBASE_MISMATCH;
+#else
+	    int ref_base;
+	    if (cig_len && cig_op != BAM_CMATCH) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    if (!c->comp_hdr->BS_codec) return -1;
+	    r |= c->comp_hdr->BS_codec->decode(s, c->comp_hdr->BS_codec, blk,
+					       (char *)&base, &out_sz);
+	    if (ref_pos >= bfd->ref[cr->ref_id].len || !s->ref) {
+		seq[pos-1] = 'N';
+	    } else {
+		ref_base = fd->L1[(uc)s->ref[ref_pos - s->ref_start +1]];
+		seq[pos-1] = c->comp_hdr->substitution_matrix[ref_base][base];
+		if (decode_md) {
+		    BLOCK_APPENDF_2(s->aux_blk, buf, "%d%c",
+				    md_dist, s->ref[ref_pos-s->ref_start +1]);
+		    md_dist = 0;
+		}
+	    }
+	    cig_op = BAM_CMATCH;
+#endif
+	    nm++;
+	    cig_len++;
+	    seq_pos++;
+	    ref_pos++;
+	    break;
+	}
+
+	case 'D': { // Deletion; DL
+	    if (cig_len && cig_op != BAM_CDEL) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    if (!c->comp_hdr->DL_codec) return -1;
+	    r |= c->comp_hdr->DL_codec->decode(s, c->comp_hdr->DL_codec, blk,
+					       (char *)&i32, &out_sz);
+	    if (decode_md) {
+		BLOCK_APPENDF_1(s->aux_blk, buf, "%d^", md_dist);
+		BLOCK_APPEND(s->aux_blk, &s->ref[ref_pos - s->ref_start +1],
+			     i32);
+		md_dist = 0;
+	    }
+	    cig_op = BAM_CDEL;
+	    cig_len += i32;
+	    ref_pos += i32;
+	    nm      += i32;
+	    //printf("  %d: DL = %d (ret %d)\n", f, i32, r);
+	    break;
+	}
+
+	case 'I': { // Insertion (several bases); IN
+	    int32_t out_sz2 = 1;
+
+	    if (cig_len && cig_op != BAM_CINS) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+
+	    if (!c->comp_hdr->IN_codec) return -1;
+	    r |= c->comp_hdr->IN_codec->decode(s, c->comp_hdr->IN_codec, blk,
+					       &seq[pos-1], &out_sz2);
+	    cig_op = BAM_CINS;
+	    cig_len += out_sz2;
+	    seq_pos += out_sz2;
+	    nm      += out_sz2;
+	    //printf("  %d: IN(I) = %.*s (ret %d, out_sz %d)\n", f, out_sz2, dat, r, out_sz2);
+	    break;
+	}
+
+	case 'i': { // Insertion (single base); BA
+	    if (cig_len && cig_op != BAM_CINS) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    if (!c->comp_hdr->BA_codec) return -1;
+	    r |= c->comp_hdr->BA_codec->decode(s, c->comp_hdr->BA_codec, blk,
+					       (char *)&seq[pos-1], &out_sz);
+	    cig_op = BAM_CINS;
+	    cig_len++;
+	    seq_pos++;
+	    nm++;
+	    //printf("  %d: BA = %c (ret %d)\n", f, seq[pos-1], r);
+	    break;
+	}
+
+	case 'B': { // Read base; BA, QS
+#ifdef USE_X
+	    if (cig_len && cig_op != BAM_CBASE_MISMATCH) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+#else
+	    if (cig_len && cig_op != BAM_CMATCH) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+#endif
+	    if (!c->comp_hdr->BA_codec) return -1;
+	    r |= c->comp_hdr->BA_codec->decode(s, c->comp_hdr->BA_codec, blk,
+					       (char *)&seq[pos-1], &out_sz);
+	    if (!c->comp_hdr->QS_codec) return -1;
+	    r |= c->comp_hdr->QS_codec->decode(s, c->comp_hdr->QS_codec, blk,
+					       (char *)&qual[pos-1], &out_sz);
+#ifdef USE_X
+	    cig_op = BAM_CBASE_MISMATCH;
+#else
+	    cig_op = BAM_CMATCH;
+#endif
+	    cig_len++;
+	    seq_pos++;
+	    ref_pos++;
+	    //printf("  %d: BA/QS(B) = %c/%d (ret %d)\n", f, i32, qc, r);
+	    break;
+	}
+
+	case 'Q': { // Quality score; QS
+	    if (!c->comp_hdr->QS_codec) return -1;
+	    r |= c->comp_hdr->QS_codec->decode(s, c->comp_hdr->QS_codec, blk,
+					       (char *)&qual[pos-1], &out_sz);
+	    //printf("  %d: QS = %d (ret %d)\n", f, qc, r);
+	    break;
+	}
+
+	case 'H': { // hard clip; HC
+	    if (cig_len && cig_op != BAM_CHARD_CLIP) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    if (!c->comp_hdr->HC_codec) return -1;
+	    r |= c->comp_hdr->HC_codec->decode(s, c->comp_hdr->HC_codec, blk,
+					       (char *)&i32, &out_sz);
+	    cig_op = BAM_CHARD_CLIP;
+	    cig_len += i32;
+	    nm      += i32;
+	    break;
+	}
+
+	case 'P': { // padding; PD
+	    if (cig_len && cig_op != BAM_CPAD) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    if (!c->comp_hdr->PD_codec) return -1;
+	    r |= c->comp_hdr->PD_codec->decode(s, c->comp_hdr->PD_codec, blk,
+					       (char *)&i32, &out_sz);
+	    cig_op = BAM_CPAD;
+	    cig_len += i32;
+	    nm      += i32;
+	    break;
+	}
+
+	case 'N': { // Ref skip; RS
+	    if (cig_len && cig_op != BAM_CREF_SKIP) {
+		cigar[ncigar++] = (cig_len<<4) + cig_op;
+		cig_len = 0;
+	    }
+	    if (!c->comp_hdr->RS_codec) return -1;
+	    r |= c->comp_hdr->RS_codec->decode(s, c->comp_hdr->RS_codec, blk,
+					       (char *)&i32, &out_sz);
+	    cig_op = BAM_CREF_SKIP;
+	    cig_len += i32;
+	    ref_pos += i32;
+	    nm      += i32;
+	    break;
+	}
+
+	default:
+	    abort();
+	}
+    }
+
+    /* An implement match op for any unaccounted for bases */
+    if (cr->len >= seq_pos) {
+	if (s->ref) {
+	    if (ref_pos + cr->len - seq_pos + 1 > bfd->ref[cr->ref_id].len) {
+		static int whinged = 0;
+		if (!whinged)
+		    fprintf(stderr, "Ref pos outside of ref sequence boundary\n");
+		whinged = 1;
+	    } else {
+		memcpy(&seq[seq_pos-1], &s->ref[ref_pos - s->ref_start +1],
+		       cr->len - seq_pos + 1);
+		ref_pos += cr->len - seq_pos + 1;
+		md_dist += cr->len - seq_pos + 1;
+	    }
+	}
+
+	if (ncigar+1 >= cigar_alloc) {
+	    cigar_alloc = cigar_alloc ? cigar_alloc*2 : 1024;
+	    s->cigar = cigar;
+	    if (!(cigar = realloc(cigar, cigar_alloc * sizeof(*cigar))))
+		return -1;
+	}
+#ifdef USE_X
+	if (cig_len && cig_op != BAM_CBASE_MATCH) {
+	    cigar[ncigar++] = (cig_len<<4) + cig_op;
+	    cig_len = 0;
+	}
+	cig_op = BAM_CBASE_MATCH;
+#else
+	if (cig_len && cig_op != BAM_CMATCH) {
+	    cigar[ncigar++] = (cig_len<<4) + cig_op;
+	    cig_len = 0;
+	}
+	cig_op = BAM_CMATCH;
+#endif
+	cig_len += cr->len - seq_pos+1;
+    }
+    if (decode_md) {
+	BLOCK_APPENDF_1(s->aux_blk, buf, "%d", md_dist);
+    }
+
+    if (cig_len) {
+	if (ncigar >= cigar_alloc) {
+	    cigar_alloc = cigar_alloc ? cigar_alloc*2 : 1024;
+	    s->cigar = cigar;
+	    if (!(cigar = realloc(cigar, cigar_alloc * sizeof(*cigar))))
+		return -1;
+	}
+
+	cigar[ncigar++] = (cig_len<<4) + cig_op;
+    }
+
+    cr->ncigar = ncigar - cr->cigar;
+    cr->aend = ref_pos;
+
+    //printf("2: %.*s %d .. %d\n", cr->name_len, DSTRING_STR(name_ds) + cr->name, cr->apos, ref_pos);
+
+    if (!c->comp_hdr->MQ_codec) return -1;
+    r |= c->comp_hdr->MQ_codec->decode(s, c->comp_hdr->MQ_codec, blk,
+				       (char *)&cr->mqual, &out_sz);
+
+    if (cf & CRAM_FLAG_PRESERVE_QUAL_SCORES) {
+	int32_t out_sz2 = cr->len;
+
+	if (!c->comp_hdr->Qs_codec) return -1;
+	r |= c->comp_hdr->Qs_codec->decode(s, c->comp_hdr->Qs_codec, blk,
+					   qual, &out_sz2);
+    }
+
+    s->cigar = cigar;
+    s->cigar_alloc = cigar_alloc;
+    s->ncigar = ncigar;
+
+    if (decode_md) {
+	char buf[7];
+	BLOCK_APPEND_CHAR(s->aux_blk, '\0'); // null terminate MD:Z:
+	cr->aux_size += BLOCK_SIZE(s->aux_blk) - orig_aux;
+	buf[0] = 'N'; buf[1] = 'M'; buf[2] = 'I';
+	buf[3] = (nm>> 0) & 0xff;
+	buf[4] = (nm>> 8) & 0xff;
+	buf[5] = (nm>>16) & 0xff;
+	buf[6] = (nm>>24) & 0xff;
+	BLOCK_APPEND(s->aux_blk, buf, 7);
+	cr->aux_size += 7;
+    }
+
+    return r;
+}
+
+/*
+ * Quick and simple hash lookup for cram_map arrays
+ */
+static cram_map *map_find(cram_map **map, unsigned char *key, int id) {
+    cram_map *m;
+
+    m = map[CRAM_MAP(key[0],key[1])];
+    while (m && m->key != id)
+	m= m->next;
+
+    return m;
+}
+
+//#define map_find(M,K,I) M[CRAM_MAP(K[0],K[1])];while (m && m->key != I);m= m->next
+
+
+static int cram_decode_aux_1_0(cram_container *c, cram_slice *s,
+			       cram_block *blk, cram_record *cr) {
+    int i, r = 0, out_sz = 1;
+    unsigned char ntags;
+	    
+    if (!c->comp_hdr->TC_codec) return -1;
+    r |= c->comp_hdr->TC_codec->decode(s, c->comp_hdr->TC_codec, blk,
+				       (char *)&ntags, &out_sz);
+    cr->ntags = ntags;
+
+    //printf("TC=%d\n", cr->ntags);
+    cr->aux_size = 0;
+    cr->aux = BLOCK_SIZE(s->aux_blk);
+
+    for (i = 0; i < cr->ntags; i++) {
+	int32_t id, out_sz = 1;
+	unsigned char tag_data[3];
+	cram_map *m;
+
+	//printf("Tag %d/%d\n", i+1, cr->ntags);
+	if (!c->comp_hdr->TN_codec) return -1;
+	r |= c->comp_hdr->TN_codec->decode(s, c->comp_hdr->TN_codec,
+					   blk, (char *)&id, &out_sz);
+	if (out_sz == 3) {
+	    tag_data[0] = ((char *)&id)[0];
+	    tag_data[1] = ((char *)&id)[1];
+	    tag_data[2] = ((char *)&id)[2];
+	} else {
+	    tag_data[0] = (id>>16) & 0xff;
+	    tag_data[1] = (id>>8)  & 0xff;
+	    tag_data[2] = id       & 0xff;
+	} 
+
+	m = map_find(c->comp_hdr->tag_encoding_map, tag_data, id);
+	if (!m)
+	    return -1;
+	BLOCK_APPEND(s->aux_blk, (char *)tag_data, 3);
+
+	if (!m->codec) return -1;
+	r |= m->codec->decode(s, m->codec, blk, (char *)s->aux_blk, &out_sz);
+
+	cr->aux_size += out_sz + 3;
+    }
+    
+    return r;
+}
+
+static int cram_decode_aux(cram_container *c, cram_slice *s,
+			   cram_block *blk, cram_record *cr) {
+    int i, r = 0, out_sz = 1;
+    int32_t TL;
+    unsigned char *TN;
+	    
+    if (!c->comp_hdr->TL_codec) return -1;
+    r |= c->comp_hdr->TL_codec->decode(s, c->comp_hdr->TL_codec, blk,
+				       (char *)&TL, &out_sz);
+    if (r || TL < 0 || TL >= c->comp_hdr->nTL)
+	return -1;
+
+    TN = c->comp_hdr->TL[TL];
+    cr->ntags = strlen((char *)TN)/3; // optimise to remove strlen
+
+    //printf("TC=%d\n", cr->ntags);
+    cr->aux_size = 0;
+    cr->aux = BLOCK_SIZE(s->aux_blk);
+
+    for (i = 0; i < cr->ntags; i++) {
+	int32_t id, out_sz = 1;
+	unsigned char tag_data[3];
+	cram_map *m;
+
+	//printf("Tag %d/%d\n", i+1, cr->ntags);
+	tag_data[0] = *TN++;
+	tag_data[1] = *TN++;
+	tag_data[2] = *TN++;
+	id = (tag_data[0]<<16) | (tag_data[1]<<8) | tag_data[2];
+
+	m = map_find(c->comp_hdr->tag_encoding_map, tag_data, id);
+	if (!m)
+	    return -1;
+	BLOCK_APPEND(s->aux_blk, (char *)tag_data, 3);
+
+	if (!m->codec) return -1;
+	r |= m->codec->decode(s, m->codec, blk, (char *)s->aux_blk, &out_sz);
+	cr->aux_size += out_sz + 3;
+    }
+    
+    return r;
+}
+
+/* Resolve mate pair cross-references between recs within this slice */
+static void cram_decode_slice_xref(cram_slice *s) {
+    int rec;
+
+    for (rec = 0; rec < s->hdr->num_records; rec++) {
+	cram_record *cr = &s->crecs[rec];
+
+	if (cr->mate_line >= 0) {
+	    if (cr->mate_line < s->hdr->num_records) {
+		/*
+		 * On the first read, loop through computing lengths.
+		 * It's not perfect as we have one slice per reference so we
+		 * cannot detect when TLEN should be zero due to seqs that
+		 * map to multiple references.
+		 *
+		 * We also cannot set tlen correct when it spans a slice for
+		 * other reasons. This may make tlen too small. Should we
+		 * fix this by forcing TLEN to be stored verbatim in such cases?
+		 *
+		 * Or do we just admit defeat and output 0 for tlen? It's the
+		 * safe option...
+		 */
+		if (cr->tlen == INT_MIN) {
+		    int id1 = rec, id2 = rec;
+		    int aleft = cr->apos, aright = cr->aend;
+		    int tlen;
+		    int ref = cr->ref_id;
+
+		    do {
+			if (aleft > s->crecs[id2].apos)
+			    aleft = s->crecs[id2].apos;
+			if (aright < s->crecs[id2].aend)
+			    aright = s->crecs[id2].aend;
+			if (s->crecs[id2].mate_line == -1) {
+			    s->crecs[id2].mate_line = rec;
+			    break;
+			}
+			assert(s->crecs[id2].mate_line > id2);
+			id2 = s->crecs[id2].mate_line;
+
+			if (s->crecs[id2].ref_id != ref)
+			    ref = -1;
+		    } while (id2 != id1);
+
+		    if (ref != -1) {
+			tlen = aright - aleft + 1;
+			id1 = id2 = rec;
+
+			/*
+			 * When we have two seqs with identical start and
+			 * end coordinates, set +/- tlen based on 1st/last
+			 * bit flags instead, as a tie breaker.
+			 */
+			if (s->crecs[id2].apos == aleft) {
+			    if (s->crecs[id2].aend != aright)
+				s->crecs[id2].tlen = tlen;
+			    else if (s->crecs[id2].flags & BAM_FREAD1)
+				s->crecs[id2].tlen = tlen;
+			    else
+				s->crecs[id2].tlen = -tlen;
+			} else {
+			    s->crecs[id2].tlen = -tlen;
+			}
+
+			id2 = s->crecs[id2].mate_line;
+			while (id2 != id1) {
+			    if (s->crecs[id2].apos == aleft) {
+				if (s->crecs[id2].aend != aright)
+				    s->crecs[id2].tlen = tlen;
+				else if (s->crecs[id2].flags & BAM_FREAD1)
+				    s->crecs[id2].tlen = tlen;
+				else
+				    s->crecs[id2].tlen = -tlen;
+			    } else {
+				s->crecs[id2].tlen = -tlen;
+			    }
+			    id2 = s->crecs[id2].mate_line;
+			}
+		    } else {
+			id1 = id2 = rec;
+
+			s->crecs[id2].tlen = 0;
+			id2 = s->crecs[id2].mate_line;
+			while (id2 != id1) {
+			    s->crecs[id2].tlen = 0;
+			    id2 = s->crecs[id2].mate_line;
+			}
+		    }
+		}
+
+		cr->mate_pos = s->crecs[cr->mate_line].apos;
+		cr->mate_ref_id = s->crecs[cr->mate_line].ref_id;
+
+		// paired
+		cr->flags |= BAM_FPAIRED;
+
+		// set mate unmapped if needed
+		if (s->crecs[cr->mate_line].flags & BAM_FUNMAP) {
+		    cr->flags |= BAM_FMUNMAP;
+		    cr->tlen = 0;
+		}
+		if (cr->flags & BAM_FUNMAP) {
+		    cr->tlen = 0;
+		}
+
+		// set mate reversed if needed
+		if (s->crecs[cr->mate_line].flags & BAM_FREVERSE)
+		    cr->flags |= BAM_FMREVERSE;
+	    } else {
+		fprintf(stderr, "Mate line out of bounds: %d vs [0, %d]\n",
+			cr->mate_line, s->hdr->num_records-1);
+	    }
+
+	    /* FIXME: construct read names here too if needed */
+	} else {
+	    if (cr->mate_flags & CRAM_M_REVERSE) {
+		cr->flags |= BAM_FPAIRED | BAM_FMREVERSE;
+	    }
+	    if (cr->mate_flags & CRAM_M_UNMAP) {
+		cr->flags |= BAM_FMUNMAP;
+		//cr->mate_ref_id = -1;
+	    }
+	    if (!(cr->flags & BAM_FPAIRED))
+		cr->mate_ref_id = -1;
+	}
+
+	if (cr->tlen == INT_MIN)
+	    cr->tlen = 0; // Just incase
+    }    
+}
+
+static char *md5_print(unsigned char *md5, char *out) {
+    int i;
+    for (i = 0; i < 16; i++) {
+	out[i*2+0] = "0123456789abcdef"[md5[i]>>4];
+	out[i*2+1] = "0123456789abcdef"[md5[i]&15];
+    }
+    out[32] = 0;
+
+    return out;
+}
+
+/*
+ * Decode an entire slice from container blocks. Fills out s->crecs[] array.
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_decode_slice(cram_fd *fd, cram_container *c, cram_slice *s,
+		      SAM_hdr *bfd) {
+    cram_block *blk = s->block[0];
+    int32_t bf, ref_id;
+    unsigned char cf;
+    int out_sz, r = 0;
+    int rec;
+    char *seq, *qual;
+    int unknown_rg = -1;
+    int id, embed_ref;
+    char **refs = NULL;
+
+    for (id = 0; id < s->hdr->num_blocks; id++) {
+	if (cram_uncompress_block(s->block[id]))
+	    return -1;
+    }
+
+    blk->bit = 7; // MSB first
+
+    /* Look for unknown RG, added as last by Java CRAM? */
+    if (bfd->nrg > 0 &&
+	!strcmp(bfd->rg[bfd->nrg-1].name, "UNKNOWN"))
+	unknown_rg = bfd->nrg-1;
+
+    if (blk->content_type != CORE)
+	return -1;
+
+    if (s->crecs)
+	free(s->crecs);
+    if (!(s->crecs = malloc(s->hdr->num_records * sizeof(*s->crecs))))
+	return -1;
+
+    ref_id = s->hdr->ref_seq_id;
+    embed_ref = s->hdr->ref_base_id >= 0 ? 1 : 0;
+
+    if (ref_id >= 0) {
+	if (embed_ref) {
+	    cram_block *b;
+	    if (s->hdr->ref_base_id < 0) {
+		fprintf(stderr, "No reference specified and "
+			"no embedded reference is available.\n");
+		return -1;
+	    }
+	    if (!s->block_by_id ||
+		!(b = s->block_by_id[s->hdr->ref_base_id]))
+		return -1;
+	    s->ref = (char *)BLOCK_DATA(b);
+	    s->ref_start = s->hdr->ref_seq_start;
+	    s->ref_end   = s->hdr->ref_seq_start + s->hdr->ref_seq_span-1;
+	} else if (!fd->no_ref) {
+	    //// Avoid Java cramtools bug by loading entire reference seq 
+	    //s->ref = cram_get_ref(fd, s->hdr->ref_seq_id, 1, 0);
+	    //s->ref_start = 1;
+
+	    s->ref =
+	       cram_get_ref(fd, s->hdr->ref_seq_id,
+	                    s->hdr->ref_seq_start,
+			    s->hdr->ref_seq_start + s->hdr->ref_seq_span -1);
+	    s->ref_start = s->hdr->ref_seq_start;
+	    s->ref_end   = s->hdr->ref_seq_start + s->hdr->ref_seq_span-1;
+
+	    /* Sanity check */
+	    if (s->ref_start < 0) {
+		fprintf(stderr, "Slice starts before base 1.\n");
+		s->ref_start = 0;
+	    }
+	    pthread_mutex_lock(&fd->ref_lock);
+	    pthread_mutex_lock(&fd->refs->lock);
+	    if (s->ref_end > fd->refs->ref_id[ref_id]->length) {
+		fprintf(stderr, "Slice ends beyond reference end.\n");
+		s->ref_end = fd->refs->ref_id[ref_id]->length;
+	    }
+	    pthread_mutex_unlock(&fd->refs->lock);
+	    pthread_mutex_unlock(&fd->ref_lock);
+	}
+    }
+
+    if (s->ref == NULL && s->hdr->ref_seq_id >= 0 && !fd->no_ref) {
+	fprintf(stderr, "Unable to fetch reference #%d %d..%d\n",
+		s->hdr->ref_seq_id, s->hdr->ref_seq_start,
+		s->hdr->ref_seq_start + s->hdr->ref_seq_span-1);
+	return -1;
+    }
+
+    if (fd->version != CRAM_1_VERS && s->hdr->ref_seq_id >= 0
+	&& !fd->ignore_md5
+	&& memcmp(s->hdr->md5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16)) {
+	MD5_CTX md5;
+	unsigned char digest[16];
+
+	if (s->ref && s->hdr->ref_seq_id >= 0) {
+	    int start, len;
+
+	    if (s->hdr->ref_seq_start >= s->ref_start) {
+		start = s->hdr->ref_seq_start - s->ref_start;
+	    } else {
+		fprintf(stderr, "Slice starts before base 1.\n");
+		start = 0;
+	    }
+
+	    if (s->hdr->ref_seq_span <= s->ref_end - s->ref_start + 1) {
+		len = s->hdr->ref_seq_span;
+	    } else {
+		fprintf(stderr, "Slice ends beyond reference end.\n");
+		len = s->ref_end - s->ref_start + 1;
+	    }
+
+	    MD5_Init(&md5);
+	    if (start + len > s->ref_end - s->ref_start + 1)
+		len = s->ref_end - s->ref_start + 1 - start;
+	    if (len >= 0)
+		MD5_Update(&md5, s->ref + start, len);
+	    MD5_Final(digest, &md5);
+	} else if (!s->ref && s->hdr->ref_base_id >= 0) {
+	    cram_block *b;
+	    if (s->block_by_id && (b = s->block_by_id[s->hdr->ref_base_id])) {
+		MD5_Init(&md5);
+		MD5_Update(&md5, b->data, b->uncomp_size);
+		MD5_Final(digest, &md5);
+	    }
+	}
+
+	if ((!s->ref && s->hdr->ref_base_id < 0)
+	    || memcmp(digest, s->hdr->md5, 16) != 0) {
+	    char M[33];
+	    fprintf(stderr, "ERROR: md5sum reference mismatch for ref "
+		    "%d pos %d..%d\n", ref_id, s->ref_start, s->ref_end);
+	    fprintf(stderr, "CRAM: %s\n", md5_print(s->hdr->md5, M));
+	    fprintf(stderr, "Ref : %s\n", md5_print(digest, M));
+	    return -1;
+	}
+    }
+
+    if (ref_id == -2) {
+	pthread_mutex_lock(&fd->ref_lock);
+	pthread_mutex_lock(&fd->refs->lock);
+	refs = calloc(fd->refs->nref, sizeof(char *));
+	pthread_mutex_unlock(&fd->refs->lock);
+	pthread_mutex_unlock(&fd->ref_lock);
+	if (!refs)
+	    return -1;
+    }
+
+    for (rec = 0; rec < s->hdr->num_records; rec++) {
+	cram_record *cr = &s->crecs[rec];
+
+	//fprintf(stderr, "Decode seq %d, %d/%d\n", rec, blk->byte, blk->bit);
+
+	cr->s = s;
+
+	out_sz = 1; /* decode 1 item */
+	if (!c->comp_hdr->BF_codec) return -1;
+	r |= c->comp_hdr->BF_codec->decode(s, c->comp_hdr->BF_codec, blk,
+					   (char *)&bf, &out_sz);
+	if (bf < 0 ||
+	    bf >= sizeof(fd->bam_flag_swap)/sizeof(*fd->bam_flag_swap))
+	    return -1;
+	bf = fd->bam_flag_swap[bf];
+	cr->flags = bf;
+
+	if (fd->version == CRAM_1_VERS) {
+	    /* CF is byte in 1.0, int32 in 2.0 */
+	    if (!c->comp_hdr->CF_codec) return -1;
+	    r |= c->comp_hdr->CF_codec->decode(s, c->comp_hdr->CF_codec, blk,
+					       (char *)&cf, &out_sz);
+	    cr->cram_flags = cf;
+	} else {
+	    if (!c->comp_hdr->CF_codec) return -1;
+	    r |= c->comp_hdr->CF_codec->decode(s, c->comp_hdr->CF_codec, blk,
+					       (char *)&cr->cram_flags,
+					       &out_sz);
+	    cf = cr->cram_flags;
+	}
+
+	if (fd->version != CRAM_1_VERS && ref_id == -2) {
+	    if (!c->comp_hdr->RI_codec) return -1;
+	    r |= c->comp_hdr->RI_codec->decode(s, c->comp_hdr->RI_codec, blk,
+					       (char *)&cr->ref_id, &out_sz);
+	    if (cr->ref_id >= 0) {
+		if (!fd->no_ref) {
+		    if (!refs[cr->ref_id])
+			refs[cr->ref_id] = cram_get_ref(fd, cr->ref_id, 1, 0);
+		    s->ref = refs[cr->ref_id];
+		}
+		s->ref_start = 1;
+		pthread_mutex_lock(&fd->ref_lock);
+		pthread_mutex_lock(&fd->refs->lock);
+		s->ref_end = fd->refs->ref_id[cr->ref_id]->length;
+		pthread_mutex_unlock(&fd->refs->lock);
+		pthread_mutex_unlock(&fd->ref_lock);
+	    }
+	} else {
+	    cr->ref_id = ref_id; // Forced constant in CRAM 1.0
+	}
+
+
+	if (!c->comp_hdr->RL_codec) return -1;
+	r |= c->comp_hdr->RL_codec->decode(s, c->comp_hdr->RL_codec, blk,
+					   (char *)&cr->len, &out_sz);
+
+	if (!c->comp_hdr->AP_codec) return -1;
+	r |= c->comp_hdr->AP_codec->decode(s, c->comp_hdr->AP_codec, blk,
+					   (char *)&cr->apos, &out_sz);
+	if (c->comp_hdr->AP_delta)
+	    cr->apos += s->last_apos;
+	s->last_apos=  cr->apos;
+		    
+	if (!c->comp_hdr->RG_codec) return -1;
+	r |= c->comp_hdr->RG_codec->decode(s, c->comp_hdr->RG_codec, blk,
+					   (char *)&cr->rg, &out_sz);
+	if (cr->rg == unknown_rg)
+	    cr->rg = -1;
+
+	cr->name_len = 0;
+
+	if (c->comp_hdr->read_names_included) {
+	    int32_t out_sz2 = 1;
+
+	    // Read directly into name cram_block
+	    cr->name = BLOCK_SIZE(s->name_blk);
+	    if (!c->comp_hdr->RN_codec) return -1;
+	    r |= c->comp_hdr->RN_codec->decode(s, c->comp_hdr->RN_codec, blk,
+					       (char *)s->name_blk, &out_sz2);
+	    cr->name_len = out_sz2;
+	}
+
+	cr->mate_line = -1;
+	cr->mate_ref_id = -1;
+	if (cf & CRAM_FLAG_DETACHED) {
+	    if (fd->version == CRAM_1_VERS) {
+		/* MF is byte in 1.0, int32 in 2.0 */
+		unsigned char mf;
+		if (!c->comp_hdr->MF_codec) return -1;
+		r |= c->comp_hdr->MF_codec->decode(s, c->comp_hdr->MF_codec,
+						   blk, (char *)&mf, &out_sz);
+		cr->mate_flags = mf;
+	    } else {
+		if (!c->comp_hdr->MF_codec) return -1;
+		r |= c->comp_hdr->MF_codec->decode(s, c->comp_hdr->MF_codec,
+						   blk,
+						   (char *)&cr->mate_flags,
+						   &out_sz);
+	    }
+
+	    if (!c->comp_hdr->read_names_included) {
+		int32_t out_sz2 = 1;
+	    
+		// Read directly into name cram_block
+		cr->name = BLOCK_SIZE(s->name_blk);
+		if (!c->comp_hdr->RN_codec) return -1;
+		r |= c->comp_hdr->RN_codec->decode(s, c->comp_hdr->RN_codec,
+						   blk, (char *)s->name_blk,
+						   &out_sz2);
+		cr->name_len = out_sz2;
+	    }
+		    
+	    if (!c->comp_hdr->NS_codec) return -1;
+	    r |= c->comp_hdr->NS_codec->decode(s, c->comp_hdr->NS_codec, blk,
+					       (char *)&cr->mate_ref_id, &out_sz);
+
+// Skip as mate_ref of "*" is legit. It doesn't mean unmapped, just unknown.
+//	    if (cr->mate_ref_id == -1 && cr->flags & 0x01) {
+//		/* Paired, but unmapped */
+//		cr->flags |= BAM_FMUNMAP;
+//	    }
+
+	    if (!c->comp_hdr->NP_codec) return -1;
+	    r |= c->comp_hdr->NP_codec->decode(s, c->comp_hdr->NP_codec, blk,
+					       (char *)&cr->mate_pos, &out_sz);
+	    if (!c->comp_hdr->TS_codec) return -1;
+	    r |= c->comp_hdr->TS_codec->decode(s, c->comp_hdr->TS_codec, blk,
+					       (char *)&cr->tlen, &out_sz);
+	} else if (cf & CRAM_FLAG_MATE_DOWNSTREAM) {
+	    if (!c->comp_hdr->NF_codec) return -1;
+	    r |= c->comp_hdr->NF_codec->decode(s, c->comp_hdr->NF_codec, blk,
+					       (char *)&cr->mate_line, &out_sz);
+	    cr->mate_line += rec + 1;
+
+	    //cr->name_len = sprintf(name, "%d", name_id++);
+	    //cr->name = DSTRING_LEN(name_ds);
+	    //dstring_nappend(name_ds, name, cr->name_len);
+
+	    cr->mate_ref_id = -1;
+	    cr->tlen = INT_MIN;
+	    cr->mate_pos = 0;
+	} else {
+	    cr->mate_flags = 0;
+	    cr->tlen = INT_MIN;
+	}
+	/*
+	else if (!name[0]) {
+	    //name[0] = '?'; name[1] = 0;
+	    //cr->name_len = 1;
+	    //cr->name=  DSTRING_LEN(s->name_ds);
+	    //dstring_nappend(s->name_ds, "?", 1);
+
+	    cr->mate_ref_id = -1;
+	    cr->tlen = 0;
+	    cr->mate_pos = 0;
+	}
+	*/
+
+	/* Auxiliary tags */
+	if (fd->version == CRAM_1_VERS)
+	    r |= cram_decode_aux_1_0(c, s, blk, cr);
+	else
+	    r |= cram_decode_aux(c, s, blk, cr);
+
+	/* Fake up dynamic string growth and appending */
+	cr->seq = BLOCK_SIZE(s->seqs_blk);
+	BLOCK_GROW(s->seqs_blk, cr->len);
+	seq = (char *)BLOCK_END(s->seqs_blk);
+	BLOCK_SIZE(s->seqs_blk) += cr->len;
+
+	if (!seq)
+	    return -1;
+	
+	cr->qual = BLOCK_SIZE(s->qual_blk);
+	BLOCK_GROW(s->qual_blk, cr->len);
+	qual = (char *)BLOCK_END(s->qual_blk);
+	BLOCK_SIZE(s->qual_blk) += cr->len;
+
+	if (!s->ref)
+	    memset(seq, '=', cr->len);
+
+	if (!(bf & BAM_FUNMAP)) {
+	    /* Decode sequence and generate CIGAR */
+	    r |= cram_decode_seq(fd, c, s, blk, cr, bfd, cf, seq, qual);
+	} else {
+	    int out_sz2 = cr->len;
+
+	    //puts("Unmapped");
+	    cr->cigar = 0;
+	    cr->ncigar = 0;
+	    cr->aend = cr->apos;
+	    cr->mqual = 0;
+
+	    if (!c->comp_hdr->BA_codec) return -1;
+	    r |= c->comp_hdr->BA_codec->decode(s, c->comp_hdr->BA_codec, blk,
+					       (char *)seq, &out_sz2);
+
+	    if (cf & CRAM_FLAG_PRESERVE_QUAL_SCORES) {
+		out_sz2 = cr->len;
+		if (!c->comp_hdr->Qs_codec) return -1;
+		r |= c->comp_hdr->Qs_codec->decode(s, c->comp_hdr->Qs_codec,
+						   blk, qual, &out_sz2);
+	    } else {
+		memset(qual, 30, cr->len);
+	    }
+	}
+    }
+
+    pthread_mutex_lock(&fd->ref_lock);
+    if (refs) {
+	int i;
+	for (i = 0; i < fd->refs->nref; i++) {
+	    if (refs[i])
+		cram_ref_decr(fd->refs, i);
+	}
+	free(refs);
+    } else if (ref_id >= 0 && s->ref != fd->ref_free) {
+	cram_ref_decr(fd->refs, ref_id);
+    }
+    pthread_mutex_unlock(&fd->ref_lock);
+
+    /* Resolve mate pair cross-references between recs within this slice */
+    cram_decode_slice_xref(s);
+
+    return r;
+}
+
+typedef struct {
+    cram_fd *fd;
+    cram_container *c;
+    cram_slice *s;
+    SAM_hdr *h;
+    int exit_code;
+} cram_decode_job;
+
+void *cram_decode_slice_thread(void *arg) {
+    cram_decode_job *j = (cram_decode_job *)arg;
+
+    j->exit_code = cram_decode_slice(j->fd, j->c, j->s, j->h);
+
+    return j;
+}
+
+/*
+ * Spawn a multi-threaded version of cram_decode_slice().
+ */
+int cram_decode_slice_mt(cram_fd *fd, cram_container *c, cram_slice *s,
+			 SAM_hdr *bfd) {
+    cram_decode_job *j;
+    int nonblock;
+
+    if (!fd->pool)
+	return cram_decode_slice(fd, c, s, bfd);
+
+    if (!(j = malloc(sizeof(*j))))
+	return -1;
+
+    j->fd = fd;
+    j->c  = c;
+    j->s  = s;
+    j->h  = bfd;
+    
+    nonblock = t_pool_results_queue_len(fd->rqueue) ? 0 : 1;
+
+    if (-1 == t_pool_dispatch2(fd->pool, fd->rqueue, cram_decode_slice_thread,
+			       j, nonblock)) {
+	/* Would block */
+	fd->job_pending = j;
+    } else {
+	fd->job_pending = NULL;
+    }
+
+    // flush too
+    return 0;
+}
+
+
+/* ----------------------------------------------------------------------
+ * CRAM sequence iterators.
+ */
+
+/*
+ * Converts a cram in-memory record into a bam in-memory record. We
+ * pass a pointer to a bam_seq_t pointer along with the a pointer to
+ * the allocated size. These can initially be pointers to NULL and zero.
+ *
+ * This function will reallocate the bam buffer as required and update
+ * (*bam)->alloc accordingly, allowing it to be used within a loop
+ * efficiently without needing to allocate new bam objects over and
+ * over again.
+ *
+ * Returns the used size of the bam record on success
+ *         -1 on failure.
+ */
+static int cram_to_bam(SAM_hdr *bfd, cram_fd *fd, cram_slice *s,
+		       cram_record *cr, int rec, bam_seq_t **bam) {
+    int bam_idx, rg_len;
+    char name_a[1024], *name;
+    int name_len;
+    char *aux, *aux_orig;
+
+    /* Assign names if not explicitly set */
+    if (cr->name_len) {
+	name = (char *)BLOCK_DATA(s->name_blk) + cr->name;
+	name_len = cr->name_len;
+    } else {
+	// FIXME: add prefix, container number, slice number, etc
+	name = name_a;
+
+	if (cr->mate_line >= 0 && cr->mate_line < rec)
+	    name_len = sprintf(name_a, "%s:%"PRId64":%d",
+			       fd->prefix, s->id, cr->mate_line);
+	else
+	    name_len = sprintf(name_a, "%s:%"PRId64":%d",
+			       fd->prefix, s->id, rec);
+    }
+
+    /* Generate BAM record */
+    if (cr->rg < -1 || cr->rg >= bfd->nrg)
+	return -1;
+    rg_len = (cr->rg != -1) ? bfd->rg[cr->rg].name_len + 4 : 0;
+
+    if (!BLOCK_DATA(s->seqs_blk))
+	return -1;
+    if (!BLOCK_DATA(s->qual_blk))
+	return -1;
+
+    bam_idx = bam_construct_seq(bam, cr->aux_size + rg_len,
+				name, name_len,
+				cr->flags,
+				cr->ref_id,
+				cr->apos,
+				cr->aend,
+				cr->mqual,
+				cr->ncigar, &s->cigar[cr->cigar],
+				cr->mate_ref_id,
+				cr->mate_pos,
+				cr->tlen,
+				cr->len,
+                                (char *)BLOCK_DATA(s->seqs_blk) + cr->seq,
+				(char *)BLOCK_DATA(s->qual_blk) + cr->qual);
+    if (bam_idx == -1)
+	return -1;
+
+    aux = aux_orig = (char *)bam_aux(*bam);
+
+    /* Auxiliary strings */
+    if (cr->aux_size != 0) {
+	memcpy(aux, BLOCK_DATA(s->aux_blk) + cr->aux, cr->aux_size);
+	aux += cr->aux_size;
+    }
+
+    /* RG:Z: */
+    if (cr->rg != -1) {
+	int len = bfd->rg[cr->rg].name_len;
+	*aux++ = 'R'; *aux++ = 'G'; *aux++ = 'Z';
+	memcpy(aux, bfd->rg[cr->rg].name, len);
+	aux += len;
+	*aux++ = 0;
+    }
+    
+#ifndef SAMTOOLS
+    bam_set_blk_size(*bam, bam_blk_size(*bam) + (aux - aux_orig));
+#endif
+
+    *aux++ = 0;
+
+    return bam_idx + (aux - aux_orig);
+}
+
+/*
+ * Here be dragons! The multi-threading code in this is crufty beyond belief.
+ */
+static cram_slice *cram_next_slice(cram_fd *fd, cram_container **cp) {
+    cram_container *c;
+    cram_slice *s = NULL;
+
+    fd->eof = 0;
+
+    if (!(c = fd->ctr)) {
+	// Load first container.
+	do {
+	    if (!(c = fd->ctr = cram_read_container(fd)))
+		return NULL;
+	} while (c->length == 0);
+
+	/*
+	 * The first container may be a result of a sub-range query.
+	 * In which case it may still not be the optimal starting point
+	 * due to skipped containers/slices in the index. 
+	 */
+	if (fd->range.refid != -2) {
+	    while (c->ref_seq_id != -2 &&
+		   (c->ref_seq_id < fd->range.refid ||
+		    c->ref_seq_start + c->ref_seq_span-1 < fd->range.start)) {
+		if (0 != cram_seek(fd, c->length, SEEK_CUR))
+		    return NULL;
+		cram_free_container(fd->ctr);
+		do {
+		    if (!(c = fd->ctr = cram_read_container(fd)))
+			return NULL;
+		} while (c->length == 0);
+	    }
+
+	    if (c->ref_seq_id != -2 && c->ref_seq_id != fd->range.refid)
+		return NULL;
+	}
+
+	if (!(c->comp_hdr_block = cram_read_block(fd)))
+	    return NULL;
+	if (c->comp_hdr_block->content_type != COMPRESSION_HEADER)
+	    return NULL;
+
+	c->comp_hdr = cram_decode_compression_header(fd, c->comp_hdr_block);
+	if (!c->comp_hdr)
+	    return NULL;
+	if (!c->comp_hdr->AP_delta) {
+	    pthread_mutex_lock(&fd->ref_lock);
+	    fd->unsorted = 1;
+	    pthread_mutex_unlock(&fd->ref_lock);
+	}
+    }
+
+    if ((s = c->slice))
+	cram_free_slice(s);
+
+    if (c->curr_slice == c->max_slice) {
+	cram_free_container(c);
+	c = NULL;
+    }
+
+    /* Sorry this is so contorted! */
+    for (;;) {
+	if (fd->job_pending) {
+	    cram_decode_job *j = (cram_decode_job *)fd->job_pending;
+	    c = j->c;
+	    s = j->s;
+	    free(fd->job_pending);
+	    fd->job_pending = NULL;
+	} else if (!fd->ooc) {
+	empty_container:
+	    if (!c || c->curr_slice == c->max_slice) {
+		// new container
+		do {
+		    if (!(c = fd->ctr = cram_read_container(fd))) {
+			if (fd->pool) {
+			    fd->ooc = 1;
+			    break;
+			}
+
+			return NULL;
+		    }
+		} while (c->length == 0);
+		if (fd->ooc)
+		    break;
+
+		/* Skip containers not yet spanning our range */
+		if (fd->range.refid != -2 && c->ref_seq_id != -2) {
+		    if (c->ref_seq_id != fd->range.refid) {
+			fd->eof = 1;
+			return NULL;
+		    }
+
+		    if (c->ref_seq_start > fd->range.end) {
+			fd->eof = 1;
+			return NULL;
+		    }
+
+		    if (c->ref_seq_start + c->ref_seq_span-1 <
+			fd->range.start) {
+			c->curr_rec = c->max_rec;
+			c->curr_slice = c->max_slice;
+			cram_seek(fd, c->length, SEEK_CUR);
+			cram_free_container(c);
+			c = NULL;
+			continue;
+		    }
+		}
+
+		if (!(c->comp_hdr_block = cram_read_block(fd)))
+		    return NULL;
+		if (c->comp_hdr_block->content_type != COMPRESSION_HEADER)
+		    return NULL;
+
+		c->comp_hdr =
+		    cram_decode_compression_header(fd, c->comp_hdr_block);
+		if (!c->comp_hdr)
+		    return NULL;
+
+		if (!c->comp_hdr->AP_delta) {
+		    pthread_mutex_lock(&fd->ref_lock);
+		    fd->unsorted = 1;
+		    pthread_mutex_unlock(&fd->ref_lock);
+		}
+	    }
+
+	    if (c->num_records == 0) {
+		cram_free_container(c); c = NULL;
+		goto empty_container;
+	    }
+
+
+	    if (!(s = c->slice = cram_read_slice(fd)))
+		return NULL;
+	    c->curr_slice++;
+	    c->curr_rec = 0;
+	    c->max_rec = s->hdr->num_records;
+
+	    s->last_apos = s->hdr->ref_seq_start;
+	    
+	    /* Skip slices not yet spanning our range */
+	    if (fd->range.refid != -2 && s->hdr->ref_seq_id != -2) {
+		if (s->hdr->ref_seq_id != fd->range.refid) {
+		    fd->eof = 1;
+		    cram_free_slice(s);
+		    c->slice = NULL;
+		    return NULL;
+		}
+
+		if (s->hdr->ref_seq_start > fd->range.end) {
+		    fd->eof = 1;
+		    cram_free_slice(s);
+		    c->slice = NULL;
+		    return NULL;
+		}
+
+		if (s->hdr->ref_seq_start + s->hdr->ref_seq_span-1 <
+		    fd->range.start) {
+		    cram_free_slice(s);
+		    c->slice = NULL;
+		    cram_free_container(c);
+		    c = NULL;
+		    continue;
+		}
+	    }
+	}
+
+	/* Test decoding of 1st seq */
+	if (!c || !s)
+	    break;
+
+	if (cram_decode_slice_mt(fd, c, s, fd->header) != 0) {
+	    //	if (cram_decode_slice(fd, c, s, fd->header) != 0) {
+	    fprintf(stderr, "Failure to decode slice\n");
+	    cram_free_slice(s);
+	    c->slice = NULL;
+	    return NULL;
+	}
+
+	if (!fd->pool || fd->job_pending)
+	    break;
+
+	if (t_pool_results_queue_sz(fd->rqueue) > fd->pool->qsize)
+	    break;
+    }
+
+    if (fd->pool) {
+	t_pool_result *res;
+	cram_decode_job *j;
+	
+//	fprintf(stderr, "Thread pool len = %d, %d\n",
+//		t_pool_results_queue_len(fd->rqueue),
+//		t_pool_results_queue_sz(fd->rqueue));
+
+	if (fd->ooc && t_pool_results_queue_empty(fd->rqueue))
+	    return NULL;
+
+	res = t_pool_next_result_wait(fd->rqueue);
+
+	if (!res || !res->data) {
+	    fprintf(stderr, "t_pool_next_result failure\n");
+	    return NULL;
+	}
+
+	j = (cram_decode_job *)res->data;
+	c = j->c;
+	s = j->s;
+
+	t_pool_delete_result(res, 1);
+    }
+
+    *cp = c;
+    return s;
+}
+
+/*
+ * Read the next cram record and return it.
+ * Note that to decode cram_record the caller will need to look up some data
+ * in the current slice, pointed to by fd->ctr->slice. This is valid until
+ * the next call to cram_get_seq (which may invalidate it).
+ *
+ * Returns record pointer on success (do not free)
+ *        NULL on failure
+ */
+cram_record *cram_get_seq(cram_fd *fd) {
+    cram_container *c;
+    cram_slice *s;
+
+    for (;;) {
+	c = fd->ctr;
+	if (c && c->slice && c->curr_rec < c->max_rec) {
+	    s = c->slice;
+	} else {
+	    if (!(s = cram_next_slice(fd, &c)))
+		return NULL;
+	}
+
+	if (fd->range.refid != -2) {
+	    if (s->crecs[c->curr_rec].ref_id < fd->range.refid) {
+		c->curr_rec++;
+		continue;
+	    }
+
+	    if (s->crecs[c->curr_rec].ref_id != fd->range.refid) {
+		fd->eof = 1;
+		cram_free_slice(s);
+		c->slice = NULL;
+		return NULL;
+	    }
+
+	    if (s->crecs[c->curr_rec].apos > fd->range.end) {
+		fd->eof = 1;
+		cram_free_slice(s);
+		c->slice = NULL;
+		return NULL;
+	    }
+
+	    if (s->crecs[c->curr_rec].aend < fd->range.start) {
+		c->curr_rec++;
+		continue;
+	    }
+	}
+
+	break;
+    }
+
+    fd->ctr = c;
+    c->slice = s;
+    return &s->crecs[c->curr_rec++];
+}
+
+/*
+ * Read the next cram record and convert it to a bam_seq_t struct.
+ *
+ * Returns 0 on success
+ *        -1 on EOF or failure (check fd->err)
+ */
+int cram_get_bam_seq(cram_fd *fd, bam_seq_t **bam) {
+    cram_record *cr;
+    cram_container *c;
+    cram_slice *s;
+
+    if (!(cr = cram_get_seq(fd)))
+	return -1;
+
+    c = fd->ctr;
+    s = c->slice;
+
+    return cram_to_bam(fd->header, fd, s, cr, c->curr_rec-1, bam);
+}
diff --git a/htslib/cram/cram_decode.h b/htslib/cram/cram_decode.h
new file mode 100644
index 0000000..64b188e
--- /dev/null
+++ b/htslib/cram/cram_decode.h
@@ -0,0 +1,112 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*! \file
+ * Include cram.h instead.
+ *
+ * This is an internal part of the CRAM system and is automatically included
+ * when you #include cram.h.
+ *
+ * Implements the decoding portion of CRAM I/O. Also see
+ * cram_codecs.[ch] for the actual encoding functions themselves.
+ */
+
+#ifndef _CRAM_READ_H_
+#define _CRAM_READ_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ----------------------------------------------------------------------
+ * CRAM sequence iterators.
+ */
+
+/*! Read the next cram record and return it as a cram_record.
+ *
+ * Note that to decode cram_record the caller will need to look up some data
+ * in the current slice, pointed to by fd->ctr->slice. This is valid until
+ * the next call to cram_get_seq (which may invalidate it).
+ *
+ * @return
+ * Returns record pointer on success (do not free);
+ *        NULL on failure
+ */
+cram_record *cram_get_seq(cram_fd *fd);
+
+/*! Read the next cram record and convert it to a bam_seq_t struct.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on EOF or failure (check fd->err)
+ */
+int cram_get_bam_seq(cram_fd *fd, bam_seq_t **bam);
+
+
+/* ----------------------------------------------------------------------
+ * Internal functions
+ */
+
+/*! INTERNAL:
+ * Decodes a CRAM block compression header.
+ *
+ * @return
+ * Returns header ptr on success;
+ *         NULL on failure
+ */
+cram_block_compression_hdr *cram_decode_compression_header(cram_fd *fd,
+							   cram_block *b);
+
+/*! INTERNAL:
+ * Decodes a CRAM (un)mapped slice header block.
+ *
+ * @return
+ * Returns slice header ptr on success;
+ *         NULL on failure
+ */
+cram_block_slice_hdr *cram_decode_slice_header(cram_fd *fd, cram_block *b);
+
+
+/*! INTERNAL:
+ * Decode an entire slice from container blocks. Fills out s->crecs[] array.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_decode_slice(cram_fd *fd, cram_container *c, cram_slice *s,
+		      SAM_hdr *hdr);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/htslib/cram/cram_encode.c b/htslib/cram/cram_encode.c
new file mode 100644
index 0000000..94c2ceb
--- /dev/null
+++ b/htslib/cram/cram_encode.c
@@ -0,0 +1,2630 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <zlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <math.h>
+#include <ctype.h>
+
+#include "cram/cram.h"
+#include "cram/os.h"
+#include "cram/md5.h"
+
+#ifdef SAMTOOLS
+#    define bam_copy(dst, src) bam_copy1(*(dst), (src))
+#else
+void bam_copy(bam_seq_t **bt, bam_seq_t *bf) {
+    size_t a;
+
+    if (bf->alloc > (*bt)->alloc) {
+	a = ((int)((bf->alloc+15)/16))*16;
+	*bt = realloc(*bt, a);
+	memcpy(*bt, bf, bf->alloc);
+    } else {
+	a = (*bt)->alloc;
+	memcpy(*bt, bf, bf->alloc);
+    }
+
+    (*bt)->alloc = a;
+}
+#endif
+
+#define Z_CRAM_STRAT Z_FILTERED
+//#define Z_CRAM_STRAT Z_RLE
+//#define Z_CRAM_STRAT Z_HUFFMAN_ONLY
+//#define Z_CRAM_STRAT Z_DEFAULT_STRATEGY
+
+static int process_one_read(cram_fd *fd, cram_container *c,
+			    cram_slice *s, cram_record *cr,
+			    bam_seq_t *b, int rnum);
+
+/*
+ * Returns index of val into key.
+ * Basically strchr(key, val)-key;
+ */
+static int sub_idx(char *key, char val) {
+    int i;
+
+    for (i = 0; *key && *key++ != val; i++);
+    return i;
+}
+
+/*
+ * Encodes a compression header block into a generic cram_block structure.
+ *
+ * Returns cram_block ptr on success
+ *         NULL on failure
+ */
+cram_block *cram_encode_compression_header(cram_fd *fd, cram_container *c,
+					   cram_block_compression_hdr *h) {
+    cram_block *cb  = cram_new_block(COMPRESSION_HEADER, 0);
+    cram_block *map = cram_new_block(COMPRESSION_HEADER, 0);
+    int i, mc;
+
+    if (!cb || !map)
+	return NULL;
+
+    /*
+     * This is a concatenation of several blocks of data:
+     * header + landmarks, preservation map, read encoding map, and the tag
+     * encoding map.
+     * All 4 are variable sized and we need to know how large these are
+     * before creating the compression header itself as this starts with
+     * the total size (stored as a variable length string).
+     */
+
+    // Duplicated from container itself, and removed in 1.1
+    if (fd->version == CRAM_1_VERS) {
+	itf8_put_blk(cb, h->ref_seq_id);
+	itf8_put_blk(cb, h->ref_seq_start);
+	itf8_put_blk(cb, h->ref_seq_span);
+	itf8_put_blk(cb, h->num_records);
+	itf8_put_blk(cb, h->num_landmarks);
+	for (i = 0; i < h->num_landmarks; i++) {
+	    itf8_put_blk(cb, h->landmark[i]);
+	}
+    }
+
+    /* Create in-memory preservation map */
+    /* FIXME: should create this when we create the container */
+    {
+	khint_t k;
+	int r;
+
+	if (!(h->preservation_map = kh_init(map)))
+	    return NULL;
+
+	k = kh_put(map, h->preservation_map, "RN", &r);
+	if (-1 == r) return NULL;
+	kh_val(h->preservation_map, k).i = 1;
+
+	if (fd->version == CRAM_1_VERS) {
+	    k = kh_put(map, h->preservation_map, "PI", &r);
+	    if (-1 == r) return NULL;
+	    kh_val(h->preservation_map, k).i = 0;
+
+	    k = kh_put(map, h->preservation_map, "UI", &r);
+	    if (-1 == r) return NULL;
+	    kh_val(h->preservation_map, k).i = 1;
+
+	    k = kh_put(map, h->preservation_map, "MI", &r);
+	    if (-1 == r) return NULL;
+	    kh_val(h->preservation_map, k).i = 1;
+
+	} else {
+	    // Technically SM was in 1.0, but wasn't in Java impl.
+	    k = kh_put(map, h->preservation_map, "SM", &r);
+	    if (-1 == r) return NULL;
+	    kh_val(h->preservation_map, k).i = 0;
+
+	    k = kh_put(map, h->preservation_map, "TD", &r);
+	    if (-1 == r) return NULL;
+	    kh_val(h->preservation_map, k).i = 0;
+
+	    k = kh_put(map, h->preservation_map, "AP", &r);
+	    if (-1 == r) return NULL;
+	    kh_val(h->preservation_map, k).i = c->pos_sorted;
+
+	    if (fd->no_ref || fd->embed_ref) {
+		// Reference Required == No
+		k = kh_put(map, h->preservation_map, "RR", &r);
+		if (-1 == r) return NULL;
+		kh_val(h->preservation_map, k).i = 0;
+	    }
+	}
+    }
+
+    /* Encode preservation map; could collapse this and above into one */
+    mc = 0;
+    BLOCK_SIZE(map) = 0;
+    if (h->preservation_map) {
+	khint_t k;
+
+	for (k = kh_begin(h->preservation_map);
+	     k != kh_end(h->preservation_map);
+	     k++) {
+	    const char *key;
+	    khash_t(map) *pmap = h->preservation_map;
+
+
+	    if (!kh_exist(pmap, k))
+		continue;
+
+	    key = kh_key(pmap, k);
+	    BLOCK_APPEND(map, key, 2);
+
+	    switch(CRAM_KEY(key[0], key[1])) {
+	    case CRAM_KEY('M','I'):
+		BLOCK_APPEND_CHAR(map, kh_val(pmap, k).i);
+		break;
+
+	    case CRAM_KEY('U','I'):
+		BLOCK_APPEND_CHAR(map, kh_val(pmap, k).i);
+		break;
+
+	    case CRAM_KEY('P','I'):
+		BLOCK_APPEND_CHAR(map, kh_val(pmap, k).i);
+		break;
+
+	    case CRAM_KEY('A','P'):
+		BLOCK_APPEND_CHAR(map, kh_val(pmap, k).i);
+		break;
+
+	    case CRAM_KEY('R','N'):
+		BLOCK_APPEND_CHAR(map, kh_val(pmap, k).i);
+		break;
+
+	    case CRAM_KEY('R','R'):
+		BLOCK_APPEND_CHAR(map, kh_val(pmap, k).i);
+		break;
+
+	    case CRAM_KEY('S','M'): {
+		char smat[5], *mp = smat;
+		*mp++ =
+		    (sub_idx("CGTN", h->substitution_matrix[0][0]) << 6) |
+		    (sub_idx("CGTN", h->substitution_matrix[0][1]) << 4) |
+		    (sub_idx("CGTN", h->substitution_matrix[0][2]) << 2) |
+		    (sub_idx("CGTN", h->substitution_matrix[0][3]) << 0);
+		*mp++ =
+		    (sub_idx("AGTN", h->substitution_matrix[1][0]) << 6) |
+		    (sub_idx("AGTN", h->substitution_matrix[1][1]) << 4) |
+		    (sub_idx("AGTN", h->substitution_matrix[1][2]) << 2) |
+		    (sub_idx("AGTN", h->substitution_matrix[1][3]) << 0);
+		*mp++ =
+		    (sub_idx("ACTN", h->substitution_matrix[2][0]) << 6) |
+		    (sub_idx("ACTN", h->substitution_matrix[2][1]) << 4) |
+		    (sub_idx("ACTN", h->substitution_matrix[2][2]) << 2) |
+		    (sub_idx("ACTN", h->substitution_matrix[2][3]) << 0);
+		*mp++ =
+		    (sub_idx("ACGN", h->substitution_matrix[3][0]) << 6) |
+		    (sub_idx("ACGN", h->substitution_matrix[3][1]) << 4) |
+		    (sub_idx("ACGN", h->substitution_matrix[3][2]) << 2) |
+		    (sub_idx("ACGN", h->substitution_matrix[3][3]) << 0);
+		*mp++ =
+		    (sub_idx("ACGT", h->substitution_matrix[4][0]) << 6) |
+		    (sub_idx("ACGT", h->substitution_matrix[4][1]) << 4) |
+		    (sub_idx("ACGT", h->substitution_matrix[4][2]) << 2) |
+		    (sub_idx("ACGT", h->substitution_matrix[4][3]) << 0);
+		BLOCK_APPEND(map, smat, 5);
+		break;
+	    }
+
+	    case CRAM_KEY('T','D'): {
+		itf8_put_blk(map, BLOCK_SIZE(h->TD_blk));
+		BLOCK_APPEND(map,
+			     BLOCK_DATA(h->TD_blk),
+			     BLOCK_SIZE(h->TD_blk));
+		break;
+	    }
+
+	    default:
+		fprintf(stderr, "Unknown preservation key '%.2s'\n", key);
+		break;
+	    }
+
+	    mc++;
+        }
+    }
+    itf8_put_blk(cb, BLOCK_SIZE(map) + itf8_size(mc));
+    itf8_put_blk(cb, mc);    
+    BLOCK_APPEND(cb, BLOCK_DATA(map), BLOCK_SIZE(map));
+    
+    /* rec encoding map */
+    mc = 0;
+    BLOCK_SIZE(map) = 0;
+    if (h->BF_codec) {
+	if (-1 == h->BF_codec->store(h->BF_codec, map, "BF", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->CF_codec) {
+	if (-1 == h->CF_codec->store(h->CF_codec, map, "CF", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->RL_codec) {
+	if (-1 == h->RL_codec->store(h->RL_codec, map, "RL", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->AP_codec) {
+	if (-1 == h->AP_codec->store(h->AP_codec, map, "AP", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->RG_codec) {
+	if (-1 == h->RG_codec->store(h->RG_codec, map, "RG", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->MF_codec) {
+	if (-1 == h->MF_codec->store(h->MF_codec, map, "MF", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->NS_codec) {
+	if (-1 == h->NS_codec->store(h->NS_codec, map, "NS", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->NP_codec) {
+	if (-1 == h->NP_codec->store(h->NP_codec, map, "NP", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->TS_codec) {
+	if (-1 == h->TS_codec->store(h->TS_codec, map, "TS", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->NF_codec) {
+	if (-1 == h->NF_codec->store(h->NF_codec, map, "NF", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->TC_codec) {
+	if (-1 == h->TC_codec->store(h->TC_codec, map, "TC", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->TN_codec) {
+	if (-1 == h->TN_codec->store(h->TN_codec, map, "TN", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->TL_codec) {
+	if (-1 == h->TL_codec->store(h->TL_codec, map, "TL", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->FN_codec) {
+	if (-1 == h->FN_codec->store(h->FN_codec, map, "FN", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->FC_codec) {
+	if (-1 == h->FC_codec->store(h->FC_codec, map, "FC", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->FP_codec) {
+	if (-1 == h->FP_codec->store(h->FP_codec, map, "FP", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->BS_codec) {
+	if (-1 == h->BS_codec->store(h->BS_codec, map, "BS", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->IN_codec) {
+	if (-1 == h->IN_codec->store(h->IN_codec, map, "IN", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->DL_codec) {
+	if (-1 == h->DL_codec->store(h->DL_codec, map, "DL", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->BA_codec) {
+	if (-1 == h->BA_codec->store(h->BA_codec, map, "BA", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->MQ_codec) {
+	if (-1 == h->MQ_codec->store(h->MQ_codec, map, "MQ", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->RN_codec) {
+	if (-1 == h->RN_codec->store(h->RN_codec, map, "RN", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->QS_codec) {
+	if (-1 == h->QS_codec->store(h->QS_codec, map, "QS", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->Qs_codec) {
+	if (-1 == h->Qs_codec->store(h->Qs_codec, map, "Qs", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->RI_codec) {
+	if (-1 == h->RI_codec->store(h->RI_codec, map, "RI", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (fd->version != CRAM_1_VERS) {
+	if (h->SC_codec) {
+	    if (-1 == h->SC_codec->store(h->SC_codec, map, "SC", fd->version))
+		return NULL;
+	    mc++;
+	}
+	if (h->RS_codec) {
+	    if (-1 == h->RS_codec->store(h->RS_codec, map, "RS", fd->version))
+		return NULL;
+	    mc++;
+	}
+	if (h->PD_codec) {
+	    if (-1 == h->PD_codec->store(h->PD_codec, map, "PD", fd->version))
+		return NULL;
+	    mc++;
+	}
+	if (h->HC_codec) {
+	    if (-1 == h->HC_codec->store(h->HC_codec, map, "HC", fd->version))
+		return NULL;
+	    mc++;
+	}
+    }
+    if (h->TM_codec) {
+	if (-1 == h->TM_codec->store(h->TM_codec, map, "TM", fd->version))
+	    return NULL;
+	mc++;
+    }
+    if (h->TV_codec) {
+	if (-1 == h->TV_codec->store(h->TV_codec, map, "TV", fd->version))
+	    return NULL;
+	mc++;
+    }
+    itf8_put_blk(cb, BLOCK_SIZE(map) + itf8_size(mc));
+    itf8_put_blk(cb, mc);    
+    BLOCK_APPEND(cb, BLOCK_DATA(map), BLOCK_SIZE(map));
+
+    /* tag encoding map */
+#if 0
+    mp = map; mc = 0;
+    if (h->tag_encoding_map) {
+        HashItem *hi;
+        HashIter *iter = HashTableIterCreate();
+	if (!iter)
+	    return NULL;
+
+        while ((hi = HashTableIterNext(h->tag_encoding_map, iter))) {
+            cram_map *m = hi->data.p;
+	    int sz;
+
+	    mp += itf8_put(mp, (hi->key[0]<<16)|(hi->key[1]<<8)|hi->key[2]);
+	    if (-1 == (sz = m->codec->store(m->codec, mp, NULL, fd->version)))
+		return NULL;
+	    mp += sz;
+	    mc++;
+        }
+
+        HashTableIterDestroy(iter);
+    }
+#else
+    mc = 0;
+    BLOCK_SIZE(map) = 0;
+    if (c->tags_used) {
+	khint_t k;
+
+	for (k = kh_begin(c->tags_used); k != kh_end(c->tags_used); k++) {
+	    if (!kh_exist(c->tags_used, k))
+		continue;
+
+	    mc++;
+	    itf8_put_blk(map, kh_key(c->tags_used, k));
+
+	    // use block content id 4
+	    switch(kh_key(c->tags_used, k) & 0xff) {
+	    case 'Z': case 'H':
+		// string as byte_array_stop
+		if (fd->version == CRAM_1_VERS) {
+		    BLOCK_APPEND(map,
+				 "\005" // BYTE_ARRAY_STOP
+				 "\005" // len
+				 "\t"   // stop-byte is also SAM separator
+				 CRAM_EXT_TAG_S "\000\000\000",
+				 7);
+		} else {
+		    BLOCK_APPEND(map,
+				 "\005" // BYTE_ARRAY_STOP
+				 "\002" // len
+				 "\t"   // stop-byte is also SAM separator
+				 CRAM_EXT_TAG_S,
+				 4);
+		}
+		break;
+
+	    case 'A': case 'c': case 'C':
+		// byte array len, 1 byte
+		BLOCK_APPEND(map,
+			     "\004" // BYTE_ARRAY_LEN
+			     "\011" // length
+			     "\003" // HUFFMAN (len)
+			     "\004" // huffman-len
+			     "\001" // 1 symbol
+			     "\001" // symbol=1 byte value
+			     "\001" // 1 length
+			     "\000" // length=0
+			     "\001" // EXTERNAL (val)
+			     "\001" // external-len
+			     CRAM_EXT_TAG_S,// content-id
+			     11);
+		break;
+
+	    case 's': case 'S':
+		// byte array len, 2 byte
+		BLOCK_APPEND(map,
+			     "\004" // BYTE_ARRAY_LEN
+			     "\011" // length
+			     "\003" // HUFFMAN (len)
+			     "\004" // huffman-len
+			     "\001" // 1 symbol
+			     "\002" // symbol=2 byte value
+			     "\001" // 1 length
+			     "\000" // length=0
+			     "\001" // EXTERNAL (val)
+			     "\001" // external-len
+			     CRAM_EXT_TAG_S,// content-id
+			     11);
+		break;
+
+	    case 'i': case 'I': case 'f':
+		// byte array len, 4 byte
+		BLOCK_APPEND(map,
+			     "\004" // BYTE_ARRAY_LEN
+			     "\011" // length
+			     "\003" // HUFFMAN (len)
+			     "\004" // huffman-len
+			     "\001" // 1 symbol
+			     "\004" // symbol=4 byte value
+			     "\001" // 1 length
+			     "\000" // length=0
+			     "\001" // EXTERNAL (val)
+			     "\001" // external-len
+			     CRAM_EXT_TAG_S,// content-id
+			     11);
+		break;
+
+	    case 'B':
+		// Byte array of variable size, but we generate our tag
+		// byte stream at the wrong stage (during reading and not
+		// after slice header construction). So we use
+		// BYTE_ARRAY_LEN with the length codec being external
+		// too.
+		BLOCK_APPEND(map,
+			     "\004" // BYTE_ARRAY_LEN
+			     "\006" // length
+			     "\001" // EXTERNAL (len)
+			     "\001" // external-len
+			     "\004" // content-id
+			     "\001" // EXTERNAL (val)
+			     "\001" // external-len
+			     CRAM_EXT_TAG_S,// content-id
+			     8);
+		break;
+
+	    default:
+		fprintf(stderr, "Unsupported SAM aux type '%c'\n",
+			kh_key(c->tags_used, k) & 0xff);
+	    }
+	    //mp += m->codec->store(m->codec, mp, NULL, fd->version);
+	}
+    }
+#endif
+    itf8_put_blk(cb, BLOCK_SIZE(map) + itf8_size(mc));
+    itf8_put_blk(cb, mc);    
+    BLOCK_APPEND(cb, BLOCK_DATA(map), BLOCK_SIZE(map));
+
+    if (fd->verbose)
+	fprintf(stderr, "Wrote compression block header in %d bytes\n",
+		(int)BLOCK_SIZE(cb));
+
+    BLOCK_UPLEN(cb);
+
+    cram_free_block(map);
+
+    return cb;
+}
+
+
+/*
+ * Encodes a slice compression header. 
+ *
+ * Returns cram_block on success
+ *         NULL on failure
+ */
+cram_block *cram_encode_slice_header(cram_fd *fd, cram_slice *s) {
+    char *buf;
+    char *cp;
+    cram_block *b = cram_new_block(MAPPED_SLICE, 0);
+    int j;
+
+    if (!b)
+	return NULL;
+
+    if (NULL == (cp = buf = malloc(16+5*(8+s->hdr->num_blocks)))) {
+	cram_free_block(b);
+	return NULL;
+    }
+
+    cp += itf8_put(cp, s->hdr->ref_seq_id);
+    cp += itf8_put(cp, s->hdr->ref_seq_start);
+    cp += itf8_put(cp, s->hdr->ref_seq_span);
+    cp += itf8_put(cp, s->hdr->num_records);
+    if (fd->version != CRAM_1_VERS)
+	cp += itf8_put(cp, s->hdr->record_counter);
+    cp += itf8_put(cp, s->hdr->num_blocks);
+    cp += itf8_put(cp, s->hdr->num_content_ids);
+    for (j = 0; j < s->hdr->num_content_ids; j++) {
+	cp += itf8_put(cp, s->hdr->block_content_ids[j]);
+    }
+    if (s->hdr->content_type == MAPPED_SLICE)
+	cp += itf8_put(cp, s->hdr->ref_base_id);
+
+    if (fd->version != CRAM_1_VERS) {
+	memcpy(cp, s->hdr->md5, 16); cp += 16;
+    }
+    
+    assert(cp-buf <= 16+5*(8+s->hdr->num_blocks));
+
+    b->data = (unsigned char *)buf;
+    b->comp_size = b->uncomp_size = cp-buf;
+
+    return b;
+}
+
+
+/*
+ * Encodes a single slice from a container
+ * FIXME: break into smaller components.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+static int cram_encode_slice(cram_fd *fd, cram_container *c,
+			     cram_block_compression_hdr *h, cram_slice *s) {
+    int rec, r = 0, last_pos;
+    cram_block *core;
+    int nblk, embed_ref;
+
+    embed_ref = fd->embed_ref && s->hdr->ref_seq_id != -1 ? 1 : 0;
+
+    /*
+     * Slice external blocks:
+     * ID 0 => base calls (insertions, soft-clip)
+     * ID 1 => qualities
+     * ID 2 => names
+     * ID 3 => TS (insert size), NP (next frag)
+     * ID 4 => tag values
+     * ID 5 => BA, ifdef BA_external
+     * ID 6 => tag IDs (TN), ifdef TN_external and CRAM_1_VERS
+     * ID 7 => TD tag dictionary, if !CRAM_1_VERS
+     */
+
+    /* Create cram slice header, num_blocks etc */
+    s->hdr->ref_base_id = embed_ref ? CRAM_EXT_REF : -1;
+    s->hdr->record_counter = c->num_records + c->record_counter;
+    c->num_records += s->hdr->num_records;
+    nblk = (fd->version == CRAM_1_VERS) ? 5 : 6;
+#ifdef BA_external
+    nblk++;
+#endif
+#ifdef TN_external
+    if (fd->version == CRAM_1_VERS) {
+	nblk++;
+    }
+#endif
+    if (embed_ref)
+	nblk++;
+
+    s->hdr->num_content_ids = nblk;
+    s->hdr->num_blocks = s->hdr->num_content_ids+1;
+    s->block = calloc(s->hdr->num_blocks, sizeof(s->block[0]));
+    s->hdr->block_content_ids = malloc(s->hdr->num_content_ids *
+				       sizeof(int32_t));
+    if (!s->block || !s->hdr->block_content_ids)
+	return -1;
+    s->hdr->block_content_ids[0] = 0; // core
+    s->hdr->block_content_ids[1] = CRAM_EXT_QUAL;
+    s->hdr->block_content_ids[2] = CRAM_EXT_NAME;
+    s->hdr->block_content_ids[3] = CRAM_EXT_TS_NP;
+    s->hdr->block_content_ids[4] = CRAM_EXT_TAG;
+    s->hdr->block_content_ids[5] = CRAM_EXT_SC;
+    nblk = (fd->version == CRAM_1_VERS) ? 5 : 6;
+#ifdef BA_external
+    s->hdr->block_content_ids[(s->ba_id = ++nblk)-1] = CRAM_EXT_BA;
+#endif
+#ifdef TN_external
+    if (fd->version == CRAM_1_VERS) {
+	s->hdr->block_content_ids[(s->tn_id = ++nblk)-1] = CRAM_EXT_TN;
+    }
+#endif
+    if (embed_ref)
+	s->hdr->block_content_ids[(s->ref_id = ++nblk)-1] = CRAM_EXT_REF;
+
+    if (!(s->block[0] = cram_new_block(CORE, 0)))                  return -1;
+    if (!(s->block[1] = cram_new_block(EXTERNAL, CRAM_EXT_IN)))    return -1;
+    if (!(s->block[2] = cram_new_block(EXTERNAL, CRAM_EXT_QUAL)))  return -1;
+    if (!(s->block[3] = cram_new_block(EXTERNAL, CRAM_EXT_NAME)))  return -1;
+    if (!(s->block[4] = cram_new_block(EXTERNAL, CRAM_EXT_TS_NP))) return -1;
+    if (!(s->block[5] = cram_new_block(EXTERNAL, CRAM_EXT_TAG)))   return -1;
+    if (fd->version != CRAM_1_VERS) {
+	if (!(s->block[6] = cram_new_block(EXTERNAL, CRAM_EXT_SC)))
+	    return -1;
+    }
+#ifdef BA_external
+    if (!(s->block[s->ba_id] = cram_new_block(EXTERNAL, CRAM_EXT_BA)))
+	return -1;
+#endif
+#ifdef TN_external
+    if (fd->version == CRAM_1_VERS) {
+	if (!(s->block[s->tn_id] = cram_new_block(EXTERNAL, CRAM_EXT_TN)))
+	    return -1;
+    }
+#endif
+    if (embed_ref) {
+	if (!(s->block[s->ref_id] = cram_new_block(EXTERNAL, CRAM_EXT_REF)))
+	    return -1;
+	BLOCK_APPEND(s->block[s->ref_id],
+		     c->ref + c->first_base - c->ref_start,
+		     c->last_base - c->first_base + 1);
+    }
+
+    core = s->block[0];
+		 
+    /* Create a formal method for stealing from dstrings! */
+    s->block[4]->data = calloc(10, s->hdr->num_records); // NP TS
+    if (!s->block[4]->data)
+	return -1;
+    s->block[4]->comp_size = s->block[4]->uncomp_size = 0;
+
+#ifdef BA_external
+    s->block[s->ba_id]->data = calloc(1, s->BA_len);
+    if (!s->block[s->ba_id]->data)
+	return -1;
+    s->block[s->ba_id]->comp_size = s->block[s->ba_id]->uncomp_size = 0;
+#endif
+
+    /* Generate core block */
+    if (!(s->hdr_block = cram_encode_slice_header(fd, s)))
+	return -1;
+
+    last_pos = s->hdr->ref_seq_start;
+    for (rec = 0; rec < s->hdr->num_records; rec++) {
+	cram_record *cr = &s->crecs[rec];
+	int32_t i32;
+	unsigned char uc;
+
+	//fprintf(stderr, "Encode seq %d, %d/%d FN=%d, %s\n", rec, core->byte, core->bit, cr->nfeature, s->name_ds->str + cr->name);
+
+	//printf("BF=0x%x\n", cr->flags);
+	//	    bf = cram_flag_swap[cr->flags];
+	i32 = fd->cram_flag_swap[cr->flags & 0xfff];
+	r |= h->BF_codec->encode(s, h->BF_codec, core, (char *)&i32, 1);
+
+	i32 = cr->cram_flags;
+	r |= h->CF_codec->encode(s, h->CF_codec, core,
+				 (char *)&i32, 1);
+
+	if (fd->version != CRAM_1_VERS)
+	    r |= h->RI_codec->encode(s, h->RI_codec, core,
+				     (char *)&cr->ref_id, 1);
+
+	r |= h->RL_codec->encode(s, h->RL_codec, core,
+				 (char *)&cr->len, 1);
+
+	if (c->pos_sorted) {
+	    i32 = cr->apos - last_pos;
+	    r |= h->AP_codec->encode(s, h->AP_codec, core, (char *)&i32, 1);
+	    last_pos = cr->apos;
+	} else {
+	    i32 = cr->apos;
+	    r |= h->AP_codec->encode(s, h->AP_codec, core, (char *)&i32, 1);
+	}
+
+	r |= h->RG_codec->encode(s, h->RG_codec, core,
+				 (char *)&cr->rg, 1);
+
+	if (c->comp_hdr->read_names_included) {
+	    // RN codec: Already stored in block[3].
+	}
+
+	if (cr->cram_flags & CRAM_FLAG_DETACHED) {
+	    i32 = cr->mate_flags;
+	    r |= h->MF_codec->encode(s, h->MF_codec, core, (char *)&i32, 1);
+
+	    if (!c->comp_hdr->read_names_included) {
+		// RN codec: Already stored in block[3].
+	    }
+
+#ifndef NS_external
+	    r |= h->NS_codec->encode(s, h->NS_codec, core,
+				     (char *)&cr->mate_ref_id, 1);
+#else
+	    s->block[4]->uncomp_size +=
+		itf8_put(&s->block[4]->data[s->block[4]->uncomp_size],
+			 cr->mate_ref_id);
+#endif
+
+#ifndef TS_external
+	    r |= h->NP_codec->encode(s, h->NP_codec, core,
+				     (char *)&cr->mate_pos, 1);
+
+	    r |= h->TS_codec->encode(s, h->TS_codec, core,
+				     (char *)&cr->tlen, 1);
+#else
+	    s->block[4]->uncomp_size +=
+		itf8_put((char *)&s->block[4]->data[s->block[4]->uncomp_size],
+			 cr->mate_pos);
+	    s->block[4]->uncomp_size +=
+		itf8_put((char *)&s->block[4]->data[s->block[4]->uncomp_size],
+			 cr->tlen);
+#endif
+	} else if (cr->cram_flags & CRAM_FLAG_MATE_DOWNSTREAM) {
+	    r |= h->NF_codec->encode(s, h->NF_codec, core,
+				     (char *)&cr->mate_line, 1);
+	}
+
+	/* Aux tags */
+	if (fd->version == CRAM_1_VERS) {
+	    uc = cr->ntags;
+	    r |= h->TC_codec->encode(s, h->TC_codec, core, (char *)&uc, 1);
+#ifndef TN_external
+	    {
+		int j;
+		for (j = 0; j < cr->ntags; j++) {
+		    uint32_t i32 = s->TN[cr->TN_idx + j]; // id
+		    r |= h->TN_codec->encode(s, h->TN_codec, core,
+					     (char *)&i32, 1);
+		}
+	    }
+#endif
+	} else {
+	    r |= h->TL_codec->encode(s, h->TL_codec, core, (char *)&cr->TL, 1);
+	}
+
+	// qual
+	// QS codec : Already stored in block[2].
+
+	// features (diffs)
+	if (!(cr->flags & BAM_FUNMAP)) {
+	    int prev_pos = 0, j;
+
+	    r |= h->FN_codec->encode(s, h->FN_codec, core,
+				     (char *)&cr->nfeature, 1);
+	    for (j = 0; j < cr->nfeature; j++) {
+		cram_feature *f = &s->features[cr->feature + j];
+
+		uc = f->X.code;
+		r |= h->FC_codec->encode(s, h->FC_codec, core,
+					 (char *)&uc, 1);
+		i32 = f->X.pos - prev_pos;
+		r |= h->FP_codec->encode(s, h->FP_codec, core,
+					 (char *)&i32, 1);
+		prev_pos = f->X.pos;
+
+		switch(f->X.code) {
+		    //char *seq;
+
+		case 'X':
+		    //fprintf(stderr, "    FC=%c FP=%d base=%d\n", f->X.code, i32, f->X.base);
+		
+		    uc = f->X.base;
+		    r |= h->BS_codec->encode(s, h->BS_codec, core,
+					     (char *)&uc, 1);
+		    break;
+		case 'S':
+		    //seq = DSTRING_STR(s->seqs_ds) + f->S.seq_idx;
+		    //r |= h->SC_codec->encode(s, h->SC_codec, core,
+		    //			     seq, f->S.len);
+		    break;
+		case 'I':
+		    //seq = DSTRING_STR(s->seqs_ds) + f->S.seq_idx;
+		    //r |= h->IN_codec->encode(s, h->IN_codec, core,
+		    //			     seq, f->S.len);
+		    break;
+		case 'i':
+		    uc = f->i.base;
+#ifdef BA_external
+		    s->block[s->ba_id]->data[s->block[s->ba_id]->uncomp_size++] = uc;
+#else
+		    r |= h->BA_codec->encode(s, h->BA_codec, core,
+					     (char *)&uc, 1);
+#endif
+		    //seq = DSTRING_STR(s->seqs_ds) + f->S.seq_idx;
+		    //r |= h->IN_codec->encode(s, h->IN_codec, core,
+		    //			     seq, 1);
+		    break;
+		case 'D':
+		    i32 = f->D.len;
+		    r |= h->DL_codec->encode(s, h->DL_codec, core,
+					     (char *)&i32, 1);
+		    break;
+
+		case 'B':
+//		    // Used when we try to store a non ACGTN base or an N
+//		    // that aligns against a non ACGTN reference
+
+		    uc  = f->B.base;
+#ifdef BA_external
+		    s->block[s->ba_id]->data[s->block[s->ba_id]->uncomp_size++] = uc;
+#else
+		    r |= h->BA_codec->encode(s, h->BA_codec, core,
+					     (char *)&uc, 1);
+#endif
+
+//                  Already added
+//		    uc  = f->B.qual;
+//		    r |= h->QS_codec->encode(s, h->QS_codec, core,
+//					     (char *)&uc, 1);
+		    break;
+
+		case 'Q':
+//                  Already added
+//		    uc  = f->B.qual;
+//		    r |= h->QS_codec->encode(s, h->QS_codec, core,
+//					     (char *)&uc, 1);
+		    break;
+
+		case 'N':
+		    i32 = f->N.len;
+		    r |= h->RS_codec->encode(s, h->RS_codec, core,
+					     (char *)&i32, 1);
+		    break;
+		    
+		case 'P':
+		    i32 = f->P.len;
+		    r |= h->PD_codec->encode(s, h->PD_codec, core,
+					     (char *)&i32, 1);
+		    break;
+		    
+		case 'H':
+		    i32 = f->H.len;
+		    r |= h->HC_codec->encode(s, h->HC_codec, core,
+					     (char *)&i32, 1);
+		    break;
+		    
+
+		default:
+		    fprintf(stderr, "unhandled feature code %c\n",
+			    f->X.code);
+		    return -1;
+		}
+	    }
+
+	    r |= h->MQ_codec->encode(s, h->MQ_codec, core,
+				     (char *)&cr->mqual, 1);
+	} else {
+	    char *seq = (char *)BLOCK_DATA(s->seqs_blk) + cr->seq;
+#ifdef BA_external
+	    memcpy(&s->block[s->ba_id]->data[s->block[s->ba_id]->uncomp_size],
+		   seq, cr->len);
+	    s->block[s->ba_id]->uncomp_size += cr->len;
+#else
+	    r |= h->BA_codec->encode(s, h->BA_codec, core, seq, cr->len);
+#endif
+	}
+
+	if (r)
+	    return -1;
+    }
+    s->block[0]->uncomp_size = s->block[0]->byte + (s->block[0]->bit < 7);
+    s->block[0]->comp_size = s->block[0]->uncomp_size;
+
+    // FIXME: we should avoid creating these in the first place and just
+    // point them to s->base_blk et al.
+    cram_free_block(s->block[1]);
+    cram_free_block(s->block[2]);
+    cram_free_block(s->block[3]);
+    cram_free_block(s->block[5]);
+    if (fd->version != CRAM_1_VERS) {
+	cram_free_block(s->block[6]);
+	BLOCK_UPLEN(s->soft_blk);
+	s->block[6] = s->soft_blk;
+	s->soft_blk = NULL;
+    }
+    BLOCK_UPLEN(s->base_blk); s->block[1] = s->base_blk; s->base_blk = NULL;
+    BLOCK_UPLEN(s->qual_blk); s->block[2] = s->qual_blk; s->qual_blk = NULL;
+    BLOCK_UPLEN(s->name_blk); s->block[3] = s->name_blk; s->name_blk = NULL;
+    BLOCK_UPLEN(s->aux_blk);  s->block[5] = s->aux_blk;  s->aux_blk  = NULL;
+
+#ifdef TN_external
+    if (fd->version == CRAM_1_VERS) {
+	cram_free_block(s->block[s->tn_id]);
+	BLOCK_UPLEN(s->tn_blk); s->block[s->tn_id] = s->tn_blk;
+	s->tn_blk = NULL;
+    }
+#endif
+
+    s->block[4]->comp_size = s->block[4]->uncomp_size;
+    
+#ifdef BA_external
+    s->block[s->ba_id]->comp_size = s->block[s->ba_id]->uncomp_size;
+#endif
+
+    /* Compress the CORE Block too, with minimal zlib level */
+    if (fd->level > 5)
+	cram_compress_block(fd, s->block[0], NULL, 1, Z_CRAM_STRAT, -1, -1);
+
+#define USE_METRICS
+
+#ifdef USE_METRICS
+#  define LEVEL2 1
+#  define STRAT2 Z_RLE
+#else
+#  define LEVEL2 -1
+#  define STRAT2 -1
+#endif
+
+    /* Compress the other blocks */
+    if (cram_compress_block(fd, s->block[1], NULL, //IN (seq)
+			    fd->level, Z_CRAM_STRAT,
+			    -1, -1))
+	return -1;
+
+    if (fd->level == 0) {
+	/* Do nothing */
+    } else if (fd->level == 1) {
+	if (cram_compress_block(fd, s->block[2], fd->m[1], //qual
+				1, Z_RLE, -1, -1))
+	    return -1;
+	if (cram_compress_block(fd, s->block[5], fd->m[4], //Tags
+				1, Z_RLE, -1, -1))
+	    return -1;
+    } else if (fd->level < 3) {
+	if (cram_compress_block(fd, s->block[2], fd->m[1], //qual
+				1, Z_RLE,
+				1, Z_HUFFMAN_ONLY))
+	    return -1;
+	if (cram_compress_block(fd, s->block[5], fd->m[4], //Tags
+				1, Z_RLE,
+				1, Z_HUFFMAN_ONLY))
+	    return -1;
+    } else {
+	if (cram_compress_block(fd, s->block[2], fd->m[1], //qual
+				fd->level, Z_CRAM_STRAT, 
+				LEVEL2, STRAT2))
+	    return -1;
+	if (cram_compress_block(fd, s->block[5], fd->m[4], //Tags
+				fd->level, Z_CRAM_STRAT,
+				LEVEL2, STRAT2))
+	    return -1;
+    }
+    if (cram_compress_block(fd, s->block[3], NULL, //Name
+			    fd->level, Z_CRAM_STRAT,
+			    -1, -1))
+	return -1;
+    if (cram_compress_block(fd, s->block[4], NULL, //TS, NP
+			    fd->level, Z_CRAM_STRAT,
+			    -1, -1))
+	return -1;
+    if (fd->version != CRAM_1_VERS) {
+	if (cram_compress_block(fd, s->block[6], NULL, //SC (seq)
+				fd->level, Z_CRAM_STRAT,
+				-1, -1))
+	    return -1;
+    }
+#ifdef BA_external
+    if (cram_compress_block(fd, s->block[s->ba_id], NULL,
+			    fd->level, Z_CRAM_STRAT, -1, -1))
+	return -1;
+#endif
+#ifdef TN_external
+    if (fd->version == CRAM_1_VERS) {
+	if (cram_compress_block(fd, s->block[s->tn_id], NULL,
+				fd->level, Z_DEFAULT_STRATEGY, -1, -1))
+	    return -1;
+    }
+#endif
+    if (embed_ref) {
+	BLOCK_UPLEN(s->block[s->ref_id]);
+	if (cram_compress_block(fd, s->block[s->ref_id], NULL,
+				fd->level, Z_DEFAULT_STRATEGY, -1, -1))
+	    return -1;
+    }
+
+    return r ? -1 : 0;
+}
+
+/*
+ * Encodes all slices in a container into blocks.
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_encode_container(cram_fd *fd, cram_container *c) {
+    int i, j, slice_offset;
+    cram_block_compression_hdr *h = c->comp_hdr;
+    cram_block *c_hdr;
+    int multi_ref = 0;
+    int r1, r2, sn, nref;
+    spare_bams *spares;
+
+    /* Cache references up-front if we have unsorted access patterns */
+    pthread_mutex_lock(&fd->ref_lock);
+    nref = fd->refs->nref;
+    pthread_mutex_unlock(&fd->ref_lock);
+
+    if (c->refs_used) {
+	for (i = 0; i < nref; i++) {
+	    if (c->refs_used[i]) {	
+		cram_get_ref(fd, i, 1, 0);
+	    }
+	}
+    }
+
+    /* Fetch reference sequence */
+    if (!fd->no_ref) {
+	bam_seq_t *b = c->bams[0];
+	char *ref;
+
+	ref = cram_get_ref(fd, bam_ref(b), 1, 0);
+	if (!ref && bam_ref(b) >= 0) {
+	    fprintf(stderr, "Failed to load reference #%d\n", bam_ref(b));
+	    return -1;
+	}
+	if ((c->ref_id = bam_ref(b)) >= 0) {
+	    c->ref_seq_id = c->ref_id;
+	    c->ref       = fd->refs->ref_id[c->ref_seq_id]->seq;
+	    c->ref_start = 1;
+	    c->ref_end   = fd->refs->ref_id[c->ref_seq_id]->length;
+	} else {
+	    c->ref_seq_id = c->ref_id; // FIXME remove one var!
+	}
+    } else {
+	    c->ref_seq_id = c->ref_id; // FIXME remove one var!
+    }
+
+    /* Turn bams into cram_records and gather basic stats */
+    for (r1 = sn = 0; r1 < c->curr_c_rec; sn++) {
+	cram_slice *s = c->slices[sn];
+	int first_base = INT_MAX, last_base = INT_MIN;
+
+	assert(sn < c->curr_slice);
+
+	/* FIXME: we could create our slice objects here too instead of
+	 * in cram_put_bam_seq. It's more natural here and also this is
+	 * bit is threaded so it's less work in the main thread.
+	 */
+
+	for (r2 = 0; r1 < c->curr_c_rec && r2 < c->max_rec; r1++, r2++) {
+	    cram_record *cr = &s->crecs[r2];
+	    bam_seq_t *b = c->bams[r1];
+
+	    /* If multi-ref we need to cope with changing reference per seq */
+	    if (c->multi_seq && !fd->no_ref) {
+		if (bam_ref(b) != c->ref_seq_id && bam_ref(b) >= 0) {
+		    if (c->ref_seq_id >= 0)
+			cram_ref_decr(fd->refs, c->ref_seq_id);
+
+		    if (!cram_get_ref(fd, bam_ref(b), 1, 0)) {
+			fprintf(stderr, "Failed to load reference #%d\n",
+				bam_ref(b));
+			return -1;
+		    }
+
+		    c->ref_seq_id = bam_ref(b); // overwritten later by -2
+		    assert(fd->refs->ref_id[c->ref_seq_id]->seq);
+		    c->ref       = fd->refs->ref_id[c->ref_seq_id]->seq;
+		    c->ref_start = 1;
+		    c->ref_end   = fd->refs->ref_id[c->ref_seq_id]->length;
+		}
+	    }
+
+	    process_one_read(fd, c, s, cr, b, r2);
+
+	    if (first_base > cr->apos)
+		first_base = cr->apos;
+
+	    if (last_base < cr->aend)
+		last_base = cr->aend;
+	}
+
+	if (c->multi_seq) {
+	    s->hdr->ref_seq_id    = -2;
+	    s->hdr->ref_seq_start = 0;
+	    s->hdr->ref_seq_span  = 0;
+	} else {
+	    s->hdr->ref_seq_id    = c->ref_id;
+	    s->hdr->ref_seq_start = first_base;
+	    s->hdr->ref_seq_span  = last_base - first_base + 1;
+	}
+	s->hdr->num_records = r2;
+    }
+
+    /* Link our bams[] array onto the spare bam list for reuse */
+    spares = malloc(sizeof(*spares));
+    pthread_mutex_lock(&fd->bam_list_lock);
+    spares->bams = c->bams;
+    spares->next = fd->bl;
+    fd->bl = spares;
+    pthread_mutex_unlock(&fd->bam_list_lock);
+    c->bams = NULL;
+
+    /* Detect if a multi-seq container */
+    cram_stats_encoding(fd, c->RI_stats);
+    multi_ref = c->RI_stats->nvals > 1;
+
+    if (multi_ref) {
+	if (fd->verbose)
+	    fprintf(stderr, "Multi-ref container\n");
+	c->ref_seq_id = -2;
+	c->ref_seq_start = 0;
+	c->ref_seq_span = 0;
+    }
+
+
+    /* Compute MD5s */
+    for (i = 0; i < c->curr_slice; i++) {
+	cram_slice *s = c->slices[i];
+	
+	if (fd->version != CRAM_1_VERS) {
+	    if (s->hdr->ref_seq_id >= 0 && c->multi_seq == 0 && !fd->no_ref) {
+		MD5_CTX md5;
+		MD5_Init(&md5);
+		MD5_Update(&md5,
+			   c->ref + s->hdr->ref_seq_start - c->ref_start,
+			   s->hdr->ref_seq_span);
+		MD5_Final(s->hdr->md5, &md5);
+	    } else {
+		memset(s->hdr->md5, 0, 16);
+	    }
+	}
+    }
+
+    c->num_records = 0;
+    c->num_blocks = 0;
+    c->length = 0;
+
+    //fprintf(stderr, "=== BF ===\n");
+    h->BF_codec = cram_encoder_init(cram_stats_encoding(fd, c->BF_stats),
+				    c->BF_stats, E_INT, NULL,
+				    fd->version);
+
+    //fprintf(stderr, "=== CF ===\n");
+    h->CF_codec = cram_encoder_init(cram_stats_encoding(fd, c->CF_stats),
+				    c->CF_stats, E_INT, NULL,
+				    fd->version);
+//    fprintf(stderr, "=== RN ===\n");
+//    h->RN_codec = cram_encoder_init(cram_stats_encoding(fd, c->RN_stats),
+//				    c->RN_stats, E_BYTE_ARRAY, NULL,
+//				    fd->version);
+
+    //fprintf(stderr, "=== AP ===\n");
+    if (c->pos_sorted) {
+	h->AP_codec = cram_encoder_init(cram_stats_encoding(fd, c->AP_stats),
+					c->AP_stats, E_INT, NULL,
+					fd->version);
+    } else {
+	int p[2] = {0, c->max_apos};
+	h->AP_codec = cram_encoder_init(E_BETA, NULL, E_INT, p, fd->version);
+    }
+
+    //fprintf(stderr, "=== RG ===\n");
+    h->RG_codec = cram_encoder_init(cram_stats_encoding(fd, c->RG_stats),
+				    c->RG_stats, E_INT, NULL,
+				    fd->version);
+
+    //fprintf(stderr, "=== MQ ===\n");
+    h->MQ_codec = cram_encoder_init(cram_stats_encoding(fd, c->MQ_stats),
+				    c->MQ_stats, E_INT, NULL,
+				    fd->version);
+
+    //fprintf(stderr, "=== NS ===\n");
+#ifdef NS_external
+    h->NS_codec = cram_encoder_init(E_EXTERNAL, NULL, E_INT,
+				    (void *)CRAM_EXT_NS,
+				    fd->version);
+#else
+    h->NS_codec = cram_encoder_init(cram_stats_encoding(fd, c->NS_stats),
+				    c->NS_stats, E_INT, NULL,
+				    fd->version);
+#endif
+
+    //fprintf(stderr, "=== MF ===\n");
+    h->MF_codec = cram_encoder_init(cram_stats_encoding(fd, c->MF_stats),
+				    c->MF_stats, E_INT, NULL,
+				    fd->version);
+
+#ifdef TS_external
+    h->TS_codec = cram_encoder_init(E_EXTERNAL, NULL, E_INT,
+				    (void *)CRAM_EXT_TS_NP,
+				    fd->version);
+    h->NP_codec = cram_encoder_init(E_EXTERNAL, NULL, E_INT,
+				    (void *)CRAM_EXT_TS_NP,
+				    fd->version);
+#else
+    //fprintf(stderr, "=== TS ===\n");
+    h->TS_codec = cram_encoder_init(cram_stats_encoding(fd, c->TS_stats),
+				    c->TS_stats, E_INT, NULL,
+				    fd->version);
+    //fprintf(stderr, "=== NP ===\n");
+    h->NP_codec = cram_encoder_init(cram_stats_encoding(fd, c->NP_stats),
+				    c->NP_stats, E_INT, NULL,
+				    fd->version);
+#endif
+
+    //fprintf(stderr, "=== NF ===\n");
+    h->NF_codec = cram_encoder_init(cram_stats_encoding(fd, c->NF_stats),
+				    c->NF_stats, E_INT, NULL,
+				    fd->version);
+
+    //fprintf(stderr, "=== RL ===\n");
+    h->RL_codec = cram_encoder_init(cram_stats_encoding(fd, c->RL_stats),
+				    c->RL_stats, E_INT, NULL,
+				    fd->version);
+
+    //fprintf(stderr, "=== FN ===\n");
+    h->FN_codec = cram_encoder_init(cram_stats_encoding(fd, c->FN_stats),
+				    c->FN_stats, E_INT, NULL,
+				    fd->version);
+
+    //fprintf(stderr, "=== FC ===\n");
+    h->FC_codec = cram_encoder_init(cram_stats_encoding(fd, c->FC_stats),
+				    c->FC_stats, E_BYTE, NULL,
+				    fd->version);
+
+    //fprintf(stderr, "=== FP ===\n");
+    h->FP_codec = cram_encoder_init(cram_stats_encoding(fd, c->FP_stats),
+				    c->FP_stats, E_INT, NULL,
+				    fd->version);
+
+    //fprintf(stderr, "=== DL ===\n");
+    h->DL_codec = cram_encoder_init(cram_stats_encoding(fd, c->DL_stats),
+				    c->DL_stats, E_INT, NULL,
+				    fd->version);
+
+#ifdef BA_external
+    h->BA_codec = cram_encoder_init(E_EXTERNAL, NULL, E_BYTE,
+				    (void *)CRAM_EXT_BA,
+				    fd->version);
+#else
+    //fprintf(stderr, "=== BA ===\n");
+    h->BA_codec = cram_encoder_init(cram_stats_encoding(fd, c->BA_stats),
+				    c->BA_stats, E_BYTE, NULL,
+				    fd->version);
+#endif
+
+    //fprintf(stderr, "=== BS ===\n");
+    h->BS_codec = cram_encoder_init(cram_stats_encoding(fd, c->BS_stats),
+				    c->BS_stats, E_BYTE, NULL,
+				    fd->version);
+
+    if (fd->version == CRAM_1_VERS) {
+	h->TL_codec = NULL;
+	h->RI_codec = NULL;
+	h->RS_codec = NULL;
+	h->PD_codec = NULL;
+	h->HC_codec = NULL;
+	h->SC_codec = NULL;
+
+	//fprintf(stderr, "=== TC ===\n");
+	h->TC_codec = cram_encoder_init(cram_stats_encoding(fd, c->TC_stats),
+					c->TC_stats, E_BYTE, NULL,
+					fd->version);
+
+    //fprintf(stderr, "=== TN ===\n");
+#ifdef TN_external
+	h->TN_codec = cram_encoder_init(E_EXTERNAL, NULL, E_INT,
+					(void *)CRAM_EXT_TN,
+					fd->version);
+#else
+	h->TN_codec = cram_encoder_init(cram_stats_encoding(fd, c->TN_stats),
+					c->TN_stats, E_INT, NULL,
+					fd->version);
+#endif
+    } else {
+	int i2[2] = {0, CRAM_EXT_SC};
+
+	h->TC_codec = NULL;
+	h->TN_codec = NULL;
+
+	//fprintf(stderr, "=== TL ===\n");
+	h->TL_codec = cram_encoder_init(cram_stats_encoding(fd, c->TL_stats),
+					c->TL_stats, E_INT, NULL,
+					fd->version);
+
+
+	//fprintf(stderr, "=== RI ===\n");
+	h->RI_codec = cram_encoder_init(cram_stats_encoding(fd, c->RI_stats),
+					c->RI_stats, E_INT, NULL,
+					fd->version);
+
+	//fprintf(stderr, "=== RS ===\n");
+	h->RS_codec = cram_encoder_init(cram_stats_encoding(fd, c->RS_stats),
+					c->RS_stats, E_INT, NULL,
+					fd->version);
+
+	//fprintf(stderr, "=== PD ===\n");
+	h->PD_codec = cram_encoder_init(cram_stats_encoding(fd, c->PD_stats),
+					c->PD_stats, E_INT, NULL,
+					fd->version);
+
+	//fprintf(stderr, "=== HC ===\n");
+	h->HC_codec = cram_encoder_init(cram_stats_encoding(fd, c->HC_stats),
+					c->HC_stats, E_INT, NULL,
+					fd->version);
+
+	//fprintf(stderr, "=== SC ===\n");
+	h->SC_codec = cram_encoder_init(E_BYTE_ARRAY_STOP, NULL,
+					E_BYTE_ARRAY, (void *)i2,
+					fd->version);
+    }
+    
+    //fprintf(stderr, "=== IN ===\n");
+    {
+	int i2[2] = {0, CRAM_EXT_IN};
+	h->IN_codec = cram_encoder_init(E_BYTE_ARRAY_STOP, NULL,
+					E_BYTE_ARRAY, (void *)i2,
+					fd->version);
+    }
+
+    {
+	//int i2[2] = {0, 1};
+	//h->QS_codec = cram_encoder_init(E_BYTE_ARRAY_STOP, NULL, (void *)i2,
+	//				    fd->version);
+	h->QS_codec = cram_encoder_init(E_EXTERNAL, NULL, E_BYTE,
+					(void *)CRAM_EXT_QUAL,
+					fd->version);
+    }
+    {
+	int i2[2] = {0, CRAM_EXT_NAME};
+	h->RN_codec = cram_encoder_init(E_BYTE_ARRAY_STOP, NULL,
+					E_BYTE_ARRAY, (void *)i2,
+					fd->version);
+    }
+
+
+    /* Encode slices */
+    for (i = 0; i < c->curr_slice; i++) {
+	if (fd->verbose)
+	    fprintf(stderr, "Encode slice %d\n", i);
+	if (cram_encode_slice(fd, c, h, c->slices[i]) != 0)
+	    return -1;
+    }
+
+    /* Create compression header */
+    {
+	h->ref_seq_id    = c->ref_seq_id;
+	h->ref_seq_start = c->ref_seq_start;
+	h->ref_seq_span  = c->ref_seq_span;
+	h->num_records   = c->num_records;
+	
+	h->mapped_qs_included = 0;   // fixme
+	h->unmapped_qs_included = 0; // fixme
+	// h->...  fixme
+	memcpy(h->substitution_matrix, CRAM_SUBST_MATRIX, 20);
+
+	if (!(c_hdr = cram_encode_compression_header(fd, c, h)))
+	    return -1;
+    }
+
+    /* Compute landmarks */
+    /* Fill out slice landmarks */
+    c->num_landmarks = c->curr_slice;
+    c->landmark = malloc(c->num_landmarks * sizeof(*c->landmark));
+    if (!c->landmark)
+	return -1;
+
+    /*
+     * Slice offset starts after the first block, so we need to simulate
+     * writing it to work out the correct offset
+     */
+    {
+	slice_offset = c_hdr->method == RAW
+	    ? c_hdr->uncomp_size
+	    : c_hdr->comp_size;
+	slice_offset += 2 +
+	    itf8_size(c_hdr->content_id) +
+	    itf8_size(c_hdr->comp_size) +
+	    itf8_size(c_hdr->uncomp_size);
+    }
+
+    c->ref_seq_id    = c->slices[0]->hdr->ref_seq_id;
+    c->ref_seq_start = c->slices[0]->hdr->ref_seq_start;
+    c->ref_seq_span  = c->slices[0]->hdr->ref_seq_span;
+    for (i = 0; i < c->curr_slice; i++) {
+	cram_slice *s = c->slices[i];
+	
+	c->num_blocks += s->hdr->num_blocks + 2;
+	c->landmark[i] = slice_offset;
+
+	if (s->hdr->ref_seq_start + s->hdr->ref_seq_span >
+	    c->ref_seq_start + c->ref_seq_span) {
+	    c->ref_seq_span = s->hdr->ref_seq_start + s->hdr->ref_seq_span
+		- c->ref_seq_start;
+	}
+	
+	slice_offset += s->hdr_block->method == RAW
+	    ? s->hdr_block->uncomp_size
+	    : s->hdr_block->comp_size;
+
+	slice_offset += 2 + 
+	    itf8_size(s->hdr_block->content_id) +
+	    itf8_size(s->hdr_block->comp_size) +
+	    itf8_size(s->hdr_block->uncomp_size);
+
+	for (j = 0; j < s->hdr->num_blocks; j++) {
+	    slice_offset += 2 + 
+		itf8_size(s->block[j]->content_id) +
+		itf8_size(s->block[j]->comp_size) +
+		itf8_size(s->block[j]->uncomp_size);
+
+	    slice_offset += s->block[j]->method == RAW
+		? s->block[j]->uncomp_size
+		: s->block[j]->comp_size;
+	}
+    }
+    c->length += slice_offset; // just past the final slice
+
+    c->comp_hdr_block = c_hdr;
+
+    if (c->ref_seq_id >= 0) {
+	cram_ref_decr(fd->refs, c->ref_seq_id);
+    }
+
+    /* Cache references up-front if we have unsorted access patterns */
+    if (c->refs_used) {
+	for (i = 0; i < fd->refs->nref; i++) {
+	    if (c->refs_used[i])
+		cram_ref_decr(fd->refs, i);
+	}
+    }
+
+    return 0;
+}
+
+
+/*
+ * Adds a feature code to a read within a slice. For purposes of minimising
+ * memory allocations and fragmentation we have one array of features for all
+ * reads within the slice. We return the index into this array for this new
+ * feature.
+ *
+ * Returns feature index on success
+ *         -1 on failure.
+ */
+static int cram_add_feature(cram_container *c, cram_slice *s,
+			    cram_record *r, cram_feature *f) {
+    if (s->nfeatures >= s->afeatures) {
+	s->afeatures = s->afeatures ? s->afeatures*2 : 1024;
+	s->features = realloc(s->features, s->afeatures*sizeof(*s->features));
+	if (!s->features)
+	    return -1;
+    }
+
+    if (!r->nfeature++) {
+	r->feature = s->nfeatures;
+	cram_stats_add(c->FP_stats, f->X.pos);
+    } else {
+	cram_stats_add(c->FP_stats,
+		       f->X.pos - s->features[r->feature + r->nfeature-2].X.pos);
+    }
+    cram_stats_add(c->FC_stats, f->X.code);
+
+    s->features[s->nfeatures++] = *f;
+
+    return 0;
+}
+
+static int cram_add_substitution(cram_fd *fd, cram_container *c,
+				 cram_slice *s, cram_record *r,
+				 int pos, char base, char qual, char ref) {
+    cram_feature f;
+
+    // seq=ACGTN vs ref=ACGT or seq=ACGT vs ref=ACGTN
+    if (fd->L2[(uc)base]<4 || (fd->L2[(uc)base]<5 && fd->L2[(uc)ref]<4)) {
+	f.X.pos = pos+1;
+	f.X.code = 'X';
+	f.X.base = fd->cram_sub_matrix[ref&0x1f][base&0x1f];
+	cram_stats_add(c->BS_stats, f.X.base);
+    } else {
+	f.B.pos = pos+1;
+	f.B.code = 'B';
+	f.B.base = base;
+	f.B.qual = qual;
+	cram_stats_add(c->BA_stats, f.B.base);
+	cram_stats_add(c->QS_stats, f.B.qual);
+	BLOCK_APPEND_CHAR(s->qual_blk, qual);
+    }
+    return cram_add_feature(c, s, r, &f);
+}
+
+static int cram_add_base(cram_fd *fd, cram_container *c,
+			 cram_slice *s, cram_record *r,
+			 int pos, char base, char qual) {
+    cram_feature f;
+    f.B.pos = pos+1;
+    f.B.code = 'B';
+    f.B.base = base;
+    f.B.qual = qual;
+#ifdef BA_external
+    s->BA_len++;
+#else
+    cram_stats_add(c->BA_stats, base);
+#endif
+    cram_stats_add(c->QS_stats, qual);
+    BLOCK_APPEND_CHAR(s->qual_blk, qual);
+    return cram_add_feature(c, s, r, &f);
+}
+
+static int cram_add_quality(cram_fd *fd, cram_container *c,
+			    cram_slice *s, cram_record *r,
+			    int pos, char qual) {
+    cram_feature f;
+    f.Q.pos = pos+1;
+    f.Q.code = 'Q';
+    f.Q.qual = qual;
+    cram_stats_add(c->QS_stats, qual);
+    BLOCK_APPEND_CHAR(s->qual_blk, qual);
+    return cram_add_feature(c, s, r, &f);
+}
+
+static int cram_add_deletion(cram_container *c, cram_slice *s, cram_record *r,
+			     int pos, int len, char *base) {
+    cram_feature f;
+    f.D.pos = pos+1;
+    f.D.code = 'D';
+    f.D.len = len;
+    cram_stats_add(c->DL_stats, len);
+    return cram_add_feature(c, s, r, &f);
+}
+
+static int cram_add_softclip(cram_container *c, cram_slice *s, cram_record *r,
+			     int pos, int len, char *base, int version) {
+    cram_feature f;
+    f.S.pos = pos+1;
+    f.S.code = 'S';
+    f.S.len = len;
+    if (version == CRAM_1_VERS) {
+	f.S.seq_idx = BLOCK_SIZE(s->base_blk);
+	BLOCK_APPEND(s->base_blk, base, len);
+	BLOCK_APPEND_CHAR(s->base_blk, '\0');
+    } else {
+	f.S.seq_idx = BLOCK_SIZE(s->soft_blk);
+	if (base) {
+	    BLOCK_APPEND(s->soft_blk, base, len);
+	} else {
+	    int i;
+	    for (i = 0; i < len; i++)
+		BLOCK_APPEND_CHAR(s->soft_blk, 'N');
+	}
+	BLOCK_APPEND_CHAR(s->soft_blk, '\0');
+    }
+    return cram_add_feature(c, s, r, &f);
+}
+
+static int cram_add_hardclip(cram_container *c, cram_slice *s, cram_record *r,
+			     int pos, int len, char *base) {
+    cram_feature f;
+    f.S.pos = pos+1;
+    f.S.code = 'H';
+    f.S.len = len;
+    cram_stats_add(c->HC_stats, len);
+    return cram_add_feature(c, s, r, &f);
+}
+
+static int cram_add_skip(cram_container *c, cram_slice *s, cram_record *r,
+			     int pos, int len, char *base) {
+    cram_feature f;
+    f.S.pos = pos+1;
+    f.S.code = 'N';
+    f.S.len = len;
+    cram_stats_add(c->RS_stats, len);
+    return cram_add_feature(c, s, r, &f);
+}
+
+static int cram_add_pad(cram_container *c, cram_slice *s, cram_record *r,
+			     int pos, int len, char *base) {
+    cram_feature f;
+    f.S.pos = pos+1;
+    f.S.code = 'P';
+    f.S.len = len;
+    cram_stats_add(c->PD_stats, len);
+    return cram_add_feature(c, s, r, &f);
+}
+
+static int cram_add_insertion(cram_container *c, cram_slice *s, cram_record *r,
+			      int pos, int len, char *base) {
+    cram_feature f;
+    f.I.pos = pos+1;
+    if (len == 1) {
+	char b = base ? *base : 'N';
+	f.i.code = 'i';
+	f.i.base = b;
+#ifdef BA_external
+	s->BA_len++;
+#else
+	cram_stats_add(c->BA_stats, b);
+#endif
+    } else {
+	f.I.code = 'I';
+	f.I.len = len;
+	f.S.seq_idx = BLOCK_SIZE(s->base_blk);
+	if (base) {
+	    BLOCK_APPEND(s->base_blk, base, len);
+	} else {
+	    int i;
+	    for (i = 0; i < len; i++)
+		BLOCK_APPEND_CHAR(s->base_blk, 'N');
+	}
+	BLOCK_APPEND_CHAR(s->base_blk, '\0');
+    }
+    return cram_add_feature(c, s, r, &f);
+}
+
+/*
+ * Encodes auxiliary data.
+ * Returns the read-group parsed out of the BAM aux fields on success
+ *         NULL on failure or no rg present (FIXME)
+ */
+static char *cram_encode_aux_1_0(cram_fd *fd, bam_seq_t *b, cram_container *c,
+				 cram_slice *s, cram_record *cr) {
+    char *aux, *tmp, *rg = NULL, *tmp_tn;
+    int aux_size = bam_blk_size(b) -
+	((char *)bam_aux(b) - (char *)&bam_ref(b));
+	
+    /* Worst case is 1 nul char on every ??:Z: string, so +33% */
+    BLOCK_GROW(s->aux_blk, aux_size*1.34+1);
+    tmp = (char *)BLOCK_END(s->aux_blk);
+
+#ifdef TN_external
+    BLOCK_GROW(s->tn_blk, aux_size);
+    tmp_tn = (char *)BLOCK_END(s->tn_blk);
+#endif
+
+    aux = (char *)bam_aux(b);
+#ifndef TN_external
+    cr->TN_idx = s->nTN;
+#endif
+    while (aux[0] != 0) {
+	int32_t i32;
+	int r;
+
+	if (aux[0] == 'R' && aux[1] == 'G' && aux[2] == 'Z') {
+	    rg = &aux[3];
+	    while (*aux++);
+	    continue;
+	}
+	if (aux[0] == 'M' && aux[1] == 'D' && aux[2] == 'Z') {
+	    while (*aux++);
+	    continue;
+	}
+	if (aux[0] == 'N' && aux[1] == 'M') {
+	    switch(aux[2]) {
+	    case 'A': case 'C': case 'c': aux+=4; break;
+	    case 'I': case 'i': case 'f': aux+=7; break;
+	    default:
+		fprintf(stderr, "Unhandled type code for NM tag\n");
+		return NULL;
+	    }
+	    continue;
+	}
+
+	cr->ntags++;
+
+	i32 = (aux[0]<<16) | (aux[1]<<8) | aux[2];
+	kh_put(s_i2i, c->tags_used, i32, &r);
+	if (-1 == r)
+	    return NULL;
+
+#ifndef TN_external
+	if (s->nTN >= s->aTN) {
+	    s->aTN = s->aTN ? s->aTN*2 : 1024;
+	    if (!(s->TN = realloc(s->TN, s->aTN * sizeof(*s->TN))))
+		return NULL;
+	}
+	s->TN[s->nTN++] = i32;
+	cram_stats_add(c->TN_stats, i32);
+#else
+	tmp_tn += itf8_put(tmp_tn, i32);
+#endif
+
+	switch(aux[2]) {
+	case 'A': case 'C': case 'c':
+	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    *tmp++=*aux++;
+	    break;
+
+	case 'S': case 's':
+	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    *tmp++=*aux++; *tmp++=*aux++;
+	    break;
+
+	case 'I': case 'i': case 'f':
+	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    break;
+
+	case 'd':
+	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    break;
+
+	case 'Z': case 'H':
+	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    while ((*tmp++=*aux++));
+	    *tmp++ = '\t'; // stop byte
+	    break;
+
+	case 'B': {
+	    int type = aux[3], blen;
+	    uint32_t count = (uint32_t)((((unsigned char *)aux)[4]<< 0) +
+					(((unsigned char *)aux)[5]<< 8) +
+					(((unsigned char *)aux)[6]<<16) +
+					(((unsigned char *)aux)[7]<<24));
+	    // skip TN field
+	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+
+	    // We use BYTE_ARRAY_LEN with external length, so store that first
+	    switch (type) {
+	    case 'c': case 'C':
+		blen = count;
+		break;
+	    case 's': case 'S':
+		blen = 2*count;
+		break;
+	    case 'i': case 'I': case 'f':
+		blen = 4*count;
+		break;
+	    default:
+		fprintf(stderr, "Unknown sub-type '%c' for aux type 'B'\n",
+			type);
+		return NULL;
+		    
+	    }
+
+	    tmp += itf8_put(tmp, blen+5);
+
+	    *tmp++=*aux++; // sub-type & length
+	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+
+	    // The tag data itself
+	    memcpy(tmp, aux, blen); tmp += blen; aux += blen;
+
+	    //cram_stats_add(c->aux_B_stats, blen);
+	    break;
+	}
+	default:
+	    fprintf(stderr, "Unknown aux type '%c'\n", aux[2]);
+	    return NULL;
+	}
+    }
+    cram_stats_add(c->TC_stats, cr->ntags);
+
+    cr->aux = BLOCK_SIZE(s->aux_blk);
+    cr->aux_size = (uc *)tmp - (BLOCK_DATA(s->aux_blk) + cr->aux);
+    BLOCK_SIZE(s->aux_blk) = (uc *)tmp - BLOCK_DATA(s->aux_blk);
+    assert(s->aux_blk->byte <= s->aux_blk->alloc);
+
+#ifdef TN_external
+    cr->tn = BLOCK_SIZE(s->tn_blk);
+    BLOCK_SIZE(s->tn_blk) = (uc *)tmp_tn - BLOCK_DATA(s->tn_blk);
+    assert(s->tn_blk->byte <= s->tn_blk->alloc);
+#endif
+
+    return rg;
+}
+
+/*
+ * Encodes auxiliary data. Largely duplicated from above, but done so to
+ * keep it simple and avoid a myriad of version ifs.
+ *
+ * Returns the read-group parsed out of the BAM aux fields on success
+ *         NULL on failure or no rg present (FIXME)
+ */
+static char *cram_encode_aux(cram_fd *fd, bam_seq_t *b, cram_container *c,
+			     cram_slice *s, cram_record *cr) {
+    char *aux, *orig, *tmp, *rg = NULL;
+#ifdef SAMTOOLS
+    int aux_size = bam_get_l_aux(b);
+#else
+    int aux_size = bam_blk_size(b) -
+	((char *)bam_aux(b) - (char *)&bam_ref(b));
+#endif
+    cram_block *td_b = c->comp_hdr->TD_blk;
+    int TD_blk_size = BLOCK_SIZE(td_b), new;
+    char *key;
+    khint_t k;
+
+
+    /* Worst case is 1 nul char on every ??:Z: string, so +33% */
+    BLOCK_GROW(s->aux_blk, aux_size*1.34+1);
+    tmp = (char *)BLOCK_END(s->aux_blk);
+
+
+    orig = aux = (char *)bam_aux(b);
+
+    // Copy aux keys to td_b and aux values to s->aux_blk
+    while (aux - orig < aux_size && aux[0] != 0) {
+	uint32_t i32;
+	int r;
+
+	if (aux[0] == 'R' && aux[1] == 'G' && aux[2] == 'Z') {
+	    rg = &aux[3];
+	    while (*aux++);
+	    continue;
+	}
+	if (aux[0] == 'M' && aux[1] == 'D' && aux[2] == 'Z') {
+	    while (*aux++);
+	    continue;
+	}
+	if (aux[0] == 'N' && aux[1] == 'M') {
+	    switch(aux[2]) {
+	    case 'A': case 'C': case 'c': aux+=4; break;
+	    case 'S': case 's':           aux+=5; break;
+	    case 'I': case 'i': case 'f': aux+=7; break;
+	    default:
+		fprintf(stderr, "Unhandled type code for NM tag\n");
+		return NULL;
+	    }
+	    continue;
+	}
+
+	BLOCK_APPEND(td_b, aux, 3);
+
+	i32 = (aux[0]<<16) | (aux[1]<<8) | aux[2];
+	kh_put(s_i2i, c->tags_used, i32, &r);
+	if (-1 == r)
+	    return NULL;
+
+	switch(aux[2]) {
+	case 'A': case 'C': case 'c':
+	    aux+=3;
+	    *tmp++=*aux++;
+	    break;
+
+	case 'S': case 's':
+	    aux+=3;
+	    *tmp++=*aux++; *tmp++=*aux++;
+	    break;
+
+	case 'I': case 'i': case 'f':
+	    aux+=3;
+	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    break;
+
+	case 'd':
+	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+
+	case 'Z': case 'H':
+	    aux+=3;
+	    while ((*tmp++=*aux++));
+	    *tmp++ = '\t'; // stop byte
+	    break;
+
+	case 'B': {
+	    int type = aux[3], blen;
+	    uint32_t count = (uint32_t)((((unsigned char *)aux)[4]<< 0) +
+					(((unsigned char *)aux)[5]<< 8) +
+					(((unsigned char *)aux)[6]<<16) +
+					(((unsigned char *)aux)[7]<<24));
+	    // skip TN field
+	    aux+=3;
+
+	    // We use BYTE_ARRAY_LEN with external length, so store that first
+	    switch (type) {
+	    case 'c': case 'C':
+		blen = count;
+		break;
+	    case 's': case 'S':
+		blen = 2*count;
+		break;
+	    case 'i': case 'I': case 'f':
+		blen = 4*count;
+		break;
+	    default:
+		fprintf(stderr, "Unknown sub-type '%c' for aux type 'B'\n",
+			type);
+		return NULL;
+		    
+	    }
+
+	    tmp += itf8_put(tmp, blen+5);
+
+	    *tmp++=*aux++; // sub-type & length
+	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
+
+	    // The tag data itself
+	    memcpy(tmp, aux, blen); tmp += blen; aux += blen;
+
+	    //cram_stats_add(c->aux_B_stats, blen);
+	    break;
+	}
+	default:
+	    fprintf(stderr, "Unknown aux type '%c'\n", aux[2]);
+	    return NULL;
+	}
+    }
+
+    // FIXME: sort BLOCK_DATA(td_b) by char[3] triples
+    
+    // And and increment TD hash entry
+    BLOCK_APPEND_CHAR(td_b, 0);
+
+    // Duplicate key as BLOCK_DATA() can be realloced to a new pointer.
+    key = string_ndup(c->comp_hdr->TD_keys, 
+		      (char *)BLOCK_DATA(td_b) + TD_blk_size,
+		      BLOCK_SIZE(td_b) - TD_blk_size);
+    k = kh_put(m_s2i, c->comp_hdr->TD_hash, key, &new);
+    if (new < 0) {
+	return NULL;
+    } else if (new == 0) {
+	BLOCK_SIZE(td_b) = TD_blk_size;
+    } else {
+	kh_val(c->comp_hdr->TD_hash, k) = c->comp_hdr->nTL;
+	c->comp_hdr->nTL++;
+    }
+
+    cr->TL = kh_val(c->comp_hdr->TD_hash, k);
+    cram_stats_add(c->TL_stats, cr->TL);
+
+    cr->aux = BLOCK_SIZE(s->aux_blk);
+    cr->aux_size = (uc *)tmp - (BLOCK_DATA(s->aux_blk) + cr->aux);
+    BLOCK_SIZE(s->aux_blk) = (uc *)tmp - BLOCK_DATA(s->aux_blk);
+    assert(s->aux_blk->byte <= s->aux_blk->alloc);
+
+    return rg;
+}
+
+
+/*
+ * Handles creation of a new container or new slice, flushing any
+ * existing containers when appropriate. 
+ *
+ * Really this is next slice, which may or may not lead to a new container.
+ *
+ * Returns cram_container pointer on success
+ *         NULL on failure.
+ */
+static cram_container *cram_next_container(cram_fd *fd, bam_seq_t *b) {
+    cram_container *c = fd->ctr;
+    cram_slice *s;
+    int i;
+
+    /* First occurence */
+    if (c->curr_ref == -2)
+	c->curr_ref = bam_ref(b);
+
+    if (c->slice) {
+	s = c->slice;
+	if (c->multi_seq) {
+	    s->hdr->ref_seq_id    = -2;
+	    s->hdr->ref_seq_start = 0;
+	    s->hdr->ref_seq_span  = 0;
+	} else {
+	    s->hdr->ref_seq_id    = c->curr_ref;
+	    s->hdr->ref_seq_start = c->first_base;
+	    s->hdr->ref_seq_span  = c->last_base - c->first_base + 1;
+	}
+	s->hdr->num_records   = c->curr_rec;
+
+	if (c->curr_slice == 0) {
+	    if (c->ref_seq_id != s->hdr->ref_seq_id)
+		c->ref_seq_id  = s->hdr->ref_seq_id;
+	    c->ref_seq_start = c->first_base;
+	}
+
+	c->curr_slice++;
+    }
+
+    /* Flush container */
+    if (c->curr_slice == c->max_slice ||
+	(bam_ref(b) != c->curr_ref && !c->multi_seq)) {
+	c->ref_seq_span = fd->last_base - c->ref_seq_start + 1;
+	if (fd->verbose)
+	    fprintf(stderr, "Flush container %d/%d..%d\n",
+		    c->ref_seq_id, c->ref_seq_start,
+		    c->ref_seq_start + c->ref_seq_span -1);
+
+	/* Encode slices */
+	if (fd->pool) {
+	    if (-1 == cram_flush_container_mt(fd, c))
+		return NULL;
+	} else {
+	    if (-1 == cram_flush_container(fd, c))
+		return NULL;
+
+	    // Move to sep func, as we need cram_flush_container for
+	    // the closing phase to flush the partial container.
+	    for (i = 0; i < c->max_slice; i++) {
+		cram_free_slice(c->slices[i]);
+		c->slices[i] = NULL;
+	    }
+
+	    c->slice = NULL;
+	    c->curr_slice = 0;
+
+	    /* Easy approach for purposes of freeing stats */
+	    cram_free_container(c);
+	}
+
+	c = fd->ctr = cram_new_container(fd->seqs_per_slice,
+					 fd->slices_per_container);
+	if (!c)
+	    return NULL;
+	c->record_counter = fd->record_counter;
+	c->curr_ref = bam_ref(b);
+    }
+
+    c->last_pos = c->first_base = c->last_base = bam_pos(b)+1;
+
+    /* New slice */
+    c->slice = c->slices[c->curr_slice] =
+	cram_new_slice(MAPPED_SLICE, c->max_rec);
+    if (!c->slice)
+	return NULL;
+
+    if (c->multi_seq) {
+	c->slice->hdr->ref_seq_id = -2;
+	c->slice->hdr->ref_seq_start = 0;
+	c->slice->last_apos = 1;
+    } else {
+	c->slice->hdr->ref_seq_id = bam_ref(b);
+	// wrong for unsorted data, will fix during encoding.
+	c->slice->hdr->ref_seq_start = bam_pos(b)+1;
+	c->slice->last_apos = bam_pos(b)+1;
+    }
+
+    c->curr_rec = 0;
+
+    return c;
+}
+
+/*
+ * Converts a single bam record into a cram record.
+ * Possibly used within a thread.
+ *
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+static int process_one_read(cram_fd *fd, cram_container *c,
+			    cram_slice *s, cram_record *cr,
+			    bam_seq_t *b, int rnum) {
+    int i, fake_qual = 0;
+    char *cp, *rg;
+    char *ref, *seq, *qual;
+
+    // FIXME: multi-ref containers
+
+    ref = c->ref;
+
+    //fprintf(stderr, "%s => %d\n", rg ? rg : "\"\"", cr->rg);
+
+    // Fields to resolve later
+    //cr->mate_line;    // index to another cram_record
+    //cr->mate_flags;   // MF
+    //cr->ntags;        // TC
+    cr->ntags      = 0; //cram_stats_add(c->TC_stats, cr->ntags);
+    if (fd->version == CRAM_1_VERS)
+	rg = cram_encode_aux_1_0(fd, b, c, s, cr);
+    else
+	rg = cram_encode_aux(fd, b, c, s, cr);
+
+    //cr->aux_size = b->blk_size - ((char *)bam_aux(b) - (char *)&bam_ref(b));
+    //cr->aux = DSTRING_LEN(s->aux_ds);
+    //dstring_nappend(s->aux_ds, bam_aux(b), cr->aux_size);
+
+    /* Read group, identified earlier */
+    if (rg) {
+	SAM_RG *brg = sam_hdr_find_rg(fd->header, rg);
+	cr->rg = brg ? brg->id : -1;
+    } else if (fd->version == CRAM_1_VERS) {
+	SAM_RG *brg = sam_hdr_find_rg(fd->header, "UNKNOWN");
+	assert(brg);
+    } else {
+	cr->rg = -1;
+    }
+    cram_stats_add(c->RG_stats, cr->rg);
+
+    
+    cr->ref_id      = bam_ref(b);  cram_stats_add(c->RI_stats, cr->ref_id);
+    cr->flags       = bam_flag(b);
+    if (bam_cigar_len(b) == 0)
+	cr->flags |= BAM_FUNMAP;
+    cram_stats_add(c->BF_stats, fd->cram_flag_swap[cr->flags & 0xfff]);
+
+    if (!fd->no_ref)
+	cr->cram_flags = CRAM_FLAG_PRESERVE_QUAL_SCORES;
+    else
+	cr->cram_flags = 0;
+    //cram_stats_add(c->CF_stats, cr->cram_flags);
+
+    cr->len         = bam_seq_len(b); cram_stats_add(c->RL_stats, cr->len);
+    c->num_bases   += cr->len;
+    cr->apos        = bam_pos(b)+1;
+    if (c->pos_sorted) {
+	if (cr->apos < s->last_apos) {
+	    c->pos_sorted = 0;
+	} else {
+	    cram_stats_add(c->AP_stats, cr->apos - s->last_apos);
+	    s->last_apos = cr->apos;
+	}
+    } else {
+	//cram_stats_add(c->AP_stats, cr->apos);
+    }
+    c->max_apos += (cr->apos > c->max_apos) * (cr->apos - c->max_apos);
+
+    cr->name        = BLOCK_SIZE(s->name_blk);
+    cr->name_len    = bam_name_len(b);
+    cram_stats_add(c->RN_stats, cr->name_len);
+
+    BLOCK_APPEND(s->name_blk, bam_name(b), bam_name_len(b));
+
+
+    /*
+     * This seqs_ds is largely pointless and it could reuse the same memory
+     * over and over.
+     * s->base_ds is what we need for encoding.
+     */
+    cr->seq         = BLOCK_SIZE(s->seqs_blk);
+    cr->qual        = BLOCK_SIZE(s->qual_blk);
+    BLOCK_GROW(s->seqs_blk, cr->len+1);
+    BLOCK_GROW(s->qual_blk, cr->len);
+    seq = cp = (char *)BLOCK_END(s->seqs_blk);
+
+    *seq = 0;
+    for (i = 0; i < cr->len; i++) {
+	// FIXME: do 2 char at a time for efficiency
+#ifdef SAMTOOLS
+	cp[i] = seq_nt16_str[bam_seqi(bam_seq(b), i)];
+#else
+	cp[i] = bam_nt16_rev_table[bam_seqi(bam_seq(b), i)];
+#endif
+    }
+    BLOCK_SIZE(s->seqs_blk) += cr->len;
+
+    qual = cp = (char *)bam_qual(b);
+
+    /* Copy and parse */
+    if (!(cr->flags & BAM_FUNMAP)) {
+	int32_t *cig_to, *cig_from;
+	int apos = cr->apos-1, spos = 0;
+
+	cr->cigar       = s->ncigar;
+	cr->ncigar      = bam_cigar_len(b);
+	while (cr->cigar + cr->ncigar >= s->cigar_alloc) {
+	    s->cigar_alloc = s->cigar_alloc ? s->cigar_alloc*2 : 1024;
+	    s->cigar = realloc(s->cigar, s->cigar_alloc * sizeof(*s->cigar));
+	    if (!s->cigar)
+		return -1;
+	}
+
+	cig_to = (int32_t *)s->cigar;
+	cig_from = (int32_t *)bam_cigar(b);
+
+	cr->feature = 0;
+	cr->nfeature = 0;
+	for (i = 0; i < cr->ncigar; i++) {
+	    enum cigar_op cig_op = cig_from[i] & BAM_CIGAR_MASK;
+	    int cig_len = cig_from[i] >> BAM_CIGAR_SHIFT;
+	    cig_to[i] = cig_from[i];
+
+	    /* Can also generate events from here for CRAM diffs */
+
+	    switch (cig_op) {
+		int l;
+
+		// Don't trust = and X ops to be correct.
+	    case BAM_CMATCH:
+	    case BAM_CBASE_MATCH:
+	    case BAM_CBASE_MISMATCH:
+		//fprintf(stderr, "\nBAM_CMATCH\nR: %.*s\nS: %.*s\n",
+		//	cig_len, &ref[apos], cig_len, &seq[spos]);
+		l = 0;
+		if (!fd->no_ref && cr->len) {
+		    int end = cig_len+apos < c->ref_end
+			? cig_len : c->ref_end - apos;
+		    for (l = 0; l < end && seq[spos]; l++, apos++, spos++) {
+			if (ref[apos] != seq[spos]) {
+			    //fprintf(stderr, "Subst: %d; %c vs %c\n",
+			    //	spos, ref[apos], seq[spos]);
+			    if (cram_add_substitution(fd, c, s, cr, spos,
+						      seq[spos], qual[spos],
+						      ref[apos]))
+				return -1;
+			}
+		    }
+		}
+
+		if (l < cig_len && cr->len) {
+		    /* off end of sequence or non-ref based output */
+		    for (; l < cig_len && seq[spos]; l++, spos++) {
+			if (cram_add_base(fd, c, s, cr, spos,
+					  seq[spos], qual[spos]))
+			    return -1;
+		    }
+		    apos += cig_len;
+		} else if (!cr->len) {
+		    /* Seq "*" */
+		    apos += cig_len;
+		    spos += cig_len;
+		}
+		break;
+		
+	    case BAM_CDEL:
+		if (cram_add_deletion(c, s, cr, spos, cig_len, &seq[spos]))
+		    return -1;
+		apos += cig_len;
+		break;
+
+	    case BAM_CREF_SKIP:
+		if (cram_add_skip(c, s, cr, spos, cig_len, &seq[spos]))
+		    return -1;
+		apos += cig_len;
+		break;
+
+	    case BAM_CINS:
+		if (cram_add_insertion(c, s, cr, spos, cig_len,
+				       cr->len ? &seq[spos] : NULL))
+		    return -1;
+		if (fd->no_ref && cr->len) {
+		    for (l = 0; l < cig_len; l++, spos++) {
+			cram_add_quality(fd, c, s, cr, spos, qual[spos]);
+		    }
+		} else {
+		    spos += cig_len;
+		}
+		break;
+
+	    case BAM_CSOFT_CLIP:
+		if (cram_add_softclip(c, s, cr, spos, cig_len,
+				      cr->len ? &seq[spos] : NULL,
+				      fd->version))
+		    return -1;
+		if (fd->no_ref) {
+		    if (cr->len) {
+			for (l = 0; l < cig_len; l++, spos++) {
+			    cram_add_quality(fd, c, s, cr, spos, qual[spos]);
+			}
+		    } else {
+			for (l = 0; l < cig_len; l++, spos++) {
+			    cram_add_quality(fd, c, s, cr, spos, -1);
+			}
+		    }
+		} else {
+		    spos += cig_len;
+		}
+		break;
+
+	    case BAM_CHARD_CLIP:
+		if (cram_add_hardclip(c, s, cr, spos, cig_len, &seq[spos]))
+		    return -1;
+		break;
+	
+	    case BAM_CPAD:
+		if (cram_add_pad(c, s, cr, spos, cig_len, &seq[spos]))
+		    return -1;
+		break;
+	    }
+	}
+	fake_qual = spos;
+	cr->aend = MIN(apos, c->ref_end);
+	cram_stats_add(c->FN_stats, cr->nfeature);
+    } else {
+	// Unmapped
+	cr->cram_flags |= CRAM_FLAG_PRESERVE_QUAL_SCORES;
+	cr->cigar  = 0;
+	cr->ncigar = 0;
+	cr->nfeature = 0;
+	cr->aend = cr->apos;
+#ifdef BA_external
+	s->BA_len += cr->len;
+#else
+	for (i = 0; i < cr->len; i++)
+	    cram_stats_add(c->BA_stats, seq[i]);
+#endif
+    }
+
+    /*
+     * Append to the qual block now. We do this here as
+     * cram_add_substitution() can generate BA/QS events which need to 
+     * be in the qual block before we append the rest of the data.
+     */
+    if (cr->cram_flags & CRAM_FLAG_PRESERVE_QUAL_SCORES) {
+	/* Special case of seq "*" */
+	if (cr->len == 0) {
+	    cram_stats_add(c->RL_stats, cr->len = fake_qual);
+	    BLOCK_GROW(s->qual_blk, cr->len);
+	    cp = (char *)BLOCK_END(s->qual_blk);
+	    memset(cp, 255, cr->len);
+	} else {
+	    BLOCK_GROW(s->qual_blk, cr->len);
+	    cp = (char *)BLOCK_END(s->qual_blk);
+	    char *from = (char *)&bam_qual(b)[0];
+	    char *to = &cp[0];
+	    memcpy(to, from, cr->len);
+	    //for (i = 0; i < cr->len; i++) cp[i] = from[i];
+	}
+	BLOCK_SIZE(s->qual_blk) += cr->len;
+    } else {
+	if (cr->len == 0) {
+	    cram_stats_add(c->RL_stats, cr->len = cr->aend - cr->apos + 1);
+	}
+    }
+
+    /* Now we know apos and aend both, update mate-pair information */
+    {
+	int new;
+	khint_t k;
+
+	//fprintf(stderr, "Checking %"PRId64"/%.*s\t", rnum,
+	//	cr->name_len, DSTRING_STR(s->name_ds)+cr->name);
+	if (cr->flags & BAM_FPAIRED) {
+	    char *key = string_ndup(s->pair_keys,
+				    (char *)BLOCK_DATA(s->name_blk)+cr->name,
+				    cr->name_len);
+	    if (!key)
+		return -1;
+
+	    k = kh_put(m_s2i, s->pair, key, &new);
+	    if (-1 == new)
+		return -1;
+	    else if (new > 0)
+		kh_val(s->pair, k) = rnum;
+	} else {
+	    new = 1;
+	}
+
+	if (new == 0) {
+	    cram_record *p = &s->crecs[kh_val(s->pair, k)];
+	    
+	    //fprintf(stderr, "paired %"PRId64"\n", kh_val(s->pair, k));
+
+	    // copy from p to cr
+	    cr->mate_pos = p->apos;
+	    cram_stats_add(c->NP_stats, cr->mate_pos);
+
+	    cr->tlen = cr->aend - p->apos;
+	    cram_stats_add(c->TS_stats, cr->tlen);
+
+	    cr->mate_flags =
+		((p->flags & BAM_FMUNMAP)   == BAM_FMUNMAP)   * CRAM_M_UNMAP +
+		((p->flags & BAM_FMREVERSE) == BAM_FMREVERSE) * CRAM_M_REVERSE;
+	    cram_stats_add(c->MF_stats, cr->mate_flags);
+
+	    // copy from cr to p
+	    cram_stats_del(c->NP_stats, p->mate_pos);
+	    p->mate_pos = cr->apos;
+	    cram_stats_add(c->NP_stats, p->mate_pos);
+
+	    cram_stats_del(c->MF_stats, p->mate_flags);
+	    p->mate_flags =
+		((cr->flags & BAM_FMUNMAP)   == BAM_FMUNMAP)  * CRAM_M_UNMAP +
+		((cr->flags & BAM_FMREVERSE) == BAM_FMREVERSE)* CRAM_M_REVERSE;
+	    cram_stats_add(c->MF_stats, p->mate_flags);
+
+	    cram_stats_del(c->TS_stats, p->tlen);
+	    p->tlen = p->apos - cr->aend;
+	    cram_stats_add(c->TS_stats, p->tlen);
+
+	    // Clear detached from cr flags
+	    //cram_stats_del(c->CF_stats, cr->cram_flags);
+	    cr->cram_flags &= ~CRAM_FLAG_DETACHED;
+	    cram_stats_add(c->CF_stats, cr->cram_flags);
+
+	    // Clear detached from p flags and set downstream
+	    cram_stats_del(c->CF_stats, p->cram_flags);
+	    p->cram_flags  &= ~CRAM_FLAG_DETACHED;
+	    p->cram_flags  |=  CRAM_FLAG_MATE_DOWNSTREAM;
+	    cram_stats_add(c->CF_stats, p->cram_flags);
+
+	    p->mate_line = rnum - (kh_val(s->pair, k) + 1);
+	    cram_stats_add(c->NF_stats, p->mate_line);
+
+	    kh_val(s->pair, k) = rnum;
+	} else {
+	    //fprintf(stderr, "unpaired\n");
+
+	    /* Derive mate flags from this flag */
+	    cr->mate_flags = 0;
+	    if (bam_flag(b) & BAM_FMUNMAP)
+		cr->mate_flags |= CRAM_M_UNMAP;
+	    if (bam_flag(b) & BAM_FMREVERSE)
+		cr->mate_flags |= CRAM_M_REVERSE;
+
+	    cram_stats_add(c->MF_stats, cr->mate_flags);
+
+	    cr->mate_pos    = MAX(bam_mate_pos(b)+1, 0);
+	    cram_stats_add(c->NP_stats, cr->mate_pos);
+
+	    cr->tlen        = bam_ins_size(b);
+	    cram_stats_add(c->TS_stats, cr->tlen);
+
+	    cr->cram_flags |= CRAM_FLAG_DETACHED;
+	    cram_stats_add(c->CF_stats, cr->cram_flags);
+	}
+    }
+
+    cr->mqual       = bam_map_qual(b);
+    cram_stats_add(c->MQ_stats, cr->mqual);
+
+    cr->mate_ref_id = bam_mate_ref(b);
+    cram_stats_add(c->NS_stats, cr->mate_ref_id);
+
+    if (!(bam_flag(b) & BAM_FUNMAP)) {
+	if (c->first_base > cr->apos)
+	    c->first_base = cr->apos;
+
+	if (c->last_base < cr->aend)
+	    c->last_base = cr->aend;
+    }
+
+    return 0;
+}
+
+/*
+ * Write iterator: put BAM format sequences into a CRAM file.
+ * We buffer up a containers worth of data at a time.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_put_bam_seq(cram_fd *fd, bam_seq_t *b) {
+    cram_container *c;
+
+    if (!fd->ctr) {
+	fd->ctr = cram_new_container(fd->seqs_per_slice,
+				     fd->slices_per_container);
+	if (!fd->ctr)
+	    return -1;
+	fd->ctr->record_counter = fd->record_counter;
+    }
+    c = fd->ctr;
+
+    if (!c->slice || c->curr_rec == c->max_rec ||
+	(bam_ref(b) != c->curr_ref && c->curr_ref >= -1)) {
+	int slice_rec, curr_rec, multi_seq = fd->multi_seq == 1;
+	int curr_ref = c->slice ? c->curr_ref : bam_ref(b);
+
+
+	/*
+	 * Start packing slices when we routinely have under 1/4tr full.
+	 *
+	 * This option isn't available if we choose to embed references
+	 * since we can only have one per slice.
+	 */
+	if (fd->multi_seq == -1 && c->curr_rec < c->max_rec/4+10 &&
+	    fd->last_slice && fd->last_slice < c->max_rec/4+10 &&
+	    !fd->embed_ref) {
+	    if (fd->verbose && !c->multi_seq)
+		fprintf(stderr, "Multi-ref enabled for this container\n");
+	    multi_seq = 1;
+	}
+
+	slice_rec = c->slice_rec;
+	curr_rec  = c->curr_rec;
+
+	if (fd->version == CRAM_1_VERS ||
+	    c->curr_rec == c->max_rec || fd->multi_seq != 1 || !c->slice)
+	    if (NULL == (c = cram_next_container(fd, b)))
+		return -1;
+
+	/*
+	 * Due to our processing order, some things we've already done we
+	 * cannot easily undo. So when we first notice we should be packing
+	 * multiple sequences per container we emit the small partial
+	 * container as-is and then start a fresh one in a different mode.
+	 */
+	if (multi_seq) {
+	    fd->multi_seq = 1;
+	    c->multi_seq = 1;
+	    c->pos_sorted = 0; // required atm for multi_seq slices
+
+	    if (!c->refs_used) {
+		pthread_mutex_lock(&fd->ref_lock);
+		c->refs_used = calloc(fd->refs->nref, sizeof(int));
+		pthread_mutex_unlock(&fd->ref_lock);
+		if (!c->refs_used)
+		    return -1;
+	    }
+	}
+
+	fd->last_slice = curr_rec - slice_rec;
+	c->slice_rec = c->curr_rec;
+
+	// Have we seen this reference before?
+	if (bam_ref(b) >= 0 && bam_ref(b) != curr_ref && !fd->embed_ref &&
+	    !fd->unsorted) {
+	    
+	    if (!c->refs_used) {
+		pthread_mutex_lock(&fd->ref_lock);
+		c->refs_used = calloc(fd->refs->nref, sizeof(int));
+		pthread_mutex_unlock(&fd->ref_lock);
+		if (!c->refs_used)
+		    return -1;
+	    } else if (c->refs_used && c->refs_used[bam_ref(b)]) {
+		fprintf(stderr, "Unsorted mode enabled\n");
+		pthread_mutex_lock(&fd->ref_lock);
+		fd->unsorted = 1;
+		pthread_mutex_unlock(&fd->ref_lock);
+		fd->multi_seq = 1;
+	    }
+	}
+
+	c->curr_ref = bam_ref(b);
+	if (c->refs_used && c->curr_ref >= 0) c->refs_used[c->curr_ref]++;
+    }
+
+    if (!c->bams) {
+	/* First time through, allocate a set of bam pointers */
+	pthread_mutex_lock(&fd->bam_list_lock);
+	if (fd->bl) {
+	    spare_bams *spare = fd->bl;
+	    c->bams = spare->bams;
+	    fd->bl = spare->next;
+	    free(spare);
+	} else {
+	    c->bams = calloc(c->max_c_rec, sizeof(bam_seq_t *));
+	    if (!c->bams)
+		return -1;
+	}
+	pthread_mutex_unlock(&fd->bam_list_lock);
+    }
+
+    /* Copy or alloc+copy the bam record, for later encoding */
+    if (c->bams[c->curr_c_rec])
+	bam_copy(&c->bams[c->curr_c_rec], b);
+    else
+	c->bams[c->curr_c_rec] = bam_dup(b);
+
+    c->curr_rec++;
+    c->curr_c_rec++;
+    fd->record_counter++;
+
+    return 0;
+}
diff --git a/htslib/cram/cram_encode.h b/htslib/cram/cram_encode.h
new file mode 100644
index 0000000..9131d6e
--- /dev/null
+++ b/htslib/cram/cram_encode.h
@@ -0,0 +1,105 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*! \file
+ * Include cram.h instead.
+ *
+ * This is an internal part of the CRAM system and is automatically included
+ * when you #include cram.h.
+ *
+ * Implements the encoding portion of CRAM I/O. Also see
+ * cram_codecs.[ch] for the actual encoding functions themselves.
+ */
+
+#ifndef _CRAM_WRITE_H_
+#define _CRAM_WRITE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ----------------------------------------------------------------------
+ * CRAM sequence iterators.
+ */
+
+/*! Write iterator: put BAM format sequences into a CRAM file.
+ *
+ * We buffer up a containers worth of data at a time.
+ *
+ * FIXME: break this into smaller pieces.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_put_bam_seq(cram_fd *fd, bam_seq_t *b);
+
+
+/* ----------------------------------------------------------------------
+ * Internal functions
+ */
+
+/*! INTERNAL:
+ * Encodes a compression header block into a generic cram_block structure.
+ *
+ * @return
+ * Returns cram_block ptr on success;
+ *         NULL on failure
+ */
+cram_block *cram_encode_compression_header(cram_fd *fd, cram_container *c,
+					   cram_block_compression_hdr *h);
+
+/*! INTERNAL:
+ * Encodes a slice compression header. 
+ *
+ * @return
+ * Returns cram_block on success;
+ *         NULL on failure
+ */
+cram_block *cram_encode_slice_header(cram_fd *fd, cram_slice *s);
+
+/*! INTERNAL:
+ * Encodes all slices in a container into blocks.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ *
+ * FIXME: separate into encode_container and write_container. Ideally
+ * we should be able to do read_container / write_container or
+ * decode_container / encode_container.
+ */
+int cram_encode_container(cram_fd *fd, cram_container *c);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/htslib/cram/cram_index.c b/htslib/cram/cram_index.c
new file mode 100644
index 0000000..d78b3e0
--- /dev/null
+++ b/htslib/cram/cram_index.c
@@ -0,0 +1,503 @@
+/*
+Copyright (c) 2013-2014 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+ * The index is a gzipped tab-delimited text file with one line per slice.
+ * The columns are:
+ * 1: reference number (0 to N-1, as per BAM ref_id)
+ * 2: reference position of 1st read in slice (1..?)
+ * 3: number of reads in slice
+ * 4: offset of container start (relative to end of SAM header, so 1st
+ *    container is offset 0).
+ * 5: slice number within container (ie which landmark).
+ *
+ * In memory, we hold this in a nested containment list. Each list element is
+ * a cram_index struct. Each element in turn can contain its own list of
+ * cram_index structs.
+ *
+ * Any start..end range which is entirely contained within another (and
+ * earlier as it is sorted) range will be held within it. This ensures that
+ * the outer list will never have containments and we can safely do a
+ * binary search to find the first range which overlaps any given coordinate.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <zlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <math.h>
+#include <ctype.h>
+
+#include "htslib/hfile.h"
+#include "cram/cram.h"
+#include "cram/os.h"
+#include "cram/zfio.h"
+
+#if 0
+static void dump_index_(cram_index *e, int level) {
+    int i, n;
+    n = printf("%*s%d / %d .. %d, ", level*4, "", e->refid, e->start, e->end);
+    printf("%*soffset %"PRId64"\n", MAX(0,50-n), "", e->offset);
+    for (i = 0; i < e->nslice; i++) {
+	dump_index_(&e->e[i], level+1);
+    }
+}
+
+static void dump_index(cram_fd *fd) {
+    int i;
+    for (i = 0; i < fd->index_sz; i++) {
+	dump_index_(&fd->index[i], 0);
+    }
+}
+#endif
+
+/*
+ * Loads a CRAM .crai index into memory.
+ *
+ * Returns 0 for success
+ *        -1 for failure
+ */
+int cram_index_load(cram_fd *fd, const char *fn) {
+    char fn2[PATH_MAX];
+    char buf[65536];
+    ssize_t len;
+    kstring_t kstr = {0};
+    hFILE *fp;
+    cram_index *idx;
+    cram_index **idx_stack = NULL, *ep, e;
+    int idx_stack_alloc = 0, idx_stack_ptr = 0;
+    size_t pos = 0;
+
+    /* Check if already loaded */
+    if (fd->index)
+	return 0;
+
+    fd->index = calloc((fd->index_sz = 1), sizeof(*fd->index));
+    if (!fd->index)
+	return -1;
+
+    idx = &fd->index[0];
+    idx->refid = -1;
+    idx->start = INT_MIN;
+    idx->end   = INT_MAX;
+
+    idx_stack = calloc(++idx_stack_alloc, sizeof(*idx_stack));
+    idx_stack[idx_stack_ptr] = idx;
+
+    sprintf(fn2, "%s.crai", fn);
+    if (!(fp = hopen(fn2, "r"))) {
+	perror(fn2);
+	free(idx_stack);
+	return -1; 
+    }
+
+    // Load the file into memory
+    while ((len = hread(fp, buf, 65536)) > 0)
+	kputsn(buf, len, &kstr);
+    if (len < 0 || kstr.l < 2) {
+	if (kstr.s)
+	    free(kstr.s);
+	free(idx_stack);
+	return -1;
+    }
+
+    if (hclose(fp)) {
+	if (kstr.s)
+	    free(kstr.s);
+	free(idx_stack);
+	return -1;
+    }
+	
+
+    // Uncompress if required
+    if (kstr.s[0] == 31 && (uc)kstr.s[1] == 139) {
+	size_t l;
+	char *s = zlib_mem_inflate(kstr.s, kstr.l, &l);
+	free(kstr.s);
+	if (!s) {
+	    free(idx_stack);
+	    return -1;
+	}
+	kstr.s = s;
+	kstr.l = l;
+    }
+
+
+    // Parse it line at a time
+    do {
+	int nchars;
+	char *line = &kstr.s[pos];
+
+	/* 1.1 layout */
+	if (sscanf(line, "%d\t%d\t%d\t%"PRId64"\t%d\t%d%n",
+		   &e.refid,
+		   &e.start,
+		   &e.end,
+		   &e.offset,
+		   &e.slice,
+		   &e.len,
+		   &nchars) != 6) {
+	    free(kstr.s);
+	    free(idx_stack);
+	    return -1;
+	}
+
+	e.end += e.start-1;
+	//printf("%d/%d..%d\n", e.refid, e.start, e.end);
+
+	if (e.refid < -1) {
+	    free(kstr.s);
+	    free(idx_stack);
+	    fprintf(stderr, "Malformed index file, refid %d\n", e.refid);
+	    return -1;
+	}
+
+	if (e.refid != idx->refid) {
+	    if (fd->index_sz < e.refid+2) {
+		size_t index_end = fd->index_sz * sizeof(*fd->index);
+		fd->index_sz = e.refid+2;
+		fd->index = realloc(fd->index,
+				    fd->index_sz * sizeof(*fd->index));
+		memset(((char *)fd->index) + index_end, 0,
+		       fd->index_sz * sizeof(*fd->index) - index_end);
+	    }
+	    idx = &fd->index[e.refid+1];
+	    idx->refid = e.refid;
+	    idx->start = INT_MIN;
+	    idx->end   = INT_MAX;
+	    idx->nslice = idx->nalloc = 0;
+	    idx->e = NULL;
+	    idx_stack[(idx_stack_ptr = 0)] = idx;
+	}
+
+	while (!(e.start >= idx->start && e.end <= idx->end)) {
+	    idx = idx_stack[--idx_stack_ptr];
+	}
+
+	// Now contains, so append
+	if (idx->nslice+1 >= idx->nalloc) {
+	    idx->nalloc = idx->nalloc ? idx->nalloc*2 : 16;
+	    idx->e = realloc(idx->e, idx->nalloc * sizeof(*idx->e));
+	}
+
+	e.nalloc = e.nslice = 0; e.e = NULL;
+	*(ep = &idx->e[idx->nslice++]) = e;
+	idx = ep;
+
+	if (++idx_stack_ptr >= idx_stack_alloc) {
+	    idx_stack_alloc *= 2;
+	    idx_stack = realloc(idx_stack, idx_stack_alloc*sizeof(*idx_stack));
+	}
+	idx_stack[idx_stack_ptr] = idx;
+
+	pos += nchars;
+	while (pos < kstr.l && kstr.s[pos] != '\n')
+	    pos++;
+	pos++;
+    } while (pos < kstr.l);
+
+    free(idx_stack);
+    free(kstr.s);
+
+    // dump_index(fd);
+
+    return 0;
+}
+
+static void cram_index_free_recurse(cram_index *e) {
+    if (e->e) {
+	int i;
+	for (i = 0; i < e->nslice; i++) {
+	    cram_index_free_recurse(&e->e[i]);
+	}
+	free(e->e);
+    }
+}
+
+void cram_index_free(cram_fd *fd) {
+    int i;
+
+    if (!fd->index)
+	return;
+    
+    for (i = 0; i < fd->index_sz; i++) {
+	cram_index_free_recurse(&fd->index[i]);
+    }
+    free(fd->index);
+
+    fd->index = NULL;
+}
+
+/*
+ * Searches the index for the first slice overlapping a reference ID
+ * and position, or one immediately preceeding it if none is found in
+ * the index to overlap this position. (Our index may have missing
+ * entries, but we require at least one per reference.)
+ *
+ * If the index finds multiple slices overlapping this position we
+ * return the first one only. Subsequent calls should specifying
+ * "from" as the last slice we checked to find the next one. Otherwise
+ * set "from" to be NULL to find the first one.
+ *
+ * Returns the cram_index pointer on sucess
+ *         NULL on failure
+ */
+cram_index *cram_index_query(cram_fd *fd, int refid, int pos, 
+			     cram_index *from) {
+    int i, j, k;
+    cram_index *e;
+
+    if (refid+1 < 0 || refid+1 >= fd->index_sz)
+	return NULL;
+
+    i = 0, j = fd->index[refid+1].nslice-1;
+
+    if (!from)
+	from = &fd->index[refid+1];
+
+    for (k = j/2; k != i; k = (j-i)/2 + i) {
+	if (from->e[k].refid > refid) {
+	    j = k;
+	    continue;
+	}
+
+	if (from->e[k].refid < refid) {
+	    i = k;
+	    continue;
+	}
+
+	if (from->e[k].start >= pos) {
+	    j = k;
+	    continue;
+	}
+
+	if (from->e[k].start < pos) {
+	    i = k;
+	    continue;
+	}
+    }
+
+    /* The above found *a* bin overlapping, but not necessarily the first */
+    while (i > 0 && from->e[i-1].end >= pos)
+	i--;
+
+    /* Special case for matching a start pos */
+    if (i+1 < from->nslice &&
+	from->e[i+1].start == pos &&
+	from->e[i+1].refid == refid)
+	i++;
+
+    e = &from->e[i];
+
+    return e;
+}
+
+
+/*
+ * Skips to a container overlapping the start coordinate listed in
+ * cram_range.
+ *
+ * In theory we call cram_index_query multiple times, once per slice
+ * overlapping the range. However slices may be absent from the index
+ * which makes this problematic. Instead we find the left-most slice
+ * and then read from then on, skipping decoding of slices and/or
+ * whole containers when they don't overlap the specified cram_range.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_seek_to_refpos(cram_fd *fd, cram_range *r) {
+    cram_index *e;
+
+    // Ideally use an index, so see if we have one.
+    if ((e = cram_index_query(fd, r->refid, r->start, NULL))) {
+	if (0 != cram_seek(fd, e->offset, SEEK_SET))
+	    if (0 != cram_seek(fd, e->offset - fd->first_container, SEEK_CUR))
+		return -1;
+    } else {
+	fprintf(stderr, "Unknown reference ID. Missing from index?\n");
+	return -1;
+    }
+
+    if (fd->ctr) {
+	cram_free_container(fd->ctr);
+	fd->ctr = NULL;
+    }
+
+    return 0;
+}
+
+
+/*
+ * A specialised form of cram_index_build (below) that deals with slices
+ * having multiple references in this (ref_id -2). In this scenario we
+ * decode the slice to look at the RI data series instead.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+static int cram_index_build_multiref(cram_fd *fd,
+				     cram_container *c,
+				     cram_slice *s,
+				     zfp *fp,
+				     off_t cpos,
+				     int32_t landmark,
+				     int sz) {
+    int i, ref = -2, ref_start = 0, ref_end;
+    char buf[1024];
+
+    if (0 != cram_decode_slice(fd, c, s, fd->header))
+	return -1;
+
+    ref_end = INT_MIN;
+    for (i = 0; i < s->hdr->num_records; i++) {
+	if (s->crecs[i].ref_id == ref) {
+	    if (ref_end < s->crecs[i].aend)
+		ref_end = s->crecs[i].aend;
+	    continue;
+	}
+
+	if (ref != -2) {
+	    sprintf(buf, "%d\t%d\t%d\t%"PRId64"\t%d\t%d\n",
+		    ref, ref_start, ref_end - ref_start + 1,
+		    (int64_t)cpos, landmark, sz);
+	    zfputs(buf, fp);
+	}
+
+	ref = s->crecs[i].ref_id;
+	ref_start = s->crecs[i].apos;
+	ref_end = INT_MIN;
+    }
+
+    if (ref != -2) {
+	sprintf(buf, "%d\t%d\t%d\t%"PRId64"\t%d\t%d\n",
+		ref, ref_start, ref_end - ref_start + 1,
+		(int64_t)cpos, landmark, sz);
+	zfputs(buf, fp);
+    }
+
+    return 0;
+}
+
+/*
+ * Builds an index file.
+ *
+ * fd is a newly opened cram file that we wish to index.
+ * fn_base is the filename of the associated CRAM file. Internally we
+ * add ".crai" to this to get the index filename.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_index_build(cram_fd *fd, const char *fn_base) {
+    cram_container *c;
+    off_t cpos, spos, hpos;
+    zfp *fp;
+    char fn_idx[PATH_MAX];
+
+    if (strlen(fn_base) > PATH_MAX-6)
+	return -1;
+
+    sprintf(fn_idx, "%s.crai", fn_base);
+    if (!(fp = zfopen(fn_idx, "wz"))) {
+        perror(fn_idx);
+        return -1;
+    }
+
+    cpos = htell(fd->fp);
+    while ((c = cram_read_container(fd))) {
+        int j;
+
+        if (fd->err) {
+            perror("Cram container read");
+            return 1;
+        }
+
+        hpos = htell(fd->fp);
+
+        if (!(c->comp_hdr_block = cram_read_block(fd)))
+            return 1;
+        assert(c->comp_hdr_block->content_type == COMPRESSION_HEADER);
+
+        c->comp_hdr = cram_decode_compression_header(fd, c->comp_hdr_block);
+        if (!c->comp_hdr)
+            return -1;
+
+        // 2.0 format
+        for (j = 0; j < c->num_landmarks; j++) {
+            char buf[1024];
+            cram_slice *s;
+            int sz;
+
+            spos = htell(fd->fp);
+            assert(spos - cpos - c->offset == c->landmark[j]);
+
+            if (!(s = cram_read_slice(fd))) {
+		zfclose(fp);
+		return -1;
+	    }
+
+            sz = (int)(htell(fd->fp) - spos);
+
+	    if (s->hdr->ref_seq_id == -2) {
+		cram_index_build_multiref(fd, c, s, fp,
+					  cpos, c->landmark[j], sz);
+	    } else {
+		sprintf(buf, "%d\t%d\t%d\t%"PRId64"\t%d\t%d\n",
+			s->hdr->ref_seq_id, s->hdr->ref_seq_start,
+			s->hdr->ref_seq_span, (int64_t)cpos,
+			c->landmark[j], sz);
+		zfputs(buf, fp);
+	    }
+
+            cram_free_slice(s);
+        }
+
+        cpos = htell(fd->fp);
+        assert(cpos == hpos + c->length);
+
+        cram_free_container(c);
+    }
+    if (fd->err) {
+	zfclose(fp);
+	return -1;
+    }
+	
+
+    return zfclose(fp);
+}
diff --git a/htslib/cram/cram_index.h b/htslib/cram/cram_index.h
new file mode 100644
index 0000000..5e3b8f5
--- /dev/null
+++ b/htslib/cram/cram_index.h
@@ -0,0 +1,98 @@
+/*
+Copyright (c) 2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _CRAM_INDEX_H_
+#define _CRAM_INDEX_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Loads a CRAM .crai index into memory.
+ * Returns 0 for success
+ *        -1 for failure
+ */
+int cram_index_load(cram_fd *fd, const char *fn);
+
+void cram_index_free(cram_fd *fd);
+
+/*
+ * Searches the index for the first slice overlapping a reference ID
+ * and position.
+ *
+ * Returns the cram_index pointer on sucess
+ *         NULL on failure
+ */
+cram_index *cram_index_query(cram_fd *fd, int refid, int pos, cram_index *frm);
+
+/*
+ * Skips to a container overlapping the start coordinate listed in
+ * cram_range.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_seek_to_refpos(cram_fd *fd, cram_range *r);
+
+void cram_index_free(cram_fd *fd);
+
+/*
+ * Skips to a container overlapping the start coordinate listed in
+ * cram_range.
+ *
+ * In theory we call cram_index_query multiple times, once per slice
+ * overlapping the range. However slices may be absent from the index
+ * which makes this problematic. Instead we find the left-most slice
+ * and then read from then on, skipping decoding of slices and/or
+ * whole containers when they don't overlap the specified cram_range.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_seek_to_refpos(cram_fd *fd, cram_range *r);
+
+/*
+ * Builds an index file.
+ *
+ * fd is a newly opened cram file that we wish to index.
+ * fn_base is the filename of the associated CRAM file. Internally we
+ * add ".crai" to this to get the index filename.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_index_build(cram_fd *fd, const char *fn_base);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/htslib/cram/cram_io.c b/htslib/cram/cram_io.c
new file mode 100644
index 0000000..8abc59d
--- /dev/null
+++ b/htslib/cram/cram_io.c
@@ -0,0 +1,3652 @@
+/*
+Copyright (c) 2012-2014 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+ * CRAM I/O primitives.
+ *
+ * - ITF8 encoding and decoding.
+ * - Block based I/O
+ * - Zlib inflating and deflating (memory)
+ * - CRAM basic data structure reading and writing
+ * - File opening / closing
+ * - Reference sequence handling
+ */
+
+/*
+ * TODO: BLOCK_GROW, BLOCK_RESIZE, BLOCK_APPEND and itf8_put_blk all need
+ * a way to return errors for when malloc fails.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <zlib.h>
+#ifdef HAVE_LIBBZ2
+#include <bzlib.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <math.h>
+#include <ctype.h>
+
+#include "cram/cram.h"
+#include "cram/os.h"
+#include "cram/md5.h"
+#include "cram/open_trace_file.h"
+
+//#define REF_DEBUG
+
+#ifdef REF_DEBUG
+#include <sys/syscall.h>
+#define gettid() (int)syscall(SYS_gettid)
+
+#define RP(...) fprintf (stderr, __VA_ARGS__)
+#else
+#define RP(...) 
+#endif
+
+#ifdef SAMTOOLS
+#include "htslib/hfile.h"
+#define paranoid_hclose(fp) (hclose(fp))
+#else
+#define hclose_abruptly(fp) (fclose(fp))
+#define hflush(fp)   (fflush(fp))
+#define hgetc(fp)    (getc(fp))
+#define hputc(c, fp) (putc((c), (fp)))
+#define hread(fp, buffer, nbytes)  (fread((buffer), 1, (nbytes), (fp)))
+#define hseek(fp, offset, whence)  (fseeko((fp), (offset), (whence)))
+#define hwrite(fp, buffer, nbytes) (fwrite((buffer), 1, (nbytes), (fp)))
+#define paranoid_hclose(fp)        (paranoid_fclose(fp))
+#endif
+
+/* ----------------------------------------------------------------------
+ * ITF8 encoding and decoding.
+ *
+* Also see the itf8_get and itf8_put macros in cram_io.h
+ */
+
+/*
+ * Reads an integer in ITF-8 encoding from 'cp' and stores it in
+ * *val.
+ *
+ * Returns the number of bytes read on success
+ *        -1 on failure
+ */
+int itf8_decode(cram_fd *fd, int32_t *val_p) {
+    static int nbytes[16] = {
+	0,0,0,0, 0,0,0,0,                               // 0000xxxx - 0111xxxx
+	1,1,1,1,                                        // 1000xxxx - 1011xxxx
+	2,2,                                            // 1100xxxx - 1101xxxx
+	3,                                              // 1110xxxx
+	4,                                              // 1111xxxx
+    };
+
+    static int nbits[16] = {
+	0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, // 0000xxxx - 0111xxxx
+	0x3f, 0x3f, 0x3f, 0x3f,                         // 1000xxxx - 1011xxxx
+	0x1f, 0x1f,                                     // 1100xxxx - 1101xxxx
+	0x0f,                                           // 1110xxxx
+	0x0f,                                           // 1111xxxx
+    };
+
+    int32_t val = hgetc(fd->fp);
+    if (val == -1)
+	return -1;
+
+    int i = nbytes[val>>4];
+    val &= nbits[val>>4];
+
+    switch(i) {
+    case 0:
+	*val_p = val;
+	return 1;
+
+    case 1:
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val;
+	return 2;
+
+    case 2:
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val;
+	return 3;
+
+    case 3:
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val;
+	return 4;
+
+    case 4: // really 3.5 more, why make it different?
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<4) | (((unsigned char)hgetc(fd->fp)) & 0x0f);
+	*val_p = val;
+    }
+
+    return 5;
+}
+
+/*
+ * Encodes and writes a single integer in ITF-8 format.
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int itf8_encode(cram_fd *fd, int32_t val) {
+    char buf[5];
+    int len = itf8_put(buf, val);
+    return hwrite(fd->fp, buf, len) == len ? 0 : -1;
+}
+
+#ifndef ITF8_MACROS
+/*
+ * As above, but decoding from memory
+ */
+int itf8_get(char *cp, int32_t *val_p) {
+    unsigned char *up = (unsigned char *)cp;
+    
+    if (up[0] < 0x80) {
+	*val_p =   up[0];
+	return 1;
+    } else if (up[0] < 0xc0) {
+	*val_p = ((up[0] <<8) |  up[1])                           & 0x3fff;
+	return 2;
+    } else if (up[0] < 0xe0) {
+	*val_p = ((up[0]<<16) | (up[1]<< 8) |  up[2])             & 0x1fffff;
+	return 3;
+    } else if (up[0] < 0xf0) {
+	*val_p = ((up[0]<<24) | (up[1]<<16) | (up[2]<<8) | up[3]) & 0x0fffffff;
+	return 4;
+    } else {
+	*val_p = ((up[0] & 0x0f)<<28) | (up[1]<<20) | (up[2]<<12) | (up[3]<<4) | (up[4] & 0x0f);
+	return 5;
+    }
+}
+
+/*
+ * Stores a value to memory in ITF-8 format.
+ *
+ * Returns the number of bytes required to store the number.
+ * This is a maximum of 5 bytes.
+ */
+int itf8_put(char *cp, int32_t val) {
+    if        (!(val & ~0x00000007f)) { // 1 byte
+	*cp = val;
+	return 1;
+    } else if (!(val & ~0x00003fff)) { // 2 byte
+	*cp++ = (val >> 8 ) | 0x80;
+	*cp   = val & 0xff;
+	return 2;
+    } else if (!(val & ~0x01fffff)) { // 3 byte
+	*cp++ = (val >> 16) | 0xc0;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 3;
+    } else if (!(val & ~0x0fffffff)) { // 4 byte
+	*cp++ = (val >> 24) | 0xe0;
+	*cp++ = (val >> 16) & 0xff;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 4;
+    } else {                           // 5 byte
+	*cp++ = 0xf0 | ((val>>28) & 0xff);
+	*cp++ = (val >> 20) & 0xff;
+	*cp++ = (val >> 12) & 0xff;
+	*cp++ = (val >> 4 ) & 0xff;
+	*cp = val & 0x0f;
+	return 5;
+    }
+}
+#endif
+
+/* 64-bit itf8 variant */
+int ltf8_put(char *cp, int64_t val) {
+    if        (!(val & ~((1LL<<7)-1))) {
+	*cp = val;
+	return 1;
+    } else if (!(val & ~((1LL<<(6+8))-1))) {
+	*cp++ = (val >> 8 ) | 0x80;
+	*cp   = val & 0xff;
+	return 2;
+    } else if (!(val & ~((1LL<<(5+2*8))-1))) {
+	*cp++ = (val >> 16) | 0xc0;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 3;
+    } else if (!(val & ~((1LL<<(4+3*8))-1))) {
+	*cp++ = (val >> 24) | 0xe0;
+	*cp++ = (val >> 16) & 0xff;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 4;
+    } else if (!(val & ~((1LL<<(3+4*8))-1))) {
+	*cp++ = (val >> 32) | 0xf0;
+	*cp++ = (val >> 24) & 0xff;
+	*cp++ = (val >> 16) & 0xff;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 5;
+    } else if (!(val & ~((1LL<<(2+5*8))-1))) {
+	*cp++ = (val >> 40) | 0xf8;
+	*cp++ = (val >> 32) & 0xff;
+	*cp++ = (val >> 24) & 0xff;
+	*cp++ = (val >> 16) & 0xff;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 6;
+    } else if (!(val & ~((1LL<<(1+6*8))-1))) {
+	*cp++ = (val >> 48) | 0xfc;
+	*cp++ = (val >> 40) & 0xff;
+	*cp++ = (val >> 32) & 0xff;
+	*cp++ = (val >> 24) & 0xff;
+	*cp++ = (val >> 16) & 0xff;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 7;
+    } else if (!(val & ~((1LL<<(7*8))-1))) {
+	*cp++ = (val >> 56) | 0xfe;
+	*cp++ = (val >> 48) & 0xff;
+	*cp++ = (val >> 40) & 0xff;
+	*cp++ = (val >> 32) & 0xff;
+	*cp++ = (val >> 24) & 0xff;
+	*cp++ = (val >> 16) & 0xff;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 8;
+    } else {
+	*cp++ = 0xff;
+	*cp++ = (val >> 56) & 0xff;
+	*cp++ = (val >> 48) & 0xff;
+	*cp++ = (val >> 40) & 0xff;
+	*cp++ = (val >> 32) & 0xff;
+	*cp++ = (val >> 24) & 0xff;
+	*cp++ = (val >> 16) & 0xff;
+	*cp++ = (val >> 8 ) & 0xff;
+	*cp   = val & 0xff;
+	return 9;
+    }
+}
+
+int ltf8_get(char *cp, int64_t *val_p) {
+    unsigned char *up = (unsigned char *)cp;
+    
+    if (up[0] < 0x80) {
+	*val_p =   up[0];
+	return 1;
+    } else if (up[0] < 0xc0) {
+	*val_p = (((uint64_t)up[0]<< 8) |
+		   (uint64_t)up[1]) & (((1LL<<(6+8)))-1);
+	return 2;
+    } else if (up[0] < 0xe0) {
+	*val_p = (((uint64_t)up[0]<<16) |
+		  ((uint64_t)up[1]<< 8) |
+		   (uint64_t)up[2]) & ((1LL<<(5+2*8))-1);
+	return 3;
+    } else if (up[0] < 0xf0) {
+	*val_p = (((uint64_t)up[0]<<24) |
+		  ((uint64_t)up[1]<<16) |
+		  ((uint64_t)up[2]<< 8) |
+		   (uint64_t)up[3]) & ((1LL<<(4+3*8))-1);
+	return 4;
+    } else if (up[0] < 0xf8) {
+	*val_p = (((uint64_t)up[0]<<32) |
+		  ((uint64_t)up[1]<<24) |
+		  ((uint64_t)up[2]<<16) |
+		  ((uint64_t)up[3]<< 8) |
+		   (uint64_t)up[4]) & ((1LL<<(3+4*8))-1);
+	return 5;
+    } else if (up[0] < 0xfc) {
+	*val_p = (((uint64_t)up[0]<<40) |
+		  ((uint64_t)up[1]<<32) |
+		  ((uint64_t)up[2]<<24) |
+		  ((uint64_t)up[3]<<16) |
+		  ((uint64_t)up[4]<< 8) |
+		   (uint64_t)up[5]) & ((1LL<<(2+5*8))-1);
+	return 6;
+    } else if (up[0] < 0xfe) {
+	*val_p = (((uint64_t)up[0]<<48) |
+		  ((uint64_t)up[1]<<40) |
+		  ((uint64_t)up[2]<<32) |
+		  ((uint64_t)up[3]<<24) |
+		  ((uint64_t)up[4]<<16) |
+		  ((uint64_t)up[5]<< 8) |
+		   (uint64_t)up[6]) & ((1LL<<(1+6*8))-1);
+	return 7;
+    } else if (up[0] < 0xff) {
+	*val_p = (((uint64_t)up[1]<<48) |
+		  ((uint64_t)up[2]<<40) |
+		  ((uint64_t)up[3]<<32) |
+		  ((uint64_t)up[4]<<24) |
+		  ((uint64_t)up[5]<<16) |
+		  ((uint64_t)up[6]<< 8) |
+		   (uint64_t)up[7]) & ((1LL<<(7*8))-1);
+	return 8;
+    } else {
+	*val_p = (((uint64_t)up[1]<<56) |
+		  ((uint64_t)up[2]<<48) |
+		  ((uint64_t)up[3]<<40) |
+		  ((uint64_t)up[4]<<32) |
+		  ((uint64_t)up[5]<<24) |
+		  ((uint64_t)up[6]<<16) |
+		  ((uint64_t)up[7]<< 8) |
+		   (uint64_t)up[8]);
+	return 9;
+    }
+}
+
+int ltf8_decode(cram_fd *fd, int64_t *val_p) {
+    int c = hgetc(fd->fp);
+    int64_t val = (unsigned char)c;
+    if (c == -1)
+	return -1;
+
+    if (val < 0x80) {
+	*val_p =   val;
+	return 1;
+
+    } else if (val < 0xc0) {
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val & (((1LL<<(6+8)))-1);
+	return 2;
+
+    } else if (val < 0xe0) {
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val & ((1LL<<(5+2*8))-1);
+	return 3;
+
+    } else if (val < 0xf0) {
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val & ((1LL<<(4+3*8))-1);
+	return 4;
+
+    } else if (val < 0xf8) {
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val & ((1LL<<(3+4*8))-1);
+	return 5;
+
+    } else if (val < 0xfc) {
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val & ((1LL<<(2+5*8))-1);
+	return 6;
+
+    } else if (val < 0xfe) {
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val & ((1LL<<(1+6*8))-1);
+	return 7;
+
+    } else if (val < 0xff) {
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val & ((1LL<<(7*8))-1);
+	return 8;
+
+    } else {
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	val = (val<<8) | (unsigned char)hgetc(fd->fp);
+	*val_p = val;
+    }
+
+    return 9;
+}
+
+/*
+ * Pushes a value in ITF8 format onto the end of a block.
+ * This shouldn't be used for high-volume data as it is not the fastest
+ * method.
+ *
+ * Returns the number of bytes written
+ */
+int itf8_put_blk(cram_block *blk, int val) {
+    char buf[5];
+    int sz;
+
+    sz = itf8_put(buf, val);
+    BLOCK_APPEND(blk, buf, sz);
+    return sz;
+}
+
+/*
+ * Decodes a 32-bit little endian value from fd and stores in val.
+ *
+ * Returns the number of bytes read on success
+ *         -1 on failure
+ */
+int int32_decode(cram_fd *fd, int32_t *val) {
+    int32_t i;
+    if (4 != hread(fd->fp, &i, 4))
+	return -1;
+
+    *val = le_int4(i);
+    return 4;
+}
+
+/*
+ * Encodes a 32-bit little endian value 'val' and writes to fd.
+ *
+ * Returns the number of bytes written on success
+ *         -1 on failure
+ */
+int int32_encode(cram_fd *fd, int32_t val) {
+    val = le_int4(val);
+    if (4 != hwrite(fd->fp, &val, 4))
+	return -1;
+
+    return 4;
+}
+
+/* As int32_decoded/encode, but from/to blocks instead of cram_fd */
+int int32_get(cram_block *b, int32_t *val) {
+    if (b->uncomp_size - BLOCK_SIZE(b) < 4)
+	return -1;
+
+    *val =
+	 b->data[b->byte  ]        |
+	(b->data[b->byte+1] <<  8) |
+	(b->data[b->byte+2] << 16) |
+	(b->data[b->byte+3] << 24);
+    BLOCK_SIZE(b) += 4;
+    return 4;
+}
+
+/* As int32_decoded/encode, but from/to blocks instead of cram_fd */
+int int32_put(cram_block *b, int32_t val) {
+    unsigned char cp[4];
+    cp[0] = ( val      & 0xff);
+    cp[1] = ((val>>8)  & 0xff);
+    cp[2] = ((val>>16) & 0xff);
+    cp[3] = ((val>>24) & 0xff);
+
+    BLOCK_APPEND(b, cp, 4);
+    return b->data ? 0 : -1;
+}
+
+/* ----------------------------------------------------------------------
+ * zlib compression code - from Gap5's tg_iface_g.c
+ * They're static here as they're only used within the cram_compress_block
+ * and cram_uncompress_block functions, which are the external interface.
+ */
+char *zlib_mem_inflate(char *cdata, size_t csize, size_t *size) {
+    z_stream s;
+    unsigned char *data = NULL; /* Uncompressed output */
+    int data_alloc = 0;
+    int err;
+
+    /* Starting point at uncompressed size, and scale after that */
+    data = malloc(data_alloc = csize*1.2+100);
+    if (!data)
+	return NULL;
+
+    /* Initialise zlib stream */
+    s.zalloc = Z_NULL; /* use default allocation functions */
+    s.zfree  = Z_NULL;
+    s.opaque = Z_NULL;
+    s.next_in  = (unsigned char *)cdata;
+    s.avail_in = csize;
+    s.total_in = 0;
+    s.next_out  = data;
+    s.avail_out = data_alloc;
+    s.total_out = 0;
+
+    //err = inflateInit(&s);
+    err = inflateInit2(&s, 15 + 32);
+    if (err != Z_OK) {
+	fprintf(stderr, "zlib inflateInit error: %s\n", s.msg);
+	free(data);
+	return NULL;
+    }
+
+    /* Decode to 'data' array */
+    for (;s.avail_in;) {
+	unsigned char *data_tmp;
+	int alloc_inc;
+
+	s.next_out = &data[s.total_out];
+	err = inflate(&s, Z_NO_FLUSH);
+	if (err == Z_STREAM_END)
+	    break;
+
+	if (err != Z_OK) {
+	    fprintf(stderr, "zlib inflate error: %s\n", s.msg);
+	    break;
+	}
+
+	/* More to come, so realloc based on growth so far */
+	alloc_inc = (double)s.avail_in/s.total_in * s.total_out + 100;
+	data = realloc((data_tmp = data), data_alloc += alloc_inc);
+	if (!data) {
+	    free(data_tmp);
+	    return NULL;
+	}
+	s.avail_out += alloc_inc;
+    }
+    inflateEnd(&s);
+
+    *size = s.total_out;
+    return (char *)data;
+}
+
+static char *zlib_mem_deflate(char *data, size_t size, size_t *cdata_size,
+			      int level, int strat) {
+    z_stream s;
+    unsigned char *cdata = NULL; /* Compressed output */
+    int cdata_alloc = 0;
+    int cdata_pos = 0;
+    int err;
+
+    cdata = malloc(cdata_alloc = size*1.05+100);
+    if (!cdata)
+	return NULL;
+    cdata_pos = 0;
+
+    /* Initialise zlib stream */
+    s.zalloc = Z_NULL; /* use default allocation functions */
+    s.zfree  = Z_NULL;
+    s.opaque = Z_NULL;
+    s.next_in  = (unsigned char *)data;
+    s.avail_in = size;
+    s.total_in = 0;
+    s.next_out  = cdata;
+    s.avail_out = cdata_alloc;
+    s.total_out = 0;
+    s.data_type = Z_BINARY;
+
+    err = deflateInit2(&s, level, Z_DEFLATED, 15|16, 9, strat);
+    if (err != Z_OK) {
+	fprintf(stderr, "zlib deflateInit2 error: %s\n", s.msg);
+	return NULL;
+    }
+
+    /* Encode to 'cdata' array */
+    for (;s.avail_in;) {
+	s.next_out = &cdata[cdata_pos];
+	s.avail_out = cdata_alloc - cdata_pos;
+	if (cdata_alloc - cdata_pos <= 0) {
+	    fprintf(stderr, "Deflate produced larger output than expected. Abort\n"); 
+	    return NULL;
+	}
+	err = deflate(&s, Z_NO_FLUSH);
+	cdata_pos = cdata_alloc - s.avail_out;
+	if (err != Z_OK) {
+	    fprintf(stderr, "zlib deflate error: %s\n", s.msg);
+	    break;
+	}
+    }
+    if (deflate(&s, Z_FINISH) != Z_STREAM_END) {
+	fprintf(stderr, "zlib deflate error: %s\n", s.msg);
+    }
+    *cdata_size = s.total_out;
+
+    if (deflateEnd(&s) != Z_OK) {
+	fprintf(stderr, "zlib deflate error: %s\n", s.msg);
+    }
+    return (char *)cdata;
+}
+
+/* ----------------------------------------------------------------------
+ * CRAM blocks - the dynamically growable data block. We have code to
+ * create, update, (un)compress and read/write.
+ *
+ * These are derived from the deflate_interlaced.c blocks, but with the
+ * CRAM extension of content types and IDs.
+ */
+
+/*
+ * Allocates a new cram_block structure with a specified content_type and
+ * id.
+ *
+ * Returns block pointer on success
+ *         NULL on failure
+ */
+cram_block *cram_new_block(enum cram_content_type content_type,
+			   int content_id) {
+    cram_block *b = malloc(sizeof(*b));
+    if (!b)
+	return NULL;
+    b->method = b->orig_method = RAW;
+    b->content_type = content_type;
+    b->content_id = content_id;
+    b->comp_size = 0;
+    b->uncomp_size = 0;
+    b->data = NULL;
+    b->alloc = 0;
+    b->byte = 0;
+    b->bit = 7; // MSB
+
+    return b;
+}
+
+/*
+ * Reads a block from a cram file.
+ * Returns cram_block pointer on success.
+ *         NULL on failure
+ */
+cram_block *cram_read_block(cram_fd *fd) {
+    cram_block *b = malloc(sizeof(*b));
+    if (!b)
+	return NULL;
+
+    //fprintf(stderr, "Block at %d\n", (int)ftell(fd->fp));
+
+    if (-1 == (b->method      = hgetc(fd->fp))) { free(b); return NULL; }
+    if (-1 == (b->content_type= hgetc(fd->fp))) { free(b); return NULL; }
+    if (-1 == itf8_decode(fd, &b->content_id))  { free(b); return NULL; }
+    if (-1 == itf8_decode(fd, &b->comp_size))   { free(b); return NULL; }
+    if (-1 == itf8_decode(fd, &b->uncomp_size)) { free(b); return NULL; }
+
+    //    fprintf(stderr, "  method %d, ctype %d, cid %d, csize %d, ucsize %d\n",
+    //	    b->method, b->content_type, b->content_id, b->comp_size, b->uncomp_size);
+
+    if (b->method == RAW) {
+	b->alloc = b->uncomp_size;
+	if (!(b->data = malloc(b->uncomp_size))){ free(b); return NULL; }
+	if (b->uncomp_size != hread(fd->fp, b->data, b->uncomp_size)) {
+	    free(b->data);
+	    free(b);
+	    return NULL;
+	}
+    } else {
+	b->alloc = b->comp_size;
+	if (!(b->data = malloc(b->comp_size)))  { free(b); return NULL; }
+	if (b->comp_size != hread(fd->fp, b->data, b->comp_size)) {
+	    free(b->data);
+	    free(b);
+	    return NULL;
+	}
+    }
+
+    b->orig_method = b->method;
+    b->idx = 0;
+    b->byte = 0;
+    b->bit = 7; // MSB
+
+    return b;
+}
+
+/*
+ * Writes a CRAM block.
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_write_block(cram_fd *fd, cram_block *b) {
+    assert(b->method != RAW || (b->comp_size == b->uncomp_size));
+
+    if (hputc(b->method,       fd->fp)  == EOF) return -1;
+    if (hputc(b->content_type, fd->fp)  == EOF) return -1;
+    if (itf8_encode(fd, b->content_id)  ==  -1) return -1;
+    if (itf8_encode(fd, b->comp_size)   ==  -1) return -1;
+    if (itf8_encode(fd, b->uncomp_size) ==  -1) return -1;
+
+    if (b->method == RAW) {
+	if (b->uncomp_size != hwrite(fd->fp, b->data, b->uncomp_size))
+	    return -1;
+    } else {
+	if (b->comp_size != hwrite(fd->fp, b->data, b->comp_size))
+	    return -1;
+    }
+
+    return 0;
+}
+
+/*
+ * Frees a CRAM block, deallocating internal data too.
+ */
+void cram_free_block(cram_block *b) {
+    if (!b)
+	return;
+    if (b->data)
+	free(b->data);
+    free(b);
+}
+
+/*
+ * Uncompresses a CRAM block, if compressed.
+ */
+int cram_uncompress_block(cram_block *b) {
+    char *uncomp;
+    size_t uncomp_size = 0;
+
+    if (b->uncomp_size == 0) {
+	// blank block
+	b->method = RAW;
+	return 0;
+    }
+
+    switch (b->method) {
+    case RAW:
+	b->uncomp_size = b->comp_size;
+	return 0;
+
+    case GZIP:
+	uncomp = zlib_mem_inflate((char *)b->data, b->comp_size, &uncomp_size);
+	if (!uncomp)
+	    return -1;
+	if ((int)uncomp_size != b->uncomp_size)
+	    return -1;
+	free(b->data);
+	b->data = (unsigned char *)uncomp;
+	b->alloc = uncomp_size;
+	b->method = RAW;
+	break;
+
+#ifdef HAVE_LIBBZ2
+    case BZIP2: {
+	unsigned int usize = b->uncomp_size;
+	if (!(uncomp = malloc(usize)))
+	    return -1;
+	if (BZ_OK != BZ2_bzBuffToBuffDecompress(uncomp, &usize,
+						(char *)b->data, b->comp_size,
+						0, 0)) {
+	    free(uncomp);
+	    return -1;
+	}
+	b->data = (unsigned char *)uncomp;
+	b->alloc = usize;
+	b->method = RAW;
+	b->uncomp_size = usize; // Just incase it differs
+	break;
+    }
+#else
+    case BZIP2:
+	fprintf(stderr, "Bzip2 compression is not compiled into this "
+		"version.\nPlease rebuild and try again.\n");
+	return -1;
+#endif
+
+    case BM_ERROR:
+    default:
+	return -1;
+    }
+
+    return 0;
+}
+
+#ifdef HAVE_LIBBZ2
+static int cram_compress_block_bzip2(cram_fd *fd, cram_block *b,
+				     cram_metrics *metrics, int level) {
+    unsigned int comp_size = b->uncomp_size*1.01 + 600;
+    char *comp = malloc(comp_size);
+    char *data = (char *)b->data;
+
+    if (!comp)
+	return -1;
+
+    if (!data)
+	data = "";
+
+    if (BZ_OK != BZ2_bzBuffToBuffCompress(comp, &comp_size,
+					  data, b->uncomp_size,
+					  level, 0, 30)) {
+	free(comp);
+	return -1;
+    }
+
+    free(b->data);
+    b->data = (unsigned char *)comp;
+    b->method = BZIP2;
+    b->comp_size = comp_size;
+
+    if (fd->verbose)
+	fprintf(stderr, "Compressed block ID %d from %d to %d\n",
+		b->content_id, b->uncomp_size, b->comp_size);
+
+    return 0;
+}
+#endif
+
+/*
+ * Compresses a block using one of two different zlib strategies. If we only
+ * want one choice set strat2 to be -1.
+ *
+ * The logic here is that sometimes Z_RLE does a better job than Z_FILTERED
+ * or Z_DEFAULT_STRATEGY on quality data. If so, we'd rather use it as it is
+ * significantly faster.
+ */
+int cram_compress_block(cram_fd *fd, cram_block *b, cram_metrics *metrics,
+			int level,  int strat,
+			int level2, int strat2) {
+    char *comp = NULL;
+    size_t comp_size = 0;
+
+    if (level == 0) {
+	b->method = RAW;
+	b->comp_size = b->uncomp_size;
+	return 0;
+    }
+
+    if (b->method != RAW) {
+	fprintf(stderr, "Attempt to compress an already compressed block.\n");
+	return 0;
+    }
+
+#ifdef HAVE_LIBBZ2
+    if (fd->use_bz2)
+	// metrics ignored for bzip2
+	return cram_compress_block_bzip2(fd, b, metrics, level);
+#endif
+
+    pthread_mutex_lock(&fd->metrics_lock);
+    if (strat2 >= 0)
+	if (fd->verbose > 1)
+	    fprintf(stderr, "metrics trial %d, next_trial %d, m1 %d, m2 %d\n",
+		    metrics->trial, metrics->next_trial,
+		    metrics->m1, metrics->m2);
+
+    if (strat2 >= 0 && (metrics->trial > 0 || --metrics->next_trial <= 0)) {
+	char *c1, *c2;
+	size_t s1, s2;
+
+	if (metrics->next_trial == 0) {
+	    metrics->next_trial = 100;
+	    metrics->trial = 3;
+	    metrics->m1 = metrics->m2 = 0;
+	}
+	pthread_mutex_unlock(&fd->metrics_lock);
+
+	c1 = zlib_mem_deflate((char *)b->data, b->uncomp_size,
+			      &s1, level, strat);
+	c2 = zlib_mem_deflate((char *)b->data, b->uncomp_size,
+			      &s2, level2, strat2);
+	if (!c1 || !c2)
+	    return -1;
+	
+	//fprintf(stderr, "1: %6d   2: %6d   %5.1f\n", s1, s2, 100.0*s1/s2);
+
+	pthread_mutex_lock(&fd->metrics_lock);
+	if (s1 < 0.98 * s2) { // 2nd one should be faster alternative
+	    if (fd->verbose > 1)
+		fprintf(stderr, "M1 wins %d vs %d\n", (int)s1, (int)s2);
+	    comp = c1; comp_size = s1;
+	    free(c2);
+	    metrics->m1++;
+	} else {
+	    if (fd->verbose > 1)
+		fprintf(stderr, "M2 wins %d vs %d\n", (int)s1, (int)s2);
+	    comp = c2; comp_size = s2;
+	    free(c1);
+	    metrics->m2++;
+	}
+	metrics->trial--;
+	pthread_mutex_unlock(&fd->metrics_lock);
+    } else if (strat2 >= 0) {
+	int xlevel = metrics->m1 > metrics->m2 ? level : level2;
+	int xstrat = metrics->m1 > metrics->m2 ? strat : strat2;
+	pthread_mutex_unlock(&fd->metrics_lock);
+	comp = zlib_mem_deflate((char *)b->data, b->uncomp_size, &comp_size,
+				xlevel, xstrat);
+    } else {
+	pthread_mutex_unlock(&fd->metrics_lock);
+	comp = zlib_mem_deflate((char *)b->data, b->uncomp_size, &comp_size,
+				level, strat);
+    }
+
+    if (!comp)
+	return -1;
+
+    free(b->data);
+    b->data = (unsigned char *)comp;
+    b->method = GZIP;
+    b->comp_size = comp_size;
+
+    if (fd->verbose)
+	fprintf(stderr, "Compressed block ID %d from %d to %d\n",
+		b->content_id, b->uncomp_size, b->comp_size);
+
+    return 0;
+}
+
+cram_metrics *cram_new_metrics(void) {
+    cram_metrics *m = malloc(sizeof(*m));
+    if (!m)
+	return NULL;
+    m->m1 = m->m2 = 0;
+    m->trial = 2;
+    m->next_trial = 100;
+    return m;
+}
+
+char *cram_block_method2str(enum cram_block_method m) {
+    switch(m) {
+    case RAW:	return "RAW";
+    case GZIP:	return "GZIP";
+    case BZIP2:	return "BZIP2";
+    case BM_ERROR: break;
+    }
+    return "?";
+}
+
+char *cram_content_type2str(enum cram_content_type t) {
+    switch (t) {
+    case FILE_HEADER:         return "FILE_HEADER";
+    case COMPRESSION_HEADER:  return "COMPRESSION_HEADER";
+    case MAPPED_SLICE:        return "MAPPED_SLICE";
+    case UNMAPPED_SLICE:      return "UNMAPPED_SLICE";
+    case EXTERNAL:            return "EXTERNAL";
+    case CORE:                return "CORE";
+    case CT_ERROR:            break;
+    }
+    return "?";
+}
+
+/*
+ * Extra error checking on fclose to really ensure data is written.
+ * Care needs to be taken to handle pipes vs real files.
+ *
+ * Returns 0 on success
+ *        -1 on failure.
+ */
+int paranoid_fclose(FILE *fp) {
+    if (-1 == fflush(fp) && errno != EBADF) {
+	fclose(fp);
+	return -1;
+    }
+
+    errno = 0;
+    if (-1 == fsync(fileno(fp))) {
+	if (errno != EINVAL) { // eg pipe
+	    fclose(fp);
+	    return -1;
+	}
+    }
+    return fclose(fp);
+}
+
+/* ----------------------------------------------------------------------
+ * Reference sequence handling
+ *
+ * These revolve around the refs_t structure, which may potentially be
+ * shared between multiple cram_fd.
+ *
+ * We start with refs_create() to allocate an empty refs_t and then
+ * populate it with @SQ line data using refs_from_header(). This is done on
+ * cram_open().  Also at start up we can call cram_load_reference() which
+ * is used with "scramble -r foo.fa". This replaces the fd->refs with the
+ * new one specified. In either case refs2id() is then called which
+ * maps ref_entry names to @SQ ids (refs_t->ref_id[]).
+ *
+ * Later, possibly within a thread, we will want to know the actual ref
+ * seq itself, obtained by calling cram_get_ref().  This may use the
+ * UR: or M5: fields or the filename specified in the original
+ * cram_load_reference() call.
+ *
+ * Given the potential for multi-threaded reference usage, we have
+ * reference counting (sorry for the confusing double use of "ref") to
+ * track the number of callers interested in any specific reference.
+ */
+
+void refs_free(refs_t *r) {
+    RP("refs_free()\n");
+
+    if (--r->count > 0)
+	return;
+
+    if (!r)
+	return;
+
+    if (r->pool)
+	string_pool_destroy(r->pool);
+
+    if (r->h_meta) {
+	khint_t k;
+
+	for (k = kh_begin(r->h_meta); k != kh_end(r->h_meta); k++) {
+	    ref_entry *e;
+
+	    if (!kh_exist(r->h_meta, k))
+		continue;
+	    if (!(e = kh_val(r->h_meta, k)))
+		continue;
+	    if (e->seq)
+		free(e->seq);
+	    free(e);
+	}
+
+	kh_destroy(refs, r->h_meta);
+    }
+    
+    if (r->ref_id)
+	free(r->ref_id);
+
+    if (r->fp)
+	fclose(r->fp);
+
+    pthread_mutex_destroy(&r->lock);
+
+    free(r);
+}
+
+static refs_t *refs_create(void) {
+    refs_t *r = calloc(1, sizeof(*r));
+
+    RP("refs_create()\n");
+
+    if (!r)
+	return NULL;
+
+    if (!(r->pool = string_pool_create(8192)))
+	goto err;
+
+    r->ref_id = NULL; // see refs2id() to populate.
+    r->count = 1;
+    r->last = NULL;
+    r->last_id = -1;
+
+    if (!(r->h_meta = kh_init(refs)))
+	goto err;
+
+    pthread_mutex_init(&r->lock, NULL);
+
+    return r;
+
+ err:
+    refs_free(r);
+    return NULL;
+}
+
+/*
+ * Loads a FAI file for a reference.fasta.
+ * "is_err" indicates whether failure to load is worthy of emitting an
+ * error message. In some cases (eg with embedded references) we
+ * speculatively load, just incase, and silently ignore errors.
+ *
+ * Returns the refs_t struct on success (maybe newly allocated);
+ *         NULL on failure
+ */
+static refs_t *refs_load_fai(refs_t *r_orig, char *fn, int is_err) {
+    struct stat sb;
+    FILE *fp = NULL;
+    char fai_fn[PATH_MAX];
+    char line[8192];
+    refs_t *r = r_orig;
+    size_t fn_l = strlen(fn);
+
+    RP("refs_load_fai %s\n", fn);
+
+    if (!r)
+	if (!(r = refs_create()))
+	    goto err;
+
+    /* Open reference, for later use */
+    if (stat(fn, &sb) != 0) {
+	if (is_err)
+	    perror(fn);
+	goto err;
+    }
+
+    if (r->fp)
+	fclose(r->fp);
+    r->fp = NULL;
+
+    if (!(r->fn = string_dup(r->pool, fn)))
+	goto err;
+	
+    if (fn_l > 4 && strcmp(&fn[fn_l-4], ".fai") == 0)
+	r->fn[fn_l-4] = 0;
+
+    if (!(r->fp = fopen(r->fn, "r"))) {
+	if (is_err)
+	    perror(fn);
+	goto err;
+    }
+
+    /* Parse .fai file and load meta-data */
+    sprintf(fai_fn, "%.*s.fai", PATH_MAX-5, r->fn);
+
+    if (stat(fai_fn, &sb) != 0) {
+	if (is_err)
+	    perror(fai_fn);
+	goto err;
+    }
+    if (!(fp = fopen(fai_fn, "r"))) {
+	if (is_err)
+	    perror(fai_fn);
+	goto err;
+    }
+    while (fgets(line, 8192, fp) != NULL) {
+	ref_entry *e = malloc(sizeof(*e));
+	char *cp;
+	int n;
+	khint_t k;
+
+	if (!e)
+	    return NULL;
+
+	// id
+	for (cp = line; *cp && !isspace(*cp); cp++)
+	    ;
+	*cp++ = 0;
+	e->name = string_dup(r->pool, line);
+	
+	// length
+	while (*cp && isspace(*cp))
+	    cp++;
+	e->length = strtoll(cp, &cp, 10);
+
+	// offset
+	while (*cp && isspace(*cp))
+	    cp++;
+	e->offset = strtoll(cp, &cp, 10);
+
+	// bases per line
+	while (*cp && isspace(*cp))
+	    cp++;
+	e->bases_per_line = strtol(cp, &cp, 10);
+
+	// line length
+	while (*cp && isspace(*cp))
+	    cp++;
+	e->line_length = strtol(cp, &cp, 10);
+
+	// filename
+	e->fn = r->fn;
+
+	e->count = 0;
+	e->seq = NULL;
+
+	k = kh_put(refs, r->h_meta, e->name, &n);
+	if (-1 == n)  {
+	    free(e);
+	    return NULL;
+	}
+
+	if (n) {
+	    kh_val(r->h_meta, k) = e;
+	} else {
+	    ref_entry *re = kh_val(r->h_meta, k);
+	    if (re && (re->count != 0 || re->length != 0)) {
+		/* Keep old */
+		free(e);
+	    } else {
+		/* Replace old */
+		if (re)
+		    free(re);
+		kh_val(r->h_meta, k) = e;
+	    }
+	}
+    }
+
+    return r;
+
+ err:
+    if (fp)
+	fclose(fp);
+
+    if (!r_orig)
+	refs_free(r);
+    
+    return NULL;
+}
+
+/*
+ * Indexes references by the order they appear in a BAM file. This may not
+ * necessarily be the same order they appear in the fasta reference file.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int refs2id(refs_t *r, SAM_hdr *h) {
+    int i;
+
+    if (r->ref_id)
+	free(r->ref_id);
+    if (r->last)
+	r->last = NULL;
+
+    r->ref_id = calloc(h->nref, sizeof(*r->ref_id));
+    if (!r->ref_id)
+	return -1;
+
+    r->nref = h->nref;
+    for (i = 0; i < h->nref; i++) {
+	khint_t k = kh_get(refs, r->h_meta, h->ref[i].name);
+	if (k != kh_end(r->h_meta)) {
+	    r->ref_id[i] = kh_val(r->h_meta, k);
+	} else {
+	    fprintf(stderr, "Unable to find ref name '%s'\n",
+		    h->ref[i].name);
+	}
+    }
+
+    return 0;
+}
+
+/*
+ * Generates refs_t entries based on @SQ lines in the header.
+ * Returns 0 on success
+ *         -1 on failure
+ */
+static int refs_from_header(refs_t *r, cram_fd *fd, SAM_hdr *h) {
+    int i;
+
+    if (!h || h->nref == 0)
+	return 0;
+
+    //fprintf(stderr, "refs_from_header for %p mode %c\n", fd, fd->mode);
+
+    /* Existing refs are fine, as long as they're compatible with the hdr. */
+    i = r->nref;
+    if (r->nref < h->nref)
+	r->nref = h->nref;
+
+    if (!(r->ref_id = realloc(r->ref_id, r->nref * sizeof(*r->ref_id))))
+	return -1;
+
+    for (; i < r->nref; i++)
+	r->ref_id[i] = NULL;
+
+    /* Copy info from h->ref[i] over to r */
+    for (i = 0; i < h->nref; i++) {
+	SAM_hdr_type *ty;
+	SAM_hdr_tag *tag;
+	khint_t k;
+	int n;
+
+	if (r->ref_id[i] && 0 == strcmp(r->ref_id[i]->name, h->ref[i].name))
+	    continue;
+
+	if (!(r->ref_id[i] = calloc(1, sizeof(ref_entry))))
+	    return -1;
+
+	if (!h->ref[i].name)
+	    return -1;
+
+	r->ref_id[i]->name = string_dup(r->pool, h->ref[i].name);
+	r->ref_id[i]->length = 0; // marker for not yet loaded
+
+	/* Initialise likely filename if known */
+	if ((ty = sam_hdr_find(h, "SQ", "SN", h->ref[i].name))) {
+	    if ((tag = sam_hdr_find_key(h, ty, "M5", NULL))) {
+		r->ref_id[i]->fn = string_dup(r->pool, tag->str+3);
+		//fprintf(stderr, "Tagging @SQ %s / %s\n", r->ref_id[i]->name, r->ref_id[i]->fn);
+	    }
+	}
+
+	k = kh_put(refs, r->h_meta, r->ref_id[i]->name, &n);
+	if (n <= 0) // already exists or error
+	    return -1;
+	kh_val(r->h_meta, k) = r->ref_id[i];
+    }
+
+    return 0;
+}
+
+/*
+ * Attaches a header to a cram_fd.
+ *
+ * This should be used when creating a new cram_fd for writing where
+ * we have an SAM_hdr already constructed (eg from a file we've read
+ * in).
+ */
+int cram_set_header(cram_fd *fd, SAM_hdr *hdr) {
+    fd->header = hdr;
+    return refs_from_header(fd->refs, fd, hdr);
+}
+
+/*
+ * Converts a directory and a filename into an expanded path, replacing %s
+ * in directory with the filename and %[0-9]+s with portions of the filename
+ * Any remaining parts of filename are added to the end with /%s.
+ */
+void expand_cache_path(char *path, char *dir, char *fn) {
+    char *cp;
+
+    while ((cp = strchr(dir, '%'))) {
+	strncpy(path, dir, cp-dir);
+	path += cp-dir;
+
+	if (*++cp == 's') {
+	    strcpy(path, fn);
+	    path += strlen(fn);
+	    fn += strlen(fn);
+	    cp++;
+	} else if (*cp >= '0' && *cp <= '9') {
+	    char *endp;
+	    long l;
+
+	    l = strtol(cp, &endp, 10);
+	    l = MIN(l, strlen(fn));
+	    if (*endp == 's') {
+		strncpy(path, fn, l);
+		path += l;
+		fn += l;
+		*path = 0;
+		cp = endp+1;
+	    } else {
+		*path++ = '%';
+		*path++ = *cp++;
+	    }
+	} else {
+	    *path++ = '%';
+	    *path++ = *cp++;
+	}
+	dir = cp;
+    }
+    strcpy(path, dir);
+    path += strlen(dir);
+    if (*fn && path[-1] != '/')
+	*path++ = '/';
+    strcpy(path, fn);
+}
+
+/*
+ * Make the directory containing path and any prefix directories.
+ */
+void mkdir_prefix(char *path, int mode) {
+    char *cp = strrchr(path, '/');
+    if (!cp)
+	return;
+
+    *cp = 0;
+    if (is_directory(path)) {
+	*cp = '/';
+	return;
+    }
+
+    if (mkdir(path, mode) == 0) {
+	chmod(path, mode);
+	*cp = '/';
+	return;
+    }
+
+    mkdir_prefix(path, mode);
+    mkdir(path, mode);
+    chmod(path, mode);
+    *cp = '/';
+}
+
+/*
+ * Queries the M5 string from the header and attempts to populate the
+ * reference from this using the REF_PATH environment.
+ *
+ * Returns 0 on sucess
+ *        -1 on failure
+ */
+static int cram_populate_ref(cram_fd *fd, int id, ref_entry *r) {
+    char *ref_path = getenv("REF_PATH");
+    SAM_hdr_type *ty;
+    SAM_hdr_tag *tag;
+    char path[PATH_MAX], path_tmp[PATH_MAX];
+    char *local_cache = getenv("REF_CACHE");
+    mFILE *mf;
+
+    if (fd->verbose)
+	fprintf(stderr, "cram_populate_ref on fd %p, id %d\n", fd, id);
+
+    if (!ref_path)
+	ref_path = ".";
+
+    if (!r->name)
+	return -1;
+
+    if (!(ty = sam_hdr_find(fd->header, "SQ", "SN", r->name)))
+	return -1;
+
+    if (!(tag = sam_hdr_find_key(fd->header, ty, "M5", NULL)))
+	goto no_M5;
+
+    if (fd->verbose)
+	fprintf(stderr, "Querying ref %s\n", tag->str+3);
+
+    /* Use cache if available */
+    if (local_cache && *local_cache) {
+	struct stat sb;
+	FILE *fp;
+
+	expand_cache_path(path, local_cache, tag->str+3);
+
+	if (0 == stat(path, &sb) && (fp = fopen(path, "r"))) {
+	    r->length = sb.st_size;
+	    r->offset = r->line_length = r->bases_per_line = 0;
+
+	    r->fn = string_dup(fd->refs->pool, path);
+
+	    if (fd->refs->fp)
+		fclose(fd->refs->fp);
+	    fd->refs->fp = fp;
+	    fd->refs->fn = r->fn;
+
+	    // Fall back to cram_get_ref() where it'll do the actual
+	    // reading of the file.
+	    return 0;
+	}
+    }
+
+    /* Otherwise search */
+    if ((mf = open_path_mfile(tag->str+3, ref_path, NULL))) {
+	size_t sz;
+	r->seq = mfsteal(mf, &sz);
+	r->length = sz;
+    } else {
+	refs_t *refs;
+	char *fn;
+
+    no_M5:
+	/* Failed to find in search path or M5 cache, see if @SQ UR: tag? */
+	if (!(tag = sam_hdr_find_key(fd->header, ty, "UR", NULL)))
+	    return -1;
+
+	fn = (strncmp(tag->str+3, "file:", 5) == 0)
+	    ? tag->str+8
+	    : tag->str+3;
+
+	if (fd->refs->fp) {
+	    fclose(fd->refs->fp);
+	    fd->refs->fp = NULL;
+	}
+	if (!(refs = refs_load_fai(fd->refs, fn, 0)))
+	    return -1;
+	fd->refs = refs;
+	if (fd->refs->fp) {
+	    fclose(fd->refs->fp);
+	    fd->refs->fp = NULL;
+	}
+
+	if (!fd->refs->fn)
+	    return -1;
+
+	if (-1 == refs2id(fd->refs, fd->header))
+	    return -1;
+	if (!fd->refs->ref_id || !fd->refs->ref_id[id])
+	    return -1;
+
+	// Local copy already, so fall back to cram_get_ref().
+	return 0;
+    }
+
+    /* Populate the local disk cache if required */
+    if (local_cache && *local_cache) {
+	FILE *fp;
+	int i;
+
+	expand_cache_path(path, local_cache, tag->str+3);
+	if (fd->verbose)
+	    fprintf(stderr, "Path='%s'\n", path);
+	mkdir_prefix(path, 01777);
+
+	i = 0;
+	do {
+	    sprintf(path_tmp, "%s.tmp_%d", path, /*getpid(),*/ i);
+	    i++;
+	    fp = fopen(path_tmp, "wx");
+	} while (fp == NULL && errno == EEXIST);
+	if (!fp) {
+	    perror(path_tmp);
+
+	    // Not fatal - we have the data already so keep going.
+	    return 0;
+	}
+
+	if (r->length != fwrite(r->seq, 1, r->length, fp)) {
+	    perror(path);
+	}
+	if (-1 == paranoid_fclose(fp)) {
+	    unlink(path_tmp);
+	} else {
+	    if (0 == chmod(path_tmp, 0444))
+		rename(path_tmp, path);
+	    else
+		unlink(path_tmp);
+	}
+    }
+
+    return 0;
+}
+
+static void cram_ref_incr_locked(refs_t *r, int id) {
+    RP("%d INC REF %d, %d %p\n", gettid(), id, (int)(id>=0?r->ref_id[id]->count+1:-999), id>=0?r->ref_id[id]->seq:(char *)1);
+
+    if (id < 0 || !r->ref_id[id]->seq)
+	return;
+
+    if (r->last_id == id)
+	r->last_id = -1;
+
+    ++r->ref_id[id]->count;
+}
+
+void cram_ref_incr(refs_t *r, int id) {
+    pthread_mutex_lock(&r->lock);
+    cram_ref_incr_locked(r, id);
+    pthread_mutex_unlock(&r->lock);
+}
+
+static void cram_ref_decr_locked(refs_t *r, int id) {
+    RP("%d DEC REF %d, %d %p\n", gettid(), id, (int)(id>=0?r->ref_id[id]->count-1:-999), id>=0?r->ref_id[id]->seq:(char *)1);
+
+    if (id < 0 || !r->ref_id[id]->seq) {
+	assert(r->ref_id[id]->count >= 0);
+	return;
+    }
+
+    if (--r->ref_id[id]->count <= 0) {
+	assert(r->ref_id[id]->count == 0);
+	if (r->last_id >= 0) {
+	    if (r->ref_id[r->last_id]->count <= 0 &&
+		r->ref_id[r->last_id]->seq) {
+		RP("%d FREE REF %d (%p)\n", gettid(),
+		   r->last_id, r->ref_id[r->last_id]->seq);
+		free(r->ref_id[r->last_id]->seq);
+		r->ref_id[r->last_id]->seq = NULL;
+		r->ref_id[r->last_id]->length = 0;
+	    }
+	    r->last_id = -1;
+	} else {
+	    r->last_id = id;
+	}
+    }
+}
+
+void cram_ref_decr(refs_t *r, int id) {
+    pthread_mutex_lock(&r->lock);
+    cram_ref_decr_locked(r, id);
+    pthread_mutex_unlock(&r->lock);
+}
+
+/*
+ * Used by cram_ref_load and cram_ref_get. The file handle will have
+ * already been opened, so we can catch it. The ref_entry *e informs us
+ * of whether this is a multi-line fasta file or a raw MD5 style file.
+ * Either way we create a single contiguous sequence.
+ *
+ * Returns all or part of a reference sequence on success (malloced);
+ *         NULL on failure.
+ */
+static char *load_ref_portion(FILE *fp, ref_entry *e, int start, int end) {
+    off_t offset, len;
+    char *seq;
+
+    if (end < start)
+	end = start;
+
+    /*
+     * Compute locations in file. This is trivial for the MD5 files, but
+     * is still necessary for the fasta variants.
+     */
+    offset = e->line_length
+	? e->offset + (start-1)/e->bases_per_line * e->line_length +
+	  (start-1) % e->bases_per_line
+	: start-1;
+
+    len = (e->line_length
+	   ? e->offset + (end-1)/e->bases_per_line * e->line_length + 
+	     (end-1) % e->bases_per_line
+	   : end-1) - offset + 1;
+
+    if (0 != fseeko(fp, offset, SEEK_SET)) {
+	perror("fseeko() on reference file");
+	return NULL;
+    }
+
+    if (len == 0 || !(seq = malloc(len))) {
+	return NULL;
+    }
+
+    if (len != fread(seq, 1, len, fp)) {
+	perror("fread() on reference file");
+	free(seq);
+	return NULL;
+    }
+
+    /* Strip white-space if required. */
+    if (len != end-start+1) {
+	int i, j;
+	char *cp = seq;
+	char *cp_to;
+
+	for (i = j = 0; i < len; i++) {
+	    if (cp[i] >= '!' && cp[i] <= '~')
+		cp[j++] = cp[i] & ~0x20;
+	}
+	cp_to = cp+j;
+
+	if (cp_to - seq != end-start+1) {
+	    fprintf(stderr, "Malformed reference file?\n");
+	    free(seq);
+	    return NULL;
+	}
+    } else {
+	int i;
+	for (i = 0; i < len; i++) {
+	    seq[i] = seq[i] & ~0x20; // uppercase in ASCII
+	}
+    }
+
+    return seq;
+}
+
+/*
+ * Load the entire reference 'id'.
+ * This also increments the reference count by 1.
+ *
+ * Returns ref_entry on success;
+ *         NULL on failure
+ */
+ref_entry *cram_ref_load(refs_t *r, int id) {
+    ref_entry *e = r->ref_id[id];
+    int start = 1, end = e->length;
+    char *seq;
+
+    if (e->seq) {
+	return e;
+    }
+
+    assert(e->count == 0);
+
+    if (r->last) {
+#ifdef REF_DEBUG
+	int idx = 0;
+	for (idx = 0; idx < r->nref; idx++)
+	    if (r->last == r->ref_id[idx])
+		break;
+	RP("%d cram_ref_load DECR %d\n", gettid(), idx);
+#endif
+	assert(r->last->count > 0);
+	if (--r->last->count <= 0) {
+	    RP("%d FREE REF %d (%p)\n", gettid(), id, r->ref_id[id]->seq);
+	    if (r->last->seq) {
+		free(r->last->seq);
+		r->last->seq = NULL;
+	    }
+	}
+    }
+
+    /* Open file if it's not already the current open reference */
+    if (strcmp(r->fn, e->fn) || r->fp == NULL) {
+	if (r->fp)
+	    fclose(r->fp);
+	r->fn = e->fn;
+	if (!(r->fp = fopen(r->fn, "r"))) {
+	    perror(r->fn);
+	    return NULL;
+	}
+    }
+
+    RP("%d Loading ref %d (%d..%d)\n", gettid(), id, start, end);
+
+    if (!(seq = load_ref_portion(r->fp, e, start, end))) {
+	return NULL;
+    }
+
+    RP("%d Loaded ref %d (%d..%d) = %p\n", gettid(), id, start, end, seq);
+
+    RP("%d INC REF %d, %d\n", gettid(), id, (int)(e->count+1));
+    e->seq = seq;
+    e->count++;
+
+    /*
+     * Also keep track of last used ref so incr/decr loops on the same
+     * sequence don't cause load/free loops.
+     */
+    RP("%d cram_ref_load INCR %d => %d\n", gettid(), id, e->count+1);
+    r->last = e;
+    e->count++; 
+
+    return e;
+}
+
+/*
+ * Returns a portion of a reference sequence from start to end inclusive.
+ * The returned pointer is owned by either the cram_file fd or by the
+ * internal refs_t structure and should not be freed  by the caller.
+ *
+ * The difference is whether or not this refs_t is in use by just the one
+ * cram_fd or by multiples, or whether we have multiple threads accessing
+ * references. In either case fd->shared will be true and we start using
+ * reference counting to track the number of users of a specific reference
+ * sequence.
+ *
+ * Otherwise the ref seq returned is allocated as part of cram_fd itself
+ * and will be freed up on the next call to cram_get_ref or cram_close.
+ *
+ * To return the entire reference sequence, specify start as 1 and end
+ * as 0.
+ *
+ * To cease using a reference, call cram_ref_decr().
+ *
+ * Returns reference on success,
+ *         NULL on failure
+ */
+char *cram_get_ref(cram_fd *fd, int id, int start, int end) {
+    ref_entry *r;
+    char *seq;
+    int ostart = start;
+
+    if (id == -1)
+	return NULL;
+
+    /* FIXME: axiomatic query of r->seq being true?
+     * Or shortcut for unsorted data where we load once and never free?
+     */
+
+    //fd->shared_ref = 1; // hard code for now to simplify things
+
+    pthread_mutex_lock(&fd->ref_lock);
+
+    RP("%d cram_get_ref on fd %p, id %d, range %d..%d\n", gettid(), fd, id, start, end);
+
+    /*
+     * Unsorted data implies we want to fetch an entire reference at a time.
+     * We just deal with this at the moment by claiming we're sharing
+     * references instead, which has the same requirement.
+     */
+    if (fd->unsorted)
+	fd->shared_ref = 1;
+
+
+    /* Sanity checking: does this ID exist? */
+    if (id >= fd->refs->nref) {
+	fprintf(stderr, "No reference found for id %d\n", id);
+	pthread_mutex_unlock(&fd->ref_lock);
+	return NULL;
+    }
+
+    if (!fd->refs || !fd->refs->ref_id[id]) {
+	fprintf(stderr, "No reference found for id %d\n", id);
+	pthread_mutex_unlock(&fd->ref_lock);
+	return NULL;
+    }
+
+    if (!(r = fd->refs->ref_id[id])) {
+	fprintf(stderr, "No reference found for id %d\n", id);
+	pthread_mutex_unlock(&fd->ref_lock);
+	return NULL;
+    }
+
+
+    /*
+     * It has an entry, but may not have been populated yet.
+     * Any manually loaded .fai files have their lengths known.
+     * A ref entry computed from @SQ lines (M5 or UR field) will have
+     * r->length == 0 unless it's been loaded once and verified that we have
+     * an on-disk filename for it.
+     *
+     * 19 Sep 2013: Moved the lock here as the cram_populate_ref code calls
+     * open_path_mfile and libcurl, which isn't multi-thread safe unless I
+     * rewrite my code to have one curl handle per thread.
+     */
+    pthread_mutex_lock(&fd->refs->lock);
+    if (r->length == 0) {
+	if (cram_populate_ref(fd, id, r) == -1) {
+	    fprintf(stderr, "Failed to populate reference for id %d\n", id);
+	    pthread_mutex_unlock(&fd->refs->lock);
+	    pthread_mutex_unlock(&fd->ref_lock);
+	    return NULL;
+	}
+	r = fd->refs->ref_id[id];
+    }
+
+
+    /*
+     * We now know that we the filename containing the reference, so check
+     * for limits. If it's over half the reference we'll load all of it in
+     * memory as this will speed up subsequent calls.
+     */
+    if (end < 1)
+	end = r->length;
+    if (end >= r->length)
+	end  = r->length; 
+    assert(start >= 1);
+
+    if (end - start >= 0.5*r->length || fd->shared_ref) {
+	start = 1;
+	end = r->length;
+    }
+    
+    /*
+     * Maybe we have it cached already? If so use it.
+     *
+     * Alternatively if we don't have the sequence but we're sharing
+     * references and/or are asking for the entire length of it, then
+     * load the full reference into the refs structure and return
+     * a pointer to that one instead.
+     */
+    if (fd->shared_ref || r->seq || (start == 1 && end == r->length)) {
+	char *cp;
+
+	if (id >= 0) {
+	    if (r->seq) {
+		cram_ref_incr_locked(fd->refs, id);
+	    } else {
+		ref_entry *e;
+		if (!(e = cram_ref_load(fd->refs, id))) {
+		    pthread_mutex_unlock(&fd->refs->lock);
+		    pthread_mutex_unlock(&fd->ref_lock);
+		    return NULL;
+		}
+
+		/* unsorted data implies cache ref indefinitely, to avoid
+		 * continually loading and unloading.
+		 */
+		if (fd->unsorted)
+		    cram_ref_incr_locked(fd->refs, id);
+	    }	    
+
+	    fd->ref = NULL; /* We never access it directly */
+	    fd->ref_start = 1;
+	    fd->ref_end   = r->length;
+	    fd->ref_id    = id;
+
+	    cp = fd->refs->ref_id[id]->seq + ostart-1;
+	} else {
+	    fd->ref = NULL;
+	    cp = NULL;
+	}
+
+	RP("%d cram_get_ref returning for id %d, count %d\n", gettid(), id, (int)r->count);
+
+	pthread_mutex_unlock(&fd->refs->lock);
+	pthread_mutex_unlock(&fd->ref_lock);
+	return cp;
+    }
+
+    /*
+     * Otherwise we're not sharing, we don't have a copy of it already and
+     * we're only asking for a small portion of it.
+     *
+     * In this case load up just that segment ourselves, freeing any old
+     * small segments in the process.
+     */
+
+    /* Unmapped ref ID */
+    if (id < 0) {
+	if (fd->ref_free) {
+	    free(fd->ref_free);
+	    fd->ref_free = NULL;
+	}
+	fd->ref = NULL;
+	fd->ref_id = id;
+	pthread_mutex_unlock(&fd->refs->lock);
+	pthread_mutex_unlock(&fd->ref_lock);
+	return NULL;
+    }
+
+    /* Open file if it's not already the current open reference */
+    if (strcmp(fd->refs->fn, r->fn) || fd->refs->fp == NULL) {
+	if (fd->refs->fp)
+	    fclose(fd->refs->fp);
+	fd->refs->fn = r->fn;
+	if (!(fd->refs->fp = fopen(fd->refs->fn, "r"))) {
+	    perror(fd->refs->fn);
+	    pthread_mutex_unlock(&fd->refs->lock);
+	    pthread_mutex_unlock(&fd->ref_lock);
+	    return NULL;
+	}
+    }
+
+    if (!(fd->ref = load_ref_portion(fd->refs->fp, r, start, end))) {
+	pthread_mutex_unlock(&fd->refs->lock);
+	pthread_mutex_unlock(&fd->ref_lock);
+	return NULL;
+    }
+
+    if (fd->ref_free)
+	free(fd->ref_free);
+
+    fd->ref_id    = id;
+    fd->ref_start = start;
+    fd->ref_end   = end;
+    fd->ref_free = fd->ref;
+    seq = fd->ref;
+
+    pthread_mutex_unlock(&fd->refs->lock);
+    pthread_mutex_unlock(&fd->ref_lock);
+
+    return seq + ostart - start;
+}
+
+/*
+ * If fd has been opened for reading, it may be permitted to specify 'fn'
+ * as NULL and let the code auto-detect the reference by parsing the
+ * SAM header @SQ lines.
+ */
+int cram_load_reference(cram_fd *fd, char *fn) {
+    if (fn) {
+	fd->refs = refs_load_fai(fd->refs, fn,
+				 !(fd->embed_ref && fd->mode == 'r'));
+	fn = fd->refs ? fd->refs->fn : NULL;
+    }
+    fd->ref_fn = fn;
+
+    if ((!fd->refs || (fd->refs->nref == 0 && !fn)) && fd->header) {
+	if (!(fd->refs = refs_create()))
+	    return -1;
+	if (-1 == refs_from_header(fd->refs, fd, fd->header))
+	    return -1;
+    }
+
+    if (-1 == refs2id(fd->refs, fd->header))
+	return -1;
+
+    return fn ? 0 : -1;
+}
+
+/* ----------------------------------------------------------------------
+ * Containers
+ */
+
+/*
+ * Creates a new container, specifying the maximum number of slices
+ * and records permitted.
+ *
+ * Returns cram_container ptr on success
+ *         NULL on failure
+ */
+cram_container *cram_new_container(int nrec, int nslice) {
+    cram_container *c = calloc(1, sizeof(*c));
+    if (!c)
+	return NULL;
+
+    c->curr_ref = -2;
+
+    c->max_c_rec = nrec * nslice;
+    c->curr_c_rec = 0;
+
+    c->max_rec = nrec;
+    c->record_counter = 0;
+    c->num_bases = 0;
+
+    c->max_slice = nslice;
+    c->curr_slice = 0;
+
+    c->pos_sorted = 1;
+    c->max_apos   = 0;
+    c->multi_seq  = 0;
+
+    c->bams = NULL;
+
+    if (!(c->slices = (cram_slice **)calloc(nslice, sizeof(cram_slice *))))
+	goto err;
+    c->slice = NULL;
+
+    if (!(c->comp_hdr = cram_new_compression_header()))
+	goto err;
+    c->comp_hdr_block = NULL;
+
+    if (!(c->BF_stats = cram_stats_create())) goto err;
+    if (!(c->CF_stats = cram_stats_create())) goto err;
+    if (!(c->RN_stats = cram_stats_create())) goto err;
+    if (!(c->AP_stats = cram_stats_create())) goto err;
+    if (!(c->RG_stats = cram_stats_create())) goto err;
+    if (!(c->MQ_stats = cram_stats_create())) goto err;
+    if (!(c->NS_stats = cram_stats_create())) goto err;
+    if (!(c->NP_stats = cram_stats_create())) goto err;
+    if (!(c->TS_stats = cram_stats_create())) goto err;
+    if (!(c->MF_stats = cram_stats_create())) goto err;
+    if (!(c->NF_stats = cram_stats_create())) goto err;
+    if (!(c->RL_stats = cram_stats_create())) goto err;
+    if (!(c->FN_stats = cram_stats_create())) goto err;
+    if (!(c->FC_stats = cram_stats_create())) goto err;
+    if (!(c->FP_stats = cram_stats_create())) goto err;
+    if (!(c->DL_stats = cram_stats_create())) goto err;
+    if (!(c->BA_stats = cram_stats_create())) goto err;
+    if (!(c->QS_stats = cram_stats_create())) goto err;
+    if (!(c->BS_stats = cram_stats_create())) goto err;
+    if (!(c->TC_stats = cram_stats_create())) goto err;
+    if (!(c->TN_stats = cram_stats_create())) goto err;
+    if (!(c->TL_stats = cram_stats_create())) goto err;
+    if (!(c->RI_stats = cram_stats_create())) goto err;
+    if (!(c->RS_stats = cram_stats_create())) goto err;
+    if (!(c->PD_stats = cram_stats_create())) goto err;
+    if (!(c->HC_stats = cram_stats_create())) goto err;
+    
+    //c->aux_B_stats = cram_stats_create();
+
+    if (!(c->tags_used = kh_init(s_i2i)))
+	goto err;
+    c->refs_used = 0;
+
+    return c;
+
+ err:
+    if (c) {
+	if (c->slices)
+	    free(c->slices);
+	free(c);
+    }
+    return NULL;
+}
+
+void cram_free_container(cram_container *c) {
+    int i;
+
+    if (!c)
+	return;
+
+    if (c->refs_used)
+	free(c->refs_used);
+
+    if (c->landmark)
+	free(c->landmark);
+
+    if (c->comp_hdr)
+	cram_free_compression_header(c->comp_hdr);
+
+    if (c->comp_hdr_block)
+	cram_free_block(c->comp_hdr_block);
+
+    if (c->slices) {
+	for (i = 0; i < c->max_slice; i++)
+	    if (c->slices[i])
+		cram_free_slice(c->slices[i]);
+	free(c->slices);
+    }
+
+    if (c->TS_stats) cram_stats_free(c->TS_stats);
+    if (c->RG_stats) cram_stats_free(c->RG_stats);
+    if (c->FP_stats) cram_stats_free(c->FP_stats);
+    if (c->NS_stats) cram_stats_free(c->NS_stats);
+    if (c->RN_stats) cram_stats_free(c->RN_stats);
+    if (c->CF_stats) cram_stats_free(c->CF_stats);
+    if (c->TN_stats) cram_stats_free(c->TN_stats);
+    if (c->BA_stats) cram_stats_free(c->BA_stats);
+    if (c->TV_stats) cram_stats_free(c->TV_stats);
+    if (c->BS_stats) cram_stats_free(c->BS_stats);
+    if (c->FC_stats) cram_stats_free(c->FC_stats);
+    if (c->BF_stats) cram_stats_free(c->BF_stats);
+    if (c->AP_stats) cram_stats_free(c->AP_stats);
+    if (c->NF_stats) cram_stats_free(c->NF_stats);
+    if (c->MF_stats) cram_stats_free(c->MF_stats);
+    if (c->FN_stats) cram_stats_free(c->FN_stats);
+    if (c->RL_stats) cram_stats_free(c->RL_stats);
+    if (c->DL_stats) cram_stats_free(c->DL_stats);
+    if (c->TC_stats) cram_stats_free(c->TC_stats);
+    if (c->TL_stats) cram_stats_free(c->TL_stats);
+    if (c->MQ_stats) cram_stats_free(c->MQ_stats);
+    if (c->TM_stats) cram_stats_free(c->TM_stats);
+    if (c->QS_stats) cram_stats_free(c->QS_stats);
+    if (c->NP_stats) cram_stats_free(c->NP_stats);
+    if (c->RI_stats) cram_stats_free(c->RI_stats);
+    if (c->RS_stats) cram_stats_free(c->RS_stats);
+    if (c->PD_stats) cram_stats_free(c->PD_stats);
+    if (c->HC_stats) cram_stats_free(c->HC_stats);
+
+    //if (c->aux_B_stats) cram_stats_free(c->aux_B_stats);
+    
+    if (c->tags_used) kh_destroy(s_i2i, c->tags_used);
+
+    free(c);
+}
+
+/*
+ * Reads a container header.
+ *
+ * Returns cram_container on success
+ *         NULL on failure or no container left (fd->err == 0).
+ */
+cram_container *cram_read_container(cram_fd *fd) {
+    cram_container c2, *c;
+    int i, s;
+    size_t rd = 0;
+    
+    fd->err = 0;
+
+    memset(&c2, 0, sizeof(c2));
+    if (fd->version == CRAM_1_VERS) {
+	if ((s = itf8_decode(fd, &c2.length)) == -1) {
+	    fd->eof = fd->empty_container ? 1 : 2;
+	    return NULL;
+	} else {
+	    rd+=s;
+	}
+    } else {
+	if ((s = int32_decode(fd, &c2.length)) == -1) {
+	    fd->eof = fd->empty_container ? 1 : 2;
+	    return NULL;
+	} else {
+	    rd+=s;
+	}
+    }
+    if ((s = itf8_decode(fd, &c2.ref_seq_id))   == -1) return NULL; else rd+=s;
+    if ((s = itf8_decode(fd, &c2.ref_seq_start))== -1) return NULL; else rd+=s;
+    if ((s = itf8_decode(fd, &c2.ref_seq_span)) == -1) return NULL; else rd+=s;
+    if ((s = itf8_decode(fd, &c2.num_records))  == -1) return NULL; else rd+=s;
+
+    if (fd->version == CRAM_1_VERS) {
+	c2.record_counter = 0;
+	c2.num_bases = 0;
+    } else {
+	if ((s = itf8_decode(fd, &c2.record_counter)) == -1)
+	    return NULL;
+	else
+	    rd += s;
+
+	if ((s = ltf8_decode(fd, &c2.num_bases))== -1)
+	    return NULL;
+	else
+	    rd += s;
+    }
+    if ((s = itf8_decode(fd, &c2.num_blocks))   == -1) return NULL; else rd+=s;
+    if ((s = itf8_decode(fd, &c2.num_landmarks))== -1) return NULL; else rd+=s;
+
+    if (!(c = calloc(1, sizeof(*c))))
+	return NULL;
+
+    *c = c2;
+
+    if (!(c->landmark = malloc(c->num_landmarks * sizeof(int32_t))) &&
+	c->num_landmarks) {
+	fd->err = errno;
+	cram_free_container(c);
+	return NULL;
+    }  
+    for (i = 0; i < c->num_landmarks; i++) {
+	if ((s = itf8_decode(fd, &c->landmark[i])) == -1) {
+	    cram_free_container(c);
+	    return NULL;
+	} else {
+	    rd += s;
+	}
+    }
+    c->offset = rd;
+
+    c->slices = NULL;
+    c->curr_slice = 0;
+    c->max_slice = c->num_landmarks;
+    c->slice_rec = 0;
+    c->curr_rec = 0;
+    c->max_rec = 0;
+
+    if (c->ref_seq_id == -2) {
+	c->multi_seq = 1;
+	fd->multi_seq = 1;
+    }
+
+    fd->empty_container =
+	(c->num_records == 0 &&
+	 c->ref_seq_id == -1 &&
+	 c->ref_seq_start == 0x454f46 /* EOF */) ? 1 : 0;
+
+    return c;
+}
+
+/*
+ * Writes a container structure.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_write_container(cram_fd *fd, cram_container *c) {
+    char buf_a[1024], *buf = buf_a, *cp;
+    int i;
+
+    if (50 + c->num_landmarks * 5 >= 1024)
+	buf = malloc(50 + c->num_landmarks * 5);
+    cp = buf;
+
+    if (fd->version == CRAM_1_VERS) {
+	cp += itf8_put(cp, c->length);
+    } else {
+	*(int32_t *)cp = le_int4(c->length);
+	cp += 4;
+    }
+    if (c->multi_seq) {
+	cp += itf8_put(cp, -2);
+	cp += itf8_put(cp, 0);
+	cp += itf8_put(cp, 0);
+    } else {
+	cp += itf8_put(cp, c->ref_seq_id);
+	cp += itf8_put(cp, c->ref_seq_start);
+	cp += itf8_put(cp, c->ref_seq_span);
+    }
+    cp += itf8_put(cp, c->num_records);
+    if (fd->version != CRAM_1_VERS) {
+	cp += itf8_put(cp, c->record_counter);
+	cp += ltf8_put(cp, c->num_bases);
+    }
+    cp += itf8_put(cp, c->num_blocks);
+    cp += itf8_put(cp, c->num_landmarks);
+    for (i = 0; i < c->num_landmarks; i++)
+	cp += itf8_put(cp, c->landmark[i]);
+    if (cp-buf != hwrite(fd->fp, buf, cp-buf)) {
+	if (buf != buf_a)
+	    free(buf);
+	return -1;
+    }
+
+    if (buf != buf_a)
+	free(buf);
+
+    return 0;
+}
+
+// common component shared by cram_flush_container{,_mt}
+static int cram_flush_container2(cram_fd *fd, cram_container *c) {
+    int i, j;
+
+    //fprintf(stderr, "Writing container %d, sum %u\n", c->record_counter, sum);
+
+    /* Write the container struct itself */
+    if (0 != cram_write_container(fd, c))
+	return -1;
+
+    /* And the compression header */
+    if (0 != cram_write_block(fd, c->comp_hdr_block))
+	return -1;
+
+    /* Followed by the slice blocks */
+    for (i = 0; i < c->curr_slice; i++) {
+	cram_slice *s = c->slices[i];
+
+	if (0 != cram_write_block(fd, s->hdr_block))
+	    return -1;
+
+	for (j = 0; j < s->hdr->num_blocks; j++) {
+	    if (0 != cram_write_block(fd, s->block[j]))
+		return -1;
+	}
+    }
+
+    return hflush(fd->fp) == 0 ? 0 : -1;
+}
+
+/*
+ * Flushes a completely or partially full container to disk, writing
+ * container structure, header and blocks. This also calls the encoder
+ * functions.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_flush_container(cram_fd *fd, cram_container *c) {
+    /* Encode the container blocks and generate compression header */
+    if (0 != cram_encode_container(fd, c))
+	return -1;
+
+    return cram_flush_container2(fd, c);
+}
+
+typedef struct {
+    cram_fd *fd;
+    cram_container *c;
+} cram_job;
+
+void *cram_flush_thread(void *arg) {
+    cram_job *j = (cram_job *)arg;
+
+    /* Encode the container blocks and generate compression header */
+    if (0 != cram_encode_container(j->fd, j->c)) {
+	fprintf(stderr, "cram_encode_container failed\n");
+	return NULL;
+    }
+
+    return arg;
+}
+
+static int cram_flush_result(cram_fd *fd) {
+    int i, ret = 0;
+    t_pool_result *r;
+
+    while ((r = t_pool_next_result(fd->rqueue))) {
+	cram_job *j = (cram_job *)r->data;
+	cram_container *c;
+
+	if (!j) {
+	    t_pool_delete_result(r, 0);
+	    return -1;
+	}
+
+	fd = j->fd;
+	c = j->c;
+
+	if (0 != cram_flush_container2(fd, c))
+	    return -1;
+
+	/* Free the container */
+	for (i = 0; i < c->max_slice; i++) {
+	    cram_free_slice(c->slices[i]);
+	    c->slices[i] = NULL;
+	}
+
+	c->slice = NULL;
+	c->curr_slice = 0;
+
+	cram_free_container(c);
+
+	ret |= hflush(fd->fp) == 0 ? 0 : -1;
+
+	t_pool_delete_result(r, 1);
+    }
+
+    return ret;
+}
+
+int cram_flush_container_mt(cram_fd *fd, cram_container *c) {
+    cram_job *j;
+
+    if (!fd->pool)
+	return cram_flush_container(fd, c);
+
+    if (!(j = malloc(sizeof(*j))))
+	return -1;
+    j->fd = fd;
+    j->c = c;
+    
+    t_pool_dispatch(fd->pool, fd->rqueue, cram_flush_thread, j);
+
+    return cram_flush_result(fd);
+}
+
+/* ----------------------------------------------------------------------
+ * Compression headers; the first part of the container
+ */
+
+/*
+ * Creates a new blank container compression header
+ *
+ * Returns header ptr on success
+ *         NULL on failure
+ */
+cram_block_compression_hdr *cram_new_compression_header(void) {
+    cram_block_compression_hdr *hdr = calloc(1, sizeof(*hdr));
+    if (!hdr)
+	return NULL;
+
+    if (!(hdr->TD_blk = cram_new_block(CORE, 0))) {
+	free(hdr);
+	return NULL;
+    }
+
+    if (!(hdr->TD_hash = kh_init(m_s2i))) {
+	cram_free_block(hdr->TD_blk);
+	free(hdr);
+	return NULL;
+    }
+
+    if (!(hdr->TD_keys = string_pool_create(8192))) {
+	kh_destroy(m_s2i, hdr->TD_hash);
+	cram_free_block(hdr->TD_blk);
+	free(hdr);
+	return NULL;
+    }
+
+    return hdr;
+}
+
+void cram_free_compression_header(cram_block_compression_hdr *hdr) {
+    int i;
+
+    if (hdr->landmark)
+	free(hdr->landmark);
+
+    if (hdr->preservation_map)
+	kh_destroy(map, hdr->preservation_map);
+
+    for (i = 0; i < CRAM_MAP_HASH; i++) {
+	cram_map *m, *m2;
+	for (m = hdr->rec_encoding_map[i]; m; m = m2) {
+	    m2 = m->next;
+	    if (m->codec)
+		m->codec->free(m->codec);
+	    free(m);
+	}
+    }
+
+    for (i = 0; i < CRAM_MAP_HASH; i++) {
+	cram_map *m, *m2;
+	for (m = hdr->tag_encoding_map[i]; m; m = m2) {
+	    m2 = m->next;
+	    if (m->codec)
+		m->codec->free(m->codec);
+	    free(m);
+	}
+    }
+
+    if (hdr->BF_codec) hdr->BF_codec->free(hdr->BF_codec);
+    if (hdr->CF_codec) hdr->CF_codec->free(hdr->CF_codec);
+    if (hdr->RL_codec) hdr->RL_codec->free(hdr->RL_codec);
+    if (hdr->AP_codec) hdr->AP_codec->free(hdr->AP_codec);
+    if (hdr->RG_codec) hdr->RG_codec->free(hdr->RG_codec);
+    if (hdr->MF_codec) hdr->MF_codec->free(hdr->MF_codec);
+    if (hdr->NS_codec) hdr->NS_codec->free(hdr->NS_codec);
+    if (hdr->NP_codec) hdr->NP_codec->free(hdr->NP_codec);
+    if (hdr->TS_codec) hdr->TS_codec->free(hdr->TS_codec);
+    if (hdr->NF_codec) hdr->NF_codec->free(hdr->NF_codec);
+    if (hdr->TC_codec) hdr->TC_codec->free(hdr->TC_codec);
+    if (hdr->TN_codec) hdr->TN_codec->free(hdr->TN_codec);
+    if (hdr->TL_codec) hdr->TL_codec->free(hdr->TL_codec);
+    if (hdr->FN_codec) hdr->FN_codec->free(hdr->FN_codec);
+    if (hdr->FC_codec) hdr->FC_codec->free(hdr->FC_codec);
+    if (hdr->FP_codec) hdr->FP_codec->free(hdr->FP_codec);
+    if (hdr->BS_codec) hdr->BS_codec->free(hdr->BS_codec);
+    if (hdr->IN_codec) hdr->IN_codec->free(hdr->IN_codec);
+    if (hdr->SC_codec) hdr->SC_codec->free(hdr->SC_codec);
+    if (hdr->DL_codec) hdr->DL_codec->free(hdr->DL_codec);
+    if (hdr->BA_codec) hdr->BA_codec->free(hdr->BA_codec);
+    if (hdr->MQ_codec) hdr->MQ_codec->free(hdr->MQ_codec);
+    if (hdr->RN_codec) hdr->RN_codec->free(hdr->RN_codec);
+    if (hdr->QS_codec) hdr->QS_codec->free(hdr->QS_codec);
+    if (hdr->Qs_codec) hdr->Qs_codec->free(hdr->Qs_codec);
+    if (hdr->RI_codec) hdr->RI_codec->free(hdr->RI_codec);
+    if (hdr->RS_codec) hdr->RS_codec->free(hdr->RS_codec);
+    if (hdr->PD_codec) hdr->PD_codec->free(hdr->PD_codec);
+    if (hdr->HC_codec) hdr->HC_codec->free(hdr->HC_codec);
+
+    if (hdr->TL)
+	free(hdr->TL);
+    if (hdr->TD_blk)
+	cram_free_block(hdr->TD_blk);
+    if (hdr->TD_hash)
+	kh_destroy(m_s2i, hdr->TD_hash);
+    if (hdr->TD_keys)
+	string_pool_destroy(hdr->TD_keys);
+
+    free(hdr);
+}
+
+
+/* ----------------------------------------------------------------------
+ * Slices and slice headers
+ */
+
+void cram_free_slice_header(cram_block_slice_hdr *hdr) {
+    if (!hdr)
+	return;
+
+    if (hdr->block_content_ids)
+	free(hdr->block_content_ids);
+
+    free(hdr);
+
+    return;
+}
+
+void cram_free_slice(cram_slice *s) {
+    if (!s)
+	return;
+
+    if (s->hdr_block)
+	cram_free_block(s->hdr_block);
+
+    if (s->block) {
+	int i;
+
+	if (s->hdr) {
+	    for (i = 0; i < s->hdr->num_blocks; i++) {
+		cram_free_block(s->block[i]);
+	    }
+	}
+	free(s->block);
+    }
+
+    if (s->block_by_id)
+	free(s->block_by_id);
+
+    if (s->hdr)
+	cram_free_slice_header(s->hdr);
+
+    if (s->seqs_blk)
+	cram_free_block(s->seqs_blk);
+
+    if (s->qual_blk)
+	cram_free_block(s->qual_blk);
+
+    if (s->name_blk)
+	cram_free_block(s->name_blk);
+
+    if (s->aux_blk)
+	cram_free_block(s->aux_blk);
+
+    if (s->base_blk)
+	cram_free_block(s->base_blk);
+
+    if (s->soft_blk)
+	cram_free_block(s->soft_blk);
+
+#ifdef TN_external
+    if (s->tn_blk)
+	cram_free_block(s->tn_blk);
+#endif
+
+    if (s->cigar)
+	free(s->cigar);
+
+    if (s->crecs)
+	free(s->crecs);
+
+    if (s->features)
+	free(s->features);
+
+#ifndef TN_external
+    if (s->TN)
+	free(s->TN);
+#endif
+    
+    if (s->pair_keys)
+	string_pool_destroy(s->pair_keys);
+
+    if (s->pair)
+	kh_destroy(m_s2i, s->pair);
+
+    free(s);
+}
+
+/*
+ * Creates a new empty slice in memory, for subsequent writing to
+ * disk.
+ *
+ * Returns cram_slice ptr on success
+ *         NULL on failure
+ */
+cram_slice *cram_new_slice(enum cram_content_type type, int nrecs) {
+    cram_slice *s = calloc(1, sizeof(*s));
+    if (!s)
+	return NULL;
+
+    if (!(s->hdr = (cram_block_slice_hdr *)calloc(1, sizeof(*s->hdr))))
+	goto err;
+    s->hdr->content_type = type;
+
+    s->hdr_block = NULL;
+    s->block = NULL;
+    s->block_by_id = NULL;
+    s->last_apos = 0;
+    s->id = 0;
+    if (!(s->crecs = malloc(nrecs * sizeof(cram_record))))        goto err;
+    s->cigar = NULL;
+    s->cigar_alloc = 0;
+    s->ncigar = 0;
+
+    if (!(s->seqs_blk = cram_new_block(EXTERNAL, 0)))             goto err;
+    if (!(s->qual_blk = cram_new_block(EXTERNAL, CRAM_EXT_QUAL))) goto err;
+    if (!(s->name_blk = cram_new_block(EXTERNAL, CRAM_EXT_NAME))) goto err;
+    if (!(s->aux_blk  = cram_new_block(EXTERNAL, CRAM_EXT_TAG)))  goto err;
+    if (!(s->base_blk = cram_new_block(EXTERNAL, CRAM_EXT_IN)))   goto err;
+    if (!(s->soft_blk = cram_new_block(EXTERNAL, CRAM_EXT_SC)))   goto err;
+#ifdef TN_external
+    if (!(s->tn_blk   = cram_new_block(EXTERNAL, CRAM_EXT_TN)))   goto err;
+#endif
+
+    s->features = NULL;
+    s->nfeatures = s->afeatures = 0;
+
+#ifndef TN_external
+    s->TN = NULL;
+    s->nTN = s->aTN = 0;
+#endif
+
+    // Volatile keys as we do realloc in dstring
+    if (!(s->pair_keys = string_pool_create(8192))) goto err;
+    if (!(s->pair = kh_init(m_s2i)))                goto err;
+    
+#ifdef BA_external
+    s->BA_len = 0;
+#endif
+
+    return s;
+
+ err:
+    if (s)
+	cram_free_slice(s);
+
+    return NULL;
+}
+
+/*
+ * Loads an entire slice.
+ * FIXME: In 1.0 the native unit of slices within CRAM is broken
+ * as slices contain references to objects in other slices.
+ * To work around this while keeping the slice oriented outer loop
+ * we read all slices and stitch them together into a fake large
+ * slice instead.
+ *
+ * Returns cram_slice ptr on success
+ *         NULL on failure
+ */
+cram_slice *cram_read_slice(cram_fd *fd) {
+    cram_block *b = cram_read_block(fd);
+    cram_slice *s = calloc(1, sizeof(*s));
+    int i, n, max_id, min_id;
+
+    if (!b || !s)
+	goto err;
+
+    s->hdr_block = b;
+    switch (b->content_type) {
+    case MAPPED_SLICE:
+    case UNMAPPED_SLICE:
+	if (!(s->hdr = cram_decode_slice_header(fd, b)))
+	    goto err;
+	break;
+
+    default:
+	fprintf(stderr, "Unexpected block of type %s\n",
+		cram_content_type2str(b->content_type));
+	goto err;
+    }
+
+    s->block = calloc(n = s->hdr->num_blocks, sizeof(*s->block));
+    if (!s->block)
+	goto err;
+
+    for (max_id = i = 0, min_id = INT_MAX; i < n; i++) {
+	if (!(s->block[i] = cram_read_block(fd)))
+	    goto err;
+
+	if (s->block[i]->content_type == EXTERNAL) {
+	    if (max_id < s->block[i]->content_id)
+		max_id = s->block[i]->content_id;
+	    if (min_id > s->block[i]->content_id)
+		min_id = s->block[i]->content_id;
+	}
+    }
+    if (min_id >= 0 && max_id < 1024) {
+	if (!(s->block_by_id = calloc(1024, sizeof(s->block[0]))))
+	    goto err;
+
+	for (i = 0; i < n; i++) {
+	    if (s->block[i]->content_type != EXTERNAL)
+		continue;
+	    s->block_by_id[s->block[i]->content_id] = s->block[i];
+	}
+    }
+
+    /* Initialise encoding/decoding tables */
+    s->cigar = NULL;
+    s->cigar_alloc = 0;
+    s->ncigar = 0;
+
+    if (!(s->seqs_blk = cram_new_block(EXTERNAL, 0)))             goto err;
+    if (!(s->qual_blk = cram_new_block(EXTERNAL, CRAM_EXT_QUAL))) goto err;
+    if (!(s->name_blk = cram_new_block(EXTERNAL, CRAM_EXT_NAME))) goto err;
+    if (!(s->aux_blk  = cram_new_block(EXTERNAL, CRAM_EXT_TAG)))  goto err;
+    if (!(s->base_blk = cram_new_block(EXTERNAL, CRAM_EXT_IN)))   goto err;
+    if (!(s->soft_blk = cram_new_block(EXTERNAL, CRAM_EXT_SC)))   goto err;
+#ifdef TN_external
+    if (!(s->tn_blk   = cram_new_block(EXTERNAL, CRAM_EXT_TN)))   goto err;
+#endif
+
+
+    s->crecs = NULL;
+
+    s->last_apos = s->hdr->ref_seq_start;
+    
+    s->id = fd->slice_num++;
+
+    return s;
+
+ err:
+    if (b)
+	cram_free_block(b);
+    if (s) {
+	s->hdr_block = NULL;
+	cram_free_slice(s);
+    }
+    return NULL;
+}
+
+
+/* ----------------------------------------------------------------------
+ * CRAM file definition (header)
+ */
+
+/*
+ * Reads a CRAM file definition structure.
+ * Returns file_def ptr on success
+ *         NULL on failure
+ */
+cram_file_def *cram_read_file_def(cram_fd *fd) {
+    cram_file_def *def = malloc(sizeof(*def));
+    if (!def)
+	return NULL;
+
+    if (26 != hread(fd->fp, &def->magic[0], 26)) {
+	free(def);
+	return NULL;
+    }
+
+    if (memcmp(def->magic, "CRAM", 4) != 0) {
+	free(def);
+	return NULL;
+    }
+
+    if (def->major_version > 2) {
+	fprintf(stderr, "CRAM version number mismatch\n"
+		"Expected 1.x or 2.x, got %d.%d\n",
+		def->major_version, def->minor_version);
+	free(def);
+	return NULL;
+    }
+
+    fd->first_container += 26;
+    fd->last_slice = 0;
+
+    return def;
+}
+
+/*
+ * Writes a cram_file_def structure to cram_fd.
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_write_file_def(cram_fd *fd, cram_file_def *def) {
+    return (hwrite(fd->fp, &def->magic[0], 26) == 26) ? 0 : -1;
+}
+
+void cram_free_file_def(cram_file_def *def) {
+    if (def) free(def);
+}
+
+/* ----------------------------------------------------------------------
+ * SAM header I/O
+ */
+
+
+/*
+ * Reads the SAM header from the first CRAM data block.
+ * Also performs minimal parsing to extract read-group
+ * and sample information.
+
+ * Returns SAM hdr ptr on success
+ *         NULL on failure
+ */
+SAM_hdr *cram_read_SAM_hdr(cram_fd *fd) {
+    int32_t header_len;
+    char *header;
+    SAM_hdr *hdr;
+
+    /* 1.1 onwards stores the header in the first block of a container */
+    if (fd->version == CRAM_1_VERS) {
+	/* Length */
+	if (-1 == int32_decode(fd, &header_len))
+	    return NULL;
+
+	/* Alloc and read */
+	if (NULL == (header = malloc(header_len+1)))
+	    return NULL;
+
+	*header = 0;
+	if (header_len != hread(fd->fp, header, header_len))
+	    return NULL;
+
+	fd->first_container += 4 + header_len;
+    } else {
+	cram_container *c = cram_read_container(fd);
+	cram_block *b;
+	int i, len;
+
+	if (!c)
+	    return NULL;
+
+	if (c->num_blocks < 1) {
+	    cram_free_container(c);
+	    return NULL;
+	}
+
+	if (!(b = cram_read_block(fd))) {
+	    cram_free_container(c);
+	    return NULL;
+	}
+
+	len = b->comp_size + 2 +
+	    itf8_size(b->content_id) + 
+	    itf8_size(b->uncomp_size) + 
+	    itf8_size(b->comp_size);
+
+	/* Extract header from 1st block */
+	if (-1 == int32_get(b, &header_len) ||
+	    b->uncomp_size - 4 < header_len) {
+	    cram_free_container(c);
+	    cram_free_block(b);
+	    return NULL;
+	}
+	if (NULL == (header = malloc(header_len))) {
+	    cram_free_container(c);
+	    cram_free_block(b);
+	    return NULL;
+	}
+	memcpy(header, BLOCK_END(b), header_len);
+	cram_free_block(b);
+
+	/* Consume any remaining blocks */
+	for (i = 1; i < c->num_blocks; i++) {
+	    if (!(b = cram_read_block(fd))) {
+		cram_free_container(c);
+		return NULL;
+	    }
+	    len += b->comp_size + 2 + 
+		itf8_size(b->content_id) + 
+		itf8_size(b->uncomp_size) + 
+		itf8_size(b->comp_size);
+	    cram_free_block(b);
+	}
+
+	if (c->length && c->length > len) {
+	    // Consume padding
+	    char *pads = malloc(c->length - len);
+	    if (!pads) {
+		cram_free_container(c);
+		return NULL;
+	    }
+
+	    if (c->length - len != hread(fd->fp, pads, c->length - len)) {
+		cram_free_container(c);
+		return NULL;
+	    }
+	    free(pads);
+	}
+
+	cram_free_container(c);
+    }
+
+    /* Parse */
+#ifdef SAMTOOLS
+    hdr = sam_hdr_parse_(header, header_len);
+#else
+    hdr = sam_hdr_parse(header, header_len);
+#endif
+    free(header);
+
+    return hdr;
+}
+
+/*
+ * Converts 'in' to a full pathname to store in out.
+ * Out must be at least PATH_MAX bytes long.
+ */
+static void full_path(char *out, char *in) {
+    if (*in == '/') {
+	strncpy(out, in, PATH_MAX);
+	out[PATH_MAX-1] = 0;
+    } else {
+	int len;
+
+	// unable to get dir or out+in is too long
+	if (!getcwd(out, PATH_MAX) ||
+	    (len = strlen(out))+1+strlen(in) >= PATH_MAX) {
+	    strncpy(out, in, PATH_MAX);
+	    out[PATH_MAX-1] = 0;
+	    return;
+	}
+
+	sprintf(out+len, "/%.*s", PATH_MAX - len, in);
+
+	// FIXME: cope with `pwd`/../../../foo.fa ?
+    }
+}
+
+/*
+ * Writes a CRAM SAM header.
+ * Returns 0 on success
+ *        -1 on failure
+ */
+//#define BLANK_BLOCK
+//#define PADDED_CONTAINER
+#define PADDED_BLOCK
+int cram_write_SAM_hdr(cram_fd *fd, SAM_hdr *hdr) {
+    int header_len;
+
+    /* 1.0 requires and UNKNOWN read-group */
+    if (fd->version == CRAM_1_VERS) {
+	if (!sam_hdr_find_rg(hdr, "UNKNOWN"))
+	    if (sam_hdr_add(hdr, "RG",
+			    "ID", "UNKNOWN", "SM", "UNKNOWN", NULL))
+		return -1;
+    }
+
+    /* Fix M5 strings */
+    if (fd->refs && !fd->no_ref) {
+	int i;
+	for (i = 0; i < hdr->nref; i++) {
+	    SAM_hdr_type *ty;
+	    char *ref;
+
+	    if (!(ty = sam_hdr_find(hdr, "SQ", "SN", hdr->ref[i].name)))
+		return -1;
+
+	    if (!sam_hdr_find_key(hdr, ty, "M5", NULL)) {
+		char unsigned buf[16], buf2[33];
+		int j, rlen;
+		MD5_CTX md5;
+
+		if (!fd->refs ||
+		    !fd->refs->ref_id ||
+		    !fd->refs->ref_id[i]) {
+		    return -1;
+		}
+		rlen = fd->refs->ref_id[i]->length;
+		MD5_Init(&md5);
+		ref = cram_get_ref(fd, i, 1, rlen);
+		if (NULL == ref) return -1;
+		rlen = fd->refs->ref_id[i]->length; /* In case it just loaded */
+		MD5_Update(&md5, ref, rlen);
+		MD5_Final(buf, &md5);
+		cram_ref_decr(fd->refs, i);
+
+		for (j = 0; j < 16; j++) {
+		    buf2[j*2+0] = "0123456789abcdef"[buf[j]>>4];
+		    buf2[j*2+1] = "0123456789abcdef"[buf[j]&15];
+		}
+		buf2[32] = 0;
+		if (sam_hdr_update(hdr, ty, "M5", buf2, NULL))
+		    return -1;
+	    }
+
+	    if (fd->ref_fn) {
+		char ref_fn[PATH_MAX];
+		full_path(ref_fn, fd->ref_fn);
+		if (sam_hdr_update(hdr, ty, "UR", ref_fn, NULL))
+		    return -1;
+	    }
+	}
+    }
+
+    if (sam_hdr_rebuild(hdr))
+	return -1;
+
+    /* Length */
+    header_len = sam_hdr_length(hdr);
+    if (fd->version == CRAM_1_VERS) {
+	if (-1 == int32_encode(fd, header_len))
+	    return -1;
+
+	/* Text data */
+	if (header_len != hwrite(fd->fp, sam_hdr_str(hdr), header_len))
+	    return -1;
+    } else {
+	/* Create a block inside a container */
+	cram_block *b = cram_new_block(FILE_HEADER, 0);
+	cram_container *c = cram_new_container(0, 0);
+	int padded_length;
+	char *pads;
+
+	if (!b || !c) {
+	    if (b) cram_free_block(b);
+	    if (c) cram_free_container(c);
+	    return -1;
+	}
+
+	int32_put(b, header_len);
+	BLOCK_APPEND(b, sam_hdr_str(hdr), header_len);
+	BLOCK_UPLEN(b);
+
+#ifndef BLANK_BLOCK
+	c->num_blocks = 1;
+	c->num_landmarks = 1;
+	if (!(c->landmark = malloc(sizeof(*c->landmark)))) {
+	    cram_free_block(b);
+	    cram_free_container(c);
+	    return -1;
+	}
+	c->landmark[0] = 0;
+
+	c->length = b->uncomp_size + 2 +
+	    itf8_size(b->content_id)   + 
+	    itf8_size(b->uncomp_size)  +
+	    itf8_size(b->comp_size);
+#else
+	c->length = b->uncomp_size + 2 +
+	    itf8_size(b->content_id)   + 
+	    itf8_size(b->uncomp_size)  +
+	    itf8_size(b->comp_size);
+
+	c->num_blocks = 2;
+	c->num_landmarks = 2;
+	if (!(c->landmark = malloc(2*sizeof(*c->landmark))))
+	    return -1;
+	c->landmark[0] = 0;
+	c->landmark[1] = c->length;
+
+	c->length *= 2;
+#endif
+
+#ifdef PADDED_BLOCK
+	padded_length = MAX(c->length*1.5, 10000) - c->length;
+	c->length += padded_length;
+	if (NULL == (pads = calloc(1, padded_length))) {
+	    cram_free_block(b);
+	    cram_free_container(c);
+	    return -1;
+	}
+	BLOCK_APPEND(b, pads, padded_length);
+	BLOCK_UPLEN(b);
+	free(pads);
+#endif
+
+#ifdef PADDED_CONTAINER
+	padded_length = MAX(c->length*2, 10000) - c->length;
+	c->length += padded_length;
+#endif
+
+	if (-1 == cram_write_container(fd, c)) {
+	    cram_free_block(b);
+	    cram_free_container(c);
+	    return -1;
+	}
+
+	// Keep it uncompressed
+	if (-1 == cram_write_block(fd, b)) {
+	    cram_free_block(b);
+	    cram_free_container(c);
+	    return -1;
+	}
+
+#ifdef BLANK_BLOCK
+	if (-1 == cram_write_block(fd, b)) {
+	    cram_free_block(b);
+	    cram_free_container(c);
+	    return -1;
+	}
+#endif
+
+	cram_free_block(b);
+	cram_free_container(c);
+
+#ifdef PADDED_CONTAINER
+	// Write out padding to allow for in-line SAM header editing
+	if (NULL == (pads = calloc(1, padded_length)))
+	    return -1;
+	if (padded_length != hwrite(fd->fp, pads, padded_length))
+	    return -1;
+	free(pads);
+#endif
+    }
+
+    if (-1 == refs_from_header(fd->refs, fd, fd->header))
+	return -1;
+    if (-1 == refs2id(fd->refs, fd->header))
+	return -1;
+
+    if (0 != hflush(fd->fp))
+	return -1;
+
+    RP("=== Finishing saving header ===\n");
+
+    return 0;
+}
+
+/* ----------------------------------------------------------------------
+ * The top-level cram opening, closing and option handling
+ */
+
+/*
+ * Initialises the lookup tables. These could be global statics, but they're
+ * clumsy to setup in a multi-threaded environment unless we generate
+ * verbatim code and include that.
+ */
+static void cram_init_tables(cram_fd *fd) {
+    int i;
+
+    memset(fd->L1, 4, 256);
+    fd->L1['A'] = 0; fd->L1['a'] = 0;
+    fd->L1['C'] = 1; fd->L1['c'] = 1;
+    fd->L1['G'] = 2; fd->L1['g'] = 2;
+    fd->L1['T'] = 3; fd->L1['t'] = 3;
+
+    memset(fd->L2, 5, 256);
+    fd->L2['A'] = 0; fd->L2['a'] = 0;
+    fd->L2['C'] = 1; fd->L2['c'] = 1;
+    fd->L2['G'] = 2; fd->L2['g'] = 2;
+    fd->L2['T'] = 3; fd->L2['t'] = 3;
+    fd->L2['N'] = 4; fd->L2['n'] = 4;
+
+    if (fd->version == CRAM_1_VERS) {
+	for (i = 0; i < 0x200; i++) {
+	    int f = 0;
+
+	    if (i & CRAM_FPAIRED)      f |= BAM_FPAIRED;
+	    if (i & CRAM_FPROPER_PAIR) f |= BAM_FPROPER_PAIR;
+	    if (i & CRAM_FUNMAP)       f |= BAM_FUNMAP;
+	    if (i & CRAM_FREVERSE)     f |= BAM_FREVERSE;
+	    if (i & CRAM_FREAD1)       f |= BAM_FREAD1;
+	    if (i & CRAM_FREAD2)       f |= BAM_FREAD2;
+	    if (i & CRAM_FSECONDARY)   f |= BAM_FSECONDARY;
+	    if (i & CRAM_FQCFAIL)      f |= BAM_FQCFAIL;
+	    if (i & CRAM_FDUP)         f |= BAM_FDUP;
+
+	    fd->bam_flag_swap[i]  = f;
+	}
+    
+	for (i = 0; i < 0x1000; i++) {
+	    int g = 0;
+
+	    if (i & BAM_FPAIRED)	   g |= CRAM_FPAIRED;
+	    if (i & BAM_FPROPER_PAIR)  g |= CRAM_FPROPER_PAIR;
+	    if (i & BAM_FUNMAP)        g |= CRAM_FUNMAP;
+	    if (i & BAM_FREVERSE)      g |= CRAM_FREVERSE;
+	    if (i & BAM_FREAD1)        g |= CRAM_FREAD1;
+	    if (i & BAM_FREAD2)        g |= CRAM_FREAD2;
+	    if (i & BAM_FSECONDARY)    g |= CRAM_FSECONDARY;
+	    if (i & BAM_FQCFAIL)       g |= CRAM_FQCFAIL;
+	    if (i & BAM_FDUP)          g |= CRAM_FDUP;
+
+	    fd->cram_flag_swap[i] = g;
+	}
+    } else {
+	/* NOP */
+	for (i = 0; i < 0x1000; i++)
+	    fd->bam_flag_swap[i] = i;
+	for (i = 0; i < 0x1000; i++)
+	    fd->cram_flag_swap[i] = i;
+    }
+
+    memset(fd->cram_sub_matrix, 4, 32*32);
+    for (i = 0; i < 32; i++) {
+	fd->cram_sub_matrix[i]['A'&0x1f]=0;
+	fd->cram_sub_matrix[i]['C'&0x1f]=1;
+	fd->cram_sub_matrix[i]['G'&0x1f]=2;
+	fd->cram_sub_matrix[i]['T'&0x1f]=3;
+	fd->cram_sub_matrix[i]['N'&0x1f]=4;
+    }
+    for (i = 0; i < 20; i+=4) {
+	int j;
+	for (j = 0; j < 20; j++) {
+	    fd->cram_sub_matrix["ACGTN"[i>>2]&0x1f][j]=3;
+	    fd->cram_sub_matrix["ACGTN"[i>>2]&0x1f][j]=3;
+	    fd->cram_sub_matrix["ACGTN"[i>>2]&0x1f][j]=3;
+	    fd->cram_sub_matrix["ACGTN"[i>>2]&0x1f][j]=3;
+	}
+	fd->cram_sub_matrix["ACGTN"[i>>2]&0x1f][CRAM_SUBST_MATRIX[i+0]&0x1f]=0;
+	fd->cram_sub_matrix["ACGTN"[i>>2]&0x1f][CRAM_SUBST_MATRIX[i+1]&0x1f]=1;
+	fd->cram_sub_matrix["ACGTN"[i>>2]&0x1f][CRAM_SUBST_MATRIX[i+2]&0x1f]=2;
+	fd->cram_sub_matrix["ACGTN"[i>>2]&0x1f][CRAM_SUBST_MATRIX[i+3]&0x1f]=3;
+    }
+}
+
+// Default version numbers for CRAM
+static int major_version = 2;
+static int minor_version = 1;
+
+/*
+ * Opens a CRAM file for read (mode "rb") or write ("wb").
+ * The filename may be "-" to indicate stdin or stdout.
+ *
+ * Returns file handle on success
+ *         NULL on failure.
+ */
+cram_fd *cram_open(const char *filename, const char *mode) {
+    cram_FILE *fp;
+    cram_fd *fd;
+    char fmode[3]= { mode[0], '\0', '\0' };
+
+    if (strlen(mode) > 1 && (mode[1] == 'b' || mode[1] == 'c')) {
+	fmode[1] = 'b';
+    }
+
+#ifdef SAMTOOLS
+    fp = hopen(filename, fmode);
+#else
+    if (strcmp(filename, "-") == 0) {
+	fp = (*fmode == 'r') ? stdin : stdout;
+    } else {
+	fp = fopen(filename, fmode);
+    }
+#endif
+    if (!fp)
+	return NULL;
+
+    fd = cram_dopen(fp, filename, mode);
+    if (!fd)
+	hclose_abruptly(fp);
+
+    return fd;
+}
+
+/* Opens an existing stream for reading or writing.
+ *
+ * Returns file handle on success;
+ *         NULL on failure.
+ *
+ * cram_FILE is either htslib's hFILE or stdio's FILE, depending on how
+ * cram_structs.h has been configured.
+ */
+cram_fd *cram_dopen(cram_FILE *fp, const char *filename, const char *mode) {
+    int i;
+    char *cp;
+    cram_fd *fd = calloc(1, sizeof(*fd));
+    if (!fd)
+	return NULL;
+
+    fd->level = 5;
+    if (strlen(mode) > 2 && mode[2] >= '0' && mode[2] <= '9')
+	fd->level = mode[2] - '0';
+
+    fd->fp = fp;
+    fd->mode = *mode;
+    fd->first_container = 0;
+
+    if (fd->mode == 'r') {
+	/* Reader */
+
+	if (!(fd->file_def = cram_read_file_def(fd)))
+	    goto err;
+
+	fd->version = fd->file_def->major_version * 100 +
+	    fd->file_def->minor_version;
+
+	if (!(fd->header = cram_read_SAM_hdr(fd)))
+	    goto err;
+
+    } else {
+	/* Writer */
+	cram_file_def def;
+
+	def.magic[0] = 'C';
+	def.magic[1] = 'R';
+	def.magic[2] = 'A';
+	def.magic[3] = 'M';
+	def.major_version = major_version;
+	def.minor_version = minor_version;
+	memset(def.file_id, 0, 20);
+	strncpy(def.file_id, filename, 20);
+	if (0 != cram_write_file_def(fd, &def))
+	    goto err;
+
+	fd->version = def.major_version * 100 + def.minor_version;
+
+	/* SAM header written later */
+    }
+
+    cram_init_tables(fd);
+
+    fd->prefix = strdup((cp = strrchr(filename, '/')) ? cp+1 : filename);
+    if (!fd->prefix)
+	goto err;
+    fd->slice_num = 0;
+    fd->first_base = fd->last_base = -1;
+    fd->record_counter = 0;
+
+    fd->ctr = NULL;
+    fd->refs  = refs_create();
+    if (!fd->refs)
+	goto err;
+    fd->ref_id = -2;
+    fd->ref = NULL;
+
+    fd->decode_md = 0;
+    fd->verbose = 0;
+    fd->seqs_per_slice = SEQS_PER_SLICE;
+    fd->slices_per_container = SLICE_PER_CNT;
+    fd->embed_ref = 0;
+    fd->no_ref = 0;
+    fd->ignore_md5 = 0;
+    fd->use_bz2 = 0;
+    fd->multi_seq = 0;
+    fd->unsorted   = 0;
+    fd->shared_ref = 0;
+
+    fd->index       = NULL;
+    fd->own_pool    = 0;
+    fd->pool        = NULL;
+    fd->rqueue      = NULL;
+    fd->job_pending = NULL;
+    fd->ooc         = 0;
+
+    for (i = 0; i < 7; i++)
+	fd->m[i] = cram_new_metrics();
+
+    fd->range.refid = -2; // no ref.
+    fd->eof = 1;          // See samtools issue #150
+    fd->ref_fn = NULL;
+
+    fd->bl = NULL;
+
+    /* Initialise dummy refs from the @SQ headers */
+    if (-1 == refs_from_header(fd->refs, fd, fd->header))
+	goto err;
+
+    return fd;
+
+ err:
+    if (fd)
+	free(fd);
+
+    return NULL;
+}
+
+/*
+ * Seek within a CRAM file.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_seek(cram_fd *fd, off_t offset, int whence) {
+    char buf[65536];
+
+    if (hseek(fd->fp, offset, whence) >= 0)
+	return 0;
+
+    if (!(whence == SEEK_CUR && offset >= 0))
+	return -1;
+
+    /* Couldn't fseek, but we're in SEEK_CUR mode so read instead */
+    while (offset > 0) {
+	int len = MIN(65536, offset);
+	if (len != hread(fd->fp, buf, len))
+	    return -1;
+	offset -= len;
+    }
+
+    return 0;
+}
+
+/*
+ * Flushes a CRAM file.
+ * Useful for when writing to stdout without wishing to close the stream.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_flush(cram_fd *fd) {
+    if (!fd)
+	return -1;
+
+    if (fd->mode == 'w' && fd->ctr) {
+	if(fd->ctr->slice)
+	    fd->ctr->curr_slice++;
+	if (-1 == cram_flush_container_mt(fd, fd->ctr))
+	    return -1;
+    }
+
+    return 0;
+}
+
+/*
+ * Closes a CRAM file.
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_close(cram_fd *fd) {
+    spare_bams *bl, *next;
+    int i;
+	
+    if (!fd)
+	return -1;
+
+    if (fd->mode == 'w' && fd->ctr) {
+	if(fd->ctr->slice)
+	    fd->ctr->curr_slice++;
+	if (-1 == cram_flush_container_mt(fd, fd->ctr))
+	    return -1;
+    }
+
+    if (fd->pool) {
+	t_pool_flush(fd->pool);
+
+	if (0 != cram_flush_result(fd))
+	    return -1;
+
+	pthread_mutex_destroy(&fd->metrics_lock);
+	pthread_mutex_destroy(&fd->ref_lock);
+	pthread_mutex_destroy(&fd->bam_list_lock);
+
+	fd->ctr = NULL; // prevent double freeing
+
+	//fprintf(stderr, "CRAM: destroy queue %p\n", fd->rqueue);
+
+	t_results_queue_destroy(fd->rqueue);
+    }
+
+    if (fd->mode == 'w') {
+	/* Write EOF block */
+	if (30 != hwrite(fd->fp, "\x0b\x00\x00\x00\xff\xff\xff\xff"
+			 "\xff\xe0\x45\x4f\x46\x00\x00\x00"
+			 "\x00\x01\x00\x00\x01\x00\x06\x06"
+			 "\x01\x00\x01\x00\x01\x00", 30))
+	    return -1;
+
+//	if (1 != fwrite("\x00\x00\x00\x00\xff\xff\xff\xff"
+//			"\xff\xe0\x45\x4f\x46\x00\x00\x00"
+//			"\x00\x00\x00", 19, 1, fd->fp))
+//	    return -1;
+    }
+
+    for (bl = fd->bl; bl; bl = next) {
+	int i, max_rec = fd->seqs_per_slice * fd->slices_per_container;
+
+	next = bl->next;
+	for (i = 0; i < max_rec; i++) {
+	    if (bl->bams[i])
+		bam_free(bl->bams[i]);
+	}
+	free(bl->bams);
+	free(bl);
+    }
+
+    if (paranoid_hclose(fd->fp) != 0)
+	return -1;
+
+    if (fd->file_def)
+	cram_free_file_def(fd->file_def);
+
+    if (fd->header)
+	sam_hdr_free(fd->header);
+
+    free(fd->prefix);
+
+    if (fd->ctr)
+	cram_free_container(fd->ctr);
+
+    if (fd->refs)
+	refs_free(fd->refs);
+    if (fd->ref_free)
+        free(fd->ref_free);
+
+    for (i = 0; i < 7; i++)
+	if (fd->m[i])
+	    free(fd->m[i]);
+
+    if (fd->index)
+	cram_index_free(fd);
+
+    if (fd->own_pool && fd->pool)
+	t_pool_destroy(fd->pool, 0);
+
+    free(fd);
+    return 0;
+}
+
+/*
+ * Returns 1 if we hit an EOF while reading.
+ */
+int cram_eof(cram_fd *fd) {
+    return fd->eof;
+}
+
+
+/* 
+ * Sets options on the cram_fd. See CRAM_OPT_* definitions in cram_structs.h.
+ * Use this immediately after opening.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_set_option(cram_fd *fd, enum cram_option opt, ...) {
+    int r;
+    va_list args;
+
+    va_start(args, opt);
+    r = cram_set_voption(fd, opt, args);
+    va_end(args);
+
+    return r;
+}
+
+/*
+ * Sets options on the cram_fd. See CRAM_OPT_* definitions in cram_structs.h.
+ * Use this immediately after opening.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_set_voption(cram_fd *fd, enum cram_option opt, va_list args) {
+    refs_t *refs;
+
+    switch (opt) {
+    case CRAM_OPT_DECODE_MD:
+	fd->decode_md = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_PREFIX:
+	if (fd->prefix)
+	    free(fd->prefix);
+	if (!(fd->prefix = strdup(va_arg(args, char *))))
+	    return -1;
+	break;
+
+    case CRAM_OPT_VERBOSITY:
+	fd->verbose = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_SEQS_PER_SLICE:
+	fd->seqs_per_slice = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_SLICES_PER_CONTAINER:
+	fd->slices_per_container = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_EMBED_REF:
+	fd->embed_ref = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_NO_REF:
+	fd->no_ref = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_IGNORE_MD5:
+	fd->ignore_md5 = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_USE_BZIP2:
+	fd->use_bz2 = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_SHARED_REF:
+	fd->shared_ref = 1;
+	refs = va_arg(args, refs_t *);
+	if (refs != fd->refs) {
+	    if (fd->refs)
+		refs_free(fd->refs);
+	    fd->refs = refs;
+	    fd->refs->count++;
+	}
+	break;
+
+    case CRAM_OPT_RANGE:
+	fd->range = *va_arg(args, cram_range *);
+	return cram_seek_to_refpos(fd, &fd->range);
+
+    case CRAM_OPT_REFERENCE:
+	return cram_load_reference(fd, va_arg(args, char *));
+
+    case CRAM_OPT_VERSION: {
+	int major, minor;
+	char *s = va_arg(args, char *);
+	if (2 != sscanf(s, "%d.%d", &major, &minor)) {
+	    fprintf(stderr, "Malformed version string %s\n", s);
+	    return -1;
+	}
+	if (!((major == 1 &&  minor == 0) ||
+	      (major == 2 && (minor == 0 || minor == 1)) ||
+	      (major == 3 &&  minor == 0))) {
+	    fprintf(stderr, "Unknown version string; "
+		    "use 1.0, 2.0, 2.1 or 3.0\n");
+	    return -1;
+	}
+	break;
+    }
+
+    case CRAM_OPT_MULTI_SEQ_PER_SLICE:
+	fd->multi_seq = va_arg(args, int);
+	break;
+
+    case CRAM_OPT_NTHREADS: {
+	int nthreads =  va_arg(args, int);
+        if (nthreads > 1) {
+            if (!(fd->pool = t_pool_init(nthreads*2, nthreads)))
+                return -1;
+
+	    fd->rqueue = t_results_queue_init();
+	    pthread_mutex_init(&fd->metrics_lock, NULL);
+	    pthread_mutex_init(&fd->ref_lock, NULL);
+	    pthread_mutex_init(&fd->bam_list_lock, NULL);
+	    fd->shared_ref = 1;
+	    fd->own_pool = 1;
+        }
+	break;
+    }
+
+    case CRAM_OPT_THREAD_POOL:
+	fd->pool = va_arg(args, t_pool *);
+	if (fd->pool) {
+	    fd->rqueue = t_results_queue_init();
+	    pthread_mutex_init(&fd->metrics_lock, NULL);
+	    pthread_mutex_init(&fd->ref_lock, NULL);
+	    pthread_mutex_init(&fd->bam_list_lock, NULL);
+	}
+	fd->shared_ref = 1; // Needed to avoid clobbering ref between threads
+	fd->own_pool = 0;
+
+	//fd->qsize = 1;
+	//fd->decoded = calloc(fd->qsize, sizeof(cram_container *));
+	//t_pool_dispatch(fd->pool, cram_decoder_thread, fd);
+	break;
+
+    default:
+	fprintf(stderr, "Unknown CRAM option code %d\n", opt);
+	return -1;
+    }
+
+    return 0;
+}
diff --git a/htslib/cram/cram_io.h b/htslib/cram/cram_io.h
new file mode 100644
index 0000000..165dc5e
--- /dev/null
+++ b/htslib/cram/cram_io.h
@@ -0,0 +1,532 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*! \file
+ * Include cram.h instead.
+ *
+ * This is an internal part of the CRAM system and is automatically included
+ * when you #include cram.h.
+ *
+ * Implements the low level CRAM I/O primitives.
+ * This includes basic data types such as byte, int, ITF-8,
+ * maps, bitwise I/O, etc.
+ */
+
+#ifndef _CRAM_IO_H_
+#define _CRAM_IO_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ITF8_MACROS
+
+#include <stdint.h>
+#include <cram/misc.h>
+
+/**@{ ----------------------------------------------------------------------
+ * ITF8 encoding and decoding.
+ *
+ * Also see the itf8_get and itf8_put macros.
+ */
+
+/*! INTERNAL: Converts two characters into an integer for use in switch{} */
+#define CRAM_KEY(a,b) (((a)<<8)|((b)))
+
+/*! Reads an integer in ITF-8 encoding from 'fd' and stores it in
+ * *val.
+ *
+ * @return
+ * Returns the number of bytes read on success;
+ *        -1 on failure
+ */
+int itf8_decode(cram_fd *fd, int32_t *val);
+
+#ifndef ITF8_MACROS
+/*! Reads an integer in ITF-8 encoding from 'cp' and stores it in
+ * *val.
+ *
+ * @return
+ * Returns the number of bytes read on success;
+ *        -1 on failure
+ */
+int itf8_get(char *cp, int32_t *val_p);
+
+/*! Stores a value to memory in ITF-8 format.
+ *
+ * @return
+ * Returns the number of bytes required to store the number.
+ * This is a maximum of 5 bytes.
+ */
+int itf8_put(char *cp, int32_t val);
+
+#else
+
+/*
+ * Macro implementations of the above
+ */
+#define itf8_get(c,v) (((uc)(c)[0]<0x80)?(*(v)=(uc)(c)[0],1):(((uc)(c)[0]<0xc0)?(*(v)=(((uc)(c)[0]<<8)|(uc)(c)[1])&0x3fff,2):(((uc)(c)[0]<0xe0)?(*(v)=(((uc)(c)[0]<<16)|((uc)(c)[1]<<8)|(uc)(c)[2])&0x1fffff,3):(((uc)(c)[0]<0xf0)?(*(v)=(((uc)(c)[0]<<24)|((uc)(c)[1]<<16)|((uc)(c)[2]<<8)|(uc)(c)[3])&0x0fffffff,4):(*(v)=(((uc)(c)[0]&0x0f)<<28)|((uc)(c)[1]<<20)|((uc)(c)[2]<<12)|((uc)(c)[3]<<4)|((uc)(c)[4]&0x0f),5)))))
+
+#define itf8_put(c,v) ((!((v)&~0x7f))?((c)[0]=(v),1):(!((v)&~0x3fff))?((c)[0]=((v)>>8)|0x80,(c)[1]=(v)&0xff,2):(!((v)&~0x1fffff))?((c)[0]=((v)>>16)|0xc0,(c)[1]=((v)>>8)&0xff,(c)[2]=(v)&0xff,3):(!((v)&~0xfffffff))?((c)[0]=((v)>>24)|0xe0,(c)[1]=((v)>>16)&0xff,(c)[2]=((v)>>8)&0xff,(c)[3]=(v)&0xff,4):((c)[0]=0xf0|(((v)>>28)&0xff),(c)[1]=((v)>>20)&0xff,(c)[2]=((v)>>12)&0xff,(c)[3]=((v)>>4)&0xff,(c)[4]=(v)&0xf,5))
+
+#define itf8_size(v) ((!((v)&~0x7f))?1:(!((v)&~0x3fff))?2:(!((v)&~0x1fffff))?3:(!((v)&~0xfffffff))?4:5)
+
+#endif
+
+/*! Pushes a value in ITF8 format onto the end of a block.
+ *
+ * This shouldn't be used for high-volume data as it is not the fastest
+ * method.
+ *
+ * @return
+ * Returns the number of bytes written
+ */
+int itf8_put_blk(cram_block *blk, int val);
+
+/**@}*/
+/**@{ ----------------------------------------------------------------------
+ * CRAM blocks - the dynamically growable data block. We have code to
+ * create, update, (un)compress and read/write.
+ *
+ * These are derived from the deflate_interlaced.c blocks, but with the
+ * CRAM extension of content types and IDs.
+ */
+
+/*! Allocates a new cram_block structure with a specified content_type and
+ * id.
+ *
+ * @return
+ * Returns block pointer on success;
+ *         NULL on failure
+ */
+cram_block *cram_new_block(enum cram_content_type content_type,
+			   int content_id);
+
+/*! Reads a block from a cram file.
+ *
+ * @return
+ * Returns cram_block pointer on success;
+ *         NULL on failure
+ */
+cram_block *cram_read_block(cram_fd *fd);
+
+/*! Writes a CRAM block.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_write_block(cram_fd *fd, cram_block *b);
+
+/*! Frees a CRAM block, deallocating internal data too.
+ */
+void cram_free_block(cram_block *b);
+
+/*! Uncompress a memory block using Zlib.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+char *zlib_mem_inflate(char *cdata, size_t csize, size_t *size);
+
+/*! Uncompresses a CRAM block, if compressed.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_uncompress_block(cram_block *b);
+
+/*! Compresses a block.
+ *
+ * Compresses a block using one of two different zlib strategies. If we only
+ * want one choice set strat2 to be -1.
+ *
+ * The logic here is that sometimes Z_RLE does a better job than Z_FILTERED
+ * or Z_DEFAULT_STRATEGY on quality data. If so, we'd rather use it as it is
+ * significantly faster.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_compress_block(cram_fd *fd, cram_block *b, cram_metrics *metrics,
+			int level,  int strat,
+			int level2, int strat2);
+
+cram_metrics *cram_new_metrics(void);
+char *cram_block_method2str(enum cram_block_method m);
+char *cram_content_type2str(enum cram_content_type t);
+
+/* --- Accessor macros for manipulating blocks on a byte by byte basis --- */
+
+/* Block size and data pointer. */
+#define BLOCK_SIZE(b) ((b)->byte)
+#define BLOCK_DATA(b) ((b)->data)
+
+/* Returns the address one past the end of the block */
+#define BLOCK_END(b) (&(b)->data[(b)->byte])
+
+/* Request block to be at least 'l' bytes long */
+#define BLOCK_RESIZE(b,l)					\
+    do {							\
+	while((b)->alloc <= (l)) {				\
+	    (b)->alloc = (b)->alloc ? (b)->alloc*1.5 : 1024;	\
+	    (b)->data = realloc((b)->data, (b)->alloc);		\
+	}							\
+     } while(0)
+
+/* Ensure the block can hold at least another 'l' bytes */
+#define BLOCK_GROW(b,l) BLOCK_RESIZE((b), BLOCK_SIZE((b)) + (l))
+
+/* Append string 's' of length 'l' */
+#define BLOCK_APPEND(b,s,l)		  \
+    do {				  \
+        BLOCK_GROW((b),(l));		  \
+        memcpy(BLOCK_END((b)), (s), (l)); \
+	BLOCK_SIZE((b)) += (l);		  \
+    } while (0)
+
+/* Append as single character 'c' */
+#define BLOCK_APPEND_CHAR(b,c)		  \
+    do {				  \
+        BLOCK_GROW((b),1);		  \
+	(b)->data[(b)->byte++] = (c);	  \
+    } while (0)
+
+/* Append via sprintf with 1 arg */
+#define BLOCK_APPENDF_1(b,buf,fmt, a1)			\
+    do {						\
+	int l = sprintf((buf), (fmt), (a1));		\
+	BLOCK_APPEND((b), (buf), l);			\
+    } while (0)
+
+/* Append via sprintf with 2 args */
+#define BLOCK_APPENDF_2(b,buf,fmt, a1,a2)		\
+    do {						\
+	int l = sprintf((buf), (fmt), (a1), (a2));	\
+	BLOCK_APPEND((b), (buf), l);			\
+    } while (0)
+
+#define BLOCK_UPLEN(b) \
+    (b)->comp_size = (b)->uncomp_size = BLOCK_SIZE((b))
+
+/**@}*/
+/**@{ ----------------------------------------------------------------------
+ * Reference sequence handling
+ */
+
+/*! Loads a reference set from fn and stores in the cram_fd.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_load_reference(cram_fd *fd, char *fn);
+
+/*! Generates a lookup table in refs based on the SQ headers in SAM_hdr.
+ *
+ * Indexes references by the order they appear in a BAM file. This may not
+ * necessarily be the same order they appear in the fasta reference file.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int refs2id(refs_t *r, SAM_hdr *bfd);
+
+void refs_free(refs_t *r);
+
+/*! Returns a portion of a reference sequence from start to end inclusive.
+ *
+ * The returned pointer is owned by the cram_file fd and should not be freed
+ * by the caller. It is valid only until the next cram_get_ref is called
+ * with the same fd parameter (so is thread-safe if given multiple files).
+ *
+ * To return the entire reference sequence, specify start as 1 and end
+ * as 0.
+ *
+ * @return
+ * Returns reference on success;
+ *         NULL on failure
+ */
+char *cram_get_ref(cram_fd *fd, int id, int start, int end);
+void cram_ref_incr(refs_t *r, int id);
+void cram_ref_decr(refs_t *r, int id);
+/**@}*/
+/**@{ ----------------------------------------------------------------------
+ * Containers
+ */
+
+/*! Creates a new container, specifying the maximum number of slices
+ * and records permitted.
+ *
+ * @return
+ * Returns cram_container ptr on success;
+ *         NULL on failure
+ */
+cram_container *cram_new_container(int nrec, int nslice);
+void cram_free_container(cram_container *c);
+
+/*! Reads a container header.
+ *
+ * @return
+ * Returns cram_container on success;
+ *         NULL on failure or no container left (fd->err == 0).
+ */
+cram_container *cram_read_container(cram_fd *fd);
+
+/*! Writes a container structure.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_write_container(cram_fd *fd, cram_container *h);
+
+/*! Flushes a container to disk.
+ *
+ * Flushes a completely or partially full container to disk, writing
+ * container structure, header and blocks. This also calls the encoder
+ * functions.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_flush_container(cram_fd *fd, cram_container *c);
+int cram_flush_container_mt(cram_fd *fd, cram_container *c);
+
+
+/**@}*/
+/**@{ ----------------------------------------------------------------------
+ * Compression headers; the first part of the container
+ */
+
+/*! Creates a new blank container compression header
+ *
+ * @return
+ * Returns header ptr on success;
+ *         NULL on failure
+ */
+cram_block_compression_hdr *cram_new_compression_header(void);
+
+/*! Frees a cram_block_compression_hdr */
+void cram_free_compression_header(cram_block_compression_hdr *hdr);
+
+
+/**@}*/
+/**@{ ----------------------------------------------------------------------
+ * Slices and slice headers
+ */
+
+/*! Frees a slice header */
+void cram_free_slice_header(cram_block_slice_hdr *hdr);
+
+/*! Frees a slice */
+void cram_free_slice(cram_slice *s);
+
+/*! Creates a new empty slice in memory, for subsequent writing to
+ * disk.
+ *
+ * @return
+ * Returns cram_slice ptr on success;
+ *         NULL on failure
+ */
+cram_slice *cram_new_slice(enum cram_content_type type, int nrecs);
+
+/*! Loads an entire slice.
+ *
+ * FIXME: In 1.0 the native unit of slices within CRAM is broken
+ * as slices contain references to objects in other slices.
+ * To work around this while keeping the slice oriented outer loop
+ * we read all slices and stitch them together into a fake large
+ * slice instead.
+ *
+ * @return
+ * Returns cram_slice ptr on success;
+ *         NULL on failure
+ */
+cram_slice *cram_read_slice(cram_fd *fd);
+
+
+
+/**@}*/
+/**@{ ----------------------------------------------------------------------
+ * CRAM file definition (header)
+ */
+
+/*! Reads a CRAM file definition structure.
+ *
+ * @return
+ * Returns file_def ptr on success;
+ *         NULL on failure
+ */
+cram_file_def *cram_read_file_def(cram_fd *fd);
+
+/*! Writes a cram_file_def structure to cram_fd.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_write_file_def(cram_fd *fd, cram_file_def *def);
+
+/*! Frees a cram_file_def structure. */
+void cram_free_file_def(cram_file_def *def);
+
+
+/**@}*/
+/**@{ ----------------------------------------------------------------------
+ * SAM header I/O
+ */
+
+/*! Reads the SAM header from the first CRAM data block.
+ *
+ * Also performs minimal parsing to extract read-group
+ * and sample information.
+ *
+ * @return
+ * Returns SAM hdr ptr on success;
+ *         NULL on failure
+ */
+SAM_hdr *cram_read_SAM_hdr(cram_fd *fd);
+
+/*! Writes a CRAM SAM header.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_write_SAM_hdr(cram_fd *fd, SAM_hdr *hdr);
+
+
+/**@}*/
+/**@{ ----------------------------------------------------------------------
+ * The top-level cram opening, closing and option handling
+ */
+
+/*! Opens a CRAM file for read (mode "rb") or write ("wb").
+ *
+ * The filename may be "-" to indicate stdin or stdout.
+ *
+ * @return
+ * Returns file handle on success;
+ *         NULL on failure.
+ */
+cram_fd *cram_open(const char *filename, const char *mode);
+
+/*! Opens an existing stream for reading or writing.
+ *
+ * @return
+ * Returns file handle on success;
+ *         NULL on failure.
+ *
+ * cram_FILE is either htslib's hFILE or stdio's FILE, depending on how
+ * cram_structs.h has been configured.
+ */
+cram_fd *cram_dopen(cram_FILE *fp, const char *filename, const char *mode);
+
+/*! Closes a CRAM file.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_close(cram_fd *fd);
+
+/*
+ * Seek within a CRAM file.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_seek(cram_fd *fd, off_t offset, int whence);
+
+/*
+ * Flushes a CRAM file.
+ * Useful for when writing to stdout without wishing to close the stream.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int cram_flush(cram_fd *fd);
+
+/*! Checks for end of file on a cram_fd stream.
+ *
+ * @return
+ * Returns 0 if not at end of file
+ *         1 if we hit an expected EOF (end of range or EOF block)
+ *         2 for other EOF (end of stream without EOF block)
+ */
+int cram_eof(cram_fd *fd);
+
+/*! Sets options on the cram_fd.
+ *
+ * See CRAM_OPT_* definitions in cram_structs.h.
+ * Use this immediately after opening.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_set_option(cram_fd *fd, enum cram_option opt, ...);
+
+/*! Sets options on the cram_fd.
+ *
+ * See CRAM_OPT_* definitions in cram_structs.h.
+ * Use this immediately after opening.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_set_voption(cram_fd *fd, enum cram_option opt, va_list args);
+
+/*!
+ * Attaches a header to a cram_fd.
+ *
+ * This should be used when creating a new cram_fd for writing where
+ * we have an SAM_hdr already constructed (eg from a file we've read
+ * in).
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int cram_set_header(cram_fd *fd, SAM_hdr *hdr);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CRAM_IO_H_ */
diff --git a/htslib/cram/cram_samtools.c b/htslib/cram/cram_samtools.c
new file mode 100644
index 0000000..66f2efa
--- /dev/null
+++ b/htslib/cram/cram_samtools.c
@@ -0,0 +1,144 @@
+/*
+Copyright (c) 2010-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <assert.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "cram/cram.h"
+#include "htslib/sam.h"
+
+/*---------------------------------------------------------------------------
+ * Samtools compatibility portion
+ */
+int bam_construct_seq(bam_seq_t **bp, size_t extra_len,
+		      const char *qname, size_t qname_len,
+		      int flag,
+		      int rname,      // Ref ID
+		      int pos,
+		      int end,        // aligned start/end coords
+		      int mapq,
+		      uint32_t ncigar, const uint32_t *cigar,
+		      int mrnm,       // Mate Ref ID
+		      int mpos,
+		      int isize,
+		      int len,
+		      const char *seq,
+		      const char *qual) {
+    static const char L[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, 0,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,15,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,15,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
+    };
+    bam1_t *b = (bam1_t *)*bp;
+    uint8_t *cp;
+    int i, bam_len;
+
+    //b->l_aux = extra_len; // we fill this out later
+
+    bam_len = qname_len + 1 + ncigar*4 + (len+1)/2 + len + extra_len;
+    if (b->m_data < bam_len) {
+	b->m_data = bam_len;
+	kroundup32(b->m_data);
+	b->data = (uint8_t*)realloc(b->data, b->m_data);
+	if (!b->data)
+	    return -1;
+    }
+    b->l_data = bam_len;
+
+    b->core.tid     = rname;
+    b->core.pos     = pos-1;
+    b->core.bin     = bam_reg2bin(pos, end);
+    b->core.qual    = mapq;
+    b->core.l_qname = qname_len+1;
+    b->core.flag    = flag;
+    b->core.n_cigar = ncigar;
+    b->core.l_qseq  = len;
+    b->core.mtid    = mrnm;
+    b->core.mpos    = mpos-1;
+    b->core.isize   = isize;
+
+    cp = b->data;
+
+    strncpy((char *)cp, qname, qname_len);
+    cp[qname_len] = 0;
+    cp += qname_len+1;
+    memcpy(cp, cigar, ncigar*4);
+    cp += ncigar*4;
+
+    for (i = 0; i+1 < len; i+=2) {
+	*cp++ = (L[(uc)seq[i]]<<4) + L[(uc)seq[i+1]];
+    }
+    if (i < len)
+	*cp++ = L[(uc)seq[i]]<<4;
+
+    memcpy(cp, qual, len);
+
+    return 0;
+}
+
+bam_hdr_t *cram_header_to_bam(SAM_hdr *h) {
+    int i;
+    bam_hdr_t *header = bam_hdr_init();
+
+    header->l_text = ks_len(&h->text);
+    header->text = malloc(header->l_text+1);
+    memcpy(header->text, ks_str(&h->text), header->l_text);
+    header->text[header->l_text] = 0;
+
+    header->n_targets = h->nref;
+    header->target_name = (char **)calloc(header->n_targets,
+					  sizeof(char *));
+    header->target_len = (uint32_t *)calloc(header->n_targets, 4);
+
+    for (i = 0; i < h->nref; i++) {
+	header->target_name[i] = strdup(h->ref[i].name);
+	header->target_len[i] = h->ref[i].len;
+    }
+
+    return header;
+}
+
+SAM_hdr *bam_header_to_cram(bam_hdr_t *h) {
+    return sam_hdr_parse_(h->text, h->l_text);
+}
diff --git a/htslib/cram/cram_samtools.h b/htslib/cram/cram_samtools.h
new file mode 100644
index 0000000..f7949d0
--- /dev/null
+++ b/htslib/cram/cram_samtools.h
@@ -0,0 +1,97 @@
+/*
+Copyright (c) 2010-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _CRAM_SAMTOOLS_H_
+#define _CRAM_SAMTOOLS_H_
+
+/* Samtools compatible API */
+#define bam_blk_size(b)  ((b)->l_data)
+#define bam_set_blk_size(b,v) ((b)->data_len = (v))
+
+#define bam_ref(b)       (b)->core.tid
+#define bam_pos(b)       (b)->core.pos
+#define bam_mate_pos(b)  (b)->core.mpos
+#define bam_mate_ref(b)  (b)->core.mtid
+#define bam_ins_size(b)  (b)->core.isize
+#define bam_seq_len(b)   (b)->core.l_qseq
+#define bam_cigar_len(b) (b)->core.n_cigar
+#define bam_flag(b)      (b)->core.flag
+#define bam_bin(b)       (b)->core.bin
+#define bam_map_qual(b)  (b)->core.qual
+#define bam_name_len(b)  (b)->core.l_qname
+#define bam_name(b)      bam_get_qname((b))
+#define bam_qual(b)      bam_get_qual((b))
+#define bam_seq(b)       bam_get_seq((b))
+#define bam_cigar(b)     bam_get_cigar((b))
+#define bam_aux(b)       bam_get_aux((b))
+
+#define bam_dup(b)       bam_copy1(bam_init1(), (b))
+
+#define bam_free(b)      bam_destroy1((b))
+
+#define bam_reg2bin(beg,end) hts_reg2bin((beg),(end),14,5)
+
+#include "htslib/sam.h"
+
+enum cigar_op {
+    BAM_CMATCH_=BAM_CMATCH,
+    BAM_CINS_=BAM_CINS,
+    BAM_CDEL_=BAM_CDEL,
+    BAM_CREF_SKIP_=BAM_CREF_SKIP,
+    BAM_CSOFT_CLIP_=BAM_CSOFT_CLIP,
+    BAM_CHARD_CLIP_=BAM_CHARD_CLIP,
+    BAM_CPAD_=BAM_CPAD,
+    BAM_CBASE_MATCH=BAM_CEQUAL,
+    BAM_CBASE_MISMATCH=BAM_CDIFF
+};
+
+typedef bam1_t bam_seq_t;
+
+#include "cram/sam_header.h"
+
+bam_hdr_t *cram_header_to_bam(SAM_hdr *h);
+SAM_hdr *bam_header_to_cram(bam_hdr_t *h);
+
+int bam_construct_seq(bam_seq_t **bp, size_t extra_len,
+		      const char *qname, size_t qname_len,
+		      int flag,
+		      int rname,      // Ref ID
+		      int pos,
+		      int end,        // aligned start/end coords
+		      int mapq,
+		      uint32_t ncigar, const uint32_t *cigar,
+		      int mrnm,       // Mate Ref ID
+		      int mpos,
+		      int isize,
+		      int len,
+		      const char *seq,
+		      const char *qual);
+
+#endif /* _CRAM_SAMTOOLS_H_ */
diff --git a/htslib/cram/cram_stats.c b/htslib/cram/cram_stats.c
new file mode 100644
index 0000000..18d0605
--- /dev/null
+++ b/htslib/cram/cram_stats.c
@@ -0,0 +1,357 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <zlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <math.h>
+#include <ctype.h>
+
+#include "cram/cram.h"
+#include "cram/os.h"
+
+cram_stats *cram_stats_create(void) {
+    return calloc(1, sizeof(cram_stats));
+}
+
+void cram_stats_add(cram_stats *st, int32_t val) {
+    st->nsamp++;
+
+    //assert(val >= 0);
+
+    if (val < MAX_STAT_VAL && val >= 0) {
+	st->freqs[val]++;
+    } else {
+	khint_t k;
+	int r;
+
+	if (!st->h) {
+	    st->h = kh_init(m_i2i);
+	}
+
+	k = kh_put(m_i2i, st->h, val, &r);
+	if (r == 0)
+	    kh_val(st->h, k)++;
+	else if (r != -1)
+	    kh_val(st->h, k) = 1;
+	else
+	    ; // FIXME: handle error
+    }
+}
+
+void cram_stats_del(cram_stats *st, int32_t val) {
+    st->nsamp--;
+
+    //assert(val >= 0);
+
+    if (val < MAX_STAT_VAL && val >= 0) {
+	st->freqs[val]--;
+	assert(st->freqs[val] >= 0);
+    } else if (st->h) {
+	khint_t k = kh_get(m_i2i, st->h, val);
+
+	if (k != kh_end(st->h)) {
+	    if (--kh_val(st->h, k) == 0)
+		kh_del(m_i2i, st->h, k);
+	} else {
+	    fprintf(stderr, "Failed to remove val %d from cram_stats\n", val);
+	    st->nsamp++;
+	}
+    } else {
+	fprintf(stderr, "Failed to remove val %d from cram_stats\n", val);
+	st->nsamp++;
+    }
+}
+
+void cram_stats_dump(cram_stats *st) {
+    int i;
+    fprintf(stderr, "cram_stats:\n");
+    for (i = 0; i < MAX_STAT_VAL; i++) {
+	if (!st->freqs[i])
+	    continue;
+	fprintf(stderr, "\t%d\t%d\n", i, st->freqs[i]);
+    }
+    if (st->h) {
+	khint_t k;
+	for (k = kh_begin(st->h); k != kh_end(st->h); k++) {
+	    if (!kh_exist(st->h, k))
+		continue;
+
+	    fprintf(stderr, "\t%d\t%d\n", kh_key(st->h, k), kh_val(st->h, k));
+	}
+    }
+}
+
+#if 1
+/* Returns the number of bits set in val; it the highest bit used */
+static int nbits(int v) {
+    static const int MultiplyDeBruijnBitPosition[32] = {
+	1, 10, 2, 11, 14, 22, 3, 30, 12, 15, 17, 19, 23, 26, 4, 31,
+	9, 13, 21, 29, 16, 18, 25, 8, 20, 28, 24, 7, 27, 6, 5, 32
+    };
+
+    v |= v >> 1; // first up to set all bits 1 after the first 1 */
+    v |= v >> 2;
+    v |= v >> 4;
+    v |= v >> 8;
+    v |= v >> 16;
+
+    // DeBruijn magic to find top bit
+    return MultiplyDeBruijnBitPosition[(uint32_t)(v * 0x07C4ACDDU) >> 27];
+}
+#endif
+
+/*
+ * Computes entropy from integer frequencies for various encoding methods and
+ * picks the best encoding.
+ *
+ * FIXME: we could reuse some of the code here for the actual encoding
+ * parameters too. Eg the best 'k' for SUBEXP or the code lengths for huffman.
+ *
+ * Returns the best codec to use.
+ */
+enum cram_encoding cram_stats_encoding(cram_fd *fd, cram_stats *st) {
+    enum cram_encoding best_encoding = E_NULL;
+    int best_size = INT_MAX, bits;
+    int nvals, i, ntot = 0, max_val = 0, min_val = INT_MAX, k;
+    int *vals = NULL, *freqs = NULL, vals_alloc = 0, *codes;
+
+    //cram_stats_dump(st);
+
+    /* Count number of unique symbols */
+    for (nvals = i = 0; i < MAX_STAT_VAL; i++) {
+	if (!st->freqs[i])
+	    continue;
+	if (nvals >= vals_alloc) {
+	    vals_alloc = vals_alloc ? vals_alloc*2 : 1024;
+	    vals  = realloc(vals,  vals_alloc * sizeof(int));
+	    freqs = realloc(freqs, vals_alloc * sizeof(int));
+	    if (!vals || !freqs) {
+		if (vals)  free(vals);
+		if (freqs) free(freqs);
+		return E_HUFFMAN; // Cannot do much else atm
+	    }
+	}
+	vals[nvals] = i;
+	freqs[nvals] = st->freqs[i];
+	ntot += freqs[nvals];
+	if (max_val < i) max_val = i;
+	if (min_val > i) min_val = i;
+	nvals++;
+    }
+    if (st->h) {
+	khint_t k;
+	int i;
+
+	for (k = kh_begin(st->h); k != kh_end(st->h); k++) {
+	    if (!kh_exist(st->h, k))
+		continue;
+
+	    if (nvals >= vals_alloc) {
+		vals_alloc = vals_alloc ? vals_alloc*2 : 1024;
+		vals  = realloc(vals,  vals_alloc * sizeof(int));
+		freqs = realloc(freqs, vals_alloc * sizeof(int));
+		if (!vals || !freqs)
+		    return E_HUFFMAN; // Cannot do much else atm
+	    }
+	    i = kh_key(st->h, k);
+	    vals[nvals]=i;
+	    freqs[nvals] = kh_val(st->h, k);
+	    ntot += freqs[nvals];
+	    if (max_val < i) max_val = i;
+	    if (min_val > i) min_val = i;
+	    nvals++;
+	}
+    }
+
+    st->nvals = nvals;
+    assert(ntot == st->nsamp);
+
+    if (nvals <= 1) {
+	free(vals);
+	free(freqs);
+	return E_HUFFMAN;
+    }
+
+    /*
+     * Avoid complex stats for now, just do heuristic of HUFFMAN for small
+     * alphabets and BETA for anything large.
+     */
+    free(vals); free(freqs);
+    return nvals < 200 ? E_HUFFMAN : E_BETA;
+
+    /* We only support huffman now anyway... */
+    //free(vals); free(freqs); return E_HUFFMAN;
+
+    if (fd->verbose > 1)
+	fprintf(stderr, "Range = %d..%d, nvals=%d, ntot=%d\n",
+		min_val, max_val, nvals, ntot);
+
+    /* Theoretical entropy */
+    {
+	double dbits = 0;
+	for (i = 0; i < nvals; i++) {
+	    dbits += freqs[i] * log((double)freqs[i]/ntot);
+	}
+	dbits /= -log(2);
+	if (fd->verbose > 1)
+	    fprintf(stderr, "Entropy = %f\n", dbits);
+    }
+
+    /* Beta */
+    bits = nbits(max_val - min_val) * ntot;
+    if (fd->verbose > 1)
+	fprintf(stderr, "BETA    = %d\n", bits);
+    if (best_size > bits)
+	best_size = bits, best_encoding = E_BETA;
+
+#if 0
+    /* Unary */
+    if (min_val >= 0) {
+	for (bits = i = 0; i < nvals; i++)
+	    bits += freqs[i]*(vals[i]+1);
+	if (fd->verbose > 1)
+	    fprintf(stderr, "UNARY   = %d\n", bits);
+	if (best_size > bits)
+	    best_size = bits, best_encoding = E_NULL; //E_UNARY;
+    }
+
+    /* Gamma */
+    for (bits = i = 0; i < nvals; i++)
+	bits += ((nbits(vals[i]-min_val+1)-1) + nbits(vals[i]-min_val+1)) * freqs[i];
+    if (fd->verbose > 1)
+	fprintf(stderr, "GAMMA   = %d\n", bits);
+    if (best_size > bits)
+	best_size = bits, best_encoding = E_GAMMA;
+
+    /* Subexponential */
+    for (k = 0; k < 10; k++) {
+	for (bits = i = 0; i < nvals; i++) {
+	    if (vals[i]-min_val < (1<<k))
+		bits += (1 + k)*freqs[i];
+	    else
+		bits += (nbits(vals[i]-min_val)*2-k)*freqs[i];
+	}
+
+	if (fd->verbose > 1)
+	    fprintf(stderr, "SUBEXP%d = %d\n", k, bits);
+	if (best_size > bits)
+	    best_size = bits, best_encoding = E_SUBEXP;
+    }
+#endif
+
+    /* byte array len */
+
+    /* byte array stop */
+
+    /* External? Guesswork! */
+
+    /* Huffman */
+//    qsort(freqs, nvals, sizeof(freqs[0]), sort_freqs);
+//    for (i = 0; i < nvals; i++) {
+//	fprintf(stderr, "%d = %d\n", i, freqs[i]);
+//	vals[i] = 0;
+//    }
+
+    /* Grow freqs to 2*freqs, to store sums */
+    /* Vals holds link data */
+    freqs = realloc(freqs, 2*nvals*sizeof(*freqs));
+    codes = calloc(2*nvals, sizeof(*codes));
+    if (!freqs || !codes)
+	return E_HUFFMAN; // Cannot do much else atm
+
+    /* Inefficient, use pointers to form chain so we can insert and maintain
+     * a sorted list? This is currently O(nvals^2) complexity.
+     */
+    for (;;) {
+	int low1 = INT_MAX, low2 = INT_MAX;
+	int ind1 = 0, ind2 = 0;
+	for (i = 0; i < nvals; i++) {
+	    if (freqs[i] < 0)
+		continue;
+	    if (low1 > freqs[i]) 
+		low2 = low1, ind2 = ind1, low1 = freqs[i], ind1 = i;
+	    else if (low2 > freqs[i])
+		low2 = freqs[i], ind2 = i;
+	}
+	if (low2 == INT_MAX)
+	    break;
+
+	//fprintf(stderr, "Merge ind %d (%d), %d (%d) = %d+%d, => %d=%d\n",
+	//	ind1, vals[ind1], ind2, vals[ind2], low1, low2,
+	//	nvals, low1+low2);
+
+	freqs[nvals] = low1 + low2;
+	codes[ind1] = nvals;
+	codes[ind2] = nvals;
+	freqs[ind1] *= -1;
+	freqs[ind2] *= -1;
+	nvals++;
+    }
+    nvals = nvals/2+1;
+
+    for (i = 0; i < nvals; i++) {
+	int code_len = 0;
+	for (k = codes[i]; k; k = codes[k])
+	    code_len++;
+	codes[i] = code_len;
+	freqs[i] *= -1;
+	//fprintf(stderr, "%d / %d => %d\n", vals[i], freqs[i], codes[i]);
+    }
+
+    for (bits = i = 0; i < nvals; i++) {
+	bits += freqs[i] * codes[i];
+    }
+    if (fd->verbose > 1)
+	fprintf(stderr, "HUFFMAN = %d\n", bits);
+    if (best_size >= bits)
+	best_size = bits, best_encoding = E_HUFFMAN;
+    free(codes);
+
+    free(vals);
+    free(freqs);
+
+    return best_encoding;
+}
+
+void cram_stats_free(cram_stats *st) {
+    if (st->h)
+	kh_destroy(m_i2i, st->h);
+    free(st);
+}
diff --git a/htslib/cram/cram_stats.h b/htslib/cram/cram_stats.h
new file mode 100644
index 0000000..b471e68
--- /dev/null
+++ b/htslib/cram/cram_stats.h
@@ -0,0 +1,59 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _CRAM_STATS_H_
+#define _CRAM_STATS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+cram_stats *cram_stats_create(void);
+void cram_stats_add(cram_stats *st, int32_t val);
+void cram_stats_del(cram_stats *st, int32_t val);
+void cram_stats_dump(cram_stats *st);
+void cram_stats_free(cram_stats *st);
+
+/*
+ * Computes entropy from integer frequencies for various encoding methods and
+ * picks the best encoding.
+ *
+ * FIXME: we could reuse some of the code here for the actual encoding
+ * parameters too. Eg the best 'k' for SUBEXP or the code lengths for huffman.
+ *
+ * Returns the best codec to use.
+ */
+enum cram_encoding cram_stats_encoding(cram_fd *fd, cram_stats *st);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/htslib/cram/cram_structs.h b/htslib/cram/cram_structs.h
new file mode 100644
index 0000000..6d3f1a1
--- /dev/null
+++ b/htslib/cram/cram_structs.h
@@ -0,0 +1,752 @@
+/*
+Copyright (c) 2012-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _CRAM_STRUCTS_H_
+#define _CRAM_STRUCTS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Defines in-memory structs for the basic file-format objects in the
+ * CRAM format.
+ *
+ * The basic file format is:
+ *     File-def SAM-hdr Container Container ...
+ *
+ * Container:
+ *     Service-block data-block data-block ...
+ *
+ * Multiple blocks in a container are grouped together as slices,
+ * also sometimes referred to as landmarks in the spec.
+ */
+
+
+#include <stdint.h>
+
+#include "cram/thread_pool.h"
+
+#ifdef SAMTOOLS
+// From within samtools/HTSlib
+#  include "cram/string_alloc.h"
+#  include "htslib/khash.h"
+
+// Generic hash-map integer -> integer
+KHASH_MAP_INIT_INT(m_i2i, int)
+
+// Generic hash-set integer -> (existance)
+KHASH_SET_INIT_INT(s_i2i)
+
+// For brevity
+typedef unsigned char uc;
+
+/*
+ * A union for the preservation map. Required for khash.
+ */
+typedef union {
+    int i;
+    char *p;
+} pmap_t;
+
+// Generates static functions here which isn't ideal, but we have no way
+// currently to declare the kh_map_t structure here without also declaring a
+// duplicate in the .c files due to the nature of the KHASH macros.
+KHASH_MAP_INIT_STR(map, pmap_t)
+
+struct hFILE;
+typedef struct hFILE cram_FILE;
+
+#else
+// From within io_lib
+#  include "cram/bam.h"              // For BAM header parsing
+typedef FILE cram_FILE;
+#endif
+
+#define SEQS_PER_SLICE 10000
+#define SLICE_PER_CNT  1
+
+#define CRAM_SUBST_MATRIX "CGTNAGTNACTNACGNACGT"
+
+#define TN_external
+//#define NS_external
+#define TS_external
+//#define BA_external
+
+#define MAX_STAT_VAL 1024
+//#define MAX_STAT_VAL 16
+typedef struct {
+    int freqs[MAX_STAT_VAL];
+    khash_t(m_i2i) *h;
+    int nsamp; // total number of values added
+    int nvals; // total number of unique values added
+} cram_stats;
+
+/* NB: matches java impl, not the spec */
+enum cram_encoding {
+    E_NULL               = 0,
+    E_EXTERNAL           = 1,
+    E_GOLOMB             = 2,
+    E_HUFFMAN            = 3,
+    E_BYTE_ARRAY_LEN     = 4,
+    E_BYTE_ARRAY_STOP    = 5,
+    E_BETA               = 6,
+    E_SUBEXP             = 7,
+    E_GOLOMB_RICE        = 8,
+    E_GAMMA              = 9
+};
+
+enum cram_external_type {
+    E_INT                = 1,
+    E_LONG               = 2,
+    E_BYTE               = 3,
+    E_BYTE_ARRAY         = 4,
+    E_BYTE_ARRAY_BLOCK   = 5,
+};
+
+/* "File Definition Structure" */
+typedef struct {
+    char    magic[4];
+    uint8_t major_version;
+    uint8_t minor_version;
+    char    file_id[20];      // Filename or SHA1 checksum
+} cram_file_def;
+
+#define CRAM_1_VERS 100 // 1.0
+#define CRAM_2_VERS 200 // 1.1, or 2.0?
+
+struct cram_slice;
+
+enum cram_block_method {
+    BM_ERROR = -1,
+    RAW   = 0,
+    GZIP  = 1,
+    BZIP2 = 2,
+};
+
+enum cram_content_type {
+    CT_ERROR           = -1,
+    FILE_HEADER        = 0,
+    COMPRESSION_HEADER = 1,
+    MAPPED_SLICE       = 2,
+    UNMAPPED_SLICE     = 3, // CRAM_1_VERS only
+    EXTERNAL           = 4,
+    CORE               = 5,
+};
+
+/* Compression metrics */
+typedef struct {
+    int m1;
+    int m2;
+    int trial;
+    int next_trial;
+} cram_metrics;
+
+/* Block */
+typedef struct {
+    enum cram_block_method  method, orig_method;
+    enum cram_content_type  content_type;
+    int32_t  content_id;
+    int32_t  comp_size;
+    int32_t  uncomp_size;
+    int32_t  idx; /* offset into data */
+    unsigned char    *data;
+
+    // For bit I/O
+    size_t alloc;
+    size_t byte;
+    int bit;
+} cram_block;
+
+struct cram_codec; /* defined in cram_codecs.h */
+struct cram_map;
+
+#define CRAM_MAP_HASH 32
+#define CRAM_MAP(a,b) (((a)*3+(b))&(CRAM_MAP_HASH-1))
+
+/* Compression header block */
+typedef struct {
+    int32_t ref_seq_id;
+    int32_t ref_seq_start;
+    int32_t ref_seq_span;
+    int32_t num_records;
+    int32_t num_landmarks;
+    int32_t *landmark;
+
+    /* Flags from preservation map */
+    int mapped_qs_included;
+    int unmapped_qs_included;
+    int unmapped_placed;
+    int qs_included;
+    int read_names_included;
+    int AP_delta;
+    // indexed by ref-base and subst. code
+    char substitution_matrix[5][4];
+
+    // TD Dictionary as a concatenated block
+    cram_block *TD_blk;          // Tag Dictionary
+    int nTL;		         // number of TL entries in TD
+    unsigned char **TL;          // array of size nTL, pointer into TD_blk.
+    khash_t(m_s2i) *TD_hash;     // Keyed on TD strings, map to TL[] indices
+    string_alloc_t *TD_keys;     // Pooled keys for TD hash.
+    
+    khash_t(map) *preservation_map;
+    struct cram_map *rec_encoding_map[CRAM_MAP_HASH];
+    struct cram_map *tag_encoding_map[CRAM_MAP_HASH];
+
+    struct cram_codec *BF_codec; // bam bit flags
+    struct cram_codec *CF_codec; // compression flags
+    struct cram_codec *RL_codec; // read length
+    struct cram_codec *AP_codec; // alignment pos
+    struct cram_codec *RG_codec; // read group
+    struct cram_codec *MF_codec; // mate flags
+    struct cram_codec *NS_codec; // next frag ref ID
+    struct cram_codec *NP_codec; // next frag pos
+    struct cram_codec *TS_codec; // template size
+    struct cram_codec *NF_codec; // next frag distance
+    struct cram_codec *TC_codec; // tag count      CRAM_1_VERS
+    struct cram_codec *TN_codec; // tag name/type  CRAM_1_VERS
+    struct cram_codec *TL_codec; // tag line       CRAM_2_VERS
+    struct cram_codec *FN_codec; // no. features
+    struct cram_codec *FC_codec; // feature code
+    struct cram_codec *FP_codec; // feature pos
+    struct cram_codec *BS_codec; // base subst feature
+    struct cram_codec *IN_codec; // insertion feature
+    struct cram_codec *SC_codec; // soft-clip feature
+    struct cram_codec *DL_codec; // deletion len feature
+    struct cram_codec *BA_codec; // base feature
+    struct cram_codec *RS_codec; // ref skip length feature
+    struct cram_codec *PD_codec; // padding length feature
+    struct cram_codec *HC_codec; // hard clip length feature
+    struct cram_codec *MQ_codec; // mapping quality
+    struct cram_codec *RN_codec; // read names
+    struct cram_codec *QS_codec; // quality value (single)
+    struct cram_codec *Qs_codec; // quality values (string)
+    struct cram_codec *RI_codec; // ref ID
+    struct cram_codec *TM_codec; // ?
+    struct cram_codec *TV_codec; // ?
+
+    char *uncomp; // A single block of uncompressed data
+    size_t uncomp_size, uncomp_alloc;
+} cram_block_compression_hdr;
+
+typedef struct cram_map {
+    int key;    /* 0xe0 + 3 bytes */
+    enum cram_encoding encoding;
+    int offset; /* Offset into a single block of memory */
+    int size;   /* Size */
+    struct cram_codec *codec;
+    struct cram_map *next; // for noddy internal hash
+} cram_map;
+
+/* Mapped or unmapped slice header block */
+typedef struct {
+    enum cram_content_type content_type;
+    int32_t ref_seq_id;     /* if content_type == MAPPED_SLICE */
+    int32_t ref_seq_start;  /* if content_type == MAPPED_SLICE */
+    int32_t ref_seq_span;   /* if content_type == MAPPED_SLICE */
+    int32_t num_records;
+    int32_t record_counter;
+    int32_t num_blocks;
+    int32_t num_content_ids;
+    int32_t *block_content_ids;
+    int32_t ref_base_id;    /* if content_type == MAPPED_SLICE */
+    unsigned char md5[16];
+} cram_block_slice_hdr;
+
+struct ref_entry;
+
+/*
+ * Container.
+ *
+ * Conceptually a container is split into slices, and slices into blocks.
+ * However on disk it's just a list of blocks and we need to query the
+ * block types to identify the start/end points of the slices.
+ *
+ * OR... are landmarks the start/end points of slices?
+ */
+typedef struct {
+    int32_t  length;
+    int32_t  ref_seq_id;
+    int32_t  ref_seq_start;
+    int32_t  ref_seq_span;
+    int32_t  record_counter;
+    int64_t  num_bases;
+    int32_t  num_records;
+    int32_t  num_blocks;
+    int32_t  num_landmarks;
+    int32_t *landmark;
+
+    /* Size of container header above */
+    size_t   offset;
+    
+    /* Compression header is always the first block? */
+    cram_block_compression_hdr *comp_hdr;
+    cram_block *comp_hdr_block;
+
+    /* For construction purposes */
+    int max_slice, curr_slice;   // maximum number of slices
+    int max_rec, curr_rec;       // current and max recs per slice
+    int max_c_rec, curr_c_rec;   // current and max recs per container
+    int slice_rec;               // rec no. for start of this slice
+    int curr_ref;                // current ref ID. -2 for no previous
+    int last_pos;                // last record position
+    struct cram_slice **slices, *slice;
+    int pos_sorted;              // boolean, 1=>position sorted data
+    int max_apos;                // maximum position, used if pos_sorted==0
+    int last_slice;              // number of reads in last slice (0 for 1st)
+    int multi_seq;               // true if packing multi seqs per cont/slice
+    int unsorted;		 // true is AP_delta is 0.
+
+    /* Copied from fd before encoding, to allow multi-threading */
+    int ref_start, first_base, last_base, ref_id, ref_end;
+    char *ref;
+    //struct ref_entry *ref;
+
+    /* For multi-threading */
+    bam_seq_t **bams;
+
+    /* Statistics for encoding */
+    cram_stats *TS_stats;
+    cram_stats *RG_stats;
+    cram_stats *FP_stats;
+    cram_stats *NS_stats;
+    cram_stats *RN_stats;
+    cram_stats *CF_stats;
+    cram_stats *TN_stats;
+    cram_stats *BA_stats;
+    cram_stats *TV_stats;
+    cram_stats *BS_stats;
+    cram_stats *FC_stats;
+    cram_stats *BF_stats;
+    cram_stats *AP_stats;
+    cram_stats *NF_stats;
+    cram_stats *MF_stats;
+    cram_stats *FN_stats;
+    cram_stats *RL_stats;
+    cram_stats *DL_stats;
+    cram_stats *TC_stats;
+    cram_stats *TL_stats;
+    cram_stats *MQ_stats;
+    cram_stats *TM_stats;
+    cram_stats *QS_stats;
+    cram_stats *NP_stats;
+    cram_stats *RI_stats;
+    cram_stats *RS_stats;
+    cram_stats *PD_stats;
+    cram_stats *HC_stats;
+
+    khash_t(s_i2i) *tags_used; // set of tag types in use, for tag encoding map
+    int *refs_used;       // array of frequency of ref seq IDs
+} cram_container;
+
+/*
+ * A single cram record
+ */
+typedef struct {
+    struct cram_slice *s; // Filled out by cram_decode only
+
+    int32_t ref_id;       // fixed for all recs in slice?
+    int32_t flags;        // BF
+    int32_t cram_flags;   // CF
+    int32_t len;          // RL
+    int32_t apos;         // AP
+    int32_t rg;           // RG
+    int32_t name;         // RN; idx to s->names_blk
+    int32_t name_len;
+    int32_t mate_line;    // index to another cram_record
+    int32_t mate_ref_id;
+    int32_t mate_pos;     // NP
+    int32_t tlen;         // TS
+
+    // Auxiliary data
+    int32_t ntags;        // TC
+    int32_t aux;          // idx to s->aux_blk
+    int32_t aux_size;     // total size of packed ntags in aux_blk
+#ifndef TN_external
+    int32_t TN_idx;       // TN; idx to s->TN;
+#else
+    int32_t tn;           // idx to s->tn_blk
+#endif
+    int     TL;
+
+    int32_t seq;          // idx to s->seqs_blk
+    int32_t qual;         // idx to s->qual_blk
+    int32_t cigar;        // idx to s->cigar
+    int32_t ncigar;
+    int32_t aend;         // alignment end
+    int32_t mqual;        // MQ
+
+    int32_t feature;      // idx to s->feature
+    int32_t nfeature;     // number of features
+    int32_t mate_flags;   // MF
+} cram_record;
+
+// Accessor macros as an analogue of the bam ones
+#define cram_qname(c)    (&(c)->s->name_blk->data[(c)->name])
+#define cram_seq(c)      (&(c)->s->seqs_blk->data[(c)->seq])
+#define cram_qual(c)     (&(c)->s->qual_blk->data[(c)->qual])
+#define cram_aux(c)      (&(c)->s->aux_blk->data[(c)->aux])
+#define cram_seqi(c,i)   (cram_seq((c))[(i)])
+#define cram_name_len(c) ((c)->name_len)
+#define cram_strand(c)   (((c)->flags & BAM_FREVERSE) != 0)
+#define cram_mstrand(c)  (((c)->flags & BAM_FMREVERSE) != 0)
+#define cram_cigar(c)    (&((cr)->s->cigar)[(c)->cigar])
+
+/*
+ * A feature is a base difference, used for the sequence reference encoding.
+ * (We generate these internally when writing CRAM.)
+ */
+typedef struct {
+    union {
+	struct {
+	    int pos;
+	    int code;
+	    int base;    // substitution code
+	} X;
+	struct {
+	    int pos;
+	    int code;
+	    int base;    // actual base & qual
+	    int qual;
+	} B;
+	struct {
+	    int pos;
+	    int code;
+	    int qual;
+	} Q;
+	struct {
+	    int pos;
+	    int code;
+	    int len;
+	    int seq_idx; // soft-clip multiple bases
+	} S;
+	struct {
+	    int pos;
+	    int code;
+	    int len;
+	    int seq_idx; // insertion multiple bases
+	} I;
+	struct {
+	    int pos;
+	    int code;
+	    int base; // insertion single base
+	} i;
+	struct {
+	    int pos;
+	    int code;
+	    int len;
+	} D;
+	struct {
+	    int pos;
+	    int code;
+	    int len;
+	} N;
+	struct {
+	    int pos;
+	    int code;
+	    int len;
+	} P;
+	struct {
+	    int pos;
+	    int code;
+	    int len;
+	} H;
+    };
+} cram_feature;
+
+/*
+ * A slice is really just a set of blocks, but it
+ * is the logical unit for decoding a number of
+ * sequences.
+ */
+typedef struct cram_slice {
+    cram_block_slice_hdr *hdr;
+    cram_block *hdr_block;
+    cram_block **block;
+    cram_block **block_by_id;
+
+    /* State used during encoding/decoding */
+    int last_apos, max_apos;
+
+    /* Identifier used for auto-assigning read names */
+    uint64_t id;
+
+    /* Array of decoded cram records */
+    cram_record *crecs;
+
+    /* An dynamically growing buffers for data pointed
+     * to by crecs[] array.
+     */
+    uint32_t  *cigar;
+    uint32_t   cigar_alloc;
+    uint32_t   ncigar;
+    cram_block *name_blk;
+    cram_block *seqs_blk;
+    cram_block *qual_blk;
+    cram_block *aux_blk;
+    cram_block *base_blk; // substitutions (soft-clips for 1.0)
+    cram_block *soft_blk; // soft-clips
+
+    cram_feature *features;
+    int           nfeatures;
+    int           afeatures; // allocated size of features
+
+#ifndef TN_external
+    // TN field (Tag Name)
+    uint32_t      *TN;
+    int           nTN, aTN;  // used and allocated size for TN[]
+#else
+    cram_block *tn_blk;
+    int tn_id;
+#endif
+
+    string_alloc_t *pair_keys; // Pooled keys for pair hash.
+    khash_t(m_s2i) *pair;      // for identifying read-pairs in this slice.
+
+    char *ref;               // slice of current reference
+    int ref_start;           // start position of current reference;
+    int ref_end;             // end position of current reference;
+
+#ifdef BA_external
+    int BA_len;
+    int ba_id;
+#endif
+    int ref_id;
+} cram_slice;
+
+/*-----------------------------------------------------------------------------
+ * Consider moving reference handling to cram_refs.[ch]
+ */
+// from fa.fai / samtools faidx files
+typedef struct ref_entry {
+    char *name;
+    char *fn;
+    int64_t length;
+    int64_t offset;
+    int bases_per_line;
+    int line_length;
+    int64_t count;	   // for shared references so we know to dealloc seq
+    char *seq;
+} ref_entry;
+
+KHASH_MAP_INIT_STR(refs, ref_entry*)
+
+// References structure.
+typedef struct {
+    string_alloc_t *pool;  // String pool for holding filenames and SN vals
+
+    khash_t(refs) *h_meta; // ref_entry*, index by name
+    ref_entry **ref_id;    // ref_entry*, index by ID
+    int nref;              // number of ref_entry
+
+    char *fn;              // current file opened
+    FILE *fp;              // and the FILE* to go with it.
+
+    int count;             // how many cram_fd sharing this refs struct
+
+    pthread_mutex_t lock;  // Mutex for multi-threaded updating
+    ref_entry *last;       // Last queried sequence
+    int last_id;           // Used in cram_ref_decr_locked to delay free
+} refs_t;
+
+/*-----------------------------------------------------------------------------
+ * CRAM index
+ *
+ * Detect format by number of entries per line.
+ * 5 => 1.0 (refid, start, nseq, C offset, slice)
+ * 6 => 1.1 (refid, start, span, C offset, S offset, S size)
+ *
+ * Indices are stored in a nested containment list, which is trivial to set
+ * up as the indices are on sorted data so we're appending to the nclist
+ * in sorted order. Basically if a slice entirely fits within a previous
+ * slice then we append to that slices list. This is done recursively.
+ *
+ * Lists are sorted on two dimensions: ref id + slice coords.
+ */
+typedef struct cram_index {
+    int nslice, nalloc;   // total number of slices
+    struct cram_index *e; // array of size nslice
+
+    int     refid;  // 1.0                 1.1
+    int     start;  // 1.0                 1.1
+    int     end;    //                     1.1
+    int     nseq;   // 1.0 - undocumented
+    int     slice;  // 1.0 landmark index, 1.1 landmark value
+    int     len;    //                     1.1 - size of slice in bytes
+    int64_t offset; // 1.0                 1.1
+} cram_index;
+
+typedef struct {
+    int refid;
+    int start;
+    int end;
+} cram_range;
+
+/*-----------------------------------------------------------------------------
+ */
+/* CRAM File handle */
+
+typedef struct spare_bams {
+    bam_seq_t **bams;
+    struct spare_bams *next;
+} spare_bams;
+
+typedef struct cram_fd {
+    cram_FILE     *fp;
+    int            mode;     // 'r' or 'w'
+    int            version;
+    cram_file_def *file_def;
+    SAM_hdr       *header;
+
+    char          *prefix;
+    int            record_counter;
+    int            slice_num;
+    int            err;
+
+    // Most recent compression header decoded
+    //cram_block_compression_hdr *comp_hdr;
+    //cram_block_slice_hdr       *slice_hdr;
+
+    // Current container being processed.
+    cram_container *ctr;
+
+    // positions for encoding or decoding
+    int first_base, last_base;
+
+    // cached reference portion
+    refs_t *refs;              // ref meta-data structure
+    char *ref, *ref_free;      // current portion held in memory
+    int   ref_id;
+    int   ref_start;
+    int   ref_end;
+    char *ref_fn;   // reference fasta filename
+
+    // compression level and metrics
+    int level;
+    cram_metrics *m[7];
+
+    // options
+    int decode_md; // Whether to export MD and NM tags
+    int verbose;
+    int seqs_per_slice;
+    int slices_per_container;
+    int embed_ref;
+    int no_ref;
+    int ignore_md5;
+    int use_bz2;
+    int shared_ref;
+    cram_range range;
+
+    // lookup tables, stored here so we can be trivially multi-threaded
+    unsigned int bam_flag_swap[0x1000]; // cram -> bam flags
+    unsigned int cram_flag_swap[0x1000];// bam -> cram flags
+    unsigned char L1[256];              // ACGT{*} ->0123{4}
+    unsigned char L2[256];              // ACGTN{*}->01234{5}
+    char cram_sub_matrix[32][32];	// base substituion codes
+
+    int         index_sz;
+    cram_index *index;                  // array, sizeof index_sz
+    off_t first_container;
+    int eof;
+    int last_slice;                     // number of recs encoded in last slice
+    int multi_seq;
+    int unsorted;
+    int empty_container; 		// Marker for EOF block
+    
+    // thread pool
+    int own_pool;
+    t_pool *pool;
+    t_results_queue *rqueue;
+    pthread_mutex_t metrics_lock;
+    pthread_mutex_t ref_lock;
+    spare_bams *bl;
+    pthread_mutex_t bam_list_lock;
+    void *job_pending;
+    int ooc;                            // out of containers.
+} cram_fd;
+
+enum cram_option {
+    CRAM_OPT_DECODE_MD,
+    CRAM_OPT_PREFIX,
+    CRAM_OPT_VERBOSITY,
+    CRAM_OPT_SEQS_PER_SLICE,
+    CRAM_OPT_SLICES_PER_CONTAINER,
+    CRAM_OPT_RANGE,
+    CRAM_OPT_VERSION,
+    CRAM_OPT_EMBED_REF,
+    CRAM_OPT_IGNORE_MD5,
+    CRAM_OPT_REFERENCE,
+    CRAM_OPT_MULTI_SEQ_PER_SLICE,
+    CRAM_OPT_NO_REF,
+    CRAM_OPT_USE_BZIP2,
+    CRAM_OPT_SHARED_REF,
+    CRAM_OPT_NTHREADS,
+    CRAM_OPT_THREAD_POOL,
+};
+
+/* BF bitfields */
+/* Corrected in 1.1. Use bam_flag_swap[bf] and BAM_* macros for 1.0 & 1.1 */
+#define CRAM_FPAIRED      256
+#define CRAM_FPROPER_PAIR 128
+#define CRAM_FUNMAP        64
+#define CRAM_FREVERSE      32
+#define CRAM_FREAD1        16
+#define CRAM_FREAD2         8
+#define CRAM_FSECONDARY     4
+#define CRAM_FQCFAIL        2
+#define CRAM_FDUP           1
+
+#define CRAM_M_REVERSE  1
+#define CRAM_M_UNMAP    2
+
+
+/* CF bitfields */
+#define CRAM_FLAG_PRESERVE_QUAL_SCORES (1<<0)
+#define CRAM_FLAG_DETACHED             (1<<1)
+#define CRAM_FLAG_MATE_DOWNSTREAM      (1<<2)
+
+/* External IDs used by this implementation (only assumed during writing) */
+#define CRAM_EXT_IN	0
+#define CRAM_EXT_QUAL	1
+#define CRAM_EXT_NAME	2
+#define CRAM_EXT_TS_NP	3
+#define CRAM_EXT_TAG	4
+#define CRAM_EXT_TAG_S	"\004"
+#define CRAM_EXT_BA	5
+#define CRAM_EXT_TN	6
+#define CRAM_EXT_SC	7
+#define CRAM_EXT_REF    8
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CRAM_STRUCTS_H_ */
diff --git a/htslib/cram/files.c b/htslib/cram/files.c
new file mode 100644
index 0000000..48f5c32
--- /dev/null
+++ b/htslib/cram/files.c
@@ -0,0 +1,76 @@
+/*
+Copyright (c) 1994, 1996-1997, 2000, 2003 MEDICAL RESEARCH COUNCIL
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1 Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2 Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3 Neither the name of the MEDICAL RESEARCH COUNCIL, THE LABORATORY OF 
+MOLECULAR BIOLOGY nor the names of its contributors may be used to endorse or 
+promote products derived from this software without specific prior written 
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include "cram/misc.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Alliant's Concentrix <sys/stat.h> is hugely deficient */
+/* Define things we require in this program              */
+/* Methinks S_IFMT and S_IFDIR aren't defined in POSIX   */
+#ifndef S_ISDIR
+#define S_ISDIR(m)      (((m)&S_IFMT) == S_IFDIR)
+#endif /*!S_ISDIR*/
+#ifndef S_ISREG
+#define S_ISREG(m)      (((m)&S_IFMT) == S_IFREG)
+#endif /*!S_ISREG*/
+
+int is_directory(char * fn)
+{
+    struct stat buf;
+    if ( stat(fn,&buf) ) return 0;
+    return S_ISDIR(buf.st_mode);
+}
+
+int is_file(char * fn)
+{
+    struct stat buf;
+    if ( stat(fn,&buf) ) return 0;
+    return S_ISREG(buf.st_mode);
+}
+
+int file_exists(char * fn)
+{
+    struct stat buf;
+    return ( stat(fn,&buf) == 0);
+}
+
+int file_size(char * fn)
+{
+    struct stat buf;
+    if ( stat(fn,&buf) != 0) return 0;
+    return buf.st_size;
+}
+
diff --git a/htslib/cram/mFILE.c b/htslib/cram/mFILE.c
new file mode 100644
index 0000000..6407b76
--- /dev/null
+++ b/htslib/cram/mFILE.c
@@ -0,0 +1,634 @@
+/*
+Copyright (c) 2005-2006, 2008-2009, 2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdarg.h>
+
+#include "cram/os.h"
+#include "cram/mFILE.h"
+#include "cram/vlen.h"
+
+/*
+ * This file contains memory-based versions of the most commonly used
+ * (by io_lib) stdio functions.
+ *
+ * Actual file IO takes place either on opening or closing an mFILE.
+ *
+ * Coupled to this are a bunch of rather scary macros which can be obtained
+ * by including stdio_hack.h. It is recommended though that you use mFILE.h
+ * instead and replace fopen with mfopen (etc). This is more or less
+ * mandatory if you wish to use both FILE and mFILE structs in a single file.
+ */
+
+static mFILE *m_channel[3];  /* stdin, stdout and stderr fakes */
+
+/*
+ * Reads the entirety of fp into memory. If 'fn' exists it is the filename
+ * associated with fp. This will be used for more optimal reading (via a
+ * stat to identify the size and a single read). Otherwise we use successive
+ * reads until EOF.
+ *
+ * Returns a malloced buffer on success of length *size
+ *         NULL on failure
+ */
+static char *mfload(FILE *fp, const char *fn, size_t *size, int binary) {
+    struct stat sb;
+    char *data = NULL;
+    size_t allocated = 0, used = 0;
+    int bufsize = 8192;
+
+#ifdef _WIN32
+    if (binary)
+	_setmode(_fileno(fp), _O_BINARY);
+    else 
+	_setmode(_fileno(fp), _O_TEXT);
+#endif
+
+    if (fn && -1 != stat(fn, &sb)) {
+	data = malloc(allocated = sb.st_size);
+	bufsize = sb.st_size;
+    } else {
+	fn = NULL;
+    }
+
+    do {
+	size_t len;
+	if (used + bufsize > allocated) {
+	    allocated += bufsize;
+	    data = realloc(data, allocated);
+	}
+	len = fread(data + used, 1, allocated - used, fp);
+	if (len > 0)
+	    used += len;
+    } while (!feof(fp) && (fn == NULL || used < sb.st_size));
+
+    *size = used;
+
+    return data;
+}
+
+/*
+ * Creates and returns m_channel[0].
+ * We initialise this on the first attempted read, which then slurps in
+ * all of stdin until EOF is met.
+ */
+mFILE *mstdin(void) {
+    if (m_channel[0])
+	return m_channel[0];
+
+    m_channel[0] = mfcreate(NULL, 0);
+    if (NULL == m_channel[0]) return NULL;
+    m_channel[0]->fp = stdin;
+    return m_channel[0];
+}
+
+static void init_mstdin(void) {
+    static int done_stdin = 0;
+    if (done_stdin)
+	return;
+
+    m_channel[0]->data = mfload(stdin, NULL, &m_channel[0]->size, 1);
+    m_channel[0]->mode = MF_READ;
+    done_stdin = 1;
+}
+
+/*
+ * Creates and returns m_channel[1]. This is the fake for stdout. It starts as
+ * an empty buffer which is physically written out only when mfflush or
+ * mfclose are called.
+ */
+mFILE *mstdout(void) {
+    if (m_channel[1])
+	return m_channel[1];
+
+    m_channel[1] = mfcreate(NULL, 0);
+    if (NULL == m_channel[1]) return NULL;
+    m_channel[1]->fp = stdout;
+    m_channel[1]->mode = MF_WRITE;
+    return m_channel[1];
+}
+
+/*
+ * Stderr as an mFILE.
+ * The code handles stderr by returning m_channel[2], but also checking
+ * for stderr in fprintf (the common usage of it) to auto-flush.
+ */
+mFILE *mstderr(void) {
+    if (m_channel[2])
+	return m_channel[2];
+
+    m_channel[2] = mfcreate(NULL, 0);
+    if (NULL == m_channel[2]) return NULL;
+    m_channel[2]->fp = stderr;
+    m_channel[2]->mode = MF_WRITE;
+    return m_channel[2];
+}
+
+
+/*
+ * For creating existing mFILE pointers directly from memory buffers.
+ */
+mFILE *mfcreate(char *data, int size) {
+    mFILE *mf = (mFILE *)malloc(sizeof(*mf));
+    if (NULL == mf) return NULL;
+    mf->fp = NULL;
+    mf->data = data;
+    mf->alloced = size;
+    mf->size = size;
+    mf->eof = 0;
+    mf->offset = 0;
+    mf->flush_pos = 0;
+    mf->mode = MF_READ | MF_WRITE;
+    return mf;
+}
+
+/*
+ * Recreate an existing mFILE to house new data/size.
+ * It also rewinds the file.
+ */
+void mfrecreate(mFILE *mf, char *data, int size) {
+    if (mf->data)
+	free(mf->data);
+    mf->data = data;
+    mf->size = size;
+    mf->alloced = size;
+    mf->eof = 0;
+    mf->offset = 0;
+    mf->flush_pos = 0;
+}
+
+
+/*
+ * Creates a new mFILE to contain the contents of the FILE pointer.
+ * This mFILE is purely for in-memory operations and has no links to the
+ * original FILE* it came from. It also doesn't close the FILE pointer.
+ * Consider using mfreopen() is you need different behaviour.
+ *
+ * Returns mFILE * on success
+ *         NULL on failure.
+ */ 
+mFILE *mfcreate_from(const char *path, const char *mode_str, FILE *fp) {
+   mFILE *mf; 
+
+    /* Open using mfreopen() */
+    if (NULL == (mf = mfreopen(path, mode_str, fp)))
+	return NULL;
+    
+    /* Disassociate from the input stream */
+    mf->fp = NULL;
+
+    return mf;
+}
+
+/*
+ * Converts a FILE * to an mFILE *.
+ * Use this for wrapper functions to turn external prototypes requring
+ * FILE * as an argument into internal code using mFILE *.
+ */
+mFILE *mfreopen(const char *path, const char *mode_str, FILE *fp) {
+    mFILE *mf;
+    int r = 0, w = 0, a = 0, b = 0, x = 0, mode = 0;
+
+    /* Parse mode:
+     * r = read file contents (if truncated => don't read)
+     * w = write on close
+     * a = position at end of buffer
+     * x = position at same location as the original fp, don't seek on flush
+     */
+    if (strchr(mode_str, 'r'))
+	r = 1, mode |= MF_READ;
+    if (strchr(mode_str, 'w'))
+	w = 1, mode |= MF_WRITE | MF_TRUNC;
+    if (strchr(mode_str, 'a'))
+	w = a = 1, mode |= MF_WRITE | MF_APPEND;
+    if (strchr(mode_str, 'b'))
+	b = 1, mode |= MF_BINARY;
+    if (strchr(mode_str, 'x'))
+	x = 1;
+    if (strchr(mode_str, '+')) {
+        w = 1, mode |= MF_READ | MF_WRITE;
+	if (a)
+	    r = 1;
+    }
+
+    if (r) {
+	mf = mfcreate(NULL, 0);
+	if (NULL == mf) return NULL;
+	if (!(mode & MF_TRUNC)) {
+	    mf->data = mfload(fp, path, &mf->size, b);
+	    mf->alloced = mf->size;
+	    if (!a)
+		fseek(fp, 0, SEEK_SET);
+	}
+    } else if (w) {
+	/* Write - initialise the data structures */
+	mf = mfcreate(NULL, 0);
+	if (NULL == mf) return NULL;
+    } else {
+        fprintf(stderr, "Must specify either r, w or a for mode\n");
+        return NULL;
+    }
+    mf->fp = fp;
+    mf->mode = mode;
+
+    if (x) {
+	mf->mode |= MF_MODEX;
+    }
+    
+    if (a) {
+	mf->flush_pos = mf->size;
+	fseek(fp, 0, SEEK_END);
+    }
+
+    return mf;
+}
+
+/*
+ * Opens a file. If we have read access (r or a+) then it loads the entire
+ * file into memory. If We have write access then the pathname is stored.
+ * We do not actually write until an mfclose, which then checks this pathname.
+ */
+mFILE *mfopen(const char *path, const char *mode) {
+    FILE *fp;
+
+    if (NULL == (fp = fopen(path, mode)))
+	return NULL;
+    return mfreopen(path, mode, fp);
+}
+
+/*
+ * Closes an mFILE. If the filename is known (implying write access) then this
+ * also writes the data to disk.
+ *
+ * Stdout is handled by calling mfflush which writes to stdout if appropriate.
+ */
+int mfclose(mFILE *mf) {
+    if (!mf)
+	return -1;
+
+    mfflush(mf);
+
+    if (mf->fp)
+	fclose(mf->fp);
+
+    mfdestroy(mf);
+
+    return 0;
+}
+
+/*
+ * Closes the file pointer contained within the mFILE without destroying
+ * the in-memory data.
+ */
+int mfdetach(mFILE *mf) {
+    if (!mf)
+	return -1;
+
+    mfflush(mf);
+
+    if (mf->fp) {
+	fclose(mf->fp);
+	mf->fp = NULL;
+    }
+
+    return 0;
+}
+
+/*
+ * Destroys an mFILE structure but does not flush or close it
+ */
+int mfdestroy(mFILE *mf) {
+    if (!mf)
+	return -1;
+
+    if (mf->data)
+	free(mf->data);
+    free(mf);
+
+    return 0;
+}
+
+/*
+ * Steals that data out of an mFILE.  The mFILE itself will be closed.
+ * It is up to the caller to free the stolen buffer.  If size_out is
+ * not NULL, mf->size will be stored in it.
+ * This is more-or-less the opposite of mfcreate().
+ */
+
+void *mfsteal(mFILE *mf, size_t *size_out) {
+    void *data;
+
+    if (!mf) return NULL;
+
+    data = mf->data;
+    
+    if (NULL != size_out) *size_out = mf->size;
+
+    mfdetach(mf);
+    mf->data = NULL;
+    mfdestroy(mf);
+
+    return data;
+}
+
+/*
+ * Seek/tell functions. Nothing more than updating and reporting an
+ * in-memory index. NB we can seek on stdin or stdout even provided we
+ * haven't been flushing.
+ */
+int mfseek(mFILE *mf, long offset, int whence) {
+    switch (whence) {
+    case SEEK_SET:
+	mf->offset = offset;
+	break;
+    case SEEK_CUR:
+	mf->offset += offset;
+	break;
+    case SEEK_END:
+	mf->offset = mf->size + offset;
+	break;
+    default:
+	errno = EINVAL;
+	return -1;
+    }
+
+    mf->eof = 0;
+    return 0;
+}
+
+long mftell(mFILE *mf) {
+    return mf->offset;
+}
+
+void mrewind(mFILE *mf) {
+    mf->offset = 0;
+    mf->eof = 0;
+}
+
+/*
+ * mftruncate is not directly a translation of ftruncate as the latter
+ * takes a file descriptor instead of a FILE *. It performs the analogous
+ * role though.
+ *
+ * If offset is -1 then the file is truncated to be the current file
+ * offset.
+ */
+void mftruncate(mFILE *mf, long offset) {
+    mf->size = offset != -1 ? offset : mf->offset;
+    if (mf->offset > mf->size)
+	mf->offset = mf->size;
+}
+
+int mfeof(mFILE *mf) {
+    return mf->eof;
+}
+
+/*
+ * mFILE read/write functions. Basically these turn fread/fwrite syntax
+ * into memcpy statements, with appropriate memory handling for writing.
+ */
+size_t mfread(void *ptr, size_t size, size_t nmemb, mFILE *mf) {
+    size_t len;
+    char *cptr = (char *)ptr;
+    
+    if (mf == m_channel[0]) init_mstdin();
+
+    if (mf->size <= mf->offset)
+	return 0;
+
+    len = size * nmemb <= mf->size - mf->offset
+	? size * nmemb
+	: mf->size - mf->offset;
+    if (!size)
+	return 0;
+
+    memcpy(cptr, &mf->data[mf->offset], len);
+    mf->offset += len;
+    
+    if (len != size * nmemb) {
+	mf->eof = 1;
+    }
+
+    return len / size;
+}
+
+size_t mfwrite(void *ptr, size_t size, size_t nmemb, mFILE *mf) {
+    if (!(mf->mode & MF_WRITE))
+	return 0;
+
+    /* Append mode => forced all writes to end of file */
+    if (mf->mode & MF_APPEND)
+	mf->offset = mf->size;
+
+    /* Make sure we have enough room */
+    while (size * nmemb + mf->offset > mf->alloced) {
+	size_t new_alloced = mf->alloced ? mf->alloced * 2 : 1024;
+	void * new_data = realloc(mf->data, new_alloced);
+	if (NULL == new_data) return 0;
+	mf->alloced = new_alloced;
+	mf->data    = new_data;
+    }
+
+    /* Record where we need to reflush from */
+    if (mf->offset < mf->flush_pos)
+	mf->flush_pos = mf->offset;
+
+    /* Copy the data over */
+    memcpy(&mf->data[mf->offset], ptr, size * nmemb);
+    mf->offset += size * nmemb;
+    if (mf->size < mf->offset)
+	mf->size = mf->offset;
+
+    return nmemb;
+}
+
+int mfgetc(mFILE *mf) {
+    if (mf == m_channel[0]) init_mstdin();
+    if (mf->offset < mf->size) {
+	return (unsigned char)mf->data[mf->offset++];
+    }
+
+    mf->eof = 1;
+    return -1;
+}
+
+int mungetc(int c, mFILE *mf) {
+    if (mf->offset > 0) {
+	mf->data[--mf->offset] = c;
+	return c;
+    }
+    
+    mf->eof = 1;
+    return -1;
+}
+
+char *mfgets(char *s, int size, mFILE *mf) {
+    int i;
+
+    if (mf == m_channel[0]) init_mstdin();
+    *s = 0;
+    for (i = 0; i < size-1;) {
+	if (mf->offset < mf->size) {
+	    s[i] = mf->data[mf->offset++];
+	    if (s[i++] == '\n')
+		break;
+	} else {
+	    mf->eof = 1;
+	    break;
+	}
+    }
+
+    s[i] = 0;
+    return i ? s : NULL;
+}
+
+/*
+ * Flushes an mFILE. If this is a real open of a file in write mode then
+ * mFILE->fp will be set. We then write out any new data in mFILE since the
+ * last flush. We cannot tell what may have been modified as we don't keep
+ * track of that, so we typically rewrite out the entire file contents between
+ * the last flush_pos and the end of file.
+ *
+ * For stderr/stdout we also reset the offsets so we cannot modify things
+ * we've already output.
+ */
+int mfflush(mFILE *mf) {
+    if (!mf->fp)
+	return 0;
+
+    /* FIXME: only do this when opened in write mode */
+    if (mf == m_channel[1] || mf == m_channel[2]) {
+	if (mf->flush_pos < mf->size) {
+	    size_t bytes = mf->size - mf->flush_pos;
+	    if (fwrite(mf->data + mf->flush_pos, 1, bytes, mf->fp) < bytes)
+		return -1;
+	    if (0 != fflush(mf->fp))
+		return -1;
+	}
+
+	/* Stdout & stderr are non-seekable streams so throw away the data */
+	mf->offset = mf->size = mf->flush_pos = 0;
+    }
+
+    /* only flush when opened in write mode */
+    if (mf->mode & MF_WRITE) {
+	if (mf->flush_pos < mf->size) {
+	    size_t bytes = mf->size - mf->flush_pos;
+	    if (!(mf->mode & MF_MODEX)) {
+		fseek(mf->fp, mf->flush_pos, SEEK_SET);
+	    }
+	    if (fwrite(mf->data + mf->flush_pos, 1, bytes, mf->fp) < bytes)
+		return -1;
+	    if (0 != fflush(mf->fp))
+		return -1;
+	}
+	if (ftell(mf->fp) != -1 &&
+	    ftruncate(fileno(mf->fp), ftell(mf->fp)) == -1)
+		return -1;
+	mf->flush_pos = mf->size;
+    }
+
+    return 0;
+}
+
+/*
+ * A wrapper around vsprintf() to write to an mFILE. This also uses vflen() to
+ * estimate how many additional bytes of storage will be required for the
+ * vsprintf to work.
+ */
+int mfprintf(mFILE *mf, char *fmt, ...) {
+    int ret;
+    size_t est_length;
+    va_list args;
+
+    va_start(args, fmt);
+    est_length = vflen(fmt, args);
+    va_end(args);
+    while (est_length + mf->offset > mf->alloced) {
+	size_t new_alloced = mf->alloced ? mf->alloced * 2 : 1024;
+	void * new_data    = realloc(mf->data, new_alloced);
+	if (NULL == new_data) return -1;
+	mf->alloced = new_alloced;
+	mf->data    = new_data;
+    }
+
+    va_start(args, fmt);
+    ret = vsprintf(&mf->data[mf->offset], fmt, args);
+    va_end(args);
+
+    if (ret > 0) {
+	mf->offset += ret;
+	if (mf->size < mf->offset)
+	    mf->size = mf->offset;
+    }
+
+    if (mf->fp == stderr) {
+	/* Auto-flush for stderr */
+	if (0 != mfflush(mf)) return -1;
+    }
+
+    return ret;
+}
+
+/*
+ * Converts an mFILE from binary to ascii mode by replacing all
+ * cr-nl with nl.
+ *
+ * Primarily used on windows when we've uncompressed a binary file which
+ * happens to be a text file (eg Experiment File). Previously we would have
+ * seeked back to the start and used _setmode(fileno(fp), _O_TEXT).
+ *
+ * Side effect: resets offset and flush_pos back to the start.
+ */
+void mfascii(mFILE *mf) {
+    size_t p1, p2;
+
+    for (p1 = p2 = 1; p1 < mf->size; p1++, p2++) {
+	if (mf->data[p1] == '\n' && mf->data[p1-1] == '\r') {
+	    p2--; /* delete the \r */
+	}
+	mf->data[p2] = mf->data[p1];
+    }
+    mf->size = p2;
+
+    mf->offset = mf->flush_pos = 0;
+}
diff --git a/htslib/cram/mFILE.h b/htslib/cram/mFILE.h
new file mode 100644
index 0000000..5ded9a5
--- /dev/null
+++ b/htslib/cram/mFILE.h
@@ -0,0 +1,88 @@
+/*
+Copyright (c) 2005-2006, 2008-2009 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _MFILE_H_
+#define _MFILE_H_
+
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+    FILE *fp;
+    char *data;
+    size_t alloced;
+    int eof;
+    int mode; /* open mode in MF_?? define bit pattern */
+    size_t size;
+    size_t offset;
+    size_t flush_pos;
+} mFILE;
+
+#define MF_READ    1
+#define MF_WRITE   2
+#define MF_APPEND  4
+#define MF_BINARY  8
+#define MF_TRUNC  16
+#define MF_MODEX  32
+
+mFILE *mfreopen(const char *path, const char *mode, FILE *fp);
+mFILE *mfopen(const char *path, const char *mode);
+int mfdetach(mFILE *mf);
+int mfclose(mFILE *mf);
+int mfdestroy(mFILE *mf);
+int mfseek(mFILE *mf, long offset, int whence);
+long mftell(mFILE *mf);
+void mrewind(mFILE *mf);
+void mftruncate(mFILE *mf, long offset);
+int mfeof(mFILE *mf);
+size_t mfread(void *ptr, size_t size, size_t nmemb, mFILE *mf);
+size_t mfwrite(void *ptr, size_t size, size_t nmemb, mFILE *mf);
+int mfgetc(mFILE *mf);
+int mungetc(int c, mFILE *mf);
+mFILE *mfcreate(char *data, int size);
+mFILE *mfcreate_from(const char *path, const char *mode_str, FILE *fp);
+void mfrecreate(mFILE *mf, char *data, int size);
+void *mfsteal(mFILE *mf, size_t *size_out);
+char *mfgets(char *s, int size, mFILE *mf);
+int mfflush(mFILE *mf);
+int mfprintf(mFILE *mf, char *fmt, ...);
+mFILE *mstdin(void);
+mFILE *mstdout(void);
+mFILE *mstderr(void);
+void mfascii(mFILE *mf);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _MFILE_H_ */
diff --git a/htslib/cram/md5.c b/htslib/cram/md5.c
new file mode 100644
index 0000000..68123c0
--- /dev/null
+++ b/htslib/cram/md5.c
@@ -0,0 +1,295 @@
+/*
+ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
+ * MD5 Message-Digest Algorithm (RFC 1321).
+ *
+ * Homepage:
+ * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
+ *
+ * Author:
+ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
+ *
+ * This software was written by Alexander Peslyak in 2001.  No copyright is
+ * claimed, and the software is hereby placed in the public domain.
+ * In case this attempt to disclaim copyright and place the software in the
+ * public domain is deemed null and void, then the software is
+ * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
+ * general public under the following terms:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted.
+ *
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+ *
+ * (This is a heavily cut-down "BSD license".)
+ *
+ * This differs from Colin Plumb's older public domain implementation in that
+ * no exactly 32-bit integer data type is required (any 32-bit or wider
+ * unsigned integer data type will do), there's no compile-time endianness
+ * configuration, and the function prototypes match OpenSSL's.  No code from
+ * Colin Plumb's implementation has been reused; this comment merely compares
+ * the properties of the two independent implementations.
+ *
+ * The primary goals of this implementation are portability and ease of use.
+ * It is meant to be fast, but not as fast as possible.  Some known
+ * optimizations are not included to reduce source code size and avoid
+ * compile-time configuration.
+ */
+ 
+#ifndef HAVE_OPENSSL
+ 
+#include <string.h>
+ 
+#include "md5.h"
+ 
+/*
+ * The basic MD5 functions.
+ *
+ * F and G are optimized compared to their RFC 1321 definitions for
+ * architectures that lack an AND-NOT instruction, just like in Colin Plumb's
+ * implementation.
+ */
+#define F(x, y, z)			((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z)			((y) ^ ((z) & ((x) ^ (y))))
+#define H(x, y, z)			((x) ^ (y) ^ (z))
+#define I(x, y, z)			((y) ^ ((x) | ~(z)))
+ 
+/*
+ * The MD5 transformation for all four rounds.
+ */
+#define STEP(f, a, b, c, d, x, t, s) \
+	(a) += f((b), (c), (d)) + (x) + (t); \
+	(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
+	(a) += (b);
+ 
+/*
+ * SET reads 4 input bytes in little-endian byte order and stores them
+ * in a properly aligned word in host byte order.
+ *
+ * The check for little-endian architectures that tolerate unaligned
+ * memory accesses is just an optimization.  Nothing will break if it
+ * doesn't work.
+ */
+#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
+#define SET(n) \
+	(*(MD5_u32plus *)&ptr[(n) * 4])
+#define GET(n) \
+	SET(n)
+#else
+#define SET(n) \
+	(ctx->block[(n)] = \
+	(MD5_u32plus)ptr[(n) * 4] | \
+	((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
+	((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
+	((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
+#define GET(n) \
+	(ctx->block[(n)])
+#endif
+ 
+/*
+ * This processes one or more 64-byte data blocks, but does NOT update
+ * the bit counters.  There are no alignment requirements.
+ */
+static void *body(MD5_CTX *ctx, void *data, unsigned long size)
+{
+	unsigned char *ptr;
+	MD5_u32plus a, b, c, d;
+	MD5_u32plus saved_a, saved_b, saved_c, saved_d;
+ 
+	ptr = data;
+ 
+	a = ctx->a;
+	b = ctx->b;
+	c = ctx->c;
+	d = ctx->d;
+ 
+	do {
+		saved_a = a;
+		saved_b = b;
+		saved_c = c;
+		saved_d = d;
+ 
+/* Round 1 */
+		STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
+		STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
+		STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
+		STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
+		STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
+		STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
+		STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
+		STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
+		STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
+		STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
+		STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
+		STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
+		STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
+		STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
+		STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
+		STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
+ 
+/* Round 2 */
+		STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
+		STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
+		STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
+		STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
+		STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
+		STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
+		STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
+		STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
+		STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
+		STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
+		STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
+		STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
+		STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
+		STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
+		STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
+		STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
+ 
+/* Round 3 */
+		STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
+		STEP(H, d, a, b, c, GET(8), 0x8771f681, 11)
+		STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
+		STEP(H, b, c, d, a, GET(14), 0xfde5380c, 23)
+		STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
+		STEP(H, d, a, b, c, GET(4), 0x4bdecfa9, 11)
+		STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
+		STEP(H, b, c, d, a, GET(10), 0xbebfbc70, 23)
+		STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
+		STEP(H, d, a, b, c, GET(0), 0xeaa127fa, 11)
+		STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
+		STEP(H, b, c, d, a, GET(6), 0x04881d05, 23)
+		STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
+		STEP(H, d, a, b, c, GET(12), 0xe6db99e5, 11)
+		STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
+		STEP(H, b, c, d, a, GET(2), 0xc4ac5665, 23)
+ 
+/* Round 4 */
+		STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
+		STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
+		STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
+		STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
+		STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
+		STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
+		STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
+		STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
+		STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
+		STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
+		STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
+		STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
+		STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
+		STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
+		STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
+		STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)
+ 
+		a += saved_a;
+		b += saved_b;
+		c += saved_c;
+		d += saved_d;
+ 
+		ptr += 64;
+	} while (size -= 64);
+ 
+	ctx->a = a;
+	ctx->b = b;
+	ctx->c = c;
+	ctx->d = d;
+ 
+	return ptr;
+}
+ 
+void MD5_Init(MD5_CTX *ctx)
+{
+	ctx->a = 0x67452301;
+	ctx->b = 0xefcdab89;
+	ctx->c = 0x98badcfe;
+	ctx->d = 0x10325476;
+ 
+	ctx->lo = 0;
+	ctx->hi = 0;
+}
+ 
+void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size)
+{
+	MD5_u32plus saved_lo;
+	unsigned long used, free;
+ 
+	saved_lo = ctx->lo;
+	if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
+		ctx->hi++;
+	ctx->hi += size >> 29;
+ 
+	used = saved_lo & 0x3f;
+ 
+	if (used) {
+		free = 64 - used;
+ 
+		if (size < free) {
+			memcpy(&ctx->buffer[used], data, size);
+			return;
+		}
+ 
+		memcpy(&ctx->buffer[used], data, free);
+		data = (unsigned char *)data + free;
+		size -= free;
+		body(ctx, ctx->buffer, 64);
+	}
+ 
+	if (size >= 64) {
+		data = body(ctx, data, size & ~(unsigned long)0x3f);
+		size &= 0x3f;
+	}
+ 
+	memcpy(ctx->buffer, data, size);
+}
+ 
+void MD5_Final(unsigned char *result, MD5_CTX *ctx)
+{
+	unsigned long used, free;
+ 
+	used = ctx->lo & 0x3f;
+ 
+	ctx->buffer[used++] = 0x80;
+ 
+	free = 64 - used;
+ 
+	if (free < 8) {
+		memset(&ctx->buffer[used], 0, free);
+		body(ctx, ctx->buffer, 64);
+		used = 0;
+		free = 64;
+	}
+ 
+	memset(&ctx->buffer[used], 0, free - 8);
+ 
+	ctx->lo <<= 3;
+	ctx->buffer[56] = ctx->lo;
+	ctx->buffer[57] = ctx->lo >> 8;
+	ctx->buffer[58] = ctx->lo >> 16;
+	ctx->buffer[59] = ctx->lo >> 24;
+	ctx->buffer[60] = ctx->hi;
+	ctx->buffer[61] = ctx->hi >> 8;
+	ctx->buffer[62] = ctx->hi >> 16;
+	ctx->buffer[63] = ctx->hi >> 24;
+ 
+	body(ctx, ctx->buffer, 64);
+ 
+	result[0] = ctx->a;
+	result[1] = ctx->a >> 8;
+	result[2] = ctx->a >> 16;
+	result[3] = ctx->a >> 24;
+	result[4] = ctx->b;
+	result[5] = ctx->b >> 8;
+	result[6] = ctx->b >> 16;
+	result[7] = ctx->b >> 24;
+	result[8] = ctx->c;
+	result[9] = ctx->c >> 8;
+	result[10] = ctx->c >> 16;
+	result[11] = ctx->c >> 24;
+	result[12] = ctx->d;
+	result[13] = ctx->d >> 8;
+	result[14] = ctx->d >> 16;
+	result[15] = ctx->d >> 24;
+ 
+	memset(ctx, 0, sizeof(*ctx));
+}
+ 
+#endif
diff --git a/htslib/cram/md5.h b/htslib/cram/md5.h
new file mode 100644
index 0000000..6b065a1
--- /dev/null
+++ b/htslib/cram/md5.h
@@ -0,0 +1,54 @@
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
+ * MD5 Message-Digest Algorithm (RFC 1321).
+ *
+ * Homepage:
+ * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
+ *
+ * Author:
+ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
+ *
+ * This software was written by Alexander Peslyak in 2001.  No copyright is
+ * claimed, and the software is hereby placed in the public domain.
+ * In case this attempt to disclaim copyright and place the software in the
+ * public domain is deemed null and void, then the software is
+ * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
+ * general public under the following terms:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted.
+ *
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+ *
+ * See md5.c for more information.
+ */
+ 
+#ifdef HAVE_OPENSSL
+#include <openssl/md5.h>
+#elif !defined(_MD5_H)
+#define _MD5_H
+ 
+/* Any 32-bit or wider unsigned integer data type will do */
+typedef unsigned int MD5_u32plus;
+ 
+typedef struct {
+	MD5_u32plus lo, hi;
+	MD5_u32plus a, b, c, d;
+	unsigned char buffer[64];
+	MD5_u32plus block[16];
+} MD5_CTX;
+ 
+extern void MD5_Init(MD5_CTX *ctx);
+extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
+extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
+ 
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/htslib/cram/misc.h b/htslib/cram/misc.h
new file mode 100644
index 0000000..681b28c
--- /dev/null
+++ b/htslib/cram/misc.h
@@ -0,0 +1,110 @@
+/*
+Copyright (c) 1994-1997, 2001-2002 MEDICAL RESEARCH COUNCIL
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1 Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2 Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3 Neither the name of the MEDICAL RESEARCH COUNCIL, THE LABORATORY OF 
+MOLECULAR BIOLOGY nor the names of its contributors may be used to endorse or 
+promote products derived from this software without specific prior written 
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+Copyright (c) 2003-2013 Genome Research Ltd.
+
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _misc_h
+#define _misc_h
+
+#include "cram/os.h"
+
+#include <stdio.h>
+#include <stdarg.h>  /* varargs needed for v*printf() prototypes */
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This informs gcc that crash() doesn't return, so it doesn't need to
+ * concern itself that code paths going via crash could mean some variables
+ * being undefined and then issuing uninitialised variable warnings.
+ * This particularly affected convert.
+ */
+#ifdef __GNUC__
+#    define __NORETURN__ __attribute__ ((__noreturn__))
+#else
+#    define __NORETURN__
+#endif
+
+/*
+ * Used for printf style argument checking. We can request a function such
+ * as vTcl_SetResult does argument checking, avoiding bugs with using
+ * %d and passing in a 64-bit record.
+ */
+#ifdef __GNUC__
+#    define __PRINTF_FORMAT__(a,b) __attribute__ ((format (printf, a, b)))
+#else
+#    define __PRINTF_FORMAT__(a,b)
+#endif
+
+extern int is_directory(char * fn);
+extern int is_file(char * fn);
+extern int file_size(char * fn);
+
+#define MIN(A,B) ( ( (A) < (B) ) ? (A) : (B) )
+#define MAX(A,B) ( ( (A) > (B) ) ? (A) : (B) )
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_misc_h*/
diff --git a/htslib/cram/open_trace_file.c b/htslib/cram/open_trace_file.c
new file mode 100644
index 0000000..d89815d
--- /dev/null
+++ b/htslib/cram/open_trace_file.c
@@ -0,0 +1,386 @@
+/*
+Author: James Bonfield
+
+Copyright (c) 2000-2001 MEDICAL RESEARCH COUNCIL
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the name of the MEDICAL RESEARCH COUNCIL, THE LABORATORY OF 
+MOLECULAR BIOLOGY nor the names of its contributors may be used to endorse or 
+promote products derived from this software without specific prior written 
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+Copyright (c) 2008, 2009, 2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "cram/os.h"
+#ifndef PATH_MAX
+#  define PATH_MAX 1024
+#endif
+#ifdef HAVE_LIBCURL
+#  include <curl/curl.h>
+#endif
+
+#include "cram/open_trace_file.h"
+#include "cram/misc.h"
+
+/*
+ * Tokenises the search path splitting on colons (unix) or semicolons
+ * (windows).
+ * We also  explicitly add a "./" to the end of the search path
+ *
+ * Returns: A new search path with items separated by nul chars. Two nul
+ *          chars in a row represent the end of the tokenised path.
+ * Returns NULL for a failure.
+ *
+ * The returned data has been malloced. It is up to the caller to free this
+ * memory.
+ */
+char *tokenise_search_path(char *searchpath) {
+    char *newsearch;
+    unsigned int i, j;
+    size_t len;
+#ifdef _WIN32
+    char path_sep = ';';
+#else
+    char path_sep = ':';
+#endif
+
+    if (!searchpath)
+	searchpath="";
+
+    newsearch = (char *)malloc((len = strlen(searchpath))+5);
+    if (!newsearch)
+	return NULL;
+
+    for (i = 0, j = 0; i < len; i++) {
+	/* "::" => ":". Used for escaping colons in http://foo */
+	if (i < len-1 && searchpath[i] == ':' && searchpath[i+1] == ':') {
+	    newsearch[j++] = ':';
+	    i++;
+	    continue;
+	}
+
+	if (searchpath[i] == path_sep) {
+	    /* Skip blank path components */
+	    if (j && newsearch[j-1] != 0)
+		newsearch[j++] = 0;
+	} else {
+	    newsearch[j++] = searchpath[i];
+	}
+    }
+
+    if (j)
+	newsearch[j++] = 0;
+    newsearch[j++] = '.';
+    newsearch[j++] = '/';
+    newsearch[j++] = 0;
+    newsearch[j++] = 0;
+    
+    return newsearch;
+}
+
+#ifdef HAVE_LIBCURL
+mFILE *find_file_url(char *file, char *url) {
+    char buf[8192], *cp;
+    mFILE *mf = NULL, *headers = NULL;
+    int maxlen = 8190 - strlen(file);
+    static CURL *handle = NULL;
+    static int curl_init = 0;
+    char errbuf[CURL_ERROR_SIZE];
+
+    *errbuf = 0;
+
+    if (!curl_init) {
+	if (curl_global_init(CURL_GLOBAL_ALL))
+	    return NULL;
+
+	if (NULL == (handle = curl_easy_init()))
+	    goto error;
+
+	curl_init = 1;
+    }
+
+    /* Expand %s for the trace name */
+    for (cp = buf; *url && cp - buf < maxlen; url++) {
+	if (*url == '%' && *(url+1) == 's') {
+	    url++;
+	    cp += strlen(strcpy(cp, file));
+	} else {
+	    *cp++ = *url;
+	}
+    }
+    *cp++ = 0;
+
+    /* Setup the curl */
+    if (NULL == (mf = mfcreate(NULL, 0)) ||
+	NULL == (headers = mfcreate(NULL, 0)))
+	return NULL;
+
+    if (0 != curl_easy_setopt(handle, CURLOPT_URL, buf))
+	goto error;
+    if (0 != curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 60L))
+	goto error;
+    if (0 != curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION,
+			      (curl_write_callback)mfwrite))
+	goto error;
+    if (0 != curl_easy_setopt(handle, CURLOPT_WRITEDATA, mf))
+	goto error;
+    if (0 != curl_easy_setopt(handle, CURLOPT_HEADERFUNCTION,
+			      (curl_write_callback)mfwrite))
+	goto error;
+    if (0 != curl_easy_setopt(handle, CURLOPT_WRITEHEADER, headers))
+	goto error;
+    if (0 != curl_easy_setopt(handle, CURLOPT_ERRORBUFFER, errbuf))
+	goto error;
+    
+    /* Fetch! */
+    if (0 != curl_easy_perform(handle))
+	goto error;
+    
+    /* Report errors is approproate. 404 is silent as it may have just been
+     * a search via RAWDATA path, everything else is worth reporting.
+     */
+    {
+	float version;
+	int response;
+	char nul = 0;
+	mfwrite(&nul, 1, 1, headers);
+	if (2 == sscanf(headers->data, "HTTP/%f %d", &version, &response)) {
+	    if (response != 200) {
+		if (response != 404)
+		    fprintf(stderr, "%.*s\n",
+			    (int)headers->size, headers->data);
+		goto error;
+	    }
+	}
+    }
+
+    if (mftell(mf) == 0)
+	goto error;
+
+    mfdestroy(headers);
+
+    mrewind(mf);
+    return mf;
+
+ error:
+    if (mf)
+	mfdestroy(mf);
+    if (headers)
+	mfdestroy(headers);
+    if (*errbuf)
+	fprintf(stderr, "%s\n", errbuf);
+    return NULL;
+}
+#endif
+
+/*
+ * Searches for file in the directory 'dirname'. If it finds it, it opens
+ * it. This also searches for compressed versions of the file in dirname
+ * too.
+ *
+ * Returns mFILE pointer if found
+ *         NULL if not
+ */
+static mFILE *find_file_dir(char *file, char *dirname) {
+    char path[PATH_MAX+1];
+    size_t len = strlen(dirname);
+    char *cp;
+
+    if (dirname[len-1] == '/')
+	len--;
+
+    /* Special case for "./" or absolute filenames */
+    if (*file == '/' || (len==1 && *dirname == '.')) {
+	sprintf(path, "%s", file);
+    } else {
+	/* Handle %[0-9]*s expansions, if required */
+	char *path_end = path;
+	*path = 0;
+	while ((cp = strchr(dirname, '%'))) {
+	    char *endp;
+	    long l = strtol(cp+1, &endp, 10);
+	    if (*endp != 's') {
+		strncpy(path_end, dirname, (endp+1)-dirname);
+		path_end += (endp+1)-dirname;
+		dirname = endp+1;
+		continue;
+	    }
+	    
+	    strncpy(path_end, dirname, cp-dirname);
+	    path_end += cp-dirname;
+	    if (l) {
+		strncpy(path_end, file, l);
+		path_end += MIN(strlen(file), l);
+		file     += MIN(strlen(file), l);
+	    } else {
+		strcpy(path_end, file);
+		path_end += strlen(file);
+		file     += strlen(file);
+	    }
+	    len -= (endp+1) - dirname;
+	    dirname = endp+1;
+	}
+	strncpy(path_end, dirname, len);
+	path_end += MIN(strlen(dirname), len);
+	*path_end = 0;
+	if (*file) {
+	    *path_end++ = '/';
+	    strcpy(path_end, file);
+	}
+
+	//fprintf(stderr, "*PATH=\"%s\"\n", path);
+    }
+
+    if (is_file(path)) {
+	return mfopen(path, "rb");
+    }
+
+    return NULL;
+}
+
+/*
+ * ------------------------------------------------------------------------
+ * Public functions below.
+ */
+
+/*
+ * Opens a trace file named 'file'. This is initially looked for as a
+ * pathname relative to a file named "relative_to". This may (for
+ * example) be the name of an experiment file referencing the trace
+ * file. In this case by passing relative_to as the experiment file
+ * filename the trace file will be picked up in the same directory as
+ * the experiment file. Relative_to may be supplied as NULL.
+ *
+ * 'file' is looked for at relative_to, then the current directory, and then
+ * all of the locations listed in 'path' (which is a colon separated list).
+ * If 'path' is NULL it uses the RAWDATA environment variable instead.
+ *
+ * Returns a mFILE pointer when found.
+ *           NULL otherwise.
+ */
+mFILE *open_path_mfile(char *file, char *path, char *relative_to) {
+    char *newsearch;
+    char *ele;
+    mFILE *fp;
+
+    /* Use path first */
+    if (!path)
+	path = getenv("RAWDATA");
+    if (NULL == (newsearch = tokenise_search_path(path)))
+	return NULL;
+    
+    /*
+     * Step through the search path testing out each component.
+     * We now look through each path element treating some prefixes as
+     * special, otherwise we treat the element as a directory.
+     */
+    for (ele = newsearch; *ele; ele += strlen(ele)+1) {
+	int i;
+	char *suffix[6] = {"", ".gz", ".bz2", ".sz", ".Z", ".bz2"};
+	for (i = 0; i < 6; i++) {
+	    char file2[1024];
+	    char *ele2;
+	    int valid = 1;
+
+	    /*
+	     * '|' prefixing a path component indicates that we do not
+	     * wish to perform the compression extension searching in that
+	     * location.
+	     */
+	    if (*ele == '|') {
+		ele2 = ele+1;
+		valid = (i == 0);
+	    } else {
+		ele2 = ele;
+	    }
+
+	    sprintf(file2, "%s%s", file, suffix[i]);
+
+#if defined(HAVE_LIBCURL)
+	    if (0 == strncmp(ele2, "URL=", 4)) {
+		if (valid && (fp = find_file_url(file2, ele2+4))) {
+		    free(newsearch);
+		    return fp;
+		}
+	    } else
+#endif
+	    if (valid && (fp = find_file_dir(file2, ele2))) {
+		free(newsearch);
+		return fp;
+	    }
+	}
+    }
+
+    free(newsearch);
+
+    /* Look in the same location as the incoming 'relative_to' filename */
+    if (relative_to) {
+	char *cp;
+	char relative_path[PATH_MAX+1];
+	strcpy(relative_path, relative_to);
+	if ((cp = strrchr(relative_path, '/')))
+	    *cp = 0;
+	if ((fp = find_file_dir(file, relative_path)))
+	    return fp;
+    }
+
+    return NULL;
+}
diff --git a/htslib/cram/open_trace_file.h b/htslib/cram/open_trace_file.h
new file mode 100644
index 0000000..ee52cb0
--- /dev/null
+++ b/htslib/cram/open_trace_file.h
@@ -0,0 +1,115 @@
+/*
+Author: James Bonfield
+
+Copyright (c) 2000-2001 MEDICAL RESEARCH COUNCIL
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   . Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   . Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   . Neither the name of the MEDICAL RESEARCH COUNCIL, THE LABORATORY OF 
+MOLECULAR BIOLOGY nor the names of its contributors may be used to endorse or 
+promote products derived from this software without specific prior written 
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+Copyright (c) 2008, 2009, 2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _OPEN_TRACE_FILE_H_
+#define _OPEN_TRACE_FILE_H_
+
+#include "cram/mFILE.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Tokenises the search path splitting on colons (unix) or semicolons
+ * (windows).
+ * We also  explicitly add a "./" to the end of the search path
+ *
+ * Returns: A new search path with items separated by nul chars. Two nul
+ *          chars in a row represent the end of the tokenised path.
+ * Returns NULL for a failure.
+ *
+ * The returned data has been malloced. It is up to the caller to free this
+ * memory.
+ */
+char *tokenise_search_path(char *searchpath);
+
+/*
+ * Opens a trace file named 'file'. This is initially looked for as a
+ * pathname relative to a file named "relative_to". This may (for
+ * example) be the name of an experiment file referencing the trace
+ * file. In this case by passing relative_to as the experiment file
+ * filename the trace file will be picked up in the same directory as
+ * the experiment file. Relative_to may be supplied as NULL.
+ *
+ * 'file' is looked for at relative_to, then the current directory, and then
+ * all of the locations listed in 'path' (which is a colon separated list).
+ * If 'path' is NULL it uses the RAWDATA environment variable instead.
+ *
+ * Returns a mFILE pointer when found.
+ *           NULL otherwise.
+ */
+mFILE *open_path_mfile(char *file, char *path, char *relative_to);
+
+/*
+ * Returns a mFILE containing the entire contents of the url;
+ *         NULL on failure.
+ */
+mFILE *find_file_url(char *file, char *url);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OPEN_TRACE_FILE_H_ */
diff --git a/htslib/cram/os.h b/htslib/cram/os.h
new file mode 100644
index 0000000..b2affe0
--- /dev/null
+++ b/htslib/cram/os.h
@@ -0,0 +1,306 @@
+/*
+Copyright (c) 1993, 1995-2002 MEDICAL RESEARCH COUNCIL
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1 Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2 Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3 Neither the name of the MEDICAL RESEARCH COUNCIL, THE LABORATORY OF 
+MOLECULAR BIOLOGY nor the names of its contributors may be used to endorse or 
+promote products derived from this software without specific prior written 
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+Copyright (c) 2004, 2006, 2009-2011, 2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+ * File: os.h
+ *
+ * Author: 
+ *         MRC Laboratory of Molecular Biology
+ *	   Hills Road
+ *	   Cambridge CB2 2QH
+ *	   United Kingdom
+ *
+ * Description: operating system specific type definitions
+ *
+ */
+
+#ifndef _OS_H_
+#define _OS_H_
+
+#include <limits.h>
+#include <inttypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*-----------------------------------------------------------------------------
+ * Detection of endianness. The main part of this is done in autoconf, but
+ * for the case of MacOS FAT binaries we fall back on auto-sensing based on
+ * processor type too.
+ */
+
+/* Set by autoconf */
+#define SP_LITTLE_ENDIAN
+
+/* Mac FAT binaries or unknown. Auto detect based on CPU type */
+#if !defined(SP_BIG_ENDIAN) && !defined(SP_LITTLE_ENDIAN)
+
+/*
+ * x86 equivalents
+ */
+#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(__i686__) || defined(__i686)
+#  if defined(SP_BIG_ENDIAN)
+#    undef SP_BIG_ENDIAN
+#  endif
+#  define SP_LITTLE_ENDIAN
+#endif
+
+/*
+ * DEC Alpha
+ */
+#if defined(__alpha__) || defined(__alpha)
+#  if defined(SP_LITTLE_ENDIAN)
+#    undef SP_LITTLE_ENDIAN
+#  endif
+#  define SP_BIG_ENDIAN
+#endif
+
+/*
+ * SUN Sparc
+ */
+#if defined(__sparc__) || defined(__sparc)
+#  if defined(SP_LITTLE_ENDIAN)
+#    undef SP_LITTLE_ENDIAN
+#  endif
+#  define SP_BIG_ENDIAN
+#endif
+
+/*
+ * PowerPC
+ */
+#if defined(__ppc__) || defined(__ppc)
+#  if defined(SP_LITTLE_ENDIAN)
+#    undef SP_LITTLE_ENDIAN
+#  endif
+#  define SP_BIG_ENDIAN
+#endif
+
+/* Some catch-alls */
+#if defined(__LITTLE_ENDIAN__) || defined(__LITTLEENDIAN__)
+#    define SP_LITTLE_ENDIAN
+#endif
+
+#if defined(__BIG_ENDIAN__) || defined(__BIGENDIAN__)
+#    define SP_BIG_ENDIAN
+#endif
+
+#if defined(SP_BIG_ENDIAN) && defined(SP_LITTLE_ENDIAN)
+#    error Both BIG and LITTLE endian defined. Fix os.h and/or Makefile
+#endif
+
+#if !defined(SP_BIG_ENDIAN) && !defined(SP_LITTLE_ENDIAN)
+#    error Neither BIG nor LITTLE endian defined. Fix os.h and/or Makefile
+#endif
+
+#endif
+
+/*-----------------------------------------------------------------------------
+ * Allow for unaligned memory access. This is used in BAM code as the packed
+ * structure has 4-byte cigar ints after the variable length name.
+ *
+ * Consider using AX_CHECK_ALIGNED_ACCESS_REQUIRED in autoconf.
+ */
+#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(__i686__) || defined(__i686)
+#  define ALLOW_UAC
+#endif
+
+/*-----------------------------------------------------------------------------
+ * Byte swapping macros
+ */
+
+/*
+ * Our new swap runs at the same speed on Ultrix, but substantially faster
+ * (300% for swap_int4, ~50% for swap_int2) on an Alpha (due to the lack of
+ * decent 'char' support).
+ *
+ * They also have the ability to swap in situ (src == dst). Newer code now
+ * relies on this so don't change back!
+ */
+#define iswap_int8(x) \
+    (((x & 0x00000000000000ffLL) << 56) + \
+     ((x & 0x000000000000ff00LL) << 40) + \
+     ((x & 0x0000000000ff0000LL) << 24) + \
+     ((x & 0x00000000ff000000LL) <<  8) + \
+     ((x & 0x000000ff00000000LL) >>  8) + \
+     ((x & 0x0000ff0000000000LL) >> 24) + \
+     ((x & 0x00ff000000000000LL) >> 40) + \
+     ((x & 0xff00000000000000LL) >> 56))
+
+#define iswap_int4(x) \
+    (((x & 0x000000ff) << 24) + \
+     ((x & 0x0000ff00) <<  8) + \
+     ((x & 0x00ff0000) >>  8) + \
+     ((x & 0xff000000) >> 24))
+
+#define iswap_int2(x) \
+    (((x & 0x00ff) << 8) + \
+     ((x & 0xff00) >> 8))
+
+/*
+ * Linux systems may use byteswap.h to get assembly versions of byte-swap
+ * on intel systems. This can be as trivial as the bswap opcode, which works
+ * out at over 2-times faster than iswap_int4 above.
+ */
+#if 0
+#if defined(__linux__)
+#    include <byteswap.h>
+#    undef iswap_int8
+#    undef iswap_int4
+#    undef iswap_int2
+#    define iswap_int8 bswap_64
+#    define iswap_int4 bswap_32
+#    define iswap_int2 bswap_16
+#endif
+#endif
+
+
+/*
+ * Macros to specify that data read in is of a particular endianness.
+ * The macros here swap to the appropriate order for the particular machine
+ * running the macro and return the new answer. These may also be used when
+ * writing to a file to specify that we wish to write in (eg) big endian
+ * format.
+ *
+ * This leads to efficient code as most of the time these macros are
+ * trivial.
+ */
+#ifdef SP_BIG_ENDIAN
+#define le_int4(x) iswap_int4((x))
+#endif
+
+#ifdef SP_LITTLE_ENDIAN
+#define le_int4(x) (x)
+#endif
+
+/*-----------------------------------------------------------------------------
+ * <inttypes.h> definitions, incase they're not present
+ */
+
+#ifndef PRId64
+#define __PRI64__ "l"
+#define PRId64 __PRI64__ "d"
+#define PRId32 "d"
+#define PRId16 "d"
+#define PRId8  "d"
+#define PRIu64 __PRI64__ "u"
+#define PRIu32 "u"
+#define PRIu16 "u"
+#define PRIu8  "u"
+#endif
+
+/*-----------------------------------------------------------------------------
+ * Operating system specifics.
+ * These ought to be done by autoconf, but are legacy code.
+ */
+/*
+ * SunOS 4.x
+ * Even though we use the ANSI gcc, we make use the the standard SunOS 4.x
+ * libraries and include files, which are non-ansi
+ */
+#if defined(__sun__) && !defined(__svr4__)
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif
+
+/*
+ * Microsoft Visual C++
+ * Windows
+ */
+#if defined(_MSC_VER)
+#define popen _popen
+#define pclose _pclose
+#define ftruncate(fd,len) _chsize(fd,len)
+#endif
+
+
+/*
+ * Microsoft Windows running MinGW
+ */
+#if defined(__MINGW32__)
+/* #define mkdir(filename,mode) mkdir((filename)) */
+#define sysconf(x) 512
+#define ftruncate(fd,len) _chsize(fd,len)
+#endif
+
+/* Generic WIN32 API issues */
+#ifdef _WIN32
+#  ifndef HAVE_FSEEKO
+#    if __MSVCRT_VERSION__ >= 0x800
+       /* if you have MSVCR80 installed then you can use these definitions: */
+#      define off_t __int64
+#      define fseeko _fseeki64
+#      define ftello _ftelli64
+#    else
+       /* otherwise we're stuck with 32-bit file support */
+#      define off_t long
+#      define fseeko fseek
+#      define ftello ftell
+#    endif
+#  endif /* !HAVE_FSEEKO */
+#endif /* _WIN32 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_OS_H_*/
diff --git a/htslib/cram/pooled_alloc.c b/htslib/cram/pooled_alloc.c
new file mode 100644
index 0000000..0d061e7
--- /dev/null
+++ b/htslib/cram/pooled_alloc.c
@@ -0,0 +1,170 @@
+/*
+Copyright (c) 2009 Genome Research Ltd.
+Author: Rob Davies <rmd at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+
+#include "cram/pooled_alloc.h"
+
+//#define TEST_MAIN
+
+#define PSIZE 1024*1024
+
+pool_alloc_t *pool_create(size_t dsize) {
+    pool_alloc_t *p;
+
+    if (NULL == (p = (pool_alloc_t *)malloc(sizeof(*p))))
+	return NULL;
+
+    /* Minimum size is a pointer, for free list */
+    dsize = (dsize + sizeof(void *) - 1) & ~(sizeof(void *)-1);
+    if (dsize < sizeof(void *))
+	dsize = sizeof(void *);
+    p->dsize = dsize;
+
+    p->npools = 0;
+    p->pools = NULL;
+    p->free  = NULL;
+
+    return p;
+}
+
+static pool_t *new_pool(pool_alloc_t *p) {
+    size_t n = PSIZE / p->dsize;
+    pool_t *pool;
+    
+    pool = realloc(p->pools, (p->npools + 1) * sizeof(*p->pools));
+    if (NULL == pool) return NULL;
+    p->pools = pool;
+    pool = &p->pools[p->npools];
+
+    pool->pool = malloc(n * p->dsize);
+    if (NULL == pool->pool) return NULL;
+
+    pool->used = 0;
+
+    p->npools++;
+
+    return pool;
+}
+
+void pool_destroy(pool_alloc_t *p) {
+    size_t i;
+
+    for (i = 0; i < p->npools; i++) {
+        free(p->pools[i].pool);
+    }
+    free(p->pools);
+    free(p);
+}
+
+void *pool_alloc(pool_alloc_t *p) {
+    pool_t *pool;
+    void *ret;
+
+    /* Look on free list */
+    if (NULL != p->free) {
+        ret = p->free;
+	p->free = *((void **)p->free);
+	return ret;
+    }
+
+    /* Look for space in the last pool */
+    if (p->npools) {
+        pool = &p->pools[p->npools - 1];
+        if (pool->used + p->dsize < PSIZE) {
+	    ret = ((char *) pool->pool) + pool->used;
+	    pool->used += p->dsize;
+	    return ret;
+	}
+    }
+
+    /* Need a new pool */
+    pool = new_pool(p);
+    if (NULL == pool) return NULL;
+
+    pool->used = p->dsize;
+    return pool->pool;
+}
+
+void pool_free(pool_alloc_t *p, void *ptr) {
+    *(void **)ptr = p->free;
+    p->free = ptr;
+}
+
+#ifdef TEST_MAIN
+typedef struct {
+    int x, y, z;
+} xyz;
+
+#define NP 10000
+int main(void) {
+    int i;
+    xyz *item;
+    xyz **items;
+    pool_alloc_t *p = pool_create(sizeof(xyz));
+
+    items = (xyz **)malloc(NP * sizeof(*items));
+
+    for (i = 0; i < NP; i++) {
+	item = pool_alloc(p);
+	item->x = i;
+	item->y = i+1;
+	item->z = i+2;
+	items[i] = item;
+    }
+
+    for (i = 0; i < NP; i++) {
+	item = items[i];
+	if (i % 3)
+	    pool_free(p, item);
+    }
+
+    for (i = 0; i < NP; i++) {
+	item = pool_alloc(p);
+	item->x = 1000000+i;
+	item->y = 1000000+i+1;
+	item->z = 1000000+i+2;
+    }
+
+    for (i = 0; i < NP; i++) {
+	item = items[i];
+	printf("%d\t%d\t%d\t%d\n", i, item->x, item->y, item->z);
+	pool_free(p, item);
+    }
+
+    return 0;
+}
+#endif
diff --git a/htslib/cram/pooled_alloc.h b/htslib/cram/pooled_alloc.h
new file mode 100644
index 0000000..fa3c81f
--- /dev/null
+++ b/htslib/cram/pooled_alloc.h
@@ -0,0 +1,56 @@
+/*
+Copyright (c) 2009 Genome Research Ltd.
+Author: Rob Davies <rmd at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _POOLED_ALLOC_H_
+#define _POOLED_ALLOC_H_
+
+/*
+ * Implements a pooled block allocator where all items are the same size,
+ * but we need many of them.
+ */
+typedef struct {
+    void   *pool;
+    size_t  used;
+} pool_t;
+
+typedef struct {
+    size_t dsize;
+    size_t npools;
+    pool_t *pools;
+    void *free;
+} pool_alloc_t;
+
+pool_alloc_t *pool_create(size_t dsize);
+void pool_destroy(pool_alloc_t *p);
+void *pool_alloc(pool_alloc_t *p);
+void pool_free(pool_alloc_t *p, void *ptr);
+
+
+#endif /*_POOLED_ALLOC_H_*/
diff --git a/htslib/cram/sam_header.c b/htslib/cram/sam_header.c
new file mode 100644
index 0000000..2a8110c
--- /dev/null
+++ b/htslib/cram/sam_header.c
@@ -0,0 +1,1222 @@
+/*
+Copyright (c) 2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <string.h>
+#include <assert.h>
+
+#include "cram/sam_header.h"
+#include "cram/string_alloc.h"
+
+#ifdef SAMTOOLS
+#define sam_hdr_parse sam_hdr_parse_
+#endif
+
+static void sam_hdr_error(char *msg, char *line, int len, int lno) {
+    int j;
+    
+    for (j = 0; j < len && line[j] != '\n'; j++)
+	;
+    fprintf(stderr, "%s at line %d: \"%.*s\"\n", msg, lno, j, line);
+}
+
+void sam_hdr_dump(SAM_hdr *hdr) {
+    khint_t k;
+    int i;
+
+    printf("===DUMP===\n");
+    for (k = kh_begin(hdr->h); k != kh_end(hdr->h); k++) {
+	SAM_hdr_type *t1, *t2;
+	char c[2];
+
+	if (!kh_exist(hdr->h, k))
+	    continue;
+
+	t1 = t2 = kh_val(hdr->h, k);
+	c[0] = kh_key(hdr->h, k)>>8;
+	c[1] = kh_key(hdr->h, k)&0xff;
+	printf("Type %.2s, count %d\n", c, t1->prev->order+1);
+
+	do {
+	    SAM_hdr_tag *tag;
+	    printf(">>>%d ", t1->order);
+	    for (tag = t1->tag; tag; tag=tag->next) {
+		printf("\"%.2s\":\"%.*s\"\t",
+		       tag->str, tag->len-3, tag->str+3);
+	    }
+	    putchar('\n');
+	    t1 = t1->next;
+	} while (t1 != t2);
+    }
+
+    /* Dump out PG chains */
+    printf("\n at PG chains:\n");
+    for (i = 0; i < hdr->npg_end; i++) {
+	int j;
+	printf("  %d:", i);
+	for (j = hdr->pg_end[i]; j != -1; j = hdr->pg[j].prev_id) {
+	    printf("%s%d(%.*s)", 
+		   j == hdr->pg_end[i] ? " " : "->",
+		   j, hdr->pg[j].name_len, hdr->pg[j].name);
+	}
+	printf("\n");
+    }
+
+    puts("===END DUMP===");
+}
+
+/* Updates the hash tables in the SAM_hdr structure.
+ *
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+static int sam_hdr_update_hashes(SAM_hdr *sh,
+				 int type,
+				 SAM_hdr_type *h_type) {
+    /* Add to reference hash? */
+    if ((type>>8) == 'S' && (type&0xff) == 'Q') {
+	SAM_hdr_tag *tag;
+	int nref = sh->nref;
+
+	sh->ref = realloc(sh->ref, (sh->nref+1)*sizeof(*sh->ref));
+	if (!sh->ref)
+	    return -1;
+
+	tag = h_type->tag;
+	sh->ref[nref].name = NULL;
+	sh->ref[nref].len  = 0;
+	sh->ref[nref].ty = h_type;
+	sh->ref[nref].tag  = tag;
+
+	while (tag) {
+	    if (tag->str[0] == 'S' && tag->str[1] == 'N') {
+		if (!(sh->ref[nref].name = malloc(tag->len)))
+		    return -1;
+		strncpy(sh->ref[nref].name, tag->str+3, tag->len-3);
+		sh->ref[nref].name[tag->len-3] = 0;
+	    } else if (tag->str[0] == 'L' && tag->str[1] == 'N') {
+		sh->ref[nref].len = atoi(tag->str+3);
+	    }
+	    tag = tag->next;
+	}
+
+	if (sh->ref[nref].name) {
+	    khint_t k;
+	    int r;
+	    k = kh_put(m_s2i, sh->ref_hash, sh->ref[nref].name, &r);
+	    if (-1 == r) return -1;
+	    kh_val(sh->ref_hash, k) = nref;
+	}
+
+	sh->nref++;
+    }
+
+    /* Add to read-group hash? */
+    if ((type>>8) == 'R' && (type&0xff) == 'G') {
+	SAM_hdr_tag *tag;
+	int nrg = sh->nrg;
+
+	sh->rg = realloc(sh->rg, (sh->nrg+1)*sizeof(*sh->rg));
+	if (!sh->rg)
+	    return -1;
+
+	tag = h_type->tag;
+	sh->rg[nrg].name = NULL;
+	sh->rg[nrg].name_len = 0;
+	sh->rg[nrg].ty   = h_type;
+	sh->rg[nrg].tag  = tag;
+	sh->rg[nrg].id   = nrg;
+
+	while (tag) {
+	    if (tag->str[0] == 'I' && tag->str[1] == 'D') {
+		if (!(sh->rg[nrg].name = malloc(tag->len)))
+		    return -1;
+		strncpy(sh->rg[nrg].name, tag->str+3, tag->len-3);
+		sh->rg[nrg].name[tag->len-3] = 0;
+		sh->rg[nrg].name_len = strlen(sh->rg[nrg].name);
+	    }
+	    tag = tag->next;
+	}
+
+	if (sh->rg[nrg].name) {
+	    khint_t k;
+	    int r;
+	    k = kh_put(m_s2i, sh->rg_hash, sh->rg[nrg].name, &r);
+	    if (-1 == r) return -1;
+	    kh_val(sh->rg_hash, k) = nrg;
+	}
+
+	sh->nrg++;
+    }
+
+    /* Add to program hash? */
+    if ((type>>8) == 'P' && (type&0xff) == 'G') {
+	SAM_hdr_tag *tag;
+	int npg = sh->npg;
+
+	sh->pg = realloc(sh->pg, (sh->npg+1)*sizeof(*sh->pg));
+	if (!sh->pg)
+	    return -1;
+
+	tag = h_type->tag;
+	sh->pg[npg].name = NULL;
+	sh->pg[npg].name_len = 0;
+	sh->pg[npg].ty  = h_type;
+	sh->pg[npg].tag  = tag;
+	sh->pg[npg].id   = npg;
+	sh->pg[npg].prev_id = -1;
+
+	while (tag) {
+	    if (tag->str[0] == 'I' && tag->str[1] == 'D') {
+		if (!(sh->pg[npg].name = malloc(tag->len)))
+		    return -1;
+		strncpy(sh->pg[npg].name, tag->str+3, tag->len-3);
+		sh->pg[npg].name[tag->len-3] = 0;
+		sh->pg[npg].name_len = strlen(sh->pg[npg].name);
+	    } else if (tag->str[0] == 'P' && tag->str[1] == 'P') {
+		// Resolve later if needed
+		khint_t k;
+		char tmp = tag->str[tag->len]; tag->str[tag->len] = 0;
+		k = kh_get(m_s2i, sh->pg_hash, tag->str+3);
+		tag->str[tag->len] = tmp;
+
+		if (k != kh_end(sh->pg_hash)) {
+		    int p_id = kh_val(sh->pg_hash, k);
+		    sh->pg[npg].prev_id = sh->pg[p_id].id;
+
+		    /* Unmark previous entry as a PG termination */
+		    if (sh->npg_end > 0 &&
+			sh->pg_end[sh->npg_end-1] == p_id) {
+			sh->npg_end--;
+		    } else {
+			int i;
+			for (i = 0; i < sh->npg_end; i++) {
+			    if (sh->pg_end[i] == p_id) {
+				memmove(&sh->pg_end[i], &sh->pg_end[i+1],
+					(sh->npg_end-i-1)*sizeof(*sh->pg_end));
+				sh->npg_end--;
+			    }
+			}
+		    }
+		} else {
+		    sh->pg[npg].prev_id = -1;
+		}
+	    }
+	    tag = tag->next;
+	}
+
+	if (sh->pg[npg].name) {
+	    khint_t k;
+	    int r;
+	    k = kh_put(m_s2i, sh->pg_hash, sh->pg[npg].name, &r);
+	    if (-1 == r) return -1;
+	    kh_val(sh->pg_hash, k) = npg;
+	}
+
+	/* Add to npg_end[] array. Remove later if we find a PP line */
+	if (sh->npg_end >= sh->npg_end_alloc) {
+	    sh->npg_end_alloc = sh->npg_end_alloc
+		? sh->npg_end_alloc*2
+		: 4;
+	    sh->pg_end = realloc(sh->pg_end,
+				 sh->npg_end_alloc * sizeof(int));
+	    if (!sh->pg_end)
+		return -1;
+	}
+	sh->pg_end[sh->npg_end++] = npg;
+
+	sh->npg++;
+    }
+
+    return 0;
+}
+
+/*
+ * Appends a formatted line to an existing SAM header.
+ * Line is a full SAM header record, eg "@SQ\tSN:foo\tLN:100", with
+ * optional new-line. If it contains more than 1 line then multiple lines
+ * will be added in order.
+ *
+ * Len is the length of the text data, or 0 if unknown (in which case
+ * it should be null terminated).
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int sam_hdr_add_lines(SAM_hdr *sh, const char *lines, int len) {
+    int i, lno = 1, text_offset;
+    char *hdr;
+
+    if (!len)
+	len = strlen(lines);
+
+    text_offset = ks_len(&sh->text);
+    if (EOF == kputsn(lines, len, &sh->text))
+	return -1;
+    hdr = ks_str(&sh->text) + text_offset;
+
+    for (i = 0; i < len; i++) {
+	khint32_t type;
+	khint_t k;
+
+	int l_start = i, new;
+	SAM_hdr_type *h_type;
+	SAM_hdr_tag *h_tag, *last;
+
+	if (hdr[i] != '@') {
+	    int j;
+	    for (j = i; j < len && hdr[j] != '\n'; j++)
+		;
+	    sam_hdr_error("Header line does not start with '@'",
+			  &hdr[l_start], len - l_start, lno);
+	    return -1;
+	}
+
+	type = (hdr[i+1]<<8) | hdr[i+2];
+	if (hdr[i+1] < 'A' || hdr[i+1] > 'z' ||
+	    hdr[i+2] < 'A' || hdr[i+2] > 'z') {
+	    sam_hdr_error("Header line does not have a two character key",
+			  &hdr[l_start], len - l_start, lno);
+	    return -1;
+	}
+
+	i += 3;
+	if (hdr[i] == '\n')
+	    continue;
+
+	// Add the header line type
+	if (!(h_type = pool_alloc(sh->type_pool)))
+	    return -1;
+	if (-1 == (k = kh_put(sam_hdr, sh->h, type, &new)))
+	    return -1;
+
+	// Form the ring, either with self or other lines of this type
+	if (!new) {
+	    SAM_hdr_type *t = kh_val(sh->h, k), *p;
+	    p = t->prev;
+	    
+	    assert(p->next = t);
+	    p->next = h_type;
+	    h_type->prev = p;
+
+	    t->prev = h_type;
+	    h_type->next = t;
+	    h_type->order = p->order+1;
+	} else {
+	    kh_val(sh->h, k) = h_type;
+	    h_type->prev = h_type->next = h_type;
+	    h_type->order = 0;
+	}
+
+	// Parse the tags on this line
+	last = NULL;
+	if ((type>>8) == 'C' && (type&0xff) == 'O') {
+	    int j;
+	    if (hdr[i] != '\t') {
+		sam_hdr_error("Missing tab",
+			      &hdr[l_start], len - l_start, lno);
+		return -1;
+	    }
+
+	    for (j = ++i; j < len && hdr[j] != '\n'; j++)
+		;
+
+	    if (!(h_type->tag = h_tag = pool_alloc(sh->tag_pool)))
+		return -1;
+	    h_tag->str = string_ndup(sh->str_pool, &hdr[i], j-i);
+	    h_tag->len = j-i;
+	    h_tag->next = NULL;
+	    if (!h_tag->str)
+		return -1;
+
+	    i = j;
+
+	} else {
+	    do {
+		int j;
+		if (hdr[i] != '\t') {
+		    sam_hdr_error("Missing tab",
+				  &hdr[l_start], len - l_start, lno);
+		    return -1;
+		}
+
+		for (j = ++i; j < len && hdr[j] != '\n' && hdr[j] != '\t'; j++)
+		    ;
+	    
+		if (!(h_tag = pool_alloc(sh->tag_pool)))
+		    return -1;
+		h_tag->str = string_ndup(sh->str_pool, &hdr[i], j-i);
+		h_tag->len = j-i;
+		h_tag->next = NULL;
+		if (!h_tag->str)
+		    return -1;
+
+		if (h_tag->len < 3 || h_tag->str[2] != ':') {
+		    sam_hdr_error("Malformed key:value pair",
+				  &hdr[l_start], len - l_start, lno);
+		    return -1;
+		}
+	    
+		if (last)
+		    last->next = h_tag;
+		else
+		    h_type->tag = h_tag;
+
+		last = h_tag;
+		i = j;
+	    } while (i < len && hdr[i] != '\n');
+	}
+
+	/* Update RG/SQ hashes */
+	if (-1 == sam_hdr_update_hashes(sh, type, h_type))
+	    return -1;
+    }
+
+    return 0;
+}
+
+/*
+ * Adds a single line to a SAM header.
+ * Specify type and one or more key,value pairs, ending with the NULL key.
+ * Eg. sam_hdr_add(h, "SQ", "ID", "foo", "LN", "100", NULL).
+ *
+ * Returns index for specific entry on success (eg 2nd SQ, 4th RG)
+ *        -1 on failure
+ */
+int sam_hdr_add(SAM_hdr *sh, const char *type, ...) {
+    va_list args;
+    va_start(args, type);
+    return sam_hdr_vadd(sh, type, args, NULL);
+}
+
+int sam_hdr_vadd(SAM_hdr *sh, const char *type, va_list ap, ...) {
+    va_list args;
+    SAM_hdr_type *h_type;
+    SAM_hdr_tag *h_tag, *last;
+    int new;
+    khint32_t type_i = (type[0]<<8) | type[1], k;
+
+#if defined(HAVE_VA_COPY)
+    va_list ap_local;
+#endif
+
+    if (EOF == kputc_('@', &sh->text))
+	return -1;
+    if (EOF == kputsn(type, 2, &sh->text))
+	return -1;
+
+    if (!(h_type = pool_alloc(sh->type_pool)))
+	return -1;
+    if (-1 == (k = kh_put(sam_hdr, sh->h, type_i, &new)))
+	return -1;
+    kh_val(sh->h, k) = h_type;
+
+    // Form the ring, either with self or other lines of this type
+    if (!new) {
+	SAM_hdr_type *t = kh_val(sh->h, k), *p;
+	p = t->prev;
+	    
+	assert(p->next = t);
+	p->next = h_type;
+	h_type->prev = p;
+
+	t->prev = h_type;
+	h_type->next = t;
+	h_type->order = p->order + 1;
+    } else {
+	h_type->prev = h_type->next = h_type;
+	h_type->order = 0;
+    }
+
+    last = NULL;
+
+    // Any ... varargs
+    va_start(args, ap);
+    for (;;) {
+	char *k, *v;
+	int idx;
+	
+	if (!(k = (char *)va_arg(args, char *)))
+	    break;
+	v = va_arg(args, char *);
+
+	if (EOF == kputc_('\t', &sh->text))
+	    return -1;
+
+	if (!(h_tag = pool_alloc(sh->tag_pool)))
+	    return -1;
+	idx = ks_len(&sh->text);
+	
+	if (EOF == kputs(k, &sh->text))
+	    return -1;
+	if (EOF == kputc_(':', &sh->text))
+	    return -1;
+	if (EOF == kputs(v, &sh->text))
+	    return -1;
+
+	h_tag->len = ks_len(&sh->text) - idx;
+	h_tag->str = string_ndup(sh->str_pool,
+				 ks_str(&sh->text) + idx,
+				 h_tag->len);
+	h_tag->next = NULL;
+	if (!h_tag->str)
+	    return -1;
+
+	if (last)
+	    last->next = h_tag;
+	else
+	    h_type->tag = h_tag;
+	
+	last = h_tag;
+    }
+    va_end(args);
+
+#if defined(HAVE_VA_COPY)
+    va_copy(ap_local, ap);
+#   define ap ap_local
+#endif
+
+    // Plus the specified va_list params
+    for (;;) {
+	char *k, *v;
+	int idx;
+	
+	if (!(k = (char *)va_arg(ap, char *)))
+	    break;
+	v = va_arg(ap, char *);
+
+	if (EOF == kputc_('\t', &sh->text))
+	    return -1;
+
+	if (!(h_tag = pool_alloc(sh->tag_pool)))
+	    return -1;
+	idx = ks_len(&sh->text);
+	
+	if (EOF == kputs(k, &sh->text))
+	    return -1;
+	if (EOF == kputc_(':', &sh->text))
+	    return -1;
+	if (EOF == kputs(v, &sh->text))
+	    return -1;
+
+	h_tag->len = ks_len(&sh->text) - idx;
+	h_tag->str = string_ndup(sh->str_pool,
+				 ks_str(&sh->text) + idx,
+				 h_tag->len);
+	h_tag->next = NULL;
+	if (!h_tag->str)
+	    return -1;
+
+	if (last)
+	    last->next = h_tag;
+	else
+	    h_type->tag = h_tag;
+	
+	last = h_tag;
+    }
+    va_end(ap);
+
+    if (EOF == kputc('\n', &sh->text))
+	return -1;
+
+    int itype = (type[0]<<8) | type[1];
+    if (-1 == sam_hdr_update_hashes(sh, itype, h_type))
+	return -1;
+
+    return h_type->order;
+}
+
+/*
+ * Returns the first header item matching 'type'. If ID is non-NULL it checks
+ * for the tag ID: and compares against the specified ID.
+ *
+ * Returns NULL if no type/ID is found
+ */
+SAM_hdr_type *sam_hdr_find(SAM_hdr *hdr, char *type,
+			   char *ID_key, char *ID_value) {
+    SAM_hdr_type *t1, *t2;
+    int itype = (type[0]<<8)|(type[1]);
+    khint_t k;
+
+    /* Special case for types we have prebuilt hashes on */
+    if (ID_key) {
+	if (type[0]   == 'S' && type[1]   == 'Q' &&
+	    ID_key[0] == 'S' && ID_key[1] == 'N') {
+	    k = kh_get(m_s2i, hdr->ref_hash, ID_value);
+	    return k != kh_end(hdr->ref_hash)
+		? hdr->ref[kh_val(hdr->ref_hash, k)].ty
+		: NULL;
+	}
+
+	if (type[0]   == 'R' && type[1]   == 'G' &&
+	    ID_key[0] == 'I' && ID_key[1] == 'D') {
+	    k = kh_get(m_s2i, hdr->rg_hash, ID_value);
+	    return k != kh_end(hdr->rg_hash)
+		? hdr->rg[kh_val(hdr->rg_hash, k)].ty
+		: NULL;
+	}
+
+	if (type[0]   == 'P' && type[1]   == 'G' &&
+	    ID_key[0] == 'I' && ID_key[1] == 'D') {
+	    k = kh_get(m_s2i, hdr->pg_hash, ID_value);
+	    return k != kh_end(hdr->pg_hash)
+		? hdr->pg[kh_val(hdr->pg_hash, k)].ty
+		: NULL;
+	}
+    }
+
+    k = kh_get(sam_hdr, hdr->h, itype);
+    if (k == kh_end(hdr->h))
+	return NULL;
+    
+    if (!ID_key)
+	return kh_val(hdr->h, k);
+
+    t1 = t2 = kh_val(hdr->h, k);
+    do {
+	SAM_hdr_tag *tag;
+	for (tag = t1->tag; tag; tag = tag->next) {
+	    if (tag->str[0] == ID_key[0] && tag->str[1] == ID_key[1]) {
+		char *cp1 = tag->str+3;
+		char *cp2 = ID_value;
+		while (*cp1 && *cp1 == *cp2)
+		    cp1++, cp2++;
+		if (*cp2 || *cp1)
+		    continue;
+		return t1;
+	    }
+	}
+	t1 = t1->next;
+    } while (t1 != t2);
+
+    return NULL;
+}
+
+/*
+ * As per SAM_hdr_type, but returns a complete line of formatted text
+ * for a specific head type/ID combination. If ID is NULL then it returns
+ * the first line of the specified type.
+ *
+ * The returned string is malloced and should be freed by the calling
+ * function with free().
+ *
+ * Returns NULL if no type/ID is found.
+ */
+char *sam_hdr_find_line(SAM_hdr *hdr, char *type,
+			char *ID_key, char *ID_value) {
+    SAM_hdr_type *ty = sam_hdr_find(hdr, type, ID_key, ID_value);
+    kstring_t ks = KS_INITIALIZER;
+    SAM_hdr_tag *tag;
+    int r = 0;
+
+    if (!ty)
+	return NULL;
+
+    // Paste together the line from the hashed copy
+    r |= (kputc_('@', &ks) == EOF);
+    r |= (kputs(type, &ks) == EOF);
+    for (tag = ty->tag; tag; tag = tag->next) {
+	r |= (kputc_('\t', &ks) == EOF);
+	r |= (kputsn(tag->str, tag->len, &ks) == EOF);
+    }
+
+    if (r) {
+	KS_FREE(&ks);
+	return NULL;
+    }
+
+    return ks_str(&ks);
+}
+
+
+/*
+ * Looks for a specific key in a single sam header line.
+ * If prev is non-NULL it also fills this out with the previous tag, to
+ * permit use in key removal. *prev is set to NULL when the tag is the first
+ * key in the list. When a tag isn't found, prev (if non NULL) will be the last
+ * tag in the existing list.
+ *
+ * Returns the tag pointer on success
+ *         NULL on failure
+ */
+SAM_hdr_tag *sam_hdr_find_key(SAM_hdr *sh,
+			      SAM_hdr_type *type,
+			      char *key,
+			      SAM_hdr_tag **prev) {
+    SAM_hdr_tag *tag, *p = NULL;
+
+    for (tag = type->tag; tag; p = tag, tag = tag->next) {
+	if (tag->str[0] == key[0] && tag->str[1] == key[1]) {
+	    if (prev)
+		*prev = p;
+	    return tag;
+	}
+    }
+
+    if (prev)
+	*prev = p;
+
+    return NULL;
+}
+
+
+/*
+ * Adds or updates tag key,value pairs in a header line.
+ * Eg for adding M5 tags to @SQ lines or updating sort order for the
+ * @HD line (although use the sam_hdr_sort_order() function for
+ * HD manipulation, which is a wrapper around this funuction).
+ *
+ * Specify multiple key,value pairs ending in NULL.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int sam_hdr_update(SAM_hdr *hdr, SAM_hdr_type *type, ...) {
+    va_list ap;
+
+    va_start(ap, type);
+    
+    for (;;) {
+	char *k, *v;
+	int idx;
+	SAM_hdr_tag *tag, *prev;
+
+	if (!(k = (char *)va_arg(ap, char *)))
+	    break;
+	v = va_arg(ap, char *);
+
+	tag = sam_hdr_find_key(hdr, type, k, &prev);
+	if (!tag) {
+	    if (!(tag = pool_alloc(hdr->tag_pool)))
+		return -1;
+	    if (prev)
+		prev->next = tag;
+	    else
+		type->tag = tag;
+
+	    tag->next = NULL;
+	}
+
+	idx = ks_len(&hdr->text);
+	if (ksprintf(&hdr->text, "%2.2s:%s", k, v) < 0)
+	    return -1;
+	tag->len = ks_len(&hdr->text) - idx;
+	tag->str = string_ndup(hdr->str_pool,
+			       ks_str(&hdr->text) + idx,
+			       tag->len);
+	if (!tag->str)
+	    return -1;
+    }
+
+    va_end(ap);
+
+    return 0;
+}
+
+#define K(a) (((a)[0]<<8)|((a)[1]))
+
+/*
+ * Reconstructs the kstring from the header hash table.
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int sam_hdr_rebuild(SAM_hdr *hdr) {
+    /* Order: HD then others */
+    kstring_t ks = KS_INITIALIZER;
+    khint_t k;
+
+
+    k = kh_get(sam_hdr, hdr->h, K("HD"));
+    if (k != kh_end(hdr->h)) {
+	SAM_hdr_type *ty = kh_val(hdr->h, k);
+	SAM_hdr_tag *tag;
+	if (EOF == kputs("@HD", &ks))
+	    return -1;
+	for (tag = ty->tag; tag; tag = tag->next) {
+	    if (EOF == kputc_('\t', &ks))
+		return -1;
+	    if (EOF == kputsn_(tag->str, tag->len, &ks))
+		return -1;
+	}
+	if (EOF == kputc('\n', &ks))
+	    return -1;
+    }
+
+    for (k = kh_begin(hdr->h); k != kh_end(hdr->h); k++) {
+	SAM_hdr_type *t1, *t2;
+
+	if (!kh_exist(hdr->h, k))
+	    continue;
+
+	if (kh_key(hdr->h, k) == K("HD"))
+	    continue;
+
+	t1 = t2 = kh_val(hdr->h, k);
+	do {
+	    SAM_hdr_tag *tag;
+	    char c[2];
+
+	    if (EOF == kputc_('@', &ks))
+		return -1;
+	    c[0] = kh_key(hdr->h, k)>>8;
+	    c[1] = kh_key(hdr->h, k)&0xff;
+	    if (EOF == kputsn_(c, 2, &ks))
+		return -1;
+	    for (tag = t1->tag; tag; tag=tag->next) {
+		if (EOF == kputc_('\t', &ks))
+		    return -1;
+		if (EOF == kputsn_(tag->str, tag->len, &ks))
+		    return -1;
+	    }
+	    if (EOF == kputc('\n', &ks))
+		return -1;
+	    t1 = t1->next;
+	} while (t1 != t2);
+    }
+
+    if (ks_str(&hdr->text))
+	KS_FREE(&hdr->text);
+
+    hdr->text = ks;
+
+    return 0;
+}
+
+
+/*
+ * Creates an empty SAM header, ready to be populated.
+ * 
+ * Returns a SAM_hdr struct on success (free with sam_hdr_free())
+ *         NULL on failure
+ */
+SAM_hdr *sam_hdr_new() {
+    SAM_hdr *sh = calloc(1, sizeof(*sh));
+
+    if (!sh)
+	return NULL;
+    
+    sh->h = kh_init(sam_hdr);
+    if (!sh->h)
+	goto err;
+
+    sh->ID_cnt = 1;
+    sh->ref_count = 1;
+
+    sh->nref = 0;
+    sh->ref  = NULL;
+    if (!(sh->ref_hash = kh_init(m_s2i)))
+	goto err;
+
+    sh->nrg = 0;
+    sh->rg  = NULL;
+    if (!(sh->rg_hash = kh_init(m_s2i)))
+	goto err;
+
+    sh->npg = 0;
+    sh->pg  = NULL;
+    sh->npg_end = sh->npg_end_alloc = 0;
+    sh->pg_end = NULL;
+    if (!(sh->pg_hash = kh_init(m_s2i)))
+	goto err;
+
+    KS_INIT(&sh->text);
+
+    if (!(sh->tag_pool = pool_create(sizeof(SAM_hdr_tag))))
+	goto err;
+
+    if (!(sh->type_pool = pool_create(sizeof(SAM_hdr_type))))
+	goto err;
+
+    if (!(sh->str_pool = string_pool_create(8192)))
+	goto err;
+
+    return sh;
+
+ err:
+    if (sh->h)
+	kh_destroy(sam_hdr, sh->h);
+
+    if (sh->tag_pool)
+	pool_destroy(sh->tag_pool);
+
+    if (sh->type_pool)
+	pool_destroy(sh->type_pool);
+
+    if (sh->str_pool)
+	string_pool_destroy(sh->str_pool);
+
+    free(sh);
+
+    return NULL;
+}
+
+
+/*
+ * Tokenises a SAM header into a hash table.
+ * Also extracts a few bits on specific data types, such as @RG lines.
+ *
+ * Returns a SAM_hdr struct on success (free with sam_hdr_free())
+ *         NULL on failure
+ */
+SAM_hdr *sam_hdr_parse(const char *hdr, int len) {
+    /* Make an empty SAM_hdr */
+    SAM_hdr *sh;
+    
+    sh = sam_hdr_new();
+    if (NULL == sh) return NULL;
+
+    if (NULL == hdr) return sh; // empty header is permitted
+
+    /* Parse the header, line by line */
+    if (-1 == sam_hdr_add_lines(sh, hdr, len)) {
+	sam_hdr_free(sh);
+	return NULL;
+    }
+
+    //sam_hdr_dump(sh);
+    //sam_hdr_add(sh, "RG", "ID", "foo", "SM", "bar", NULL);
+    //sam_hdr_rebuild(sh);
+    //printf(">>%s<<", ks_str(sh->text));
+
+    //parse_references(sh);
+    //parse_read_groups(sh);
+
+    sam_hdr_link_pg(sh);
+    //sam_hdr_dump(sh);
+
+    return sh;
+}
+
+/*
+ * Produces a duplicate copy of hdr and returns it.
+ * Returns NULL on failure
+ */
+SAM_hdr *sam_hdr_dup(SAM_hdr *hdr) {
+    if (-1 == sam_hdr_rebuild(hdr))
+	return NULL;
+
+    return sam_hdr_parse(sam_hdr_str(hdr), sam_hdr_length(hdr));
+}
+
+/*! Increments a reference count on hdr.
+ *
+ * This permits multiple files to share the same header, all calling
+ * sam_hdr_free when done, without causing errors for other open  files.
+ */
+void sam_hdr_incr_ref(SAM_hdr *hdr) {
+    hdr->ref_count++;
+}
+
+/*! Increments a reference count on hdr.
+ *
+ * This permits multiple files to share the same header, all calling
+ * sam_hdr_free when done, without causing errors for other open  files.
+ *
+ * If the reference count hits zero then the header is automatically
+ * freed. This makes it a synonym for sam_hdr_free().
+ */
+void sam_hdr_decr_ref(SAM_hdr *hdr) {
+    sam_hdr_free(hdr);
+}
+
+/*! Deallocates all storage used by a SAM_hdr struct.
+ *
+ * This also decrements the header reference count. If after decrementing 
+ * it is still non-zero then the header is assumed to be in use by another
+ * caller and the free is not done.
+ *
+ * This is a synonym for sam_hdr_dec_ref().
+ */
+void sam_hdr_free(SAM_hdr *hdr) {
+    if (!hdr)
+	return;
+
+    if (--hdr->ref_count > 0)
+	return;
+
+    if (ks_str(&hdr->text))
+	KS_FREE(&hdr->text);
+
+    if (hdr->h)
+	kh_destroy(sam_hdr, hdr->h);
+
+    if (hdr->ref_hash)
+	kh_destroy(m_s2i, hdr->ref_hash);
+
+    if (hdr->ref) {
+	int i;
+	for (i = 0; i < hdr->nref; i++)
+	    if (hdr->ref[i].name)
+		free(hdr->ref[i].name);
+	free(hdr->ref);
+    }
+
+    if (hdr->rg_hash)
+	kh_destroy(m_s2i, hdr->rg_hash);
+
+    if (hdr->rg) {
+	int i;
+	for (i = 0; i < hdr->nrg; i++)
+	    if (hdr->rg[i].name)
+		free(hdr->rg[i].name);
+	free(hdr->rg);
+    }
+
+    if (hdr->pg_hash)
+	kh_destroy(m_s2i, hdr->pg_hash);
+
+    if (hdr->pg) {
+	int i;
+	for (i = 0; i < hdr->npg; i++)
+	    if (hdr->pg[i].name)
+		free(hdr->pg[i].name);
+	free(hdr->pg);
+    }
+
+    if (hdr->pg_end)
+	free(hdr->pg_end);
+
+    if (hdr->type_pool)
+	pool_destroy(hdr->type_pool);
+
+    if (hdr->tag_pool)
+	pool_destroy(hdr->tag_pool);
+
+    if (hdr->str_pool)
+	string_pool_destroy(hdr->str_pool);
+
+    free(hdr);
+}
+
+int sam_hdr_length(SAM_hdr *hdr) {
+    return ks_len(&hdr->text);
+}
+
+char *sam_hdr_str(SAM_hdr *hdr) {
+    return ks_str(&hdr->text);
+}
+
+/*
+ * Looks up a reference sequence by name and returns the numerical ID.
+ * Returns -1 if unknown reference.
+ */
+int sam_hdr_name2ref(SAM_hdr *hdr, const char *ref) {
+    khint_t k = kh_get(m_s2i, hdr->ref_hash, ref);
+    return k == kh_end(hdr->ref_hash) ? -1 : kh_val(hdr->ref_hash, k);
+}
+
+/*
+ * Looks up a read-group by name and returns a pointer to the start of the
+ * associated tag list.
+ *
+ * Returns NULL on failure
+ */
+SAM_RG *sam_hdr_find_rg(SAM_hdr *hdr, const char *rg) {
+    khint_t k = kh_get(m_s2i, hdr->rg_hash, rg);
+    return k == kh_end(hdr->rg_hash)
+	? NULL
+	: &hdr->rg[kh_val(hdr->rg_hash, k)];
+}
+
+
+/*
+ * Fixes any PP links in @PG headers.
+ * If the entries are in order then this doesn't need doing, but incase
+ * our header is out of order this goes through the sh->pg[] array
+ * setting the prev_id field.
+ *
+ * Note we can have multiple complete chains. This code should identify the
+ * tails of these chains as these are the entries we have to link to in
+ * subsequent PP records.
+ *
+ * Returns 0 on sucess
+ *        -1 on failure (indicating broken PG/PP records)
+ */
+int sam_hdr_link_pg(SAM_hdr *hdr) {
+    int i, j, ret = 0;
+
+    hdr->npg_end_alloc = hdr->npg;
+    hdr->pg_end = realloc(hdr->pg_end, hdr->npg * sizeof(*hdr->pg_end));
+    if (!hdr->pg_end)
+	return -1;
+
+    for (i = 0; i < hdr->npg; i++)
+	hdr->pg_end[i] = i;
+
+    for (i = 0; i < hdr->npg; i++) {
+	khint_t k;
+	SAM_hdr_tag *tag;
+	char tmp;
+
+	for (tag = hdr->pg[i].tag; tag; tag = tag->next) {
+	    if (tag->str[0] == 'P' && tag->str[1] == 'P')
+		break;
+	}
+	if (!tag) {
+	    /* Chain start points */
+	    continue;
+	}
+
+	tmp = tag->str[tag->len]; tag->str[tag->len] = 0;
+	k = kh_get(m_s2i, hdr->pg_hash, tag->str+3);
+	tag->str[tag->len] = tmp;
+
+	if (k == kh_end(hdr->pg_hash)) {
+	    ret = -1;
+	    continue;
+	}
+
+	hdr->pg[i].prev_id = hdr->pg[kh_val(hdr->pg_hash, k)].id;
+	hdr->pg_end[kh_val(hdr->pg_hash, k)] = -1;
+    }
+
+    for (i = j = 0; i < hdr->npg; i++) {
+	if (hdr->pg_end[i] != -1)
+	    hdr->pg_end[j++] = hdr->pg_end[i];
+    }
+    hdr->npg_end = j;
+
+    return ret;
+}
+
+/*
+ * Returns a unique ID from a base name.
+ *
+ * The value returned is valid until the next call to
+ * this function.
+ */
+const char *sam_hdr_PG_ID(SAM_hdr *sh, const char *name) {
+    khint_t k = kh_get(m_s2i, sh->pg_hash, name);
+    if (k == kh_end(sh->pg_hash))
+	return name;
+
+    do {
+	sprintf(sh->ID_buf, "%.1000s.%d", name, sh->ID_cnt++);
+	k = kh_get(m_s2i, sh->pg_hash, sh->ID_buf);
+    } while (k == kh_end(sh->pg_hash));
+
+    return sh->ID_buf;
+}
+
+/*
+ * Add an @PG line.
+ *
+ * If we wish complete control over this use sam_hdr_add() directly. This
+ * function uses that, but attempts to do a lot of tedious house work for
+ * you too.
+ *
+ * - It will generate a suitable ID if the supplied one clashes.
+ * - It will generate multiple @PG records if we have multiple PG chains.
+ *
+ * Call it as per sam_hdr_add() with a series of key,value pairs ending
+ * in NULL.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int sam_hdr_add_PG(SAM_hdr *sh, const char *name, ...) {
+    va_list args;
+    va_start(args, name);
+
+    if (sh->npg_end) {
+	/* Copy ends array to avoid us looping while modifying it */
+	int *end = malloc(sh->npg_end * sizeof(int));
+	int i, nends = sh->npg_end;
+
+	if (!end)
+	    return -1;
+
+	memcpy(end, sh->pg_end, nends * sizeof(*end));
+
+	for (i = 0; i < nends; i++) {
+	    if (-1 == sam_hdr_vadd(sh, "PG", args,
+				   "ID", sam_hdr_PG_ID(sh, name),
+				   "PN", name,
+				   "PP", sh->pg[end[i]].name,
+				   NULL)) {
+		free(end);
+		return  -1;
+	    }
+	}
+
+	free(end);
+    } else {
+	if (-1 == sam_hdr_vadd(sh, "PG", args,
+			       "ID", sam_hdr_PG_ID(sh, name),
+			       "PN", name,
+			       NULL))
+	    return -1;
+    }
+
+    //sam_hdr_dump(sh);
+
+    return 0;
+}
+
+/*
+ * A function to help with construction of CL tags in @PG records.
+ * Takes an argc, argv pair and returns a single space-separated string.
+ * This string should be deallocated by the calling function.
+ * 
+ * Returns malloced char * on success
+ *         NULL on failure
+ */
+char *stringify_argv(int argc, char *argv[]) {
+    char *str, *cp;
+    size_t nbytes = 1;
+    int i, j;
+
+    /* Allocate */
+    for (i = 0; i < argc; i++) {
+	nbytes += strlen(argv[i]) + 1;
+    }
+    if (!(str = malloc(nbytes)))
+	return NULL;
+
+    /* Copy */
+    cp = str;
+    for (i = 0; i < argc; i++) {
+	j = 0;
+	while (argv[i][j]) {
+	    if (argv[i][j] == '\t')
+		*cp++ = ' ';
+	    else
+		*cp++ = argv[i][j];
+	    j++;
+	}
+	*cp++ = ' ';
+    }
+    *cp++ = 0;
+
+    return str;
+}
diff --git a/htslib/cram/sam_header.h b/htslib/cram/sam_header.h
new file mode 100644
index 0000000..b9ea298
--- /dev/null
+++ b/htslib/cram/sam_header.h
@@ -0,0 +1,452 @@
+/*
+Copyright (c) 2013-2014 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*! \file
+ * SAM header parsing.
+ *
+ * These functions can be shared between SAM, BAM and CRAM file
+ * formats as all three internally use the same string encoding for
+ * header fields.
+ *
+ * Consider using the scram() generic API and calling
+ * scram_get_header() to obtain the format-specific pointer to the
+ * SAM_hdr struct.
+ */ 
+
+/*
+ * TODO.
+ *
+ * - Sort order (parse to struct, enum type, updating funcs)
+ * - Removal of lines.
+ * - Updating of lines
+ */
+
+#ifndef _SAM_HDR_H_
+#define _SAM_HDR_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdarg.h>
+
+#include "cram/string_alloc.h"
+#include "cram/pooled_alloc.h"
+
+#include "htslib/khash.h"
+#include "htslib/kstring.h"
+
+// For structure assignment. Eg kstring_t s = KS_INITIALIZER;
+#define KS_INITIALIZER {0,0,0}
+
+// For initialisation elsewhere. Eg KS_INIT(x->str);
+#define KS_INIT(ks) ((ks)->l = 0, (ks)->m = 0, (ks)->s = NULL)
+
+// Frees the string subfield only. Assumes 's' itself is static.
+#define KS_FREE(ks) do { if ((ks)->s) free((ks)->s); } while(0)
+
+/*
+ * Proposed new SAM header parsing
+
+1 @SQ ID:foo LN:100
+2 @SQ ID:bar LN:200
+3 @SQ ID:ram LN:300 UR:xyz
+4 @RG ID:r ...
+5 @RG ID:s ...
+
+Hash table for 2-char @keys without dup entries.
+If dup lines, we form a circular linked list. Ie hash keys = {RG, SQ}.
+
+HASH("SQ")--\
+            |
+    (3) <-> 1 <-> 2 <-> 3 <-> (1)
+
+HASH("RG")--\
+            |
+    (5) <-> 4 <-> 5 <-> (4)
+
+Items stored in the hash values also form their own linked lists:
+Ie SQ->ID(foo)->LN(100)
+   SQ->ID(bar)->LN(200)
+   SQ->ID(ram)->LN(300)->UR(xyz)
+   RG->ID(r)
+ */
+
+/*! A single key:value pair on a header line
+ *
+ * These form a linked list and hold strings. The strings are
+ * allocated from a string_alloc_t pool referenced in the master
+ * SAM_hdr structure. Do not attempt to free, malloc or manipulate
+ * these strings directly.
+ */
+typedef struct SAM_hdr_tag_s {
+    struct SAM_hdr_tag_s *next;
+    char *str;
+    int   len;
+} SAM_hdr_tag;
+
+/*! The parsed version of the SAM header string.
+ * 
+ * Each header type (SQ, RG, HD, etc) points to its own SAM_hdr_type
+ * struct via the main hash table h in the SAM_hdr struct.
+ *
+ * These in turn consist of circular bi-directional linked lists (ie
+ * rings) to hold the multiple instances of the same header type
+ * code. For example if we have 5 \@SQ lines the primary hash table
+ * will key on \@SQ pointing to the first SAM_hdr_type and that in turn
+ * will be part of a ring of 5 elements.
+ *
+ * For each SAM_hdr_type structure we also point to a SAM_hdr_tag
+ * structure which holds the tokenised attributes; the tab separated
+ * key:value pairs per line.
+ */
+typedef struct SAM_hdr_item_s {
+    struct SAM_hdr_item_s *next; // cirular
+    struct SAM_hdr_item_s *prev;
+    SAM_hdr_tag *tag;            // first tag
+    int order;                   // 0 upwards
+} SAM_hdr_type;
+
+/*! Parsed \@SQ lines */
+typedef struct {
+    char *name;
+    uint32_t len;
+    SAM_hdr_type *ty;
+    SAM_hdr_tag  *tag;
+} SAM_SQ;
+
+/*! Parsed \@RG lines */
+typedef struct {
+    char *name;
+    SAM_hdr_type *ty;
+    SAM_hdr_tag  *tag;
+    int name_len;
+    int id;           // numerical ID
+} SAM_RG;
+
+/*! Parsed \@PG lines */
+typedef struct {
+    char *name;
+    SAM_hdr_type *ty;
+    SAM_hdr_tag  *tag;
+    int name_len;
+    int id;           // numerical ID
+    int prev_id;      // -1 if none
+} SAM_PG;
+
+KHASH_MAP_INIT_INT(sam_hdr, SAM_hdr_type*)
+KHASH_MAP_INIT_STR(m_s2i, int)
+
+/*! Primary structure for header manipulation
+ *
+ * The initial header text is held in the text kstring_t, but is also
+ * parsed out into SQ, RG and PG arrays. These have a hash table
+ * associated with each to allow lookup by ID or SN fields instead of
+ * their numeric array indices. Additionally PG has an array to hold
+ * the linked list start points (the last in a PP chain).
+ *
+ * Use the appropriate sam_hdr_* functions to edit the header, and 
+ * call sam_hdr_rebuild() any time the textual form needs to be
+ * updated again.
+ */
+typedef struct {
+    kstring_t text;           //!< concatenated text, indexed by SAM_hdr_tag
+    khash_t(sam_hdr) *h;
+    string_alloc_t *str_pool; //!< Pool of SAM_hdr_tag->str strings
+    pool_alloc_t   *type_pool;//!< Pool of SAM_hdr_type structs
+    pool_alloc_t   *tag_pool; //!< Pool of SAM_hdr_tag structs
+
+    // @SQ lines / references
+    int nref;                 //!< Number of \@SQ lines
+    SAM_SQ *ref;              //!< Array of parsed \@SQ lines
+    khash_t(m_s2i) *ref_hash; //!< Maps SQ SN field to sq[] index
+
+    // @RG lines / read-groups
+    int nrg;                  //!< Number of \@RG lines
+    SAM_RG *rg;               //!< Array of parsed \@RG lines
+    khash_t(m_s2i) *rg_hash;  //!< Maps RG ID field to rg[] index
+
+    // @PG lines / programs
+    int npg;                  //!< Number of \@PG lines
+    int npg_end;              //!< Number of terminating \@PG lines
+    int npg_end_alloc;        //!< Size of pg_end field
+    SAM_PG *pg;		      //!< Array of parsed \@PG lines
+    khash_t(m_s2i) *pg_hash;  //!< Maps PG ID field to pg[] index
+    int *pg_end;              //!< \@PG chain termination IDs
+
+    // @cond internal
+    char ID_buf[1024];  // temporary buffer
+    int ID_cnt;
+    int ref_count;      // number of uses of this SAM_hdr
+    // @endcond
+} SAM_hdr;
+
+/*! Creates an empty SAM header, ready to be populated.
+ * 
+ * @return
+ * Returns a SAM_hdr struct on success (free with sam_hdr_free())
+ *         NULL on failure
+ */
+SAM_hdr *sam_hdr_new(void);
+
+/*! Tokenises a SAM header into a hash table.
+ *
+ * Also extracts a few bits on specific data types, such as @RG lines.
+ *
+ * @return
+ * Returns a SAM_hdr struct on success (free with sam_hdr_free());
+ *         NULL on failure
+ */
+#ifdef SAMTOOLS
+SAM_hdr *sam_hdr_parse_(const char *hdr, int len);
+#else
+SAM_hdr *sam_hdr_parse(const char *hdr, int len);
+#endif
+
+
+/*! Produces a duplicate copy of hdr and returns it.
+ * @return
+ * Returns NULL on failure
+ */
+SAM_hdr *sam_hdr_dup(SAM_hdr *hdr);
+
+
+/*! Increments a reference count on hdr.
+ *
+ * This permits multiple files to share the same header, all calling
+ * sam_hdr_free when done, without causing errors for other open  files.
+ */
+void sam_hdr_incr_ref(SAM_hdr *hdr);
+
+
+/*! Increments a reference count on hdr.
+ *
+ * This permits multiple files to share the same header, all calling
+ * sam_hdr_free when done, without causing errors for other open  files.
+ *
+ * If the reference count hits zero then the header is automatically
+ * freed. This makes it a synonym for sam_hdr_free().
+ */
+void sam_hdr_decr_ref(SAM_hdr *hdr);
+
+
+/*! Deallocates all storage used by a SAM_hdr struct.
+ *
+ * This also decrements the header reference count. If after decrementing 
+ * it is still non-zero then the header is assumed to be in use by another
+ * caller and the free is not done.
+ *
+ * This is a synonym for sam_hdr_dec_ref().
+ */
+void sam_hdr_free(SAM_hdr *hdr);
+
+/*! Returns the current length of the SAM_hdr in text form.
+ *
+ * Call sam_hdr_rebuild() first if editing has taken place.
+ */
+int sam_hdr_length(SAM_hdr *hdr);
+
+/*! Returns the string form of the SAM_hdr.
+ *
+ * Call sam_hdr_rebuild() first if editing has taken place.
+ */
+char *sam_hdr_str(SAM_hdr *hdr);
+
+/*! Appends a formatted line to an existing SAM header.
+ *
+ * Line is a full SAM header record, eg "@SQ\tSN:foo\tLN:100", with
+ * optional new-line. If it contains more than 1 line then multiple lines
+ * will be added in order.
+ *
+ * Len is the length of the text data, or 0 if unknown (in which case
+ * it should be null terminated).
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int sam_hdr_add_lines(SAM_hdr *sh, const char *lines, int len);
+
+/*! Adds a single line to a SAM header.
+ *
+ * Specify type and one or more key,value pairs, ending with the NULL key.
+ * Eg. sam_hdr_add(h, "SQ", "ID", "foo", "LN", "100", NULL).
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int sam_hdr_add(SAM_hdr *sh, const char *type, ...);
+
+/*! Adds a single line to a SAM header.
+ *
+ * This is much like sam_hdr_add() but with the additional va_list
+ * argument. This is followed by specifying type and one or more
+ * key,value pairs, ending with the NULL key.
+ *
+ * Eg. sam_hdr_vadd(h, "SQ", args, "ID", "foo", "LN", "100", NULL).
+ *
+ * The purpose of the additional va_list parameter is to permit other
+ * varargs functions to call this while including their own additional
+ * parameters; an example is in sam_hdr_add_PG().
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int sam_hdr_vadd(SAM_hdr *sh, const char *type, va_list ap, ...);
+
+/*!
+ * @return
+ * Returns the first header item matching 'type'. If ID is non-NULL it checks
+ * for the tag ID: and compares against the specified ID.
+ *
+ * Returns NULL if no type/ID is found
+ */
+SAM_hdr_type *sam_hdr_find(SAM_hdr *hdr, char *type,
+			   char *ID_key, char *ID_value);
+
+/*!
+ *
+ * As per SAM_hdr_type, but returns a complete line of formatted text
+ * for a specific head type/ID combination. If ID is NULL then it returns
+ * the first line of the specified type.
+ *
+ * The returned string is malloced and should be freed by the calling
+ * function with free().
+ *
+ * @return
+ * Returns NULL if no type/ID is found.
+ */
+char *sam_hdr_find_line(SAM_hdr *hdr, char *type,
+			char *ID_key, char *ID_value);
+
+/*! Looks for a specific key in a single sam header line.
+ *
+ * If prev is non-NULL it also fills this out with the previous tag, to
+ * permit use in key removal. *prev is set to NULL when the tag is the first
+ * key in the list. When a tag isn't found, prev (if non NULL) will be the last
+ * tag in the existing list.
+ *
+ * @return
+ * Returns the tag pointer on success;
+ *         NULL on failure
+ */
+SAM_hdr_tag *sam_hdr_find_key(SAM_hdr *sh,
+			      SAM_hdr_type *type,
+			      char *key,
+			      SAM_hdr_tag **prev);
+
+/*! Adds or updates tag key,value pairs in a header line.
+ *
+ * Eg for adding M5 tags to @SQ lines or updating sort order for the
+ * @HD line (although use the sam_hdr_sort_order() function for
+ * HD manipulation, which is a wrapper around this funuction).
+ *
+ * Specify multiple key,value pairs ending in NULL.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int sam_hdr_update(SAM_hdr *hdr, SAM_hdr_type *type, ...);
+
+/*! Reconstructs the kstring from the header hash table.
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int sam_hdr_rebuild(SAM_hdr *hdr);
+
+/*! Looks up a reference sequence by name and returns the numerical ID.
+ * @return
+ * Returns -1 if unknown reference.
+ */
+int sam_hdr_name2ref(SAM_hdr *hdr, const char *ref);
+
+/*! Looks up a read-group by name and returns a pointer to the start of the
+ * associated tag list.
+ *
+ * @return
+ * Returns NULL on failure
+ */
+SAM_RG *sam_hdr_find_rg(SAM_hdr *hdr, const char *rg);
+
+/*! Fixes any PP links in @PG headers.
+ *
+ * If the entries are in order then this doesn't need doing, but incase
+ * our header is out of order this goes through the sh->pg[] array
+ * setting the prev_id field.
+ *
+ * @return
+ * Returns 0 on sucess;
+ *        -1 on failure (indicating broken PG/PP records)
+ */
+int sam_hdr_link_pg(SAM_hdr *hdr);
+
+
+/*! Add an @PG line.
+ *
+ * If we wish complete control over this use sam_hdr_add() directly. This
+ * function uses that, but attempts to do a lot of tedious house work for
+ * you too.
+ *
+ * - It will generate a suitable ID if the supplied one clashes.
+ * - It will generate multiple @PG records if we have multiple PG chains.
+ *
+ * Call it as per sam_hdr_add() with a series of key,value pairs ending
+ * in NULL.
+ *
+ * @return
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int sam_hdr_add_PG(SAM_hdr *sh, const char *name, ...);
+
+/*!
+ * A function to help with construction of CL tags in @PG records.
+ * Takes an argc, argv pair and returns a single space-separated string.
+ * This string should be deallocated by the calling function.
+ * 
+ * @return
+ * Returns malloced char * on success;
+ *         NULL on failure
+ */
+char *stringify_argv(int argc, char *argv[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SAM_HDR_H_ */
diff --git a/htslib/cram/string_alloc.c b/htslib/cram/string_alloc.c
new file mode 100644
index 0000000..d543e14
--- /dev/null
+++ b/htslib/cram/string_alloc.c
@@ -0,0 +1,153 @@
+/*
+Copyright (c) 2010 Genome Research Ltd.
+Author: Andrew Whitwham <aw7 at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+/* 
+   A pooled string allocator intended to cut down on the
+   memory overhead of many small string allocations.
+   
+   Andrew Whitwham, September 2010.
+*/
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "string_alloc.h"
+
+#define MIN_STR_SIZE 1024
+
+
+/* creates the string pool. max_length is the initial size
+   a single string can be.  Tha max_length can grow as
+   needed */
+
+string_alloc_t *string_pool_create(size_t max_length) {
+    string_alloc_t *a_str;
+    
+    if (NULL == (a_str = (string_alloc_t *)malloc(sizeof(*a_str)))) {
+    	return NULL;
+    }
+    
+    if (max_length < MIN_STR_SIZE) max_length = MIN_STR_SIZE;
+    
+    a_str->nstrings    = 0;
+    a_str->max_length  = max_length;
+    a_str->strings     = NULL;
+    
+    return a_str;
+}
+
+
+/* internal function to do the actual memory allocation */
+
+static string_t *new_string_pool(string_alloc_t *a_str) {
+    string_t *str;
+    
+    str = realloc(a_str->strings, (a_str->nstrings + 1) * sizeof(*a_str->strings));
+    
+    if (NULL == str) return NULL;
+    
+    a_str->strings = str;
+    str = &a_str->strings[a_str->nstrings];
+    
+    str->str = malloc(a_str->max_length);;
+    
+    if (NULL == str->str) return NULL;
+    
+    str->used = 0;
+    a_str->nstrings++;
+    
+    return str;
+}
+
+
+/* free allocated memory */
+
+void string_pool_destroy(string_alloc_t *a_str) {
+    size_t i;
+    
+    for (i = 0; i < a_str->nstrings; i++) {
+    	free(a_str->strings[i].str);
+    }
+    
+    free(a_str->strings);
+    free(a_str);
+}
+
+
+/* allocate space for a string */
+
+char *string_alloc(string_alloc_t *a_str, size_t length) {
+    string_t *str;
+    char *ret;
+    
+    if (length <= 0) return NULL;
+    
+    // add to last string pool if we have space
+    if (a_str->nstrings) {
+    	str = &a_str->strings[a_str->nstrings - 1];
+	
+	if (str->used + length < a_str->max_length) {
+	    ret = str->str + str->used;
+	    str->used += length;
+	    return ret;
+	}
+    }
+    
+    // increase the max length if needs be
+    if (length > a_str->max_length) a_str->max_length = length;
+	
+    // need a new string pool 
+    str = new_string_pool(a_str);
+    
+    if (NULL == str) return NULL;
+    
+    str->used = length;
+    return str->str;
+}
+
+
+/* equivalent to strdup */
+
+char *string_dup(string_alloc_t *a_str, char *instr) {
+    return string_ndup(a_str, instr, strlen(instr));
+}
+
+char *string_ndup(string_alloc_t *a_str, char *instr, size_t len) {
+    char *str = string_alloc(a_str, len + 1);
+    
+    if (NULL == str) return NULL;
+    
+    strncpy(str, instr, len);
+    str[len] = 0;
+    
+    return str;
+}
diff --git a/htslib/cram/string_alloc.h b/htslib/cram/string_alloc.h
new file mode 100644
index 0000000..71ae26d
--- /dev/null
+++ b/htslib/cram/string_alloc.h
@@ -0,0 +1,69 @@
+/*
+Copyright (c) 2010 Genome Research Ltd.
+Author: Andrew Whitwham <aw7 at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _STRING_ALLOC_H_
+#define _STRING_ALLOC_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdlib.h>
+
+/* 
+ * A pooled string allocator intended to cut down on the
+ * memory overhead of many small string allocations.
+ *
+ * Andrew Whitwham, September 2010.
+ */
+
+typedef struct {
+    char *str;
+    size_t used;
+} string_t;
+
+typedef struct {
+    size_t max_length;
+    size_t nstrings;
+    string_t *strings;
+} string_alloc_t;
+
+string_alloc_t *string_pool_create(size_t max_length);
+void string_pool_destroy(string_alloc_t *a_str);
+char *string_alloc(string_alloc_t *a_str, size_t length);
+char *string_dup(string_alloc_t *a_str, char *instr);
+char *string_ndup(string_alloc_t *a_str, char *instr, size_t len);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/htslib/cram/thread_pool.c b/htslib/cram/thread_pool.c
new file mode 100644
index 0000000..90652a7
--- /dev/null
+++ b/htslib/cram/thread_pool.c
@@ -0,0 +1,713 @@
+/*
+Copyright (c) 2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <stdlib.h>
+
+#include <signal.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+
+#include "cram/thread_pool.h"
+
+//#define DEBUG
+#define DEBUG_TIME
+
+#ifdef DEBUG
+static int worker_id(t_pool *p) {
+    int i;
+    pthread_t s = pthread_self();
+    for (i = 0; i < p->tsize; i++) {
+	if (pthread_equal(s, p->t[i]))
+	    return i;
+    }
+    return -1;
+}
+#endif
+
+/* ----------------------------------------------------------------------------
+ * A queue to hold results from the thread pool.
+ *
+ * Each thread pool may have jobs of multiple types being queued up and
+ * interleaved, so we allow several results queue per pool.
+ *
+ * The jobs themselves are expected to push their results onto their
+ * appropriate results queue.
+ */
+
+/*
+ * Adds a result to the end of the result queue.
+ *
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+static int t_pool_add_result(t_pool_job *j, void *data) {
+    t_results_queue *q = j->q;
+    t_pool_result *r;
+
+#ifdef DEBUG
+    fprintf(stderr, "%d: Adding resulting to queue %p, serial %d\n",
+	    worker_id(j->p), q, j->serial);
+#endif
+
+    /* No results queue is fine if we don't want any results back */
+    if (!q)
+	return 0;
+
+    if (!(r = malloc(sizeof(*r))))
+	return -1;
+
+    r->next = NULL;
+    r->data = data;
+    r->serial = j->serial;
+
+    pthread_mutex_lock(&q->result_m);
+    if (q->result_tail) {
+	q->result_tail->next = r;
+	q->result_tail = r;
+    } else {
+	q->result_head = q->result_tail = r;
+    }
+    q->queue_len++;
+    q->pending--;
+
+#ifdef DEBUG
+    fprintf(stderr, "%d: Broadcasting result_avail (id %d)\n",
+	    worker_id(j->p), r->serial);
+#endif
+    pthread_cond_broadcast(&q->result_avail_c);
+#ifdef DEBUG
+    fprintf(stderr, "%d: Broadcast complete\n", worker_id(j->p));
+#endif
+
+    pthread_mutex_unlock(&q->result_m);
+
+    return 0;
+}
+
+/* Core of t_pool_next_result() */
+static t_pool_result *t_pool_next_result_locked(t_results_queue *q) {
+    t_pool_result *r, *last;
+
+    for (last = NULL, r = q->result_head; r; last = r, r = r->next) {
+	if (r->serial == q->next_serial)
+	    break;
+    }
+
+    if (r) {
+	if (q->result_head == r)
+	    q->result_head = r->next;
+	else
+	    last->next = r->next;
+
+	if (q->result_tail == r)
+	    q->result_tail = last;
+
+	if (!q->result_head)
+	    q->result_tail = NULL;
+
+	q->next_serial++;
+	q->queue_len--;
+    }
+
+    return r;
+}
+
+/*
+ * Pulls a result off the head of the result queue. Caller should
+ * free it (and any internals as appropriate) after use. This doesn't
+ * wait for a result to be present.
+ *
+ * Results will be returned in strict order.
+ * 
+ * Returns t_pool_result pointer if a result is ready.
+ *         NULL if not.
+ */
+t_pool_result *t_pool_next_result(t_results_queue *q) {
+    t_pool_result *r;
+
+#ifdef DEBUG
+    fprintf(stderr, "Requesting next result on queue %p\n", q);
+#endif
+
+    pthread_mutex_lock(&q->result_m);
+    r = t_pool_next_result_locked(q);
+    pthread_mutex_unlock(&q->result_m);
+
+#ifdef DEBUG
+    fprintf(stderr, "(q=%p) Found %p\n", q, r);
+#endif
+
+    return r;
+}
+
+t_pool_result *t_pool_next_result_wait(t_results_queue *q) {
+    t_pool_result *r;
+
+#ifdef DEBUG
+    fprintf(stderr, "Waiting for result %d...\n", q->next_serial);
+#endif
+
+    pthread_mutex_lock(&q->result_m);
+    while (!(r = t_pool_next_result_locked(q))) {
+	/* Possible race here now avoided via _locked() call, but incase... */
+	struct timeval now;
+	struct timespec timeout;
+
+	gettimeofday(&now, NULL);
+	timeout.tv_sec = now.tv_sec + 10;
+	timeout.tv_nsec = now.tv_usec * 1000;
+
+	pthread_cond_timedwait(&q->result_avail_c, &q->result_m, &timeout);
+    }
+    pthread_mutex_unlock(&q->result_m);
+
+    return r;
+}
+
+/*
+ * Returns true if there are no items on the finished results queue and
+ * also none still pending.
+ */
+int t_pool_results_queue_empty(t_results_queue *q) {
+    int empty;
+
+    pthread_mutex_lock(&q->result_m);
+    empty = q->queue_len == 0 && q->pending == 0;
+    pthread_mutex_unlock(&q->result_m);
+
+    return empty;
+}
+
+
+/*
+ * Returns the number of completed jobs on the results queue.
+ */
+int t_pool_results_queue_len(t_results_queue *q) {
+    int len;
+
+    pthread_mutex_lock(&q->result_m);
+    len = q->queue_len;
+    pthread_mutex_unlock(&q->result_m);
+
+    return len;
+}
+
+int t_pool_results_queue_sz(t_results_queue *q) {
+    int len;
+
+    pthread_mutex_lock(&q->result_m);
+    len = q->queue_len + q->pending;
+    pthread_mutex_unlock(&q->result_m);
+
+    return len;
+}
+
+/*
+ * Frees a result 'r' and if free_data is true also frees
+ * the internal r->data result too.
+ */
+void t_pool_delete_result(t_pool_result *r, int free_data) {
+    if (!r)
+	return;
+
+    if (free_data && r->data)
+	free(r->data);
+
+    free(r);
+}
+
+/*
+ * Initialises a results queue.
+ *
+ * Results queue pointer on success;
+ *         NULL on failure
+ */
+t_results_queue *t_results_queue_init(void) {
+    t_results_queue *q = malloc(sizeof(*q));
+
+    pthread_mutex_init(&q->result_m, NULL);
+    pthread_cond_init(&q->result_avail_c, NULL);
+
+    q->result_head = NULL;
+    q->result_tail = NULL;
+    q->next_serial = 0;
+    q->curr_serial = 0;
+    q->queue_len   = 0;
+    q->pending     = 0;
+
+    return q;
+}
+
+/* Deallocates memory for a results queue */
+void t_results_queue_destroy(t_results_queue *q) {
+#ifdef DEBUG
+    fprintf(stderr, "Destroying results queue %p\n", q);
+#endif
+
+    if (!q)
+	return;
+
+    pthread_mutex_destroy(&q->result_m);
+    pthread_cond_destroy(&q->result_avail_c);
+
+    memset(q, 0xbb, sizeof(*q));
+    free(q);
+
+#ifdef DEBUG
+    fprintf(stderr, "Destroyed results queue %p\n", q);
+#endif
+}
+
+/* ----------------------------------------------------------------------------
+ * The thread pool.
+ */
+
+#define TDIFF(t2,t1) ((t2.tv_sec-t1.tv_sec)*1000000 + t2.tv_usec-t1.tv_usec)
+
+/*
+ * A worker thread.
+ *
+ * Each thread waits for the pool to be non-empty.
+ * As soon as this applies, one of them succeeds in getting the lock
+ * and then executes the job.
+ */
+static void *t_pool_worker(void *arg) {
+    t_pool *p = (t_pool *)arg;
+    t_pool_job *j;
+#ifdef DEBUG_TIME
+    struct timeval t1, t2, t3;
+#endif
+
+    for (;;) {
+	// Pop an item off the pool queue
+#ifdef DEBUG_TIME
+	gettimeofday(&t1, NULL);
+#endif
+
+	pthread_mutex_lock(&p->pool_m);
+
+#ifdef DEBUG_TIME
+	gettimeofday(&t2, NULL);
+	p->wait_time += TDIFF(t2,t1);
+#endif
+
+	p->nwaiting++;
+	while (!p->head && !p->shutdown) {
+	    if (p->njobs == 0)
+		pthread_cond_signal(&p->empty_c);
+#ifdef DEBUG_TIME
+	    gettimeofday(&t2, NULL);
+#endif
+
+	    pthread_cond_wait(&p->pending_c, &p->pool_m);
+
+#ifdef DEBUG_TIME
+	    gettimeofday(&t3, NULL);
+	    p->wait_time += TDIFF(t3,t2);
+#endif
+	}
+
+	p->nwaiting--;
+
+	if (p->shutdown) {
+	    p->total_time += TDIFF(t3,t1);
+#ifdef DEBUG
+	    fprintf(stderr, "%d: Shutting down\n", worker_id(p));
+#endif
+	    pthread_mutex_unlock(&p->pool_m);
+	    pthread_exit(NULL);
+	}
+
+	j = p->head;
+	if (!(p->head = j->next))
+	    p->tail = NULL;
+
+	if (p->njobs-- == p->qsize)
+	    pthread_cond_signal(&p->full_c);
+
+	if (p->njobs == 0)
+	    pthread_cond_signal(&p->empty_c);
+
+	pthread_mutex_unlock(&p->pool_m);
+	    
+	// We have job 'j' - now execute it.
+	t_pool_add_result(j, j->func(j->arg));	
+#ifdef DEBUG_TIME
+	pthread_mutex_lock(&p->pool_m);
+	gettimeofday(&t3, NULL);
+	p->total_time += TDIFF(t3,t1);
+	pthread_mutex_unlock(&p->pool_m);
+#endif
+	memset(j, 0xbb, sizeof(*j));
+	free(j);
+    }
+
+    return NULL;
+}
+
+/*
+ * Creates a worker pool of length qsize with tsize worker threads.
+ *
+ * Returns pool pointer on success;
+ *         NULL on failure
+ */
+t_pool *t_pool_init(int qsize, int tsize) {
+    int i;
+    t_pool *p = malloc(sizeof(*p));
+    p->qsize = qsize;
+    p->tsize = tsize;
+    p->njobs = 0;
+    p->nwaiting = 0;
+    p->shutdown = 0;
+    p->head = p->tail = NULL;
+#ifdef DEBUG_TIME
+    p->total_time = p->wait_time = 0;
+#endif
+
+    p->t = malloc(tsize * sizeof(p->t[0]));
+
+    pthread_mutex_init(&p->pool_m, NULL);
+    pthread_cond_init(&p->empty_c, NULL);
+    pthread_cond_init(&p->pending_c, NULL);
+    pthread_cond_init(&p->full_c, NULL);
+
+    for (i = 0; i < tsize; i++) {
+	if (0 != pthread_create(&p->t[i], NULL, t_pool_worker, p))
+	    return NULL;
+    }
+ 
+    return p;
+}
+
+/*
+ * Adds an item to the work pool.
+ *
+ * FIXME: Maybe return 1,0,-1 and distinguish between job dispathed vs
+ * result returned. Ie rather than blocking on full queue we're permitted
+ * to return early on "result available" event too.
+ * Caller would then have a while loop around t_pool_dispatch.
+ * Or, return -1 and set errno to EAGAIN to indicate job not yet submitted.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int t_pool_dispatch(t_pool *p, t_results_queue *q,
+		    void *(*func)(void *arg), void *arg) {
+    t_pool_job *j = malloc(sizeof(*j));
+
+    if (!j)
+	return -1;
+    j->func = func;
+    j->arg = arg;
+    j->next = NULL;
+    j->p = p;
+    j->q = q;
+    if (q) {
+	pthread_mutex_lock(&q->result_m);
+	j->serial = q->curr_serial++;
+	q->pending++;
+	pthread_mutex_unlock(&q->result_m);
+    } else {
+	j->serial = 0;
+    }
+
+#ifdef DEBUG
+    fprintf(stderr, "Dispatching job %p for queue %p, serial %d\n", j, q, j->serial);
+#endif
+
+    pthread_mutex_lock(&p->pool_m);
+
+    // Check if queue is full
+    while (p->njobs == p->qsize)
+	pthread_cond_wait(&p->full_c, &p->pool_m);
+
+    p->njobs++;
+
+    if (p->tail) {
+	p->tail->next = j;
+	p->tail = j;
+    } else {
+	p->head = p->tail = j;
+    }
+
+    if (p->njobs == 1) {
+	// First job => tell all worker threads to start up
+	pthread_cond_broadcast(&p->pending_c);
+    }
+
+    pthread_mutex_unlock(&p->pool_m);
+
+#ifdef DEBUG
+    fprintf(stderr, "Dispatched (serial %d)\n", j->serial);
+#endif
+
+    return 0;
+}
+
+/*
+ * As above but optional non-block flag.
+ *
+ * nonblock  0 => block if input queue is full
+ * nonblock +1 => don't block if input queue is full, but do not add task
+ * nonblock -1 => add task regardless of whether queue is full (over-size)
+ */
+int t_pool_dispatch2(t_pool *p, t_results_queue *q,
+		     void *(*func)(void *arg), void *arg, int nonblock) {
+    t_pool_job *j = malloc(sizeof(*j));
+
+    if (!j)
+	return -1;
+    j->func = func;
+    j->arg = arg;
+    j->next = NULL;
+    j->p = p;
+    j->q = q;
+    if (q) {
+	pthread_mutex_lock(&q->result_m);
+	j->serial = q->curr_serial;
+	pthread_mutex_unlock(&q->result_m);
+    } else {
+	j->serial = 0;
+    }
+
+#ifdef DEBUG
+    fprintf(stderr, "Dispatching job for queue %p, serial %d\n", q, j->serial);
+#endif
+
+    pthread_mutex_lock(&p->pool_m);
+
+    if (p->njobs == p->qsize && nonblock == 1) {
+	pthread_mutex_unlock(&p->pool_m);
+	errno = EAGAIN;
+	free(j);
+	return -1;
+    }
+
+    if (q) {
+	pthread_mutex_lock(&q->result_m);
+	q->curr_serial++;
+	q->pending++;
+	pthread_mutex_unlock(&q->result_m);
+    }
+
+    // Check if queue is full
+    if (nonblock == 0)
+	while (p->njobs == p->qsize)
+	    pthread_cond_wait(&p->full_c, &p->pool_m);
+
+    p->njobs++;
+    
+//    if (q->curr_serial % 100 == 0)
+//	fprintf(stderr, "p->njobs = %d    p->qsize = %d\n", p->njobs, p->qsize);
+
+    if (p->tail) {
+	p->tail->next = j;
+	p->tail = j;
+    } else {
+	p->head = p->tail = j;
+    }
+
+#ifdef DEBUG
+    fprintf(stderr, "Dispatched (serial %d)\n", j->serial);
+#endif
+
+    if (p->njobs == 1) {
+	// First job => tell all worker threads to start up
+	pthread_cond_broadcast(&p->pending_c);
+    }
+
+    pthread_mutex_unlock(&p->pool_m);
+
+    return 0;
+}
+
+/*
+ * Flushes the pool, but doesn't exit. This simply drains the queue and
+ * ensures all worker threads have finished their current task.
+ *
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int t_pool_flush(t_pool *p) {
+#ifdef DEBUG
+    fprintf(stderr, "Flushing pool %p\n", p);
+#endif
+
+    // Drains the queue
+    pthread_mutex_lock(&p->pool_m);
+    while (p->njobs || p->nwaiting != p->tsize)
+	pthread_cond_wait(&p->empty_c, &p->pool_m);
+
+    pthread_mutex_unlock(&p->pool_m);
+
+#ifdef DEBUG
+    fprintf(stderr, "Flushed complete for pool %p, njobs=%d, nwaiting=%d\n",
+	    p, p->njobs, p->nwaiting);
+#endif
+
+    return 0;
+}
+
+/*
+ * Destroys a thread pool. If 'kill' is true the threads are terminated now,
+ * otherwise they are joined into the main thread so they will finish their
+ * current work load.
+ *
+ * Use t_pool_destroy(p,0) after a t_pool_flush(p) on a normal shutdown or
+ * t_pool_destroy(p,1) to quickly exit after a fatal error.
+ */
+void t_pool_destroy(t_pool *p, int kill) {
+    int i;
+    
+#ifdef DEBUG
+    fprintf(stderr, "Destroying pool %p, kill=%d\n", p, kill);
+#endif
+
+    /* Send shutdown message to worker threads */
+    if (!kill) {
+	pthread_mutex_lock(&p->pool_m);
+	p->shutdown = 1;
+
+#ifdef DEBUG
+	fprintf(stderr, "Sending shutdown request\n");
+#endif
+
+	pthread_cond_broadcast(&p->pending_c);
+	pthread_mutex_unlock(&p->pool_m);
+
+#ifdef DEBUG
+	fprintf(stderr, "Shutdown complete\n");
+#endif
+	for (i = 0; i < p->tsize; i++)
+	    pthread_join(p->t[i], NULL);
+    } else {
+	for (i = 0; i < p->tsize; i++)
+	    pthread_kill(p->t[i], SIGINT);
+    }
+
+    pthread_mutex_destroy(&p->pool_m);
+    pthread_cond_destroy(&p->empty_c);
+    pthread_cond_destroy(&p->pending_c);
+    pthread_cond_destroy(&p->full_c);
+
+#ifdef DEBUG_TIME
+    fprintf(stderr, "Total time=%f\n", p->total_time / 1000000.0);
+    fprintf(stderr, "Wait  time=%f\n", p->wait_time  / 1000000.0);
+    fprintf(stderr, "%d%% utilisation\n",
+	    (int)(100 - ((100.0 * p->wait_time) / p->total_time + 0.5)));
+#endif
+
+    free(p->t);
+    free(p);
+
+#ifdef DEBUG
+    fprintf(stderr, "Destroyed pool %p\n", p);
+#endif
+}
+
+
+/*-----------------------------------------------------------------------------
+ * Test app.
+ */
+
+#ifdef TEST_MAIN
+
+#include <stdio.h>
+#include <math.h>
+
+void *doit(void *arg) {
+    int i, k, x = 0;
+    int job = *(int *)arg;
+    int *res;
+
+    printf("Worker: execute job %d\n", job);
+
+    usleep(random() % 1000000); // to coerce job completion out of order
+    if (0) {
+	for (k = 0; k < 100; k++) {
+	    for (i = 0; i < 100000; i++) {
+		x++;
+		x += x * sin(i);
+		x += x * cos(x);
+	    }
+	}
+	x *= 100;
+	x += job;
+    } else {
+	x = job*job;
+    }
+
+    printf("Worker: job %d terminating, x=%d\n", job, x);
+
+    free(arg);
+
+    res = malloc(sizeof(*res));
+    *res = x;
+
+    return res;
+}
+
+#define NTHREADS 8
+
+int main(int argc, char **argv) {
+    t_pool *p = t_pool_init(NTHREADS*2, NTHREADS);
+    t_results_queue *q = t_results_queue_init();
+    int i;
+    t_pool_result *r;
+
+    // Dispatch jobs
+    for (i = 0; i < 20; i++) {
+	int *ip = malloc(sizeof(*ip));
+	*ip = i;
+	printf("Submitting %d\n", i);
+	t_pool_dispatch(p, q, doit, ip);
+	
+	// Check for results
+	if ((r = t_pool_next_result(q))) {
+	    printf("RESULT: %d\n", *(int *)r->data);
+	    t_pool_delete_result(r, 1);
+	}
+    }
+
+    t_pool_flush(p);
+
+    while ((r = t_pool_next_result(q))) {
+	printf("RESULT: %d\n", *(int *)r->data);
+	t_pool_delete_result(r, 1);
+    }
+
+    t_pool_destroy(p, 0);
+    t_results_queue_destroy(q);
+
+    return 0;
+}
+#endif
diff --git a/htslib/cram/thread_pool.h b/htslib/cram/thread_pool.h
new file mode 100644
index 0000000..18e8b42
--- /dev/null
+++ b/htslib/cram/thread_pool.h
@@ -0,0 +1,197 @@
+/*
+Copyright (c) 2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+ * This file implements a thread pool for multi-threading applications.
+ * It consists of two distinct interfaces: thread pools an results queues.
+ *
+ * The pool of threads is given a function pointer and void* data to pass in.
+ * This means the pool can run jobs of multiple types, albeit first come
+ * first served with no job scheduling.
+ *
+ * Upon completion, the return value from the function pointer is added to
+ * a results queue. We may have multiple queues in use for the one pool.
+ *
+ * An example: reading from BAM and writing to CRAM with 10 threads. We'll
+ * have a pool of 10 threads and two results queues holding decoded BAM blocks
+ * and encoded CRAM blocks respectively.
+ */
+
+#ifndef _THREAD_POOL_H_
+#define _THREAD_POOL_H_
+
+#include <pthread.h>
+
+struct t_pool;
+struct t_results_queue;
+
+typedef struct t_pool_job {
+    void *(*func)(void *arg);
+    void *arg;
+    struct t_pool_job *next;
+
+    struct t_pool *p;
+    struct t_results_queue *q;
+    int serial;
+} t_pool_job;
+
+typedef struct t_res {
+    struct t_res *next;
+    int serial; // sequential number for ordering
+    void *data; // result itself
+} t_pool_result;
+
+typedef struct t_pool {
+    int qsize;    // size of queue
+    int njobs;    // pending job count
+    int nwaiting; // how many workers waiting for new jobs
+    int shutdown; // true if pool is being destroyed
+
+    // queue of pending jobs
+    t_pool_job *head, *tail;
+
+    // threads
+    int tsize;    // maximum number of jobs
+    pthread_t *t;
+
+    // Mutexes
+    pthread_mutex_t pool_m; // used when updating head/tail
+
+    pthread_cond_t  empty_c;
+    pthread_cond_t  pending_c; // not empty
+    pthread_cond_t  full_c;
+
+    // Debugging to check wait time
+    long long total_time, wait_time;
+} t_pool;
+
+typedef struct t_results_queue {
+    t_pool_result *result_head;
+    t_pool_result *result_tail;
+    int next_serial;
+    int curr_serial;
+    int queue_len;  // number of items in queue
+    int pending;    // number of pending items (in progress or in pool list)
+    pthread_mutex_t result_m;
+    pthread_cond_t result_avail_c;
+} t_results_queue;
+
+
+/*
+ * Creates a worker pool of length qsize with tsize worker threads.
+ *
+ * Returns pool pointer on success;
+ *         NULL on failure
+ */
+t_pool *t_pool_init(int qsize, int tsize);
+
+/*
+ * Adds an item to the work pool.
+ *
+ * FIXME: Maybe return 1,0,-1 and distinguish between job dispathed vs
+ * result returned. Ie rather than blocking on full queue we're permitted
+ * to return early on "result available" event too.
+ * Caller would then have a while loop around t_pool_dispatch.
+ * Or, return -1 and set errno to E_AGAIN to indicate job not yet submitted.
+ *
+ * Returns 0 on success
+ *        -1 on failure
+ */
+int t_pool_dispatch(t_pool *p, t_results_queue *q,
+		    void *(*func)(void *arg), void *arg);
+int t_pool_dispatch2(t_pool *p, t_results_queue *q,
+		     void *(*func)(void *arg), void *arg, int nonblock);
+
+/*
+ * Flushes the pool, but doesn't exit. This simply drains the queue and
+ * ensures all worker threads have finished their current task.
+ *
+ * Returns 0 on success;
+ *        -1 on failure
+ */
+int t_pool_flush(t_pool *p);
+
+/*
+ * Destroys a thread pool. If 'kill' is true the threads are terminated now,
+ * otherwise they are joined into the main thread so they will finish their
+ * current work load.
+ *
+ * Use t_pool_destroy(p,0) after a t_pool_flush(p) on a normal shutdown or
+ * t_pool_destroy(p,1) to quickly exit after a fatal error.
+ */
+void t_pool_destroy(t_pool *p, int kill);
+
+/*
+ * Pulls a result off the head of the result queue. Caller should
+ * free it (and any internals as appropriate) after use. This doesn't
+ * wait for a result to be present.
+ *
+ * Results will be returned in strict order.
+ * 
+ * Returns t_pool_result pointer if a result is ready.
+ *         NULL if not.
+ */
+t_pool_result *t_pool_next_result(t_results_queue *q);
+t_pool_result *t_pool_next_result_wait(t_results_queue *q);
+
+/*
+ * Frees a result 'r' and if free_data is true also frees
+ * the internal r->data result too.
+ */
+void t_pool_delete_result(t_pool_result *r, int free_data);
+
+/*
+ * Initialises a results queue.
+ *
+ * Results queue pointer on success;
+ *         NULL on failure
+ */
+t_results_queue *t_results_queue_init(void);
+
+/* Deallocates memory for a results queue */
+void t_results_queue_destroy(t_results_queue *q);
+
+/*
+ * Returns true if there are no items on the finished results queue and
+ * also none still pending.
+ */
+int t_pool_results_queue_empty(t_results_queue *q);
+
+/*
+ * Returns the number of completed jobs on the results queue.
+ */
+int t_pool_results_queue_len(t_results_queue *q);
+
+/*
+ * Returns the number of completed jobs plus the number queued up to run.
+ */
+int t_pool_results_queue_sz(t_results_queue *q);
+
+#endif /* _THREAD_POOL_H_ */
diff --git a/htslib/cram/vlen.c b/htslib/cram/vlen.c
new file mode 100644
index 0000000..bc7e7d4
--- /dev/null
+++ b/htslib/cram/vlen.c
@@ -0,0 +1,432 @@
+/*
+Author: James Bonfield (jkb at sanger.ac.uk)
+
+Copyright (c) 1995-1996 MEDICAL RESEARCH COUNCIL
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1 Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2 Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3 Neither the name of the MEDICAL RESEARCH COUNCIL, THE LABORATORY OF 
+MOLECULAR BIOLOGY nor the names of its contributors may be used to endorse or 
+promote products derived from this software without specific prior written 
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+Copyright (c) 2004, 2009, 2011-2012 Genome Research Ltd.
+
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <string.h>
+
+#include "cram/vlen.h"
+#include "cram/os.h"
+
+#ifndef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#endif
+
+#ifndef ABS
+#define ABS(a) ((a)>0?(a):-(a))
+#endif
+
+/* #define DEBUG_printf(a,n) printf(a,n) */
+#define DEBUG_printf(a,n)
+
+/*
+ * vlen: 27/10/95 written by James Bonfield, jkb at mrc-lmb.cam.ac.uk
+ *
+ * Given sprintf style of arguments this routine returns the maximum
+ * size of buffer needed to allocate to use with sprintf. It errs on
+ * the side of caution by being simplistic in its approach: we assume
+ * all numbers are of maximum length.
+ *
+ * Handles the usual type conversions (%[%diuaxXcfeEgGpns]), but not
+ * the 'wide' character conversions (%C and %S).
+ * Precision is handled in the correct formats, including %*.*
+ * notations.
+ * Additionally, some of the more dubious (but probably illegal) cases
+ * are supported (eg "%10%" will expand to "         %" on many
+ * systems).
+ *
+ * We also assume that the largest integer and larger pointer are 64
+ * bits, which at least covers the machines we'll need it for.
+ */
+int flen(char *fmt, ...)
+{
+    va_list args;
+
+    va_start(args, fmt);
+    return vflen(fmt, args);
+}
+
+int vflen(char *fmt, va_list ap)
+{
+    int len = 0;
+    char *cp, c;
+    long long l;
+    int i;
+    double d; 
+
+    /*
+     * This code modifies 'ap', but we do not know if va_list is a structure
+     * or a pointer to an array so we do not know if it is a local variable
+     * or not.
+     * C99 gets around this by defining va_copy() to make copies of ap, but
+     * this does not exist on all systems.
+     * For now, I just assume that when va_list is a pointer the system also
+     * provides a va_copy macro to work around this problem. The only system
+     * I have seen needing this so far was Linux on AMD64.
+     */
+#if defined(HAVE_VA_COPY)
+    va_list ap_local;
+    va_copy(ap_local, ap);
+#    define ap ap_local
+#endif
+
+    for(cp = fmt; *cp; cp++) {
+	switch(*cp) {
+
+	/* A format specifier */
+	case '%': {
+	    char *endp;
+	    long conv_len1=0, conv_len2=0, conv_len=0;
+	    signed int arg_size;
+
+	    /* Firstly, strip the modifier flags (+-#0 and [space]) */
+	    for(; (c=*++cp);) {
+		if ('#' == c)
+		    len+=2; /* Worst case of "0x" */
+		else if ('-' == c || '+' == c || ' ' == c)
+		    len++;
+		else
+		    break;
+	    }
+
+	    /* Width specifier */
+	    l = strtol(cp, &endp, 10);
+	    if (endp != cp) {
+		cp = endp;
+		conv_len = conv_len1 = l;
+	    } else if (*cp == '*') {
+		conv_len = conv_len1 = (int)va_arg(ap, int);
+		cp++;
+	    }
+
+	    /* Precision specifier */
+	    if ('.' == *cp) {
+		cp++;
+		conv_len2 = strtol(cp, &endp, 10);
+		if (endp != cp) {
+		    cp = endp;
+		} else if (*cp == '*') {
+		    conv_len2 = (int)va_arg(ap, int);
+		    cp++;
+		}
+		conv_len = MAX(conv_len1, conv_len2);
+	    }
+
+	    /* Short/long identifier */
+	    if ('h' == *cp) {
+		arg_size = -1; /* short */
+		cp++;
+	    } else if ('l' == *cp) {
+		arg_size = 1; /* long */
+		cp++;
+		if ('l' == *cp) {
+		    arg_size = 2; /* long long */
+		    cp++;
+		}
+	    } else {
+		arg_size = 0; /* int */
+	    }
+
+	    /* The actual type */
+	    switch (*cp) {
+	    case '%':
+		/*
+		 * Not real ANSI I suspect, but we'll allow for the
+		 * completely daft "%10%" example.
+		 */
+		len += MAX(conv_len1, 1);
+		break;
+
+	    case 'd':
+	    case 'i':
+	    case 'u':
+	    case 'a':
+	    case 'x':
+	    case 'X':
+		/* Remember: char and short are sent as int on the stack */
+		if (arg_size == -1)
+		    l = (long)va_arg(ap, int);
+		else if (arg_size == 1)
+		    l = va_arg(ap, long); 
+		else if (arg_size == 2)
+		    l = va_arg(ap, long long); 
+		else 
+		    l = (long)va_arg(ap, int);
+
+		DEBUG_printf("%d", l);
+
+		/*
+		 * No number can be more than 24 characters so we'll take
+		 * the max of conv_len and 24 (23 is len(2^64) in octal).
+		 * All that work above and we then go and estimate ;-),
+		 * but it's needed incase someone does %500d.
+		 */
+		len += MAX(conv_len, 23);
+		break;
+
+	    case 'c':
+		i = va_arg(ap, int);
+		DEBUG_printf("%c", i);
+		/*
+		 * Note that %10c and %.10c act differently.
+		 * Besides, I think precision is not really allowed for %c.
+		 */
+		len += MAX(conv_len1, 1);
+		break;
+
+	    case 'f':
+		d = va_arg(ap, double);
+		DEBUG_printf("%f", d);
+		/*
+		 * Maybe "Inf" or "NaN", but we'll not worry about that.
+		 * Again, err on side of caution and take max of conv_len
+		 * and max length of a double. The worst case I can
+		 * think of is 317 characters (-1[308 zeros].000000)
+		 * without using precision codes. That's horrid. I
+		 * cheat and either use 317 or 15 depending on how
+		 * large the number is as I reckon 99% of floats
+		 * aren't that long.
+		 */
+		l = (ABS(d) > 1000000) ? 317 : 15;
+		l = MAX(l, conv_len1 + 2);
+		if (conv_len2) l += conv_len2 - 6;
+		len += l;
+		break;
+
+	    case 'e':
+	    case 'E':
+	    case 'g':
+	    case 'G':
+		d = va_arg(ap, double);
+		DEBUG_printf("%g", d);
+		/*
+		 * Maybe "Inf" or "NaN", but we'll not worry about that
+		 * Again, err on side of caution and take max of conv_len
+		 * and max length of a double (which defaults to only
+		 * '-' + 6 + '.' + 'E[+-]xxx' == 13.
+		 */
+		len += MAX(conv_len, 13);
+		break;
+
+	    case 'p':
+		l = (long)va_arg(ap, void *);
+		/*
+		 * Max pointer is 64bits == 16 chars (on alpha),
+		 * == 20 with + "0x".
+		 */
+		DEBUG_printf("%p", (void *)l);
+		len += MAX(conv_len, 20);
+		break;
+
+	    case 'n':
+		/* produces no output */
+		break;
+
+	    case 's': {
+		char *s = (char *)va_arg(ap, char *);
+		DEBUG_printf("%s", s);
+
+		if (!conv_len2) {
+		    len += MAX(conv_len, (int)strlen(s));
+		} else {
+		    len += conv_len;
+		}
+		break;
+	    }
+
+	    default:
+		/* wchar_t types of 'C' and 'S' aren't supported */
+		DEBUG_printf("Arg is %c\n", *cp);
+	    }
+	    
+	}
+
+	case '\0':
+	    break;
+
+	default:
+	    DEBUG_printf("%c", *cp);
+	    len++;
+	}
+    }
+
+    va_end(ap);
+
+    return len+1; /* one for the null character */
+}
+
+#if 0
+int main() {
+    int l;
+    char buf[10000];
+
+    sprintf(buf, "d: %d\n", 500);
+    l = flen("d: %d\n", 500);
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "");
+    l = flen("");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%s\n","test");
+    l = flen("%s\n", "test");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%c\n", 'a');
+    l = flen("%c\n", 'a');
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%31.30f\n", -9999.99);
+    l = flen("%31.30f\n", -9999.99);
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%f\n", -1e308);
+    l = flen("%f\n", -1e308);
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%.9f\n", -1e308);
+    l = flen("%.9f\n", -1e308);
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%10.20f\n", -1.999222333);
+    l = flen("%10.20f\n", -1.999222333);
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%#g\n", -3.14159265358e-222);
+    l = flen("%#g\n", -3.1415927e-222);
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%e\n", -123456789123456789.1);
+    l = flen("%e\n", -123456789123456789.1);
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%c %f %d %s %c %g %ld %s\n", 'a', 3.1, 9, "one", 'b', 4.2, 9, "two");
+    l = flen("%c %f %d %s %c %g %ld %s\n", 'a', 3.1, 9, "one", 'b', 4.2, 9, "two");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%*.*e %*c\n", 10, 5, 9.0, 20, 'x');
+    l = flen("%*.*e %*c\n", 10, 5, 9.0, 20, 'x');
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%10c\n", 'z');
+    l = flen("%10c\n", 'z');
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%.10c\n", 'z');
+    l = flen("%.10c\n", 'z');
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%10d\n", 'z');
+    l = flen("%10d\n", 'z');
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%.10d\n", 'z');
+    l = flen("%.10d\n", 'z');
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%10%\n");
+    l = flen("%10%\n");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%.10%\n");
+    l = flen("%.10%\n");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%s\n", "0123456789");
+    l = flen("%s\n", "0123456789");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%5s\n", "0123456789");
+    l = flen("%5s\n", "0123456789");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%50s\n", "0123456789");
+    l = flen("%50s\n", "0123456789");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%.5s\n", "0123456789");
+    l = flen("%.5s\n", "0123456789");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%.50s\n", "0123456789");
+    l = flen("%.50s\n", "0123456789");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%5.50s\n", "0123456789");
+    l = flen("%5.50s\n", "0123456789");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    sprintf(buf, "%50.5s\n", "0123456789");
+    l = flen("%50.5s\n", "0123456789");
+    printf("%d %d\n\n", strlen(buf), l);
+
+    return 0;
+}
+#endif
diff --git a/htslib/cram/vlen.h b/htslib/cram/vlen.h
new file mode 100644
index 0000000..6b9b07c
--- /dev/null
+++ b/htslib/cram/vlen.h
@@ -0,0 +1,48 @@
+/*
+Author: James Bonfield (jkb at sanger.ac.uk)
+
+Copyright (c) 1995-1996 MEDICAL RESEARCH COUNCIL
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1 Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2 Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3 Neither the name of the MEDICAL RESEARCH COUNCIL, THE LABORATORY OF 
+MOLECULAR BIOLOGY nor the names of its contributors may be used to endorse or 
+promote products derived from this software without specific prior written 
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _VLEN_H_
+#define _VLEN_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int vflen(char *fmt, va_list ap);
+extern int flen(char *fmt, ...);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _VLEN_H_ */
diff --git a/htslib/cram/zfio.c b/htslib/cram/zfio.c
new file mode 100644
index 0000000..0a0ae0c
--- /dev/null
+++ b/htslib/cram/zfio.c
@@ -0,0 +1,185 @@
+/*
+Copyright (c) 2009-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "io_lib_config.h"
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "cram/os.h"
+#include "cram/zfio.h"
+
+/* ------------------------------------------------------------------------ */
+/* Some wrappers around FILE * vs gzFile *, allowing for either */
+
+/*
+ * gzopen() works on both compressed and uncompressed data, but it has
+ * a significant performance hit even for uncompressed data (tested as
+ * 25s using FILE* to 46s via gzOpen and 66s via gzOpen when gzipped).
+ *
+ * Hence we use our own wrapper 'zfp' which is a FILE* when uncompressed
+ * and gzFile* when compressed. This also means we could hide bzopen in
+ * there too if desired.
+ */
+
+off_t zftello(zfp *zf) {
+    return zf->fp ? ftello(zf->fp) : -1;
+}
+
+int zfseeko(zfp *zf, off_t offset, int whence) {
+    return zf->fp ? fseeko(zf->fp, offset, whence) : -1;
+}
+
+
+/*
+ * A wrapper for either fgets or gzgets depending on what has been
+ * opened.
+ */
+char *zfgets(char *line, int size, zfp *zf) {
+    if (zf->fp)
+	return fgets(line, size, zf->fp);
+    else
+	return gzgets(zf->gz, line, size);
+}
+
+/*
+ * A wrapper for either fputs or gzputs depending on what has been
+ * opened.
+ */
+int zfputs(char *line, zfp *zf) {
+    if (zf->fp)
+	return fputs(line, zf->fp);
+    else
+	return gzputs(zf->gz, line) ? 0 : EOF;
+}
+
+/*
+ * Peeks at and returns the next character without consuming it from the
+ * input. (Ie a combination of getc and ungetc).
+ */
+int zfpeek(zfp *zf) {
+    int c;
+
+    if (zf->fp) {
+	c = getc(zf->fp);
+	if (c != EOF)
+	    ungetc(c, zf->fp);
+    } else {
+	c = gzgetc(zf->gz);
+	if (c != EOF)
+	    gzungetc(c, zf->gz);
+    }
+
+    return c;
+}
+
+/* A replacement for either feof of gzeof */
+int zfeof(zfp *zf) {
+    return zf->fp ? feof(zf->fp) : gzeof(zf->gz);
+}
+
+/* A replacement for either fopen or gzopen */
+zfp *zfopen(const char *path, const char *mode) {
+    char path2[1024];
+    zfp *zf;
+
+    if (!(zf = (zfp *)malloc(sizeof(*zf))))
+	return NULL;
+    zf->fp = NULL;
+    zf->gz = NULL;
+
+    /* Try normal fopen */
+    if (mode[0] != 'z' && mode[1] != 'z' &&
+	NULL != (zf->fp = fopen(path, mode))) {
+	unsigned char magic[2];
+	if (2 != fread(magic, 1, 2, zf->fp)) {
+	    free(zf);
+	    return NULL;
+	}
+	if (!(magic[0] == 0x1f &&
+	      magic[1] == 0x8b)) {
+	    fseeko(zf->fp, 0, SEEK_SET);
+	    return zf;
+	}
+
+	fclose(zf->fp);
+	zf->fp = NULL;
+    }
+
+#ifdef HAVE_POPEN
+    /*
+     * I've no idea why, by gzgets is VERY slow, maybe because it handles
+     * arbitrary seeks.
+     * popen to gzip -cd is 3 times faster though.
+     */
+    if (*mode == 'w') {
+    } else {
+	if (access(path, R_OK) == 0) {
+	    sprintf(path2, "gzip -cd < %.*s", 1000, path);
+	    if (NULL != (zf->fp = popen(path2, "r")))
+		return zf;
+	}
+	
+	sprintf(path2, "gzip -cd < %.*s.gz", 1000, path);
+	if (NULL != (zf->fp = popen(path2, "r")))
+	    return zf;
+
+	printf("Failed on %s\n", path);
+    } else {
+	sprintf(path2, "gzip > %.*s", 1000, path);
+	if (NULL != (zf->fp = popen(path2, "w")))
+	    return zf;
+	}
+	
+	printf("Failed on %s\n", path);
+    }
+#else
+    /* Gzopen instead */
+    if ((zf->gz = gzopen(path, mode)))
+	return zf;
+
+    sprintf(path2, "%.*s.gz", 1020, path);
+    if ((zf->gz = gzopen(path2, mode)))
+	return zf;
+#endif
+
+    perror(path);
+
+    free(zf);
+    return NULL;
+}
+
+int zfclose(zfp *zf) {
+    int r = (zf->fp) ? fclose(zf->fp) : gzclose(zf->gz);
+    free(zf);
+    return r;
+}
diff --git a/htslib/cram/zfio.h b/htslib/cram/zfio.h
new file mode 100644
index 0000000..2d0580f
--- /dev/null
+++ b/htslib/cram/zfio.h
@@ -0,0 +1,54 @@
+/*
+Copyright (c) 2009-2013 Genome Research Ltd.
+Author: James Bonfield <jkb at sanger.ac.uk>
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, 
+this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, 
+this list of conditions and the following disclaimer in the documentation 
+and/or other materials provided with the distribution.
+
+   3. Neither the names Genome Research Ltd and Wellcome Trust Sanger
+Institute nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _ZFIO_H_
+#define _ZFIO_H_
+
+#include <stdio.h>
+#include <zlib.h>
+
+/*
+ * Either a gzFile or a FILE.
+ */
+typedef struct {
+    FILE   *fp;
+    gzFile  gz;
+} zfp;
+
+off_t zftello(zfp *zf);
+int zfseeko(zfp *zf, off_t offset, int whence);
+char *zfgets(char *line, int size, zfp *zf);
+int zfputs(char *line, zfp *zf);
+zfp *zfopen(const char *path, const char *mode);
+int zfclose(zfp *zf);
+int zfpeek(zfp *zf);
+int zfeof(zfp *zf);
+
+#endif /* _ZFIO_H_ */
diff --git a/htslib/faidx.c b/htslib/faidx.c
new file mode 100644
index 0000000..05dff83
--- /dev/null
+++ b/htslib/faidx.c
@@ -0,0 +1,421 @@
+#include "config.h"
+
+#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+
+#include "htslib/bgzf.h"
+#include "htslib/faidx.h"
+#include "htslib/khash.h"
+#ifdef _USE_KNETFILE
+#include "htslib/knetfile.h"
+#endif
+
+typedef struct {
+	int32_t line_len, line_blen;
+	int64_t len;
+	uint64_t offset;
+} faidx1_t;
+KHASH_MAP_INIT_STR(s, faidx1_t)
+
+struct __faidx_t {
+	BGZF *bgzf;
+	int n, m;
+	char **name;
+	khash_t(s) *hash;
+};
+
+#ifndef kroundup32
+#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
+#endif
+
+static inline void fai_insert_index(faidx_t *idx, const char *name, int len, int line_len, int line_blen, uint64_t offset)
+{
+	khint_t k;
+	int ret;
+	faidx1_t t;
+	if (idx->n == idx->m) {
+		idx->m = idx->m? idx->m<<1 : 16;
+		idx->name = (char**)realloc(idx->name, sizeof(char*) * idx->m);
+	}
+	idx->name[idx->n] = strdup(name);
+	k = kh_put(s, idx->hash, idx->name[idx->n], &ret);
+	t.len = len; t.line_len = line_len; t.line_blen = line_blen; t.offset = offset;
+	kh_value(idx->hash, k) = t;
+	++idx->n;
+}
+
+faidx_t *fai_build_core(BGZF *bgzf)
+{
+	char c, *name;
+	int l_name, m_name;
+	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);
+	name = 0; l_name = m_name = 0;
+	len = line_len = line_blen = -1; state = 0; l1 = l2 = -1; offset = 0;
+	while ( (c=bgzf_getc(bgzf))>=0 ) {
+		if (c == '\n') { // an empty line
+			if (state == 1) {
+				offset = bgzf_utell(bgzf);
+				continue;
+			} else if ((state == 0 && len < 0) || state == 2) continue;
+		}
+		if (c == '>') { // fasta header
+			if (len >= 0)
+				fai_insert_index(idx, name, len, line_len, line_blen, offset);
+			l_name = 0;
+			while ( (c=bgzf_getc(bgzf))>=0 && !isspace(c)) {
+				if (m_name < l_name + 2) {
+					m_name = l_name + 2;
+					kroundup32(m_name);
+					name = (char*)realloc(name, m_name);
+				}
+				name[l_name++] = c;
+			}
+			name[l_name] = '\0';
+			if ( c<0 ) {
+				fprintf(stderr, "[fai_build_core] the last entry has no sequence\n");
+				free(name); fai_destroy(idx);
+				return 0;
+			}
+			if (c != '\n') while ( (c=bgzf_getc(bgzf))>=0 && c != '\n');
+			state = 1; len = 0;
+			offset = bgzf_utell(bgzf);
+		} else {
+			if (state == 3) {
+				fprintf(stderr, "[fai_build_core] inlined empty line is not allowed in sequence '%s'.\n", name);
+				free(name); fai_destroy(idx);
+				return 0;
+			}
+			if (state == 2) state = 3;
+			l1 = l2 = 0;
+			do {
+				++l1;
+				if (isgraph(c)) ++l2;
+			} while ( (c=bgzf_getc(bgzf))>=0 && c != '\n');
+			if (state == 3 && l2) {
+				fprintf(stderr, "[fai_build_core] different line length in sequence '%s'.\n", name);
+				free(name); fai_destroy(idx);
+				return 0;
+			}
+			++l1; len += l2;
+			if (state == 1) line_len = l1, line_blen = l2, state = 0;
+			else if (state == 0) {
+				if (l1 != line_len || l2 != line_blen) state = 2;
+			}
+		}
+	}
+	fai_insert_index(idx, name, len, line_len, line_blen, offset);
+	free(name);
+	return idx;
+}
+
+void fai_save(const faidx_t *fai, FILE *fp)
+{
+	khint_t k;
+	int i;
+	for (i = 0; i < fai->n; ++i) {
+		faidx1_t x;
+		k = kh_get(s, fai->hash, fai->name[i]);
+		x = kh_value(fai->hash, k);
+#ifdef _WIN32
+		fprintf(fp, "%s\t%d\t%ld\t%d\t%d\n", fai->name[i], (int)x.len, (long)x.offset, (int)x.line_blen, (int)x.line_len);
+#else
+		fprintf(fp, "%s\t%d\t%lld\t%d\t%d\n", fai->name[i], (int)x.len, (long long)x.offset, (int)x.line_blen, (int)x.line_len);
+#endif
+	}
+}
+
+faidx_t *fai_read(FILE *fp)
+{
+	faidx_t *fai;
+	char *buf, *p;
+	int len, line_len, line_blen;
+#ifdef _WIN32
+	long offset;
+#else
+	long long offset;
+#endif
+	fai = (faidx_t*)calloc(1, sizeof(faidx_t));
+	fai->hash = kh_init(s);
+	buf = (char*)calloc(0x10000, 1);
+	while (!feof(fp) && fgets(buf, 0x10000, fp)) {
+		for (p = buf; *p && isgraph(*p); ++p);
+		*p = 0; ++p;
+#ifdef _WIN32
+		sscanf(p, "%d%ld%d%d", &len, &offset, &line_blen, &line_len);
+#else
+		sscanf(p, "%d%lld%d%d", &len, &offset, &line_blen, &line_len);
+#endif
+		fai_insert_index(fai, buf, len, line_len, line_blen, offset);
+	}
+	free(buf);
+	return fai;
+}
+
+void fai_destroy(faidx_t *fai)
+{
+	int i;
+	for (i = 0; i < fai->n; ++i) free(fai->name[i]);
+	free(fai->name);
+	kh_destroy(s, fai->hash);
+	if (fai->bgzf) bgzf_close(fai->bgzf);
+	free(fai);
+}
+
+int fai_build(const char *fn)
+{
+	char *str;
+	BGZF *bgzf;
+	FILE *fp;
+	faidx_t *fai;
+	str = (char*)calloc(strlen(fn) + 5, 1);
+	sprintf(str, "%s.fai", fn);
+	bgzf = bgzf_open(fn, "r");
+	if ( !bgzf ) {
+		fprintf(stderr, "[fai_build] fail to open the FASTA file %s\n",fn);
+		free(str);
+		return -1;
+	}
+    if ( bgzf->is_compressed ) bgzf_index_build_init(bgzf);
+	fai = fai_build_core(bgzf);
+    if ( bgzf->is_compressed ) bgzf_index_dump(bgzf, fn, ".gzi");
+	bgzf_close(bgzf);
+	fp = fopen(str, "wb");
+	if ( !fp ) {
+		fprintf(stderr, "[fai_build] fail to write FASTA index %s\n",str);
+		fai_destroy(fai); free(str);
+		return -1;
+	}
+	fai_save(fai, fp);
+	fclose(fp);
+	free(str);
+	fai_destroy(fai);
+	return 0;
+}
+
+#ifdef _USE_KNETFILE
+FILE *download_and_open(const char *fn)
+{
+    const int buf_size = 1 * 1024 * 1024;
+    uint8_t *buf;
+    FILE *fp;
+    knetFile *fp_remote;
+    const char *url = fn;
+    const char *p;
+    int l = strlen(fn);
+    for (p = fn + l - 1; p >= fn; --p)
+        if (*p == '/') break;
+    fn = p + 1;
+
+    // First try to open a local copy
+    fp = fopen(fn, "r");
+    if (fp)
+        return fp;
+
+    // If failed, download from remote and open
+    fp_remote = knet_open(url, "rb");
+    if (fp_remote == 0) {
+        fprintf(stderr, "[download_from_remote] fail to open remote file %s\n",url);
+        return NULL;
+    }
+    if ((fp = fopen(fn, "wb")) == 0) {
+        fprintf(stderr, "[download_from_remote] fail to create file in the working directory %s\n",fn);
+        knet_close(fp_remote);
+        return NULL;
+    }
+    buf = (uint8_t*)calloc(buf_size, 1);
+    while ((l = knet_read(fp_remote, buf, buf_size)) != 0)
+        fwrite(buf, 1, l, fp);
+    free(buf);
+    fclose(fp);
+    knet_close(fp_remote);
+
+    return fopen(fn, "r");
+}
+#endif
+
+faidx_t *fai_load(const char *fn)
+{
+	char *str;
+	FILE *fp;
+	faidx_t *fai;
+	str = (char*)calloc(strlen(fn) + 5, 1);
+	sprintf(str, "%s.fai", fn);
+
+#ifdef _USE_KNETFILE
+    if (strstr(fn, "ftp://") == fn || strstr(fn, "http://") == fn)
+    {
+        fp = download_and_open(str);
+        if ( !fp )
+        {
+            fprintf(stderr, "[fai_load] failed to open remote FASTA index %s\n", str);
+            free(str);
+            return 0;
+        }
+    }
+    else
+#endif
+        fp = fopen(str, "rb");
+	if (fp == 0) {
+		fprintf(stderr, "[fai_load] build FASTA index.\n");
+		fai_build(fn);
+		fp = fopen(str, "rb");
+		if (fp == 0) {
+			fprintf(stderr, "[fai_load] fail to open FASTA index.\n");
+			free(str);
+			return 0;
+		}
+	}
+
+	fai = fai_read(fp);
+	fclose(fp);
+
+	fai->bgzf = bgzf_open(fn, "rb");
+	free(str);
+	if (fai->bgzf == 0) {
+		fprintf(stderr, "[fai_load] fail to open FASTA file.\n");
+		return 0;
+	}
+    if ( fai->bgzf->is_compressed==1 )
+    {
+        if ( bgzf_index_load(fai->bgzf, fn, ".gzi") < 0 )
+        {
+            fprintf(stderr, "[fai_load] failed to load .gzi index: %s[.gzi]\n", fn);
+            fai_destroy(fai);
+            return NULL;
+        }
+    }
+	return fai;
+}
+
+char *fai_fetch(const faidx_t *fai, const char *str, int *len)
+{
+	char *s, c;
+	int i, l, k, name_end;
+	khiter_t iter;
+	faidx1_t val;
+	khash_t(s) *h;
+	int beg, end;
+
+	beg = end = -1;
+	h = fai->hash;
+	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);
+	if(iter == kh_end(h)) {
+		fprintf(stderr, "[fai_fetch] Warning - Reference %s not found in FASTA file, returning empty sequence\n", str);
+		free(s);
+        *len = -2;
+		return 0;
+	};
+	val = kh_value(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) : 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;
+	free(s);
+
+	// now retrieve the sequence
+	int ret = bgzf_useek(fai->bgzf, val.offset + beg / val.line_blen * val.line_len + beg % val.line_blen, SEEK_SET);
+    if ( ret<0 )
+    {
+        *len = -1;
+        fprintf(stderr, "[fai_fetch] Error: fai_fetch failed. (Seeking in a compressed, .gzi unindexed, file?)\n");
+        return NULL;
+    }
+	l = 0;
+	s = (char*)malloc(end - beg + 2);
+	while ( (c=bgzf_getc(fai->bgzf))>=0 && l < end - beg )
+		if (isgraph(c)) s[l++] = c;
+	s[l] = '\0';
+	*len = l;
+	return s;
+}
+
+int faidx_fetch_nseq(const faidx_t *fai) 
+{
+	return fai->n;
+}
+
+char *faidx_fetch_seq(const faidx_t *fai, const char *c_name, int p_beg_i, int p_end_i, int *len)
+{
+	int l;
+	char c;
+    khiter_t iter;
+    faidx1_t val;
+	char *seq=NULL;
+
+    // Adjust position
+    iter = kh_get(s, fai->hash, c_name);
+    if (iter == kh_end(fai->hash)) 
+    {
+        *len = -2;
+        fprintf(stderr, "[fai_fetch_seq] The sequence \"%s\" not found\n", c_name);
+        return NULL;
+    }
+    val = kh_value(fai->hash, iter);
+	if(p_end_i < p_beg_i) p_beg_i = p_end_i;
+    if(p_beg_i < 0) p_beg_i = 0;
+    else if(val.len <= p_beg_i) p_beg_i = val.len - 1;
+    if(p_end_i < 0) p_end_i = 0;
+    else if(val.len <= p_end_i) p_end_i = val.len - 1;
+
+    // Now retrieve the sequence 
+	int ret = bgzf_useek(fai->bgzf, val.offset + p_beg_i / val.line_blen * val.line_len + p_beg_i % val.line_blen, SEEK_SET);
+    if ( ret<0 )
+    {
+        *len = -1;
+        fprintf(stderr, "[fai_fetch_seq] Error: fai_fetch failed. (Seeking in a compressed, .gzi unindexed, file?)\n");
+        return NULL;
+    }
+	l = 0;
+	seq = (char*)malloc(p_end_i - p_beg_i + 2);
+	while ( (c=bgzf_getc(fai->bgzf))>=0 && l < p_end_i - p_beg_i + 1)
+		if (isgraph(c)) seq[l++] = c;
+	seq[l] = '\0';
+	*len = l;
+	return seq;
+}
+
+
diff --git a/htslib/hfile.c b/htslib/hfile.c
new file mode 100644
index 0000000..0188410
--- /dev/null
+++ b/htslib/hfile.c
@@ -0,0 +1,526 @@
+/*  hfile.c -- buffered low-level input/output streams.
+
+    Copyright (C) 2013-2014 Genome Research Ltd.
+
+    Author: John Marshall <jm18 at sanger.ac.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notices and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "htslib/hfile.h"
+#include "hfile_internal.h"
+
+/* hFILE fields are used as follows:
+
+   char *buffer;     // Pointer to the start of the I/O buffer
+   char *begin;      // First not-yet-read character / unused position
+   char *end;        // First unfilled/unfillable position
+   char *limit;      // Pointer to the first position past the buffer
+
+   const hFILE_backend *backend;  // Methods to refill/flush I/O buffer
+
+   off_t offset;     // Offset within the stream of buffer position 0
+   int at_eof:1;     // For reading, whether EOF has been seen
+   int has_errno;    // Error number from the last failure on this stream
+
+For reading, begin is the first unread character in the buffer and end is the
+first unfilled position:
+
+   -----------ABCDEFGHIJKLMNO---------------
+   ^buffer    ^begin         ^end           ^limit
+
+For writing, begin is the first unused position and end is unused so remains
+equal to buffer:
+
+   ABCDEFGHIJKLMNOPQRSTUVWXYZ---------------
+   ^buffer                   ^begin         ^limit
+   ^end
+
+Thus if begin > end then there is a non-empty write buffer, if begin < end
+then there is a non-empty read buffer, and if begin == end then both buffers
+are empty.  In all cases, the stream's file position indicator corresponds
+to the position pointed to by begin.  */
+
+hFILE *hfile_init(size_t struct_size, const char *mode, size_t capacity)
+{
+    hFILE *fp = (hFILE *) malloc(struct_size);
+    if (fp == NULL) goto error;
+
+    if (capacity == 0) capacity = 32768;
+    // FIXME For now, clamp input buffer sizes so mpileup doesn't eat memory
+    if (strchr(mode, 'r') && capacity > 32768) capacity = 32768;
+
+    fp->buffer = (char *) malloc(capacity);
+    if (fp->buffer == NULL) goto error;
+
+    fp->begin = fp->end = fp->buffer;
+    fp->limit = &fp->buffer[capacity];
+
+    fp->offset = 0;
+    fp->at_eof = 0;
+    fp->has_errno = 0;
+    return fp;
+
+error:
+    hfile_destroy(fp);
+    return NULL;
+}
+
+void hfile_destroy(hFILE *fp)
+{
+    int save = errno;
+    if (fp) free(fp->buffer);
+    free(fp);
+    errno = save;
+}
+
+static inline int writebuffer_is_nonempty(hFILE *fp)
+{
+    return fp->begin > fp->end;
+}
+
+/* Refills the read buffer from the backend (once, so may only partially
+   fill the buffer), returning the number of additional characters read
+   (which might be 0), or negative when an error occurred.  */
+static ssize_t refill_buffer(hFILE *fp)
+{
+    ssize_t n;
+
+    // Move any unread characters to the start of the buffer
+    if (fp->begin > fp->buffer) {
+        fp->offset += fp->begin - fp->buffer;
+        memmove(fp->buffer, fp->begin, fp->end - fp->begin);
+        fp->end = &fp->buffer[fp->end - fp->begin];
+        fp->begin = fp->buffer;
+    }
+
+    // Read into the available buffer space at fp->[end,limit)
+    if (fp->at_eof || fp->end == fp->limit) n = 0;
+    else {
+        n = fp->backend->read(fp, fp->end, fp->limit - fp->end);
+        if (n < 0) { fp->has_errno = errno; return n; }
+        else if (n == 0) fp->at_eof = 1;
+    }
+
+    fp->end += n;
+    return n;
+}
+
+/* Called only from hgetc(), when our buffer is empty.  */
+int hgetc2(hFILE *fp)
+{
+    return (refill_buffer(fp) > 0)? (unsigned char) *(fp->begin++) : EOF;
+}
+
+ssize_t hpeek(hFILE *fp, void *buffer, size_t nbytes)
+{
+    size_t n = fp->end - fp->begin;
+    while (n < nbytes) {
+        ssize_t ret = refill_buffer(fp);
+        if (ret < 0) return ret;
+        else if (ret == 0) break;
+        else n += ret;
+    }
+
+    if (n > nbytes) n = nbytes;
+    memcpy(buffer, fp->begin, n);
+    return n;
+}
+
+/* Called only from hread(); when called, our buffer is empty and nread bytes
+   have already been placed in the destination buffer.  */
+ssize_t hread2(hFILE *fp, void *destv, size_t nbytes, size_t nread)
+{
+    const size_t capacity = fp->limit - fp->buffer;
+    char *dest = (char *) destv;
+    dest += nread, nbytes -= nread;
+
+    // Read large requests directly into the destination buffer
+    while (nbytes * 2 >= capacity && !fp->at_eof) {
+        ssize_t n = fp->backend->read(fp, dest, nbytes);
+        if (n < 0) { fp->has_errno = errno; return n; }
+        else if (n == 0) fp->at_eof = 1;
+        fp->offset += n;
+        dest += n, nbytes -= n;
+        nread += n;
+    }
+
+    while (nbytes > 0 && !fp->at_eof) {
+        size_t n;
+        ssize_t ret = refill_buffer(fp);
+        if (ret < 0) return ret;
+
+        n = fp->end - fp->begin;
+        if (n > nbytes) n = nbytes;
+        memcpy(dest, fp->begin, n);
+        fp->begin += n;
+        dest += n, nbytes -= n;
+        nread += n;
+    }
+
+    return nread;
+}
+
+/* Flushes the write buffer, fp->[buffer,begin), out through the backend
+   returning 0 on success or negative if an error occurred.  */
+static ssize_t flush_buffer(hFILE *fp)
+{
+    const char *buffer = fp->buffer;
+    while (buffer < fp->begin) {
+        ssize_t n = fp->backend->write(fp, buffer, fp->begin - buffer);
+        if (n < 0) { fp->has_errno = errno; return n; }
+        buffer += n;
+        fp->offset += n;
+    }
+
+    fp->begin = fp->buffer;  // Leave the buffer empty
+    return 0;
+}
+
+int hflush(hFILE *fp)
+{
+    if (flush_buffer(fp) < 0) return EOF;
+    if (fp->backend->flush(fp) < 0) { fp->has_errno = errno; return EOF; }
+    return 0;
+}
+
+/* Called only from hputc(), when our buffer is already full.  */
+int hputc2(int c, hFILE *fp)
+{
+    if (flush_buffer(fp) < 0) return EOF;
+    *(fp->begin++) = c;
+    return c;
+}
+
+/* Called only from hwrite() and hputs2(); when called, our buffer is full and
+   ncopied bytes from the source have already been copied to our buffer.  */
+ssize_t hwrite2(hFILE *fp, const void *srcv, size_t totalbytes, size_t ncopied)
+{
+    const char *src = (const char *) srcv;
+    ssize_t ret;
+    const size_t capacity = fp->limit - fp->buffer;
+    size_t remaining = totalbytes - ncopied;
+    src += ncopied;
+
+    ret = flush_buffer(fp);
+    if (ret < 0) return ret;
+
+    // Write large blocks out directly from the source buffer
+    while (remaining * 2 >= capacity) {
+        ssize_t n = fp->backend->write(fp, src, remaining);
+        if (n < 0) { fp->has_errno = errno; return n; }
+        fp->offset += n;
+        src += n, remaining -= n;
+    }
+
+    // Just buffer any remaining characters
+    memcpy(fp->begin, src, remaining);
+    fp->begin += remaining;
+
+    return totalbytes;
+}
+
+/* Called only from hputs(), when our buffer is already full.  */
+int hputs2(const char *text, size_t totalbytes, size_t ncopied, hFILE *fp)
+{
+    return (hwrite2(fp, text, totalbytes, ncopied) >= 0)? 0 : EOF;
+}
+
+off_t hseek(hFILE *fp, off_t offset, int whence)
+{
+    off_t pos;
+
+    if (writebuffer_is_nonempty(fp)) {
+        int ret = flush_buffer(fp);
+        if (ret < 0) return ret;
+    }
+
+    pos = fp->backend->seek(fp, offset, whence);
+    if (pos < 0) { fp->has_errno = errno; return pos; }
+
+    // Seeking succeeded, so discard any non-empty read buffer
+    fp->begin = fp->end = fp->buffer;
+    fp->at_eof = 0;
+
+    fp->offset = pos;
+    return pos;
+}
+
+int hclose(hFILE *fp)
+{
+    int err = fp->has_errno;
+
+    if (writebuffer_is_nonempty(fp) && hflush(fp) < 0) err = fp->has_errno;
+    if (fp->backend->close(fp) < 0) err = errno;
+    hfile_destroy(fp);
+
+    if (err) {
+        errno = err;
+        return EOF;
+    }
+    else return 0;
+}
+
+void hclose_abruptly(hFILE *fp)
+{
+    int save = errno;
+    if (fp->backend->close(fp) < 0) { /* Ignore subsequent errors */ }
+    hfile_destroy(fp);
+    errno = save;
+}
+
+
+/***************************
+ * File descriptor backend *
+ ***************************/
+
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#ifdef _WIN32
+#define HAVE_CLOSESOCKET
+#endif
+
+/* For Unix, it doesn't matter whether a file descriptor is a socket.
+   However Windows insists on send()/recv() and its own closesocket()
+   being used when fd happens to be a socket.  */
+
+typedef struct {
+    hFILE base;
+    int fd;
+    int is_socket:1;
+} hFILE_fd;
+
+static ssize_t fd_read(hFILE *fpv, void *buffer, size_t nbytes)
+{
+    hFILE_fd *fp = (hFILE_fd *) fpv;
+    ssize_t n;
+    do {
+        n = fp->is_socket? recv(fp->fd, buffer, nbytes, 0)
+                         : read(fp->fd, buffer, nbytes);
+    } while (n < 0 && errno == EINTR);
+    return n;
+}
+
+static ssize_t fd_write(hFILE *fpv, const void *buffer, size_t nbytes)
+{
+    hFILE_fd *fp = (hFILE_fd *) fpv;
+    ssize_t n;
+    do {
+        n = fp->is_socket?  send(fp->fd, buffer, nbytes, 0)
+                         : write(fp->fd, buffer, nbytes);
+    } while (n < 0 && errno == EINTR);
+    return n;
+}
+
+static off_t fd_seek(hFILE *fpv, off_t offset, int whence)
+{
+    hFILE_fd *fp = (hFILE_fd *) fpv;
+    return lseek(fp->fd, offset, whence);
+}
+
+static int fd_flush(hFILE *fpv)
+{
+    hFILE_fd *fp = (hFILE_fd *) fpv;
+    int ret;
+    do {
+#ifdef HAVE_FDATASYNC
+        ret = fdatasync(fp->fd);
+#else
+        ret = fsync(fp->fd);
+#endif
+        // Ignore invalid-for-fsync(2) errors due to being, e.g., a pipe,
+        // and operation-not-supported errors (Mac OS X)
+        if (ret < 0 && (errno == EINVAL || errno == ENOTSUP)) ret = 0;
+    } while (ret < 0 && errno == EINTR);
+    return ret;
+}
+
+static int fd_close(hFILE *fpv)
+{
+    hFILE_fd *fp = (hFILE_fd *) fpv;
+    int ret;
+    do {
+#ifdef HAVE_CLOSESOCKET
+        ret = fp->is_socket? closesocket(fp->fd) : close(fp->fd);
+#else
+        ret = close(fp->fd);
+#endif
+    } while (ret < 0 && errno == EINTR);
+    return ret;
+}
+
+static const struct hFILE_backend fd_backend =
+{
+    fd_read, fd_write, fd_seek, fd_flush, fd_close
+};
+
+static size_t blksize(int fd)
+{
+    struct stat sbuf;
+    if (fstat(fd, &sbuf) != 0) return 0;
+    return sbuf.st_blksize;
+}
+
+static hFILE *hopen_fd(const char *filename, const char *mode)
+{
+    hFILE_fd *fp = NULL;
+    int fd = open(filename, hfile_oflags(mode), 0666);
+    if (fd < 0) goto error;
+
+    fp = (hFILE_fd *) hfile_init(sizeof (hFILE_fd), mode, blksize(fd));
+    if (fp == NULL) goto error;
+
+    fp->fd = fd;
+    fp->is_socket = 0;
+    fp->base.backend = &fd_backend;
+    return &fp->base;
+
+error:
+    if (fd >= 0) { int save = errno; (void) close(fd); errno = save; }
+    hfile_destroy((hFILE *) fp);
+    return NULL;
+}
+
+hFILE *hdopen(int fd, const char *mode)
+{
+    hFILE_fd *fp = (hFILE_fd*) hfile_init(sizeof (hFILE_fd), mode, blksize(fd));
+    if (fp == NULL) return NULL;
+
+    fp->fd = fd;
+    fp->is_socket = (strchr(mode, 's') != NULL);
+    fp->base.backend = &fd_backend;
+    return &fp->base;
+}
+
+static hFILE *hopen_fd_stdinout(const char *mode)
+{
+    int fd = (strchr(mode, 'r') != NULL)? STDIN_FILENO : STDOUT_FILENO;
+    // TODO Set binary mode (for Windows)
+    return hdopen(fd, mode);
+}
+
+int hfile_oflags(const char *mode)
+{
+    int rdwr = 0, flags = 0;
+    const char *s;
+    for (s = mode; *s; s++)
+        switch (*s) {
+        case 'r': rdwr = O_RDONLY;  break;
+        case 'w': rdwr = O_WRONLY; flags |= O_CREAT | O_TRUNC;  break;
+        case 'a': rdwr = O_WRONLY; flags |= O_CREAT | O_APPEND;  break;
+        case '+': rdwr = O_RDWR;  break;
+        default:  break;
+        }
+
+#ifdef O_BINARY
+    flags |= O_BINARY;
+#endif
+
+    return rdwr | flags;
+}
+
+
+/*********************
+ * In-memory backend *
+ *********************/
+
+typedef struct {
+    hFILE base;
+    const char *buffer;
+    size_t length, pos;
+} hFILE_mem;
+
+static ssize_t mem_read(hFILE *fpv, void *buffer, size_t nbytes)
+{
+    hFILE_mem *fp = (hFILE_mem *) fpv;
+    size_t avail = fp->length - fp->pos;
+    if (nbytes > avail) nbytes = avail;
+    memcpy(buffer, fp->buffer + fp->pos, nbytes);
+    fp->pos += nbytes;
+    return nbytes;
+}
+
+static off_t mem_seek(hFILE *fpv, off_t offset, int whence)
+{
+    hFILE_mem *fp = (hFILE_mem *) fpv;
+    size_t absoffset = (offset >= 0)? offset : -offset;
+    size_t origin;
+
+    switch (whence) {
+    case SEEK_SET: origin = 0; break;
+    case SEEK_CUR: origin = fp->pos; break;
+    case SEEK_END: origin = fp->length; break;
+    default: errno = EINVAL; return -1;
+    }
+
+    if ((offset  < 0 && absoffset > origin) ||
+        (offset >= 0 && absoffset > fp->length - origin)) {
+        errno = EINVAL;
+        return -1;
+    }
+
+    fp->pos = origin + offset;
+    return fp->pos;
+}
+
+static int mem_close(hFILE *fpv)
+{
+    return 0;
+}
+
+static const struct hFILE_backend mem_backend =
+{
+    mem_read, NULL, mem_seek, NULL, mem_close
+};
+
+static hFILE *hopen_mem(const char *data, const char *mode)
+{
+    // TODO Implement write modes, which will require memory allocation
+    if (strchr(mode, 'r') == NULL) { errno = EINVAL; return NULL; }
+
+    hFILE_mem *fp = (hFILE_mem *) hfile_init(sizeof (hFILE_mem), mode, 0);
+    if (fp == NULL) return NULL;
+
+    fp->buffer = data;
+    fp->length = strlen(data);
+    fp->pos = 0;
+    fp->base.backend = &mem_backend;
+    return &fp->base;
+}
+
+
+/******************************
+ * hopen() backend dispatcher *
+ ******************************/
+
+hFILE *hopen(const char *fname, const char *mode)
+{
+    if (strncmp(fname, "http://", 7) == 0 ||
+        strncmp(fname, "ftp://", 6) == 0) return hopen_net(fname, mode);
+    else if (strncmp(fname, "data:", 5) == 0) return hopen_mem(fname + 5, mode);
+    else if (strcmp(fname, "-") == 0) return hopen_fd_stdinout(mode);
+    else return hopen_fd(fname, mode);
+}
diff --git a/htslib/hfile_internal.h b/htslib/hfile_internal.h
new file mode 100644
index 0000000..88b0c8e
--- /dev/null
+++ b/htslib/hfile_internal.h
@@ -0,0 +1,75 @@
+/*  hfile_internal.h -- internal parts of low-level input/output streams.
+
+    Copyright (C) 2013-2014 Genome Research Ltd.
+
+    Author: John Marshall <jm18 at sanger.ac.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notices and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.  */
+
+#ifndef HFILE_INTERNAL_H
+#define HFILE_INTERNAL_H
+
+#include "htslib/hfile.h"
+
+struct hFILE_backend {
+    /* As per read(2), returning the number of bytes read (possibly 0) or
+       negative (and setting errno) on errors.  Front-end code will call this
+       repeatedly if necessary to attempt to get the desired byte count.  */
+    ssize_t (*read)(hFILE *fp, void *buffer, size_t nbytes) HTS_RESULT_USED;
+
+    /* As per write(2), returning the number of bytes written or negative (and
+       setting errno) on errors.  Front-end code will call this repeatedly if
+       necessary until the desired block is written or an error occurs.  */
+    ssize_t (*write)(hFILE *fp, const void *buffer, size_t nbytes)
+        HTS_RESULT_USED;
+
+    /* As per lseek(2), returning the resulting offset within the stream or
+       negative (and setting errno) on errors.  */
+    off_t (*seek)(hFILE *fp, off_t offset, int whence) HTS_RESULT_USED;
+
+    /* Performs low-level flushing, if any, e.g., fsync(2); for writing streams
+       only.  Returns 0 for success or negative (and sets errno) on errors. */
+    int (*flush)(hFILE *fp) HTS_RESULT_USED;
+
+    /* Closes the underlying stream (for output streams, the buffer will
+       already have been flushed), returning 0 for success or negative (and
+       setting errno) on errors, as per close(2).  */
+    int (*close)(hFILE *fp) HTS_RESULT_USED;
+};
+
+/* These are called from the hopen() dispatcher, and should call hfile_init()
+   to malloc a struct "derived" from hFILE and initialise it appropriately,
+   including setting base.backend to their own backend vector.  */
+hFILE *hopen_net(const char *filename, const char *mode);
+
+/* May be called by hopen_*() functions to decode a fopen()-style mode into
+   open(2)-style flags.  */
+int hfile_oflags(const char *mode);
+
+/* Must be called by hopen_*() functions to allocate the hFILE struct and set
+   up its base.  Capacity is a suggested buffer size (e.g., via fstat(2))
+   or 0 for a default-sized buffer.  */
+hFILE *hfile_init(size_t struct_size, const char *mode, size_t capacity);
+
+/* May be called by hopen_*() functions to undo the effects of hfile_init()
+   in the event opening the stream subsequently fails.  (This is safe to use
+   even if fp is NULL.  This takes care to preserve errno.)  */
+void hfile_destroy(hFILE *fp);
+
+#endif
diff --git a/htslib/hfile_net.c b/htslib/hfile_net.c
new file mode 100644
index 0000000..53eda94
--- /dev/null
+++ b/htslib/hfile_net.c
@@ -0,0 +1,99 @@
+/*  hfile_net.c -- network backend for low-level input/output streams.
+
+    Copyright (C) 2013-2014 Genome Research Ltd.
+
+    Author: John Marshall <jm18 at sanger.ac.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notices and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.  */
+
+#include <stdlib.h>
+#include <errno.h>
+
+#include "hfile_internal.h"
+
+#include "htslib/knetfile.h"
+
+typedef struct {
+    hFILE base;
+    knetFile *netfp;
+} hFILE_net;
+
+static int net_inited = 0;
+
+#ifdef _WIN32
+static void net_exit(void)
+{
+    knet_win32_destroy();
+}
+#endif
+
+static int net_init(void)
+{
+#ifdef _WIN32
+    if (knet_win32_init() != 0) return -1;
+
+    // In the unlikely event atexit() fails, it's better to succeed here and
+    // carry on and do the I/O; then eventually when the program exits, we'll
+    // merely have failed to clean up properly, as if we had aborted.
+    (void) atexit(net_exit);
+#endif
+
+    net_inited = 1;
+    return 0;
+}
+
+static ssize_t net_read(hFILE *fpv, void *buffer, size_t nbytes)
+{
+    hFILE_net *fp = (hFILE_net *) fpv;
+    return knet_read(fp->netfp, buffer, nbytes);
+}
+
+static off_t net_seek(hFILE *fpv, off_t offset, int whence)
+{
+    hFILE_net *fp = (hFILE_net *) fpv;
+    return knet_seek(fp->netfp, offset, whence);
+}
+
+static int net_close(hFILE *fpv)
+{
+    hFILE_net *fp = (hFILE_net *) fpv;
+    return knet_close(fp->netfp);
+}
+
+static const struct hFILE_backend net_backend =
+{
+    net_read, NULL, net_seek, NULL, net_close
+};
+
+hFILE *hopen_net(const char *filename, const char *mode)
+{
+    hFILE_net *fp;
+
+    // Do any networking initialisation if this is the first use.
+    if (! net_inited) { if (net_init() < 0) return NULL; }
+
+    fp = (hFILE_net *) hfile_init(sizeof (hFILE_net), mode, 0);
+    if (fp == NULL) return NULL;
+
+    fp->netfp = knet_open(filename, mode);
+    if (fp->netfp == NULL) { hfile_destroy((hFILE *) fp); return NULL; }
+
+    fp->base.backend = &net_backend;
+    return &fp->base;
+}
diff --git a/htslib/hts.c b/htslib/hts.c
new file mode 100644
index 0000000..87f88a9
--- /dev/null
+++ b/htslib/hts.c
@@ -0,0 +1,1326 @@
+#include <zlib.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include "htslib/bgzf.h"
+#include "htslib/hts.h"
+#include "cram/cram.h"
+#include "htslib/hfile.h"
+#include "version.h"
+
+#include "htslib/kseq.h"
+#define KS_BGZF 1
+#if KS_BGZF
+    // bgzf now supports gzip-compressed files
+    KSTREAM_INIT2(, BGZF*, bgzf_read, 65536)
+#else
+    KSTREAM_INIT2(, gzFile, gzread, 16384)
+#endif
+
+#include "htslib/khash.h"
+KHASH_INIT2(s2i,, kh_cstr_t, int64_t, 1, kh_str_hash_func, kh_str_hash_equal)
+
+int hts_verbose = 3;
+
+const char *hts_version()
+{
+	return HTS_VERSION;
+}
+
+const 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,
+	 1, 2, 4, 8, 15,15,15,15, 15,15,15,15, 15, 0 /*=*/,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, 15,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, 15,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
+};
+
+const char seq_nt16_str[] = "=ACMGRSVTWYHKDBN";
+
+/**********************
+ *** Basic file I/O ***
+ **********************/
+
+// Decompress up to ten or so bytes by peeking at the file, which must be
+// positioned at the start of a GZIP block.
+static size_t decompress_peek(hFILE *fp, unsigned char *dest, size_t destsize)
+{
+	// Typically at most a couple of hundred bytes of input are required
+	// to get a few bytes of output from inflate(), so hopefully this buffer
+	// size suffices in general.
+	unsigned char buffer[512];
+	z_stream zs;
+	ssize_t npeek = hpeek(fp, buffer, sizeof buffer);
+
+	if (npeek < 0) return 0;
+
+	zs.zalloc = NULL;
+	zs.zfree = NULL;
+	zs.next_in = buffer;
+	zs.avail_in = npeek;
+	zs.next_out = dest;
+	zs.avail_out = destsize;
+	if (inflateInit2(&zs, 31) != Z_OK) return 0;
+
+	while (zs.total_out < destsize)
+		if (inflate(&zs, Z_SYNC_FLUSH) != Z_OK) break;
+
+	destsize = zs.total_out;
+	inflateEnd(&zs);
+
+	return destsize;
+}
+
+// Returns whether the block contains any control characters, i.e.,
+// characters less than SPACE other than whitespace etc (ASCII BEL..CR).
+static int is_binary(unsigned char *s, size_t n)
+{
+	size_t i;
+	for (i = 0; i < n; i++)
+		if (s[i] < 0x07 || (s[i] >= 0x0e && s[i] < 0x20)) return 1;
+	return 0;
+}
+
+htsFile *hts_open(const char *fn, const char *mode)
+{
+	htsFile *fp = NULL;
+	hFILE *hfile = hopen(fn, mode);
+	if (hfile == NULL) goto error;
+
+	fp = (htsFile*)calloc(1, sizeof(htsFile));
+	if (fp == NULL) goto error;
+
+	fp->fn = strdup(fn);
+	fp->is_be = ed_is_big();
+
+	if (strchr(mode, 'r')) {
+		unsigned char s[18];
+		if (hpeek(hfile, s, 6) == 6 && memcmp(s, "CRAM", 4) == 0 &&
+			s[4] >= 1 && s[4] <= 2 && s[5] <= 1) {
+			fp->is_cram = 1;
+		}
+		else if (hpeek(hfile, s, 18) == 18 && s[0] == 0x1f && s[1] == 0x8b &&
+				 (s[3] & 4) && memcmp(&s[12], "BC\2\0", 4) == 0) {
+			// The stream is BGZF-compressed.  Decompress a few bytes to see
+			// whether it's in a binary format (e.g., BAM or BCF, starting
+			// with four bytes of magic including a control character) or is
+			// a bgzipped SAM or VCF text file.
+			fp->is_compressed = 1;
+			if (is_binary(s, decompress_peek(hfile, s, 4))) fp->is_bin = 1;
+			else fp->is_kstream = 1;
+		}
+		else if (hpeek(hfile, s, 2) == 2 && s[0] == 0x1f && s[1] == 0x8b) {
+			// Plain GZIP header... so a gzipped text file.
+			fp->is_compressed = 1;
+			fp->is_kstream = 1;
+		}
+		else if (hpeek(hfile, s, 4) == 4 && is_binary(s, 4)) {
+			// Binary format, but in a raw non-compressed form.
+			fp->is_bin = 1;
+		}
+		else {
+			fp->is_kstream = 1;
+		}
+	}
+	else if (strchr(mode, 'w') || strchr(mode, 'a')) {
+		fp->is_write = 1;
+		if (strchr(mode, 'b')) fp->is_bin = 1;
+		if (strchr(mode, 'c')) fp->is_cram = 1;
+		if (strchr(mode, 'z')) fp->is_compressed = 1;
+		else if (strchr(mode, 'u')) fp->is_compressed = 0;
+		else fp->is_compressed = 2;    // not set, default behaviour
+	}
+	else goto error;
+
+	if (fp->is_bin || (fp->is_write && fp->is_compressed==1)) {
+		fp->fp.bgzf = bgzf_hopen(hfile, mode);
+		if (fp->fp.bgzf == NULL) goto error;
+	}
+	else if (fp->is_cram) {
+		fp->fp.cram = cram_dopen(hfile, fn, mode);
+		if (fp->fp.cram == NULL) goto error;
+		if (!fp->is_write)
+		    cram_set_option(fp->fp.cram, CRAM_OPT_DECODE_MD, 1);
+
+	}
+	else if (fp->is_kstream) {
+	#if KS_BGZF
+		BGZF *gzfp = bgzf_hopen(hfile, mode);
+	#else
+		// TODO Implement gzip hFILE adaptor
+		hclose(hfile); // This won't work, especially for stdin
+		gzFile gzfp = strcmp(fn, "-")? gzopen(fn, "rb") : gzdopen(fileno(stdin), "rb");
+	#endif
+		if (gzfp) fp->fp.voidp = ks_init(gzfp);
+		else goto error;
+	}
+	else {
+		fp->fp.hfile = hfile;
+	}
+
+	return fp;
+
+error:
+	if (hts_verbose >= 2)
+		fprintf(stderr, "[E::%s] fail to open file '%s'\n", __func__, fn);
+
+	if (hfile)
+		hclose_abruptly(hfile);
+
+	if (fp) {
+		free(fp->fn);
+		free(fp->fn_aux);
+		free(fp);
+	}
+	return NULL;
+}
+
+int hts_close(htsFile *fp)
+{
+	int ret, save;
+
+	if (fp->is_bin || (fp->is_write && fp->is_compressed==1)) {
+		ret = bgzf_close(fp->fp.bgzf);
+	} else if (fp->is_cram) {
+		if (!fp->is_write) {
+			switch (cram_eof(fp->fp.cram)) {
+			case 0:
+				fprintf(stderr, "[E::%s] Failed to decode sequence.\n", __func__);
+				return -1;
+			case 2:
+				fprintf(stderr, "[W::%s] EOF marker is absent. The input is probably truncated.\n", __func__);
+				break;
+			default: /* case 1, expected EOF */
+				break;
+			}
+		}
+		ret = cram_close(fp->fp.cram);
+	} else if (fp->is_kstream) {
+	#if KS_BGZF
+		BGZF *gzfp = ((kstream_t*)fp->fp.voidp)->f;
+		ret = bgzf_close(gzfp);
+	#else
+		gzFile gzfp = ((kstream_t*)fp->fp.voidp)->f;
+		ret = gzclose(gzfp);
+	#endif
+		ks_destroy((kstream_t*)fp->fp.voidp);
+	} else {
+		ret = hclose(fp->fp.hfile);
+	}
+
+	save = errno;
+	free(fp->fn);
+	free(fp->fn_aux);
+    free(fp->line.s);
+	free(fp);
+	errno = save;
+	return ret;
+}
+
+int hts_set_threads(htsFile *fp, int n)
+{
+	// TODO Plug in CRAM and other threading
+	if (fp->is_bin) {
+		return bgzf_mt(fp->fp.bgzf, n, 256);
+	}
+	else return 0;
+}
+
+int hts_set_fai_filename(htsFile *fp, const char *fn_aux)
+{
+	free(fp->fn_aux);
+	if (fn_aux) {
+		fp->fn_aux = strdup(fn_aux);
+		if (fp->fn_aux == NULL) return -1;
+	}
+	else fp->fn_aux = NULL;
+
+	return 0;
+}
+
+// For VCF/BCF backward sweeper. Not exposing these functions because their
+// future is uncertain. Things will probably have to change with hFILE...
+BGZF *hts_get_bgzfp(htsFile *fp)
+{
+    if ( fp->is_bin )
+        return fp->fp.bgzf;
+    else
+        return ((kstream_t*)fp->fp.voidp)->f;
+}
+int hts_useek(htsFile *fp, long uoffset, int where)
+{
+    if ( fp->is_bin )
+        return bgzf_useek(fp->fp.bgzf, uoffset, where);
+    else
+    {
+        ks_rewind((kstream_t*)fp->fp.voidp);
+        ((kstream_t*)fp->fp.voidp)->seek_pos = uoffset;
+        return bgzf_useek(((kstream_t*)fp->fp.voidp)->f, uoffset, where);
+    }
+}
+long hts_utell(htsFile *fp)
+{
+    if ( fp->is_bin )
+        return bgzf_utell(fp->fp.bgzf);
+    else
+        return ((kstream_t*)fp->fp.voidp)->seek_pos;
+}
+
+int hts_getline(htsFile *fp, int delimiter, kstring_t *str)
+{
+	int ret, dret;
+	ret = ks_getuntil((kstream_t*)fp->fp.voidp, delimiter, str, &dret);
+	++fp->lineno;
+	return ret;
+}
+
+char **hts_readlist(const char *string, int is_file, int *_n)
+{
+    int m = 0, n = 0, dret;
+    char **s = 0;
+    if ( is_file )
+    {
+#if KS_BGZF
+        BGZF *fp = bgzf_open(string, "r");
+#else
+        gzFile fp = gzopen(string, "r");
+#endif
+        if ( !fp ) return NULL;
+
+        kstream_t *ks;
+        kstring_t str;
+        str.s = 0; str.l = str.m = 0;
+        ks = ks_init(fp);
+        while (ks_getuntil(ks, KS_SEP_LINE, &str, &dret) >= 0) 
+        {
+            if (str.l == 0) continue;
+            n++;
+            hts_expand(char*,n,m,s);
+            s[n-1] = strdup(str.s);
+        }
+        ks_destroy(ks);
+#if KS_BGZF
+        bgzf_close(fp);
+#else
+        gzclose(fp);
+#endif
+        free(str.s);        
+    }
+    else
+    {
+        const char *q = string, *p = string;
+        while ( 1 )
+        {
+            if (*p == ',' || *p == 0) 
+            {
+                n++;
+                hts_expand(char*,n,m,s);
+                s[n-1] = (char*)calloc(p - q + 1, 1);
+                strncpy(s[n-1], q, p - q);
+                q = p + 1;
+            }
+            if ( !*p ) break;
+            p++;
+        }
+    }
+    s = (char**)realloc(s, n * sizeof(char*));
+    *_n = n;
+    return s;
+}
+
+char **hts_readlines(const char *fn, int *_n)
+{
+	int m = 0, n = 0, dret;
+	char **s = 0;
+#if KS_BGZF
+	BGZF *fp = bgzf_open(fn, "r");
+#else
+	gzFile fp = gzopen(fn, "r");
+#endif
+	if ( fp ) { // read from file
+		kstream_t *ks;
+		kstring_t str;
+		str.s = 0; str.l = str.m = 0;
+		ks = ks_init(fp);
+		while (ks_getuntil(ks, KS_SEP_LINE, &str, &dret) >= 0) {
+			if (str.l == 0) continue;
+			if (m == n) {
+				m = m? m<<1 : 16;
+				s = (char**)realloc(s, m * sizeof(char*));
+			}
+			s[n++] = strdup(str.s);
+		}
+		ks_destroy(ks);
+        #if KS_BGZF
+            bgzf_close(fp);
+        #else
+		    gzclose(fp);
+        #endif
+		s = (char**)realloc(s, n * sizeof(char*));
+		free(str.s);
+	} else if (*fn == ':') { // read from string
+		const char *q, *p;
+		for (q = p = fn + 1;; ++p)
+			if (*p == ',' || *p == 0) {
+				if (m == n) {
+					m = m? m<<1 : 16;
+					s = (char**)realloc(s, m * sizeof(char*));
+				}
+				s[n] = (char*)calloc(p - q + 1, 1);
+				strncpy(s[n++], q, p - q);
+				q = p + 1;
+				if (*p == 0) break;
+			}
+	} else return 0;
+	s = (char**)realloc(s, n * sizeof(char*));
+	*_n = n;
+	return s;
+}
+
+int hts_file_type(const char *fname)
+{
+    int len = strlen(fname);
+    if ( !strcasecmp(".vcf.gz",fname+len-7) ) return FT_VCF_GZ;
+    if ( !strcasecmp(".vcf",fname+len-4) ) return FT_VCF;
+    if ( !strcasecmp(".bcf",fname+len-4) ) return FT_BCF_GZ;
+    if ( !strcmp("-",fname) ) return FT_STDIN;
+    // ... etc
+
+    int fd = open(fname, O_RDONLY);
+    if ( !fd ) return 0;
+
+    uint8_t magic[5];
+    if ( read(fd,magic,2)!=2 ) { close(fd); return 0; }
+    if ( !strncmp((char*)magic,"##",2) ) { close(fd); return FT_VCF; }
+    if ( !strncmp((char*)magic,"BCF",3) ) { close(fd); return FT_BCF; }
+    close(fd);
+
+    if ( magic[0]==0x1f && magic[1]==0x8b ) // compressed
+    {
+        BGZF *fp = bgzf_open(fname, "r");
+        if ( !fp ) return 0;
+        if ( bgzf_read(fp, magic, 3)!=3 ) { bgzf_close(fp); return 0; }
+        bgzf_close(fp);
+        if ( !strncmp((char*)magic,"##",2) ) return FT_VCF;
+        if ( !strncmp((char*)magic,"BCF",3) ) return FT_BCF_GZ;
+    }
+    return 0;
+}
+
+/****************
+ *** Indexing ***
+ ****************/
+
+#define HTS_MIN_MARKER_DIST 0x10000
+
+// Finds the special meta bin
+//  ((1<<(3 * n_lvls + 3)) - 1) / 7 + 1
+#define META_BIN(idx) ((idx)->n_bins + 1)
+
+#define pair64_lt(a,b) ((a).u < (b).u)
+
+#include "htslib/ksort.h"
+KSORT_INIT(_off, hts_pair64_t, pair64_lt)
+
+typedef struct {
+	int32_t m, n;
+	uint64_t loff;
+	hts_pair64_t *list;
+} bins_t;
+
+#include "htslib/khash.h"
+KHASH_MAP_INIT_INT(bin, bins_t)
+typedef khash_t(bin) bidx_t;
+
+typedef struct {
+	int32_t n, m;
+	uint64_t *offset;
+} lidx_t;
+
+struct __hts_idx_t {
+	int fmt, min_shift, n_lvls, n_bins;
+	uint32_t l_meta;
+	int32_t n, m;
+	uint64_t n_no_coor;
+	bidx_t **bidx;
+	lidx_t *lidx;
+	uint8_t *meta;
+	struct {
+		uint32_t last_bin, save_bin;
+		int last_coor, last_tid, save_tid, finished;
+		uint64_t last_off, save_off;
+		uint64_t off_beg, off_end;
+		uint64_t n_mapped, n_unmapped;
+	} z; // keep internal states
+};
+
+static inline void insert_to_b(bidx_t *b, int bin, uint64_t beg, uint64_t end)
+{
+	khint_t k;
+	bins_t *l;
+	int absent;
+	k = kh_put(bin, b, bin, &absent);
+	l = &kh_value(b, k);
+	if (absent) {
+		l->m = 1; l->n = 0;
+		l->list = (hts_pair64_t*)calloc(l->m, 16);
+	}
+	if (l->n == l->m) {
+		l->m <<= 1;
+		l->list = (hts_pair64_t*)realloc(l->list, l->m * 16);
+	}
+	l->list[l->n].u = beg;
+	l->list[l->n++].v = end;
+}
+
+static inline void insert_to_l(lidx_t *l, int64_t _beg, int64_t _end, uint64_t offset, int min_shift)
+{
+	int i, beg, end;
+	beg = _beg >> min_shift;
+	end = (_end - 1) >> min_shift;
+	if (l->m < end + 1) {
+		int old_m = l->m;
+		l->m = end + 1;
+		kroundup32(l->m);
+		l->offset = (uint64_t*)realloc(l->offset, l->m * 8);
+		memset(l->offset + old_m, 0xff, 8 * (l->m - old_m)); // fill l->offset with (uint64_t)-1
+	}
+	if (beg == end) { // to save a loop in this case
+		if (l->offset[beg] == (uint64_t)-1) l->offset[beg] = offset;
+	} else {
+		for (i = beg; i <= end; ++i)
+			if (l->offset[i] == (uint64_t)-1) l->offset[i] = offset;
+	}
+	if (l->n < end + 1) l->n = end + 1;
+}
+
+hts_idx_t *hts_idx_init(int n, int fmt, uint64_t offset0, int min_shift, int n_lvls)
+{
+	hts_idx_t *idx;
+	idx = (hts_idx_t*)calloc(1, sizeof(hts_idx_t));
+	if (idx == NULL) return NULL;
+	idx->fmt = fmt;
+	idx->min_shift = min_shift;
+	idx->n_lvls = n_lvls;
+	idx->n_bins = ((1<<(3 * n_lvls + 3)) - 1) / 7;
+	idx->z.save_bin = idx->z.save_tid = idx->z.last_tid = idx->z.last_bin = 0xffffffffu;
+	idx->z.save_off = idx->z.last_off = idx->z.off_beg = idx->z.off_end = offset0;
+	idx->z.last_coor = 0xffffffffu;
+	if (n) {
+		idx->n = idx->m = n;
+		idx->bidx = (bidx_t**)calloc(n, sizeof(bidx_t*));
+		if (idx->bidx == NULL) { free(idx); return NULL; }
+		idx->lidx = (lidx_t*) calloc(n, sizeof(lidx_t));
+		if (idx->lidx == NULL) { free(idx->bidx); free(idx); return NULL; }
+	}
+	return idx;
+}
+
+static void update_loff(hts_idx_t *idx, int i, int free_lidx)
+{
+	bidx_t *bidx = idx->bidx[i];
+	lidx_t *lidx = &idx->lidx[i];
+	khint_t k;
+	int l;
+	uint64_t offset0 = 0;
+	if (bidx) {
+		k = kh_get(bin, bidx, META_BIN(idx));
+		if (k != kh_end(bidx))
+			offset0 = kh_val(bidx, k).list[0].u;
+		for (l = 0; l < lidx->n && lidx->offset[l] == (uint64_t)-1; ++l)
+			lidx->offset[l] = offset0;
+	} else l = 1;
+	for (; l < lidx->n; ++l) // fill missing values
+		if (lidx->offset[l] == (uint64_t)-1)
+			lidx->offset[l] = lidx->offset[l-1];
+	if (bidx == 0) return;
+	for (k = kh_begin(bidx); k != kh_end(bidx); ++k) // set loff
+		if (kh_exist(bidx, k))
+			kh_val(bidx, k).loff = kh_key(bidx, k) < idx->n_bins? lidx->offset[hts_bin_bot(kh_key(bidx, k), idx->n_lvls)] : 0;
+	if (free_lidx) {
+		free(lidx->offset);
+		lidx->m = lidx->n = 0;
+		lidx->offset = 0;
+	}
+}
+
+static void compress_binning(hts_idx_t *idx, int i)
+{
+	bidx_t *bidx = idx->bidx[i];
+	khint_t k;
+	int l, m;
+	if (bidx == 0) return;
+	// merge a bin to its parent if the bin is too small
+	for (l = idx->n_lvls; l > 0; --l) {
+		unsigned start = hts_bin_first(l);
+		for (k = kh_begin(bidx); k != kh_end(bidx); ++k) {
+			bins_t *p, *q;
+			if (!kh_exist(bidx, k) || kh_key(bidx, k) >= idx->n_bins || kh_key(bidx, k) < start) continue;
+			p = &kh_value(bidx, k);
+			if (l < idx->n_lvls && p->n > 1) ks_introsort(_off, p->n, p->list);
+			if ((p->list[p->n - 1].v>>16) - (p->list[0].u>>16) < HTS_MIN_MARKER_DIST) {
+				khint_t kp;
+				kp = kh_get(bin, bidx, hts_bin_parent(kh_key(bidx, k)));
+				if (kp == kh_end(bidx)) continue;
+				q = &kh_val(bidx, kp);
+				if (q->n + p->n > q->m) {
+					q->m = q->n + p->n;
+					kroundup32(q->m);
+					q->list = (hts_pair64_t*)realloc(q->list, q->m * 16);
+				}
+				memcpy(q->list + q->n, p->list, p->n * 16);
+				q->n += p->n;
+				free(p->list);
+				kh_del(bin, bidx, k);
+			}
+		}
+	}
+	k = kh_get(bin, bidx, 0);
+	if (k != kh_end(bidx)) ks_introsort(_off, kh_val(bidx, k).n, kh_val(bidx, k).list);
+	// merge adjacent chunks that start from the same BGZF block
+	for (k = kh_begin(bidx); k != kh_end(bidx); ++k) {
+		bins_t *p;
+		if (!kh_exist(bidx, k) || kh_key(bidx, k) >= idx->n_bins) continue;
+		p = &kh_value(bidx, k);
+		for (l = 1, m = 0; l < p->n; ++l) {
+			if (p->list[m].v>>16 >= p->list[l].u>>16) {
+				if (p->list[m].v < p->list[l].v) p->list[m].v = p->list[l].v;
+			} else p->list[++m] = p->list[l];
+		}
+		p->n = m + 1;
+	}
+}
+
+void hts_idx_finish(hts_idx_t *idx, uint64_t final_offset)
+{
+	int i;
+	if (idx == NULL || idx->z.finished) return; // do not run this function on an empty index or multiple times
+	if (idx->z.save_tid >= 0) {
+		insert_to_b(idx->bidx[idx->z.save_tid], idx->z.save_bin, idx->z.save_off, final_offset);
+		insert_to_b(idx->bidx[idx->z.save_tid], META_BIN(idx), idx->z.off_beg, final_offset);
+		insert_to_b(idx->bidx[idx->z.save_tid], META_BIN(idx), idx->z.n_mapped, idx->z.n_unmapped);
+	}
+	for (i = 0; i < idx->n; ++i) {
+		update_loff(idx, i, (idx->fmt == HTS_FMT_CSI));
+		compress_binning(idx, i);
+	}
+	idx->z.finished = 1;
+}
+
+int hts_idx_push(hts_idx_t *idx, int tid, int beg, int end, uint64_t offset, int is_mapped)
+{
+	int bin;
+	if (tid >= idx->m) { // enlarge the index
+		int32_t oldm = idx->m;
+		idx->m = idx->m? idx->m<<1 : 2;
+		idx->bidx = (bidx_t**)realloc(idx->bidx, idx->m * sizeof(bidx_t*));
+		idx->lidx = (lidx_t*) realloc(idx->lidx, idx->m * sizeof(lidx_t));
+		memset(&idx->bidx[oldm], 0, (idx->m - oldm) * sizeof(bidx_t*));
+		memset(&idx->lidx[oldm], 0, (idx->m - oldm) * sizeof(lidx_t));
+	}
+	if (idx->n < tid + 1) idx->n = tid + 1;
+	if (idx->z.finished) return 0;
+	if (idx->z.last_tid != tid || (idx->z.last_tid >= 0 && tid < 0)) { // change of chromosome
+        if ( tid>=0 && idx->n_no_coor )
+        {
+            if (hts_verbose >= 1) fprintf(stderr,"[E::%s] NO_COOR reads not in a single block at the end %d %d\n", __func__, tid,idx->z.last_tid);
+            return -1;
+        }
+        if (tid>=0 && idx->bidx[tid] != 0)
+        {
+            if (hts_verbose >= 1) fprintf(stderr, "[E::%s] chromosome blocks not continuous\n", __func__);
+            return -1;
+        }
+		idx->z.last_tid = tid;
+		idx->z.last_bin = 0xffffffffu;
+	} else if (tid >= 0 && idx->z.last_coor > beg) { // test if positions are out of order
+		if (hts_verbose >= 1) fprintf(stderr, "[E::%s] unsorted positions\n", __func__);
+		return -1;
+	}
+    if ( tid>=0 )
+    {
+	    if (idx->bidx[tid] == 0) idx->bidx[tid] = kh_init(bin);
+        if ( is_mapped)
+            insert_to_l(&idx->lidx[tid], beg, end, idx->z.last_off, idx->min_shift); // last_off points to the start of the current record
+    }
+	else idx->n_no_coor++;
+	bin = hts_reg2bin(beg, end, idx->min_shift, idx->n_lvls);
+	if ((int)idx->z.last_bin != bin) { // then possibly write the binning index
+		if (idx->z.save_bin != 0xffffffffu) // save_bin==0xffffffffu only happens to the first record
+			insert_to_b(idx->bidx[idx->z.save_tid], idx->z.save_bin, idx->z.save_off, idx->z.last_off);
+		if (idx->z.last_bin == 0xffffffffu && idx->z.save_bin != 0xffffffffu) { // change of chr; keep meta information
+			idx->z.off_end = idx->z.last_off;
+			insert_to_b(idx->bidx[idx->z.save_tid], META_BIN(idx), idx->z.off_beg, idx->z.off_end);
+			insert_to_b(idx->bidx[idx->z.save_tid], META_BIN(idx), idx->z.n_mapped, idx->z.n_unmapped);
+			idx->z.n_mapped = idx->z.n_unmapped = 0;
+			idx->z.off_beg = idx->z.off_end;
+		}
+		idx->z.save_off = idx->z.last_off;
+		idx->z.save_bin = idx->z.last_bin = bin;
+		idx->z.save_tid = tid;
+		if (tid < 0) { // come to the end of the records having coordinates
+			hts_idx_finish(idx, offset);
+			return 0;
+		}
+	}
+	if (is_mapped) ++idx->z.n_mapped;
+	else ++idx->z.n_unmapped;
+	idx->z.last_off = offset;
+	idx->z.last_coor = beg;
+	return 0;
+}
+
+void hts_idx_destroy(hts_idx_t *idx)
+{
+	khint_t k;
+	int i;
+	if (idx == 0) return;
+	// For HTS_FMT_CRAI, idx actually points to a different type -- see sam.c
+	if (idx->fmt == HTS_FMT_CRAI) { free(idx); return; }
+
+	for (i = 0; i < idx->m; ++i) {
+		bidx_t *bidx = idx->bidx[i];
+		free(idx->lidx[i].offset);
+		if (bidx == 0) continue;
+		for (k = kh_begin(bidx); k != kh_end(bidx); ++k)
+			if (kh_exist(bidx, k))
+				free(kh_value(bidx, k).list);
+		kh_destroy(bin, bidx);
+	}
+	free(idx->bidx); free(idx->lidx); free(idx->meta);
+	free(idx);
+}
+
+static inline long idx_read(int is_bgzf, void *fp, void *buf, long l)
+{
+	if (is_bgzf) return bgzf_read((BGZF*)fp, buf, l);
+	else return (long)fread(buf, 1, l, (FILE*)fp);
+}
+
+static inline long idx_write(int is_bgzf, void *fp, const void *buf, long l)
+{
+	if (is_bgzf) return bgzf_write((BGZF*)fp, buf, l);
+	else return (long)fwrite(buf, 1, l, (FILE*)fp);
+}
+
+static inline void swap_bins(bins_t *p)
+{
+	int i;
+	for (i = 0; i < p->n; ++i) {
+		ed_swap_8p(&p->list[i].u);
+		ed_swap_8p(&p->list[i].v);
+	}
+}
+
+static void hts_idx_save_core(const hts_idx_t *idx, void *fp, int fmt)
+{
+	int32_t i, size, is_be;
+	int is_bgzf = (fmt != HTS_FMT_BAI);
+	is_be = ed_is_big();
+	if (is_be) {
+		uint32_t x = idx->n;
+		idx_write(is_bgzf, fp, ed_swap_4p(&x), 4);
+	} else idx_write(is_bgzf, fp, &idx->n, 4);
+	if (fmt == HTS_FMT_TBI && idx->l_meta) idx_write(is_bgzf, fp, idx->meta, idx->l_meta);
+	for (i = 0; i < idx->n; ++i) {
+		khint_t k;
+		bidx_t *bidx = idx->bidx[i];
+		lidx_t *lidx = &idx->lidx[i];
+		// write binning index
+		size = bidx? kh_size(bidx) : 0;
+		if (is_be) { // big endian
+			uint32_t x = size;
+			idx_write(is_bgzf, fp, ed_swap_4p(&x), 4);
+		} else idx_write(is_bgzf, fp, &size, 4);
+		if (bidx == 0) goto write_lidx;
+		for (k = kh_begin(bidx); k != kh_end(bidx); ++k) {
+			bins_t *p;
+			if (!kh_exist(bidx, k)) continue;
+			p = &kh_value(bidx, k);
+			if (is_be) { // big endian
+				uint32_t x;
+				x = kh_key(bidx, k); idx_write(is_bgzf, fp, ed_swap_4p(&x), 4);
+				if (fmt == HTS_FMT_CSI) {
+					uint64_t y = kh_val(bidx, k).loff;
+					idx_write(is_bgzf, fp, ed_swap_4p(&y), 8);
+				}
+				x = p->n; idx_write(is_bgzf, fp, ed_swap_4p(&x), 4);
+				swap_bins(p);
+				idx_write(is_bgzf, fp, p->list, 16 * p->n);
+				swap_bins(p);
+			} else {
+				idx_write(is_bgzf, fp, &kh_key(bidx, k), 4);
+				if (fmt == HTS_FMT_CSI) idx_write(is_bgzf, fp, &kh_val(bidx, k).loff, 8);
+				//int j;for(j=0;j<p->n;++j)fprintf(stderr,"%d,%llx,%d,%llx:%llx\n",kh_key(bidx,k),kh_val(bidx, k).loff,j,p->list[j].u,p->list[j].v);
+				idx_write(is_bgzf, fp, &p->n, 4);
+				idx_write(is_bgzf, fp, p->list, p->n << 4);
+			}
+		}
+write_lidx:
+		if (fmt != HTS_FMT_CSI) {
+			if (is_be) {
+				int32_t x = lidx->n;
+				idx_write(is_bgzf, fp, ed_swap_4p(&x), 4);
+				for (x = 0; x < lidx->n; ++x) ed_swap_8p(&lidx->offset[x]);
+				idx_write(is_bgzf, fp, lidx->offset, lidx->n << 3);
+				for (x = 0; x < lidx->n; ++x) ed_swap_8p(&lidx->offset[x]);
+			} else {
+				idx_write(is_bgzf, fp, &lidx->n, 4);
+				idx_write(is_bgzf, fp, lidx->offset, lidx->n << 3);
+			}
+		}
+	}
+	if (is_be) { // write the number of reads without coordinates
+		uint64_t x = idx->n_no_coor;
+		idx_write(is_bgzf, fp, &x, 8);
+	} else idx_write(is_bgzf, fp, &idx->n_no_coor, 8);
+}
+
+void hts_idx_save(const hts_idx_t *idx, const char *fn, int fmt)
+{
+	char *fnidx;
+	fnidx = (char*)calloc(1, strlen(fn) + 5);
+	strcpy(fnidx, fn);
+	if (fmt == HTS_FMT_CSI) {
+		BGZF *fp;
+		uint32_t x[3];
+		int is_be, i;
+		is_be = ed_is_big();
+		fp = bgzf_open(strcat(fnidx, ".csi"), "w");
+		bgzf_write(fp, "CSI\1", 4);
+		x[0] = idx->min_shift; x[1] = idx->n_lvls; x[2] = idx->l_meta;
+		if (is_be) {
+			for (i = 0; i < 3; ++i)
+				bgzf_write(fp, ed_swap_4p(&x[i]), 4);
+		} else bgzf_write(fp, &x, 12);
+		if (idx->l_meta) bgzf_write(fp, idx->meta, idx->l_meta);
+		hts_idx_save_core(idx, fp, HTS_FMT_CSI);
+		bgzf_close(fp);
+	} else if (fmt == HTS_FMT_TBI) {
+		BGZF *fp;
+		fp = bgzf_open(strcat(fnidx, ".tbi"), "w");
+		bgzf_write(fp, "TBI\1", 4);
+		hts_idx_save_core(idx, fp, HTS_FMT_TBI);
+		bgzf_close(fp);
+	} else if (fmt == HTS_FMT_BAI) {
+		FILE *fp;
+		fp = fopen(strcat(fnidx, ".bai"), "w");
+		fwrite("BAI\1", 1, 4, fp);
+		hts_idx_save_core(idx, fp, HTS_FMT_BAI);
+		fclose(fp);
+	} else abort();
+	free(fnidx);
+}
+
+static int hts_idx_load_core(hts_idx_t *idx, void *fp, int fmt)
+{
+	int32_t i, n, is_be;
+	int is_bgzf = (fmt != HTS_FMT_BAI);
+	is_be = ed_is_big();
+	if (idx == NULL) return -4;
+	for (i = 0; i < idx->n; ++i) {
+		bidx_t *h;
+		lidx_t *l = &idx->lidx[i];
+		uint32_t key;
+		int j, absent;
+		bins_t *p;
+		h = idx->bidx[i] = kh_init(bin);
+		if (idx_read(is_bgzf, fp, &n, 4) != 4) return -1;
+		if (is_be) ed_swap_4p(&n);
+		for (j = 0; j < n; ++j) {
+			khint_t k;
+			if (idx_read(is_bgzf, fp, &key, 4) != 4) return -1;
+			if (is_be) ed_swap_4p(&key);
+			k = kh_put(bin, h, key, &absent);
+			if (absent <= 0) return -3; // Duplicate bin number
+			p = &kh_val(h, k);
+			if (fmt == HTS_FMT_CSI) {
+				if (idx_read(is_bgzf, fp, &p->loff, 8) != 8) return -1;
+				if (is_be) ed_swap_8p(&p->loff);
+			} else p->loff = 0;
+			if (idx_read(is_bgzf, fp, &p->n, 4) != 4) return -1;
+			if (is_be) ed_swap_4p(&p->n);
+			p->m = p->n;
+			p->list = (hts_pair64_t*)malloc(p->m * 16);
+			if (p->list == NULL) return -2;
+			if (idx_read(is_bgzf, fp, p->list, p->n<<4) != p->n<<4) return -1;
+			if (is_be) swap_bins(p);
+		}
+		if (fmt != HTS_FMT_CSI) { // load linear index
+			int j;
+			if (idx_read(is_bgzf, fp, &l->n, 4) != 4) return -1;
+			if (is_be) ed_swap_4p(&l->n);
+			l->m = l->n;
+			l->offset = (uint64_t*)malloc(l->n << 3);
+			if (l->offset == NULL) return -2;
+			if (idx_read(is_bgzf, fp, l->offset, l->n << 3) != l->n << 3) return -1;
+			if (is_be) for (j = 0; j < l->n; ++j) ed_swap_8p(&l->offset[j]);
+			for (j = 1; j < l->n; ++j) // fill missing values; may happen given older samtools and tabix
+				if (l->offset[j] == 0) l->offset[j] = l->offset[j-1];
+			update_loff(idx, i, 1);
+		}
+	}
+	if (idx_read(is_bgzf, fp, &idx->n_no_coor, 8) != 8) idx->n_no_coor = 0;
+	if (is_be) ed_swap_8p(&idx->n_no_coor);
+	return 0;
+}
+
+hts_idx_t *hts_idx_load_local(const char *fn, int fmt)
+{
+	uint8_t magic[4];
+	int i, is_be;
+	hts_idx_t *idx = NULL;
+	is_be = ed_is_big();
+	if (fmt == HTS_FMT_CSI) {
+		BGZF *fp;
+		uint32_t x[3], n;
+		uint8_t *meta = 0;
+		if ((fp = bgzf_open(fn, "r")) == 0) return NULL;
+		if (bgzf_read(fp, magic, 4) != 4) goto csi_fail;
+		if (memcmp(magic, "CSI\1", 4) != 0) goto csi_fail;
+		if (bgzf_read(fp, x, 12) != 12) goto csi_fail;
+		if (is_be) for (i = 0; i < 3; ++i) ed_swap_4p(&x[i]);
+		if (x[2]) {
+			if ((meta = (uint8_t*)malloc(x[2])) == NULL) goto csi_fail;
+			if (bgzf_read(fp, meta, x[2]) != x[2]) goto csi_fail;
+		}
+		if (bgzf_read(fp, &n, 4) != 4) goto csi_fail;
+		if (is_be) ed_swap_4p(&n);
+		if ((idx = hts_idx_init(n, fmt, 0, x[0], x[1])) == NULL) goto csi_fail;
+		idx->l_meta = x[2];
+		idx->meta = meta;
+		meta = NULL;
+		if (hts_idx_load_core(idx, fp, HTS_FMT_CSI) < 0) goto csi_fail;
+		bgzf_close(fp);
+		return idx;
+
+	csi_fail:
+		bgzf_close(fp);
+		hts_idx_destroy(idx);
+		free(meta);
+		return NULL;
+
+	} else if (fmt == HTS_FMT_TBI) {
+		BGZF *fp;
+		uint32_t x[8];
+		if ((fp = bgzf_open(fn, "r")) == 0) return NULL;
+		if (bgzf_read(fp, magic, 4) != 4) goto tbi_fail;
+		if (memcmp(magic, "TBI\1", 4) != 0) goto tbi_fail;
+		if (bgzf_read(fp, x, 32) != 32) goto tbi_fail;
+		if (is_be) for (i = 0; i < 8; ++i) ed_swap_4p(&x[i]);
+		if ((idx = hts_idx_init(x[0], fmt, 0, 14, 5)) == NULL) goto tbi_fail;
+		idx->l_meta = 28 + x[7];
+		if ((idx->meta = (uint8_t*)malloc(idx->l_meta)) == NULL) goto tbi_fail;
+		memcpy(idx->meta, &x[1], 28);
+		if (bgzf_read(fp, idx->meta + 28, x[7]) != x[7]) goto tbi_fail;
+		if (hts_idx_load_core(idx, fp, HTS_FMT_TBI) < 0) goto tbi_fail;
+		bgzf_close(fp);
+		return idx;
+
+	tbi_fail:
+		bgzf_close(fp);
+		hts_idx_destroy(idx);
+		return NULL;
+
+	} else if (fmt == HTS_FMT_BAI) {
+		uint32_t n;
+		FILE *fp;
+		if ((fp = fopen(fn, "rb")) == 0) return NULL;
+		if (fread(magic, 1, 4, fp) != 4) goto bai_fail;
+		if (memcmp(magic, "BAI\1", 4) != 0) goto bai_fail;
+		if (fread(&n, 4, 1, fp) != 1) goto bai_fail;
+		if (is_be) ed_swap_4p(&n);
+		idx = hts_idx_init(n, fmt, 0, 14, 5);
+		if (hts_idx_load_core(idx, fp, HTS_FMT_BAI) < 0) goto bai_fail;
+		fclose(fp);
+		return idx;
+
+	bai_fail:
+		fclose(fp);
+		hts_idx_destroy(idx);
+		return NULL;
+
+	} else abort();
+}
+
+void hts_idx_set_meta(hts_idx_t *idx, int l_meta, uint8_t *meta, int is_copy)
+{
+	if (idx->meta) free(idx->meta);
+	idx->l_meta = l_meta;
+	if (is_copy) {
+		idx->meta = (uint8_t*)malloc(l_meta);
+		memcpy(idx->meta, meta, l_meta);
+	} else idx->meta = meta;
+}
+
+uint8_t *hts_idx_get_meta(hts_idx_t *idx, int *l_meta)
+{
+	*l_meta = idx->l_meta;
+	return idx->meta;
+}
+
+const char **hts_idx_seqnames(const hts_idx_t *idx, int *n, hts_id2name_f getid, void *hdr)
+{
+    if ( !idx->n )
+    {
+        *n = 0;
+        return NULL;
+    }
+
+    int tid = 0, i;
+    const char **names = (const char**) calloc(idx->n,sizeof(const char*));
+    for (i=0; i<idx->n; i++)
+    {
+        bidx_t *bidx = idx->bidx[i];
+        if ( !bidx ) continue;
+        names[tid++] = getid(hdr,i);
+    }
+    *n = tid;
+    return names;
+}
+
+int hts_idx_get_stat(const hts_idx_t* idx, int tid, uint64_t* mapped, uint64_t* unmapped)
+{
+	if ( idx->fmt == HTS_FMT_CRAI ) {
+		*mapped = 0; *unmapped = 0;
+		return -1;
+	}
+
+	bidx_t *h = idx->bidx[tid];
+	khint_t k = kh_get(bin, h, META_BIN(idx));
+	if (k != kh_end(h)) {
+		*mapped = kh_val(h, k).list[1].u;
+		*unmapped = kh_val(h, k).list[1].v;
+		return 0;
+	} else {
+		*mapped = 0; *unmapped = 0;
+		return -1;
+	}
+}
+
+uint64_t hts_idx_get_n_no_coor(const hts_idx_t* idx)
+{
+	return idx->n_no_coor;
+}
+
+/****************
+ *** Iterator ***
+ ****************/
+
+static inline int reg2bins(int64_t beg, int64_t end, hts_itr_t *itr, int min_shift, int n_lvls)
+{
+	int l, t, s = min_shift + (n_lvls<<1) + n_lvls;
+	if (beg >= end) return 0;
+	if (end >= 1LL<<s) end = 1LL<<s;
+	for (--end, l = 0, t = 0; l <= n_lvls; s -= 3, t += 1<<((l<<1)+l), ++l) {
+		int b, e, n, i;
+		b = t + (beg>>s); e = t + (end>>s); n = e - b + 1;
+		if (itr->bins.n + n > itr->bins.m) {
+			itr->bins.m = itr->bins.n + n;
+			kroundup32(itr->bins.m);
+			itr->bins.a = (int*)realloc(itr->bins.a, sizeof(int) * itr->bins.m);
+		}
+		for (i = b; i <= e; ++i) itr->bins.a[itr->bins.n++] = i;
+	}
+	return itr->bins.n;
+}
+
+hts_itr_t *hts_itr_query(const hts_idx_t *idx, int tid, int beg, int end, hts_readrec_func *readrec)
+{
+	int i, n_off, l, bin;
+	hts_pair64_t *off;
+	khint_t k;
+	bidx_t *bidx;
+	uint64_t min_off;
+	hts_itr_t *iter = 0;
+	if (tid < 0) {
+		int finished0 = 0;
+		uint64_t off0 = (uint64_t)-1;
+		khint_t k;
+		switch (tid) {
+		case HTS_IDX_START:
+            // Find the smallest offset, note that sequence ids may not be ordered sequentially
+            for (i=0; i<idx->n; i++)
+            {
+                bidx = idx->bidx[i];
+                k = kh_get(bin, bidx, META_BIN(idx));
+                if (k == kh_end(bidx)) continue;
+                if ( off0 > kh_val(bidx, k).list[0].u ) off0 = kh_val(bidx, k).list[0].u;
+            }
+            if ( off0==(uint64_t)-1 && idx->n_no_coor ) off0 = 0; // only no-coor reads in this bam
+            break;
+
+		case HTS_IDX_NOCOOR:
+            if ( idx->n>0 )
+            {
+                bidx = idx->bidx[idx->n - 1];
+                k = kh_get(bin, bidx, META_BIN(idx));
+                if (k != kh_end(bidx)) off0 = kh_val(bidx, k).list[0].v;
+            }
+            if ( off0==(uint64_t)-1 && idx->n_no_coor ) off0 = 0; // only no-coor reads in this bam
+			break;
+
+		case HTS_IDX_REST:
+			off0 = 0;
+			break;
+
+		case HTS_IDX_NONE:
+			finished0 = 1;
+			off0 = 0;
+			break;
+
+		default:
+			return 0;
+		}
+		if (off0 != (uint64_t)-1) {
+			iter = (hts_itr_t*)calloc(1, sizeof(hts_itr_t));
+			iter->read_rest = 1;
+			iter->finished = finished0;
+			iter->curr_off = off0;
+			iter->readrec = readrec;
+			return iter;
+		} else return 0;
+	}
+
+	if (beg < 0) beg = 0;
+	if (end < beg) return 0;
+	if ((bidx = idx->bidx[tid]) == 0) return 0;
+
+	iter = (hts_itr_t*)calloc(1, sizeof(hts_itr_t));
+	iter->tid = tid, iter->beg = beg, iter->end = end; iter->i = -1;
+	iter->readrec = readrec;
+
+	// compute min_off
+	bin = hts_bin_first(idx->n_lvls) + (beg>>idx->min_shift);
+	do {
+		int first;
+		k = kh_get(bin, bidx, bin);
+		if (k != kh_end(bidx)) break;
+		first = (hts_bin_parent(bin)<<3) + 1;
+		if (bin > first) --bin;
+		else bin = hts_bin_parent(bin);
+	} while (bin);
+	if (bin == 0) k = kh_get(bin, bidx, bin);
+	min_off = k != kh_end(bidx)? kh_val(bidx, k).loff : 0;
+	// retrieve bins
+	reg2bins(beg, end, iter, idx->min_shift, idx->n_lvls);
+	for (i = n_off = 0; i < iter->bins.n; ++i)
+		if ((k = kh_get(bin, bidx, iter->bins.a[i])) != kh_end(bidx))
+			n_off += kh_value(bidx, k).n;
+	if (n_off == 0) return iter;
+	off = (hts_pair64_t*)calloc(n_off, 16);
+	for (i = n_off = 0; i < iter->bins.n; ++i) {
+		if ((k = kh_get(bin, bidx, iter->bins.a[i])) != kh_end(bidx)) {
+			int j;
+			bins_t *p = &kh_value(bidx, k);
+			for (j = 0; j < p->n; ++j)
+				if (p->list[j].v > min_off) off[n_off++] = p->list[j];
+		}
+	}
+	if (n_off == 0) {
+		free(off); return iter;
+	}
+	ks_introsort(_off, n_off, off);
+	// resolve completely contained adjacent blocks
+	for (i = 1, l = 0; i < n_off; ++i)
+		if (off[l].v < off[i].v) off[++l] = off[i];
+	n_off = l + 1;
+	// resolve overlaps between adjacent blocks; this may happen due to the merge in indexing
+	for (i = 1; i < n_off; ++i)
+		if (off[i-1].v >= off[i].u) off[i-1].v = off[i].u;
+	// merge adjacent blocks
+	for (i = 1, l = 0; i < n_off; ++i) {
+		if (off[l].v>>16 == off[i].u>>16) off[l].v = off[i].v;
+		else off[++l] = off[i];
+	}
+	n_off = l + 1;
+	iter->n_off = n_off; iter->off = off;
+	return iter;
+}
+
+void hts_itr_destroy(hts_itr_t *iter)
+{
+	if (iter) { free(iter->off); free(iter->bins.a); free(iter); }
+}
+
+const char *hts_parse_reg(const char *s, int *beg, int *end)
+{
+	int i, k, l, name_end;
+	*beg = *end = -1;
+	name_end = l = strlen(s);
+	// 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
+	}
+	// parse the interval
+	if (name_end < l) {
+		char *tmp;
+		tmp = (char*)alloca(l - name_end + 1);
+		for (i = name_end + 1, k = 0; i < l; ++i)
+			if (s[i] != ',') tmp[k++] = s[i];
+		tmp[k] = 0;
+		if ((*beg = strtol(tmp, &tmp, 10) - 1) < 0) *beg = 0;
+		*end = *tmp? strtol(tmp + 1, &tmp, 10) : 1<<29;
+		if (*beg > *end) name_end = l;
+	}
+	if (name_end == l) *beg = 0, *end = 1<<29;
+	return s + name_end;
+}
+
+hts_itr_t *hts_itr_querys(const hts_idx_t *idx, const char *reg, hts_name2id_f getid, void *hdr, hts_itr_query_func *itr_query, hts_readrec_func *readrec)
+{
+	int tid, beg, end;
+	char *q, *tmp;
+	if (strcmp(reg, ".") == 0)
+		return itr_query(idx, HTS_IDX_START, 0, 1<<29, readrec);
+	else if (strcmp(reg, "*") != 0) {
+		q = (char*)hts_parse_reg(reg, &beg, &end);
+		tmp = (char*)alloca(q - reg + 1);
+		strncpy(tmp, reg, q - reg);
+		tmp[q - reg] = 0;
+		if ((tid = getid(hdr, tmp)) < 0)
+			tid = getid(hdr, reg);
+		if (tid < 0) return 0;
+		return itr_query(idx, tid, beg, end, readrec);
+	} else return itr_query(idx, HTS_IDX_NOCOOR, 0, 0, readrec);
+}
+
+int hts_itr_next(BGZF *fp, hts_itr_t *iter, void *r, void *data)
+{
+	int ret, tid, beg, end;
+	if (iter == NULL || iter->finished) return -1;
+	if (iter->read_rest) {
+		if (iter->curr_off) { // seek to the start
+			bgzf_seek(fp, iter->curr_off, SEEK_SET);
+			iter->curr_off = 0; // only seek once
+		}
+		ret = iter->readrec(fp, data, r, &tid, &beg, &end);
+		if (ret < 0) iter->finished = 1;
+		return ret;
+	}
+	if (iter->off == 0) return -1;
+	for (;;) {
+		if (iter->curr_off == 0 || iter->curr_off >= iter->off[iter->i].v) { // then jump to the next chunk
+			if (iter->i == iter->n_off - 1) { ret = -1; break; } // no more chunks
+			if (iter->i < 0 || iter->off[iter->i].v != iter->off[iter->i+1].u) { // not adjacent chunks; then seek
+				bgzf_seek(fp, iter->off[iter->i+1].u, SEEK_SET);
+				iter->curr_off = bgzf_tell(fp);
+			}
+			++iter->i;
+		}
+		if ((ret = iter->readrec(fp, data, r, &tid, &beg, &end)) >= 0) {
+			iter->curr_off = bgzf_tell(fp);
+			if (tid != iter->tid || beg >= iter->end) { // no need to proceed
+				ret = -1; break;
+			} else if (end > iter->beg && iter->end > beg) return ret;
+		} else break; // end of file or error
+	}
+	iter->finished = 1;
+	return ret;
+}
+
+/**********************
+ *** Retrieve index ***
+ **********************/
+
+static char *test_and_fetch(const char *fn)
+{
+	FILE *fp;
+	// FIXME Use is_remote_scheme() helper that's true for ftp/http/irods/etc
+	if (strstr(fn, "ftp://") == fn || strstr(fn, "http://") == fn) {
+		const int buf_size = 1 * 1024 * 1024;
+		hFILE *fp_remote;
+		uint8_t *buf;
+		int l;
+		const char *p;
+		for (p = fn + strlen(fn) - 1; p >= fn; --p)
+			if (*p == '/') break;
+		++p; // p now points to the local file name
+		if ((fp_remote = hopen(fn, "r")) == 0) {
+			if (hts_verbose >= 1) fprintf(stderr, "[E::%s] fail to open remote file '%s'\n", __func__, fn);
+			return 0;
+		}
+		if ((fp = fopen(p, "w")) == 0) {
+			if (hts_verbose >= 1) fprintf(stderr, "[E::%s] fail to create file '%s' in the working directory\n", __func__, p);
+			hclose_abruptly(fp_remote);
+			return 0;
+		}
+		if (hts_verbose >= 3) fprintf(stderr, "[M::%s] downloading file '%s' to local directory\n", __func__, fn);
+		buf = (uint8_t*)calloc(buf_size, 1);
+		while ((l = hread(fp_remote, buf, buf_size)) > 0) fwrite(buf, 1, l, fp);
+		free(buf);
+		fclose(fp);
+		if (hclose(fp_remote) != 0) fprintf(stderr, "[E::%s] fail to close remote file '%s'\n", __func__, fn);
+		return (char*)p;
+	} else {
+		if ((fp = fopen(fn, "rb")) == 0) return 0;
+		fclose(fp);
+		return (char*)fn;
+	}
+}
+
+char *hts_idx_getfn(const char *fn, const char *ext)
+{
+	int i, l_fn, l_ext;
+	char *fnidx, *ret;
+	l_fn = strlen(fn); l_ext = strlen(ext);
+	fnidx = (char*)calloc(l_fn + l_ext + 1, 1);
+	strcpy(fnidx, fn); strcpy(fnidx + l_fn, ext);
+	if ((ret = test_and_fetch(fnidx)) == 0) {
+		for (i = l_fn - 1; i > 0; --i)
+			if (fnidx[i] == '.') break;
+		strcpy(fnidx + i, ext);
+		ret = test_and_fetch(fnidx);
+	}
+	if (ret == 0) {
+		free(fnidx);
+		return 0;
+	}
+	l_fn = strlen(ret);
+	memmove(fnidx, ret, l_fn + 1);
+	return fnidx;
+}
+
+hts_idx_t *hts_idx_load(const char *fn, int fmt)
+{
+	char *fnidx;
+	hts_idx_t *idx;
+	fnidx = hts_idx_getfn(fn, ".csi");
+	if (fnidx) fmt = HTS_FMT_CSI;
+	else fnidx = hts_idx_getfn(fn, fmt == HTS_FMT_BAI? ".bai" : ".tbi");
+	if (fnidx == 0) return 0;
+
+    // Check that the index file is up to date, the main file might have changed
+    struct stat stat_idx,stat_main;
+    if ( !stat(fn, &stat_main) && !stat(fnidx, &stat_idx) )
+    {
+        if ( stat_idx.st_mtime < stat_main.st_mtime )
+            fprintf(stderr, "Warning: The index file is older than the data file: %s\n", fnidx);
+    }
+	idx = hts_idx_load_local(fnidx, fmt);
+	free(fnidx);
+	return idx;
+}
diff --git a/tabix/__init__.py b/htslib/htslib/__init__.py
similarity index 100%
rename from tabix/__init__.py
rename to htslib/htslib/__init__.py
diff --git a/htslib/htslib/bgzf.h b/htslib/htslib/bgzf.h
new file mode 100644
index 0000000..1edce41
--- /dev/null
+++ b/htslib/htslib/bgzf.h
@@ -0,0 +1,313 @@
+/* The MIT License
+
+   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
+                 2011, 2012 Attractive Chaos <attractor at 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"), to deal
+   in the Software without restriction, including without limitation the rights
+   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+   copies of the Software, and to permit persons to whom the Software is
+   furnished to do so, subject to the following conditions:
+
+   The above copyright notice and this permission notice shall be included in
+   all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+   THE SOFTWARE.
+*/
+
+/* The BGZF library was originally written by Bob Handsaker from the Broad
+ * Institute. It was later improved by the SAMtools developers. */
+
+#ifndef __BGZF_H
+#define __BGZF_H
+
+#include <stdint.h>
+#include <stdio.h>
+#include <zlib.h>
+#include <sys/types.h>
+
+#define BGZF_BLOCK_SIZE     0xff00 // make sure compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE
+#define BGZF_MAX_BLOCK_SIZE 0x10000
+
+#define BGZF_ERR_ZLIB   1
+#define BGZF_ERR_HEADER 2
+#define BGZF_ERR_IO     4
+#define BGZF_ERR_MISUSE 8
+
+struct hFILE;
+struct bgzf_mtaux_t;
+typedef struct __bgzidx_t bgzidx_t;
+
+struct BGZF {
+	int errcode:16, is_write:2, is_be:2, compress_level:9, is_compressed:2, is_gzip:1;
+	int cache_size;
+    int block_length, block_offset;
+    int64_t block_address, uncompressed_address;
+    void *uncompressed_block, *compressed_block;
+	void *cache; // a pointer to a hash table
+    struct hFILE *fp; // actual file handle
+    struct bgzf_mtaux_t *mt; // only used for multi-threading
+    bgzidx_t *idx;      // BGZF index
+    int idx_build_otf;  // build index on the fly, set by bgzf_index_build_init()
+    z_stream *gz_stream;// for gzip-compressed files
+};
+#ifndef HTS_BGZF_TYPEDEF
+typedef struct BGZF BGZF;
+#define HTS_BGZF_TYPEDEF
+#endif
+
+#ifndef KSTRING_T
+#define KSTRING_T kstring_t
+typedef struct __kstring_t {
+	size_t l, m;
+	char *s;
+} kstring_t;
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	/******************
+	 * Basic routines *
+	 ******************/
+
+	/**
+	 * Open an existing file descriptor for reading or writing.
+	 *
+	 * @param fd    file descriptor
+	 * @param mode  mode matching /[rwa][u0-9]+/: 'r' for reading, 'w' for
+	 *              writing, or 'a' for appending, while a digit specifies
+	 *              the zlib compression level.
+     *              Note that there is a distinction between 'u' and '0': the
+     *              first yields plain uncompressed output whereas the latter
+     *              outputs uncompressed data wrapped in the zlib format.
+	 * @return      BGZF file handler; 0 on error
+	 */
+	BGZF* bgzf_dopen(int fd, const char *mode);
+
+	#define bgzf_fdopen(fd, mode) bgzf_dopen((fd), (mode)) // for backward compatibility
+
+	/**
+	 * Open the specified file for reading or writing.
+	 */
+	BGZF* bgzf_open(const char* path, const char *mode);
+
+	/**
+	 * Open an existing hFILE stream for reading or writing.
+	 */
+	BGZF* bgzf_hopen(struct hFILE *fp, const char *mode);
+
+	/**
+	 * Close the BGZF and free all associated resources.
+	 *
+	 * @param fp    BGZF file handler
+	 * @return      0 on success and -1 on error
+	 */
+	int bgzf_close(BGZF *fp);
+
+	/**
+	 * Read up to _length_ bytes from the file storing into _data_.
+	 *
+	 * @param fp     BGZF file handler
+	 * @param data   data array to read into
+	 * @param length size of data to read
+	 * @return       number of bytes actually read; 0 on end-of-file and -1 on error
+	 */
+	ssize_t bgzf_read(BGZF *fp, void *data, size_t length);
+
+	/**
+	 * Write _length_ bytes from _data_ to the file.  If no I/O errors occur,
+	 * the complete _length_ bytes will be written (or queued for writing).
+	 *
+	 * @param fp     BGZF file handler
+	 * @param data   data array to write
+	 * @param length size of data to write
+	 * @return       number of bytes written (i.e., _length_); negative on error
+	 */
+	ssize_t bgzf_write(BGZF *fp, const void *data, size_t length);
+
+	/**
+	 * Read up to _length_ bytes directly from the underlying stream without
+	 * decompressing.  Bypasses BGZF blocking, so must be used with care in
+	 * specialised circumstances only.
+	 *
+	 * @param fp     BGZF file handler
+	 * @param data   data array to read into
+	 * @param length number of raw bytes to read
+	 * @return       number of bytes actually read; 0 on end-of-file and -1 on error
+	 */
+	ssize_t bgzf_raw_read(BGZF *fp, void *data, size_t length);
+
+	/**
+	 * Write _length_ bytes directly to the underlying stream without
+	 * compressing.  Bypasses BGZF blocking, so must be used with care
+	 * in specialised circumstances only.
+	 *
+	 * @param fp     BGZF file handler
+	 * @param data   data array to write
+	 * @param length number of raw bytes to write
+	 * @return       number of bytes actually written; -1 on error
+	 */
+	ssize_t bgzf_raw_write(BGZF *fp, const void *data, size_t length);
+
+	/**
+	 * Write the data in the buffer to the file.
+	 */
+	int bgzf_flush(BGZF *fp);
+
+	/**
+	 * Return a virtual file pointer to the current location in the file.
+	 * No interpetation of the value should be made, other than a subsequent
+	 * call to bgzf_seek can be used to position the file at the same point.
+	 * Return value is non-negative on success.
+	 */
+	#define bgzf_tell(fp) (((fp)->block_address << 16) | ((fp)->block_offset & 0xFFFF))
+
+	/**
+	 * Set the file to read from the location specified by _pos_.
+	 *
+	 * @param fp     BGZF file handler
+	 * @param pos    virtual file offset returned by bgzf_tell()
+	 * @param whence must be SEEK_SET
+	 * @return       0 on success and -1 on error
+	 */
+	int64_t bgzf_seek(BGZF *fp, int64_t pos, int whence);
+
+	/**
+	 * Check if the BGZF end-of-file (EOF) marker is present
+	 *
+	 * @param fp    BGZF file handler opened for reading
+	 * @return      1 if the EOF marker is present and correct;
+	 *              2 if it can't be checked, e.g., because fp isn't seekable;
+	 *              0 if the EOF marker is absent;
+	 *              -1 (with errno set) on error
+	 */
+	int bgzf_check_EOF(BGZF *fp);
+
+	/**
+	 * Check if a file is in the BGZF format
+	 *
+	 * @param fn    file name
+	 * @return      1 if _fn_ is BGZF; 0 if not or on I/O error
+	 */
+	 int bgzf_is_bgzf(const char *fn);
+
+	/*********************
+	 * Advanced routines *
+	 *********************/
+
+	/**
+	 * Set the cache size. Only effective when compiled with -DBGZF_CACHE.
+	 *
+	 * @param fp    BGZF file handler
+	 * @param size  size of cache in bytes; 0 to disable caching (default)
+	 */
+	void bgzf_set_cache_size(BGZF *fp, int size);
+
+	/**
+	 * Flush the file if the remaining buffer size is smaller than _size_ 
+	 * @return      0 if flushing succeeded or was not needed; negative on error
+	 */
+	int bgzf_flush_try(BGZF *fp, ssize_t size);
+
+	/**
+	 * Read one byte from a BGZF file. It is faster than bgzf_read()
+	 * @param fp     BGZF file handler
+	 * @return       byte read; -1 on end-of-file or error
+	 */
+	int bgzf_getc(BGZF *fp);
+
+	/**
+	 * Read one line from a BGZF file. It is faster than bgzf_getc()
+	 *
+	 * @param fp     BGZF file handler
+	 * @param delim  delimitor
+	 * @param str    string to write to; must be initialized
+	 * @return       length of the string; 0 on end-of-file; negative on error
+	 */
+	int bgzf_getline(BGZF *fp, int delim, kstring_t *str);
+
+	/**
+	 * Read the next BGZF block.
+	 */
+	int bgzf_read_block(BGZF *fp);
+
+	/**
+	 * Enable multi-threading (only effective on writing and when the
+	 * library was compiled with -DBGZF_MT)
+	 *
+	 * @param fp          BGZF file handler; must be opened for writing
+	 * @param n_threads   #threads used for writing
+	 * @param n_sub_blks  #blocks processed by each thread; a value 64-256 is recommended
+	 */
+	int bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks);
+
+
+	/*******************
+	 * bgzidx routines *
+	 *******************/
+
+	/**
+     *  Position BGZF at the uncompressed offset 
+     *
+     *  @param fp           BGZF file handler; must be opened for reading
+     *  @param uoffset      file offset in the uncompressed data
+     *  @param where        SEEK_SET supported atm
+     *
+     *  Returns 0 on success and -1 on error.
+	 */
+    int bgzf_useek(BGZF *fp, long uoffset, int where);
+
+	/**
+     *  Position in uncompressed BGZF
+     *
+     *  @param fp           BGZF file handler; must be opened for reading
+     *
+     *  Returns the current offset on success and -1 on error.
+	 */
+    long bgzf_utell(BGZF *fp);
+
+	/**
+	 * Tell BGZF to build index while compressing.
+     *
+	 * @param fp          BGZF file handler; can be opened for reading or writing.
+     *
+     * Returns 0 on success and -1 on error.
+	 */
+	int bgzf_index_build_init(BGZF *fp);
+
+   	/**
+	 * Load BGZF index
+	 *
+	 * @param fp          BGZF file handler
+	 * @param bname       base name
+     * @param suffix      suffix to add to bname (can be NULL)
+     *
+     * Returns 0 on success and -1 on error.
+	 */
+    int bgzf_index_load(BGZF *fp, const char *bname, const char *suffix);
+
+   	/**
+	 * Save BGZF index
+	 *
+	 * @param fp          BGZF file handler
+	 * @param bname       base name
+     * @param suffix      suffix to add to bname (can be NULL)
+     *
+     * Returns 0 on success and -1 on error.
+	 */
+    int bgzf_index_dump(BGZF *fp, const char *bname, const char *suffix);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/htslib/htslib/faidx.h b/htslib/htslib/faidx.h
new file mode 100644
index 0000000..3153b98
--- /dev/null
+++ b/htslib/htslib/faidx.h
@@ -0,0 +1,112 @@
+/* The MIT License
+
+   Copyright (c) 2008 Genome Research Ltd (GRL).
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+   SOFTWARE.
+*/
+
+/* Contact: Heng Li <lh3 at sanger.ac.uk>, Petr Danecek <pd3 at sanger> */
+
+#ifndef FAIDX_H
+#define FAIDX_H
+
+/*!
+  @header
+
+  Index FASTA files and extract subsequence.
+
+  The fai file index columns are:
+    - chromosome name
+    - chromosome length: number of bases
+    - offset: number of bytes to skip to get to the first base
+        from the beginning of the file, including the length
+        of the sequence description string (">chr ..\n")
+    - line length: number of bases per line (excluding \n)
+    - binary line length: number of bytes, including \n
+
+  @copyright The Wellcome Trust Sanger Institute.
+ */
+
+struct __faidx_t;
+typedef struct __faidx_t faidx_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	/*!
+	  @abstract   Build index for a FASTA or bgzip-compressed FASTA file.
+	  @param  fn  FASTA file name
+	  @return     0 on success; or -1 on failure
+	  @discussion File "fn.fai" will be generated.
+	 */
+	int fai_build(const char *fn);
+
+	/*!
+	  @abstract    Distroy a faidx_t struct.
+	  @param  fai  Pointer to the struct to be destroyed
+	 */
+	void fai_destroy(faidx_t *fai);
+
+	/*!
+	  @abstract   Load index from "fn.fai".
+	  @param  fn  File name of the FASTA file
+	 */
+	faidx_t *fai_load(const char *fn);
+
+	/*!
+	  @abstract    Fetch the sequence in a region.
+	  @param  fai  Pointer to the faidx_t struct
+	  @param  reg  Region in the format "chr2:20,000-30,000"
+	  @param  len  Length of the region; -2 if seq not present, -1 general error
+	  @return      Pointer to the sequence; null on failure
+
+	  @discussion The returned sequence is allocated by malloc family
+	  and should be destroyed by end users by calling free() on it.
+	 */
+	char *fai_fetch(const faidx_t *fai, const char *reg, int *len);
+
+	/*!
+	  @abstract	   Fetch the number of sequences. 
+	  @param  fai  Pointer to the faidx_t struct
+	  @return	   The number of sequences
+	 */
+	int faidx_fetch_nseq(const faidx_t *fai);
+
+	/*!
+	  @abstract    Fetch the sequence in a region.
+	  @param  fai  Pointer to the faidx_t struct
+	  @param  c_name Region name
+	  @param  p_beg_i  Beginning position number (zero-based)
+	  @param  p_end_i  End position number (zero-based)
+	  @param  len  Length of the region; -2 if c_name not present, -1 general error
+	  @return      Pointer to the sequence; null on failure
+
+	  @discussion The returned sequence is allocated by malloc family
+	  and should be destroyed by end users by calling free() on it.
+	 */
+	char *faidx_fetch_seq(const faidx_t *fai, const char *c_name, int p_beg_i, int p_end_i, int *len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/htslib/htslib/hfile.h b/htslib/htslib/hfile.h
new file mode 100644
index 0000000..68175e7
--- /dev/null
+++ b/htslib/htslib/hfile.h
@@ -0,0 +1,204 @@
+/*  hfile.h -- buffered low-level input/output streams.
+
+    Copyright (C) 2013-2014 Genome Research Ltd.
+
+    Author: John Marshall <jm18 at sanger.ac.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notices and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.  */
+
+#ifndef HTSLIB_HFILE_H
+#define HTSLIB_HFILE_H
+
+#include <string.h>
+
+#include <sys/types.h>
+
+#include "hts_defs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These fields are declared here solely for the benefit of the inline functions
+   below.  They may change in future releases.  User code should not use them
+   directly; you should imagine that hFILE is an opaque incomplete type.  */
+struct hFILE_backend;
+typedef struct hFILE {
+    char *buffer, *begin, *end, *limit;
+    const struct hFILE_backend *backend;
+    off_t offset;
+    int at_eof:1;
+    int has_errno;
+} hFILE;
+
+/*!
+  @abstract  Open the named file or URL as a stream
+  @return    An hFILE pointer, or NULL (with errno set) if an error occurred.
+*/
+hFILE *hopen(const char *filename, const char *mode) HTS_RESULT_USED;
+
+/*!
+  @abstract  Associate a stream with an existing open file descriptor
+  @return    An hFILE pointer, or NULL (with errno set) if an error occurred.
+  @notes     For socket descriptors (on Windows), mode should contain 's'.
+*/
+hFILE *hdopen(int fd, const char *mode) HTS_RESULT_USED;
+
+/*!
+  @abstract  Flush (for output streams) and close the stream
+  @return    0 if successful, or EOF (with errno set) if an error occurred.
+*/
+int hclose(hFILE *fp) HTS_RESULT_USED;
+
+/*!
+  @abstract  Close the stream, without flushing or propagating errors
+  @notes     For use while cleaning up after an error only.  Preserves errno.
+*/
+void hclose_abruptly(hFILE *fp);
+
+/*!
+  @abstract  Return the stream's error indicator
+  @return    Non-zero (in fact, an errno value) if an error has occurred.
+  @notes     This would be called herror() and return true/false to parallel
+    ferror(3), but a networking-related herror(3) function already exists.  */
+static inline int herrno(hFILE *fp)
+{
+    return fp->has_errno;
+}
+
+/*!
+  @abstract  Clear the stream's error indicator
+*/
+static inline void hclearerr(hFILE *fp)
+{
+    fp->has_errno = 0;
+}
+
+/*!
+  @abstract  Reposition the read/write stream offset
+  @return    The resulting offset within the stream (as per lseek(2)),
+    or negative if an error occurred.
+*/
+off_t hseek(hFILE *fp, off_t offset, int whence) HTS_RESULT_USED;
+
+/*!
+  @abstract  Report the current stream offset
+  @return    The offset within the stream, starting from zero.
+*/
+static inline off_t htell(hFILE *fp)
+{
+    return fp->offset + (fp->begin - fp->buffer);
+}
+
+/*!
+  @abstract  Read one character from the stream
+  @return    The character read, or EOF on end-of-file or error
+*/
+static inline int hgetc(hFILE *fp)
+{
+    extern int hgetc2(hFILE *);
+    return (fp->end > fp->begin)? (unsigned char) *(fp->begin++) : hgetc2(fp);
+}
+
+/*!
+  @abstract  Peek at characters to be read without removing them from buffers
+  @param fp      The file stream
+  @param buffer  The buffer to which the peeked bytes will be written
+  @param nbytes  The number of bytes to peek at; limited by the size of the
+    internal buffer, which could be as small as 4K.
+  @return    The number of bytes peeked, which may be less than nbytes if EOF
+    is encountered; or negative, if there was an I/O error.
+  @notes  The characters peeked at remain in the stream's internal buffer,
+    and will be returned by later hread() etc calls.
+*/
+ssize_t hpeek(hFILE *fp, void *buffer, size_t nbytes) HTS_RESULT_USED;
+
+/*!
+  @abstract  Read a block of characters from the file
+  @return    The number of bytes read, or negative if an error occurred.
+  @notes     The full nbytes requested will be returned, except as limited
+    by EOF or I/O errors.
+*/
+static inline ssize_t HTS_RESULT_USED
+hread(hFILE *fp, void *buffer, size_t nbytes)
+{
+    extern ssize_t hread2(hFILE *, void *, size_t, size_t);
+
+    size_t n = fp->end - fp->begin;
+    if (n > nbytes) n = nbytes;
+    memcpy(buffer, fp->begin, n);
+    fp->begin += n;
+    return (n == nbytes)? (ssize_t) n : hread2(fp, buffer, nbytes, n);
+}
+
+/*!
+  @abstract  Write a character to the stream
+  @return    The character written, or EOF if an error occurred.
+*/
+static inline int hputc(int c, hFILE *fp)
+{
+    extern int hputc2(int, hFILE *);
+    if (fp->begin < fp->limit) *(fp->begin++) = c;
+    else c = hputc2(c, fp);
+    return c;
+}
+
+/*!
+  @abstract  Write a string to the stream
+  @return    0 if successful, or EOF if an error occurred.
+*/
+static inline int hputs(const char *text, hFILE *fp)
+{
+    extern int hputs2(const char *, size_t, size_t, hFILE *);
+
+    size_t nbytes = strlen(text), n = fp->limit - fp->begin;
+    if (n > nbytes) n = nbytes;
+    memcpy(fp->begin, text, n);
+    fp->begin += n;
+    return (n == nbytes)? 0 : hputs2(text, nbytes, n, fp);
+}
+
+/*!
+  @abstract  Write a block of characters to the file
+  @return    Either nbytes, or negative if an error occurred.
+  @notes     In the absence of I/O errors, the full nbytes will be written.
+*/
+static inline ssize_t HTS_RESULT_USED
+hwrite(hFILE *fp, const void *buffer, size_t nbytes)
+{
+    extern ssize_t hwrite2(hFILE *, const void *, size_t, size_t);
+
+    size_t n = fp->limit - fp->begin;
+    if (n > nbytes) n = nbytes;
+    memcpy(fp->begin, buffer, n);
+    fp->begin += n;
+    return (n==nbytes)? (ssize_t) n : hwrite2(fp, buffer, nbytes, n);
+}
+
+/*!
+  @abstract  For writing streams, flush buffered output to the underlying stream
+  @return    0 if successful, or EOF if an error occurred.
+*/
+int hflush(hFILE *fp) HTS_RESULT_USED;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/htslib/htslib/hts.h b/htslib/htslib/hts.h
new file mode 100644
index 0000000..d6fca3b
--- /dev/null
+++ b/htslib/htslib/hts.h
@@ -0,0 +1,311 @@
+#ifndef HTS_H
+#define HTS_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+#ifndef HTS_BGZF_TYPEDEF
+typedef struct BGZF BGZF;
+#define HTS_BGZF_TYPEDEF
+#endif
+struct cram_fd;
+struct hFILE;
+
+#ifndef KSTRING_T
+#define KSTRING_T kstring_t
+typedef struct __kstring_t {
+	size_t l, m;
+	char *s;
+} kstring_t;
+#endif
+
+#if defined(__GNUC__)
+# define val_unused __attribute__((unused))
+#else
+# define val_unused
+#endif
+
+#ifndef kroundup32
+#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
+#endif
+
+/**
+ * hts_expand()  - expands memory block pointed to by $ptr;
+ * hts_expand0()   the latter sets the newly allocated part to 0.
+ *
+ * @param n     requested number of elements of type type_t
+ * @param m     size of memory allocated
+ */
+#define hts_expand(type_t, n, m, ptr) if ((n) > (m)) { \
+		(m) = (n); kroundup32(m); \
+		(ptr) = (type_t*)realloc((ptr), (m) * sizeof(type_t)); \
+	}
+#define hts_expand0(type_t, n, m, ptr) if ((n) > (m)) { \
+		int t = (m); (m) = (n); kroundup32(m); \
+		(ptr) = (type_t*)realloc((ptr), (m) * sizeof(type_t)); \
+        memset(((type_t*)ptr)+t,0,sizeof(type_t)*((m)-t)); \
+	}
+
+/************
+ * File I/O *
+ ************/
+
+typedef struct {
+	uint32_t is_bin:1, is_write:1, is_be:1, is_cram:1, is_compressed:2, is_kstream:1, dummy:25;
+	int64_t lineno;
+	kstring_t line;
+	char *fn, *fn_aux;
+	union {
+		BGZF *bgzf;
+		struct cram_fd *cram;
+		struct hFILE *hfile;
+		void *voidp;
+	} fp;
+} htsFile;
+
+/**********************
+ * Exported functions *
+ **********************/
+
+extern int hts_verbose;
+
+/*! @abstract Table for converting a nucleotide character to the 4-bit encoding. */
+extern const unsigned char seq_nt16_table[256];
+
+/*! @abstract Table for converting a 4-bit encoded nucleotide to a letter. */
+extern const char seq_nt16_str[];
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+  @abstract  Get the htslib version number
+  @return    For released versions, a string like "N.N[.N]"; or git describe
+  output if using a library built within a Git repository.
+*/
+const char *hts_version(void);
+
+/*!
+  @abstract       Open a SAM/BAM/CRAM/VCF/BCF/etc file
+  @param fn       The file name or "-" for stdin/stdout
+  @param mode     Mode matching /[rwa][bcuz0-9]+/
+  @discussion
+      With 'r' opens for reading; any further format mode letters are ignored
+      as the format is detected by checking the first few bytes or BGZF blocks
+      of the file.  With 'w' or 'a' opens for writing or appending, with format
+      specifier letters:
+        b  binary format (BAM, BCF, etc) rather than text (SAM, VCF, etc)
+        c  CRAM format
+        u  uncompressed
+        z  compressed
+        [0-9]  zlib compression level
+      Note that there is a distinction between 'u' and '0': the first yields
+      plain uncompressed output whereas the latter outputs uncompressed data
+      wrapped in the zlib format.
+  @example
+      [rw]b .. compressed BCF, BAM, FAI
+      [rw]u .. uncompressed BCF
+      [rw]z .. compressed VCF
+      [rw]  .. uncompressed VCF
+*/
+htsFile *hts_open(const char *fn, const char *mode);
+
+/*!
+  @abstract  Close a file handle, flushing buffered data for output streams
+  @param fp  The file handle to be closed
+  @return    0 for success, or negative if an error occurred.
+*/
+int hts_close(htsFile *fp);
+
+int hts_getline(htsFile *fp, int delimiter, kstring_t *str);
+char **hts_readlines(const char *fn, int *_n);
+/*!
+    @abstract       Parse comma-separated list or read list from a file
+    @param list     File name or comma-separated list
+    @param is_file
+    @param _n       Size of the output array (number of items read)
+    @return         NULL on failure or pointer to newly allocated array of
+                    strings
+*/
+char **hts_readlist(const char *fn, int is_file, int *_n);
+
+/*!
+  @abstract  Create extra threads to aid compress/decompression for this file
+  @param fp  The file handle
+  @param n   The number of worker threads to create
+  @return    0 for success, or negative if an error occurred.
+  @notes     THIS THREADING API IS LIKELY TO CHANGE IN FUTURE.
+*/
+int hts_set_threads(htsFile *fp, int n);
+
+/*!
+  @abstract  Set .fai filename for a file opened for reading
+  @return    0 for success, negative on failure
+  @discussion
+      Called before *_hdr_read(), this provides the name of a .fai file
+      used to provide a reference list if the htsFile contains no @SQ headers.
+*/
+int hts_set_fai_filename(htsFile *fp, const char *fn_aux);
+
+#ifdef __cplusplus
+}
+#endif
+
+/************
+ * Indexing *
+ ************/
+
+/*!
+These HTS_IDX_* macros are used as special tid values for hts_itr_query()/etc,
+producing iterators operating as follows:
+ - HTS_IDX_NOCOOR iterates over unmapped reads sorted at the end of the file
+ - HTS_IDX_START  iterates over the entire file
+ - HTS_IDX_REST   iterates from the current position to the end of the file
+ - HTS_IDX_NONE   always returns "no more alignment records"
+When one of these special tid values is used, beg and end are ignored.
+When REST or NONE is used, idx is also ignored and may be NULL.
+*/
+#define HTS_IDX_NOCOOR (-2)
+#define HTS_IDX_START  (-3)
+#define HTS_IDX_REST   (-4)
+#define HTS_IDX_NONE   (-5)
+
+#define HTS_FMT_CSI 0
+#define HTS_FMT_BAI 1
+#define HTS_FMT_TBI 2
+#define HTS_FMT_CRAI 3
+
+struct __hts_idx_t;
+typedef struct __hts_idx_t hts_idx_t;
+
+typedef struct {
+	uint64_t u, v;
+} hts_pair64_t;
+
+typedef int hts_readrec_func(BGZF *fp, void *data, void *r, int *tid, int *beg, int *end);
+
+typedef struct {
+	uint32_t read_rest:1, finished:1, dummy:29;
+	int tid, beg, end, n_off, i;
+	uint64_t curr_off;
+	hts_pair64_t *off;
+	hts_readrec_func *readrec;
+	struct {
+		int n, m;
+		int *a;
+	} bins;
+} hts_itr_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	#define hts_bin_first(l) (((1<<(((l)<<1) + (l))) - 1) / 7)
+	#define hts_bin_parent(l) (((l) - 1) >> 3)
+
+	hts_idx_t *hts_idx_init(int n, int fmt, uint64_t offset0, int min_shift, int n_lvls);
+	void hts_idx_destroy(hts_idx_t *idx);
+	int hts_idx_push(hts_idx_t *idx, int tid, int beg, int end, uint64_t offset, int is_mapped);
+	void hts_idx_finish(hts_idx_t *idx, uint64_t final_offset);
+
+	void hts_idx_save(const hts_idx_t *idx, const char *fn, int fmt);
+	hts_idx_t *hts_idx_load(const char *fn, int fmt);
+
+	uint8_t *hts_idx_get_meta(hts_idx_t *idx, int *l_meta);
+	void hts_idx_set_meta(hts_idx_t *idx, int l_meta, uint8_t *meta, int is_copy);
+
+	int hts_idx_get_stat(const hts_idx_t* idx, int tid, uint64_t* mapped, uint64_t* unmapped);
+	uint64_t hts_idx_get_n_no_coor(const hts_idx_t* idx);
+
+	const char *hts_parse_reg(const char *s, int *beg, int *end);
+	hts_itr_t *hts_itr_query(const hts_idx_t *idx, int tid, int beg, int end, hts_readrec_func *readrec);
+	void hts_itr_destroy(hts_itr_t *iter);
+
+	typedef int (*hts_name2id_f)(void*, const char*);
+	typedef const char *(*hts_id2name_f)(void*, int);
+	typedef hts_itr_t *hts_itr_query_func(const hts_idx_t *idx, int tid, int beg, int end, hts_readrec_func *readrec);
+
+	hts_itr_t *hts_itr_querys(const hts_idx_t *idx, const char *reg, hts_name2id_f getid, void *hdr, hts_itr_query_func *itr_query, hts_readrec_func *readrec);
+	int hts_itr_next(BGZF *fp, hts_itr_t *iter, void *r, void *data);
+    const char **hts_idx_seqnames(const hts_idx_t *idx, int *n, hts_id2name_f getid, void *hdr); // free only the array, not the values
+
+    /**
+     * hts_file_type() - Convenience function to determine file type
+     * @fname: the file name
+     *
+     * Returns one of the FT_* defines.
+     *
+     * This function was added in order to avoid the need for excessive command
+     * line switches.
+     */
+    #define FT_UNKN   0
+    #define FT_GZ     1
+    #define FT_VCF    2
+    #define FT_VCF_GZ (FT_GZ|FT_VCF)
+    #define FT_BCF    (1<<2)
+    #define FT_BCF_GZ (FT_GZ|FT_BCF)
+    #define FT_STDIN  (1<<3)
+    int hts_file_type(const char *fname);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+static inline int hts_reg2bin(int64_t beg, int64_t end, int min_shift, int n_lvls)
+{
+	int l, s = min_shift, t = ((1<<((n_lvls<<1) + n_lvls)) - 1) / 7;
+	for (--end, l = n_lvls; l > 0; --l, s += 3, t -= 1<<((l<<1)+l))
+		if (beg>>s == end>>s) return t + (beg>>s);
+	return 0;
+}
+
+static inline int hts_bin_bot(int bin, int n_lvls)
+{
+	int l, b;
+	for (l = 0, b = bin; b; ++l, b = hts_bin_parent(b)); // compute the level of bin
+	return (bin - hts_bin_first(l)) << (n_lvls - l) * 3;
+}
+
+/**************
+ * Endianness *
+ **************/
+
+static inline int ed_is_big(void)
+{
+	long one= 1;
+	return !(*((char *)(&one)));
+}
+static inline uint16_t ed_swap_2(uint16_t v)
+{
+	return (uint16_t)(((v & 0x00FF00FFU) << 8) | ((v & 0xFF00FF00U) >> 8));
+}
+static inline void *ed_swap_2p(void *x)
+{
+	*(uint16_t*)x = ed_swap_2(*(uint16_t*)x);
+	return x;
+}
+static inline uint32_t ed_swap_4(uint32_t v)
+{
+	v = ((v & 0x0000FFFFU) << 16) | (v >> 16);
+	return ((v & 0x00FF00FFU) << 8) | ((v & 0xFF00FF00U) >> 8);
+}
+static inline void *ed_swap_4p(void *x)
+{
+	*(uint32_t*)x = ed_swap_4(*(uint32_t*)x);
+	return x;
+}
+static inline uint64_t ed_swap_8(uint64_t v)
+{
+	v = ((v & 0x00000000FFFFFFFFLLU) << 32) | (v >> 32);
+	v = ((v & 0x0000FFFF0000FFFFLLU) << 16) | ((v & 0xFFFF0000FFFF0000LLU) >> 16);
+	return ((v & 0x00FF00FF00FF00FFLLU) << 8) | ((v & 0xFF00FF00FF00FF00LLU) >> 8);
+}
+static inline void *ed_swap_8p(void *x)
+{
+	*(uint64_t*)x = ed_swap_8(*(uint64_t*)x);
+	return x;
+}
+
+#endif
diff --git a/htslib/htslib/hts_defs.h b/htslib/htslib/hts_defs.h
new file mode 100644
index 0000000..efc4f6c
--- /dev/null
+++ b/htslib/htslib/hts_defs.h
@@ -0,0 +1,47 @@
+/*  hts_defs.h -- Miscellaneous definitions.
+
+    Copyright (C) 2013-2014 Genome Research Ltd.
+
+    Author: John Marshall <jm18 at sanger.ac.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notices and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.  */
+
+#ifndef HTSLIB_HTS_DEFS_H
+#define HTSLIB_HTS_DEFS_H
+
+#if __clang__major__ >= 2 || __GNUC__ >= 3
+#define HTS_NORETURN __attribute__ ((__noreturn__))
+#else
+#define HTS_NORETURN
+#endif
+
+#if (defined __clang__ && __clang_major__ >= 3) || \
+    (defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__==4 && __GNUC_MINOR__ >= 5)))
+#define HTS_RESULT_USED __attribute__ ((__warn_unused_result__))
+#else
+#define HTS_RESULT_USED
+#endif
+
+#if defined __clang__ || defined __GNUC__
+#define HTS_UNUSED __attribute__ ((__unused__))
+#else
+#define HTS_UNUSED
+#endif
+
+#endif
diff --git a/htslib/htslib/kfunc.h b/htslib/htslib/kfunc.h
new file mode 100644
index 0000000..0a6ad92
--- /dev/null
+++ b/htslib/htslib/kfunc.h
@@ -0,0 +1,49 @@
+#ifndef __KFUNC_H__
+#define __KFUNC_H__
+
+/* Log gamma function
+ * \log{\Gamma(z)}
+ * AS245, 2nd algorithm, http://lib.stat.cmu.edu/apstat/245
+ */
+double kf_lgamma(double z);
+
+/* complementary error function
+ * \frac{2}{\sqrt{\pi}} \int_x^{\infty} e^{-t^2} dt
+ * AS66, 2nd algorithm, http://lib.stat.cmu.edu/apstat/66
+ */
+double kf_erfc(double x);
+
+/* The following computes regularized incomplete gamma functions.
+ * Formulas are taken from Wiki, with additional input from Numerical
+ * Recipes in C (for modified Lentz's algorithm) and AS245
+ * (http://lib.stat.cmu.edu/apstat/245).
+ *
+ * A good online calculator is available at:
+ *
+ *   http://www.danielsoper.com/statcalc/calc23.aspx
+ *
+ * It calculates upper incomplete gamma function, which equals
+ * kf_gammaq(s,z)*tgamma(s).
+ */
+
+double kf_gammap(double s, double z);
+double kf_gammaq(double s, double z);
+
+/* Regularized incomplete beta function. The method is taken from
+ * Numerical Recipe in C, 2nd edition, section 6.4. The following web
+ * page calculates the incomplete beta function, which equals
+ * kf_betai(a,b,x) * gamma(a) * gamma(b) / gamma(a+b):
+ *
+ *   http://www.danielsoper.com/statcalc/calc36.aspx
+ */
+double kf_betai(double a, double b, double x);
+
+/*
+ *    n11  n12  | n1_
+ *    n21  n22  | n2_
+ *   -----------+----
+ *    n_1  n_2  | n
+ */
+double kt_fisher_exact(int n11, int n12, int n21, int n22, double *_left, double *_right, double *two);
+
+#endif
diff --git a/tabix/khash.h b/htslib/htslib/khash.h
similarity index 55%
rename from tabix/khash.h
rename to htslib/htslib/khash.h
index 1d583ef..2d910de 100644
--- a/tabix/khash.h
+++ b/htslib/htslib/khash.h
@@ -1,6 +1,6 @@
 /* The MIT License
 
-   Copyright (c) 2008 Genome Research Ltd (GRL).
+   Copyright (c) 2008, 2009, 2011 by Attractive Chaos <attractor at live.co.uk>
 
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
@@ -23,8 +23,6 @@
    SOFTWARE.
 */
 
-/* Contact: Heng Li <lh3 at sanger.ac.uk> */
-
 /*
   An example:
 
@@ -35,7 +33,6 @@ int main() {
 	khiter_t k;
 	khash_t(32) *h = kh_init(32);
 	k = kh_put(32, h, 5, &ret);
-	if (!ret) kh_del(32, h, k);
 	kh_value(h, k) = 10;
 	k = kh_get(32, h, 10);
 	is_missing = (k == kh_end(h));
@@ -49,6 +46,46 @@ int main() {
 */
 
 /*
+  2013-05-02 (0.2.8):
+
+	* Use quadratic probing. When the capacity is power of 2, stepping function
+	  i*(i+1)/2 guarantees to traverse each bucket. It is better than double
+	  hashing on cache performance and is more robust than linear probing.
+
+	  In theory, double hashing should be more robust than quadratic probing.
+	  However, my implementation is probably not for large hash tables, because
+	  the second hash function is closely tied to the first hash function,
+	  which reduce the effectiveness of double hashing.
+
+	Reference: http://research.cs.vt.edu/AVresearch/hashing/quadratic.php
+
+  2011-12-29 (0.2.7):
+
+    * Minor code clean up; no actual effect.
+
+  2011-09-16 (0.2.6):
+
+	* The capacity is a power of 2. This seems to dramatically improve the
+	  speed for simple keys. Thank Zilong Tan for the suggestion. Reference:
+
+	   - http://code.google.com/p/ulib/
+	   - http://nothings.org/computer/judy/
+
+	* Allow to optionally use linear probing which usually has better
+	  performance for random input. Double hashing is still the default as it
+	  is more robust to certain non-random input.
+
+	* Added Wang's integer hash function (not used by default). This hash
+	  function is more robust to certain non-random input.
+
+  2011-02-14 (0.2.5):
+
+    * Allow to declare global functions.
+
+  2009-09-26 (0.2.4):
+
+    * Improve portability
+
   2008-09-19 (0.2.3):
 
 	* Corrected the example
@@ -84,30 +121,36 @@ int main() {
   @header
 
   Generic hash table library.
-
-  @copyright Heng Li
  */
 
-#define AC_VERSION_KHASH_H "0.2.2"
+#define AC_VERSION_KHASH_H "0.2.8"
 
-#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <limits.h>
 
-typedef uint32_t khint_t;
-typedef khint_t khiter_t;
+/* compiler specific configuration */
 
-#define __ac_HASH_PRIME_SIZE 32
-static const uint32_t __ac_prime_list[__ac_HASH_PRIME_SIZE] =
-{
-  0ul,          3ul,          11ul,         23ul,         53ul,
-  97ul,         193ul,        389ul,        769ul,        1543ul,
-  3079ul,       6151ul,       12289ul,      24593ul,      49157ul,
-  98317ul,      196613ul,     393241ul,     786433ul,     1572869ul,
-  3145739ul,    6291469ul,    12582917ul,   25165843ul,   50331653ul,
-  100663319ul,  201326611ul,  402653189ul,  805306457ul,  1610612741ul,
-  3221225473ul, 4294967291ul
-};
+#if UINT_MAX == 0xffffffffu
+typedef unsigned int khint32_t;
+#elif ULONG_MAX == 0xffffffffu
+typedef unsigned long khint32_t;
+#endif
+
+#if ULONG_MAX == ULLONG_MAX
+typedef unsigned long khint64_t;
+#else
+typedef unsigned long long khint64_t;
+#endif
+
+#ifdef _MSC_VER
+#define kh_inline __inline
+#else
+#define kh_inline inline
+#endif
+
+typedef khint32_t khint_t;
+typedef khint_t khiter_t;
 
 #define __ac_isempty(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&2)
 #define __ac_isdel(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&1)
@@ -117,88 +160,121 @@ static const uint32_t __ac_prime_list[__ac_HASH_PRIME_SIZE] =
 #define __ac_set_isboth_false(flag, i) (flag[i>>4]&=~(3ul<<((i&0xfU)<<1)))
 #define __ac_set_isdel_true(flag, i) (flag[i>>4]|=1ul<<((i&0xfU)<<1))
 
+#define __ac_fsize(m) ((m) < 16? 1 : (m)>>4)
+
+#ifndef kroundup32
+#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
+#endif
+
+#ifndef kcalloc
+#define kcalloc(N,Z) calloc(N,Z)
+#endif
+#ifndef kmalloc
+#define kmalloc(Z) malloc(Z)
+#endif
+#ifndef krealloc
+#define krealloc(P,Z) realloc(P,Z)
+#endif
+#ifndef kfree
+#define kfree(P) free(P)
+#endif
+
 static const double __ac_HASH_UPPER = 0.77;
 
-#define KHASH_INIT(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \
-	typedef struct {													\
-		khint_t n_buckets, size, n_occupied, upper_bound;				\
-		uint32_t *flags;												\
-		khkey_t *keys;													\
-		khval_t *vals;													\
-	} kh_##name##_t;													\
-	static inline kh_##name##_t *kh_init_##name() {						\
-		return (kh_##name##_t*)calloc(1, sizeof(kh_##name##_t));		\
+#define __KHASH_TYPE(name, khkey_t, khval_t) \
+	typedef struct { \
+		khint_t n_buckets, size, n_occupied, upper_bound; \
+		khint32_t *flags; \
+		khkey_t *keys; \
+		khval_t *vals; \
+	} kh_##name##_t;
+
+#define __KHASH_PROTOTYPES(name, khkey_t, khval_t)	 					\
+	extern kh_##name##_t *kh_init_##name(void);							\
+	extern void kh_destroy_##name(kh_##name##_t *h);					\
+	extern void kh_clear_##name(kh_##name##_t *h);						\
+	extern khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key); 	\
+	extern int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets); \
+	extern khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret); \
+	extern void kh_del_##name(kh_##name##_t *h, khint_t x);
+
+#define __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \
+	SCOPE kh_##name##_t *kh_init_##name(void) {							\
+		return (kh_##name##_t*)kcalloc(1, sizeof(kh_##name##_t));		\
 	}																	\
-	static inline void kh_destroy_##name(kh_##name##_t *h)				\
+	SCOPE void kh_destroy_##name(kh_##name##_t *h)						\
 	{																	\
 		if (h) {														\
-			free(h->keys); free(h->flags);								\
-			free(h->vals);												\
-			free(h);													\
+			kfree((void *)h->keys); kfree(h->flags);					\
+			kfree((void *)h->vals);										\
+			kfree(h);													\
 		}																\
 	}																	\
-	static inline void kh_clear_##name(kh_##name##_t *h)				\
+	SCOPE void kh_clear_##name(kh_##name##_t *h)						\
 	{																	\
 		if (h && h->flags) {											\
-			memset(h->flags, 0xaa, ((h->n_buckets>>4) + 1) * sizeof(uint32_t)); \
+			memset(h->flags, 0xaa, __ac_fsize(h->n_buckets) * sizeof(khint32_t)); \
 			h->size = h->n_occupied = 0;								\
 		}																\
 	}																	\
-	static inline khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key) \
+	SCOPE khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key) 	\
 	{																	\
 		if (h->n_buckets) {												\
-			khint_t inc, k, i, last;									\
-			k = __hash_func(key); i = k % h->n_buckets;					\
-			inc = 1 + k % (h->n_buckets - 1); last = i;					\
+			khint_t k, i, last, mask, step = 0; \
+			mask = h->n_buckets - 1;									\
+			k = __hash_func(key); i = k & mask;							\
+			last = i; \
 			while (!__ac_isempty(h->flags, i) && (__ac_isdel(h->flags, i) || !__hash_equal(h->keys[i], key))) { \
-				if (i + inc >= h->n_buckets) i = i + inc - h->n_buckets; \
-				else i += inc;											\
+				i = (i + (++step)) & mask; \
 				if (i == last) return h->n_buckets;						\
 			}															\
 			return __ac_iseither(h->flags, i)? h->n_buckets : i;		\
 		} else return 0;												\
 	}																	\
-	static inline void kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets) \
-	{																	\
-		uint32_t *new_flags = 0;										\
+	SCOPE int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets) \
+	{ /* This function uses 0.25*n_buckets bytes of working space instead of [sizeof(key_t+val_t)+.25]*n_buckets. */ \
+		khint32_t *new_flags = 0;										\
 		khint_t j = 1;													\
 		{																\
-			khint_t t = __ac_HASH_PRIME_SIZE - 1;						\
-			while (__ac_prime_list[t] > new_n_buckets) --t;				\
-			new_n_buckets = __ac_prime_list[t+1];						\
-			if (h->size >= (khint_t)(new_n_buckets * __ac_HASH_UPPER + 0.5)) j = 0;	\
-			else {														\
-				new_flags = (uint32_t*)malloc(((new_n_buckets>>4) + 1) * sizeof(uint32_t));	\
-				memset(new_flags, 0xaa, ((new_n_buckets>>4) + 1) * sizeof(uint32_t)); \
-				if (h->n_buckets < new_n_buckets) {						\
-					h->keys = (khkey_t*)realloc(h->keys, new_n_buckets * sizeof(khkey_t)); \
-					if (kh_is_map)										\
-						h->vals = (khval_t*)realloc(h->vals, new_n_buckets * sizeof(khval_t)); \
-				}														\
+			kroundup32(new_n_buckets); 									\
+			if (new_n_buckets < 4) new_n_buckets = 4;					\
+			if (h->size >= (khint_t)(new_n_buckets * __ac_HASH_UPPER + 0.5)) j = 0;	/* requested size is too small */ \
+			else { /* hash table size to be changed (shrink or expand); rehash */ \
+				new_flags = (khint32_t*)kmalloc(__ac_fsize(new_n_buckets) * sizeof(khint32_t));	\
+				if (!new_flags) return -1;								\
+				memset(new_flags, 0xaa, __ac_fsize(new_n_buckets) * sizeof(khint32_t)); \
+				if (h->n_buckets < new_n_buckets) {	/* expand */		\
+					khkey_t *new_keys = (khkey_t*)krealloc((void *)h->keys, new_n_buckets * sizeof(khkey_t)); \
+					if (!new_keys) return -1;							\
+					h->keys = new_keys;									\
+					if (kh_is_map) {									\
+						khval_t *new_vals = (khval_t*)krealloc((void *)h->vals, new_n_buckets * sizeof(khval_t)); \
+						if (!new_vals) return -1;						\
+						h->vals = new_vals;								\
+					}													\
+				} /* otherwise shrink */								\
 			}															\
 		}																\
-		if (j) {														\
+		if (j) { /* rehashing is needed */								\
 			for (j = 0; j != h->n_buckets; ++j) {						\
 				if (__ac_iseither(h->flags, j) == 0) {					\
 					khkey_t key = h->keys[j];							\
 					khval_t val;										\
+					khint_t new_mask;									\
+					new_mask = new_n_buckets - 1; 						\
 					if (kh_is_map) val = h->vals[j];					\
 					__ac_set_isdel_true(h->flags, j);					\
-					while (1) {											\
-						khint_t inc, k, i;								\
+					while (1) { /* kick-out process; sort of like in Cuckoo hashing */ \
+						khint_t k, i, step = 0; \
 						k = __hash_func(key);							\
-						i = k % new_n_buckets;							\
-						inc = 1 + k % (new_n_buckets - 1);				\
-						while (!__ac_isempty(new_flags, i)) {			\
-							if (i + inc >= new_n_buckets) i = i + inc - new_n_buckets; \
-							else i += inc;								\
-						}												\
+						i = k & new_mask;								\
+						while (!__ac_isempty(new_flags, i)) i = (i + (++step)) & new_mask; \
 						__ac_set_isempty_false(new_flags, i);			\
-						if (i < h->n_buckets && __ac_iseither(h->flags, i) == 0) { \
+						if (i < h->n_buckets && __ac_iseither(h->flags, i) == 0) { /* kick out the existing element */ \
 							{ khkey_t tmp = h->keys[i]; h->keys[i] = key; key = tmp; } \
 							if (kh_is_map) { khval_t tmp = h->vals[i]; h->vals[i] = val; val = tmp; } \
-							__ac_set_isdel_true(h->flags, i);			\
-						} else {										\
+							__ac_set_isdel_true(h->flags, i); /* mark it as deleted in the old hash table */ \
+						} else { /* write the element and jump out of the loop */ \
 							h->keys[i] = key;							\
 							if (kh_is_map) h->vals[i] = val;			\
 							break;										\
@@ -206,35 +282,39 @@ static const double __ac_HASH_UPPER = 0.77;
 					}													\
 				}														\
 			}															\
-			if (h->n_buckets > new_n_buckets) {							\
-				h->keys = (khkey_t*)realloc(h->keys, new_n_buckets * sizeof(khkey_t)); \
-				if (kh_is_map)											\
-					h->vals = (khval_t*)realloc(h->vals, new_n_buckets * sizeof(khval_t)); \
+			if (h->n_buckets > new_n_buckets) { /* shrink the hash table */ \
+				h->keys = (khkey_t*)krealloc((void *)h->keys, new_n_buckets * sizeof(khkey_t)); \
+				if (kh_is_map) h->vals = (khval_t*)krealloc((void *)h->vals, new_n_buckets * sizeof(khval_t)); \
 			}															\
-			free(h->flags);												\
+			kfree(h->flags); /* free the working space */				\
 			h->flags = new_flags;										\
 			h->n_buckets = new_n_buckets;								\
 			h->n_occupied = h->size;									\
 			h->upper_bound = (khint_t)(h->n_buckets * __ac_HASH_UPPER + 0.5); \
 		}																\
+		return 0;														\
 	}																	\
-	static inline khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret) \
+	SCOPE khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret) \
 	{																	\
 		khint_t x;														\
-		if (h->n_occupied >= h->upper_bound) {							\
-			if (h->n_buckets > (h->size<<1)) kh_resize_##name(h, h->n_buckets - 1); \
-			else kh_resize_##name(h, h->n_buckets + 1);					\
-		}																\
+		if (h->n_occupied >= h->upper_bound) { /* update the hash table */ \
+			if (h->n_buckets > (h->size<<1)) {							\
+				if (kh_resize_##name(h, h->n_buckets - 1) < 0) { /* clear "deleted" elements */ \
+					*ret = -1; return h->n_buckets;						\
+				}														\
+			} else if (kh_resize_##name(h, h->n_buckets + 1) < 0) { /* expand the hash table */ \
+				*ret = -1; return h->n_buckets;							\
+			}															\
+		} /* TODO: to implement automatically shrinking; resize() already support shrinking */ \
 		{																\
-			khint_t inc, k, i, site, last;								\
-			x = site = h->n_buckets; k = __hash_func(key); i = k % h->n_buckets; \
-			if (__ac_isempty(h->flags, i)) x = i;						\
+			khint_t k, i, site, last, mask = h->n_buckets - 1, step = 0; \
+			x = site = h->n_buckets; k = __hash_func(key); i = k & mask; \
+			if (__ac_isempty(h->flags, i)) x = i; /* for speed up */	\
 			else {														\
-				inc = 1 + k % (h->n_buckets - 1); last = i;				\
+				last = i; \
 				while (!__ac_isempty(h->flags, i) && (__ac_isdel(h->flags, i) || !__hash_equal(h->keys[i], key))) { \
 					if (__ac_isdel(h->flags, i)) site = i;				\
-					if (i + inc >= h->n_buckets) i = i + inc - h->n_buckets; \
-					else i += inc;										\
+					i = (i + (++step)) & mask; \
 					if (i == last) { x = site; break; }					\
 				}														\
 				if (x == h->n_buckets) {								\
@@ -243,20 +323,20 @@ static const double __ac_HASH_UPPER = 0.77;
 				}														\
 			}															\
 		}																\
-		if (__ac_isempty(h->flags, x)) {								\
+		if (__ac_isempty(h->flags, x)) { /* not present at all */		\
 			h->keys[x] = key;											\
 			__ac_set_isboth_false(h->flags, x);							\
 			++h->size; ++h->n_occupied;									\
 			*ret = 1;													\
-		} else if (__ac_isdel(h->flags, x)) {							\
+		} else if (__ac_isdel(h->flags, x)) { /* deleted */				\
 			h->keys[x] = key;											\
 			__ac_set_isboth_false(h->flags, x);							\
 			++h->size;													\
 			*ret = 2;													\
-		} else *ret = 0;												\
+		} else *ret = 0; /* Don't touch h->keys[x] if present and not deleted */ \
 		return x;														\
 	}																	\
-	static inline void kh_del_##name(kh_##name##_t *h, khint_t x)		\
+	SCOPE void kh_del_##name(kh_##name##_t *h, khint_t x)				\
 	{																	\
 		if (x != h->n_buckets && !__ac_iseither(h->flags, x)) {			\
 			__ac_set_isdel_true(h->flags, x);							\
@@ -264,24 +344,35 @@ static const double __ac_HASH_UPPER = 0.77;
 		}																\
 	}
 
+#define KHASH_DECLARE(name, khkey_t, khval_t)		 					\
+	__KHASH_TYPE(name, khkey_t, khval_t) 								\
+	__KHASH_PROTOTYPES(name, khkey_t, khval_t)
+
+#define KHASH_INIT2(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \
+	__KHASH_TYPE(name, khkey_t, khval_t) 								\
+	__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
+
+#define KHASH_INIT(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \
+	KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
+
 /* --- BEGIN OF HASH FUNCTIONS --- */
 
 /*! @function
   @abstract     Integer hash function
-  @param  key   The integer [uint32_t]
+  @param  key   The integer [khint32_t]
   @return       The hash value [khint_t]
  */
-#define kh_int_hash_func(key) (uint32_t)(key)
+#define kh_int_hash_func(key) (khint32_t)(key)
 /*! @function
   @abstract     Integer comparison function
  */
 #define kh_int_hash_equal(a, b) ((a) == (b))
 /*! @function
   @abstract     64-bit integer hash function
-  @param  key   The integer [uint64_t]
+  @param  key   The integer [khint64_t]
   @return       The hash value [khint_t]
  */
-#define kh_int64_hash_func(key) (uint32_t)((key)>>33^(key)^(key)<<11)
+#define kh_int64_hash_func(key) (khint32_t)((key)>>33^(key)^(key)<<11)
 /*! @function
   @abstract     64-bit integer comparison function
  */
@@ -291,10 +382,10 @@ static const double __ac_HASH_UPPER = 0.77;
   @param  s     Pointer to a null terminated string
   @return       The hash value
  */
-static inline khint_t __ac_X31_hash_string(const char *s)
+static kh_inline khint_t __ac_X31_hash_string(const char *s)
 {
-	khint_t h = *s;
-	if (h) for (++s ; *s; ++s) h = (h << 5) - h + *s;
+	khint_t h = (khint_t)*s;
+	if (h) for (++s ; *s; ++s) h = (h << 5) - h + (khint_t)*s;
 	return h;
 }
 /*! @function
@@ -308,9 +399,21 @@ static inline khint_t __ac_X31_hash_string(const char *s)
  */
 #define kh_str_hash_equal(a, b) (strcmp(a, b) == 0)
 
+static kh_inline khint_t __ac_Wang_hash(khint_t key)
+{
+    key += ~(key << 15);
+    key ^=  (key >> 10);
+    key +=  (key << 3);
+    key ^=  (key >> 6);
+    key += ~(key << 11);
+    key ^=  (key >> 16);
+    return key;
+}
+#define kh_int_hash_func2(k) __ac_Wang_hash((khint_t)key)
+
 /* --- END OF HASH FUNCTIONS --- */
 
-/* Other necessary macros... */
+/* Other convenient macros... */
 
 /*!
   @abstract Type of the hash table.
@@ -352,7 +455,8 @@ static inline khint_t __ac_X31_hash_string(const char *s)
   @param  name  Name of the hash table [symbol]
   @param  h     Pointer to the hash table [khash_t(name)*]
   @param  k     Key [type of keys]
-  @param  r     Extra return code: 0 if the key is present in the hash table;
+  @param  r     Extra return code: -1 if the operation failed;
+                0 if the key is present in the hash table;
                 1 if the bucket is empty (never used); 2 if the element in
 				the bucket has been deleted [int*]
   @return       Iterator to the inserted element [khint_t]
@@ -364,7 +468,7 @@ static inline khint_t __ac_X31_hash_string(const char *s)
   @param  name  Name of the hash table [symbol]
   @param  h     Pointer to the hash table [khash_t(name)*]
   @param  k     Key [type of keys]
-  @return       Iterator to the found element, or kh_end(h) is the element is absent [khint_t]
+  @return       Iterator to the found element, or kh_end(h) if the element is absent [khint_t]
  */
 #define kh_get(name, h, k) kh_get_##name(h, k)
 
@@ -376,7 +480,6 @@ static inline khint_t __ac_X31_hash_string(const char *s)
  */
 #define kh_del(name, h, k) kh_del_##name(h, k)
 
-
 /*! @function
   @abstract     Test whether a bucket contains data.
   @param  h     Pointer to the hash table [khash_t(name)*]
@@ -435,6 +538,34 @@ static inline khint_t __ac_X31_hash_string(const char *s)
  */
 #define kh_n_buckets(h) ((h)->n_buckets)
 
+/*! @function
+  @abstract     Iterate over the entries in the hash table
+  @param  h     Pointer to the hash table [khash_t(name)*]
+  @param  kvar  Variable to which key will be assigned
+  @param  vvar  Variable to which value will be assigned
+  @param  code  Block of code to execute
+ */
+#define kh_foreach(h, kvar, vvar, code) { khint_t __i;		\
+	for (__i = kh_begin(h); __i != kh_end(h); ++__i) {		\
+		if (!kh_exist(h,__i)) continue;						\
+		(kvar) = kh_key(h,__i);								\
+		(vvar) = kh_val(h,__i);								\
+		code;												\
+	} }
+
+/*! @function
+  @abstract     Iterate over the values in the hash table
+  @param  h     Pointer to the hash table [khash_t(name)*]
+  @param  vvar  Variable to which value will be assigned
+  @param  code  Block of code to execute
+ */
+#define kh_foreach_value(h, vvar, code) { khint_t __i;		\
+	for (__i = kh_begin(h); __i != kh_end(h); ++__i) {		\
+		if (!kh_exist(h,__i)) continue;						\
+		(vvar) = kh_val(h,__i);								\
+		code;												\
+	} }
+
 /* More conenient interfaces */
 
 /*! @function
@@ -442,7 +573,7 @@ static inline khint_t __ac_X31_hash_string(const char *s)
   @param  name  Name of the hash table [symbol]
  */
 #define KHASH_SET_INIT_INT(name)										\
-	KHASH_INIT(name, uint32_t, char, 0, kh_int_hash_func, kh_int_hash_equal)
+	KHASH_INIT(name, khint32_t, char, 0, kh_int_hash_func, kh_int_hash_equal)
 
 /*! @function
   @abstract     Instantiate a hash map containing integer keys
@@ -450,14 +581,14 @@ static inline khint_t __ac_X31_hash_string(const char *s)
   @param  khval_t  Type of values [type]
  */
 #define KHASH_MAP_INIT_INT(name, khval_t)								\
-	KHASH_INIT(name, uint32_t, khval_t, 1, kh_int_hash_func, kh_int_hash_equal)
+	KHASH_INIT(name, khint32_t, khval_t, 1, kh_int_hash_func, kh_int_hash_equal)
 
 /*! @function
   @abstract     Instantiate a hash map containing 64-bit integer keys
   @param  name  Name of the hash table [symbol]
  */
 #define KHASH_SET_INIT_INT64(name)										\
-	KHASH_INIT(name, uint64_t, char, 0, kh_int64_hash_func, kh_int64_hash_equal)
+	KHASH_INIT(name, khint64_t, char, 0, kh_int64_hash_func, kh_int64_hash_equal)
 
 /*! @function
   @abstract     Instantiate a hash map containing 64-bit integer keys
@@ -465,7 +596,7 @@ static inline khint_t __ac_X31_hash_string(const char *s)
   @param  khval_t  Type of values [type]
  */
 #define KHASH_MAP_INIT_INT64(name, khval_t)								\
-	KHASH_INIT(name, uint64_t, khval_t, 1, kh_int64_hash_func, kh_int64_hash_equal)
+	KHASH_INIT(name, khint64_t, khval_t, 1, kh_int64_hash_func, kh_int64_hash_equal)
 
 typedef const char *kh_cstr_t;
 /*! @function
diff --git a/htslib/htslib/khash_str2int.h b/htslib/htslib/khash_str2int.h
new file mode 100644
index 0000000..db26d72
--- /dev/null
+++ b/htslib/htslib/khash_str2int.h
@@ -0,0 +1,98 @@
+#ifndef __KHASH_UTILS_H__
+#define __KHASH_UTILS_H__
+
+#include <htslib/khash.h>
+
+KHASH_MAP_INIT_STR(str2int, int)
+
+/*
+ *  Wrappers for khash dictionaries used by mpileup. 
+ */
+
+static inline void *khash_str2int_init(void)
+{
+    return kh_init(str2int);
+}
+
+/*
+ *  Destroy the hash structure, but not the keys
+ */ 
+static inline void khash_str2int_destroy(void *_hash)
+{
+    khash_t(str2int) *hash = (khash_t(str2int)*)_hash;
+    if (hash) kh_destroy(str2int, hash); // Note that strings are not freed.
+}
+
+/*
+ *  Destroys both the hash structure and the keys
+ */ 
+static inline void khash_str2int_destroy_free(void *_hash)
+{
+    khash_t(str2int) *hash = (khash_t(str2int)*)_hash;
+    khint_t k;
+    if (hash == 0) return;
+    for (k = 0; k < kh_end(hash); ++k)
+        if (kh_exist(hash, k)) free((char*)kh_key(hash, k));
+    kh_destroy(str2int, hash);
+}
+
+/*
+ *  Returns 1 if key exists or 0 if not
+ */
+static inline int khash_str2int_has_key(void *_hash, const char *str)
+{
+    khash_t(str2int) *hash = (khash_t(str2int)*)_hash;
+    khint_t k = kh_get(str2int, hash, str);
+    if ( k == kh_end(hash) ) return 0;
+    return 1;
+}
+
+/*
+ *  Returns 0 on success and -1 when the key is not present. On success,
+ *  *value is set, unless NULL is passed.
+ */
+static inline int khash_str2int_get(void *_hash, const char *str, int *value)
+{
+    khash_t(str2int) *hash = (khash_t(str2int)*)_hash;
+    khint_t k;
+    if ( !hash ) return -1;
+    k = kh_get(str2int, hash, str);
+    if ( k == kh_end(hash) ) return -1;
+    if ( !value ) return 0;
+    *value = kh_val(hash, k);
+    return 0;
+}
+
+/*
+ *  Add a new string to the dictionary, auto-incrementing the value.
+ *  On success returns the newly inserted integer id, on error -1
+ *  is returned.
+ */
+static inline int khash_str2int_inc(void *_hash, const char *str)
+{
+    khint_t k;
+    int ret;
+    khash_t(str2int) *hash = (khash_t(str2int)*)_hash;
+    if ( !hash ) return -1;
+    k = kh_put(str2int, hash, str, &ret);
+    if (ret == 0) return kh_val(hash, k);
+    kh_val(hash, k) = kh_size(hash) - 1;
+    return kh_val(hash, k);
+}
+
+/*
+ *  Set a new key,value pair. On success returns the bin index, on
+ *  error -1 is returned.
+ */
+static inline int khash_str2int_set(void *_hash, const char *str, int value)
+{
+    khint_t k;
+    int ret;
+    khash_t(str2int) *hash = (khash_t(str2int)*)_hash;
+    if ( !hash ) return -1;
+    k = kh_put(str2int, hash, str, &ret);
+    kh_val(hash,k) = value;
+    return k;
+}
+
+#endif
diff --git a/samtools/klist.h b/htslib/htslib/klist.h
similarity index 70%
copy from samtools/klist.h
copy to htslib/htslib/klist.h
index 2f17016..8b33f27 100644
--- a/samtools/klist.h
+++ b/htslib/htslib/klist.h
@@ -1,5 +1,30 @@
-#ifndef _LH3_KLIST_H
-#define _LH3_KLIST_H
+/* The MIT License
+
+   Copyright (c) 2008-2009, by Attractive Chaos <attractor at 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"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+   SOFTWARE.
+*/
+
+#ifndef _AC_KLIST_H
+#define _AC_KLIST_H
 
 #include <stdlib.h>
 
@@ -8,7 +33,7 @@
 		size_t cnt, n, max;												\
 		kmptype_t **buf;												\
 	} kmp_##name##_t;													\
-	static inline kmp_##name##_t *kmp_init_##name() {					\
+	static inline kmp_##name##_t *kmp_init_##name(void) {				\
 		return calloc(1, sizeof(kmp_##name##_t));						\
 	}																	\
 	static inline void kmp_destroy_##name(kmp_##name##_t *mp) {			\
@@ -27,7 +52,7 @@
 		--mp->cnt;														\
 		if (mp->n == mp->max) {											\
 			mp->max = mp->max? mp->max<<1 : 16;							\
-			mp->buf = realloc(mp->buf, sizeof(void*) * mp->max);		\
+			mp->buf = realloc(mp->buf, sizeof(kmptype_t *) * mp->max);	\
 		}																\
 		mp->buf[mp->n++] = p;											\
 	}
@@ -50,7 +75,7 @@
 		kmp_##name##_t *mp;												\
 		size_t size;													\
 	} kl_##name##_t;													\
-	static inline kl_##name##_t *kl_init_##name() {						\
+	static inline kl_##name##_t *kl_init_##name(void) {					\
 		kl_##name##_t *kl = calloc(1, sizeof(kl_##name##_t));			\
 		kl->mp = kmp_init(name);										\
 		kl->head = kl->tail = kmp_alloc(name, kl->mp);					\
diff --git a/tabix/knetfile.h b/htslib/htslib/knetfile.h
similarity index 93%
rename from tabix/knetfile.h
rename to htslib/htslib/knetfile.h
index 0a0e66f..c980258 100644
--- a/tabix/knetfile.h
+++ b/htslib/htslib/knetfile.h
@@ -59,13 +59,13 @@ extern "C" {
 	  If ->is_ready==0, this routine updates ->fd; otherwise, it simply
 	  reads from ->fd.
 	 */
-	off_t knet_read(knetFile *fp, void *buf, off_t len);
+	ssize_t knet_read(knetFile *fp, void *buf, size_t len);
 
 	/*
 	  This routine only sets ->offset and ->is_ready=0. It does not
 	  communicate with the FTP server.
 	 */
-	off_t knet_seek(knetFile *fp, int64_t off, int whence);
+	off_t knet_seek(knetFile *fp, off_t off, int whence);
 	int knet_close(knetFile *fp);
 
 #ifdef __cplusplus
diff --git a/htslib/htslib/kseq.h b/htslib/htslib/kseq.h
new file mode 100644
index 0000000..577cdc4
--- /dev/null
+++ b/htslib/htslib/kseq.h
@@ -0,0 +1,253 @@
+/* The MIT License
+
+   Copyright (c) 2008, 2009, 2011 Attractive Chaos <attractor at 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"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+   SOFTWARE.
+*/
+
+/* Last Modified: 05MAR2012 */
+
+#ifndef AC_KSEQ_H
+#define AC_KSEQ_H
+
+#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define KS_SEP_SPACE 0 // isspace(): \t, \n, \v, \f, \r
+#define KS_SEP_TAB   1 // isspace() && !' '
+#define KS_SEP_LINE  2 // line separator: "\n" (Unix) or "\r\n" (Windows)
+#define KS_SEP_MAX   2
+
+#define __KS_TYPE(type_t) \
+	typedef struct __kstream_t { \
+		int begin, end; \
+		int is_eof:2, bufsize:30; \
+        uint64_t seek_pos; \
+		type_t f; \
+		unsigned char *buf; \
+	} kstream_t;
+
+#define ks_eof(ks) ((ks)->is_eof && (ks)->begin >= (ks)->end)
+#define ks_rewind(ks) ((ks)->is_eof = (ks)->begin = (ks)->end = 0)
+
+#define __KS_BASIC(SCOPE, type_t, __bufsize) \
+	SCOPE kstream_t *ks_init(type_t f) \
+	{ \
+		kstream_t *ks = (kstream_t*)calloc(1, sizeof(kstream_t)); \
+		ks->f = f; ks->bufsize = __bufsize; \
+		ks->buf = (unsigned char*)malloc(__bufsize); \
+		return ks; \
+	} \
+	SCOPE void ks_destroy(kstream_t *ks) \
+	{ \
+		if (!ks) return; \
+		free(ks->buf); \
+		free(ks); \
+	}
+
+#define __KS_INLINED(__read) \
+	static inline int ks_getc(kstream_t *ks) \
+	{ \
+		if (ks->is_eof && ks->begin >= ks->end) return -1; \
+		if (ks->begin >= ks->end) { \
+			ks->begin = 0; \
+			ks->end = __read(ks->f, ks->buf, ks->bufsize); \
+			if (ks->end < ks->bufsize) ks->is_eof = 1; \
+			if (ks->end == 0) return -1; \
+		} \
+        ks->seek_pos++; \
+		return (int)ks->buf[ks->begin++]; \
+	} \
+	static inline int ks_getuntil(kstream_t *ks, int delimiter, kstring_t *str, int *dret) \
+	{ return ks_getuntil2(ks, delimiter, str, dret, 0); }
+
+#ifndef KSTRING_T
+#define KSTRING_T kstring_t
+typedef struct __kstring_t {
+	size_t l, m;
+	char *s;
+} kstring_t;
+#endif
+
+#ifndef kroundup32
+#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
+#endif
+
+#define __KS_GETUNTIL(SCOPE, __read) \
+	SCOPE int ks_getuntil2(kstream_t *ks, int delimiter, kstring_t *str, int *dret, int append)  \
+	{ \
+		if (dret) *dret = 0; \
+		str->l = append? str->l : 0; \
+        uint64_t seek_pos = str->l; \
+		if (ks->begin >= ks->end && ks->is_eof) return -1; \
+		for (;;) { \
+			int i; \
+			if (ks->begin >= ks->end) { \
+				if (!ks->is_eof) { \
+					ks->begin = 0; \
+					ks->end = __read(ks->f, ks->buf, ks->bufsize); \
+					if (ks->end < ks->bufsize) ks->is_eof = 1; \
+					if (ks->end == 0) break; \
+				} else break; \
+			} \
+			if (delimiter == KS_SEP_LINE) {  \
+				for (i = ks->begin; i < ks->end; ++i)  \
+					if (ks->buf[i] == '\n') break; \
+			} else if (delimiter > KS_SEP_MAX) { \
+				for (i = ks->begin; i < ks->end; ++i) \
+					if (ks->buf[i] == delimiter) break; \
+			} else if (delimiter == KS_SEP_SPACE) { \
+				for (i = ks->begin; i < ks->end; ++i) \
+					if (isspace(ks->buf[i])) break; \
+			} else if (delimiter == KS_SEP_TAB) { \
+				for (i = ks->begin; i < ks->end; ++i) \
+					if (isspace(ks->buf[i]) && ks->buf[i] != ' ') break;  \
+			} else i = 0; /* never come to here! */ \
+			if (str->m - str->l < (size_t)(i - ks->begin + 1)) { \
+				str->m = str->l + (i - ks->begin) + 1; \
+				kroundup32(str->m); \
+				str->s = (char*)realloc(str->s, str->m); \
+			} \
+            seek_pos += i - ks->begin; if ( i < ks->end ) seek_pos++; \
+			memcpy(str->s + str->l, ks->buf + ks->begin, i - ks->begin);  \
+			str->l = str->l + (i - ks->begin); \
+			ks->begin = i + 1; \
+			if (i < ks->end) { \
+				if (dret) *dret = ks->buf[i]; \
+				break; \
+			} \
+		} \
+        ks->seek_pos += seek_pos; \
+		if (str->s == 0) { \
+			str->m = 1; \
+			str->s = (char*)calloc(1, 1); \
+		} else if (delimiter == KS_SEP_LINE && str->l > 1 && str->s[str->l-1] == '\r') --str->l; \
+		str->s[str->l] = '\0';											\
+		return str->l; \
+	}
+
+#define KSTREAM_INIT2(SCOPE, type_t, __read, __bufsize) \
+	__KS_TYPE(type_t) \
+	__KS_BASIC(SCOPE, type_t, __bufsize) \
+	__KS_GETUNTIL(SCOPE, __read) \
+	__KS_INLINED(__read)
+
+#define KSTREAM_INIT(type_t, __read, __bufsize) KSTREAM_INIT2(static, type_t, __read, __bufsize)
+
+#define KSTREAM_DECLARE(type_t, __read) \
+	__KS_TYPE(type_t) \
+	extern int ks_getuntil2(kstream_t *ks, int delimiter, kstring_t *str, int *dret, int append); \
+	extern kstream_t *ks_init(type_t f); \
+	extern void ks_destroy(kstream_t *ks); \
+	__KS_INLINED(__read)
+
+/******************
+ * FASTA/Q parser *
+ ******************/
+
+#define kseq_rewind(ks) ((ks)->last_char = (ks)->f->is_eof = (ks)->f->begin = (ks)->f->end = 0)
+
+#define __KSEQ_BASIC(SCOPE, type_t)										\
+	SCOPE kseq_t *kseq_init(type_t fd)									\
+	{																	\
+		kseq_t *s = (kseq_t*)calloc(1, sizeof(kseq_t));					\
+		s->f = ks_init(fd);												\
+		return s;														\
+	}																	\
+	SCOPE void kseq_destroy(kseq_t *ks)									\
+	{																	\
+		if (!ks) return;												\
+		free(ks->name.s); free(ks->comment.s); free(ks->seq.s);	free(ks->qual.s); \
+		ks_destroy(ks->f);												\
+		free(ks);														\
+	}
+
+/* Return value:
+   >=0  length of the sequence (normal)
+   -1   end-of-file
+   -2   truncated quality string
+ */
+#define __KSEQ_READ(SCOPE) \
+	SCOPE 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; \
+		} /* 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, KS_SEP_LINE, &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 (c == '\n') continue; /* skip empty lines */ \
+			seq->seq.s[seq->seq.l++] = c; /* this is safe: we always have enough space for 1 char */ \
+			ks_getuntil2(ks, KS_SEP_LINE, &seq->seq, 0, 1); /* read the rest of the line */ \
+		} \
+		if (c == '>' || c == '@') seq->last_char = c; /* the first header char has been read */	\
+		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; /* error: no quality string */ \
+		while (ks_getuntil2(ks, KS_SEP_LINE, &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; /* error: qual string is of a different length */ \
+		return seq->seq.l; \
+	}
+
+#define __KSEQ_TYPE(type_t)						\
+	typedef struct {							\
+		kstring_t name, comment, seq, qual;		\
+		int last_char;							\
+		kstream_t *f;							\
+	} kseq_t;
+
+#define KSEQ_INIT2(SCOPE, type_t, __read)		\
+	KSTREAM_INIT(type_t, __read, 16384)			\
+	__KSEQ_TYPE(type_t)							\
+	__KSEQ_BASIC(SCOPE, type_t)					\
+	__KSEQ_READ(SCOPE)
+
+#define KSEQ_INIT(type_t, __read) KSEQ_INIT2(static, type_t, __read)
+
+#define KSEQ_DECLARE(type_t) \
+	__KS_TYPE(type_t) \
+	__KSEQ_TYPE(type_t) \
+	extern kseq_t *kseq_init(type_t fd); \
+	void kseq_destroy(kseq_t *ks); \
+	int kseq_read(kseq_t *seq);
+
+#endif
diff --git a/tabix/ksort.h b/htslib/htslib/ksort.h
similarity index 94%
rename from tabix/ksort.h
rename to htslib/htslib/ksort.h
index 16a03fd..aa0bb93 100644
--- a/tabix/ksort.h
+++ b/htslib/htslib/ksort.h
@@ -26,6 +26,10 @@
 /* Contact: Heng Li <lh3 at sanger.ac.uk> */
 
 /*
+  2012-12-11 (0.1.4):
+
+    * Defined __ks_insertsort_##name as static to compile with C99.
+
   2008-11-16 (0.1.4):
 
     * Fixed a bug in introsort() that happens in rare cases.
@@ -141,7 +145,7 @@ typedef struct {
 			tmp = *l; *l = l[i]; l[i] = tmp; ks_heapadjust_##name(0, i, l); \
 		}																\
 	}																	\
-	inline void __ks_insertsort_##name(type_t *s, type_t *t)			\
+	static inline void __ks_insertsort_##name(type_t *s, type_t *t)		\
 	{																	\
 		type_t *i, *j, swap_tmp;										\
 		for (i = s + 1; i < t; ++i)										\
@@ -250,6 +254,15 @@ typedef struct {
 			if (hh <= k) low = ll;										\
 			if (hh >= k) high = hh - 1;									\
 		}																\
+	}																	\
+	void ks_shuffle_##name(size_t n, type_t a[])						\
+	{																	\
+		int i, j;														\
+		for (i = n; i > 1; --i) {										\
+			type_t tmp;													\
+			j = (int)(drand48() * i);									\
+			tmp = a[j]; a[j] = a[i-1]; a[i-1] = tmp;					\
+		}																\
 	}
 
 #define ks_mergesort(name, n, a, t) ks_mergesort_##name(n, a, t)
@@ -259,6 +272,7 @@ typedef struct {
 #define ks_heapmake(name, n, a) ks_heapmake_##name(n, a)
 #define ks_heapadjust(name, i, n, a) ks_heapadjust_##name(i, n, a)
 #define ks_ksmall(name, n, a, k) ks_ksmall_##name(n, a, k)
+#define ks_shuffle(name, n, a) ks_shuffle_##name(n, a)
 
 #define ks_lt_generic(a, b) ((a) < (b))
 #define ks_lt_str(a, b) (strcmp((a), (b)) < 0)
diff --git a/htslib/htslib/kstdint.h b/htslib/htslib/kstdint.h
new file mode 100644
index 0000000..e948850
--- /dev/null
+++ b/htslib/htslib/kstdint.h
@@ -0,0 +1,64 @@
+#ifndef KSTDINT_H
+#define KSTDINT_H
+
+#include <limits.h>
+
+/* Basic assumptions: 1) "char" is 8-bit; 2) there is a 8-bit, 16-bit, 32-bit
+ * and 64-bit integer type, respectively; 3) "short" is no less than "char",
+ * "int" is no less than "short", "long" is no less than "int" and "long long"
+ * is no less than "long"; 4) "int" is at least 16-bit, "long" at least 32-bit
+ * and "long long" at least 64-bit. The last two assumptions are enforced by
+ * the C99 spec.
+ *
+ * Following assumptions 1) and 2), we know that "signed char"=="int8_t" and
+ * "short"=="int16_t" for sure. Further from the assumptions, a 32-bit integer
+ * type must be either "int" or "long". We can test (UINT16_MAX==UINT_MAX) to
+ * see which is the case. Similarly, a 64-bit integer must be either "long" or
+ * "long long". We can test (UINT16_MAX==UINT_MAX) to get the definite answer.
+ */
+
+/* 8-bit integers */
+typedef signed char          int8_t;
+typedef unsigned char       uint8_t;
+#define INT8_MIN     (-SCHAR_MAX-1)
+#define INT8_MAX          SCHAR_MAX
+#define UINT8_MAX         UCHAR_MAX
+
+/* 16-bit integers */
+typedef signed short        int16_t;
+typedef unsigned short     uint16_t;
+#define INT16_MIN     (-SHRT_MAX-1)
+#define INT16_MAX          SHRT_MAX
+#define UINT16_MAX        USHRT_MAX
+
+/* 32-bit integers */
+#if UINT16_MAX != UINT_MAX
+typedef signed int          int32_t;
+typedef unsigned int       uint32_t;
+#define INT32_MIN      (-INT_MAX-1)
+#define INT32_MAX           INT_MAX
+#define UINT32_MAX         UINT_MAX
+#else /* then int is 16-bit and long is 32-bit, which may happen to compilers for embedded CPUs */
+typedef signed long         int32_t;
+typedef unsigned long      uint32_t;
+#define INT32_MIN     (-LONG_MAX-1)
+#define INT32_MAX          LONG_MAX
+#define UINT32_MAX        ULONG_MAX
+#endif /* ~UINT16_MAX!=UINT_MAX */
+
+/* 64-bit integers */
+#if UINT32_MAX != ULONG_MAX
+typedef signed long         int64_t;
+typedef unsigned long      uint64_t;
+#define INT64_MIN     (-LONG_MAX-1)
+#define INT64_MAX          LONG_MAX
+#define UINT64_MAX        ULONG_MAX
+#else
+typedef signed long long    int64_t;
+typedef unsigned long long uint64_t;
+#define INT64_MIN    (-LLONG_MAX-1)
+#define INT64_MAX         LLONG_MAX
+#define UINT64_MAX       ULLONG_MAX
+#endif /* ~UINT32_MAX!=ULONG_MAX */
+
+#endif /* ~defined(KSTDINT_H) */
diff --git a/htslib/htslib/kstring.h b/htslib/htslib/kstring.h
new file mode 100644
index 0000000..2567efc
--- /dev/null
+++ b/htslib/htslib/kstring.h
@@ -0,0 +1,270 @@
+/* The MIT License
+
+   Copyright (c) by Attractive Chaos <attractor at 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"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+   SOFTWARE.
+*/
+
+#ifndef KSTRING_H
+#define KSTRING_H
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <stdio.h>
+
+#ifndef kroundup32
+#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
+#endif
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define KS_ATTR_PRINTF(fmt, arg) __attribute__((__format__ (__printf__, fmt, arg)))
+#else
+#define KS_ATTR_PRINTF(fmt, arg)
+#endif
+
+
+/* kstring_t is a simple non-opaque type whose fields are likely to be
+ * used directly by user code (but see also ks_str() and ks_len() below).
+ * A kstring_t object is initialised by either of
+ *       kstring_t str = { 0, 0, NULL };
+ *       kstring_t str; ...; str.l = str.m = 0; str.s = NULL;
+ * and either ownership of the underlying buffer should be given away before
+ * the object disappears (see ks_release() below) or the kstring_t should be
+ * destroyed with  free(str.s);  */
+#ifndef KSTRING_T
+#define KSTRING_T kstring_t
+typedef struct __kstring_t {
+	size_t l, m;
+	char *s;
+} kstring_t;
+#endif
+
+typedef struct {
+	uint64_t tab[4];
+	int sep, finished;
+	const char *p; // end of the current token
+} ks_tokaux_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	int kvsprintf(kstring_t *s, const char *fmt, va_list ap) KS_ATTR_PRINTF(2,0);
+	int ksprintf(kstring_t *s, const char *fmt, ...) KS_ATTR_PRINTF(2,3);
+	int ksplit_core(char *s, int delimiter, int *_max, int **_offsets);
+	char *kstrstr(const char *str, const char *pat, int **_prep);
+	char *kstrnstr(const char *str, const char *pat, int n, int **_prep);
+	void *kmemmem(const void *_str, int n, const void *_pat, int m, int **_prep);
+
+	/* kstrtok() is similar to strtok_r() except that str is not
+	 * modified and both str and sep can be NULL. For efficiency, it is
+	 * actually recommended to set both to NULL in the subsequent calls
+	 * if sep is not changed. */
+	char *kstrtok(const char *str, const char *sep, ks_tokaux_t *aux);
+
+#ifdef __cplusplus
+}
+#endif
+
+static inline int ks_resize(kstring_t *s, size_t size)
+{
+	if (s->m < size) {
+		char *tmp;
+		s->m = size;
+		kroundup32(s->m);
+		if ((tmp = (char*)realloc(s->s, s->m)))
+			s->s = tmp;
+		else
+			return -1;
+	}
+	return 0;
+}
+
+static inline char *ks_str(kstring_t *s)
+{
+	return s->s;
+}
+
+static inline size_t ks_len(kstring_t *s)
+{
+	return s->l;
+}
+
+// Give ownership of the underlying buffer away to something else (making
+// that something else responsible for freeing it), leaving the kstring_t
+// empty and ready to be used again, or ready to go out of scope without
+// needing  free(str.s)  to prevent a memory leak.
+static inline char *ks_release(kstring_t *s)
+{
+	char *ss = s->s;
+	s->l = s->m = 0;
+	s->s = NULL;
+	return ss;
+}
+
+static inline int kputsn(const char *p, int l, kstring_t *s)
+{
+	if (s->l + l + 1 >= s->m) {
+		char *tmp;
+		s->m = s->l + l + 2;
+		kroundup32(s->m);
+		if ((tmp = (char*)realloc(s->s, s->m)))
+			s->s = tmp;
+		else
+			return EOF;
+	}
+	memcpy(s->s + s->l, p, l);
+	s->l += l;
+	s->s[s->l] = 0;
+	return l;
+}
+
+static inline int kputs(const char *p, kstring_t *s)
+{
+	return kputsn(p, strlen(p), s);
+}
+
+static inline int kputc(int c, kstring_t *s)
+{
+	if (s->l + 1 >= s->m) {
+		char *tmp;
+		s->m = s->l + 2;
+		kroundup32(s->m);
+		if ((tmp = (char*)realloc(s->s, s->m)))
+			s->s = tmp;
+		else
+			return EOF;
+	}
+	s->s[s->l++] = c;
+	s->s[s->l] = 0;
+	return c;
+}
+
+static inline int kputc_(int c, kstring_t *s)
+{
+	if (s->l + 1 > s->m) {
+		char *tmp;
+		s->m = s->l + 1;
+		kroundup32(s->m);
+		if ((tmp = (char*)realloc(s->s, s->m)))
+			s->s = tmp;
+		else
+			return EOF;
+	}
+	s->s[s->l++] = c;
+	return 1;
+}
+
+static inline int kputsn_(const void *p, int l, kstring_t *s)
+{
+	if (s->l + l > s->m) {
+		char *tmp;
+		s->m = s->l + l;
+		kroundup32(s->m);
+		if ((tmp = (char*)realloc(s->s, s->m)))
+			s->s = tmp;
+		else
+			return EOF;
+	}
+	memcpy(s->s + s->l, p, l);
+	s->l += l;
+	return l;
+}
+
+static inline int kputw(int c, kstring_t *s)
+{
+	char buf[16];
+	int i, l = 0;
+	unsigned int x = c;
+	if (c < 0) x = -x;
+	do { buf[l++] = x%10 + '0'; x /= 10; } while (x > 0);
+	if (c < 0) buf[l++] = '-';
+	if (s->l + l + 1 >= s->m) {
+		char *tmp;
+		s->m = s->l + l + 2;
+		kroundup32(s->m);
+		if ((tmp = (char*)realloc(s->s, s->m)))
+			s->s = tmp;
+		else
+			return EOF;
+	}
+	for (i = l - 1; i >= 0; --i) s->s[s->l++] = buf[i];
+	s->s[s->l] = 0;
+	return 0;
+}
+
+static inline int kputuw(unsigned c, kstring_t *s)
+{
+	char buf[16];
+	int l, i;
+	unsigned x;
+	if (c == 0) return kputc('0', s);
+	for (l = 0, x = c; x > 0; x /= 10) buf[l++] = x%10 + '0';
+	if (s->l + l + 1 >= s->m) {
+		char *tmp;
+		s->m = s->l + l + 2;
+		kroundup32(s->m);
+		if ((tmp = (char*)realloc(s->s, s->m)))
+			s->s = tmp;
+		else
+			return EOF;
+	}
+	for (i = l - 1; i >= 0; --i) s->s[s->l++] = buf[i];
+	s->s[s->l] = 0;
+	return 0;
+}
+
+static inline int kputl(long c, kstring_t *s)
+{
+	char buf[32];
+	int i, l = 0;
+	unsigned long x = c;
+	if (c < 0) x = -x;
+	do { buf[l++] = x%10 + '0'; x /= 10; } while (x > 0);
+	if (c < 0) buf[l++] = '-';
+	if (s->l + l + 1 >= s->m) {
+		char *tmp;
+		s->m = s->l + l + 2;
+		kroundup32(s->m);
+		if ((tmp = (char*)realloc(s->s, s->m)))
+			s->s = tmp;
+		else
+			return EOF;
+	}
+	for (i = l - 1; i >= 0; --i) s->s[s->l++] = buf[i];
+	s->s[s->l] = 0;
+	return 0;
+}
+
+/*
+ * Returns 's' split by delimiter, with *n being the number of components;
+ *         NULL on failue.
+ */
+static inline int *ksplit(kstring_t *s, int delimiter, int *n)
+{
+	int max = 0, *offsets = 0;
+	*n = ksplit_core(s->s, delimiter, &max, &offsets);
+	return offsets;
+}
+
+#endif
diff --git a/htslib/htslib/sam.h b/htslib/htslib/sam.h
new file mode 100644
index 0000000..9169994
--- /dev/null
+++ b/htslib/htslib/sam.h
@@ -0,0 +1,399 @@
+#ifndef BAM_H
+#define BAM_H
+
+#include <stdint.h>
+#include "hts.h"
+
+/**********************
+ *** SAM/BAM header ***
+ **********************/
+
+/*! @typedef
+ @abstract Structure for the alignment header.
+ @field n_targets   number of reference sequences
+ @field l_text      length of the plain text in the header
+ @field target_len  lengths of the reference sequences
+ @field target_name names of the reference sequences
+ @field text        plain text
+ @field sdict       header dictionary
+ */
+
+typedef struct {
+	int32_t n_targets, ignore_sam_err;
+	uint32_t l_text;
+	uint32_t *target_len;
+	int8_t *cigar_tab;
+	char **target_name;
+	char *text;
+	void *sdict;
+} bam_hdr_t;
+
+/****************************
+ *** CIGAR related macros ***
+ ****************************/
+
+#define BAM_CMATCH      0
+#define BAM_CINS        1
+#define BAM_CDEL        2
+#define BAM_CREF_SKIP   3
+#define BAM_CSOFT_CLIP  4
+#define BAM_CHARD_CLIP  5
+#define BAM_CPAD        6
+#define BAM_CEQUAL      7
+#define BAM_CDIFF       8
+#define BAM_CBACK       9
+
+#define BAM_CIGAR_STR   "MIDNSHP=XB"
+#define BAM_CIGAR_SHIFT 4
+#define BAM_CIGAR_MASK  0xf
+#define BAM_CIGAR_TYPE  0x3C1A7
+
+#define bam_cigar_op(c) ((c)&BAM_CIGAR_MASK)
+#define bam_cigar_oplen(c) ((c)>>BAM_CIGAR_SHIFT)
+#define bam_cigar_opchr(c) (BAM_CIGAR_STR[bam_cigar_op(c)])
+#define bam_cigar_gen(l, o) ((l)<<BAM_CIGAR_SHIFT|(o))
+
+/* bam_cigar_type returns a bit flag with:
+ *   bit 1 set if the cigar operation consumes the query
+ *   bit 2 set if the cigar operation consumes the reference
+ *
+ * For reference, the unobfuscated truth table for this function is:
+ * BAM_CIGAR_TYPE  QUERY  REFERENCE
+ * --------------------------------
+ * BAM_CMATCH      1      1
+ * BAM_CINS        1      0
+ * BAM_CDEL        0      1
+ * BAM_CREF_SKIP   0      1
+ * BAM_CSOFT_CLIP  1      0
+ * BAM_CHARD_CLIP  0      0
+ * BAM_CPAD        0      0
+ * BAM_CEQUAL      1      1
+ * BAM_CDIFF       1      1
+ * BAM_CBACK       0      0
+ * --------------------------------
+ */
+#define bam_cigar_type(o) (BAM_CIGAR_TYPE>>((o)<<1)&3) // bit 1: consume query; bit 2: consume reference
+
+/*! @abstract the read is paired in sequencing, no matter whether it is mapped in a pair */
+#define BAM_FPAIRED        1
+/*! @abstract the read is mapped in a proper pair */
+#define BAM_FPROPER_PAIR   2
+/*! @abstract the read itself is unmapped; conflictive with BAM_FPROPER_PAIR */
+#define BAM_FUNMAP         4
+/*! @abstract the mate is unmapped */
+#define BAM_FMUNMAP        8
+/*! @abstract the read is mapped to the reverse strand */
+#define BAM_FREVERSE      16
+/*! @abstract the mate is mapped to the reverse strand */
+#define BAM_FMREVERSE     32
+/*! @abstract this is read1 */
+#define BAM_FREAD1        64
+/*! @abstract this is read2 */
+#define BAM_FREAD2       128
+/*! @abstract not primary alignment */
+#define BAM_FSECONDARY   256
+/*! @abstract QC failure */
+#define BAM_FQCFAIL      512
+/*! @abstract optical or PCR duplicate */
+#define BAM_FDUP        1024
+/*! @abstract supplementary alignment */
+#define BAM_FSUPPLEMENTARY 2048
+
+/*************************
+ *** Alignment records ***
+ *************************/
+
+/*! @typedef
+ @abstract Structure for core alignment information.
+ @field  tid     chromosome ID, defined by bam_hdr_t
+ @field  pos     0-based leftmost coordinate
+ @field  bin     bin calculated by bam_reg2bin()
+ @field  qual    mapping quality
+ @field  l_qname length of the query name
+ @field  flag    bitwise flag
+ @field  n_cigar number of CIGAR operations
+ @field  l_qseq  length of the query sequence (read)
+ @field  mtid    chromosome ID of next read in template, defined by bam_hdr_t
+ @field  mpos    0-based leftmost coordinate of next read in template
+ */
+typedef struct {
+	int32_t tid;
+	int32_t pos;
+	uint32_t bin:16, qual:8, l_qname:8;
+	uint32_t flag:16, n_cigar:16;
+	int32_t l_qseq;
+	int32_t mtid;
+	int32_t mpos;
+	int32_t isize;
+} bam1_core_t;
+
+/*! @typedef
+ @abstract Structure for one alignment.
+ @field  core       core information about the alignment
+ @field  l_data     current length of bam1_t::data
+ @field  m_data     maximum length of bam1_t::data
+ @field  data       all variable-length data, concatenated; structure: qname-cigar-seq-qual-aux
+ 
+ @discussion Notes:
+ 
+ 1. qname is zero tailing and core.l_qname includes the tailing '\0'.
+ 2. l_qseq is calculated from the total length of an alignment block
+ on reading or from CIGAR.
+ 3. cigar data is encoded 4 bytes per CIGAR operation.
+ 4. seq is nybble-encoded according to bam_nt16_table.
+ */
+typedef struct {
+	bam1_core_t core;
+	int l_data, m_data;
+	uint8_t *data;
+#ifndef BAM_NO_ID
+	uint64_t id;
+#endif
+} bam1_t;
+
+/*! @function
+ @abstract  Get whether the query is on the reverse strand
+ @param  b  pointer to an alignment
+ @return    boolean true if query is on the reverse strand
+ */
+#define bam_is_rev(b) (((b)->core.flag&BAM_FREVERSE) != 0)
+/*! @function
+ @abstract  Get whether the query's mate is on the reverse strand
+ @param  b  pointer to an alignment
+ @return    boolean true if query's mate on the reverse strand
+ */
+#define bam_is_mrev(b) (((b)->core.flag&BAM_FMREVERSE) != 0)
+/*! @function
+ @abstract  Get the name of the query
+ @param  b  pointer to an alignment
+ @return    pointer to the name string, null terminated
+ */
+#define bam_get_qname(b) ((char*)(b)->data)
+/*! @function
+ @abstract  Get the CIGAR array
+ @param  b  pointer to an alignment
+ @return    pointer to the CIGAR array
+
+ @discussion In the CIGAR array, each element is a 32-bit integer. The
+ lower 4 bits gives a CIGAR operation and the higher 28 bits keep the
+ length of a CIGAR.
+ */
+#define bam_get_cigar(b) ((uint32_t*)((b)->data + (b)->core.l_qname))
+/*! @function
+ @abstract  Get query sequence
+ @param  b  pointer to an alignment
+ @return    pointer to sequence
+
+ @discussion Each base is encoded in 4 bits: 1 for A, 2 for C, 4 for G,
+ 8 for T and 15 for N. Two bases are packed in one byte with the base
+ at the higher 4 bits having smaller coordinate on the read. It is
+ recommended to use bam_seqi() macro to get the base.
+ */
+#define bam_get_seq(b)   ((b)->data + ((b)->core.n_cigar<<2) + (b)->core.l_qname)
+/*! @function
+ @abstract  Get query quality
+ @param  b  pointer to an alignment
+ @return    pointer to quality string
+ */
+#define bam_get_qual(b)  ((b)->data + ((b)->core.n_cigar<<2) + (b)->core.l_qname + (((b)->core.l_qseq + 1)>>1))
+/*! @function
+ @abstract  Get auxiliary data
+ @param  b  pointer to an alignment
+ @return    pointer to the concatenated auxiliary data
+ */
+#define bam_get_aux(b)   ((b)->data + ((b)->core.n_cigar<<2) + (b)->core.l_qname + (((b)->core.l_qseq + 1)>>1) + (b)->core.l_qseq)
+/*! @function
+ @abstract  Get length of auxiliary data
+ @param  b  pointer to an alignment
+ @return    length of the concatenated auxiliary data
+ */
+#define bam_get_l_aux(b) ((b)->l_data - ((b)->core.n_cigar<<2) - (b)->core.l_qname - (b)->core.l_qseq - (((b)->core.l_qseq + 1)>>1))
+/*! @function
+ @abstract  Get a base on read
+ @param  s  Query sequence returned by bam1_seq()
+ @param  i  The i-th position, 0-based
+ @return    4-bit integer representing the base.
+ */
+#define bam_seqi(s, i) ((s)[(i)>>1] >> ((~(i)&1)<<2) & 0xf)
+
+/**************************
+ *** Exported functions ***
+ **************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	/***************
+	 *** BAM I/O ***
+	 ***************/
+
+	bam_hdr_t *bam_hdr_init(void);
+	bam_hdr_t *bam_hdr_read(BGZF *fp);
+	int bam_hdr_write(BGZF *fp, const bam_hdr_t *h);
+	void bam_hdr_destroy(bam_hdr_t *h);
+	int bam_name2id(bam_hdr_t *h, const char *ref);
+	bam_hdr_t* bam_hdr_dup(const bam_hdr_t *h0);
+
+	bam1_t *bam_init1(void);
+	void bam_destroy1(bam1_t *b);
+	int bam_read1(BGZF *fp, bam1_t *b);
+	int bam_write1(BGZF *fp, const bam1_t *b);
+	bam1_t *bam_copy1(bam1_t *bdst, const bam1_t *bsrc);
+	bam1_t *bam_dup1(const bam1_t *bsrc);
+
+	int bam_cigar2qlen(int n_cigar, const uint32_t *cigar);
+	int bam_cigar2rlen(int n_cigar, const uint32_t *cigar);
+
+	/*!
+	  @abstract Calculate the rightmost base position of an alignment on the
+	  reference genome.
+
+	  @param  b  pointer to an alignment
+	  @return    the coordinate of the first base after the alignment, 0-based
+
+	  @discussion For a mapped read, this is just b->core.pos + bam_cigar2rlen.
+	  For an unmapped read (either according to its flags or if it has no cigar
+	  string), we return b->core.pos + 1 by convention.
+	*/
+	int32_t bam_endpos(const bam1_t *b);
+
+    int   bam_str2flag(const char *str);    /** returns negative value on error */
+    char *bam_flag2str(int flag);   /** The string must be freed by the user */
+
+	/*************************
+	 *** BAM/CRAM indexing ***
+	 *************************/
+
+	// These BAM iterator functions work only on BAM files.  To work with either
+	// BAM or CRAM files use the sam_index_load() & sam_itr_*() functions.
+	#define bam_itr_destroy(iter) hts_itr_destroy(iter)
+	#define bam_itr_queryi(idx, tid, beg, end) sam_itr_queryi(idx, tid, beg, end)
+	#define bam_itr_querys(idx, hdr, region) sam_itr_querys(idx, hdr, region)
+	#define bam_itr_next(htsfp, itr, r) hts_itr_next((htsfp)->fp.bgzf, (itr), (r), 0)
+
+	// Load .csi or .bai BAM index file.
+	#define bam_index_load(fn) hts_idx_load((fn), HTS_FMT_BAI)
+
+	int bam_index_build(const char *fn, int min_shift);
+
+	// Load BAM (.csi or .bai) or CRAM (.crai) index file.
+	hts_idx_t *sam_index_load(htsFile *fp, const char *fn);
+
+	#define sam_itr_destroy(iter) hts_itr_destroy(iter)
+	hts_itr_t *sam_itr_queryi(const hts_idx_t *idx, int tid, int beg, int end);
+	hts_itr_t *sam_itr_querys(const hts_idx_t *idx, bam_hdr_t *hdr, const char *region);
+	#define sam_itr_next(htsfp, itr, r) hts_itr_next((htsfp)->fp.bgzf, (itr), (r), (htsfp))
+
+	/***************
+	 *** SAM I/O ***
+	 ***************/
+
+	#define sam_open(fn, mode) (hts_open((fn), (mode)))
+	#define sam_close(fp) hts_close(fp)
+
+	typedef htsFile samFile;
+	bam_hdr_t *sam_hdr_parse(int l_text, const char *text);
+	bam_hdr_t *sam_hdr_read(samFile *fp);
+	int sam_hdr_write(samFile *fp, const bam_hdr_t *h);
+
+	int sam_parse1(kstring_t *s, bam_hdr_t *h, bam1_t *b);
+	int sam_format1(const bam_hdr_t *h, const bam1_t *b, kstring_t *str);
+	int sam_read1(samFile *fp, bam_hdr_t *h, bam1_t *b);
+	int sam_write1(samFile *fp, const bam_hdr_t *h, const bam1_t *b);
+
+	/*************************************
+	 *** Manipulating auxiliary fields ***
+	 *************************************/
+
+	uint8_t *bam_aux_get(const bam1_t *b, const char tag[2]);
+	int32_t bam_aux2i(const uint8_t *s);
+	double bam_aux2f(const uint8_t *s);
+	char bam_aux2A(const uint8_t *s);
+	char *bam_aux2Z(const uint8_t *s);
+
+	void bam_aux_append(bam1_t *b, const char tag[2], char type, int len, uint8_t *data);
+	int bam_aux_del(bam1_t *b, uint8_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+/**************************
+ *** Pileup and Mpileup ***
+ **************************/
+
+#if !defined(BAM_NO_PILEUP)
+
+/*! @typedef
+ @abstract Structure for one alignment covering the pileup position.
+ @field  b          pointer to the alignment
+ @field  qpos       position of the read base at the pileup site, 0-based
+ @field  indel      indel length; 0 for no indel, positive for ins and negative for del
+ @field  level      the level of the read in the "viewer" mode
+ @field  is_del     1 iff the base on the padded read is a deletion
+ @field  is_head    ???
+ @field  is_tail    ???
+ @field  is_refskip ???
+ @field  aux        ???
+
+ @discussion See also bam_plbuf_push() and bam_lplbuf_push(). The
+ difference between the two functions is that the former does not
+ set bam_pileup1_t::level, while the later does. Level helps the
+ implementation of alignment viewers, but calculating this has some
+ overhead.
+ */
+typedef struct {
+	bam1_t *b;
+	int32_t qpos;
+	int indel, level;
+	uint32_t is_del:1, is_head:1, is_tail:1, is_refskip:1, aux:28;
+} bam_pileup1_t;
+
+typedef int (*bam_plp_auto_f)(void *data, bam1_t *b);
+
+struct __bam_plp_t;
+typedef struct __bam_plp_t *bam_plp_t;
+
+struct __bam_mplp_t;
+typedef struct __bam_mplp_t *bam_mplp_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /**
+     *  bam_plp_init() - sets an iterator over multiple 
+     *  @func:      see mplp_func in bam_plcmd.c in samtools for an example. Expected return
+     *              status: 0 on success, -1 on end, < -1 on non-recoverable errors
+     *  @data:      user data to pass to @func
+     */
+	bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data);
+	void bam_plp_destroy(bam_plp_t iter);
+	int bam_plp_push(bam_plp_t iter, const bam1_t *b);
+	const bam_pileup1_t *bam_plp_next(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp);
+	const bam_pileup1_t *bam_plp_auto(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp);
+	void bam_plp_set_maxcnt(bam_plp_t iter, int maxcnt);
+	void bam_plp_reset(bam_plp_t iter);
+
+	bam_mplp_t bam_mplp_init(int n, bam_plp_auto_f func, void **data);
+    /**
+     *  bam_mplp_init_overlaps() - if called, mpileup will detect overlapping
+     *  read pairs and for each base pair set the base quality of the
+     *  lower-quality base to zero, thus effectively discarding it from
+     *  calling. If the two bases are identical, the quality of the other base
+     *  is increased to the sum of their qualities (capped at 200), otherwise
+     *  it is multiplied by 0.8.
+     */
+    void bam_mplp_init_overlaps(bam_mplp_t iter);
+	void bam_mplp_destroy(bam_mplp_t iter);
+	void bam_mplp_set_maxcnt(bam_mplp_t iter, int maxcnt);
+	int bam_mplp_auto(bam_mplp_t iter, int *_tid, int *_pos, int *n_plp, const bam_pileup1_t **plp);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ~!defined(BAM_NO_PILEUP)
+
+#endif
diff --git a/htslib/htslib/synced_bcf_reader.h b/htslib/htslib/synced_bcf_reader.h
new file mode 100644
index 0000000..2f79a21
--- /dev/null
+++ b/htslib/htslib/synced_bcf_reader.h
@@ -0,0 +1,255 @@
+/*
+	The synced_bcf_reader allows to keep multiple VCFs open and stream them
+	using the next_line iterator in a seamless matter without worrying about
+	chromosomes and synchronizing the sites. This is used by vcfcheck to
+	compare multiple VCFs simultaneously and is used also for merging,
+	creating intersections, etc.
+
+    The synced_bcf_reader also provides API for reading indexed BCF/VCF,
+    hiding differences in BCF/VCF opening, indexing and reading.
+
+
+    Example of usage:
+
+        bcf_srs_t *sr = bcf_sr_init();
+        for (i=0; i<nfiles; i++)
+            bcf_sr_add_reader(sr,files[i]);
+        while ( bcf_sr_next_line(sr) )
+        {
+            for (i=0; i<nfiles; i++)
+            {
+                bcf1_t *line = bcf_sr_get_line(sr,i);
+                ...
+            }
+        }
+        bcf_sr_destroy(sr);
+*/
+
+#ifndef SYNCED_BCF_READER_H
+#define SYNCED_BCF_READER_H
+
+#include "hts.h"
+#include "vcf.h"
+#include "tbx.h"
+
+// How should be treated sites with the same position but different alleles
+#define COLLAPSE_NONE   0   // require the exact same set of alleles in all files 
+#define COLLAPSE_SNPS   1   // allow different alleles, as long as they all are SNPs
+#define COLLAPSE_INDELS 2   // the same as above, but with indels
+#define COLLAPSE_ANY    4   // any combination of alleles can be returned by bcf_sr_next_line()
+#define COLLAPSE_SOME   8   // at least some of the ALTs must match
+#define COLLAPSE_BOTH  (COLLAPSE_SNPS|COLLAPSE_INDELS)
+
+typedef struct _bcf_sr_regions_t
+{
+    // for reading from tabix-indexed file (big data)
+    tbx_t *tbx;             // tabix index
+    hts_itr_t *itr;         // tabix iterator
+    kstring_t line;         // holder of the current line, set only when reading from tabix-indexed files
+    htsFile *file;
+    char *fname;
+    int is_bin;             // is open in binary mode (tabix access)
+    char **als;             // parsed alleles if targets_als set and _regions_match_alleles called
+    kstring_t als_str;      // block of parsed alleles
+    int nals, mals;         // number of set alleles and the size of allocated array
+    int als_type;           // alleles type, currently VCF_SNP or VCF_INDEL
+
+    // user handler to deal with skipped regions without a counterpart in VCFs
+    void (*missed_reg_handler)(struct _bcf_sr_regions_t *, void *);
+    void *missed_reg_data;
+
+    // for in-memory regions (small data)
+    struct _region_t *regs; // the regions
+
+    // shared by both tabix-index and in-memory regions
+    void *seq_hash;         // keys: sequence names, values: index to seqs
+    char **seq_names;       // sequence names
+    int nseqs;              // number of sequences (chromosomes) in the file
+    int iseq;               // current position: chr name, index to snames
+    int start, end;         // current position: start, end of the region (0-based)
+    int prev_seq, prev_start;
+}
+bcf_sr_regions_t;
+
+typedef struct
+{
+	htsFile *file;
+    tbx_t *tbx_idx;
+    hts_idx_t *bcf_idx;
+	bcf_hdr_t *header;
+	hts_itr_t *itr;
+	const char *fname;
+	bcf1_t **buffer;                // cached VCF records. First is the current record synced across the reader
+	int nbuffer, mbuffer;           // number of cached records (including the current record); number of allocated records
+	int nfilter_ids, *filter_ids;   // -1 for ".", otherwise filter id as returned by bcf_id2int
+    int type;
+	int *samples, n_smpl;	// list of columns in the order consistent with bcf_srs_t.samples
+}
+bcf_sr_t;
+
+typedef struct
+{
+	// Parameters controlling the logic
+	int collapse;       // How should the duplicate sites be treated. One of the COLLAPSE_* types above.
+    char *apply_filters;    // If set, sites where none of the FILTER strings is listed
+                            // will be skipped. Active only at the time of
+                            // initialization, that is during the add_reader()
+                            // calls. Therefore, each reader can be initialized with different
+                            // filters.
+    int require_index;  // Some tools do not need random access
+    int max_unpack;     // When reading VCFs and knowing some fields will not be needed, boost performance of vcf_parse1
+    int *has_line;      // Corresponds to return value of bcf_sr_next_line but is not limited by sizeof(int). Use bcf_sr_has_line macro to query.
+
+	// Auxiliary data
+	bcf_sr_t *readers;
+	int nreaders;
+	int streaming;      // reading mode: index-jumping or streaming
+    int explicit_regs;  // was the list of regions se by bcf_sr_set_regions or guessed from tabix index?
+	char **samples;	// List of samples 
+    bcf_sr_regions_t *regions, *targets;    // see bcf_sr_set_[targets|regions] for description
+    int targets_als;    // subset to targets not only by position but also by alleles? (todo)
+    kstring_t tmps;
+	int n_smpl;
+}
+bcf_srs_t;
+
+/** Init bcf_srs_t struct */
+bcf_srs_t *bcf_sr_init(void);
+
+/** Destroy  bcf_srs_t struct */
+void bcf_sr_destroy(bcf_srs_t *readers);
+
+/**
+ *  bcf_sr_add_reader() - open new reader
+ *  @readers: holder of the open readers
+ *  @fname:   the VCF file
+ *
+ *  Returns 1 if the call succeeded, or 0 on error.
+ *
+ *  See also the bcf_srs_t data structure for parameters controlling
+ *  the reader's logic.
+ */
+int bcf_sr_add_reader(bcf_srs_t *readers, const char *fname);
+void bcf_sr_remove_reader(bcf_srs_t *files, int i);
+
+
+/** 
+ * bcf_sr_next_line() - the iterator
+ * @readers:    holder of the open readers
+ *
+ * Returns the number of readers which have the current line
+ * (bcf_sr_t.buffer[0]) set at this position. Use the bcf_sr_has_line macro to
+ * determine which of the readers are set.
+ */
+int bcf_sr_next_line(bcf_srs_t *readers);
+#define bcf_sr_has_line(readers, i) (readers)->has_line[i]
+#define bcf_sr_get_line(_readers, i) ((_readers)->has_line[i] ? ((_readers)->readers[i].buffer[0]) : NULL)
+#define bcf_sr_region_done(_readers,i) (!(_readers)->has_line[i] && !(_readers)->readers[i].nbuffer ? 1 : 0)
+
+/**
+ *  bcf_sr_seek() - set all readers to selected position
+ *  @seq:  sequence name; NULL to seek to start
+ *  @pos:  0-based coordinate
+ */
+int bcf_sr_seek(bcf_srs_t *readers, const char *seq, int pos);
+
+/**
+ * bcf_sr_set_samples() - sets active samples
+ * @readers: holder of the open readers
+ * @samples: this can be one of: file name with one sample per line;
+ *           or column-separated list of samples; or '-' for a list of 
+ *           samples shared by all files. If first character is the
+ *           exclamation mark, all but the listed samples are included.
+ * @is_file: 0: list of samples; 1: file with sample names
+ *
+ * Returns 1 if the call succeeded, or 0 on error.
+ */
+int bcf_sr_set_samples(bcf_srs_t *readers, const char *samples, int is_file);
+
+/**
+ *  bcf_sr_set_targets(), bcf_sr_set_regions() - init targets/regions
+ *  @readers:   holder of the open readers
+ *  @targets:   list of regions, one-based and inclusive.
+ *  @is_fname:  0: targets is a comma-separated list of regions (chr,chr:from-to)
+ *              1: targets is a tabix indexed file with a list of regions
+ *              (<chr,pos> or <chr,from,to>)
+ *
+ *  Returns 0 if the call succeeded, or -1 on error.
+ *
+ *  Both functions behave the same way, unlisted positions will be skipped by
+ *  bcf_sr_next_line(). However, there is an important difference: regions use
+ *  index to jump to desired positions while targets streams the whole files
+ *  and merely skip unlisted positions.
+ *
+ *  Moreover, bcf_sr_set_targets() accepts an optional parameter $alleles which
+ *  is intepreted as a 1-based column index in the tab-delimited file where
+ *  alleles are listed. This in principle enables to perform the COLLAPSE_*
+ *  logic also with tab-delimited files. However, the current implementation
+ *  considers the alleles merely as a suggestion for prioritizing one of possibly
+ *  duplicate VCF lines. It is up to the caller to examine targets->als if
+ *  perfect match is sought after. Note that the duplicate positions in targets
+ *  file are currently not supported.
+ */
+int bcf_sr_set_targets(bcf_srs_t *readers, const char *targets, int is_file, int alleles);
+int bcf_sr_set_regions(bcf_srs_t *readers, const char *regions, int is_file);
+
+
+
+/*
+ *  bcf_sr_regions_init() 
+ *  @regions:   regions can be either a comma-separated list of regions
+ *              (chr|chr:pos|chr:from-to|chr:from-) or VCF, BED, or
+ *              tab-delimited file (the default). Uncompressed files
+ *              are stored in memory while bgzip-compressed and tabix-indexed
+ *              region files are streamed.
+ *  @is_file:   0: regions is a comma-separated list of regions
+ *                  (chr|chr:pos|chr:from-to|chr:from-)
+ *              1: VCF, BED or tab-delimited file
+ *  @chr, from, to:       
+ *              Column indexes of chromosome, start position and end position
+ *              in the tab-delimited file. The positions are 1-based and
+ *              inclusive. 
+ *              These parameters are ignored when reading from VCF, BED or
+ *              tabix-indexed files. When end position column is not present,
+ *              supply 'from' in place of 'to'. When 'to' is negative, first
+ *              abs(to) will be attempted and if that fails, 'from' will be used
+ *              instead.
+ */
+bcf_sr_regions_t *bcf_sr_regions_init(const char *regions, int is_file, int chr, int from, int to);
+void bcf_sr_regions_destroy(bcf_sr_regions_t *regions);
+
+/*
+ *  bcf_sr_regions_seek() - seek to the chromosome block
+ *
+ *  Returns 0 on success or -1 on failure. Sets reg->seq appropriately and
+ *  reg->start,reg->end to -1.
+ */
+int bcf_sr_regions_seek(bcf_sr_regions_t *regions, const char *chr);
+
+/*
+ *  bcf_sr_regions_next() - retrieves next region. Returns 0 on success and -1
+ *  when all regions have been read. The fields reg->seq, reg->start and
+ *  reg->end are filled with the genomic coordinates on succes or with
+ *  NULL,-1,-1 when no region is available. The coordinates are 0-based,
+ *  inclusive.
+ */
+int bcf_sr_regions_next(bcf_sr_regions_t *reg);
+
+/*
+ *  bcf_sr_regions_overlap() - checks if the interval <start,end> overlaps any of
+ *  the regions, the coordinates are 0-based, inclusive. The coordinate queries
+ *  must come in ascending order.
+ *
+ *  Returns 0 if the position is in regions; -1 if the position is not in the
+ *  regions and more regions exist; -2 if not in the regions and there are no more
+ *  regions left.
+ */
+int bcf_sr_regions_overlap(bcf_sr_regions_t *reg, const char *seq, int start, int end);
+
+/*
+ *  bcf_sr_regions_flush() - calls repeatedly regs->missed_reg_handler() until
+ *  all remaining records are processed.
+ */
+void bcf_sr_regions_flush(bcf_sr_regions_t *regs);
+
+#endif
diff --git a/htslib/htslib/tbx.h b/htslib/htslib/tbx.h
new file mode 100644
index 0000000..71b4ac2
--- /dev/null
+++ b/htslib/htslib/tbx.h
@@ -0,0 +1,52 @@
+#ifndef TBX_H
+#define TBX_H
+
+#include "hts.h"
+
+#define TBX_MAX_SHIFT 31
+
+#define TBX_GENERIC 0
+#define TBX_SAM     1
+#define TBX_VCF     2
+#define TBX_UCSC    0x10000
+
+typedef struct {
+	int32_t preset;
+	int32_t sc, bc, ec; // seq col., beg col. and end col.
+	int32_t meta_char, line_skip;
+} tbx_conf_t;
+
+typedef struct {
+	tbx_conf_t conf;
+	hts_idx_t *idx;
+	void *dict;
+} tbx_t;
+
+extern tbx_conf_t tbx_conf_gff, tbx_conf_bed, tbx_conf_psltbl, tbx_conf_sam, tbx_conf_vcf;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	#define tbx_itr_destroy(iter) hts_itr_destroy(iter)
+	#define tbx_itr_queryi(tbx, tid, beg, end) hts_itr_query((tbx)->idx, (tid), (beg), (end), tbx_readrec)
+	#define tbx_itr_querys(tbx, s) hts_itr_querys((tbx)->idx, (s), (hts_name2id_f)(tbx_name2id), (tbx), hts_itr_query, tbx_readrec)
+	#define tbx_itr_next(htsfp, tbx, itr, r) hts_itr_next(hts_get_bgzfp(htsfp), (itr), (r), (tbx))
+	#define tbx_bgzf_itr_next(bgzfp, tbx, itr, r) hts_itr_next((bgzfp), (itr), (r), (tbx))
+
+	int tbx_name2id(tbx_t *tbx, const char *ss);
+
+	/* Internal helper function used by tbx_itr_next() */
+	BGZF *hts_get_bgzfp(htsFile *fp);
+	int tbx_readrec(BGZF *fp, void *tbxv, void *sv, int *tid, int *beg, int *end);
+
+	int tbx_index_build(const char *fn, int min_shift, const tbx_conf_t *conf);
+	tbx_t *tbx_index_load(const char *fn);
+	const char **tbx_seqnames(tbx_t *tbx, int *n);	// free the array but not the values
+	void tbx_destroy(tbx_t *tbx);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/htslib/htslib/vcf.h b/htslib/htslib/vcf.h
new file mode 100644
index 0000000..a4666de
--- /dev/null
+++ b/htslib/htslib/vcf.h
@@ -0,0 +1,823 @@
+/*
+    todo: 
+        - make the function names consistent
+        - provide calls to abstract away structs as much as possible
+ */
+
+#ifndef BCF_H
+#define BCF_H
+
+#include <stdint.h>
+#include <limits.h>
+#include <assert.h>
+#include "hts.h"
+#include "kstring.h"
+
+
+/*****************
+ * Header struct *
+ *****************/
+
+#define BCF_HL_FLT  0 // header line
+#define BCF_HL_INFO 1
+#define BCF_HL_FMT  2
+#define BCF_HL_CTG  3
+#define BCF_HL_STR  4 // structured header line TAG=<A=..,B=..>
+#define BCF_HL_GEN  5 // generic header line
+
+#define BCF_HT_FLAG 0 // header type
+#define BCF_HT_INT  1
+#define BCF_HT_REAL 2
+#define BCF_HT_STR  3
+
+#define BCF_VL_FIXED 0 // variable length
+#define BCF_VL_VAR   1
+#define BCF_VL_A     2
+#define BCF_VL_G     3
+#define BCF_VL_R     4
+
+/* === Dictionary ===
+
+   The header keeps three dictonaries. The first keeps IDs in the
+   "FILTER/INFO/FORMAT" lines, the second keeps the sequence names and lengths
+   in the "contig" lines and the last keeps the sample names. bcf_hdr_t::dict[]
+   is the actual hash table, which is opaque to the end users. In the hash
+   table, the key is the ID or sample name as a C string and the value is a
+   bcf_idinfo_t struct. bcf_hdr_t::id[] points to key-value pairs in the hash
+   table in the order that they appear in the VCF header. bcf_hdr_t::n[] is the
+   size of the hash table or, equivalently, the length of the id[] arrays.
+*/
+
+#define BCF_DT_ID		0 // dictionary type
+#define BCF_DT_CTG		1
+#define BCF_DT_SAMPLE	2
+
+// Complete textual representation of a header line
+typedef struct {
+    int type;       // One of the BCF_HL_* type
+    char *key;      // The part before '=', i.e. FILTER/INFO/FORMAT/contig/fileformat etc.
+    char *value;    // Set only for generic lines, NULL for FILTER/INFO, etc.
+    int nkeys;              // Number of structured fields
+    char **keys, **vals;    // The key=value pairs
+} bcf_hrec_t;
+
+typedef struct {
+	uint32_t info[3];  // stores Number:20, var:4, Type:4, ColType:4 for BCF_HL_FLT,INFO,FMT
+    bcf_hrec_t *hrec[3];
+	int id;
+} bcf_idinfo_t;
+
+typedef struct {
+	const char *key;
+	const bcf_idinfo_t *val;
+} bcf_idpair_t;
+
+typedef struct {
+	int32_t n[3];
+	bcf_idpair_t *id[3];
+	void *dict[3]; // ID dictionary, contig dict and sample dict
+	char **samples;
+    bcf_hrec_t **hrec;
+    int nhrec;
+    int ntransl, *transl[2];    // for bcf_translate()
+    int nsamples_ori;           // for bcf_hdr_set_samples()
+    uint8_t *keep_samples;
+	kstring_t mem;
+} bcf_hdr_t;
+
+extern uint8_t bcf_type_shift[];
+
+/**************
+ * VCF record *
+ **************/
+
+#define BCF_BT_NULL		0
+#define BCF_BT_INT8		1
+#define BCF_BT_INT16	2
+#define BCF_BT_INT32	3
+#define BCF_BT_FLOAT	5
+#define BCF_BT_CHAR		7
+
+#define VCF_REF   0
+#define VCF_SNP   1
+#define VCF_MNP   2
+#define VCF_INDEL 4
+#define VCF_OTHER 8
+
+typedef struct {
+	int type, n;	// variant type and the number of bases affected, negative for deletions
+} variant_t;
+
+typedef struct {
+	int id;             // id: numeric tag id, the corresponding string is bcf_hdr_t::id[BCF_DT_ID][$id].key
+    int n, size, type;  // n: number of values per-sample; size: number of bytes per-sample; type: one of BCF_BT_* types
+	uint8_t *p;         // same as vptr and vptr_* in bcf_info_t below
+    uint32_t p_len;
+    uint32_t p_off:31, p_free:1;
+} bcf_fmt_t;
+
+typedef struct {
+	int key;        // key: numeric tag id, the corresponding string is bcf_hdr_t::id[BCF_DT_ID][$key].key
+    int type, len;  // type: one of BCF_BT_* types; len: vector length, 1 for scalars
+	union {
+		int32_t i; // integer value
+		float f;   // float value
+	} v1; // only set if $len==1; for easier access
+	uint8_t *vptr;          // pointer to data array in bcf1_t->shared.s, excluding the size+type and tag id bytes
+    uint32_t vptr_len;      // length of the vptr block or, when set, of the vptr_mod block, excluding offset
+    uint32_t vptr_off:31,   // vptr offset, i.e., the size of the INFO key plus size+type bytes
+            vptr_free:1;    // indicates that vptr-vptr_off must be freed; set only when modified and the new 
+                            //    data block is bigger than the original
+} bcf_info_t;
+
+
+#define BCF1_DIRTY_ID  1
+#define BCF1_DIRTY_ALS 2
+#define BCF1_DIRTY_FLT 4
+#define BCF1_DIRTY_INF 8
+
+typedef struct {
+	int m_fmt, m_info, m_id, m_als, m_allele, m_flt; // allocated size (high-water mark); do not change
+	int n_flt;  // Number of FILTER fields
+	int *flt;   // FILTER keys in the dictionary
+    char *id, *als;     // ID and REF+ALT block (\0-seperated)
+	char **allele;      // allele[0] is the REF (allele[] pointers to the als block); all null terminated
+	bcf_info_t *info;   // INFO
+	bcf_fmt_t *fmt;     // FORMAT and individual sample
+	variant_t *var;	    // $var and $var_type set only when set_variant_types called
+	int n_var, var_type;
+    int shared_dirty;   // if set, shared.s must be recreated on BCF output
+    int indiv_dirty;    // if set, indiv.s must be recreated on BCF output
+} bcf_dec_t;
+
+
+#define BCF_ERR_CTG_UNDEF 1
+#define BCF_ERR_TAG_UNDEF 2
+
+/*
+    The bcf1_t structure corresponds to one VCF/BCF line. Reading from VCF file
+    is slower because the string is first to be parsed, packed into BCF line
+    (done in vcf_parse), then unpacked into internal bcf1_t structure. If it
+    is known in advance that some of the fields will not be required (notably
+    the sample columns), parsing of these can be skipped by setting max_unpack
+    appropriately.
+    Similarly, it is fast to output a BCF line because the columns (kept in
+    shared.s, indiv.s, etc.) are written directly by bcf_write, whereas a VCF
+    line must be formatted in vcf_format. 
+ */
+typedef struct {
+	int32_t rid;  // CHROM
+	int32_t pos;  // POS
+	int32_t rlen; // length of REF
+	float qual;   // QUAL
+	uint32_t n_info:16, n_allele:16;
+	uint32_t n_fmt:8, n_sample:24;
+	kstring_t shared, indiv;
+	bcf_dec_t d; // lazy evaluation: $d is not generated by bcf_read(), but by explicitly calling bcf_unpack()
+    int max_unpack;         // Set to BCF_UN_STR, BCF_UN_FLT, or BCF_UN_INFO to boost performance of vcf_parse when some of the fields won't be needed
+	int unpacked;           // remember what has been unpacked to allow calling bcf_unpack() repeatedly without redoing the work
+	uint8_t *unpack_ptr;    // position of the last unpack call
+    int unpack_size[3];     // the original block size of ID, REF+ALT and FILTER 
+    int errcode;    // one of BCF_ERR_* codes
+} bcf1_t;
+
+/*******
+ * API *
+ *******/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	/***********************************************************************
+	 *  BCF and VCF I/O
+     *
+     *  A note about naming conventions: htslib internally represents VCF
+     *  records as bcf1_t data structures, therefore most functions are
+     *  prefixed with bcf_. There are a few exceptions where the functions must
+     *  be aware of both BCF and VCF worlds, such as bcf_parse vs vcf_parse. In
+     *  these cases, functions prefixed with bcf_ are more general and work
+     *  with both BCF and VCF.
+     *
+	 ***********************************************************************/
+
+    /** These macros are defined only for consistency with other parts of htslib */
+    #define bcf_init1()         bcf_init()
+    #define bcf_read1(fp,h,v)   bcf_read((fp),(h),(v))
+    #define vcf_read1(fp,h,v)   vcf_read((fp),(h),(v))
+    #define bcf_write1(fp,h,v)  bcf_write((fp),(h),(v))
+    #define vcf_write1(fp,h,v)  vcf_write((fp),(h),(v))
+    #define bcf_destroy1(v)     bcf_destroy(v)
+    #define vcf_parse1(s,h,v)   vcf_parse((s),(h),(v))
+    #define bcf_clear1(v)       bcf_clear(v)
+    #define vcf_format1(h,v,s)  vcf_format((h),(v),(s))
+
+    /**
+     *  bcf_hdr_init() - create an empty BCF header.
+     *  @param mode    "r" or "w"
+     *
+     *  When opened for writing, the mandatory fileFormat and
+     *  FILTER=PASS lines are added automatically.
+     */
+	bcf_hdr_t *bcf_hdr_init(const char *mode);
+
+   	/** Destroy a BCF header struct */
+	void bcf_hdr_destroy(bcf_hdr_t *h);
+
+	/** Initialize a bcf1_t object; equivalent to calloc(1, sizeof(bcf1_t)) */
+	bcf1_t *bcf_init(void);
+	
+	/** Deallocate a bcf1_t object */
+	void bcf_destroy(bcf1_t *v);
+
+    /** 
+     *  Same as bcf_destroy() but frees only the memory allocated by bcf1_t,
+     *  not the bcf1_t object itself. 
+     */
+	void bcf_empty(bcf1_t *v);
+
+	/** 
+     *  Make the bcf1_t object ready for next read. Intended mostly for
+     *  internal use, the user should rarely need to call this function
+     *  directly.
+     */
+	void bcf_clear(bcf1_t *v);
+
+
+    /** bcf_open and vcf_open mode: please see hts_open() in hts.h */
+	typedef htsFile vcfFile;
+	#define bcf_open(fn, mode) hts_open((fn), (mode))
+	#define vcf_open(fn, mode) hts_open((fn), (mode))
+	#define bcf_close(fp) hts_close(fp)
+	#define vcf_close(fp) hts_close(fp)
+
+    /** Reads VCF or BCF header */
+	bcf_hdr_t *bcf_hdr_read(htsFile *fp);
+
+    /**
+     *  bcf_hdr_set_samples() - for more efficient VCF parsing when only one/few samples are needed
+     *  @samples: samples to include or exclude from file or as a comma-separated string.
+     *              LIST|FILE   .. select samples in list/file
+     *              ^LIST|FILE  .. exclude samples from list/file
+     *              -           .. include all samples
+     *              NULL        .. exclude all samples
+     *  @is_file: @samples is a file (1) or a comma-separated list (1)
+     *
+     *  The bottleneck of VCF reading is parsing of genotype fields. If the
+     *  reader knows in advance that only subset of samples is needed (possibly
+     *  no samples at all), the performance of bcf_read() can be significantly
+     *  improved by calling bcf_hdr_set_samples after bcf_hdr_read().
+     *  The function bcf_read() will subset the VCF/BCF records automatically
+     *  with the notable exception when reading records via bcf_itr_next().
+     *  In this case, bcf_subset_format() must be called explicitly, because
+     *  bcf_readrec() does not see the header.
+     *
+     *  Returns 0 on success, -1 on error or a positive integer if the list
+     *  contains samples not present in the VCF header. In such a case, the
+     *  return value is the index of the offending sample.
+     */
+    int bcf_hdr_set_samples(bcf_hdr_t *hdr, const char *samples, int is_file);
+    int bcf_subset_format(const bcf_hdr_t *hdr, bcf1_t *rec);
+
+
+    /** Writes VCF or BCF header */
+	int bcf_hdr_write(htsFile *fp, const bcf_hdr_t *h);
+
+    /** Parse VCF line contained in kstring and populate the bcf1_t struct */
+	int vcf_parse(kstring_t *s, const bcf_hdr_t *h, bcf1_t *v);
+
+    /** The opposite of vcf_parse. It should rarely be called directly, see vcf_write */
+	int vcf_format(const bcf_hdr_t *h, const bcf1_t *v, kstring_t *s);
+
+    /**
+     *  bcf_read() - read next VCF or BCF record
+     *
+     *  Returns -1 on critical errors, 0 otherwise. On errors which are not
+     *  critical for reading, such as missing header definitions, v->errcode is
+     *  set to one of BCF_ERR* code and must be checked before calling
+     *  vcf_write().
+     */
+	int bcf_read(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v);
+
+	/**
+	 *  bcf_unpack() - unpack/decode a BCF record (fills the bcf1_t::d field)
+     *  
+     *  Note that bcf_unpack() must be called even when reading VCF. It is safe
+     *  to call the function repeatedly, it will not unpack the same field
+     *  twice.
+	 */
+	#define BCF_UN_STR  1       // up to ALT inclusive
+	#define BCF_UN_FLT  2       // up to FILTER
+	#define BCF_UN_INFO 4       // up to INFO
+	#define BCF_UN_SHR  (BCF_UN_STR|BCF_UN_FLT|BCF_UN_INFO) // all shared information
+	#define BCF_UN_FMT  8                           // unpack format and each sample
+	#define BCF_UN_IND  BCF_UN_FMT                  // a synonymo of BCF_UN_FMT
+	#define BCF_UN_ALL  (BCF_UN_SHR|BCF_UN_FMT)     // everything
+	int bcf_unpack(bcf1_t *b, int which);
+
+    /*
+     *  bcf_dup() - create a copy of BCF record. 
+     *
+     *  Note that bcf_unpack() must be called on the returned copy as if it was
+     *  obtained from bcf_read(). Also note that bcf_dup() calls bcf_sync1(src)
+     *  internally to reflect any changes made by bcf_update_* functions.
+     */
+    bcf1_t *bcf_dup(bcf1_t *src);
+
+    /**
+     *  bcf_write() - write one VCF or BCF record. The type is determined at the open() call.
+     */
+	int bcf_write(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v);
+
+    /**
+     *  The following functions work only with VCFs and should rarely be called
+     *  directly. Usually one wants to use their bcf_* alternatives, which work
+     *  transparently with both VCFs and BCFs.
+     */
+	bcf_hdr_t *vcf_hdr_read(htsFile *fp);
+	int vcf_hdr_write(htsFile *fp, const bcf_hdr_t *h);
+	int vcf_read(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v);
+	int vcf_write(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v);
+
+	/** Helper function for the bcf_itr_next() macro; internal use, ignore it */
+	int bcf_readrec(BGZF *fp, void *null, void *v, int *tid, int *beg, int *end);
+
+
+
+	/**************************************************************************
+	 *  Header querying and manipulation routines
+	 **************************************************************************/
+
+    /** Create a new header using the supplied template */
+    bcf_hdr_t *bcf_hdr_dup(const bcf_hdr_t *hdr);
+    /** Copy header lines from src to dst if not already present in dst. See also bcf_translate(). */
+    void bcf_hdr_combine(bcf_hdr_t *dst, const bcf_hdr_t *src);
+
+    /** 
+     *  bcf_hdr_add_sample() - add a new sample. 
+     *  @param sample:  Sample name to be added. After all samples have been added, NULL 
+     *                  must be passed to update internal header structures. 
+     */
+    int bcf_hdr_add_sample(bcf_hdr_t *hdr, const char *sample);
+
+    /** Read VCF header from a file and update the header */
+    int bcf_hdr_set(bcf_hdr_t *hdr, const char *fname);
+
+    /** Returns formatted header (newly allocated string) and its length,
+     *  excluding the terminating \0. If is_bcf parameter is unset, IDX
+     *  fields are discarded.
+     */
+    char *bcf_hdr_fmt_text(const bcf_hdr_t *hdr, int is_bcf, int *len);
+
+    /** Append new VCF header line, returns 0 on success */
+    int bcf_hdr_append(bcf_hdr_t *h, const char *line);
+    int bcf_hdr_printf(bcf_hdr_t *h, const char *format, ...);
+
+    const char *bcf_hdr_get_version(const bcf_hdr_t *hdr);
+    void bcf_hdr_set_version(bcf_hdr_t *hdr, const char *version);
+
+    /** 
+     *  bcf_hdr_remove() - remove VCF header tag
+     *  @param type:      one of BCF_HL_*
+     *  @param key:       tag name
+     */
+    void bcf_hdr_remove(bcf_hdr_t *h, int type, const char *key);
+
+    /**
+     *  bcf_hdr_subset() - creates a new copy of the header removing unwanted samples 
+     *  @param n:        number of samples to keep
+     *  @param samples:  names of the samples to keep
+     *  @param imap:     mapping from index in @samples to the sample index in the original file
+     *
+     *  Sample names not present in h0 are ignored. The number of unmatched samples can be checked
+     *  by comparing n and bcf_hdr_nsamples(out_hdr).
+     *  This function can be used to reorder samples.
+     *  See also bcf_subset() which subsets individual records.
+     */
+	bcf_hdr_t *bcf_hdr_subset(const bcf_hdr_t *h0, int n, char *const* samples, int *imap);
+
+    /** Creates a list of sequence names. It is up to the caller to free the list (but not the sequence names) */
+	const char **bcf_hdr_seqnames(const bcf_hdr_t *h, int *nseqs);
+
+    /** Get number of samples */
+    #define bcf_hdr_nsamples(hdr) (hdr)->n[BCF_DT_SAMPLE]
+
+
+    /** The following functions are for internal use and should rarely be called directly */
+    bcf_hrec_t *bcf_hdr_parse_line(const bcf_hdr_t *h, const char *line, int *len);
+    void bcf_hrec_format(const bcf_hrec_t *hrec, kstring_t *str);
+    int bcf_hdr_add_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec);
+    bcf_hrec_t *bcf_hdr_get_hrec(const bcf_hdr_t *hdr, int type, const char *id);   // type is one of BCF_HL_FLT,..,BCF_HL_CTG
+    bcf_hrec_t *bcf_hrec_dup(bcf_hrec_t *hrec);
+    void bcf_hrec_add_key(bcf_hrec_t *hrec, const char *str, int len);
+    void bcf_hrec_set_val(bcf_hrec_t *hrec, int i, const char *str, int len, int is_quoted);
+    int bcf_hrec_find_key(bcf_hrec_t *hrec, const char *key);
+    void bcf_hrec_destroy(bcf_hrec_t *hrec);
+
+
+
+	/**************************************************************************
+	 *  Individual record querying and manipulation routines
+	 **************************************************************************/
+
+    /** See the description of bcf_hdr_subset() */
+	int bcf_subset(const bcf_hdr_t *h, bcf1_t *v, int n, int *imap);
+
+    /**
+     *  bcf_translate() - translate tags ids to be consistent with different header. This function
+     *                    is useful when lines from multiple VCF need to be combined.
+     *  @dst_hdr:   the destination header, to be used in bcf_write(), see also bcf_hdr_combine()
+     *  @src_hdr:   the source header, used in bcf_read()
+     *  @src_line:  line obtained by bcf_read()
+     */
+    int bcf_translate(const bcf_hdr_t *dst_hdr, bcf_hdr_t *src_hdr, bcf1_t *src_line);
+
+    /**
+     *  bcf_get_variant_type[s]()  - returns one of VCF_REF, VCF_SNP, etc
+     */
+    int bcf_get_variant_types(bcf1_t *rec);
+    int bcf_get_variant_type(bcf1_t *rec, int ith_allele);
+	int bcf_is_snp(bcf1_t *v);
+
+    /**
+     *  bcf_update_filter() - sets the FILTER column
+     *  @flt_ids:  The filter IDs to set, numeric IDs returned by bcf_id2int(hdr, BCF_DT_ID, "PASS")
+     *  @n:        Number of filters. If n==0, all filters are removed
+     */
+    int bcf_update_filter(const bcf_hdr_t *hdr, bcf1_t *line, int *flt_ids, int n);
+    /**
+     *  bcf_add_filter() - adds to the FILTER column
+     *  @flt_id:   filter ID to add, numeric ID returned by bcf_id2int(hdr, BCF_DT_ID, "PASS")
+     *  
+     *  If flt_id is PASS, all existing filters are removed first. If other than PASS, existing PASS is removed.
+     */
+    int bcf_add_filter(const bcf_hdr_t *hdr, bcf1_t *line, int flt_id);
+    /**
+     *  bcf_remove_filter() - removes from the FILTER column
+     *  @flt_id:   filter ID to remove, numeric ID returned by bcf_id2int(hdr, BCF_DT_ID, "PASS")
+     *  @pass:     when set to 1 and no filters are present, set to PASS 
+     */
+    int bcf_remove_filter(const bcf_hdr_t *hdr, bcf1_t *line, int flt_id, int pass);
+    /** 
+     *  Returns 1 if present, 0 if absent, or -1 if filter does not exist. "PASS" and "." can be used interchangeably.
+     */
+    int bcf_has_filter(const bcf_hdr_t *hdr, bcf1_t *line, char *filter);
+    /**
+     *  bcf_update_alleles() and bcf_update_alleles_str() - update REF and ALLT column
+     *  @alleles:           Array of alleles
+     *  @nals:              Number of alleles
+     *  @alleles_string:    Comma-separated alleles, starting with the REF allele  
+     */
+    int bcf_update_alleles(const bcf_hdr_t *hdr, bcf1_t *line, const char **alleles, int nals);
+    int bcf_update_alleles_str(const bcf_hdr_t *hdr, bcf1_t *line, const char *alleles_string);
+    int bcf_update_id(const bcf_hdr_t *hdr, bcf1_t *line, const char *id);
+
+    /* 
+     *  bcf_update_info_*() - functions for updating INFO fields
+     *  @hdr:       the BCF header
+     *  @line:      VCF line to be edited
+     *  @key:       the INFO tag to be updated
+     *  @values:    pointer to the array of values. Pass NULL to remove the tag.
+     *  @n:         number of values in the array. When set to 0, the INFO tag is removed
+     *
+     *  The @string in bcf_update_info_flag() is optional, @n indicates whether
+     *  the flag is set or removed.
+     *
+     *  Returns 0 on success or negative value on error.
+     */
+    #define bcf_update_info_int32(hdr,line,key,values,n)   bcf_update_info((hdr),(line),(key),(values),(n),BCF_HT_INT)
+    #define bcf_update_info_float(hdr,line,key,values,n)   bcf_update_info((hdr),(line),(key),(values),(n),BCF_HT_REAL)
+    #define bcf_update_info_flag(hdr,line,key,string,n)    bcf_update_info((hdr),(line),(key),(string),(n),BCF_HT_FLAG)
+    #define bcf_update_info_string(hdr,line,key,string)    bcf_update_info((hdr),(line),(key),(string),1,BCF_HT_STR)
+    int bcf_update_info(const bcf_hdr_t *hdr, bcf1_t *line, const char *key, const void *values, int n, int type);
+
+    /* 
+     *  bcf_update_format_*() - functions for updating FORMAT fields
+     *  @values:    pointer to the array of values, the same number of elements
+     *              is expected for each sample. Missing values must be padded 
+     *              with bcf_*_missing or bcf_*_vector_end values.
+     *  @n:         number of values in the array. If n==0, existing tag is removed.
+     *
+     *  The function bcf_update_format_string() is a higher-level (slower) variant of
+     *  bcf_update_format_char(). The former accepts array of \0-terminated strings
+     *  whereas the latter requires that the strings are collapsed into a single array
+     *  of fixed-length strings. In case of strings with variable length, shorter strings
+     *  can be \0-padded. Note that the collapsed strings passed to bcf_update_format_char()
+     *  are not \0-terminated.
+     *
+     *  Returns 0 on success or negative value on error.
+     */
+    #define bcf_update_format_int32(hdr,line,key,values,n) bcf_update_format((hdr),(line),(key),(values),(n),BCF_HT_INT)
+    #define bcf_update_format_float(hdr,line,key,values,n) bcf_update_format((hdr),(line),(key),(values),(n),BCF_HT_REAL)
+    #define bcf_update_format_char(hdr,line,key,values,n) bcf_update_format((hdr),(line),(key),(values),(n),BCF_HT_STR)
+    #define bcf_update_genotypes(hdr,line,gts,n) bcf_update_format((hdr),(line),"GT",(gts),(n),BCF_HT_INT)     // See bcf_gt_ macros below
+    int bcf_update_format_string(const bcf_hdr_t *hdr, bcf1_t *line, const char *key, const char **values, int n);
+    int bcf_update_format(const bcf_hdr_t *hdr, bcf1_t *line, const char *key, const void *values, int n, int type);
+
+    // Macros for setting genotypes correctly, for use with bcf_update_genotypes only; idx corresponds
+    // to VCF's GT (1-based index to ALT or 0 for the reference allele) and val is the opposite, obtained
+    // from bcf_get_genotypes() below.
+    #define bcf_gt_phased(idx)      ((idx+1)<<1|1)
+    #define bcf_gt_unphased(idx)    ((idx+1)<<1)
+    #define bcf_gt_missing          0
+    #define bcf_gt_is_phased(idx)   ((idx)&1)
+    #define bcf_gt_allele(val)      (((val)>>1)-1)
+
+    /** Conversion between alleles indexes to Number=G genotype index (assuming diploid, all 0-based) */
+    #define bcf_alleles2gt(a,b) ((a)>(b)?((a)*((a)+1)/2+(b)):((b)*((b)+1)/2+(a)))
+    static inline void bcf_gt2alleles(int igt, int *a, int *b)
+    {
+        int k = 0, dk = 1;
+        while ( k<igt ) { dk++; k += dk; }
+        *b = dk - 1; *a = igt - k + *b;
+    }
+
+    /**     
+     * bcf_get_fmt() - returns pointer to FORMAT's field data
+     * @header: for access to BCF_DT_ID dictionary 
+     * @line:   VCF line obtained from vcf_parse1
+     * @fmt:    one of GT,PL,...
+     *  
+     * Returns bcf_fmt_t* if the call succeeded, or returns NULL when the field
+     * is not available.
+     */ 
+    bcf_fmt_t *bcf_get_fmt(const bcf_hdr_t *hdr, bcf1_t *line, const char *key);
+    bcf_info_t *bcf_get_info(const bcf_hdr_t *hdr, bcf1_t *line, const char *key);
+
+    /**
+     *  bcf_get_info_*() - get INFO values, integers or floats
+     *  @hdr:       BCF header
+     *  @line:      BCF record
+     *  @tag:       INFO tag to retrieve
+     *  @dst:       *dst is pointer to a memory location, can point to NULL
+     *  @ndst:      pointer to the size of allocated memory
+     *
+     *  Returns negative value on error or the number of written values on
+     *  success. bcf_get_info_string() returns on success the number of 
+     *  characters written excluding the null-terminating byte. bcf_get_info_flag()
+     *  returns 1 when flag is set or 0 if not.
+     *
+     *  List of return codes:
+     *      -1 .. no such INFO tag defined in the header
+     *      -2 .. clash between types defined in the header and encountered in the VCF record
+     *      -3 .. tag is not present in the VCF record
+     */
+    #define bcf_get_info_int32(hdr,line,tag,dst,ndst)  bcf_get_info_values(hdr,line,tag,(void**)(dst),ndst,BCF_HT_INT)
+    #define bcf_get_info_float(hdr,line,tag,dst,ndst)  bcf_get_info_values(hdr,line,tag,(void**)(dst),ndst,BCF_HT_REAL)
+    #define bcf_get_info_string(hdr,line,tag,dst,ndst) bcf_get_info_values(hdr,line,tag,(void**)(dst),ndst,BCF_HT_STR)
+    #define bcf_get_info_flag(hdr,line,tag,dst,ndst)   bcf_get_info_values(hdr,line,tag,(void**)(dst),ndst,BCF_HT_FLAG)
+    int bcf_get_info_values(const bcf_hdr_t *hdr, bcf1_t *line, const char *tag, void **dst, int *ndst, int type);
+
+    /**
+     *  bcf_get_format_*() - same as bcf_get_info*() above
+     *
+     *  The function bcf_get_format_string() is a higher-level (slower) variant of bcf_get_format_char().
+     *  see the description of bcf_update_format_string() and bcf_update_format_char() above. 
+     *  Unlike other bcf_get_format__*() functions, bcf_get_format_string() allocates two arrays:
+     *  a single block of \0-terminated strings collapsed into a single array and an array of pointers
+     *  to these strings. Both arrays must be cleaned by the user. 
+     *
+     *  Returns negative value on error or the number of written values on success.
+     *
+     *  Example:
+     *      int ndst = 0; char **dst = NULL;
+     *      if ( bcf_get_format_string(hdr, line, "XX", &dst, &ndst) > 0 )
+     *          for (i=0; i<bcf_hdr_nsamples(hdr); i++) printf("%s\n", dst[i]);
+     *      free(dst[0]); free(dst);
+     *
+     *  Example: 
+     *      int ngt, *gt_arr = NULL, ngt_arr = 0;
+     *      ngt = bcf_get_genotypes(hdr, line, &gt_arr, &ngt_arr);
+     */
+    #define bcf_get_format_int32(hdr,line,tag,dst,ndst)  bcf_get_format_values(hdr,line,tag,(void**)(dst),ndst,BCF_HT_INT)
+    #define bcf_get_format_float(hdr,line,tag,dst,ndst)  bcf_get_format_values(hdr,line,tag,(void**)(dst),ndst,BCF_HT_REAL)
+    #define bcf_get_format_char(hdr,line,tag,dst,ndst)   bcf_get_format_values(hdr,line,tag,(void**)(dst),ndst,BCF_HT_STR)
+    #define bcf_get_genotypes(hdr,line,dst,ndst)         bcf_get_format_values(hdr,line,"GT",(void**)(dst),ndst,BCF_HT_INT)
+    int bcf_get_format_string(const bcf_hdr_t *hdr, bcf1_t *line, const char *tag, char ***dst, int *ndst);
+    int bcf_get_format_values(const bcf_hdr_t *hdr, bcf1_t *line, const char *tag, void **dst, int *ndst, int type);
+
+
+	
+	/**************************************************************************
+	 *  Helper functions
+	 **************************************************************************/
+ 
+    /**
+     *  bcf_hdr_id2int() - Translates string into numeric ID
+     *  bcf_hdr_int2id() - Translates numeric ID into string
+     *  @type:     one of BCF_DT_ID, BCF_DT_CTG, BCF_DT_SAMPLE
+     *  @id:       tag name, such as: PL, DP, GT, etc.
+     *
+     *  Returns -1 if string is not in dictionary, otherwise numeric ID which identifies
+     *  fields in BCF records.
+     */
+	int bcf_hdr_id2int(const bcf_hdr_t *hdr, int type, const char *id);
+    #define bcf_hdr_int2id(hdr,type,int_id) ((hdr)->id[type][int_id].key)
+
+    /**
+     *  bcf_hdr_name2id() - Translates sequence names (chromosomes) into numeric ID
+     *  bcf_hdr_id2name() - Translates numeric ID to sequence name
+     */
+	static inline int bcf_hdr_name2id(const bcf_hdr_t *hdr, const char *id) { return bcf_hdr_id2int(hdr, BCF_DT_CTG, id); }
+    static inline const char *bcf_hdr_id2name(const bcf_hdr_t *hdr, int rid) { return hdr->id[BCF_DT_CTG][rid].key; }
+    static inline const char *bcf_seqname(const bcf_hdr_t *hdr, bcf1_t *rec) { return hdr->id[BCF_DT_CTG][rec->rid].key; }
+
+    /**
+     *  bcf_hdr_id2*() - Macros for accessing bcf_idinfo_t 
+     *  @type:      one of BCF_HL_FLT, BCF_HL_INFO, BCF_HL_FMT
+     *  @int_id:    return value of bcf_id2int, must be >=0
+     *
+     *  The returned values are:
+     *     bcf_hdr_id2length   ..  whether the number of values is fixed or variable, one of BCF_VL_* 
+     *     bcf_hdr_id2number   ..  the number of values, 0xfffff for variable length fields
+     *     bcf_hdr_id2type     ..  the field type, one of BCF_HT_*
+     *     bcf_hdr_id2coltype  ..  the column type, one of BCF_HL_*
+     *
+     *  Notes: Prior to using the macros, the presence of the info should be
+     *  tested with bcf_hdr_idinfo_exists().
+     */
+    #define bcf_hdr_id2length(hdr,type,int_id)  ((hdr)->id[BCF_DT_ID][int_id].val->info[type]>>8 & 0xf)
+    #define bcf_hdr_id2number(hdr,type,int_id)  ((hdr)->id[BCF_DT_ID][int_id].val->info[type]>>12)
+    #define bcf_hdr_id2type(hdr,type,int_id)    ((hdr)->id[BCF_DT_ID][int_id].val->info[type]>>4 & 0xf)
+    #define bcf_hdr_id2coltype(hdr,type,int_id) ((hdr)->id[BCF_DT_ID][int_id].val->info[type] & 0xf)
+    #define bcf_hdr_idinfo_exists(hdr,type,int_id)  ((int_id<0 || bcf_hdr_id2coltype(hdr,type,int_id)==0xf) ? 0 : 1)
+    #define bcf_hdr_id2hrec(hdr,type,int_id)    ((hdr)->id[(type)==BCF_DT_CTG?BCF_DT_CTG:BCF_DT_ID][int_id].val->hrec[(type)==BCF_DT_CTG?0:type])
+    
+	void bcf_fmt_array(kstring_t *s, int n, int type, void *data);
+	uint8_t *bcf_fmt_sized_array(kstring_t *s, uint8_t *ptr);
+
+	void bcf_enc_vchar(kstring_t *s, int l, const char *a);
+	void bcf_enc_vint(kstring_t *s, int n, int32_t *a, int wsize);
+	void bcf_enc_vfloat(kstring_t *s, int n, float *a);
+
+ 
+	/**************************************************************************
+	 *  BCF index
+     *
+     *  Note that these functions work with BCFs only. See synced_bcf_reader.h
+     *  which provides (amongst other things) an API to work transparently with
+     *  both indexed BCFs and VCFs.
+	 **************************************************************************/
+ 
+	#define bcf_itr_destroy(iter) hts_itr_destroy(iter)
+	#define bcf_itr_queryi(idx, tid, beg, end) hts_itr_query((idx), (tid), (beg), (end), bcf_readrec)
+	#define bcf_itr_querys(idx, hdr, s) hts_itr_querys((idx), (s), (hts_name2id_f)(bcf_hdr_name2id), (hdr), hts_itr_query, bcf_readrec)
+	#define bcf_itr_next(htsfp, itr, r) hts_itr_next((htsfp)->fp.bgzf, (itr), (r), 0)
+	#define bcf_index_load(fn) hts_idx_load(fn, HTS_FMT_CSI)
+	#define bcf_index_seqnames(idx, hdr, nptr) hts_idx_seqnames((idx),(nptr),(hts_id2name_f)(bcf_hdr_id2name),(hdr))
+
+	int bcf_index_build(const char *fn, int min_shift);
+
+#ifdef __cplusplus
+}
+#endif
+
+/*******************
+ * Typed value I/O *
+ *******************/
+
+/*
+    Note that in contrast with BCFv2.1 specification, HTSlib implementation
+    allows missing values in vectors. For integer types, the values 0x80,
+    0x8000, 0x80000000 are interpreted as missing values and 0x81, 0x8001,
+    0x80000001 as end-of-vector indicators.  Similarly for floats, the value of
+    0x7F800001 is interpreted as a missing value and 0x7F800002 as an
+    end-of-vector indicator. 
+    Note that the end-of-vector byte is not part of the vector.
+
+    This trial BCF version (v2.2) is compatible with the VCF specification and
+    enables to handle correctly vectors with different ploidy in presence of
+    missing values.
+ */
+#define bcf_int8_vector_end  (INT8_MIN+1)
+#define bcf_int16_vector_end (INT16_MIN+1)
+#define bcf_int32_vector_end (INT32_MIN+1)
+#define bcf_str_vector_end   0
+#define bcf_int8_missing     INT8_MIN
+#define bcf_int16_missing    INT16_MIN
+#define bcf_int32_missing    INT32_MIN
+#define bcf_str_missing      0x07
+extern uint32_t bcf_float_vector_end;
+extern uint32_t bcf_float_missing;
+static inline void bcf_float_set(float *ptr, uint32_t value)
+{
+    union { uint32_t i; float f; } u;
+    u.i = value;
+    *ptr = u.f;
+}
+#define bcf_float_set_vector_end(x) bcf_float_set(&(x),bcf_float_vector_end)
+#define bcf_float_set_missing(x)    bcf_float_set(&(x),bcf_float_missing)
+static inline int bcf_float_is_missing(float f)
+{
+    union { uint32_t i; float f; } u;
+    u.f = f;
+    return u.i==bcf_float_missing ? 1 : 0;
+}
+static inline int bcf_float_is_vector_end(float f)
+{
+    union { uint32_t i; float f; } u;
+    u.f = f;
+    return u.i==bcf_float_vector_end ? 1 : 0;
+}
+
+static inline void bcf_format_gt(bcf_fmt_t *fmt, int isample, kstring_t *str)
+{
+    #define BRANCH(type_t, missing, vector_end) { \
+        type_t *ptr = (type_t*) (fmt->p + isample*fmt->size); \
+        int i; \
+        for (i=0; i<fmt->n && ptr[i]!=vector_end; i++) \
+        { \
+            if ( i ) kputc("/|"[ptr[i]&1], str); \
+            if ( !(ptr[i]>>1) ) kputc('.', str); \
+            else kputw((ptr[i]>>1) - 1, str); \
+        } \
+        if (i == 0) kputc('.', str); \
+    }
+    switch (fmt->type) {
+        case BCF_BT_INT8:  BRANCH(int8_t,  bcf_int8_missing, bcf_int8_vector_end); break;
+        case BCF_BT_INT16: BRANCH(int16_t, bcf_int16_missing, bcf_int16_vector_end); break;
+        case BCF_BT_INT32: BRANCH(int32_t, bcf_int32_missing, bcf_int32_vector_end); break;
+        default: fprintf(stderr,"FIXME: type %d in bcf_format_gt?\n", fmt->type); abort(); break;
+    }
+    #undef BRANCH
+}
+
+static inline void bcf_enc_size(kstring_t *s, int size, int type)
+{
+	if (size >= 15) {
+		kputc(15<<4|type, s);
+		if (size >= 128) {
+			if (size >= 32768) {
+				int32_t x = size;
+				kputc(1<<4|BCF_BT_INT32, s);
+				kputsn((char*)&x, 4, s);
+			} else {
+				int16_t x = size;
+				kputc(1<<4|BCF_BT_INT16, s);
+				kputsn((char*)&x, 2, s);
+			}
+		} else {
+			kputc(1<<4|BCF_BT_INT8, s);
+			kputc(size, s);
+		}
+	} else kputc(size<<4|type, s);
+}
+
+static inline int bcf_enc_inttype(long x)
+{
+	if (x <= INT8_MAX && x > bcf_int8_missing) return BCF_BT_INT8;
+	if (x <= INT16_MAX && x > bcf_int16_missing) return BCF_BT_INT16;
+	return BCF_BT_INT32;
+}
+
+static inline void bcf_enc_int1(kstring_t *s, int32_t x)
+{
+	if (x == bcf_int32_vector_end) {
+		bcf_enc_size(s, 1, BCF_BT_INT8);
+		kputc(bcf_int8_vector_end, s);
+	} else if (x == bcf_int32_missing) {
+		bcf_enc_size(s, 1, BCF_BT_INT8);
+		kputc(bcf_int8_missing, s);
+	} else if (x <= INT8_MAX && x > bcf_int8_missing) {
+		bcf_enc_size(s, 1, BCF_BT_INT8);
+		kputc(x, s);
+	} else if (x <= INT16_MAX && x > bcf_int16_missing) {
+		int16_t z = x;
+		bcf_enc_size(s, 1, BCF_BT_INT16);
+		kputsn((char*)&z, 2, s);
+	} else {
+		int32_t z = x;
+		bcf_enc_size(s, 1, BCF_BT_INT32);
+		kputsn((char*)&z, 4, s);
+	}
+}
+
+static inline int32_t bcf_dec_int1(const uint8_t *p, int type, uint8_t **q)
+{
+	if (type == BCF_BT_INT8) {
+		*q = (uint8_t*)p + 1;
+		return *(int8_t*)p;
+	} else if (type == BCF_BT_INT16) {
+		*q = (uint8_t*)p + 2;
+		return *(int16_t*)p;
+	} else {
+		*q = (uint8_t*)p + 4;
+		return *(int32_t*)p;
+	}
+}
+
+static inline int32_t bcf_dec_typed_int1(const uint8_t *p, uint8_t **q)
+{
+	return bcf_dec_int1(p + 1, *p&0xf, q);
+}
+
+static inline int32_t bcf_dec_size(const uint8_t *p, uint8_t **q, int *type)
+{
+	*type = *p & 0xf;
+	if (*p>>4 != 15) {
+		*q = (uint8_t*)p + 1;
+		return *p>>4;
+	} else return bcf_dec_typed_int1(p + 1, q);
+}
+
+#endif
diff --git a/htslib/htslib/vcf_sweep.h b/htslib/htslib/vcf_sweep.h
new file mode 100644
index 0000000..9d21d8a
--- /dev/null
+++ b/htslib/htslib/vcf_sweep.h
@@ -0,0 +1,15 @@
+#ifndef __VCF_SWEEP_H__
+#define __VCF_SWEEP_H__
+
+#include "hts.h"
+#include "vcf.h"
+
+typedef struct _bcf_sweep_t bcf_sweep_t;
+
+bcf_sweep_t *bcf_sweep_init(const char *fname);
+void bcf_sweep_destroy(bcf_sweep_t *sw);
+bcf_hdr_t *bcf_sweep_hdr(bcf_sweep_t *sw);
+bcf1_t *bcf_sweep_fwd(bcf_sweep_t *sw);
+bcf1_t *bcf_sweep_bwd(bcf_sweep_t *sw);
+
+#endif
diff --git a/htslib/htslib/vcfutils.h b/htslib/htslib/vcfutils.h
new file mode 100644
index 0000000..18b9503
--- /dev/null
+++ b/htslib/htslib/vcfutils.h
@@ -0,0 +1,94 @@
+/*
+    Time will show if this module will be merged into others 
+    or perhaps removed completely.
+*/
+#ifndef VCF_UTILS_H
+#define VCF_UTILS_H
+
+#include "vcf.h"
+
+
+/**
+ *  bcf_trim_alleles() - remove ALT alleles unused in genotype fields
+ *  @header:  for access to BCF_DT_ID dictionary
+ *  @line:    VCF line obtain from vcf_parse1
+ *
+ *  Returns the number of removed alleles.
+ *
+ *  todo: BCF output
+ */
+int bcf_trim_alleles(const bcf_hdr_t *header, bcf1_t *line);
+
+
+/**
+ *  bcf_remove_alleles() - remove ALT alleles according to bitmask @mask
+ *  @header:  for access to BCF_DT_ID dictionary
+ *  @line:    VCF line obtained from vcf_parse1
+ *  @mask:    alleles to remove
+ *
+ *  todo: BCF output
+ */
+void bcf_remove_alleles(const bcf_hdr_t *header, bcf1_t *line, int mask);
+
+
+/**
+ *  bcf_calc_ac() - calculate the number of REF and ALT alleles
+ *  @header:  for access to BCF_DT_ID dictionary
+ *  @line:    VCF line obtained from vcf_parse1
+ *  @ac:      array of length line->n_allele
+ *  @which:   determine if INFO/AN,AC and indv fields be used
+ *
+ *  Returns 1 if the call succeeded, or 0 if the value could not 
+ *  be determined.
+ *
+ *  The value of @which determines if existing INFO/AC,AN can be 
+ *  used (BCF_UN_INFO) and and if indv fields can be splitted 
+ *  (BCF_UN_FMT). 
+ */
+int bcf_calc_ac(const bcf_hdr_t *header, bcf1_t *line, int *ac, int which);
+
+
+/**
+ * bcf_gt_type() - determines type of the genotype
+ * @fmt_ptr:  the GT format field as set for example by set_fmt_ptr
+ * @isample:  sample index (starting from 0)
+ * @ial:      index of the 1st non-reference allele (starting from 1)
+ * @jal:      index of the 2nd non-reference allele (starting from 1)
+ *
+ * Returns the type of the genotype (one of GT_HOM_RR, GT_HET_RA,
+ * GT_HOM_AA, GT_HET_AA, GT_HAPL_R, GT_HAPL_A or GT_UNKN). If $ial 
+ * is not NULL and the genotype has one or more non-reference 
+ * alleles, $ial will be set. In case of GT_HET_AA, $ial is the 
+ * position of the allele which appeared first in ALT. If $jal is 
+ * not null and the genotype is GT_HET_AA, $jal will be set and is 
+ * the position of the second allele in ALT.
+ */
+#define GT_HOM_RR 0 // note: the actual value of GT_* matters, used in dosage r2 calculation
+#define GT_HOM_AA 1
+#define GT_HET_RA 2
+#define GT_HET_AA 3
+#define GT_HAPL_R 4
+#define GT_HAPL_A 5
+#define GT_UNKN   6
+int bcf_gt_type(bcf_fmt_t *fmt_ptr, int isample, int *ial, int *jal);
+
+static inline int bcf_acgt2int(char c)
+{
+    if ( (int)c>96 ) c -= 32;
+    if ( c=='A' ) return 0;
+    if ( c=='C' ) return 1;
+    if ( c=='G' ) return 2;
+    if ( c=='T' ) return 3;
+    return -1;
+}
+#define bcf_int2acgt(i) "ACGT"[i]
+
+/**
+  * bcf_ij2G() - common task: allele indexes to Number=G index (diploid)
+  * @i,j:  allele indexes, 0-based, i<=j
+  * 
+  * Returns index to the Number=G diploid array
+  */
+#define bcf_ij2G(i, j) ((j)*((j)+1)/2+(i))
+
+#endif
diff --git a/htslib/kfunc.c b/htslib/kfunc.c
new file mode 100644
index 0000000..10c0973
--- /dev/null
+++ b/htslib/kfunc.c
@@ -0,0 +1,254 @@
+#include <math.h>
+#include <stdlib.h>
+#include "htslib/kfunc.h"
+
+/* Log gamma function
+ * \log{\Gamma(z)}
+ * AS245, 2nd algorithm, http://lib.stat.cmu.edu/apstat/245
+ */
+double kf_lgamma(double z)
+{
+	double x = 0;
+	x += 0.1659470187408462e-06 / (z+7);
+	x += 0.9934937113930748e-05 / (z+6);
+	x -= 0.1385710331296526     / (z+5);
+	x += 12.50734324009056      / (z+4);
+	x -= 176.6150291498386      / (z+3);
+	x += 771.3234287757674      / (z+2);
+	x -= 1259.139216722289      / (z+1);
+	x += 676.5203681218835      / z;
+	x += 0.9999999999995183;
+	return log(x) - 5.58106146679532777 - z + (z-0.5) * log(z+6.5);
+}
+
+/* complementary error function
+ * \frac{2}{\sqrt{\pi}} \int_x^{\infty} e^{-t^2} dt
+ * AS66, 2nd algorithm, http://lib.stat.cmu.edu/apstat/66
+ */
+double kf_erfc(double x)
+{
+	const double p0 = 220.2068679123761;
+	const double p1 = 221.2135961699311;
+	const double p2 = 112.0792914978709;
+	const double p3 = 33.912866078383;
+	const double p4 = 6.37396220353165;
+	const double p5 = .7003830644436881;
+	const double p6 = .03526249659989109;
+	const double q0 = 440.4137358247522;
+	const double q1 = 793.8265125199484;
+	const double q2 = 637.3336333788311;
+	const double q3 = 296.5642487796737;
+	const double q4 = 86.78073220294608;
+	const double q5 = 16.06417757920695;
+	const double q6 = 1.755667163182642;
+	const double q7 = .08838834764831844;
+	double expntl, z, p;
+	z = fabs(x) * M_SQRT2;
+	if (z > 37.) return x > 0.? 0. : 2.;
+	expntl = exp(z * z * - .5);
+	if (z < 10. / M_SQRT2) // for small z
+	    p = expntl * ((((((p6 * z + p5) * z + p4) * z + p3) * z + p2) * z + p1) * z + p0)
+			/ (((((((q7 * z + q6) * z + q5) * z + q4) * z + q3) * z + q2) * z + q1) * z + q0);
+	else p = expntl / 2.506628274631001 / (z + 1. / (z + 2. / (z + 3. / (z + 4. / (z + .65)))));
+	return x > 0.? 2. * p : 2. * (1. - p);
+}
+
+/* The following computes regularized incomplete gamma functions.
+ * Formulas are taken from Wiki, with additional input from Numerical
+ * Recipes in C (for modified Lentz's algorithm) and AS245
+ * (http://lib.stat.cmu.edu/apstat/245).
+ *
+ * A good online calculator is available at:
+ *
+ *   http://www.danielsoper.com/statcalc/calc23.aspx
+ *
+ * It calculates upper incomplete gamma function, which equals
+ * kf_gammaq(s,z)*tgamma(s).
+ */
+
+#define KF_GAMMA_EPS 1e-14
+#define KF_TINY 1e-290
+
+// regularized lower incomplete gamma function, by series expansion
+static double _kf_gammap(double s, double z)
+{
+	double sum, x;
+	int k;
+	for (k = 1, sum = x = 1.; k < 100; ++k) {
+		sum += (x *= z / (s + k));
+		if (x / sum < KF_GAMMA_EPS) break;
+	}
+	return exp(s * log(z) - z - kf_lgamma(s + 1.) + log(sum));
+}
+// regularized upper incomplete gamma function, by continued fraction
+static double _kf_gammaq(double s, double z)
+{
+	int j;
+	double C, D, f;
+	f = 1. + z - s; C = f; D = 0.;
+	// Modified Lentz's algorithm for computing continued fraction
+	// See Numerical Recipes in C, 2nd edition, section 5.2
+	for (j = 1; j < 100; ++j) {
+		double a = j * (s - j), b = (j<<1) + 1 + z - s, d;
+		D = b + a * D;
+		if (D < KF_TINY) D = KF_TINY;
+		C = b + a / C;
+		if (C < KF_TINY) C = KF_TINY;
+		D = 1. / D;
+		d = C * D;
+		f *= d;
+		if (fabs(d - 1.) < KF_GAMMA_EPS) break;
+	}
+	return exp(s * log(z) - z - kf_lgamma(s) - log(f));
+}
+
+double kf_gammap(double s, double z)
+{
+	return z <= 1. || z < s? _kf_gammap(s, z) : 1. - _kf_gammaq(s, z);
+}
+
+double kf_gammaq(double s, double z)
+{
+	return z <= 1. || z < s? 1. - _kf_gammap(s, z) : _kf_gammaq(s, z);
+}
+
+/* Regularized incomplete beta function. The method is taken from
+ * Numerical Recipe in C, 2nd edition, section 6.4. The following web
+ * page calculates the incomplete beta function, which equals
+ * kf_betai(a,b,x) * gamma(a) * gamma(b) / gamma(a+b):
+ *
+ *   http://www.danielsoper.com/statcalc/calc36.aspx
+ */
+static double kf_betai_aux(double a, double b, double x)
+{
+	double C, D, f;
+	int j;
+	if (x == 0.) return 0.;
+	if (x == 1.) return 1.;
+	f = 1.; C = f; D = 0.;
+	// Modified Lentz's algorithm for computing continued fraction
+	for (j = 1; j < 200; ++j) {
+		double aa, d;
+		int m = j>>1;
+		aa = (j&1)? -(a + m) * (a + b + m) * x / ((a + 2*m) * (a + 2*m + 1))
+			: m * (b - m) * x / ((a + 2*m - 1) * (a + 2*m));
+		D = 1. + aa * D;
+		if (D < KF_TINY) D = KF_TINY;
+		C = 1. + aa / C;
+		if (C < KF_TINY) C = KF_TINY;
+		D = 1. / D;
+		d = C * D;
+		f *= d;
+		if (fabs(d - 1.) < KF_GAMMA_EPS) break;
+	}
+	return exp(kf_lgamma(a+b) - kf_lgamma(a) - kf_lgamma(b) + a * log(x) + b * log(1.-x)) / a / f;
+}
+double kf_betai(double a, double b, double x)
+{
+	return x < (a + 1.) / (a + b + 2.)? kf_betai_aux(a, b, x) : 1. - kf_betai_aux(b, a, 1. - x);
+}
+
+#ifdef KF_MAIN
+#include <stdio.h>
+int main(int argc, char *argv[])
+{
+	double x = 5.5, y = 3;
+	double a, b;
+	printf("erfc(%lg): %lg, %lg\n", x, erfc(x), kf_erfc(x));
+	printf("upper-gamma(%lg,%lg): %lg\n", x, y, kf_gammaq(y, x)*tgamma(y));
+	a = 2; b = 2; x = 0.5;
+	printf("incomplete-beta(%lg,%lg,%lg): %lg\n", a, b, x, kf_betai(a, b, x) / exp(kf_lgamma(a+b) - kf_lgamma(a) - kf_lgamma(b)));
+	return 0;
+}
+#endif
+
+
+// log\binom{n}{k}
+static double lbinom(int n, int k)
+{
+    if (k == 0 || n == k) return 0;
+    return lgamma(n+1) - lgamma(k+1) - lgamma(n-k+1);
+}
+
+// n11  n12  | n1_
+// n21  n22  | n2_
+//-----------+----
+// n_1  n_2  | n
+
+// hypergeometric distribution
+static double hypergeo(int n11, int n1_, int n_1, int n)
+{
+    return exp(lbinom(n1_, n11) + lbinom(n-n1_, n_1-n11) - lbinom(n, n_1));
+}
+
+typedef struct {
+    int n11, n1_, n_1, n;
+    double p;
+} hgacc_t;
+
+// incremental version of hypergenometric distribution
+static double hypergeo_acc(int n11, int n1_, int n_1, int n, hgacc_t *aux)
+{
+    if (n1_ || n_1 || n) {
+        aux->n11 = n11; aux->n1_ = n1_; aux->n_1 = n_1; aux->n = n;
+    } else { // then only n11 changed; the rest fixed
+        if (n11%11 && n11 + aux->n - aux->n1_ - aux->n_1) {
+            if (n11 == aux->n11 + 1) { // incremental
+                aux->p *= (double)(aux->n1_ - aux->n11) / n11
+                    * (aux->n_1 - aux->n11) / (n11 + aux->n - aux->n1_ - aux->n_1);
+                aux->n11 = n11;
+                return aux->p;
+            }
+            if (n11 == aux->n11 - 1) { // incremental
+                aux->p *= (double)aux->n11 / (aux->n1_ - n11)
+                    * (aux->n11 + aux->n - aux->n1_ - aux->n_1) / (aux->n_1 - n11);
+                aux->n11 = n11;
+                return aux->p;
+            }
+        }
+        aux->n11 = n11;
+    }
+    aux->p = hypergeo(aux->n11, aux->n1_, aux->n_1, aux->n);
+    return aux->p;
+}
+
+double kt_fisher_exact(int n11, int n12, int n21, int n22, double *_left, double *_right, double *two)
+{
+    int i, j, max, min;
+    double p, q, left, right;
+    hgacc_t aux;
+    int n1_, n_1, n;
+
+    n1_ = n11 + n12; n_1 = n11 + n21; n = n11 + n12 + n21 + n22; // calculate n1_, n_1 and n
+    max = (n_1 < n1_) ? n_1 : n1_; // max n11, for right tail
+    min = n1_ + n_1 - n;    // not sure why n11-n22 is used instead of min(n_1,n1_)
+    if (min < 0) min = 0; // min n11, for left tail
+    *two = *_left = *_right = 1.;
+    if (min == max) return 1.; // no need to do test
+    q = hypergeo_acc(n11, n1_, n_1, n, &aux); // the probability of the current table
+    // left tail
+    p = hypergeo_acc(min, 0, 0, 0, &aux);
+    for (left = 0., i = min + 1; p < 0.99999999 * q && i<=max; ++i) // loop until underflow
+        left += p, p = hypergeo_acc(i, 0, 0, 0, &aux);
+    --i;
+    if (p < 1.00000001 * q) left += p;
+    else --i;
+    // right tail
+    p = hypergeo_acc(max, 0, 0, 0, &aux);
+    for (right = 0., j = max - 1; p < 0.99999999 * q && j>=0; --j) // loop until underflow
+        right += p, p = hypergeo_acc(j, 0, 0, 0, &aux);
+    ++j;
+    if (p < 1.00000001 * q) right += p;
+    else ++j;
+    // two-tail
+    *two = left + right;
+    if (*two > 1.) *two = 1.;
+    // adjust left and right
+    if (abs(i - n11) < abs(j - n11)) right = 1. - left + q;
+    else left = 1.0 - right + q;
+    *_left = left; *_right = right;
+    return q;
+}
+
+
+
diff --git a/tabix/knetfile.c b/htslib/knetfile.c
similarity index 90%
rename from tabix/knetfile.c
rename to htslib/knetfile.c
index 7c96a3e..64b3fa6 100644
--- a/tabix/knetfile.c
+++ b/htslib/knetfile.c
@@ -1,6 +1,7 @@
 /* The MIT License
 
-   Copyright (c) 2008 Genome Research Ltd (GRL).
+   Copyright (c) 2008 by Genome Research Ltd (GRL).
+                 2010 by Attractive Chaos <attractor at live.co.uk>
 
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
@@ -23,11 +24,9 @@
    SOFTWARE.
 */
 
-/* Contact: Heng Li <lh3 at sanger.ac.uk> */
-
 /* Probably I will not do socket programming in the next few years and
    therefore I decide to heavily annotate this file, for Linux and
-   Windows as well.  -lh3 */
+   Windows as well.  -ac */
 
 #include <time.h>
 #include <stdio.h>
@@ -38,15 +37,13 @@
 #include <unistd.h>
 #include <sys/types.h>
 
-#ifdef _WIN32
-#include <winsock.h>
-#else
+#ifndef _WIN32
 #include <netdb.h>
 #include <arpa/inet.h>
 #include <sys/socket.h>
 #endif
 
-#include "knetfile.h"
+#include "htslib/knetfile.h"
 
 /* In winsock.h, the type of a socket is SOCKET, which is: "typedef
  * u_int SOCKET". An invalid SOCKET is: "(SOCKET)(~0)", or signed
@@ -92,7 +89,7 @@ static int socket_connect(const char *host, const char *port)
 
 	int on = 1, fd;
 	struct linger lng = { 0, 0 };
-	struct addrinfo hints, *res;
+	struct addrinfo hints, *res = 0;
 	memset(&hints, 0, sizeof(struct addrinfo));
 	hints.ai_family = AF_UNSPEC;
 	hints.ai_socktype = SOCK_STREAM;
@@ -189,7 +186,7 @@ static off_t my_netread(int fd, void *buf, off_t len)
 	 * one call. They have to be called repeatedly. */
 	while (rest) {
 		if (socket_wait(fd, 1) <= 0) break; // socket is not ready for reading
-		curr = netread(fd, buf + l, rest);
+		curr = netread(fd, (void*)((char*)buf + l), rest);
 		/* According to the glibc manual, section 13.2, a zero returned
 		 * value indicates end-of-file (EOF), which should mean that
 		 * read() will not return zero if EOF has not been met but data
@@ -218,7 +215,7 @@ static int kftp_get_response(knetFile *ftp)
 		//fputc(c, stderr);
 		if (n >= ftp->max_response) {
 			ftp->max_response = ftp->max_response? ftp->max_response<<1 : 256;
-			ftp->response = realloc(ftp->response, ftp->max_response);
+			ftp->response = (char*)realloc(ftp->response, ftp->max_response);
 		}
 		ftp->response[n++] = c;
 		if (c == '\n') {
@@ -236,7 +233,8 @@ static int kftp_get_response(knetFile *ftp)
 static int kftp_send_cmd(knetFile *ftp, const char *cmd, int is_get)
 {
 	if (socket_wait(ftp->ctrl_fd, 0) <= 0) return -1; // socket is not ready for writing
-	netwrite(ftp->ctrl_fd, cmd, strlen(cmd));
+    int len = strlen(cmd);
+	if ( netwrite(ftp->ctrl_fd, cmd, len) != len ) return -1;
 	return is_get? kftp_get_response(ftp) : 0;
 }
 
@@ -301,18 +299,18 @@ knetFile *kftp_parse_url(const char *fn, const char *mode)
 	for (p = (char*)fn + 6; *p && *p != '/'; ++p);
 	if (*p != '/') return 0;
 	l = p - fn - 6;
-	fp = calloc(1, sizeof(knetFile));
+	fp = (knetFile*)calloc(1, sizeof(knetFile));
 	fp->type = KNF_TYPE_FTP;
 	fp->fd = -1;
 	/* the Linux/Mac version of socket_connect() also recognizes a port
 	 * like "ftp", but the Windows version does not. */
 	fp->port = strdup("21");
-	fp->host = calloc(l + 1, 1);
+	fp->host = (char*)calloc(l + 1, 1);
 	if (strchr(mode, 'c')) fp->no_reconnect = 1;
 	strncpy(fp->host, fn + 6, l);
-	fp->retr = calloc(strlen(p) + 8, 1);
+	fp->retr = (char*)calloc(strlen(p) + 8, 1);
 	sprintf(fp->retr, "RETR %s\r\n", p);
-    fp->size_cmd = calloc(strlen(p) + 8, 1);
+    fp->size_cmd = (char*)calloc(strlen(p) + 8, 1);
     sprintf(fp->size_cmd, "SIZE %s\r\n", p);
 	fp->seek_offset = 0;
 	return fp;
@@ -379,8 +377,8 @@ knetFile *khttp_parse_url(const char *fn, const char *mode)
 	// set ->http_host
 	for (p = (char*)fn + 7; *p && *p != '/'; ++p);
 	l = p - fn - 7;
-	fp = calloc(1, sizeof(knetFile));
-	fp->http_host = calloc(l + 1, 1);
+	fp = (knetFile*)calloc(1, sizeof(knetFile));
+	fp->http_host = (char*)calloc(l + 1, 1);
 	strncpy(fp->http_host, fn + 7, l);
 	fp->http_host[l] = 0;
 	for (q = fp->http_host; *q && *q != ':'; ++q);
@@ -411,11 +409,11 @@ int khttp_connect_file(knetFile *fp)
 	char *buf, *p;
 	if (fp->fd != -1) netclose(fp->fd);
 	fp->fd = socket_connect(fp->host, fp->port);
-	buf = calloc(0x10000, 1); // FIXME: I am lazy... But in principle, 64KB should be large enough.
+	buf = (char*)calloc(0x10000, 1); // FIXME: I am lazy... But in principle, 64KB should be large enough.
 	l += sprintf(buf + l, "GET %s HTTP/1.0\r\nHost: %s\r\n", fp->path, fp->http_host);
     l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset);
 	l += sprintf(buf + l, "\r\n");
-	netwrite(fp->fd, buf, l);
+	if ( netwrite(fp->fd, buf, l) != l ) return -1;
 	l = 0;
 	while (netread(fp->fd, buf + l, 1)) { // read HTTP header; FIXME: bad efficiency
 		if (buf[l] == '\n' && l >= 3)
@@ -503,7 +501,7 @@ knetFile *knet_dopen(int fd, const char *mode)
 	return fp;
 }
 
-off_t knet_read(knetFile *fp, void *buf, off_t len)
+ssize_t knet_read(knetFile *fp, void *buf, size_t len)
 {
 	off_t l = 0;
 	if (fp->fd == -1) return 0;
@@ -517,9 +515,13 @@ off_t knet_read(knetFile *fp, void *buf, off_t len)
 			khttp_connect_file(fp);
 	}
 	if (fp->type == KNF_TYPE_LOCAL) { // on Windows, the following block is necessary; not on UNIX
-		off_t rest = len, curr;
+		size_t rest = len;
+		ssize_t curr;
 		while (rest) {
-			curr = read(fp->fd, buf + l, rest);
+			do {
+				curr = read(fp->fd, (void*)((char*)buf + l), rest);
+			} while (curr < 0 && EINTR == errno);
+			if (curr < 0) return -1;
 			if (curr == 0) break;
 			l += curr; rest -= curr;
 		}
@@ -528,48 +530,36 @@ off_t knet_read(knetFile *fp, void *buf, off_t len)
 	return l;
 }
 
-off_t knet_seek(knetFile *fp, int64_t off, int whence)
+off_t knet_seek(knetFile *fp, off_t off, int whence)
 {
 	if (whence == SEEK_SET && off == fp->offset) return 0;
 	if (fp->type == KNF_TYPE_LOCAL) {
-		/* Be aware that lseek() returns the offset after seeking,
-		 * while fseek() returns zero on success. */
+		/* Be aware that lseek() returns the offset after seeking, while fseek() returns zero on success. */
 		off_t offset = lseek(fp->fd, off, whence);
-		if (offset == -1) {
-            // Be silent, it is OK for knet_seek to fail when the file is streamed
-            // fprintf(stderr,"[knet_seek] %s\n", strerror(errno));
-			return -1;
-		}
+		if (offset == -1) return -1;
 		fp->offset = offset;
-		return 0;
-	}
-    else if (fp->type == KNF_TYPE_FTP) 
-    {
-        if (whence==SEEK_CUR)
-            fp->offset += off;
-        else if (whence==SEEK_SET)
-            fp->offset = off;
-        else if ( whence==SEEK_END)
-            fp->offset = fp->file_size+off;
+		return fp->offset;
+	} else if (fp->type == KNF_TYPE_FTP) {
+		if (whence == SEEK_CUR) fp->offset += off;
+		else if (whence == SEEK_SET) fp->offset = off;
+		else if (whence == SEEK_END) fp->offset = fp->file_size + off;
+		else return -1;
 		fp->is_ready = 0;
-		return 0;
-	} 
-    else if (fp->type == KNF_TYPE_HTTP) 
-    {
+		return fp->offset;
+	} else if (fp->type == KNF_TYPE_HTTP) {
 		if (whence == SEEK_END) { // FIXME: can we allow SEEK_END in future?
 			fprintf(stderr, "[knet_seek] SEEK_END is not supported for HTTP. Offset is unchanged.\n");
 			errno = ESPIPE;
 			return -1;
 		}
-        if (whence==SEEK_CUR)
-            fp->offset += off;
-        else if (whence==SEEK_SET)
-            fp->offset = off;
+		if (whence == SEEK_CUR) fp->offset += off;
+		else if (whence == SEEK_SET) fp->offset = off;
+		else return -1;
 		fp->is_ready = 0;
 		return fp->offset;
 	}
 	errno = EINVAL;
-    fprintf(stderr,"[knet_seek] %s\n", strerror(errno));
+	fprintf(stderr,"[knet_seek] %s\n", strerror(errno));
 	return -1;
 }
 
@@ -584,7 +574,7 @@ int knet_close(knetFile *fp)
 		else netclose(fp->fd);
 	}
 	free(fp->host); free(fp->port);
-	free(fp->response); free(fp->retr); free(fp->size_cmd); // FTP specific
+	free(fp->response); free(fp->retr); // FTP specific
 	free(fp->path); free(fp->http_host); // HTTP specific
 	free(fp);
 	return 0;
diff --git a/htslib/kstring.c b/htslib/kstring.c
new file mode 100644
index 0000000..b4202f5
--- /dev/null
+++ b/htslib/kstring.c
@@ -0,0 +1,229 @@
+#include <stdarg.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdint.h>
+#include "htslib/kstring.h"
+
+int kvsprintf(kstring_t *s, const char *fmt, va_list ap)
+{
+	va_list args;
+	int l;
+	va_copy(args, ap);
+	l = vsnprintf(s->s + s->l, s->m - s->l, fmt, args); // This line does not work with glibc 2.0. See `man snprintf'.
+	va_end(args);
+	if (l + 1 > s->m - s->l) {
+		s->m = s->l + l + 2;
+		kroundup32(s->m);
+		s->s = (char*)realloc(s->s, s->m);
+		va_copy(args, ap);
+		l = vsnprintf(s->s + s->l, s->m - s->l, fmt, args);
+		va_end(args);
+	}
+	s->l += l;
+	return l;
+}
+
+int ksprintf(kstring_t *s, const char *fmt, ...)
+{
+	va_list ap;
+	int l;
+	va_start(ap, fmt);
+	l = kvsprintf(s, fmt, ap);
+	va_end(ap);
+	return l;
+}
+
+char *kstrtok(const char *str, const char *sep, ks_tokaux_t *aux)
+{
+	const char *p, *start;
+	if (sep) { // set up the table
+		if (str == 0 && (aux->tab[0]&1)) return 0; // no need to set up if we have finished
+		aux->finished = 0;
+		if (sep[1]) {
+			aux->sep = -1;
+			aux->tab[0] = aux->tab[1] = aux->tab[2] = aux->tab[3] = 0;
+			for (p = sep; *p; ++p) aux->tab[*p>>6] |= 1ull<<(*p&0x3f);
+		} else aux->sep = sep[0];
+	}
+	if (aux->finished) return 0;
+	else if (str) aux->p = str - 1, aux->finished = 0;
+	if (aux->sep < 0) {
+		for (p = start = aux->p + 1; *p; ++p)
+			if (aux->tab[*p>>6]>>(*p&0x3f)&1) break;
+	} else {
+		for (p = start = aux->p + 1; *p; ++p)
+			if (*p == aux->sep) break;
+	}
+	aux->p = p; // end of token
+	if (*p == 0) aux->finished = 1; // no more tokens
+	return (char*)start;
+}
+
+// s MUST BE a null terminated string; l = strlen(s)
+int ksplit_core(char *s, int delimiter, int *_max, int **_offsets)
+{
+	int i, n, max, last_char, last_start, *offsets, l;
+	n = 0; max = *_max; offsets = *_offsets;
+	l = strlen(s);
+	
+#define __ksplit_aux do {						\
+		if (_offsets) {						\
+			s[i] = 0;					\
+			if (n == max) {					\
+				int *tmp;				\
+				max = max? max<<1 : 2;			\
+				if ((tmp = (int*)realloc(offsets, sizeof(int) * max))) {  \
+					offsets = tmp;			\
+				} else	{				\
+					free(offsets);			\
+					*_offsets = NULL;		\
+					return 0;			\
+				}					\
+			}						\
+			offsets[n++] = last_start;			\
+		} else ++n;						\
+	} while (0)
+
+	for (i = 0, last_char = last_start = 0; i <= l; ++i) {
+		if (delimiter == 0) {
+			if (isspace(s[i]) || s[i] == 0) {
+				if (isgraph(last_char)) __ksplit_aux; // the end of a field
+			} else {
+				if (isspace(last_char) || last_char == 0) last_start = i;
+			}
+		} else {
+			if (s[i] == delimiter || s[i] == 0) {
+				if (last_char != 0 && last_char != delimiter) __ksplit_aux; // the end of a field
+			} else {
+				if (last_char == delimiter || last_char == 0) last_start = i;
+			}
+		}
+		last_char = s[i];
+	}
+	*_max = max; *_offsets = offsets;
+	return n;
+}
+
+/**********************
+ * Boyer-Moore search *
+ **********************/
+
+typedef unsigned char ubyte_t;
+
+// reference: http://www-igm.univ-mlv.fr/~lecroq/string/node14.html
+static int *ksBM_prep(const ubyte_t *pat, int m)
+{
+	int i, *suff, *prep, *bmGs, *bmBc;
+	prep = (int*)calloc(m + 256, sizeof(int));
+	bmGs = prep; bmBc = prep + m;
+	{ // preBmBc()
+		for (i = 0; i < 256; ++i) bmBc[i] = m;
+		for (i = 0; i < m - 1; ++i) bmBc[pat[i]] = m - i - 1;
+	}
+	suff = (int*)calloc(m, sizeof(int));
+	{ // suffixes()
+		int f = 0, g;
+		suff[m - 1] = m;
+		g = m - 1;
+		for (i = m - 2; i >= 0; --i) {
+			if (i > g && suff[i + m - 1 - f] < i - g)
+				suff[i] = suff[i + m - 1 - f];
+			else {
+				if (i < g) g = i;
+				f = i;
+				while (g >= 0 && pat[g] == pat[g + m - 1 - f]) --g;
+				suff[i] = f - g;
+			}
+		}
+	}
+	{ // preBmGs()
+		int j = 0;
+		for (i = 0; i < m; ++i) bmGs[i] = m;
+		for (i = m - 1; i >= 0; --i)
+			if (suff[i] == i + 1)
+				for (; j < m - 1 - i; ++j)
+					if (bmGs[j] == m)
+						bmGs[j] = m - 1 - i;
+		for (i = 0; i <= m - 2; ++i)
+			bmGs[m - 1 - suff[i]] = m - 1 - i;
+	}
+	free(suff);
+	return prep;
+}
+
+void *kmemmem(const void *_str, int n, const void *_pat, int m, int **_prep)
+{
+	int i, j, *prep = 0, *bmGs, *bmBc;
+	const ubyte_t *str, *pat;
+	str = (const ubyte_t*)_str; pat = (const ubyte_t*)_pat;
+	prep = (_prep == 0 || *_prep == 0)? ksBM_prep(pat, m) : *_prep;
+	if (_prep && *_prep == 0) *_prep = prep;
+	bmGs = prep; bmBc = prep + m;
+	j = 0;
+	while (j <= n - m) {
+		for (i = m - 1; i >= 0 && pat[i] == str[i+j]; --i);
+		if (i >= 0) {
+			int max = bmBc[str[i+j]] - m + 1 + i;
+			if (max < bmGs[i]) max = bmGs[i];
+			j += max;
+		} else return (void*)(str + j);
+	}
+	if (_prep == 0) free(prep);
+	return 0;
+}
+
+char *kstrstr(const char *str, const char *pat, int **_prep)
+{
+	return (char*)kmemmem(str, strlen(str), pat, strlen(pat), _prep);
+}
+
+char *kstrnstr(const char *str, const char *pat, int n, int **_prep)
+{
+	return (char*)kmemmem(str, n, pat, strlen(pat), _prep);
+}
+
+/***********************
+ * The main() function *
+ ***********************/
+
+#ifdef KSTRING_MAIN
+#include <stdio.h>
+int main()
+{
+	kstring_t *s;
+	int *fields, n, i;
+	ks_tokaux_t aux;
+	char *p;
+	s = (kstring_t*)calloc(1, sizeof(kstring_t));
+	// test ksprintf()
+	ksprintf(s, " abcdefg:    %d ", 100);
+	printf("'%s'\n", s->s);
+	// test ksplit()
+	fields = ksplit(s, 0, &n);
+	for (i = 0; i < n; ++i)
+		printf("field[%d] = '%s'\n", i, s->s + fields[i]);
+	// test kstrtok()
+	s->l = 0;
+	for (p = kstrtok("ab:cde:fg/hij::k", ":/", &aux); p; p = kstrtok(0, 0, &aux)) {
+		kputsn(p, aux.p - p, s);
+		kputc('\n', s);
+	}
+	printf("%s", s->s);
+	// free
+	free(s->s); free(s); free(fields);
+
+	{
+		static char *str = "abcdefgcdgcagtcakcdcd";
+		static char *pat = "cd";
+		char *ret, *s = str;
+		int *prep = 0;
+		while ((ret = kstrstr(s, pat, &prep)) != 0) {
+			printf("match: %s\n", ret);
+			s = ret + prep[0];
+		}
+		free(prep);
+	}
+	return 0;
+}
+#endif
diff --git a/htslib/sam.c b/htslib/sam.c
new file mode 100644
index 0000000..ae4b39b
--- /dev/null
+++ b/htslib/sam.c
@@ -0,0 +1,1780 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <zlib.h>
+#include "htslib/sam.h"
+#include "htslib/bgzf.h"
+#include "cram/cram.h"
+#include "htslib/hfile.h"
+
+#include "htslib/khash.h"
+KHASH_DECLARE(s2i, kh_cstr_t, int64_t)
+
+typedef khash_t(s2i) sdict_t;
+
+/**********************
+ *** BAM header I/O ***
+ **********************/
+
+bam_hdr_t *bam_hdr_init()
+{
+	return (bam_hdr_t*)calloc(1, sizeof(bam_hdr_t));
+}
+
+void bam_hdr_destroy(bam_hdr_t *h)
+{
+	int32_t i;
+	if (h == NULL) return;
+	if (h->target_name) {
+		for (i = 0; i < h->n_targets; ++i)
+			free(h->target_name[i]);
+		free(h->target_name);
+		free(h->target_len);
+	}
+	free(h->text); free(h->cigar_tab);
+	if (h->sdict) kh_destroy(s2i, (sdict_t*)h->sdict);
+	free(h);
+}
+
+bam_hdr_t *bam_hdr_dup(const bam_hdr_t *h0)
+{
+	if (h0 == NULL) return NULL;
+	bam_hdr_t *h;
+	if ((h = bam_hdr_init()) == NULL) return NULL;
+	// copy the simple data
+	h->n_targets = h0->n_targets;
+	h->ignore_sam_err = h0->ignore_sam_err;
+	h->l_text = h0->l_text;
+	// Then the pointery stuff
+	h->cigar_tab = NULL;
+	h->sdict = NULL;
+	h->text = (char*)calloc(h->l_text + 1, 1);
+	memcpy(h->text, h0->text, h->l_text);
+	h->target_len = (uint32_t*)calloc(h->n_targets, 4);
+	h->target_name = (char**)calloc(h->n_targets, sizeof(char*));
+	int i;
+	for (i = 0; i < h->n_targets; ++i) {
+		h->target_len[i] = h0->target_len[i];
+		h->target_name[i] = strdup(h0->target_name[i]);
+	}
+	return h;
+}
+
+
+static bam_hdr_t *hdr_from_dict(sdict_t *d)
+{
+	bam_hdr_t *h;
+	khint_t k;
+	h = bam_hdr_init();
+	h->sdict = d;
+	h->n_targets = kh_size(d);
+	h->target_len = (uint32_t*)malloc(4 * h->n_targets);
+	h->target_name = (char**)malloc(sizeof(char*) * h->n_targets);
+	for (k = kh_begin(d); k != kh_end(d); ++k) {
+		if (!kh_exist(d, k)) continue;
+		h->target_name[kh_val(d, k)>>32] = (char*)kh_key(d, k);
+		h->target_len[kh_val(d, k)>>32]  = kh_val(d, k)<<32>>32;
+		kh_val(d, k) >>= 32;
+	}
+	return h;
+}
+
+bam_hdr_t *bam_hdr_read(BGZF *fp)
+{
+	bam_hdr_t *h;
+	char buf[4];
+	int magic_len, has_EOF;
+	int32_t i = 1, name_len;
+	// check EOF
+	has_EOF = bgzf_check_EOF(fp);
+	if (has_EOF < 0) {
+		perror("[W::sam_hdr_read] bgzf_check_EOF");
+	} else if (has_EOF == 0 && hts_verbose >= 2)
+		fprintf(stderr, "[W::%s] EOF marker is absent. The input is probably truncated.\n", __func__);
+	// read "BAM1"
+	magic_len = bgzf_read(fp, buf, 4);
+	if (magic_len != 4 || strncmp(buf, "BAM\1", 4)) {
+		if (hts_verbose >= 1) fprintf(stderr, "[E::%s] invalid BAM binary header\n", __func__);
+		return 0;
+	}
+	h = bam_hdr_init();
+	// read plain text and the number of reference sequences
+	bgzf_read(fp, &h->l_text, 4);
+	if (fp->is_be) ed_swap_4p(&h->l_text);
+	h->text = (char*)malloc(h->l_text + 1);
+	h->text[h->l_text] = 0; // make sure it is NULL terminated
+	bgzf_read(fp, h->text, h->l_text);
+	bgzf_read(fp, &h->n_targets, 4);
+	if (fp->is_be) ed_swap_4p(&h->n_targets);
+	// read reference sequence names and lengths
+	h->target_name = (char**)calloc(h->n_targets, sizeof(char*));
+	h->target_len = (uint32_t*)calloc(h->n_targets, 4);
+	for (i = 0; i != h->n_targets; ++i) {
+		bgzf_read(fp, &name_len, 4);
+		if (fp->is_be) ed_swap_4p(&name_len);
+		h->target_name[i] = (char*)calloc(name_len, 1);
+		bgzf_read(fp, h->target_name[i], name_len);
+		bgzf_read(fp, &h->target_len[i], 4);
+		if (fp->is_be) ed_swap_4p(&h->target_len[i]);
+	}
+	return h;
+}
+
+int bam_hdr_write(BGZF *fp, const bam_hdr_t *h)
+{
+	char buf[4];
+	int32_t i, name_len, x;
+	// write "BAM1"
+	strncpy(buf, "BAM\1", 4);
+	bgzf_write(fp, buf, 4);
+	// write plain text and the number of reference sequences
+	if (fp->is_be) {
+		x = ed_swap_4(h->l_text);
+		bgzf_write(fp, &x, 4);
+		if (h->l_text) bgzf_write(fp, h->text, h->l_text);
+		x = ed_swap_4(h->n_targets);
+		bgzf_write(fp, &x, 4);
+	} else {
+		bgzf_write(fp, &h->l_text, 4);
+		if (h->l_text) bgzf_write(fp, h->text, h->l_text);
+		bgzf_write(fp, &h->n_targets, 4);
+	}
+	// write sequence names and lengths
+	for (i = 0; i != h->n_targets; ++i) {
+		char *p = h->target_name[i];
+		name_len = strlen(p) + 1;
+		if (fp->is_be) {
+			x = ed_swap_4(name_len);
+			bgzf_write(fp, &x, 4);
+		} else bgzf_write(fp, &name_len, 4);
+		bgzf_write(fp, p, name_len);
+		if (fp->is_be) {
+			x = ed_swap_4(h->target_len[i]);
+			bgzf_write(fp, &x, 4);
+		} else bgzf_write(fp, &h->target_len[i], 4);
+	}
+	bgzf_flush(fp);
+	return 0;
+}
+
+int bam_name2id(bam_hdr_t *h, const char *ref)
+{
+	sdict_t *d = (sdict_t*)h->sdict;
+	khint_t k;
+	if (h->sdict == 0) {
+		int i, absent;
+		d = kh_init(s2i);
+		for (i = 0; i < h->n_targets; ++i) {
+			k = kh_put(s2i, d, h->target_name[i], &absent);
+			kh_val(d, k) = i;
+		}
+		h->sdict = d;
+	}
+	k = kh_get(s2i, d, ref);
+	return k == kh_end(d)? -1 : kh_val(d, k);
+}
+
+/*************************
+ *** BAM alignment I/O ***
+ *************************/
+
+bam1_t *bam_init1()
+{
+	return (bam1_t*)calloc(1, sizeof(bam1_t));
+}
+
+void bam_destroy1(bam1_t *b)
+{
+	if (b == 0) return;
+	free(b->data); free(b);
+}
+
+bam1_t *bam_copy1(bam1_t *bdst, const bam1_t *bsrc)
+{
+	uint8_t *data = bdst->data;
+	int m_data = bdst->m_data;   // backup data and m_data
+	if (m_data < bsrc->l_data) { // double the capacity
+		m_data = bsrc->l_data; kroundup32(m_data);
+		data = (uint8_t*)realloc(data, m_data);
+	}
+	memcpy(data, bsrc->data, bsrc->l_data); // copy var-len data
+	*bdst = *bsrc; // copy the rest
+	// restore the backup
+	bdst->m_data = m_data;
+	bdst->data = data;
+	return bdst;
+}
+
+bam1_t *bam_dup1(const bam1_t *bsrc)
+{
+	if (bsrc == NULL) return NULL;
+	bam1_t *bdst = bam_init1();
+	if (bdst == NULL) return NULL;
+	return bam_copy1(bdst, bsrc);
+}
+
+int bam_cigar2qlen(int n_cigar, const uint32_t *cigar)
+{
+	int k, l;
+	for (k = l = 0; k < n_cigar; ++k)
+		if (bam_cigar_type(bam_cigar_op(cigar[k]))&1)
+			l += bam_cigar_oplen(cigar[k]);
+	return l;
+}
+
+int bam_cigar2rlen(int n_cigar, const uint32_t *cigar)
+{
+	int k, l;
+	for (k = l = 0; k < n_cigar; ++k)
+		if (bam_cigar_type(bam_cigar_op(cigar[k]))&2)
+			l += bam_cigar_oplen(cigar[k]);
+	return l;
+}
+
+int32_t bam_endpos(const bam1_t *b)
+{
+	if (!(b->core.flag & BAM_FUNMAP) && b->core.n_cigar > 0)
+		return b->core.pos + bam_cigar2rlen(b->core.n_cigar, bam_get_cigar(b));
+	else
+		return b->core.pos + 1;
+}
+
+static inline int aux_type2size(uint8_t type)
+{
+	switch (type) {
+	case 'A': case 'c': case 'C':
+		return 1;
+	case 's': case 'S':
+		return 2;
+	case 'i': case 'I': case 'f':
+		return 4;
+	case 'd':
+		return 8;
+	case 'Z': case 'H': case 'B':
+		return type;
+	default:
+		return 0;
+	}
+}
+
+static void swap_data(const bam1_core_t *c, int l_data, uint8_t *data, int is_host)
+{
+	uint8_t *s;
+	uint32_t *cigar = (uint32_t*)(data + c->l_qname);
+	uint32_t i, n;
+	s = data + c->n_cigar*4 + c->l_qname + c->l_qseq + (c->l_qseq + 1)/2;
+	for (i = 0; i < c->n_cigar; ++i) ed_swap_4p(&cigar[i]);
+	while (s < data + l_data) {
+		int size;
+		s += 2; // skip key
+		size = aux_type2size(*s); ++s; // skip type
+		switch (size) {
+		case 1: ++s; break;
+		case 2: ed_swap_2p(s); s += 2; break;
+		case 4: ed_swap_4p(s); s += 4; break;
+		case 8: ed_swap_8p(s); s += 8; break;
+		case 'Z':
+		case 'H':
+			while (*s) ++s;
+			++s;
+			break;
+		case 'B':
+			size = aux_type2size(*s); ++s;
+			if (is_host) memcpy(&n, s, 4), ed_swap_4p(s);
+			else ed_swap_4p(s), memcpy(&n, s, 4);
+			s += 4;
+			switch (size) {
+			case 1: s += n; break;
+			case 2: for (i = 0; i < n; ++i, s += 2) ed_swap_2p(s); break;
+			case 4: for (i = 0; i < n; ++i, s += 4) ed_swap_4p(s); break;
+			case 8: for (i = 0; i < n; ++i, s += 8) ed_swap_8p(s); break;
+			}
+			break;
+		}
+	}
+}
+
+int bam_read1(BGZF *fp, bam1_t *b)
+{
+	bam1_core_t *c = &b->core;
+	int32_t block_len, ret, i;
+	uint32_t x[8];
+	if ((ret = bgzf_read(fp, &block_len, 4)) != 4) {
+		if (ret == 0) return -1; // normal end-of-file
+		else return -2; // truncated
+	}
+	if (bgzf_read(fp, x, 32) != 32) return -3;
+	if (fp->is_be) {
+		ed_swap_4p(&block_len);
+		for (i = 0; i < 8; ++i) ed_swap_4p(x + i);
+	}
+	c->tid = x[0]; c->pos = x[1];
+	c->bin = x[2]>>16; c->qual = x[2]>>8&0xff; c->l_qname = x[2]&0xff;
+	c->flag = x[3]>>16; c->n_cigar = x[3]&0xffff;
+	c->l_qseq = x[4];
+	c->mtid = x[5]; c->mpos = x[6]; c->isize = x[7];
+	b->l_data = block_len - 32;
+	if (b->l_data < 0 || c->l_qseq < 0) return -4;
+	if ((char *)bam_get_aux(b) - (char *)b->data > b->l_data)
+		return -4;
+	if (b->m_data < b->l_data) {
+		b->m_data = b->l_data;
+		kroundup32(b->m_data);
+		b->data = (uint8_t*)realloc(b->data, b->m_data);
+		if (!b->data)
+			return -4;
+	}
+	if (bgzf_read(fp, b->data, b->l_data) != b->l_data) return -4;
+	//b->l_aux = b->l_data - c->n_cigar * 4 - c->l_qname - c->l_qseq - (c->l_qseq+1)/2;
+	if (fp->is_be) swap_data(c, b->l_data, b->data, 0);
+	return 4 + block_len;
+}
+
+int bam_write1(BGZF *fp, const bam1_t *b)
+{
+	const bam1_core_t *c = &b->core;
+	uint32_t x[8], block_len = b->l_data + 32, y;
+	int i, ok;
+	x[0] = c->tid;
+	x[1] = c->pos;
+	x[2] = (uint32_t)c->bin<<16 | c->qual<<8 | c->l_qname;
+	x[3] = (uint32_t)c->flag<<16 | c->n_cigar;
+	x[4] = c->l_qseq;
+	x[5] = c->mtid;
+	x[6] = c->mpos;
+	x[7] = c->isize;
+	ok = (bgzf_flush_try(fp, 4 + block_len) >= 0);
+	if (fp->is_be) {
+		for (i = 0; i < 8; ++i) ed_swap_4p(x + i);
+		y = block_len;
+		if (ok) ok = (bgzf_write(fp, ed_swap_4p(&y), 4) >= 0);
+		swap_data(c, b->l_data, b->data, 1);
+	} else {
+		if (ok) ok = (bgzf_write(fp, &block_len, 4) >= 0);
+	}
+	if (ok) ok = (bgzf_write(fp, x, 32) >= 0);
+	if (ok) ok = (bgzf_write(fp, b->data, b->l_data) >= 0);
+	if (fp->is_be) swap_data(c, b->l_data, b->data, 0);
+	return ok? 4 + block_len : -1;
+}
+
+/********************
+ *** BAM indexing ***
+ ********************/
+
+static hts_idx_t *bam_index(BGZF *fp, int min_shift)
+{
+	int n_lvls, i, fmt;
+	bam1_t *b;
+	hts_idx_t *idx;
+	bam_hdr_t *h;
+	h = bam_hdr_read(fp);
+	if (min_shift > 0) {
+		int64_t max_len = 0, s;
+		for (i = 0; i < h->n_targets; ++i)
+			if (max_len < h->target_len[i]) max_len = h->target_len[i];
+		max_len += 256;
+		for (n_lvls = 0, s = 1<<min_shift; max_len > s; ++n_lvls, s <<= 3);
+		fmt = HTS_FMT_CSI;
+	} else min_shift = 14, n_lvls = 5, fmt = HTS_FMT_BAI;
+	idx = hts_idx_init(h->n_targets, fmt, bgzf_tell(fp), min_shift, n_lvls);
+	bam_hdr_destroy(h);
+	b = bam_init1();
+	while (bam_read1(fp, b) >= 0) {
+		int l, ret;
+		l = bam_cigar2rlen(b->core.n_cigar, bam_get_cigar(b));
+		if (l == 0) l = 1; // no zero-length records
+		ret = hts_idx_push(idx, b->core.tid, b->core.pos, b->core.pos + l, bgzf_tell(fp), !(b->core.flag&BAM_FUNMAP));
+		if (ret < 0)
+        {
+            // unsorted
+            bam_destroy1(b);
+            hts_idx_destroy(idx);
+            return NULL;
+        }
+	}
+	hts_idx_finish(idx, bgzf_tell(fp));
+	bam_destroy1(b);
+	return idx;
+}
+
+int bam_index_build(const char *fn, int min_shift)
+{
+	hts_idx_t *idx;
+	htsFile *fp;
+	int ret = 0;
+
+	if ((fp = hts_open(fn, "r")) == 0) return -1;
+	if (fp->is_cram) {
+	    	ret = cram_index_build(fp->fp.cram, fn);
+	} else {
+			idx = bam_index(fp->fp.bgzf, min_shift);
+			if ( !idx )
+			{
+				hts_close(fp);
+				return -1;
+			}
+		hts_idx_save(idx, fn, min_shift > 0
+			     ? HTS_FMT_CSI : HTS_FMT_BAI);
+		hts_idx_destroy(idx);
+	}
+	hts_close(fp);
+
+	return ret;
+}
+
+static int bam_readrec(BGZF *fp, void *ignored, void *bv, int *tid, int *beg, int *end)
+{
+	bam1_t *b = bv;
+	int ret;
+	if ((ret = bam_read1(fp, b)) >= 0) {
+		*tid = b->core.tid; *beg = b->core.pos;
+		*end = b->core.pos + (b->core.n_cigar? bam_cigar2rlen(b->core.n_cigar, bam_get_cigar(b)) : 1);
+	}
+	return ret;
+}
+
+// This is used only with read_rest=1 iterators, so need not set tid/beg/end.
+static int cram_readrec(BGZF *ignored, void *fpv, void *bv, int *tid, int *beg, int *end)
+{
+	htsFile *fp = fpv;
+	bam1_t *b = bv;
+	return cram_get_bam_seq(fp->fp.cram, &b);
+}
+
+// This is used only with read_rest=1 iterators, so need not set tid/beg/end.
+static int sam_bam_cram_readrec(BGZF *bgzfp, void *fpv, void *bv, int *tid, int *beg, int *end)
+{
+	htsFile *fp = fpv;
+	bam1_t *b = bv;
+	if (fp->is_bin) return bam_read1(bgzfp, b);
+	else if (fp->is_cram) return cram_get_bam_seq(fp->fp.cram, &b);
+	else {
+		// TODO Need headers available to implement this for SAM files
+		fprintf(stderr, "[sam_bam_cram_readrec] Not implemented for SAM files -- Exiting\n");
+		abort();
+	}
+}
+
+// The CRAM implementation stores the loaded index within the cram_fd rather
+// than separately as is done elsewhere in htslib.  So if p is a pointer to
+// an hts_idx_t with p->fmt == HTS_FMT_CRAI, then it actually points to an
+// hts_cram_idx_t and should be cast accordingly.
+typedef struct hts_cram_idx_t {
+    int fmt;
+    cram_fd *cram;
+} hts_cram_idx_t;
+
+hts_idx_t *sam_index_load(samFile *fp, const char *fn)
+{
+	if (fp->is_bin) return bam_index_load(fn);
+	else if (fp->is_cram) {
+		if (cram_index_load(fp->fp.cram, fn) < 0) return NULL;
+		// Cons up a fake "index" just pointing at the associated cram_fd:
+		hts_cram_idx_t *idx = malloc(sizeof (hts_cram_idx_t));
+		if (idx == NULL) return NULL;
+		idx->fmt = HTS_FMT_CRAI;
+		idx->cram = fp->fp.cram;
+		return (hts_idx_t *) idx;
+	}
+	else return NULL; // TODO Would use tbx_index_load if it returned hts_idx_t
+}
+
+static hts_itr_t *cram_itr_query(const hts_idx_t *idx, int tid, int beg, int end, hts_readrec_func *readrec)
+{
+	const hts_cram_idx_t *cidx = (const hts_cram_idx_t *) idx;
+	hts_itr_t *iter = (hts_itr_t *) calloc(1, sizeof(hts_itr_t));
+	if (iter == NULL) return NULL;
+
+	// Cons up a dummy iterator for which hts_itr_next() will simply invoke
+	// the readrec function:
+	iter->read_rest = 1;
+	iter->off = NULL;
+	iter->bins.a = NULL;
+	iter->readrec = readrec;
+
+	if (tid >= 0) {
+		cram_range r = { tid, beg+1, end };
+		if (cram_set_option(cidx->cram, CRAM_OPT_RANGE, &r) != 0) { free(iter); return NULL; }
+		iter->curr_off = 0;
+		// The following fields are not required by hts_itr_next(), but are
+		// filled in in case user code wants to look at them.
+		iter->tid = tid;
+		iter->beg = beg;
+		iter->end = end;
+	}
+	else switch (tid) {
+	case HTS_IDX_REST:
+		iter->curr_off = 0;
+		break;
+	case HTS_IDX_NONE:
+		iter->curr_off = 0;
+		iter->finished = 1;
+		break;
+	default:
+		fprintf(stderr, "[cram_itr_query] tid=%d not implemented for CRAM files -- Exiting\n", tid);
+		abort();
+		break;
+	}
+
+	return iter;
+}
+
+hts_itr_t *sam_itr_queryi(const hts_idx_t *idx, int tid, int beg, int end)
+{
+	const hts_cram_idx_t *cidx = (const hts_cram_idx_t *) idx;
+	if (idx == NULL)
+		return hts_itr_query(NULL, tid, beg, end, sam_bam_cram_readrec);
+	else if (cidx->fmt == HTS_FMT_CRAI)
+		return cram_itr_query(idx, tid, beg, end, cram_readrec);
+	else
+		return hts_itr_query(idx, tid, beg, end, bam_readrec);
+}
+
+static int cram_name2id(void *fdv, const char *ref)
+{
+	cram_fd *fd = (cram_fd *) fdv;
+	return sam_hdr_name2ref(fd->header, ref);
+}
+
+hts_itr_t *sam_itr_querys(const hts_idx_t *idx, bam_hdr_t *hdr, const char *region)
+{
+	const hts_cram_idx_t *cidx = (const hts_cram_idx_t *) idx;
+	if (cidx->fmt == HTS_FMT_CRAI)
+		return hts_itr_querys(idx, region, cram_name2id, cidx->cram, cram_itr_query, cram_readrec);
+	else
+		return hts_itr_querys(idx, region, (hts_name2id_f)(bam_name2id), hdr, hts_itr_query, bam_readrec);
+}
+
+/**********************
+ *** SAM header I/O ***
+ **********************/
+
+#include "htslib/kseq.h"
+#include "htslib/kstring.h"
+
+bam_hdr_t *sam_hdr_parse(int l_text, const char *text)
+{
+	const char *q, *r, *p;
+	khash_t(s2i) *d;
+	d = kh_init(s2i);
+	for (p = text; *p; ++p) {
+		if (strncmp(p, "@SQ", 3) == 0) {
+			char *sn = 0;
+			int ln = -1;
+			for (q = p + 4;; ++q) {
+				if (strncmp(q, "SN:", 3) == 0) {
+					q += 3;
+					for (r = q; *r != '\t' && *r != '\n'; ++r);
+					sn = (char*)calloc(r - q + 1, 1);
+					strncpy(sn, q, r - q);
+					q = r;
+				} else if (strncmp(q, "LN:", 3) == 0)
+					ln = strtol(q + 3, (char**)&q, 10);
+				while (*q != '\t' && *q != '\n') ++q;
+				if (*q == '\n') break;
+			}
+			p = q;
+			if (sn && ln >= 0) {
+				khint_t k;
+				int absent;
+				k = kh_put(s2i, d, sn, &absent);
+				if (!absent) {
+					if (hts_verbose >= 2)
+						fprintf(stderr, "[W::%s] duplicated sequence '%s'\n", __func__, sn);
+					free(sn);
+				} else kh_val(d, k) = (int64_t)(kh_size(d) - 1)<<32 | ln;
+			}
+		}
+		while (*p != '\n') ++p;
+	}
+	return hdr_from_dict(d);
+}
+
+bam_hdr_t *sam_hdr_read(htsFile *fp)
+{
+	if (fp->is_bin) {
+		return bam_hdr_read(fp->fp.bgzf);
+	} else if (fp->is_cram) {
+		return cram_header_to_bam(fp->fp.cram->header);
+	} else {
+		kstring_t str;
+		bam_hdr_t *h;
+		int has_SQ = 0;
+		str.l = str.m = 0; str.s = 0;
+		while (hts_getline(fp, KS_SEP_LINE, &fp->line) >= 0) {
+			if (fp->line.s[0] != '@') break;
+			if (fp->line.l > 3 && strncmp(fp->line.s,"@SQ",3) == 0) has_SQ = 1;
+			kputsn(fp->line.s, fp->line.l, &str);
+			kputc('\n', &str);
+		}
+		if (! has_SQ && fp->fn_aux) {
+			char line[2048];
+			FILE *f = fopen(fp->fn_aux, "r");
+			if (f == NULL) return NULL;
+			while (fgets(line, sizeof line, f)) {
+				const char *name = strtok(line, "\t");
+				const char *length = strtok(NULL, "\t");
+				ksprintf(&str, "@SQ\tSN:%s\tLN:%s\n", name, length);
+			}
+			fclose(f);
+		}
+		if (str.l == 0) kputsn("", 0, &str);
+		h = sam_hdr_parse(str.l, str.s);
+		h->l_text = str.l; h->text = str.s;
+		return h;
+	}
+}
+
+int sam_hdr_write(htsFile *fp, const bam_hdr_t *h)
+{
+	if (fp->is_bin) {
+		bam_hdr_write(fp->fp.bgzf, h);
+	} else if (fp->is_cram) {
+		cram_fd *fd = fp->fp.cram;
+		if (cram_set_header(fd, bam_header_to_cram((bam_hdr_t *)h)) < 0) return -1;
+		if (fp->fn_aux)
+		    cram_load_reference(fd, fp->fn_aux);
+		if (cram_write_SAM_hdr(fd, fd->header) < 0) return -1;
+	} else {
+		char *p;
+		hputs(h->text, fp->fp.hfile);
+		p = strstr(h->text, "@SQ\t"); // FIXME: we need a loop to make sure "@SQ\t" does not match something unwanted!!!
+		if (p == 0) {
+			int i;
+			for (i = 0; i < h->n_targets; ++i) {
+				fp->line.l = 0;
+				kputsn("@SQ\tSN:", 7, &fp->line); kputs(h->target_name[i], &fp->line);
+				kputsn("\tLN:", 4, &fp->line); kputw(h->target_len[i], &fp->line); kputc('\n', &fp->line);
+				if ( hwrite(fp->fp.hfile, fp->line.s, fp->line.l) != fp->line.l ) return -1;
+			}
+		}
+		if ( hflush(fp->fp.hfile) != 0 ) return -1;
+	}
+	return 0;
+}
+
+/**********************
+ *** SAM record I/O ***
+ **********************/
+
+int sam_parse1(kstring_t *s, bam_hdr_t *h, bam1_t *b)
+{
+#define _read_token(_p) (_p); for (; *(_p) && *(_p) != '\t'; ++(_p)); if (*(_p) != '\t') goto err_ret; *(_p)++ = 0
+#define _read_token_aux(_p) (_p); for (; *(_p) && *(_p) != '\t'; ++(_p)); *(_p)++ = 0 // this is different in that it does not test *(_p)=='\t'
+#define _get_mem(type_t, _x, _s, _l) ks_resize((_s), (_s)->l + (_l)); *(_x) = (type_t*)((_s)->s + (_s)->l); (_s)->l += (_l)
+#define _parse_err(cond, msg) do { if ((cond) && hts_verbose >= 1) { fprintf(stderr, "[E::%s] " msg "\n", __func__); goto err_ret; } } while (0)
+#define _parse_warn(cond, msg) if ((cond) && hts_verbose >= 2) fprintf(stderr, "[W::%s] " msg "\n", __func__)
+
+	uint8_t *t;
+	char *p = s->s, *q;
+	int i;
+	kstring_t str;
+	bam1_core_t *c = &b->core;
+
+	str.l = b->l_data = 0;
+	str.s = (char*)b->data; str.m = b->m_data;
+	memset(c, 0, 32);
+	if (h->cigar_tab == 0) {
+		h->cigar_tab = (int8_t*) malloc(128);
+		for (i = 0; i < 128; ++i)
+			h->cigar_tab[i] = -1;
+		for (i = 0; BAM_CIGAR_STR[i]; ++i)
+			h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
+	}
+	// qname
+	q = _read_token(p);
+	kputsn_(q, p - q, &str);
+	c->l_qname = p - q;
+	// flag
+	c->flag = strtol(p, &p, 0);
+	if (*p++ != '\t') goto err_ret; // malformated flag
+	// chr
+	q = _read_token(p);
+	if (strcmp(q, "*")) {
+		_parse_err(h->n_targets == 0, "missing SAM header");
+		c->tid = bam_name2id(h, q);
+		_parse_warn(c->tid < 0, "urecognized reference name; treated as unmapped");
+	} else c->tid = -1;
+	// pos
+	c->pos = strtol(p, &p, 10) - 1;
+	if (*p++ != '\t') goto err_ret;
+	if (c->pos < 0 && c->tid >= 0) {
+		_parse_warn(1, "mapped query cannot have zero coordinate; treated as unmapped");
+		c->tid = -1;
+	}
+	if (c->tid < 0) c->flag |= BAM_FUNMAP;
+	// mapq
+	c->qual = strtol(p, &p, 10);
+	if (*p++ != '\t') goto err_ret;
+	// cigar
+	if (*p != '*') {
+		uint32_t *cigar;
+		size_t n_cigar = 0;
+		for (q = p; *p && *p != '\t'; ++p)
+			if (!isdigit(*p)) ++n_cigar;
+		if (*p++ != '\t') goto err_ret;
+		_parse_err(n_cigar >= 65536, "too many CIGAR operations");
+		c->n_cigar = n_cigar;
+		_get_mem(uint32_t, &cigar, &str, c->n_cigar<<2);
+		for (i = 0; i < c->n_cigar; ++i, ++q) {
+			int op;
+			cigar[i] = strtol(q, &q, 10)<<BAM_CIGAR_SHIFT;
+			op = (uint8_t)*q >= 128? -1 : h->cigar_tab[(int)*q];
+			_parse_err(op < 0, "unrecognized CIGAR operator");
+			cigar[i] |= op;
+		}
+		i = bam_cigar2rlen(c->n_cigar, cigar);
+	} else {
+		_parse_warn(!(c->flag&BAM_FUNMAP), "mapped query must have a CIGAR; treated as unmapped");
+		c->flag |= BAM_FUNMAP;
+		q = _read_token(p);
+		i = 1;
+	}
+	c->bin = hts_reg2bin(c->pos, c->pos + i, 14, 5);
+	// mate chr
+	q = _read_token(p);
+	if (strcmp(q, "=") == 0) c->mtid = c->tid;
+	else if (strcmp(q, "*") == 0) c->mtid = -1;
+	else c->mtid = bam_name2id(h, q);
+	// mpos
+	c->mpos = strtol(p, &p, 10) - 1;
+	if (*p++ != '\t') goto err_ret;
+	if (c->mpos < 0 && c->mtid >= 0) {
+		_parse_warn(1, "mapped mate cannot have zero coordinate; treated as unmapped");
+		c->mtid = -1;
+	}
+	// tlen
+	c->isize = strtol(p, &p, 10);
+	if (*p++ != '\t') goto err_ret;
+	// seq
+	q = _read_token(p);
+	if (strcmp(q, "*")) {
+		c->l_qseq = p - q - 1;
+		i = bam_cigar2qlen(c->n_cigar, (uint32_t*)(str.s + c->l_qname));
+		_parse_err(c->n_cigar && i != c->l_qseq, "CIGAR and query sequence are of different length");
+		i = (c->l_qseq + 1) >> 1;
+		_get_mem(uint8_t, &t, &str, i);
+		memset(t, 0, i);
+		for (i = 0; i < c->l_qseq; ++i)
+			t[i>>1] |= seq_nt16_table[(int)q[i]] << ((~i&1)<<2);
+	} else c->l_qseq = 0;
+	// qual
+	q = _read_token_aux(p);
+	_get_mem(uint8_t, &t, &str, c->l_qseq);
+	if (strcmp(q, "*")) {
+		_parse_err(p - q - 1 != c->l_qseq, "SEQ and QUAL are of different length");
+		for (i = 0; i < c->l_qseq; ++i) t[i] = q[i] - 33;
+	} else memset(t, 0xff, c->l_qseq);
+	// aux
+	// Note that (like the bam1_core_t fields) this aux data in b->data is
+	// stored in host endianness; so there is no byte swapping needed here.
+	while (p < s->s + s->l) {
+		uint8_t type;
+		q = _read_token_aux(p); // FIXME: can be accelerated for long 'B' arrays
+		_parse_err(p - q - 1 < 6, "incomplete aux field");
+		kputsn_(q, 2, &str);
+		q += 3; type = *q++; ++q; // q points to value
+		if (type == 'A' || type == 'a' || type == 'c' || type == 'C') {
+			kputc_('A', &str);
+			kputc_(*q, &str);
+		} else if (type == 'i' || type == 'I') {
+			long x;
+			x = strtol(q, &q, 10);
+			if (x < 0) {
+				if (x >= INT8_MIN) {
+					kputc_('c', &str); kputc_(x, &str);
+				} else if (x >= INT16_MIN) {
+					int16_t y = x;
+					kputc_('s', &str); kputsn_((char*)&y, 2, &str);
+				} else {
+					int32_t y = x;
+					kputc_('i', &str); kputsn_(&y, 4, &str);
+				}
+			} else {
+				if (x <= UINT8_MAX) {
+					kputc_('C', &str); kputc_(x, &str);
+				} else if (x <= UINT16_MAX) {
+					uint16_t y = x;
+					kputc_('S', &str); kputsn_(&y, 2, &str);
+				} else {
+					uint32_t y = x;
+					kputc_('I', &str); kputsn_(&y, 4, &str);
+				}
+			}
+		} else if (type == 'f') {
+			float x;
+			x = strtod(q, &q);
+			kputc_('f', &str); kputsn_(&x, 4, &str);
+		} else if (type == 'd') {
+			double x;
+			x = strtod(q, &q);
+			kputc_('d', &str); kputsn_(&x, 8, &str);
+		} else if (type == 'Z' || type == 'H') {
+			kputc_(type, &str);kputsn_(q, p - q, &str); // note that this include the trailing NULL
+		} else if (type == 'B') {
+			int32_t n;
+			char *r;
+			_parse_err(p - q - 1 < 3, "incomplete B-typed aux field");
+			type = *q++; // q points to the first ',' following the typing byte
+			for (r = q, n = 0; *r; ++r)
+				if (*r == ',') ++n;
+			kputc_('B', &str); kputc_(type, &str); kputsn_(&n, 4, &str);
+			// FIXME: to evaluate which is faster: a) aligned array and then memmove(); b) unaligned array; c) kputsn_()
+			if (type == 'c')      while (q + 1 < p) { int8_t   x = strtol(q + 1, &q, 0); kputc_(x, &str); }
+			else if (type == 'C') while (q + 1 < p) { uint8_t  x = strtoul(q + 1, &q, 0); kputc_(x, &str); }
+			else if (type == 's') while (q + 1 < p) { int16_t  x = strtol(q + 1, &q, 0); kputsn_(&x, 2, &str); }
+			else if (type == 'S') while (q + 1 < p) { uint16_t x = strtoul(q + 1, &q, 0); kputsn_(&x, 2, &str); }
+			else if (type == 'i') while (q + 1 < p) { int32_t  x = strtol(q + 1, &q, 0); kputsn_(&x, 4, &str); }
+			else if (type == 'I') while (q + 1 < p) { uint32_t x = strtoul(q + 1, &q, 0); kputsn_(&x, 4, &str); }
+			else if (type == 'f') while (q + 1 < p) { float    x = strtod(q + 1, &q);    kputsn_(&x, 4, &str); }
+			else _parse_err(1, "unrecognized type");
+		} else _parse_err(1, "unrecognized type");
+	}
+	b->data = (uint8_t*)str.s; b->l_data = str.l; b->m_data = str.m;
+	return 0;
+
+#undef _parse_warn
+#undef _parse_err
+#undef _get_mem
+#undef _read_token_aux
+#undef _read_token
+err_ret:
+	b->data = (uint8_t*)str.s; b->l_data = str.l; b->m_data = str.m;
+	return -2;
+}
+
+int sam_read1(htsFile *fp, bam_hdr_t *h, bam1_t *b)
+{
+	if (fp->is_bin) {
+		int r = bam_read1(fp->fp.bgzf, b);
+		if (r >= 0) {
+			if (b->core.tid  >= h->n_targets || b->core.tid  < -1 ||
+			    b->core.mtid >= h->n_targets || b->core.mtid < -1)
+				return -3;
+		}
+		return r;
+	} else if (fp->is_cram) {
+		return cram_get_bam_seq(fp->fp.cram, &b);
+	} else {
+		int ret;
+err_recover:
+		if (fp->line.l == 0) {
+			ret = hts_getline(fp, KS_SEP_LINE, &fp->line);
+			if (ret < 0) return -1;
+		}
+		ret = sam_parse1(&fp->line, h, b);
+		fp->line.l = 0;
+		if (ret < 0) {
+			if (hts_verbose >= 1)
+				fprintf(stderr, "[W::%s] parse error at line %lld\n", __func__, (long long)fp->lineno);
+			if (h->ignore_sam_err) goto err_recover;
+		}
+		return ret;
+	}
+}
+
+int sam_format1(const bam_hdr_t *h, const bam1_t *b, kstring_t *str)
+{
+	int i;
+	uint8_t *s;
+	const bam1_core_t *c = &b->core;
+
+	str->l = 0;
+	kputsn(bam_get_qname(b), c->l_qname-1, str); kputc('\t', str); // query name
+	kputw(c->flag, str); kputc('\t', str); // flag
+	if (c->tid >= 0) { // chr
+		kputs(h->target_name[c->tid] , str);
+		kputc('\t', str);
+	} else kputsn("*\t", 2, str);
+	kputw(c->pos + 1, str); kputc('\t', str); // pos
+	kputw(c->qual, str); kputc('\t', str); // qual
+	if (c->n_cigar) { // cigar
+		uint32_t *cigar = bam_get_cigar(b);
+		for (i = 0; i < c->n_cigar; ++i) {
+			kputw(bam_cigar_oplen(cigar[i]), str);
+			kputc(bam_cigar_opchr(cigar[i]), str);
+		}
+	} else kputc('*', str);
+	kputc('\t', str);
+	if (c->mtid < 0) kputsn("*\t", 2, str); // mate chr
+	else if (c->mtid == c->tid) kputsn("=\t", 2, str);
+	else {
+		kputs(h->target_name[c->mtid], str);
+		kputc('\t', str);
+	}
+	kputw(c->mpos + 1, str); kputc('\t', str); // mate pos
+	kputw(c->isize, str); kputc('\t', str); // template len
+	if (c->l_qseq) { // seq and qual
+		uint8_t *s = bam_get_seq(b);
+		for (i = 0; i < c->l_qseq; ++i) kputc("=ACMGRSVTWYHKDBN"[bam_seqi(s, i)], str);
+		kputc('\t', str);
+		s = bam_get_qual(b);
+		if (s[0] == 0xff) kputc('*', str);
+		else for (i = 0; i < c->l_qseq; ++i) kputc(s[i] + 33, str);
+	} else kputsn("*\t*", 3, str);
+	s = bam_get_aux(b); // aux
+	while (s+4 <= b->data + b->l_data) {
+		uint8_t type, key[2];
+		key[0] = s[0]; key[1] = s[1];
+		s += 2; type = *s++;
+		kputc('\t', str); kputsn((char*)key, 2, str); kputc(':', str);
+		if (type == 'A') {
+			kputsn("A:", 2, str);
+			kputc(*s, str);
+			++s;
+		} else if (type == 'C') {
+			kputsn("i:", 2, str);
+			kputw(*s, str);
+			++s;
+		} else if (type == 'c') {
+			kputsn("i:", 2, str);
+			kputw(*(int8_t*)s, str);
+			++s;
+		} else if (type == 'S') {
+			if (s+2 <= b->data + b->l_data) {
+				kputsn("i:", 2, str);
+				kputw(*(uint16_t*)s, str);
+				s += 2;
+			} else return -1;
+		} else if (type == 's') {
+			if (s+2 <= b->data + b->l_data) {
+				kputsn("i:", 2, str);
+				kputw(*(int16_t*)s, str);
+				s += 2;
+			} else return -1;
+		} else if (type == 'I') {
+			if (s+4 <= b->data + b->l_data) {
+				kputsn("i:", 2, str);
+				kputuw(*(uint32_t*)s, str);
+				s += 4;
+			} else return -1;
+		} else if (type == 'i') {
+			if (s+4 <= b->data + b->l_data) {
+				kputsn("i:", 2, str);
+				kputw(*(int32_t*)s, str);
+				s += 4;
+			} else return -1;
+		} else if (type == 'f') {
+			if (s+4 <= b->data + b->l_data) {
+				ksprintf(str, "f:%g", *(float*)s);
+				s += 4;
+			} else return -1;
+			
+		} else if (type == 'd') {
+			if (s+8 <= b->data + b->l_data) {
+				ksprintf(str, "d:%g", *(double*)s);
+				s += 8;
+			} else return -1;
+		} else if (type == 'Z' || type == 'H') {
+			kputc(type, str); kputc(':', str);
+			while (s < b->data + b->l_data && *s) kputc(*s++, str);
+			if (s >= b->data + b->l_data)
+				return -1;
+			++s;
+		} else if (type == 'B') {
+			uint8_t sub_type = *(s++);
+			int32_t n;
+			memcpy(&n, s, 4);
+			s += 4; // no point to the start of the array
+			if (s + n >= b->data + b->l_data)
+				return -1;
+			kputsn("B:", 2, str); kputc(sub_type, str); // write the typing
+			for (i = 0; i < n; ++i) { // FIXME: for better performance, put the loop after "if"
+				kputc(',', str);
+				if ('c' == sub_type)	  { kputw(*(int8_t*)s, str); ++s; }
+				else if ('C' == sub_type) { kputw(*(uint8_t*)s, str); ++s; }
+				else if ('s' == sub_type) { kputw(*(int16_t*)s, str); s += 2; }
+				else if ('S' == sub_type) { kputw(*(uint16_t*)s, str); s += 2; }
+				else if ('i' == sub_type) { kputw(*(int32_t*)s, str); s += 4; }
+				else if ('I' == sub_type) { kputuw(*(uint32_t*)s, str); s += 4; }
+				else if ('f' == sub_type) { ksprintf(str, "%g", *(float*)s); s += 4; }
+			}
+		}
+	}
+	return str->l;
+}
+
+int sam_write1(htsFile *fp, const bam_hdr_t *h, const bam1_t *b)
+{
+	if (fp->is_bin) {
+		return bam_write1(fp->fp.bgzf, b);
+	} else if (fp->is_cram) {
+		return cram_put_bam_seq(fp->fp.cram, (bam1_t *)b);
+	} else {
+		if (sam_format1(h, b, &fp->line) < 0) return -1;
+		kputc('\n', &fp->line);
+		if ( hwrite(fp->fp.hfile, fp->line.s, fp->line.l) != fp->line.l ) return -1;
+		return fp->line.l;
+	}
+}
+
+/************************
+ *** Auxiliary fields ***
+ ************************/
+
+void bam_aux_append(bam1_t *b, const char tag[2], char type, int len, uint8_t *data)
+{
+	int ori_len = b->l_data;
+	b->l_data += 3 + len;
+	if (b->m_data < b->l_data) {
+		b->m_data = b->l_data;
+		kroundup32(b->m_data);
+		b->data = (uint8_t*)realloc(b->data, b->m_data);
+	}
+	b->data[ori_len] = tag[0]; b->data[ori_len + 1] = tag[1];
+	b->data[ori_len + 2] = type;
+	memcpy(b->data + ori_len + 3, data, len);
+}
+
+static inline uint8_t *skip_aux(uint8_t *s)
+{
+	int size = aux_type2size(*s); ++s; // skip type
+	uint32_t n;
+	switch (size) {
+	case 'Z':
+	case 'H':
+		while (*s) ++s;
+		return s + 1;
+	case 'B':
+		size = aux_type2size(*s); ++s;
+		memcpy(&n, s, 4); s += 4;
+		return s + size * n;
+	case 0:
+		abort();
+		break;
+	default:
+		return s + size;
+	}
+}
+
+uint8_t *bam_aux_get(const bam1_t *b, const char tag[2])
+{
+	uint8_t *s;
+	int y = tag[0]<<8 | tag[1];
+	s = bam_get_aux(b);
+	while (s < b->data + b->l_data) {
+		int x = (int)s[0]<<8 | s[1];
+		s += 2;
+		if (x == y) return s;
+		s = skip_aux(s);
+	}
+	return 0;
+}
+// s MUST BE returned by bam_aux_get()
+int bam_aux_del(bam1_t *b, uint8_t *s)
+{
+	uint8_t *p, *aux;
+	int l_aux = bam_get_l_aux(b);
+	aux = bam_get_aux(b);
+	p = s - 2;
+	s = skip_aux(s);
+	memmove(p, s, l_aux - (s - aux));
+	b->l_data -= s - p;
+	return 0;
+}
+
+int32_t bam_aux2i(const uint8_t *s)
+{
+	int type;
+	type = *s++;
+	if (type == 'c') return (int32_t)*(int8_t*)s;
+	else if (type == 'C') return (int32_t)*(uint8_t*)s;
+	else if (type == 's') return (int32_t)*(int16_t*)s;
+	else if (type == 'S') return (int32_t)*(uint16_t*)s;
+	else if (type == 'i' || type == 'I') return *(int32_t*)s;
+	else return 0;
+}
+
+double bam_aux2f(const uint8_t *s)
+{
+	int type;
+	type = *s++;
+	if (type == 'd') return *(double*)s;
+	else if (type == 'f') return *(float*)s;
+	else return 0.0;
+}
+
+char bam_aux2A(const uint8_t *s)
+{
+	int type;
+	type = *s++;
+	if (type == 'A') return *(char*)s;
+	else return 0;
+}
+
+char *bam_aux2Z(const uint8_t *s)
+{
+	int type;
+	type = *s++;
+	if (type == 'Z' || type == 'H') return (char*)s;
+	else return 0;
+}
+
+#define STRNCMP(a,b,n) (strncasecmp((a),(b),(n)) || strlen(a)!=(n))
+int bam_str2flag(const char *str)
+{
+    char *end, *beg = (char*) str;
+    long int flag = strtol(str, &end, 0);
+    if ( end!=str ) return flag;    // the conversion was successful
+    flag = 0;
+    while ( *str )
+    {
+        end = beg;
+        while ( *end && *end!=',' ) end++;
+        if ( !STRNCMP("PAIRED",beg,end-beg) ) flag |= BAM_FPAIRED;
+        else if ( !STRNCMP("PROPER_PAIR",beg,end-beg) ) flag |= BAM_FPROPER_PAIR;
+        else if ( !STRNCMP("UNMAP",beg,end-beg) ) flag |= BAM_FUNMAP;
+        else if ( !STRNCMP("MUNMAP",beg,end-beg) ) flag |= BAM_FMUNMAP;
+        else if ( !STRNCMP("REVERSE",beg,end-beg) ) flag |= BAM_FREVERSE;
+        else if ( !STRNCMP("MREVERSE",beg,end-beg) ) flag |= BAM_FMREVERSE;
+        else if ( !STRNCMP("READ1",beg,end-beg) ) flag |= BAM_FREAD1;
+        else if ( !STRNCMP("READ2",beg,end-beg) ) flag |= BAM_FREAD2;
+        else if ( !STRNCMP("SECONDARY",beg,end-beg) ) flag |= BAM_FSECONDARY;
+        else if ( !STRNCMP("QCFAIL",beg,end-beg) ) flag |= BAM_FQCFAIL;
+        else if ( !STRNCMP("DUP",beg,end-beg) ) flag |= BAM_FDUP;
+        else if ( !STRNCMP("SUPPLEMENTARY",beg,end-beg) ) flag |= BAM_FSUPPLEMENTARY;
+        else return -1;
+        if ( !*end ) break;
+        beg = end + 1;
+    }
+    return flag;
+}
+
+char *bam_flag2str(int flag)
+{
+    kstring_t str = {0,0,0};
+    if ( flag&BAM_FPAIRED ) ksprintf(&str,"%s%s", str.l?",":"","PAIRED");
+    if ( flag&BAM_FPROPER_PAIR ) ksprintf(&str,"%s%s", str.l?",":"","PROPER_PAIR");
+    if ( flag&BAM_FUNMAP ) ksprintf(&str,"%s%s", str.l?",":"","UNMAP");
+    if ( flag&BAM_FMUNMAP ) ksprintf(&str,"%s%s", str.l?",":"","MUNMAP");
+    if ( flag&BAM_FREVERSE ) ksprintf(&str,"%s%s", str.l?",":"","REVERSE");
+    if ( flag&BAM_FMREVERSE ) ksprintf(&str,"%s%s", str.l?",":"","MREVERSE");
+    if ( flag&BAM_FREAD1 ) ksprintf(&str,"%s%s", str.l?",":"","READ1");
+    if ( flag&BAM_FREAD2 ) ksprintf(&str,"%s%s", str.l?",":"","READ2");
+    if ( flag&BAM_FSECONDARY ) ksprintf(&str,"%s%s", str.l?",":"","SECONDARY");
+    if ( flag&BAM_FQCFAIL ) ksprintf(&str,"%s%s", str.l?",":"","QCFAIL");
+    if ( flag&BAM_FDUP ) ksprintf(&str,"%s%s", str.l?",":"","DUP");
+    if ( flag&BAM_FSUPPLEMENTARY ) ksprintf(&str,"%s%s", str.l?",":"","SUPPLEMENTARY");
+    if ( str.l == 0 ) kputsn("", 0, &str);
+    return str.s;
+}
+
+
+/**************************
+ *** Pileup and Mpileup ***
+ **************************/
+
+#if !defined(BAM_NO_PILEUP)
+
+#include <assert.h>
+
+/*******************
+ *** Memory pool ***
+ *******************/
+
+typedef struct {
+	int k, x, y, end;
+} cstate_t;
+
+static cstate_t g_cstate_null = { -1, 0, 0, 0 };
+
+typedef struct __linkbuf_t {
+	bam1_t b;
+	int32_t beg, end;
+	cstate_t s;
+	struct __linkbuf_t *next;
+} lbnode_t;
+
+typedef struct {
+	int cnt, n, max;
+	lbnode_t **buf;
+} mempool_t;
+
+static mempool_t *mp_init(void)
+{
+	mempool_t *mp;
+	mp = (mempool_t*)calloc(1, sizeof(mempool_t));
+	return mp;
+}
+static void mp_destroy(mempool_t *mp)
+{
+	int k;
+	for (k = 0; k < mp->n; ++k) {
+		free(mp->buf[k]->b.data);
+		free(mp->buf[k]);
+	}
+	free(mp->buf);
+	free(mp);
+}
+static inline lbnode_t *mp_alloc(mempool_t *mp)
+{
+	++mp->cnt;
+	if (mp->n == 0) return (lbnode_t*)calloc(1, sizeof(lbnode_t));
+	else return mp->buf[--mp->n];
+}
+static inline void mp_free(mempool_t *mp, lbnode_t *p)
+{
+	--mp->cnt; p->next = 0; // clear lbnode_t::next here
+	if (mp->n == mp->max) {
+		mp->max = mp->max? mp->max<<1 : 256;
+		mp->buf = (lbnode_t**)realloc(mp->buf, sizeof(lbnode_t*) * mp->max);
+	}
+	mp->buf[mp->n++] = p;
+}
+
+/**********************
+ *** CIGAR resolver ***
+ **********************/
+
+/* s->k: the index of the CIGAR operator that has just been processed.
+   s->x: the reference coordinate of the start of s->k
+   s->y: the query coordiante of the start of s->k
+ */
+static inline int resolve_cigar2(bam_pileup1_t *p, int32_t pos, cstate_t *s)
+{
+#define _cop(c) ((c)&BAM_CIGAR_MASK)
+#define _cln(c) ((c)>>BAM_CIGAR_SHIFT)
+
+	bam1_t *b = p->b;
+	bam1_core_t *c = &b->core;
+	uint32_t *cigar = bam_get_cigar(b);
+	int k;
+	// determine the current CIGAR operation
+//	fprintf(stderr, "%s\tpos=%d\tend=%d\t(%d,%d,%d)\n", bam_get_qname(b), pos, s->end, s->k, s->x, s->y);
+	if (s->k == -1) { // never processed
+		if (c->n_cigar == 1) { // just one operation, save a loop
+		  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 || 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;
+			}
+			assert(k < c->n_cigar);
+			s->k = k;
+		}
+	} else { // the read has been processed before
+		int op, l = _cln(cigar[s->k]);
+		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 || 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/=/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 || op == BAM_CEQUAL || op == BAM_CDIFF) break;
+					else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) s->y += l;
+				}
+				s->k = k;
+			}
+			assert(s->k < c->n_cigar); // otherwise a bug
+		} // else, do nothing
+	}
+	{ // collect pileup information
+		int op, l;
+		op = _cop(cigar[s->k]); l = _cln(cigar[s->k]);
+		p->is_del = p->indel = p->is_refskip = 0;
+		if (s->x + l - 1 == pos && s->k + 1 < c->n_cigar) { // peek the next operation
+			int op2 = _cop(cigar[s->k+1]);
+			int l2 = _cln(cigar[s->k+1]);
+			if (op2 == BAM_CDEL) p->indel = -(int)l2;
+			else if (op2 == BAM_CINS) p->indel = l2;
+			else if (op2 == BAM_CPAD && s->k + 2 < c->n_cigar) { // no working for adjacent padding
+				int l3 = 0;
+				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 || op2 == BAM_CEQUAL || op2 == BAM_CDIFF) break;
+				}
+				if (l3 > 0) p->indel = l3;
+			}
+		}
+		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!!!!!
+			p->is_refskip = (op == BAM_CREF_SKIP);
+		} // cannot be other operations; otherwise a bug
+		p->is_head = (pos == c->pos); p->is_tail = (pos == s->end);
+	}
+	return 1;
+}
+
+/***********************
+ *** Pileup iterator ***
+ ***********************/
+
+// Dictionary of overlapping reads
+KHASH_MAP_INIT_STR(olap_hash, lbnode_t *)
+typedef khash_t(olap_hash) olap_hash_t;
+
+struct __bam_plp_t {
+	mempool_t *mp;
+	lbnode_t *head, *tail, *dummy;
+	int32_t tid, pos, max_tid, max_pos;
+	int is_eof, max_plp, error, maxcnt;
+	uint64_t id;
+	bam_pileup1_t *plp;
+	// for the "auto" interface only
+	bam1_t *b;
+	bam_plp_auto_f func;
+	void *data;
+    olap_hash_t *overlaps;
+};
+
+bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data)
+{
+	bam_plp_t iter;
+	iter = (bam_plp_t)calloc(1, sizeof(struct __bam_plp_t));
+	iter->mp = mp_init();
+	iter->head = iter->tail = mp_alloc(iter->mp);
+	iter->dummy = mp_alloc(iter->mp);
+	iter->max_tid = iter->max_pos = -1;
+	iter->maxcnt = 8000;
+	if (func) {
+		iter->func = func;
+		iter->data = data;
+		iter->b = bam_init1();
+	}
+	return iter;
+}
+
+void bam_plp_init_overlaps(bam_plp_t iter)
+{
+    iter->overlaps = kh_init(olap_hash);  // hash for tweaking quality of bases in overlapping reads
+}
+
+void bam_plp_destroy(bam_plp_t iter)
+{
+    if ( iter->overlaps ) kh_destroy(olap_hash, iter->overlaps);
+	mp_free(iter->mp, iter->dummy);
+	mp_free(iter->mp, iter->head);
+	if (iter->mp->cnt != 0)
+		fprintf(stderr, "[bam_plp_destroy] memory leak: %d. Continue anyway.\n", iter->mp->cnt);
+	mp_destroy(iter->mp);
+	if (iter->b) bam_destroy1(iter->b);
+	free(iter->plp);
+	free(iter);
+}
+
+
+//---------------------------------
+//---  Tweak overlapping reads
+//---------------------------------
+
+/**
+ *  cigar_iref2iseq_set()  - find the first CMATCH setting the ref and the read index
+ *  cigar_iref2iseq_next() - get the next CMATCH base
+ *  @cigar:       pointer to current cigar block (rw)
+ *  @cigar_max:   pointer just beyond the last cigar block
+ *  @icig:        position within the current cigar block (rw)
+ *  @iseq:        position in the sequence (rw)
+ *  @iref:        position with respect to the beginning of the read (iref_pos - b->core.pos) (rw)
+ *
+ *  Returns BAM_CMATCH or -1 when there is no more cigar to process or the requested position is not covered.
+ */
+static inline int cigar_iref2iseq_set(uint32_t **cigar, uint32_t *cigar_max, int *icig, int *iseq, int *iref)
+{
+    int pos = *iref;
+    if ( pos < 0 ) return -1;
+    *icig = 0;
+    *iseq = 0;
+    *iref = 0;
+    while ( *cigar<cigar_max )
+    {
+        int cig  = (**cigar) & BAM_CIGAR_MASK;
+        int ncig = (**cigar) >> BAM_CIGAR_SHIFT;
+
+        if ( cig==BAM_CSOFT_CLIP ) { (*cigar)++; *iseq += ncig; *icig = 0; continue; }
+        if ( cig==BAM_CHARD_CLIP ) { (*cigar)++; *icig = 0; continue; }
+        if ( cig==BAM_CMATCH || cig==BAM_CEQUAL || cig==BAM_CDIFF ) 
+        { 
+            pos -= ncig; 
+            if ( pos < 0 ) { *icig = ncig + pos; *iseq += *icig; *iref += *icig; return BAM_CMATCH; }
+            (*cigar)++; *iseq += ncig; *icig = 0; *iref += ncig;
+            continue;
+        }
+        if ( cig==BAM_CINS ) { (*cigar)++; *iseq += ncig; *icig = 0; continue; }
+        if ( cig==BAM_CDEL ) 
+        {
+            pos -= ncig;
+            if ( pos<0 ) pos = 0;
+            (*cigar)++; *icig = 0; *iref += ncig;
+            continue;
+        }
+        fprintf(stderr,"todo: cigar %d\n", cig);
+        assert(0);
+    }
+    *iseq = -1;
+    return -1;
+}
+static inline int cigar_iref2iseq_next(uint32_t **cigar, uint32_t *cigar_max, int *icig, int *iseq, int *iref)
+{
+    while ( *cigar < cigar_max )
+    {
+        int cig  = (**cigar) & BAM_CIGAR_MASK;
+        int ncig = (**cigar) >> BAM_CIGAR_SHIFT;
+
+        if ( cig==BAM_CMATCH || cig==BAM_CEQUAL || cig==BAM_CDIFF ) 
+        {
+            if ( *icig >= ncig - 1 ) { *icig = 0;  (*cigar)++; continue; }
+            (*iseq)++; (*icig)++; (*iref)++; 
+            return BAM_CMATCH; 
+        }
+        if ( cig==BAM_CDEL ) { (*cigar)++; (*iref) += ncig; *icig = 0; continue; }
+        if ( cig==BAM_CINS ) { (*cigar)++; *iseq += ncig; *icig = 0; continue; }
+        if ( cig==BAM_CSOFT_CLIP ) { (*cigar)++; *iseq += ncig; *icig = 0; continue; }
+        if ( cig==BAM_CHARD_CLIP ) { (*cigar)++; *icig = 0; continue; }
+        fprintf(stderr,"todo: cigar %d\n", cig);
+        assert(0);
+    }
+    *iseq = -1;
+    *iref = -1; 
+    return -1;
+}
+
+static void tweak_overlap_quality(bam1_t *a, bam1_t *b)
+{
+    uint32_t *a_cigar = bam_get_cigar(a), *a_cigar_max = a_cigar + a->core.n_cigar;
+    uint32_t *b_cigar = bam_get_cigar(b), *b_cigar_max = b_cigar + b->core.n_cigar;
+    int a_icig = 0, a_iseq = 0;
+    int b_icig = 0, b_iseq = 0;
+    uint8_t *a_qual = bam_get_qual(a), *b_qual = bam_get_qual(b);
+    uint8_t *a_seq  = bam_get_seq(a), *b_seq = bam_get_seq(b);
+
+    int iref   = b->core.pos;
+    int a_iref = iref - a->core.pos;
+    int b_iref = iref - b->core.pos;
+    int a_ret = cigar_iref2iseq_set(&a_cigar, a_cigar_max, &a_icig, &a_iseq, &a_iref);
+    if ( a_ret<0 ) return;  // no overlap
+    int b_ret = cigar_iref2iseq_set(&b_cigar, b_cigar_max, &b_icig, &b_iseq, &b_iref);
+    if ( b_ret<0 ) return;  // no overlap
+
+    #if DBG
+        fprintf(stderr,"tweak %s  n_cigar=%d %d  .. %d-%d vs %d-%d\n", bam_get_qname(a), a->core.n_cigar, b->core.n_cigar, 
+            a->core.pos+1,a->core.pos+bam_cigar2rlen(a->core.n_cigar,bam_get_cigar(a)), b->core.pos+1, b->core.pos+bam_cigar2rlen(b->core.n_cigar,bam_get_cigar(b)));
+    #endif
+
+    while ( 1 )
+    {
+        // Increment reference position
+        while ( a_iref>=0 && a_iref < iref - a->core.pos ) 
+            a_ret = cigar_iref2iseq_next(&a_cigar, a_cigar_max, &a_icig, &a_iseq, &a_iref);
+        if ( a_ret<0 ) break;   // done
+        if ( iref < a_iref + a->core.pos ) iref = a_iref + a->core.pos;
+
+        while ( b_iref>=0 && b_iref < iref - b->core.pos ) 
+            b_ret = cigar_iref2iseq_next(&b_cigar, b_cigar_max, &b_icig, &b_iseq, &b_iref);
+        if ( b_ret<0 ) break;   // done
+        if ( iref < b_iref + b->core.pos ) iref = b_iref + b->core.pos;
+
+        iref++;
+        if ( a_iref+a->core.pos != b_iref+b->core.pos ) continue;   // only CMATCH positions, don't know what to do with indels
+
+        if ( bam_seqi(a_seq,a_iseq) == bam_seqi(b_seq,b_iseq) ) 
+        {
+            #if DBG
+                fprintf(stderr,"%c",seq_nt16_str[bam_seqi(a_seq,a_iseq)]);
+            #endif
+            // we are very confident about this base
+            int qual = a_qual[a_iseq] + b_qual[b_iseq];
+            a_qual[a_iseq] = qual>200 ? 200 : qual;
+            b_qual[b_iseq] = 0;
+        }
+        else
+        {
+            if ( a_qual[a_iseq] >= b_qual[b_iseq] )
+            {
+                #if DBG
+                    fprintf(stderr,"[%c/%c]",seq_nt16_str[bam_seqi(a_seq,a_iseq)],tolower(seq_nt16_str[bam_seqi(b_seq,b_iseq)]));
+                #endif
+                a_qual[a_iseq] = 0.8 * a_qual[a_iseq];  // not so confident about a_qual anymore given the mismatch
+                b_qual[b_iseq] = 0;
+            }
+            else
+            {
+                #if DBG
+                    fprintf(stderr,"[%c/%c]",tolower(seq_nt16_str[bam_seqi(a_seq,a_iseq)]),seq_nt16_str[bam_seqi(b_seq,b_iseq)]);
+                #endif
+                b_qual[b_iseq] = 0.8 * b_qual[b_iseq];
+                a_qual[a_iseq] = 0;
+            }
+        }
+    }
+    #if DBG
+        fprintf(stderr,"\n");
+    #endif
+}
+
+// Fix overlapping reads. Simple soft-clipping did not give good results.
+// Lowering qualities of unwanted bases is more selective and works better.
+//
+static void overlap_push(bam_plp_t iter, lbnode_t *node)
+{
+    if ( !iter->overlaps ) return;
+
+    // mapped mates and paired reads only
+    if ( node->b.core.flag&BAM_FMUNMAP || !(node->b.core.flag&BAM_FPROPER_PAIR) ) return;
+
+    // no overlap possible, unless some wild cigar
+    if ( abs(node->b.core.isize) >= 2*node->b.core.l_qseq ) return;
+
+    khiter_t kitr = kh_get(olap_hash, iter->overlaps, bam_get_qname(&node->b));
+    if ( kitr==kh_end(iter->overlaps) )
+    {
+        int ret;
+        kitr = kh_put(olap_hash, iter->overlaps, bam_get_qname(&node->b), &ret);
+        kh_value(iter->overlaps, kitr) = node;
+    }
+    else
+    {
+        lbnode_t *a = kh_value(iter->overlaps, kitr);
+        tweak_overlap_quality(&a->b, &node->b);
+        kh_del(olap_hash, iter->overlaps, kitr);
+        assert(a->end-1 == a->s.end);
+        a->end = a->b.core.pos + bam_cigar2rlen(a->b.core.n_cigar, bam_get_cigar(&a->b));
+        a->s.end = a->end - 1;
+    }
+}
+
+static void overlap_remove(bam_plp_t iter, const bam1_t *b)
+{
+    if ( !iter->overlaps ) return;
+
+    khiter_t kitr;
+    if ( b )
+    {
+        kitr = kh_get(olap_hash, iter->overlaps, bam_get_qname(b));
+        if ( kitr!=kh_end(iter->overlaps) )
+            kh_del(olap_hash, iter->overlaps, kitr);
+    }
+    else
+    {
+        // remove all
+        for (kitr = kh_begin(iter->overlaps); kitr<kh_end(iter->overlaps); kitr++)
+            if ( kh_exist(iter->overlaps, kitr) ) kh_del(olap_hash, iter->overlaps, kitr);
+    }
+}
+
+
+
+// Prepares next pileup position in bam records collected by bam_plp_auto -> user func -> bam_plp_push. Returns
+// pointer to the piled records if next position is ready or NULL if there is not enough records in the
+// buffer yet (the current position is still the maximum position across all buffered reads).
+const bam_pileup1_t *bam_plp_next(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
+{
+	if (iter->error) { *_n_plp = -1; return 0; }
+	*_n_plp = 0;
+	if (iter->is_eof && iter->head->next == 0) return 0;
+	while (iter->is_eof || iter->max_tid > iter->tid || (iter->max_tid == iter->tid && iter->max_pos > iter->pos)) {
+		int n_plp = 0;
+		lbnode_t *p, *q;
+		// write iter->plp at iter->pos
+		iter->dummy->next = iter->head;
+		for (p = iter->head, q = iter->dummy; p->next; q = p, p = p->next) {
+			if (p->b.core.tid < iter->tid || (p->b.core.tid == iter->tid && p->end <= iter->pos)) { // then remove
+                overlap_remove(iter, &p->b);
+				q->next = p->next; mp_free(iter->mp, p); p = q;
+			} else if (p->b.core.tid == iter->tid && p->beg <= iter->pos) { // here: p->end > pos; then add to pileup
+				if (n_plp == iter->max_plp) { // then double the capacity
+					iter->max_plp = iter->max_plp? iter->max_plp<<1 : 256;
+					iter->plp = (bam_pileup1_t*)realloc(iter->plp, sizeof(bam_pileup1_t) * iter->max_plp);
+				}
+				iter->plp[n_plp].b = &p->b;
+				if (resolve_cigar2(iter->plp + n_plp, iter->pos, &p->s)) ++n_plp; // actually always true...
+			}
+		}
+		iter->head = iter->dummy->next; // dummy->next may be changed
+		*_n_plp = n_plp; *_tid = iter->tid; *_pos = iter->pos;
+		// update iter->tid and iter->pos
+		if (iter->head->next) {
+			if (iter->tid > iter->head->b.core.tid) {
+				fprintf(stderr, "[%s] unsorted input. Pileup aborts.\n", __func__);
+				iter->error = 1;
+				*_n_plp = -1;
+				return 0;
+			}
+		}
+		if (iter->tid < iter->head->b.core.tid) { // come to a new reference sequence
+			iter->tid = iter->head->b.core.tid; iter->pos = iter->head->beg; // jump to the next reference
+		} else if (iter->pos < iter->head->beg) { // here: tid == head->b.core.tid
+			iter->pos = iter->head->beg; // jump to the next position
+		} else ++iter->pos; // scan contiguously
+		// return
+		if (n_plp) return iter->plp;
+		if (iter->is_eof && iter->head->next == 0) break;
+	}
+	return 0;
+}
+
+int bam_plp_push(bam_plp_t iter, const bam1_t *b)
+{
+	if (iter->error) return -1;
+	if (b) {
+		if (b->core.tid < 0) { overlap_remove(iter, b); return 0; }
+        // Skip only unmapped reads here, any additional filtering must be done in iter->func
+        if (b->core.flag & BAM_FUNMAP) { overlap_remove(iter, b); return 0; }
+		if (iter->tid == b->core.tid && iter->pos == b->core.pos && iter->mp->cnt > iter->maxcnt) 
+        { 
+            overlap_remove(iter, b); 
+            return 0; 
+        }
+		bam_copy1(&iter->tail->b, b);
+        overlap_push(iter, iter->tail);
+#ifndef BAM_NO_ID
+		iter->tail->b.id = iter->id++;
+#endif
+		iter->tail->beg = b->core.pos;
+		iter->tail->end = b->core.pos + bam_cigar2rlen(b->core.n_cigar, bam_get_cigar(b));
+		iter->tail->s = g_cstate_null; iter->tail->s.end = iter->tail->end - 1; // initialize cstate_t
+		if (b->core.tid < iter->max_tid) {
+			fprintf(stderr, "[bam_pileup_core] the input is not sorted (chromosomes out of order)\n");
+			iter->error = 1;
+			return -1;
+		}
+		if ((b->core.tid == iter->max_tid) && (iter->tail->beg < iter->max_pos)) {
+			fprintf(stderr, "[bam_pileup_core] the input is not sorted (reads out of order)\n");
+			iter->error = 1;
+			return -1;
+		}
+		iter->max_tid = b->core.tid; iter->max_pos = iter->tail->beg;
+		if (iter->tail->end > iter->pos || iter->tail->b.core.tid > iter->tid) {
+			iter->tail->next = mp_alloc(iter->mp);
+			iter->tail = iter->tail->next;
+		}
+	} else iter->is_eof = 1;
+	return 0;
+}
+
+const bam_pileup1_t *bam_plp_auto(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
+{
+	const bam_pileup1_t *plp;
+	if (iter->func == 0 || iter->error) { *_n_plp = -1; return 0; }
+	if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
+	else { // no pileup line can be obtained; read alignments
+		*_n_plp = 0;
+		if (iter->is_eof) return 0;
+        int ret;
+		while ( (ret=iter->func(iter->data, iter->b)) >= 0) {
+			if (bam_plp_push(iter, iter->b) < 0) {
+				*_n_plp = -1;
+				return 0;
+			}
+			if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
+			// otherwise no pileup line can be returned; read the next alignment.
+		}
+        if ( ret < -1 ) { iter->error = ret; *_n_plp = -1; return 0; }
+		bam_plp_push(iter, 0);
+		if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
+		return 0;
+	}
+}
+
+void bam_plp_reset(bam_plp_t iter)
+{
+	lbnode_t *p, *q;
+	iter->max_tid = iter->max_pos = -1;
+	iter->tid = iter->pos = 0;
+	iter->is_eof = 0;
+	for (p = iter->head; p->next;) {
+        overlap_remove(iter, NULL);
+		q = p->next;
+		mp_free(iter->mp, p);
+		p = q;
+	}
+	iter->head = iter->tail;
+}
+
+void bam_plp_set_maxcnt(bam_plp_t iter, int maxcnt)
+{
+	iter->maxcnt = maxcnt;
+}
+
+/************************
+ *** Mpileup iterator ***
+ ************************/
+
+struct __bam_mplp_t {
+	int n;
+	uint64_t min, *pos;
+	bam_plp_t *iter;
+	int *n_plp;
+	const bam_pileup1_t **plp;
+};
+
+bam_mplp_t bam_mplp_init(int n, bam_plp_auto_f func, void **data)
+{
+	int i;
+	bam_mplp_t iter;
+	iter = (bam_mplp_t)calloc(1, sizeof(struct __bam_mplp_t));
+	iter->pos = (uint64_t*)calloc(n, 8);
+	iter->n_plp = (int*)calloc(n, sizeof(int));
+	iter->plp = (const bam_pileup1_t**)calloc(n, sizeof(bam_pileup1_t*));
+	iter->iter = (bam_plp_t*)calloc(n, sizeof(bam_plp_t));
+	iter->n = n;
+	iter->min = (uint64_t)-1;
+	for (i = 0; i < n; ++i) {
+		iter->iter[i] = bam_plp_init(func, data[i]);
+		iter->pos[i] = iter->min;
+	}
+	return iter;
+}
+
+void bam_mplp_init_overlaps(bam_mplp_t iter)
+{
+    int i;
+    for (i = 0; i < iter->n; ++i)
+        bam_plp_init_overlaps(iter->iter[i]);
+}
+
+void bam_mplp_set_maxcnt(bam_mplp_t iter, int maxcnt)
+{
+	int i;
+	for (i = 0; i < iter->n; ++i)
+		iter->iter[i]->maxcnt = maxcnt;
+}
+
+void bam_mplp_destroy(bam_mplp_t iter)
+{
+	int i;
+	for (i = 0; i < iter->n; ++i) bam_plp_destroy(iter->iter[i]);
+	free(iter->iter); free(iter->pos); free(iter->n_plp); free(iter->plp);
+	free(iter);
+}
+
+int bam_mplp_auto(bam_mplp_t iter, int *_tid, int *_pos, int *n_plp, const bam_pileup1_t **plp)
+{
+	int i, ret = 0;
+	uint64_t new_min = (uint64_t)-1;
+	for (i = 0; i < iter->n; ++i) {
+		if (iter->pos[i] == iter->min) {
+			int tid, pos;
+			iter->plp[i] = bam_plp_auto(iter->iter[i], &tid, &pos, &iter->n_plp[i]);
+            if ( iter->iter[i]->error ) return -1;
+			iter->pos[i] = iter->plp[i] ? (uint64_t)tid<<32 | pos : 0;
+		}
+		if (iter->plp[i] && iter->pos[i] < new_min) new_min = iter->pos[i];
+	}
+	iter->min = new_min;
+	if (new_min == (uint64_t)-1) return 0;
+	*_tid = new_min>>32; *_pos = (uint32_t)new_min;
+	for (i = 0; i < iter->n; ++i) {
+		if (iter->pos[i] == iter->min) { // FIXME: valgrind reports "uninitialised value(s) at this line"
+			n_plp[i] = iter->n_plp[i], plp[i] = iter->plp[i];
+			++ret;
+		} else n_plp[i] = 0, plp[i] = 0;
+	}
+	return ret;
+}
+
+#endif // ~!defined(BAM_NO_PILEUP)
diff --git a/htslib/synced_bcf_reader.c b/htslib/synced_bcf_reader.c
new file mode 100644
index 0000000..5fc9594
--- /dev/null
+++ b/htslib/synced_bcf_reader.c
@@ -0,0 +1,1183 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <errno.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include "htslib/synced_bcf_reader.h"
+#include "htslib/kseq.h"
+#include "htslib/khash_str2int.h"
+
+#define MAX_CSI_COOR 0x7fffffff     // maximum indexable coordinate of .csi
+
+typedef struct
+{
+    uint32_t start, end;
+}
+region1_t;
+
+typedef struct _region_t 
+{
+    region1_t *regs;
+    int nregs, mregs, creg;
+}
+region_t;
+
+static void _regions_add(bcf_sr_regions_t *reg, const char *chr, int start, int end);
+static bcf_sr_regions_t *_regions_init_string(const char *str);
+static int _regions_match_alleles(bcf_sr_regions_t *reg, int als_idx, bcf1_t *rec);
+
+static int *init_filters(bcf_hdr_t *hdr, const char *filters, int *nfilters)
+{
+    kstring_t str = {0,0,0};
+    const char *tmp = filters, *prev = filters;
+    int nout = 0, *out = NULL;
+    while ( 1 )
+    {
+        if ( *tmp==',' || !*tmp )
+        {
+            out = (int*) realloc(out, sizeof(int));
+            if ( tmp-prev==1 && *prev=='.' )
+                out[nout] = -1;
+            else
+            {
+                str.l = 0;
+                kputsn(prev, tmp-prev, &str);
+                out[nout] = bcf_hdr_id2int(hdr, BCF_DT_ID, str.s);
+            }
+            nout++;
+            if ( !*tmp ) break;
+            prev = tmp+1;
+        }
+        tmp++;
+    }
+    if ( str.m ) free(str.s);
+    *nfilters = nout;
+    return out;
+}
+
+int bcf_sr_set_regions(bcf_srs_t *readers, const char *regions, int is_file)
+{
+    assert( !readers->regions );
+    if ( readers->nreaders ) 
+    {
+        fprintf(stderr,"[%s:%d %s] Error: bcf_sr_set_regions() must be called before bcf_sr_add_reader()\n", __FILE__,__LINE__,__FUNCTION__);
+        return -1;
+    }
+    readers->regions = bcf_sr_regions_init(regions,is_file,0,1,-2);
+    if ( !readers->regions ) return -1;
+    readers->explicit_regs = 1;
+    readers->require_index = 1;
+    return 0;
+}
+int bcf_sr_set_targets(bcf_srs_t *readers, const char *targets, int is_file, int alleles)
+{
+    assert( !readers->targets );
+    readers->targets = bcf_sr_regions_init(targets,is_file,0,1,-2);
+    if ( !readers->targets ) return -1;
+    readers->targets_als = alleles;
+    return 0;
+}
+
+int bcf_sr_add_reader(bcf_srs_t *files, const char *fname)
+{
+    files->has_line = (int*) realloc(files->has_line, sizeof(int)*(files->nreaders+1));
+    files->has_line[files->nreaders] = 0;
+    files->readers  = (bcf_sr_t*) realloc(files->readers, sizeof(bcf_sr_t)*(files->nreaders+1));
+    bcf_sr_t *reader = &files->readers[files->nreaders++];
+    memset(reader,0,sizeof(bcf_sr_t));
+
+    reader->file = hts_open(fname, "r");
+    if ( !reader->file ) return 0;
+
+    reader->type = reader->file->is_bin? FT_BCF : FT_VCF;
+    if (reader->file->is_compressed) reader->type |= FT_GZ;
+
+    if ( files->require_index )
+    {
+        if ( reader->type==FT_VCF_GZ ) 
+        {
+            reader->tbx_idx = tbx_index_load(fname);
+            if ( !reader->tbx_idx )
+            {
+                fprintf(stderr,"[add_reader] Could not load the index of %s\n", fname);
+                return 0;
+            }
+
+            reader->header = bcf_hdr_read(reader->file);
+        }
+        else if ( reader->type==FT_BCF_GZ ) 
+        {
+            reader->header = bcf_hdr_read(reader->file);
+
+            reader->bcf_idx = bcf_index_load(fname);
+            if ( !reader->bcf_idx ) 
+            {
+                fprintf(stderr,"[add_reader] Could not load the index of %s\n", fname);
+                return 0;   // not indexed..?
+            }
+        }
+        else
+        {
+            fprintf(stderr,"Index required, expected .vcf.gz or .bcf file: %s\n", fname);
+            return 0;
+        }
+    }
+    else 
+    {
+        if ( reader->type & FT_BCF )
+        {
+            reader->header = bcf_hdr_read(reader->file);
+        }
+        else if ( reader->type & FT_VCF )
+        {
+            reader->header = bcf_hdr_read(reader->file);
+        }
+        else
+        {
+            fprintf(stderr,"File type not recognised: %s\n", fname);
+            return 0;
+        }
+        files->streaming = 1;
+    }
+    if ( files->streaming && files->nreaders>1 )
+    {
+        fprintf(stderr,"[%s:%d %s] Error: %d readers, yet require_index not set\n", __FILE__,__LINE__,__FUNCTION__,files->nreaders);
+        return 0;
+    }
+    if ( files->streaming && files->regions )
+    {
+        fprintf(stderr,"[%s:%d %s] Error: cannot tabix-jump in streaming mode\n", __FILE__,__LINE__,__FUNCTION__);
+        return 0;
+    }
+    if ( !reader->header ) return 0;
+
+    reader->fname = fname;
+    if ( files->apply_filters )
+        reader->filter_ids = init_filters(reader->header, files->apply_filters, &reader->nfilter_ids);
+
+    // Update list of chromosomes
+    if ( !files->explicit_regs && !files->streaming )
+    {
+        int n,i;
+        const char **names = reader->tbx_idx ? tbx_seqnames(reader->tbx_idx, &n) : bcf_hdr_seqnames(reader->header, &n);
+        for (i=0; i<n; i++)
+        {
+            if ( !files->regions )
+                files->regions = _regions_init_string(names[i]);
+            else
+                _regions_add(files->regions, names[i], -1, -1);
+        }
+        free(names);
+    }
+
+    return 1;
+}
+
+bcf_srs_t *bcf_sr_init(void)
+{
+    bcf_srs_t *files = (bcf_srs_t*) calloc(1,sizeof(bcf_srs_t));
+    return files;
+}
+
+static void bcf_sr_destroy1(bcf_sr_t *reader)
+{
+    if ( reader->tbx_idx ) tbx_destroy(reader->tbx_idx);
+    if ( reader->bcf_idx ) hts_idx_destroy(reader->bcf_idx);
+    bcf_hdr_destroy(reader->header);
+    hts_close(reader->file);
+    if ( reader->itr ) tbx_itr_destroy(reader->itr);
+    int j;
+    for (j=0; j<reader->mbuffer; j++)
+        bcf_destroy1(reader->buffer[j]);
+    free(reader->buffer);
+    free(reader->samples);
+    free(reader->filter_ids);
+}
+void bcf_sr_destroy(bcf_srs_t *files)
+{
+    int i;
+    for (i=0; i<files->nreaders; i++)
+        bcf_sr_destroy1(&files->readers[i]);
+    free(files->has_line);
+    free(files->readers);
+    for (i=0; i<files->n_smpl; i++) free(files->samples[i]);
+    free(files->samples);
+    if (files->targets) bcf_sr_regions_destroy(files->targets);
+    if (files->regions) bcf_sr_regions_destroy(files->regions);
+    if ( files->tmps.m ) free(files->tmps.s);
+    free(files);
+}
+
+void bcf_sr_remove_reader(bcf_srs_t *files, int i)
+{
+    assert( !files->samples );  // not ready for this yet
+    bcf_sr_destroy1(&files->readers[i]);
+    if ( i+1 < files->nreaders ) 
+    {
+        memmove(&files->readers[i], &files->readers[i+1], (files->nreaders-i-1)*sizeof(bcf_sr_t));
+        memmove(&files->has_line[i], &files->has_line[i+1], (files->nreaders-i-1)*sizeof(int));
+    }
+    files->nreaders--;
+}
+
+
+/*
+   Removes duplicate records from the buffer. The meaning of "duplicate" is
+   controlled by the $collapse variable, which can cause that from multiple
+   <indel|snp|any> lines only the first is considered and the rest is ignored.
+   The removal is done by setting the redundant lines' positions to -1 and
+   moving these lines at the end of the buffer.
+ */
+static void collapse_buffer(bcf_srs_t *files, bcf_sr_t *reader)
+{
+    int irec,jrec, has_snp=0, has_indel=0, has_any=0;
+    for (irec=1; irec<=reader->nbuffer; irec++)
+    {
+        bcf1_t *line = reader->buffer[irec];
+        if ( line->pos != reader->buffer[1]->pos ) break;
+        if ( files->collapse&COLLAPSE_ANY )
+        {
+            if ( !has_any ) has_any = 1;
+            else line->pos = -1;
+        }
+        int line_type = bcf_get_variant_types(line);
+        if ( files->collapse&COLLAPSE_SNPS && line_type&(VCF_SNP|VCF_MNP) )
+        {
+            if ( !has_snp ) has_snp = 1;
+            else line->pos = -1;
+        }
+        if ( files->collapse&COLLAPSE_INDELS && line_type&VCF_INDEL )
+        {
+            if ( !has_indel ) has_indel = 1;
+            else line->pos = -1;
+        }
+    }
+    bcf1_t *tmp;
+    irec = jrec = 1;
+    while ( irec<=reader->nbuffer && jrec<=reader->nbuffer )
+    {
+        if ( reader->buffer[irec]->pos != -1 ) { irec++; continue; }
+        if ( jrec<=irec ) jrec = irec+1;
+        while ( jrec<=reader->nbuffer && reader->buffer[jrec]->pos==-1 ) jrec++;
+        if ( jrec<=reader->nbuffer )
+        {
+            tmp = reader->buffer[irec]; reader->buffer[irec] = reader->buffer[jrec]; reader->buffer[jrec] = tmp;
+        }
+    }
+    reader->nbuffer = irec - 1;
+}
+
+void debug_buffer(FILE *fp, bcf_sr_t *reader)
+{
+    int j;
+    for (j=0; j<=reader->nbuffer; j++)
+    {
+        bcf1_t *line = reader->buffer[j];
+        fprintf(fp,"%s%s\t%s:%d\t%s ", reader->fname,j==0?"*":"",reader->header->id[BCF_DT_CTG][line->rid].key,line->pos+1,line->n_allele?line->d.allele[0]:"");
+        int k;
+        for (k=1; k<line->n_allele; k++) fprintf(fp," %s", line->d.allele[k]);
+        fprintf(fp,"\n");
+    }
+}
+
+void debug_buffers(FILE *fp, bcf_srs_t *files)
+{
+    int i;
+    for (i=0; i<files->nreaders; i++)
+    {
+        fprintf(fp, "has_line: %d\t%s\n", bcf_sr_has_line(files,i),files->readers[i].fname);
+        debug_buffer(fp, &files->readers[i]);
+    }
+    fprintf(fp,"\n");
+}
+
+static inline int has_filter(bcf_sr_t *reader, bcf1_t *line)
+{
+    int i, j;
+    if ( !line->d.n_flt )
+    {
+        for (j=0; j<reader->nfilter_ids; j++)
+            if ( reader->filter_ids[j]<0 ) return 1;
+        return 0;
+    }
+    for (i=0; i<line->d.n_flt; i++)
+    {
+        for (j=0; j<reader->nfilter_ids; j++)
+            if ( line->d.flt[i]==reader->filter_ids[j] ) return 1;
+    }
+    return 0;
+}
+
+static int _reader_seek(bcf_sr_t *reader, const char *seq, int start, int end)
+{
+    if ( end>=MAX_CSI_COOR )
+    {
+        fprintf(stderr,"The coordinate is out of csi index limit: %d\n", end+1);
+        exit(1);
+    }
+    if ( reader->itr ) 
+    {
+        hts_itr_destroy(reader->itr); 
+        reader->itr = NULL; 
+    }
+    reader->nbuffer = 0;
+    if ( reader->tbx_idx )
+    {
+        int tid = tbx_name2id(reader->tbx_idx, seq);
+        if ( tid==-1 ) return -1;    // the sequence not present in this file
+        reader->itr = tbx_itr_queryi(reader->tbx_idx,tid,start,end+1);
+    }
+    else
+    {
+        int tid = bcf_hdr_name2id(reader->header, seq);
+        if ( tid==-1 ) return -1;    // the sequence not present in this file
+        reader->itr = bcf_itr_queryi(reader->bcf_idx,tid,start,end+1);
+    }
+    assert(reader->itr);
+    return 0;
+}
+
+/*
+ *  _readers_next_region() - jumps to next region if necessary
+ *  Returns 0 on success or -1 when there are no more regions left
+ */
+static int _readers_next_region(bcf_srs_t *files)
+{
+    // Need to open new chromosome? Check number of lines in all readers' buffers
+    int i, eos = 0;
+    for (i=0; i<files->nreaders; i++)
+        if ( !files->readers[i].itr && !files->readers[i].nbuffer ) eos++;
+
+    if ( eos!=files->nreaders )
+    {
+        // Some of the readers still has buffered lines
+        return 0;
+    }
+
+    // No lines in the buffer, need to open new region or quit
+    if ( bcf_sr_regions_next(files->regions)<0 ) return -1;
+
+    for (i=0; i<files->nreaders; i++)
+        _reader_seek(&files->readers[i],files->regions->seq_names[files->regions->iseq],files->regions->start,files->regions->end);
+
+    return 0;
+}
+
+/*
+ *  _reader_fill_buffer() - buffers all records with the same coordinate
+ */
+static void _reader_fill_buffer(bcf_srs_t *files, bcf_sr_t *reader)
+{
+    // Return if the buffer is full: the coordinate of the last buffered record differs
+    if ( reader->nbuffer && reader->buffer[reader->nbuffer]->pos != reader->buffer[1]->pos ) return;
+
+    // No iterator (sequence not present in this file) and not streaming
+    if ( !reader->itr && !files->streaming ) return;
+
+    // Fill the buffer with records starting at the same position
+    int i, ret = 0;
+    while (1)
+    {
+        if ( reader->nbuffer+1 >= reader->mbuffer ) 
+        {
+            // Increase buffer size
+            reader->mbuffer += 8;
+            reader->buffer = (bcf1_t**) realloc(reader->buffer, sizeof(bcf1_t*)*reader->mbuffer);
+            for (i=8; i>0; i--)     // initialize
+            {
+                reader->buffer[reader->mbuffer-i] = bcf_init1();
+                reader->buffer[reader->mbuffer-i]->max_unpack = files->max_unpack;
+                reader->buffer[reader->mbuffer-i]->pos = -1;    // for rare cases when VCF starts from 1
+            }
+        }
+        if ( files->streaming )
+        {
+            if ( reader->type & FT_VCF )
+            {
+                if ( (ret=hts_getline(reader->file, KS_SEP_LINE, &files->tmps)) < 0 ) break;   // no more lines
+                int ret = vcf_parse1(&files->tmps, reader->header, reader->buffer[reader->nbuffer+1]);
+                if ( ret<0 ) break;
+            }
+            else if ( reader->type & FT_BCF )
+            {
+                if ( (ret=bcf_read1(reader->file, reader->header, reader->buffer[reader->nbuffer+1])) < 0 ) break; // no more lines
+            }
+            else
+            {
+                fprintf(stderr,"[%s:%d %s] fixme: not ready for this\n", __FILE__,__LINE__,__FUNCTION__);
+                exit(1);
+            }
+        }
+        else if ( reader->tbx_idx )
+        {
+            if ( (ret=tbx_itr_next(reader->file, reader->tbx_idx, reader->itr, &files->tmps)) < 0 ) break;  // no more lines
+            vcf_parse1(&files->tmps, reader->header, reader->buffer[reader->nbuffer+1]);
+        }
+        else
+        {
+            if ( (ret=bcf_itr_next(reader->file, reader->itr, reader->buffer[reader->nbuffer+1])) < 0 ) break; // no more lines
+            bcf_subset_format(reader->header,reader->buffer[reader->nbuffer+1]);
+        }
+
+        // apply filter
+        if ( !reader->nfilter_ids )
+            bcf_unpack(reader->buffer[reader->nbuffer+1], BCF_UN_STR);
+        else
+        {
+            bcf_unpack(reader->buffer[reader->nbuffer+1], BCF_UN_STR|BCF_UN_FLT);
+            if ( !has_filter(reader, reader->buffer[reader->nbuffer+1]) ) continue;
+        }
+        reader->nbuffer++;
+
+        if ( reader->buffer[reader->nbuffer]->pos != reader->buffer[1]->pos ) break;    // the buffer is full
+    }
+    if ( ret<0 ) 
+    { 
+        // done for this region
+        tbx_itr_destroy(reader->itr);
+        reader->itr = NULL; 
+    }
+    if ( files->collapse && reader->nbuffer>=2 && reader->buffer[1]->pos==reader->buffer[2]->pos )
+        collapse_buffer(files, reader);
+}
+
+/*
+ *  _readers_shift_buffer() - removes the first line and all subsequent lines with the same position
+ */
+static void _reader_shift_buffer(bcf_sr_t *reader)
+{
+    int i;
+    for (i=2; i<=reader->nbuffer; i++)
+        if ( reader->buffer[i]->pos!=reader->buffer[1]->pos ) break;
+    if ( i<=reader->nbuffer )
+    {
+        // A record with a different position follows, swap it. Because of the reader's logic,
+        // only one such line can be present.
+        bcf1_t *tmp = reader->buffer[1]; reader->buffer[1] = reader->buffer[i]; reader->buffer[i] = tmp;
+        reader->nbuffer = 1;
+    }
+    else 
+        reader->nbuffer = 0;    // no other line
+}
+
+/*
+ *  _reader_match_alleles() - from multiple buffered lines selects the one which
+ *  corresponds best to the template line. The logic is controlled by COLLAPSE_*
+ *  Returns 0 on success or -1 when no good matching line is found.
+ */
+static int _reader_match_alleles(bcf_srs_t *files, bcf_sr_t *reader, bcf1_t *tmpl)
+{
+    int i, irec = -1;
+
+    // if no template given, use the first available record
+    if ( !tmpl )
+        irec = 1;
+    else
+    {
+        int tmpl_type = bcf_get_variant_types(tmpl);
+        for (i=1; i<=reader->nbuffer; i++)
+        {
+            bcf1_t *line = reader->buffer[i];
+            if ( line->pos != reader->buffer[1]->pos ) break;  // done with this reader
+
+            // Easiest case: matching by position only
+            if ( files->collapse&COLLAPSE_ANY ) { irec=i; break; }
+
+            int line_type = bcf_get_variant_types(line);
+
+            // No matter what the alleles are, as long as they are both SNPs
+            if ( files->collapse&COLLAPSE_SNPS && tmpl_type&VCF_SNP && line_type&VCF_SNP ) { irec=i; break; }
+            // ... or indels
+            if ( files->collapse&COLLAPSE_INDELS && tmpl_type&VCF_INDEL && line_type&VCF_INDEL ) { irec=i; break; }
+
+            // More thorough checking: REFs must match
+            if ( tmpl->rlen != line->rlen ) continue;  // different length
+            if ( strcmp(tmpl->d.allele[0], line->d.allele[0]) ) continue; // the strings do not match
+
+            int ial,jal;
+            if ( files->collapse==COLLAPSE_NONE )
+            {
+                // Exact match, all alleles must be identical
+                if ( tmpl->n_allele!=line->n_allele ) continue;   // different number of alleles, skip
+
+                int nmatch = 1; // REF has been already checked
+                for (ial=1; ial<tmpl->n_allele; ial++)
+                {
+                    for (jal=1; jal<line->n_allele; jal++)
+                        if ( !strcmp(tmpl->d.allele[ial], line->d.allele[jal]) ) { nmatch++; break; }
+                }
+                if ( nmatch==tmpl->n_allele ) { irec=i; break; }    // found: exact match
+                continue;
+            }
+            
+            // COLLAPSE_SOME: at least some ALTs must match
+            for (ial=1; ial<tmpl->n_allele; ial++)
+            {
+                for (jal=1; jal<line->n_allele; jal++)
+                    if ( !strcmp(tmpl->d.allele[ial], line->d.allele[jal]) ) { irec=i; break; }
+                if ( irec>=1 ) break;
+            }
+            if ( irec>=1 ) break;
+        }
+        if ( irec==-1 ) return -1;  // no matching line was found
+    }
+
+    // Set the selected line (irec) as active: set it to buffer[0], move the remaining lines forward
+    // and put the old bcf1_t record at the end.
+    bcf1_t *tmp = reader->buffer[0];
+    reader->buffer[0] = reader->buffer[irec];
+    for (i=irec+1; i<=reader->nbuffer; i++) reader->buffer[i-1] = reader->buffer[i];
+    reader->buffer[ reader->nbuffer ] = tmp;
+    reader->nbuffer--;
+
+    return 0;
+}
+
+int _reader_next_line(bcf_srs_t *files)
+{
+    int i, min_pos = INT_MAX;
+
+    // Loop until next suitable line is found or all readers have finished
+    while ( 1 )
+    {
+        // Get all readers ready for the next region.
+        if ( files->regions && _readers_next_region(files)<0 ) break;
+
+        // Fill buffers
+        const char *chr = NULL;
+        for (i=0; i<files->nreaders; i++)
+        {
+            _reader_fill_buffer(files, &files->readers[i]);
+
+            // Update the minimum coordinate
+            if ( !files->readers[i].nbuffer ) continue;
+            if ( min_pos > files->readers[i].buffer[1]->pos ) 
+            {
+                min_pos = files->readers[i].buffer[1]->pos; 
+                chr = bcf_seqname(files->readers[i].header, files->readers[i].buffer[1]);
+            }
+        }
+        if ( min_pos==INT_MAX ) 
+        {
+            if ( !files->regions ) break;
+            continue;
+        }
+
+        // Skip this position if not present in targets
+        if ( files->targets )
+        {
+            if ( bcf_sr_regions_overlap(files->targets, chr, min_pos, min_pos)<0 ) 
+            {
+                // Remove all lines with this position from the buffer
+                for (i=0; i<files->nreaders; i++)
+                    if ( files->readers[i].nbuffer && files->readers[i].buffer[1]->pos==min_pos ) 
+                        _reader_shift_buffer(&files->readers[i]);
+                min_pos = INT_MAX;
+                continue;
+            }
+        }
+        
+        break;  // done: min_pos is set 
+    }
+
+    // There can be records with duplicate positions. Set the active line intelligently so that
+    // the alleles match.
+    int nret = 0;   // number of readers sharing the position
+    bcf1_t *first = NULL;   // record which will be used for allele matching
+    for (i=0; i<files->nreaders; i++)
+    {
+        files->has_line[i] = 0;
+        
+        // Skip readers with no records at this position
+        if ( !files->readers[i].nbuffer || files->readers[i].buffer[1]->pos!=min_pos ) continue;
+
+        // Until now buffer[0] of all reader was empty and the lines started at buffer[1].
+        // Now lines which are ready to be output will be moved to buffer[0].
+        if ( _reader_match_alleles(files, &files->readers[i], first) < 0 ) continue;
+        if ( !first ) first = files->readers[i].buffer[0];
+
+        nret++;
+        files->has_line[i] = 1;
+    }
+    return nret;
+}
+
+int bcf_sr_next_line(bcf_srs_t *files)
+{
+    if ( !files->targets_als ) 
+        return _reader_next_line(files);
+
+    while (1)
+    {
+        int i, ret = _reader_next_line(files);
+        if ( !ret ) return ret;
+        
+        for (i=0; i<files->nreaders; i++)
+            if ( files->has_line[i] ) break;
+
+        if ( _regions_match_alleles(files->targets, files->targets_als-1, files->readers[i].buffer[0]) ) return ret;
+        
+        // Check if there are more duplicate lines in the buffers. If not, return this line as if it
+        // matched the targets, even if there is a type mismatch
+        for (i=0; i<files->nreaders; i++)
+        {
+            if ( !files->has_line[i] ) continue;
+            if ( files->readers[i].nbuffer==0 || files->readers[i].buffer[1]->pos!=files->readers[i].buffer[0]->pos ) continue;
+            break;
+        }
+        if ( i==files->nreaders ) return ret;   // no more lines left, output even if target alleles are not of the same type
+    }
+}
+
+static void bcf_sr_seek_start(bcf_srs_t *readers)
+{
+    bcf_sr_regions_t *reg = readers->regions;
+    int i;
+    for (i=0; i<reg->nseqs; i++)
+        reg->regs[i].creg = -1;
+    reg->iseq = 0;
+}
+
+
+int bcf_sr_seek(bcf_srs_t *readers, const char *seq, int pos)
+{
+    if ( !seq && !pos ) 
+    {
+        // seek to start
+        bcf_sr_seek_start(readers);
+        return 0;
+    }
+
+    bcf_sr_regions_overlap(readers->regions, seq, pos, pos);
+    int i, nret = 0;
+    for (i=0; i<readers->nreaders; i++) 
+    {
+        nret += _reader_seek(&readers->readers[i],seq,pos,MAX_CSI_COOR-1);
+    }
+    return nret;
+}
+
+int bcf_sr_set_samples(bcf_srs_t *files, const char *fname, int is_file)
+{
+    int i, j, nsmpl, free_smpl = 0;
+    char **smpl = NULL;
+    
+    void *exclude = (fname[0]=='^') ? khash_str2int_init() : NULL;
+    if ( exclude || strcmp("-",fname) ) // "-" stands for all samples
+    {
+        smpl = hts_readlist(fname, is_file, &nsmpl);
+        if ( !smpl ) 
+        {
+            fprintf(stderr,"Could not read the file: \"%s\"\n", fname);
+            return 0;
+        }
+        if ( exclude )
+        {
+            for (i=0; i<nsmpl; i++)
+                khash_str2int_inc(exclude, smpl[i]);
+        }
+        free_smpl = 1;
+    }
+    if ( !smpl )
+    {
+        smpl  = files->readers[0].header->samples;   // intersection of all samples
+        nsmpl = bcf_hdr_nsamples(files->readers[0].header);
+    }
+
+    files->samples = NULL;
+    files->n_smpl  = 0;
+    for (i=0; i<nsmpl; i++)
+    {
+        if ( exclude && khash_str2int_has_key(exclude,smpl[i])  ) continue;
+
+        int n_isec = 0;
+        for (j=0; j<files->nreaders; j++)
+        {
+            if ( bcf_hdr_id2int(files->readers[j].header, BCF_DT_SAMPLE, smpl[i])<0 ) break;
+            n_isec++;
+        }
+        if ( n_isec!=files->nreaders )
+        {
+            fprintf(stderr,"Warning: The sample \"%s\" was not found in %s, skipping\n", smpl[i], files->readers[n_isec].fname);
+            continue;
+        }
+
+        files->samples = (char**) realloc(files->samples, (files->n_smpl+1)*sizeof(const char*));
+        files->samples[files->n_smpl++] = strdup(smpl[i]);
+    }
+
+    if ( exclude ) khash_str2int_destroy(exclude);
+    if ( free_smpl ) 
+    {
+        for (i=0; i<nsmpl; i++) free(smpl[i]);
+        free(smpl);
+    }
+
+    if ( !files->n_smpl ) 
+    {
+        if ( files->nreaders>1 ) 
+            fprintf(stderr,"No samples in common.\n");
+        return 0;
+    }
+    for (i=0; i<files->nreaders; i++)
+    {
+        bcf_sr_t *reader = &files->readers[i];
+        reader->samples  = (int*) malloc(sizeof(int)*files->n_smpl);
+        reader->n_smpl   = files->n_smpl;
+        for (j=0; j<files->n_smpl; j++)
+            reader->samples[j] = bcf_hdr_id2int(reader->header, BCF_DT_SAMPLE, files->samples[j]);
+    }
+    return 1;
+}
+
+// Add a new region into a list sorted by start,end. On input the coordinates
+// are 1-based, stored 0-based, inclusive.
+static void _regions_add(bcf_sr_regions_t *reg, const char *chr, int start, int end)
+{
+    if ( start==-1 && end==-1 )
+    {
+        start = 0; end = MAX_CSI_COOR-1;
+    }
+    else
+    {
+        start--; end--; // store 0-based coordinates
+    }
+
+    if ( !reg->seq_hash )
+         reg->seq_hash = khash_str2int_init();
+
+    int iseq;
+    if ( khash_str2int_get(reg->seq_hash, chr, &iseq)<0 )
+    {
+        // the chromosome block does not exist
+        iseq = reg->nseqs++;
+        reg->seq_names = (char**) realloc(reg->seq_names,sizeof(char*)*reg->nseqs);
+        reg->regs = (region_t*) realloc(reg->regs,sizeof(region_t)*reg->nseqs);
+        memset(&reg->regs[reg->nseqs-1],0,sizeof(region_t));
+        reg->seq_names[iseq] = strdup(chr);
+        reg->regs[iseq].creg = -1;
+        khash_str2int_set(reg->seq_hash,reg->seq_names[iseq],iseq);
+    }
+
+    region_t *creg = &reg->regs[iseq];
+
+    // the regions may not be sorted on input: binary search
+    int i, min = 0, max = creg->nregs - 1;
+    while ( min<=max )
+    {
+        i = (max+min)/2;
+        if ( start < creg->regs[i].start ) max = i - 1;
+        else if ( start > creg->regs[i].start ) min = i + 1;
+        else break;
+    }
+    if ( min>max || creg->regs[i].start!=start || creg->regs[i].end!=end )
+    {
+        // no such region, insert a new one just after max
+        hts_expand(region1_t,creg->nregs+1,creg->mregs,creg->regs);
+        if ( ++max < creg->nregs )
+            memmove(&creg->regs[max+1],&creg->regs[max],(creg->nregs - max)*sizeof(region1_t));
+        creg->regs[max].start = start;
+        creg->regs[max].end   = end;
+        creg->nregs++;
+    }
+}
+
+// File name or a list of genomic locations. If file name, NULL is returned.
+static bcf_sr_regions_t *_regions_init_string(const char *str)
+{
+    bcf_sr_regions_t *reg = (bcf_sr_regions_t *) calloc(1, sizeof(bcf_sr_regions_t));
+    reg->start = reg->end = -1;
+    reg->prev_start = reg->prev_seq = -1;
+
+    kstring_t tmp = {0,0,0};
+    const char *sp = str, *ep = str;
+    int from, to;
+    while ( 1 )
+    {
+        while ( *ep && *ep!=',' && *ep!=':' ) ep++;
+        tmp.l = 0;
+        kputsn(sp,ep-sp,&tmp);
+        if ( *ep==':' )
+        {
+            sp = ep+1;
+            from = strtol(sp,(char**)&ep,10);
+            if ( sp==ep )
+            {
+                fprintf(stderr,"[%s:%d %s] Could not parse the region(s): %s\n", __FILE__,__LINE__,__FUNCTION__,str);
+                free(reg); free(tmp.s); return NULL;
+            }
+            if ( !*ep || *ep==',' )
+            {
+                _regions_add(reg, tmp.s, from, from);
+                sp = ep;
+                continue;
+            }
+            if ( *ep!='-' )
+            {
+                fprintf(stderr,"[%s:%d %s] Could not parse the region(s): %s\n", __FILE__,__LINE__,__FUNCTION__,str);
+                free(reg); free(tmp.s); return NULL;
+            }
+            ep++;
+            sp = ep;
+            to = strtol(sp,(char**)&ep,10);
+            if ( *ep && *ep!=',' )
+            {
+                fprintf(stderr,"[%s:%d %s] Could not parse the region(s): %s\n", __FILE__,__LINE__,__FUNCTION__,str);
+                free(reg); free(tmp.s); return NULL;
+            }
+            if ( sp==ep ) to = MAX_CSI_COOR-1;
+            _regions_add(reg, tmp.s, from, to);
+            if ( !*ep ) break;
+            sp = ep;
+        }
+        else
+        {
+            if ( tmp.l ) _regions_add(reg, tmp.s, -1, -1);
+            if ( !*ep ) break;
+            sp = ++ep;
+        }
+    }
+    free(tmp.s);
+    return reg;
+}
+
+// ichr,ifrom,ito are 0-based;
+// returns -1 on error, 0 if the line is a comment line, 1 on success
+static int _regions_parse_line(char *line, int ichr,int ifrom,int ito, char **chr,char **chr_end,int *from,int *to)
+{
+    *chr_end = NULL;
+
+    if ( line[0]=='#' ) return 0;
+
+    int k,l;    // index of the start and end column of the tab-delimited file
+    if ( ifrom <= ito ) 
+        k = ifrom, l = ito;
+    else 
+        l = ifrom, k = ito;
+
+    int i;
+    char *se = line, *ss = NULL; // start and end 
+    char *tmp;
+    for (i=0; i<=k && *se; i++)
+    {
+        ss = i==0 ? se++ : ++se;
+        while (*se && *se!='\t') se++;
+    }
+    if ( i<=k ) return -1;
+    if ( k==l )
+    {
+        *from = *to = strtol(ss, &tmp, 10);
+        if ( tmp==ss ) return -1;
+    }
+    else
+    {
+        if ( k==ifrom ) 
+            *from = strtol(ss, &tmp, 10);
+        else
+            *to = strtol(ss, &tmp, 10);
+        if ( ss==tmp ) return -1;
+
+        for (i=k; i<l && *se; i++)
+        {
+            ss = ++se;
+            while (*se && *se!='\t') se++;
+        }
+        if ( i<l ) return -1;
+        if ( k==ifrom ) 
+            *to = strtol(ss, &tmp, 10);
+        else
+            *from = strtol(ss, &tmp, 10);
+        if ( ss==tmp ) return -1;
+    }
+
+    ss = se = line;
+    for (i=0; i<=ichr && *se; i++)
+    {
+        if ( i>0 ) ss = ++se;
+        while (*se && *se!='\t') se++;
+    }
+    if ( i<=ichr ) return -1;
+    *chr_end = se;
+    *chr = ss;
+    return 1;
+}
+
+bcf_sr_regions_t *bcf_sr_regions_init(const char *regions, int is_file, int ichr, int ifrom, int ito)
+{
+    bcf_sr_regions_t *reg;
+    if ( !is_file ) return _regions_init_string(regions);
+
+    reg = (bcf_sr_regions_t *) calloc(1, sizeof(bcf_sr_regions_t));
+    reg->start = reg->end = -1;
+    reg->prev_start = reg->prev_seq = -1;
+
+    reg->file = hts_open(regions, "rb");
+    if ( !reg->file )
+    {
+        fprintf(stderr,"[%s:%d %s] Could not open file: %s\n", __FILE__,__LINE__,__FUNCTION__,regions);
+        free(reg);
+        return NULL;
+    }
+
+    reg->tbx = tbx_index_load(regions);
+    if ( !reg->tbx ) 
+    {
+        int len = strlen(regions);
+        int is_bed  = strcasecmp(".bed",regions+len-4) ? 0 : 1;
+        if ( !is_bed && !strcasecmp(".bed.gz",regions+len-7) ) is_bed = 1;
+        int ft_type = hts_file_type(regions);
+        if ( ft_type & FT_VCF ) ito = 1;
+
+        // read the whole file, tabix index is not present
+        while ( hts_getline(reg->file, KS_SEP_LINE, &reg->line) > 0 )
+        {
+            char *chr, *chr_end;
+            int from, to, ret;
+            ret = _regions_parse_line(reg->line.s, ichr,ifrom,abs(ito), &chr,&chr_end,&from,&to);
+            if ( ret < 0 ) 
+            {
+                if ( ito<0 )
+                    ret = _regions_parse_line(reg->line.s, ichr,ifrom,ifrom, &chr,&chr_end,&from,&to);
+                if ( ret<0 )
+                {
+                    fprintf(stderr,"[%s:%d] Could not parse the file %s, using the columns %d,%d[,%d]\n", __FILE__,__LINE__,regions,ichr+1,ifrom+1,ito+1);
+                    hts_close(reg->file); reg->file = NULL; free(reg); 
+                    return NULL;
+                }
+            }
+            if ( !ret ) continue;
+            if ( is_bed ) from++;
+            *chr_end = 0;
+            _regions_add(reg, chr, from, to);
+            *chr_end = '\t';
+        }
+        hts_close(reg->file); reg->file = NULL;
+        if ( !reg->nseqs ) { free(reg); return NULL; }
+        return reg;
+    }
+
+    reg->seq_names = (char**) tbx_seqnames(reg->tbx, &reg->nseqs);
+    if ( !reg->seq_hash )
+        reg->seq_hash = khash_str2int_init();
+    int i;
+    for (i=0; i<reg->nseqs; i++)
+    {
+        khash_str2int_set(reg->seq_hash,reg->seq_names[i],i);
+    }
+    reg->fname  = strdup(regions);
+    reg->is_bin = 1;
+    return reg;
+}
+
+void bcf_sr_regions_destroy(bcf_sr_regions_t *reg)
+{
+    int i;
+    free(reg->fname);
+    if ( reg->itr ) tbx_itr_destroy(reg->itr);
+    if ( reg->tbx ) tbx_destroy(reg->tbx);
+    if ( reg->file ) hts_close(reg->file);
+    if ( reg->als ) free(reg->als);
+    if ( reg->als_str.s ) free(reg->als_str.s);
+    free(reg->line.s);
+    if ( reg->regs ) 
+    {
+         // free only in-memory names, tbx names are const
+        for (i=0; i<reg->nseqs; i++) 
+        {   
+            free(reg->seq_names[i]);
+            free(reg->regs[i].regs);
+        }
+    }
+    free(reg->regs);
+    free(reg->seq_names);
+    khash_str2int_destroy(reg->seq_hash);
+    free(reg);
+}
+
+int bcf_sr_regions_seek(bcf_sr_regions_t *reg, const char *seq)
+{
+    reg->iseq = reg->start = reg->end = -1;
+    if ( khash_str2int_get(reg->seq_hash, seq, &reg->iseq) < 0 ) return -1;  // sequence seq not in regions
+
+    // using in-memory regions
+    if ( reg->regs ) return 0;
+
+    // reading regions from tabix
+    if ( reg->itr ) tbx_itr_destroy(reg->itr);
+    reg->itr = tbx_itr_querys(reg->tbx, seq);
+    if ( reg->itr ) return 0;
+
+    return -1;
+}
+
+int bcf_sr_regions_next(bcf_sr_regions_t *reg)
+{
+    if ( reg->iseq<0 ) return -1;
+    reg->start = reg->end = -1;
+    reg->nals = 0;
+
+    // using in-memory regions
+    if ( reg->regs )
+    {
+        while ( reg->iseq < reg->nseqs )
+        {
+            reg->regs[reg->iseq].creg++;
+            if ( reg->regs[reg->iseq].creg < reg->regs[reg->iseq].nregs ) break;
+            reg->iseq++;
+        }
+        if ( reg->iseq >= reg->nseqs ) { reg->iseq = -1; return -1; } // no more regions left
+        region1_t *creg = &reg->regs[reg->iseq].regs[reg->regs[reg->iseq].creg];
+        reg->start = creg->start;
+        reg->end   = creg->end;
+        return 0;
+    }
+
+    // reading from tabix
+    char *chr, *chr_end;
+    int ichr = 0, ifrom = 1, ito = 2, is_bed = 0, from, to;
+    if ( reg->tbx )
+    {
+        ichr   = reg->tbx->conf.sc-1;
+        ifrom  = reg->tbx->conf.bc-1;
+        ito    = reg->tbx->conf.ec-1;
+        if ( ito<0 ) ito = ifrom;
+        is_bed = reg->tbx->conf.preset==TBX_UCSC ? 1 : 0;
+    }
+
+    int ret = 0;
+    while ( !ret )
+    {
+        if ( reg->itr )
+        {
+            // tabix index present, reading a chromosome block
+            ret = tbx_itr_next(reg->file, reg->tbx, reg->itr, &reg->line);
+            if ( ret<0 ) { reg->iseq = -1; return -1; }
+        }
+        else
+        {
+            if ( reg->is_bin )
+            {
+                // Waited for seek which never came. Reopen in text mode and stream
+                // through the regions, otherwise hts_getline would fail
+                hts_close(reg->file);
+                reg->file = hts_open(reg->fname, "r");
+                if ( !reg->file )
+                {
+                    fprintf(stderr,"[%s:%d %s] Could not open file: %s\n", __FILE__,__LINE__,__FUNCTION__,reg->fname);
+                    reg->file = NULL;
+                    bcf_sr_regions_destroy(reg);
+                    return -1;
+                }
+                reg->is_bin = 0;
+            }
+
+            // tabix index absent, reading the whole file
+            ret = hts_getline(reg->file, KS_SEP_LINE, &reg->line);
+            if ( ret<0 ) { reg->iseq = -1; return -1; }
+        }
+        ret = _regions_parse_line(reg->line.s, ichr,ifrom,ito, &chr,&chr_end,&from,&to);
+        if ( ret<0 ) 
+        {
+            fprintf(stderr,"[%s:%d] Could not parse the file %s, using the columns %d,%d,%d\n", __FILE__,__LINE__,reg->fname,ichr+1,ifrom+1,ito+1);
+            return -1;
+        }
+    }
+    if ( is_bed ) from++;
+
+    *chr_end = 0;
+    if ( khash_str2int_get(reg->seq_hash, chr, &reg->iseq)<0 )
+    {
+        fprintf(stderr,"Broken tabix index? The sequence \"%s\" not in dictionary [%s]\n", chr,reg->line.s);
+        exit(1);
+    }
+    *chr_end = '\t';
+
+    reg->start = from - 1;
+    reg->end   = to - 1;
+    return 0;
+}
+
+static int _regions_match_alleles(bcf_sr_regions_t *reg, int als_idx, bcf1_t *rec)
+{
+    int i = 0, max_len = 0;
+    if ( !reg->nals )
+    {
+        char *ss = reg->line.s;
+        while ( i<als_idx && *ss )
+        {
+            if ( *ss=='\t' ) i++;
+            ss++;
+        }
+        char *se = ss;
+        reg->nals = 1;
+        while ( *se && *se!='\t' ) 
+        { 
+            if ( *se==',' ) reg->nals++;
+            se++; 
+        }
+        ks_resize(&reg->als_str, se-ss+1+reg->nals);
+        reg->als_str.l = 0;
+        hts_expand(char*,reg->nals,reg->mals,reg->als);
+        reg->nals = 0;
+
+        se = ss;
+        while ( *(++se) )
+        {
+            if ( *se=='\t' ) break;
+            if ( *se!=',' ) continue;
+            reg->als[reg->nals] = &reg->als_str.s[reg->als_str.l];
+            kputsn(ss,se-ss,&reg->als_str);
+            if ( &reg->als_str.s[reg->als_str.l] - reg->als[reg->nals] > max_len ) max_len = &reg->als_str.s[reg->als_str.l] - reg->als[reg->nals];
+            reg->als_str.l++;
+            reg->nals++;
+            ss = ++se;
+        }
+        reg->als[reg->nals] = &reg->als_str.s[reg->als_str.l];
+        kputsn(ss,se-ss,&reg->als_str);
+        if ( &reg->als_str.s[reg->als_str.l] - reg->als[reg->nals] > max_len ) max_len = &reg->als_str.s[reg->als_str.l] - reg->als[reg->nals];
+        reg->nals++;
+        reg->als_type = max_len > 1 ? VCF_INDEL : VCF_SNP;  // this is a simplified check, see vcf.c:bcf_set_variant_types
+    }
+    int type = bcf_get_variant_types(rec);
+    if ( reg->als_type & VCF_INDEL )
+        return type & VCF_INDEL ? 1 : 0;
+    return !(type & VCF_INDEL) ? 1 : 0;
+}
+
+int bcf_sr_regions_overlap(bcf_sr_regions_t *reg, const char *seq, int start, int end)
+{
+    int iseq;
+    if ( khash_str2int_get(reg->seq_hash, seq, &iseq)<0 ) return -1;    // no such sequence
+
+    if ( reg->prev_seq==-1 || iseq!=reg->prev_seq || reg->prev_start > start ) // new chromosome or after a seek
+    {
+        // flush regions left on previous chromosome
+        if ( reg->missed_reg_handler && reg->prev_seq!=-1 && reg->iseq!=-1 )
+            bcf_sr_regions_flush(reg);
+
+        bcf_sr_regions_seek(reg, seq);
+        reg->start = reg->end = -1;
+    }
+    if ( reg->prev_seq==iseq && reg->iseq!=iseq ) return -2;    // no more regions on this chromosome
+    reg->prev_seq = reg->iseq;
+    reg->prev_start = start;
+
+    while ( iseq==reg->iseq && reg->end < start )
+    {
+        if ( bcf_sr_regions_next(reg) < 0 ) return -2;  // no more regions left
+        if ( reg->iseq != iseq ) return -1; // does not overlap any regions
+        if ( reg->missed_reg_handler && reg->end < start ) reg->missed_reg_handler(reg, reg->missed_reg_data);
+    }
+    if ( reg->start <= end ) return 0;    // region overlap
+    return -1;  // no overlap
+}
+
+void bcf_sr_regions_flush(bcf_sr_regions_t *reg)
+{
+    if ( !reg->missed_reg_handler || reg->prev_seq==-1 ) return;
+    while ( !bcf_sr_regions_next(reg) ) reg->missed_reg_handler(reg, reg->missed_reg_data);
+    return;
+}
+
diff --git a/htslib/tabix.c b/htslib/tabix.c
new file mode 100644
index 0000000..2a30fed
--- /dev/null
+++ b/htslib/tabix.c
@@ -0,0 +1,374 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <getopt.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include "htslib/tbx.h"
+#include "htslib/sam.h"
+#include "htslib/vcf.h"
+#include "htslib/kseq.h"
+#include "htslib/bgzf.h"
+#include "htslib/hts.h"
+
+typedef struct
+{
+    int min_shift;
+}
+args_t;
+
+static void error(const char *format, ...)
+{
+    va_list ap;
+    va_start(ap, format);
+    vfprintf(stderr, format, ap);
+    va_end(ap);
+    exit(EXIT_FAILURE);
+}
+
+
+#define IS_GFF (1<<0)
+#define IS_BED (1<<1)
+#define IS_SAM (1<<2)
+#define IS_VCF (1<<3)
+#define IS_BCF (1<<4)
+#define IS_BAM (1<<5)
+#define IS_TXT (IS_GFF|IS_BED|IS_SAM|IS_VCF)
+
+int file_type(const char *fname)
+{
+    int l = strlen(fname);
+    int strcasecmp(const char *s1, const char *s2);
+    if (l>=7 && strcasecmp(fname+l-7, ".gff.gz") == 0) return IS_GFF;
+    else if (l>=7 && strcasecmp(fname+l-7, ".bed.gz") == 0) return IS_BED;
+    else if (l>=7 && strcasecmp(fname+l-7, ".sam.gz") == 0) return IS_SAM;
+    else if (l>=7 && strcasecmp(fname+l-7, ".vcf.gz") == 0) return IS_VCF;
+    else if (l>=4 && strcasecmp(fname+l-4, ".bcf") == 0) return IS_BCF;
+    else if (l>=4 && strcasecmp(fname+l-4, ".bam") == 0) return IS_BAM;
+    return 0;
+}
+
+#define PRINT_HEADER 1
+#define HEADER_ONLY  2
+static int query_regions(char **argv, int argc, int mode)
+{
+    char *fname = argv[0];
+    int i, ftype = file_type(fname);
+
+    if ( ftype & IS_TXT || !ftype )
+    {
+        htsFile *fp = hts_open(fname,"r");
+        if ( !fp ) error("Could not read %s\n", fname);
+        tbx_t *tbx = tbx_index_load(fname);
+        if ( !tbx ) error("Could not load .tbi index of %s\n", fname);
+        kstring_t str = {0,0,0};
+        if ( mode )
+        {
+            while ( hts_getline(fp, KS_SEP_LINE, &str) >= 0 )
+            {
+                if ( !str.l || str.s[0]!=tbx->conf.meta_char ) break;
+                puts(str.s);
+            }
+        }
+        if ( mode!=HEADER_ONLY )
+        {
+            for (i=1; i<argc; i++)
+            {
+                hts_itr_t *itr = tbx_itr_querys(tbx, argv[i]);
+                if ( !itr ) continue;
+                while (tbx_itr_next(fp, tbx, itr, &str) >= 0) puts(str.s);
+                tbx_itr_destroy(itr);
+            }
+        }
+        free(str.s);
+        if ( hts_close(fp) ) error("hts_close returned non-zero status: %s\n", fname);
+        tbx_destroy(tbx);
+    }
+    else if ( ftype==IS_BCF )   // output uncompressed VCF
+    {
+        htsFile *fp = hts_open(fname,"r");
+        if ( !fp ) error("Could not read %s\n", fname);
+        htsFile *out = hts_open("-","w"); 
+        if ( !out ) error("Could not open stdout\n", fname);
+        hts_idx_t *idx = bcf_index_load(fname);
+        if ( !idx ) error("Could not load .csi index of %s\n", fname);
+        bcf_hdr_t *hdr = bcf_hdr_read(fp);
+        if ( !hdr ) error("Could not read the header: %s\n", fname);
+        if ( mode )
+        {
+            bcf_hdr_write(out,hdr);
+        }
+        if ( mode!=HEADER_ONLY )
+        {
+            bcf1_t *rec = bcf_init();
+            for (i=1; i<argc; i++)
+            {
+                hts_itr_t *itr = bcf_itr_querys(idx,hdr,argv[i]);
+                if ( !itr ) continue;
+                while ( bcf_itr_next(fp, itr, rec) >=0 ) bcf_write(out,hdr,rec);
+                tbx_itr_destroy(itr);
+            }
+            bcf_destroy(rec);
+        }
+        if ( hts_close(fp) ) error("hts_close returned non-zero status: %s\n", fname);
+        if ( hts_close(out) ) error("hts_close returned non-zero status for stdout\n");
+        bcf_hdr_destroy(hdr);
+        hts_idx_destroy(idx);
+    }
+    else if ( ftype==IS_BAM )   // todo: BAM
+        error("Please use \"samtools view\" for querying BAM files.\n");
+    return 0;
+}
+static int query_chroms(char *fname)
+{
+    const char **seq;
+    int i, nseq, ftype = file_type(fname);
+    if ( ftype & IS_TXT || !ftype )
+    {
+        tbx_t *tbx = tbx_index_load(fname);
+        if ( !tbx ) error("Could not load .tbi index of %s\n", fname);
+        seq = tbx_seqnames(tbx, &nseq);
+        for (i=0; i<nseq; i++)
+            printf("%s\n", seq[i]);
+        free(seq);
+        tbx_destroy(tbx);
+    }
+    else if ( ftype==IS_BCF )
+    {
+        htsFile *fp = hts_open(fname,"r");
+        if ( !fp ) error("Could not read %s\n", fname);
+        bcf_hdr_t *hdr = bcf_hdr_read(fp);
+        if ( !hdr ) error("Could not read the header: %s\n", fname);
+        hts_close(fp);
+        hts_idx_t *idx = bcf_index_load(fname);
+        if ( !idx ) error("Could not load .csi index of %s\n", fname);
+        seq = bcf_index_seqnames(idx, hdr, &nseq);
+        for (i=0; i<nseq; i++) 
+            printf("%s\n", seq[i]);
+        free(seq);
+        bcf_hdr_destroy(hdr);
+        hts_idx_destroy(idx);
+    }
+    else if ( ftype==IS_BAM )   // todo: BAM
+        error("BAM: todo\n");
+    return 0;
+}
+
+int reheader_file(const char *fname, const char *header, int ftype, tbx_conf_t *conf)
+{
+    if ( ftype & IS_TXT || !ftype )
+    {
+        BGZF *fp = bgzf_open(fname,"r");
+        if ( !fp || bgzf_read_block(fp) != 0 || !fp->block_length ) return -1;
+
+        char *buffer = fp->uncompressed_block;
+        int skip_until = 0;
+
+        // Skip the header: find out the position of the data block
+        if ( buffer[0]==conf->meta_char )
+        {
+            skip_until = 1;
+            while (1)
+            {
+                if ( buffer[skip_until]=='\n' )
+                {
+                    skip_until++;
+                    if ( skip_until>=fp->block_length )
+                    {
+                        if ( bgzf_read_block(fp) != 0 || !fp->block_length ) error("FIXME: No body in the file: %s\n", fname);
+                        skip_until = 0;
+                    }
+                    // The header has finished
+                    if ( buffer[skip_until]!=conf->meta_char ) break;
+                }
+                skip_until++;
+                if ( skip_until>=fp->block_length )
+                {
+                    if (bgzf_read_block(fp) != 0 || !fp->block_length) error("FIXME: No body in the file: %s\n", fname);
+                    skip_until = 0;
+                }
+            }
+        }
+
+        // Output the new header
+        FILE *hdr  = fopen(header,"r");
+        if ( !hdr ) error("%s: %s", header,strerror(errno));
+        int page_size = getpagesize();
+        char *buf = valloc(page_size);
+        BGZF *bgzf_out = bgzf_dopen(fileno(stdout), "w");
+        ssize_t nread;
+        while ( (nread=fread(buf,1,page_size-1,hdr))>0 )
+        {
+            if ( nread<page_size-1 && buf[nread-1]!='\n' ) buf[nread++] = '\n';
+            if (bgzf_write(bgzf_out, buf, nread) < 0) error("Error: %d\n",bgzf_out->errcode);
+        }
+        if ( fclose(hdr) ) error("close failed: %s\n", header);
+
+        // Output all remainig data read with the header block
+        if ( fp->block_length - skip_until > 0 )
+        {
+            if (bgzf_write(bgzf_out, buffer+skip_until, fp->block_length-skip_until) < 0) error("Error: %d\n",fp->errcode);
+        }
+        if (bgzf_flush(bgzf_out) < 0) error("Error: %d\n",bgzf_out->errcode);
+
+        while (1)
+        {
+            nread = bgzf_raw_read(fp, buf, page_size);
+            if ( nread<=0 ) break;
+
+            int count = bgzf_raw_write(bgzf_out, buf, nread);
+            if (count != nread) error("Write failed, wrote %d instead of %d bytes.\n", count,(int)nread);
+        }
+        if (bgzf_close(bgzf_out) < 0) error("Error: %d\n",bgzf_out->errcode);
+        if (bgzf_close(fp) < 0) error("Error: %d\n",fp->errcode);
+    }
+    else
+        error("todo: reheader BCF, BAM\n");  // BCF is difficult, records contain pointers to the header.
+    return 0;
+}
+
+static int usage(void)
+{
+	fprintf(stderr, "\n");
+	fprintf(stderr, "Version: %s\n", hts_version());
+	fprintf(stderr, "Usage:   tabix [OPTIONS] [FILE] [REGION [...]]\n");
+	fprintf(stderr, "Options:\n");
+    fprintf(stderr, "   -0, --zero-based        coordinates are zero-based\n");
+    fprintf(stderr, "   -b, --begin INT         column number for region start [4]\n");
+    fprintf(stderr, "   -c, --comment CHAR      skip comment lines starting with CHAR [null]\n");
+    fprintf(stderr, "   -e, --end INT           column number for region end (if no end, set INT to -b) [5]\n");
+    fprintf(stderr, "   -f, --force             overwrite existing index without asking\n");
+    fprintf(stderr, "   -h, --print-header      print also the header lines\n");
+    fprintf(stderr, "   -H, --only-header       print only the header lines\n");
+    fprintf(stderr, "   -l, --list-chroms       list chromosome names\n");
+    fprintf(stderr, "   -m, --min-shift INT     set the minimal interval size to 1<<INT; 0 for the old tabix index [0]\n");
+    fprintf(stderr, "   -p, --preset STR        gff, bed, sam, vcf, bcf, bam\n");
+    fprintf(stderr, "   -r, --reheader FILE     replace the header with the content of FILE\n");
+    fprintf(stderr, "   -s, --sequence INT      column number for sequence names (suppressed by -p) [1]\n");
+    fprintf(stderr, "   -S, --skip-lines INT    skip first INT lines [0]\n");
+    fprintf(stderr, "\n");
+	return 1;
+}
+
+int main(int argc, char *argv[])
+{
+	int c, min_shift = -1, is_force = 0, list_chroms = 0, mode = 0;
+	tbx_conf_t conf = tbx_conf_gff, *conf_ptr = NULL;
+    char *reheader = NULL;
+
+    static struct option loptions[] = 
+    {
+        {"help",0,0,'h'},
+        {"zero-based",0,0,'0'},
+        {"print-header",0,0,'h'},
+        {"only-header",0,0,'H'},
+        {"begin",1,0,'b'},
+        {"comment",1,0,'c'},
+        {"end",1,0,'e'},
+        {"force",0,0,'f'},
+        {"preset",1,0,'p'},
+        {"sequence",1,0,'s'},
+        {"skip-lines",1,0,'S'},
+        {"list-chroms",0,0,'l'},
+        {"reheader",1,0,'r'},
+        {0,0,0,0}
+    };
+
+	while ((c = getopt_long(argc, argv, "hH?0b:c:e:fm:p:s:S:lr:", loptions,NULL)) >= 0)
+    {
+        switch (c) 
+        {
+            case 'r': reheader = optarg; break;
+            case 'h': mode = PRINT_HEADER; break;
+            case 'H': mode = HEADER_ONLY; break;
+            case 'l': list_chroms = 1; break;
+            case '0': conf.preset |= TBX_UCSC; break;
+            case 'b': conf.bc = atoi(optarg); break;
+            case 'e': conf.ec = atoi(optarg); break;
+            case 'c': conf.meta_char = *optarg; break;
+            case 'f': is_force = 1; break;
+            case 'm': min_shift = atoi(optarg); break;
+            case 'p':
+                      if (strcmp(optarg, "gff") == 0) conf_ptr = &tbx_conf_gff;
+                      else if (strcmp(optarg, "bed") == 0) conf_ptr = &tbx_conf_bed;
+                      else if (strcmp(optarg, "sam") == 0) conf_ptr = &tbx_conf_sam;
+                      else if (strcmp(optarg, "vcf") == 0) conf_ptr = &tbx_conf_vcf;
+                      else error("The preset string not recognised: '%s'\n", optarg);
+                      break;
+            case 's': conf.sc = atoi(optarg); break;
+            case 'S': conf.line_skip = atoi(optarg); break;
+            default: return usage();
+        }
+    }
+
+	if ( optind==argc ) return usage();
+
+    if ( list_chroms )
+        return query_chroms(argv[optind]);
+
+    if ( argc > optind+1 || mode==HEADER_ONLY )
+        return query_regions(&argv[optind], argc-optind, mode);
+
+    char *fname = argv[optind];
+    int ftype = file_type(fname);
+    if ( !conf_ptr )    // no preset given
+    {
+        if ( ftype==IS_GFF ) conf_ptr = &tbx_conf_gff; 
+        else if ( ftype==IS_BED ) conf_ptr = &tbx_conf_bed;
+        else if ( ftype==IS_SAM ) conf_ptr = &tbx_conf_sam;
+        else if ( ftype==IS_VCF ) conf_ptr = &tbx_conf_vcf;
+        else if ( ftype==IS_BCF )
+        { 
+            if ( min_shift <= 0 ) min_shift = 14;
+        }
+        else if ( ftype==IS_BAM )
+        { 
+            if ( min_shift <= 0 ) min_shift = 14;
+        }
+    }
+    if ( reheader )
+        return reheader_file(fname, reheader, ftype, conf_ptr);
+
+    if ( conf_ptr )
+        conf = *conf_ptr;
+
+    char *suffix = min_shift <= 0 ? ".tbi" : (ftype==IS_BAM ? ".bai" : ".csi");
+    char *idx_fname = calloc(strlen(fname) + 5, 1);
+    strcat(strcpy(idx_fname, fname), suffix);
+
+    struct stat stat_tbi, stat_file;
+    if ( !is_force && stat(idx_fname, &stat_tbi)==0 )
+    {
+        // Before complaining about existing index, check if the VCF file isn't
+        // newer. This is a common source of errors, people tend not to notice
+        // that tabix failed
+        stat(fname, &stat_file);
+        if ( stat_file.st_mtime <= stat_tbi.st_mtime )
+            error("[tabix] the index file exists. Please use '-f' to overwrite.\n");
+    }
+    free(idx_fname);
+
+    if ( min_shift > 0 ) // CSI index
+    {
+        if ( ftype==IS_BCF ) 
+        {
+            if ( bcf_index_build(fname, min_shift)!=0 ) error("bcf_index_build failed: %s\n", fname);
+            return 0;
+        }
+        if ( ftype==IS_BAM )
+        {
+            if ( bam_index_build(fname, min_shift)!=0 ) error("bam_index_build failed: %s\n", fname);
+            return 0;
+        }
+        if ( tbx_index_build(fname, min_shift, &conf)!=0 ) error("tbx_index_build failed: %s\n", fname);
+        return 0;
+    }
+    else
+    {
+        if ( tbx_index_build(fname, min_shift, &conf) ) error("tbx_index_build failed: %s\n", fname);
+        return 0;
+    }
+	return 0;
+}
diff --git a/htslib/tbx.c b/htslib/tbx.c
new file mode 100644
index 0000000..035cb68
--- /dev/null
+++ b/htslib/tbx.c
@@ -0,0 +1,290 @@
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <assert.h>
+#include "htslib/tbx.h"
+#include "htslib/bgzf.h"
+
+#include "htslib/khash.h"
+KHASH_DECLARE(s2i, kh_cstr_t, int64_t)
+
+tbx_conf_t tbx_conf_gff = { 0, 1, 4, 5, '#', 0 };
+tbx_conf_t tbx_conf_bed = { TBX_UCSC, 1, 2, 3, '#', 0 };
+tbx_conf_t tbx_conf_psltbl = { TBX_UCSC, 15, 17, 18, '#', 0 };
+tbx_conf_t tbx_conf_sam = { TBX_SAM, 3, 4, 0, '@', 0 };
+tbx_conf_t tbx_conf_vcf = { TBX_VCF, 1, 2, 0, '#', 0 };
+
+typedef struct {
+	int64_t beg, end;
+	char *ss, *se;
+	int tid;
+} tbx_intv_t;
+
+static inline int get_tid(tbx_t *tbx, const char *ss, int is_add)
+{
+	khint_t k;
+	khash_t(s2i) *d;
+	if (tbx->dict == 0) tbx->dict = kh_init(s2i);
+	d = (khash_t(s2i)*)tbx->dict;
+	if (is_add) {
+		int absent;
+		k = kh_put(s2i, d, ss, &absent);
+		if (absent) {
+			kh_key(d, k) = strdup(ss);
+			kh_val(d, k) = kh_size(d) - 1;
+		}
+	} else k = kh_get(s2i, d, ss);
+	return k == kh_end(d)? -1 : kh_val(d, k);
+}
+
+int tbx_name2id(tbx_t *tbx, const char *ss)
+{
+	return get_tid(tbx, ss, 0);
+}
+
+int tbx_parse1(const tbx_conf_t *conf, int len, char *line, tbx_intv_t *intv)
+{
+	int i, b = 0, id = 1, ncols = 0;
+	char *s;
+	intv->ss = intv->se = 0; intv->beg = intv->end = -1;
+	for (i = 0; i <= len; ++i) {
+		if (line[i] == '\t' || line[i] == 0) {
+            ++ncols;
+			if (id == conf->sc) {
+				intv->ss = line + b; intv->se = line + i;
+			} else if (id == conf->bc) {
+				// here ->beg is 0-based.
+				intv->beg = intv->end = strtol(line + b, &s, 0);
+                if ( s==line+b ) return -1; // expected int
+				if (!(conf->preset&TBX_UCSC)) --intv->beg;
+				else ++intv->end;
+				if (intv->beg < 0) intv->beg = 0;
+				if (intv->end < 1) intv->end = 1;
+			} else {
+				if ((conf->preset&0xffff) == TBX_GENERIC) {
+					if (id == conf->ec) 
+                    {
+                        intv->end = strtol(line + b, &s, 0);
+                        if ( s==line+b ) return -1; // expected int
+                    }
+				} else if ((conf->preset&0xffff) == TBX_SAM) {
+					if (id == 6) { // CIGAR
+						int l = 0, op;
+						char *t;
+						for (s = line + b; s < line + i;) {
+							long x = strtol(s, &t, 10);
+							op = toupper(*t);
+							if (op == 'M' || op == 'D' || op == 'N') l += x;
+							s = t + 1;
+						}
+						if (l == 0) l = 1;
+						intv->end = intv->beg + l;
+					}
+				} else if ((conf->preset&0xffff) == TBX_VCF) {
+					if (id == 4) {
+						if (b < i) intv->end = intv->beg + (i - b);
+					} else if (id == 8) { // look for "END="
+						int c = line[i];
+						line[i] = 0;
+						s = strstr(line + b, "END=");
+						if (s == line + b) s += 4;
+						else if (s) {
+							s = strstr(line + b, ";END=");
+							if (s) s += 5;
+						}
+						if (s) intv->end = strtol(s, &s, 0);
+						line[i] = c;
+					}
+				}
+			}
+			b = i + 1;
+			++id;
+		}
+	}
+	if (intv->ss == 0 || intv->se == 0 || intv->beg < 0 || intv->end < 0) return -1;
+	return 0;
+}
+
+static inline int get_intv(tbx_t *tbx, kstring_t *str, tbx_intv_t *intv, int is_add)
+{
+	if (tbx_parse1(&tbx->conf, str->l, str->s, intv) == 0) {
+		int c = *intv->se;
+		*intv->se = '\0'; intv->tid = get_tid(tbx, intv->ss, is_add); *intv->se = c;
+		return (intv->tid >= 0 && intv->beg >= 0 && intv->end >= 0)? 0 : -1;
+	} else {
+        char *type = NULL;
+        switch (tbx->conf.preset&0xffff)
+        {
+            case TBX_SAM: type = "TBX_SAM"; break;
+            case TBX_VCF: type = "TBX_VCF"; break;
+            case TBX_UCSC: type = "TBX_UCSC"; break;
+            default: type = "TBX_GENERIC"; break;
+        }
+		fprintf(stderr, "[E::%s] failed to parse %s, was wrong -p [type] used?\nThe offending line was: \"%s\"\n", __func__, type, str->s);
+		return -1;
+	}
+}
+
+int tbx_readrec(BGZF *fp, void *tbxv, void *sv, int *tid, int *beg, int *end)
+{
+	tbx_t *tbx = (tbx_t *) tbxv;
+	kstring_t *s = (kstring_t *) sv;
+	int ret;
+	if ((ret = bgzf_getline(fp, '\n', s)) >= 0) {
+		tbx_intv_t intv;
+		get_intv(tbx, s, &intv, 0);
+		*tid = intv.tid; *beg = intv.beg; *end = intv.end;
+	}
+	return ret;
+}
+
+void tbx_set_meta(tbx_t *tbx)
+{
+	int i, l = 0, l_nm;
+	uint32_t x[7];
+	char **name;
+	uint8_t *meta;
+	khint_t k;
+	khash_t(s2i) *d = (khash_t(s2i)*)tbx->dict;
+
+	memcpy(x, &tbx->conf, 24);
+	name = (char**)malloc(sizeof(char*) * kh_size(d));
+	for (k = kh_begin(d), l = 0; k != kh_end(d); ++k) {
+		if (!kh_exist(d, k)) continue;
+		name[kh_val(d, k)] = (char*)kh_key(d, k);
+		l += strlen(kh_key(d, k)) + 1; // +1 to include '\0'
+	}
+	l_nm = x[6] = l;
+	meta = (uint8_t*)malloc(l_nm + 28);
+	if (ed_is_big())
+		for (i = 0; i < 7; ++i)
+			x[i] = ed_swap_4(x[i]);
+	memcpy(meta, x, 28);
+	for (l = 28, i = 0; i < (int)kh_size(d); ++i) {
+		int x = strlen(name[i]) + 1;
+		memcpy(meta + l, name[i], x);
+		l += x;
+	}
+	free(name);
+	hts_idx_set_meta(tbx->idx, l, meta, 0);
+}
+
+tbx_t *tbx_index(BGZF *fp, int min_shift, const tbx_conf_t *conf)
+{
+	tbx_t *tbx;
+	kstring_t str;
+	int ret, first = 0, n_lvls, fmt;
+	int64_t lineno = 0;
+	uint64_t last_off = 0;
+	tbx_intv_t intv;
+
+	str.s = 0; str.l = str.m = 0;
+	tbx = (tbx_t*)calloc(1, sizeof(tbx_t));
+	tbx->conf = *conf;
+	if (min_shift > 0) n_lvls = (TBX_MAX_SHIFT - min_shift + 2) / 3, fmt = HTS_FMT_CSI;
+	else min_shift = 14, n_lvls = 5, fmt = HTS_FMT_TBI;
+	while ((ret = bgzf_getline(fp, '\n', &str)) >= 0) {
+		++lineno;
+		if (lineno <= tbx->conf.line_skip || str.s[0] == tbx->conf.meta_char) {
+			last_off = bgzf_tell(fp);
+			continue;
+		}
+		if (first == 0) {
+			tbx->idx = hts_idx_init(0, fmt, last_off, min_shift, n_lvls);
+			first = 1;
+		}
+		get_intv(tbx, &str, &intv, 1);
+		ret = hts_idx_push(tbx->idx, intv.tid, intv.beg, intv.end, bgzf_tell(fp), 1);
+		if (ret < 0) 
+        {
+            free(str.s);
+            tbx_destroy(tbx);
+            return NULL;
+        }
+	}
+	if ( !tbx->idx ) tbx->idx = hts_idx_init(0, fmt, last_off, min_shift, n_lvls);   // empty file
+	if ( !tbx->dict ) tbx->dict = kh_init(s2i);
+	hts_idx_finish(tbx->idx, bgzf_tell(fp));
+	tbx_set_meta(tbx);
+	free(str.s);
+	return tbx;
+}
+
+void tbx_destroy(tbx_t *tbx)
+{
+	khash_t(s2i) *d = (khash_t(s2i)*)tbx->dict;
+	if (d != NULL)
+	{
+		khint_t k;
+		for (k = kh_begin(d); k != kh_end(d); ++k)
+			if (kh_exist(d, k)) free((char*)kh_key(d, k));
+	}
+	hts_idx_destroy(tbx->idx);
+	kh_destroy(s2i, d);
+	free(tbx);
+}
+
+int tbx_index_build(const char *fn, int min_shift, const tbx_conf_t *conf)
+{
+	tbx_t *tbx;
+	BGZF *fp;
+    if ( bgzf_is_bgzf(fn)!=1 ) { fprintf(stderr,"Not a BGZF file: %s\n", fn); return -1; }
+	if ((fp = bgzf_open(fn, "r")) == 0) return -1;
+    if ( !fp->is_compressed ) { bgzf_close(fp); return -1; }
+	tbx = tbx_index(fp, min_shift, conf);
+	bgzf_close(fp);
+    if ( !tbx ) return -1;
+	hts_idx_save(tbx->idx, fn, min_shift > 0? HTS_FMT_CSI : HTS_FMT_TBI);
+	tbx_destroy(tbx);
+	return 0;
+}
+
+tbx_t *tbx_index_load(const char *fn)
+{
+	tbx_t *tbx;
+	uint8_t *meta;
+	char *nm, *p;
+	uint32_t x[7];
+	int l_meta, l_nm;
+	tbx = (tbx_t*)calloc(1, sizeof(tbx_t));
+	tbx->idx = hts_idx_load(fn, HTS_FMT_TBI);
+	if ( !tbx->idx ) 
+    {
+        free(tbx);
+        return NULL;
+    }
+	meta = hts_idx_get_meta(tbx->idx, &l_meta);
+	memcpy(x, meta, 28);
+	memcpy(&tbx->conf, x, 24);
+	p = nm = (char*)meta + 28;
+	l_nm = x[6];
+	for (; p - nm < l_nm; p += strlen(p) + 1) get_tid(tbx, p, 1);
+	return tbx;
+}
+
+const char **tbx_seqnames(tbx_t *tbx, int *n)
+{
+	khash_t(s2i) *d = (khash_t(s2i)*)tbx->dict;
+	if (d == NULL)
+	{
+		*n = 0;
+		return NULL;
+	}
+	int tid, m = kh_size(d);
+	const char **names = (const char**) calloc(m,sizeof(const char*));
+	khint_t k;
+	for (k=kh_begin(d); k<kh_end(d); k++)
+	{
+		if ( !kh_exist(d,k) ) continue;
+        tid = kh_val(d,k);
+        assert( tid<m );
+		names[tid] = kh_key(d,k);
+	}
+    // sanity check: there should be no gaps
+    for (tid=0; tid<m; tid++)
+        assert(names[tid]);
+	*n = m;
+	return names;
+}
+
diff --git a/htslib/vcf.c b/htslib/vcf.c
new file mode 100644
index 0000000..67216b0
--- /dev/null
+++ b/htslib/vcf.c
@@ -0,0 +1,2953 @@
+#include <zlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <assert.h>
+#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+#include "htslib/kstring.h"
+#include "htslib/bgzf.h"
+#include "htslib/vcf.h"
+#include "htslib/tbx.h"
+#include "htslib/hfile.h"
+
+#include "htslib/khash.h"
+KHASH_MAP_INIT_STR(vdict, bcf_idinfo_t)
+typedef khash_t(vdict) vdict_t;
+
+#include "htslib/kseq.h"
+KSTREAM_DECLARE(gzFile, gzread)
+
+uint32_t bcf_float_missing    = 0x7F800001;
+uint32_t bcf_float_vector_end = 0x7F800002;
+uint8_t bcf_type_shift[] = { 0, 0, 1, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+static bcf_idinfo_t bcf_idinfo_def = { .info = { 15, 15, 15 }, .hrec = { NULL, NULL, NULL}, .id = -1 };
+
+/*************************
+ *** VCF header parser ***
+ *************************/
+
+int bcf_hdr_sync(bcf_hdr_t *h);
+
+int bcf_hdr_add_sample(bcf_hdr_t *h, const char *s)
+{
+    if ( !s )
+    {
+        bcf_hdr_sync(h);
+        return 0;
+    }
+
+    const char *ss = s;
+    while ( !*ss && isspace(*ss) ) ss++;
+    if ( !*ss )
+    {
+        fprintf(stderr,"[W::%s] Empty sample name: trailing spaces/tabs in the header line?\n", __func__);
+        abort();
+    }
+
+    vdict_t *d = (vdict_t*)h->dict[BCF_DT_SAMPLE];
+    int ret;
+    char *sdup = strdup(s);
+    int k = kh_put(vdict, d, sdup, &ret);
+    if (ret) { // absent
+        kh_val(d, k) = bcf_idinfo_def;
+        kh_val(d, k).id = kh_size(d) - 1;
+    } else {
+        if (hts_verbose >= 2)
+            fprintf(stderr, "[W::%s] Duplicated sample name '%s'. Skipped.\n", __func__, s);
+        free(sdup);
+        return -1;
+    }
+    int n = kh_size(d);
+    h->samples = (char**) realloc(h->samples,sizeof(char*)*n);
+    h->samples[n-1] = sdup;
+    return 0;
+}
+
+void bcf_hdr_parse_sample_line(bcf_hdr_t *h, const char *str)
+{
+    int i = 0;
+    const char *p, *q;
+    // add samples
+    for (p = q = str;; ++q) {
+        if (*q != '\t' && *q != 0 && *q != '\n') continue;
+        if (++i > 9) {
+            char *s = (char*)malloc(q - p + 1);
+            strncpy(s, p, q - p);
+            s[q - p] = 0;
+            bcf_hdr_add_sample(h,s);
+            free(s);
+        }
+        if (*q == 0 || *q == '\n') break;
+        p = q + 1;
+    }
+    bcf_hdr_add_sample(h,NULL);
+}
+
+int bcf_hdr_sync(bcf_hdr_t *h)
+{
+	int i;
+	for (i = 0; i < 3; i++) 
+    {
+		vdict_t *d = (vdict_t*)h->dict[i];
+		khint_t k;
+
+        // find out the largest id, there may be holes because of IDX
+        int max_id = -1;
+        for (k=kh_begin(d); k<kh_end(d); k++)
+        {
+            if (!kh_exist(d,k)) continue;
+            if ( max_id < kh_val(d,k).id ) max_id = kh_val(d,k).id;
+        }
+        if ( max_id >= h->n[i] )
+        {
+            h->id[i] = (bcf_idpair_t*)realloc(h->id[i], (max_id+1)*sizeof(bcf_idpair_t));
+            for (k=h->n[i]; k<=max_id; k++)
+            {
+                h->id[i][k].key = NULL;
+                h->id[i][k].val = NULL;
+            }
+            h->n[i] = max_id+1;
+        }
+        for (k=kh_begin(d); k<kh_end(d); k++)
+        {
+            if (!kh_exist(d,k)) continue;
+            h->id[i][kh_val(d,k).id].key = kh_key(d,k);
+            h->id[i][kh_val(d,k).id].val = &kh_val(d,k);
+        }
+	}
+	return 0;
+}
+
+void bcf_hrec_destroy(bcf_hrec_t *hrec)
+{
+    free(hrec->key);
+    if ( hrec->value ) free(hrec->value);
+    int i;
+    for (i=0; i<hrec->nkeys; i++)
+    {
+        free(hrec->keys[i]);
+        free(hrec->vals[i]);
+    }
+    free(hrec->keys);
+    free(hrec->vals);
+    free(hrec);
+}
+
+// Copies all fields except IDX.
+bcf_hrec_t *bcf_hrec_dup(bcf_hrec_t *hrec)
+{
+    bcf_hrec_t *out = (bcf_hrec_t*) calloc(1,sizeof(bcf_hrec_t));
+    out->type = hrec->type;
+    if ( hrec->key ) out->key = strdup(hrec->key);
+    if ( hrec->value ) out->value = strdup(hrec->value);
+    out->nkeys = hrec->nkeys;
+    out->keys = (char**) malloc(sizeof(char*)*hrec->nkeys);
+    out->vals = (char**) malloc(sizeof(char*)*hrec->nkeys);
+    int i, j = 0;
+    for (i=0; i<hrec->nkeys; i++)
+    {
+        if ( hrec->keys[i] && !strcmp("IDX",hrec->keys[i]) ) continue;
+        if ( hrec->keys[i] ) out->keys[j] = strdup(hrec->keys[i]);
+        if ( hrec->vals[i] ) out->vals[j] = strdup(hrec->vals[i]);
+        j++;
+    }
+    if ( i!=j ) out->nkeys--;   // IDX was omitted
+    return out;
+}
+
+void bcf_hrec_debug(FILE *fp, bcf_hrec_t *hrec)
+{
+    fprintf(fp, "key=[%s] value=[%s]", hrec->key, hrec->value?hrec->value:"");
+    int i;
+    for (i=0; i<hrec->nkeys; i++)
+        fprintf(fp, "\t[%s]=[%s]", hrec->keys[i],hrec->vals[i]);
+    fprintf(fp, "\n");
+}
+
+void bcf_header_debug(bcf_hdr_t *hdr)
+{
+    int i, j;
+    for (i=0; i<hdr->nhrec; i++)
+    {
+        if ( !hdr->hrec[i]->value )
+        {
+            fprintf(stderr, "##%s=<", hdr->hrec[i]->key);
+            fprintf(stderr,"%s=%s", hdr->hrec[i]->keys[0], hdr->hrec[i]->vals[0]);
+            for (j=1; j<hdr->hrec[i]->nkeys; j++)
+                fprintf(stderr,",%s=%s", hdr->hrec[i]->keys[j], hdr->hrec[i]->vals[j]);
+            fprintf(stderr,">\n");
+        }
+        else
+            fprintf(stderr,"##%s=%s\n", hdr->hrec[i]->key,hdr->hrec[i]->value);
+    }
+}
+
+void bcf_hrec_add_key(bcf_hrec_t *hrec, const char *str, int len)
+{
+    int n = ++hrec->nkeys;
+    hrec->keys = (char**) realloc(hrec->keys, sizeof(char*)*n);
+    hrec->vals = (char**) realloc(hrec->vals, sizeof(char*)*n);
+    assert( len );
+    hrec->keys[n-1] = (char*) malloc((len+1)*sizeof(char));
+    memcpy(hrec->keys[n-1],str,len);
+    hrec->keys[n-1][len] = 0;
+    hrec->vals[n-1] = NULL;
+}
+
+void bcf_hrec_set_val(bcf_hrec_t *hrec, int i, const char *str, int len, int is_quoted)
+{
+    if ( !str ) { hrec->vals[i] = NULL; return; }
+    if ( hrec->vals[i] ) free(hrec->vals[i]);
+    if ( is_quoted )
+    {
+        hrec->vals[i] = (char*) malloc((len+3)*sizeof(char));
+        hrec->vals[i][0] = '"';
+        memcpy(&hrec->vals[i][1],str,len);
+        hrec->vals[i][len+1] = '"';
+        hrec->vals[i][len+2] = 0;
+    }
+    else
+    {
+        hrec->vals[i] = (char*) malloc((len+1)*sizeof(char));
+        memcpy(hrec->vals[i],str,len);
+        hrec->vals[i][len] = 0;
+    }
+}
+
+void hrec_add_idx(bcf_hrec_t *hrec, int idx)
+{
+    int n = ++hrec->nkeys;
+    hrec->keys = (char**) realloc(hrec->keys, sizeof(char*)*n);
+    hrec->vals = (char**) realloc(hrec->vals, sizeof(char*)*n);
+    hrec->keys[n-1] = strdup("IDX");
+    kstring_t str = {0,0,0};
+    kputw(idx, &str);
+    hrec->vals[n-1] = str.s;
+}
+
+int bcf_hrec_find_key(bcf_hrec_t *hrec, const char *key)
+{
+    int i;
+    for (i=0; i<hrec->nkeys; i++)
+        if ( !strcasecmp(key,hrec->keys[i]) ) return i;
+    return -1;
+}
+
+static inline int is_escaped(const char *min, const char *str)
+{
+    int n = 0;
+    while ( --str>=min && *str=='\\' ) n++;
+    return n%2;
+}
+
+bcf_hrec_t *bcf_hdr_parse_line(const bcf_hdr_t *h, const char *line, int *len)
+{
+    const char *p = line;
+    if (p[0] != '#' || p[1] != '#') { *len = 0; return NULL; }
+    p += 2;
+
+    const char *q = p;
+    while ( *q && *q!='=' ) q++;
+    int n = q-p;
+    if ( *q!='=' || !n ) { *len = q-line+1; return NULL; } // wrong format
+
+    bcf_hrec_t *hrec = (bcf_hrec_t*) calloc(1,sizeof(bcf_hrec_t));
+    hrec->key = (char*) malloc(sizeof(char)*(n+1));
+    memcpy(hrec->key,p,n);
+    hrec->key[n] = 0;
+
+    p = ++q;
+    if ( *p!='<' ) // generic field, e.g. ##samtoolsVersion=0.1.18-r579
+    {
+        while ( *q && *q!='\n' ) q++;
+        hrec->value = (char*) malloc((q-p+1)*sizeof(char));
+        memcpy(hrec->value, p, q-p);
+        hrec->value[q-p] = 0;
+        *len = q-line+1;
+        return hrec;
+    }
+
+    // structured line, e.g. ##INFO=<ID=PV1,Number=1,Type=Float,Description="P-value for baseQ bias">
+    int nopen = 1;
+    while ( *q && *q!='\n' && nopen )
+    {
+        p = ++q;
+        while ( *q && *q!='=' ) q++;
+        n = q-p;
+        if ( *q!='=' || !n ) { *len = q-line+1; bcf_hrec_destroy(hrec); return NULL; } // wrong format
+        bcf_hrec_add_key(hrec, p, q-p);
+        p = ++q;
+        int quoted = *p=='"' ? 1 : 0;
+        if ( quoted ) p++, q++;
+        while (1)
+        {
+            if ( !*q ) break;
+            if ( quoted ) { if ( *q=='"' && !is_escaped(p,q) ) break; }
+            else 
+            { 
+                if ( *q=='<' ) nopen++;
+                if ( *q=='>' ) nopen--;
+                if ( !nopen ) break;
+                if ( *q==',' && nopen==1 ) break; 
+            }
+            q++;
+        }
+        bcf_hrec_set_val(hrec, hrec->nkeys-1, p, q-p, quoted);
+        if ( quoted ) q++;
+        if ( *q=='>' ) { nopen--; q++; }
+    }
+    *len = q-line+1;
+    return hrec;
+}
+
+// returns: 1 when hdr needs to be synced, 0 otherwise
+int bcf_hdr_register_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec)
+{
+    // contig
+    int i,j,k, ret;
+    char *str;
+    if ( !strcmp(hrec->key, "contig") ) 
+    {
+        hrec->type = BCF_HL_CTG;
+
+        // Get the contig ID ($str) and length ($j)
+        i = bcf_hrec_find_key(hrec,"length"); 
+        if ( i<0 ) return 0;
+        if ( sscanf(hrec->vals[i],"%d",&j)!=1 ) return 0;
+
+        i = bcf_hrec_find_key(hrec,"ID"); 
+        if ( i<0 ) return 0; 
+        str = strdup(hrec->vals[i]);
+
+        // Register in the dictionary
+        vdict_t *d = (vdict_t*)hdr->dict[BCF_DT_CTG];
+        k = kh_put(vdict, d, str, &ret);
+        if ( !ret ) { free(str); return 0; }    // already present
+
+        int idx = bcf_hrec_find_key(hrec,"IDX");
+        if ( idx!=-1 )
+        {
+            char *tmp = hrec->vals[idx];
+            idx = strtol(hrec->vals[idx], &tmp, 10);
+            if ( *tmp )
+            {
+                fprintf(stderr,"[%s:%d %s] Error parsing the IDX tag, skipping.\n", __FILE__,__LINE__,__FUNCTION__);
+                return 0;
+            }
+        }
+        else
+        {
+            idx = kh_size(d) - 1;
+            hrec_add_idx(hrec, idx);
+        }
+
+        kh_val(d, k) = bcf_idinfo_def;
+        kh_val(d, k).id = idx;
+        kh_val(d, k).info[0] = i;
+        kh_val(d, k).hrec[0] = hrec;
+
+        return 1;
+    }
+
+    if ( !strcmp(hrec->key, "INFO") ) hrec->type = BCF_HL_INFO;
+    else if ( !strcmp(hrec->key, "FILTER") ) hrec->type = BCF_HL_FLT;
+    else if ( !strcmp(hrec->key, "FORMAT") ) hrec->type = BCF_HL_FMT;
+    else if ( hrec->nkeys>0 ) { hrec->type = BCF_HL_STR; return 1; }
+    else return 0;
+    
+    // INFO/FILTER/FORMAT
+    char *id = NULL;
+    int type = -1, num = -1, var = -1, idx = -1; 
+    for (i=0; i<hrec->nkeys; i++)
+    {
+        if ( !strcmp(hrec->keys[i], "ID") ) id = hrec->vals[i];
+        else if ( !strcmp(hrec->keys[i], "IDX") )
+        {
+            char *tmp = hrec->vals[i];
+            idx = strtol(hrec->vals[i], &tmp, 10);
+            if ( *tmp ) 
+            {
+                fprintf(stderr,"[%s:%d %s] Error parsing the IDX tag, skipping.\n", __FILE__,__LINE__,__FUNCTION__);
+                return 0;
+            }
+        }
+        else if ( !strcmp(hrec->keys[i], "Type") )
+        {
+            if ( !strcmp(hrec->vals[i], "Integer") ) type = BCF_HT_INT;
+            else if ( !strcmp(hrec->vals[i], "Float") ) type = BCF_HT_REAL;
+            else if ( !strcmp(hrec->vals[i], "String") ) type = BCF_HT_STR;
+            else if ( !strcmp(hrec->vals[i], "Flag") ) type = BCF_HT_FLAG;
+            else
+            {
+                fprintf(stderr, "[E::%s] The type \"%s\" not supported, assuming \"String\"\n", __func__, hrec->vals[i]);
+                type = BCF_HT_STR;
+            }
+        }
+        else if ( !strcmp(hrec->keys[i], "Number") )
+        {
+            if ( !strcmp(hrec->vals[i],"A") ) var = BCF_VL_A;
+            else if ( !strcmp(hrec->vals[i],"R") ) var = BCF_VL_R;
+            else if ( !strcmp(hrec->vals[i],"G") ) var = BCF_VL_G;
+            else if ( !strcmp(hrec->vals[i],".") ) var = BCF_VL_VAR;
+            else 
+            { 
+                sscanf(hrec->vals[i],"%d",&num);
+                var = BCF_VL_FIXED;
+            }
+            if (var != BCF_VL_FIXED) num = 0xfffff;
+
+        }
+    }
+    uint32_t info = (uint32_t)num<<12 | var<<8 | type<<4 | hrec->type;
+
+    if ( !id ) return 0;
+    str = strdup(id);
+
+    vdict_t *d = (vdict_t*)hdr->dict[BCF_DT_ID];
+    k = kh_put(vdict, d, str, &ret);
+    if ( !ret ) 
+    { 
+        // already present
+        free(str);
+        if ( kh_val(d, k).hrec[info&0xf] ) return 0;
+        kh_val(d, k).info[info&0xf] = info;
+        kh_val(d, k).hrec[info&0xf] = hrec;
+        return 1;
+    }
+    kh_val(d, k) = bcf_idinfo_def;
+    kh_val(d, k).info[info&0xf] = info;
+    kh_val(d, k).hrec[info&0xf] = hrec;
+    kh_val(d, k).id = idx==-1 ? kh_size(d) - 1 : idx;
+
+    if ( idx==-1 ) hrec_add_idx(hrec, kh_val(d, k).id);
+
+    return 1;
+}
+
+int bcf_hdr_add_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec)
+{
+    hrec->type = BCF_HL_GEN;
+    if ( !bcf_hdr_register_hrec(hdr,hrec) )
+    {
+        // If one of the hashed field, then it is already present
+        if ( hrec->type != BCF_HL_GEN ) 
+        {
+            bcf_hrec_destroy(hrec);
+            return 0;
+        }
+
+        // Is one of the generic fields and already present?
+        int i;
+        for (i=0; i<hdr->nhrec; i++)
+        {
+            if ( hdr->hrec[i]->type!=BCF_HL_GEN ) continue;
+            if ( !strcmp(hdr->hrec[i]->key,hrec->key) && !strcmp(hrec->key,"fileformat") ) break;
+            if ( !strcmp(hdr->hrec[i]->key,hrec->key) && !strcmp(hdr->hrec[i]->value,hrec->value) ) break;
+        }
+        if ( i<hdr->nhrec ) 
+        {
+            bcf_hrec_destroy(hrec);
+            return 0;
+        }
+    }
+
+    // New record, needs to be added
+    int n = ++hdr->nhrec;
+    hdr->hrec = (bcf_hrec_t**) realloc(hdr->hrec, n*sizeof(bcf_hrec_t*));
+    hdr->hrec[n-1] = hrec;
+
+    return hrec->type==BCF_HL_GEN ? 0 : 1;
+}
+
+bcf_hrec_t *bcf_hdr_get_hrec(const bcf_hdr_t *hdr, int type, const char *id)
+{
+    int i;
+    if ( type==BCF_HL_GEN )
+    {
+        for (i=0; i<hdr->nhrec; i++)
+        {
+             if ( hdr->hrec[i]->type!=BCF_HL_GEN ) continue;
+             if ( !strcmp(hdr->hrec[i]->key,id) ) return hdr->hrec[i];
+        }
+        return NULL;
+    }
+    vdict_t *d = type==BCF_HL_CTG ? (vdict_t*)hdr->dict[BCF_DT_CTG] : (vdict_t*)hdr->dict[BCF_DT_ID];
+    khint_t k = kh_get(vdict, d, id);
+    if ( k == kh_end(d) ) return NULL;
+    return kh_val(d, k).hrec[type==BCF_HL_CTG?0:type];
+}
+
+void bcf_hdr_check_sanity(bcf_hdr_t *hdr)
+{
+    static int PL_warned = 0, GL_warned = 0;
+
+    if ( !PL_warned )
+    {
+        int id = bcf_hdr_id2int(hdr, BCF_DT_ID, "PL");
+        if ( bcf_hdr_idinfo_exists(hdr,BCF_HL_FMT,id) && bcf_hdr_id2length(hdr,BCF_HL_FMT,id)!=BCF_VL_G )
+        {
+            fprintf(stderr,"[W::%s] PL should be declared as Number=G\n", __func__);
+            PL_warned = 1;
+        }
+    }
+    if ( !GL_warned )
+    {
+        int id = bcf_hdr_id2int(hdr, BCF_HL_FMT, "GL");
+        if ( bcf_hdr_idinfo_exists(hdr,BCF_HL_FMT,id) && bcf_hdr_id2length(hdr,BCF_HL_FMT,id)!=BCF_VL_G )
+        {
+            fprintf(stderr,"[W::%s] GL should be declared as Number=G\n", __func__);
+            PL_warned = 1;
+        }
+    }
+}
+
+int bcf_hdr_parse(bcf_hdr_t *hdr, char *htxt)
+{
+    int len, needs_sync = 0;
+    char *p = htxt;
+
+    // Check sanity: "fileformat" string must come as first
+    bcf_hrec_t *hrec = bcf_hdr_parse_line(hdr,p,&len);
+    if ( !hrec->key || strcasecmp(hrec->key,"fileformat") )
+        fprintf(stderr, "[W::%s] The first line should be ##fileformat; is the VCF/BCF header broken?\n", __func__);
+    needs_sync += bcf_hdr_add_hrec(hdr, hrec);
+
+    // The filter PASS must appear first in the dictionary
+    hrec = bcf_hdr_parse_line(hdr,"##FILTER=<ID=PASS,Description=\"All filters passed\">",&len);
+    needs_sync += bcf_hdr_add_hrec(hdr, hrec);
+
+    // Parse the whole header
+    while ( (hrec=bcf_hdr_parse_line(hdr,p,&len)) )
+    {
+        needs_sync += bcf_hdr_add_hrec(hdr, hrec);
+        p += len;
+    }
+    bcf_hdr_parse_sample_line(hdr,p);
+    if ( needs_sync ) bcf_hdr_sync(hdr);
+    bcf_hdr_check_sanity(hdr);
+	return 0;
+}
+
+int bcf_hdr_append(bcf_hdr_t *hdr, const char *line)
+{
+    int len;
+    bcf_hrec_t *hrec = bcf_hdr_parse_line(hdr, (char*) line, &len);
+    if ( !hrec ) return -1;
+    if ( bcf_hdr_add_hrec(hdr, hrec) )
+        bcf_hdr_sync(hdr);
+    return 0;
+}
+
+void bcf_hdr_remove(bcf_hdr_t *hdr, int type, const char *key)
+{
+    int i;
+    bcf_hrec_t *hrec;
+    while (1)
+    {
+        if ( type==BCF_HL_FLT || type==BCF_HL_INFO || type==BCF_HL_FMT || type== BCF_HL_CTG )
+        {
+            hrec = bcf_hdr_get_hrec(hdr, type, key);
+            if ( !hrec ) return;
+
+            for (i=0; i<hdr->nhrec; i++)
+                if ( hdr->hrec[i]==hrec ) break;
+            assert( i<hdr->nhrec );
+
+            vdict_t *d = type==BCF_HL_CTG ? (vdict_t*)hdr->dict[BCF_DT_CTG] : (vdict_t*)hdr->dict[BCF_DT_ID];
+            khint_t k = kh_get(vdict, d, key);
+            kh_val(d, k).hrec[type==BCF_HL_CTG?0:type] = NULL;
+        }
+        else
+        {
+            for (i=0; i<hdr->nhrec; i++)
+            {
+                if ( hdr->hrec[i]->type!=type ) continue;
+                if ( !strcmp(hdr->hrec[i]->key,key) ) break;
+            }
+            if ( i==hdr->nhrec ) return;
+            hrec = hdr->hrec[i];
+        }
+
+        hdr->nhrec--;
+        if ( i < hdr->nhrec )
+            memmove(&hdr->hrec[i],&hdr->hrec[i+1],(hdr->nhrec-i)*sizeof(bcf_hrec_t*));
+        bcf_hrec_destroy(hrec);
+
+        bcf_hdr_sync(hdr);
+    }
+}
+
+int bcf_hdr_printf(bcf_hdr_t *hdr, const char *fmt, ...)
+{
+    va_list ap;
+    va_start(ap, fmt);
+    int n = vsnprintf(NULL, 0, fmt, ap) + 2;
+    va_end(ap);
+
+    char *line = (char*)malloc(n);
+    va_start(ap, fmt);
+    vsnprintf(line, n, fmt, ap);
+    va_end(ap);
+
+    int ret = bcf_hdr_append(hdr, line);
+
+    free(line);
+    return ret;
+}
+
+
+/**********************
+ *** BCF header I/O ***
+ **********************/
+
+const char *bcf_hdr_get_version(const bcf_hdr_t *hdr)
+{
+    bcf_hrec_t *hrec = bcf_hdr_get_hrec(hdr, BCF_HL_GEN, "fileformat");
+    if ( !hrec ) 
+    {
+        fprintf(stderr,"No version string found, assuming VCFv4.2\n");
+        return "VCFv4.2";
+    }
+    return hrec->value;
+}
+
+void bcf_hdr_set_version(bcf_hdr_t *hdr, const char *version)
+{
+    bcf_hrec_t *hrec = bcf_hdr_get_hrec(hdr, BCF_HL_GEN, "fileformat");
+    if ( !hrec )
+    {
+        int len;
+        kstring_t str = {0,0,0};
+        ksprintf(&str,"##fileformat=%s", version);
+        hrec = bcf_hdr_parse_line(hdr, str.s, &len);
+        free(str.s);
+    }
+    else
+    {
+        free(hrec->value);
+        hrec->value = strdup(version);
+    }
+    bcf_hdr_sync(hdr);
+}
+
+bcf_hdr_t *bcf_hdr_init(const char *mode)
+{
+	int i;
+	bcf_hdr_t *h;
+	h = (bcf_hdr_t*)calloc(1, sizeof(bcf_hdr_t));
+	for (i = 0; i < 3; ++i)
+		h->dict[i] = kh_init(vdict);
+    if ( strchr(mode,'w') )
+    {
+        bcf_hdr_append(h, "##fileformat=VCFv4.2");
+        // The filter PASS must appear first in the dictionary
+        bcf_hdr_append(h, "##FILTER=<ID=PASS,Description=\"All filters passed\">");
+    }
+	return h;
+}
+
+void bcf_hdr_destroy(bcf_hdr_t *h)
+{
+	int i;
+	khint_t k;
+	for (i = 0; i < 3; ++i) {
+		vdict_t *d = (vdict_t*)h->dict[i];
+		if (d == 0) continue;
+		for (k = kh_begin(d); k != kh_end(d); ++k)
+			if (kh_exist(d, k)) free((char*)kh_key(d, k));
+		kh_destroy(vdict, d);
+		free(h->id[i]);
+	}
+    for (i=0; i<h->nhrec; i++)
+        bcf_hrec_destroy(h->hrec[i]);
+    if (h->nhrec) free(h->hrec);
+    if (h->samples) free(h->samples);
+    free(h->keep_samples);
+    free(h->transl[0]); free(h->transl[1]);
+	free(h->mem.s);
+	free(h);
+}
+
+bcf_hdr_t *bcf_hdr_read(htsFile *hfp)
+{
+	if (!hfp->is_bin) 
+        return vcf_hdr_read(hfp);
+
+    BGZF *fp = hfp->fp.bgzf;
+	uint8_t magic[5];
+	bcf_hdr_t *h;
+	h = bcf_hdr_init("r");
+	if ( bgzf_read(fp, magic, 5)<0 ) 
+    {
+        fprintf(stderr,"[%s:%d %s] Failed to read the header (reading BCF in text mode?)\n", __FILE__,__LINE__,__FUNCTION__);
+        return NULL;
+    }
+	if (strncmp((char*)magic, "BCF\2\2", 5) != 0) 
+    {
+        if (!strncmp((char*)magic, "BCF", 3)) 
+            fprintf(stderr,"[%s:%d %s] invalid BCF2 magic string: only BCFv2.2 is supported.\n", __FILE__,__LINE__,__FUNCTION__);
+		else if (hts_verbose >= 2)
+			fprintf(stderr, "[E::%s] invalid BCF2 magic string\n", __func__);
+		bcf_hdr_destroy(h);
+		return 0;
+	}
+    int hlen;
+    char *htxt;
+	bgzf_read(fp, &hlen, 4);
+	htxt = (char*)malloc(hlen);
+	bgzf_read(fp, htxt, hlen);
+	bcf_hdr_parse(h, htxt);
+    free(htxt);
+	return h;
+}
+
+int bcf_hdr_write(htsFile *hfp, const bcf_hdr_t *h)
+{
+    if (!hfp->is_bin) return vcf_hdr_write(hfp, h);
+
+    int hlen;
+    char *htxt = bcf_hdr_fmt_text(h, 1, &hlen);
+    hlen++; // include the \0 byte
+
+    BGZF *fp = hfp->fp.bgzf;
+	if ( bgzf_write(fp, "BCF\2\2", 5) !=5 ) return -1;
+	if ( bgzf_write(fp, &hlen, 4) !=4 ) return -1;
+	if ( bgzf_write(fp, htxt, hlen) != hlen ) return -1;
+
+    free(htxt);
+    return 0;
+}
+
+/********************
+ *** BCF site I/O ***
+ ********************/
+
+bcf1_t *bcf_init1()
+{
+	bcf1_t *v;
+	v = (bcf1_t*)calloc(1, sizeof(bcf1_t));
+	return v;
+}
+
+void bcf_clear(bcf1_t *v)
+{
+    int i;
+    for (i=0; i<v->d.m_info; i++) 
+    {
+        if ( v->d.info[i].vptr_free ) 
+        {
+            free(v->d.info[i].vptr - v->d.info[i].vptr_off);
+            v->d.info[i].vptr_free = 0;
+        }
+    }
+    for (i=0; i<v->d.m_fmt; i++) 
+    {
+        if ( v->d.fmt[i].p_free ) 
+        {
+            free(v->d.fmt[i].p - v->d.fmt[i].p_off);
+            v->d.fmt[i].p_free = 0;
+        }
+    }
+	v->rid = v->pos = v->rlen = v->unpacked = 0;
+    v->unpack_ptr = NULL;
+	bcf_float_set_missing(v->qual);
+	v->n_info = v->n_allele = v->n_fmt = v->n_sample = 0;
+	v->shared.l = v->indiv.l = 0;
+    v->d.var_type = -1;
+    v->d.shared_dirty = 0;
+    v->d.indiv_dirty  = 0;
+    v->d.n_flt = 0;
+    v->errcode = 0;
+    if (v->d.m_als) v->d.als[0] = 0;
+    if (v->d.m_id) v->d.id[0] = 0;
+}
+
+void bcf_empty1(bcf1_t *v)
+{
+    bcf_clear1(v);
+    free(v->d.id);
+    free(v->d.als);
+	free(v->d.allele); free(v->d.flt); free(v->d.info); free(v->d.fmt);
+	if (v->d.var ) free(v->d.var);
+	free(v->shared.s); free(v->indiv.s);
+}
+
+void bcf_destroy1(bcf1_t *v)
+{
+    bcf_empty1(v);
+	free(v);
+}
+
+static inline int bcf_read1_core(BGZF *fp, bcf1_t *v)
+{
+	uint32_t x[8];
+	int ret;
+	if ((ret = bgzf_read(fp, x, 32)) != 32) {
+		if (ret == 0) return -1;
+		return -2;
+	}
+    bcf_clear1(v);
+	x[0] -= 24; // to exclude six 32-bit integers
+	ks_resize(&v->shared, x[0]);
+	ks_resize(&v->indiv, x[1]);
+	memcpy(v, x + 2, 16);
+	v->n_allele = x[6]>>16; v->n_info = x[6]&0xffff;
+	v->n_fmt = x[7]>>24; v->n_sample = x[7]&0xffffff;
+	v->shared.l = x[0], v->indiv.l = x[1];
+
+    // silent fix of broken BCFs produced by earlier versions of bcf_subset, prior to and including bd6ed8b4
+    if ( (!v->indiv.l || !v->n_sample) && v->n_fmt ) v->n_fmt = 0;
+
+	bgzf_read(fp, v->shared.s, v->shared.l);
+	bgzf_read(fp, v->indiv.s, v->indiv.l);
+	return 0;
+}
+
+#define bit_array_size(n) ((n)/8+1)
+#define bit_array_set(a,i)   ((a)[(i)/8] |=   1 << ((i)%8))
+#define bit_array_clear(a,i) ((a)[(i)/8] &= ~(1 << ((i)%8)))
+#define bit_array_test(a,i)  ((a)[(i)/8] &   (1 << ((i)%8)))
+
+static inline uint8_t *bcf_unpack_fmt_core1(uint8_t *ptr, int n_sample, bcf_fmt_t *fmt);
+int bcf_subset_format(const bcf_hdr_t *hdr, bcf1_t *rec)
+{
+    if ( !hdr->keep_samples ) return 0;
+    if ( !bcf_hdr_nsamples(hdr) )
+    {
+        rec->indiv.l = rec->n_sample = 0;
+        return 0;
+    }
+
+    int i, j;
+    uint8_t *ptr = (uint8_t*)rec->indiv.s, *dst = NULL, *src;
+    bcf_dec_t *dec = &rec->d;
+    hts_expand(bcf_fmt_t, rec->n_fmt, dec->m_fmt, dec->fmt);
+    for (i=0; i<dec->m_fmt; ++i) dec->fmt[i].p_free = 0;
+
+    for (i=0; i<rec->n_fmt; i++)
+    {
+        ptr = bcf_unpack_fmt_core1(ptr, rec->n_sample, &dec->fmt[i]);
+        src = dec->fmt[i].p - dec->fmt[i].size;
+        if ( dst )
+        {
+            memmove(dec->fmt[i-1].p + dec->fmt[i-1].p_len, dec->fmt[i].p - dec->fmt[i].p_off, dec->fmt[i].p_off);
+            dec->fmt[i].p = dec->fmt[i-1].p + dec->fmt[i-1].p_len + dec->fmt[i].p_off;
+        }
+        dst = dec->fmt[i].p;
+        for (j=0; j<hdr->nsamples_ori; j++)
+        {
+            src += dec->fmt[i].size;
+            if ( !bit_array_test(hdr->keep_samples,j) ) continue;
+            memmove(dst, src, dec->fmt[i].size);
+            dst += dec->fmt[i].size;
+        }
+        rec->indiv.l -= dec->fmt[i].p_len - (dst - dec->fmt[i].p);
+        dec->fmt[i].p_len = dst - dec->fmt[i].p;
+    }
+    rec->unpacked |= BCF_UN_FMT;
+
+    rec->n_sample = bcf_hdr_nsamples(hdr);
+    return 0;
+}
+
+int bcf_read(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v) 
+{ 
+    if (!fp->is_bin) return vcf_read(fp,h,v);
+    int ret = bcf_read1_core(fp->fp.bgzf, v);
+    if ( ret!=0 || !h->keep_samples ) return ret;
+    return bcf_subset_format(h,v);
+}
+
+int bcf_readrec(BGZF *fp, void *null, void *vv, int *tid, int *beg, int *end)
+{
+	bcf1_t *v = (bcf1_t *) vv;
+	int ret;
+	if ((ret = bcf_read1_core(fp, v)) >= 0)
+		*tid = v->rid, *beg = v->pos, *end = v->pos + v->rlen;
+	return ret;
+}
+
+static inline void bcf1_sync_id(bcf1_t *line, kstring_t *str)
+{
+    // single typed string
+    if ( line->d.id && strcmp(line->d.id, ".") ) bcf_enc_vchar(str, strlen(line->d.id), line->d.id);
+    else bcf_enc_size(str, 0, BCF_BT_CHAR);
+}
+static inline void bcf1_sync_alleles(bcf1_t *line, kstring_t *str)
+{
+    // list of typed strings
+    int i;
+    for (i=0; i<line->n_allele; i++)
+        bcf_enc_vchar(str, strlen(line->d.allele[i]), line->d.allele[i]);
+    line->rlen = line->n_allele ? strlen(line->d.allele[0]) : 0;     // beware: this neglects SV's END tag
+}
+static inline void bcf1_sync_filter(bcf1_t *line, kstring_t *str)
+{
+    // typed vector of integers
+    if ( line->d.n_flt ) bcf_enc_vint(str, line->d.n_flt, line->d.flt, -1);
+    else bcf_enc_vint(str, 0, 0, -1);
+}
+static inline void bcf1_sync_info(bcf1_t *line, kstring_t *str)
+{
+    // pairs of typed vectors
+    int i, irm = -1;
+    for (i=0; i<line->n_info; i++)
+    {
+        bcf_info_t *info = &line->d.info[i];
+        if ( !info->vptr )
+        { 
+            // marked for removal
+            if ( irm < 0 ) irm = i;
+            continue;
+        }
+        kputsn_(info->vptr - info->vptr_off, info->vptr_len + info->vptr_off, str);
+        if ( irm >=0 )
+        {
+            bcf_info_t tmp = line->d.info[irm]; line->d.info[irm] = line->d.info[i]; line->d.info[i] = tmp;
+            while ( irm<=i && line->d.info[irm].vptr ) irm++;
+        }
+    }
+    if ( irm>=0 ) line->n_info = irm;
+}
+
+static int bcf1_sync(bcf1_t *line)
+{
+    kstring_t tmp = {0,0,0};
+    if ( !line->shared.l )
+    {
+        // New line, get ready for BCF output
+        tmp = line->shared;
+        bcf1_sync_id(line, &tmp);
+        bcf1_sync_alleles(line, &tmp);
+        bcf1_sync_filter(line, &tmp);
+        bcf1_sync_info(line, &tmp);
+        line->shared = tmp;
+    }
+    else if ( line->d.shared_dirty )
+    {
+        // The line was edited, update the BCF data block, ptr_ori points
+        // to the original unchanged BCF data. 
+        uint8_t *ptr_ori = (uint8_t *) line->shared.s;
+
+        // ID: single typed string
+        if ( line->d.shared_dirty & BCF1_DIRTY_ID ) 
+            bcf1_sync_id(line, &tmp);
+        else 
+            kputsn_(ptr_ori, line->unpack_size[0], &tmp);
+        ptr_ori += line->unpack_size[0];
+
+        // REF+ALT: list of typed strings
+        if ( line->d.shared_dirty & BCF1_DIRTY_ALS  )
+            bcf1_sync_alleles(line, &tmp);
+        else
+        {
+            kputsn_(ptr_ori, line->unpack_size[1], &tmp);
+            line->rlen = line->n_allele ? strlen(line->d.allele[0]) : 0;     // beware: this neglects SV's END tag
+        }
+        ptr_ori += line->unpack_size[1];
+
+        // FILTER: typed vector of integers
+        if ( line->d.shared_dirty & BCF1_DIRTY_FLT )
+            bcf1_sync_filter(line, &tmp);
+        else if ( line->d.n_flt ) 
+            kputsn_(ptr_ori, line->unpack_size[2], &tmp);
+        else
+            bcf_enc_vint(&tmp, 0, 0, -1);
+        ptr_ori += line->unpack_size[2];
+
+        // INFO: pairs of typed vectors
+        if ( line->d.shared_dirty & BCF1_DIRTY_INF ) 
+            bcf1_sync_info(line, &tmp);
+        else
+        {
+            int size = line->shared.l - (size_t)ptr_ori + (size_t)line->shared.s;
+            kputsn_(ptr_ori, size, &tmp);
+        }
+        free(line->shared.s);
+        line->shared = tmp;
+    }
+    if ( line->n_sample && line->n_fmt && (!line->indiv.l || line->d.indiv_dirty) )
+    {
+        // The genotype fields changed or are not present
+        tmp.l = tmp.m = 0; tmp.s = NULL;
+        int i, irm = -1;
+        for (i=0; i<line->n_fmt; i++)
+        {
+            bcf_fmt_t *fmt = &line->d.fmt[i];
+            if ( !fmt->p ) 
+            { 
+                // marked for removal
+                if ( irm < 0 ) irm = i;
+                continue; 
+            }
+            kputsn_(fmt->p - fmt->p_off, fmt->p_len + fmt->p_off, &tmp);
+            if ( irm >=0 )
+            {
+                bcf_fmt_t tfmt = line->d.fmt[irm]; line->d.fmt[irm] = line->d.fmt[i]; line->d.fmt[i] = tfmt;
+                while ( irm<=i && line->d.fmt[irm].p ) irm++;
+            }
+
+        }
+        if ( irm>=0 ) line->n_fmt = irm;
+        free(line->indiv.s);
+        line->indiv = tmp;
+    }
+    if ( !line->n_sample ) line->n_fmt = 0;
+    line->d.shared_dirty = line->d.indiv_dirty = 0;
+    return 0;
+}
+
+bcf1_t *bcf_dup(bcf1_t *src)
+{
+    bcf1_sync(src);
+
+    bcf1_t *out = bcf_init1();
+    
+    out->rid  = src->rid;
+    out->pos  = src->pos;
+    out->rlen = src->rlen;
+    out->qual = src->qual;
+    out->n_info = src->n_info; out->n_allele = src->n_allele;
+    out->n_fmt = src->n_fmt; out->n_sample = src->n_sample;
+
+    out->shared.m = out->shared.l = src->shared.l;
+    out->shared.s = (char*) malloc(out->shared.l);
+    memcpy(out->shared.s,src->shared.s,out->shared.l);
+
+    out->indiv.m = out->indiv.l = src->indiv.l;
+    out->indiv.s = (char*) malloc(out->indiv.l);
+    memcpy(out->indiv.s,src->indiv.s,out->indiv.l);
+
+    return out;
+}
+
+int bcf_write(htsFile *hfp, const bcf_hdr_t *h, bcf1_t *v)
+{
+    assert( bcf_hdr_nsamples(h)==v->n_sample );
+
+    if ( !hfp->is_bin ) return vcf_write(hfp,h,v);
+
+    if ( v->errcode ) 
+    {
+        // vcf_parse1() encountered a new contig or tag, undeclared in the
+        // header.  At this point, the header must have been printed,
+        // proceeding would lead to a broken BCF file. Errors must be checked
+        // and cleared by the caller before we can proceed.
+        fprintf(stderr,"[%s:%d %s] Unchecked error (%d), exiting.\n", __FILE__,__LINE__,__FUNCTION__,v->errcode);
+        exit(1);
+    }
+    bcf1_sync(v);   // check if the BCF record was modified
+
+    BGZF *fp = hfp->fp.bgzf;
+	uint32_t x[8];
+	x[0] = v->shared.l + 24; // to include six 32-bit integers
+	x[1] = v->indiv.l;
+	memcpy(x + 2, v, 16);
+	x[6] = (uint32_t)v->n_allele<<16 | v->n_info;
+	x[7] = (uint32_t)v->n_fmt<<24 | v->n_sample;
+	if ( bgzf_write(fp, x, 32) != 32 ) return -1;
+    if ( bgzf_write(fp, v->shared.s, v->shared.l) != v->shared.l ) return -1;
+	if ( bgzf_write(fp, v->indiv.s, v->indiv.l) != v->indiv.l ) return -1;
+	return 0;
+}
+
+/**********************
+ *** VCF header I/O ***
+ **********************/
+
+bcf_hdr_t *vcf_hdr_read(htsFile *fp)
+{
+    kstring_t txt, *s = &fp->line;
+    bcf_hdr_t *h;
+    h = bcf_hdr_init("r");
+    txt.l = txt.m = 0; txt.s = 0;
+    while (hts_getline(fp, KS_SEP_LINE, s) >= 0) {
+        if (s->l == 0) continue;
+        if (s->s[0] != '#') {
+            if (hts_verbose >= 2)
+                fprintf(stderr, "[E::%s] no sample line\n", __func__);
+            free(txt.s);
+            bcf_hdr_destroy(h);
+            return 0;
+        }
+        if (s->s[1] != '#' && fp->fn_aux) { // insert contigs here
+            int dret;
+            gzFile f;
+            kstream_t *ks;
+            kstring_t tmp;
+            tmp.l = tmp.m = 0; tmp.s = 0;
+            f = gzopen(fp->fn_aux, "r");
+            ks = ks_init(f);
+            while (ks_getuntil(ks, 0, &tmp, &dret) >= 0) {
+                int c;
+                kputs("##contig=<ID=", &txt); kputs(tmp.s, &txt);
+                ks_getuntil(ks, 0, &tmp, &dret);
+                kputs(",length=", &txt); kputw(atol(tmp.s), &txt);
+                kputsn(">\n", 2, &txt);
+                if (dret != '\n')
+                    while ((c = ks_getc(ks)) != '\n' && c != -1); // skip the rest of the line
+            }
+            free(tmp.s);
+            ks_destroy(ks);
+            gzclose(f);
+        }
+        kputsn(s->s, s->l, &txt);
+        kputc('\n', &txt);
+        if (s->s[1] != '#') break;
+    }
+    if ( !txt.s ) 
+    {
+        fprintf(stderr,"[%s:%d %s] Could not read the header\n", __FILE__,__LINE__,__FUNCTION__);
+        return NULL;
+    }
+    bcf_hdr_parse(h, txt.s);
+
+    // check tabix index, are all contigs listed in the header? add the missing ones
+    tbx_t *idx = tbx_index_load(fp->fn);
+    if ( idx )
+    {
+        int i, n, need_sync = 0;
+        const char **names = tbx_seqnames(idx, &n);
+        for (i=0; i<n; i++)
+        {
+            bcf_hrec_t *hrec = bcf_hdr_get_hrec(h, BCF_DT_CTG, (char*) names[i]);
+            if ( hrec ) continue;
+            hrec = (bcf_hrec_t*) calloc(1,sizeof(bcf_hrec_t));
+            hrec->key = strdup("contig");
+            bcf_hrec_add_key(hrec, "ID", strlen("ID"));
+            bcf_hrec_set_val(hrec, hrec->nkeys-1, (char*) names[i], strlen(names[i]), 0);
+            bcf_hrec_add_key(hrec, "length", strlen("length"));
+            bcf_hrec_set_val(hrec, hrec->nkeys-1, "2147483647", strlen("2147483647"), 0);
+            bcf_hdr_add_hrec(h, hrec);
+            need_sync = 1;
+        }
+        free(names);
+        tbx_destroy(idx);
+        if ( need_sync )
+            bcf_hdr_sync(h);
+    }
+    free(txt.s);
+    return h;
+}
+
+int bcf_hdr_set(bcf_hdr_t *hdr, const char *fname)
+{
+    int i, n;
+    char **lines = hts_readlines(fname, &n);
+    if ( !lines ) return 1;
+    for (i=0; i<n-1; i++)
+    {
+        int k;
+        bcf_hrec_t *hrec = bcf_hdr_parse_line(hdr,lines[i],&k);
+        bcf_hdr_add_hrec(hdr, hrec);
+        free(lines[i]);
+    }
+    bcf_hdr_parse_sample_line(hdr,lines[n-1]);
+    free(lines[n-1]);
+    free(lines);
+    bcf_hdr_sync(hdr);
+    return 0;
+}
+
+static void _bcf_hrec_format(const bcf_hrec_t *hrec, int is_bcf, kstring_t *str)
+{
+    if ( !hrec->value )
+    {
+        int j, nout = 0;
+        ksprintf(str, "##%s=<", hrec->key);
+        for (j=0; j<hrec->nkeys; j++)
+        {
+            // do not output IDX if output is VCF
+            if ( !is_bcf && !strcmp("IDX",hrec->keys[j]) ) continue;
+            if ( nout ) kputc(',',str);
+            ksprintf(str,"%s=%s", hrec->keys[j], hrec->vals[j]);
+            nout++;
+        }
+        ksprintf(str,">\n");
+    }
+    else
+        ksprintf(str,"##%s=%s\n", hrec->key,hrec->value);
+}
+
+void bcf_hrec_format(const bcf_hrec_t *hrec, kstring_t *str)
+{
+    _bcf_hrec_format(hrec,0,str);
+}
+char *bcf_hdr_fmt_text(const bcf_hdr_t *hdr, int is_bcf, int *len)
+{
+    int i;
+    kstring_t txt = {0,0,0};
+    for (i=0; i<hdr->nhrec; i++)
+        _bcf_hrec_format(hdr->hrec[i], is_bcf, &txt);
+
+    ksprintf(&txt,"#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO");
+    if ( bcf_hdr_nsamples(hdr) )
+    {
+        ksprintf(&txt,"\tFORMAT");
+        for (i=0; i<bcf_hdr_nsamples(hdr); i++)
+            ksprintf(&txt,"\t%s", hdr->samples[i]);
+    }
+    ksprintf(&txt,"\n");
+
+    if ( len ) *len = txt.l;
+    return txt.s;
+}
+
+const char **bcf_hdr_seqnames(const bcf_hdr_t *h, int *n)
+{
+    vdict_t *d = (vdict_t*)h->dict[BCF_DT_CTG];
+    int tid, m = kh_size(d);
+    const char **names = (const char**) calloc(m,sizeof(const char*));
+    khint_t k;
+    for (k=kh_begin(d); k<kh_end(d); k++)
+    {
+        if ( !kh_exist(d,k) ) continue;
+        tid = kh_val(d,k).id;
+        assert( tid<m );
+        names[tid] = kh_key(d,k);
+    }
+    // sanity check: there should be no gaps
+    for (tid=0; tid<m; tid++)
+        assert(names[tid]);
+    *n = m;
+    return names;
+}
+
+int vcf_hdr_write(htsFile *fp, const bcf_hdr_t *h)
+{
+    int hlen;
+    char *htxt = bcf_hdr_fmt_text(h, 0, &hlen);
+    while (hlen && htxt[hlen-1] == 0) --hlen; // kill trailing zeros
+    int ret;
+    if ( fp->is_compressed==1 )
+        ret = bgzf_write(fp->fp.bgzf, htxt, hlen);
+    else
+        ret = hwrite(fp->fp.hfile, htxt, hlen);
+    free(htxt);
+    return ret<0 ? -1 : 0;
+}
+
+/***********************
+ *** Typed value I/O ***
+ ***********************/
+
+void bcf_enc_vint(kstring_t *s, int n, int32_t *a, int wsize)
+{
+	int32_t max = INT32_MIN + 1, min = INT32_MAX;
+	int i;
+	if (n == 0) bcf_enc_size(s, 0, BCF_BT_NULL);
+	else if (n == 1) bcf_enc_int1(s, a[0]);
+	else {
+		if (wsize <= 0) wsize = n;
+		for (i = 0; i < n; ++i) {
+			if (a[i] == bcf_int32_missing || a[i] == bcf_int32_vector_end ) continue;
+			if (max < a[i]) max = a[i];
+			if (min > a[i]) min = a[i];
+		}
+		if (max <= INT8_MAX && min > bcf_int8_vector_end) {
+			bcf_enc_size(s, wsize, BCF_BT_INT8);
+			for (i = 0; i < n; ++i)
+                if ( a[i]==bcf_int32_vector_end ) kputc(bcf_int8_vector_end, s);
+                else if ( a[i]==bcf_int32_missing ) kputc(bcf_int8_missing, s);
+                else kputc(a[i], s);
+		} else if (max <= INT16_MAX && min > bcf_int16_vector_end) {
+			bcf_enc_size(s, wsize, BCF_BT_INT16);
+			for (i = 0; i < n; ++i) 
+            {
+                int16_t x;
+                if ( a[i]==bcf_int32_vector_end ) x = bcf_int16_vector_end;
+                else if ( a[i]==bcf_int32_missing ) x = bcf_int16_missing;
+                else x = a[i];
+				kputsn((char*)&x, 2, s);
+			}
+		} else {
+			bcf_enc_size(s, wsize, BCF_BT_INT32);
+			for (i = 0; i < n; ++i) {
+				int32_t x = a[i];
+				kputsn((char*)&x, 4, s);
+			}
+		}
+	}
+}
+
+void bcf_enc_vfloat(kstring_t *s, int n, float *a)
+{
+	bcf_enc_size(s, n, BCF_BT_FLOAT);
+	kputsn((char*)a, n << 2, s);
+}
+
+void bcf_enc_vchar(kstring_t *s, int l, const char *a)
+{
+	bcf_enc_size(s, l, BCF_BT_CHAR);
+	kputsn(a, l, s);
+}
+
+void bcf_fmt_array(kstring_t *s, int n, int type, void *data)
+{
+	int j = 0;
+	if (n == 0) {
+		kputc('.', s);
+		return;
+	}
+    if (type == BCF_BT_CHAR) 
+    {
+        char *p = (char*)data;
+        for (j = 0; j < n && *p; ++j, ++p) 
+        {
+            if ( *p==bcf_str_missing ) kputc('.', s);
+            else kputc(*p, s);
+        }
+    }
+    else
+    {
+        #define BRANCH(type_t, is_missing, is_vector_end, kprint) { \
+            type_t *p = (type_t *) data; \
+            for (j=0; j<n; j++) \
+            { \
+                if ( is_vector_end ) break; \
+                if ( j ) kputc(',', s); \
+                if ( is_missing ) kputc('.', s); \
+                else kprint; \
+            } \
+        }
+        switch (type) {
+            case BCF_BT_INT8:  BRANCH(int8_t,  p[j]==bcf_int8_missing,  p[j]==bcf_int8_vector_end,  kputw(p[j], s)); break;
+            case BCF_BT_INT16: BRANCH(int16_t, p[j]==bcf_int16_missing, p[j]==bcf_int16_vector_end, kputw(p[j], s)); break;
+            case BCF_BT_INT32: BRANCH(int32_t, p[j]==bcf_int32_missing, p[j]==bcf_int32_vector_end, kputw(p[j], s)); break;
+            case BCF_BT_FLOAT: BRANCH(float,   bcf_float_is_missing(p[j]), bcf_float_is_vector_end(p[j]), ksprintf(s, "%g", p[j])); break;
+            default: fprintf(stderr,"todo: type %d\n", type); exit(1); break;
+        }
+        #undef BRANCH
+    }
+}
+
+uint8_t *bcf_fmt_sized_array(kstring_t *s, uint8_t *ptr)
+{
+	int x, type;
+	x = bcf_dec_size(ptr, &ptr, &type);
+	bcf_fmt_array(s, x, type, ptr);
+	return ptr + (x << bcf_type_shift[type]);
+}
+
+/********************
+ *** VCF site I/O ***
+ ********************/
+
+typedef struct {
+	int key, max_m, size, offset;
+	uint32_t is_gt:1, max_g:15, max_l:16;
+	uint32_t y;
+	uint8_t *buf;
+} fmt_aux_t;
+
+static inline void align_mem(kstring_t *s)
+{
+	if (s->l&7) {
+		uint64_t zero = 0;
+		int l = ((s->l + 7)>>3<<3) - s->l;
+		kputsn((char*)&zero, l, s);
+	}
+}
+
+// p,q is the start and the end of the FORMAT field 
+int _vcf_parse_format(kstring_t *s, const bcf_hdr_t *h, bcf1_t *v, char *p, char *q)
+{
+    if ( !bcf_hdr_nsamples(h) ) return 0;
+
+    char *r, *t;
+    int j, l, m, g;
+    khint_t k;
+    ks_tokaux_t aux1;
+    vdict_t *d = (vdict_t*)h->dict[BCF_DT_ID];
+    kstring_t *mem = (kstring_t*)&h->mem;
+    mem->l = 0;
+
+    // count the number of format fields
+    for (r = p, v->n_fmt = 1; *r; ++r)
+        if (*r == ':') ++v->n_fmt;
+    char *end = s->s + s->l;
+    if ( q>=end ) 
+    {
+        fprintf(stderr,"[%s:%d %s] Error: FORMAT column with no sample columns starting at %s:%d\n", __FILE__,__LINE__,__FUNCTION__,s->s,v->pos+1);
+        return -1;
+    }
+
+    fmt_aux_t *fmt = (fmt_aux_t*)alloca(v->n_fmt * sizeof(fmt_aux_t));
+    // get format information from the dictionary
+    for (j = 0, t = kstrtok(p, ":", &aux1); t; t = kstrtok(0, 0, &aux1), ++j) {
+        *(char*)aux1.p = 0;
+        k = kh_get(vdict, d, t);
+        if (k == kh_end(d) || kh_val(d, k).info[BCF_HL_FMT] == 15) {
+            fprintf(stderr, "[W::%s] FORMAT '%s' is not defined in the header, assuming Type=String\n", __func__, t);
+            kstring_t tmp = {0,0,0};
+            int l;
+            ksprintf(&tmp, "##FORMAT=<ID=%s,Number=1,Type=String,Description=\"Dummy\">", t);
+            bcf_hrec_t *hrec = bcf_hdr_parse_line(h,tmp.s,&l);
+            free(tmp.s);
+            if ( bcf_hdr_add_hrec((bcf_hdr_t*)h, hrec) ) bcf_hdr_sync((bcf_hdr_t*)h);
+            k = kh_get(vdict, d, t);
+            v->errcode = BCF_ERR_TAG_UNDEF;
+        }
+        fmt[j].max_l = fmt[j].max_m = fmt[j].max_g = 0;
+        fmt[j].key = kh_val(d, k).id;
+        fmt[j].is_gt = !strcmp(t, "GT");
+        fmt[j].y = h->id[0][fmt[j].key].val->info[BCF_HL_FMT];
+    }
+    // compute max
+    int n_sample_ori = -1;
+    r = q + 1;  // r: position in the format string
+    m = l = g = 1, v->n_sample = 0;  // m: max vector size, l: max field len, g: max number of alleles
+    while ( r<end )
+    {
+        // can we skip some samples?
+        if ( h->keep_samples )
+        {
+            n_sample_ori++;
+            if ( !bit_array_test(h->keep_samples,n_sample_ori) ) 
+            {
+                while ( *r!='\t' && r<end ) r++;
+                if ( *r=='\t' ) { *r = 0; r++; }
+                continue;
+            }
+        }
+
+        // collect fmt stats: max vector size, length, number of alleles
+        j = 0;  // j-th format field
+        for (;;)
+        {
+            if ( *r == '\t' ) *r = 0;
+            if ( *r == ':' || !*r )  // end of field or end of sample
+            {
+                if (fmt[j].max_m < m) fmt[j].max_m = m;
+                if (fmt[j].max_l < l - 1) fmt[j].max_l = l - 1;
+                if (fmt[j].is_gt && fmt[j].max_g < g) fmt[j].max_g = g;
+                l = 0, m = g = 1;
+                if ( *r==':' ) j++;
+                else break;
+            }
+            else if ( *r== ',' ) m++;
+            else if ( fmt[j].is_gt && (*r == '|' || *r == '/') ) g++;
+            if ( r>=end ) break;
+            r++; l++;
+        }
+        v->n_sample++;
+        if ( v->n_sample == bcf_hdr_nsamples(h) ) break;
+        r++;
+    }
+
+    // allocate memory for arrays
+    for (j = 0; j < v->n_fmt; ++j) {
+        fmt_aux_t *f = &fmt[j];
+        if ( !f->max_m ) f->max_m = 1;  // omitted trailing format field
+        if ((f->y>>4&0xf) == BCF_HT_STR) {
+            f->size = f->is_gt? f->max_g << 2 : f->max_l;
+        } else if ((f->y>>4&0xf) == BCF_HT_REAL || (f->y>>4&0xf) == BCF_HT_INT) {
+            f->size = f->max_m << 2;
+        } else 
+        {
+            fprintf(stderr, "[E::%s] the format type %d currently not supported\n", __func__, f->y>>4&0xf);
+            abort(); // I do not know how to do with Flag in the genotype fields
+        }
+        align_mem(mem);
+        f->offset = mem->l;
+        ks_resize(mem, mem->l + v->n_sample * f->size);
+        mem->l += v->n_sample * f->size;
+    }
+    for (j = 0; j < v->n_fmt; ++j)
+        fmt[j].buf = (uint8_t*)mem->s + fmt[j].offset;
+    // fill the sample fields; at beginning of the loop, t points to the first char of a format
+    n_sample_ori = -1;
+    t = q + 1; m = 0;   // m: sample id
+    while ( t<end )
+    {
+        // can we skip some samples?
+        if ( h->keep_samples )
+        {
+            n_sample_ori++;
+            if ( !bit_array_test(h->keep_samples,n_sample_ori) )
+            {
+                while ( *t && t<end ) t++;
+                t++;
+                continue;
+            }
+        }
+        if ( m == bcf_hdr_nsamples(h) ) break;
+        
+        j = 0; // j-th format field, m-th sample
+        while ( *t )
+        {
+            fmt_aux_t *z = &fmt[j];
+            if ((z->y>>4&0xf) == BCF_HT_STR) {
+                if (z->is_gt) { // genotypes
+                    int32_t is_phased = 0, *x = (int32_t*)(z->buf + z->size * m);
+                    for (l = 0;; ++t) {
+                        if (*t == '.') ++t, x[l++] = is_phased;
+                        else x[l++] = (strtol(t, &t, 10) + 1) << 1 | is_phased;
+                        #if THOROUGH_SANITY_CHECKS
+                            assert( 0 );    // success of strtol,strtod not checked
+                        #endif
+                        is_phased = (*t == '|');
+                        if (*t == ':' || *t == 0) break;
+                    }
+                    if ( !l ) x[l++] = 0;   // An empty field, insert missing value
+                    for (; l < z->size>>2; ++l) x[l] = bcf_int32_vector_end;
+                } else {
+                    char *x = (char*)z->buf + z->size * m;
+                    for (r = t, l = 0; *t != ':' && *t; ++t) x[l++] = *t;
+                    for (; l < z->size; ++l) x[l] = 0;
+                }
+            } else if ((z->y>>4&0xf) == BCF_HT_INT) {
+                int32_t *x = (int32_t*)(z->buf + z->size * m);
+                for (l = 0;; ++t) {
+                    if (*t == '.') x[l++] = bcf_int32_missing, ++t; // ++t to skip "."
+                    else x[l++] = strtol(t, &t, 10);
+                    if (*t == ':' || *t == 0) break;
+                }
+                if ( !l ) x[l++] = bcf_int32_missing;
+                for (; l < z->size>>2; ++l) x[l] = bcf_int32_vector_end;
+            } else if ((z->y>>4&0xf) == BCF_HT_REAL) {
+                float *x = (float*)(z->buf + z->size * m);
+                for (l = 0;; ++t) {
+                    if (*t == '.' && !isdigit(t[1])) bcf_float_set_missing(x[l++]), ++t; // ++t to skip "."
+                    else x[l++] = strtod(t, &t);
+                    if (*t == ':' || *t == 0) break;
+                }
+                if ( !l ) bcf_float_set_missing(x[l++]);    // An empty field, insert missing value 
+                for (; l < z->size>>2; ++l) bcf_float_set_vector_end(x[l]);
+            } else abort();
+            if (*t == 0) {
+                for (++j; j < v->n_fmt; ++j) { // fill end-of-vector values
+                    z = &fmt[j];
+                    if ((z->y>>4&0xf) == BCF_HT_STR) {
+                        if (z->is_gt) {
+                            int32_t *x = (int32_t*)(z->buf + z->size * m);
+                            x[0] = bcf_int32_missing;
+                            for (l = 1; l < z->size>>2; ++l) x[l] = bcf_int32_vector_end;
+                        } else {
+                            char *x = (char*)z->buf + z->size * m;
+                            if ( z->size ) x[0] = '.';
+                            for (l = 1; l < z->size; ++l) x[l] = 0;
+                        }
+                    } else if ((z->y>>4&0xf) == BCF_HT_INT) {
+                        int32_t *x = (int32_t*)(z->buf + z->size * m);
+                        x[0] = bcf_int32_missing;
+                        for (l = 1; l < z->size>>2; ++l) x[l] = bcf_int32_vector_end;
+                    } else if ((z->y>>4&0xf) == BCF_HT_REAL) {
+                        float *x = (float*)(z->buf + z->size * m);
+                        bcf_float_set_missing(x[0]);
+                        for (l = 1; l < z->size>>2; ++l) bcf_float_set_vector_end(x[l]);
+                    }
+                }
+                break;
+            } 
+            else 
+            {
+                if (*t == ':') ++j;
+                t++;
+            }
+        }
+        m++; t++;
+    }
+
+	// write individual genotype information
+	kstring_t *str = &v->indiv;
+    int i;
+	if (v->n_sample > 0) {
+		for (i = 0; i < v->n_fmt; ++i) {
+			fmt_aux_t *z = &fmt[i];
+			bcf_enc_int1(str, z->key);
+			if ((z->y>>4&0xf) == BCF_HT_STR && !z->is_gt) {
+				bcf_enc_size(str, z->size, BCF_BT_CHAR);
+				kputsn((char*)z->buf, z->size * v->n_sample, str);
+			} else if ((z->y>>4&0xf) == BCF_HT_INT || z->is_gt) {
+				bcf_enc_vint(str, (z->size>>2) * v->n_sample, (int32_t*)z->buf, z->size>>2);
+			} else {
+				bcf_enc_size(str, z->size>>2, BCF_BT_FLOAT);
+				kputsn((char*)z->buf, z->size * v->n_sample, str);
+			}
+		}
+	}
+    return 0;
+}
+
+int vcf_parse(kstring_t *s, const bcf_hdr_t *h, bcf1_t *v)
+{
+	int i = 0;
+	char *p, *q, *r, *t;
+	kstring_t *str;
+	khint_t k;
+	ks_tokaux_t aux;
+
+    bcf_clear1(v);
+	str = &v->shared;
+	memset(&aux, 0, sizeof(ks_tokaux_t));
+	for (p = kstrtok(s->s, "\t", &aux), i = 0; p; p = kstrtok(0, 0, &aux), ++i) {
+		q = (char*)aux.p;
+		*q = 0;
+		if (i == 0) { // CHROM
+			vdict_t *d = (vdict_t*)h->dict[BCF_DT_CTG];
+			k = kh_get(vdict, d, p);
+			if (k == kh_end(d)) 
+            {
+                // Simple error recovery for chromosomes not defined in the header. It will not help when VCF header has
+                // been already printed, but will enable tools like vcfcheck to proceed.
+                fprintf(stderr, "[W::%s] contig '%s' is not defined in the header. (Quick workaround: index the file with tabix.)\n", __func__, p);
+                kstring_t tmp = {0,0,0};
+                int l;
+                ksprintf(&tmp, "##contig=<ID=%s,length=2147483647>", p);
+                bcf_hrec_t *hrec = bcf_hdr_parse_line(h,tmp.s,&l);
+                free(tmp.s);
+                if ( bcf_hdr_add_hrec((bcf_hdr_t*)h, hrec) ) bcf_hdr_sync((bcf_hdr_t*)h);
+                k = kh_get(vdict, d, p);
+                v->errcode = BCF_ERR_CTG_UNDEF;
+			}
+            v->rid = kh_val(d, k).id;
+		} else if (i == 1) { // POS
+			v->pos = atoi(p) - 1;
+		} else if (i == 2) { // ID
+			if (strcmp(p, ".")) bcf_enc_vchar(str, q - p, p);
+			else bcf_enc_size(str, 0, BCF_BT_CHAR);
+		} else if (i == 3) { // REF
+			bcf_enc_vchar(str, q - p, p);
+			v->n_allele = 1, v->rlen = q - p;
+		} else if (i == 4) { // ALT
+			if (strcmp(p, ".")) {
+				for (r = t = p;; ++r) {
+					if (*r == ',' || *r == 0) {
+						bcf_enc_vchar(str, r - t, t);
+						t = r + 1;
+						++v->n_allele;
+					}
+					if (r == q) break;
+				}
+			}
+		} else if (i == 5) { // QUAL
+			if (strcmp(p, ".")) v->qual = atof(p);
+			else memcpy(&v->qual, &bcf_float_missing, 4);
+            if ( v->max_unpack && !(v->max_unpack>>1) ) return 0; // BCF_UN_STR
+		} else if (i == 6) { // FILTER
+			if (strcmp(p, ".")) {
+				int32_t *a;
+				int n_flt = 1, i;
+				ks_tokaux_t aux1;
+				vdict_t *d = (vdict_t*)h->dict[BCF_DT_ID];
+				// count the number of filters
+				if (*(q-1) == ';') *(q-1) = 0;
+				for (r = p; *r; ++r)
+					if (*r == ';') ++n_flt;
+				a = (int32_t*)alloca(n_flt * 4);
+				// add filters
+				for (t = kstrtok(p, ";", &aux1), i = 0; t; t = kstrtok(0, 0, &aux1)) {
+					*(char*)aux1.p = 0;
+					k = kh_get(vdict, d, t);
+					if (k == kh_end(d)) 
+                    {
+                        // Simple error recovery for FILTERs not defined in the header. It will not help when VCF header has
+                        // been already printed, but will enable tools like vcfcheck to proceed.
+                        fprintf(stderr, "[W::%s] FILTER '%s' is not defined in the header\n", __func__, t);
+                        kstring_t tmp = {0,0,0};
+                        int l;
+                        ksprintf(&tmp, "##FILTER=<ID=%s,Description=\"Dummy\">", t);
+                        bcf_hrec_t *hrec = bcf_hdr_parse_line(h,tmp.s,&l);
+                        free(tmp.s);
+                        if ( bcf_hdr_add_hrec((bcf_hdr_t*)h, hrec) ) bcf_hdr_sync((bcf_hdr_t*)h);
+                        k = kh_get(vdict, d, t);
+                        v->errcode = BCF_ERR_TAG_UNDEF;
+                    }
+					a[i++] = kh_val(d, k).id;
+				}
+				n_flt = i;
+				bcf_enc_vint(str, n_flt, a, -1);
+			} else bcf_enc_vint(str, 0, 0, -1);
+            if ( v->max_unpack && !(v->max_unpack>>2) ) return 0;    // BCF_UN_FLT
+		} else if (i == 7) { // INFO
+			char *key;
+			vdict_t *d = (vdict_t*)h->dict[BCF_DT_ID];
+			v->n_info = 0;
+			if (strcmp(p, ".")) {
+				if (*(q-1) == ';') *(q-1) = 0;
+				for (r = key = p;; ++r) {
+					int c;
+					char *val, *end;
+					if (*r != ';' && *r != '=' && *r != 0) continue;
+					val = end = 0;
+					c = *r; *r = 0;
+					if (c == '=') {
+						val = r + 1;
+						for (end = val; *end != ';' && *end != 0; ++end);
+						c = *end; *end = 0;
+					} else end = r;
+					k = kh_get(vdict, d, key);
+					if (k == kh_end(d) || kh_val(d, k).info[BCF_HL_INFO] == 15) 
+                    {
+                        fprintf(stderr, "[W::%s] INFO '%s' is not defined in the header, assuming Type=String\n", __func__, key);
+                        kstring_t tmp = {0,0,0};
+                        int l;
+                        ksprintf(&tmp, "##INFO=<ID=%s,Number=1,Type=String,Description=\"Dummy\">", key);
+                        bcf_hrec_t *hrec = bcf_hdr_parse_line(h,tmp.s,&l);
+                        free(tmp.s);
+                        if ( bcf_hdr_add_hrec((bcf_hdr_t*)h, hrec) ) bcf_hdr_sync((bcf_hdr_t*)h);
+                        k = kh_get(vdict, d, key);
+                        v->errcode = BCF_ERR_TAG_UNDEF;
+                    }
+                    uint32_t y = kh_val(d, k).info[BCF_HL_INFO];
+                    ++v->n_info;
+                    bcf_enc_int1(str, kh_val(d, k).id);
+                    if (val == 0) {
+                        bcf_enc_size(str, 0, BCF_BT_NULL);
+                    } else if ((y>>4&0xf) == BCF_HT_FLAG || (y>>4&0xf) == BCF_HT_STR) { // if Flag has a value, treat it as a string
+                        bcf_enc_vchar(str, end - val, val);
+                    } else { // int/float value/array
+                        int i, n_val;
+                        char *t, *te;
+                        for (t = val, n_val = 1; *t; ++t) // count the number of values
+                            if (*t == ',') ++n_val;
+                        if ((y>>4&0xf) == BCF_HT_INT) {
+                            int32_t *z;
+                            z = (int32_t*)alloca(n_val<<2);
+                            for (i = 0, t = val; i < n_val; ++i, ++t)
+                            {
+                                z[i] = strtol(t, &te, 10);
+                                if ( te==t ) // conversion failed
+                                {
+                                    z[i] = bcf_int32_missing;
+                                    while ( *te && *te!=',' ) te++;
+                                }
+                                t = te;
+                            }
+                            bcf_enc_vint(str, n_val, z, -1);
+                            if (strcmp(key, "END") == 0) v->rlen = z[0] - v->pos;
+                        } else if ((y>>4&0xf) == BCF_HT_REAL) {
+                            float *z;
+                            z = (float*)alloca(n_val<<2);
+                            for (i = 0, t = val; i < n_val; ++i, ++t)
+                            {
+                                z[i] = strtod(t, &te);
+                                if ( te==t ) // conversion failed
+                                {
+                                    bcf_float_set_missing(z[i]);
+                                    while ( *te && *te!=',' ) te++;
+                                }
+                                t = te;
+                            }
+                            bcf_enc_vfloat(str, n_val, z);
+                        }
+                    }
+                    if (c == 0) break;
+                    r = end;
+                    key = r + 1;
+                }
+            }
+            if ( v->max_unpack && !(v->max_unpack>>3) ) return 0; 
+		} else if (i == 8) // FORMAT
+            return _vcf_parse_format(s, h, v, p, q);
+	}
+	return 0;
+}
+
+int vcf_read(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v)
+{
+    int ret;
+    ret = hts_getline(fp, KS_SEP_LINE, &fp->line);
+    if (ret < 0) return -1;
+    return vcf_parse1(&fp->line, h, v);
+}
+
+static inline uint8_t *bcf_unpack_fmt_core1(uint8_t *ptr, int n_sample, bcf_fmt_t *fmt)
+{
+    uint8_t *ptr_start = ptr;
+    fmt->id = bcf_dec_typed_int1(ptr, &ptr);
+    fmt->n = bcf_dec_size(ptr, &ptr, &fmt->type);
+    fmt->size = fmt->n << bcf_type_shift[fmt->type];
+    fmt->p = ptr;
+    fmt->p_off  = ptr - ptr_start;
+    fmt->p_free = 0;
+    ptr += n_sample * fmt->size;
+    fmt->p_len = ptr - fmt->p;
+    return ptr;
+}
+
+static inline uint8_t *bcf_unpack_info_core1(uint8_t *ptr, bcf_info_t *info)
+{
+    uint8_t *ptr_start = ptr;
+    info->key = bcf_dec_typed_int1(ptr, &ptr);
+    info->len = bcf_dec_size(ptr, &ptr, &info->type);
+    info->vptr = ptr;
+    info->vptr_off  = ptr - ptr_start;
+    info->vptr_free = 0;
+    info->v1.i = 0;
+    if (info->len == 1) {
+        if (info->type == BCF_BT_INT8 || info->type == BCF_BT_CHAR) info->v1.i = *(int8_t*)ptr;
+        else if (info->type == BCF_BT_INT32) info->v1.i = *(int32_t*)ptr;
+        else if (info->type == BCF_BT_FLOAT) info->v1.f = *(float*)ptr;
+        else if (info->type == BCF_BT_INT16) info->v1.i = *(int16_t*)ptr;
+    }
+    ptr += info->len << bcf_type_shift[info->type];
+    info->vptr_len = ptr - info->vptr;
+    return ptr;
+}
+
+int bcf_unpack(bcf1_t *b, int which)
+{
+    if ( !b->shared.l ) return 0; // Building a new BCF record from scratch
+	uint8_t *ptr = (uint8_t*)b->shared.s, *ptr_ori;
+	int *offset, i;
+	bcf_dec_t *d = &b->d;
+	if (which & BCF_UN_FLT) which |= BCF_UN_STR;
+	if (which & BCF_UN_INFO) which |= BCF_UN_SHR;
+	if ((which&BCF_UN_STR) && !(b->unpacked&BCF_UN_STR)) 
+    { 
+        kstring_t tmp; 
+
+        // ID
+        tmp.l = 0; tmp.s = d->id; tmp.m = d->m_id;
+        ptr_ori = ptr;
+        ptr = bcf_fmt_sized_array(&tmp, ptr); 
+        b->unpack_size[0] = ptr - ptr_ori;
+        kputc('\0', &tmp);
+        d->id = tmp.s; d->m_id = tmp.m;
+
+        // REF and ALT are in a single block (d->als) and d->alleles are pointers into this block
+        tmp.l = 0; tmp.s = d->als; tmp.m = d->m_als;
+        offset = (int*)alloca(b->n_allele * sizeof(int));
+        ptr_ori = ptr;
+        for (i = 0; i < b->n_allele; ++i) {
+            offset[i] = tmp.l;
+            ptr = bcf_fmt_sized_array(&tmp, ptr);
+            kputc('\0', &tmp);
+        }
+        b->unpack_size[1] = ptr - ptr_ori;
+        d->als = tmp.s; d->m_als = tmp.m;
+
+        hts_expand(char*, b->n_allele, d->m_allele, d->allele); // NM: hts_expand() is a macro
+        for (i = 0; i < b->n_allele; ++i)
+            d->allele[i] = d->als + offset[i];
+        b->unpack_ptr = ptr;
+        b->unpacked |= BCF_UN_STR;
+	}
+	if ((which&BCF_UN_FLT) && !(b->unpacked&BCF_UN_FLT)) { // FILTER
+		ptr = b->unpack_ptr;
+        ptr_ori = ptr;
+		if (*ptr>>4) {
+			int type;
+			d->n_flt = bcf_dec_size(ptr, &ptr, &type);
+			hts_expand(int, d->n_flt, d->m_flt, d->flt);
+			for (i = 0; i < d->n_flt; ++i)
+				d->flt[i] = bcf_dec_int1(ptr, type, &ptr);
+		} else ++ptr, d->n_flt = 0;
+        b->unpack_size[2] = ptr - ptr_ori;
+		b->unpack_ptr = ptr;
+		b->unpacked |= BCF_UN_FLT;
+	}
+	if ((which&BCF_UN_INFO) && !(b->unpacked&BCF_UN_INFO)) { // INFO
+		ptr = b->unpack_ptr;
+		hts_expand(bcf_info_t, b->n_info, d->m_info, d->info);
+	    for (i = 0; i < d->m_info; ++i) d->info[i].vptr_free = 0;
+	    for (i = 0; i < b->n_info; ++i)
+            ptr = bcf_unpack_info_core1(ptr, &d->info[i]);
+		b->unpacked |= BCF_UN_INFO;
+	}
+	if ((which&BCF_UN_FMT) && b->n_sample && !(b->unpacked&BCF_UN_FMT)) { // FORMAT
+        ptr = (uint8_t*)b->indiv.s;
+		hts_expand(bcf_fmt_t, b->n_fmt, d->m_fmt, d->fmt);
+        for (i = 0; i < d->m_fmt; ++i) d->fmt[i].p_free = 0;
+        for (i = 0; i < b->n_fmt; ++i)
+            ptr = bcf_unpack_fmt_core1(ptr, b->n_sample, &d->fmt[i]);
+		b->unpacked |= BCF_UN_FMT;
+	}
+	return 0;
+}
+
+int vcf_format(const bcf_hdr_t *h, const bcf1_t *v, kstring_t *s)
+{
+	int i;
+	bcf_unpack((bcf1_t*)v, BCF_UN_ALL);
+	kputs(h->id[BCF_DT_CTG][v->rid].key, s); // CHROM
+	kputc('\t', s); kputw(v->pos + 1, s); // POS
+	kputc('\t', s); kputs(v->d.id ? v->d.id : ".", s); // ID
+	kputc('\t', s); // REF
+	if (v->n_allele > 0) kputs(v->d.allele[0], s);
+	else kputc('.', s);
+	kputc('\t', s); // ALT
+	if (v->n_allele > 1) {
+		for (i = 1; i < v->n_allele; ++i) {
+			if (i > 1) kputc(',', s);
+			kputs(v->d.allele[i], s);
+		}
+	} else kputc('.', s);
+	kputc('\t', s); // QUAL
+	if (memcmp(&v->qual, &bcf_float_missing, 4) == 0) kputc('.', s); // QUAL
+	else ksprintf(s, "%g", v->qual);
+	kputc('\t', s); // FILTER
+	if (v->d.n_flt) {
+		for (i = 0; i < v->d.n_flt; ++i) {
+			if (i) kputc(';', s);
+			kputs(h->id[BCF_DT_ID][v->d.flt[i]].key, s);
+		}
+	} else kputc('.', s);
+	kputc('\t', s); // INFO
+	if (v->n_info) {
+        int first = 1;
+		for (i = 0; i < v->n_info; ++i) {
+			bcf_info_t *z = &v->d.info[i];
+            if ( !z->vptr ) continue;
+			if ( !first ) kputc(';', s); first = 0;
+			kputs(h->id[BCF_DT_ID][z->key].key, s);
+			if (z->len <= 0) continue;
+			kputc('=', s);
+			if (z->len == 1) {
+				if (z->type == BCF_BT_FLOAT) ksprintf(s, "%g", z->v1.f);
+				else if (z->type != BCF_BT_CHAR) kputw(z->v1.i, s);
+				else kputc(z->v1.i, s);
+			} else bcf_fmt_array(s, z->len, z->type, z->vptr);
+		}
+        if ( first ) kputc('.', s);
+	} else kputc('.', s);
+	// FORMAT and individual information
+	if (v->n_sample)
+    {
+        int i,j;
+        if ( v->n_fmt) 
+        {
+            int gt_i = -1;
+            bcf_fmt_t *fmt = v->d.fmt;
+            int first = 1;
+            for (i = 0; i < (int)v->n_fmt; ++i) {
+                if ( !fmt[i].p ) continue;
+                kputc(!first ? ':' : '\t', s); first = 0;
+                if ( fmt[i].id<0 ) //!bcf_hdr_idinfo_exists(h,BCF_HL_FMT,fmt[i].id) ) 
+                {
+                    fprintf(stderr, "[E::%s] invalid BCF, the FORMAT tag id=%d not present in the header.\n", __func__, fmt[i].id);
+                    abort();
+                }
+                kputs(h->id[BCF_DT_ID][fmt[i].id].key, s);
+                if (strcmp(h->id[BCF_DT_ID][fmt[i].id].key, "GT") == 0) gt_i = i;
+            }
+            if ( first ) kputs("\t.", s);
+            for (j = 0; j < v->n_sample; ++j) {
+                kputc('\t', s);
+                first = 1;
+                for (i = 0; i < (int)v->n_fmt; ++i) {
+                    bcf_fmt_t *f = &fmt[i];
+                    if ( !f->p ) continue;
+                    if (!first) kputc(':', s); first = 0;
+                    if (gt_i == i)
+                        bcf_format_gt(f,j,s);
+                    else
+                        bcf_fmt_array(s, f->n, f->type, f->p + j * f->size);
+                }
+                if ( first ) kputc('.', s);
+            }
+        }
+        else
+            for (j=0; j<=v->n_sample; j++)
+                kputs("\t.", s);
+	}
+    kputc('\n', s);
+	return 0;
+}
+
+int vcf_write_line(htsFile *fp, kstring_t *line)
+{
+    int ret;
+    if ( line->s[line->l-1]!='\n' ) kputc('\n',line);
+    if ( fp->is_compressed==1 )
+        ret = bgzf_write(fp->fp.bgzf, line->s, line->l);
+    else
+        ret = hwrite(fp->fp.hfile, line->s, line->l);
+    return ret==line->l ? 0 : -1;
+}
+
+int vcf_write(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v)
+{
+    int ret;
+    fp->line.l = 0;
+    vcf_format1(h, v, &fp->line);
+    if ( fp->is_compressed==1 )
+        ret = bgzf_write(fp->fp.bgzf, fp->line.s, fp->line.l);
+    else
+        ret = hwrite(fp->fp.hfile, fp->line.s, fp->line.l);
+    return ret==fp->line.l ? 0 : -1;
+}
+
+/************************
+ * Data access routines *
+ ************************/
+
+int bcf_hdr_id2int(const bcf_hdr_t *h, int which, const char *id)
+{
+	khint_t k;
+	vdict_t *d = (vdict_t*)h->dict[which];
+	k = kh_get(vdict, d, id);
+	return k == kh_end(d)? -1 : kh_val(d, k).id;
+}
+
+
+/********************
+ *** BCF indexing ***
+ ********************/
+
+hts_idx_t *bcf_index(htsFile *fp, int min_shift)
+{
+	int n_lvls, i;
+	bcf1_t *b;
+	hts_idx_t *idx;
+	bcf_hdr_t *h;
+	int64_t max_len = 0, s;
+	h = bcf_hdr_read(fp);
+    if ( !h ) return NULL;
+    int nids = 0;
+	for (i = 0; i < h->n[BCF_DT_CTG]; ++i)
+    {
+        if ( !h->id[BCF_DT_CTG][i].val ) continue;
+		if ( max_len < h->id[BCF_DT_CTG][i].val->info[0] ) max_len = h->id[BCF_DT_CTG][i].val->info[0];
+        nids++;
+    }
+    if ( !max_len ) max_len = ((int64_t)1<<31) - 1;  // In case contig line is broken.
+	max_len += 256;
+	for (n_lvls = 0, s = 1<<min_shift; max_len > s; ++n_lvls, s <<= 3);
+	idx = hts_idx_init(nids, HTS_FMT_CSI, bgzf_tell(fp->fp.bgzf), min_shift, n_lvls);
+	b = bcf_init1();
+	while (bcf_read1(fp,h, b) >= 0) {
+		int ret;
+		ret = hts_idx_push(idx, b->rid, b->pos, b->pos + b->rlen, bgzf_tell(fp->fp.bgzf), 1);
+		if (ret < 0)
+        {
+            bcf_destroy1(b);
+            hts_idx_destroy(idx);
+            return NULL;
+        }
+	}
+	hts_idx_finish(idx, bgzf_tell(fp->fp.bgzf));
+	bcf_destroy1(b);
+	bcf_hdr_destroy(h);
+	return idx;
+}
+
+int bcf_index_build(const char *fn, int min_shift)
+{
+    htsFile *fp;
+	hts_idx_t *idx;
+	if ((fp = hts_open(fn, "rb")) == 0) return -1;
+    if ( !fp->fp.bgzf->is_compressed ) { hts_close(fp); return -1; }
+	idx = bcf_index(fp, min_shift);
+	hts_close(fp);
+    if ( !idx ) return -1;
+	hts_idx_save(idx, fn, HTS_FMT_CSI);
+	hts_idx_destroy(idx);
+	return 0;
+}
+
+/*****************
+ *** Utilities ***
+ *****************/
+
+void bcf_hdr_combine(bcf_hdr_t *dst, const bcf_hdr_t *src)
+{
+    int i, ndst_ori = dst->nhrec, need_sync = 0;
+    for (i=0; i<src->nhrec; i++)
+    {
+        if ( src->hrec[i]->type==BCF_HL_GEN && src->hrec[i]->value )
+        {
+            int j;
+            for (j=0; j<ndst_ori; j++)
+            {
+                if ( dst->hrec[j]->type!=BCF_HL_GEN ) continue;
+                if ( !strcmp(src->hrec[i]->key,dst->hrec[j]->key) && !strcmp(src->hrec[i]->value,dst->hrec[j]->value) ) break;
+            }
+            if ( j>=ndst_ori )
+                need_sync += bcf_hdr_add_hrec(dst, bcf_hrec_dup(src->hrec[i]));
+        }
+        else
+        {
+            bcf_hrec_t *rec = bcf_hdr_get_hrec(dst, src->hrec[i]->type, src->hrec[i]->vals[0]);
+            if ( !rec )
+                need_sync += bcf_hdr_add_hrec(dst, bcf_hrec_dup(src->hrec[i]));
+        }
+    }
+    if ( need_sync ) bcf_hdr_sync(dst);
+}
+int bcf_translate(const bcf_hdr_t *dst_hdr, bcf_hdr_t *src_hdr, bcf1_t *line)
+{
+    int i;
+    if ( line->errcode )
+    {
+        fprintf(stderr,"[%s:%d %s] Unchecked error (%d), exiting.\n", __FILE__,__LINE__,__FUNCTION__,line->errcode);
+        exit(1);
+    }
+    if ( src_hdr->ntransl==-1 ) return 0;    // no need to translate, all tags have the same id
+    if ( !src_hdr->ntransl )  // called for the first time, see what needs translating
+    {
+        int dict;
+        for (dict=0; dict<2; dict++)    // BCF_DT_ID and BCF_DT_CTG
+        {
+            src_hdr->transl[dict] = (int*) malloc(src_hdr->n[dict]*sizeof(int));
+            for (i=0; i<src_hdr->n[dict]; i++)
+            {
+                if ( i>=dst_hdr->n[dict] || strcmp(src_hdr->id[dict][i].key,dst_hdr->id[dict][i].key) )
+                {
+                    src_hdr->transl[dict][i] = bcf_hdr_id2int(dst_hdr,dict,src_hdr->id[dict][i].key);
+                    src_hdr->ntransl++;
+                }
+                else
+                    src_hdr->transl[dict][i] = -1;
+            }
+        }
+        if ( !src_hdr->ntransl )
+        {
+            free(src_hdr->transl[0]); src_hdr->transl[0] = NULL;
+            free(src_hdr->transl[1]); src_hdr->transl[1] = NULL;
+            src_hdr->ntransl = -1;
+        }
+        if ( src_hdr->ntransl==-1 ) return 0;
+    }
+    bcf_unpack(line,BCF_UN_ALL);
+
+    // CHROM 
+    if ( src_hdr->transl[BCF_DT_CTG][line->rid] >=0 ) line->rid = src_hdr->transl[BCF_DT_CTG][line->rid];
+
+    // FILTER
+    for (i=0; i<line->d.n_flt; i++)
+    {
+        int src_id = line->d.flt[i];
+        if ( src_hdr->transl[BCF_DT_ID][src_id] >=0 ) 
+            line->d.flt[i] = src_hdr->transl[BCF_DT_ID][src_id];
+    }
+
+    // INFO
+    for (i=0; i<line->n_info; i++)
+    {
+        int src_id = line->d.info[i].key;
+        int dst_id = src_hdr->transl[BCF_DT_ID][src_id];
+        if ( dst_id<0 ) continue;
+        int src_size = src_id>>7 ? ( src_id>>15 ? BCF_BT_INT32 : BCF_BT_INT16) : BCF_BT_INT8;
+        int dst_size = dst_id>>7 ? ( dst_id>>15 ? BCF_BT_INT32 : BCF_BT_INT16) : BCF_BT_INT8;
+        if ( src_size==dst_size )   // can overwrite
+        {
+            line->d.info[i].key = dst_id;
+            uint8_t *vptr = line->d.info[i].vptr - line->d.info[i].vptr_off;
+            if ( dst_size==BCF_BT_INT8 ) { vptr[1] = (uint8_t)dst_id; }
+            else if ( dst_size==BCF_BT_INT16 ) { *(uint16_t*)vptr = (uint16_t)dst_id; }
+            else { *(uint32_t*)vptr = (uint32_t)dst_id; }
+        }
+        else    // must realloc
+        {
+            bcf_info_t *info = &line->d.info[i];
+            assert( !info->vptr_free );
+            kstring_t str = {0,0,0};
+            bcf_enc_int1(&str, dst_id);
+            info->vptr_off = str.l;
+            kputsn((char*)info->vptr, info->vptr_len, &str);
+            info->vptr = (uint8_t*)str.s + info->vptr_off;
+            info->vptr_free = 1;
+            info->key = dst_id;
+            line->d.shared_dirty |= BCF1_DIRTY_INF;
+        }
+    }
+
+    // FORMAT
+    for (i=0; i<line->n_fmt; i++)
+    {
+        int src_id = line->d.fmt[i].id;
+        int dst_id = src_hdr->transl[BCF_DT_ID][src_id];
+        if ( dst_id<0 ) continue;
+        int src_size = src_id>>7 ? ( src_id>>15 ? BCF_BT_INT32 : BCF_BT_INT16) : BCF_BT_INT8;
+        int dst_size = dst_id>>7 ? ( dst_id>>15 ? BCF_BT_INT32 : BCF_BT_INT16) : BCF_BT_INT8;
+        if ( src_size==dst_size )   // can overwrite
+        {
+            line->d.fmt[i].id = dst_id;
+            uint8_t *p = line->d.fmt[i].p - line->d.fmt[i].p_off;    // pointer to the vector size (4bits) and BT type (4bits)
+            if ( dst_size==BCF_BT_INT8 ) { p[1] = dst_id; }
+            else if ( dst_size==BCF_BT_INT16 ) { uint8_t *x = (uint8_t*) &dst_id; p[1] = x[0]; p[2] = x[1]; }
+            else { uint8_t *x = (uint8_t*) &dst_id; p[1] = x[0]; p[2] = x[1]; p[3] = x[2]; p[4] = x[3]; }
+        }
+        else    // must realloc
+        {
+            bcf_fmt_t *fmt = &line->d.fmt[i];
+            assert( !fmt->p_free );
+            kstring_t str = {0,0,0};
+            bcf_enc_int1(&str, dst_id);
+            fmt->p_off = str.l;
+            kputsn((char*)fmt->p, fmt->p_len, &str);
+            fmt->p = (uint8_t*)str.s + fmt->p_off;
+            fmt->p_free = 1;
+            fmt->id = dst_id;
+            line->d.indiv_dirty = 1;
+        }
+    }
+    return 0;
+}
+
+bcf_hdr_t *bcf_hdr_dup(const bcf_hdr_t *hdr)
+{
+    bcf_hdr_t *hout = bcf_hdr_init("r");
+    char *htxt = bcf_hdr_fmt_text(hdr, 1, NULL);
+    bcf_hdr_parse(hout, htxt);
+    free(htxt);
+    return hout;
+}
+
+bcf_hdr_t *bcf_hdr_subset(const bcf_hdr_t *h0, int n, char *const* samples, int *imap)
+{
+    int hlen;
+    char *htxt = bcf_hdr_fmt_text(h0, 1, &hlen);
+	kstring_t str;
+	bcf_hdr_t *h;
+	str.l = str.m = 0; str.s = 0;
+	h = bcf_hdr_init("w");
+    bcf_hdr_set_version(h,bcf_hdr_get_version(h0));
+    int j;
+    for (j=0; j<n; j++) imap[j] = -1;
+	if ( bcf_hdr_nsamples(h0) > 0) {
+		char *p;
+		int i = 0, end = n? 8 : 7;
+		while ((p = strstr(htxt, "#CHROM\t")) != 0)
+			if (p > htxt && *(p-1) == '\n') break;
+		while ((p = strchr(p, '\t')) != 0 && i < end) ++i, ++p;
+		if (i != end) {
+			free(h); free(str.s);
+			return 0; // malformated header
+		}
+		kputsn(htxt, p - htxt, &str);
+		for (i = 0; i < n; ++i) {
+			imap[i] = bcf_hdr_id2int(h0, BCF_DT_SAMPLE, samples[i]);
+			if (imap[i] < 0) continue;
+			kputc('\t', &str);
+			kputs(samples[i], &str);
+		}
+	} else kputsn(htxt, hlen, &str);
+    while (str.l && (!str.s[str.l-1] || str.s[str.l-1]=='\n') ) str.l--; // kill trailing zeros and newlines
+    kputc('\n',&str);
+	bcf_hdr_parse(h, str.s);
+    free(str.s);
+    free(htxt);
+	return h;
+}
+
+int bcf_hdr_set_samples(bcf_hdr_t *hdr, const char *samples, int is_file)
+{
+    if ( samples && !strcmp("-",samples) ) return 0;            // keep all samples 
+
+    hdr->nsamples_ori = bcf_hdr_nsamples(hdr);
+    if ( !samples ) { bcf_hdr_nsamples(hdr) = 0; return 0; }    // exclude all samples
+
+    int i, narr = bit_array_size(bcf_hdr_nsamples(hdr));
+    hdr->keep_samples = (uint8_t*) calloc(narr,1);
+    if ( samples[0]=='^' )
+        for (i=0; i<bcf_hdr_nsamples(hdr); i++) bit_array_set(hdr->keep_samples,i);
+
+    int idx, n, ret = 0;
+    char **smpls = hts_readlist(samples[0]=='^'?samples+1:samples, is_file, &n);
+    if ( !smpls ) return -1;
+    for (i=0; i<n; i++)
+    {
+        idx = bcf_hdr_id2int(hdr,BCF_DT_SAMPLE,smpls[i]);
+        if ( idx<0 ) 
+        { 
+            if ( !ret ) ret = i+1;
+            continue; 
+        }
+        assert( idx<bcf_hdr_nsamples(hdr) );
+        if (  samples[0]=='^' ) 
+            bit_array_clear(hdr->keep_samples, idx);
+        else 
+            bit_array_set(hdr->keep_samples, idx);
+    }
+    for (i=0; i<n; i++) free(smpls[i]);
+    free(smpls);
+
+    bcf_hdr_nsamples(hdr) = 0;
+    for (i=0; i<hdr->nsamples_ori; i++) 
+        if ( bit_array_test(hdr->keep_samples,i) ) bcf_hdr_nsamples(hdr)++;
+    if ( !bcf_hdr_nsamples(hdr) ) { free(hdr->keep_samples); hdr->keep_samples=NULL; }
+    else
+    {
+        char **samples = (char**) malloc(sizeof(char*)*bcf_hdr_nsamples(hdr));
+        idx = 0;
+        for (i=0; i<hdr->nsamples_ori; i++) 
+            if ( bit_array_test(hdr->keep_samples,i) ) samples[idx++] = strdup(hdr->samples[i]);
+        free(hdr->samples);
+        hdr->samples = samples;
+
+        // delete original samples from the dictionary
+        vdict_t *d = (vdict_t*)hdr->dict[BCF_DT_SAMPLE];
+        int k;
+        for (k = kh_begin(d); k != kh_end(d); ++k)
+            if (kh_exist(d, k)) free((char*)kh_key(d, k));
+        kh_destroy(vdict, d);
+
+        // add the subset back
+        hdr->dict[BCF_DT_SAMPLE] = d = kh_init(vdict);
+        for (i=0; i<bcf_hdr_nsamples(hdr); i++) 
+        {
+            int ignore, k = kh_put(vdict, d, hdr->samples[i], &ignore);
+            kh_val(d, k) = bcf_idinfo_def;
+            kh_val(d, k).id = kh_size(d) - 1;
+        }
+        bcf_hdr_sync(hdr);
+    }
+
+    return ret;
+}
+
+int bcf_subset(const bcf_hdr_t *h, bcf1_t *v, int n, int *imap)
+{
+	kstring_t ind;
+	ind.s = 0; ind.l = ind.m = 0;
+	if (n) {
+		bcf_fmt_t *fmt;
+		int i, j;
+		fmt = (bcf_fmt_t*)alloca(v->n_fmt * sizeof(bcf_fmt_t));
+        uint8_t *ptr = (uint8_t*)v->indiv.s;
+        for (i = 0; i < v->n_fmt; ++i)
+            ptr = bcf_unpack_fmt_core1(ptr, v->n_sample, &fmt[i]);
+		for (i = 0; i < (int)v->n_fmt; ++i) {
+			bcf_fmt_t *f = &fmt[i];
+			bcf_enc_int1(&ind, f->id);
+			bcf_enc_size(&ind, f->n, f->type);
+			for (j = 0; j < n; ++j)
+				if (imap[j] >= 0) kputsn((char*)(f->p + imap[j] * f->size), f->size, &ind);
+		}
+		for (i = j = 0; j < n; ++j) if (imap[j] >= 0) ++i;
+		v->n_sample = i;
+	} else v->n_sample = 0;
+    if ( !v->n_sample ) v->n_fmt = 0;
+	free(v->indiv.s);
+	v->indiv = ind;
+    v->unpacked &= ~BCF_UN_FMT;    // only BCF is ready for output, VCF will need to unpack again
+	return 0;
+}
+
+int bcf_is_snp(bcf1_t *v)
+{
+	int i;
+	bcf_unpack(v, BCF_UN_STR);
+	for (i = 0; i < v->n_allele; ++i)
+		if (strlen(v->d.allele[i]) != 1) break;
+	return i == v->n_allele;
+}
+
+static void bcf_set_variant_type(const char *ref, const char *alt, variant_t *var)
+{
+	// The most frequent case
+	if ( !ref[1] && !alt[1] )
+	{
+		if ( *alt == '.' || *ref==*alt ) { var->n = 0; var->type = VCF_REF; return; }
+        if ( *alt == 'X' ) { var->n = 0; var->type = VCF_REF; return; }  // mpileup's X allele shouldn't be treated as variant
+		var->n = 1; var->type = VCF_SNP; return;
+	}
+
+	const char *r = ref, *a = alt;
+	while (*r && *a && *r==*a ) { r++; a++; }
+
+	if ( *a && !*r )
+	{
+		while ( *a ) a++;
+		var->n = (a-alt)-(r-ref); var->type = VCF_INDEL; return;
+	}
+	else if ( *r && !*a )
+	{
+		while ( *r ) r++;
+		var->n = (a-alt)-(r-ref); var->type = VCF_INDEL; return;
+	}
+	else if ( !*r && !*a )
+	{
+		var->n = 0; var->type = VCF_REF; return;
+	}
+
+    const char *re = r, *ae = a;
+    while ( re[1] ) re++;
+    while ( ae[1] ) ae++;
+    while ( *re==*ae && re>r && ae>a ) { re--; ae--; }
+    if ( ae==a ) 
+    { 
+        if ( re==r ) { var->n = 1; var->type = VCF_SNP; return; }
+        var->n = -(re-r);
+        if ( *re==*ae ) { var->type = VCF_INDEL; return; }
+        var->type = VCF_OTHER; return;
+    }
+    else if ( re==r ) 
+    { 
+        var->n = ae-a;
+        if ( *re==*ae ) { var->type = VCF_INDEL; return; }
+        var->type = VCF_OTHER; return;
+    }
+
+	var->type = ( re-r == ae-a ) ? VCF_MNP : VCF_OTHER;
+    var->n = ( re-r > ae-a ) ? -(re-r+1) : ae-a+1;
+
+	// should do also complex events, SVs, etc...
+}
+
+static void bcf_set_variant_types(bcf1_t *b)
+{
+    if ( !(b->unpacked & BCF_UN_STR) ) bcf_unpack(b, BCF_UN_STR);
+	bcf_dec_t *d = &b->d;
+	if ( d->n_var < b->n_allele ) 
+	{
+		d->var = (variant_t *) realloc(d->var, sizeof(variant_t)*b->n_allele);
+		d->n_var = b->n_allele;
+	}
+	int i;
+	b->d.var_type = 0;
+	for (i=1; i<b->n_allele; i++)
+	{
+		bcf_set_variant_type(d->allele[0],d->allele[i], &d->var[i]);
+		b->d.var_type |= d->var[i].type;
+		//fprintf(stderr,"[set_variant_type] %d   %s %s -> %d %d .. %d\n", b->pos+1,d->allele[0],d->allele[i],d->var[i].type,d->var[i].n, b->d.var_type);
+	}
+}
+
+int bcf_get_variant_types(bcf1_t *rec)
+{
+    if ( rec->d.var_type==-1 ) bcf_set_variant_types(rec);
+    return rec->d.var_type;
+}
+int bcf_get_variant_type(bcf1_t *rec, int ith_allele)
+{
+    if ( rec->d.var_type==-1 ) bcf_set_variant_types(rec);
+    return rec->d.var[ith_allele].type;
+}
+
+int bcf_update_info(const bcf_hdr_t *hdr, bcf1_t *line, const char *key, const void *values, int n, int type)
+{
+    // Is the field already present?
+    int i, inf_id = bcf_hdr_id2int(hdr,BCF_DT_ID,key);
+    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_INFO,inf_id) ) return -1;    // No such INFO field in the header
+    if ( !(line->unpacked & BCF_UN_INFO) ) bcf_unpack(line, BCF_UN_INFO);
+
+    for (i=0; i<line->n_info; i++)
+        if ( inf_id==line->d.info[i].key ) break;
+    bcf_info_t *inf = i==line->n_info ? NULL : &line->d.info[i];
+
+    if ( !n || (type==BCF_HT_STR && !values) )
+    {
+        if ( inf )
+        {
+            // Mark the tag for removal, free existing memory if necessary
+            if ( inf->vptr_free )
+            {
+                free(inf->vptr - inf->vptr_off);
+                inf->vptr_free = 0;
+            }
+            line->d.shared_dirty |= BCF1_DIRTY_INF;
+            inf->vptr = NULL;
+        }
+        return 0;
+    }
+    
+    // Encode the values and determine the size required to accommodate the values
+    kstring_t str = {0,0,0};
+    bcf_enc_int1(&str, inf_id);
+    if ( type==BCF_HT_INT )
+        bcf_enc_vint(&str, n, (int32_t*)values, -1);
+    else if ( type==BCF_HT_REAL )
+        bcf_enc_vfloat(&str, n, (float*)values);
+    else if ( type==BCF_HT_FLAG || type==BCF_HT_STR )
+    {
+        if ( values==NULL )
+            bcf_enc_size(&str, 0, BCF_BT_NULL);
+        else
+            bcf_enc_vchar(&str, strlen((char*)values), (char*)values);
+    }
+    else
+    {
+        fprintf(stderr, "[E::%s] the type %d not implemented yet\n", __func__, type);
+        abort();
+    }
+
+    // Is the INFO tag already present
+    if ( inf )
+    {
+        // Is it big enough to accommodate new block?
+        if ( str.l <= inf->vptr_len + inf->vptr_off )
+        {
+            if ( str.l != inf->vptr_len + inf->vptr_off ) line->d.shared_dirty |= BCF1_DIRTY_INF;
+            uint8_t *ptr = inf->vptr - inf->vptr_off;
+            memcpy(ptr, str.s, str.l);
+            free(str.s);
+            int vptr_free = inf->vptr_free;
+            bcf_unpack_info_core1(ptr, inf);
+            inf->vptr_free = vptr_free;
+        }
+        else
+        {
+            assert( !inf->vptr_free );  // fix the caller or improve here: this has been modified before 
+            bcf_unpack_info_core1((uint8_t*)str.s, inf);
+            inf->vptr_free = 1;
+            line->d.shared_dirty |= BCF1_DIRTY_INF;
+        }
+    }
+    else
+    {
+        // The tag is not present, create new one
+        line->n_info++;
+        hts_expand0(bcf_info_t, line->n_info, line->d.m_info , line->d.info);
+        inf = &line->d.info[line->n_info-1];
+        bcf_unpack_info_core1((uint8_t*)str.s, inf);
+        inf->vptr_free = 1;
+        line->d.shared_dirty |= BCF1_DIRTY_INF;
+    }
+    line->unpacked |= BCF_UN_INFO;
+    return 0;
+}
+
+int bcf_update_format_string(const bcf_hdr_t *hdr, bcf1_t *line, const char *key, const char **values, int n)
+{
+    if ( !n ) 
+        return bcf_update_format(hdr,line,key,NULL,0,BCF_HT_STR);
+
+    int i, max_len = 0;
+    for (i=0; i<n; i++)
+    {
+        int len = strlen(values[i]);
+        if ( len > max_len ) max_len = len;
+    }
+    char *out = (char*) malloc(max_len*n);
+    if ( !out ) return -2;
+    for (i=0; i<n; i++)
+    {
+        char *dst = out+i*max_len;
+        const char *src = values[i];
+        int j = 0;
+        while ( src[j] ) { dst[j] = src[j]; j++; }
+        for (; j<max_len; j++) dst[j] = 0;
+    }
+    int ret = bcf_update_format(hdr,line,key,out,max_len*n,BCF_HT_STR);
+    free(out);
+    return ret;
+}
+
+int bcf_update_format(const bcf_hdr_t *hdr, bcf1_t *line, const char *key, const void *values, int n, int type)
+{
+    // Is the field already present?
+    int i, fmt_id = bcf_hdr_id2int(hdr,BCF_DT_ID,key);
+    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_FMT,fmt_id) )
+    {
+        if ( !n ) return 0;
+        return -1;  // the key not present in the header
+    }
+
+    if ( !(line->unpacked & BCF_UN_FMT) ) bcf_unpack(line, BCF_UN_FMT);
+
+    for (i=0; i<line->n_fmt; i++)
+        if ( line->d.fmt[i].id==fmt_id ) break;
+    bcf_fmt_t *fmt = i==line->n_fmt ? NULL : &line->d.fmt[i];
+
+    if ( !n )
+    {
+        if ( fmt )
+        {
+            // Mark the tag for removal, free existing memory if necessary
+            if ( fmt->p_free )
+            {
+                free(fmt->p - fmt->p_off);
+                fmt->p_free = 0;
+            }
+            line->d.indiv_dirty = 1;
+            fmt->p = NULL;
+        }
+        return 0;
+    }
+
+    line->n_sample = bcf_hdr_nsamples(hdr);
+    int nps = n / line->n_sample;  // number of values per sample
+    assert( nps && nps*line->n_sample==n );     // must be divisible by n_sample
+
+    // Encode the values and determine the size required to accommodate the values
+    kstring_t str = {0,0,0};
+    bcf_enc_int1(&str, fmt_id);
+    if ( type==BCF_HT_INT )
+        bcf_enc_vint(&str, n, (int32_t*)values, nps);
+    else if ( type==BCF_HT_REAL )
+    {
+        bcf_enc_size(&str, nps, BCF_BT_FLOAT);
+        kputsn((char*)values, nps*line->n_sample*sizeof(float), &str);
+    }
+    else if ( type==BCF_HT_STR )
+    {
+        bcf_enc_size(&str, nps, BCF_BT_CHAR);
+        kputsn((char*)values, nps*line->n_sample, &str);
+    }
+    else
+    {
+        fprintf(stderr, "[E::%s] the type %d not implemented yet\n", __func__, type);
+        abort();
+    }
+
+    if ( !fmt )
+    {
+        // Not present, new format field
+        line->n_fmt++;
+        hts_expand0(bcf_fmt_t, line->n_fmt, line->d.m_fmt, line->d.fmt);
+
+        // Special case: VCF specification requires that GT is always first
+        if ( line->n_fmt > 1 && key[0]=='G' && key[1]=='T' && !key[2] )
+        {
+            for (i=line->n_fmt-1; i>0; i--)
+                line->d.fmt[i] = line->d.fmt[i-1];
+            fmt = &line->d.fmt[0];
+        }
+        else
+            fmt = &line->d.fmt[line->n_fmt-1];
+        bcf_unpack_fmt_core1((uint8_t*)str.s, line->n_sample, fmt);
+        line->d.indiv_dirty = 1;
+        fmt->p_free = 1;
+    }
+    else
+    {
+        // The tag is already present, check if it is big enough to accomodate the new block
+        if ( str.l <= fmt->p_len + fmt->p_off )
+        {
+            // good, the block is big enough
+            if ( str.l != fmt->p_len + fmt->p_off ) line->d.indiv_dirty = 1;
+            uint8_t *ptr = fmt->p - fmt->p_off;
+            memcpy(ptr, str.s, str.l);
+            free(str.s);
+            int p_free = fmt->p_free;
+            bcf_unpack_fmt_core1(ptr, line->n_sample, fmt);
+            fmt->p_free = p_free;
+        }
+        else
+        {
+            assert( !fmt->p_free );  // fix the caller or improve here: this has been modified before 
+            bcf_unpack_fmt_core1((uint8_t*)str.s, line->n_sample, fmt);
+            fmt->p_free = 1;
+            line->d.indiv_dirty = 1;
+        }
+    }
+    line->unpacked |= BCF_UN_FMT;
+    return 0;
+}
+
+
+int bcf_update_filter(const bcf_hdr_t *hdr, bcf1_t *line, int *flt_ids, int n)
+{
+    if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
+    line->d.shared_dirty |= BCF1_DIRTY_FLT;
+    line->d.n_flt = n;
+    if ( !n ) return 0;
+    hts_expand(int, line->d.n_flt, line->d.m_flt, line->d.flt);
+    int i;
+    for (i=0; i<n; i++)
+        line->d.flt[i] = flt_ids[i];
+    return 0;
+}
+
+int bcf_add_filter(const bcf_hdr_t *hdr, bcf1_t *line, int flt_id)
+{
+    if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
+    int i;
+    for (i=0; i<line->d.n_flt; i++)
+        if ( flt_id==line->d.flt[i] ) break;
+    if ( i<line->d.n_flt ) return 0;    // this filter is already set
+    line->d.shared_dirty |= BCF1_DIRTY_FLT;
+    if ( flt_id==0 )    // set to PASS
+        line->d.n_flt = 1;
+    else if ( line->d.n_flt==1 && line->d.flt[0]==0 )
+        line->d.n_flt = 1;
+    else
+        line->d.n_flt++;
+    hts_expand(int, line->d.n_flt, line->d.m_flt, line->d.flt);
+    line->d.flt[line->d.n_flt-1] = flt_id;
+    return 1;
+}
+int bcf_remove_filter(const bcf_hdr_t *hdr, bcf1_t *line, int flt_id, int pass)
+{
+    if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
+    int i;
+    for (i=0; i<line->d.n_flt; i++)
+        if ( flt_id==line->d.flt[i] ) break;
+    if ( i==line->d.n_flt ) return 0;   // the filter is not present
+    line->d.shared_dirty |= BCF1_DIRTY_FLT;
+    if ( i!=line->d.n_flt-1 ) memmove(line->d.flt+i,line->d.flt+i+1,line->d.n_flt-i);
+    line->d.n_flt--;
+    if ( !line->d.n_flt && pass ) bcf_add_filter(hdr,line,0);
+    return 0;
+}
+
+int bcf_has_filter(const bcf_hdr_t *hdr, bcf1_t *line, char *filter)
+{
+    if ( filter[0]=='.' && !filter[1] ) filter = "PASS";
+    int id = bcf_hdr_id2int(hdr, BCF_DT_ID, filter);
+    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_FLT,id) ) return -1;  // not defined in the header
+
+    if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
+    if ( id==0 && !line->d.n_flt) return 1; // PASS
+
+    int i;
+    for (i=0; i<line->d.n_flt; i++)
+        if ( line->d.flt[i]==id ) return 1;
+    return 0;
+}
+
+static inline int _bcf1_sync_alleles(const bcf_hdr_t *hdr, bcf1_t *line, int nals)
+{
+    line->d.shared_dirty |= BCF1_DIRTY_ALS;
+
+    line->n_allele = nals;
+    hts_expand(char*, line->n_allele, line->d.m_allele, line->d.allele);
+
+    char *als = line->d.als;
+    int n = 0;
+    while (n<nals)
+    {
+        line->d.allele[n] = als;
+        while ( *als ) als++;
+        als++;
+        n++;
+    }
+    return 0;
+}
+int bcf_update_alleles(const bcf_hdr_t *hdr, bcf1_t *line, const char **alleles, int nals)
+{
+    kstring_t tmp = {0,0,0};
+    char *free_old = NULL;
+
+    // If the supplied alleles are not pointers to line->d.als, the existing block can be reused.
+    int i;
+    for (i=0; i<nals; i++)
+        if ( alleles[i]>=line->d.als && alleles[i]<line->d.als+line->d.m_als ) break;
+    if ( i==nals ) 
+    {
+        // all alleles point elsewhere, reuse the existing block
+        tmp.l = 0; tmp.s = line->d.als; tmp.m = line->d.m_als;
+    }
+    else
+        free_old = line->d.als;
+
+    for (i=0; i<nals; i++)
+    {
+        kputs(alleles[i], &tmp);
+        kputc(0, &tmp);
+    }
+    line->d.als = tmp.s; line->d.m_als = tmp.m;
+    free(free_old);
+    return _bcf1_sync_alleles(hdr,line,nals);
+}
+
+int bcf_update_alleles_str(const bcf_hdr_t *hdr, bcf1_t *line, const char *alleles_string)
+{
+    kstring_t tmp;
+    tmp.l = 0; tmp.s = line->d.als; tmp.m = line->d.m_als;
+    kputs(alleles_string, &tmp);
+    line->d.als = tmp.s; line->d.m_als = tmp.m;
+
+    int nals = 1;
+    char *t = line->d.als;
+    while (*t)
+    {
+        if ( *t==',' ) { *t = 0; nals++; }
+        t++;
+    }
+    return _bcf1_sync_alleles(hdr, line, nals);
+}
+
+int bcf_update_id(const bcf_hdr_t *hdr, bcf1_t *line, const char *id)
+{
+    kstring_t tmp;
+    tmp.l = 0; tmp.s = line->d.id; tmp.m = line->d.m_id;
+    if ( id )
+        kputs(id, &tmp);
+    else
+        kputs(".", &tmp);
+    line->d.id = tmp.s; line->d.m_id = tmp.m;
+    line->d.shared_dirty |= BCF1_DIRTY_ID;
+    return 0;
+}
+
+bcf_fmt_t *bcf_get_fmt(const bcf_hdr_t *hdr, bcf1_t *line, const char *key)
+{
+    int i, id = bcf_hdr_id2int(hdr, BCF_DT_ID, key);
+    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_FMT,id) ) return NULL;   // no such FMT field in the header
+    if ( !(line->unpacked & BCF_UN_FMT) ) bcf_unpack(line, BCF_UN_FMT);
+    for (i=0; i<line->n_fmt; i++)  
+    {
+        if ( line->d.fmt[i].id==id ) return &line->d.fmt[i];
+    }
+    return NULL;
+}
+
+bcf_info_t *bcf_get_info(const bcf_hdr_t *hdr, bcf1_t *line, const char *key)
+{
+    int i, id = bcf_hdr_id2int(hdr, BCF_DT_ID, key);
+    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_INFO,id) ) return NULL;   // no such INFO field in the header
+    if ( !(line->unpacked & BCF_UN_INFO) ) bcf_unpack(line, BCF_UN_INFO);
+    for (i=0; i<line->n_info; i++)  
+    {
+        if ( line->d.info[i].key==id ) return &line->d.info[i];
+    }
+    return NULL;
+}
+
+int bcf_get_info_values(const bcf_hdr_t *hdr, bcf1_t *line, const char *tag, void **dst, int *ndst, int type)
+{
+    int i,j, tag_id = bcf_hdr_id2int(hdr, BCF_DT_ID, tag);
+    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_INFO,tag_id) ) return -1;    // no such INFO field in the header
+    if ( bcf_hdr_id2type(hdr,BCF_HL_INFO,tag_id)!=type ) return -2;     // expected different type
+
+    if ( !(line->unpacked & BCF_UN_INFO) ) bcf_unpack(line, BCF_UN_INFO);
+
+    for (i=0; i<line->n_info; i++)
+        if ( line->d.info[i].key==tag_id ) break;
+    if ( i==line->n_info ) return ( type==BCF_HT_FLAG ) ? 0 : -3;       // the tag is not present in this record
+    if ( type==BCF_HT_FLAG ) return 1;
+
+    bcf_info_t *info = &line->d.info[i];
+    if ( type==BCF_HT_STR )
+    {
+        if ( *ndst < info->len+1 ) 
+        {
+            *ndst = info->len + 1;
+            *dst  = realloc(*dst, *ndst);
+        }
+        memcpy(*dst,info->vptr,info->len);
+        ((uint8_t*)*dst)[info->len] = 0;
+        return info->len;
+    }
+
+    // Make sure the buffer is big enough
+    int size1 = type==BCF_HT_INT ? sizeof(int32_t) : sizeof(float);
+    if ( *ndst < info->len )
+    {
+        *ndst = info->len;
+        *dst  = realloc(*dst, *ndst * size1);
+    }
+
+    if ( info->len == 1 )
+    {
+        if ( info->type==BCF_BT_FLOAT ) *((float*)*dst) = info->v1.f;
+        else *((int32_t*)*dst) = info->v1.i;
+        return 1;
+    }
+
+    #define BRANCH(type_t, is_missing, is_vector_end, set_missing, out_type_t) { \
+        out_type_t *tmp = (out_type_t *) *dst; \
+        type_t *p = (type_t *) info->vptr; \
+        for (j=0; j<info->len; j++) \
+        { \
+            if ( is_vector_end ) return j; \
+            if ( is_missing ) set_missing; \
+            else *tmp = p[j]; \
+            tmp++; \
+        } \
+        return j; \
+    }
+    switch (info->type) {
+        case BCF_BT_INT8:  BRANCH(int8_t,  p[j]==bcf_int8_missing,  p[j]==bcf_int8_vector_end,  *tmp=bcf_int32_missing, int32_t); break;
+        case BCF_BT_INT16: BRANCH(int16_t, p[j]==bcf_int16_missing, p[j]==bcf_int16_vector_end, *tmp=bcf_int32_missing, int32_t); break;
+        case BCF_BT_INT32: BRANCH(int32_t, p[j]==bcf_int32_missing, p[j]==bcf_int32_vector_end, *tmp=bcf_int32_missing, int32_t); break;
+        case BCF_BT_FLOAT: BRANCH(float,   bcf_float_is_missing(p[j]), bcf_float_is_vector_end(p[j]), bcf_float_set_missing(*tmp), float); break;
+        default: fprintf(stderr,"TODO: %s:%d .. info->type=%d\n", __FILE__,__LINE__, info->type); exit(1);
+    }
+    #undef BRANCH
+    return -4;  // this can never happen
+}
+
+int bcf_get_format_string(const bcf_hdr_t *hdr, bcf1_t *line, const char *tag, char ***dst, int *ndst)
+{
+    int i,tag_id = bcf_hdr_id2int(hdr, BCF_DT_ID, tag);
+    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_FMT,tag_id) ) return -1;    // no such FORMAT field in the header
+    if ( bcf_hdr_id2type(hdr,BCF_HL_FMT,tag_id)!=BCF_HT_STR ) return -2;     // expected different type
+
+    if ( !(line->unpacked & BCF_UN_FMT) ) bcf_unpack(line, BCF_UN_FMT);
+
+    for (i=0; i<line->n_fmt; i++)
+        if ( line->d.fmt[i].id==tag_id ) break;
+    if ( i==line->n_fmt ) return -3;                               // the tag is not present in this record
+    bcf_fmt_t *fmt = &line->d.fmt[i];
+
+    int nsmpl = bcf_hdr_nsamples(hdr);
+    if ( !*dst )
+    {
+        *dst = (char**) malloc(sizeof(char*)*nsmpl);
+        if ( !*dst ) return -4;     // could not alloc
+        (*dst)[0] = NULL;
+    }
+    int n = (fmt->n+1)*nsmpl;
+    if ( *ndst < n )
+    {
+        (*dst)[0] = realloc((*dst)[0], n); 
+        if ( !(*dst)[0] ) return -4;    // could not alloc
+        *ndst = n;
+    }
+    for (i=0; i<nsmpl; i++)
+    {
+        uint8_t *src = fmt->p + i*fmt->n;
+        uint8_t *tmp = (uint8_t*)(*dst)[0] + i*(fmt->n+1);
+        memcpy(tmp,src,fmt->n);
+        tmp[fmt->n] = 0;
+        (*dst)[i] = (char*) tmp;
+    }
+    return n;
+}
+
+int bcf_get_format_values(const bcf_hdr_t *hdr, bcf1_t *line, const char *tag, void **dst, int *ndst, int type)
+{
+    int i,j, tag_id = bcf_hdr_id2int(hdr, BCF_DT_ID, tag);
+    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_FMT,tag_id) ) return -1;    // no such FORMAT field in the header
+    if ( tag[0]=='G' && tag[1]=='T' && tag[2]==0 )
+    {
+        // Ugly: GT field is considered to be a string by the VCF header but BCF represents it as INT.
+        if ( bcf_hdr_id2type(hdr,BCF_HL_FMT,tag_id)!=BCF_HT_STR ) return -2;
+    }
+    else if ( bcf_hdr_id2type(hdr,BCF_HL_FMT,tag_id)!=type ) return -2;     // expected different type
+
+    if ( !(line->unpacked & BCF_UN_FMT) ) bcf_unpack(line, BCF_UN_FMT);
+
+    for (i=0; i<line->n_fmt; i++)
+        if ( line->d.fmt[i].id==tag_id ) break;
+    if ( i==line->n_fmt ) return -3;                               // the tag is not present in this record
+    bcf_fmt_t *fmt = &line->d.fmt[i];
+
+    if ( type==BCF_HT_STR )
+    {
+        int n = fmt->n*bcf_hdr_nsamples(hdr);
+        if ( *ndst < n ) 
+        {
+            *dst  = realloc(*dst, n);
+            if ( !*dst ) return -4;     // could not alloc
+            *ndst = n;
+        }
+        memcpy(*dst,fmt->p,n);
+        return n;
+    }
+
+    // Make sure the buffer is big enough
+    int nsmpl = bcf_hdr_nsamples(hdr);
+    int size1 = type==BCF_HT_INT ? sizeof(int32_t) : sizeof(float);
+    if ( *ndst < fmt->n*nsmpl )
+    {
+        *ndst = fmt->n*nsmpl;
+        *dst  = realloc(*dst, *ndst*size1);
+        if ( !dst ) return -4;     // could not alloc
+    }
+
+    #define BRANCH(type_t, is_missing, is_vector_end, set_missing, set_vector_end, out_type_t) { \
+        out_type_t *tmp = (out_type_t *) *dst; \
+        type_t *p = (type_t*) fmt->p; \
+        for (i=0; i<nsmpl; i++) \
+        { \
+            for (j=0; j<fmt->n; j++) \
+            { \
+                if ( is_missing ) set_missing; \
+                else if ( is_vector_end ) { set_vector_end; break; } \
+                else *tmp = p[j]; \
+                tmp++; \
+            } \
+            for (; j<fmt->n; j++) { set_vector_end; tmp++; } \
+            p = (type_t *)((char *)p + fmt->size); \
+        } \
+    }
+    switch (fmt->type) {
+        case BCF_BT_INT8:  BRANCH(int8_t,  p[j]==bcf_int8_missing,  p[j]==bcf_int8_vector_end,  *tmp=bcf_int32_missing, *tmp=bcf_int32_vector_end, int32_t); break;
+        case BCF_BT_INT16: BRANCH(int16_t, p[j]==bcf_int16_missing, p[j]==bcf_int16_vector_end, *tmp=bcf_int32_missing, *tmp=bcf_int32_vector_end, int32_t); break;
+        case BCF_BT_INT32: BRANCH(int32_t, p[j]==bcf_int32_missing, p[j]==bcf_int32_vector_end, *tmp=bcf_int32_missing, *tmp=bcf_int32_vector_end, int32_t); break;
+        case BCF_BT_FLOAT: BRANCH(float,   bcf_float_is_missing(p[j]), bcf_float_is_vector_end(p[j]), bcf_float_set_missing(*tmp), bcf_float_set_vector_end(*tmp), float); break;
+        default: fprintf(stderr,"TODO: %s:%d .. fmt->type=%d\n", __FILE__,__LINE__, fmt->type); exit(1);
+    }
+    #undef BRANCH
+    return nsmpl*fmt->n;
+}
+
diff --git a/htslib/vcf_sweep.c b/htslib/vcf_sweep.c
new file mode 100644
index 0000000..2598460
--- /dev/null
+++ b/htslib/vcf_sweep.c
@@ -0,0 +1,158 @@
+#include "htslib/vcf_sweep.h"
+#include "htslib/bgzf.h"
+
+#define SW_FWD 0
+#define SW_BWD 1
+
+struct _bcf_sweep_t
+{
+    htsFile *file;
+    bcf_hdr_t *hdr;
+    BGZF *fp;
+
+    int direction;          // to tell if the direction has changed
+    int block_size;         // the size of uncompressed data to hold in memory
+    bcf1_t *rec;            // bcf buffer
+    int nrec, mrec;         // number of used records; total size of the buffer
+    int lrid, lpos, lnals, lals_len, mlals;   // to check uniqueness of a record
+    char *lals;
+
+    uint64_t *idx;          // uncompressed offsets of VCF/BCF records
+    int iidx, nidx, midx;   // i: current offset; n: used; m: allocated
+    int idx_done;           // the index is built during the first pass
+};
+
+BGZF *hts_get_bgzfp(htsFile *fp);
+int hts_useek(htsFile *file, long uoffset, int where);
+long hts_utell(htsFile *file);
+
+static inline int sw_rec_equal(bcf_sweep_t *sw, bcf1_t *rec)
+{
+    if ( sw->lrid!=rec->rid ) return 0;
+    if ( sw->lpos!=rec->pos ) return 0;
+    if ( sw->lnals!=rec->n_allele ) return 0;
+
+    char *t = rec->d.allele[sw->lnals-1];
+    int len = t - rec->d.allele[0] + 1;
+    while ( *t ) { t++; len++; }
+    if ( sw->lals_len!=len ) return 0;
+    if ( memcmp(sw->lals,rec->d.allele[0],len) ) return 0;
+    return 1;
+}
+
+static void sw_rec_save(bcf_sweep_t *sw, bcf1_t *rec)
+{
+    sw->lrid  = rec->rid;
+    sw->lpos  = rec->pos;
+    sw->lnals = rec->n_allele;
+
+    char *t = rec->d.allele[sw->lnals-1];
+    int len = t - rec->d.allele[0] + 1;
+    while ( *t ) { t++; len++; }
+    sw->lals_len = len;
+    hts_expand(char, len, sw->mlals, sw->lals);
+    memcpy(sw->lals, rec->d.allele[0], len);
+}
+
+static void sw_fill_buffer(bcf_sweep_t *sw)
+{
+    if ( !sw->iidx ) return;
+    sw->iidx--;
+
+    int ret = hts_useek(sw->file, sw->idx[sw->iidx], 0);
+    assert( ret==0 );
+
+    sw->nrec = 0;
+    bcf1_t *rec = &sw->rec[sw->nrec];
+    while ( (ret=bcf_read1(sw->file, sw->hdr, rec))==0 )
+    {
+        bcf_unpack(rec, BCF_UN_STR);
+
+        // if not in the last block, stop at the saved record
+        if ( sw->iidx+1 < sw->nidx && sw_rec_equal(sw,rec) ) break;
+
+        sw->nrec++;
+        hts_expand0(bcf1_t, sw->nrec+1, sw->mrec, sw->rec);
+        rec = &sw->rec[sw->nrec];
+    }
+    sw_rec_save(sw, &sw->rec[0]);
+}
+
+bcf_sweep_t *bcf_sweep_init(const char *fname)
+{
+    bcf_sweep_t *sw = (bcf_sweep_t*) calloc(1,sizeof(bcf_sweep_t));
+    sw->file = hts_open(fname, "r");
+    sw->fp   = hts_get_bgzfp(sw->file);
+    bgzf_index_build_init(sw->fp);
+    sw->hdr  = bcf_hdr_read(sw->file);
+    sw->mrec = 1;
+    sw->rec  = (bcf1_t*) calloc(sw->mrec,(sizeof(bcf1_t)));
+    sw->block_size = 1024*1024*3;
+    sw->direction = SW_FWD;
+    return sw;
+}
+
+void bcf_empty1(bcf1_t *v);
+void bcf_sweep_destroy(bcf_sweep_t *sw)
+{
+    int i;
+    for (i=0; i<sw->mrec; i++) bcf_empty1(&sw->rec[i]);
+    free(sw->idx);
+    free(sw->rec);
+    free(sw->lals);
+    bcf_hdr_destroy(sw->hdr);
+    hts_close(sw->file);
+    free(sw);
+}
+
+static void sw_seek(bcf_sweep_t *sw, int direction)
+{
+    sw->direction = direction;
+    if ( direction==SW_FWD )
+        hts_useek(sw->file, sw->idx[0], 0);
+    else
+    {
+        sw->iidx = sw->nidx;
+        sw->nrec = 0;
+    }
+}
+
+bcf1_t *bcf_sweep_fwd(bcf_sweep_t *sw)
+{
+    if ( sw->direction==SW_BWD ) sw_seek(sw, SW_FWD);
+
+    long pos = hts_utell(sw->file);
+
+    bcf1_t *rec = &sw->rec[0];
+    int ret = bcf_read1(sw->file, sw->hdr, rec);
+
+    if ( ret!=0 )   // last record, get ready for sweeping backwards
+    {
+        sw->idx_done = 1;
+        sw->fp->idx_build_otf = 0;
+        sw_seek(sw, SW_BWD);
+        return NULL;
+    }
+
+    if ( !sw->idx_done )
+    {
+        if ( !sw->nidx || pos - sw->idx[sw->nidx-1] > sw->block_size )
+        {
+            sw->nidx++;
+            hts_expand(uint64_t, sw->nidx, sw->midx, sw->idx);
+            sw->idx[sw->nidx-1] = pos;
+        }
+    }
+    return rec;
+}
+
+bcf1_t *bcf_sweep_bwd(bcf_sweep_t *sw)
+{
+    if ( sw->direction==SW_FWD ) sw_seek(sw, SW_BWD);
+    if ( !sw->nrec ) sw_fill_buffer(sw);
+    if ( !sw->nrec ) return NULL;
+    return &sw->rec[ --sw->nrec ];
+}
+
+bcf_hdr_t *bcf_sweep_hdr(bcf_sweep_t *sw) { return sw->hdr; }
+
diff --git a/htslib/vcfutils.c b/htslib/vcfutils.c
new file mode 100644
index 0000000..a4a9c2f
--- /dev/null
+++ b/htslib/vcfutils.c
@@ -0,0 +1,642 @@
+#include "htslib/vcfutils.h"
+
+int bcf_calc_ac(const bcf_hdr_t *header, bcf1_t *line, int *ac, int which)
+{
+	int i;
+	for (i=0; i<line->n_allele; i++) ac[i]=0;
+
+	// Use INFO/AC,AN field only when asked
+	if ( which&BCF_UN_INFO )
+	{
+		bcf_unpack(line, BCF_UN_INFO);
+		int an_id = bcf_hdr_id2int(header, BCF_DT_ID, "AN");
+		int ac_id = bcf_hdr_id2int(header, BCF_DT_ID, "AC");
+        int i, an=-1, ac_len=0, ac_type=0;
+        uint8_t *ac_ptr=NULL;
+		if ( an_id>=0 && ac_id>=0 )
+		{
+			for (i=0; i<line->n_info; i++)
+			{
+				bcf_info_t *z = &line->d.info[i];
+				if ( z->key == an_id ) an = z->v1.i;
+				else if ( z->key == ac_id ) { ac_ptr = z->vptr; ac_len = z->len; ac_type = z->type; }
+			}
+        }
+        if ( an>=0 && ac_ptr )
+        {
+			int nac = 0;
+            #define BRANCH_INT(type_t) {        \
+                type_t *p = (type_t *) ac_ptr;  \
+                for (i=0; i<ac_len; i++)        \
+                {                               \
+                    ac[i+1] = p[i];             \
+                    nac += p[i];                \
+                }                               \
+            }
+            switch (ac_type) {
+                case BCF_BT_INT8:  BRANCH_INT(int8_t); break;
+                case BCF_BT_INT16: BRANCH_INT(int16_t); break;
+                case BCF_BT_INT32: BRANCH_INT(int32_t); break;
+                default: fprintf(stderr, "[E::%s] todo: %d at %s:%d\n", __func__, ac_type, header->id[BCF_DT_CTG][line->rid].key, line->pos+1); exit(1); break;
+            }
+            #undef BRANCH_INT
+            assert( an>=nac );  // sanity check for missing values
+			ac[0] = an - nac;
+			return 1;
+        }
+	}
+
+	// Split genotype fields only when asked
+	if ( which&BCF_UN_FMT )
+	{
+		int i, gt_id = bcf_hdr_id2int(header,BCF_DT_ID,"GT");
+		if ( gt_id<0 ) return 0;
+		bcf_unpack(line, BCF_UN_FMT);
+		bcf_fmt_t *fmt_gt = NULL;
+		for (i=0; i<(int)line->n_fmt; i++) 
+			if ( line->d.fmt[i].id==gt_id ) { fmt_gt = &line->d.fmt[i]; break; }
+		if ( !fmt_gt ) return 0;
+        #define BRANCH_INT(type_t,missing,vector_end) { \
+		    for (i=0; i<line->n_sample; i++) \
+		    { \
+                type_t *p = (type_t*) (fmt_gt->p + i*fmt_gt->size); \
+		    	int ial; \
+		    	for (ial=0; ial<fmt_gt->n; ial++) \
+		    	{ \
+                    if ( p[ial]==vector_end ) break; /* smaller ploidy */ \
+                    if ( !(p[ial]>>1) || p[ial]==missing ) continue; /* missing allele */ \
+		    		ac[(p[ial]>>1)-1]++; \
+		    	} \
+		    } \
+        }
+        switch (fmt_gt->type) {
+            case BCF_BT_INT8:  BRANCH_INT(int8_t,  bcf_int8_missing, bcf_int8_vector_end); break;
+            case BCF_BT_INT16: BRANCH_INT(int16_t, bcf_int16_missing, bcf_int16_vector_end); break;
+            case BCF_BT_INT32: BRANCH_INT(int32_t, bcf_int32_missing, bcf_int32_vector_end); break;
+            default: fprintf(stderr, "[E::%s] todo: %d at %s:%d\n", __func__, fmt_gt->type, header->id[BCF_DT_CTG][line->rid].key, line->pos+1); exit(1); break;
+        }
+        #undef BRANCH_INT
+		return 1;
+	}
+	return 0;
+}
+
+int bcf_gt_type(bcf_fmt_t *fmt_ptr, int isample, int *_ial, int *_jal)
+{
+    int i, nals = 0, has_ref = 0, has_alt = 0, ial = 0, jal = 0;
+    #define BRANCH_INT(type_t,missing,vector_end) { \
+        type_t *p = (type_t*) (fmt_ptr->p + isample*fmt_ptr->size); \
+        for (i=0; i<fmt_ptr->n; i++) \
+        { \
+            if ( p[i] == vector_end ) break; /* smaller ploidy */ \
+            if ( !p[i] || p[i] == missing ) continue; /* missing allele */ \
+            int tmp = p[i]>>1; \
+            if ( tmp>1 ) \
+            { \
+                if ( !ial ) { ial = tmp; has_alt = 1; } \
+                else if ( tmp!=ial ) \
+                { \
+                    if ( tmp<ial ) \
+                    { \
+                        jal = ial; \
+                        ial = tmp; \
+                    } \
+                    else \
+                    { \
+                        jal = tmp; \
+                    } \
+                    has_alt = 2; \
+                } \
+            } \
+            else has_ref = 1; \
+            nals++; \
+        } \
+    }
+    switch (fmt_ptr->type) {
+        case BCF_BT_INT8:  BRANCH_INT(int8_t,  bcf_int8_missing, bcf_int8_vector_end); break;
+        case BCF_BT_INT16: BRANCH_INT(int16_t, bcf_int16_missing, bcf_int16_vector_end); break;
+        case BCF_BT_INT32: BRANCH_INT(int32_t, bcf_int32_missing, bcf_int32_vector_end); break;
+        default: fprintf(stderr, "[E::%s] todo: fmt_type %d\n", __func__, fmt_ptr->type); exit(1); break;
+    }
+    #undef BRANCH_INT
+
+    if ( _ial ) *_ial = ial>0 ? ial-1 : ial;
+    if ( _jal ) *_jal = jal>0 ? jal-1 : jal;
+    if ( !nals ) return GT_UNKN;
+    if ( nals==1 )
+        return has_ref ? GT_HAPL_R : GT_HAPL_A;
+    if ( !has_ref ) 
+        return has_alt==1 ? GT_HOM_AA : GT_HET_AA;
+    if ( !has_alt )
+        return GT_HOM_RR;
+    return GT_HET_RA;
+}
+
+int bcf_trim_alleles(const bcf_hdr_t *header, bcf1_t *line)
+{
+    int i;
+    bcf_fmt_t *gt = bcf_get_fmt(header, line, "GT");
+    if ( !gt ) return 0;
+
+    int *ac = (int*) calloc(line->n_allele,sizeof(int));
+
+    // check if all alleles are populated
+    #define BRANCH(type_t,missing,vector_end) { \
+        for (i=0; i<line->n_sample; i++) \
+        { \
+            type_t *p = (type_t*) (gt->p + i*gt->size); \
+            int ial; \
+            for (ial=0; ial<gt->size; ial++) \
+            { \
+                if ( p[ial]==vector_end ) break; /* smaller ploidy */ \
+                if ( !(p[ial]>>1) || p[ial]==missing ) continue; /* missing allele */ \
+                assert((p[ial]>>1)-1<line->n_allele); \
+                ac[(p[ial]>>1)-1]++; \
+            } \
+        } \
+    }
+    switch (gt->type) {
+        case BCF_BT_INT8:  BRANCH(int8_t,  bcf_int8_missing, bcf_int8_vector_end); break;
+        case BCF_BT_INT16: BRANCH(int16_t, bcf_int16_missing, bcf_int16_vector_end); break;
+        case BCF_BT_INT32: BRANCH(int32_t, bcf_int32_missing, bcf_int32_vector_end); break;
+        default: fprintf(stderr, "[E::%s] todo: %d at %s:%d\n", __func__, gt->type, header->id[BCF_DT_CTG][line->rid].key, line->pos+1); exit(1); break;
+    }
+    #undef BRANCH
+
+    int rm_als = 0, nrm = 0;
+    for (i=1; i<line->n_allele; i++) 
+    {
+        if ( !ac[i] ) { rm_als |= 1<<i; nrm++; }
+    }
+    free(ac);
+
+    if ( nrm ) bcf_remove_alleles(header, line, rm_als);
+    return nrm;
+}
+
+void bcf_remove_alleles(const bcf_hdr_t *header, bcf1_t *line, int rm_mask)
+{
+    int *map = (int*) calloc(line->n_allele, sizeof(int));
+
+    // create map of indexes from old to new ALT numbering and modify ALT
+    kstring_t str = {0,0,0};
+    kputs(line->d.allele[0], &str);
+
+    int nrm = 0, i,j;  // i: ori alleles, j: new alleles
+    for (i=1, j=1; i<line->n_allele; i++) 
+    {
+        if ( rm_mask & 1<<i )
+        {
+            // remove this allele
+            line->d.allele[i] = NULL;
+            nrm++;
+            continue;
+        }
+        kputc(',', &str);
+        kputs(line->d.allele[i], &str);
+        map[i] = j;
+        j++;
+    }
+    if ( !nrm ) { free(map); free(str.s); return; }
+
+    int nR_ori = line->n_allele;
+    int nR_new = line->n_allele-nrm;
+    assert(nR_new > 0); // should not be able to remove reference allele
+    int nA_ori = nR_ori-1;
+    int nA_new = nR_new-1;
+
+    int nG_ori = nR_ori*(nR_ori + 1)/2;
+    int nG_new = nR_new*(nR_new + 1)/2;
+
+    bcf_update_alleles_str(header, line, str.s);
+
+    // remove from Number=G, Number=R and Number=A INFO fields.
+    uint8_t *dat = NULL;
+    int mdat = 0, ndat = 0, mdat_bytes = 0, nret;
+    for (i=0; i<line->n_info; i++)
+    {
+        bcf_info_t *info = &line->d.info[i];
+        int vlen = bcf_hdr_id2length(header,BCF_HL_INFO,info->key);
+        
+        if ( vlen!=BCF_VL_A && vlen!=BCF_VL_G && vlen!=BCF_VL_R ) continue; // no need to change
+
+        int type = bcf_hdr_id2type(header,BCF_HL_INFO,info->key);
+        if ( type==BCF_HT_FLAG ) continue;
+        int size = 1;
+        if ( type==BCF_HT_REAL || type==BCF_HT_INT ) size = 4;
+
+        mdat = mdat_bytes / size;
+        nret = bcf_get_info_values(header, line, bcf_hdr_int2id(header,BCF_DT_ID,info->key), (void**)&dat, &mdat, type);
+        mdat_bytes = mdat * size;
+        if ( nret<0 ) 
+        { 
+            fprintf(stderr,"[%s:%d %s] Could not access INFO/%s at %s:%d [%d]\n", __FILE__,__LINE__,__FUNCTION__, 
+                bcf_hdr_int2id(header,BCF_DT_ID,info->key), bcf_seqname(header,line), line->pos+1, nret); 
+            exit(1);
+        }
+        if ( type==BCF_HT_STR ) 
+        { 
+            str.l = 0;
+            char *ss = (char*) dat, *se = (char*) dat;
+            if ( vlen==BCF_VL_A || vlen==BCF_VL_R )
+            {
+                int nexp, inc = 0;
+                if ( vlen==BCF_VL_A )
+                {
+                    nexp = nA_ori;
+                    inc  = 1;
+                }
+                else
+                    nexp = nR_ori;
+                for (j=0; j<nexp; j++)
+                {
+                    if ( !*se ) break;
+                    while ( *se && *se!=',' ) se++;
+                    if ( rm_mask & 1<<(j+inc) ) 
+                    { 
+                        if ( *se ) se++;
+                        ss = se; 
+                        continue; 
+                    }
+                    if ( str.l ) kputc(',',&str);
+                    kputsn(ss,se-ss,&str);
+                    if ( *se ) se++;
+                    ss = se;
+                }
+                assert( j==nexp );
+            }
+            else    // Number=G, assuming diploid genotype
+            {
+                int k = 0, n = 0;
+                for (j=0; j<nR_ori; j++)
+                {
+                    for (k=0; k<=j; k++)
+                    {
+                        if ( !*se ) break;
+                        while ( *se && *se!=',' ) se++;
+                        n++;
+                        if ( rm_mask & 1<<j || rm_mask & 1<<k ) 
+                        { 
+                            if ( *se ) se++;
+                            ss = se; 
+                            continue; 
+                        }
+                        if ( str.l ) kputc(',',&str);
+                        kputsn(ss,se-ss,&str);
+                        if ( *se ) se++;
+                        ss = se;
+                    }
+                    if ( !*se ) break;
+                }
+                assert( n=nG_ori );
+            }
+
+            nret = bcf_update_info(header, line, bcf_hdr_int2id(header,BCF_DT_ID,info->key), (void*)str.s, str.l, type);
+            if ( nret<0 )
+            {
+                fprintf(stderr,"[%s:%d %s] Could not update INFO/%s at %s:%d [%d]\n", __FILE__,__LINE__,__FUNCTION__,
+                        bcf_hdr_int2id(header,BCF_DT_ID,info->key), bcf_seqname(header,line), line->pos+1, nret);
+                exit(1);
+            }
+            continue; 
+        }
+        
+        if ( vlen==BCF_VL_A || vlen==BCF_VL_R )
+        {
+            int inc = 0, ntop;
+            if ( vlen==BCF_VL_A )
+            {
+                assert( nret==nA_ori );
+                ntop = nA_ori;
+                ndat = nA_new;
+                inc  = 1;
+            }
+            else
+            {
+                assert( nret==nR_ori );
+                ntop = nR_ori;
+                ndat = nR_new;
+            }
+            int k = 0;
+
+            #define BRANCH(type_t,is_vector_end) \
+            { \
+                type_t *ptr = (type_t*) dat; \
+                int size = sizeof(type_t); \
+                for (j=0; j<ntop; j++) /* j:ori, k:new */ \
+                { \
+                    if ( is_vector_end ) { memcpy(dat+k*size, dat+j*size, size); break; } \
+                    if ( rm_mask & 1<<(j+inc) ) continue; \
+                    if ( j!=k ) memcpy(dat+k*size, dat+j*size, size); \
+                    k++; \
+                } \
+            }
+            switch (type) 
+            {
+                case BCF_HT_INT:  BRANCH(int32_t,ptr[j]==bcf_int32_vector_end); break;
+                case BCF_HT_REAL: BRANCH(float,bcf_float_is_vector_end(ptr[j])); break;
+            }
+            #undef BRANCH
+        }
+        else    // Number=G
+        {
+            assert( nret==nG_ori );
+            int k, l_ori = -1, l_new = 0;
+            ndat = nG_new;
+
+            #define BRANCH(type_t,is_vector_end) \
+            { \
+                type_t *ptr = (type_t*) dat; \
+                int size = sizeof(type_t); \
+                for (j=0; j<nR_ori; j++) \
+                { \
+                    for (k=0; k<=j; k++) \
+                    { \
+                        l_ori++; \
+                        if ( is_vector_end ) { memcpy(dat+l_new*size, dat+l_ori*size, size); break; } \
+                        if ( rm_mask & 1<<j || rm_mask & 1<<k ) continue; \
+                        if ( l_ori!=l_new ) memcpy(dat+l_new*size, dat+l_ori*size, size); \
+                        l_new++; \
+                    } \
+                } \
+            }
+            switch (type) 
+            {
+                case BCF_HT_INT:  BRANCH(int32_t,ptr[l_ori]==bcf_int32_vector_end); break;
+                case BCF_HT_REAL: BRANCH(float,bcf_float_is_vector_end(ptr[l_ori])); break;
+            }
+            #undef BRANCH
+        }
+
+        nret = bcf_update_info(header, line, bcf_hdr_int2id(header,BCF_DT_ID,info->key), (void*)dat, ndat, type);
+        if ( nret<0 )
+        {
+            fprintf(stderr,"[%s:%d %s] Could not update INFO/%s at %s:%d [%d]\n", __FILE__,__LINE__,__FUNCTION__,
+                    bcf_hdr_int2id(header,BCF_DT_ID,info->key), bcf_seqname(header,line), line->pos+1, nret);
+            exit(1);
+        }
+    }
+
+    // Update GT fields, the allele indexes might have changed
+    for (i=1; i<line->n_allele; i++) if ( map[i]!=i ) break;
+    if ( i<line->n_allele )
+    {
+        mdat = mdat_bytes / 4;  // sizeof(int32_t)
+        nret = bcf_get_genotypes(header,line,(void**)&dat,&mdat);
+        mdat_bytes = mdat * 4;
+        if ( nret>0 )
+        {
+            nret /= line->n_sample;
+            int32_t *ptr = (int32_t*) dat;
+            for (i=0; i<line->n_sample; i++)
+            {
+                for (j=0; j<nret; j++)
+                {
+                    if ( ptr[j]==bcf_gt_missing ) continue;
+                    if ( ptr[j]==bcf_int32_vector_end ) break;
+                    int al = bcf_gt_allele(ptr[j]);
+                    assert( al<nR_ori && map[al]>=0 );
+                    ptr[j] = (map[al]+1)<<1 | (ptr[j]&1);
+                }
+                ptr += nret;
+            }
+            bcf_update_genotypes(header, line, (void*)dat, nret*line->n_sample);
+        }
+    }
+
+    // Remove from Number=G, Number=R and Number=A FORMAT fields. 
+    // Assuming haploid or diploid GTs
+    for (i=0; i<line->n_fmt; i++)
+    {
+        bcf_fmt_t *fmt = &line->d.fmt[i];
+        int vlen = bcf_hdr_id2length(header,BCF_HL_FMT,fmt->id);
+
+        if ( vlen!=BCF_VL_A && vlen!=BCF_VL_G && vlen!=BCF_VL_R ) continue; // no need to change
+
+        int type = bcf_hdr_id2type(header,BCF_HL_FMT,fmt->id);
+        if ( type==BCF_HT_FLAG ) continue;
+
+        int size = 1;
+        if ( type==BCF_HT_REAL || type==BCF_HT_INT ) size = 4;
+
+        mdat = mdat_bytes / size;
+        nret = bcf_get_format_values(header, line, bcf_hdr_int2id(header,BCF_DT_ID,fmt->id), (void**)&dat, &mdat, type);
+        mdat_bytes = mdat * size;
+        if ( nret<0 ) 
+        { 
+            fprintf(stderr,"[%s:%d %s] Could not access FORMAT/%s at %s:%d [%d]\n", __FILE__,__LINE__,__FUNCTION__, 
+                    bcf_hdr_int2id(header,BCF_DT_ID,fmt->id), bcf_seqname(header,line), line->pos+1, nret); 
+            exit(1);
+        }
+
+        if ( type==BCF_HT_STR ) 
+        {
+            int size = nret/line->n_sample;     // number of bytes per sample
+            str.l = 0;
+            if ( vlen==BCF_VL_A || vlen==BCF_VL_R )
+            {
+                int nexp, inc = 0;
+                if ( vlen==BCF_VL_A )
+                {
+                    nexp = nA_ori;
+                    inc  = 1;
+                }
+                else
+                    nexp = nR_ori;
+                for (j=0; j<line->n_sample; j++)
+                {
+                    char *ss = ((char*)dat) + j*size, *se = ss + size, *ptr = ss;
+                    int k_src = 0, k_dst = 0, l = str.l;
+                    for (k_src=0; k_src<nexp; k_src++)
+                    {
+                        if ( ptr>=se || !*ptr) break;
+                        while ( ptr<se && *ptr && *ptr!=',' ) ptr++;
+                        if ( rm_mask & 1<<(k_src+inc) )
+                        {
+                            ss = ++ptr;
+                            continue;
+                        }
+                        if ( k_dst ) kputc(',',&str);
+                        kputsn(ss,ptr-ss,&str);
+                        ss = ++ptr;
+                        k_dst++;
+                    }
+                    assert( k_src==nexp );
+                    l = str.l - l;
+                    for (; l<size; l++) kputc(0, &str);
+                }
+            }
+            else    // Number=G, diploid or haploid
+            {
+                for (j=0; j<line->n_sample; j++)
+                {
+                    char *ss = ((char*)dat) + j*size, *se = ss + size, *ptr = ss;
+                    int k_src = 0, k_dst = 0, l = str.l;
+                    int nexp = 0; // diploid or haploid?
+                    while ( ptr<se )
+                    {
+                        if ( !*ptr ) break;
+                        if ( *ptr==',' ) nexp++;
+                        ptr++;
+                    }
+                    if ( ptr!=ss ) nexp++;
+                    assert( nexp==nG_ori || nexp==nR_ori );
+                    ptr = ss;
+                    if ( nexp==nG_ori ) // diploid
+                    {
+                        int ia, ib;
+                        for (ia=0; ia<nR_ori; ia++)
+                        {
+                            for (ib=0; ib<=ia; ib++)
+                            {
+                                if ( ptr>=se || !*ptr ) break;
+                                while ( ptr<se && *ptr && *ptr!=',' ) ptr++;
+                                if ( rm_mask & 1<<ia || rm_mask & 1<<ib )
+                                {
+                                    ss = ++ptr;
+                                    continue;
+                                }
+                                if ( k_dst ) kputc(',',&str);
+                                kputsn(ss,ptr-ss,&str);
+                                ss = ++ptr;
+                                k_dst++;
+                            }
+                            if ( ptr>=se || !*ptr ) break;
+                        }
+                    }
+                    else    // haploid
+                    {
+                        for (k_src=0; k_src<nR_ori; k_src++)
+                        {
+                            if ( ptr>=se || !*ptr ) break;
+                            while ( ptr<se && *ptr && *ptr!=',' ) ptr++;
+                            if ( rm_mask & 1<<k_src )
+                            {
+                                ss = ++ptr;
+                                continue;
+                            }
+                            if ( k_dst ) kputc(',',&str);
+                            kputsn(ss,ptr-ss,&str);
+                            ss = ++ptr;
+                            k_dst++;
+                        }
+                        assert( k_src==nR_ori );
+                        l = str.l - l;
+                        for (; l<size; l++) kputc(0, &str);
+                    }
+                }
+            }
+            nret = bcf_update_format(header, line, bcf_hdr_int2id(header,BCF_DT_ID,fmt->id), (void*)str.s, str.l, type);
+            if ( nret<0 )
+            {
+                fprintf(stderr,"[%s:%d %s] Could not update FORMAT/%s at %s:%d [%d]\n", __FILE__,__LINE__,__FUNCTION__,
+                        bcf_hdr_int2id(header,BCF_DT_ID,fmt->id), bcf_seqname(header,line), line->pos+1, nret);
+                exit(1);
+            }
+            continue;
+        }
+
+        int nori = nret / line->n_sample;
+        if ( vlen==BCF_VL_A || vlen==BCF_VL_R || (vlen==BCF_VL_G && nori==nR_ori) ) // Number=A, R or haploid Number=G
+        {
+            int ntop, inc = 0;
+            if ( vlen==BCF_VL_A )
+            {
+                assert( nori==nA_ori );     // todo: will fail if all values are missing
+                ntop = nA_ori;
+                ndat = nA_new*line->n_sample;
+                inc  = 1;
+            }
+            else
+            {
+                assert( nori==nR_ori );     // todo: will fail if all values are missing
+                ntop = nR_ori;
+                ndat = nR_new*line->n_sample;
+            }
+
+            #define BRANCH(type_t,is_vector_end) \
+            { \
+                for (j=0; j<line->n_sample; j++) \
+                { \
+                    type_t *ptr_src = ((type_t*)dat) + j*nori; \
+                    type_t *ptr_dst = ((type_t*)dat) + j*nA_new; \
+                    int size = sizeof(type_t); \
+                    int k_src, k_dst = 0; \
+                    for (k_src=0; k_src<ntop; k_src++) \
+                    { \
+                        if ( is_vector_end ) { memcpy(ptr_dst+k_dst, ptr_src+k_src, size); break; } \
+                        if ( rm_mask & 1<<(k_src+inc) ) continue; \
+                        if ( k_src!=k_dst ) memcpy(ptr_dst+k_dst, ptr_src+k_src, size); \
+                        k_dst++; \
+                    } \
+                } \
+            }
+            switch (type) 
+            {
+                case BCF_HT_INT:  BRANCH(int32_t,ptr_src[k_src]==bcf_int32_vector_end); break;
+                case BCF_HT_REAL: BRANCH(float,bcf_float_is_vector_end(ptr_src[k_src])); break;
+            }
+            #undef BRANCH
+        }
+        else    // Number=G, diploid or mixture of haploid+diploid
+        {
+            assert( nori==nG_ori );
+            ndat = nG_new*line->n_sample;
+
+            #define BRANCH(type_t,is_vector_end) \
+            { \
+                for (j=0; j<line->n_sample; j++) \
+                { \
+                    type_t *ptr_src = ((type_t*)dat) + j*nori; \
+                    type_t *ptr_dst = ((type_t*)dat) + j*nG_new; \
+                    int size = sizeof(type_t); \
+                    int ia, ib, k_dst = 0, k_src; \
+                    int nset = 0;   /* haploid or diploid? */ \
+                    for (k_src=0; k_src<nG_ori; k_src++) { if ( is_vector_end ) break; nset++; } \
+                    if ( nset==nR_ori ) /* haploid */ \
+                    { \
+                        for (k_src=0; k_src<nR_ori; k_src++) \
+                        { \
+                            if ( rm_mask & 1<<k_src ) continue; \
+                            if ( k_src!=k_dst ) memcpy(ptr_dst+k_dst, ptr_src+k_src, size); \
+                            k_dst++; \
+                        } \
+                        memcpy(ptr_dst+k_dst, ptr_src+k_src, size); \
+                    } \
+                    else /* diploid */ \
+                    { \
+                        k_src = -1; \
+                        for (ia=0; ia<nR_ori; ia++) \
+                        { \
+                            for (ib=0; ib<=ia; ib++) \
+                            { \
+                                k_src++; \
+                                if ( is_vector_end ) { memcpy(ptr_dst+k_dst, ptr_src+k_src, size); ia = nR_ori; break; } \
+                                if ( rm_mask & 1<<ia || rm_mask & 1<<ib ) continue; \
+                                if ( k_src!=k_dst ) memcpy(ptr_dst+k_dst, ptr_src+k_src, size); \
+                                k_dst++; \
+                            } \
+                        } \
+                    } \
+                } \
+            }
+            switch (type) 
+            {
+                case BCF_HT_INT:  BRANCH(int32_t,ptr_src[k_src]==bcf_int32_vector_end); break;
+                case BCF_HT_REAL: BRANCH(float,bcf_float_is_vector_end(ptr_src[k_src])); break;
+            }
+            #undef BRANCH
+        }
+        nret = bcf_update_format(header, line, bcf_hdr_int2id(header,BCF_DT_ID,fmt->id), (void*)dat, ndat, type);
+        if ( nret<0 )
+        {
+            fprintf(stderr,"[%s:%d %s] Could not update FORMAT/%s at %s:%d [%d]\n", __FILE__,__LINE__,__FUNCTION__,
+                    bcf_hdr_int2id(header,BCF_DT_ID,fmt->id), bcf_seqname(header,line), line->pos+1, nret);
+            exit(1);
+        }
+    }
+    free(dat);
+    free(str.s);
+    free(map);
+}
+
diff --git a/htslib/version.h b/htslib/version.h
new file mode 100644
index 0000000..f72d827
--- /dev/null
+++ b/htslib/version.h
@@ -0,0 +1 @@
+#define HTS_VERSION "0.0.1"
\ No newline at end of file
diff --git a/pysam.egg-info/PKG-INFO b/pysam.egg-info/PKG-INFO
index 663796e..41920ad 100644
--- a/pysam.egg-info/PKG-INFO
+++ b/pysam.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pysam
-Version: 0.7.7
+Version: 0.8.0
 Summary: pysam
 Home-page: http://code.google.com/p/pysam/
 Author: Andreas Heger
@@ -13,4 +13,4 @@ Description:
         
         
 Platform: ALL
-Requires: cython (>=0.17)
+Requires: cython (>=0.20.1)
diff --git a/pysam.egg-info/SOURCES.txt b/pysam.egg-info/SOURCES.txt
index 49dc1f3..214947c 100644
--- a/pysam.egg-info/SOURCES.txt
+++ b/pysam.egg-info/SOURCES.txt
@@ -2,6 +2,7 @@ COPYING
 INSTALL
 KNOWN_BUGS
 MANIFEST.in
+README.rst
 THANKS
 pysam.py
 setup.cfg
@@ -9,18 +10,105 @@ setup.py
 doc/Makefile
 doc/api.rst
 doc/conf.py
-doc/contents.rst
 doc/developer.rst
 doc/faq.rst
 doc/glossary.rst
+doc/index.rst
 doc/make.bat
 doc/release.rst
 doc/usage.rst
+htslib/__init__.py
+htslib/bgzf.c
+htslib/bgzip.c
+htslib/config.h
+htslib/faidx.c
+htslib/hfile.c
+htslib/hfile_internal.h
+htslib/hfile_net.c
+htslib/hts.c
+htslib/kfunc.c
+htslib/knetfile.c
+htslib/kstring.c
+htslib/sam.c
+htslib/synced_bcf_reader.c
+htslib/tabix.c
+htslib/tbx.c
+htslib/vcf.c
+htslib/vcf_sweep.c
+htslib/vcfutils.c
+htslib/version.h
+htslib/cram/cram.h
+htslib/cram/cram_codecs.c
+htslib/cram/cram_codecs.h
+htslib/cram/cram_decode.c
+htslib/cram/cram_decode.h
+htslib/cram/cram_encode.c
+htslib/cram/cram_encode.h
+htslib/cram/cram_index.c
+htslib/cram/cram_index.h
+htslib/cram/cram_io.c
+htslib/cram/cram_io.h
+htslib/cram/cram_samtools.c
+htslib/cram/cram_samtools.h
+htslib/cram/cram_stats.c
+htslib/cram/cram_stats.h
+htslib/cram/cram_structs.h
+htslib/cram/files.c
+htslib/cram/mFILE.c
+htslib/cram/mFILE.h
+htslib/cram/md5.c
+htslib/cram/md5.h
+htslib/cram/misc.h
+htslib/cram/open_trace_file.c
+htslib/cram/open_trace_file.h
+htslib/cram/os.h
+htslib/cram/pooled_alloc.c
+htslib/cram/pooled_alloc.h
+htslib/cram/sam_header.c
+htslib/cram/sam_header.h
+htslib/cram/string_alloc.c
+htslib/cram/string_alloc.h
+htslib/cram/thread_pool.c
+htslib/cram/thread_pool.h
+htslib/cram/vlen.c
+htslib/cram/vlen.h
+htslib/cram/zfio.c
+htslib/cram/zfio.h
+htslib/htslib/__init__.py
+htslib/htslib/bgzf.h
+htslib/htslib/faidx.h
+htslib/htslib/hfile.h
+htslib/htslib/hts.h
+htslib/htslib/hts_defs.h
+htslib/htslib/kfunc.h
+htslib/htslib/khash.h
+htslib/htslib/khash_str2int.h
+htslib/htslib/klist.h
+htslib/htslib/knetfile.h
+htslib/htslib/kseq.h
+htslib/htslib/ksort.h
+htslib/htslib/kstdint.h
+htslib/htslib/kstring.h
+htslib/htslib/sam.h
+htslib/htslib/synced_bcf_reader.h
+htslib/htslib/tbx.h
+htslib/htslib/vcf.h
+htslib/htslib/vcf_sweep.h
+htslib/htslib/vcfutils.h
 pysam/Pileup.py
 pysam/TabProxies.c
 pysam/TabProxies.pxd
 pysam/TabProxies.pyx
 pysam/__init__.py
+pysam/cfaidx.c
+pysam/cfaidx.pxd
+pysam/cfaidx.pyx
+pysam/chtslib.c
+pysam/chtslib.pxd
+pysam/chtslib.pyx
+pysam/csamfile.c
+pysam/csamfile.pxd
+pysam/csamfile.pyx
 pysam/csamtools.c
 pysam/csamtools.pxd
 pysam/csamtools.pyx
@@ -30,9 +118,14 @@ pysam/ctabix.pyx
 pysam/cvcf.c
 pysam/cvcf.pxd
 pysam/cvcf.pyx
+pysam/htslib_util.c
+pysam/htslib_util.h
 pysam/namedtuple.py
+pysam/pysam_stream.h
 pysam/pysam_util.c
 pysam/pysam_util.h
+pysam/samfile_util.c
+pysam/samfile_util.h
 pysam/tabix_util.c
 pysam/tabix_util.h
 pysam/version.py
@@ -86,6 +179,7 @@ samtools/khash.h
 samtools/klist.h
 samtools/knetfile.c.pysam.c
 samtools/knetfile.h
+samtools/kprobaln.c
 samtools/kprobaln.c.pysam.c
 samtools/kprobaln.h
 samtools/kseq.h
@@ -127,76 +221,7 @@ samtools/win32/__init__.py
 samtools/win32/xcurses.h
 samtools/win32/zconf.h
 samtools/win32/zlib.h
-tabix/__init__.py
-tabix/bam_endian.h
-tabix/bedidx.c
-tabix/bedidx.c.pysam.c
-tabix/bgzf.c
-tabix/bgzf.c.pysam.c
-tabix/bgzf.h
-tabix/bgzip.c
-tabix/bgzip.c.pysam.c
-tabix/index.c
-tabix/index.c.pysam.c
-tabix/khash.h
-tabix/knetfile.c
-tabix/knetfile.c.pysam.c
-tabix/knetfile.h
-tabix/kseq.h
-tabix/ksort.h
-tabix/kstring.c
-tabix/kstring.c.pysam.c
-tabix/kstring.h
-tabix/pysam.h
-tabix/tabix.h
 tests/00README.txt
-tests/Makefile
-tests/ex1.fa
-tests/ex1.sam.gz
-tests/ex10.sam
-tests/ex3.sam
-tests/ex4.sam
-tests/ex5.sam
-tests/ex6.sam
-tests/ex7.sam
-tests/ex8.sam
-tests/ex9_fail.bam
-tests/ex9_nofail.bam
-tests/example.bed.gz
-tests/example.bed.gz.tbi
-tests/example.gtf.gz
 tests/example.gtf.gz.tbi
-tests/example.py
-tests/example.vcf40
-tests/example_btag.bam
-tests/example_btag.sam
-tests/example_empty_header.bam
-tests/example_unmapped_reads_no_sq.sam
-tests/example_user_header.sam
-tests/issue100.bam
 tests/pysam_test.py
-tests/segfault_tests.py
-tests/tabix_test.py
-tests/tag_bug.bam
-tests/test_unaligned.bam
-tests/vcf-examples/10.vcf
-tests/vcf-examples/11.vcf
-tests/vcf-examples/12.vcf
-tests/vcf-examples/13.vcf
-tests/vcf-examples/15.vcf
-tests/vcf-examples/16.vcf
-tests/vcf-examples/18.vcf
-tests/vcf-examples/2.vcf
-tests/vcf-examples/20.vcf
-tests/vcf-examples/21.vcf
-tests/vcf-examples/22.vcf
-tests/vcf-examples/23.vcf
-tests/vcf-examples/24.vcf
-tests/vcf-examples/3.vcf
-tests/vcf-examples/4.vcf
-tests/vcf-examples/5.vcf
-tests/vcf-examples/6.vcf
-tests/vcf-examples/7.vcf
-tests/vcf-examples/8.vcf
-tests/vcf-examples/9.vcf
-tests/vcf-examples/issue85.vcf
\ No newline at end of file
+tests/tabix_test.py
\ No newline at end of file
diff --git a/pysam.egg-info/requires.txt b/pysam.egg-info/requires.txt
index 9410b7b..b8144e4 100644
--- a/pysam.egg-info/requires.txt
+++ b/pysam.egg-info/requires.txt
@@ -1 +1 @@
-cython>=0.17
\ No newline at end of file
+cython>=0.20.1
\ No newline at end of file
diff --git a/pysam/TabProxies.c b/pysam/TabProxies.c
index c1ab8fe..ccbae13 100644
--- a/pysam/TabProxies.c
+++ b/pysam/TabProxies.c
@@ -1,12 +1,25 @@
-/* Generated by Cython 0.18 on Sat Nov 16 01:37:33 2013 */
+/* Generated by Cython 0.20.1 on Tue Jul 15 21:20:07 2014 */
 
 #define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
 #include "Python.h"
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
 #elif PY_VERSION_HEX < 0x02040000
     #error Cython requires Python 2.4+.
 #else
+#define CYTHON_ABI "0_20_1"
 #include <stddef.h> /* For offsetof */
 #ifndef offsetof
 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -41,6 +54,9 @@
 #define CYTHON_COMPILING_IN_PYPY 0
 #define CYTHON_COMPILING_IN_CPYTHON 1
 #endif
+#if CYTHON_COMPILING_IN_PYPY
+#define Py_OptimizeFlag 0
+#endif
 #if PY_VERSION_HEX < 0x02050000
   typedef int Py_ssize_t;
   #define PY_SSIZE_T_MAX INT_MAX
@@ -48,7 +64,7 @@
   #define PY_FORMAT_SIZE_T ""
   #define CYTHON_FORMAT_SSIZE_T ""
   #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
-  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
+  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
   #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                 (PyErr_Format(PyExc_TypeError, \
                                               "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
@@ -100,13 +116,15 @@
 #if PY_MAJOR_VERSION < 3
   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
-          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
 #else
   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
 #endif
-#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
+#if PY_VERSION_HEX < 0x02060000
   #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
 #endif
 #if PY_MAJOR_VERSION >= 3
@@ -116,19 +134,47 @@
 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
+#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
+  #define Py_TPFLAGS_IS_ABSTRACT 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
   #define CYTHON_PEP393_ENABLED 1
   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                               0 : _PyUnicode_Ready((PyObject *)(op)))
   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
 #else
   #define CYTHON_PEP393_ENABLED 0
   #define __Pyx_PyUnicode_READY(op)       (0)
   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
-  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
 #endif
 #if PY_MAJOR_VERSION >= 3
   #define PyBaseString_Type            PyUnicode_Type
@@ -155,6 +201,14 @@
   #define PyBytes_Concat               PyString_Concat
   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
 #endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
 #if PY_VERSION_HEX < 0x02060000
   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
@@ -178,11 +232,12 @@
   #define PyInt_AsSsize_t              PyLong_AsSsize_t
   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
 #endif
 #if PY_MAJOR_VERSION >= 3
   #define PyBoolObject                 PyLongObject
 #endif
-#if PY_VERSION_HEX < 0x03020000
+#if PY_VERSION_HEX < 0x030200A4
   typedef long Py_hash_t;
   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
@@ -227,6 +282,40 @@
   #define __Pyx_NAMESTR(n) (n)
   #define __Pyx_DOCSTR(n)  (n)
 #endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
 
 
 #if PY_MAJOR_VERSION >= 3
@@ -264,17 +353,6 @@
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
-    #define CYTHON_INLINE __inline__
-  #elif defined(_MSC_VER)
-    #define CYTHON_INLINE __inline
-  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-    #define CYTHON_INLINE inline
-  #else
-    #define CYTHON_INLINE
-  #endif
-#endif
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
@@ -288,23 +366,142 @@
 #   define CYTHON_UNUSED
 # endif
 #endif
-typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
-
-#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
-#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 #if CYTHON_COMPILING_IN_CPYTHON
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 #else
 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
 #endif
 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
 
 
 #ifdef __GNUC__
@@ -320,8 +517,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
   #define likely(x)   (x)
   #define unlikely(x) (x)
 #endif /* __GNUC__ */
-    
+
 static PyObject *__pyx_m;
+static PyObject *__pyx_d;
 static PyObject *__pyx_b;
 static PyObject *__pyx_empty_tuple;
 static PyObject *__pyx_empty_bytes;
@@ -340,8 +538,8 @@ static const char *__pyx_f[] = {
 
 /*--- Type declarations ---*/
 struct __pyx_obj_5pysam_10TabProxies_TupleProxy;
-struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy;
 struct __pyx_obj_5pysam_10TabProxies_GTFProxy;
+struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy;
 struct __pyx_obj_5pysam_10TabProxies_BedProxy;
 struct __pyx_obj_5pysam_10TabProxies_VCFProxy;
 
@@ -365,18 +563,6 @@ struct __pyx_obj_5pysam_10TabProxies_TupleProxy {
 };
 
 
-/* "pysam/TabProxies.pxd":69
- *     cdef char * getAttributes( self )
- * 
- * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
- *     pass
- * 
- */
-struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy {
-  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
-};
-
-
 /* "pysam/TabProxies.pxd":60
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
@@ -391,6 +577,18 @@ struct __pyx_obj_5pysam_10TabProxies_GTFProxy {
 };
 
 
+/* "pysam/TabProxies.pxd":69
+ *     cdef char * getAttributes( self )
+ * 
+ * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ *     pass
+ * 
+ */
+struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy {
+  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
+};
+
+
 /* "pysam/TabProxies.pxd":72
  *     pass
  * 
@@ -422,7 +620,7 @@ struct __pyx_obj_5pysam_10TabProxies_VCFProxy {
 
 
 
-/* "pysam/TabProxies.pyx":84
+/* "pysam/TabProxies.pyx":86
  *      return not (buffer <= p < buffer + nbytes )
  * 
  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
@@ -440,61 +638,61 @@ struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy {
 static struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *__pyx_vtabptr_5pysam_10TabProxies_TupleProxy;
 
 
-/* "pysam/TabProxies.pyx":571
- *         self.fromDict( r )
+/* "pysam/TabProxies.pyx":330
+ *         return str(v)
  * 
- * cdef class NamedTupleProxy( TupleProxy ):             # <<<<<<<<<<<<<<
+ * cdef class GTFProxy( TupleProxy ):             # <<<<<<<<<<<<<<
+ *     '''Proxy class for access to GTF fields.
  * 
- *     map_key2field = {}
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy {
+struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy {
   struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
+  char *(*getAttributes)(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *);
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy *__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy;
+static struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *__pyx_vtabptr_5pysam_10TabProxies_GTFProxy;
 
 
-/* "pysam/TabProxies.pyx":656
- *         TupleProxy._setindex(self, idx, str(value) )
+/* "pysam/TabProxies.pyx":580
+ *         self.fromDict( r )
  * 
- * cdef class VCFProxy( NamedTupleProxy ):             # <<<<<<<<<<<<<<
- *     '''Proxy class for access to VCF fields.
+ * cdef class NamedTupleProxy( TupleProxy ):             # <<<<<<<<<<<<<<
  * 
+ *     map_key2field = {}
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *__pyx_vtabptr_5pysam_10TabProxies_VCFProxy;
+static struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy *__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy;
 
 
-/* "pysam/TabProxies.pyx":326
- *         return str(v)
+/* "pysam/TabProxies.pyx":600
  * 
- * cdef class GTFProxy( TupleProxy ):             # <<<<<<<<<<<<<<
- *     '''Proxy class for access to GTF fields.
+ * 
+ * cdef class BedProxy( NamedTupleProxy ):             # <<<<<<<<<<<<<<
+ *     '''Proxy class for access to Bed fields.
  * 
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
-  char *(*getAttributes)(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *);
+struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *__pyx_vtabptr_5pysam_10TabProxies_GTFProxy;
+static struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy *__pyx_vtabptr_5pysam_10TabProxies_BedProxy;
 
 
-/* "pysam/TabProxies.pyx":590
- *         return f( self.fields[idx] )
+/* "pysam/TabProxies.pyx":666
+ *         TupleProxy._setindex(self, idx, str(value) )
  * 
- * cdef class BedProxy( NamedTupleProxy ):             # <<<<<<<<<<<<<<
- *     '''Proxy class for access to Bed fields.
+ * cdef class VCFProxy( NamedTupleProxy ):             # <<<<<<<<<<<<<<
+ *     '''Proxy class for access to VCF fields.
  * 
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy {
+struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy {
   struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy *__pyx_vtabptr_5pysam_10TabProxies_BedProxy;
+static struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *__pyx_vtabptr_5pysam_10TabProxies_VCFProxy;
 #ifndef CYTHON_REFNANNY
   #define CYTHON_REFNANNY 0
 #endif
@@ -546,22 +744,55 @@ static struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy *__pyx_vtabptr_5pysa
   #define __Pyx_XGOTREF(r)
   #define __Pyx_XGIVEREF(r)
 #endif /* CYTHON_REFNANNY */
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
+
+#include <string.h>
 
 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
          const char* cstring, Py_ssize_t start, Py_ssize_t stop,
          const char* encoding, const char* errors,
          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
 
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
 
-#include <string.h>
+static void __Pyx_WriteUnraisable(const char *name, int clineno,
+                                  int lineno, const char *filename,
+                                  int full_traceback); /*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*/
@@ -576,117 +807,104 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
 
 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
 
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
 
 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
     const char* function_name); /*proto*/
 
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
-    if (likely(PyList_CheckExact(L))) {
-        if (unlikely(PyList_Append(L, x) < 0)) return NULL;
-        Py_INCREF(Py_None);
-        return Py_None; /* this is just to have an accurate signature */
-    } else {
-        PyObject *r, *m;
-        m = __Pyx_GetAttrString(L, "append");
-        if (!m) return NULL;
-        r = PyObject_CallFunctionObjArgs(m, x, NULL);
-        Py_DECREF(m);
-        return r;
-    }
+static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
+    PyObject *method, *result = NULL;
+    if (unlikely(!args)) return NULL;
+    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+    if (unlikely(!method)) goto bad;
+    result = __Pyx_PyObject_Call(method, args, NULL);
+    Py_DECREF(method);
+bad:
+    Py_DECREF(args);
+    return result;
 }
+#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
+#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
+#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
+#define __Pyx_PyObject_CallMethod0(obj, name) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))
 
-static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
-    int result = PySequence_Contains(seq, item);
-    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
-}
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/
 
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-    PyObject *r;
-    if (!j) return NULL;
-    r = PyObject_GetItem(o, j);
-    Py_DECREF(j);
-    return r;
-}
-#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-        PyObject *r = PyList_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
-    }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#if PY_MAJOR_VERSION < 3
+#define __Pyx_PyString_Join __Pyx_PyBytes_Join
+#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
 #else
-    return PySequence_GetItem(o, i);
+#define __Pyx_PyString_Join PyUnicode_Join
+#define __Pyx_PyBaseString_Join PyUnicode_Join
 #endif
-}
-#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
 #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
-        PyObject *r = PyTuple_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
-    }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+    #if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyBytes_Join _PyString_Join
+    #else
+    #define __Pyx_PyBytes_Join _PyBytes_Join
+    #endif
 #else
-    return PySequence_GetItem(o, i);
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/
 #endif
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
+    int result = PySequence_Contains(seq, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
 }
-#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (PyList_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-            PyObject *r = PyList_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    }
-    else if (PyTuple_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
-            PyObject *r = PyTuple_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    } else {  /* inlined PySequence_GetItem() */
-        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-        if (likely(m && m->sq_item)) {
-            if (unlikely(i < 0) && likely(m->sq_length)) {
-                Py_ssize_t l = m->sq_length(o);
-                if (unlikely(l < 0)) return NULL;
-                i += l;
-            }
-            return m->sq_item(o, i);
-        }
-    }
+
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
+
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
 #else
-    if (PySequence_Check(o)) {
-        return PySequence_GetItem(o, i);
-    }
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
 #endif
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-}
+
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
+               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck);
 
 static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
 #if CYTHON_COMPILING_IN_PYPY
@@ -700,8 +918,13 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
  PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
 #endif
 
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+        int has_cstart, int has_cstop, int wraparound);
+
 #if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
     PyListObject* L = (PyListObject*) list;
     Py_ssize_t len = Py_SIZE(list);
     if (likely(L->allocated > len)) {
@@ -713,57 +936,55 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
     return PyList_Append(list, x);
 }
 #else
-#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
+static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
+#else
+#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
+#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
 #endif
 
 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
-
-static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject *);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t);
-
-static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
-
-static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
-
-static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
-
-static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
-
-static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
-
-static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
-
-static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
-
-static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
-
-static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_setattro))
+        return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_setattr))
+        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+    return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
 
-static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
 
-static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
 
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
 
-static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
 
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
 
-static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
 
-static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);
 
-static void __Pyx_WriteUnraisable(const char *name, int clineno,
-                                  int lineno, const char *filename); /*proto*/
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);
 
 static int __Pyx_check_binary_version(void);
 
-static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
-
 #if !defined(__Pyx_PyIdentifier_FromString)
 #if PY_MAJOR_VERSION < 3
   #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
@@ -950,183 +1171,200 @@ static int __pyx_pf_5pysam_10TabProxies_8VCFProxy___cinit__(struct __pyx_obj_5py
 static Py_ssize_t __pyx_pf_5pysam_10TabProxies_8VCFProxy_2__len__(struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5pysam_10TabProxies_8VCFProxy_3pos___get__(struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_self); /* proto */
 static int __pyx_pf_5pysam_10TabProxies_8VCFProxy_4__setattr__(struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
-static char __pyx_k_1[] = "Argument must be string or unicode.";
-static char __pyx_k_3[] = "Argument must be string, bytes or unicode.";
-static char __pyx_k_5[] = "malformatted entry at %s";
-static char __pyx_k_6[] = "";
-static char __pyx_k_7[] = "out of memory";
-static char __pyx_k_9[] = "incomplete line at %s";
-static char __pyx_k_11[] = "row too large - more than %i fields";
-static char __pyx_k_12[] = "list index out of range";
-static char __pyx_k_14[] = "list index out of range %i >= %i";
-static char __pyx_k_18[] = "\t";
-static char __pyx_k_21[] = ".";
-static char __pyx_k_22[] = "\"%s\"";
-static char __pyx_k_32[] = ";";
-static char __pyx_k_34[] = " ";
-static char __pyx_k_36[] = "\"";
-static char __pyx_k_37[] = "%s \"%s\"";
-static char __pyx_k_38[] = "%s %s";
-static char __pyx_k_39[] = "; ";
-static char __pyx_k_41[] = "-";
-static char __pyx_k_44[] = "'GTFProxy' has no attribute '%s'";
-static char __pyx_k_45[] = "field %s not set";
-static char __pyx_k_46[] = "bed format requires at least three columns";
-static char __pyx_k_48[] = "contig of feature.";
-static char __pyx_k_49[] = "feature source.";
-static char __pyx_k_50[] = "feature name.";
-static char __pyx_k_51[] = "feature start (in 0-based open/closed coordinates).";
-static char __pyx_k_52[] = "feature end (in 0-based open/closed coordinates).";
-static char __pyx_k_53[] = "feature score.";
-static char __pyx_k_54[] = "feature strand.";
-static char __pyx_k_55[] = "feature frame.";
-static char __pyx_k_56[] = "feature attributes (as a string).";
-static char __pyx_k_57[] = "getfilesystemencoding";
-static char __pyx_k_60[] = "/home/andreas/devel/pysam/pysam/TabProxies.pyx";
-static char __pyx_k_61[] = "pysam.TabProxies";
-static char __pyx_k__v[] = "v";
-static char __pyx_k__id[] = "id";
-static char __pyx_k__alt[] = "alt";
-static char __pyx_k__end[] = "end";
-static char __pyx_k__pos[] = "pos";
-static char __pyx_k__ref[] = "ref";
-static char __pyx_k__sys[] = "sys";
-static char __pyx_k__info[] = "info";
-static char __pyx_k__join[] = "join";
-static char __pyx_k__name[] = "name";
-static char __pyx_k__qual[] = "qual";
-static char __pyx_k__ascii[] = "ascii";
-static char __pyx_k__frame[] = "frame";
-static char __pyx_k__index[] = "index";
-static char __pyx_k__items[] = "items";
-static char __pyx_k__quote[] = "quote";
-static char __pyx_k__range[] = "range";
-static char __pyx_k__score[] = "score";
-static char __pyx_k__split[] = "split";
-static char __pyx_k__start[] = "start";
-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__asDict[] = "asDict";
-static char __pyx_k__contig[] = "contig";
-static char __pyx_k__decode[] = "decode";
-static char __pyx_k__encode[] = "encode";
-static char __pyx_k__filter[] = "filter";
-static char __pyx_k__format[] = "format";
-static char __pyx_k__source[] = "source";
-static char __pyx_k__strand[] = "strand";
-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__KeyError[] = "KeyError";
-static char __pyx_k____main__[] = "__main__";
-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__IndexError[] = "IndexError";
-static char __pyx_k__ValueError[] = "ValueError";
-static char __pyx_k__attributes[] = "attributes";
-static char __pyx_k__blockCount[] = "blockCount";
-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____setitem__[] = "__setitem__";
-static char __pyx_k__blockStarts[] = "blockStarts";
-static char __pyx_k__StopIteration[] = "StopIteration";
-static char __pyx_k__map_key2field[] = "map_key2field";
-static char __pyx_k__AttributeError[] = "AttributeError";
-static char __pyx_k__getdefaultencoding[] = "getdefaultencoding";
-static PyObject *__pyx_kp_u_1;
-static PyObject *__pyx_kp_s_11;
-static PyObject *__pyx_kp_s_12;
-static PyObject *__pyx_kp_s_14;
-static PyObject *__pyx_kp_s_18;
-static PyObject *__pyx_kp_s_21;
-static PyObject *__pyx_kp_s_22;
-static PyObject *__pyx_kp_u_3;
-static PyObject *__pyx_kp_s_32;
-static PyObject *__pyx_kp_s_34;
-static PyObject *__pyx_kp_s_36;
-static PyObject *__pyx_kp_s_37;
-static PyObject *__pyx_kp_s_38;
-static PyObject *__pyx_kp_s_39;
-static PyObject *__pyx_kp_s_41;
-static PyObject *__pyx_kp_s_44;
-static PyObject *__pyx_kp_s_45;
-static PyObject *__pyx_kp_s_46;
-static PyObject *__pyx_kp_s_5;
-static PyObject *__pyx_n_s_57;
-static PyObject *__pyx_kp_s_6;
-static PyObject *__pyx_kp_s_60;
-static PyObject *__pyx_n_s_61;
-static PyObject *__pyx_kp_s_7;
-static PyObject *__pyx_kp_s_9;
-static PyObject *__pyx_n_s__AttributeError;
-static PyObject *__pyx_n_s__IndexError;
-static PyObject *__pyx_n_s__KeyError;
-static PyObject *__pyx_n_s__StopIteration;
-static PyObject *__pyx_n_s__StringTypes;
-static PyObject *__pyx_n_s__TypeError;
-static PyObject *__pyx_n_s__ValueError;
-static PyObject *__pyx_n_s____getattr__;
-static PyObject *__pyx_n_s____main__;
-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__asDict;
-static PyObject *__pyx_n_s__ascii;
-static PyObject *__pyx_n_s__attributes;
-static PyObject *__pyx_n_s__blockCount;
-static PyObject *__pyx_n_s__blockSizes;
-static PyObject *__pyx_n_s__blockStarts;
-static PyObject *__pyx_n_s__contig;
-static PyObject *__pyx_n_s__decode;
-static PyObject *__pyx_n_s__encode;
-static PyObject *__pyx_n_s__end;
-static PyObject *__pyx_n_s__feature;
-static PyObject *__pyx_n_s__filter;
-static PyObject *__pyx_n_s__format;
-static PyObject *__pyx_n_s__frame;
-static PyObject *__pyx_n_s__fromDict;
-static PyObject *__pyx_n_s__getdefaultencoding;
-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__itemRGB;
-static PyObject *__pyx_n_s__items;
-static PyObject *__pyx_n_s__join;
-static PyObject *__pyx_n_s__map_key2field;
-static PyObject *__pyx_n_s__name;
-static PyObject *__pyx_n_s__pos;
-static PyObject *__pyx_n_s__qual;
-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__source;
-static PyObject *__pyx_n_s__split;
-static PyObject *__pyx_n_s__start;
-static PyObject *__pyx_n_s__strand;
-static PyObject *__pyx_n_s__strip;
-static PyObject *__pyx_n_s__sys;
-static PyObject *__pyx_n_s__thickEnd;
-static PyObject *__pyx_n_s__thickStart;
-static PyObject *__pyx_n_s__toDot;
-static PyObject *__pyx_n_s__types;
-static PyObject *__pyx_n_s__v;
-static PyObject *__pyx_n_s__value;
-static PyObject *__pyx_n_s__xrange;
+static PyObject *__pyx_tp_new_5pysam_10TabProxies_TupleProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_10TabProxies_GTFProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_10TabProxies_NamedTupleProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_10TabProxies_BedProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_10TabProxies_VCFProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_s[] = "\"%s\"";
+static char __pyx_k_v[] = "v";
+static char __pyx_k__3[] = "";
+static char __pyx_k_id[] = "id";
+static char __pyx_k__10[] = "\t";
+static char __pyx_k__13[] = ".";
+static char __pyx_k__23[] = ";";
+static char __pyx_k__26[] = " ";
+static char __pyx_k__27[] = "\"";
+static char __pyx_k__29[] = "; ";
+static char __pyx_k__31[] = "-";
+static char __pyx_k_alt[] = "alt";
+static char __pyx_k_end[] = "end";
+static char __pyx_k_pos[] = "pos";
+static char __pyx_k_ref[] = "ref";
+static char __pyx_k_s_s[] = "%s \"%s\"";
+static char __pyx_k_str[] = "__str__";
+static char __pyx_k_sys[] = "sys";
+static char __pyx_k_info[] = "info";
+static char __pyx_k_join[] = "join";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_name[] = "name";
+static char __pyx_k_qual[] = "qual";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_ascii[] = "ascii";
+static char __pyx_k_frame[] = "frame";
+static char __pyx_k_index[] = "index";
+static char __pyx_k_items[] = "items";
+static char __pyx_k_quote[] = "quote";
+static char __pyx_k_range[] = "range";
+static char __pyx_k_s_s_2[] = "%s %s";
+static char __pyx_k_score[] = "score";
+static char __pyx_k_split[] = "split";
+static char __pyx_k_start[] = "start";
+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_decode[] = "decode";
+static char __pyx_k_encode[] = "encode";
+static char __pyx_k_filter[] = "filter";
+static char __pyx_k_format[] = "format";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_source[] = "source";
+static char __pyx_k_strand[] = "strand";
+static char __pyx_k_string[] = "string";
+static char __pyx_k_xrange[] = "xrange";
+static char __pyx_k_feature[] = "feature";
+static char __pyx_k_getattr[] = "__getattr__";
+static char __pyx_k_indices[] = "indices";
+static char __pyx_k_itemRGB[] = "itemRGB";
+static char __pyx_k_setitem[] = "__setitem__";
+static char __pyx_k_KeyError[] = "KeyError";
+static char __pyx_k_fromDict[] = "fromDict";
+static char __pyx_k_getindex[] = "_getindex";
+static char __pyx_k_maxsplit[] = "maxsplit";
+static char __pyx_k_setindex[] = "_setindex";
+static char __pyx_k_thickEnd[] = "thickEnd";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_IndexError[] = "IndexError";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_attributes[] = "attributes";
+static char __pyx_k_blockCount[] = "blockCount";
+static char __pyx_k_blockSizes[] = "blockSizes";
+static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static char __pyx_k_thickStart[] = "thickStart";
+static char __pyx_k_StringTypes[] = "StringTypes";
+static char __pyx_k_blockStarts[] = "blockStarts";
+static char __pyx_k_feature_name[] = "feature name.";
+static char __pyx_k_StopIteration[] = "StopIteration";
+static char __pyx_k_feature_frame[] = "feature frame.";
+static char __pyx_k_feature_score[] = "feature score.";
+static char __pyx_k_map_key2field[] = "map_key2field";
+static char __pyx_k_out_of_memory[] = "out of memory";
+static char __pyx_k_AttributeError[] = "AttributeError";
+static char __pyx_k_feature_source[] = "feature source.";
+static char __pyx_k_feature_strand[] = "feature strand.";
+static char __pyx_k_field_s_not_set[] = "field %s not set";
+static char __pyx_k_pysam_TabProxies[] = "pysam.TabProxies";
+static char __pyx_k_contig_of_feature[] = "contig of feature.";
+static char __pyx_k_getdefaultencoding[] = "getdefaultencoding";
+static char __pyx_k_incomplete_line_at_s[] = "incomplete line at %s";
+static char __pyx_k_getfilesystemencoding[] = "getfilesystemencoding";
+static char __pyx_k_list_index_out_of_range[] = "list index out of range";
+static char __pyx_k_malformatted_entry_at_s[] = "malformatted entry at %s";
+static char __pyx_k_GTFProxy_has_no_attribute_s[] = "'GTFProxy' has no attribute '%s'";
+static char __pyx_k_list_index_out_of_range_i_i[] = "list index out of range %i >= %i";
+static char __pyx_k_feature_attributes_as_a_string[] = "feature attributes (as a string).";
+static char __pyx_k_home_andreas_devel_pysam_pysam[] = "/home/andreas/devel/pysam/pysam/TabProxies.pyx";
+static char __pyx_k_Argument_must_be_string_bytes_or[] = "Argument must be string, bytes or unicode.";
+static char __pyx_k_Argument_must_be_string_or_unico[] = "Argument must be string or unicode.";
+static char __pyx_k_bed_format_requires_at_least_thr[] = "bed format requires at least three columns";
+static char __pyx_k_feature_end_in_0_based_open_clos[] = "feature end (in 0-based open/closed coordinates).";
+static char __pyx_k_feature_start_in_0_based_open_cl[] = "feature start (in 0-based open/closed coordinates).";
+static char __pyx_k_length_of_buffer_i_number_of_byt[] = "length of buffer (%i) != number of bytes (%i)";
+static char __pyx_k_row_too_large_more_than_i_fields[] = "row too large - more than %i fields";
+static PyObject *__pyx_kp_u_Argument_must_be_string_bytes_or;
+static PyObject *__pyx_kp_u_Argument_must_be_string_or_unico;
+static PyObject *__pyx_n_s_AttributeError;
+static PyObject *__pyx_kp_s_GTFProxy_has_no_attribute_s;
+static PyObject *__pyx_n_s_IndexError;
+static PyObject *__pyx_n_s_KeyError;
+static PyObject *__pyx_n_s_StopIteration;
+static PyObject *__pyx_n_s_StringTypes;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_kp_s__10;
+static PyObject *__pyx_kp_s__13;
+static PyObject *__pyx_kp_s__23;
+static PyObject *__pyx_kp_s__26;
+static PyObject *__pyx_kp_s__27;
+static PyObject *__pyx_kp_s__29;
+static PyObject *__pyx_kp_s__3;
+static PyObject *__pyx_kp_s__31;
+static PyObject *__pyx_n_s_alt;
+static PyObject *__pyx_n_s_append;
+static PyObject *__pyx_n_s_asDict;
+static PyObject *__pyx_n_s_ascii;
+static PyObject *__pyx_n_s_attributes;
+static PyObject *__pyx_kp_s_bed_format_requires_at_least_thr;
+static PyObject *__pyx_n_s_blockCount;
+static PyObject *__pyx_n_s_blockSizes;
+static PyObject *__pyx_n_s_blockStarts;
+static PyObject *__pyx_n_s_contig;
+static PyObject *__pyx_n_s_decode;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_end;
+static PyObject *__pyx_n_s_feature;
+static PyObject *__pyx_kp_s_field_s_not_set;
+static PyObject *__pyx_n_s_filter;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_n_s_frame;
+static PyObject *__pyx_n_s_fromDict;
+static PyObject *__pyx_n_s_getattr;
+static PyObject *__pyx_n_s_getdefaultencoding;
+static PyObject *__pyx_n_s_getfilesystemencoding;
+static PyObject *__pyx_n_s_getindex;
+static PyObject *__pyx_kp_s_home_andreas_devel_pysam_pysam;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_kp_s_incomplete_line_at_s;
+static PyObject *__pyx_n_s_index;
+static PyObject *__pyx_n_s_indices;
+static PyObject *__pyx_n_s_info;
+static PyObject *__pyx_n_s_itemRGB;
+static PyObject *__pyx_n_s_items;
+static PyObject *__pyx_n_s_join;
+static PyObject *__pyx_kp_s_length_of_buffer_i_number_of_byt;
+static PyObject *__pyx_kp_s_list_index_out_of_range;
+static PyObject *__pyx_kp_s_list_index_out_of_range_i_i;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_kp_s_malformatted_entry_at_s;
+static PyObject *__pyx_n_s_map_key2field;
+static PyObject *__pyx_n_s_maxsplit;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_kp_s_out_of_memory;
+static PyObject *__pyx_n_s_pos;
+static PyObject *__pyx_n_s_pysam_TabProxies;
+static PyObject *__pyx_n_s_pyx_vtable;
+static PyObject *__pyx_n_s_qual;
+static PyObject *__pyx_n_s_quote;
+static PyObject *__pyx_n_s_range;
+static PyObject *__pyx_n_s_ref;
+static PyObject *__pyx_kp_s_row_too_large_more_than_i_fields;
+static PyObject *__pyx_kp_s_s;
+static PyObject *__pyx_kp_s_s_s;
+static PyObject *__pyx_kp_s_s_s_2;
+static PyObject *__pyx_n_s_score;
+static PyObject *__pyx_n_s_setindex;
+static PyObject *__pyx_n_s_setitem;
+static PyObject *__pyx_n_s_source;
+static PyObject *__pyx_n_s_split;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_n_s_str;
+static PyObject *__pyx_n_s_strand;
+static PyObject *__pyx_n_s_string;
+static PyObject *__pyx_n_s_strip;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_thickEnd;
+static PyObject *__pyx_n_s_thickStart;
+static PyObject *__pyx_n_s_toDot;
+static PyObject *__pyx_n_s_types;
+static PyObject *__pyx_n_s_v;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_xrange;
 static PyObject *__pyx_int_0;
 static PyObject *__pyx_int_1;
 static PyObject *__pyx_int_2;
@@ -1139,37 +1377,39 @@ static PyObject *__pyx_int_8;
 static PyObject *__pyx_int_9;
 static PyObject *__pyx_int_10;
 static PyObject *__pyx_int_11;
-static PyObject *__pyx_k_tuple_2;
-static PyObject *__pyx_k_tuple_4;
-static PyObject *__pyx_k_tuple_8;
-static PyObject *__pyx_k_tuple_10;
-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_19;
-static PyObject *__pyx_k_tuple_20;
-static PyObject *__pyx_k_tuple_23;
-static PyObject *__pyx_k_tuple_24;
-static PyObject *__pyx_k_tuple_25;
-static PyObject *__pyx_k_tuple_26;
-static PyObject *__pyx_k_tuple_27;
-static PyObject *__pyx_k_tuple_28;
-static PyObject *__pyx_k_tuple_29;
-static PyObject *__pyx_k_tuple_30;
-static PyObject *__pyx_k_tuple_31;
-static PyObject *__pyx_k_tuple_33;
-static PyObject *__pyx_k_tuple_35;
-static PyObject *__pyx_k_tuple_40;
-static PyObject *__pyx_k_tuple_42;
-static PyObject *__pyx_k_tuple_43;
-static PyObject *__pyx_k_tuple_47;
-static PyObject *__pyx_k_tuple_58;
-static PyObject *__pyx_k_tuple_62;
-static PyObject *__pyx_k_codeobj_59;
-static PyObject *__pyx_k_codeobj_63;
-
-/* "pysam/TabProxies.pyx":7
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_slice__25;
+static PyObject *__pyx_slice__28;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__21;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__30;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__34;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_codeobj__36;
+static PyObject *__pyx_codeobj__38;
+
+/* "pysam/TabProxies.pyx":9
  * from cpython cimport PyErr_SetString, PyBytes_Check, PyUnicode_Check, PyBytes_FromStringAndSize
  * 
  * cdef from_string_and_size(char* s, size_t length):             # <<<<<<<<<<<<<<
@@ -1187,17 +1427,17 @@ static PyObject *__pyx_f_5pysam_10TabProxies_from_string_and_size(char *__pyx_v_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("from_string_and_size", 0);
 
-  /* "pysam/TabProxies.pyx":8
+  /* "pysam/TabProxies.pyx":10
  * 
  * cdef from_string_and_size(char* s, size_t length):
  *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
  *         return s[:length]
  *     else:
  */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":9
+    /* "pysam/TabProxies.pyx":11
  * cdef from_string_and_size(char* s, size_t length):
  *     if PY_MAJOR_VERSION < 3:
  *         return s[:length]             # <<<<<<<<<<<<<<
@@ -1205,16 +1445,15 @@ static PyObject *__pyx_f_5pysam_10TabProxies_from_string_and_size(char *__pyx_v_
  *         return s[:length].decode("ascii")
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_s + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":11
+    /* "pysam/TabProxies.pyx":13
  *         return s[:length]
  *     else:
  *         return s[:length].decode("ascii")             # <<<<<<<<<<<<<<
@@ -1222,16 +1461,22 @@ static PyObject *__pyx_f_5pysam_10TabProxies_from_string_and_size(char *__pyx_v_
  * # filename encoding (copied from lxml.etree.pyx)
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_s, 0, __pyx_v_length, NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_s, 0, __pyx_v_length, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":9
+ * from cpython cimport PyErr_SetString, PyBytes_Check, PyUnicode_Check, PyBytes_FromStringAndSize
+ * 
+ * cdef from_string_and_size(char* s, size_t length):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s[:length]
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("pysam.TabProxies.from_string_and_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -1242,7 +1487,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_from_string_and_size(char *__pyx_v_
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":21
+/* "pysam/TabProxies.pyx":23
  *     _FILENAME_ENCODING = 'ascii'
  * 
  * cdef bytes _my_encodeFilename(object filename):             # <<<<<<<<<<<<<<
@@ -1254,15 +1499,16 @@ static PyObject *__pyx_f_5pysam_10TabProxies__my_encodeFilename(PyObject *__pyx_
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_my_encodeFilename", 0);
 
-  /* "pysam/TabProxies.pyx":24
+  /* "pysam/TabProxies.pyx":26
  *     u"""Make sure a filename is 8-bit encoded (or None).
  *     """
  *     if filename is None:             # <<<<<<<<<<<<<<
@@ -1270,102 +1516,106 @@ static PyObject *__pyx_f_5pysam_10TabProxies__my_encodeFilename(PyObject *__pyx_
  *     elif PyBytes_Check(filename):
  */
   __pyx_t_1 = (__pyx_v_filename == Py_None);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":25
+    /* "pysam/TabProxies.pyx":27
  *     """
  *     if filename is None:
  *         return None             # <<<<<<<<<<<<<<
  *     elif PyBytes_Check(filename):
  *         return filename
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
+    __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(Py_None);
     __pyx_r = ((PyObject*)Py_None);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/TabProxies.pyx":26
+  /* "pysam/TabProxies.pyx":28
  *     if filename is None:
  *         return None
  *     elif PyBytes_Check(filename):             # <<<<<<<<<<<<<<
  *         return filename
  *     elif PyUnicode_Check(filename):
  */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_filename);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":27
+    /* "pysam/TabProxies.pyx":29
  *         return None
  *     elif PyBytes_Check(filename):
  *         return filename             # <<<<<<<<<<<<<<
  *     elif PyUnicode_Check(filename):
  *         return filename.encode(_FILENAME_ENCODING)
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_INCREF(__pyx_v_filename);
     __pyx_r = ((PyObject*)__pyx_v_filename);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/TabProxies.pyx":28
+  /* "pysam/TabProxies.pyx":30
  *     elif PyBytes_Check(filename):
  *         return filename
  *     elif PyUnicode_Check(filename):             # <<<<<<<<<<<<<<
  *         return filename.encode(_FILENAME_ENCODING)
  *     else:
  */
-  __pyx_t_1 = PyUnicode_Check(__pyx_v_filename);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":29
+    /* "pysam/TabProxies.pyx":31
  *         return filename
  *     elif PyUnicode_Check(filename):
  *         return filename.encode(_FILENAME_ENCODING)             # <<<<<<<<<<<<<<
  *     else:
  *         raise TypeError, u"Argument must be string or unicode."
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __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 = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
-    __Pyx_GIVEREF(((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
-    __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 = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __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_3)); __pyx_t_3 = 0;
-    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_r = ((PyObject*)__pyx_t_4);
-    __pyx_t_4 = 0;
+    __Pyx_INCREF(__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_5pysam_10TabProxies__FILENAME_ENCODING);
+    __Pyx_GIVEREF(__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_5);
+    __pyx_t_5 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":31
+    /* "pysam/TabProxies.pyx":33
  *         return filename.encode(_FILENAME_ENCODING)
  *     else:
  *         raise TypeError, u"Argument must be string or unicode."             # <<<<<<<<<<<<<<
  * 
  * cdef bytes _force_bytes(object s):
  */
-    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_1), 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_or_unico, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":23
+ *     _FILENAME_ENCODING = 'ascii'
+ * 
+ * cdef bytes _my_encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ *     u"""Make sure a filename is 8-bit encoded (or None).
+ *     """
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
   __Pyx_AddTraceback("pysam.TabProxies._my_encodeFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
   __pyx_L0:;
@@ -1374,7 +1624,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies__my_encodeFilename(PyObject *__pyx_
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":33
+/* "pysam/TabProxies.pyx":35
  *         raise TypeError, u"Argument must be string or unicode."
  * 
  * cdef bytes _force_bytes(object s):             # <<<<<<<<<<<<<<
@@ -1386,39 +1636,39 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_bytes(PyObject *__pyx_v_s) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_force_bytes", 0);
 
-  /* "pysam/TabProxies.pyx":36
+  /* "pysam/TabProxies.pyx":38
  *     u"""convert string or unicode object to bytes, assuming ascii encoding.
  *     """
  *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
  *         return s
  *     elif s is None:
  */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":37
+    /* "pysam/TabProxies.pyx":39
  *     """
  *     if PY_MAJOR_VERSION < 3:
  *         return s             # <<<<<<<<<<<<<<
  *     elif s is None:
  *         return None
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_INCREF(__pyx_v_s);
     __pyx_r = ((PyObject*)__pyx_v_s);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/TabProxies.pyx":38
+  /* "pysam/TabProxies.pyx":40
  *     if PY_MAJOR_VERSION < 3:
  *         return s
  *     elif s is None:             # <<<<<<<<<<<<<<
@@ -1426,95 +1676,99 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_bytes(PyObject *__pyx_v_s) {
  *     elif PyBytes_Check(s):
  */
   __pyx_t_1 = (__pyx_v_s == Py_None);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":39
+    /* "pysam/TabProxies.pyx":41
  *         return s
  *     elif s is None:
  *         return None             # <<<<<<<<<<<<<<
  *     elif PyBytes_Check(s):
  *         return s
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
+    __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(Py_None);
     __pyx_r = ((PyObject*)Py_None);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/TabProxies.pyx":40
+  /* "pysam/TabProxies.pyx":42
  *     elif s is None:
  *         return None
  *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
  *         return s
  *     elif PyUnicode_Check(s):
  */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_s);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":41
+    /* "pysam/TabProxies.pyx":43
  *         return None
  *     elif PyBytes_Check(s):
  *         return s             # <<<<<<<<<<<<<<
  *     elif PyUnicode_Check(s):
  *         return s.encode('ascii')
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_INCREF(__pyx_v_s);
     __pyx_r = ((PyObject*)__pyx_v_s);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/TabProxies.pyx":42
+  /* "pysam/TabProxies.pyx":44
  *     elif PyBytes_Check(s):
  *         return s
  *     elif PyUnicode_Check(s):             # <<<<<<<<<<<<<<
  *         return s.encode('ascii')
  *     else:
  */
-  __pyx_t_1 = PyUnicode_Check(__pyx_v_s);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":43
+    /* "pysam/TabProxies.pyx":45
  *         return s
  *     elif PyUnicode_Check(s):
  *         return s.encode('ascii')             # <<<<<<<<<<<<<<
  *     else:
  *         raise TypeError, u"Argument must be string, bytes or unicode."
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_r = ((PyObject*)__pyx_t_3);
-    __pyx_t_3 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_4);
+    __pyx_t_4 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":45
+    /* "pysam/TabProxies.pyx":47
  *         return s.encode('ascii')
  *     else:
  *         raise TypeError, u"Argument must be string, bytes or unicode."             # <<<<<<<<<<<<<<
  * 
  * cdef inline bytes _force_cmdline_bytes(object s):
  */
-    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_3), 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_bytes_or, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":35
+ *         raise TypeError, u"Argument must be string or unicode."
+ * 
+ * cdef bytes _force_bytes(object s):             # <<<<<<<<<<<<<<
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_AddTraceback("pysam.TabProxies._force_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
   __pyx_L0:;
@@ -1523,7 +1777,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_bytes(PyObject *__pyx_v_s) {
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":47
+/* "pysam/TabProxies.pyx":49
  *         raise TypeError, u"Argument must be string, bytes or unicode."
  * 
  * cdef inline bytes _force_cmdline_bytes(object s):             # <<<<<<<<<<<<<<
@@ -1540,22 +1794,29 @@ static CYTHON_INLINE PyObject *__pyx_f_5pysam_10TabProxies__force_cmdline_bytes(
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_force_cmdline_bytes", 0);
 
-  /* "pysam/TabProxies.pyx":48
+  /* "pysam/TabProxies.pyx":50
  * 
  * cdef inline bytes _force_cmdline_bytes(object s):
  *     return _force_bytes(s)             # <<<<<<<<<<<<<<
  * 
  * cdef _charptr_to_str(char* s):
  */
-  __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_10TabProxies__force_bytes(__pyx_v_s)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_10TabProxies__force_bytes(__pyx_v_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":49
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ * 
+ * cdef inline bytes _force_cmdline_bytes(object s):             # <<<<<<<<<<<<<<
+ *     return _force_bytes(s)
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.TabProxies._force_cmdline_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -1566,7 +1827,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5pysam_10TabProxies__force_cmdline_bytes(
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":50
+/* "pysam/TabProxies.pyx":52
  *     return _force_bytes(s)
  * 
  * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
@@ -1584,17 +1845,17 @@ static PyObject *__pyx_f_5pysam_10TabProxies__charptr_to_str(char *__pyx_v_s) {
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_charptr_to_str", 0);
 
-  /* "pysam/TabProxies.pyx":51
+  /* "pysam/TabProxies.pyx":53
  * 
  * cdef _charptr_to_str(char* s):
  *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
  *         return s
  *     else:
  */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":52
+    /* "pysam/TabProxies.pyx":54
  * cdef _charptr_to_str(char* s):
  *     if PY_MAJOR_VERSION < 3:
  *         return s             # <<<<<<<<<<<<<<
@@ -1602,16 +1863,15 @@ static PyObject *__pyx_f_5pysam_10TabProxies__charptr_to_str(char *__pyx_v_s) {
  *         return s.decode("ascii")
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_s); 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_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":54
+    /* "pysam/TabProxies.pyx":56
  *         return s
  *     else:
  *         return s.decode("ascii")             # <<<<<<<<<<<<<<
@@ -1619,16 +1879,22 @@ static PyObject *__pyx_f_5pysam_10TabProxies__charptr_to_str(char *__pyx_v_s) {
  * cdef _force_str(object s):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_s, 0, strlen(__pyx_v_s), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_s, 0, strlen(__pyx_v_s), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":52
+ *     return _force_bytes(s)
+ * 
+ * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("pysam.TabProxies._charptr_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -1639,7 +1905,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies__charptr_to_str(char *__pyx_v_s) {
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":56
+/* "pysam/TabProxies.pyx":58
  *         return s.decode("ascii")
  * 
  * cdef _force_str(object s):             # <<<<<<<<<<<<<<
@@ -1651,14 +1917,15 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_str(PyObject *__pyx_v_s) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_force_str", 0);
 
-  /* "pysam/TabProxies.pyx":58
+  /* "pysam/TabProxies.pyx":60
  * cdef _force_str(object s):
  *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
  *     if s is None:             # <<<<<<<<<<<<<<
@@ -1666,9 +1933,10 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_str(PyObject *__pyx_v_s) {
  *     if PY_MAJOR_VERSION < 3:
  */
   __pyx_t_1 = (__pyx_v_s == Py_None);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":59
+    /* "pysam/TabProxies.pyx":61
  *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
  *     if s is None:
  *         return None             # <<<<<<<<<<<<<<
@@ -1679,21 +1947,19 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_str(PyObject *__pyx_v_s) {
     __Pyx_INCREF(Py_None);
     __pyx_r = Py_None;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":60
+  /* "pysam/TabProxies.pyx":62
  *     if s is None:
  *         return None
  *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
  *         return s
  *     elif PyBytes_Check(s):
  */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
-  if (__pyx_t_1) {
+  __pyx_t_2 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":61
+    /* "pysam/TabProxies.pyx":63
  *         return None
  *     if PY_MAJOR_VERSION < 3:
  *         return s             # <<<<<<<<<<<<<<
@@ -1704,20 +1970,19 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_str(PyObject *__pyx_v_s) {
     __Pyx_INCREF(__pyx_v_s);
     __pyx_r = __pyx_v_s;
     goto __pyx_L0;
-    goto __pyx_L4;
   }
 
-  /* "pysam/TabProxies.pyx":62
+  /* "pysam/TabProxies.pyx":64
  *     if PY_MAJOR_VERSION < 3:
  *         return s
  *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
  *         return s.decode('ascii')
  *     else:
  */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_s);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":63
+    /* "pysam/TabProxies.pyx":65
  *         return s
  *     elif PyBytes_Check(s):
  *         return s.decode('ascii')             # <<<<<<<<<<<<<<
@@ -1725,19 +1990,18 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_str(PyObject *__pyx_v_s) {
  *         # assume unicode
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
     goto __pyx_L0;
-    goto __pyx_L4;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":66
+    /* "pysam/TabProxies.pyx":68
  *     else:
  *         # assume unicode
  *         return s             # <<<<<<<<<<<<<<
@@ -1749,13 +2013,19 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_str(PyObject *__pyx_v_s) {
     __pyx_r = __pyx_v_s;
     goto __pyx_L0;
   }
-  __pyx_L4:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":58
+ *         return s.decode("ascii")
+ * 
+ * cdef _force_str(object s):             # <<<<<<<<<<<<<<
+ *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
+ *     if s is None:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_AddTraceback("pysam.TabProxies._force_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
   __pyx_L0:;
@@ -1764,7 +2034,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies__force_str(PyObject *__pyx_v_s) {
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":68
+/* "pysam/TabProxies.pyx":70
  *         return s
  * 
  * cdef char * nextItem( char * buffer ):             # <<<<<<<<<<<<<<
@@ -1784,7 +2054,7 @@ static char *__pyx_f_5pysam_10TabProxies_nextItem(char *__pyx_v_buffer) {
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("nextItem", 0);
 
-  /* "pysam/TabProxies.pyx":70
+  /* "pysam/TabProxies.pyx":72
  * cdef char * nextItem( char * buffer ):
  *     cdef char * pos
  *     pos = strchr( buffer, '\t' )             # <<<<<<<<<<<<<<
@@ -1793,36 +2063,34 @@ static char *__pyx_f_5pysam_10TabProxies_nextItem(char *__pyx_v_buffer) {
  */
   __pyx_v_pos = strchr(__pyx_v_buffer, '\t');
 
-  /* "pysam/TabProxies.pyx":71
+  /* "pysam/TabProxies.pyx":73
  *     cdef char * pos
  *     pos = strchr( buffer, '\t' )
  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )             # <<<<<<<<<<<<<<
  *     pos[0] = '\0'
  *     pos += 1
  */
-  __pyx_t_1 = (__pyx_v_pos == NULL);
+  __pyx_t_1 = ((__pyx_v_pos == NULL) != 0);
   if (__pyx_t_1) {
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __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 = 71; __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 = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_malformatted_entry_at_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+    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_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":72
+  /* "pysam/TabProxies.pyx":74
  *     pos = strchr( buffer, '\t' )
  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
  *     pos[0] = '\0'             # <<<<<<<<<<<<<<
@@ -1831,7 +2099,7 @@ static char *__pyx_f_5pysam_10TabProxies_nextItem(char *__pyx_v_buffer) {
  */
   (__pyx_v_pos[0]) = '\x00';
 
-  /* "pysam/TabProxies.pyx":73
+  /* "pysam/TabProxies.pyx":75
  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
  *     pos[0] = '\0'
  *     pos += 1             # <<<<<<<<<<<<<<
@@ -1840,7 +2108,7 @@ static char *__pyx_f_5pysam_10TabProxies_nextItem(char *__pyx_v_buffer) {
  */
   __pyx_v_pos = (__pyx_v_pos + 1);
 
-  /* "pysam/TabProxies.pyx":74
+  /* "pysam/TabProxies.pyx":76
  *     pos[0] = '\0'
  *     pos += 1
  *     return pos             # <<<<<<<<<<<<<<
@@ -1850,19 +2118,26 @@ static char *__pyx_f_5pysam_10TabProxies_nextItem(char *__pyx_v_buffer) {
   __pyx_r = __pyx_v_pos;
   goto __pyx_L0;
 
-  __pyx_r = 0;
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":70
+ *         return s
+ * 
+ * cdef char * nextItem( char * buffer ):             # <<<<<<<<<<<<<<
+ *     cdef char * pos
+ *     pos = strchr( buffer, '\t' )
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_WriteUnraisable("pysam.TabProxies.nextItem", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_WriteUnraisable("pysam.TabProxies.nextItem", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":76
+/* "pysam/TabProxies.pyx":78
  *     return pos
  * 
  * cdef char *StrOrEmpty( char * buffer ):             # <<<<<<<<<<<<<<
@@ -1876,22 +2151,21 @@ static char *__pyx_f_5pysam_10TabProxies_StrOrEmpty(char *__pyx_v_buffer) {
   int __pyx_t_1;
   __Pyx_RefNannySetupContext("StrOrEmpty", 0);
 
-  /* "pysam/TabProxies.pyx":77
+  /* "pysam/TabProxies.pyx":79
  * 
  * cdef char *StrOrEmpty( char * buffer ):
  *      if buffer == NULL: return ""             # <<<<<<<<<<<<<<
  *      else: return buffer
  * 
  */
-  __pyx_t_1 = (__pyx_v_buffer == NULL);
+  __pyx_t_1 = ((__pyx_v_buffer == NULL) != 0);
   if (__pyx_t_1) {
-    __pyx_r = __pyx_k_6;
+    __pyx_r = __pyx_k__3;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":78
+    /* "pysam/TabProxies.pyx":80
  * cdef char *StrOrEmpty( char * buffer ):
  *      if buffer == NULL: return ""
  *      else: return buffer             # <<<<<<<<<<<<<<
@@ -1901,15 +2175,22 @@ static char *__pyx_f_5pysam_10TabProxies_StrOrEmpty(char *__pyx_v_buffer) {
     __pyx_r = __pyx_v_buffer;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = 0;
+  /* "pysam/TabProxies.pyx":78
+ *     return pos
+ * 
+ * cdef char *StrOrEmpty( char * buffer ):             # <<<<<<<<<<<<<<
+ *      if buffer == NULL: return ""
+ *      else: return buffer
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":80
+/* "pysam/TabProxies.pyx":82
  *      else: return buffer
  * 
  * cdef int isNew( char * p, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -1923,22 +2204,20 @@ static int __pyx_f_5pysam_10TabProxies_isNew(char *__pyx_v_p, char *__pyx_v_buff
   int __pyx_t_1;
   __Pyx_RefNannySetupContext("isNew", 0);
 
-  /* "pysam/TabProxies.pyx":81
+  /* "pysam/TabProxies.pyx":83
  * 
  * cdef int isNew( char * p, char * buffer, size_t nbytes ):
  *      if p == NULL: return 0             # <<<<<<<<<<<<<<
  *      return not (buffer <= p < buffer + nbytes )
  * 
  */
-  __pyx_t_1 = (__pyx_v_p == NULL);
+  __pyx_t_1 = ((__pyx_v_p == NULL) != 0);
   if (__pyx_t_1) {
     __pyx_r = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":82
+  /* "pysam/TabProxies.pyx":84
  * cdef int isNew( char * p, char * buffer, size_t nbytes ):
  *      if p == NULL: return 0
  *      return not (buffer <= p < buffer + nbytes )             # <<<<<<<<<<<<<<
@@ -1949,15 +2228,31 @@ static int __pyx_f_5pysam_10TabProxies_isNew(char *__pyx_v_p, char *__pyx_v_buff
   if (__pyx_t_1) {
     __pyx_t_1 = (__pyx_v_p < (__pyx_v_buffer + __pyx_v_nbytes));
   }
-  __pyx_r = (!__pyx_t_1);
+  __pyx_r = (!(__pyx_t_1 != 0));
   goto __pyx_L0;
 
-  __pyx_r = 0;
+  /* "pysam/TabProxies.pyx":82
+ *      else: return buffer
+ * 
+ * cdef int isNew( char * p, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *      if p == NULL: return 0
+ *      return not (buffer <= p < buffer + nbytes )
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":97
+ *     '''
+ * 
+ *     def __cinit__(self ):             # <<<<<<<<<<<<<<
+ *         self.data = NULL
+ *         self.fields = NULL
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_10TupleProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_10TupleProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
@@ -1968,24 +2263,18 @@ static int __pyx_pw_5pysam_10TabProxies_10TupleProxy_1__cinit__(PyObject *__pyx_
     __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;
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":95
- *     '''
- * 
- *     def __cinit__(self ):             # <<<<<<<<<<<<<<
- *         self.data = NULL
- *         self.fields = NULL
- */
-
 static int __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__cinit__", 0);
 
-  /* "pysam/TabProxies.pyx":96
+  /* "pysam/TabProxies.pyx":98
  * 
  *     def __cinit__(self ):
  *         self.data = NULL             # <<<<<<<<<<<<<<
@@ -1994,7 +2283,7 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(struct __pyx_obj_
  */
   __pyx_v_self->data = NULL;
 
-  /* "pysam/TabProxies.pyx":97
+  /* "pysam/TabProxies.pyx":99
  *     def __cinit__(self ):
  *         self.data = NULL
  *         self.fields = NULL             # <<<<<<<<<<<<<<
@@ -2003,7 +2292,7 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(struct __pyx_obj_
  */
   __pyx_v_self->fields = NULL;
 
-  /* "pysam/TabProxies.pyx":98
+  /* "pysam/TabProxies.pyx":100
  *         self.data = NULL
  *         self.fields = NULL
  *         self.index = 0             # <<<<<<<<<<<<<<
@@ -2012,7 +2301,7 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(struct __pyx_obj_
  */
   __pyx_v_self->index = 0;
 
-  /* "pysam/TabProxies.pyx":99
+  /* "pysam/TabProxies.pyx":101
  *         self.fields = NULL
  *         self.index = 0
  *         self.nbytes = 0             # <<<<<<<<<<<<<<
@@ -2021,7 +2310,7 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(struct __pyx_obj_
  */
   __pyx_v_self->nbytes = 0;
 
-  /* "pysam/TabProxies.pyx":100
+  /* "pysam/TabProxies.pyx":102
  *         self.index = 0
  *         self.nbytes = 0
  *         self.is_modified = 0             # <<<<<<<<<<<<<<
@@ -2030,7 +2319,7 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(struct __pyx_obj_
  */
   __pyx_v_self->is_modified = 0;
 
-  /* "pysam/TabProxies.pyx":101
+  /* "pysam/TabProxies.pyx":103
  *         self.nbytes = 0
  *         self.is_modified = 0
  *         self.nfields = 0             # <<<<<<<<<<<<<<
@@ -2039,7 +2328,7 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(struct __pyx_obj_
  */
   __pyx_v_self->nfields = 0;
 
-  /* "pysam/TabProxies.pyx":103
+  /* "pysam/TabProxies.pyx":105
  *         self.nfields = 0
  *         # start counting at field offset
  *         self.offset = 0             # <<<<<<<<<<<<<<
@@ -2048,66 +2337,77 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy___cinit__(struct __pyx_obj_
  */
   __pyx_v_self->offset = 0;
 
+  /* "pysam/TabProxies.pyx":97
+ *     '''
+ * 
+ *     def __cinit__(self ):             # <<<<<<<<<<<<<<
+ *         self.data = NULL
+ *         self.fields = NULL
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":107
+ *         self.offset = 0
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         cdef int x
+ *         if self.is_modified:
+ */
+
 /* Python wrapper */
 static void __pyx_pw_5pysam_10TabProxies_10TupleProxy_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
 static void __pyx_pw_5pysam_10TabProxies_10TupleProxy_3__dealloc__(PyObject *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
   __pyx_pf_5pysam_10TabProxies_10TupleProxy_2__dealloc__(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
 }
 
-/* "pysam/TabProxies.pyx":105
- *         self.offset = 0
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         cdef int x
- *         if self.is_modified:
- */
-
 static void __pyx_pf_5pysam_10TabProxies_10TupleProxy_2__dealloc__(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self) {
   int __pyx_v_x;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
   int __pyx_t_2;
-  int __pyx_t_3;
   __Pyx_RefNannySetupContext("__dealloc__", 0);
 
-  /* "pysam/TabProxies.pyx":107
+  /* "pysam/TabProxies.pyx":109
  *     def __dealloc__(self):
  *         cdef int x
  *         if self.is_modified:             # <<<<<<<<<<<<<<
  *             for x from 0 <= x < self.nfields:
  *                 if isNew( self.fields[x], self.data, self.nbytes ):
  */
-  if (__pyx_v_self->is_modified) {
+  __pyx_t_1 = (__pyx_v_self->is_modified != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":108
+    /* "pysam/TabProxies.pyx":110
  *         cdef int x
  *         if self.is_modified:
  *             for x from 0 <= x < self.nfields:             # <<<<<<<<<<<<<<
  *                 if isNew( self.fields[x], self.data, self.nbytes ):
  *                     free( self.fields[x] )
  */
-    __pyx_t_1 = __pyx_v_self->nfields;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_1; __pyx_v_x++) {
+    __pyx_t_2 = __pyx_v_self->nfields;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
 
-      /* "pysam/TabProxies.pyx":109
+      /* "pysam/TabProxies.pyx":111
  *         if self.is_modified:
  *             for x from 0 <= x < self.nfields:
  *                 if isNew( self.fields[x], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
  *                     free( self.fields[x] )
  *                     self.fields[x] = NULL
  */
-      __pyx_t_2 = __pyx_f_5pysam_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_x]), __pyx_v_self->data, __pyx_v_self->nbytes);
-      if (__pyx_t_2) {
+      __pyx_t_1 = (__pyx_f_5pysam_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_x]), __pyx_v_self->data, __pyx_v_self->nbytes) != 0);
+      if (__pyx_t_1) {
 
-        /* "pysam/TabProxies.pyx":110
+        /* "pysam/TabProxies.pyx":112
  *             for x from 0 <= x < self.nfields:
  *                 if isNew( self.fields[x], self.data, self.nbytes ):
  *                     free( self.fields[x] )             # <<<<<<<<<<<<<<
@@ -2116,7 +2416,7 @@ static void __pyx_pf_5pysam_10TabProxies_10TupleProxy_2__dealloc__(struct __pyx_
  */
         free((__pyx_v_self->fields[__pyx_v_x]));
 
-        /* "pysam/TabProxies.pyx":111
+        /* "pysam/TabProxies.pyx":113
  *                 if isNew( self.fields[x], self.data, self.nbytes ):
  *                     free( self.fields[x] )
  *                     self.fields[x] = NULL             # <<<<<<<<<<<<<<
@@ -2132,38 +2432,47 @@ static void __pyx_pf_5pysam_10TabProxies_10TupleProxy_2__dealloc__(struct __pyx_
   }
   __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":113
+  /* "pysam/TabProxies.pyx":115
  *                     self.fields[x] = NULL
  * 
  *         if self.data != NULL: free(self.data)             # <<<<<<<<<<<<<<
  *         if self.fields != NULL: free( self.fields )
  * 
  */
-  __pyx_t_3 = (__pyx_v_self->data != NULL);
-  if (__pyx_t_3) {
+  __pyx_t_1 = ((__pyx_v_self->data != NULL) != 0);
+  if (__pyx_t_1) {
     free(__pyx_v_self->data);
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "pysam/TabProxies.pyx":114
+  /* "pysam/TabProxies.pyx":116
  * 
  *         if self.data != NULL: free(self.data)
  *         if self.fields != NULL: free( self.fields )             # <<<<<<<<<<<<<<
  * 
  *     cdef take( self, char * buffer, size_t nbytes ):
  */
-  __pyx_t_3 = (__pyx_v_self->fields != NULL);
-  if (__pyx_t_3) {
+  __pyx_t_1 = ((__pyx_v_self->fields != NULL) != 0);
+  if (__pyx_t_1) {
     free(__pyx_v_self->fields);
     goto __pyx_L8;
   }
   __pyx_L8:;
 
+  /* "pysam/TabProxies.pyx":107
+ *         self.offset = 0
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         cdef int x
+ *         if self.is_modified:
+ */
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
 }
 
-/* "pysam/TabProxies.pyx":116
+/* "pysam/TabProxies.pyx":118
  *         if self.fields != NULL: free( self.fields )
  * 
  *     cdef take( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -2180,7 +2489,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_take(struct __pyx_obj_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("take", 0);
 
-  /* "pysam/TabProxies.pyx":121
+  /* "pysam/TabProxies.pyx":123
  *         Take ownership of the pointer.
  *         '''
  *         self.data = buffer             # <<<<<<<<<<<<<<
@@ -2189,7 +2498,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_take(struct __pyx_obj_
  */
   __pyx_v_self->data = __pyx_v_buffer;
 
-  /* "pysam/TabProxies.pyx":122
+  /* "pysam/TabProxies.pyx":124
  *         '''
  *         self.data = buffer
  *         self.nbytes = nbytes             # <<<<<<<<<<<<<<
@@ -2198,17 +2507,26 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_take(struct __pyx_obj_
  */
   __pyx_v_self->nbytes = __pyx_v_nbytes;
 
-  /* "pysam/TabProxies.pyx":123
+  /* "pysam/TabProxies.pyx":125
  *         self.data = buffer
  *         self.nbytes = nbytes
  *         self.update( buffer, nbytes )             # <<<<<<<<<<<<<<
  * 
  *     cdef present( self, char * buffer, size_t nbytes ):
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
+  /* "pysam/TabProxies.pyx":118
+ *         if self.fields != NULL: free( self.fields )
+ * 
+ *     cdef take( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''start presenting buffer.
+ * 
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -2221,7 +2539,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_take(struct __pyx_obj_
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":125
+/* "pysam/TabProxies.pyx":127
  *         self.update( buffer, nbytes )
  * 
  *     cdef present( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -2238,17 +2556,26 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_present(struct __pyx_o
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("present", 0);
 
-  /* "pysam/TabProxies.pyx":130
+  /* "pysam/TabProxies.pyx":132
  *         Do not take ownership of the pointer.
  *         '''
  *         self.update( buffer, nbytes )             # <<<<<<<<<<<<<<
  * 
  *     cdef copy( self, char * buffer, size_t nbytes ):
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
+  /* "pysam/TabProxies.pyx":127
+ *         self.update( buffer, nbytes )
+ * 
+ *     cdef present( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''start presenting buffer.
+ * 
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -2261,7 +2588,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_present(struct __pyx_o
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":132
+/* "pysam/TabProxies.pyx":134
  *         self.update( buffer, nbytes )
  * 
  *     cdef copy( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -2280,7 +2607,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_copy(struct __pyx_obj_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("copy", 0);
 
-  /* "pysam/TabProxies.pyx":141
+  /* "pysam/TabProxies.pyx":143
  *         cdef int s
  *         # +1 for '\0'
  *         s = sizeof(char) *  (nbytes + 1)             # <<<<<<<<<<<<<<
@@ -2289,7 +2616,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_copy(struct __pyx_obj_
  */
   __pyx_v_s = ((sizeof(char)) * (__pyx_v_nbytes + 1));
 
-  /* "pysam/TabProxies.pyx":142
+  /* "pysam/TabProxies.pyx":144
  *         # +1 for '\0'
  *         s = sizeof(char) *  (nbytes + 1)
  *         self.data = <char*>malloc( s )             # <<<<<<<<<<<<<<
@@ -2298,33 +2625,31 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_copy(struct __pyx_obj_
  */
   __pyx_v_self->data = ((char *)malloc(__pyx_v_s));
 
-  /* "pysam/TabProxies.pyx":143
+  /* "pysam/TabProxies.pyx":145
  *         s = sizeof(char) *  (nbytes + 1)
  *         self.data = <char*>malloc( s )
  *         if self.data == NULL:             # <<<<<<<<<<<<<<
  *             raise ValueError("out of memory" )
  *         self.nbytes = nbytes
  */
-  __pyx_t_1 = (__pyx_v_self->data == NULL);
+  __pyx_t_1 = ((__pyx_v_self->data == NULL) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":144
+    /* "pysam/TabProxies.pyx":146
  *         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 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":145
+  /* "pysam/TabProxies.pyx":147
  *         if self.data == NULL:
  *             raise ValueError("out of memory" )
  *         self.nbytes = nbytes             # <<<<<<<<<<<<<<
@@ -2333,7 +2658,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_copy(struct __pyx_obj_
  */
   __pyx_v_self->nbytes = __pyx_v_nbytes;
 
-  /* "pysam/TabProxies.pyx":146
+  /* "pysam/TabProxies.pyx":148
  *             raise ValueError("out of memory" )
  *         self.nbytes = nbytes
  *         memcpy( <char*>self.data, buffer, s )             # <<<<<<<<<<<<<<
@@ -2342,17 +2667,26 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_copy(struct __pyx_obj_
  */
   memcpy(((char *)__pyx_v_self->data), __pyx_v_buffer, __pyx_v_s);
 
-  /* "pysam/TabProxies.pyx":147
+  /* "pysam/TabProxies.pyx":149
  *         self.nbytes = nbytes
  *         memcpy( <char*>self.data, buffer, s )
  *         self.update( self.data, nbytes )             # <<<<<<<<<<<<<<
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):
  */
-  __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_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 = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_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 = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
+  /* "pysam/TabProxies.pyx":134
+ *         self.update( buffer, nbytes )
+ * 
+ *     cdef copy( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''start presenting buffer of size *nbytes*.
+ * 
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -2365,7 +2699,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_copy(struct __pyx_obj_
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":149
+/* "pysam/TabProxies.pyx":151
  *         self.update( self.data, nbytes )
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -2378,7 +2712,7 @@ static int __pyx_f_5pysam_10TabProxies_10TupleProxy_getMaxFields(CYTHON_UNUSED s
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("getMaxFields", 0);
 
-  /* "pysam/TabProxies.pyx":151
+  /* "pysam/TabProxies.pyx":153
  *     cdef int getMaxFields( self, size_t nbytes ):
  *         '''initialize fields.'''
  *         return nbytes / 2             # <<<<<<<<<<<<<<
@@ -2388,13 +2722,21 @@ static int __pyx_f_5pysam_10TabProxies_10TupleProxy_getMaxFields(CYTHON_UNUSED s
   __pyx_r = (__pyx_v_nbytes / 2);
   goto __pyx_L0;
 
-  __pyx_r = 0;
+  /* "pysam/TabProxies.pyx":151
+ *         self.update( self.data, nbytes )
+ * 
+ *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''initialize fields.'''
+ *         return nbytes / 2
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":153
+/* "pysam/TabProxies.pyx":155
  *         return nbytes / 2
  * 
  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -2410,7 +2752,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
   int __pyx_v_x;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
+  PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   int __pyx_t_4;
@@ -2423,58 +2765,90 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("update", 0);
 
-  /* "pysam/TabProxies.pyx":173
+  /* "pysam/TabProxies.pyx":175
  *         cdef int max_fields, x
  * 
- *         assert strlen(buffer) == nbytes             # <<<<<<<<<<<<<<
+ *         assert strlen(buffer) == nbytes, \             # <<<<<<<<<<<<<<
+ *             "length of buffer (%i) != number of bytes (%i)" % (
+ *                 strlen(buffer), nbytes)
+ */
+  #ifndef CYTHON_WITHOUT_ASSERTIONS
+  if (unlikely(!Py_OptimizeFlag)) {
+    if (unlikely(!((strlen(__pyx_v_buffer) == __pyx_v_nbytes) != 0))) {
+
+      /* "pysam/TabProxies.pyx":177
+ *         assert strlen(buffer) == nbytes, \
+ *             "length of buffer (%i) != number of bytes (%i)" % (
+ *                 strlen(buffer), nbytes)             # <<<<<<<<<<<<<<
  * 
  *         if buffer[nbytes] != 0:
  */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  if (unlikely(!(strlen(__pyx_v_buffer) == __pyx_v_nbytes))) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyInt_FromSize_t(strlen(__pyx_v_buffer)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_nbytes); 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_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_1 = 0;
+      __pyx_t_2 = 0;
+
+      /* "pysam/TabProxies.pyx":176
+ * 
+ *         assert strlen(buffer) == nbytes, \
+ *             "length of buffer (%i) != number of bytes (%i)" % (             # <<<<<<<<<<<<<<
+ *                 strlen(buffer), nbytes)
+ * 
+ */
+      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_length_of_buffer_i_number_of_byt, __pyx_t_3); 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_3); __pyx_t_3 = 0;
+      PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
   }
   #endif
 
-  /* "pysam/TabProxies.pyx":175
- *         assert strlen(buffer) == nbytes
+  /* "pysam/TabProxies.pyx":179
+ *                 strlen(buffer), nbytes)
  * 
  *         if buffer[nbytes] != 0:             # <<<<<<<<<<<<<<
- *             raise ValueError( "incomplete line at %s" % buffer )
+ *             raise ValueError("incomplete line at %s" % buffer)
  * 
  */
-  __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0);
-  if (__pyx_t_1) {
+  __pyx_t_4 = (((__pyx_v_buffer[__pyx_v_nbytes]) != 0) != 0);
+  if (__pyx_t_4) {
 
-    /* "pysam/TabProxies.pyx":176
+    /* "pysam/TabProxies.pyx":180
  * 
  *         if buffer[nbytes] != 0:
- *             raise ValueError( "incomplete line at %s" % buffer )             # <<<<<<<<<<<<<<
+ *             raise ValueError("incomplete line at %s" % buffer)             # <<<<<<<<<<<<<<
  * 
  *         #################################
  */
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); 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_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __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 = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_buffer); 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_3 = __Pyx_PyString_Format(__pyx_kp_s_incomplete_line_at_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __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 = 180; __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));
+    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_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":180
+  /* "pysam/TabProxies.pyx":184
  *         #################################
  *         # remove line breaks and feeds and update number of bytes
  *         x = nbytes - 1             # <<<<<<<<<<<<<<
@@ -2483,7 +2857,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
   __pyx_v_x = (__pyx_v_nbytes - 1);
 
-  /* "pysam/TabProxies.pyx":181
+  /* "pysam/TabProxies.pyx":185
  *         # remove line breaks and feeds and update number of bytes
  *         x = nbytes - 1
  *         while x > 0 and (buffer[x] == '\n' or buffer[x] == '\r'):             # <<<<<<<<<<<<<<
@@ -2491,22 +2865,22 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  *             x -= 1
  */
   while (1) {
-    __pyx_t_1 = (__pyx_v_x > 0);
-    if (__pyx_t_1) {
-      __pyx_t_4 = ((__pyx_v_buffer[__pyx_v_x]) == '\n');
-      if (!__pyx_t_4) {
-        __pyx_t_5 = ((__pyx_v_buffer[__pyx_v_x]) == '\r');
-        __pyx_t_6 = __pyx_t_5;
+    __pyx_t_4 = ((__pyx_v_x > 0) != 0);
+    if (__pyx_t_4) {
+      __pyx_t_5 = (((__pyx_v_buffer[__pyx_v_x]) == '\n') != 0);
+      if (!__pyx_t_5) {
+        __pyx_t_6 = (((__pyx_v_buffer[__pyx_v_x]) == '\r') != 0);
+        __pyx_t_7 = __pyx_t_6;
       } else {
-        __pyx_t_6 = __pyx_t_4;
+        __pyx_t_7 = __pyx_t_5;
       }
-      __pyx_t_4 = __pyx_t_6;
+      __pyx_t_5 = __pyx_t_7;
     } else {
-      __pyx_t_4 = __pyx_t_1;
+      __pyx_t_5 = __pyx_t_4;
     }
-    if (!__pyx_t_4) break;
+    if (!__pyx_t_5) break;
 
-    /* "pysam/TabProxies.pyx":182
+    /* "pysam/TabProxies.pyx":186
  *         x = nbytes - 1
  *         while x > 0 and (buffer[x] == '\n' or buffer[x] == '\r'):
  *             buffer[x] = '\0'             # <<<<<<<<<<<<<<
@@ -2515,7 +2889,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
     (__pyx_v_buffer[__pyx_v_x]) = '\x00';
 
-    /* "pysam/TabProxies.pyx":183
+    /* "pysam/TabProxies.pyx":187
  *         while x > 0 and (buffer[x] == '\n' or buffer[x] == '\r'):
  *             buffer[x] = '\0'
  *             x -= 1             # <<<<<<<<<<<<<<
@@ -2525,7 +2899,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
     __pyx_v_x = (__pyx_v_x - 1);
   }
 
-  /* "pysam/TabProxies.pyx":184
+  /* "pysam/TabProxies.pyx":188
  *             buffer[x] = '\0'
  *             x -= 1
  *         self.nbytes = x + 1             # <<<<<<<<<<<<<<
@@ -2534,41 +2908,41 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
   __pyx_v_self->nbytes = (__pyx_v_x + 1);
 
-  /* "pysam/TabProxies.pyx":188
+  /* "pysam/TabProxies.pyx":192
  *         #################################
  *         # clear data
  *         if self.fields != NULL: free(self.fields)             # <<<<<<<<<<<<<<
  * 
  *         for field from 0 <= field < self.nfields:
  */
-  __pyx_t_4 = (__pyx_v_self->fields != NULL);
-  if (__pyx_t_4) {
+  __pyx_t_5 = ((__pyx_v_self->fields != NULL) != 0);
+  if (__pyx_t_5) {
     free(__pyx_v_self->fields);
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "pysam/TabProxies.pyx":190
+  /* "pysam/TabProxies.pyx":194
  *         if self.fields != NULL: free(self.fields)
  * 
  *         for field from 0 <= field < self.nfields:             # <<<<<<<<<<<<<<
  *             if isNew( self.fields[field], self.data, self.nbytes ):
  *                 free( self.fields[field] )
  */
-  __pyx_t_7 = __pyx_v_self->nfields;
-  for (__pyx_v_field = 0; __pyx_v_field < __pyx_t_7; __pyx_v_field++) {
+  __pyx_t_8 = __pyx_v_self->nfields;
+  for (__pyx_v_field = 0; __pyx_v_field < __pyx_t_8; __pyx_v_field++) {
 
-    /* "pysam/TabProxies.pyx":191
+    /* "pysam/TabProxies.pyx":195
  * 
  *         for field from 0 <= field < self.nfields:
  *             if isNew( self.fields[field], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
  *                 free( self.fields[field] )
  * 
  */
-    __pyx_t_8 = __pyx_f_5pysam_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_field]), __pyx_v_self->data, __pyx_v_self->nbytes);
-    if (__pyx_t_8) {
+    __pyx_t_5 = (__pyx_f_5pysam_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_field]), __pyx_v_self->data, __pyx_v_self->nbytes) != 0);
+    if (__pyx_t_5) {
 
-      /* "pysam/TabProxies.pyx":192
+      /* "pysam/TabProxies.pyx":196
  *         for field from 0 <= field < self.nfields:
  *             if isNew( self.fields[field], self.data, self.nbytes ):
  *                 free( self.fields[field] )             # <<<<<<<<<<<<<<
@@ -2581,7 +2955,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
     __pyx_L9:;
   }
 
-  /* "pysam/TabProxies.pyx":194
+  /* "pysam/TabProxies.pyx":198
  *                 free( self.fields[field] )
  * 
  *         self.is_modified = self.nfields = 0             # <<<<<<<<<<<<<<
@@ -2591,7 +2965,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
   __pyx_v_self->is_modified = 0;
   __pyx_v_self->nfields = 0;
 
-  /* "pysam/TabProxies.pyx":198
+  /* "pysam/TabProxies.pyx":202
  *         #################################
  *         # allocate new
  *         max_fields = self.getMaxFields( nbytes )             # <<<<<<<<<<<<<<
@@ -2600,7 +2974,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
   __pyx_v_max_fields = ((struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->getMaxFields(__pyx_v_self, __pyx_v_nbytes);
 
-  /* "pysam/TabProxies.pyx":199
+  /* "pysam/TabProxies.pyx":203
  *         # allocate new
  *         max_fields = self.getMaxFields( nbytes )
  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )             # <<<<<<<<<<<<<<
@@ -2609,33 +2983,31 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
   __pyx_v_self->fields = ((char **)calloc(__pyx_v_max_fields, (sizeof(char *))));
 
-  /* "pysam/TabProxies.pyx":200
+  /* "pysam/TabProxies.pyx":204
  *         max_fields = self.getMaxFields( nbytes )
  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
  *         if self.fields == NULL:             # <<<<<<<<<<<<<<
  *             raise ValueError("out of memory" )
  * 
  */
-  __pyx_t_4 = (__pyx_v_self->fields == NULL);
-  if (__pyx_t_4) {
+  __pyx_t_5 = ((__pyx_v_self->fields == NULL) != 0);
+  if (__pyx_t_5) {
 
-    /* "pysam/TabProxies.pyx":201
+    /* "pysam/TabProxies.pyx":205
  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
  *         if self.fields == NULL:
  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
  * 
  *         #################################
  */
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L10;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L10:;
 
-  /* "pysam/TabProxies.pyx":205
+  /* "pysam/TabProxies.pyx":209
  *         #################################
  *         # start filling
  *         field = 0             # <<<<<<<<<<<<<<
@@ -2644,7 +3016,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
   __pyx_v_field = 0;
 
-  /* "pysam/TabProxies.pyx":206
+  /* "pysam/TabProxies.pyx":210
  *         # start filling
  *         field = 0
  *         self.fields[field] = pos = buffer             # <<<<<<<<<<<<<<
@@ -2654,7 +3026,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
   (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_buffer;
   __pyx_v_pos = __pyx_v_buffer;
 
-  /* "pysam/TabProxies.pyx":207
+  /* "pysam/TabProxies.pyx":211
  *         field = 0
  *         self.fields[field] = pos = buffer
  *         field += 1             # <<<<<<<<<<<<<<
@@ -2663,7 +3035,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
   __pyx_v_field = (__pyx_v_field + 1);
 
-  /* "pysam/TabProxies.pyx":208
+  /* "pysam/TabProxies.pyx":212
  *         self.fields[field] = pos = buffer
  *         field += 1
  *         old_pos = pos             # <<<<<<<<<<<<<<
@@ -2672,7 +3044,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
   __pyx_v_old_pos = __pyx_v_pos;
 
-  /* "pysam/TabProxies.pyx":210
+  /* "pysam/TabProxies.pyx":214
  *         old_pos = pos
  * 
  *         while 1:             # <<<<<<<<<<<<<<
@@ -2680,9 +3052,8 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  *             pos = <char*>memchr( pos, '\t', nbytes )
  */
   while (1) {
-    if (!1) break;
 
-    /* "pysam/TabProxies.pyx":212
+    /* "pysam/TabProxies.pyx":216
  *         while 1:
  * 
  *             pos = <char*>memchr( pos, '\t', nbytes )             # <<<<<<<<<<<<<<
@@ -2691,21 +3062,19 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
     __pyx_v_pos = ((char *)memchr(__pyx_v_pos, '\t', __pyx_v_nbytes));
 
-    /* "pysam/TabProxies.pyx":213
+    /* "pysam/TabProxies.pyx":217
  * 
  *             pos = <char*>memchr( pos, '\t', nbytes )
  *             if pos == NULL: break             # <<<<<<<<<<<<<<
  *             pos[0] = '\0'
  *             pos += 1
  */
-    __pyx_t_4 = (__pyx_v_pos == NULL);
-    if (__pyx_t_4) {
+    __pyx_t_5 = ((__pyx_v_pos == NULL) != 0);
+    if (__pyx_t_5) {
       goto __pyx_L12_break;
-      goto __pyx_L13;
     }
-    __pyx_L13:;
 
-    /* "pysam/TabProxies.pyx":214
+    /* "pysam/TabProxies.pyx":218
  *             pos = <char*>memchr( pos, '\t', nbytes )
  *             if pos == NULL: break
  *             pos[0] = '\0'             # <<<<<<<<<<<<<<
@@ -2714,7 +3083,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
     (__pyx_v_pos[0]) = '\x00';
 
-    /* "pysam/TabProxies.pyx":215
+    /* "pysam/TabProxies.pyx":219
  *             if pos == NULL: break
  *             pos[0] = '\0'
  *             pos += 1             # <<<<<<<<<<<<<<
@@ -2723,7 +3092,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
     __pyx_v_pos = (__pyx_v_pos + 1);
 
-    /* "pysam/TabProxies.pyx":216
+    /* "pysam/TabProxies.pyx":220
  *             pos[0] = '\0'
  *             pos += 1
  *             self.fields[field] = pos             # <<<<<<<<<<<<<<
@@ -2732,7 +3101,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
     (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_pos;
 
-    /* "pysam/TabProxies.pyx":217
+    /* "pysam/TabProxies.pyx":221
  *             pos += 1
  *             self.fields[field] = pos
  *             field += 1             # <<<<<<<<<<<<<<
@@ -2741,44 +3110,42 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
     __pyx_v_field = (__pyx_v_field + 1);
 
-    /* "pysam/TabProxies.pyx":218
+    /* "pysam/TabProxies.pyx":222
  *             self.fields[field] = pos
  *             field += 1
  *             if field > max_fields:             # <<<<<<<<<<<<<<
  *                 raise ValueError("row too large - more than %i fields" % max_fields )
  *             nbytes -= pos - old_pos
  */
-    __pyx_t_4 = (__pyx_v_field > __pyx_v_max_fields);
-    if (__pyx_t_4) {
+    __pyx_t_5 = ((__pyx_v_field > __pyx_v_max_fields) != 0);
+    if (__pyx_t_5) {
 
-      /* "pysam/TabProxies.pyx":219
+      /* "pysam/TabProxies.pyx":223
  *             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_3 = PyInt_FromLong(__pyx_v_max_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_row_too_large_more_than_i_fields, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      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_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L14;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L14:;
 
-    /* "pysam/TabProxies.pyx":220
+    /* "pysam/TabProxies.pyx":224
  *             if field > max_fields:
  *                 raise ValueError("row too large - more than %i fields" % max_fields )
  *             nbytes -= pos - old_pos             # <<<<<<<<<<<<<<
@@ -2787,21 +3154,19 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
     __pyx_v_nbytes = (__pyx_v_nbytes - (__pyx_v_pos - __pyx_v_old_pos));
 
-    /* "pysam/TabProxies.pyx":221
+    /* "pysam/TabProxies.pyx":225
  *                 raise ValueError("row too large - more than %i fields" % max_fields )
  *             nbytes -= pos - old_pos
  *             if nbytes < 0: break             # <<<<<<<<<<<<<<
  *             old_pos = pos
  * 
  */
-    __pyx_t_4 = (__pyx_v_nbytes < 0);
-    if (__pyx_t_4) {
+    __pyx_t_5 = ((__pyx_v_nbytes < 0) != 0);
+    if (__pyx_t_5) {
       goto __pyx_L12_break;
-      goto __pyx_L15;
     }
-    __pyx_L15:;
 
-    /* "pysam/TabProxies.pyx":222
+    /* "pysam/TabProxies.pyx":226
  *             nbytes -= pos - old_pos
  *             if nbytes < 0: break
  *             old_pos = pos             # <<<<<<<<<<<<<<
@@ -2812,7 +3177,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
   }
   __pyx_L12_break:;
 
-  /* "pysam/TabProxies.pyx":224
+  /* "pysam/TabProxies.pyx":228
  *             old_pos = pos
  * 
  *         self.nfields = field             # <<<<<<<<<<<<<<
@@ -2821,9 +3186,19 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
  */
   __pyx_v_self->nfields = __pyx_v_field;
 
+  /* "pysam/TabProxies.pyx":155
+ *         return nbytes / 2
+ * 
+ *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''update internal data.
+ * 
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_AddTraceback("pysam.TabProxies.TupleProxy.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -2834,16 +3209,27 @@ static PyObject *__pyx_f_5pysam_10TabProxies_10TupleProxy_update(struct __pyx_ob
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":230
+ *         self.nfields = field
+ * 
+ *     def _getindex( self, int index ):             # <<<<<<<<<<<<<<
+ *         '''return item at idx index'''
+ *         cdef int i = index
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_5_getindex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_10TupleProxy_4_getindex[] = "return item at idx index";
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_5_getindex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
   int __pyx_v_index;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_getindex (wrapper)", 0);
   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 = 226; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L3_error:;
@@ -2852,18 +3238,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_5_getindex(PyObject *
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy_4_getindex(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self), ((int)__pyx_v_index));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":226
- *         self.nfields = field
- * 
- *     def _getindex( self, int index ):             # <<<<<<<<<<<<<<
- *         '''return item at idx index'''
- *         cdef int i = index
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_4_getindex(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self, int __pyx_v_index) {
   int __pyx_v_i;
   PyObject *__pyx_r = NULL;
@@ -2877,7 +3257,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_4_getindex(struct __p
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_getindex", 0);
 
-  /* "pysam/TabProxies.pyx":228
+  /* "pysam/TabProxies.pyx":232
  *     def _getindex( self, int index ):
  *         '''return item at idx index'''
  *         cdef int i = index             # <<<<<<<<<<<<<<
@@ -2886,39 +3266,37 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_4_getindex(struct __p
  */
   __pyx_v_i = __pyx_v_index;
 
-  /* "pysam/TabProxies.pyx":229
+  /* "pysam/TabProxies.pyx":233
  *         '''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_1 = (__pyx_v_i < 0);
+  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
   if (__pyx_t_1) {
     __pyx_v_i = (__pyx_v_i + __pyx_v_self->nfields);
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":230
+  /* "pysam/TabProxies.pyx":234
  *         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_1 = (__pyx_v_i < 0);
+  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
   if (__pyx_t_1) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L4:;
 
-  /* "pysam/TabProxies.pyx":231
+  /* "pysam/TabProxies.pyx":235
  *         if i < 0: i += self.nfields
  *         if i < 0: raise IndexError( "list index out of range" )
  *         i += self.offset             # <<<<<<<<<<<<<<
@@ -2927,28 +3305,28 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_4_getindex(struct __p
  */
   __pyx_v_i = (__pyx_v_i + __pyx_v_self->offset);
 
-  /* "pysam/TabProxies.pyx":232
+  /* "pysam/TabProxies.pyx":236
  *         if i < 0: raise IndexError( "list index out of range" )
  *         i += self.offset
  *         if i >= self.nfields:             # <<<<<<<<<<<<<<
  *             raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
  *         return self.fields[i]
  */
-  __pyx_t_1 = (__pyx_v_i >= __pyx_v_self->nfields);
+  __pyx_t_1 = ((__pyx_v_i >= __pyx_v_self->nfields) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":233
+    /* "pysam/TabProxies.pyx":237
  *         i += self.offset
  *         if i >= self.nfields:
  *             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 = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyInt_FromLong(__pyx_v_self->nfields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nfields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __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 = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
@@ -2956,25 +3334,23 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_4_getindex(struct __p
     __Pyx_GIVEREF(__pyx_t_3);
     __pyx_t_2 = 0;
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __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 = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_list_index_out_of_range_i_i, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __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));
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L5:;
 
-  /* "pysam/TabProxies.pyx":234
+  /* "pysam/TabProxies.pyx":238
  *         if i >= self.nfields:
  *             raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
  *         return self.fields[i]             # <<<<<<<<<<<<<<
@@ -2982,14 +3358,21 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_4_getindex(struct __p
  *     def __getitem__( self, key ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = PyBytes_FromString((__pyx_v_self->fields[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  __pyx_r = ((PyObject *)__pyx_t_3);
+  __pyx_t_3 = __Pyx_PyBytes_FromString((__pyx_v_self->fields[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
   __pyx_t_3 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":230
+ *         self.nfields = field
+ * 
+ *     def _getindex( self, int index ):             # <<<<<<<<<<<<<<
+ *         '''return item at idx index'''
+ *         cdef int i = index
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
@@ -3002,6 +3385,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_4_getindex(struct __p
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":240
+ *         return self.fields[i]
+ * 
+ *     def __getitem__( self, key ):             # <<<<<<<<<<<<<<
+ *         if type(key) == int: return self._getindex( key )
+ *         # slice object
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
@@ -3009,18 +3400,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_7__getitem__(PyObject
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":236
- *         return self.fields[i]
- * 
- *     def __getitem__( self, key ):             # <<<<<<<<<<<<<<
- *         if type(key) == int: return self._getindex( key )
- *         # slice object
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_v_start = NULL;
   PyObject *__pyx_v_end = NULL;
@@ -3044,56 +3429,54 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__getitem__", 0);
 
-  /* "pysam/TabProxies.pyx":237
+  /* "pysam/TabProxies.pyx":241
  * 
  *     def __getitem__( self, key ):
  *         if type(key) == int: return self._getindex( key )             # <<<<<<<<<<<<<<
  *         # slice object
  *         start, end, step = key.indices( self.nfields )
  */
-  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_key)), ((PyObject *)((PyObject*)(&PyInt_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __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 = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_key)), ((PyObject *)((PyObject*)(&PyInt_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __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 = 241; __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_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __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 = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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 = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __pyx_r = __pyx_t_4;
     __pyx_t_4 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":239
+  /* "pysam/TabProxies.pyx":243
  *         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_4 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__indices); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_indices); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_self->nfields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nfields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __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 = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __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;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
     PyObject* sequence = __pyx_t_3;
     #if CYTHON_COMPILING_IN_CPYTHON
@@ -3104,7 +3487,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
     if (unlikely(size != 3)) {
       if (size > 3) __Pyx_RaiseTooManyValuesError(3);
       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     #if CYTHON_COMPILING_IN_CPYTHON
     if (likely(PyTuple_CheckExact(sequence))) {
@@ -3120,18 +3503,17 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
     __Pyx_INCREF(__pyx_t_4);
     __Pyx_INCREF(__pyx_t_5);
     #else
-    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     #endif
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  } else
-  {
+  } else {
     Py_ssize_t index = -1;
-    __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __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 = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
@@ -3141,7 +3523,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
     __Pyx_GOTREF(__pyx_t_4);
     index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
     __Pyx_GOTREF(__pyx_t_5);
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_7 = NULL;
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     goto __pyx_L5_unpacking_done;
@@ -3149,7 +3531,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __pyx_t_7 = NULL;
     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_L5_unpacking_done:;
   }
   __pyx_v_start = __pyx_t_1;
@@ -3159,26 +3541,26 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
   __pyx_v_step = __pyx_t_5;
   __pyx_t_5 = 0;
 
-  /* "pysam/TabProxies.pyx":240
+  /* "pysam/TabProxies.pyx":244
  *         # slice object
  *         start, end, step = key.indices( self.nfields )
  *         result = []             # <<<<<<<<<<<<<<
  *         for index in range( start, end, step ):
  *             result.append( self._getindex( index ) )
  */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __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 = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __pyx_v_result = ((PyObject*)__pyx_t_3);
   __pyx_t_3 = 0;
 
-  /* "pysam/TabProxies.pyx":241
+  /* "pysam/TabProxies.pyx":245
  *         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 = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_v_start);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_start);
@@ -3189,14 +3571,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
   __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 = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
     __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
     __pyx_t_9 = NULL;
   } else {
-    __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext;
   }
@@ -3205,56 +3587,56 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
     if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_3)) {
       if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_3)) {
       if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_5 = __pyx_t_9(__pyx_t_3);
       if (unlikely(!__pyx_t_5)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_5);
     }
-    __Pyx_XDECREF(__pyx_v_index);
-    __pyx_v_index = __pyx_t_5;
+    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_5);
     __pyx_t_5 = 0;
 
-    /* "pysam/TabProxies.pyx":242
+    /* "pysam/TabProxies.pyx":246
  *         result = []
  *         for index in range( start, end, step ):
  *             result.append( self._getindex( index ) )             # <<<<<<<<<<<<<<
  *         return result
  * 
  */
-    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __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 = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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 = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __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_10 = PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __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;
 
-  /* "pysam/TabProxies.pyx":243
+  /* "pysam/TabProxies.pyx":247
  *         for index in range( start, end, step ):
  *             result.append( self._getindex( index ) )
  *         return result             # <<<<<<<<<<<<<<
@@ -3262,16 +3644,23 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
  *     def _setindex( self, index, value ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_result));
-  __pyx_r = ((PyObject *)__pyx_v_result);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __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);
+  /* "pysam/TabProxies.pyx":240
+ *         return self.fields[i]
+ * 
+ *     def __getitem__( self, key ):             # <<<<<<<<<<<<<<
+ *         if type(key) == int: return self._getindex( key )
+ *         # slice object
+ */
+
+  /* function exit code */
+  __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("pysam.TabProxies.TupleProxy.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -3287,17 +3676,28 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_6__getitem__(struct _
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":249
+ *         return result
+ * 
+ *     def _setindex( self, index, value ):             # <<<<<<<<<<<<<<
+ *         '''set item at idx index.'''
+ *         cdef int idx = index
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_9_setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_10TupleProxy_8_setindex[] = "set item at idx index.";
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_9_setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_index = 0;
   PyObject *__pyx_v_value = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_setindex (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__value,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_value,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -3311,16 +3711,16 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_9_setindex(PyObject *
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_setindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_setindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -3333,25 +3733,19 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_9_setindex(PyObject *
   }
   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 = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.TabProxies.TupleProxy._setindex", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_index, __pyx_v_value);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":245
- *         return result
- * 
- *     def _setindex( self, index, value ):             # <<<<<<<<<<<<<<
- *         '''set item at idx index.'''
- *         cdef int idx = index
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
   int __pyx_v_idx;
   char *__pyx_v_tmp;
@@ -3367,71 +3761,67 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __p
   __Pyx_RefNannySetupContext("_setindex", 0);
   __Pyx_INCREF(__pyx_v_value);
 
-  /* "pysam/TabProxies.pyx":247
+  /* "pysam/TabProxies.pyx":251
  *     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 = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_idx = __pyx_t_1;
 
-  /* "pysam/TabProxies.pyx":248
+  /* "pysam/TabProxies.pyx":252
  *         '''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);
+  __pyx_t_2 = ((__pyx_v_idx < 0) != 0);
   if (__pyx_t_2) {
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":249
+  /* "pysam/TabProxies.pyx":253
  *         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 >= __pyx_v_self->nfields);
+  __pyx_t_2 = ((__pyx_v_idx >= __pyx_v_self->nfields) != 0);
   if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":250
+    /* "pysam/TabProxies.pyx":254
  *         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_16), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L4:;
 
-  /* "pysam/TabProxies.pyx":252
+  /* "pysam/TabProxies.pyx":256
  *             raise IndexError( "list index out of range" )
  * 
  *         if isNew( self.fields[idx], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
  *             free( self.fields[idx] )
  * 
  */
-  __pyx_t_1 = __pyx_f_5pysam_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_idx]), __pyx_v_self->data, __pyx_v_self->nbytes);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (__pyx_f_5pysam_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_idx]), __pyx_v_self->data, __pyx_v_self->nbytes) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":253
+    /* "pysam/TabProxies.pyx":257
  * 
  *         if isNew( self.fields[idx], self.data, self.nbytes ):
  *             free( self.fields[idx] )             # <<<<<<<<<<<<<<
@@ -3443,7 +3833,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __p
   }
   __pyx_L5:;
 
-  /* "pysam/TabProxies.pyx":255
+  /* "pysam/TabProxies.pyx":259
  *             free( self.fields[idx] )
  * 
  *         self.is_modified = 1             # <<<<<<<<<<<<<<
@@ -3452,19 +3842,19 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __p
  */
   __pyx_v_self->is_modified = 1;
 
-  /* "pysam/TabProxies.pyx":257
+  /* "pysam/TabProxies.pyx":261
  *         self.is_modified = 1
  * 
  *         if value == None:             # <<<<<<<<<<<<<<
  *             self.fields[idx] = NULL
  *             return
  */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __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 = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __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 = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":258
+    /* "pysam/TabProxies.pyx":262
  * 
  *         if value == None:
  *             self.fields[idx] = NULL             # <<<<<<<<<<<<<<
@@ -3473,7 +3863,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __p
  */
     (__pyx_v_self->fields[__pyx_v_idx]) = NULL;
 
-    /* "pysam/TabProxies.pyx":259
+    /* "pysam/TabProxies.pyx":263
  *         if value == None:
  *             self.fields[idx] = NULL
  *             return             # <<<<<<<<<<<<<<
@@ -3483,34 +3873,31 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __p
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
-    goto __pyx_L6;
   }
-  __pyx_L6:;
 
-  /* "pysam/TabProxies.pyx":262
+  /* "pysam/TabProxies.pyx":266
  * 
  *         # conversion with error checking
  *         value = _force_bytes(value)             # <<<<<<<<<<<<<<
  *         cdef char * tmp = <char*>value
  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
  */
-  __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_10TabProxies__force_bytes(__pyx_v_value)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_f_5pysam_10TabProxies__force_bytes(__pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_v_value);
-  __pyx_v_value = __pyx_t_3;
+  __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
   __pyx_t_3 = 0;
 
-  /* "pysam/TabProxies.pyx":263
+  /* "pysam/TabProxies.pyx":267
  *         # conversion with error checking
  *         value = _force_bytes(value)
  *         cdef char * tmp = <char*>value             # <<<<<<<<<<<<<<
  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
  *         if self.fields[idx] == NULL:
  */
-  __pyx_t_4 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_tmp = ((char *)__pyx_t_4);
 
-  /* "pysam/TabProxies.pyx":264
+  /* "pysam/TabProxies.pyx":268
  *         value = _force_bytes(value)
  *         cdef char * tmp = <char*>value
  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )             # <<<<<<<<<<<<<<
@@ -3519,33 +3906,31 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __p
  */
   (__pyx_v_self->fields[__pyx_v_idx]) = ((char *)malloc(((strlen(__pyx_v_tmp) + 1) * (sizeof(char)))));
 
-  /* "pysam/TabProxies.pyx":265
+  /* "pysam/TabProxies.pyx":269
  *         cdef char * tmp = <char*>value
  *         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_2 = ((__pyx_v_self->fields[__pyx_v_idx]) == NULL);
+  __pyx_t_2 = (((__pyx_v_self->fields[__pyx_v_idx]) == NULL) != 0);
   if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":266
+    /* "pysam/TabProxies.pyx":270
  *         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 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L7;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L7:;
 
-  /* "pysam/TabProxies.pyx":267
+  /* "pysam/TabProxies.pyx":271
  *         if self.fields[idx] == NULL:
  *             raise ValueError("out of memory" )
  *         strcpy( self.fields[idx], tmp )             # <<<<<<<<<<<<<<
@@ -3554,6 +3939,15 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __p
  */
   strcpy((__pyx_v_self->fields[__pyx_v_idx]), __pyx_v_tmp);
 
+  /* "pysam/TabProxies.pyx":249
+ *         return result
+ * 
+ *     def _setindex( self, index, value ):             # <<<<<<<<<<<<<<
+ *         '''set item at idx index.'''
+ *         cdef int idx = index
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -3567,6 +3961,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_8_setindex(struct __p
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":273
+ *         strcpy( self.fields[idx], tmp )
+ * 
+ *     def __setitem__(self, index, value ):             # <<<<<<<<<<<<<<
+ *         '''set item at *index* to *value*'''
+ *         cdef int i = index
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_10TupleProxy_11__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_10TupleProxy_10__setitem__[] = "set item at *index* to *value*";
@@ -3578,18 +3980,12 @@ static int __pyx_pw_5pysam_10TabProxies_10TupleProxy_11__setitem__(PyObject *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy_10__setitem__(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":269
- *         strcpy( self.fields[idx], tmp )
- * 
- *     def __setitem__(self, index, value ):             # <<<<<<<<<<<<<<
- *         '''set item at *index* to *value*'''
- *         cdef int i = index
- */
-
 static int __pyx_pf_5pysam_10TabProxies_10TupleProxy_10__setitem__(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
   int __pyx_v_i;
   int __pyx_r;
@@ -3604,31 +4000,31 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy_10__setitem__(struct __pyx_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__setitem__", 0);
 
-  /* "pysam/TabProxies.pyx":271
+  /* "pysam/TabProxies.pyx":275
  *     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 = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_i = __pyx_t_1;
 
-  /* "pysam/TabProxies.pyx":272
+  /* "pysam/TabProxies.pyx":276
  *         '''set item at *index* to *value*'''
  *         cdef int i = index
  *         if i < 0: i += self.nfields             # <<<<<<<<<<<<<<
  *         i += self.offset
  * 
  */
-  __pyx_t_2 = (__pyx_v_i < 0);
+  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
   if (__pyx_t_2) {
     __pyx_v_i = (__pyx_v_i + __pyx_v_self->nfields);
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":273
+  /* "pysam/TabProxies.pyx":277
  *         cdef int i = index
  *         if i < 0: i += self.nfields
  *         i += self.offset             # <<<<<<<<<<<<<<
@@ -3637,18 +4033,18 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy_10__setitem__(struct __pyx_
  */
   __pyx_v_i = (__pyx_v_i + __pyx_v_self->offset);
 
-  /* "pysam/TabProxies.pyx":275
+  /* "pysam/TabProxies.pyx":279
  *         i += self.offset
  * 
  *         self._setindex( i, value )             # <<<<<<<<<<<<<<
  * 
  *     def __len__(self):
  */
-  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __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 = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __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 = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
   __Pyx_GIVEREF(__pyx_t_4);
@@ -3656,12 +4052,21 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy_10__setitem__(struct __pyx_
   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, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
+  /* "pysam/TabProxies.pyx":273
+ *         strcpy( self.fields[idx], tmp )
+ * 
+ *     def __setitem__(self, index, value ):             # <<<<<<<<<<<<<<
+ *         '''set item at *index* to *value*'''
+ *         cdef int i = index
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -3675,6 +4080,14 @@ static int __pyx_pf_5pysam_10TabProxies_10TupleProxy_10__setitem__(struct __pyx_
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":281
+ *         self._setindex( i, value )
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.nfields
+ * 
+ */
+
 /* Python wrapper */
 static Py_ssize_t __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__(PyObject *__pyx_v_self); /*proto*/
 static Py_ssize_t __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__(PyObject *__pyx_v_self) {
@@ -3682,24 +4095,18 @@ static Py_ssize_t __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__(PyObject *
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy_12__len__(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":277
- *         self._setindex( i, value )
- * 
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         return self.nfields
- * 
- */
-
 static Py_ssize_t __pyx_pf_5pysam_10TabProxies_10TupleProxy_12__len__(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self) {
   Py_ssize_t __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__len__", 0);
 
-  /* "pysam/TabProxies.pyx":278
+  /* "pysam/TabProxies.pyx":282
  * 
  *     def __len__(self):
  *         return self.nfields             # <<<<<<<<<<<<<<
@@ -3709,12 +4116,28 @@ static Py_ssize_t __pyx_pf_5pysam_10TabProxies_10TupleProxy_12__len__(struct __p
   __pyx_r = __pyx_v_self->nfields;
   goto __pyx_L0;
 
-  __pyx_r = 0;
+  /* "pysam/TabProxies.pyx":281
+ *         self._setindex( i, value )
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.nfields
+ * 
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":284
+ *         return self.nfields
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         self.index = 0
+ *         return self
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_15__iter__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_15__iter__(PyObject *__pyx_v_self) {
@@ -3722,24 +4145,18 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_15__iter__(PyObject *
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy_14__iter__(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":280
- *         return self.nfields
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         self.index = 0
- *         return self
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_14__iter__(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__iter__", 0);
 
-  /* "pysam/TabProxies.pyx":281
+  /* "pysam/TabProxies.pyx":285
  * 
  *     def __iter__(self):
  *         self.index = 0             # <<<<<<<<<<<<<<
@@ -3748,7 +4165,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_14__iter__(struct __p
  */
   __pyx_v_self->index = 0;
 
-  /* "pysam/TabProxies.pyx":282
+  /* "pysam/TabProxies.pyx":286
  *     def __iter__(self):
  *         self.index = 0
  *         return self             # <<<<<<<<<<<<<<
@@ -3760,13 +4177,29 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_14__iter__(struct __p
   __pyx_r = ((PyObject *)__pyx_v_self);
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  /* "pysam/TabProxies.pyx":284
+ *         return self.nfields
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         self.index = 0
+ *         return self
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":288
+ *         return self
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_17__next__(PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_10TupleProxy_16__next__[] = "python version of next().\n        ";
@@ -3778,18 +4211,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_17__next__(PyObject *
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy_16__next__(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":284
- *         return self
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- *         """
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_16__next__(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self) {
   char *__pyx_v_retval;
   PyObject *__pyx_r = NULL;
@@ -3801,17 +4228,17 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_16__next__(struct __p
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__next__", 0);
 
-  /* "pysam/TabProxies.pyx":287
+  /* "pysam/TabProxies.pyx":291
  *         """python version of next().
  *         """
  *         if self.index >= self.nfields:             # <<<<<<<<<<<<<<
  *             raise StopIteration
  *         cdef char * retval = self.fields[self.index]
  */
-  __pyx_t_1 = (__pyx_v_self->index >= __pyx_v_self->nfields);
+  __pyx_t_1 = ((__pyx_v_self->index >= __pyx_v_self->nfields) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":288
+    /* "pysam/TabProxies.pyx":292
  *         """
  *         if self.index >= self.nfields:
  *             raise StopIteration             # <<<<<<<<<<<<<<
@@ -3819,12 +4246,10 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_16__next__(struct __p
  *         self.index += 1
  */
     __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":289
+  /* "pysam/TabProxies.pyx":293
  *         if self.index >= self.nfields:
  *             raise StopIteration
  *         cdef char * retval = self.fields[self.index]             # <<<<<<<<<<<<<<
@@ -3833,7 +4258,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_16__next__(struct __p
  */
   __pyx_v_retval = (__pyx_v_self->fields[__pyx_v_self->index]);
 
-  /* "pysam/TabProxies.pyx":290
+  /* "pysam/TabProxies.pyx":294
  *             raise StopIteration
  *         cdef char * retval = self.fields[self.index]
  *         self.index += 1             # <<<<<<<<<<<<<<
@@ -3842,24 +4267,23 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_16__next__(struct __p
  */
   __pyx_v_self->index = (__pyx_v_self->index + 1);
 
-  /* "pysam/TabProxies.pyx":291
+  /* "pysam/TabProxies.pyx":295
  *         cdef char * retval = self.fields[self.index]
  *         self.index += 1
  *         if retval == NULL: return None             # <<<<<<<<<<<<<<
  *         else: return retval
  * 
  */
-  __pyx_t_1 = (__pyx_v_retval == NULL);
+  __pyx_t_1 = ((__pyx_v_retval == NULL) != 0);
   if (__pyx_t_1) {
     __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(Py_None);
     __pyx_r = Py_None;
     goto __pyx_L0;
-    goto __pyx_L4;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":292
+    /* "pysam/TabProxies.pyx":296
  *         self.index += 1
  *         if retval == NULL: return None
  *         else: return retval             # <<<<<<<<<<<<<<
@@ -3867,16 +4291,22 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_16__next__(struct __p
  *     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 = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_retval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
   }
-  __pyx_L4:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":288
+ *         return self
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("pysam.TabProxies.TupleProxy.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -3887,6 +4317,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_16__next__(struct __p
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":298
+ *         else: return retval
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         '''return original data'''
+ *         # copy and replace \0 bytes with \t characters
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_19__str__(PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_10TupleProxy_18__str__[] = "return original data";
@@ -3898,85 +4336,78 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_10TupleProxy_19__str__(PyObject *_
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_10TupleProxy_18__str__(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":294
- *         else: return retval
- * 
- *     def __str__(self):             # <<<<<<<<<<<<<<
- *         '''return original data'''
- *         # copy and replace \0 bytes with \t characters
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_18__str__(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_self) {
   PyObject *__pyx_v_result = NULL;
   long __pyx_v_x;
   char *__pyx_v_cpy;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  long __pyx_t_3;
-  char *__pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  int __pyx_t_7;
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  long __pyx_t_4;
+  char *__pyx_t_5;
+  int __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__str__", 0);
 
-  /* "pysam/TabProxies.pyx":297
+  /* "pysam/TabProxies.pyx":301
  *         '''return original data'''
  *         # copy and replace \0 bytes with \t characters
  *         if self.is_modified:             # <<<<<<<<<<<<<<
  *             # todo: treat NULL values
  *             result = []
  */
-  if (__pyx_v_self->is_modified) {
+  __pyx_t_1 = (__pyx_v_self->is_modified != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":299
+    /* "pysam/TabProxies.pyx":303
  *         if self.is_modified:
  *             # todo: treat NULL values
  *             result = []             # <<<<<<<<<<<<<<
  *             for x in xrange( 0, self.nfields ):
  *                 result.append( StrOrEmpty( self.fields[x]).decode('ascii') )
  */
-    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_v_result = ((PyObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
+    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_v_result = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "pysam/TabProxies.pyx":300
+    /* "pysam/TabProxies.pyx":304
  *             # todo: treat NULL values
  *             result = []
  *             for x in xrange( 0, self.nfields ):             # <<<<<<<<<<<<<<
  *                 result.append( StrOrEmpty( self.fields[x]).decode('ascii') )
  *             return "\t".join( result )
  */
-    __pyx_t_2 = __pyx_v_self->nfields;
-    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
-      __pyx_v_x = __pyx_t_3;
+    __pyx_t_3 = __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;
 
-      /* "pysam/TabProxies.pyx":301
+      /* "pysam/TabProxies.pyx":305
  *             result = []
  *             for x in xrange( 0, self.nfields ):
  *                 result.append( StrOrEmpty( self.fields[x]).decode('ascii') )             # <<<<<<<<<<<<<<
  *             return "\t".join( result )
  *         else:
  */
-      __pyx_t_4 = __pyx_f_5pysam_10TabProxies_StrOrEmpty((__pyx_v_self->fields[__pyx_v_x]));
-      __pyx_t_1 = ((PyObject *)__Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_result, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __pyx_f_5pysam_10TabProxies_StrOrEmpty((__pyx_v_self->fields[__pyx_v_x]));
+      __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     }
 
-    /* "pysam/TabProxies.pyx":302
+    /* "pysam/TabProxies.pyx":306
  *             for x in xrange( 0, self.nfields ):
  *                 result.append( StrOrEmpty( self.fields[x]).decode('ascii') )
  *             return "\t".join( result )             # <<<<<<<<<<<<<<
@@ -3984,25 +4415,15 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_18__str__(struct __py
  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_18), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __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 = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_v_result);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result);
-    __Pyx_GIVEREF(__pyx_v_result);
-    __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __pyx_r = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__10, __pyx_v_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":304
+    /* "pysam/TabProxies.pyx":308
  *             return "\t".join( result )
  *         else:
  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )             # <<<<<<<<<<<<<<
@@ -4011,33 +4432,31 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_18__str__(struct __py
  */
     __pyx_v_cpy = ((char *)calloc((sizeof(char)), (__pyx_v_self->nbytes + 1)));
 
-    /* "pysam/TabProxies.pyx":305
+    /* "pysam/TabProxies.pyx":309
  *         else:
  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
  *             if cpy == NULL:             # <<<<<<<<<<<<<<
  *                 raise ValueError("out of memory" )
  *             memcpy( cpy, self.data, self.nbytes+1)
  */
-    __pyx_t_7 = (__pyx_v_cpy == NULL);
-    if (__pyx_t_7) {
+    __pyx_t_1 = ((__pyx_v_cpy == NULL) != 0);
+    if (__pyx_t_1) {
 
-      /* "pysam/TabProxies.pyx":306
+      /* "pysam/TabProxies.pyx":310
  *             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_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L6;
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L6:;
 
-    /* "pysam/TabProxies.pyx":307
+    /* "pysam/TabProxies.pyx":311
  *             if cpy == NULL:
  *                 raise ValueError("out of memory" )
  *             memcpy( cpy, self.data, self.nbytes+1)             # <<<<<<<<<<<<<<
@@ -4046,44 +4465,44 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_18__str__(struct __py
  */
     memcpy(__pyx_v_cpy, __pyx_v_self->data, (__pyx_v_self->nbytes + 1));
 
-    /* "pysam/TabProxies.pyx":308
+    /* "pysam/TabProxies.pyx":312
  *                 raise ValueError("out of memory" )
  *             memcpy( cpy, self.data, self.nbytes+1)
  *             for x from 0 <= x < self.nbytes:             # <<<<<<<<<<<<<<
  *                 if cpy[x] == '\0': cpy[x] = '\t'
  *             result = cpy[:self.nbytes]
  */
-    __pyx_t_2 = __pyx_v_self->nbytes;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+    __pyx_t_3 = __pyx_v_self->nbytes;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
 
-      /* "pysam/TabProxies.pyx":309
+      /* "pysam/TabProxies.pyx":313
  *             memcpy( cpy, self.data, self.nbytes+1)
  *             for x from 0 <= x < self.nbytes:
  *                 if cpy[x] == '\0': cpy[x] = '\t'             # <<<<<<<<<<<<<<
  *             result = cpy[:self.nbytes]
  *             free(cpy)
  */
-      __pyx_t_7 = ((__pyx_v_cpy[__pyx_v_x]) == '\x00');
-      if (__pyx_t_7) {
+      __pyx_t_1 = (((__pyx_v_cpy[__pyx_v_x]) == '\x00') != 0);
+      if (__pyx_t_1) {
         (__pyx_v_cpy[__pyx_v_x]) = '\t';
         goto __pyx_L9;
       }
       __pyx_L9:;
     }
 
-    /* "pysam/TabProxies.pyx":310
+    /* "pysam/TabProxies.pyx":314
  *             for x from 0 <= x < self.nbytes:
  *                 if cpy[x] == '\0': cpy[x] = '\t'
  *             result = cpy[:self.nbytes]             # <<<<<<<<<<<<<<
  *             free(cpy)
  *             return result.decode('ascii')
  */
-    __pyx_t_6 = PyBytes_FromStringAndSize(__pyx_v_cpy + 0, __pyx_v_self->nbytes - 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-    __pyx_v_result = ((PyObject *)__pyx_t_6);
-    __pyx_t_6 = 0;
+    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cpy + 0, __pyx_v_self->nbytes - 0); 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_v_result = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "pysam/TabProxies.pyx":311
+    /* "pysam/TabProxies.pyx":315
  *                 if cpy[x] == '\0': cpy[x] = '\t'
  *             result = cpy[:self.nbytes]
  *             free(cpy)             # <<<<<<<<<<<<<<
@@ -4092,7 +4511,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_18__str__(struct __py
  */
     free(__pyx_v_cpy);
 
-    /* "pysam/TabProxies.pyx":312
+    /* "pysam/TabProxies.pyx":316
  *             result = cpy[:self.nbytes]
  *             free(cpy)
  *             return result.decode('ascii')             # <<<<<<<<<<<<<<
@@ -4100,23 +4519,28 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_18__str__(struct __py
  * def toDot( v ):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_6 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_decode); 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_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_7;
+    __pyx_t_7 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":298
+ *         else: return retval
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         '''return original data'''
+ *         # copy and replace \0 bytes with \t characters
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_7);
   __Pyx_AddTraceback("pysam.TabProxies.TupleProxy.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -4126,7 +4550,15 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_10TupleProxy_18__str__(struct __py
   return __pyx_r;
 }
 
-/* Python wrapper */
+/* "pysam/TabProxies.pyx":318
+ *             return result.decode('ascii')
+ * 
+ * def toDot( v ):             # <<<<<<<<<<<<<<
+ *     '''convert value to '.' if None'''
+ *     if v == None: return "."
+ */
+
+/* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_1toDot(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_toDot[] = "convert value to '.' if None";
 static PyMethodDef __pyx_mdef_5pysam_10TabProxies_1toDot = {__Pyx_NAMESTR("toDot"), (PyCFunction)__pyx_pw_5pysam_10TabProxies_1toDot, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_10TabProxies_toDot)};
@@ -4135,18 +4567,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_1toDot(PyObject *__pyx_self, PyObj
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("toDot (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_toDot(__pyx_self, ((PyObject *)__pyx_v_v));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":314
- *             return result.decode('ascii')
- * 
- * def toDot( v ):             # <<<<<<<<<<<<<<
- *     '''convert value to '.' if None'''
- *     if v == None: return "."
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_toDot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -4158,26 +4584,25 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_toDot(CYTHON_UNUSED PyObject *__py
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("toDot", 0);
 
-  /* "pysam/TabProxies.pyx":316
+  /* "pysam/TabProxies.pyx":320
  * 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); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __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 = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __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 = 320; __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_21));
-    __pyx_r = ((PyObject *)__pyx_kp_s_21);
+    __Pyx_INCREF(__pyx_kp_s__13);
+    __pyx_r = __pyx_kp_s__13;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":317
+    /* "pysam/TabProxies.pyx":321
  *     '''convert value to '.' if None'''
  *     if v == None: return "."
  *     else: return str(v)             # <<<<<<<<<<<<<<
@@ -4185,22 +4610,28 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_toDot(CYTHON_UNUSED PyObject *__py
  * 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 = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_r = __pyx_t_3;
     __pyx_t_3 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":318
+ *             return result.decode('ascii')
+ * 
+ * def toDot( v ):             # <<<<<<<<<<<<<<
+ *     '''convert value to '.' if None'''
+ *     if v == None: return "."
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_3);
@@ -4212,6 +4643,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_toDot(CYTHON_UNUSED PyObject *__py
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":323
+ *     else: return str(v)
+ * 
+ * def quote( v ):             # <<<<<<<<<<<<<<
+ *     '''return a quoted attribute.'''
+ *     if type(v) in types.StringTypes:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_3quote(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_2quote[] = "return a quoted attribute.";
@@ -4221,46 +4660,42 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_3quote(PyObject *__pyx_self, PyObj
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("quote (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_2quote(__pyx_self, ((PyObject *)__pyx_v_v));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":319
- *     else: return str(v)
- * 
- * def quote( v ):             # <<<<<<<<<<<<<<
- *     '''return a quoted attribute.'''
- *     if type(v) in types.StringTypes:
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_2quote(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   int __pyx_t_3;
+  int __pyx_t_4;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("quote", 0);
 
-  /* "pysam/TabProxies.pyx":321
+  /* "pysam/TabProxies.pyx":325
  * 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 = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_types); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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 = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_StringTypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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_PySequence_Contains(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = (__Pyx_PySequence_Contains(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_3) {
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
 
-    /* "pysam/TabProxies.pyx":322
+    /* "pysam/TabProxies.pyx":326
  *     '''return a quoted attribute.'''
  *     if type(v) in types.StringTypes:
  *         return '"%s"' % v             # <<<<<<<<<<<<<<
@@ -4268,16 +4703,15 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_2quote(CYTHON_UNUSED PyObject *__p
  *         return str(v)
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":324
+    /* "pysam/TabProxies.pyx":328
  *         return '"%s"' % v
  *     else:
  *         return str(v)             # <<<<<<<<<<<<<<
@@ -4285,22 +4719,28 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_2quote(CYTHON_UNUSED 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 = 324; __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 = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_r = __pyx_t_1;
     __pyx_t_1 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":323
+ *     else: return str(v)
+ * 
+ * def quote( v ):             # <<<<<<<<<<<<<<
+ *     '''return a quoted attribute.'''
+ *     if type(v) in types.StringTypes:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -4312,6 +4752,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_2quote(CYTHON_UNUSED PyObject *__p
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":343
+ *     '''
+ * 
+ *     def __cinit__(self ):             # <<<<<<<<<<<<<<
+ *         # automatically calls TupleProxy.__cinit__
+ *         self.hasOwnAttributes = False
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
@@ -4322,24 +4770,18 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_1__cinit__(PyObject *__pyx_v_s
     __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;
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy___cinit__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":339
- *     '''
- * 
- *     def __cinit__(self ):             # <<<<<<<<<<<<<<
- *         # automatically calls TupleProxy.__cinit__
- *         self.hasOwnAttributes = False
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy___cinit__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__cinit__", 0);
 
-  /* "pysam/TabProxies.pyx":341
+  /* "pysam/TabProxies.pyx":345
  *     def __cinit__(self ):
  *         # automatically calls TupleProxy.__cinit__
  *         self.hasOwnAttributes = False             # <<<<<<<<<<<<<<
@@ -4348,7 +4790,7 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy___cinit__(struct __pyx_obj_5py
  */
   __pyx_v_self->hasOwnAttributes = 0;
 
-  /* "pysam/TabProxies.pyx":342
+  /* "pysam/TabProxies.pyx":346
  *         # automatically calls TupleProxy.__cinit__
  *         self.hasOwnAttributes = False
  *         self._attributes = NULL             # <<<<<<<<<<<<<<
@@ -4357,42 +4799,55 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy___cinit__(struct __pyx_obj_5py
  */
   __pyx_v_self->_attributes = NULL;
 
+  /* "pysam/TabProxies.pyx":343
+ *     '''
+ * 
+ *     def __cinit__(self ):             # <<<<<<<<<<<<<<
+ *         # automatically calls TupleProxy.__cinit__
+ *         self.hasOwnAttributes = False
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":348
+ *         self._attributes = NULL
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         # automatically calls TupleProxy.__dealloc__
+ *         if self.hasOwnAttributes:
+ */
+
 /* Python wrapper */
 static void __pyx_pw_5pysam_10TabProxies_8GTFProxy_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
 static void __pyx_pw_5pysam_10TabProxies_8GTFProxy_3__dealloc__(PyObject *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
   __pyx_pf_5pysam_10TabProxies_8GTFProxy_2__dealloc__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
 }
 
-/* "pysam/TabProxies.pyx":344
- *         self._attributes = NULL
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         # automatically calls TupleProxy.__dealloc__
- *         if self.hasOwnAttributes:
- */
-
 static void __pyx_pf_5pysam_10TabProxies_8GTFProxy_2__dealloc__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
   __Pyx_RefNannySetupContext("__dealloc__", 0);
 
-  /* "pysam/TabProxies.pyx":346
+  /* "pysam/TabProxies.pyx":350
  *     def __dealloc__(self):
  *         # automatically calls TupleProxy.__dealloc__
  *         if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
  *             free(self._attributes)
  * 
  */
-  if (__pyx_v_self->hasOwnAttributes) {
+  __pyx_t_1 = (__pyx_v_self->hasOwnAttributes != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":347
+    /* "pysam/TabProxies.pyx":351
  *         # automatically calls TupleProxy.__dealloc__
  *         if self.hasOwnAttributes:
  *             free(self._attributes)             # <<<<<<<<<<<<<<
@@ -4404,10 +4859,19 @@ static void __pyx_pf_5pysam_10TabProxies_8GTFProxy_2__dealloc__(struct __pyx_obj
   }
   __pyx_L3:;
 
+  /* "pysam/TabProxies.pyx":348
+ *         self._attributes = NULL
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         # automatically calls TupleProxy.__dealloc__
+ *         if self.hasOwnAttributes:
+ */
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
 }
 
-/* "pysam/TabProxies.pyx":349
+/* "pysam/TabProxies.pyx":353
  *             free(self._attributes)
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -4420,7 +4884,7 @@ static int __pyx_f_5pysam_10TabProxies_8GTFProxy_getMaxFields(CYTHON_UNUSED stru
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("getMaxFields", 0);
 
-  /* "pysam/TabProxies.pyx":351
+  /* "pysam/TabProxies.pyx":355
  *     cdef int getMaxFields( self, size_t nbytes ):
  *         '''return max number of fields.'''
  *         return 9             # <<<<<<<<<<<<<<
@@ -4430,12 +4894,28 @@ static int __pyx_f_5pysam_10TabProxies_8GTFProxy_getMaxFields(CYTHON_UNUSED stru
   __pyx_r = 9;
   goto __pyx_L0;
 
-  __pyx_r = 0;
+  /* "pysam/TabProxies.pyx":353
+ *             free(self._attributes)
+ * 
+ *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''return max number of fields.'''
+ *         return 9
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":359
+ *     property contig:
+ *        '''contig of feature.'''
+ *        def __get__( self ): return self._getindex( 0 )             # <<<<<<<<<<<<<<
+ *        def __set__( self, value ): self._setindex( 0, value )
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6contig_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6contig_1__get__(PyObject *__pyx_v_self) {
@@ -4443,18 +4923,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6contig_1__get__(PyObjec
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":355
- *     property contig:
- *        '''contig of feature.'''
- *        def __get__( self ): return self._getindex( 0 )             # <<<<<<<<<<<<<<
- *        def __set__( self, value ): self._setindex( 0, value )
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -4465,17 +4939,16 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig___get__(struct _
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -4487,6 +4960,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig___get__(struct _
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":360
+ *        '''contig of feature.'''
+ *        def __get__( self ): return self._getindex( 0 )
+ *        def __set__( self, value ): self._setindex( 0, value )             # <<<<<<<<<<<<<<
+ * 
+ *     property source:
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6contig_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6contig_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
@@ -4494,18 +4975,12 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6contig_3__set__(PyObject *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":356
- *        '''contig of feature.'''
- *        def __get__( self ): return self._getindex( 0 )
- *        def __set__( self, value ): self._setindex( 0, value )             # <<<<<<<<<<<<<<
- * 
- *     property source:
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -4516,9 +4991,9 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig_2__set__(struct __pyx_
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __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 = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); 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_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
@@ -4526,12 +5001,13 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig_2__set__(struct __pyx_
   __Pyx_INCREF(__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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -4545,6 +5021,14 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6contig_2__set__(struct __pyx_
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":364
+ *     property source:
+ *        '''feature source.'''
+ *        def __get__( self ): return self._getindex( 1 )             # <<<<<<<<<<<<<<
+ *        def __set__( self, value ): self._setindex( 1, value )
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6source_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6source_1__get__(PyObject *__pyx_v_self) {
@@ -4552,18 +5036,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6source_1__get__(PyObjec
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_6source___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":360
- *     property source:
- *        '''feature source.'''
- *        def __get__( self ): return self._getindex( 1 )             # <<<<<<<<<<<<<<
- *        def __set__( self, value ): self._setindex( 1, value )
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6source___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -4574,17 +5052,16 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6source___get__(struct _
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -4596,6 +5073,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6source___get__(struct _
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":365
+ *        '''feature source.'''
+ *        def __get__( self ): return self._getindex( 1 )
+ *        def __set__( self, value ): self._setindex( 1, value )             # <<<<<<<<<<<<<<
+ * 
+ *     property feature:
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6source_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6source_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
@@ -4603,18 +5088,12 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6source_3__set__(PyObject *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_6source_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":361
- *        '''feature source.'''
- *        def __get__( self ): return self._getindex( 1 )
- *        def __set__( self, value ): self._setindex( 1, value )             # <<<<<<<<<<<<<<
- * 
- *     property feature:
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6source_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -4625,9 +5104,9 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6source_2__set__(struct __pyx_
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
@@ -4635,12 +5114,13 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6source_2__set__(struct __pyx_
   __Pyx_INCREF(__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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -4654,6 +5134,14 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6source_2__set__(struct __pyx_
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":369
+ *     property feature:
+ *        '''feature name.'''
+ *        def __get__( self ): return self._getindex( 2 )             # <<<<<<<<<<<<<<
+ *        def __set__( self, value ): self._setindex( 2, value )
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_7feature_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_7feature_1__get__(PyObject *__pyx_v_self) {
@@ -4661,18 +5149,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_7feature_1__get__(PyObje
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":365
- *     property feature:
- *        '''feature name.'''
- *        def __get__( self ): return self._getindex( 2 )             # <<<<<<<<<<<<<<
- *        def __set__( self, value ): self._setindex( 2, value )
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -4683,17 +5165,16 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature___get__(struct
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -4705,6 +5186,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature___get__(struct
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":370
+ *        '''feature name.'''
+ *        def __get__( self ): return self._getindex( 2 )
+ *        def __set__( self, value ): self._setindex( 2, value )             # <<<<<<<<<<<<<<
+ * 
+ *     property start:
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_7feature_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_7feature_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
@@ -4712,18 +5201,12 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_7feature_3__set__(PyObject *__
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":366
- *        '''feature name.'''
- *        def __get__( self ): return self._getindex( 2 )
- *        def __set__( self, value ): self._setindex( 2, value )             # <<<<<<<<<<<<<<
- * 
- *     property start:
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -4734,9 +5217,9 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature_2__set__(struct __pyx
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __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 = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); 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_INCREF(__pyx_int_2);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
@@ -4744,12 +5227,13 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature_2__set__(struct __pyx
   __Pyx_INCREF(__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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -4763,6 +5247,14 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_7feature_2__set__(struct __pyx
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":374
+ *     property start:
+ *        '''feature start (in 0-based open/closed coordinates).'''
+ *        def __get__( self ): return int( self._getindex( 3 )) - 1             # <<<<<<<<<<<<<<
+ *        def __set__( self, value ): self._setindex( 3, str(value+1) )
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5start_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5start_1__get__(PyObject *__pyx_v_self) {
@@ -4770,18 +5262,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5start_1__get__(PyObject
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_5start___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":370
- *     property start:
- *        '''feature start (in 0-based open/closed coordinates).'''
- *        def __get__( self ): return int( self._getindex( 3 )) - 1             # <<<<<<<<<<<<<<
- *        def __set__( self, value ): self._setindex( 3, str(value+1) )
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5start___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -4792,28 +5278,22 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5start___get__(struct __
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __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 = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __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 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -4825,18 +5305,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5start___get__(struct __
   return __pyx_r;
 }
 
-/* Python wrapper */
-static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_5start_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/TabProxies.pyx":371
+/* "pysam/TabProxies.pyx":375
  *        '''feature start (in 0-based open/closed coordinates).'''
  *        def __get__( self ): return int( self._getindex( 3 )) - 1
  *        def __set__( self, value ): self._setindex( 3, str(value+1) )             # <<<<<<<<<<<<<<
@@ -4844,6 +5313,19 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5start_3__set__(PyObject *__py
  *     property end:
  */
 
+/* Python wrapper */
+static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_5start_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5start_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -4854,19 +5336,19 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5start_2__set__(struct __pyx_o
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_Add(__pyx_v_value, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyNumber_Add(__pyx_v_value, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __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 = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_3);
@@ -4874,12 +5356,13 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5start_2__set__(struct __pyx_o
   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -4893,6 +5376,14 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5start_2__set__(struct __pyx_o
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":379
+ *     property end:
+ *        '''feature end (in 0-based open/closed coordinates).'''
+ *        def __get__( self ): return int( self._getindex( 4 ) )             # <<<<<<<<<<<<<<
+ *        def __set__( self, value ): self._setindex( 4, str(value) )
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_3end_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_3end_1__get__(PyObject *__pyx_v_self) {
@@ -4900,18 +5391,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_3end_1__get__(PyObject *
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_3end___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":375
- *     property end:
- *        '''feature end (in 0-based open/closed coordinates).'''
- *        def __get__( self ): return int( self._getindex( 4 ) )             # <<<<<<<<<<<<<<
- *        def __set__( self, value ): self._setindex( 4, str(value) )
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_3end___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -4922,25 +5407,19 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_3end___get__(struct __py
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __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 = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -4952,6 +5431,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_3end___get__(struct __py
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":380
+ *        '''feature end (in 0-based open/closed coordinates).'''
+ *        def __get__( self ): return int( self._getindex( 4 ) )
+ *        def __set__( self, value ): self._setindex( 4, str(value) )             # <<<<<<<<<<<<<<
+ * 
+ *     property score:
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_3end_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_3end_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
@@ -4959,18 +5446,12 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_3end_3__set__(PyObject *__pyx_
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_3end_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":376
- *        '''feature end (in 0-based open/closed coordinates).'''
- *        def __get__( self ): return int( self._getindex( 4 ) )
- *        def __set__( self, value ): self._setindex( 4, str(value) )             # <<<<<<<<<<<<<<
- * 
- *     property score:
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_3end_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -4981,17 +5462,17 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_3end_2__set__(struct __pyx_obj
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __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 = 376; __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 = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_value);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
-  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(((PyObject *)__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 = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_4);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
@@ -4999,12 +5480,13 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_3end_2__set__(struct __pyx_obj
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -5018,6 +5500,14 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_3end_2__set__(struct __pyx_obj
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":384
+ *     property score:
+ *        '''feature score.'''
+ *        def __get__( self ):             # <<<<<<<<<<<<<<
+ *            v = self._getindex(5)
+ *            if v == "" or v[0] == '.':
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5score_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5score_1__get__(PyObject *__pyx_v_self) {
@@ -5025,18 +5515,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5score_1__get__(PyObject
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_5score___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":380
- *     property score:
- *        '''feature score.'''
- *        def __get__( self ):             # <<<<<<<<<<<<<<
- *            v = self._getindex(5)
- *            if v == "" or v[0] == '.':
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5score___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_v_v = NULL;
   PyObject *__pyx_r = NULL;
@@ -5052,45 +5536,41 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5score___get__(struct __
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
 
-  /* "pysam/TabProxies.pyx":381
+  /* "pysam/TabProxies.pyx":385
  *        '''feature score.'''
  *        def __get__( self ):
  *            v = self._getindex(5)             # <<<<<<<<<<<<<<
  *            if v == "" or v[0] == '.':
  *                return None
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_v = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":382
+  /* "pysam/TabProxies.pyx":386
  *        def __get__( self ):
  *            v = self._getindex(5)
  *            if v == "" or v[0] == '.':             # <<<<<<<<<<<<<<
  *                return None
  *            else:
  */
-  __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_kp_s_6), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_v, __pyx_kp_s__3, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (!__pyx_t_3) {
-    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_21), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__13, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __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 = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_5 = __pyx_t_4;
   } else {
     __pyx_t_5 = __pyx_t_3;
   }
   if (__pyx_t_5) {
 
-    /* "pysam/TabProxies.pyx":383
+    /* "pysam/TabProxies.pyx":387
  *            v = self._getindex(5)
  *            if v == "" or v[0] == '.':
  *                return None             # <<<<<<<<<<<<<<
@@ -5101,11 +5581,10 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5score___get__(struct __
     __Pyx_INCREF(Py_None);
     __pyx_r = Py_None;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":385
+    /* "pysam/TabProxies.pyx":389
  *                return None
  *            else:
  *                return float(v)             # <<<<<<<<<<<<<<
@@ -5113,17 +5592,23 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5score___get__(struct __
  *        def __set__( self, value ): self._setindex( 5, value )
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":384
+ *     property score:
+ *        '''feature score.'''
+ *        def __get__( self ):             # <<<<<<<<<<<<<<
+ *            v = self._getindex(5)
+ *            if v == "" or v[0] == '.':
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -5136,6 +5621,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5score___get__(struct __
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":391
+ *                return float(v)
+ * 
+ *        def __set__( self, value ): self._setindex( 5, value )             # <<<<<<<<<<<<<<
+ * 
+ *     property strand:
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5score_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5score_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
@@ -5143,18 +5636,12 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5score_3__set__(PyObject *__py
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_5score_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":387
- *                return float(v)
- * 
- *        def __set__( self, value ): self._setindex( 5, value )             # <<<<<<<<<<<<<<
- * 
- *     property strand:
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5score_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -5165,9 +5652,9 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5score_2__set__(struct __pyx_o
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_5);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
@@ -5175,12 +5662,13 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5score_2__set__(struct __pyx_o
   __Pyx_INCREF(__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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -5194,6 +5682,14 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5score_2__set__(struct __pyx_o
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":395
+ *     property strand:
+ *        '''feature strand.'''
+ *        def __get__( self ): return self._getindex( 6 )             # <<<<<<<<<<<<<<
+ *        def __set__( self, value ): self._setindex( 6, value )
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6strand_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6strand_1__get__(PyObject *__pyx_v_self) {
@@ -5201,18 +5697,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_6strand_1__get__(PyObjec
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":391
- *     property strand:
- *        '''feature strand.'''
- *        def __get__( self ): return self._getindex( 6 )             # <<<<<<<<<<<<<<
- *        def __set__( self, value ): self._setindex( 6, value )
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -5223,17 +5713,16 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand___get__(struct _
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__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_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -5245,6 +5734,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand___get__(struct _
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":396
+ *        '''feature strand.'''
+ *        def __get__( self ): return self._getindex( 6 )
+ *        def __set__( self, value ): self._setindex( 6, value )             # <<<<<<<<<<<<<<
+ * 
+ *     property frame:
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6strand_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6strand_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
@@ -5252,18 +5749,12 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_6strand_3__set__(PyObject *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":392
- *        '''feature strand.'''
- *        def __get__( self ): return self._getindex( 6 )
- *        def __set__( self, value ): self._setindex( 6, value )             # <<<<<<<<<<<<<<
- * 
- *     property frame:
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -5274,9 +5765,9 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand_2__set__(struct __pyx_
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __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 = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_6);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
@@ -5284,12 +5775,13 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand_2__set__(struct __pyx_
   __Pyx_INCREF(__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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -5303,6 +5795,14 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_6strand_2__set__(struct __pyx_
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":400
+ *     property frame:
+ *        '''feature frame.'''
+ *        def __get__( self ): return self._getindex( 7 )             # <<<<<<<<<<<<<<
+ *        def __set__( self, value ): self._setindex( 7, value )
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5frame_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5frame_1__get__(PyObject *__pyx_v_self) {
@@ -5310,18 +5810,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5frame_1__get__(PyObject
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":396
- *     property frame:
- *        '''feature frame.'''
- *        def __get__( self ): return self._getindex( 7 )             # <<<<<<<<<<<<<<
- *        def __set__( self, value ): self._setindex( 7, value )
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -5332,17 +5826,16 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame___get__(struct __
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -5354,6 +5847,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame___get__(struct __
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":401
+ *        '''feature frame.'''
+ *        def __get__( self ): return self._getindex( 7 )
+ *        def __set__( self, value ): self._setindex( 7, value )             # <<<<<<<<<<<<<<
+ * 
+ *     property attributes:
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
@@ -5361,18 +5862,12 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_5frame_3__set__(PyObject *__py
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":397
- *        '''feature frame.'''
- *        def __get__( self ): return self._getindex( 7 )
- *        def __set__( self, value ): self._setindex( 7, value )             # <<<<<<<<<<<<<<
- * 
- *     property attributes:
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -5383,9 +5878,9 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame_2__set__(struct __pyx_o
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __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 = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_7);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
@@ -5393,12 +5888,13 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame_2__set__(struct __pyx_o
   __Pyx_INCREF(__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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -5412,6 +5908,14 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_5frame_2__set__(struct __pyx_o
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":405
+ *     property attributes:
+ *        '''feature attributes (as a string).'''
+ *        def __get__( self ):             # <<<<<<<<<<<<<<
+ *            if self.hasOwnAttributes:
+ *                return self._attributes
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_10attributes_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_10attributes_1__get__(PyObject *__pyx_v_self) {
@@ -5419,38 +5923,34 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_10attributes_1__get__(Py
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes___get__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":401
- *     property attributes:
- *        '''feature attributes (as a string).'''
- *        def __get__( self ):             # <<<<<<<<<<<<<<
- *            if self.hasOwnAttributes:
- *                return self._attributes
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes___get__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
 
-  /* "pysam/TabProxies.pyx":402
+  /* "pysam/TabProxies.pyx":406
  *        '''feature attributes (as a string).'''
  *        def __get__( self ):
  *            if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
  *                return self._attributes
  *            else:
  */
-  if (__pyx_v_self->hasOwnAttributes) {
+  __pyx_t_1 = (__pyx_v_self->hasOwnAttributes != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":403
+    /* "pysam/TabProxies.pyx":407
  *        def __get__( self ):
  *            if self.hasOwnAttributes:
  *                return self._attributes             # <<<<<<<<<<<<<<
@@ -5458,16 +5958,15 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes___get__(str
  *                return self._getindex( 8 )
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_r = ((PyObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->_attributes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":405
+    /* "pysam/TabProxies.pyx":409
  *                return self._attributes
  *            else:
  *                return self._getindex( 8 )             # <<<<<<<<<<<<<<
@@ -5475,22 +5974,28 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes___get__(str
  *            if self.hasOwnAttributes:
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___getindex); 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_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, 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_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":405
+ *     property attributes:
+ *        '''feature attributes (as a string).'''
+ *        def __get__( self ):             # <<<<<<<<<<<<<<
+ *            if self.hasOwnAttributes:
+ *                return self._attributes
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_AddTraceback("pysam.TabProxies.GTFProxy.attributes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -5499,6 +6004,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes___get__(str
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":410
+ *            else:
+ *                return self._getindex( 8 )
+ *        def __set__( self, value ):             # <<<<<<<<<<<<<<
+ *            if self.hasOwnAttributes:
+ *                free(self._attributes)
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_10attributes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_10attributes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
@@ -5506,39 +6019,35 @@ static int __pyx_pw_5pysam_10TabProxies_8GTFProxy_10attributes_3__set__(PyObject
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes_2__set__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":406
- *            else:
- *                return self._getindex( 8 )
- *        def __set__( self, value ):             # <<<<<<<<<<<<<<
- *            if self.hasOwnAttributes:
- *                free(self._attributes)
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes_2__set__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__set__", 0);
 
-  /* "pysam/TabProxies.pyx":407
+  /* "pysam/TabProxies.pyx":411
  *                return self._getindex( 8 )
  *        def __set__( self, value ):
  *            if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
  *                free(self._attributes)
  *                self._attributes = NULL
  */
-  if (__pyx_v_self->hasOwnAttributes) {
+  __pyx_t_1 = (__pyx_v_self->hasOwnAttributes != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":408
+    /* "pysam/TabProxies.pyx":412
  *        def __set__( self, value ):
  *            if self.hasOwnAttributes:
  *                free(self._attributes)             # <<<<<<<<<<<<<<
@@ -5547,7 +6056,7 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes_2__set__(struct _
  */
     free(__pyx_v_self->_attributes);
 
-    /* "pysam/TabProxies.pyx":409
+    /* "pysam/TabProxies.pyx":413
  *            if self.hasOwnAttributes:
  *                free(self._attributes)
  *                self._attributes = NULL             # <<<<<<<<<<<<<<
@@ -5556,7 +6065,7 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes_2__set__(struct _
  */
     __pyx_v_self->_attributes = NULL;
 
-    /* "pysam/TabProxies.pyx":410
+    /* "pysam/TabProxies.pyx":414
  *                free(self._attributes)
  *                self._attributes = NULL
  *                self.hasOwnAttributes = False             # <<<<<<<<<<<<<<
@@ -5568,35 +6077,44 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes_2__set__(struct _
   }
   __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":411
+  /* "pysam/TabProxies.pyx":415
  *                self._attributes = NULL
  *                self.hasOwnAttributes = False
  *            self._setindex(8, value )             # <<<<<<<<<<<<<<
  * 
  *     cdef char * getAttributes( self ):
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___setindex); 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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); 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_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_8);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_8);
   __Pyx_GIVEREF(__pyx_int_8);
   __Pyx_INCREF(__pyx_v_value);
-  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value);
+  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
-  __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 = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/TabProxies.pyx":410
+ *            else:
+ *                return self._getindex( 8 )
+ *        def __set__( self, value ):             # <<<<<<<<<<<<<<
+ *            if self.hasOwnAttributes:
+ *                free(self._attributes)
+ */
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_AddTraceback("pysam.TabProxies.GTFProxy.attributes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = -1;
   __pyx_L0:;
@@ -5604,7 +6122,7 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes_2__set__(struct _
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":413
+/* "pysam/TabProxies.pyx":417
  *            self._setindex(8, value )
  * 
  *     cdef char * getAttributes( self ):             # <<<<<<<<<<<<<<
@@ -5615,18 +6133,20 @@ static int __pyx_pf_5pysam_10TabProxies_8GTFProxy_10attributes_2__set__(struct _
 static char *__pyx_f_5pysam_10TabProxies_8GTFProxy_getAttributes(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   char *__pyx_r;
   __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
   __Pyx_RefNannySetupContext("getAttributes", 0);
 
-  /* "pysam/TabProxies.pyx":415
+  /* "pysam/TabProxies.pyx":419
  *     cdef char * getAttributes( self ):
  *        '''return pointer to attributes.'''
  *        if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
  *            return self._attributes
  *        else:
  */
-  if (__pyx_v_self->hasOwnAttributes) {
+  __pyx_t_1 = (__pyx_v_self->hasOwnAttributes != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":416
+    /* "pysam/TabProxies.pyx":420
  *        '''return pointer to attributes.'''
  *        if self.hasOwnAttributes:
  *            return self._attributes             # <<<<<<<<<<<<<<
@@ -5635,11 +6155,10 @@ static char *__pyx_f_5pysam_10TabProxies_8GTFProxy_getAttributes(struct __pyx_ob
  */
     __pyx_r = __pyx_v_self->_attributes;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":418
+    /* "pysam/TabProxies.pyx":422
  *            return self._attributes
  *        else:
  *            return self.fields[ 8 ]             # <<<<<<<<<<<<<<
@@ -5649,14 +6168,29 @@ static char *__pyx_f_5pysam_10TabProxies_8GTFProxy_getAttributes(struct __pyx_ob
     __pyx_r = (__pyx_v_self->__pyx_base.fields[8]);
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = 0;
+  /* "pysam/TabProxies.pyx":417
+ *            self._setindex(8, value )
+ * 
+ *     cdef char * getAttributes( self ):             # <<<<<<<<<<<<<<
+ *        '''return pointer to attributes.'''
+ *        if self.hasOwnAttributes:
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":424
+ *            return self.fields[ 8 ]
+ * 
+ *     def asDict( self ):             # <<<<<<<<<<<<<<
+ *         """parse attributes - return as dict
+ *         """
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8GTFProxy_4asDict[] = "parse attributes - return as dict\n        ";
@@ -5665,18 +6199,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_5asDict(PyObject *__pyx_
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("asDict (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_4asDict(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":420
- *            return self.fields[ 8 ]
- * 
- *     def asDict( self ):             # <<<<<<<<<<<<<<
- *         """parse attributes - return as dict
- *         """
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_4asDict(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_v_attributes = NULL;
   PyObject *__pyx_v_fields = NULL;
@@ -5694,55 +6222,56 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_4asDict(struct __pyx_obj
   Py_ssize_t __pyx_t_4;
   PyObject *(*__pyx_t_5)(PyObject *);
   PyObject *__pyx_t_6 = NULL;
-  Py_ssize_t __pyx_t_7;
+  PyObject *__pyx_t_7 = NULL;
   PyObject *__pyx_t_8 = NULL;
-  int __pyx_t_9;
+  Py_ssize_t __pyx_t_9;
   int __pyx_t_10;
   int __pyx_t_11;
-  PyObject *__pyx_t_12 = NULL;
+  int __pyx_t_12;
   PyObject *__pyx_t_13 = NULL;
   PyObject *__pyx_t_14 = NULL;
-  double __pyx_t_15;
-  int __pyx_t_16;
+  PyObject *__pyx_t_15 = NULL;
+  double __pyx_t_16;
+  int __pyx_t_17;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("asDict", 0);
 
-  /* "pysam/TabProxies.pyx":425
+  /* "pysam/TabProxies.pyx":429
  * 
  *         # remove comments
  *         attributes = self.attributes             # <<<<<<<<<<<<<<
  * 
  *         # separate into fields
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_attributes = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":428
+  /* "pysam/TabProxies.pyx":432
  * 
  *         # separate into fields
- *         fields = [ x.strip() for x in attributes.split(";")[:-1]]             # <<<<<<<<<<<<<<
+ *         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 = 428; __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 = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_attributes, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __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_PySequence_GetSlice(__pyx_t_3, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, -1, NULL, NULL, &__pyx_slice__25, 0, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
     __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
   }
@@ -5751,333 +6280,336 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_4asDict(struct __pyx_obj
     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_2 = __pyx_t_5(__pyx_t_3);
       if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_2);
     }
-    __Pyx_XDECREF(__pyx_v_x);
-    __pyx_v_x = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2);
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, 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_2); __pyx_t_2 = 0;
-    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = ((PyObject *)__pyx_t_1);
-  __Pyx_INCREF(__pyx_t_3);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_v_fields = ((PyObject*)__pyx_t_3);
-  __pyx_t_3 = 0;
+  __pyx_v_fields = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":430
- *         fields = [ x.strip() for x in attributes.split(";")[:-1]]
+  /* "pysam/TabProxies.pyx":434
+ *         fields = [x.strip() for x in attributes.split(";")[:-1]]
  * 
  *         result = {}             # <<<<<<<<<<<<<<
  * 
  *         for f in fields:
  */
-  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  __pyx_v_result = ((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 = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_result = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":432
+  /* "pysam/TabProxies.pyx":436
  *         result = {}
  * 
  *         for f in fields:             # <<<<<<<<<<<<<<
- * 
- *             d = [ x.strip() for x in f.split(" ")]
+ *             # split at most once in order to avoid separating
+ *             # multi-word values
  */
-  __pyx_t_3 = ((PyObject *)__pyx_v_fields); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
   for (;;) {
-    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
     #if CYTHON_COMPILING_IN_CPYTHON
-    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     #else
-    __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     #endif
-    __Pyx_XDECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
+    __pyx_t_3 = 0;
 
-    /* "pysam/TabProxies.pyx":434
- *         for f in fields:
- * 
- *             d = [ x.strip() for x in f.split(" ")]             # <<<<<<<<<<<<<<
+    /* "pysam/TabProxies.pyx":439
+ *             # split at most once in order to avoid separating
+ *             # multi-word values
+ *             d = [x.strip() for x in string.split(f, " ", maxsplit=1)]             # <<<<<<<<<<<<<<
  * 
  *             n,v = d[0], d[1]
  */
-    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __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 = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_string); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
-      __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
+    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_v_f);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_f);
+    __Pyx_GIVEREF(__pyx_v_f);
+    __Pyx_INCREF(__pyx_kp_s__26);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_s__26);
+    __Pyx_GIVEREF(__pyx_kp_s__26);
+    __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_maxsplit, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
+      __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
       __pyx_t_5 = NULL;
     } else {
-      __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext;
+      __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext;
     }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
     for (;;) {
-      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_6)) {
-        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
+      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_7)) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_6)) {
-        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_7)) {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_2 = __pyx_t_5(__pyx_t_6);
-        if (unlikely(!__pyx_t_2)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5(__pyx_t_7);
+        if (unlikely(!__pyx_t_8)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_8);
       }
-      __Pyx_XDECREF(__pyx_v_x);
-      __pyx_v_x = __pyx_t_2;
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_8);
+      __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     }
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = ((PyObject *)__pyx_t_1);
-    __Pyx_INCREF(__pyx_t_6);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_XDECREF(((PyObject *)__pyx_v_d));
-    __pyx_v_d = ((PyObject*)__pyx_t_6);
-    __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_d, ((PyObject*)__pyx_t_3));
+    __pyx_t_3 = 0;
 
-    /* "pysam/TabProxies.pyx":436
- *             d = [ x.strip() for x in f.split(" ")]
+    /* "pysam/TabProxies.pyx":441
+ *             d = [x.strip() for x in string.split(f, " ", maxsplit=1)]
  * 
  *             n,v = d[0], d[1]             # <<<<<<<<<<<<<<
- *             if len(d) > 2: v = d[1:]
- * 
+ *             if len(d) > 2:
+ *                 v = d[1:]
  */
-    __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_XDECREF(__pyx_v_n);
-    __pyx_v_n = __pyx_t_6;
-    __pyx_t_6 = 0;
-    __Pyx_XDECREF(__pyx_v_v);
-    __pyx_v_v = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_d, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_d, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
+    __pyx_t_3 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
+    __pyx_t_7 = 0;
 
-    /* "pysam/TabProxies.pyx":437
+    /* "pysam/TabProxies.pyx":442
+ * 
+ *             n,v = d[0], d[1]
+ *             if len(d) > 2:             # <<<<<<<<<<<<<<
+ *                 v = d[1:]
  * 
+ */
+    __pyx_t_9 = PyList_GET_SIZE(__pyx_v_d); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = ((__pyx_t_9 > 2) != 0);
+    if (__pyx_t_10) {
+
+      /* "pysam/TabProxies.pyx":443
  *             n,v = d[0], d[1]
- *             if len(d) > 2: v = d[1:]             # <<<<<<<<<<<<<<
+ *             if len(d) > 2:
+ *                 v = d[1:]             # <<<<<<<<<<<<<<
  * 
  *             if v[0] == '"' and v[-1] == '"':
  */
-    __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_d)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_9 = (__pyx_t_7 > 2);
-    if (__pyx_t_9) {
-      __pyx_t_1 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_d), 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      __Pyx_DECREF(__pyx_v_v);
-      __pyx_v_v = ((PyObject *)__pyx_t_1);
-      __pyx_t_1 = 0;
+      __pyx_t_7 = __Pyx_PyList_GetSlice(__pyx_v_d, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_7);
+      __pyx_t_7 = 0;
       goto __pyx_L9;
     }
     __pyx_L9:;
 
-    /* "pysam/TabProxies.pyx":439
- *             if len(d) > 2: v = d[1:]
+    /* "pysam/TabProxies.pyx":445
+ *                 v = d[1:]
  * 
  *             if v[0] == '"' and v[-1] == '"':             # <<<<<<<<<<<<<<
  *                 v = v[1:-1]
  *             else:
  */
-    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_36), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    if (__pyx_t_9) {
-      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_kp_s_36), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_11 = __pyx_t_10;
+    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s__27, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (__pyx_t_10) {
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_v, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s__27, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_12 = __pyx_t_11;
     } else {
-      __pyx_t_11 = __pyx_t_9;
+      __pyx_t_12 = __pyx_t_10;
     }
-    if (__pyx_t_11) {
+    if (__pyx_t_12) {
 
-      /* "pysam/TabProxies.pyx":440
+      /* "pysam/TabProxies.pyx":446
  * 
  *             if v[0] == '"' and v[-1] == '"':
  *                 v = v[1:-1]             # <<<<<<<<<<<<<<
  *             else:
  *                 ## try to convert to a value
  */
-      __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_v, 1, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_v, 1, -1, NULL, NULL, &__pyx_slice__28, 1, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_7);
+      __pyx_t_7 = 0;
       goto __pyx_L10;
     }
     /*else*/ {
 
-      /* "pysam/TabProxies.pyx":443
+      /* "pysam/TabProxies.pyx":449
  *             else:
  *                 ## try to convert to a value
  *                 try:             # <<<<<<<<<<<<<<
- *                     v = float( v )
- *                     v = int( v )
+ *                     v = float(v)
+ *                     v = int(v)
  */
       {
-        __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
-        __Pyx_XGOTREF(__pyx_t_12);
+        __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
         __Pyx_XGOTREF(__pyx_t_13);
         __Pyx_XGOTREF(__pyx_t_14);
+        __Pyx_XGOTREF(__pyx_t_15);
         /*try:*/ {
 
-          /* "pysam/TabProxies.pyx":444
+          /* "pysam/TabProxies.pyx":450
  *                 ## try to convert to a value
  *                 try:
- *                     v = float( v )             # <<<<<<<<<<<<<<
- *                     v = int( v )
+ *                     v = float(v)             # <<<<<<<<<<<<<<
+ *                     v = int(v)
  *                 except ValueError:
  */
-          __pyx_t_15 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_15 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
-          __pyx_t_1 = PyFloat_FromDouble(__pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_DECREF(__pyx_v_v);
-          __pyx_v_v = __pyx_t_1;
-          __pyx_t_1 = 0;
+          __pyx_t_16 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_16 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
+          __pyx_t_7 = PyFloat_FromDouble(__pyx_t_16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_7);
+          __pyx_t_7 = 0;
 
-          /* "pysam/TabProxies.pyx":445
+          /* "pysam/TabProxies.pyx":451
  *                 try:
- *                     v = float( v )
- *                     v = int( v )             # <<<<<<<<<<<<<<
+ *                     v = float(v)
+ *                     v = int(v)             # <<<<<<<<<<<<<<
  *                 except ValueError:
  *                     pass
  */
-          __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
-          __Pyx_GOTREF(__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_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-          __Pyx_DECREF(__pyx_v_v);
-          __pyx_v_v = __pyx_t_6;
-          __pyx_t_6 = 0;
+          __pyx_t_7 = PyNumber_Int(__pyx_v_v); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_7);
+          __pyx_t_7 = 0;
         }
-        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
         __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
         __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
         goto __pyx_L18_try_end;
         __pyx_L11_error:;
         __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
         __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-        /* "pysam/TabProxies.pyx":446
- *                     v = float( v )
- *                     v = int( v )
+        /* "pysam/TabProxies.pyx":452
+ *                     v = float(v)
+ *                     v = int(v)
  *                 except ValueError:             # <<<<<<<<<<<<<<
  *                     pass
  *                 except TypeError:
  */
-        __pyx_t_16 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
-        if (__pyx_t_16) {
+        __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+        if (__pyx_t_17) {
           PyErr_Restore(0,0,0);
           goto __pyx_L12_exception_handled;
         }
 
-        /* "pysam/TabProxies.pyx":448
+        /* "pysam/TabProxies.pyx":454
  *                 except ValueError:
  *                     pass
  *                 except TypeError:             # <<<<<<<<<<<<<<
  *                     pass
  * 
  */
-        __pyx_t_16 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
-        if (__pyx_t_16) {
+        __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
+        if (__pyx_t_17) {
           PyErr_Restore(0,0,0);
           goto __pyx_L12_exception_handled;
         }
-        __Pyx_XGIVEREF(__pyx_t_12);
+        goto __pyx_L13_except_error;
+        __pyx_L13_except_error:;
         __Pyx_XGIVEREF(__pyx_t_13);
         __Pyx_XGIVEREF(__pyx_t_14);
-        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
         goto __pyx_L1_error;
         __pyx_L12_exception_handled:;
-        __Pyx_XGIVEREF(__pyx_t_12);
         __Pyx_XGIVEREF(__pyx_t_13);
         __Pyx_XGIVEREF(__pyx_t_14);
-        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
         __pyx_L18_try_end:;
       }
     }
     __pyx_L10:;
 
-    /* "pysam/TabProxies.pyx":451
+    /* "pysam/TabProxies.pyx":457
  *                     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 = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_n, __pyx_v_v) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":453
+  /* "pysam/TabProxies.pyx":459
  *             result[n] = v
  * 
  *         return result             # <<<<<<<<<<<<<<
@@ -6085,17 +6617,25 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_4asDict(struct __pyx_obj
  *     def fromDict( self, d ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_result));
-  __pyx_r = ((PyObject *)__pyx_v_result);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __pyx_v_result;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":424
+ *            return self.fields[ 8 ]
+ * 
+ *     def asDict( self ):             # <<<<<<<<<<<<<<
+ *         """parse attributes - return as dict
+ *         """
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_8);
   __Pyx_AddTraceback("pysam.TabProxies.GTFProxy.asDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
@@ -6113,6 +6653,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_4asDict(struct __pyx_obj
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":461
+ *         return result
+ * 
+ *     def fromDict( self, d ):             # <<<<<<<<<<<<<<
+ *         '''set attributes from a dictionary.'''
+ *         cdef char * p
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_7fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8GTFProxy_6fromDict[] = "set attributes from a dictionary.";
@@ -6121,18 +6669,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_7fromDict(PyObject *__py
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("fromDict (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_d));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":455
- *         return result
- * 
- *     def fromDict( self, d ):             # <<<<<<<<<<<<<<
- *         '''set attributes from a dictionary.'''
- *         cdef char * p
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_d) {
   char *__pyx_v_p;
   int __pyx_v_l;
@@ -6142,32 +6684,34 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_o
   PyObject *__pyx_v_a = NULL;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
-  Py_ssize_t __pyx_t_3;
-  PyObject *(*__pyx_t_4)(PyObject *);
-  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
   PyObject *__pyx_t_6 = NULL;
   PyObject *__pyx_t_7 = NULL;
-  PyObject *(*__pyx_t_8)(PyObject *);
-  int __pyx_t_9;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *(*__pyx_t_9)(PyObject *);
   int __pyx_t_10;
-  char *__pyx_t_11;
+  int __pyx_t_11;
+  char *__pyx_t_12;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("fromDict", 0);
 
-  /* "pysam/TabProxies.pyx":461
+  /* "pysam/TabProxies.pyx":467
  * 
  *         # clean up if this field is set twice
  *         if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
  *             free(self._attributes)
  * 
  */
-  if (__pyx_v_self->hasOwnAttributes) {
+  __pyx_t_1 = (__pyx_v_self->hasOwnAttributes != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":462
+    /* "pysam/TabProxies.pyx":468
  *         # clean up if this field is set twice
  *         if self.hasOwnAttributes:
  *             free(self._attributes)             # <<<<<<<<<<<<<<
@@ -6179,67 +6723,68 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_o
   }
   __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":464
+  /* "pysam/TabProxies.pyx":470
  *             free(self._attributes)
  * 
  *         aa = []             # <<<<<<<<<<<<<<
  *         for k,v in d.items():
  *             if type(v) in types.StringTypes:
  */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_aa = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_v_aa = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":465
+  /* "pysam/TabProxies.pyx":471
  * 
  *         aa = []
  *         for k,v in d.items():             # <<<<<<<<<<<<<<
  *             if type(v) in types.StringTypes:
  *                 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 = 465; __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 = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
-    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
-    __pyx_t_4 = NULL;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
   } else {
-    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   for (;;) {
-    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
+    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
-      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
-      if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __pyx_t_5(__pyx_t_2);
+      if (unlikely(!__pyx_t_3)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_3);
     }
-    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
-      PyObject* sequence = __pyx_t_2;
+    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
+      PyObject* sequence = __pyx_t_3;
       #if CYTHON_COMPILING_IN_CPYTHON
       Py_ssize_t size = Py_SIZE(sequence);
       #else
@@ -6248,172 +6793,161 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_o
       if (unlikely(size != 2)) {
         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       #if CYTHON_COMPILING_IN_CPYTHON
       if (likely(PyTuple_CheckExact(sequence))) {
-        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
-        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
       } else {
-        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
       }
-      __Pyx_INCREF(__pyx_t_5);
       __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_7);
       #else
-      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
       #endif
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    } else
-    {
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
       Py_ssize_t index = -1;
-      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
-      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_5);
-      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
+      __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+      index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
       __Pyx_GOTREF(__pyx_t_6);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_8 = NULL;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_7);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = NULL;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
       goto __pyx_L7_unpacking_done;
       __pyx_L6_unpacking_failed:;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_8 = NULL;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_9 = NULL;
       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_L7_unpacking_done:;
     }
-    __Pyx_XDECREF(__pyx_v_k);
-    __pyx_v_k = __pyx_t_5;
-    __pyx_t_5 = 0;
-    __Pyx_XDECREF(__pyx_v_v);
-    __pyx_v_v = __pyx_t_6;
+    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
     __pyx_t_6 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
+    __pyx_t_7 = 0;
 
-    /* "pysam/TabProxies.pyx":466
+    /* "pysam/TabProxies.pyx":472
  *         aa = []
  *         for k,v in d.items():
  *             if type(v) in types.StringTypes:             # <<<<<<<<<<<<<<
  *                 aa.append( '%s "%s"' % (k,v) )
  *             else:
  */
-    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); 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_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__StringTypes); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_9 = (__Pyx_PySequence_Contains(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    if (__pyx_t_9) {
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_types); 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_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_StringTypes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = (__Pyx_PySequence_Contains(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_10 = (__pyx_t_1 != 0);
+    if (__pyx_t_10) {
 
-      /* "pysam/TabProxies.pyx":467
+      /* "pysam/TabProxies.pyx":473
  *         for k,v in d.items():
  *             if type(v) in types.StringTypes:
  *                 aa.append( '%s "%s"' % (k,v) )             # <<<<<<<<<<<<<<
  *             else:
  *                 aa.append( '%s %s' % (k,str(v)) )
  */
-      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
       __Pyx_INCREF(__pyx_v_k);
-      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_k);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_k);
       __Pyx_GIVEREF(__pyx_v_k);
       __Pyx_INCREF(__pyx_v_v);
-      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_v);
+      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
-      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_37), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-      __pyx_t_10 = PyList_Append(__pyx_v_aa, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_7); 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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_aa, __pyx_t_3); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       goto __pyx_L8;
     }
     /*else*/ {
 
-      /* "pysam/TabProxies.pyx":469
+      /* "pysam/TabProxies.pyx":475
  *                 aa.append( '%s "%s"' % (k,v) )
  *             else:
  *                 aa.append( '%s %s' % (k,str(v)) )             # <<<<<<<<<<<<<<
  * 
  *         a = "; ".join( aa ) + ";"
  */
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_INCREF(__pyx_v_v);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
-      __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(((PyObject *)__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 = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
       __Pyx_INCREF(__pyx_v_k);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_k);
       __Pyx_GIVEREF(__pyx_v_k);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
-      __Pyx_GIVEREF(__pyx_t_6);
-      __pyx_t_6 = 0;
-      __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_38), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __pyx_t_10 = PyList_Append(__pyx_v_aa, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_aa, __pyx_t_7); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     }
     __pyx_L8:;
   }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":471
+  /* "pysam/TabProxies.pyx":477
  *                 aa.append( '%s %s' % (k,str(v)) )
  * 
  *         a = "; ".join( aa ) + ";"             # <<<<<<<<<<<<<<
  *         p = a
  *         l = len(a)
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_39), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __Pyx_INCREF(((PyObject *)__pyx_v_aa));
-  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_aa));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_aa));
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__29, __pyx_v_aa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-  __pyx_t_6 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_kp_s__23); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_a = __pyx_t_6;
-  __pyx_t_6 = 0;
+  __pyx_v_a = ((PyObject*)__pyx_t_7);
+  __pyx_t_7 = 0;
 
-  /* "pysam/TabProxies.pyx":472
+  /* "pysam/TabProxies.pyx":478
  * 
  *         a = "; ".join( aa ) + ";"
  *         p = a             # <<<<<<<<<<<<<<
  *         l = len(a)
  *         self._attributes = <char *>calloc( l + 1, sizeof(char) )
  */
-  __pyx_t_11 = PyBytes_AsString(__pyx_v_a); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_p = __pyx_t_11;
+  __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_a); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_p = __pyx_t_12;
 
-  /* "pysam/TabProxies.pyx":473
+  /* "pysam/TabProxies.pyx":479
  *         a = "; ".join( aa ) + ";"
  *         p = a
  *         l = len(a)             # <<<<<<<<<<<<<<
  *         self._attributes = <char *>calloc( l + 1, sizeof(char) )
  *         if self._attributes == NULL:
  */
-  __pyx_t_3 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_l = __pyx_t_3;
+  __pyx_t_4 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_l = __pyx_t_4;
 
-  /* "pysam/TabProxies.pyx":474
+  /* "pysam/TabProxies.pyx":480
  *         p = a
  *         l = len(a)
  *         self._attributes = <char *>calloc( l + 1, sizeof(char) )             # <<<<<<<<<<<<<<
@@ -6422,33 +6956,31 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_o
  */
   __pyx_v_self->_attributes = ((char *)calloc((__pyx_v_l + 1), (sizeof(char))));
 
-  /* "pysam/TabProxies.pyx":475
+  /* "pysam/TabProxies.pyx":481
  *         l = len(a)
  *         self._attributes = <char *>calloc( l + 1, sizeof(char) )
  *         if self._attributes == NULL:             # <<<<<<<<<<<<<<
  *             raise ValueError("out of memory" )
  *         memcpy( self._attributes, p, l )
  */
-  __pyx_t_9 = (__pyx_v_self->_attributes == NULL);
-  if (__pyx_t_9) {
+  __pyx_t_10 = ((__pyx_v_self->_attributes == NULL) != 0);
+  if (__pyx_t_10) {
 
-    /* "pysam/TabProxies.pyx":476
+    /* "pysam/TabProxies.pyx":482
  *         self._attributes = <char *>calloc( l + 1, sizeof(char) )
  *         if self._attributes == NULL:
  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
  *         memcpy( self._attributes, p, l )
  * 
  */
-    __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_40), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L9;
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L9:;
 
-  /* "pysam/TabProxies.pyx":477
+  /* "pysam/TabProxies.pyx":483
  *         if self._attributes == NULL:
  *             raise ValueError("out of memory" )
  *         memcpy( self._attributes, p, l )             # <<<<<<<<<<<<<<
@@ -6457,7 +6989,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_o
  */
   memcpy(__pyx_v_self->_attributes, __pyx_v_p, __pyx_v_l);
 
-  /* "pysam/TabProxies.pyx":479
+  /* "pysam/TabProxies.pyx":485
  *         memcpy( self._attributes, p, l )
  * 
  *         self.hasOwnAttributes = True             # <<<<<<<<<<<<<<
@@ -6466,7 +6998,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_o
  */
   __pyx_v_self->hasOwnAttributes = 1;
 
-  /* "pysam/TabProxies.pyx":480
+  /* "pysam/TabProxies.pyx":486
  * 
  *         self.hasOwnAttributes = True
  *         self.is_modified = True             # <<<<<<<<<<<<<<
@@ -6475,14 +7007,23 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_o
  */
   __pyx_v_self->__pyx_base.is_modified = 1;
 
+  /* "pysam/TabProxies.pyx":461
+ *         return result
+ * 
+ *     def fromDict( self, d ):             # <<<<<<<<<<<<<<
+ *         '''set attributes from a dictionary.'''
+ *         cdef char * p
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_6);
   __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
   __Pyx_AddTraceback("pysam.TabProxies.GTFProxy.fromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -6495,18 +7036,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_6fromDict(struct __pyx_o
   return __pyx_r;
 }
 
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_9__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_9__str__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_8__str__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/TabProxies.pyx":482
+/* "pysam/TabProxies.pyx":488
  *         self.is_modified = True
  * 
  *     def __str__(self):             # <<<<<<<<<<<<<<
@@ -6514,10 +7044,23 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_9__str__(PyObject *__pyx
  *         cdef int x
  */
 
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_9__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_9__str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_8__str__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_8__str__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
@@ -6533,16 +7076,17 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_8__str__(struct __pyx_ob
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__str__", 0);
 
-  /* "pysam/TabProxies.pyx":486
+  /* "pysam/TabProxies.pyx":492
  *         cdef int x
  * 
  *         if self.is_modified:             # <<<<<<<<<<<<<<
  *             return "\t".join(
  *                 (self.contig,
  */
-  if (__pyx_v_self->__pyx_base.is_modified) {
+  __pyx_t_1 = (__pyx_v_self->__pyx_base.is_modified != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":487
+    /* "pysam/TabProxies.pyx":493
  * 
  *         if self.is_modified:
  *             return "\t".join(             # <<<<<<<<<<<<<<
@@ -6550,129 +7094,135 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_8__str__(struct __pyx_ob
  *                  self.source,
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_18), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
 
-    /* "pysam/TabProxies.pyx":488
+    /* "pysam/TabProxies.pyx":494
  *         if self.is_modified:
  *             return "\t".join(
  *                 (self.contig,             # <<<<<<<<<<<<<<
  *                  self.source,
  *                  self.feature,
  */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__contig); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contig); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
 
-    /* "pysam/TabProxies.pyx":489
+    /* "pysam/TabProxies.pyx":495
  *             return "\t".join(
  *                 (self.contig,
  *                  self.source,             # <<<<<<<<<<<<<<
  *                  self.feature,
  *                  str(self.start+1),
  */
-    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__source); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); 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);
 
-    /* "pysam/TabProxies.pyx":490
+    /* "pysam/TabProxies.pyx":496
  *                 (self.contig,
  *                  self.source,
  *                  self.feature,             # <<<<<<<<<<<<<<
  *                  str(self.start+1),
  *                  str(self.end),
  */
-    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__feature); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_feature); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
 
-    /* "pysam/TabProxies.pyx":491
+    /* "pysam/TabProxies.pyx":497
  *                  self.source,
  *                  self.feature,
  *                  str(self.start+1),             # <<<<<<<<<<<<<<
  *                  str(self.end),
  *                  toDot(self.score),
  */
-    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__start); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __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 = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
     __Pyx_GIVEREF(__pyx_t_6);
     __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "pysam/TabProxies.pyx":492
+    /* "pysam/TabProxies.pyx":498
  *                  self.feature,
  *                  str(self.start+1),
  *                  str(self.end),             # <<<<<<<<<<<<<<
  *                  toDot(self.score),
  *                  self.strand,
  */
-    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__end); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __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 = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-    /* "pysam/TabProxies.pyx":493
+    /* "pysam/TabProxies.pyx":499
  *                  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 = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_toDot); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__score); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_score); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
     __Pyx_GIVEREF(__pyx_t_8);
     __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-    /* "pysam/TabProxies.pyx":494
+    /* "pysam/TabProxies.pyx":500
  *                  str(self.end),
  *                  toDot(self.score),
  *                  self.strand,             # <<<<<<<<<<<<<<
  *                  self.frame,
  *                  self.attributes ) )
  */
-    __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__strand); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
 
-    /* "pysam/TabProxies.pyx":495
+    /* "pysam/TabProxies.pyx":501
  *                  toDot(self.score),
  *                  self.strand,
  *                  self.frame,             # <<<<<<<<<<<<<<
  *                  self.attributes ) )
  *         else:
  */
-    __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__frame); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frame); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
 
-    /* "pysam/TabProxies.pyx":496
+    /* "pysam/TabProxies.pyx":502
  *                  self.strand,
  *                  self.frame,
  *                  self.attributes ) )             # <<<<<<<<<<<<<<
  *         else:
  *             return TupleProxy.__str__(self)
  */
-    __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__attributes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/TabProxies.pyx":494
+ *         if self.is_modified:
+ *             return "\t".join(
+ *                 (self.contig,             # <<<<<<<<<<<<<<
+ *                  self.source,
+ *                  self.feature,
+ */
+    __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_11);
     PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
@@ -6701,23 +7251,24 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_8__str__(struct __pyx_ob
     __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 = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/TabProxies.pyx":493
+ * 
+ *         if self.is_modified:
+ *             return "\t".join(             # <<<<<<<<<<<<<<
+ *                 (self.contig,
+ *                  self.source,
+ */
+    __pyx_t_10 = __Pyx_PyString_Join(__pyx_kp_s__10, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __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_r = __pyx_t_11;
-    __pyx_t_11 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __pyx_r = __pyx_t_10;
+    __pyx_t_10 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":498
+    /* "pysam/TabProxies.pyx":504
  *                  self.attributes ) )
  *         else:
  *             return TupleProxy.__str__(self)             # <<<<<<<<<<<<<<
@@ -6725,27 +7276,32 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_8__str__(struct __pyx_ob
  *     def invert( self, int lcontig ):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_11 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __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 = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_n_s_str); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
     __Pyx_INCREF(((PyObject *)__pyx_v_self));
-    PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_self));
     __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-    __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 = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_7;
+    __pyx_t_7 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":488
+ *         self.is_modified = True
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         cdef char * cpy
+ *         cdef int x
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
@@ -6764,16 +7320,27 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_8__str__(struct __pyx_ob
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":506
+ *             return TupleProxy.__str__(self)
+ * 
+ *     def invert( self, int lcontig ):             # <<<<<<<<<<<<<<
+ *         '''invert coordinates to negative strand coordinates
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_11invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8GTFProxy_10invert[] = "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_pw_5pysam_10TabProxies_8GTFProxy_11invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig) {
   int __pyx_v_lcontig;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("invert (wrapper)", 0);
   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 = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_lcontig = __Pyx_PyInt_As_int(__pyx_arg_lcontig); if (unlikely((__pyx_v_lcontig == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L3_error:;
@@ -6782,18 +7349,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_11invert(PyObject *__pyx
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_10invert(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((int)__pyx_v_lcontig));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":500
- *             return TupleProxy.__str__(self)
- * 
- *     def invert( self, int lcontig ):             # <<<<<<<<<<<<<<
- *         '''invert coordinates to negative strand coordinates
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_10invert(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, int __pyx_v_lcontig) {
   PyObject *__pyx_v_start = NULL;
   PyObject *__pyx_v_end = NULL;
@@ -6809,107 +7370,114 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_10invert(struct __pyx_ob
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("invert", 0);
 
-  /* "pysam/TabProxies.pyx":506
+  /* "pysam/TabProxies.pyx":512
  *         negative strand.'''
  * 
  *         if self.strand[0] == '-':             # <<<<<<<<<<<<<<
  *             start = min(self.start, self.end)
  *             end = max(self.start, self.end)
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__strand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); 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_2 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __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_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_41), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__31, Py_EQ)); if (unlikely(__pyx_t_3 < 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_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 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;
   if (__pyx_t_3) {
 
-    /* "pysam/TabProxies.pyx":507
+    /* "pysam/TabProxies.pyx":513
  * 
  *         if self.strand[0] == '-':
  *             start = min(self.start, self.end)             # <<<<<<<<<<<<<<
  *             end = max(self.start, self.end)
  *             self.start, self.end = lcontig - end, lcontig - start
  */
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__end); 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_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end); 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_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_3) {
-      __Pyx_INCREF(__pyx_t_1);
-      __pyx_t_4 = __pyx_t_1;
-    } else {
       __Pyx_INCREF(__pyx_t_2);
       __pyx_t_4 = __pyx_t_2;
+    } else {
+      __Pyx_INCREF(__pyx_t_1);
+      __pyx_t_4 = __pyx_t_1;
     }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = __pyx_t_4;
-    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __pyx_t_4;
+    __Pyx_INCREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_v_start = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_v_start = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "pysam/TabProxies.pyx":508
+    /* "pysam/TabProxies.pyx":514
  *         if self.strand[0] == '-':
  *             start = min(self.start, self.end)
  *             end = max(self.start, self.end)             # <<<<<<<<<<<<<<
  *             self.start, self.end = lcontig - end, lcontig - start
  * 
  */
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__end); 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_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end); 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_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_3) {
-      __Pyx_INCREF(__pyx_t_1);
-      __pyx_t_2 = __pyx_t_1;
+      __Pyx_INCREF(__pyx_t_2);
+      __pyx_t_1 = __pyx_t_2;
     } else {
       __Pyx_INCREF(__pyx_t_4);
-      __pyx_t_2 = __pyx_t_4;
+      __pyx_t_1 = __pyx_t_4;
     }
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = __pyx_t_2;
-    __Pyx_INCREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_v_end = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_2 = __pyx_t_1;
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_end = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "pysam/TabProxies.pyx":509
+    /* "pysam/TabProxies.pyx":515
  *             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_1 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_v_end); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_lcontig); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_lcontig); 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 = PyNumber_Subtract(__pyx_t_2, __pyx_v_start); 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_1); __pyx_t_1 = 0;
-    if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__start, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__end, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
+  /* "pysam/TabProxies.pyx":506
+ *             return TupleProxy.__str__(self)
+ * 
+ *     def invert( self, int lcontig ):             # <<<<<<<<<<<<<<
+ *         '''invert coordinates to negative strand coordinates
+ * 
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -6927,6 +7495,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_10invert(struct __pyx_ob
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":517
+ *             self.start, self.end = lcontig - end, lcontig - start
+ * 
+ *     def keys( self ):             # <<<<<<<<<<<<<<
+ *         '''return a list of attributes defined in this entry.'''
+ *         r = self.attributes
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_13keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8GTFProxy_12keys[] = "return a list of attributes defined in this entry.";
@@ -6935,18 +7511,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_13keys(PyObject *__pyx_v
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("keys (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_12keys(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":511
- *             self.start, self.end = lcontig - end, lcontig - start
- * 
- *     def keys( self ):             # <<<<<<<<<<<<<<
- *         '''return a list of attributes defined in this entry.'''
- *         r = self.attributes
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_12keys(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self) {
   PyObject *__pyx_v_r = NULL;
   PyObject *__pyx_v_x = NULL;
@@ -6964,19 +7534,19 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_12keys(struct __pyx_obj_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("keys", 0);
 
-  /* "pysam/TabProxies.pyx":513
+  /* "pysam/TabProxies.pyx":519
  *     def keys( self ):
  *         '''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() != '' ]
  * 
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_r = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":514
+  /* "pysam/TabProxies.pyx":520
  *         '''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() != '' ]             # <<<<<<<<<<<<<<
@@ -6984,18 +7554,18 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_12keys(struct __pyx_obj_
  *     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 = 514; __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 = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_r, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_split); 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_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__32, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
     __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); 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_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
   }
@@ -7004,69 +7574,73 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_12keys(struct __pyx_obj_
     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) {
       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) {
       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_3 = __pyx_t_5(__pyx_t_2);
       if (unlikely(!__pyx_t_3)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_3);
     }
-    __Pyx_XDECREF(__pyx_v_x);
-    __pyx_v_x = __pyx_t_3;
+    __Pyx_XDECREF_SET(__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 = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_strip); 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_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_kp_s_6), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_kp_s__3, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (__pyx_t_7) {
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __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 = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__33, NULL); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
       goto __pyx_L5;
     }
     __pyx_L5:;
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_INCREF(((PyObject *)__pyx_t_1));
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":517
+ *             self.start, self.end = lcontig - end, lcontig - start
+ * 
+ *     def keys( self ):             # <<<<<<<<<<<<<<
+ *         '''return a list of attributes defined in this entry.'''
+ *         r = self.attributes
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -7082,6 +7656,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_12keys(struct __pyx_obj_
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":522
+ *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
+ * 
+ *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
+ *         return self.__getattr__( key )
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
@@ -7089,18 +7671,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_15__getitem__(PyObject *
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_14__getitem__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":516
- *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
- * 
- *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
- *         return self.__getattr__( key )
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_14__getitem__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -7112,7 +7688,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_14__getitem__(struct __p
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__getitem__", 0);
 
-  /* "pysam/TabProxies.pyx":517
+  /* "pysam/TabProxies.pyx":523
  * 
  *     def __getitem__(self, key):
  *         return self.__getattr__( key )             # <<<<<<<<<<<<<<
@@ -7120,23 +7696,30 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_14__getitem__(struct __p
  *     def __getattr__(self, item ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____getattr__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getattr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __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 = 517; __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 = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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 = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_r = __pyx_t_3;
   __pyx_t_3 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":522
+ *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
+ * 
+ *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
+ *         return self.__getattr__( key )
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -7149,6 +7732,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_14__getitem__(struct __p
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":525
+ *         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
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_17__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8GTFProxy_16__getattr__[] = "Generic lookup of attribute from GFF/GTF attributes \n        Only called if there *isn't* an attribute with this name\n        ";
@@ -7160,18 +7751,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_17__getattr__(PyObject *
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_16__getattr__(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_item));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":519
- *         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_5pysam_10TabProxies_8GTFProxy_16__getattr__(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_item) {
   char *__pyx_v_start;
   char *__pyx_v_query;
@@ -7183,9 +7768,9 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_16__getattr__(struct __p
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  char *__pyx_t_2;
-  int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  char *__pyx_t_3;
+  int __pyx_t_4;
   int __pyx_t_5;
   int __pyx_t_6;
   int __pyx_lineno = 0;
@@ -7193,113 +7778,122 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_16__getattr__(struct __p
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__getattr__", 0);
 
-  /* "pysam/TabProxies.pyx":542
+  /* "pysam/TabProxies.pyx":548
  *         # disappeard after accessing the C data structures
  *         # directly and so did the bug.
  *         cdef char * attributes = self.getAttributes()             # <<<<<<<<<<<<<<
  * 
- *         r = _force_bytes(item)
+ *         # add space in order to make sure
  */
   __pyx_v_attributes = ((struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *)__pyx_v_self->__pyx_base.__pyx_vtab)->getAttributes(__pyx_v_self);
 
-  /* "pysam/TabProxies.pyx":544
- *         cdef char * attributes = self.getAttributes()
- * 
- *         r = _force_bytes(item)             # <<<<<<<<<<<<<<
+  /* "pysam/TabProxies.pyx":552
+ *         # add space in order to make sure
+ *         # to not pick up a field that is a prefix of another field
+ *         r = _force_bytes(item + " ")             # <<<<<<<<<<<<<<
  *         query = r
- *         start = strstr( attributes, query)
+ *         start = strstr(attributes, query)
  */
-  __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_10TabProxies__force_bytes(__pyx_v_item)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyNumber_Add(__pyx_v_item, __pyx_kp_s__26); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_r = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __pyx_t_2 = __pyx_f_5pysam_10TabProxies__force_bytes(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_r = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":545
- * 
- *         r = _force_bytes(item)
+  /* "pysam/TabProxies.pyx":553
+ *         # to not pick up a field that is a prefix of another field
+ *         r = _force_bytes(item + " ")
  *         query = r             # <<<<<<<<<<<<<<
- *         start = strstr( attributes, query)
+ *         start = strstr(attributes, query)
  * 
  */
-  __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_r)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_query = __pyx_t_2;
+  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_r); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_query = __pyx_t_3;
 
-  /* "pysam/TabProxies.pyx":546
- *         r = _force_bytes(item)
+  /* "pysam/TabProxies.pyx":554
+ *         r = _force_bytes(item + " ")
  *         query = r
- *         start = strstr( attributes, query)             # <<<<<<<<<<<<<<
+ *         start = strstr(attributes, query)             # <<<<<<<<<<<<<<
  * 
  *         if start == NULL:
  */
   __pyx_v_start = strstr(__pyx_v_attributes, __pyx_v_query);
 
-  /* "pysam/TabProxies.pyx":548
- *         start = strstr( attributes, query)
+  /* "pysam/TabProxies.pyx":556
+ *         start = strstr(attributes, query)
  * 
  *         if start == NULL:             # <<<<<<<<<<<<<<
  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
  * 
  */
-  __pyx_t_3 = (__pyx_v_start == NULL);
-  if (__pyx_t_3) {
+  __pyx_t_4 = ((__pyx_v_start == NULL) != 0);
+  if (__pyx_t_4) {
 
-    /* "pysam/TabProxies.pyx":549
+    /* "pysam/TabProxies.pyx":557
  * 
  *         if start == NULL:
  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )             # <<<<<<<<<<<<<<
  * 
- *         start += strlen(query) + 1
+ *         start += strlen(query)
  */
-    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), __pyx_v_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __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 = 549; __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_AttributeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_GTFProxy_has_no_attribute_s, __pyx_v_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __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 = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":551
+  /* "pysam/TabProxies.pyx":559
  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
  * 
- *         start += strlen(query) + 1             # <<<<<<<<<<<<<<
+ *         start += strlen(query)             # <<<<<<<<<<<<<<
  *         # skip gaps before
- *         while start[0] == ' ': start += 1
+ *         while start[0] == ' ':
  */
-  __pyx_v_start = (__pyx_v_start + (strlen(__pyx_v_query) + 1));
+  __pyx_v_start = (__pyx_v_start + strlen(__pyx_v_query));
 
-  /* "pysam/TabProxies.pyx":553
- *         start += strlen(query) + 1
+  /* "pysam/TabProxies.pyx":561
+ *         start += strlen(query)
  *         # skip gaps before
- *         while start[0] == ' ': start += 1             # <<<<<<<<<<<<<<
+ *         while start[0] == ' ':             # <<<<<<<<<<<<<<
+ *             start += 1
  * 
- *         if start[0] == '"':
  */
   while (1) {
-    __pyx_t_3 = ((__pyx_v_start[0]) == ' ');
-    if (!__pyx_t_3) break;
+    __pyx_t_4 = (((__pyx_v_start[0]) == ' ') != 0);
+    if (!__pyx_t_4) break;
+
+    /* "pysam/TabProxies.pyx":562
+ *         # skip gaps before
+ *         while start[0] == ' ':
+ *             start += 1             # <<<<<<<<<<<<<<
+ * 
+ *         if start[0] == '"':
+ */
     __pyx_v_start = (__pyx_v_start + 1);
   }
 
-  /* "pysam/TabProxies.pyx":555
- *         while start[0] == ' ': start += 1
+  /* "pysam/TabProxies.pyx":564
+ *             start += 1
  * 
  *         if start[0] == '"':             # <<<<<<<<<<<<<<
  *             start += 1
  *             end = start
  */
-  __pyx_t_3 = ((__pyx_v_start[0]) == '"');
-  if (__pyx_t_3) {
+  __pyx_t_4 = (((__pyx_v_start[0]) == '"') != 0);
+  if (__pyx_t_4) {
 
-    /* "pysam/TabProxies.pyx":556
+    /* "pysam/TabProxies.pyx":565
  * 
  *         if start[0] == '"':
  *             start += 1             # <<<<<<<<<<<<<<
@@ -7308,7 +7902,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_16__getattr__(struct __p
  */
     __pyx_v_start = (__pyx_v_start + 1);
 
-    /* "pysam/TabProxies.pyx":557
+    /* "pysam/TabProxies.pyx":566
  *         if start[0] == '"':
  *             start += 1
  *             end = start             # <<<<<<<<<<<<<<
@@ -7317,88 +7911,93 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_16__getattr__(struct __p
  */
     __pyx_v_end = __pyx_v_start;
 
-    /* "pysam/TabProxies.pyx":558
+    /* "pysam/TabProxies.pyx":567
  *             start += 1
  *             end = start
  *             while end[0] != '\0' and end[0] != '"': end += 1             # <<<<<<<<<<<<<<
  *             l = end - start
- *             result = _force_str( PyBytes_FromStringAndSize( start, l ) )
+ *             result = _force_str(PyBytes_FromStringAndSize( start, l ))
  */
     while (1) {
-      __pyx_t_3 = ((__pyx_v_end[0]) != '\x00');
-      if (__pyx_t_3) {
-        __pyx_t_5 = ((__pyx_v_end[0]) != '"');
+      __pyx_t_4 = (((__pyx_v_end[0]) != '\x00') != 0);
+      if (__pyx_t_4) {
+        __pyx_t_5 = (((__pyx_v_end[0]) != '"') != 0);
         __pyx_t_6 = __pyx_t_5;
       } else {
-        __pyx_t_6 = __pyx_t_3;
+        __pyx_t_6 = __pyx_t_4;
       }
       if (!__pyx_t_6) break;
       __pyx_v_end = (__pyx_v_end + 1);
     }
 
-    /* "pysam/TabProxies.pyx":559
+    /* "pysam/TabProxies.pyx":568
  *             end = start
  *             while end[0] != '\0' and end[0] != '"': end += 1
  *             l = end - start             # <<<<<<<<<<<<<<
- *             result = _force_str( PyBytes_FromStringAndSize( start, l ) )
+ *             result = _force_str(PyBytes_FromStringAndSize( start, l ))
  *             return result
  */
     __pyx_v_l = (__pyx_v_end - __pyx_v_start);
 
-    /* "pysam/TabProxies.pyx":560
+    /* "pysam/TabProxies.pyx":569
  *             while end[0] != '\0' and end[0] != '"': end += 1
  *             l = end - start
- *             result = _force_str( PyBytes_FromStringAndSize( start, l ) )             # <<<<<<<<<<<<<<
+ *             result = _force_str(PyBytes_FromStringAndSize( start, l ))             # <<<<<<<<<<<<<<
  *             return result
  *         else:
  */
-    __pyx_t_1 = ((PyObject *)PyBytes_FromStringAndSize(__pyx_v_start, __pyx_v_l)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_start, __pyx_v_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __pyx_f_5pysam_10TabProxies__force_str(__pyx_t_2); 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);
-    __pyx_t_4 = __pyx_f_5pysam_10TabProxies__force_str(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_v_result = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_result = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "pysam/TabProxies.pyx":561
+    /* "pysam/TabProxies.pyx":570
  *             l = end - start
- *             result = _force_str( PyBytes_FromStringAndSize( start, l ) )
+ *             result = _force_str(PyBytes_FromStringAndSize( start, l ))
  *             return result             # <<<<<<<<<<<<<<
  *         else:
- *             return _force_str( start )
+ *             return _force_str(start)
  */
     __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(__pyx_v_result);
     __pyx_r = __pyx_v_result;
     goto __pyx_L0;
-    goto __pyx_L6;
   }
   /*else*/ {
 
-    /* "pysam/TabProxies.pyx":563
+    /* "pysam/TabProxies.pyx":572
  *             return result
  *         else:
- *             return _force_str( start )             # <<<<<<<<<<<<<<
+ *             return _force_str(start)             # <<<<<<<<<<<<<<
  * 
  *     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 = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    __pyx_t_1 = __pyx_f_5pysam_10TabProxies__force_str(((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_start); 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_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-  }
-  __pyx_L6:;
+    __pyx_t_2 = __pyx_f_5pysam_10TabProxies__force_str(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":525
+ *         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
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("pysam.TabProxies.GTFProxy.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -7409,17 +8008,28 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_16__getattr__(struct __p
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":574
+ *             return _force_str(start)
+ * 
+ *     def setAttribute( self, name, value ):             # <<<<<<<<<<<<<<
+ *         '''convenience method to set an attribute.'''
+ *         r = self.asDict()
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_19setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8GTFProxy_18setAttribute[] = "convenience method to set an attribute.";
 static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_19setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_name = 0;
   PyObject *__pyx_v_value = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setAttribute (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__value,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -7433,16 +8043,16 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_19setAttribute(PyObject
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -7455,25 +8065,19 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8GTFProxy_19setAttribute(PyObject
   }
   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 = 565; __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 = 574; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.TabProxies.GTFProxy.setAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8GTFProxy_18setAttribute(((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_v_self), __pyx_v_name, __pyx_v_value);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":565
- *             return _force_str( start )
- * 
- *     def setAttribute( self, name, value ):             # <<<<<<<<<<<<<<
- *         '''convenience method to set an attribute.'''
- *         r = self.asDict()
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_18setAttribute(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
   PyObject *__pyx_v_r = NULL;
   PyObject *__pyx_r = NULL;
@@ -7486,50 +8090,59 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_18setAttribute(struct __
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setAttribute", 0);
 
-  /* "pysam/TabProxies.pyx":567
+  /* "pysam/TabProxies.pyx":576
  *     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(((PyObject *)__pyx_v_self), __pyx_n_s__asDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_asDict); 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_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_r = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":568
+  /* "pysam/TabProxies.pyx":577
  *         '''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 = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(PyObject_SetItem(__pyx_v_r, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/TabProxies.pyx":569
+  /* "pysam/TabProxies.pyx":578
  *         r = self.asDict()
  *         r[name] = value
  *         self.fromDict( r )             # <<<<<<<<<<<<<<
  * 
  * cdef class NamedTupleProxy( TupleProxy ):
  */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__fromDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fromDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __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 = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
+  /* "pysam/TabProxies.pyx":574
+ *             return _force_str(start)
+ * 
+ *     def setAttribute( self, name, value ):             # <<<<<<<<<<<<<<
+ *         '''convenience method to set an attribute.'''
+ *         r = self.asDict()
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -7545,6 +8158,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8GTFProxy_18setAttribute(struct __
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":584
+ *     map_key2field = {}
+ * 
+ *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
+ *         '''set attribute.'''
+ *         cdef int idx
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_15NamedTupleProxy_1__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_15NamedTupleProxy___setattr__[] = "set attribute.";
@@ -7556,18 +8177,12 @@ static int __pyx_pw_5pysam_10TabProxies_15NamedTupleProxy_1__setattr__(PyObject
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(((struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":575
- *     map_key2field = {}
- * 
- *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
- *         '''set attribute.'''
- *         cdef int idx
- */
-
 static int __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
   int __pyx_v_idx;
   CYTHON_UNUSED PyObject *__pyx_v_f = NULL;
@@ -7585,16 +8200,16 @@ static int __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(struct __p
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__setattr__", 0);
 
-  /* "pysam/TabProxies.pyx":578
+  /* "pysam/TabProxies.pyx":587
  *         '''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(((PyObject *)__pyx_v_self), __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); 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_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
@@ -7607,7 +8222,7 @@ static int __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(struct __p
     if (unlikely(size != 2)) {
       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     #if CYTHON_COMPILING_IN_CPYTHON
     if (likely(PyTuple_CheckExact(sequence))) {
@@ -7620,16 +8235,15 @@ static int __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(struct __p
     __Pyx_INCREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_t_3);
     #else
-    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PySequence_ITEM(sequence, 0); 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_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PySequence_ITEM(sequence, 1); 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);
     #endif
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  } else
-  {
+  } else {
     Py_ssize_t index = -1;
-    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
@@ -7637,7 +8251,7 @@ static int __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(struct __p
     __Pyx_GOTREF(__pyx_t_1);
     index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
     __Pyx_GOTREF(__pyx_t_3);
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_5 = NULL;
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     goto __pyx_L4_unpacking_done;
@@ -7645,69 +8259,67 @@ static int __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(struct __p
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_L4_unpacking_done:;
   }
-  __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 = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_idx = __pyx_t_6;
   __pyx_v_f = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "pysam/TabProxies.pyx":579
+  /* "pysam/TabProxies.pyx":588
  *         cdef int idx
  *         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_7 = (__pyx_v_self->__pyx_base.nfields < __pyx_v_idx);
+  __pyx_t_7 = ((__pyx_v_self->__pyx_base.nfields < __pyx_v_idx) != 0);
   if (__pyx_t_7) {
 
-    /* "pysam/TabProxies.pyx":580
+    /* "pysam/TabProxies.pyx":589
  *         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_45), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __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 = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_field_s_not_set, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __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 = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_2 = 0;
-    __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 = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L5:;
 
-  /* "pysam/TabProxies.pyx":581
+  /* "pysam/TabProxies.pyx":590
  *         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_5pysam_10TabProxies_TupleProxy)), __pyx_n_s____setitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_n_s_setitem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __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 = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __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 = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_INCREF(__pyx_v_value);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
-  __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 = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __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(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_INCREF(((PyObject *)__pyx_v_self));
   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
@@ -7718,12 +8330,21 @@ static int __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(struct __p
   __Pyx_GIVEREF(__pyx_t_4);
   __pyx_t_3 = 0;
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
+  /* "pysam/TabProxies.pyx":584
+ *     map_key2field = {}
+ * 
+ *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
+ *         '''set attribute.'''
+ *         cdef int idx
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -7739,6 +8360,14 @@ static int __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy___setattr__(struct __p
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":592
+ *         TupleProxy.__setitem__(self, idx, str(value) )
+ * 
+ *     def __getattr__(self, key ):             # <<<<<<<<<<<<<<
+ *         cdef int idx
+ *         idx, f = self.map_key2field[key]
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_15NamedTupleProxy_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_15NamedTupleProxy_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
@@ -7746,18 +8375,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_15NamedTupleProxy_3__getattr__(PyO
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_15NamedTupleProxy_2__getattr__(((struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":583
- *         TupleProxy.__setitem__(self, idx, str(value) )
- * 
- *     def __getattr__(self, key ):             # <<<<<<<<<<<<<<
- *         cdef int idx
- *         idx, f = self.map_key2field[key]
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_15NamedTupleProxy_2__getattr__(struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy *__pyx_v_self, PyObject *__pyx_v_key) {
   int __pyx_v_idx;
   PyObject *__pyx_v_f = NULL;
@@ -7775,16 +8398,16 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_15NamedTupleProxy_2__getattr__(str
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__getattr__", 0);
 
-  /* "pysam/TabProxies.pyx":585
+  /* "pysam/TabProxies.pyx":594
  *     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(((PyObject *)__pyx_v_self), __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __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 = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
@@ -7797,7 +8420,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_15NamedTupleProxy_2__getattr__(str
     if (unlikely(size != 2)) {
       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     #if CYTHON_COMPILING_IN_CPYTHON
     if (likely(PyTuple_CheckExact(sequence))) {
@@ -7810,16 +8433,15 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_15NamedTupleProxy_2__getattr__(str
     __Pyx_INCREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_t_3);
     #else
-    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     #endif
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  } else
-  {
+  } else {
     Py_ssize_t index = -1;
-    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
@@ -7827,7 +8449,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_15NamedTupleProxy_2__getattr__(str
     __Pyx_GOTREF(__pyx_t_1);
     index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
     __Pyx_GOTREF(__pyx_t_3);
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_5 = NULL;
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     goto __pyx_L4_unpacking_done;
@@ -7835,73 +8457,78 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_15NamedTupleProxy_2__getattr__(str
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_L4_unpacking_done:;
   }
-  __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 = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_idx = __pyx_t_6;
   __pyx_v_f = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "pysam/TabProxies.pyx":586
+  /* "pysam/TabProxies.pyx":595
  *         cdef int idx
  *         idx, f = self.map_key2field[key]
  *         if self.nfields < idx:             # <<<<<<<<<<<<<<
  *             raise KeyError( "field %s not set" % key )
  *         return f( self.fields[idx] )
  */
-  __pyx_t_7 = (__pyx_v_self->__pyx_base.nfields < __pyx_v_idx);
+  __pyx_t_7 = ((__pyx_v_self->__pyx_base.nfields < __pyx_v_idx) != 0);
   if (__pyx_t_7) {
 
-    /* "pysam/TabProxies.pyx":587
+    /* "pysam/TabProxies.pyx":596
  *         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_45), __pyx_v_key); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_field_s_not_set, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __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 = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_2 = 0;
-    __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 = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L5:;
 
-  /* "pysam/TabProxies.pyx":588
+  /* "pysam/TabProxies.pyx":597
  *         if self.nfields < idx:
  *             raise KeyError( "field %s not set" % key )
  *         return f( self.fields[idx] )             # <<<<<<<<<<<<<<
  * 
- * cdef class BedProxy( NamedTupleProxy ):
+ * 
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[__pyx_v_idx])); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[__pyx_v_idx])); 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(1); 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, ((PyObject *)__pyx_t_2));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  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_v_f, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_f, __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_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":592
+ *         TupleProxy.__setitem__(self, idx, str(value) )
+ * 
+ *     def __getattr__(self, key ):             # <<<<<<<<<<<<<<
+ *         cdef int idx
+ *         idx, f = self.map_key2field[key]
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -7916,7 +8543,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_15NamedTupleProxy_2__getattr__(str
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":609
+/* "pysam/TabProxies.pyx":619
  *         'blockStarts': (11, bytes), }
  * 
  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -7929,7 +8556,7 @@ static int __pyx_f_5pysam_10TabProxies_8BedProxy_getMaxFields(CYTHON_UNUSED stru
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("getMaxFields", 0);
 
-  /* "pysam/TabProxies.pyx":611
+  /* "pysam/TabProxies.pyx":621
  *     cdef int getMaxFields( self, size_t nbytes ):
  *         '''return max number of fields.'''
  *         return 12             # <<<<<<<<<<<<<<
@@ -7939,13 +8566,21 @@ static int __pyx_f_5pysam_10TabProxies_8BedProxy_getMaxFields(CYTHON_UNUSED stru
   __pyx_r = 12;
   goto __pyx_L0;
 
-  __pyx_r = 0;
+  /* "pysam/TabProxies.pyx":619
+ *         'blockStarts': (11, bytes), }
+ * 
+ *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''return max number of fields.'''
+ *         return 12
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":613
+/* "pysam/TabProxies.pyx":623
  *         return 12
  * 
  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -7964,44 +8599,42 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8BedProxy_update(struct __pyx_obj_5
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("update", 0);
 
-  /* "pysam/TabProxies.pyx":618
+  /* "pysam/TabProxies.pyx":628
  *         nbytes does not include the terminal '\0'.
  *         '''
  *         TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
  * 
  *         if self.nfields < 3:
  */
-  __pyx_t_1 = __pyx_vtabptr_5pysam_10TabProxies_TupleProxy->update(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_vtabptr_5pysam_10TabProxies_TupleProxy->update(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":620
+  /* "pysam/TabProxies.pyx":630
  *         TupleProxy.update( self, buffer, nbytes )
  * 
  *         if self.nfields < 3:             # <<<<<<<<<<<<<<
  *             raise ValueError( "bed format requires at least three columns" )
  * 
  */
-  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.nfields < 3);
+  __pyx_t_2 = ((__pyx_v_self->__pyx_base.__pyx_base.nfields < 3) != 0);
   if (__pyx_t_2) {
 
-    /* "pysam/TabProxies.pyx":621
+    /* "pysam/TabProxies.pyx":631
  * 
  *         if self.nfields < 3:
  *             raise ValueError( "bed format requires at least three columns" )             # <<<<<<<<<<<<<<
  * 
  *         # determines bed format
  */
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":624
+  /* "pysam/TabProxies.pyx":634
  * 
  *         # determines bed format
  *         self.bedfields = self.nfields             # <<<<<<<<<<<<<<
@@ -8011,7 +8644,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8BedProxy_update(struct __pyx_obj_5
   __pyx_t_3 = __pyx_v_self->__pyx_base.__pyx_base.nfields;
   __pyx_v_self->bedfields = __pyx_t_3;
 
-  /* "pysam/TabProxies.pyx":627
+  /* "pysam/TabProxies.pyx":637
  * 
  *         # do automatic conversion
  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
@@ -8020,7 +8653,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8BedProxy_update(struct __pyx_obj_5
  */
   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]);
 
-  /* "pysam/TabProxies.pyx":628
+  /* "pysam/TabProxies.pyx":638
  *         # do automatic conversion
  *         self.contig = self.fields[0]
  *         self.start = atoi( self.fields[1] )             # <<<<<<<<<<<<<<
@@ -8029,7 +8662,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8BedProxy_update(struct __pyx_obj_5
  */
   __pyx_v_self->start = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1]));
 
-  /* "pysam/TabProxies.pyx":629
+  /* "pysam/TabProxies.pyx":639
  *         self.contig = self.fields[0]
  *         self.start = atoi( self.fields[1] )
  *         self.end = atoi( self.fields[2] )             # <<<<<<<<<<<<<<
@@ -8038,6 +8671,15 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8BedProxy_update(struct __pyx_obj_5
  */
   __pyx_v_self->end = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[2]));
 
+  /* "pysam/TabProxies.pyx":623
+ *         return 12
+ * 
+ *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''update internal data.
+ * 
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -8050,6 +8692,14 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8BedProxy_update(struct __pyx_obj_5
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":648
+ *     #    def __get__( self ): return self.end
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ * 
+ *         cdef int save_fields = self.nfields
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8BedProxy_1__str__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8BedProxy_1__str__(PyObject *__pyx_v_self) {
@@ -8057,18 +8707,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8BedProxy_1__str__(PyObject *__pyx
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8BedProxy___str__(((struct __pyx_obj_5pysam_10TabProxies_BedProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":638
- *     #    def __get__( self ): return self.end
- * 
- *     def __str__(self):             # <<<<<<<<<<<<<<
- * 
- *         cdef int save_fields = self.nfields
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8BedProxy___str__(struct __pyx_obj_5pysam_10TabProxies_BedProxy *__pyx_v_self) {
   int __pyx_v_save_fields;
   PyObject *__pyx_v_retval = NULL;
@@ -8083,7 +8727,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8BedProxy___str__(struct __pyx_obj
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__str__", 0);
 
-  /* "pysam/TabProxies.pyx":640
+  /* "pysam/TabProxies.pyx":650
  *     def __str__(self):
  * 
  *         cdef int save_fields = self.nfields             # <<<<<<<<<<<<<<
@@ -8093,7 +8737,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8BedProxy___str__(struct __pyx_obj
   __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.nfields;
   __pyx_v_save_fields = __pyx_t_1;
 
-  /* "pysam/TabProxies.pyx":642
+  /* "pysam/TabProxies.pyx":652
  *         cdef int save_fields = self.nfields
  *         # ensure fields to use correct format
  *         self.nfields = self.bedfields             # <<<<<<<<<<<<<<
@@ -8103,28 +8747,28 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8BedProxy___str__(struct __pyx_obj
   __pyx_t_1 = __pyx_v_self->bedfields;
   __pyx_v_self->__pyx_base.__pyx_base.nfields = __pyx_t_1;
 
-  /* "pysam/TabProxies.pyx":643
+  /* "pysam/TabProxies.pyx":653
  *         # ensure fields to use correct format
  *         self.nfields = self.bedfields
  *         retval = TupleProxy.__str__( self )             # <<<<<<<<<<<<<<
  *         self.nfields = save_fields
  *         return retval
  */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __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 = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(((PyObject *)__pyx_v_self));
   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-  __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 = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __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_3)); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __pyx_v_retval = __pyx_t_4;
   __pyx_t_4 = 0;
 
-  /* "pysam/TabProxies.pyx":644
+  /* "pysam/TabProxies.pyx":654
  *         self.nfields = self.bedfields
  *         retval = TupleProxy.__str__( self )
  *         self.nfields = save_fields             # <<<<<<<<<<<<<<
@@ -8133,7 +8777,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8BedProxy___str__(struct __pyx_obj
  */
   __pyx_v_self->__pyx_base.__pyx_base.nfields = __pyx_v_save_fields;
 
-  /* "pysam/TabProxies.pyx":645
+  /* "pysam/TabProxies.pyx":655
  *         retval = TupleProxy.__str__( self )
  *         self.nfields = save_fields
  *         return retval             # <<<<<<<<<<<<<<
@@ -8145,8 +8789,15 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8BedProxy___str__(struct __pyx_obj
   __pyx_r = __pyx_v_retval;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":648
+ *     #    def __get__( self ): return self.end
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ * 
+ *         cdef int save_fields = self.nfields
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
@@ -8160,6 +8811,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8BedProxy___str__(struct __pyx_obj
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":657
+ *         return retval
+ * 
+ *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
+ *         '''set attribute.'''
+ *         if key == "start": self.start = value
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8BedProxy_3__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8BedProxy_2__setattr__[] = "set attribute.";
@@ -8171,26 +8830,20 @@ static int __pyx_pw_5pysam_10TabProxies_8BedProxy_3__setattr__(PyObject *__pyx_v
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8BedProxy_2__setattr__(((struct __pyx_obj_5pysam_10TabProxies_BedProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":647
- *         return retval
- * 
- *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
- *         '''set attribute.'''
- *         if key == "start": self.start = value
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8BedProxy_2__setattr__(struct __pyx_obj_5pysam_10TabProxies_BedProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
   int __pyx_v_idx;
   CYTHON_UNUSED PyObject *__pyx_v_f = NULL;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  uint32_t __pyx_t_3;
+  int __pyx_t_1;
+  uint32_t __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
   PyObject *__pyx_t_6 = NULL;
@@ -8201,51 +8854,47 @@ static int __pyx_pf_5pysam_10TabProxies_8BedProxy_2__setattr__(struct __pyx_obj_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__setattr__", 0);
 
-  /* "pysam/TabProxies.pyx":649
+  /* "pysam/TabProxies.pyx":659
  *     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); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __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 = 649; __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 = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->start = __pyx_t_3;
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_start, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+    __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_2 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_self->start = __pyx_t_2;
     goto __pyx_L3;
   }
 
-  /* "pysam/TabProxies.pyx":650
+  /* "pysam/TabProxies.pyx":660
  *         '''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); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __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 = 650; __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 = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->end = __pyx_t_3;
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_end, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+    __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_2 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_self->end = __pyx_t_2;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":653
+  /* "pysam/TabProxies.pyx":663
  * 
  *         cdef int idx
  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
  *         TupleProxy._setindex(self, idx, str(value) )
  * 
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __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 = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); 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_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_key); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __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 ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
     PyObject* sequence = __pyx_t_4;
     #if CYTHON_COMPILING_IN_CPYTHON
@@ -8256,37 +8905,36 @@ static int __pyx_pf_5pysam_10TabProxies_8BedProxy_2__setattr__(struct __pyx_obj_
     if (unlikely(size != 2)) {
       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     #if CYTHON_COMPILING_IN_CPYTHON
     if (likely(PyTuple_CheckExact(sequence))) {
-      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
       __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
     } else {
-      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
       __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
     }
-    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_t_5);
     #else
-    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PySequence_ITEM(sequence, 0); 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_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     #endif
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  } else
-  {
+  } else {
     Py_ssize_t index = -1;
-    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
-    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
-    __Pyx_GOTREF(__pyx_t_1);
+    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_3);
     index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
     __Pyx_GOTREF(__pyx_t_5);
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_7 = NULL;
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     goto __pyx_L5_unpacking_done;
@@ -8294,55 +8942,64 @@ static int __pyx_pf_5pysam_10TabProxies_8BedProxy_2__setattr__(struct __pyx_obj_
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __pyx_t_7 = NULL;
     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_L5_unpacking_done:;
   }
-  __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __pyx_v_idx = __pyx_t_8;
   __pyx_v_f = __pyx_t_5;
   __pyx_t_5 = 0;
 
-  /* "pysam/TabProxies.pyx":654
+  /* "pysam/TabProxies.pyx":664
  *         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_5pysam_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_n_s_setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __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 = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __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 = 654; __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 = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_v_value);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
-  __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
-  __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 = 654; __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(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
   __Pyx_GIVEREF(__pyx_t_5);
-  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_6);
   __Pyx_GIVEREF(__pyx_t_6);
   __pyx_t_5 = 0;
   __pyx_t_6 = 0;
-  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
   __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;
   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
+  /* "pysam/TabProxies.pyx":657
+ *         return retval
+ * 
+ *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
+ *         '''set attribute.'''
+ *         if key == "start": self.start = value
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_5);
   __Pyx_XDECREF(__pyx_t_6);
@@ -8354,6 +9011,14 @@ static int __pyx_pf_5pysam_10TabProxies_8BedProxy_2__setattr__(struct __pyx_obj_
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":682
+ *         'format' : (8, bytes) }
+ * 
+ *     def __cinit__(self ):             # <<<<<<<<<<<<<<
+ *         # automatically calls TupleProxy.__cinit__
+ *         # start indexed access at genotypes
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8VCFProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_pw_5pysam_10TabProxies_8VCFProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
@@ -8364,24 +9029,18 @@ static int __pyx_pw_5pysam_10TabProxies_8VCFProxy_1__cinit__(PyObject *__pyx_v_s
     __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;
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8VCFProxy___cinit__(((struct __pyx_obj_5pysam_10TabProxies_VCFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":672
- *         'format' : (8, bytes) }
- * 
- *     def __cinit__(self ):             # <<<<<<<<<<<<<<
- *         # automatically calls TupleProxy.__cinit__
- *         # start indexed access at genotypes
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8VCFProxy___cinit__(struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_self) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__cinit__", 0);
 
-  /* "pysam/TabProxies.pyx":675
+  /* "pysam/TabProxies.pyx":685
  *         # automatically calls TupleProxy.__cinit__
  *         # start indexed access at genotypes
  *         self.offset = 9             # <<<<<<<<<<<<<<
@@ -8390,12 +9049,21 @@ static int __pyx_pf_5pysam_10TabProxies_8VCFProxy___cinit__(struct __pyx_obj_5py
  */
   __pyx_v_self->__pyx_base.__pyx_base.offset = 9;
 
+  /* "pysam/TabProxies.pyx":682
+ *         'format' : (8, bytes) }
+ * 
+ *     def __cinit__(self ):             # <<<<<<<<<<<<<<
+ *         # automatically calls TupleProxy.__cinit__
+ *         # start indexed access at genotypes
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":677
+/* "pysam/TabProxies.pyx":687
  *         self.offset = 9
  * 
  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
@@ -8412,18 +9080,18 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8VCFProxy_update(struct __pyx_obj_5
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("update", 0);
 
-  /* "pysam/TabProxies.pyx":682
+  /* "pysam/TabProxies.pyx":692
  *         nbytes does not include the terminal '\0'.
  *         '''
  *         TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
  * 
  *         self.contig = self.fields[0]
  */
-  __pyx_t_1 = __pyx_vtabptr_5pysam_10TabProxies_TupleProxy->update(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_vtabptr_5pysam_10TabProxies_TupleProxy->update(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":684
+  /* "pysam/TabProxies.pyx":694
  *         TupleProxy.update( self, buffer, nbytes )
  * 
  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
@@ -8432,7 +9100,7 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8VCFProxy_update(struct __pyx_obj_5
  */
   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]);
 
-  /* "pysam/TabProxies.pyx":686
+  /* "pysam/TabProxies.pyx":696
  *         self.contig = self.fields[0]
  *         # vcf counts from 1 - correct here
  *         self.pos = atoi( self.fields[1] ) - 1             # <<<<<<<<<<<<<<
@@ -8441,8 +9109,17 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8VCFProxy_update(struct __pyx_obj_5
  */
   __pyx_v_self->pos = (atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1])) - 1);
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/TabProxies.pyx":687
+ *         self.offset = 9
+ * 
+ *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *         '''update internal data.
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.TabProxies.VCFProxy.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -8453,6 +9130,14 @@ static PyObject *__pyx_f_5pysam_10TabProxies_8VCFProxy_update(struct __pyx_obj_5
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":698
+ *         self.pos = atoi( self.fields[1] ) - 1
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         '''return number of genotype fields.'''
+ *         return max(0, self.nfields - 9)
+ */
+
 /* Python wrapper */
 static Py_ssize_t __pyx_pw_5pysam_10TabProxies_8VCFProxy_3__len__(PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8VCFProxy_2__len__[] = "return number of genotype fields.";
@@ -8464,18 +9149,12 @@ static Py_ssize_t __pyx_pw_5pysam_10TabProxies_8VCFProxy_3__len__(PyObject *__py
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8VCFProxy_2__len__(((struct __pyx_obj_5pysam_10TabProxies_VCFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":688
- *         self.pos = atoi( self.fields[1] ) - 1
- * 
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         '''return number of genotype fields.'''
- *         return max(0, self.nfields - 9)
- */
-
 static Py_ssize_t __pyx_pf_5pysam_10TabProxies_8VCFProxy_2__len__(struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_self) {
   Py_ssize_t __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -8484,7 +9163,7 @@ static Py_ssize_t __pyx_pf_5pysam_10TabProxies_8VCFProxy_2__len__(struct __pyx_o
   long __pyx_t_3;
   __Pyx_RefNannySetupContext("__len__", 0);
 
-  /* "pysam/TabProxies.pyx":690
+  /* "pysam/TabProxies.pyx":700
  *     def __len__(self):
  *         '''return number of genotype fields.'''
  *         return max(0, self.nfields - 9)             # <<<<<<<<<<<<<<
@@ -8493,7 +9172,7 @@ static Py_ssize_t __pyx_pf_5pysam_10TabProxies_8VCFProxy_2__len__(struct __pyx_o
  */
   __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base.nfields - 9);
   __pyx_t_2 = 0;
-  if ((__pyx_t_1 > __pyx_t_2)) {
+  if (((__pyx_t_1 > __pyx_t_2) != 0)) {
     __pyx_t_3 = __pyx_t_1;
   } else {
     __pyx_t_3 = __pyx_t_2;
@@ -8501,12 +9180,28 @@ static Py_ssize_t __pyx_pf_5pysam_10TabProxies_8VCFProxy_2__len__(struct __pyx_o
   __pyx_r = __pyx_t_3;
   goto __pyx_L0;
 
-  __pyx_r = 0;
+  /* "pysam/TabProxies.pyx":698
+ *         self.pos = atoi( self.fields[1] ) - 1
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         '''return number of genotype fields.'''
+ *         return max(0, self.nfields - 9)
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":704
+ *     property pos:
+ *        '''feature end (in 0-based open/closed coordinates).'''
+ *        def __get__( self ):             # <<<<<<<<<<<<<<
+ *            return self.pos
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_10TabProxies_8VCFProxy_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_10TabProxies_8VCFProxy_3pos_1__get__(PyObject *__pyx_v_self) {
@@ -8514,18 +9209,12 @@ static PyObject *__pyx_pw_5pysam_10TabProxies_8VCFProxy_3pos_1__get__(PyObject *
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8VCFProxy_3pos___get__(((struct __pyx_obj_5pysam_10TabProxies_VCFProxy *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":694
- *     property pos:
- *        '''feature end (in 0-based open/closed coordinates).'''
- *        def __get__( self ):             # <<<<<<<<<<<<<<
- *            return self.pos
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_10TabProxies_8VCFProxy_3pos___get__(struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -8535,7 +9224,7 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8VCFProxy_3pos___get__(struct __py
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
 
-  /* "pysam/TabProxies.pyx":695
+  /* "pysam/TabProxies.pyx":705
  *        '''feature end (in 0-based open/closed coordinates).'''
  *        def __get__( self ):
  *            return self.pos             # <<<<<<<<<<<<<<
@@ -8543,14 +9232,21 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8VCFProxy_3pos___get__(struct __py
  *     def __setattr__(self, key, value ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __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;
+  /* "pysam/TabProxies.pyx":704
+ *     property pos:
+ *        '''feature end (in 0-based open/closed coordinates).'''
+ *        def __get__( self ):             # <<<<<<<<<<<<<<
+ *            return self.pos
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.TabProxies.VCFProxy.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -8561,6 +9257,14 @@ static PyObject *__pyx_pf_5pysam_10TabProxies_8VCFProxy_3pos___get__(struct __py
   return __pyx_r;
 }
 
+/* "pysam/TabProxies.pyx":707
+ *            return self.pos
+ * 
+ *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
+ *         '''set attribute.'''
+ *         if key == "pos":
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_10TabProxies_8VCFProxy_5__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
 static char __pyx_doc_5pysam_10TabProxies_8VCFProxy_4__setattr__[] = "set attribute.";
@@ -8572,26 +9276,20 @@ static int __pyx_pw_5pysam_10TabProxies_8VCFProxy_5__setattr__(PyObject *__pyx_v
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_10TabProxies_8VCFProxy_4__setattr__(((struct __pyx_obj_5pysam_10TabProxies_VCFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/TabProxies.pyx":697
- *            return self.pos
- * 
- *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
- *         '''set attribute.'''
- *         if key == "pos":
- */
-
 static int __pyx_pf_5pysam_10TabProxies_8VCFProxy_4__setattr__(struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
   int __pyx_v_idx;
   CYTHON_UNUSED PyObject *__pyx_v_f = NULL;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  uint32_t __pyx_t_3;
+  int __pyx_t_1;
+  uint32_t __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
   PyObject *__pyx_t_6 = NULL;
@@ -8603,56 +9301,53 @@ static int __pyx_pf_5pysam_10TabProxies_8VCFProxy_4__setattr__(struct __pyx_obj_
   __Pyx_RefNannySetupContext("__setattr__", 0);
   __Pyx_INCREF(__pyx_v_value);
 
-  /* "pysam/TabProxies.pyx":699
+  /* "pysam/TabProxies.pyx":709
  *     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); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __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 = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_pos, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-    /* "pysam/TabProxies.pyx":700
+    /* "pysam/TabProxies.pyx":710
  *         '''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 = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->pos = __pyx_t_3;
+    __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_2 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_self->pos = __pyx_t_2;
 
-    /* "pysam/TabProxies.pyx":701
+    /* "pysam/TabProxies.pyx":711
  *         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 = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_v_value);
-    __pyx_v_value = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_value, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
+    __pyx_t_3 = 0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":704
+  /* "pysam/TabProxies.pyx":714
  * 
  *         cdef int idx
  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
  *         TupleProxy._setindex(self, idx, str(value) )
  * 
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __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 = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_key); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __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 ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
     PyObject* sequence = __pyx_t_4;
     #if CYTHON_COMPILING_IN_CPYTHON
@@ -8663,37 +9358,36 @@ static int __pyx_pf_5pysam_10TabProxies_8VCFProxy_4__setattr__(struct __pyx_obj_
     if (unlikely(size != 2)) {
       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     #if CYTHON_COMPILING_IN_CPYTHON
     if (likely(PyTuple_CheckExact(sequence))) {
-      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
       __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
     } else {
-      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
       __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
     }
-    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_t_5);
     #else
-    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     #endif
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  } else
-  {
+  } else {
     Py_ssize_t index = -1;
-    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
-    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
-    __Pyx_GOTREF(__pyx_t_1);
+    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_3);
     index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
     __Pyx_GOTREF(__pyx_t_5);
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_7 = NULL;
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     goto __pyx_L5_unpacking_done;
@@ -8701,54 +9395,63 @@ static int __pyx_pf_5pysam_10TabProxies_8VCFProxy_4__setattr__(struct __pyx_obj_
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __pyx_t_7 = NULL;
     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_L5_unpacking_done:;
   }
-  __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __pyx_v_idx = __pyx_t_8;
   __pyx_v_f = __pyx_t_5;
   __pyx_t_5 = 0;
 
-  /* "pysam/TabProxies.pyx":705
+  /* "pysam/TabProxies.pyx":715
  *         cdef int idx
  *         idx, f = self.map_key2field[key]
  *         TupleProxy._setindex(self, idx, str(value) )             # <<<<<<<<<<<<<<
  * 
  */
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_n_s_setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __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 = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __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 = 705; __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 = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_v_value);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
-  __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
-  __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 = 705; __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(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
   __Pyx_GIVEREF(__pyx_t_5);
-  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_6);
   __Pyx_GIVEREF(__pyx_t_6);
   __pyx_t_5 = 0;
   __pyx_t_6 = 0;
-  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
   __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;
   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
+  /* "pysam/TabProxies.pyx":707
+ *            return self.pos
+ * 
+ *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
+ *         '''set attribute.'''
+ *         if key == "pos":
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_5);
   __Pyx_XDECREF(__pyx_t_6);
@@ -8764,23 +9467,32 @@ static struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_vtable_5pysa
 
 static PyObject *__pyx_tp_new_5pysam_10TabProxies_TupleProxy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
   struct __pyx_obj_5pysam_10TabProxies_TupleProxy *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)o);
   p->__pyx_vtab = __pyx_vtabptr_5pysam_10TabProxies_TupleProxy;
-  if (__pyx_pw_5pysam_10TabProxies_10TupleProxy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0) {
+  if (unlikely(__pyx_pw_5pysam_10TabProxies_10TupleProxy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
     Py_DECREF(o); o = 0;
   }
   return o;
 }
 
 static void __pyx_tp_dealloc_5pysam_10TabProxies_TupleProxy(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
   {
     PyObject *etype, *eval, *etb;
     PyErr_Fetch(&etype, &eval, &etb);
     ++Py_REFCNT(o);
     __pyx_pw_5pysam_10TabProxies_10TupleProxy_3__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
     --Py_REFCNT(o);
     PyErr_Restore(etype, eval, etb);
   }
@@ -8800,7 +9512,7 @@ static int __pyx_mp_ass_subscript_5pysam_10TabProxies_TupleProxy(PyObject *o, Py
   }
   else {
     PyErr_Format(PyExc_NotImplementedError,
-      "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name);
+      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
     return -1;
   }
 }
@@ -8812,64 +9524,6 @@ static PyMethodDef __pyx_methods_5pysam_10TabProxies_TupleProxy[] = {
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_TupleProxy = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
 static PySequenceMethods __pyx_tp_as_sequence_TupleProxy = {
   __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__, /*sq_length*/
   0, /*sq_concat*/
@@ -8889,27 +9543,6 @@ static PyMappingMethods __pyx_tp_as_mapping_TupleProxy = {
   __pyx_mp_ass_subscript_5pysam_10TabProxies_TupleProxy, /*mp_ass_subscript*/
 };
 
-static PyBufferProcs __pyx_tp_as_buffer_TupleProxy = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
 static PyTypeObject __pyx_type_5pysam_10TabProxies_TupleProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("pysam.TabProxies.TupleProxy"), /*tp_name*/
@@ -8925,7 +9558,7 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_TupleProxy = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_TupleProxy, /*tp_as_number*/
+  0, /*tp_as_number*/
   &__pyx_tp_as_sequence_TupleProxy, /*tp_as_sequence*/
   &__pyx_tp_as_mapping_TupleProxy, /*tp_as_mapping*/
   0, /*tp_hash*/
@@ -8933,8 +9566,8 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_TupleProxy = {
   __pyx_pw_5pysam_10TabProxies_10TupleProxy_19__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_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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\n    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
@@ -8964,28 +9597,35 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_TupleProxy = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 static struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy __pyx_vtable_5pysam_10TabProxies_GTFProxy;
 
 static PyObject *__pyx_tp_new_5pysam_10TabProxies_GTFProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5pysam_10TabProxies_GTFProxy *p;
   PyObject *o = __pyx_tp_new_5pysam_10TabProxies_TupleProxy(t, a, k);
-  if (!o) return 0;
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)o);
   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy*)__pyx_vtabptr_5pysam_10TabProxies_GTFProxy;
-  if (__pyx_pw_5pysam_10TabProxies_8GTFProxy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0) {
+  if (unlikely(__pyx_pw_5pysam_10TabProxies_8GTFProxy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
     Py_DECREF(o); o = 0;
   }
   return o;
 }
 
 static void __pyx_tp_dealloc_5pysam_10TabProxies_GTFProxy(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
   {
     PyObject *etype, *eval, *etb;
     PyErr_Fetch(&etype, &eval, &etb);
     ++Py_REFCNT(o);
     __pyx_pw_5pysam_10TabProxies_8GTFProxy_3__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
     --Py_REFCNT(o);
     PyErr_Restore(etype, eval, etb);
   }
@@ -9145,76 +9785,18 @@ static PyMethodDef __pyx_methods_5pysam_10TabProxies_GTFProxy[] = {
 };
 
 static struct PyGetSetDef __pyx_getsets_5pysam_10TabProxies_GTFProxy[] = {
-  {(char *)"contig", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_contig, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_contig, __Pyx_DOCSTR(__pyx_k_48), 0},
-  {(char *)"source", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_source, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_source, __Pyx_DOCSTR(__pyx_k_49), 0},
-  {(char *)"feature", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_feature, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_feature, __Pyx_DOCSTR(__pyx_k_50), 0},
-  {(char *)"start", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_start, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_start, __Pyx_DOCSTR(__pyx_k_51), 0},
-  {(char *)"end", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_end, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_end, __Pyx_DOCSTR(__pyx_k_52), 0},
-  {(char *)"score", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_score, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_score, __Pyx_DOCSTR(__pyx_k_53), 0},
-  {(char *)"strand", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_strand, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_strand, __Pyx_DOCSTR(__pyx_k_54), 0},
-  {(char *)"frame", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_frame, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_frame, __Pyx_DOCSTR(__pyx_k_55), 0},
-  {(char *)"attributes", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_attributes, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_attributes, __Pyx_DOCSTR(__pyx_k_56), 0},
+  {(char *)"contig", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_contig, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_contig, __Pyx_DOCSTR(__pyx_k_contig_of_feature), 0},
+  {(char *)"source", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_source, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_source, __Pyx_DOCSTR(__pyx_k_feature_source), 0},
+  {(char *)"feature", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_feature, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_feature, __Pyx_DOCSTR(__pyx_k_feature_name), 0},
+  {(char *)"start", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_start, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_start, __Pyx_DOCSTR(__pyx_k_feature_start_in_0_based_open_cl), 0},
+  {(char *)"end", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_end, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_end, __Pyx_DOCSTR(__pyx_k_feature_end_in_0_based_open_clos), 0},
+  {(char *)"score", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_score, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_score, __Pyx_DOCSTR(__pyx_k_feature_score), 0},
+  {(char *)"strand", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_strand, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_strand, __Pyx_DOCSTR(__pyx_k_feature_strand), 0},
+  {(char *)"frame", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_frame, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_frame, __Pyx_DOCSTR(__pyx_k_feature_frame), 0},
+  {(char *)"attributes", __pyx_getprop_5pysam_10TabProxies_8GTFProxy_attributes, __pyx_setprop_5pysam_10TabProxies_8GTFProxy_attributes, __Pyx_DOCSTR(__pyx_k_feature_attributes_as_a_string), 0},
   {0, 0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_GTFProxy = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
 static PySequenceMethods __pyx_tp_as_sequence_GTFProxy = {
   #if CYTHON_COMPILING_IN_PYPY
   __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__, /*sq_length*/
@@ -9242,27 +9824,6 @@ static PyMappingMethods __pyx_tp_as_mapping_GTFProxy = {
   0, /*mp_ass_subscript*/
 };
 
-static PyBufferProcs __pyx_tp_as_buffer_GTFProxy = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
 static PyTypeObject __pyx_type_5pysam_10TabProxies_GTFProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("pysam.TabProxies.GTFProxy"), /*tp_name*/
@@ -9278,7 +9839,7 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_GTFProxy = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_GTFProxy, /*tp_as_number*/
+  0, /*tp_as_number*/
   &__pyx_tp_as_sequence_GTFProxy, /*tp_as_sequence*/
   &__pyx_tp_as_mapping_GTFProxy, /*tp_as_mapping*/
   0, /*tp_hash*/
@@ -9286,8 +9847,8 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_GTFProxy = {
   __pyx_pw_5pysam_10TabProxies_8GTFProxy_9__str__, /*tp_str*/
   __pyx_tp_getattro_5pysam_10TabProxies_GTFProxy, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_GTFProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
@@ -9325,13 +9886,16 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_GTFProxy = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 static struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_vtable_5pysam_10TabProxies_NamedTupleProxy;
 
 static PyObject *__pyx_tp_new_5pysam_10TabProxies_NamedTupleProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy *p;
   PyObject *o = __pyx_tp_new_5pysam_10TabProxies_TupleProxy(t, a, k);
-  if (!o) return 0;
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy *)o);
   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy*)__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy;
   return o;
@@ -9362,116 +9926,6 @@ static PyMethodDef __pyx_methods_5pysam_10TabProxies_NamedTupleProxy[] = {
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_NamedTupleProxy = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_NamedTupleProxy = {
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__, /*sq_length*/
-  #else
-  0, /*sq_length*/
-  #endif
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_NamedTupleProxy = {
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__, /*mp_length*/
-  #else
-  0, /*mp_length*/
-  #endif
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_10TabProxies_10TupleProxy_7__getitem__, /*mp_subscript*/
-  #else
-  0, /*mp_subscript*/
-  #endif
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_NamedTupleProxy = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
 static PyTypeObject __pyx_type_5pysam_10TabProxies_NamedTupleProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("pysam.TabProxies.NamedTupleProxy"), /*tp_name*/
@@ -9487,9 +9941,9 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_NamedTupleProxy = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_NamedTupleProxy, /*tp_as_number*/
-  &__pyx_tp_as_sequence_NamedTupleProxy, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_NamedTupleProxy, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   #if CYTHON_COMPILING_IN_PYPY
@@ -9499,8 +9953,8 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_NamedTupleProxy = {
   #endif
   __pyx_tp_getattro_5pysam_10TabProxies_NamedTupleProxy, /*tp_getattro*/
   __pyx_tp_setattro_5pysam_10TabProxies_NamedTupleProxy, /*tp_setattro*/
-  &__pyx_tp_as_buffer_NamedTupleProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
   0, /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
@@ -9538,13 +9992,16 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_NamedTupleProxy = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 static struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy __pyx_vtable_5pysam_10TabProxies_BedProxy;
 
 static PyObject *__pyx_tp_new_5pysam_10TabProxies_BedProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5pysam_10TabProxies_BedProxy *p;
-  PyObject *o = __pyx_tp_new_5pysam_10TabProxies_TupleProxy(t, a, k);
-  if (!o) return 0;
+  PyObject *o = __pyx_tp_new_5pysam_10TabProxies_NamedTupleProxy(t, a, k);
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5pysam_10TabProxies_BedProxy *)o);
   p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy*)__pyx_vtabptr_5pysam_10TabProxies_BedProxy;
   return o;
@@ -9565,116 +10022,6 @@ static PyMethodDef __pyx_methods_5pysam_10TabProxies_BedProxy[] = {
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_BedProxy = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_BedProxy = {
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__, /*sq_length*/
-  #else
-  0, /*sq_length*/
-  #endif
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_BedProxy = {
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_10TabProxies_10TupleProxy_13__len__, /*mp_length*/
-  #else
-  0, /*mp_length*/
-  #endif
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_10TabProxies_10TupleProxy_7__getitem__, /*mp_subscript*/
-  #else
-  0, /*mp_subscript*/
-  #endif
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_BedProxy = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
 static PyTypeObject __pyx_type_5pysam_10TabProxies_BedProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("pysam.TabProxies.BedProxy"), /*tp_name*/
@@ -9690,17 +10037,17 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_BedProxy = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_BedProxy, /*tp_as_number*/
-  &__pyx_tp_as_sequence_BedProxy, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_BedProxy, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   __pyx_pw_5pysam_10TabProxies_8BedProxy_1__str__, /*tp_str*/
   0, /*tp_getattro*/
   __pyx_tp_setattro_5pysam_10TabProxies_BedProxy, /*tp_setattro*/
-  &__pyx_tp_as_buffer_BedProxy, /*tp_as_buffer*/
-  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_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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 BED entry for fast read-access.\n    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -9737,16 +10084,19 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_BedProxy = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 static struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy __pyx_vtable_5pysam_10TabProxies_VCFProxy;
 
 static PyObject *__pyx_tp_new_5pysam_10TabProxies_VCFProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5pysam_10TabProxies_VCFProxy *p;
-  PyObject *o = __pyx_tp_new_5pysam_10TabProxies_TupleProxy(t, a, k);
-  if (!o) return 0;
+  PyObject *o = __pyx_tp_new_5pysam_10TabProxies_NamedTupleProxy(t, a, k);
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5pysam_10TabProxies_VCFProxy *)o);
   p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy*)__pyx_vtabptr_5pysam_10TabProxies_VCFProxy;
-  if (__pyx_pw_5pysam_10TabProxies_8VCFProxy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0) {
+  if (unlikely(__pyx_pw_5pysam_10TabProxies_8VCFProxy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
     Py_DECREF(o); o = 0;
   }
   return o;
@@ -9772,68 +10122,10 @@ static PyMethodDef __pyx_methods_5pysam_10TabProxies_VCFProxy[] = {
 };
 
 static struct PyGetSetDef __pyx_getsets_5pysam_10TabProxies_VCFProxy[] = {
-  {(char *)"pos", __pyx_getprop_5pysam_10TabProxies_8VCFProxy_pos, 0, __Pyx_DOCSTR(__pyx_k_52), 0},
+  {(char *)"pos", __pyx_getprop_5pysam_10TabProxies_8VCFProxy_pos, 0, __Pyx_DOCSTR(__pyx_k_feature_end_in_0_based_open_clos), 0},
   {0, 0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_VCFProxy = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
 static PySequenceMethods __pyx_tp_as_sequence_VCFProxy = {
   __pyx_pw_5pysam_10TabProxies_8VCFProxy_3__len__, /*sq_length*/
   0, /*sq_concat*/
@@ -9857,27 +10149,6 @@ static PyMappingMethods __pyx_tp_as_mapping_VCFProxy = {
   0, /*mp_ass_subscript*/
 };
 
-static PyBufferProcs __pyx_tp_as_buffer_VCFProxy = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
 static PyTypeObject __pyx_type_5pysam_10TabProxies_VCFProxy = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("pysam.TabProxies.VCFProxy"), /*tp_name*/
@@ -9893,7 +10164,7 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_VCFProxy = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_VCFProxy, /*tp_as_number*/
+  0, /*tp_as_number*/
   &__pyx_tp_as_sequence_VCFProxy, /*tp_as_sequence*/
   &__pyx_tp_as_mapping_VCFProxy, /*tp_as_mapping*/
   0, /*tp_hash*/
@@ -9905,8 +10176,8 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_VCFProxy = {
   #endif
   0, /*tp_getattro*/
   __pyx_tp_setattro_5pysam_10TabProxies_VCFProxy, /*tp_setattro*/
-  &__pyx_tp_as_buffer_VCFProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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*/
@@ -9944,6 +10215,9 @@ static PyTypeObject __pyx_type_5pysam_10TabProxies_VCFProxy = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 
 static PyMethodDef __pyx_methods[] = {
@@ -9969,105 +10243,111 @@ static struct PyModuleDef __pyx_moduledef = {
 #endif
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
-  {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 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_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
-  {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
-  {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
-  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
-  {&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0, 0},
-  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
-  {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0},
-  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
-  {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0},
-  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
-  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
-  {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 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_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
-  {&__pyx_n_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 1},
-  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
-  {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
-  {&__pyx_n_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 1},
-  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 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__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__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
-  {&__pyx_n_s__StringTypes, __pyx_k__StringTypes, sizeof(__pyx_k__StringTypes), 0, 0, 1, 1},
-  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 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____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__asDict, __pyx_k__asDict, sizeof(__pyx_k__asDict), 0, 0, 1, 1},
-  {&__pyx_n_s__ascii, __pyx_k__ascii, sizeof(__pyx_k__ascii), 0, 0, 1, 1},
-  {&__pyx_n_s__attributes, __pyx_k__attributes, sizeof(__pyx_k__attributes), 0, 0, 1, 1},
-  {&__pyx_n_s__blockCount, __pyx_k__blockCount, sizeof(__pyx_k__blockCount), 0, 0, 1, 1},
-  {&__pyx_n_s__blockSizes, __pyx_k__blockSizes, sizeof(__pyx_k__blockSizes), 0, 0, 1, 1},
-  {&__pyx_n_s__blockStarts, __pyx_k__blockStarts, sizeof(__pyx_k__blockStarts), 0, 0, 1, 1},
-  {&__pyx_n_s__contig, __pyx_k__contig, sizeof(__pyx_k__contig), 0, 0, 1, 1},
-  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
-  {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
-  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
-  {&__pyx_n_s__feature, __pyx_k__feature, sizeof(__pyx_k__feature), 0, 0, 1, 1},
-  {&__pyx_n_s__filter, __pyx_k__filter, sizeof(__pyx_k__filter), 0, 0, 1, 1},
-  {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
-  {&__pyx_n_s__frame, __pyx_k__frame, sizeof(__pyx_k__frame), 0, 0, 1, 1},
-  {&__pyx_n_s__fromDict, __pyx_k__fromDict, sizeof(__pyx_k__fromDict), 0, 0, 1, 1},
-  {&__pyx_n_s__getdefaultencoding, __pyx_k__getdefaultencoding, sizeof(__pyx_k__getdefaultencoding), 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__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__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__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
-  {&__pyx_n_s__qual, __pyx_k__qual, sizeof(__pyx_k__qual), 0, 0, 1, 1},
-  {&__pyx_n_s__quote, __pyx_k__quote, sizeof(__pyx_k__quote), 0, 0, 1, 1},
-  {&__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__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},
-  {&__pyx_n_s__strand, __pyx_k__strand, sizeof(__pyx_k__strand), 0, 0, 1, 1},
-  {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1},
-  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
-  {&__pyx_n_s__thickEnd, __pyx_k__thickEnd, sizeof(__pyx_k__thickEnd), 0, 0, 1, 1},
-  {&__pyx_n_s__thickStart, __pyx_k__thickStart, sizeof(__pyx_k__thickStart), 0, 0, 1, 1},
-  {&__pyx_n_s__toDot, __pyx_k__toDot, sizeof(__pyx_k__toDot), 0, 0, 1, 1},
-  {&__pyx_n_s__types, __pyx_k__types, sizeof(__pyx_k__types), 0, 0, 1, 1},
-  {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
-  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
-  {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1},
+  {&__pyx_kp_u_Argument_must_be_string_bytes_or, __pyx_k_Argument_must_be_string_bytes_or, sizeof(__pyx_k_Argument_must_be_string_bytes_or), 0, 1, 0, 0},
+  {&__pyx_kp_u_Argument_must_be_string_or_unico, __pyx_k_Argument_must_be_string_or_unico, sizeof(__pyx_k_Argument_must_be_string_or_unico), 0, 1, 0, 0},
+  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
+  {&__pyx_kp_s_GTFProxy_has_no_attribute_s, __pyx_k_GTFProxy_has_no_attribute_s, sizeof(__pyx_k_GTFProxy_has_no_attribute_s), 0, 0, 1, 0},
+  {&__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_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
+  {&__pyx_n_s_StringTypes, __pyx_k_StringTypes, sizeof(__pyx_k_StringTypes), 0, 0, 1, 1},
+  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+  {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0},
+  {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
+  {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
+  {&__pyx_kp_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 0},
+  {&__pyx_kp_s__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 1, 0},
+  {&__pyx_kp_s__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 1, 0},
+  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
+  {&__pyx_kp_s__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 1, 0},
+  {&__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_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
+  {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
+  {&__pyx_kp_s_bed_format_requires_at_least_thr, __pyx_k_bed_format_requires_at_least_thr, sizeof(__pyx_k_bed_format_requires_at_least_thr), 0, 0, 1, 0},
+  {&__pyx_n_s_blockCount, __pyx_k_blockCount, sizeof(__pyx_k_blockCount), 0, 0, 1, 1},
+  {&__pyx_n_s_blockSizes, __pyx_k_blockSizes, sizeof(__pyx_k_blockSizes), 0, 0, 1, 1},
+  {&__pyx_n_s_blockStarts, __pyx_k_blockStarts, sizeof(__pyx_k_blockStarts), 0, 0, 1, 1},
+  {&__pyx_n_s_contig, __pyx_k_contig, sizeof(__pyx_k_contig), 0, 0, 1, 1},
+  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
+  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
+  {&__pyx_n_s_feature, __pyx_k_feature, sizeof(__pyx_k_feature), 0, 0, 1, 1},
+  {&__pyx_kp_s_field_s_not_set, __pyx_k_field_s_not_set, sizeof(__pyx_k_field_s_not_set), 0, 0, 1, 0},
+  {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
+  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
+  {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1},
+  {&__pyx_n_s_fromDict, __pyx_k_fromDict, sizeof(__pyx_k_fromDict), 0, 0, 1, 1},
+  {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
+  {&__pyx_n_s_getdefaultencoding, __pyx_k_getdefaultencoding, sizeof(__pyx_k_getdefaultencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_getfilesystemencoding, __pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_getindex, __pyx_k_getindex, sizeof(__pyx_k_getindex), 0, 0, 1, 1},
+  {&__pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_k_home_andreas_devel_pysam_pysam, sizeof(__pyx_k_home_andreas_devel_pysam_pysam), 0, 0, 1, 0},
+  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_kp_s_incomplete_line_at_s, __pyx_k_incomplete_line_at_s, sizeof(__pyx_k_incomplete_line_at_s), 0, 0, 1, 0},
+  {&__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_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_kp_s_length_of_buffer_i_number_of_byt, __pyx_k_length_of_buffer_i_number_of_byt, sizeof(__pyx_k_length_of_buffer_i_number_of_byt), 0, 0, 1, 0},
+  {&__pyx_kp_s_list_index_out_of_range, __pyx_k_list_index_out_of_range, sizeof(__pyx_k_list_index_out_of_range), 0, 0, 1, 0},
+  {&__pyx_kp_s_list_index_out_of_range_i_i, __pyx_k_list_index_out_of_range_i_i, sizeof(__pyx_k_list_index_out_of_range_i_i), 0, 0, 1, 0},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_kp_s_malformatted_entry_at_s, __pyx_k_malformatted_entry_at_s, sizeof(__pyx_k_malformatted_entry_at_s), 0, 0, 1, 0},
+  {&__pyx_n_s_map_key2field, __pyx_k_map_key2field, sizeof(__pyx_k_map_key2field), 0, 0, 1, 1},
+  {&__pyx_n_s_maxsplit, __pyx_k_maxsplit, sizeof(__pyx_k_maxsplit), 0, 0, 1, 1},
+  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+  {&__pyx_kp_s_out_of_memory, __pyx_k_out_of_memory, sizeof(__pyx_k_out_of_memory), 0, 0, 1, 0},
+  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
+  {&__pyx_n_s_pysam_TabProxies, __pyx_k_pysam_TabProxies, sizeof(__pyx_k_pysam_TabProxies), 0, 0, 1, 1},
+  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
+  {&__pyx_n_s_qual, __pyx_k_qual, sizeof(__pyx_k_qual), 0, 0, 1, 1},
+  {&__pyx_n_s_quote, __pyx_k_quote, sizeof(__pyx_k_quote), 0, 0, 1, 1},
+  {&__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_kp_s_row_too_large_more_than_i_fields, __pyx_k_row_too_large_more_than_i_fields, sizeof(__pyx_k_row_too_large_more_than_i_fields), 0, 0, 1, 0},
+  {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0},
+  {&__pyx_n_s_score, __pyx_k_score, sizeof(__pyx_k_score), 0, 0, 1, 1},
+  {&__pyx_n_s_setindex, __pyx_k_setindex, sizeof(__pyx_k_setindex), 0, 0, 1, 1},
+  {&__pyx_n_s_setitem, __pyx_k_setitem, sizeof(__pyx_k_setitem), 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},
+  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
+  {&__pyx_n_s_strand, __pyx_k_strand, sizeof(__pyx_k_strand), 0, 0, 1, 1},
+  {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
+  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
+  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_n_s_thickEnd, __pyx_k_thickEnd, sizeof(__pyx_k_thickEnd), 0, 0, 1, 1},
+  {&__pyx_n_s_thickStart, __pyx_k_thickStart, sizeof(__pyx_k_thickStart), 0, 0, 1, 1},
+  {&__pyx_n_s_toDot, __pyx_k_toDot, sizeof(__pyx_k_toDot), 0, 0, 1, 1},
+  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
+  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
+  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
   {0, 0, 0, 0, 0, 0, 0}
 };
 static int __Pyx_InitCachedBuiltins(void) {
-  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __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 = 230; __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 = 241; __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 = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __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 = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __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 = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #endif
-  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __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 = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -10077,296 +10357,299 @@ static int __Pyx_InitCachedConstants(void) {
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
 
-  /* "pysam/TabProxies.pyx":43
+  /* "pysam/TabProxies.pyx":45
  *         return s
  *     elif PyUnicode_Check(s):
  *         return s.encode('ascii')             # <<<<<<<<<<<<<<
  *     else:
  *         raise TypeError, u"Argument must be string, bytes or unicode."
  */
-  __pyx_k_tuple_2 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_2);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
+  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple_);
+  __Pyx_GIVEREF(__pyx_tuple_);
 
-  /* "pysam/TabProxies.pyx":63
+  /* "pysam/TabProxies.pyx":65
  *         return s
  *     elif PyBytes_Check(s):
  *         return s.decode('ascii')             # <<<<<<<<<<<<<<
  *     else:
  *         # assume unicode
  */
-  __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_4);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
+  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__2);
+  __Pyx_GIVEREF(__pyx_tuple__2);
 
-  /* "pysam/TabProxies.pyx":144
+  /* "pysam/TabProxies.pyx":146
  *         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_8 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_8);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
+  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_out_of_memory); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__4);
+  __Pyx_GIVEREF(__pyx_tuple__4);
 
-  /* "pysam/TabProxies.pyx":201
+  /* "pysam/TabProxies.pyx":205
  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
  *         if self.fields == NULL:
  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
  * 
  *         #################################
  */
-  __pyx_k_tuple_10 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_10);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
+  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_out_of_memory); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__5);
+  __Pyx_GIVEREF(__pyx_tuple__5);
 
-  /* "pysam/TabProxies.pyx":230
+  /* "pysam/TabProxies.pyx":234
  *         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_13 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_12)); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_13);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
+  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__6);
+  __Pyx_GIVEREF(__pyx_tuple__6);
 
-  /* "pysam/TabProxies.pyx":248
+  /* "pysam/TabProxies.pyx":252
  *         '''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_15 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_12)); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_15);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
+  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__7);
+  __Pyx_GIVEREF(__pyx_tuple__7);
 
-  /* "pysam/TabProxies.pyx":250
+  /* "pysam/TabProxies.pyx":254
  *         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_16 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_12)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_16);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
+  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__8);
+  __Pyx_GIVEREF(__pyx_tuple__8);
 
-  /* "pysam/TabProxies.pyx":266
+  /* "pysam/TabProxies.pyx":270
  *         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_17 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_17);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));
+  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_out_of_memory); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__9);
+  __Pyx_GIVEREF(__pyx_tuple__9);
 
-  /* "pysam/TabProxies.pyx":306
+  /* "pysam/TabProxies.pyx":310
  *             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_19 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_19);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
+  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_out_of_memory); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__11);
+  __Pyx_GIVEREF(__pyx_tuple__11);
 
-  /* "pysam/TabProxies.pyx":312
+  /* "pysam/TabProxies.pyx":316
  *             result = cpy[:self.nbytes]
  *             free(cpy)
  *             return result.decode('ascii')             # <<<<<<<<<<<<<<
  * 
  * def toDot( v ):
  */
-  __pyx_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_20);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));
+  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__12);
+  __Pyx_GIVEREF(__pyx_tuple__12);
 
-  /* "pysam/TabProxies.pyx":355
+  /* "pysam/TabProxies.pyx":359
  *     property contig:
  *        '''contig of feature.'''
  *        def __get__( self ): return self._getindex( 0 )             # <<<<<<<<<<<<<<
  *        def __set__( self, value ): self._setindex( 0, value )
  * 
  */
-  __pyx_k_tuple_23 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_23);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
+  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__14);
+  __Pyx_GIVEREF(__pyx_tuple__14);
 
-  /* "pysam/TabProxies.pyx":360
+  /* "pysam/TabProxies.pyx":364
  *     property source:
  *        '''feature source.'''
  *        def __get__( self ): return self._getindex( 1 )             # <<<<<<<<<<<<<<
  *        def __set__( self, value ): self._setindex( 1, value )
  * 
  */
-  __pyx_k_tuple_24 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_24);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));
+  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__15);
+  __Pyx_GIVEREF(__pyx_tuple__15);
 
-  /* "pysam/TabProxies.pyx":365
+  /* "pysam/TabProxies.pyx":369
  *     property feature:
  *        '''feature name.'''
  *        def __get__( self ): return self._getindex( 2 )             # <<<<<<<<<<<<<<
  *        def __set__( self, value ): self._setindex( 2, value )
  * 
  */
-  __pyx_k_tuple_25 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_25);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
+  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__16);
+  __Pyx_GIVEREF(__pyx_tuple__16);
 
-  /* "pysam/TabProxies.pyx":370
+  /* "pysam/TabProxies.pyx":374
  *     property start:
  *        '''feature start (in 0-based open/closed coordinates).'''
  *        def __get__( self ): return int( self._getindex( 3 )) - 1             # <<<<<<<<<<<<<<
  *        def __set__( self, value ): self._setindex( 3, str(value+1) )
  * 
  */
-  __pyx_k_tuple_26 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_26);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));
+  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__17);
+  __Pyx_GIVEREF(__pyx_tuple__17);
 
-  /* "pysam/TabProxies.pyx":375
+  /* "pysam/TabProxies.pyx":379
  *     property end:
  *        '''feature end (in 0-based open/closed coordinates).'''
  *        def __get__( self ): return int( self._getindex( 4 ) )             # <<<<<<<<<<<<<<
  *        def __set__( self, value ): self._setindex( 4, str(value) )
  * 
  */
-  __pyx_k_tuple_27 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_27);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
+  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__18);
+  __Pyx_GIVEREF(__pyx_tuple__18);
 
-  /* "pysam/TabProxies.pyx":381
+  /* "pysam/TabProxies.pyx":385
  *        '''feature score.'''
  *        def __get__( self ):
  *            v = self._getindex(5)             # <<<<<<<<<<<<<<
  *            if v == "" or v[0] == '.':
  *                return None
  */
-  __pyx_k_tuple_28 = PyTuple_Pack(1, __pyx_int_5); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_28);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
+  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_int_5); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__19);
+  __Pyx_GIVEREF(__pyx_tuple__19);
 
-  /* "pysam/TabProxies.pyx":391
+  /* "pysam/TabProxies.pyx":395
  *     property strand:
  *        '''feature strand.'''
  *        def __get__( self ): return self._getindex( 6 )             # <<<<<<<<<<<<<<
  *        def __set__( self, value ): self._setindex( 6, value )
  * 
  */
-  __pyx_k_tuple_29 = PyTuple_Pack(1, __pyx_int_6); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_29);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));
+  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_6); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__20);
+  __Pyx_GIVEREF(__pyx_tuple__20);
 
-  /* "pysam/TabProxies.pyx":396
+  /* "pysam/TabProxies.pyx":400
  *     property frame:
  *        '''feature frame.'''
  *        def __get__( self ): return self._getindex( 7 )             # <<<<<<<<<<<<<<
  *        def __set__( self, value ): self._setindex( 7, value )
  * 
  */
-  __pyx_k_tuple_30 = PyTuple_Pack(1, __pyx_int_7); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_30);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));
+  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_7); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__21);
+  __Pyx_GIVEREF(__pyx_tuple__21);
 
-  /* "pysam/TabProxies.pyx":405
+  /* "pysam/TabProxies.pyx":409
  *                return self._attributes
  *            else:
  *                return self._getindex( 8 )             # <<<<<<<<<<<<<<
  *        def __set__( self, value ):
  *            if self.hasOwnAttributes:
  */
-  __pyx_k_tuple_31 = PyTuple_Pack(1, __pyx_int_8); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_31);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
+  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_int_8); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__22);
+  __Pyx_GIVEREF(__pyx_tuple__22);
 
-  /* "pysam/TabProxies.pyx":428
+  /* "pysam/TabProxies.pyx":432
  * 
  *         # separate into fields
- *         fields = [ x.strip() for x in attributes.split(";")[:-1]]             # <<<<<<<<<<<<<<
+ *         fields = [x.strip() for x in attributes.split(";")[:-1]]             # <<<<<<<<<<<<<<
  * 
  *         result = {}
  */
-  __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_33);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
+  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__24);
+  __Pyx_GIVEREF(__pyx_tuple__24);
+  __pyx_slice__25 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__25);
+  __Pyx_GIVEREF(__pyx_slice__25);
 
-  /* "pysam/TabProxies.pyx":434
- *         for f in fields:
+  /* "pysam/TabProxies.pyx":446
  * 
- *             d = [ x.strip() for x in f.split(" ")]             # <<<<<<<<<<<<<<
- * 
- *             n,v = d[0], d[1]
+ *             if v[0] == '"' and v[-1] == '"':
+ *                 v = v[1:-1]             # <<<<<<<<<<<<<<
+ *             else:
+ *                 ## try to convert to a value
  */
-  __pyx_k_tuple_35 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_35);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));
+  __pyx_slice__28 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__28);
+  __Pyx_GIVEREF(__pyx_slice__28);
 
-  /* "pysam/TabProxies.pyx":476
+  /* "pysam/TabProxies.pyx":482
  *         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_40 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_40);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40));
+  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_out_of_memory); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__30);
+  __Pyx_GIVEREF(__pyx_tuple__30);
 
-  /* "pysam/TabProxies.pyx":514
+  /* "pysam/TabProxies.pyx":520
  *         '''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_42 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_42);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));
-  __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_43);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));
+  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__32);
+  __Pyx_GIVEREF(__pyx_tuple__32);
+  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s__26); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__33);
+  __Pyx_GIVEREF(__pyx_tuple__33);
 
-  /* "pysam/TabProxies.pyx":621
+  /* "pysam/TabProxies.pyx":631
  * 
  *         if self.nfields < 3:
  *             raise ValueError( "bed format requires at least three columns" )             # <<<<<<<<<<<<<<
  * 
  *         # determines bed format
  */
-  __pyx_k_tuple_47 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_46)); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_47);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
+  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_bed_format_requires_at_least_thr); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__34);
+  __Pyx_GIVEREF(__pyx_tuple__34);
 
-  /* "pysam/TabProxies.pyx":314
+  /* "pysam/TabProxies.pyx":318
  *             return result.decode('ascii')
  * 
  * def toDot( v ):             # <<<<<<<<<<<<<<
  *     '''convert value to '.' if None'''
  *     if v == None: return "."
  */
-  __pyx_k_tuple_58 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_58);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58));
-  __pyx_k_codeobj_59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_60, __pyx_n_s__toDot, 314, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_v); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__35);
+  __Pyx_GIVEREF(__pyx_tuple__35);
+  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_toDot, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/TabProxies.pyx":319
+  /* "pysam/TabProxies.pyx":323
  *     else: return str(v)
  * 
  * def quote( v ):             # <<<<<<<<<<<<<<
  *     '''return a quoted attribute.'''
  *     if type(v) in types.StringTypes:
  */
-  __pyx_k_tuple_62 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_62);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62));
-  __pyx_k_codeobj_63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_60, __pyx_n_s__quote, 319, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_v); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__37);
+  __Pyx_GIVEREF(__pyx_tuple__37);
+  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_quote, 323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_RefNannyFinishContext();
   return 0;
   __pyx_L1_error:;
@@ -10376,18 +10659,19 @@ static int __Pyx_InitCachedConstants(void) {
 
 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;};
+  __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;}
+  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -10404,6 +10688,10 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   __Pyx_RefNannyDeclarations
   #if CYTHON_REFNANNY
   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
@@ -10441,14 +10729,8 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __pyx_m = PyModule_Create(&__pyx_moduledef);
   #endif
   if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if PY_MAJOR_VERSION >= 3
-  {
-    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (!PyDict_GetItemString(modules, "pysam.TabProxies")) {
-      if (unlikely(PyDict_SetItemString(modules, "pysam.TabProxies", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-  }
-  #endif
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #if CYTHON_COMPILING_IN_PYPY
   Py_INCREF(__pyx_b);
@@ -10456,9 +10738,20 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   /*--- Initialize various global constants etc. ---*/
   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
   if (__pyx_module_is_main_pysam__TabProxies) {
-    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "pysam.TabProxies")) {
+      if (unlikely(PyDict_SetItemString(modules, "pysam.TabProxies", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
   }
+  #endif
   /*--- Builtin init code ---*/
   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Constants init code ---*/
@@ -10474,10 +10767,11 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __pyx_vtable_5pysam_10TabProxies_TupleProxy.present = (PyObject *(*)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_10TabProxies_10TupleProxy_present;
   __pyx_vtable_5pysam_10TabProxies_TupleProxy.copy = (PyObject *(*)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_10TabProxies_10TupleProxy_copy;
   __pyx_vtable_5pysam_10TabProxies_TupleProxy.update = (PyObject *(*)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_10TabProxies_10TupleProxy_update;
-  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_10TabProxies_TupleProxy.tp_print = 0;
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_TupleProxy, "__setitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_TupleProxy, "__setitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_5pysam_10TabProxies_10TupleProxy_10__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_5pysam_10TabProxies_10TupleProxy_10__setitem__.doc = __pyx_doc_5pysam_10TabProxies_10TupleProxy_10__setitem__;
@@ -10487,7 +10781,7 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   #endif
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_TupleProxy, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_TupleProxy, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_5pysam_10TabProxies_10TupleProxy_16__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_5pysam_10TabProxies_10TupleProxy_16__next__.doc = __pyx_doc_5pysam_10TabProxies_10TupleProxy_16__next__;
@@ -10497,7 +10791,7 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   #endif
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_TupleProxy, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_TupleProxy, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_5pysam_10TabProxies_10TupleProxy_18__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_5pysam_10TabProxies_10TupleProxy_18__str__.doc = __pyx_doc_5pysam_10TabProxies_10TupleProxy_18__str__;
@@ -10505,18 +10799,19 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
     }
   }
   #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_TupleProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "TupleProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_TupleProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "TupleProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_10TabProxies_TupleProxy = &__pyx_type_5pysam_10TabProxies_TupleProxy;
   __pyx_vtabptr_5pysam_10TabProxies_GTFProxy = &__pyx_vtable_5pysam_10TabProxies_GTFProxy;
   __pyx_vtable_5pysam_10TabProxies_GTFProxy.__pyx_base = *__pyx_vtabptr_5pysam_10TabProxies_TupleProxy;
   __pyx_vtable_5pysam_10TabProxies_GTFProxy.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, size_t))__pyx_f_5pysam_10TabProxies_8GTFProxy_getMaxFields;
   __pyx_vtable_5pysam_10TabProxies_GTFProxy.getAttributes = (char *(*)(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *))__pyx_f_5pysam_10TabProxies_8GTFProxy_getAttributes;
   __pyx_type_5pysam_10TabProxies_GTFProxy.tp_base = __pyx_ptype_5pysam_10TabProxies_TupleProxy;
-  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_10TabProxies_GTFProxy.tp_print = 0;
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_GTFProxy, "__getattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_GTFProxy, "__getattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_5pysam_10TabProxies_8GTFProxy_16__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_5pysam_10TabProxies_8GTFProxy_16__getattr__.doc = __pyx_doc_5pysam_10TabProxies_8GTFProxy_16__getattr__;
@@ -10524,16 +10819,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
     }
   }
   #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_GTFProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "GTFProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_GTFProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "GTFProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_10TabProxies_GTFProxy = &__pyx_type_5pysam_10TabProxies_GTFProxy;
   __pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy = &__pyx_vtable_5pysam_10TabProxies_NamedTupleProxy;
   __pyx_vtable_5pysam_10TabProxies_NamedTupleProxy.__pyx_base = *__pyx_vtabptr_5pysam_10TabProxies_TupleProxy;
   __pyx_type_5pysam_10TabProxies_NamedTupleProxy.tp_base = __pyx_ptype_5pysam_10TabProxies_TupleProxy;
-  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_10TabProxies_NamedTupleProxy.tp_print = 0;
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_NamedTupleProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_NamedTupleProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_5pysam_10TabProxies_15NamedTupleProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_5pysam_10TabProxies_15NamedTupleProxy___setattr__.doc = __pyx_doc_5pysam_10TabProxies_15NamedTupleProxy___setattr__;
@@ -10541,18 +10837,19 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
     }
   }
   #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_NamedTupleProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "NamedTupleProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_NamedTupleProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "NamedTupleProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_10TabProxies_NamedTupleProxy = &__pyx_type_5pysam_10TabProxies_NamedTupleProxy;
   __pyx_vtabptr_5pysam_10TabProxies_BedProxy = &__pyx_vtable_5pysam_10TabProxies_BedProxy;
   __pyx_vtable_5pysam_10TabProxies_BedProxy.__pyx_base = *__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy;
   __pyx_vtable_5pysam_10TabProxies_BedProxy.__pyx_base.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, size_t))__pyx_f_5pysam_10TabProxies_8BedProxy_getMaxFields;
   __pyx_vtable_5pysam_10TabProxies_BedProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_10TabProxies_8BedProxy_update;
   __pyx_type_5pysam_10TabProxies_BedProxy.tp_base = __pyx_ptype_5pysam_10TabProxies_NamedTupleProxy;
-  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_10TabProxies_BedProxy.tp_print = 0;
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_BedProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_BedProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_5pysam_10TabProxies_8BedProxy_2__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_5pysam_10TabProxies_8BedProxy_2__setattr__.doc = __pyx_doc_5pysam_10TabProxies_8BedProxy_2__setattr__;
@@ -10560,17 +10857,18 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
     }
   }
   #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_BedProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "BedProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_BedProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "BedProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_10TabProxies_BedProxy = &__pyx_type_5pysam_10TabProxies_BedProxy;
   __pyx_vtabptr_5pysam_10TabProxies_VCFProxy = &__pyx_vtable_5pysam_10TabProxies_VCFProxy;
   __pyx_vtable_5pysam_10TabProxies_VCFProxy.__pyx_base = *__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy;
   __pyx_vtable_5pysam_10TabProxies_VCFProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_10TabProxies_8VCFProxy_update;
   __pyx_type_5pysam_10TabProxies_VCFProxy.tp_base = __pyx_ptype_5pysam_10TabProxies_NamedTupleProxy;
-  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_10TabProxies_VCFProxy.tp_print = 0;
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_VCFProxy, "__len__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_VCFProxy, "__len__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_5pysam_10TabProxies_8VCFProxy_2__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_5pysam_10TabProxies_8VCFProxy_2__len__.doc = __pyx_doc_5pysam_10TabProxies_8VCFProxy_2__len__;
@@ -10580,7 +10878,7 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   #endif
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_VCFProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_10TabProxies_VCFProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
       __pyx_wrapperbase_5pysam_10TabProxies_8VCFProxy_4__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
       __pyx_wrapperbase_5pysam_10TabProxies_8VCFProxy_4__setattr__.doc = __pyx_doc_5pysam_10TabProxies_8VCFProxy_4__setattr__;
@@ -10588,8 +10886,8 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
     }
   }
   #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_VCFProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "VCFProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_5pysam_10TabProxies_VCFProxy.tp_dict, __pyx_vtabptr_5pysam_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "VCFProxy", (PyObject *)&__pyx_type_5pysam_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_10TabProxies_VCFProxy = &__pyx_type_5pysam_10TabProxies_VCFProxy;
   /*--- Type import code ---*/
   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
@@ -10606,42 +10904,60 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   /*--- Execution code ---*/
 
   /* "pysam/TabProxies.pyx":1
- * import types, sys             # <<<<<<<<<<<<<<
+ * import types             # <<<<<<<<<<<<<<
+ * import sys
+ * import string
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_types, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_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;
+
+  /* "pysam/TabProxies.pyx":2
+ * import types
+ * import sys             # <<<<<<<<<<<<<<
+ * import string
  * 
- * from cpython.version cimport PY_MAJOR_VERSION
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__types), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/TabProxies.pyx":3
+ * import types
+ * import sys
+ * import string             # <<<<<<<<<<<<<<
+ * 
+ * from cpython.version cimport PY_MAJOR_VERSION
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_string, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_string, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":15
+  /* "pysam/TabProxies.pyx":17
  * # filename encoding (copied from lxml.etree.pyx)
  * cdef str _FILENAME_ENCODING
  * _FILENAME_ENCODING = sys.getfilesystemencoding()             # <<<<<<<<<<<<<<
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = sys.getdefaultencoding()
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_57); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __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 = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected str, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
-  __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
+  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XGOTREF(__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING);
+  __Pyx_DECREF_SET(__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
   __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_v_5pysam_10TabProxies__FILENAME_ENCODING = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":16
+  /* "pysam/TabProxies.pyx":18
  * cdef str _FILENAME_ENCODING
  * _FILENAME_ENCODING = sys.getfilesystemencoding()
  * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
@@ -10649,114 +10965,114 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
  * if _FILENAME_ENCODING is None:
  */
   __pyx_t_3 = (__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING == ((PyObject*)Py_None));
-  if (__pyx_t_3) {
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
 
-    /* "pysam/TabProxies.pyx":17
+    /* "pysam/TabProxies.pyx":19
  * _FILENAME_ENCODING = sys.getfilesystemencoding()
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = sys.getdefaultencoding()             # <<<<<<<<<<<<<<
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = 'ascii'
  */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__getdefaultencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getdefaultencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __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 = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected str, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
-    __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
+    if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XGOTREF(__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
     __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_v_5pysam_10TabProxies__FILENAME_ENCODING = ((PyObject*)__pyx_t_1);
     __pyx_t_1 = 0;
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "pysam/TabProxies.pyx":18
+  /* "pysam/TabProxies.pyx":20
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = sys.getdefaultencoding()
  * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
  *     _FILENAME_ENCODING = 'ascii'
  * 
  */
-  __pyx_t_3 = (__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_4 = (__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_3 = (__pyx_t_4 != 0);
   if (__pyx_t_3) {
 
-    /* "pysam/TabProxies.pyx":19
+    /* "pysam/TabProxies.pyx":21
  *     _FILENAME_ENCODING = sys.getdefaultencoding()
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = 'ascii'             # <<<<<<<<<<<<<<
  * 
  * cdef bytes _my_encodeFilename(object filename):
  */
-    __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
-    __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
-    __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING));
-    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
-    __pyx_v_5pysam_10TabProxies__FILENAME_ENCODING = __pyx_n_s__ascii;
+    __Pyx_INCREF(__pyx_n_s_ascii);
+    __Pyx_XGOTREF(__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_10TabProxies__FILENAME_ENCODING, __pyx_n_s_ascii);
+    __Pyx_GIVEREF(__pyx_n_s_ascii);
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/TabProxies.pyx":314
+  /* "pysam/TabProxies.pyx":318
  *             return result.decode('ascii')
  * 
  * def toDot( v ):             # <<<<<<<<<<<<<<
  *     '''convert value to '.' if None'''
  *     if v == None: return "."
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_10TabProxies_1toDot, NULL, __pyx_n_s_61); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_10TabProxies_1toDot, NULL, __pyx_n_s_pysam_TabProxies); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __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 = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_toDot, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":319
+  /* "pysam/TabProxies.pyx":323
  *     else: return str(v)
  * 
  * def quote( v ):             # <<<<<<<<<<<<<<
  *     '''return a quoted attribute.'''
  *     if type(v) in types.StringTypes:
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_10TabProxies_3quote, NULL, __pyx_n_s_61); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_10TabProxies_3quote, NULL, __pyx_n_s_pysam_TabProxies); 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);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__quote, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_quote, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/TabProxies.pyx":573
+  /* "pysam/TabProxies.pyx":582
  * 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 = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy->tp_dict, __pyx_n_s_map_key2field, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   PyType_Modified(__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy);
 
-  /* "pysam/TabProxies.pyx":595
- *     This class represents a GTF entry for fast read-access.
+  /* "pysam/TabProxies.pyx":605
+ *     This class represents a BED entry for fast read-access.
  *     '''
  *     map_key2field = {             # <<<<<<<<<<<<<<
  *         'contig' : (0, bytes),
  *         'start' : (1, int),
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = PyDict_New(); 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);
 
-  /* "pysam/TabProxies.pyx":596
+  /* "pysam/TabProxies.pyx":606
  *     '''
  *     map_key2field = {
  *         'contig' : (0, bytes),             # <<<<<<<<<<<<<<
  *         'start' : (1, int),
  *         'end' : (2, int),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
@@ -10764,17 +11080,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_contig, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":597
+  /* "pysam/TabProxies.pyx":607
  *     map_key2field = {
  *         'contig' : (0, bytes),
  *         'start' : (1, int),             # <<<<<<<<<<<<<<
  *         'end' : (2, int),
  *         'name' : (3, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
@@ -10782,17 +11098,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":598
+  /* "pysam/TabProxies.pyx":608
  *         'contig' : (0, bytes),
  *         'start' : (1, int),
  *         'end' : (2, int),             # <<<<<<<<<<<<<<
  *         'name' : (3, bytes),
  *         'score' : (4, float),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_2);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
@@ -10800,17 +11116,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":599
+  /* "pysam/TabProxies.pyx":609
  *         'start' : (1, int),
  *         'end' : (2, int),
  *         'name' : (3, bytes),             # <<<<<<<<<<<<<<
  *         'score' : (4, float),
  *         'strand' : (5, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
@@ -10818,17 +11134,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":600
+  /* "pysam/TabProxies.pyx":610
  *         'end' : (2, int),
  *         'name' : (3, bytes),
  *         'score' : (4, float),             # <<<<<<<<<<<<<<
  *         'strand' : (5, bytes),
  *         'thickStart' : (6, int ),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_4);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
@@ -10836,17 +11152,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_score, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":601
+  /* "pysam/TabProxies.pyx":611
  *         'name' : (3, bytes),
  *         'score' : (4, float),
  *         'strand' : (5, bytes),             # <<<<<<<<<<<<<<
  *         'thickStart' : (6, int ),
  *         'thickEnd' : (7, int),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_5);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
@@ -10854,17 +11170,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__strand), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_strand, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":602
+  /* "pysam/TabProxies.pyx":612
  *         'score' : (4, float),
  *         'strand' : (5, bytes),
  *         'thickStart' : (6, int ),             # <<<<<<<<<<<<<<
  *         'thickEnd' : (7, int),
  *         'itemRGB' : (8, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_6);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
@@ -10872,17 +11188,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_thickStart, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":603
+  /* "pysam/TabProxies.pyx":613
  *         'strand' : (5, bytes),
  *         'thickStart' : (6, int ),
  *         'thickEnd' : (7, int),             # <<<<<<<<<<<<<<
  *         'itemRGB' : (8, bytes),
  *         'blockCount': (9, int),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_7);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
@@ -10890,17 +11206,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_thickEnd, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":604
+  /* "pysam/TabProxies.pyx":614
  *         'thickStart' : (6, int ),
  *         'thickEnd' : (7, int),
  *         'itemRGB' : (8, bytes),             # <<<<<<<<<<<<<<
  *         'blockCount': (9, int),
  *         'blockSizes': (10, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_8);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
@@ -10908,17 +11224,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__itemRGB), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_itemRGB, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":605
+  /* "pysam/TabProxies.pyx":615
  *         'thickEnd' : (7, int),
  *         'itemRGB' : (8, bytes),
  *         'blockCount': (9, int),             # <<<<<<<<<<<<<<
  *         'blockSizes': (10, bytes),
  *         'blockStarts': (11, bytes), }
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_9);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_9);
@@ -10926,17 +11242,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_blockCount, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":606
+  /* "pysam/TabProxies.pyx":616
  *         'itemRGB' : (8, bytes),
  *         'blockCount': (9, int),
  *         'blockSizes': (10, bytes),             # <<<<<<<<<<<<<<
  *         'blockStarts': (11, bytes), }
  * 
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_10);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_10);
@@ -10944,17 +11260,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockSizes), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_blockSizes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":607
+  /* "pysam/TabProxies.pyx":617
  *         'blockCount': (9, int),
  *         'blockSizes': (10, bytes),
  *         'blockStarts': (11, bytes), }             # <<<<<<<<<<<<<<
  * 
  *     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 = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_11);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_11);
@@ -10962,30 +11278,30 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockStarts), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pysam_10TabProxies_BedProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_blockStarts, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pysam_10TabProxies_BedProxy->tp_dict, __pyx_n_s_map_key2field, __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;
   PyType_Modified(__pyx_ptype_5pysam_10TabProxies_BedProxy);
 
-  /* "pysam/TabProxies.pyx":661
+  /* "pysam/TabProxies.pyx":671
  *     The genotypes are accessed via index.
  *     '''
  *     map_key2field = {             # <<<<<<<<<<<<<<
  *         'contig' : (0, bytes),
  *         'pos' : (1, int),
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
 
-  /* "pysam/TabProxies.pyx":662
+  /* "pysam/TabProxies.pyx":672
  *     '''
  *     map_key2field = {
  *         'contig' : (0, bytes),             # <<<<<<<<<<<<<<
  *         'pos' : (1, int),
  *         'id' : (2, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
@@ -10993,17 +11309,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_contig, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":663
+  /* "pysam/TabProxies.pyx":673
  *     map_key2field = {
  *         'contig' : (0, bytes),
  *         'pos' : (1, int),             # <<<<<<<<<<<<<<
  *         'id' : (2, bytes),
  *         'ref' : (3, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
@@ -11011,17 +11327,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __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 = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pos, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":664
+  /* "pysam/TabProxies.pyx":674
  *         'contig' : (0, bytes),
  *         'pos' : (1, int),
  *         'id' : (2, bytes),             # <<<<<<<<<<<<<<
  *         'ref' : (3, bytes),
  *         'alt' : (4, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_2);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
@@ -11029,17 +11345,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__id), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":665
+  /* "pysam/TabProxies.pyx":675
  *         'pos' : (1, int),
  *         'id' : (2, bytes),
  *         'ref' : (3, bytes),             # <<<<<<<<<<<<<<
  *         'alt' : (4, bytes),
  *         'qual' : (5, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
@@ -11047,17 +11363,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ref), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ref, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":666
+  /* "pysam/TabProxies.pyx":676
  *         'id' : (2, bytes),
  *         'ref' : (3, bytes),
  *         'alt' : (4, bytes),             # <<<<<<<<<<<<<<
  *         'qual' : (5, bytes),
  *         'filter' : (6, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_4);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
@@ -11065,17 +11381,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__alt), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_alt, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":667
+  /* "pysam/TabProxies.pyx":677
  *         'ref' : (3, bytes),
  *         'alt' : (4, bytes),
  *         'qual' : (5, bytes),             # <<<<<<<<<<<<<<
  *         'filter' : (6, bytes),
  *         'info' : (7, bytes),
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_5);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
@@ -11083,17 +11399,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_qual, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":668
+  /* "pysam/TabProxies.pyx":678
  *         'alt' : (4, bytes),
  *         'qual' : (5, bytes),
  *         'filter' : (6, bytes),             # <<<<<<<<<<<<<<
  *         'info' : (7, bytes),
  *         'format' : (8, bytes) }
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_6);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
@@ -11101,17 +11417,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__filter), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_filter, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":669
+  /* "pysam/TabProxies.pyx":679
  *         'qual' : (5, bytes),
  *         'filter' : (6, bytes),
  *         'info' : (7, bytes),             # <<<<<<<<<<<<<<
  *         'format' : (8, bytes) }
  * 
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_7);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
@@ -11119,17 +11435,17 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_info, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/TabProxies.pyx":670
+  /* "pysam/TabProxies.pyx":680
  *         'filter' : (6, bytes),
  *         'info' : (7, bytes),
  *         'format' : (8, bytes) }             # <<<<<<<<<<<<<<
  * 
  *     def __cinit__(self ):
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_8);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
@@ -11137,21 +11453,21 @@ PyMODINIT_FUNC PyInit_TabProxies(void)
   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pysam_10TabProxies_VCFProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_format, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pysam_10TabProxies_VCFProxy->tp_dict, __pyx_n_s_map_key2field, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   PyType_Modified(__pyx_ptype_5pysam_10TabProxies_VCFProxy);
 
   /* "pysam/TabProxies.pyx":1
- * import types, sys             # <<<<<<<<<<<<<<
- * 
- * from cpython.version cimport PY_MAJOR_VERSION
+ * import types             # <<<<<<<<<<<<<<
+ * import sys
+ * import 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));
-  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;
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __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;
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
@@ -11188,17 +11504,15 @@ end:
 }
 #endif /* CYTHON_REFNANNY */
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
-    PyObject *result;
-    result = PyObject_GetAttr(dict, name);
-    if (!result) {
-        if (dict != __pyx_b) {
-            PyErr_Clear();
-            result = PyObject_GetAttr(__pyx_b, name);
-        }
-        if (!result) {
-            PyErr_SetObject(PyExc_NameError, name);
-        }
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
     }
     return result;
 }
@@ -11229,6 +11543,29 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
     }
 }
 
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+#endif
+    result = (*call)(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    Py_LeaveRecursiveCall();
+#endif
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 #if CYTHON_COMPILING_IN_CPYTHON
     PyObject *tmp_type, *tmp_value, *tmp_tb;
@@ -11298,24 +11635,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
         }
         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);
+        if (PyInstance_Check(type)) {
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
             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;
-            }
+        } 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);
@@ -11347,46 +11683,62 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
         value = type;
         type = (PyObject*) Py_TYPE(value);
     } else if (PyExceptionClass_Check(type)) {
-        PyObject *args;
-        if (!value)
-            args = PyTuple_New(0);
-        else if (PyTuple_Check(value)) {
-            Py_INCREF(value);
-            args = value;
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
         }
-        else
-            args = PyTuple_Pack(1, value);
-        if (!args)
-            goto bad;
-        owned_instance = PyEval_CallObject(type, args);
-        Py_DECREF(args);
-        if (!owned_instance)
-            goto bad;
-        value = owned_instance;
-        if (!PyExceptionInstance_Check(value)) {
-            PyErr_Format(PyExc_TypeError,
-                         "calling %R should have returned an instance of "
-                         "BaseException, not %R",
-                         type, Py_TYPE(value));
-            goto bad;
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
         }
     } else {
         PyErr_SetString(PyExc_TypeError,
             "raise: exception class must be a subclass of BaseException");
         goto bad;
     }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
     if (cause && cause != Py_None) {
+#endif
         PyObject *fixed_cause;
-        if (PyExceptionClass_Check(cause)) {
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
             fixed_cause = PyObject_CallObject(cause, NULL);
             if (fixed_cause == NULL)
                 goto bad;
-        }
-        else if (PyExceptionInstance_Check(cause)) {
+        } else if (PyExceptionInstance_Check(cause)) {
             fixed_cause = cause;
             Py_INCREF(fixed_cause);
-        }
-        else {
+        } else {
             PyErr_SetString(PyExc_TypeError,
                             "exception causes must derive from "
                             "BaseException");
@@ -11410,19 +11762,46 @@ bad:
 }
 #endif
 
-static void __Pyx_RaiseArgtupleInvalid(
-    const char* func_name,
-    int exact,
-    Py_ssize_t num_min,
-    Py_ssize_t num_max,
-    Py_ssize_t num_found)
-{
-    Py_ssize_t num_expected;
-    const char *more_or_less;
-    if (num_found < num_min) {
-        num_expected = num_min;
-        more_or_less = "at least";
-    } else {
+static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
+                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
+                                  int full_traceback) {
+    PyObject *old_exc, *old_val, *old_tb;
+    PyObject *ctx;
+    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
+    if (full_traceback) {
+        Py_XINCREF(old_exc);
+        Py_XINCREF(old_val);
+        Py_XINCREF(old_tb);
+        __Pyx_ErrRestore(old_exc, old_val, old_tb);
+        PyErr_PrintEx(1);
+    }
+    #if PY_MAJOR_VERSION < 3
+    ctx = PyString_FromString(name);
+    #else
+    ctx = PyUnicode_FromString(name);
+    #endif
+    __Pyx_ErrRestore(old_exc, old_val, old_tb);
+    if (!ctx) {
+        PyErr_WriteUnraisable(Py_None);
+    } else {
+        PyErr_WriteUnraisable(ctx);
+        Py_DECREF(ctx);
+    }
+}
+
+static void __Pyx_RaiseArgtupleInvalid(
+    const char* func_name,
+    int exact,
+    Py_ssize_t num_min,
+    Py_ssize_t num_max,
+    Py_ssize_t num_found)
+{
+    Py_ssize_t num_expected;
+    const char *more_or_less;
+    if (num_found < num_min) {
+        num_expected = num_min;
+        more_or_less = "at least";
+    } else {
         num_expected = num_max;
         more_or_less = "at most";
     }
@@ -11430,7 +11809,7 @@ static void __Pyx_RaiseArgtupleInvalid(
         more_or_less = "exactly";
     }
     PyErr_Format(PyExc_TypeError,
-                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                  func_name, more_or_less, num_expected,
                  (num_expected == 1) ? "" : "s", num_found);
 }
@@ -11459,13 +11838,13 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
     return 1;
 invalid_keyword_type:
     PyErr_Format(PyExc_TypeError,
-        "%s() keywords must be strings", function_name);
+        "%.200s() keywords must be strings", function_name);
     return 0;
 #endif
 invalid_keyword:
     PyErr_Format(PyExc_TypeError,
     #if PY_MAJOR_VERSION < 3
-        "%s() got an unexpected keyword argument '%s'",
+        "%.200s() got an unexpected keyword argument '%.200s'",
         function_name, PyString_AsString(key));
     #else
         "%s() got an unexpected keyword argument '%U'",
@@ -11481,7 +11860,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
 
 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
     PyErr_Format(PyExc_ValueError,
-                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
+                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                  index, (index == 1) ? "" : "s");
 }
 
@@ -11629,12 +12008,12 @@ arg_passed_twice:
     goto bad;
 invalid_keyword_type:
     PyErr_Format(PyExc_TypeError,
-        "%s() keywords must be strings", function_name);
+        "%.200s() keywords must be strings", function_name);
     goto bad;
 invalid_keyword:
     PyErr_Format(PyExc_TypeError,
     #if PY_MAJOR_VERSION < 3
-        "%s() got an unexpected keyword argument '%s'",
+        "%.200s() got an unexpected keyword argument '%.200s'",
         function_name, PyString_AsString(key));
     #else
         "%s() got an unexpected keyword argument '%U'",
@@ -11644,13 +12023,256 @@ bad:
     return -1;
 }
 
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+    if (likely(PyList_CheckExact(L))) {
+        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+    } else {
+        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+        if (unlikely(!retval))
+            return -1;
+        Py_DECREF(retval);
+    }
+    return 0;
+}
+
+#if !CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
+    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL)
+}
+#endif
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (result) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
+    }
+    return result;
+}
+
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+    if (s1 == s2) {
+        return (equals == Py_EQ);
+    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
+        const char *ps1, *ps2;
+        Py_ssize_t length = PyBytes_GET_SIZE(s1);
+        if (length != PyBytes_GET_SIZE(s2))
+            return (equals == Py_NE);
+        ps1 = PyBytes_AS_STRING(s1);
+        ps2 = PyBytes_AS_STRING(s2);
+        if (ps1[0] != ps2[0]) {
+            return (equals == Py_NE);
+        } else if (length == 1) {
+            return (equals == Py_EQ);
+        } else {
+            int result = memcmp(ps1, ps2, (size_t)length);
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
+        return (equals == Py_NE);
+    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
+        return (equals == Py_NE);
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+#endif
+}
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+#if PY_MAJOR_VERSION < 3
+    PyObject* owned_ref = NULL;
+#endif
+    int s1_is_unicode, s2_is_unicode;
+    if (s1 == s2) {
+        goto return_eq;
+    }
+    s1_is_unicode = PyUnicode_CheckExact(s1);
+    s2_is_unicode = PyUnicode_CheckExact(s2);
+#if PY_MAJOR_VERSION < 3
+    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
+        owned_ref = PyUnicode_FromObject(s2);
+        if (unlikely(!owned_ref))
+            return -1;
+        s2 = owned_ref;
+        s2_is_unicode = 1;
+    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
+        owned_ref = PyUnicode_FromObject(s1);
+        if (unlikely(!owned_ref))
+            return -1;
+        s1 = owned_ref;
+        s1_is_unicode = 1;
+    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
+        return __Pyx_PyBytes_Equals(s1, s2, equals);
+    }
+#endif
+    if (s1_is_unicode & s2_is_unicode) {
+        Py_ssize_t length;
+        int kind;
+        void *data1, *data2;
+        #if CYTHON_PEP393_ENABLED
+        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
+            return -1;
+        #endif
+        length = __Pyx_PyUnicode_GET_LENGTH(s1);
+        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
+            goto return_ne;
+        }
+        kind = __Pyx_PyUnicode_KIND(s1);
+        if (kind != __Pyx_PyUnicode_KIND(s2)) {
+            goto return_ne;
+        }
+        data1 = __Pyx_PyUnicode_DATA(s1);
+        data2 = __Pyx_PyUnicode_DATA(s2);
+        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
+            goto return_ne;
+        } else if (length == 1) {
+            goto return_eq;
+        } else {
+            int result = memcmp(data1, data2, length * kind);
+            #if PY_MAJOR_VERSION < 3
+            Py_XDECREF(owned_ref);
+            #endif
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & s2_is_unicode) {
+        goto return_ne;
+    } else if ((s2 == Py_None) & s1_is_unicode) {
+        goto return_ne;
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+return_eq:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_EQ);
+return_ne:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_NE);
+#endif
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        PyObject *r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        PyObject *r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+            PyObject *r = PyList_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    else if (PyTuple_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return NULL;
+                }
+            }
+            return m->sq_item(o, i);
+        }
+    }
+#else
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
+    }
+#endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
 static double __Pyx__PyObject_AsDouble(PyObject* obj) {
     PyObject* float_value;
 #if CYTHON_COMPILING_IN_PYPY
     float_value = PyNumber_Float(obj);
 #else
-    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
-        return PyFloat_AsDouble(obj);
+    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
+    if (likely(nb) && likely(nb->nb_float)) {
+        float_value = nb->nb_float(obj);
+        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
+            PyErr_Format(PyExc_TypeError,
+                "__float__ returned non-float (type %.200s)",
+                Py_TYPE(float_value)->tp_name);
+            Py_DECREF(float_value);
+            goto bad;
+        }
     } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
 #if PY_MAJOR_VERSION >= 3
         float_value = PyFloat_FromString(obj);
@@ -11675,6 +12297,161 @@ bad:
     return (double)-1;
 }
 
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
+        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyMappingMethods* mp;
+#if PY_MAJOR_VERSION < 3
+    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
+    if (likely(ms && ms->sq_slice)) {
+        if (!has_cstart) {
+            if (_py_start && (*_py_start != Py_None)) {
+                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
+                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstart = 0;
+        }
+        if (!has_cstop) {
+            if (_py_stop && (*_py_stop != Py_None)) {
+                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
+                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstop = PY_SSIZE_T_MAX;
+        }
+        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
+            Py_ssize_t l = ms->sq_length(obj);
+            if (likely(l >= 0)) {
+                if (cstop < 0) {
+                    cstop += l;
+                    if (cstop < 0) cstop = 0;
+                }
+                if (cstart < 0) {
+                    cstart += l;
+                    if (cstart < 0) cstart = 0;
+                }
+            } else {
+                if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                    PyErr_Clear();
+                else
+                    goto bad;
+            }
+        }
+        return ms->sq_slice(obj, cstart, cstop);
+    }
+#endif
+    mp = Py_TYPE(obj)->tp_as_mapping;
+    if (likely(mp && mp->mp_subscript))
+#endif
+    {
+        PyObject* result;
+        PyObject *py_slice, *py_start, *py_stop;
+        if (_py_slice) {
+            py_slice = *_py_slice;
+        } else {
+            PyObject* owned_start = NULL;
+            PyObject* owned_stop = NULL;
+            if (_py_start) {
+                py_start = *_py_start;
+            } else {
+                if (has_cstart) {
+                    owned_start = py_start = PyInt_FromSsize_t(cstart);
+                    if (unlikely(!py_start)) goto bad;
+                } else
+                    py_start = Py_None;
+            }
+            if (_py_stop) {
+                py_stop = *_py_stop;
+            } else {
+                if (has_cstop) {
+                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
+                    if (unlikely(!py_stop)) {
+                        Py_XDECREF(owned_start);
+                        goto bad;
+                    }
+                } else
+                    py_stop = Py_None;
+            }
+            py_slice = PySlice_New(py_start, py_stop, Py_None);
+            Py_XDECREF(owned_start);
+            Py_XDECREF(owned_stop);
+            if (unlikely(!py_slice)) goto bad;
+        }
+#if CYTHON_COMPILING_IN_CPYTHON
+        result = mp->mp_subscript(obj, py_slice);
+#else
+        result = PyObject_GetItem(obj, py_slice);
+#endif
+        if (!_py_slice) {
+            Py_DECREF(py_slice);
+        }
+        return result;
+    }
+    PyErr_Format(PyExc_TypeError,
+        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
+bad:
+    return NULL;
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
+    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
+    if (start < 0) {
+        start += length;
+        if (start < 0)
+            start = 0;
+    }
+    if (stop < 0)
+        stop += length;
+    else if (stop > length)
+        stop = length;
+    *_length = stop - start;
+    *_start = start;
+    *_stop = stop;
+}
+static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
+    PyObject *v;
+    Py_ssize_t i;
+    for (i = 0; i < length; i++) {
+        v = dest[i] = src[i];
+        Py_INCREF(v);
+    }
+}
+static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
+            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
+    PyObject* dest;
+    Py_ssize_t length = PyList_GET_SIZE(src);
+    __Pyx_crop_slice(&start, &stop, &length);
+    if (unlikely(length <= 0))
+        return PyList_New(0);
+    dest = PyList_New(length);
+    if (unlikely(!dest))
+        return NULL;
+    __Pyx_copy_object_array(
+        ((PyListObject*)src)->ob_item + start,
+        ((PyListObject*)dest)->ob_item,
+        length);
+    return dest;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
+            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
+    PyObject* dest;
+    Py_ssize_t length = PyTuple_GET_SIZE(src);
+    __Pyx_crop_slice(&start, &stop, &length);
+    if (unlikely(length <= 0))
+        return PyTuple_New(0);
+    dest = PyTuple_New(length);
+    if (unlikely(!dest))
+        return NULL;
+    __Pyx_copy_object_array(
+        ((PyTupleObject*)src)->ob_item + start,
+        ((PyTupleObject*)dest)->ob_item,
+        length);
+    return dest;
+}
+#endif
+
 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
 #if CYTHON_COMPILING_IN_CPYTHON
     PyThreadState *tstate = PyThreadState_GET();
@@ -11706,6 +12483,23 @@ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb)
 #endif
 }
 
+static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    PyObject *ob = PyCapsule_New(vtable, 0, 0);
+#else
+    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+#endif
+    if (!ob)
+        goto bad;
+    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
+        goto bad;
+    Py_DECREF(ob);
+    return 0;
+bad:
+    Py_XDECREF(ob);
+    return -1;
+}
+
 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
     PyObject *empty_list = 0;
     PyObject *module = 0;
@@ -11713,8 +12507,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
     PyObject *empty_dict = 0;
     PyObject *list;
     #if PY_VERSION_HEX < 0x03030000
-    PyObject *py_import = 0;
-    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
     if (!py_import)
         goto bad;
     #endif
@@ -11788,504 +12582,397 @@ bad:
     return module;
 }
 
-static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject* x) {
-    const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if (sizeof(uint32_t) == sizeof(char)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedChar(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedChar(x);
-    } else if (sizeof(uint32_t) == sizeof(short)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedShort(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedShort(x);
-    } else if (sizeof(uint32_t) == sizeof(int)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedInt(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedInt(x);
-    } else if (sizeof(uint32_t) == sizeof(long)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedLong(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedLong(x);
-    } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedLongLong(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedLongLong(x);
-    }  else {
-        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
-        PyErr_SetString(PyExc_RuntimeError,
-                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-        #else
-        uint32_t val;
-        PyObject *v = __Pyx_PyNumber_Int(x);
-        #if PY_VERSION_HEX < 0x03000000
-        if (likely(v) && !PyLong_Check(v)) {
-            PyObject *tmp = v;
-            v = PyNumber_Long(tmp);
-            Py_DECREF(tmp);
-        }
-        #endif
-        if (likely(v)) {
-            int one = 1; int is_little = (int)*(unsigned char *)&one;
-            unsigned char *bytes = (unsigned char *)&val;
-            int ret = _PyLong_AsByteArray((PyLongObject *)v,
-                                          bytes, sizeof(val),
-                                          is_little, !is_unsigned);
-            Py_DECREF(v);
-            if (likely(!ret))
-                return val;
-        }
-        #endif
-        return (uint32_t)-1;
-    }
-}
-
-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;
-    if ((sizeof(uint32_t) == sizeof(char))  ||
-        (sizeof(uint32_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(uint32_t) == sizeof(int)) ||
-               (sizeof(uint32_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
-                                     little, !is_unsigned);
-    }
-}
-
-static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
-    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned char" :
-                    "value too large to convert to unsigned char");
-            }
-            return (unsigned char)-1;
-        }
-        return (unsigned char)val;
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
+    {                                                                     \
+        func_type value = func(x);                                        \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                PyErr_SetString(PyExc_OverflowError,                      \
+                    (is_unsigned && unlikely(value < zero)) ?             \
+                    "can't convert negative value to " #target_type :     \
+                    "value too large to convert to " #target_type);       \
+                return (target_type) -1;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
     }
-    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
-}
 
-static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
-    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned short" :
-                    "value too large to convert to unsigned short");
-            }
-            return (unsigned short)-1;
-        }
-        return (unsigned short)val;
-    }
-    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
-}
-
-static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
-    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned int" :
-                    "value too large to convert to unsigned int");
+                                "can't convert negative value to int");
+                return (int) -1;
             }
-            return (unsigned int)-1;
+            return (int) val;
         }
-        return (unsigned int)val;
-    }
-    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
-}
-
-static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
-    const char neg_one = (char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to char" :
-                    "value too large to convert to char");
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
+                }
             }
-            return (char)-1;
-        }
-        return (char)val;
-    }
-    return (char)__Pyx_PyInt_AsLong(x);
-}
-
-static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
-    const short neg_one = (short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to short" :
-                    "value too large to convert to short");
+                                "can't convert negative value to int");
+                return (int) -1;
             }
-            return (short)-1;
-        }
-        return (short)val;
-    }
-    return (short)__Pyx_PyInt_AsLong(x);
-}
-
-static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
-    const int neg_one = (int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to int" :
-                    "value too large to convert to int");
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (int)-1;
-        }
-        return (int)val;
-    }
-    return (int)__Pyx_PyInt_AsLong(x);
-}
-
-static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
-    const signed char neg_one = (signed char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed char" :
-                    "value too large to convert to signed char");
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
+                }
             }
-            return (signed char)-1;
-        }
-        return (signed char)val;
-    }
-    return (signed char)__Pyx_PyInt_AsSignedLong(x);
-}
-
-static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
-    const signed short neg_one = (signed short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed short" :
-                    "value too large to convert to signed short");
+ #endif
+#endif
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
             }
-            return (signed short)-1;
         }
-        return (signed short)val;
-    }
-    return (signed short)__Pyx_PyInt_AsSignedLong(x);
-}
-
-static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
-    const signed int neg_one = (signed int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed int" :
-                    "value too large to convert to signed int");
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
             }
-            return (signed int)-1;
-        }
-        return (signed int)val;
-    }
-    return (signed int)__Pyx_PyInt_AsSignedLong(x);
-}
-
-static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
-    const int neg_one = (int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to int" :
-                    "value too large to convert to int");
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
             }
-            return (int)-1;
-        }
-        return (int)val;
-    }
-    return (int)__Pyx_PyInt_AsLong(x);
-}
-
-static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
-    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned long");
-            return (unsigned long)-1;
-        }
-        return (unsigned long)val;
-    } else
 #endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to unsigned long");
-                return (unsigned long)-1;
-            }
-            return (unsigned long)PyLong_AsUnsignedLong(x);
-        } else {
-            return (unsigned long)PyLong_AsLong(x);
+            return (int) -1;
         }
     } else {
-        unsigned long val;
+        int val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (unsigned long)-1;
-        val = __Pyx_PyInt_AsUnsignedLong(tmp);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
         Py_DECREF(tmp);
         return val;
     }
 }
 
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
-    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+    const int neg_one = (int) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned PY_LONG_LONG");
-            return (unsigned PY_LONG_LONG)-1;
-        }
-        return (unsigned PY_LONG_LONG)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to unsigned PY_LONG_LONG");
-                return (unsigned PY_LONG_LONG)-1;
-            }
-            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
-        } else {
-            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
+    if (is_unsigned) {
+        if (sizeof(int) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
     } else {
-        unsigned PY_LONG_LONG val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (unsigned PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        if (sizeof(int) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int),
+                                     little, !is_unsigned);
     }
 }
 
-static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
-    const long neg_one = (long)-1, const_zero = 0;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to long");
-            return (long)-1;
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            return (long) val;
         }
-        return (long)val;
     } else
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
                                 "can't convert negative value to long");
-                return (long)-1;
+                return (long) -1;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (long)PyLong_AsUnsignedLong(x);
         } else {
-            return (long)PyLong_AsLong(x);
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (long) -1;
         }
     } else {
         long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (long)-1;
-        val = __Pyx_PyInt_AsLong(tmp);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
         Py_DECREF(tmp);
         return val;
     }
 }
 
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
-    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to PY_LONG_LONG");
-            return (PY_LONG_LONG)-1;
-        }
-        return (PY_LONG_LONG)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to PY_LONG_LONG");
-                return (PY_LONG_LONG)-1;
-            }
-            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
-        } else {
-            return (PY_LONG_LONG)PyLong_AsLongLong(x);
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
     } else {
-        PY_LONG_LONG val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsLongLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
     }
 }
 
-static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
-    const signed long neg_one = (signed long)-1, const_zero = 0;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
+    const uint32_t neg_one = (uint32_t) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed long");
-            return (signed long)-1;
+        if (sizeof(uint32_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint32_t");
+                return (uint32_t) -1;
+            }
+            return (uint32_t) val;
         }
-        return (signed long)val;
     } else
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint32_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (uint32_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to signed long");
-                return (signed long)-1;
+                                "can't convert negative value to uint32_t");
+                return (uint32_t) -1;
+            }
+            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(uint32_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (signed long)PyLong_AsUnsignedLong(x);
         } else {
-            return (signed long)PyLong_AsLong(x);
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint32_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(uint32_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(uint32_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(uint32_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(uint32_t, long, PyLong_AsLong)
+            } else if (sizeof(uint32_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(uint32_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            uint32_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (uint32_t) -1;
         }
     } else {
-        signed long val;
+        uint32_t val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (signed long)-1;
-        val = __Pyx_PyInt_AsSignedLong(tmp);
+        if (!tmp) return (uint32_t) -1;
+        val = __Pyx_PyInt_As_uint32_t(tmp);
         Py_DECREF(tmp);
         return val;
     }
 }
 
-static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
-    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
+    const uint32_t neg_one = (uint32_t) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed PY_LONG_LONG");
-            return (signed PY_LONG_LONG)-1;
-        }
-        return (signed PY_LONG_LONG)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to signed PY_LONG_LONG");
-                return (signed PY_LONG_LONG)-1;
-            }
-            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
-        } else {
-            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
+    if (is_unsigned) {
+        if (sizeof(uint32_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(uint32_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
     } else {
-        signed PY_LONG_LONG val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (signed PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsSignedLongLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        if (sizeof(uint32_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint32_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
     }
-}
-
-static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
-                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
-    PyObject *old_exc, *old_val, *old_tb;
-    PyObject *ctx;
-    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
-    #if PY_MAJOR_VERSION < 3
-    ctx = PyString_FromString(name);
-    #else
-    ctx = PyUnicode_FromString(name);
-    #endif
-    __Pyx_ErrRestore(old_exc, old_val, old_tb);
-    if (!ctx) {
-        PyErr_WriteUnraisable(Py_None);
-    } else {
-        PyErr_WriteUnraisable(ctx);
-        Py_DECREF(ctx);
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
+                                     little, !is_unsigned);
     }
 }
 
@@ -12308,23 +12995,6 @@ static int __Pyx_check_binary_version(void) {
     return 0;
 }
 
-static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
-#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
-    PyObject *ob = PyCapsule_New(vtable, 0, 0);
-#else
-    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
-#endif
-    if (!ob)
-        goto bad;
-    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
-        goto bad;
-    Py_DECREF(ob);
-    return 0;
-bad:
-    Py_XDECREF(ob);
-    return -1;
-}
-
 #ifndef __PYX_HAVE_RT_ImportModule
 #define __PYX_HAVE_RT_ImportModule
 static PyObject *__Pyx_ImportModule(const char *name) {
@@ -12370,7 +13040,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
         goto bad;
     if (!PyType_Check(result)) {
         PyErr_Format(PyExc_TypeError,
-            "%s.%s is not a type object",
+            "%.200s.%.200s is not a type object",
             module_name, class_name);
         goto bad;
     }
@@ -12398,7 +13068,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
     }
     else if ((size_t)basicsize != size) {
         PyErr_Format(PyExc_ValueError,
-            "%s.%s has the wrong size, try recompiling",
+            "%.200s.%.200s has the wrong size, try recompiling",
             module_name, class_name);
         goto bad;
     }
@@ -12602,6 +13272,73 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
     return 0;
 }
 
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else /* PY_VERSION_HEX < 0x03030000 */
+        if (PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_DATA_SIZE(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+#endif /* PY_VERSION_HEX < 0x03030000 */
+    } else
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+#if !CYTHON_COMPILING_IN_PYPY
+#if PY_VERSION_HEX >= 0x02060000
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
    int is_true = x == Py_True;
    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
@@ -12611,14 +13348,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   PyNumberMethods *m;
   const char *name = NULL;
   PyObject *res = NULL;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (PyInt_Check(x) || PyLong_Check(x))
 #else
   if (PyLong_Check(x))
 #endif
     return Py_INCREF(x), x;
   m = Py_TYPE(x)->tp_as_number;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (m && m->nb_int) {
     name = "int";
     res = PyNumber_Int(x);
@@ -12634,13 +13371,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
 #endif
   if (res) {
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (!PyInt_Check(res) && !PyLong_Check(res)) {
 #else
     if (!PyLong_Check(res)) {
 #endif
       PyErr_Format(PyExc_TypeError,
-                   "__%s__ returned non-%s (type %.200s)",
+                   "__%.4s__ returned non-%.4s (type %.200s)",
                    name, name, Py_TYPE(res)->tp_name);
       Py_DECREF(res);
       return NULL;
@@ -12652,9 +13389,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
   return res;
 }
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   Py_ssize_t ival;
-  PyObject* x = PyNumber_Index(b);
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+  #if PY_VERSION_HEX < 0x02060000
+    return PyInt_AsSsize_t(b);
+  #else
+    return PyLong_AsSsize_t(b);
+  #endif
+  }
+  x = PyNumber_Index(b);
   if (!x) return -1;
   ival = PyInt_AsSsize_t(x);
   Py_DECREF(x);
@@ -12673,17 +13436,6 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
 #endif
 }
-static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
-   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
-   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
-       return (size_t)-1;
-   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
-       PyErr_SetString(PyExc_OverflowError,
-                       "value too large to convert to size_t");
-       return (size_t)-1;
-   }
-   return (size_t)val;
-}
 
 
 #endif /* Py_PYTHON_H */
diff --git a/pysam/TabProxies.pyx b/pysam/TabProxies.pyx
index b83e58b..45e40f5 100644
--- a/pysam/TabProxies.pyx
+++ b/pysam/TabProxies.pyx
@@ -1,4 +1,6 @@
-import types, sys
+import types
+import sys
+import string
 
 from cpython.version cimport PY_MAJOR_VERSION
 
@@ -170,10 +172,12 @@ cdef class TupleProxy:
         cdef int field
         cdef int max_fields, x
 
-        assert strlen(buffer) == nbytes
+        assert strlen(buffer) == nbytes, \
+            "length of buffer (%i) != number of bytes (%i)" % (
+                strlen(buffer), nbytes)
 
         if buffer[nbytes] != 0:
-            raise ValueError( "incomplete line at %s" % buffer )
+            raise ValueError("incomplete line at %s" % buffer)
 
         #################################
         # remove line breaks and feeds and update number of bytes
@@ -425,24 +429,26 @@ cdef class GTFProxy( TupleProxy ):
         attributes = self.attributes
 
         # separate into fields
-        fields = [ x.strip() for x in attributes.split(";")[:-1]]
+        fields = [x.strip() for x in attributes.split(";")[:-1]]
         
         result = {}
 
         for f in fields:
-            
-            d = [ x.strip() for x in f.split(" ")]
-            
+            # split at most once in order to avoid separating
+            # multi-word values
+            d = [x.strip() for x in string.split(f, " ", maxsplit=1)]
+
             n,v = d[0], d[1]
-            if len(d) > 2: v = d[1:]
+            if len(d) > 2:
+                v = d[1:]
 
             if v[0] == '"' and v[-1] == '"':
                 v = v[1:-1]
             else:
                 ## try to convert to a value
                 try:
-                    v = float( v )
-                    v = int( v )
+                    v = float(v)
+                    v = int(v)
                 except ValueError:
                     pass
                 except TypeError:
@@ -541,26 +547,29 @@ cdef class GTFProxy( TupleProxy ):
         # directly and so did the bug.
         cdef char * attributes = self.getAttributes()
 
-        r = _force_bytes(item)
+        # add space in order to make sure
+        # to not pick up a field that is a prefix of another field
+        r = _force_bytes(item + " ")
         query = r
-        start = strstr( attributes, query)
+        start = strstr(attributes, query)
 
         if start == NULL:
             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
 
-        start += strlen(query) + 1
+        start += strlen(query)
         # 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
-            result = _force_str( PyBytes_FromStringAndSize( start, l ) )
+            result = _force_str(PyBytes_FromStringAndSize( start, l ))
             return result
         else:
-            return _force_str( start )
+            return _force_str(start)
 
     def setAttribute( self, name, value ):
         '''convenience method to set an attribute.'''
@@ -587,12 +596,13 @@ cdef class NamedTupleProxy( TupleProxy ):
             raise KeyError( "field %s not set" % key )
         return f( self.fields[idx] )
 
+
 cdef class BedProxy( NamedTupleProxy ):
     '''Proxy class for access to Bed fields.
 
-    This class represents a GTF entry for fast read-access.
+    This class represents a BED entry for fast read-access.
     '''
-    map_key2field = { 
+    map_key2field = {
         'contig' : (0, bytes),
         'start' : (1, int),
         'end' : (2, int),
diff --git a/pysam/__init__.py b/pysam/__init__.py
index a02f62b..6e8a70e 100644
--- a/pysam/__init__.py
+++ b/pysam/__init__.py
@@ -1,45 +1,57 @@
-from pysam.csamtools import *
-from pysam.ctabix import *
-import pysam.csamtools as csamtools
+from pysam.libchtslib import *
+
 import pysam.ctabix as ctabix
-from pysam.cvcf import *
+from pysam.ctabix import *
+import pysam.csamfile as csamfile
+from pysam.csamfile import *
+import pysam.cfaidx as cfaidx
+from pysam.cfaidx import *
 import pysam.cvcf as cvcf
+from pysam.cvcf import *
+import pysam.csamtools as csamtools
+
+
 import pysam.Pileup as Pileup
-import sys
 import os
 
-class SamtoolsError( Exception ):
-    '''exception raised in case of an error incurred in the samtools library.'''
+
+class SamtoolsError(Exception):
+    '''exception raised in case of an error incurred in the samtools
+    library.'''
 
     def __init__(self, value):
         self.value = value
+
     def __str__(self):
         return repr(self.value)
 
+
 class SamtoolsDispatcher(object):
-    '''samtools dispatcher. 
+    '''samtools dispatcher.
 
     Emulates the samtools command line as module calls.
     
-    Captures stdout and stderr. 
+    Captures stdout and stderr.
 
     Raises a :class:`pysam.SamtoolsError` exception in case
     samtools exits with an error code other than 0.
 
-    Some command line options are associated with parsers.
-    For example, the samtools command "pileup -c" creates
-    a tab-separated table on standard output. In order to 
-    associate parsers with options, an optional list of 
-    parsers can be supplied. The list will be processed
-    in order checking for the presence of each option.
+    Some command line options are associated with parsers.  For
+    example, the samtools command "pileup -c" creates a tab-separated
+    table on standard output. In order to associate parsers with
+    options, an optional list of parsers can be supplied. The list
+    will be processed in order checking for the presence of each
+    option.
+
+    If no parser is given or no appropriate parser is found, the
+    stdout output of samtools commands will be returned.
 
-    If no parser is given or no appropriate parser is found, 
-    the stdout output of samtools commands will be returned.
     '''
-    dispatch=None
-    parsers=None
 
-    def __init__(self,dispatch, parsers): 
+    dispatch = None
+    parsers = None
+
+    def __init__(self, dispatch, parsers):
         self.dispatch = dispatch
         self.parsers = parsers
         self.stderr = []
@@ -47,74 +59,80 @@ class SamtoolsDispatcher(object):
     def __call__(self, *args, **kwargs):
         '''execute a samtools command
         '''
-        retval, stderr, stdout = csamtools._samtools_dispatch( self.dispatch, args )
-        if retval: raise SamtoolsError( 'csamtools returned with error %i: %s' % (retval, "\n".join( stderr ) ))
+        retval, stderr, stdout = csamtools._samtools_dispatch(
+            self.dispatch, args)
+        if retval:
+            raise SamtoolsError(
+                'csamtools returned with error %i: %s' %
+                (retval, "\n".join(stderr)))
         self.stderr = stderr
         # samtools commands do not propagate the return code correctly.
         # I have thus added this patch to throw if there is output on stderr.
         # Note that there is sometimes output on stderr that is not an error,
         # for example: [sam_header_read2] 2 sequences loaded.
         # Ignore messages like these
-        stderr = [ x for x in stderr \
-                       if not (x.startswith( "[sam_header_read2]" ) or \
-                                   x.startswith("[bam_index_load]") or \
-                                   x.startswith("[bam_sort_core]") or \
-                                   x.startswith("[samopen] SAM header is present") )
-                   ]
-        if stderr: raise SamtoolsError( "\n".join( stderr ) )
+        stderr = [x for x in stderr
+                  if not (x.startswith("[sam_header_read2]") or
+                          x.startswith("[bam_index_load]") or
+                          x.startswith("[bam_sort_core]") or
+                          x.startswith("[samopen] SAM header is present"))
+              ]
+        if stderr:
+            raise SamtoolsError("\n".join(stderr))
 
         # call parser for stdout:
         if not kwargs.get("raw") and stdout and self.parsers:
             for options, parser in self.parsers:
-                for option in options: 
-                    if option not in args: break
+                for option in options:
+                    if option not in args:
+                        break
                 else:
                     return parser(stdout)
 
         return stdout
 
-    def getMessages( self ):
+    def getMessages(self):
         return self.stderr
 
     def usage(self):
         '''return the samtools usage information for this command'''
-        retval, stderr, stdout = csamtools._samtools_dispatch( self.dispatch )
+        retval, stderr, stdout = csamtools._samtools_dispatch(
+            self.dispatch)
         return "".join(stderr)
 
 #
 # samtools command line options to export in python
 #
 # import is a python reserved word.
-SAMTOOLS_DISPATCH = { 
+SAMTOOLS_DISPATCH = {
     # samtools 'documented' commands
-    "view" : ( "view", None ),
-    "sort" : ( "sort", None),
-    "mpileup" : ( "mpileup", None),
-    "depth" : ("depth", None),
-    "faidx" : ("faidx", None),
-    "tview" : ("tview", None),
-    "index" : ("index", None),
-    "idxstats" : ("idxstats", None),
-    "fixmate" : ("fixmate", None),
-    "flagstat" : ("flagstat", None),
-    "calmd" : ("calmd", None),
-    "merge" : ("merge", None),  
-    "rmdup" : ("rmdup", None),
-    "reheader" : ("reheader", None),
-    "cat" : ("cat", None),
-    "targetcut" : ("targetcut", None),
-    "phase" : ("phase", None),
+    "view": ("view", None),
+    "sort": ("sort", None),
+    "mpileup": ("mpileup", None),
+    "depth": ("depth", None),
+    "faidx": ("faidx", None),
+    "tview": ("tview", None),
+    "index": ("index", None),
+    "idxstats": ("idxstats", None),
+    "fixmate": ("fixmate", None),
+    "flagstat": ("flagstat", None),
+    "calmd": ("calmd", None),
+    "merge": ("merge", None),
+    "rmdup": ("rmdup", None),
+    "reheader": ("reheader", None),
+    "cat": ("cat", None),
+    "targetcut": ("targetcut", None),
+    "phase": ("phase", None),
     # others
-    "samimport": ( "import", None),
-    "bam2fq" : ("bam2fq", None),
-    "pad2unpad" : ("pad2unpad", None),
-    "depad" : ("pad2unpad", None),
-    "bedcov" : ("bedcov", None),
-    "bamshuf" : ("bamshuf", None),
+    "samimport": ("import", None),
+    "bam2fq": ("bam2fq", None),
+    "pad2unpad": ("pad2unpad", None),
+    "depad": ("pad2unpad", None),
+    "bedcov": ("bedcov", None),
+    "bamshuf": ("bamshuf", None),
     # obsolete
-    # "pileup" : ( "pileup", ( (("-c",), Pileup.iterate ), ), ),
-
- }
+    # "pileup": "pileup", ( (("-c",), Pileup.iterate),),),
+}
 
 # instantiate samtools commands as python functions
 for key, options in SAMTOOLS_DISPATCH.items():
@@ -123,23 +141,27 @@ for key, options in SAMTOOLS_DISPATCH.items():
 
 # hack to export all the symbols from csamtools
 __all__ = \
-    csamtools.__all__ + \
+    libchtslib.__all__ + \
     ctabix.__all__ + \
     cvcf.__all__ +\
-    [ "SamtoolsError", "SamtoolsDispatcher" ] + list(SAMTOOLS_DISPATCH) +\
-    ["Pileup" ] 
+    cfaidx.__all__ +\
+    csamfile.__all__ +\
+    ["SamtoolsError", "SamtoolsDispatcher"] +\
+    list(SAMTOOLS_DISPATCH) +\
+    ["Pileup"]
 
 from pysam.version import __version__, __samtools_version__
 
-###########################################################
-# Utility functions for compilation
+
 def get_include():
     '''return a list of include directories.'''
     dirname = os.path.abspath(os.path.join(os.path.dirname(__file__)))
-    return [ dirname,
-             os.path.join(dirname, 'include', 'samtools'),
-             os.path.join(dirname, 'include', 'tabix') ]
+    return [dirname,
+            os.path.join(dirname, 'include', 'htslib'),
+            os.path.join(dirname, 'include', 'samtools')]
+
 
 def get_defines():
     '''return a list of defined compilation parameters.'''
-    return [('_FILE_OFFSET_BITS','64'), ('_USE_KNETFILE','')]
+    return [('_FILE_OFFSET_BITS', '64'),
+            ('_USE_KNETFILE', '')]
diff --git a/pysam/cfaidx.c b/pysam/cfaidx.c
new file mode 100644
index 0000000..ebe7b75
--- /dev/null
+++ b/pysam/cfaidx.c
@@ -0,0 +1,8485 @@
+/* Generated by Cython 0.20.1 on Tue Jul 15 21:20:07 2014 */
+
+#define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
+#include "Python.h"
+#ifndef Py_PYTHON_H
+    #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02040000
+    #error Cython requires Python 2.4+.
+#else
+#define CYTHON_ABI "0_20_1"
+#include <stddef.h> /* For offsetof */
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+  #ifndef __stdcall
+    #define __stdcall
+  #endif
+  #ifndef __cdecl
+    #define __cdecl
+  #endif
+  #ifndef __fastcall
+    #define __fastcall
+  #endif
+#endif
+#ifndef DL_IMPORT
+  #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+  #define DL_EXPORT(t) t
+#endif
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+  #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+#define CYTHON_COMPILING_IN_PYPY 1
+#define CYTHON_COMPILING_IN_CPYTHON 0
+#else
+#define CYTHON_COMPILING_IN_PYPY 0
+#define CYTHON_COMPILING_IN_CPYTHON 1
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+#define Py_OptimizeFlag 0
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  typedef int Py_ssize_t;
+  #define PY_SSIZE_T_MAX INT_MAX
+  #define PY_SSIZE_T_MIN INT_MIN
+  #define PY_FORMAT_SIZE_T ""
+  #define CYTHON_FORMAT_SSIZE_T ""
+  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
+  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
+  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
+                                (PyErr_Format(PyExc_TypeError, \
+                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
+                                 (PyObject*)0))
+  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
+                                  !PyComplex_Check(o))
+  #define PyIndex_Check __Pyx_PyIndex_Check
+  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
+  #define __PYX_BUILD_PY_SSIZE_T "i"
+#else
+  #define __PYX_BUILD_PY_SSIZE_T "n"
+  #define CYTHON_FORMAT_SSIZE_T "z"
+  #define __Pyx_PyIndex_Check PyIndex_Check
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
+  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
+  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
+  #define PyVarObject_HEAD_INIT(type, size) \
+          PyObject_HEAD_INIT(type) size,
+  #define PyType_Modified(t)
+  typedef struct {
+     void *buf;
+     PyObject *obj;
+     Py_ssize_t len;
+     Py_ssize_t itemsize;
+     int readonly;
+     int ndim;
+     char *format;
+     Py_ssize_t *shape;
+     Py_ssize_t *strides;
+     Py_ssize_t *suboffsets;
+     void *internal;
+  } Py_buffer;
+  #define PyBUF_SIMPLE 0
+  #define PyBUF_WRITABLE 0x0001
+  #define PyBUF_FORMAT 0x0004
+  #define PyBUF_ND 0x0008
+  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
+  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
+  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
+  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
+  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
+  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
+  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
+  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
+  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
+#endif
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
+#else
+  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define Py_TPFLAGS_CHECKTYPES 0
+  #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
+  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
+#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
+  #define Py_TPFLAGS_IS_ABSTRACT 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+  #define CYTHON_PEP393_ENABLED 1
+  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
+                                              0 : _PyUnicode_Ready((PyObject *)(op)))
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
+  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
+#else
+  #define CYTHON_PEP393_ENABLED 0
+  #define __Pyx_PyUnicode_READY(op)       (0)
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBaseString_Type            PyUnicode_Type
+  #define PyStringObject               PyUnicodeObject
+  #define PyString_Type                PyUnicode_Type
+  #define PyString_Check               PyUnicode_Check
+  #define PyString_CheckExact          PyUnicode_CheckExact
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PyBytesObject                PyStringObject
+  #define PyBytes_Type                 PyString_Type
+  #define PyBytes_Check                PyString_Check
+  #define PyBytes_CheckExact           PyString_CheckExact
+  #define PyBytes_FromString           PyString_FromString
+  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
+  #define PyBytes_FromFormat           PyString_FromFormat
+  #define PyBytes_DecodeEscape         PyString_DecodeEscape
+  #define PyBytes_AsString             PyString_AsString
+  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
+  #define PyBytes_Size                 PyString_Size
+  #define PyBytes_AS_STRING            PyString_AS_STRING
+  #define PyBytes_GET_SIZE             PyString_GET_SIZE
+  #define PyBytes_Repr                 PyString_Repr
+  #define PyBytes_Concat               PyString_Concat
+  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
+  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
+#endif
+#ifndef PySet_CheckExact
+  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#if PY_MAJOR_VERSION >= 3
+  #define PyIntObject                  PyLongObject
+  #define PyInt_Type                   PyLong_Type
+  #define PyInt_Check(op)              PyLong_Check(op)
+  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
+  #define PyInt_FromString             PyLong_FromString
+  #define PyInt_FromUnicode            PyLong_FromUnicode
+  #define PyInt_FromLong               PyLong_FromLong
+  #define PyInt_FromSize_t             PyLong_FromSize_t
+  #define PyInt_FromSsize_t            PyLong_FromSsize_t
+  #define PyInt_AsLong                 PyLong_AsLong
+  #define PyInt_AS_LONG                PyLong_AS_LONG
+  #define PyInt_AsSsize_t              PyLong_AsSsize_t
+  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
+  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBoolObject                 PyLongObject
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+  typedef long Py_hash_t;
+  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
+#else
+  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
+#endif
+#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
+  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
+  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
+#else
+  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
+  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
+  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
+  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
+#else
+  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
+  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
+  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  #define __Pyx_NAMESTR(n) ((char *)(n))
+  #define __Pyx_DOCSTR(n)  ((char *)(n))
+#else
+  #define __Pyx_NAMESTR(n) (n)
+  #define __Pyx_DOCSTR(n)  (n)
+#endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
+
+
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
+#else
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+  #ifdef __cplusplus
+    #define __PYX_EXTERN_C extern "C"
+  #else
+    #define __PYX_EXTERN_C extern
+  #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE__pysam__cfaidx
+#define __PYX_HAVE_API__pysam__cfaidx
+#include "stdint.h"
+#include "string.h"
+#include "stdlib.h"
+#include "stdio.h"
+#include "zlib.h"
+#include "htslib/kstring.h"
+#include "htslib/hfile.h"
+#include "htslib/bgzf.h"
+#include "htslib/hts.h"
+#include "htslib/sam.h"
+#include "pysam_stream.h"
+#include "htslib/faidx.h"
+#include "htslib/tbx.h"
+#include "pythread.h"
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
+#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
+
+
+#ifdef __GNUC__
+  /* Test for GCC > 2.95 */
+  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
+    #define likely(x)   __builtin_expect(!!(x), 1)
+    #define unlikely(x) __builtin_expect(!!(x), 0)
+  #else /* __GNUC__ > 2 ... */
+    #define likely(x)   (x)
+    #define unlikely(x) (x)
+  #endif /* __GNUC__ > 2 ... */
+#else /* __GNUC__ */
+  #define likely(x)   (x)
+  #define unlikely(x) (x)
+#endif /* __GNUC__ */
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+  "cfaidx.pyx",
+  "type.pxd",
+  "bool.pxd",
+  "complex.pxd",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_5pysam_6cfaidx_Fastafile;
+struct __pyx_obj_5pysam_6cfaidx_FastqProxy;
+struct __pyx_obj_5pysam_6cfaidx_Fastqfile;
+struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open;
+struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr;
+struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr;
+
+/* "pysam/cfaidx.pxd":14
+ *         char *s
+ * 
+ * cdef class Fastafile:             # <<<<<<<<<<<<<<
+ *     cdef object _filename, _references, _lengths, reference2length
+ *     cdef faidx_t* fastafile
+ */
+struct __pyx_obj_5pysam_6cfaidx_Fastafile {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_6cfaidx_Fastafile *__pyx_vtab;
+  PyObject *_filename;
+  PyObject *_references;
+  PyObject *_lengths;
+  PyObject *reference2length;
+  faidx_t *fastafile;
+};
+
+
+/* "pysam/cfaidx.pxd":21
+ * 
+ * 
+ * cdef class FastqProxy:             # <<<<<<<<<<<<<<
+ *     cdef kseq_t * _delegate
+ * 
+ */
+struct __pyx_obj_5pysam_6cfaidx_FastqProxy {
+  PyObject_HEAD
+  kseq_t *_delegate;
+};
+
+
+/* "pysam/cfaidx.pxd":25
+ * 
+ * 
+ * cdef class Fastqfile:             # <<<<<<<<<<<<<<
+ *     cdef object _filename
+ *     cdef gzFile fastqfile
+ */
+struct __pyx_obj_5pysam_6cfaidx_Fastqfile {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_6cfaidx_Fastqfile *__pyx_vtab;
+  PyObject *_filename;
+  gzFile fastqfile;
+  kseq_t *entry;
+};
+
+
+/* "pysam/cfaidx.pyx":93
+ *         return faidx_fetch_nseq(self.fastafile)
+ * 
+ *     def _open(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an indexed fasta file.
+ * 
+ */
+struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open {
+  PyObject_HEAD
+  PyObject *__pyx_v_data;
+};
+
+
+/* "pysam/cfaidx.pyx":113
+ *         with open( self._filename + b".fai" ) as inf:
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)             # <<<<<<<<<<<<<<
+ *             self._lengths = tuple(int(x[1]) for x in data)
+ *             self.reference2length = dict(zip(self._references, self._lengths))
+ */
+struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr {
+  PyObject_HEAD
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *__pyx_outer_scope;
+  PyObject *__pyx_v_x;
+  PyObject *__pyx_t_0;
+  Py_ssize_t __pyx_t_1;
+};
+
+
+/* "pysam/cfaidx.pyx":114
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)
+ *             self._lengths = tuple(int(x[1]) for x in data)             # <<<<<<<<<<<<<<
+ *             self.reference2length = dict(zip(self._references, self._lengths))
+ * 
+ */
+struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr {
+  PyObject_HEAD
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *__pyx_outer_scope;
+  PyObject *__pyx_v_x;
+  PyObject *__pyx_t_0;
+  Py_ssize_t __pyx_t_1;
+};
+
+
+
+/* "pysam/cfaidx.pyx":63
+ * cdef int max_pos = 2 << 29
+ * 
+ * cdef class Fastafile:             # <<<<<<<<<<<<<<
+ *     '''*(filename)*
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_6cfaidx_Fastafile {
+  char *(*_fetch)(struct __pyx_obj_5pysam_6cfaidx_Fastafile *, char *, int, int, int *);
+};
+static struct __pyx_vtabstruct_5pysam_6cfaidx_Fastafile *__pyx_vtabptr_5pysam_6cfaidx_Fastafile;
+
+
+/* "pysam/cfaidx.pyx":268
+ *             else: return None
+ * 
+ * cdef class Fastqfile:             # <<<<<<<<<<<<<<
+ *     '''*(filename)*
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_6cfaidx_Fastqfile {
+  kseq_t *(*getCurrent)(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *);
+  int (*cnext)(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *);
+};
+static struct __pyx_vtabstruct_5pysam_6cfaidx_Fastqfile *__pyx_vtabptr_5pysam_6cfaidx_Fastqfile;
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
+  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          if (acquire_gil) { \
+              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+              PyGILState_Release(__pyx_gilstate_save); \
+          } else { \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+          }
+#else
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+  #define __Pyx_RefNannyFinishContext() \
+          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+  #define __Pyx_RefNannyDeclarations
+  #define __Pyx_RefNannySetupContext(name, acquire_gil)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XINCREF(r) Py_XINCREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
+  #define __Pyx_XGOTREF(r)
+  #define __Pyx_XGIVEREF(r)
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
+#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
+
+#ifndef CYTHON_PROFILE
+  #define CYTHON_PROFILE 1
+#endif
+#ifndef CYTHON_TRACE
+  #define CYTHON_TRACE 0
+#endif
+#if CYTHON_TRACE
+  #undef CYTHON_PROFILE_REUSE_FRAME
+#endif
+#ifndef CYTHON_PROFILE_REUSE_FRAME
+  #define CYTHON_PROFILE_REUSE_FRAME 0
+#endif
+#if CYTHON_PROFILE || CYTHON_TRACE
+  #include "compile.h"
+  #include "frameobject.h"
+  #include "traceback.h"
+  #if CYTHON_PROFILE_REUSE_FRAME
+    #define CYTHON_FRAME_MODIFIER static
+    #define CYTHON_FRAME_DEL
+  #else
+    #define CYTHON_FRAME_MODIFIER
+    #define CYTHON_FRAME_DEL Py_CLEAR(__pyx_frame)
+  #endif
+  #define __Pyx_TraceDeclarations                                     \
+  static PyCodeObject *__pyx_frame_code = NULL;                      \
+  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;           \
+  int __Pyx_use_tracing = 0;
+  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)                            \
+  if (unlikely(PyThreadState_GET()->use_tracing &&                                   \
+          (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc)))) {      \
+      __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno);  \
+  }
+  #define __Pyx_TraceException()                                                           \
+  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing &&                   \
+          (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc))) {  \
+      PyThreadState* tstate = PyThreadState_GET();                                         \
+      tstate->use_tracing = 0;                                                             \
+      PyObject *exc_info = __Pyx_GetExceptionTuple();                                      \
+      if (exc_info) {                                                                      \
+          if (CYTHON_TRACE && tstate->c_tracefunc)                                         \
+              tstate->c_tracefunc(                                                         \
+                  tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);          \
+          tstate->c_profilefunc(                                                           \
+              tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);            \
+          Py_DECREF(exc_info);                                                             \
+      }                                                                                    \
+      tstate->use_tracing = 1;                                                             \
+  }
+  #define __Pyx_TraceReturn(result)                                                  \
+  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing) {             \
+      PyThreadState* tstate = PyThreadState_GET();                                   \
+      tstate->use_tracing = 0;                                                        \
+      if (CYTHON_TRACE && tstate->c_tracefunc)                                       \
+          tstate->c_tracefunc(                                                       \
+              tstate->c_traceobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);  \
+      if (tstate->c_profilefunc)                                                     \
+          tstate->c_profilefunc(                                                     \
+              tstate->c_profileobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);  \
+      CYTHON_FRAME_DEL;                                                              \
+      tstate->use_tracing = 1;                                                       \
+  }
+  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/
+  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
+#else
+  #define __Pyx_TraceDeclarations
+  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)
+  #define __Pyx_TraceException()
+  #define __Pyx_TraceReturn(result)
+#endif /* CYTHON_PROFILE */
+#if CYTHON_TRACE
+  #define __Pyx_TraceLine(lineno)                                                          \
+  if (unlikely(__Pyx_use_tracing) && unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_tracefunc)) {    \
+      PyThreadState* tstate = PyThreadState_GET();                                         \
+      __pyx_frame->f_lineno = lineno;                                                     \
+      tstate->use_tracing = 0;                                                             \
+      tstate->c_tracefunc(tstate->c_traceobj, __pyx_frame, PyTrace_LINE, NULL);           \
+      tstate->use_tracing = 1;                                                             \
+  }
+#else
+  #define __Pyx_TraceLine(lineno)
+#endif
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+
+static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/
+
+static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
+
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
+               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck);
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
+
+#if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX >= 0x03020000 || PY_MAJOR_VERSION < 3 && PY_VERSION_HEX >= 0x02070000)
+static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
+    PyObject *res;
+    PyTypeObject *tp = Py_TYPE(obj);
+#if PY_MAJOR_VERSION < 3
+    if (unlikely(PyInstance_Check(obj)))
+        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
+#endif
+    res = _PyType_Lookup(tp, attr_name);
+    if (likely(res)) {
+        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
+        if (!f) {
+            Py_INCREF(res);
+        } else {
+            res = f(res, obj, (PyObject *)tp);
+        }
+    } else {
+        PyErr_SetObject(PyExc_AttributeError, attr_name);
+    }
+    return res;
+}
+#else
+#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len)) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_WriteUnraisable(const char *name, int clineno,
+                                  int lineno, const char *filename,
+                                  int full_traceback); /*proto*/
+
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
+    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
+    const char* function_name); /*proto*/
+
+static 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 void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
+    int result = PySequence_Contains(seq, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+#include <string.h>
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
+    PyObject *method, *result = NULL;
+    if (unlikely(!args)) return NULL;
+    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+    if (unlikely(!method)) goto bad;
+    result = __Pyx_PyObject_Call(method, args, NULL);
+    Py_DECREF(method);
+bad:
+    Py_DECREF(args);
+    return result;
+}
+#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
+#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
+#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
+#define __Pyx_PyObject_CallMethod0(obj, name) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))
+
+#define __Pyx_Generator_USED
+#include <structmember.h>
+#include <frameobject.h>
+typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
+typedef struct {
+    PyObject_HEAD
+    __pyx_generator_body_t body;
+    PyObject *closure;
+    PyObject *exc_type;
+    PyObject *exc_value;
+    PyObject *exc_traceback;
+    PyObject *gi_weakreflist;
+    PyObject *classobj;
+    PyObject *yieldfrom;
+    int resume_label;
+    char is_running;
+} __pyx_GeneratorObject;
+static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
+                                                  PyObject *closure);
+static int __pyx_Generator_init(void);
+static int __Pyx_Generator_clear(PyObject* self);
+#if 1 || PY_VERSION_HEX < 0x030300B0
+static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
+#else
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
+#endif
+
+static int __Pyx_check_binary_version(void);
+
+#if !defined(__Pyx_PyIdentifier_FromString)
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
+#else
+  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
+#endif
+#endif
+
+static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
+
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
+
+typedef struct {
+    int code_line;
+    PyCodeObject* code_object;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+    int count;
+    int max_count;
+    __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename); /*proto*/
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+
+
+/* Module declarations from 'libc.stdint' */
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libc.stdlib' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from 'pysam.chtslib' */
+
+/* Module declarations from 'cpython.version' */
+
+/* Module declarations from 'cpython.ref' */
+
+/* Module declarations from 'cpython.exc' */
+
+/* Module declarations from 'cpython.module' */
+
+/* Module declarations from 'cpython.mem' */
+
+/* Module declarations from 'cpython.tuple' */
+
+/* Module declarations from 'cpython.list' */
+
+/* Module declarations from 'cpython.object' */
+
+/* Module declarations from 'cpython.sequence' */
+
+/* Module declarations from 'cpython.mapping' */
+
+/* Module declarations from 'cpython.iterator' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.type' */
+static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
+
+/* Module declarations from 'cpython.number' */
+
+/* Module declarations from 'cpython.int' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.bool' */
+static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
+
+/* Module declarations from 'cpython.long' */
+
+/* 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' */
+
+/* Module declarations from 'cpython.dict' */
+
+/* Module declarations from 'cpython.instance' */
+
+/* Module declarations from 'cpython.function' */
+
+/* Module declarations from 'cpython.method' */
+
+/* Module declarations from 'cpython.weakref' */
+
+/* Module declarations from 'cpython.getargs' */
+
+/* Module declarations from 'cpython.pythread' */
+
+/* Module declarations from 'cpython.pystate' */
+
+/* Module declarations from 'cpython.cobject' */
+
+/* Module declarations from 'cpython.oldbuffer' */
+
+/* Module declarations from 'cpython.set' */
+
+/* Module declarations from 'cpython.buffer' */
+
+/* Module declarations from 'cpython.bytes' */
+
+/* Module declarations from 'cpython.pycapsule' */
+
+/* Module declarations from 'cpython' */
+
+/* Module declarations from 'pysam.cfaidx' */
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx_Fastafile = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx_FastqProxy = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx_Fastqfile = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx___pyx_scope_struct___open = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx___pyx_scope_struct_1_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx___pyx_scope_struct_2_genexpr = 0;
+static PyObject *__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING = 0;
+static int __pyx_v_5pysam_6cfaidx_max_pos;
+static PyObject *__pyx_f_5pysam_6cfaidx_makeFastqProxy(kseq_t *); /*proto*/
+static PyObject *__pyx_f_5pysam_6cfaidx__encodeFilename(PyObject *); /*proto*/
+#define __Pyx_MODULE_NAME "pysam.cfaidx"
+int __pyx_module_is_main_pysam__cfaidx = 0;
+
+/* Implementation of 'pysam.cfaidx' */
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_IOError;
+static PyObject *__pyx_builtin_open;
+static PyObject *__pyx_builtin_zip;
+static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_StopIteration;
+static int __pyx_pf_5pysam_6cfaidx_9Fastafile___cinit__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_2_isOpen(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self); /* proto */
+static Py_ssize_t __pyx_pf_5pysam_6cfaidx_9Fastafile_4__len__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_5_open_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_5_open_3genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_6_open(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_8close(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_6cfaidx_9Fastafile_10__dealloc__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_8filename___get__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_10references___get__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_11nreferences___get__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_7lengths___get__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_12fetch(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_14getReferenceLength(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_16__getitem__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
+static int __pyx_pf_5pysam_6cfaidx_9Fastafile_18__contains__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
+static int __pyx_pf_5pysam_6cfaidx_10FastqProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_10FastqProxy_4name___get__(struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_10FastqProxy_8sequence___get__(struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_10FastqProxy_7comment___get__(struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_10FastqProxy_7quality___get__(struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_6cfaidx_9Fastqfile___cinit__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_2_isOpen(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_4_open(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_6close(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_6cfaidx_9Fastqfile_8__dealloc__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_8filename___get__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_10__iter__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_12__next__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_tp_new_5pysam_6cfaidx_Fastafile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6cfaidx_FastqProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6cfaidx_Fastqfile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct___open(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_r[] = "r";
+static char __pyx_k__3[] = "\t";
+static char __pyx_k__8[] = "";
+static char __pyx_k_os[] = "os";
+static char __pyx_k_all[] = "__all__";
+static char __pyx_k_end[] = "end";
+static char __pyx_k_fai[] = ".fai";
+static char __pyx_k_sys[] = "sys";
+static char __pyx_k_zip[] = "zip";
+static char __pyx_k_args[] = "args";
+static char __pyx_k_exit[] = "__exit__";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_open[] = "open";
+static char __pyx_k_path[] = "path";
+static char __pyx_k_send[] = "send";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_ascii[] = "ascii";
+static char __pyx_k_close[] = "close";
+static char __pyx_k_enter[] = "__enter__";
+static char __pyx_k_fetch[] = "fetch";
+static char __pyx_k_s_i_i[] = "%s:%i-%i";
+static char __pyx_k_split[] = "split";
+static char __pyx_k_start[] = "start";
+static char __pyx_k_throw[] = "throw";
+static char __pyx_k_encode[] = "encode";
+static char __pyx_k_exists[] = "exists";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_isOpen[] = "_isOpen";
+static char __pyx_k_open_2[] = "_open";
+static char __pyx_k_region[] = "region";
+static char __pyx_k_IOError[] = "IOError";
+static char __pyx_k_Fastafile[] = "Fastafile";
+static char __pyx_k_Fastqfile[] = "Fastqfile";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_reference[] = "reference";
+static char __pyx_k_IS_PYTHON3[] = "IS_PYTHON3";
+static char __pyx_k_IndexError[] = "IndexError";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static char __pyx_k_references[] = "references";
+static char __pyx_k_StopIteration[] = "StopIteration";
+static char __pyx_k_end_out_of_range_i[] = "end out of range (%i)";
+static char __pyx_k_getdefaultencoding[] = "getdefaultencoding";
+static char __pyx_k_start_out_of_range_i[] = "start out of range (%i)";
+static char __pyx_k_could_not_open_file_s[] = "could not open file `%s`";
+static char __pyx_k_getfilesystemencoding[] = "getfilesystemencoding";
+static char __pyx_k_calling_len_on_closed_file[] = "calling len() on closed file";
+static char __pyx_k_No_such_file_or_directory_s[] = "No such file or directory: %s";
+static char __pyx_k_could_not_locate_index_file[] = "could not locate index file";
+static char __pyx_k_no_sequence_region_supplied[] = "no sequence/region supplied.";
+static char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on closed file";
+static char __pyx_k_invalid_region_start_i_end_i[] = "invalid region: start (%i) > end (%i)";
+static char __pyx_k_Argument_must_be_string_or_unico[] = "Argument must be string or unicode.";
+static char __pyx_k_number_of_term_filename_associat[] = "number of :term:`filename` associated with this object.";
+static char __pyx_k_number_of_term_reference_sequenc[] = "number of :term:`reference` sequences in the file.";
+static char __pyx_k_tuple_with_the_lengths_of_term_r[] = "tuple with the lengths of :term:`reference` sequences.";
+static char __pyx_k_tuple_with_the_names_of_term_ref[] = "tuple with the names of :term:`reference` sequences.";
+static PyObject *__pyx_kp_u_Argument_must_be_string_or_unico;
+static PyObject *__pyx_n_s_Fastafile;
+static PyObject *__pyx_n_s_Fastqfile;
+static PyObject *__pyx_n_s_IOError;
+static PyObject *__pyx_n_s_IS_PYTHON3;
+static PyObject *__pyx_kp_s_I_O_operation_on_closed_file;
+static PyObject *__pyx_n_s_IndexError;
+static PyObject *__pyx_kp_s_No_such_file_or_directory_s;
+static PyObject *__pyx_n_s_StopIteration;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_kp_s__3;
+static PyObject *__pyx_kp_b__8;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_ascii;
+static PyObject *__pyx_kp_s_calling_len_on_closed_file;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_kp_s_could_not_locate_index_file;
+static PyObject *__pyx_kp_s_could_not_open_file_s;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_end;
+static PyObject *__pyx_kp_s_end_out_of_range_i;
+static PyObject *__pyx_n_s_enter;
+static PyObject *__pyx_n_s_exists;
+static PyObject *__pyx_n_s_exit;
+static PyObject *__pyx_kp_b_fai;
+static PyObject *__pyx_n_s_fetch;
+static PyObject *__pyx_n_s_getdefaultencoding;
+static PyObject *__pyx_n_s_getfilesystemencoding;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_kp_s_invalid_region_start_i_end_i;
+static PyObject *__pyx_n_s_isOpen;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_kp_s_no_sequence_region_supplied;
+static PyObject *__pyx_n_s_open;
+static PyObject *__pyx_n_s_open_2;
+static PyObject *__pyx_n_s_os;
+static PyObject *__pyx_n_s_path;
+static PyObject *__pyx_n_s_pyx_vtable;
+static PyObject *__pyx_n_s_reference;
+static PyObject *__pyx_n_s_references;
+static PyObject *__pyx_n_s_region;
+static PyObject *__pyx_kp_s_s_i_i;
+static PyObject *__pyx_n_s_send;
+static PyObject *__pyx_n_s_split;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_kp_s_start_out_of_range_i;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_throw;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+
+/* "pysam/cfaidx.pyx":8
+ * 
+ * cdef class FastqProxy
+ * cdef makeFastqProxy(kseq_t * src):             # <<<<<<<<<<<<<<
+ *     '''enter src into AlignedRead.'''
+ *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
+ */
+
+static PyObject *__pyx_f_5pysam_6cfaidx_makeFastqProxy(kseq_t *__pyx_v_src) {
+  struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_dest = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("makeFastqProxy", 0);
+  __Pyx_TraceCall("makeFastqProxy", __pyx_f[0], 8);
+
+  /* "pysam/cfaidx.pyx":10
+ * cdef makeFastqProxy(kseq_t * src):
+ *     '''enter src into AlignedRead.'''
+ *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)             # <<<<<<<<<<<<<<
+ *     dest._delegate = src
+ *     return dest
+ */
+  __pyx_t_1 = __pyx_tp_new_5pysam_6cfaidx_FastqProxy(((PyTypeObject *)((PyObject*)__pyx_ptype_5pysam_6cfaidx_FastqProxy)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_6cfaidx_FastqProxy)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_dest = ((struct __pyx_obj_5pysam_6cfaidx_FastqProxy *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/cfaidx.pyx":11
+ *     '''enter src into AlignedRead.'''
+ *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
+ *     dest._delegate = src             # <<<<<<<<<<<<<<
+ *     return dest
+ * 
+ */
+  __pyx_v_dest->_delegate = __pyx_v_src;
+
+  /* "pysam/cfaidx.pyx":12
+ *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
+ *     dest._delegate = src
+ *     return dest             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
+  __pyx_r = ((PyObject *)__pyx_v_dest);
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":8
+ * 
+ * cdef class FastqProxy
+ * cdef makeFastqProxy(kseq_t * src):             # <<<<<<<<<<<<<<
+ *     '''enter src into AlignedRead.'''
+ *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.cfaidx.makeFastqProxy", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":46
+ * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+ * 
+ * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ */
+
+static PyObject *__pyx_f_5pysam_6cfaidx__encodeFilename(PyObject *__pyx_v_filename) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_encodeFilename", 0);
+  __Pyx_TraceCall("_encodeFilename", __pyx_f[0], 46);
+
+  /* "pysam/cfaidx.pyx":48
+ * cdef bytes _encodeFilename(object filename):
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:             # <<<<<<<<<<<<<<
+ *         return None
+ *     elif PyBytes_Check(filename):
+ */
+  __pyx_t_1 = (__pyx_v_filename == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/cfaidx.pyx":49
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ *         return None             # <<<<<<<<<<<<<<
+ *     elif PyBytes_Check(filename):
+ *         return filename
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = ((PyObject*)Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/cfaidx.pyx":50
+ *     if filename is None:
+ *         return None
+ *     elif PyBytes_Check(filename):             # <<<<<<<<<<<<<<
+ *         return filename
+ *     elif PyUnicode_Check(filename):
+ */
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/cfaidx.pyx":51
+ *         return None
+ *     elif PyBytes_Check(filename):
+ *         return filename             # <<<<<<<<<<<<<<
+ *     elif PyUnicode_Check(filename):
+ *         return filename.encode(_FILENAME_ENCODING)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_filename);
+    __pyx_r = ((PyObject*)__pyx_v_filename);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/cfaidx.pyx":52
+ *     elif PyBytes_Check(filename):
+ *         return filename
+ *     elif PyUnicode_Check(filename):             # <<<<<<<<<<<<<<
+ *         return filename.encode(_FILENAME_ENCODING)
+ *     else:
+ */
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/cfaidx.pyx":53
+ *         return filename
+ *     elif PyUnicode_Check(filename):
+ *         return filename.encode(_FILENAME_ENCODING)             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string or unicode."
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_5pysam_6cfaidx__FILENAME_ENCODING);
+    __Pyx_GIVEREF(__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_5);
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/cfaidx.pyx":55
+ *         return filename.encode(_FILENAME_ENCODING)
+ *     else:
+ *         raise TypeError, u"Argument must be string or unicode."             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_or_unico, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/cfaidx.pyx":46
+ * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+ * 
+ * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.cfaidx._encodeFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":75
+ *     '''
+ * 
+ *     def __cinit__(self, *args, **kwargs ):             # <<<<<<<<<<<<<<
+ *         self.fastafile = NULL
+ *         self._filename = None
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_6cfaidx_9Fastafile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_6cfaidx_9Fastafile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_args = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
+  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
+  if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  __Pyx_INCREF(__pyx_args);
+  __pyx_v_args = __pyx_args;
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile___cinit__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_args);
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_6cfaidx_9Fastafile___cinit__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_TraceCall("__cinit__", __pyx_f[0], 75);
+
+  /* "pysam/cfaidx.pyx":76
+ * 
+ *     def __cinit__(self, *args, **kwargs ):
+ *         self.fastafile = NULL             # <<<<<<<<<<<<<<
+ *         self._filename = None
+ *         self._references = None
+ */
+  __pyx_v_self->fastafile = NULL;
+
+  /* "pysam/cfaidx.pyx":77
+ *     def __cinit__(self, *args, **kwargs ):
+ *         self.fastafile = NULL
+ *         self._filename = None             # <<<<<<<<<<<<<<
+ *         self._references = None
+ *         self._lengths = None
+ */
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_filename);
+  __Pyx_DECREF(__pyx_v_self->_filename);
+  __pyx_v_self->_filename = Py_None;
+
+  /* "pysam/cfaidx.pyx":78
+ *         self.fastafile = NULL
+ *         self._filename = None
+ *         self._references = None             # <<<<<<<<<<<<<<
+ *         self._lengths = None
+ *         self.reference2length = None
+ */
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_references);
+  __Pyx_DECREF(__pyx_v_self->_references);
+  __pyx_v_self->_references = Py_None;
+
+  /* "pysam/cfaidx.pyx":79
+ *         self._filename = None
+ *         self._references = None
+ *         self._lengths = None             # <<<<<<<<<<<<<<
+ *         self.reference2length = None
+ *         self._open( *args, **kwargs )
+ */
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_lengths);
+  __Pyx_DECREF(__pyx_v_self->_lengths);
+  __pyx_v_self->_lengths = Py_None;
+
+  /* "pysam/cfaidx.pyx":80
+ *         self._references = None
+ *         self._lengths = None
+ *         self.reference2length = None             # <<<<<<<<<<<<<<
+ *         self._open( *args, **kwargs )
+ * 
+ */
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->reference2length);
+  __Pyx_DECREF(__pyx_v_self->reference2length);
+  __pyx_v_self->reference2length = Py_None;
+
+  /* "pysam/cfaidx.pyx":81
+ *         self._lengths = None
+ *         self.reference2length = None
+ *         self._open( *args, **kwargs )             # <<<<<<<<<<<<<<
+ * 
+ *     def _isOpen( self ):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __pyx_v_kwargs;
+  __Pyx_INCREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); 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);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/cfaidx.pyx":75
+ *     '''
+ * 
+ *     def __cinit__(self, *args, **kwargs ):             # <<<<<<<<<<<<<<
+ *         self.fastafile = NULL
+ *         self._filename = None
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":83
+ *         self._open( *args, **kwargs )
+ * 
+ *     def _isOpen( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if samfile has been opened.'''
+ *         return self.fastafile != NULL
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastafile_2_isOpen[] = "Fastafile._isOpen(self)\nreturn true if samfile has been opened.";
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_2_isOpen(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_2_isOpen(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_isOpen", 0);
+  __Pyx_TraceCall("_isOpen", __pyx_f[0], 83);
+
+  /* "pysam/cfaidx.pyx":85
+ *     def _isOpen( self ):
+ *         '''return true if samfile has been opened.'''
+ *         return self.fastafile != NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def __len__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->fastafile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":83
+ *         self._open( *args, **kwargs )
+ * 
+ *     def _isOpen( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if samfile has been opened.'''
+ *         return self.fastafile != NULL
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":87
+ *         return self.fastafile != NULL
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         if self.fastafile == NULL:
+ *             raise ValueError( "calling len() on closed file" )
+ */
+
+/* Python wrapper */
+static Py_ssize_t __pyx_pw_5pysam_6cfaidx_9Fastafile_5__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_5pysam_6cfaidx_9Fastafile_5__len__(PyObject *__pyx_v_self) {
+  Py_ssize_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_4__len__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static Py_ssize_t __pyx_pf_5pysam_6cfaidx_9Fastafile_4__len__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self) {
+  Py_ssize_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__len__", 0);
+  __Pyx_TraceCall("__len__", __pyx_f[0], 87);
+
+  /* "pysam/cfaidx.pyx":88
+ * 
+ *     def __len__(self):
+ *         if self.fastafile == NULL:             # <<<<<<<<<<<<<<
+ *             raise ValueError( "calling len() on closed file" )
+ * 
+ */
+  __pyx_t_1 = ((__pyx_v_self->fastafile == NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/cfaidx.pyx":89
+ *     def __len__(self):
+ *         if self.fastafile == NULL:
+ *             raise ValueError( "calling len() on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         return faidx_fetch_nseq(self.fastafile)
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/cfaidx.pyx":91
+ *             raise ValueError( "calling len() on closed file" )
+ * 
+ *         return faidx_fetch_nseq(self.fastafile)             # <<<<<<<<<<<<<<
+ * 
+ *     def _open(self, filename):
+ */
+  __pyx_r = faidx_fetch_nseq(__pyx_v_self->fastafile);
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":87
+ *         return self.fastafile != NULL
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         if self.fastafile == NULL:
+ *             raise ValueError( "calling len() on closed file" )
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":93
+ *         return faidx_fetch_nseq(self.fastafile)
+ * 
+ *     def _open(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an indexed fasta file.
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_7_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastafile_6_open[] = "Fastafile._open(self, filename)\nopen an indexed fasta file.\n\n        This method expects an indexed fasta file.\n        ";
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_7_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_open (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_6_open(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+static PyObject *__pyx_gb_5pysam_6cfaidx_9Fastafile_5_open_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "pysam/cfaidx.pyx":113
+ *         with open( self._filename + b".fai" ) as inf:
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)             # <<<<<<<<<<<<<<
+ *             self._lengths = tuple(int(x[1]) for x in data)
+ *             self.reference2length = dict(zip(self._references, self._lengths))
+ */
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_5_open_genexpr(PyObject *__pyx_self) {
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("genexpr", 0);
+  __pyx_cur_scope = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *)__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct_1_genexpr(__pyx_ptype_5pysam_6cfaidx___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
+  if (unlikely(!__pyx_cur_scope)) {
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __Pyx_GOTREF(__pyx_cur_scope);
+  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *) __pyx_self;
+  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+  __Pyx_TraceCall("genexpr", __pyx_f[0], 113);
+  {
+    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_6cfaidx_9Fastafile_5_open_2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_cur_scope);
+    __Pyx_RefNannyFinishContext();
+    return (PyObject *) gen;
+  }
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile._open.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pysam_6cfaidx_9Fastafile_5_open_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("None", 0);
+  switch (__pyx_generator->resume_label) {
+    case 0: goto __pyx_L3_first_run;
+    case 1: goto __pyx_L6_resume_from_yield;
+    default: /* CPython raises the right error here */
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __pyx_L3_first_run:;
+  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data)) { __Pyx_RaiseClosureNameError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data == Py_None)) {
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+  for (;;) {
+    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #else
+    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #endif
+    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
+    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    __Pyx_XGIVEREF(__pyx_t_1);
+    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+    __Pyx_XGIVEREF(__pyx_r);
+    __Pyx_RefNannyFinishContext();
+    /* return from generator, yielding value */
+    __pyx_generator->resume_label = 1;
+    return __pyx_r;
+    __pyx_L6_resume_from_yield:;
+    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+    __pyx_cur_scope->__pyx_t_0 = 0;
+    __Pyx_XGOTREF(__pyx_t_1);
+    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* function exit code */
+  PyErr_SetNone(PyExc_StopIteration);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_generator->resume_label = -1;
+  __Pyx_Generator_clear((PyObject*)__pyx_generator);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+}
+static PyObject *__pyx_gb_5pysam_6cfaidx_9Fastafile_5_open_5generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "pysam/cfaidx.pyx":114
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)
+ *             self._lengths = tuple(int(x[1]) for x in data)             # <<<<<<<<<<<<<<
+ *             self.reference2length = dict(zip(self._references, self._lengths))
+ * 
+ */
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_5_open_3genexpr(PyObject *__pyx_self) {
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("genexpr", 0);
+  __pyx_cur_scope = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *)__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct_2_genexpr(__pyx_ptype_5pysam_6cfaidx___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
+  if (unlikely(!__pyx_cur_scope)) {
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __Pyx_GOTREF(__pyx_cur_scope);
+  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *) __pyx_self;
+  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+  __Pyx_TraceCall("genexpr", __pyx_f[0], 114);
+  {
+    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_6cfaidx_9Fastafile_5_open_5generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_cur_scope);
+    __Pyx_RefNannyFinishContext();
+    return (PyObject *) gen;
+  }
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile._open.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pysam_6cfaidx_9Fastafile_5_open_5generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("None", 0);
+  switch (__pyx_generator->resume_label) {
+    case 0: goto __pyx_L3_first_run;
+    case 1: goto __pyx_L6_resume_from_yield;
+    default: /* CPython raises the right error here */
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __pyx_L3_first_run:;
+  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data)) { __Pyx_RaiseClosureNameError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data == Py_None)) {
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+  for (;;) {
+    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #else
+    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #endif
+    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
+    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    __Pyx_XGIVEREF(__pyx_t_1);
+    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+    __Pyx_XGIVEREF(__pyx_r);
+    __Pyx_RefNannyFinishContext();
+    /* return from generator, yielding value */
+    __pyx_generator->resume_label = 1;
+    return __pyx_r;
+    __pyx_L6_resume_from_yield:;
+    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+    __pyx_cur_scope->__pyx_t_0 = 0;
+    __Pyx_XGOTREF(__pyx_t_1);
+    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* function exit code */
+  PyErr_SetNone(PyExc_StopIteration);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_generator->resume_label = -1;
+  __Pyx_Generator_clear((PyObject*)__pyx_generator);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+}
+
+/* "pysam/cfaidx.pyx":93
+ *         return faidx_fetch_nseq(self.fastafile)
+ * 
+ *     def _open(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an indexed fasta file.
+ * 
+ */
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_6_open(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_filename) {
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *__pyx_cur_scope;
+  PyObject *__pyx_v_inf = NULL;
+  PyObject *__pyx_v_x = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  Py_ssize_t __pyx_t_11;
+  PyObject *(*__pyx_t_12)(PyObject *);
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *__pyx_t_14 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_open", 0);
+  __pyx_cur_scope = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *)__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct___open(__pyx_ptype_5pysam_6cfaidx___pyx_scope_struct___open, __pyx_empty_tuple, NULL);
+  if (unlikely(!__pyx_cur_scope)) {
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __Pyx_GOTREF(__pyx_cur_scope);
+  __Pyx_TraceCall("_open", __pyx_f[0], 93);
+
+  /* "pysam/cfaidx.pyx":100
+ * 
+ *         # close a previously opened file
+ *         if self.fastafile != NULL: self.close()             # <<<<<<<<<<<<<<
+ *         self._filename = _encodeFilename(filename)
+ *         self.fastafile = fai_load(self._filename)
+ */
+  __pyx_t_1 = ((__pyx_v_self->fastafile != NULL) != 0);
+  if (__pyx_t_1) {
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/cfaidx.pyx":101
+ *         # close a previously opened file
+ *         if self.fastafile != NULL: self.close()
+ *         self._filename = _encodeFilename(filename)             # <<<<<<<<<<<<<<
+ *         self.fastafile = fai_load(self._filename)
+ * 
+ */
+  __pyx_t_3 = __pyx_f_5pysam_6cfaidx__encodeFilename(__pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __Pyx_GOTREF(__pyx_v_self->_filename);
+  __Pyx_DECREF(__pyx_v_self->_filename);
+  __pyx_v_self->_filename = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "pysam/cfaidx.pyx":102
+ *         if self.fastafile != NULL: self.close()
+ *         self._filename = _encodeFilename(filename)
+ *         self.fastafile = fai_load(self._filename)             # <<<<<<<<<<<<<<
+ * 
+ *         if self.fastafile == NULL:
+ */
+  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_self->_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->fastafile = fai_load(__pyx_t_4);
+
+  /* "pysam/cfaidx.pyx":104
+ *         self.fastafile = fai_load(self._filename)
+ * 
+ *         if self.fastafile == NULL:             # <<<<<<<<<<<<<<
+ *             raise IOError("could not open file `%s`" % filename)
+ * 
+ */
+  __pyx_t_1 = ((__pyx_v_self->fastafile == NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/cfaidx.pyx":105
+ * 
+ *         if self.fastafile == NULL:
+ *             raise IOError("could not open file `%s`" % filename)             # <<<<<<<<<<<<<<
+ * 
+ *         # read index
+ */
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_could_not_open_file_s, __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/cfaidx.pyx":108
+ * 
+ *         # read index
+ *         if not os.path.exists( self._filename + b".fai" ):             # <<<<<<<<<<<<<<
+ *             raise ValueError("could not locate index file")
+ * 
+ */
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyNumber_Add(__pyx_v_self->_filename, __pyx_kp_b_fai); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __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 = 108; __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 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __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_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_6 = ((!__pyx_t_1) != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/cfaidx.pyx":109
+ *         # read index
+ *         if not os.path.exists( self._filename + b".fai" ):
+ *             raise ValueError("could not locate index file")             # <<<<<<<<<<<<<<
+ * 
+ *         with open( self._filename + b".fai" ) as inf:
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/cfaidx.pyx":111
+ *             raise ValueError("could not locate index file")
+ * 
+ *         with open( self._filename + b".fai" ) as inf:             # <<<<<<<<<<<<<<
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)
+ */
+  /*with:*/ {
+    __pyx_t_2 = PyNumber_Add(__pyx_v_self->_filename, __pyx_kp_b_fai); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __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 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    /*try:*/ {
+      {
+        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
+        __Pyx_XGOTREF(__pyx_t_8);
+        __Pyx_XGOTREF(__pyx_t_9);
+        __Pyx_XGOTREF(__pyx_t_10);
+        /*try:*/ {
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_v_inf = __pyx_t_3;
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+          /* "pysam/cfaidx.pyx":112
+ * 
+ *         with open( self._filename + b".fai" ) as inf:
+ *             data = [ x.split("\t") for x in inf ]             # <<<<<<<<<<<<<<
+ *             self._references = tuple(x[0] for x in data)
+ *             self._lengths = tuple(int(x[1]) for x in data)
+ */
+          __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          if (PyList_CheckExact(__pyx_v_inf) || PyTuple_CheckExact(__pyx_v_inf)) {
+            __pyx_t_2 = __pyx_v_inf; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
+            __pyx_t_12 = NULL;
+          } else {
+            __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_2);
+            __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext;
+          }
+          for (;;) {
+            if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_2)) {
+              if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
+              #if CYTHON_COMPILING_IN_CPYTHON
+              __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+              #else
+              __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+              #endif
+            } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_2)) {
+              if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+              #if CYTHON_COMPILING_IN_CPYTHON
+              __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+              #else
+              __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+              #endif
+            } else {
+              __pyx_t_5 = __pyx_t_12(__pyx_t_2);
+              if (unlikely(!__pyx_t_5)) {
+                PyObject* exc_type = PyErr_Occurred();
+                if (exc_type) {
+                  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+                  else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+                }
+                break;
+              }
+              __Pyx_GOTREF(__pyx_t_5);
+            }
+            __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5);
+            __pyx_t_5 = 0;
+            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_5);
+            __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_13);
+            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+            if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+          }
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_cur_scope->__pyx_v_data = ((PyObject*)__pyx_t_3);
+          __pyx_t_3 = 0;
+
+          /* "pysam/cfaidx.pyx":113
+ *         with open( self._filename + b".fai" ) as inf:
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)             # <<<<<<<<<<<<<<
+ *             self._lengths = tuple(int(x[1]) for x in data)
+ *             self.reference2length = dict(zip(self._references, self._lengths))
+ */
+          __pyx_t_3 = __pyx_pf_5pysam_6cfaidx_9Fastafile_5_open_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_GIVEREF(__pyx_t_3);
+          __Pyx_GOTREF(__pyx_v_self->_references);
+          __Pyx_DECREF(__pyx_v_self->_references);
+          __pyx_v_self->_references = __pyx_t_3;
+          __pyx_t_3 = 0;
+
+          /* "pysam/cfaidx.pyx":114
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)
+ *             self._lengths = tuple(int(x[1]) for x in data)             # <<<<<<<<<<<<<<
+ *             self.reference2length = dict(zip(self._references, self._lengths))
+ * 
+ */
+          __pyx_t_3 = __pyx_pf_5pysam_6cfaidx_9Fastafile_5_open_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_GIVEREF(__pyx_t_3);
+          __Pyx_GOTREF(__pyx_v_self->_lengths);
+          __Pyx_DECREF(__pyx_v_self->_lengths);
+          __pyx_v_self->_lengths = __pyx_t_3;
+          __pyx_t_3 = 0;
+
+          /* "pysam/cfaidx.pyx":115
+ *             self._references = tuple(x[0] for x in data)
+ *             self._lengths = tuple(int(x[1]) for x in data)
+ *             self.reference2length = dict(zip(self._references, self._lengths))             # <<<<<<<<<<<<<<
+ * 
+ *     def close( self ):
+ */
+          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_INCREF(__pyx_v_self->_references);
+          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_references);
+          __Pyx_GIVEREF(__pyx_v_self->_references);
+          __Pyx_INCREF(__pyx_v_self->_lengths);
+          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->_lengths);
+          __Pyx_GIVEREF(__pyx_v_self->_lengths);
+          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L10_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 = 115; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+          __Pyx_GIVEREF(__pyx_t_2);
+          __pyx_t_2 = 0;
+          __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_GIVEREF(__pyx_t_2);
+          __Pyx_GOTREF(__pyx_v_self->reference2length);
+          __Pyx_DECREF(__pyx_v_self->reference2length);
+          __pyx_v_self->reference2length = __pyx_t_2;
+          __pyx_t_2 = 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;
+        goto __pyx_L17_try_end;
+        __pyx_L10_error:;
+        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+        /* "pysam/cfaidx.pyx":111
+ *             raise ValueError("could not locate index file")
+ * 
+ *         with open( self._filename + b".fai" ) as inf:             # <<<<<<<<<<<<<<
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)
+ */
+        /*except:*/ {
+          __Pyx_AddTraceback("pysam.cfaidx.Fastafile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_GOTREF(__pyx_t_13);
+          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+          if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          if (__pyx_t_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_1 = ((!(__pyx_t_6 != 0)) != 0);
+          if (__pyx_t_1) {
+            __Pyx_GIVEREF(__pyx_t_2);
+            __Pyx_GIVEREF(__pyx_t_3);
+            __Pyx_XGIVEREF(__pyx_t_13);
+            __Pyx_ErrRestore(__pyx_t_2, __pyx_t_3, __pyx_t_13);
+            __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_13 = 0; 
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          }
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+          goto __pyx_L11_exception_handled;
+        }
+        __pyx_L12_except_error:;
+        __Pyx_XGIVEREF(__pyx_t_8);
+        __Pyx_XGIVEREF(__pyx_t_9);
+        __Pyx_XGIVEREF(__pyx_t_10);
+        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
+        goto __pyx_L1_error;
+        __pyx_L11_exception_handled:;
+        __Pyx_XGIVEREF(__pyx_t_8);
+        __Pyx_XGIVEREF(__pyx_t_9);
+        __Pyx_XGIVEREF(__pyx_t_10);
+        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
+        __pyx_L17_try_end:;
+      }
+    }
+    /*finally:*/ {
+      /*normal exit:*/{
+        if (__pyx_t_7) {
+          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__5, NULL);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        }
+        goto __pyx_L9;
+      }
+      __pyx_L9:;
+    }
+    goto __pyx_L24;
+    __pyx_L6_error:;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    goto __pyx_L1_error;
+    __pyx_L24:;
+  }
+
+  /* "pysam/cfaidx.pyx":93
+ *         return faidx_fetch_nseq(self.fastafile)
+ * 
+ *     def _open(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an indexed fasta file.
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_inf);
+  __Pyx_XDECREF(__pyx_v_x);
+  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":117
+ *             self.reference2length = dict(zip(self._references, self._lengths))
+ * 
+ *     def close( self ):             # <<<<<<<<<<<<<<
+ *         if self.fastafile != NULL:
+ *             fai_destroy( self.fastafile )
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastafile_8close[] = "Fastafile.close(self)";
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_8close(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_8close(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("close", 0);
+  __Pyx_TraceCall("close", __pyx_f[0], 117);
+
+  /* "pysam/cfaidx.pyx":118
+ * 
+ *     def close( self ):
+ *         if self.fastafile != NULL:             # <<<<<<<<<<<<<<
+ *             fai_destroy( self.fastafile )
+ *             self.fastafile = NULL
+ */
+  __pyx_t_1 = ((__pyx_v_self->fastafile != NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/cfaidx.pyx":119
+ *     def close( self ):
+ *         if self.fastafile != NULL:
+ *             fai_destroy( self.fastafile )             # <<<<<<<<<<<<<<
+ *             self.fastafile = NULL
+ * 
+ */
+    fai_destroy(__pyx_v_self->fastafile);
+
+    /* "pysam/cfaidx.pyx":120
+ *         if self.fastafile != NULL:
+ *             fai_destroy( self.fastafile )
+ *             self.fastafile = NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__(self):
+ */
+    __pyx_v_self->fastafile = NULL;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/cfaidx.pyx":117
+ *             self.reference2length = dict(zip(self._references, self._lengths))
+ * 
+ *     def close( self ):             # <<<<<<<<<<<<<<
+ *         if self.fastafile != NULL:
+ *             fai_destroy( self.fastafile )
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":122
+ *             self.fastafile = NULL
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         self.close()
+ * 
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_6cfaidx_9Fastafile_11__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_6cfaidx_9Fastafile_11__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_6cfaidx_9Fastafile_10__dealloc__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_6cfaidx_9Fastafile_10__dealloc__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 122);
+
+  /* "pysam/cfaidx.pyx":123
+ * 
+ *     def __dealloc__(self):
+ *         self.close()             # <<<<<<<<<<<<<<
+ * 
+ *     property filename:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/cfaidx.pyx":122
+ *             self.fastafile = NULL
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         self.close()
+ * 
+ */
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_WriteUnraisable("pysam.cfaidx.Fastafile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/cfaidx.pyx":127
+ *     property filename:
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._filename
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_8filename_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_8filename___get__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_8filename___get__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 127);
+
+  /* "pysam/cfaidx.pyx":128
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):
+ *             return self._filename             # <<<<<<<<<<<<<<
+ * 
+ *     property references:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_filename);
+  __pyx_r = __pyx_v_self->_filename;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":127
+ *     property filename:
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._filename
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":132
+ *     property references:
+ *         '''tuple with the names of :term:`reference` sequences.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._references
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_10references_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_10references_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_10references___get__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_10references___get__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 132);
+
+  /* "pysam/cfaidx.pyx":133
+ *         '''tuple with the names of :term:`reference` sequences.'''
+ *         def __get__(self):
+ *             return self._references             # <<<<<<<<<<<<<<
+ * 
+ *     property nreferences:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_references);
+  __pyx_r = __pyx_v_self->_references;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":132
+ *     property references:
+ *         '''tuple with the names of :term:`reference` sequences.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._references
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":137
+ *     property nreferences:
+ *         '''number of :term:`reference` sequences in the file.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return len(self._references) if self.references else None
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_11nreferences_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_11nreferences_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_11nreferences___get__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_11nreferences___get__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  Py_ssize_t __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 137);
+
+  /* "pysam/cfaidx.pyx":138
+ *         '''number of :term:`reference` sequences in the file.'''
+ *         def __get__(self):
+ *             return len(self._references) if self.references else None             # <<<<<<<<<<<<<<
+ * 
+ *     property lengths:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_references); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __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 = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_3) {
+    __pyx_t_2 = __pyx_v_self->_references;
+    __Pyx_INCREF(__pyx_t_2);
+    __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __pyx_t_2;
+    __pyx_t_2 = 0;
+  } else {
+    __Pyx_INCREF(Py_None);
+    __pyx_t_1 = Py_None;
+  }
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":137
+ *     property nreferences:
+ *         '''number of :term:`reference` sequences in the file.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return len(self._references) if self.references else None
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile.nreferences.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":142
+ *     property lengths:
+ *         '''tuple with the lengths of :term:`reference` sequences.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._lengths
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_7lengths_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_7lengths_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_7lengths___get__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_7lengths___get__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 142);
+
+  /* "pysam/cfaidx.pyx":143
+ *         '''tuple with the lengths of :term:`reference` sequences.'''
+ *         def __get__(self):
+ *             return self._lengths             # <<<<<<<<<<<<<<
+ * 
+ *     def fetch( self,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_lengths);
+  __pyx_r = __pyx_v_self->_lengths;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":142
+ *     property lengths:
+ *         '''tuple with the lengths of :term:`reference` sequences.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._lengths
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":145
+ *             return self._lengths
+ * 
+ *     def fetch( self,             # <<<<<<<<<<<<<<
+ *                reference = None,
+ *                start = None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_13fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastafile_12fetch[] = "Fastafile.fetch(self, reference=None, start=None, end=None, region=None)\n*(reference = None, start = None, end = None, region = None)*\n\n        fetch :class:`AlignedRead` objects in a :term:`region` using 0-based indexing.\n\n        The region is specified by :term:`reference`, *start* and *end*.\n\n        fetch returns an empty string if the region is out of range or addresses an unknown *reference*.\n\n        If *refere [...]
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_13fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_reference = 0;
+  PyObject *__pyx_v_start = 0;
+  PyObject *__pyx_v_end = 0;
+  PyObject *__pyx_v_region = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,0};
+    PyObject* values[4] = {0,0,0,0};
+
+    /* "pysam/cfaidx.pyx":146
+ * 
+ *     def fetch( self,
+ *                reference = None,             # <<<<<<<<<<<<<<
+ *                start = None,
+ *                end = None,
+ */
+    values[0] = ((PyObject *)Py_None);
+
+    /* "pysam/cfaidx.pyx":147
+ *     def fetch( self,
+ *                reference = None,
+ *                start = None,             # <<<<<<<<<<<<<<
+ *                end = None,
+ *                region = None):
+ */
+    values[1] = ((PyObject *)Py_None);
+
+    /* "pysam/cfaidx.pyx":148
+ *                reference = None,
+ *                start = None,
+ *                end = None,             # <<<<<<<<<<<<<<
+ *                region = None):
+ * 
+ */
+    values[2] = ((PyObject *)Py_None);
+
+    /* "pysam/cfaidx.pyx":149
+ *                start = None,
+ *                end = None,
+ *                region = None):             # <<<<<<<<<<<<<<
+ * 
+ *         '''*(reference = None, start = None, end = None, region = None)*
+ */
+    values[3] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference);
+          if (value) { values[0] = value; kw_args--; }
+        }
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
+          if (value) { values[3] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_reference = values[0];
+    __pyx_v_start = values[1];
+    __pyx_v_end = values[2];
+    __pyx_v_region = values[3];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_12fetch(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region);
+
+  /* "pysam/cfaidx.pyx":145
+ *             return self._lengths
+ * 
+ *     def fetch( self,             # <<<<<<<<<<<<<<
+ *                reference = None,
+ *                start = None,
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_12fetch(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region) {
+  int __pyx_v_length;
+  char *__pyx_v_seq;
+  PyObject *__pyx_v_py_seq = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  char *__pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  char const *__pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *__pyx_t_14 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("fetch", 0);
+  __Pyx_TraceCall("fetch", __pyx_f[0], 145);
+  __Pyx_INCREF(__pyx_v_start);
+  __Pyx_INCREF(__pyx_v_end);
+  __Pyx_INCREF(__pyx_v_region);
+
+  /* "pysam/cfaidx.pyx":166
+ *         '''
+ * 
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __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 = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/cfaidx.pyx":167
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         cdef int length
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/cfaidx.pyx":172
+ *         cdef char * seq
+ * 
+ *         if not region:             # <<<<<<<<<<<<<<
+ *             if reference is None:
+ *                 raise ValueError('no sequence/region supplied.')
+ */
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = ((!__pyx_t_4) != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/cfaidx.pyx":173
+ * 
+ *         if not region:
+ *             if reference is None:             # <<<<<<<<<<<<<<
+ *                 raise ValueError('no sequence/region supplied.')
+ *             if start is None:
+ */
+    __pyx_t_3 = (__pyx_v_reference == Py_None);
+    __pyx_t_4 = (__pyx_t_3 != 0);
+    if (__pyx_t_4) {
+
+      /* "pysam/cfaidx.pyx":174
+ *         if not region:
+ *             if reference is None:
+ *                 raise ValueError('no sequence/region supplied.')             # <<<<<<<<<<<<<<
+ *             if start is None:
+ *                 start = 0
+ */
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/cfaidx.pyx":175
+ *             if reference is None:
+ *                 raise ValueError('no sequence/region supplied.')
+ *             if start is None:             # <<<<<<<<<<<<<<
+ *                 start = 0
+ *             if end is None:
+ */
+    __pyx_t_4 = (__pyx_v_start == Py_None);
+    __pyx_t_3 = (__pyx_t_4 != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/cfaidx.pyx":176
+ *                 raise ValueError('no sequence/region supplied.')
+ *             if start is None:
+ *                 start = 0             # <<<<<<<<<<<<<<
+ *             if end is None:
+ *                 end = max_pos - 1
+ */
+      __Pyx_INCREF(__pyx_int_0);
+      __Pyx_DECREF_SET(__pyx_v_start, __pyx_int_0);
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+
+    /* "pysam/cfaidx.pyx":177
+ *             if start is None:
+ *                 start = 0
+ *             if end is None:             # <<<<<<<<<<<<<<
+ *                 end = max_pos - 1
+ * 
+ */
+    __pyx_t_3 = (__pyx_v_end == Py_None);
+    __pyx_t_4 = (__pyx_t_3 != 0);
+    if (__pyx_t_4) {
+
+      /* "pysam/cfaidx.pyx":178
+ *                 start = 0
+ *             if end is None:
+ *                 end = max_pos - 1             # <<<<<<<<<<<<<<
+ * 
+ *             if start > end:
+ */
+      __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_5pysam_6cfaidx_max_pos - 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_2);
+      __pyx_t_2 = 0;
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "pysam/cfaidx.pyx":180
+ *                 end = max_pos - 1
+ * 
+ *             if start > end:             # <<<<<<<<<<<<<<
+ *                 raise ValueError(
+ *                     'invalid region: start (%i) > end (%i)' % (start, end))
+ */
+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __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 = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_4) {
+
+      /* "pysam/cfaidx.pyx":182
+ *             if start > end:
+ *                 raise ValueError(
+ *                     'invalid region: start (%i) > end (%i)' % (start, end))             # <<<<<<<<<<<<<<
+ *             if start == end:
+ *                 return b""
+ */
+      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_start);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_start);
+      __Pyx_GIVEREF(__pyx_v_start);
+      __Pyx_INCREF(__pyx_v_end);
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_end);
+      __Pyx_GIVEREF(__pyx_v_end);
+      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_invalid_region_start_i_end_i, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "pysam/cfaidx.pyx":181
+ * 
+ *             if start > end:
+ *                 raise ValueError(             # <<<<<<<<<<<<<<
+ *                     'invalid region: start (%i) > end (%i)' % (start, end))
+ *             if start == end:
+ */
+      __pyx_t_2 = PyTuple_New(1); 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);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/cfaidx.pyx":183
+ *                 raise ValueError(
+ *                     'invalid region: start (%i) > end (%i)' % (start, end))
+ *             if start == end:             # <<<<<<<<<<<<<<
+ *                 return b""
+ *             # valid ranges are from 0 to 2^29-1
+ */
+    __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_4) {
+
+      /* "pysam/cfaidx.pyx":184
+ *                     'invalid region: start (%i) > end (%i)' % (start, end))
+ *             if start == end:
+ *                 return b""             # <<<<<<<<<<<<<<
+ *             # valid ranges are from 0 to 2^29-1
+ *             if not 0 <= start < max_pos:
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(__pyx_kp_b__8);
+      __pyx_r = __pyx_kp_b__8;
+      goto __pyx_L0;
+    }
+
+    /* "pysam/cfaidx.pyx":186
+ *                 return b""
+ *             # valid ranges are from 0 to 2^29-1
+ *             if not 0 <= start < max_pos:             # <<<<<<<<<<<<<<
+ *                 raise IndexError('start out of range (%i)' % start)
+ *             if not 0 <= end < max_pos:
+ */
+    __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_start, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
+      __Pyx_DECREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_5pysam_6cfaidx_max_pos); 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_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_3 = ((!__pyx_t_4) != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/cfaidx.pyx":187
+ *             # valid ranges are from 0 to 2^29-1
+ *             if not 0 <= start < max_pos:
+ *                 raise IndexError('start out of range (%i)' % start)             # <<<<<<<<<<<<<<
+ *             if not 0 <= end < max_pos:
+ *                 raise IndexError('end out of range (%i)' % end)
+ */
+      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_start_out_of_range_i, __pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __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 = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/cfaidx.pyx":188
+ *             if not 0 <= start < max_pos:
+ *                 raise IndexError('start out of range (%i)' % start)
+ *             if not 0 <= end < max_pos:             # <<<<<<<<<<<<<<
+ *                 raise IndexError('end out of range (%i)' % end)
+ *             # note: faidx_fetch_seq has a bug such that out-of-range access
+ */
+    __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_end, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
+      __Pyx_DECREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_5pysam_6cfaidx_max_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = PyObject_RichCompare(__pyx_v_end, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = ((!__pyx_t_3) != 0);
+    if (__pyx_t_4) {
+
+      /* "pysam/cfaidx.pyx":189
+ *                 raise IndexError('start out of range (%i)' % start)
+ *             if not 0 <= end < max_pos:
+ *                 raise IndexError('end out of range (%i)' % end)             # <<<<<<<<<<<<<<
+ *             # note: faidx_fetch_seq has a bug such that out-of-range access
+ *             # always returns the last residue. Hence do not use faidx_fetch_seq,
+ */
+      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_end_out_of_range_i, __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __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 = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/cfaidx.pyx":198
+ *             #                       end-1,
+ *             #                       &length)
+ *             region = "%s:%i-%i" % (reference, start+1, end)             # <<<<<<<<<<<<<<
+ *             if PY_MAJOR_VERSION >= 3:
+ *                 region = region.encode('ascii')
+ */
+    __pyx_t_1 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_reference);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference);
+    __Pyx_GIVEREF(__pyx_v_reference);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_end);
+    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end);
+    __Pyx_GIVEREF(__pyx_v_end);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_i_i, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "pysam/cfaidx.pyx":199
+ *             #                       &length)
+ *             region = "%s:%i-%i" % (reference, start+1, end)
+ *             if PY_MAJOR_VERSION >= 3:             # <<<<<<<<<<<<<<
+ *                 region = region.encode('ascii')
+ *             seq = fai_fetch( self.fastafile,
+ */
+    __pyx_t_4 = ((PY_MAJOR_VERSION >= 3) != 0);
+    if (__pyx_t_4) {
+
+      /* "pysam/cfaidx.pyx":200
+ *             region = "%s:%i-%i" % (reference, start+1, end)
+ *             if PY_MAJOR_VERSION >= 3:
+ *                 region = region.encode('ascii')             # <<<<<<<<<<<<<<
+ *             seq = fai_fetch( self.fastafile,
+ *                              region,
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_region, __pyx_n_s_encode); 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_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, 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_DECREF_SET(__pyx_v_region, __pyx_t_2);
+      __pyx_t_2 = 0;
+      goto __pyx_L12;
+    }
+    __pyx_L12:;
+
+    /* "pysam/cfaidx.pyx":202
+ *                 region = region.encode('ascii')
+ *             seq = fai_fetch( self.fastafile,
+ *                              region,             # <<<<<<<<<<<<<<
+ *                              &length )
+ *         else:
+ */
+    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/cfaidx.pyx":201
+ *             if PY_MAJOR_VERSION >= 3:
+ *                 region = region.encode('ascii')
+ *             seq = fai_fetch( self.fastafile,             # <<<<<<<<<<<<<<
+ *                              region,
+ *                              &length )
+ */
+    __pyx_v_seq = fai_fetch(__pyx_v_self->fastafile, __pyx_t_5, (&__pyx_v_length));
+    goto __pyx_L4;
+  }
+  /*else*/ {
+
+    /* "pysam/cfaidx.pyx":206
+ *         else:
+ *             # samtools adds a '\0' at the end
+ *             seq = fai_fetch( self.fastafile, region, &length )             # <<<<<<<<<<<<<<
+ * 
+ *         # copy to python
+ */
+    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_seq = fai_fetch(__pyx_v_self->fastafile, __pyx_t_5, (&__pyx_v_length));
+  }
+  __pyx_L4:;
+
+  /* "pysam/cfaidx.pyx":209
+ * 
+ *         # copy to python
+ *         if seq == NULL:             # <<<<<<<<<<<<<<
+ *             return b""
+ *         else:
+ */
+  __pyx_t_4 = ((__pyx_v_seq == NULL) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/cfaidx.pyx":210
+ *         # copy to python
+ *         if seq == NULL:
+ *             return b""             # <<<<<<<<<<<<<<
+ *         else:
+ *             try:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_kp_b__8);
+    __pyx_r = __pyx_kp_b__8;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/cfaidx.pyx":212
+ *             return b""
+ *         else:
+ *             try:             # <<<<<<<<<<<<<<
+ *                 py_seq = seq[:length]
+ *             finally:
+ */
+    /*try:*/ {
+
+      /* "pysam/cfaidx.pyx":213
+ *         else:
+ *             try:
+ *                 py_seq = seq[:length]             # <<<<<<<<<<<<<<
+ *             finally:
+ *                 free(seq)
+ */
+      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_seq + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_v_py_seq = ((PyObject*)__pyx_t_2);
+      __pyx_t_2 = 0;
+    }
+
+    /* "pysam/cfaidx.pyx":215
+ *                 py_seq = seq[:length]
+ *             finally:
+ *                 free(seq)             # <<<<<<<<<<<<<<
+ * 
+ *         return py_seq
+ */
+    /*finally:*/ {
+      /*normal exit:*/{
+        free(__pyx_v_seq);
+        goto __pyx_L16;
+      }
+      /*exception exit:*/{
+        __pyx_L15_error:;
+        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
+        __Pyx_XGOTREF(__pyx_t_9);
+        __Pyx_XGOTREF(__pyx_t_10);
+        __Pyx_XGOTREF(__pyx_t_11);
+        __Pyx_XGOTREF(__pyx_t_12);
+        __Pyx_XGOTREF(__pyx_t_13);
+        __Pyx_XGOTREF(__pyx_t_14);
+        __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
+        {
+          free(__pyx_v_seq);
+        }
+        if (PY_MAJOR_VERSION >= 3) {
+          __Pyx_XGIVEREF(__pyx_t_12);
+          __Pyx_XGIVEREF(__pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_14);
+          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+        }
+        __Pyx_XGIVEREF(__pyx_t_9);
+        __Pyx_XGIVEREF(__pyx_t_10);
+        __Pyx_XGIVEREF(__pyx_t_11);
+        __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
+        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+        __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
+        goto __pyx_L1_error;
+      }
+      __pyx_L16:;
+    }
+  }
+
+  /* "pysam/cfaidx.pyx":217
+ *                 free(seq)
+ * 
+ *         return py_seq             # <<<<<<<<<<<<<<
+ * 
+ *     cdef char * _fetch( self, char * reference, int start, int end, int * length ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_py_seq);
+  __pyx_r = __pyx_v_py_seq;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":145
+ *             return self._lengths
+ * 
+ *     def fetch( self,             # <<<<<<<<<<<<<<
+ *                reference = None,
+ *                start = None,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_py_seq);
+  __Pyx_XDECREF(__pyx_v_start);
+  __Pyx_XDECREF(__pyx_v_end);
+  __Pyx_XDECREF(__pyx_v_region);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":219
+ *         return py_seq
+ * 
+ *     cdef char * _fetch( self, char * reference, int start, int end, int * length ):             # <<<<<<<<<<<<<<
+ *         '''fetch sequence for reference, start and end'''
+ * 
+ */
+
+static char *__pyx_f_5pysam_6cfaidx_9Fastafile__fetch(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, char *__pyx_v_reference, int __pyx_v_start, int __pyx_v_end, int *__pyx_v_length) {
+  char *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_fetch", 0);
+  __Pyx_TraceCall("_fetch", __pyx_f[0], 219);
+
+  /* "pysam/cfaidx.pyx":222
+ *         '''fetch sequence for reference, start and end'''
+ * 
+ *         return faidx_fetch_seq(self.fastafile,             # <<<<<<<<<<<<<<
+ *                                reference,
+ *                                start,
+ */
+  __pyx_r = faidx_fetch_seq(__pyx_v_self->fastafile, __pyx_v_reference, __pyx_v_start, (__pyx_v_end - 1), __pyx_v_length);
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":219
+ *         return py_seq
+ * 
+ *     cdef char * _fetch( self, char * reference, int start, int end, int * length ):             # <<<<<<<<<<<<<<
+ *         '''fetch sequence for reference, start and end'''
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":228
+ *                                length )
+ * 
+ *     def getReferenceLength( self, reference ):             # <<<<<<<<<<<<<<
+ *         '''return the length of reference.'''
+ *         return self.reference2length[reference]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_15getReferenceLength(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastafile_14getReferenceLength[] = "Fastafile.getReferenceLength(self, reference)\nreturn the length of reference.";
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_15getReferenceLength(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("getReferenceLength (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_14getReferenceLength(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_14getReferenceLength(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getReferenceLength", 0);
+  __Pyx_TraceCall("getReferenceLength", __pyx_f[0], 228);
+
+  /* "pysam/cfaidx.pyx":230
+ *     def getReferenceLength( self, reference ):
+ *         '''return the length of reference.'''
+ *         return self.reference2length[reference]             # <<<<<<<<<<<<<<
+ * 
+ *     def __getitem__(self, reference):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyObject_GetItem(__pyx_v_self->reference2length, __pyx_v_reference); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":228
+ *                                length )
+ * 
+ *     def getReferenceLength( self, reference ):             # <<<<<<<<<<<<<<
+ *         '''return the length of reference.'''
+ *         return self.reference2length[reference]
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile.getReferenceLength", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":232
+ *         return self.reference2length[reference]
+ * 
+ *     def __getitem__(self, reference):             # <<<<<<<<<<<<<<
+ *         return self.fetch(reference)
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_17__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastafile_17__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_16__getitem__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastafile_16__getitem__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__getitem__", 0);
+  __Pyx_TraceCall("__getitem__", __pyx_f[0], 232);
+
+  /* "pysam/cfaidx.pyx":233
+ * 
+ *     def __getitem__(self, reference):
+ *         return self.fetch(reference)             # <<<<<<<<<<<<<<
+ * 
+ *     def __contains__( self, reference ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fetch); 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);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_v_reference);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference);
+  __Pyx_GIVEREF(__pyx_v_reference);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __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_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":232
+ *         return self.reference2length[reference]
+ * 
+ *     def __getitem__(self, reference):             # <<<<<<<<<<<<<<
+ *         return self.fetch(reference)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":235
+ *         return self.fetch(reference)
+ * 
+ *     def __contains__( self, reference ):             # <<<<<<<<<<<<<<
+ *         '''return true if reference in fasta file.'''
+ *         return reference in self.reference2length
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_6cfaidx_9Fastafile_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastafile_18__contains__[] = "return true if reference in fasta file.";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_6cfaidx_9Fastafile_18__contains__;
+#endif
+static int __pyx_pw_5pysam_6cfaidx_9Fastafile_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastafile_18__contains__(((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_6cfaidx_9Fastafile_18__contains__(struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__contains__", 0);
+  __Pyx_TraceCall("__contains__", __pyx_f[0], 235);
+
+  /* "pysam/cfaidx.pyx":237
+ *     def __contains__( self, reference ):
+ *         '''return true if reference in fasta file.'''
+ *         return reference in self.reference2length             # <<<<<<<<<<<<<<
+ * 
+ * ######################################################################
+ */
+  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_reference, __pyx_v_self->reference2length, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_t_1;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":235
+ *         return self.fetch(reference)
+ * 
+ *     def __contains__( self, reference ):             # <<<<<<<<<<<<<<
+ *         '''return true if reference in fasta file.'''
+ *         return reference in self.reference2length
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.cfaidx.Fastafile.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":246
+ * 
+ * cdef class FastqProxy:
+ *     def __init__(self): pass             # <<<<<<<<<<<<<<
+ * 
+ *     property name:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_6cfaidx_10FastqProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_6cfaidx_10FastqProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_10FastqProxy___init__(((struct __pyx_obj_5pysam_6cfaidx_FastqProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_6cfaidx_10FastqProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 246);
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":249
+ * 
+ *     property name:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.name.s
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_10FastqProxy_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_10FastqProxy_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_10FastqProxy_4name___get__(((struct __pyx_obj_5pysam_6cfaidx_FastqProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_10FastqProxy_4name___get__(struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 249);
+
+  /* "pysam/cfaidx.pyx":250
+ *     property name:
+ *         def __get__(self):
+ *             return self._delegate.name.s             # <<<<<<<<<<<<<<
+ * 
+ *     property sequence:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->_delegate->name.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":249
+ * 
+ *     property name:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.name.s
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.cfaidx.FastqProxy.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":253
+ * 
+ *     property sequence:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.seq.s
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_10FastqProxy_8sequence_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_10FastqProxy_8sequence_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_10FastqProxy_8sequence___get__(((struct __pyx_obj_5pysam_6cfaidx_FastqProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_10FastqProxy_8sequence___get__(struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 253);
+
+  /* "pysam/cfaidx.pyx":254
+ *     property sequence:
+ *         def __get__(self):
+ *             return self._delegate.seq.s             # <<<<<<<<<<<<<<
+ * 
+ *     property comment:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->_delegate->seq.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":253
+ * 
+ *     property sequence:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.seq.s
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.cfaidx.FastqProxy.sequence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":257
+ * 
+ *     property comment:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if self._delegate.comment.l:
+ *                 return self._delegate.comment.s
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_10FastqProxy_7comment_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_10FastqProxy_7comment_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_10FastqProxy_7comment___get__(((struct __pyx_obj_5pysam_6cfaidx_FastqProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_10FastqProxy_7comment___get__(struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 257);
+
+  /* "pysam/cfaidx.pyx":258
+ *     property comment:
+ *         def __get__(self):
+ *             if self._delegate.comment.l:             # <<<<<<<<<<<<<<
+ *                 return self._delegate.comment.s
+ *             else: return None
+ */
+  __pyx_t_1 = (__pyx_v_self->_delegate->comment.l != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/cfaidx.pyx":259
+ *         def __get__(self):
+ *             if self._delegate.comment.l:
+ *                 return self._delegate.comment.s             # <<<<<<<<<<<<<<
+ *             else: return None
+ * 
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->_delegate->comment.s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/cfaidx.pyx":260
+ *             if self._delegate.comment.l:
+ *                 return self._delegate.comment.s
+ *             else: return None             # <<<<<<<<<<<<<<
+ * 
+ *     property quality:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/cfaidx.pyx":257
+ * 
+ *     property comment:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if self._delegate.comment.l:
+ *                 return self._delegate.comment.s
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.cfaidx.FastqProxy.comment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":263
+ * 
+ *     property quality:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if self._delegate.qual.l:
+ *                 return self._delegate.qual.s
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_10FastqProxy_7quality_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_10FastqProxy_7quality_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_10FastqProxy_7quality___get__(((struct __pyx_obj_5pysam_6cfaidx_FastqProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_10FastqProxy_7quality___get__(struct __pyx_obj_5pysam_6cfaidx_FastqProxy *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 263);
+
+  /* "pysam/cfaidx.pyx":264
+ *     property quality:
+ *         def __get__(self):
+ *             if self._delegate.qual.l:             # <<<<<<<<<<<<<<
+ *                 return self._delegate.qual.s
+ *             else: return None
+ */
+  __pyx_t_1 = (__pyx_v_self->_delegate->qual.l != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/cfaidx.pyx":265
+ *         def __get__(self):
+ *             if self._delegate.qual.l:
+ *                 return self._delegate.qual.s             # <<<<<<<<<<<<<<
+ *             else: return None
+ * 
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->_delegate->qual.s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/cfaidx.pyx":266
+ *             if self._delegate.qual.l:
+ *                 return self._delegate.qual.s
+ *             else: return None             # <<<<<<<<<<<<<<
+ * 
+ * cdef class Fastqfile:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/cfaidx.pyx":263
+ * 
+ *     property quality:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if self._delegate.qual.l:
+ *                 return self._delegate.qual.s
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.cfaidx.FastqProxy.quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":274
+ * 
+ *     '''
+ *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
+ *         # self.fastqfile = <gzFile*>NULL
+ *         self._filename = None
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_6cfaidx_9Fastqfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_6cfaidx_9Fastqfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_args = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
+  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
+  if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  __Pyx_INCREF(__pyx_args);
+  __pyx_v_args = __pyx_args;
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastqfile___cinit__(((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_args);
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_6cfaidx_9Fastqfile___cinit__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_TraceCall("__cinit__", __pyx_f[0], 274);
+
+  /* "pysam/cfaidx.pyx":276
+ *     def __cinit__(self, *args, **kwargs):
+ *         # self.fastqfile = <gzFile*>NULL
+ *         self._filename = None             # <<<<<<<<<<<<<<
+ *         self.entry = NULL
+ *         self._open(*args, **kwargs)
+ */
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_filename);
+  __Pyx_DECREF(__pyx_v_self->_filename);
+  __pyx_v_self->_filename = Py_None;
+
+  /* "pysam/cfaidx.pyx":277
+ *         # self.fastqfile = <gzFile*>NULL
+ *         self._filename = None
+ *         self.entry = NULL             # <<<<<<<<<<<<<<
+ *         self._open(*args, **kwargs)
+ * 
+ */
+  __pyx_v_self->entry = NULL;
+
+  /* "pysam/cfaidx.pyx":278
+ *         self._filename = None
+ *         self.entry = NULL
+ *         self._open(*args, **kwargs)             # <<<<<<<<<<<<<<
+ * 
+ *     def _isOpen( self ):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __pyx_v_kwargs;
+  __Pyx_INCREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __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_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/cfaidx.pyx":274
+ * 
+ *     '''
+ *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
+ *         # self.fastqfile = <gzFile*>NULL
+ *         self._filename = None
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastqfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":280
+ *         self._open(*args, **kwargs)
+ * 
+ *     def _isOpen( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if samfile has been opened.'''
+ *         return self.entry != NULL
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastqfile_2_isOpen[] = "Fastqfile._isOpen(self)\nreturn true if samfile has been opened.";
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastqfile_2_isOpen(((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_2_isOpen(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_isOpen", 0);
+  __Pyx_TraceCall("_isOpen", __pyx_f[0], 280);
+
+  /* "pysam/cfaidx.pyx":282
+ *     def _isOpen( self ):
+ *         '''return true if samfile has been opened.'''
+ *         return self.entry != NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def _open(self, filename):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->entry != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":280
+ *         self._open(*args, **kwargs)
+ * 
+ *     def _isOpen( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if samfile has been opened.'''
+ *         return self.entry != NULL
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastqfile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":284
+ *         return self.entry != NULL
+ * 
+ *     def _open(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an indexed fasta file.
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_5_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastqfile_4_open[] = "Fastqfile._open(self, filename)\nopen an indexed fasta file.\n\n        This method expects an indexed fasta file.\n        ";
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_5_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_open (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastqfile_4_open(((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_4_open(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self, PyObject *__pyx_v_filename) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  char *__pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_open", 0);
+  __Pyx_TraceCall("_open", __pyx_f[0], 284);
+  __Pyx_INCREF(__pyx_v_filename);
+
+  /* "pysam/cfaidx.pyx":289
+ *         This method expects an indexed fasta file.
+ *         '''
+ *         self.close()             # <<<<<<<<<<<<<<
+ * 
+ *         if not os.path.exists(filename):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/cfaidx.pyx":291
+ *         self.close()
+ * 
+ *         if not os.path.exists(filename):             # <<<<<<<<<<<<<<
+ *             raise IOError("No such file or directory: %s" % filename)
+ * 
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); 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(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __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 = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_filename);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
+  __Pyx_GIVEREF(__pyx_v_filename);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, 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_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_5 = ((!__pyx_t_4) != 0);
+  if (__pyx_t_5) {
+
+    /* "pysam/cfaidx.pyx":292
+ * 
+ *         if not os.path.exists(filename):
+ *             raise IOError("No such file or directory: %s" % filename)             # <<<<<<<<<<<<<<
+ * 
+ *         filename = _encodeFilename(filename)
+ */
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_No_such_file_or_directory_s, __pyx_v_filename); 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_t_1 = PyTuple_New(1); 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);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, 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_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/cfaidx.pyx":294
+ *             raise IOError("No such file or directory: %s" % filename)
+ * 
+ *         filename = _encodeFilename(filename)             # <<<<<<<<<<<<<<
+ *         self.fastqfile = gzopen(filename, "r")
+ *         self.entry = kseq_init(self.fastqfile)
+ */
+  __pyx_t_3 = __pyx_f_5pysam_6cfaidx__encodeFilename(__pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "pysam/cfaidx.pyx":295
+ * 
+ *         filename = _encodeFilename(filename)
+ *         self.fastqfile = gzopen(filename, "r")             # <<<<<<<<<<<<<<
+ *         self.entry = kseq_init(self.fastqfile)
+ *         self._filename = filename
+ */
+  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->fastqfile = gzopen(__pyx_t_6, __pyx_k_r);
+
+  /* "pysam/cfaidx.pyx":296
+ *         filename = _encodeFilename(filename)
+ *         self.fastqfile = gzopen(filename, "r")
+ *         self.entry = kseq_init(self.fastqfile)             # <<<<<<<<<<<<<<
+ *         self._filename = filename
+ * 
+ */
+  __pyx_v_self->entry = kseq_init(__pyx_v_self->fastqfile);
+
+  /* "pysam/cfaidx.pyx":297
+ *         self.fastqfile = gzopen(filename, "r")
+ *         self.entry = kseq_init(self.fastqfile)
+ *         self._filename = filename             # <<<<<<<<<<<<<<
+ * 
+ *     def close( self ):
+ */
+  __Pyx_INCREF(__pyx_v_filename);
+  __Pyx_GIVEREF(__pyx_v_filename);
+  __Pyx_GOTREF(__pyx_v_self->_filename);
+  __Pyx_DECREF(__pyx_v_self->_filename);
+  __pyx_v_self->_filename = __pyx_v_filename;
+
+  /* "pysam/cfaidx.pyx":284
+ *         return self.entry != NULL
+ * 
+ *     def _open(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an indexed fasta file.
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastqfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_filename);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":299
+ *         self._filename = filename
+ * 
+ *     def close( self ):             # <<<<<<<<<<<<<<
+ *         '''close file.'''
+ *         if self.entry != NULL:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastqfile_6close[] = "Fastqfile.close(self)\nclose file.";
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastqfile_6close(((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_6close(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("close", 0);
+  __Pyx_TraceCall("close", __pyx_f[0], 299);
+
+  /* "pysam/cfaidx.pyx":301
+ *     def close( self ):
+ *         '''close file.'''
+ *         if self.entry != NULL:             # <<<<<<<<<<<<<<
+ *             gzclose(self.fastqfile)
+ *             if self.entry:
+ */
+  __pyx_t_1 = ((__pyx_v_self->entry != NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/cfaidx.pyx":302
+ *         '''close file.'''
+ *         if self.entry != NULL:
+ *             gzclose(self.fastqfile)             # <<<<<<<<<<<<<<
+ *             if self.entry:
+ *                 kseq_destroy(self.entry)
+ */
+    gzclose(__pyx_v_self->fastqfile);
+
+    /* "pysam/cfaidx.pyx":303
+ *         if self.entry != NULL:
+ *             gzclose(self.fastqfile)
+ *             if self.entry:             # <<<<<<<<<<<<<<
+ *                 kseq_destroy(self.entry)
+ *                 self.entry = NULL
+ */
+    __pyx_t_1 = (__pyx_v_self->entry != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/cfaidx.pyx":304
+ *             gzclose(self.fastqfile)
+ *             if self.entry:
+ *                 kseq_destroy(self.entry)             # <<<<<<<<<<<<<<
+ *                 self.entry = NULL
+ * 
+ */
+      kseq_destroy(__pyx_v_self->entry);
+
+      /* "pysam/cfaidx.pyx":305
+ *             if self.entry:
+ *                 kseq_destroy(self.entry)
+ *                 self.entry = NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__(self):
+ */
+      __pyx_v_self->entry = NULL;
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/cfaidx.pyx":299
+ *         self._filename = filename
+ * 
+ *     def close( self ):             # <<<<<<<<<<<<<<
+ *         '''close file.'''
+ *         if self.entry != NULL:
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":307
+ *                 self.entry = NULL
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         self.close()
+ * 
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_6cfaidx_9Fastqfile_9__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_6cfaidx_9Fastqfile_9__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_6cfaidx_9Fastqfile_8__dealloc__(((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_6cfaidx_9Fastqfile_8__dealloc__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 307);
+
+  /* "pysam/cfaidx.pyx":308
+ * 
+ *     def __dealloc__(self):
+ *         self.close()             # <<<<<<<<<<<<<<
+ * 
+ *     property filename:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/cfaidx.pyx":307
+ *                 self.entry = NULL
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         self.close()
+ * 
+ */
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_WriteUnraisable("pysam.cfaidx.Fastqfile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/cfaidx.pyx":312
+ *     property filename:
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._filename
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_8filename_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastqfile_8filename___get__(((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_8filename___get__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 312);
+
+  /* "pysam/cfaidx.pyx":313
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):
+ *             return self._filename             # <<<<<<<<<<<<<<
+ * 
+ *     def __iter__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_filename);
+  __pyx_r = __pyx_v_self->_filename;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":312
+ *     property filename:
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._filename
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":315
+ *             return self._filename
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_11__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_11__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastqfile_10__iter__(((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_10__iter__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+  __Pyx_TraceCall("__iter__", __pyx_f[0], 315);
+
+  /* "pysam/cfaidx.pyx":316
+ * 
+ *     def __iter__(self):
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ *         return self
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); 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_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_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 = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/cfaidx.pyx":317
+ *     def __iter__(self):
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/cfaidx.pyx":318
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     cdef kseq_t * getCurrent(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":315
+ *             return self._filename
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastqfile.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":320
+ *         return self
+ * 
+ *     cdef kseq_t * getCurrent(self):             # <<<<<<<<<<<<<<
+ *         return self.entry
+ * 
+ */
+
+static kseq_t *__pyx_f_5pysam_6cfaidx_9Fastqfile_getCurrent(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self) {
+  kseq_t *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getCurrent", 0);
+  __Pyx_TraceCall("getCurrent", __pyx_f[0], 320);
+
+  /* "pysam/cfaidx.pyx":321
+ * 
+ *     cdef kseq_t * getCurrent(self):
+ *         return self.entry             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int cnext(self):
+ */
+  __pyx_r = __pyx_v_self->entry;
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":320
+ *         return self
+ * 
+ *     cdef kseq_t * getCurrent(self):             # <<<<<<<<<<<<<<
+ *         return self.entry
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":323
+ *         return self.entry
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''C version of iterator
+ *         '''
+ */
+
+static int __pyx_f_5pysam_6cfaidx_9Fastqfile_cnext(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("cnext", 0);
+  __Pyx_TraceCall("cnext", __pyx_f[0], 323);
+
+  /* "pysam/cfaidx.pyx":326
+ *         '''C version of iterator
+ *         '''
+ *         return kseq_read(self.entry)             # <<<<<<<<<<<<<<
+ * 
+ *     def __next__(self):
+ */
+  __pyx_r = kseq_read(__pyx_v_self->entry);
+  goto __pyx_L0;
+
+  /* "pysam/cfaidx.pyx":323
+ *         return self.entry
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''C version of iterator
+ *         '''
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/cfaidx.pyx":328
+ *         return kseq_read(self.entry)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """
+ *         python version of next().
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_13__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_6cfaidx_9Fastqfile_12__next__[] = "\n        python version of next().\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_6cfaidx_9Fastqfile_12__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_6cfaidx_9Fastqfile_13__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6cfaidx_9Fastqfile_12__next__(((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6cfaidx_9Fastqfile_12__next__(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *__pyx_v_self) {
+  int __pyx_v_l;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 328);
+
+  /* "pysam/cfaidx.pyx":333
+ *         """
+ *         cdef int l
+ *         l = kseq_read( self.entry)             # <<<<<<<<<<<<<<
+ *         if (l > 0):
+ *             return makeFastqProxy( self.entry )
+ */
+  __pyx_v_l = kseq_read(__pyx_v_self->entry);
+
+  /* "pysam/cfaidx.pyx":334
+ *         cdef int l
+ *         l = kseq_read( self.entry)
+ *         if (l > 0):             # <<<<<<<<<<<<<<
+ *             return makeFastqProxy( self.entry )
+ *         else:
+ */
+  __pyx_t_1 = ((__pyx_v_l > 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/cfaidx.pyx":335
+ *         l = kseq_read( self.entry)
+ *         if (l > 0):
+ *             return makeFastqProxy( self.entry )             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise StopIteration
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __pyx_f_5pysam_6cfaidx_makeFastqProxy(__pyx_v_self->entry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/cfaidx.pyx":337
+ *             return makeFastqProxy( self.entry )
+ *         else:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ * __all__ = ["Fastafile",
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/cfaidx.pyx":328
+ *         return kseq_read(self.entry)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """
+ *         python version of next().
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.cfaidx.Fastqfile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+static struct __pyx_vtabstruct_5pysam_6cfaidx_Fastafile __pyx_vtable_5pysam_6cfaidx_Fastafile;
+
+static PyObject *__pyx_tp_new_5pysam_6cfaidx_Fastafile(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6cfaidx_Fastafile *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_6cfaidx_Fastafile;
+  p->_filename = Py_None; Py_INCREF(Py_None);
+  p->_references = Py_None; Py_INCREF(Py_None);
+  p->_lengths = Py_None; Py_INCREF(Py_None);
+  p->reference2length = Py_None; Py_INCREF(Py_None);
+  if (unlikely(__pyx_pw_5pysam_6cfaidx_9Fastafile_1__cinit__(o, a, k) < 0)) {
+    Py_DECREF(o); o = 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_6cfaidx_Fastafile(PyObject *o) {
+  struct __pyx_obj_5pysam_6cfaidx_Fastafile *p = (struct __pyx_obj_5pysam_6cfaidx_Fastafile *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_6cfaidx_9Fastafile_11__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->_filename);
+  Py_CLEAR(p->_references);
+  Py_CLEAR(p->_lengths);
+  Py_CLEAR(p->reference2length);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_5pysam_6cfaidx_Fastafile(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_6cfaidx_Fastafile *p = (struct __pyx_obj_5pysam_6cfaidx_Fastafile *)o;
+  if (p->_filename) {
+    e = (*v)(p->_filename, a); if (e) return e;
+  }
+  if (p->_references) {
+    e = (*v)(p->_references, a); if (e) return e;
+  }
+  if (p->_lengths) {
+    e = (*v)(p->_lengths, a); if (e) return e;
+  }
+  if (p->reference2length) {
+    e = (*v)(p->reference2length, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_6cfaidx_Fastafile(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_6cfaidx_Fastafile *p = (struct __pyx_obj_5pysam_6cfaidx_Fastafile *)o;
+  tmp = ((PyObject*)p->_filename);
+  p->_filename = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_references);
+  p->_references = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_lengths);
+  p->_lengths = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->reference2length);
+  p->reference2length = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+static PyObject *__pyx_sq_item_5pysam_6cfaidx_Fastafile(PyObject *o, Py_ssize_t i) {
+  PyObject *r;
+  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+  Py_DECREF(x);
+  return r;
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_9Fastafile_filename(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_9Fastafile_8filename_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_9Fastafile_references(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_9Fastafile_10references_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_9Fastafile_nreferences(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_9Fastafile_11nreferences_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_9Fastafile_lengths(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_9Fastafile_7lengths_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_6cfaidx_Fastafile[] = {
+  {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastafile_3_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastafile_2_isOpen)},
+  {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastafile_7_open, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastafile_6_open)},
+  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastafile_9close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastafile_8close)},
+  {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastafile_13fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastafile_12fetch)},
+  {__Pyx_NAMESTR("getReferenceLength"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastafile_15getReferenceLength, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastafile_14getReferenceLength)},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_6cfaidx_Fastafile[] = {
+  {(char *)"filename", __pyx_getprop_5pysam_6cfaidx_9Fastafile_filename, 0, __Pyx_DOCSTR(__pyx_k_number_of_term_filename_associat), 0},
+  {(char *)"references", __pyx_getprop_5pysam_6cfaidx_9Fastafile_references, 0, __Pyx_DOCSTR(__pyx_k_tuple_with_the_names_of_term_ref), 0},
+  {(char *)"nreferences", __pyx_getprop_5pysam_6cfaidx_9Fastafile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_number_of_term_reference_sequenc), 0},
+  {(char *)"lengths", __pyx_getprop_5pysam_6cfaidx_9Fastafile_lengths, 0, __Pyx_DOCSTR(__pyx_k_tuple_with_the_lengths_of_term_r), 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_Fastafile = {
+  __pyx_pw_5pysam_6cfaidx_9Fastafile_5__len__, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  __pyx_sq_item_5pysam_6cfaidx_Fastafile, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  __pyx_pw_5pysam_6cfaidx_9Fastafile_19__contains__, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_Fastafile = {
+  __pyx_pw_5pysam_6cfaidx_9Fastafile_5__len__, /*mp_length*/
+  __pyx_pw_5pysam_6cfaidx_9Fastafile_17__getitem__, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_5pysam_6cfaidx_Fastafile = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.cfaidx.Fastafile"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6cfaidx_Fastafile), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_6cfaidx_Fastafile, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  &__pyx_tp_as_sequence_Fastafile, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_Fastafile, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("*(filename)*\n\n    A *FASTA* file. The file is automatically opened.\n\n    The file expects an indexed fasta file.\n\n    TODO:\n        add automatic indexing.\n        add function to get sequence names.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6cfaidx_Fastafile, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6cfaidx_Fastafile, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_6cfaidx_Fastafile, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_6cfaidx_Fastafile, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_6cfaidx_Fastafile, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_5pysam_6cfaidx_FastqProxy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_6cfaidx_FastqProxy(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_10FastqProxy_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_10FastqProxy_4name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_10FastqProxy_sequence(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_10FastqProxy_8sequence_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_10FastqProxy_comment(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_10FastqProxy_7comment_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_10FastqProxy_quality(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_10FastqProxy_7quality_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_6cfaidx_FastqProxy[] = {
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_6cfaidx_FastqProxy[] = {
+  {(char *)"name", __pyx_getprop_5pysam_6cfaidx_10FastqProxy_name, 0, 0, 0},
+  {(char *)"sequence", __pyx_getprop_5pysam_6cfaidx_10FastqProxy_sequence, 0, 0, 0},
+  {(char *)"comment", __pyx_getprop_5pysam_6cfaidx_10FastqProxy_comment, 0, 0, 0},
+  {(char *)"quality", __pyx_getprop_5pysam_6cfaidx_10FastqProxy_quality, 0, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_6cfaidx_FastqProxy = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.cfaidx.FastqProxy"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6cfaidx_FastqProxy), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_6cfaidx_FastqProxy, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  __Pyx_DOCSTR("FastqProxy()"), /*tp_doc*/
+  0, /*tp_traverse*/
+  0, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_6cfaidx_FastqProxy, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_6cfaidx_FastqProxy, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_6cfaidx_10FastqProxy_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_6cfaidx_FastqProxy, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_6cfaidx_Fastqfile __pyx_vtable_5pysam_6cfaidx_Fastqfile;
+
+static PyObject *__pyx_tp_new_5pysam_6cfaidx_Fastqfile(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6cfaidx_Fastqfile *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_6cfaidx_Fastqfile;
+  p->_filename = Py_None; Py_INCREF(Py_None);
+  if (unlikely(__pyx_pw_5pysam_6cfaidx_9Fastqfile_1__cinit__(o, a, k) < 0)) {
+    Py_DECREF(o); o = 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_6cfaidx_Fastqfile(PyObject *o) {
+  struct __pyx_obj_5pysam_6cfaidx_Fastqfile *p = (struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_6cfaidx_9Fastqfile_9__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->_filename);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_5pysam_6cfaidx_Fastqfile(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_6cfaidx_Fastqfile *p = (struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)o;
+  if (p->_filename) {
+    e = (*v)(p->_filename, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_6cfaidx_Fastqfile(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_6cfaidx_Fastqfile *p = (struct __pyx_obj_5pysam_6cfaidx_Fastqfile *)o;
+  tmp = ((PyObject*)p->_filename);
+  p->_filename = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_5pysam_6cfaidx_9Fastqfile_filename(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6cfaidx_9Fastqfile_8filename_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_6cfaidx_Fastqfile[] = {
+  {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastqfile_3_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastqfile_2_isOpen)},
+  {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastqfile_5_open, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastqfile_4_open)},
+  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastqfile_7close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastqfile_6close)},
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6cfaidx_9Fastqfile_13__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6cfaidx_9Fastqfile_12__next__)},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_6cfaidx_Fastqfile[] = {
+  {(char *)"filename", __pyx_getprop_5pysam_6cfaidx_9Fastqfile_filename, 0, __Pyx_DOCSTR(__pyx_k_number_of_term_filename_associat), 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_6cfaidx_Fastqfile = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.cfaidx.Fastqfile"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6cfaidx_Fastqfile), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_6cfaidx_Fastqfile, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("*(filename)*\n\n    A *FASTQ* file. The file is automatically opened.\n\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6cfaidx_Fastqfile, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6cfaidx_Fastqfile, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  __pyx_pw_5pysam_6cfaidx_9Fastqfile_11__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_6cfaidx_9Fastqfile_13__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_6cfaidx_Fastqfile, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_6cfaidx_Fastqfile, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_6cfaidx_Fastqfile, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *__pyx_freelist_5pysam_6cfaidx___pyx_scope_struct___open[8];
+static int __pyx_freecount_5pysam_6cfaidx___pyx_scope_struct___open = 0;
+
+static PyObject *__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct___open(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct___open > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open)))) {
+    o = (PyObject*)__pyx_freelist_5pysam_6cfaidx___pyx_scope_struct___open[--__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct___open];
+    memset(o, 0, sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open));
+    (void) PyObject_INIT(o, t);
+    PyObject_GC_Track(o);
+  } else {
+    o = (*t->tp_alloc)(t, 0);
+    if (unlikely(!o)) return 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_6cfaidx___pyx_scope_struct___open(PyObject *o) {
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *)o;
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->__pyx_v_data);
+  if ((__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct___open < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open))) {
+    __pyx_freelist_5pysam_6cfaidx___pyx_scope_struct___open[__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct___open++] = ((struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *)o);
+  } else {
+    (*Py_TYPE(o)->tp_free)(o);
+  }
+}
+
+static int __pyx_tp_traverse_5pysam_6cfaidx___pyx_scope_struct___open(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *)o;
+  if (p->__pyx_v_data) {
+    e = (*v)(p->__pyx_v_data, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_6cfaidx___pyx_scope_struct___open(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *)o;
+  tmp = ((PyObject*)p->__pyx_v_data);
+  p->__pyx_v_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyTypeObject __pyx_type_5pysam_6cfaidx___pyx_scope_struct___open = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.cfaidx.__pyx_scope_struct___open"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_6cfaidx___pyx_scope_struct___open, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6cfaidx___pyx_scope_struct___open, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6cfaidx___pyx_scope_struct___open, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  0, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct___open, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *__pyx_freelist_5pysam_6cfaidx___pyx_scope_struct_1_genexpr[8];
+static int __pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_1_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr)))) {
+    o = (PyObject*)__pyx_freelist_5pysam_6cfaidx___pyx_scope_struct_1_genexpr[--__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_1_genexpr];
+    memset(o, 0, sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr));
+    (void) PyObject_INIT(o, t);
+    PyObject_GC_Track(o);
+  } else {
+    o = (*t->tp_alloc)(t, 0);
+    if (unlikely(!o)) return 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_6cfaidx___pyx_scope_struct_1_genexpr(PyObject *o) {
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *)o;
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->__pyx_outer_scope);
+  Py_CLEAR(p->__pyx_v_x);
+  Py_CLEAR(p->__pyx_t_0);
+  if ((__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr))) {
+    __pyx_freelist_5pysam_6cfaidx___pyx_scope_struct_1_genexpr[__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *)o);
+  } else {
+    (*Py_TYPE(o)->tp_free)(o);
+  }
+}
+
+static int __pyx_tp_traverse_5pysam_6cfaidx___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *)o;
+  if (p->__pyx_outer_scope) {
+    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
+  }
+  if (p->__pyx_v_x) {
+    e = (*v)(p->__pyx_v_x, a); if (e) return e;
+  }
+  if (p->__pyx_t_0) {
+    e = (*v)(p->__pyx_t_0, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_6cfaidx___pyx_scope_struct_1_genexpr(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr *)o;
+  tmp = ((PyObject*)p->__pyx_outer_scope);
+  p->__pyx_outer_scope = ((struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_v_x);
+  p->__pyx_v_x = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_t_0);
+  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyTypeObject __pyx_type_5pysam_6cfaidx___pyx_scope_struct_1_genexpr = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.cfaidx.__pyx_scope_struct_1_genexpr"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_6cfaidx___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6cfaidx___pyx_scope_struct_1_genexpr, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6cfaidx___pyx_scope_struct_1_genexpr, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  0, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct_1_genexpr, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *__pyx_freelist_5pysam_6cfaidx___pyx_scope_struct_2_genexpr[8];
+static int __pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_2_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr)))) {
+    o = (PyObject*)__pyx_freelist_5pysam_6cfaidx___pyx_scope_struct_2_genexpr[--__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_2_genexpr];
+    memset(o, 0, sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr));
+    (void) PyObject_INIT(o, t);
+    PyObject_GC_Track(o);
+  } else {
+    o = (*t->tp_alloc)(t, 0);
+    if (unlikely(!o)) return 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_6cfaidx___pyx_scope_struct_2_genexpr(PyObject *o) {
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *)o;
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->__pyx_outer_scope);
+  Py_CLEAR(p->__pyx_v_x);
+  Py_CLEAR(p->__pyx_t_0);
+  if ((__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr))) {
+    __pyx_freelist_5pysam_6cfaidx___pyx_scope_struct_2_genexpr[__pyx_freecount_5pysam_6cfaidx___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *)o);
+  } else {
+    (*Py_TYPE(o)->tp_free)(o);
+  }
+}
+
+static int __pyx_tp_traverse_5pysam_6cfaidx___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *)o;
+  if (p->__pyx_outer_scope) {
+    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
+  }
+  if (p->__pyx_v_x) {
+    e = (*v)(p->__pyx_v_x, a); if (e) return e;
+  }
+  if (p->__pyx_t_0) {
+    e = (*v)(p->__pyx_t_0, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_6cfaidx___pyx_scope_struct_2_genexpr(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr *)o;
+  tmp = ((PyObject*)p->__pyx_outer_scope);
+  p->__pyx_outer_scope = ((struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct___open *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_v_x);
+  p->__pyx_v_x = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_t_0);
+  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyTypeObject __pyx_type_5pysam_6cfaidx___pyx_scope_struct_2_genexpr = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.cfaidx.__pyx_scope_struct_2_genexpr"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6cfaidx___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_6cfaidx___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6cfaidx___pyx_scope_struct_2_genexpr, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6cfaidx___pyx_scope_struct_2_genexpr, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  0, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_6cfaidx___pyx_scope_struct_2_genexpr, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+  {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef __pyx_moduledef = {
+  #if PY_VERSION_HEX < 0x03020000
+    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
+  #else
+    PyModuleDef_HEAD_INIT,
+  #endif
+    __Pyx_NAMESTR("cfaidx"),
+    0, /* m_doc */
+    -1, /* m_size */
+    __pyx_methods /* m_methods */,
+    NULL, /* m_reload */
+    NULL, /* m_traverse */
+    NULL, /* m_clear */
+    NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_kp_u_Argument_must_be_string_or_unico, __pyx_k_Argument_must_be_string_or_unico, sizeof(__pyx_k_Argument_must_be_string_or_unico), 0, 1, 0, 0},
+  {&__pyx_n_s_Fastafile, __pyx_k_Fastafile, sizeof(__pyx_k_Fastafile), 0, 0, 1, 1},
+  {&__pyx_n_s_Fastqfile, __pyx_k_Fastqfile, sizeof(__pyx_k_Fastqfile), 0, 0, 1, 1},
+  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
+  {&__pyx_n_s_IS_PYTHON3, __pyx_k_IS_PYTHON3, sizeof(__pyx_k_IS_PYTHON3), 0, 0, 1, 1},
+  {&__pyx_kp_s_I_O_operation_on_closed_file, __pyx_k_I_O_operation_on_closed_file, sizeof(__pyx_k_I_O_operation_on_closed_file), 0, 0, 1, 0},
+  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
+  {&__pyx_kp_s_No_such_file_or_directory_s, __pyx_k_No_such_file_or_directory_s, sizeof(__pyx_k_No_such_file_or_directory_s), 0, 0, 1, 0},
+  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
+  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
+  {&__pyx_kp_b__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 0, 0},
+  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+  {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
+  {&__pyx_kp_s_calling_len_on_closed_file, __pyx_k_calling_len_on_closed_file, sizeof(__pyx_k_calling_len_on_closed_file), 0, 0, 1, 0},
+  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+  {&__pyx_kp_s_could_not_locate_index_file, __pyx_k_could_not_locate_index_file, sizeof(__pyx_k_could_not_locate_index_file), 0, 0, 1, 0},
+  {&__pyx_kp_s_could_not_open_file_s, __pyx_k_could_not_open_file_s, sizeof(__pyx_k_could_not_open_file_s), 0, 0, 1, 0},
+  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
+  {&__pyx_kp_s_end_out_of_range_i, __pyx_k_end_out_of_range_i, sizeof(__pyx_k_end_out_of_range_i), 0, 0, 1, 0},
+  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
+  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
+  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
+  {&__pyx_kp_b_fai, __pyx_k_fai, sizeof(__pyx_k_fai), 0, 0, 0, 0},
+  {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
+  {&__pyx_n_s_getdefaultencoding, __pyx_k_getdefaultencoding, sizeof(__pyx_k_getdefaultencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_getfilesystemencoding, __pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_kp_s_invalid_region_start_i_end_i, __pyx_k_invalid_region_start_i_end_i, sizeof(__pyx_k_invalid_region_start_i_end_i), 0, 0, 1, 0},
+  {&__pyx_n_s_isOpen, __pyx_k_isOpen, sizeof(__pyx_k_isOpen), 0, 0, 1, 1},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_kp_s_no_sequence_region_supplied, __pyx_k_no_sequence_region_supplied, sizeof(__pyx_k_no_sequence_region_supplied), 0, 0, 1, 0},
+  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
+  {&__pyx_n_s_open_2, __pyx_k_open_2, sizeof(__pyx_k_open_2), 0, 0, 1, 1},
+  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
+  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
+  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
+  {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1},
+  {&__pyx_n_s_references, __pyx_k_references, sizeof(__pyx_k_references), 0, 0, 1, 1},
+  {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1},
+  {&__pyx_kp_s_s_i_i, __pyx_k_s_i_i, sizeof(__pyx_k_s_i_i), 0, 0, 1, 0},
+  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
+  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
+  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
+  {&__pyx_kp_s_start_out_of_range_i, __pyx_k_start_out_of_range_i, sizeof(__pyx_k_start_out_of_range_i), 0, 0, 1, 0},
+  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
+  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+  /* "pysam/cfaidx.pyx":89
+ *     def __len__(self):
+ *         if self.fastafile == NULL:
+ *             raise ValueError( "calling len() on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         return faidx_fetch_nseq(self.fastafile)
+ */
+  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_calling_len_on_closed_file); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple_);
+  __Pyx_GIVEREF(__pyx_tuple_);
+
+  /* "pysam/cfaidx.pyx":109
+ *         # read index
+ *         if not os.path.exists( self._filename + b".fai" ):
+ *             raise ValueError("could not locate index file")             # <<<<<<<<<<<<<<
+ * 
+ *         with open( self._filename + b".fai" ) as inf:
+ */
+  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_could_not_locate_index_file); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__2);
+  __Pyx_GIVEREF(__pyx_tuple__2);
+
+  /* "pysam/cfaidx.pyx":112
+ * 
+ *         with open( self._filename + b".fai" ) as inf:
+ *             data = [ x.split("\t") for x in inf ]             # <<<<<<<<<<<<<<
+ *             self._references = tuple(x[0] for x in data)
+ *             self._lengths = tuple(int(x[1]) for x in data)
+ */
+  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s__3); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__4);
+  __Pyx_GIVEREF(__pyx_tuple__4);
+
+  /* "pysam/cfaidx.pyx":111
+ *             raise ValueError("could not locate index file")
+ * 
+ *         with open( self._filename + b".fai" ) as inf:             # <<<<<<<<<<<<<<
+ *             data = [ x.split("\t") for x in inf ]
+ *             self._references = tuple(x[0] for x in data)
+ */
+  __pyx_tuple__5 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__5);
+  __Pyx_GIVEREF(__pyx_tuple__5);
+
+  /* "pysam/cfaidx.pyx":167
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         cdef int length
+ */
+  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__6);
+  __Pyx_GIVEREF(__pyx_tuple__6);
+
+  /* "pysam/cfaidx.pyx":174
+ *         if not region:
+ *             if reference is None:
+ *                 raise ValueError('no sequence/region supplied.')             # <<<<<<<<<<<<<<
+ *             if start is None:
+ *                 start = 0
+ */
+  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_sequence_region_supplied); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__7);
+  __Pyx_GIVEREF(__pyx_tuple__7);
+
+  /* "pysam/cfaidx.pyx":200
+ *             region = "%s:%i-%i" % (reference, start+1, end)
+ *             if PY_MAJOR_VERSION >= 3:
+ *                 region = region.encode('ascii')             # <<<<<<<<<<<<<<
+ *             seq = fai_fetch( self.fastafile,
+ *                              region,
+ */
+  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__9);
+  __Pyx_GIVEREF(__pyx_tuple__9);
+
+  /* "pysam/cfaidx.pyx":317
+ *     def __iter__(self):
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__10);
+  __Pyx_GIVEREF(__pyx_tuple__10);
+  __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;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initcfaidx(void); /*proto*/
+PyMODINIT_FUNC initcfaidx(void)
+#else
+PyMODINIT_FUNC PyInit_cfaidx(void); /*proto*/
+PyMODINIT_FUNC PyInit_cfaidx(void)
+#endif
+{
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  #if CYTHON_REFNANNY
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
+      PyErr_Clear();
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
+  }
+  #endif
+  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_cfaidx(void)", 0);
+  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #ifdef __Pyx_CyFunction_USED
+  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_FusedFunction_USED
+  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_Generator_USED
+  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  /*--- Library function declarations ---*/
+  /*--- Threads initialization code ---*/
+  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+  #ifdef WITH_THREAD /* Python build with threading support? */
+  PyEval_InitThreads();
+  #endif
+  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("cfaidx"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
+  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if CYTHON_COMPILING_IN_PYPY
+  Py_INCREF(__pyx_b);
+  #endif
+  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  if (__pyx_module_is_main_pysam__cfaidx) {
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "pysam.cfaidx")) {
+      if (unlikely(PyDict_SetItemString(modules, "pysam.cfaidx", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+  /*--- Builtin init code ---*/
+  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Constants init code ---*/
+  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Global init code ---*/
+  __pyx_v_5pysam_6cfaidx__FILENAME_ENCODING = ((PyObject*)Py_None); Py_INCREF(Py_None);
+  /*--- Variable export code ---*/
+  /*--- Function export code ---*/
+  /*--- Type init code ---*/
+  __pyx_vtabptr_5pysam_6cfaidx_Fastafile = &__pyx_vtable_5pysam_6cfaidx_Fastafile;
+  __pyx_vtable_5pysam_6cfaidx_Fastafile._fetch = (char *(*)(struct __pyx_obj_5pysam_6cfaidx_Fastafile *, char *, int, int, int *))__pyx_f_5pysam_6cfaidx_9Fastafile__fetch;
+  if (PyType_Ready(&__pyx_type_5pysam_6cfaidx_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6cfaidx_Fastafile.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6cfaidx_Fastafile, "__contains__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_6cfaidx_9Fastafile_18__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_6cfaidx_9Fastafile_18__contains__.doc = __pyx_doc_5pysam_6cfaidx_9Fastafile_18__contains__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6cfaidx_9Fastafile_18__contains__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6cfaidx_Fastafile.tp_dict, __pyx_vtabptr_5pysam_6cfaidx_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "Fastafile", (PyObject *)&__pyx_type_5pysam_6cfaidx_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6cfaidx_Fastafile = &__pyx_type_5pysam_6cfaidx_Fastafile;
+  if (PyType_Ready(&__pyx_type_5pysam_6cfaidx_FastqProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6cfaidx_FastqProxy.tp_print = 0;
+  if (__Pyx_SetAttrString(__pyx_m, "FastqProxy", (PyObject *)&__pyx_type_5pysam_6cfaidx_FastqProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6cfaidx_FastqProxy = &__pyx_type_5pysam_6cfaidx_FastqProxy;
+  __pyx_vtabptr_5pysam_6cfaidx_Fastqfile = &__pyx_vtable_5pysam_6cfaidx_Fastqfile;
+  __pyx_vtable_5pysam_6cfaidx_Fastqfile.getCurrent = (kseq_t *(*)(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *))__pyx_f_5pysam_6cfaidx_9Fastqfile_getCurrent;
+  __pyx_vtable_5pysam_6cfaidx_Fastqfile.cnext = (int (*)(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *))__pyx_f_5pysam_6cfaidx_9Fastqfile_cnext;
+  if (PyType_Ready(&__pyx_type_5pysam_6cfaidx_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6cfaidx_Fastqfile.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6cfaidx_Fastqfile, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_6cfaidx_9Fastqfile_12__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_6cfaidx_9Fastqfile_12__next__.doc = __pyx_doc_5pysam_6cfaidx_9Fastqfile_12__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6cfaidx_9Fastqfile_12__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6cfaidx_Fastqfile.tp_dict, __pyx_vtabptr_5pysam_6cfaidx_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "Fastqfile", (PyObject *)&__pyx_type_5pysam_6cfaidx_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6cfaidx_Fastqfile = &__pyx_type_5pysam_6cfaidx_Fastqfile;
+  if (PyType_Ready(&__pyx_type_5pysam_6cfaidx___pyx_scope_struct___open) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6cfaidx___pyx_scope_struct___open.tp_print = 0;
+  __pyx_ptype_5pysam_6cfaidx___pyx_scope_struct___open = &__pyx_type_5pysam_6cfaidx___pyx_scope_struct___open;
+  if (PyType_Ready(&__pyx_type_5pysam_6cfaidx___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6cfaidx___pyx_scope_struct_1_genexpr.tp_print = 0;
+  __pyx_ptype_5pysam_6cfaidx___pyx_scope_struct_1_genexpr = &__pyx_type_5pysam_6cfaidx___pyx_scope_struct_1_genexpr;
+  if (PyType_Ready(&__pyx_type_5pysam_6cfaidx___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6cfaidx___pyx_scope_struct_2_genexpr.tp_print = 0;
+  __pyx_ptype_5pysam_6cfaidx___pyx_scope_struct_2_genexpr = &__pyx_type_5pysam_6cfaidx___pyx_scope_struct_2_genexpr;
+  /*--- Type import code ---*/
+  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
+  #if CYTHON_COMPILING_IN_PYPY
+  sizeof(PyTypeObject),
+  #else
+  sizeof(PyHeapTypeObject),
+  #endif
+  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[2]; __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[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Variable import code ---*/
+  /*--- Function import code ---*/
+  /*--- Execution code ---*/
+
+  /* "pysam/cfaidx.pyx":4
+ * # cython: profile=True
+ * # adds doc-strings for sphinx
+ * import sys             # <<<<<<<<<<<<<<
+ * import os
+ * 
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/cfaidx.pyx":5
+ * # adds doc-strings for sphinx
+ * import sys
+ * import os             # <<<<<<<<<<<<<<
+ * 
+ * cdef class FastqProxy
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/cfaidx.pyx":33
+ * ## Python 3 compatibility functions
+ * ########################################################################
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3             # <<<<<<<<<<<<<<
+ * 
+ * # filename encoding (copied from lxml.etree.pyx)
+ */
+  __pyx_t_1 = __Pyx_PyBool_FromLong((PY_MAJOR_VERSION >= 3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IS_PYTHON3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/cfaidx.pyx":37
+ * # filename encoding (copied from lxml.etree.pyx)
+ * cdef str _FILENAME_ENCODING
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()             # <<<<<<<<<<<<<<
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XGOTREF(__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING);
+  __Pyx_DECREF_SET(__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/cfaidx.pyx":38
+ * cdef str _FILENAME_ENCODING
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()
+ * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:
+ */
+  __pyx_t_3 = (__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/cfaidx.pyx":39
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()             # <<<<<<<<<<<<<<
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = 'ascii'
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getdefaultencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XGOTREF(__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "pysam/cfaidx.pyx":40
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
+ *     _FILENAME_ENCODING = 'ascii'
+ * 
+ */
+  __pyx_t_4 = (__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_3 = (__pyx_t_4 != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/cfaidx.pyx":41
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = 'ascii'             # <<<<<<<<<<<<<<
+ * 
+ * #cdef char* _C_FILENAME_ENCODING
+ */
+    __Pyx_INCREF(__pyx_n_s_ascii);
+    __Pyx_XGOTREF(__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_6cfaidx__FILENAME_ENCODING, __pyx_n_s_ascii);
+    __Pyx_GIVEREF(__pyx_n_s_ascii);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/cfaidx.pyx":61
+ * #####################################################################
+ * # hard-coded constants
+ * cdef int max_pos = 2 << 29             # <<<<<<<<<<<<<<
+ * 
+ * cdef class Fastafile:
+ */
+  __pyx_v_5pysam_6cfaidx_max_pos = 1073741824;
+
+  /* "pysam/cfaidx.pyx":339
+ *             raise StopIteration
+ * 
+ * __all__ = ["Fastafile",             # <<<<<<<<<<<<<<
+ *            "Fastqfile"]
+ */
+  __pyx_t_1 = PyList_New(2); 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_INCREF(__pyx_n_s_Fastafile);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Fastafile);
+  __Pyx_GIVEREF(__pyx_n_s_Fastafile);
+  __Pyx_INCREF(__pyx_n_s_Fastqfile);
+  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Fastqfile);
+  __Pyx_GIVEREF(__pyx_n_s_Fastqfile);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/cfaidx.pyx":1
+ * # cython: embedsignature=True             # <<<<<<<<<<<<<<
+ * # cython: profile=True
+ * # adds doc-strings for sphinx
+ */
+  __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(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __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;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  if (__pyx_m) {
+    __Pyx_AddTraceback("init pysam.cfaidx", __pyx_clineno, __pyx_lineno, __pyx_filename);
+    Py_DECREF(__pyx_m); __pyx_m = 0;
+  } else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_ImportError, "init pysam.cfaidx");
+  }
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  #if PY_MAJOR_VERSION < 3
+  return;
+  #else
+  return __pyx_m;
+  #endif
+}
+
+/* Runtime support code */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+    PyObject *m = NULL, *p = NULL;
+    void *r = NULL;
+    m = PyImport_ImportModule((char *)modname);
+    if (!m) goto end;
+    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+    if (!p) goto end;
+    r = PyLong_AsVoidPtr(p);
+end:
+    Py_XDECREF(p);
+    Py_XDECREF(m);
+    return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif /* CYTHON_REFNANNY */
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+    }
+    return result;
+}
+
+#if CYTHON_PROFILE
+static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
+                                   PyFrameObject** frame,
+                                   const char *funcname,
+                                   const char *srcfile,
+                                   int firstlineno) {
+    int retval;
+    PyThreadState* tstate = PyThreadState_GET();
+    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
+        if (*code == NULL) {
+            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
+            if (*code == NULL) return 0;
+        }
+        *frame = PyFrame_New(
+            tstate,                          /*PyThreadState *tstate*/
+            *code,                           /*PyCodeObject *code*/
+            __pyx_d,                  /*PyObject *globals*/
+            0                                /*PyObject *locals*/
+        );
+        if (*frame == NULL) return 0;
+        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
+            Py_INCREF(Py_None);
+            (*frame)->f_trace = Py_None;
+        }
+#if PY_VERSION_HEX < 0x030400B1
+    } else {
+        (*frame)->f_tstate = tstate;
+#endif
+    }
+    (*frame)->f_lineno = firstlineno;
+    tstate->use_tracing = 0;
+    #if CYTHON_TRACE
+    if (tstate->c_tracefunc)
+        tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL);
+    if (!tstate->c_profilefunc)
+        retval = 1;
+    else
+    #endif
+        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
+    tstate->use_tracing = (tstate->c_profilefunc ||
+                           (CYTHON_TRACE && tstate->c_tracefunc));
+    return tstate->use_tracing && retval;
+}
+static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    PyCodeObject *py_code = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_funcname = PyString_FromString(funcname);
+    py_srcfile = PyString_FromString(srcfile);
+    #else
+    py_funcname = PyUnicode_FromString(funcname);
+    py_srcfile = PyUnicode_FromString(srcfile);
+    #endif
+    if (!py_funcname | !py_srcfile) goto bad;
+    py_code = PyCode_New(
+        0,                /*int argcount,*/
+        #if PY_MAJOR_VERSION >= 3
+        0,                /*int kwonlyargcount,*/
+        #endif
+        0,                /*int nlocals,*/
+        0,                /*int stacksize,*/
+        0,                /*int flags,*/
+        __pyx_empty_bytes,     /*PyObject *code,*/
+        __pyx_empty_tuple,     /*PyObject *consts,*/
+        __pyx_empty_tuple,     /*PyObject *names,*/
+        __pyx_empty_tuple,     /*PyObject *varnames,*/
+        __pyx_empty_tuple,     /*PyObject *freevars,*/
+        __pyx_empty_tuple,     /*PyObject *cellvars,*/
+        py_srcfile,       /*PyObject *filename,*/
+        py_funcname,      /*PyObject *name,*/
+        firstlineno,      /*int firstlineno,*/
+        __pyx_empty_bytes      /*PyObject *lnotab*/
+    );
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return py_code;
+}
+#endif /* CYTHON_PROFILE */
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+    if (unlikely(!type)) {
+        PyErr_SetString(PyExc_SystemError, "Missing type object");
+        return 0;
+    }
+    if (likely(PyObject_TypeCheck(obj, type)))
+        return 1;
+    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+                 Py_TYPE(obj)->tp_name, type->tp_name);
+    return 0;
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+#endif
+    result = (*call)(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    Py_LeaveRecursiveCall();
+#endif
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->curexc_type;
+    tmp_value = tstate->curexc_value;
+    tmp_tb = tstate->curexc_traceback;
+    tstate->curexc_type = type;
+    tstate->curexc_value = value;
+    tstate->curexc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_Restore(type, value, tb);
+#endif
+}
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->curexc_type;
+    *value = tstate->curexc_value;
+    *tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(type, value, tb);
+#endif
+}
+
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+                        CYTHON_UNUSED PyObject *cause) {
+    Py_XINCREF(type);
+    if (!value || value == Py_None)
+        value = NULL;
+    else
+        Py_INCREF(value);
+    if (!tb || tb == Py_None)
+        tb = NULL;
+    else {
+        Py_INCREF(tb);
+        if (!PyTraceBack_Check(tb)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: arg 3 must be a traceback or None");
+            goto raise_error;
+        }
+    }
+    #if PY_VERSION_HEX < 0x02050000
+    if (PyClass_Check(type)) {
+    #else
+    if (PyType_Check(type)) {
+    #endif
+#if CYTHON_COMPILING_IN_PYPY
+        if (!value) {
+            Py_INCREF(Py_None);
+            value = Py_None;
+        }
+#endif
+        PyErr_NormalizeException(&type, &value, &tb);
+    } else {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        value = type;
+        #if PY_VERSION_HEX < 0x02050000
+        if (PyInstance_Check(type)) {
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
+            Py_INCREF(type);
+        } else {
+            type = 0;
+            PyErr_SetString(PyExc_TypeError,
+                "raise: exception must be an old-style class or instance");
+            goto raise_error;
+        }
+        #else
+        type = (PyObject*) Py_TYPE(type);
+        Py_INCREF(type);
+        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: exception class must be a subclass of BaseException");
+            goto raise_error;
+        }
+        #endif
+    }
+    __Pyx_ErrRestore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+#else /* Python 3+ */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+    PyObject* owned_instance = NULL;
+    if (tb == Py_None) {
+        tb = 0;
+    } else if (tb && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto bad;
+    }
+    if (value == Py_None)
+        value = 0;
+    if (PyExceptionInstance_Check(type)) {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto bad;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(value);
+    } else if (PyExceptionClass_Check(type)) {
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
+        }
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
+        }
+    } else {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
+    if (cause && cause != Py_None) {
+#endif
+        PyObject *fixed_cause;
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
+            fixed_cause = PyObject_CallObject(cause, NULL);
+            if (fixed_cause == NULL)
+                goto bad;
+        } else if (PyExceptionInstance_Check(cause)) {
+            fixed_cause = cause;
+            Py_INCREF(fixed_cause);
+        } else {
+            PyErr_SetString(PyExc_TypeError,
+                            "exception causes must derive from "
+                            "BaseException");
+            goto bad;
+        }
+        PyException_SetCause(value, fixed_cause);
+    }
+    PyErr_SetObject(type, value);
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+    }
+bad:
+    Py_XDECREF(owned_instance);
+    return;
+}
+#endif
+
+static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
+    PyObject *kwdict,
+    const char* function_name,
+    int kw_allowed)
+{
+    PyObject* key = 0;
+    Py_ssize_t pos = 0;
+#if CPYTHON_COMPILING_IN_PYPY
+    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
+        goto invalid_keyword;
+    return 1;
+#else
+    while (PyDict_Next(kwdict, &pos, &key, 0)) {
+        #if PY_MAJOR_VERSION < 3
+        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
+        #endif
+            if (unlikely(!PyUnicode_Check(key)))
+                goto invalid_keyword_type;
+    }
+    if ((!kw_allowed) && unlikely(key))
+        goto invalid_keyword;
+    return 1;
+invalid_keyword_type:
+    PyErr_Format(PyExc_TypeError,
+        "%.200s() keywords must be strings", function_name);
+    return 0;
+#endif
+invalid_keyword:
+    PyErr_Format(PyExc_TypeError,
+    #if PY_MAJOR_VERSION < 3
+        "%.200s() got an unexpected keyword argument '%.200s'",
+        function_name, PyString_AsString(key));
+    #else
+        "%s() got an unexpected keyword argument '%U'",
+        function_name, key);
+    #endif
+    return 0;
+}
+
+static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
+    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        PyObject *r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        PyObject *r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+            PyObject *r = PyList_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    else if (PyTuple_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return NULL;
+                }
+            }
+            return m->sq_item(o, i);
+        }
+    }
+#else
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
+    }
+#endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (result) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
+    }
+    return result;
+}
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->exc_type;
+    *value = tstate->exc_value;
+    *tb = tstate->exc_traceback;
+    Py_XINCREF(*type);
+    Py_XINCREF(*value);
+    Py_XINCREF(*tb);
+#else
+    PyErr_GetExcInfo(type, value, tb);
+#endif
+}
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = type;
+    tstate->exc_value = value;
+    tstate->exc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(type, value, tb);
+#endif
+}
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    local_type = tstate->curexc_type;
+    local_value = tstate->curexc_value;
+    local_tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (unlikely(tstate->curexc_type))
+#else
+    if (unlikely(PyErr_Occurred()))
+#endif
+        goto bad;
+    #if PY_MAJOR_VERSION >= 3
+    if (local_tb) {
+        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+            goto bad;
+    }
+    #endif
+    Py_XINCREF(local_tb);
+    Py_XINCREF(local_type);
+    Py_XINCREF(local_value);
+    *type = local_type;
+    *value = local_value;
+    *tb = local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = local_type;
+    tstate->exc_value = local_value;
+    tstate->exc_traceback = local_tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+    return 0;
+bad:
+    *type = 0;
+    *value = 0;
+    *tb = 0;
+    Py_XDECREF(local_type);
+    Py_XDECREF(local_value);
+    Py_XDECREF(local_tb);
+    return -1;
+}
+
+static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
+                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
+                                  int full_traceback) {
+    PyObject *old_exc, *old_val, *old_tb;
+    PyObject *ctx;
+    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
+    if (full_traceback) {
+        Py_XINCREF(old_exc);
+        Py_XINCREF(old_val);
+        Py_XINCREF(old_tb);
+        __Pyx_ErrRestore(old_exc, old_val, old_tb);
+        PyErr_PrintEx(1);
+    }
+    #if PY_MAJOR_VERSION < 3
+    ctx = PyString_FromString(name);
+    #else
+    ctx = PyUnicode_FromString(name);
+    #endif
+    __Pyx_ErrRestore(old_exc, old_val, old_tb);
+    if (!ctx) {
+        PyErr_WriteUnraisable(Py_None);
+    } else {
+        PyErr_WriteUnraisable(ctx);
+        Py_DECREF(ctx);
+    }
+}
+
+static void __Pyx_RaiseDoubleKeywordsError(
+    const char* func_name,
+    PyObject* kw_name)
+{
+    PyErr_Format(PyExc_TypeError,
+        #if PY_MAJOR_VERSION >= 3
+        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+        #else
+        "%s() got multiple values for keyword argument '%s'", func_name,
+        PyString_AsString(kw_name));
+        #endif
+}
+
+static int __Pyx_ParseOptionalKeywords(
+    PyObject *kwds,
+    PyObject **argnames[],
+    PyObject *kwds2,
+    PyObject *values[],
+    Py_ssize_t num_pos_args,
+    const char* function_name)
+{
+    PyObject *key = 0, *value = 0;
+    Py_ssize_t pos = 0;
+    PyObject*** name;
+    PyObject*** first_kw_arg = argnames + num_pos_args;
+    while (PyDict_Next(kwds, &pos, &key, &value)) {
+        name = first_kw_arg;
+        while (*name && (**name != key)) name++;
+        if (*name) {
+            values[name-argnames] = value;
+            continue;
+        }
+        name = first_kw_arg;
+        #if PY_MAJOR_VERSION < 3
+        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+            while (*name) {
+                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+                        && _PyString_Eq(**name, key)) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    if ((**argname == key) || (
+                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+                             && _PyString_Eq(**argname, key))) {
+                        goto arg_passed_twice;
+                    }
+                    argname++;
+                }
+            }
+        } else
+        #endif
+        if (likely(PyUnicode_Check(key))) {
+            while (*name) {
+                int cmp = (**name == key) ? 0 :
+                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+                #endif
+                    PyUnicode_Compare(**name, key);
+                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                if (cmp == 0) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    int cmp = (**argname == key) ? 0 :
+                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+                    #endif
+                        PyUnicode_Compare(**argname, key);
+                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                    if (cmp == 0) goto arg_passed_twice;
+                    argname++;
+                }
+            }
+        } else
+            goto invalid_keyword_type;
+        if (kwds2) {
+            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+        } else {
+            goto invalid_keyword;
+        }
+    }
+    return 0;
+arg_passed_twice:
+    __Pyx_RaiseDoubleKeywordsError(function_name, key);
+    goto bad;
+invalid_keyword_type:
+    PyErr_Format(PyExc_TypeError,
+        "%.200s() keywords must be strings", function_name);
+    goto bad;
+invalid_keyword:
+    PyErr_Format(PyExc_TypeError,
+    #if PY_MAJOR_VERSION < 3
+        "%.200s() got an unexpected keyword argument '%.200s'",
+        function_name, PyString_AsString(key));
+    #else
+        "%s() got an unexpected keyword argument '%U'",
+        function_name, key);
+    #endif
+bad:
+    return -1;
+}
+
+static void __Pyx_RaiseArgtupleInvalid(
+    const char* func_name,
+    int exact,
+    Py_ssize_t num_min,
+    Py_ssize_t num_max,
+    Py_ssize_t num_found)
+{
+    Py_ssize_t num_expected;
+    const char *more_or_less;
+    if (num_found < num_min) {
+        num_expected = num_min;
+        more_or_less = "at least";
+    } else {
+        num_expected = num_max;
+        more_or_less = "at most";
+    }
+    if (exact) {
+        more_or_less = "exactly";
+    }
+    PyErr_Format(PyExc_TypeError,
+                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 func_name, more_or_less, num_expected,
+                 (num_expected == 1) ? "" : "s", num_found);
+}
+
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = *type;
+    tstate->exc_value = *value;
+    tstate->exc_traceback = *tb;
+#else
+    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+    PyErr_SetExcInfo(*type, *value, *tb);
+#endif
+    *type = tmp_type;
+    *value = tmp_value;
+    *tb = tmp_tb;
+}
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    PyObject *ob = PyCapsule_New(vtable, 0, 0);
+#else
+    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+#endif
+    if (!ob)
+        goto bad;
+    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
+        goto bad;
+    Py_DECREF(ob);
+    return 0;
+bad:
+    Py_XDECREF(ob);
+    return -1;
+}
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+    if (!py_import)
+        goto bad;
+    #endif
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    #if PY_VERSION_HEX >= 0x02050000
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                #if PY_VERSION_HEX < 0x03030000
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
+            }
+            level = 0; /* try absolute import on failure */
+        }
+        #endif
+        if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
+        }
+    }
+    #else
+    if (level>0) {
+        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
+        goto bad;
+    }
+    module = PyObject_CallFunctionObjArgs(py_import,
+        name, global_dict, empty_dict, list, NULL);
+    #endif
+bad:
+    #if PY_VERSION_HEX < 0x03030000
+    Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
+    Py_XDECREF(empty_dict);
+    return module;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(int) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int),
+                                     little, !is_unsigned);
+    }
+}
+
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
+    {                                                                     \
+        func_type value = func(x);                                        \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                PyErr_SetString(PyExc_OverflowError,                      \
+                    (is_unsigned && unlikely(value < zero)) ?             \
+                    "can't convert negative value to " #target_type :     \
+                    "value too large to convert to " #target_type);       \
+                return (target_type) -1;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
+    }
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            return (long) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (long) -1;
+        }
+    } else {
+        long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            return (int) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int) -1;
+        }
+    } else {
+        int val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+    PyObject* fake_module;
+    PyTypeObject* cached_type = NULL;
+    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+    if (!fake_module) return NULL;
+    Py_INCREF(fake_module);
+    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+    if (cached_type) {
+        if (!PyType_Check((PyObject*)cached_type)) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s is not a type object",
+                type->tp_name);
+            goto bad;
+        }
+        if (cached_type->tp_basicsize != type->tp_basicsize) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s has the wrong size, try recompiling",
+                type->tp_name);
+            goto bad;
+        }
+    } else {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+        PyErr_Clear();
+        if (PyType_Ready(type) < 0) goto bad;
+        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+            goto bad;
+        Py_INCREF(type);
+        cached_type = type;
+    }
+done:
+    Py_DECREF(fake_module);
+    return cached_type;
+bad:
+    Py_XDECREF(cached_type);
+    cached_type = NULL;
+    goto done;
+}
+
+static PyObject *__Pyx_Generator_Next(PyObject *self);
+static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
+static PyObject *__Pyx_Generator_Close(PyObject *self);
+static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
+static PyTypeObject *__pyx_GeneratorType = 0;
+#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
+#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
+#if 1 || PY_VERSION_HEX < 0x030300B0
+static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
+    PyObject *et, *ev, *tb;
+    PyObject *value = NULL;
+    __Pyx_ErrFetch(&et, &ev, &tb);
+    if (!et) {
+        Py_XDECREF(tb);
+        Py_XDECREF(ev);
+        Py_INCREF(Py_None);
+        *pvalue = Py_None;
+        return 0;
+    }
+    if (unlikely(et != PyExc_StopIteration) &&
+            unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
+        __Pyx_ErrRestore(et, ev, tb);
+        return -1;
+    }
+    if (likely(et == PyExc_StopIteration)) {
+        if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
+            if (!ev) {
+                Py_INCREF(Py_None);
+                ev = Py_None;
+            }
+            Py_XDECREF(tb);
+            Py_DECREF(et);
+            *pvalue = ev;
+            return 0;
+        }
+    }
+    PyErr_NormalizeException(&et, &ev, &tb);
+    if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
+        __Pyx_ErrRestore(et, ev, tb);
+        return -1;
+    }
+    Py_XDECREF(tb);
+    Py_DECREF(et);
+#if PY_VERSION_HEX >= 0x030300A0
+    value = ((PyStopIterationObject *)ev)->value;
+    Py_INCREF(value);
+    Py_DECREF(ev);
+#else
+    {
+        PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args);
+        Py_DECREF(ev);
+        if (likely(args)) {
+            value = PyObject_GetItem(args, 0);
+            Py_DECREF(args);
+        }
+        if (unlikely(!value)) {
+            __Pyx_ErrRestore(NULL, NULL, NULL);
+            Py_INCREF(Py_None);
+            value = Py_None;
+        }
+    }
+#endif
+    *pvalue = value;
+    return 0;
+}
+#endif
+static CYTHON_INLINE
+void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
+    PyObject *exc_type = self->exc_type;
+    PyObject *exc_value = self->exc_value;
+    PyObject *exc_traceback = self->exc_traceback;
+    self->exc_type = NULL;
+    self->exc_value = NULL;
+    self->exc_traceback = NULL;
+    Py_XDECREF(exc_type);
+    Py_XDECREF(exc_value);
+    Py_XDECREF(exc_traceback);
+}
+static CYTHON_INLINE
+int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
+    if (unlikely(gen->is_running)) {
+        PyErr_SetString(PyExc_ValueError,
+                        "generator already executing");
+        return 1;
+    }
+    return 0;
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
+    PyObject *retval;
+    assert(!self->is_running);
+    if (unlikely(self->resume_label == 0)) {
+        if (unlikely(value && value != Py_None)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "can't send non-None value to a "
+                            "just-started generator");
+            return NULL;
+        }
+    }
+    if (unlikely(self->resume_label == -1)) {
+        PyErr_SetNone(PyExc_StopIteration);
+        return NULL;
+    }
+    if (value) {
+#if CYTHON_COMPILING_IN_PYPY
+#else
+        /* Generators always return to their most recent caller, not
+         * necessarily their creator. */
+        if (self->exc_traceback) {
+            PyThreadState *tstate = PyThreadState_GET();
+            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+            PyFrameObject *f = tb->tb_frame;
+            Py_XINCREF(tstate->frame);
+            assert(f->f_back == NULL);
+            f->f_back = tstate->frame;
+        }
+#endif
+        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
+                            &self->exc_traceback);
+    } else {
+        __Pyx_Generator_ExceptionClear(self);
+    }
+    self->is_running = 1;
+    retval = self->body((PyObject *) self, value);
+    self->is_running = 0;
+    if (retval) {
+        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
+                            &self->exc_traceback);
+#if CYTHON_COMPILING_IN_PYPY
+#else
+        /* Don't keep the reference to f_back any longer than necessary.  It
+         * may keep a chain of frames alive or it could create a reference
+         * cycle. */
+        if (self->exc_traceback) {
+            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+            PyFrameObject *f = tb->tb_frame;
+            Py_CLEAR(f->f_back);
+        }
+#endif
+    } else {
+        __Pyx_Generator_ExceptionClear(self);
+    }
+    return retval;
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
+    PyObject *ret;
+    PyObject *val = NULL;
+    __Pyx_Generator_Undelegate(gen);
+    __Pyx_PyGen_FetchStopIterationValue(&val);
+    ret = __Pyx_Generator_SendEx(gen, val);
+    Py_XDECREF(val);
+    return ret;
+}
+static PyObject *__Pyx_Generator_Next(PyObject *self) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
+    PyObject *yf = gen->yieldfrom;
+    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
+        return NULL;
+    if (yf) {
+        PyObject *ret;
+        gen->is_running = 1;
+        ret = Py_TYPE(yf)->tp_iternext(yf);
+        gen->is_running = 0;
+        if (likely(ret)) {
+            return ret;
+        }
+        return __Pyx_Generator_FinishDelegation(gen);
+    }
+    return __Pyx_Generator_SendEx(gen, Py_None);
+}
+static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
+    PyObject *yf = gen->yieldfrom;
+    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
+        return NULL;
+    if (yf) {
+        PyObject *ret;
+        gen->is_running = 1;
+        if (__Pyx_Generator_CheckExact(yf)) {
+            ret = __Pyx_Generator_Send(yf, value);
+        } else {
+            if (value == Py_None)
+                ret = PyIter_Next(yf);
+            else
+                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
+        }
+        gen->is_running = 0;
+        if (likely(ret)) {
+            return ret;
+        }
+        return __Pyx_Generator_FinishDelegation(gen);
+    }
+    return __Pyx_Generator_SendEx(gen, value);
+}
+static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
+    PyObject *retval = NULL;
+    int err = 0;
+    if (__Pyx_Generator_CheckExact(yf)) {
+        retval = __Pyx_Generator_Close(yf);
+        if (!retval)
+            return -1;
+    } else {
+        PyObject *meth;
+        gen->is_running = 1;
+        meth = PyObject_GetAttr(yf, __pyx_n_s_close);
+        if (unlikely(!meth)) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+                PyErr_WriteUnraisable(yf);
+            }
+            PyErr_Clear();
+        } else {
+            retval = PyObject_CallFunction(meth, NULL);
+            Py_DECREF(meth);
+            if (!retval)
+                err = -1;
+        }
+        gen->is_running = 0;
+    }
+    Py_XDECREF(retval);
+    return err;
+}
+static PyObject *__Pyx_Generator_Close(PyObject *self) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    PyObject *retval, *raised_exception;
+    PyObject *yf = gen->yieldfrom;
+    int err = 0;
+    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
+        return NULL;
+    if (yf) {
+        Py_INCREF(yf);
+        err = __Pyx_Generator_CloseIter(gen, yf);
+        __Pyx_Generator_Undelegate(gen);
+        Py_DECREF(yf);
+    }
+    if (err == 0)
+#if PY_VERSION_HEX < 0x02050000
+        PyErr_SetNone(PyExc_StopIteration);
+#else
+        PyErr_SetNone(PyExc_GeneratorExit);
+#endif
+    retval = __Pyx_Generator_SendEx(gen, NULL);
+    if (retval) {
+        Py_DECREF(retval);
+        PyErr_SetString(PyExc_RuntimeError,
+                        "generator ignored GeneratorExit");
+        return NULL;
+    }
+    raised_exception = PyErr_Occurred();
+    if (!raised_exception
+        || raised_exception == PyExc_StopIteration
+#if PY_VERSION_HEX >= 0x02050000
+        || raised_exception == PyExc_GeneratorExit
+        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
+#endif
+        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
+    {
+        if (raised_exception) PyErr_Clear();      /* ignore these errors */
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return NULL;
+}
+static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    PyObject *typ;
+    PyObject *tb = NULL;
+    PyObject *val = NULL;
+    PyObject *yf = gen->yieldfrom;
+    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
+        return NULL;
+    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
+        return NULL;
+    if (yf) {
+        PyObject *ret;
+        Py_INCREF(yf);
+#if PY_VERSION_HEX >= 0x02050000
+        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
+            int err = __Pyx_Generator_CloseIter(gen, yf);
+            Py_DECREF(yf);
+            __Pyx_Generator_Undelegate(gen);
+            if (err < 0)
+                return __Pyx_Generator_SendEx(gen, NULL);
+            goto throw_here;
+        }
+#endif
+        gen->is_running = 1;
+        if (__Pyx_Generator_CheckExact(yf)) {
+            ret = __Pyx_Generator_Throw(yf, args);
+        } else {
+            PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw);
+            if (unlikely(!meth)) {
+                Py_DECREF(yf);
+                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+                    gen->is_running = 0;
+                    return NULL;
+                }
+                PyErr_Clear();
+                __Pyx_Generator_Undelegate(gen);
+                gen->is_running = 0;
+                goto throw_here;
+            }
+            ret = PyObject_CallObject(meth, args);
+            Py_DECREF(meth);
+        }
+        gen->is_running = 0;
+        Py_DECREF(yf);
+        if (!ret) {
+            ret = __Pyx_Generator_FinishDelegation(gen);
+        }
+        return ret;
+    }
+throw_here:
+    __Pyx_Raise(typ, val, tb, NULL);
+    return __Pyx_Generator_SendEx(gen, NULL);
+}
+static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    Py_VISIT(gen->closure);
+    Py_VISIT(gen->classobj);
+    Py_VISIT(gen->yieldfrom);
+    Py_VISIT(gen->exc_type);
+    Py_VISIT(gen->exc_value);
+    Py_VISIT(gen->exc_traceback);
+    return 0;
+}
+static int __Pyx_Generator_clear(PyObject *self) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    Py_CLEAR(gen->closure);
+    Py_CLEAR(gen->classobj);
+    Py_CLEAR(gen->yieldfrom);
+    Py_CLEAR(gen->exc_type);
+    Py_CLEAR(gen->exc_value);
+    Py_CLEAR(gen->exc_traceback);
+    return 0;
+}
+static void __Pyx_Generator_dealloc(PyObject *self) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    PyObject_GC_UnTrack(gen);
+    if (gen->gi_weakreflist != NULL)
+        PyObject_ClearWeakRefs(self);
+    if (gen->resume_label > 0) {
+        PyObject_GC_Track(self);
+#if PY_VERSION_HEX >= 0x030400a1
+        if (PyObject_CallFinalizerFromDealloc(self))
+#else
+        Py_TYPE(gen)->tp_del(self);
+        if (self->ob_refcnt > 0)
+#endif
+            return;                     /* resurrected.  :( */
+        PyObject_GC_UnTrack(self);
+    }
+    __Pyx_Generator_clear(self);
+    PyObject_GC_Del(gen);
+}
+static void __Pyx_Generator_del(PyObject *self) {
+    PyObject *res;
+    PyObject *error_type, *error_value, *error_traceback;
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    if (gen->resume_label <= 0)
+        return ;
+#if PY_VERSION_HEX < 0x030400a1
+    assert(self->ob_refcnt == 0);
+    self->ob_refcnt = 1;
+#endif
+    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
+    res = __Pyx_Generator_Close(self);
+    if (res == NULL)
+        PyErr_WriteUnraisable(self);
+    else
+        Py_DECREF(res);
+    __Pyx_ErrRestore(error_type, error_value, error_traceback);
+#if PY_VERSION_HEX < 0x030400a1
+    /* Undo the temporary resurrection; can't use DECREF here, it would
+     * cause a recursive call.
+     */
+    assert(self->ob_refcnt > 0);
+    if (--self->ob_refcnt == 0)
+        return; /* this is the normal path out */
+    /* close() resurrected it!  Make it look like the original Py_DECREF
+     * never happened.
+     */
+    {
+        Py_ssize_t refcnt = self->ob_refcnt;
+        _Py_NewReference(self);
+        self->ob_refcnt = refcnt;
+    }
+#if CYTHON_COMPILING_IN_CPYTHON
+    assert(PyType_IS_GC(self->ob_type) &&
+           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
+    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
+     * we need to undo that. */
+    _Py_DEC_REFTOTAL;
+#endif
+    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
+     * chain, so no more to do there.
+     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
+     * _Py_NewReference bumped tp_allocs:  both of those need to be
+     * undone.
+     */
+#ifdef COUNT_ALLOCS
+    --Py_TYPE(self)->tp_frees;
+    --Py_TYPE(self)->tp_allocs;
+#endif
+#endif
+}
+static PyMemberDef __pyx_Generator_memberlist[] = {
+    {(char *) "gi_running",
+#if PY_VERSION_HEX >= 0x02060000
+     T_BOOL,
+#else
+     T_BYTE,
+#endif
+     offsetof(__pyx_GeneratorObject, is_running),
+     READONLY,
+     NULL},
+    {0, 0, 0, 0, 0}
+};
+static PyMethodDef __pyx_Generator_methods[] = {
+    {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
+    {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
+    {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
+    {0, 0, 0, 0}
+};
+static PyTypeObject __pyx_GeneratorType_type = {
+    PyVarObject_HEAD_INIT(0, 0)
+    __Pyx_NAMESTR("generator"),         /*tp_name*/
+    sizeof(__pyx_GeneratorObject),      /*tp_basicsize*/
+    0,                                  /*tp_itemsize*/
+    (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/
+    0,                                  /*tp_print*/
+    0,                                  /*tp_getattr*/
+    0,                                  /*tp_setattr*/
+#if PY_MAJOR_VERSION < 3
+    0,                                  /*tp_compare*/
+#else
+    0,                                  /*reserved*/
+#endif
+    0,                                   /*tp_repr*/
+    0,                                  /*tp_as_number*/
+    0,                                  /*tp_as_sequence*/
+    0,                                  /*tp_as_mapping*/
+    0,                                  /*tp_hash*/
+    0,                                  /*tp_call*/
+    0,                                  /*tp_str*/
+    0,                                  /*tp_getattro*/
+    0,                                  /*tp_setattro*/
+    0,                                  /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/
+    0,                                  /*tp_doc*/
+    (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
+    0,                                  /*tp_clear*/
+    0,                                  /*tp_richcompare*/
+    offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
+    0,                                  /*tp_iter*/
+    (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
+    __pyx_Generator_methods,            /*tp_methods*/
+    __pyx_Generator_memberlist,         /*tp_members*/
+    0,                                  /*tp_getset*/
+    0,                                  /*tp_base*/
+    0,                                  /*tp_dict*/
+    0,                                  /*tp_descr_get*/
+    0,                                  /*tp_descr_set*/
+    0,                                  /*tp_dictoffset*/
+    0,                                  /*tp_init*/
+    0,                                  /*tp_alloc*/
+    0,                                  /*tp_new*/
+    0,                                  /*tp_free*/
+    0,                                  /*tp_is_gc*/
+    0,                                  /*tp_bases*/
+    0,                                  /*tp_mro*/
+    0,                                  /*tp_cache*/
+    0,                                  /*tp_subclasses*/
+    0,                                  /*tp_weaklist*/
+#if PY_VERSION_HEX >= 0x030400a1
+    0,                                  /*tp_del*/
+#else
+    __Pyx_Generator_del,                /*tp_del*/
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+    0,                                  /*tp_version_tag*/
+#endif
+#if PY_VERSION_HEX >= 0x030400a1
+    __Pyx_Generator_del,                /*tp_finalize*/
+#endif
+};
+static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
+                                                  PyObject *closure) {
+    __pyx_GeneratorObject *gen =
+        PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
+    if (gen == NULL)
+        return NULL;
+    gen->body = body;
+    gen->closure = closure;
+    Py_XINCREF(closure);
+    gen->is_running = 0;
+    gen->resume_label = 0;
+    gen->classobj = NULL;
+    gen->yieldfrom = NULL;
+    gen->exc_type = NULL;
+    gen->exc_value = NULL;
+    gen->exc_traceback = NULL;
+    gen->gi_weakreflist = NULL;
+    PyObject_GC_Track(gen);
+    return gen;
+}
+static int __pyx_Generator_init(void) {
+    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
+    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
+    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
+    if (__pyx_GeneratorType == NULL) {
+        return -1;
+    }
+    return 0;
+}
+
+static int __Pyx_check_binary_version(void) {
+    char ctversion[4], rtversion[4];
+    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+        char message[200];
+        PyOS_snprintf(message, sizeof(message),
+                      "compiletime version %s of module '%.100s' "
+                      "does not match runtime version %s",
+                      ctversion, __Pyx_MODULE_NAME, rtversion);
+        #if PY_VERSION_HEX < 0x02050000
+        return PyErr_Warn(NULL, message);
+        #else
+        return PyErr_WarnEx(NULL, message, 1);
+        #endif
+    }
+    return 0;
+}
+
+#ifndef __PYX_HAVE_RT_ImportModule
+#define __PYX_HAVE_RT_ImportModule
+static PyObject *__Pyx_ImportModule(const char *name) {
+    PyObject *py_name = 0;
+    PyObject *py_module = 0;
+    py_name = __Pyx_PyIdentifier_FromString(name);
+    if (!py_name)
+        goto bad;
+    py_module = PyImport_Import(py_name);
+    Py_DECREF(py_name);
+    return py_module;
+bad:
+    Py_XDECREF(py_name);
+    return 0;
+}
+#endif
+
+#ifndef __PYX_HAVE_RT_ImportType
+#define __PYX_HAVE_RT_ImportType
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
+    size_t size, int strict)
+{
+    PyObject *py_module = 0;
+    PyObject *result = 0;
+    PyObject *py_name = 0;
+    char warning[200];
+    Py_ssize_t basicsize;
+#ifdef Py_LIMITED_API
+    PyObject *py_basicsize;
+#endif
+    py_module = __Pyx_ImportModule(module_name);
+    if (!py_module)
+        goto bad;
+    py_name = __Pyx_PyIdentifier_FromString(class_name);
+    if (!py_name)
+        goto bad;
+    result = PyObject_GetAttr(py_module, py_name);
+    Py_DECREF(py_name);
+    py_name = 0;
+    Py_DECREF(py_module);
+    py_module = 0;
+    if (!result)
+        goto bad;
+    if (!PyType_Check(result)) {
+        PyErr_Format(PyExc_TypeError,
+            "%.200s.%.200s is not a type object",
+            module_name, class_name);
+        goto bad;
+    }
+#ifndef Py_LIMITED_API
+    basicsize = ((PyTypeObject *)result)->tp_basicsize;
+#else
+    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
+    if (!py_basicsize)
+        goto bad;
+    basicsize = PyLong_AsSsize_t(py_basicsize);
+    Py_DECREF(py_basicsize);
+    py_basicsize = 0;
+    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
+        goto bad;
+#endif
+    if (!strict && (size_t)basicsize > size) {
+        PyOS_snprintf(warning, sizeof(warning),
+            "%s.%s size changed, may indicate binary incompatibility",
+            module_name, class_name);
+        #if PY_VERSION_HEX < 0x02050000
+        if (PyErr_Warn(NULL, warning) < 0) goto bad;
+        #else
+        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
+        #endif
+    }
+    else if ((size_t)basicsize != size) {
+        PyErr_Format(PyExc_ValueError,
+            "%.200s.%.200s has the wrong size, try recompiling",
+            module_name, class_name);
+        goto bad;
+    }
+    return (PyTypeObject *)result;
+bad:
+    Py_XDECREF(py_module);
+    Py_XDECREF(result);
+    return NULL;
+}
+#endif
+
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+    int start = 0, mid = 0, end = count - 1;
+    if (end >= 0 && code_line > entries[end].code_line) {
+        return count;
+    }
+    while (start < end) {
+        mid = (start + end) / 2;
+        if (code_line < entries[mid].code_line) {
+            end = mid;
+        } else if (code_line > entries[mid].code_line) {
+             start = mid + 1;
+        } else {
+            return mid;
+        }
+    }
+    if (code_line <= entries[mid].code_line) {
+        return mid;
+    } else {
+        return mid + 1;
+    }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+    PyCodeObject* code_object;
+    int pos;
+    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+        return NULL;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+        return NULL;
+    }
+    code_object = __pyx_code_cache.entries[pos].code_object;
+    Py_INCREF(code_object);
+    return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+    int pos, i;
+    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+    if (unlikely(!code_line)) {
+        return;
+    }
+    if (unlikely(!entries)) {
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (likely(entries)) {
+            __pyx_code_cache.entries = entries;
+            __pyx_code_cache.max_count = 64;
+            __pyx_code_cache.count = 1;
+            entries[0].code_line = code_line;
+            entries[0].code_object = code_object;
+            Py_INCREF(code_object);
+        }
+        return;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+        PyCodeObject* tmp = entries[pos].code_object;
+        entries[pos].code_object = code_object;
+        Py_DECREF(tmp);
+        return;
+    }
+    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+        int new_max = __pyx_code_cache.max_count + 64;
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (unlikely(!entries)) {
+            return;
+        }
+        __pyx_code_cache.entries = entries;
+        __pyx_code_cache.max_count = new_max;
+    }
+    for (i=__pyx_code_cache.count; i>pos; i--) {
+        entries[i] = entries[i-1];
+    }
+    entries[pos].code_line = code_line;
+    entries[pos].code_object = code_object;
+    __pyx_code_cache.count++;
+    Py_INCREF(code_object);
+}
+
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+            const char *funcname, int c_line,
+            int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_srcfile = PyString_FromString(filename);
+    #else
+    py_srcfile = PyUnicode_FromString(filename);
+    #endif
+    if (!py_srcfile) goto bad;
+    if (c_line) {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #else
+        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #endif
+    }
+    else {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromString(funcname);
+        #else
+        py_funcname = PyUnicode_FromString(funcname);
+        #endif
+    }
+    if (!py_funcname) goto bad;
+    py_code = __Pyx_PyCode_New(
+        0,            /*int argcount,*/
+        0,            /*int kwonlyargcount,*/
+        0,            /*int nlocals,*/
+        0,            /*int stacksize,*/
+        0,            /*int flags,*/
+        __pyx_empty_bytes, /*PyObject *code,*/
+        __pyx_empty_tuple, /*PyObject *consts,*/
+        __pyx_empty_tuple, /*PyObject *names,*/
+        __pyx_empty_tuple, /*PyObject *varnames,*/
+        __pyx_empty_tuple, /*PyObject *freevars,*/
+        __pyx_empty_tuple, /*PyObject *cellvars,*/
+        py_srcfile,   /*PyObject *filename,*/
+        py_funcname,  /*PyObject *name,*/
+        py_line,      /*int firstlineno,*/
+        __pyx_empty_bytes  /*PyObject *lnotab*/
+    );
+    Py_DECREF(py_srcfile);
+    Py_DECREF(py_funcname);
+    return py_code;
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_globals = 0;
+    PyFrameObject *py_frame = 0;
+    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
+    if (!py_code) {
+        py_code = __Pyx_CreateCodeObjectForTraceback(
+            funcname, c_line, py_line, filename);
+        if (!py_code) goto bad;
+        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
+    }
+    py_globals = PyModule_GetDict(__pyx_m);
+    if (!py_globals) goto bad;
+    py_frame = PyFrame_New(
+        PyThreadState_GET(), /*PyThreadState *tstate,*/
+        py_code,             /*PyCodeObject *code,*/
+        py_globals,          /*PyObject *globals,*/
+        0                    /*PyObject *locals*/
+    );
+    if (!py_frame) goto bad;
+    py_frame->f_lineno = py_line;
+    PyTraceBack_Here(py_frame);
+bad:
+    Py_XDECREF(py_code);
+    Py_XDECREF(py_frame);
+}
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+    while (t->p) {
+        #if PY_MAJOR_VERSION < 3
+        if (t->is_unicode) {
+            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+        } else if (t->intern) {
+            *t->p = PyString_InternFromString(t->s);
+        } else {
+            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+        }
+        #else  /* Python 3+ has unicode identifiers */
+        if (t->is_unicode | t->is_str) {
+            if (t->intern) {
+                *t->p = PyUnicode_InternFromString(t->s);
+            } else if (t->encoding) {
+                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+            } else {
+                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+            }
+        } else {
+            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+        }
+        #endif
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else /* PY_VERSION_HEX < 0x03030000 */
+        if (PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_DATA_SIZE(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+#endif /* PY_VERSION_HEX < 0x03030000 */
+    } else
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+#if !CYTHON_COMPILING_IN_PYPY
+#if PY_VERSION_HEX >= 0x02060000
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+   int is_true = x == Py_True;
+   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+   else return PyObject_IsTrue(x);
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+  PyNumberMethods *m;
+  const char *name = NULL;
+  PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+  if (PyInt_Check(x) || PyLong_Check(x))
+#else
+  if (PyLong_Check(x))
+#endif
+    return Py_INCREF(x), x;
+  m = Py_TYPE(x)->tp_as_number;
+#if PY_MAJOR_VERSION < 3
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Int(x);
+  }
+  else if (m && m->nb_long) {
+    name = "long";
+    res = PyNumber_Long(x);
+  }
+#else
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Long(x);
+  }
+#endif
+  if (res) {
+#if PY_MAJOR_VERSION < 3
+    if (!PyInt_Check(res) && !PyLong_Check(res)) {
+#else
+    if (!PyLong_Check(res)) {
+#endif
+      PyErr_Format(PyExc_TypeError,
+                   "__%.4s__ returned non-%.4s (type %.200s)",
+                   name, name, Py_TYPE(res)->tp_name);
+      Py_DECREF(res);
+      return NULL;
+    }
+  }
+  else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_TypeError,
+                    "an integer is required");
+  }
+  return res;
+}
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+  Py_ssize_t ival;
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+  #if PY_VERSION_HEX < 0x02060000
+    return PyInt_AsSsize_t(b);
+  #else
+    return PyLong_AsSsize_t(b);
+  #endif
+  }
+  x = PyNumber_Index(b);
+  if (!x) return -1;
+  ival = PyInt_AsSsize_t(x);
+  Py_DECREF(x);
+  return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+#if PY_VERSION_HEX < 0x02050000
+   if (ival <= LONG_MAX)
+       return PyInt_FromLong((long)ival);
+   else {
+       unsigned char *bytes = (unsigned char *) &ival;
+       int one = 1; int little = (int)*(unsigned char*)&one;
+       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
+   }
+#else
+   return PyInt_FromSize_t(ival);
+#endif
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/pysam/cfaidx.pxd b/pysam/cfaidx.pxd
new file mode 100644
index 0000000..a3501fe
--- /dev/null
+++ b/pysam/cfaidx.pxd
@@ -0,0 +1,32 @@
+from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
+from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
+from libc.stdlib cimport malloc, calloc, realloc, free
+from libc.string cimport memcpy, memcmp, strncpy, strlen, strdup
+from libc.stdio cimport FILE, printf
+
+from chtslib cimport faidx_t, kseq_t, gzFile
+                     
+cdef extern from "htslib/kstring.h" nogil:
+    ctypedef struct kstring_t:
+        size_t l, m
+        char *s
+
+cdef class Fastafile:
+    cdef object _filename, _references, _lengths, reference2length
+    cdef faidx_t* fastafile
+    cdef char* _fetch(self, char* reference,
+                      int start, int end, int* length)
+
+
+cdef class FastqProxy:
+    cdef kseq_t * _delegate
+
+
+cdef class Fastqfile:
+    cdef object _filename
+    cdef gzFile fastqfile
+    cdef kseq_t * entry
+
+    cdef kseq_t * getCurrent( self )
+    cdef int cnext(self)
+
diff --git a/pysam/cfaidx.pyx b/pysam/cfaidx.pyx
new file mode 100644
index 0000000..5e3c473
--- /dev/null
+++ b/pysam/cfaidx.pyx
@@ -0,0 +1,340 @@
+# cython: embedsignature=True
+# cython: profile=True
+# adds doc-strings for sphinx
+import sys
+import os
+
+cdef class FastqProxy
+cdef makeFastqProxy(kseq_t * src):
+    '''enter src into AlignedRead.'''
+    cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
+    dest._delegate = src
+    return dest
+
+
+from cpython cimport PyErr_SetString, \
+    PyBytes_Check, \
+    PyUnicode_Check, \
+    PyBytes_FromStringAndSize
+
+from cpython.version cimport PY_MAJOR_VERSION
+
+from chtslib cimport \
+    faidx_fetch_nseq, fai_load, fai_destroy, fai_fetch, \
+    faidx_fetch_seq, gzopen, gzclose, \
+    kseq_init, kseq_destroy, kseq_read
+
+
+########################################################################
+########################################################################
+########################################################################
+## Python 3 compatibility functions
+########################################################################
+IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+
+# filename encoding (copied from lxml.etree.pyx)
+cdef str _FILENAME_ENCODING
+_FILENAME_ENCODING = sys.getfilesystemencoding()
+if _FILENAME_ENCODING is None:
+    _FILENAME_ENCODING = sys.getdefaultencoding()
+if _FILENAME_ENCODING is None:
+    _FILENAME_ENCODING = 'ascii'
+
+#cdef char* _C_FILENAME_ENCODING
+#_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+
+cdef bytes _encodeFilename(object filename):
+    """Make sure a filename is 8-bit encoded (or None)."""
+    if filename is None:
+        return None
+    elif PyBytes_Check(filename):
+        return filename
+    elif PyUnicode_Check(filename):
+        return filename.encode(_FILENAME_ENCODING)
+    else:
+        raise TypeError, u"Argument must be string or unicode."
+
+
+
+#####################################################################
+# hard-coded constants
+cdef int max_pos = 2 << 29
+
+cdef class Fastafile:
+    '''*(filename)*
+
+    A *FASTA* file. The file is automatically opened.
+
+    The file expects an indexed fasta file.
+
+    TODO:
+        add automatic indexing.
+        add function to get sequence names.
+    '''
+
+    def __cinit__(self, *args, **kwargs ):
+        self.fastafile = NULL
+        self._filename = None
+        self._references = None
+        self._lengths = None
+        self.reference2length = None
+        self._open( *args, **kwargs )
+
+    def _isOpen( self ):
+        '''return true if samfile has been opened.'''
+        return self.fastafile != NULL
+
+    def __len__(self):
+        if self.fastafile == NULL:
+            raise ValueError( "calling len() on closed file" )
+
+        return faidx_fetch_nseq(self.fastafile)
+
+    def _open(self, filename):
+        '''open an indexed fasta file.
+
+        This method expects an indexed fasta file.
+        '''
+
+        # close a previously opened file
+        if self.fastafile != NULL: self.close()
+        self._filename = _encodeFilename(filename)
+        self.fastafile = fai_load(self._filename)
+
+        if self.fastafile == NULL:
+            raise IOError("could not open file `%s`" % filename)
+
+        # read index
+        if not os.path.exists( self._filename + b".fai" ):
+            raise ValueError("could not locate index file")
+
+        with open( self._filename + b".fai" ) as inf:
+            data = [ x.split("\t") for x in inf ]
+            self._references = tuple(x[0] for x in data)
+            self._lengths = tuple(int(x[1]) for x in data)
+            self.reference2length = dict(zip(self._references, self._lengths))
+
+    def close( self ):
+        if self.fastafile != NULL:
+            fai_destroy( self.fastafile )
+            self.fastafile = NULL
+
+    def __dealloc__(self):
+        self.close()
+
+    property filename:
+        '''number of :term:`filename` associated with this object.'''
+        def __get__(self):
+            return self._filename
+
+    property references:
+        '''tuple with the names of :term:`reference` sequences.'''
+        def __get__(self):
+            return self._references
+
+    property nreferences:
+        '''number of :term:`reference` sequences in the file.'''
+        def __get__(self):
+            return len(self._references) if self.references else None
+
+    property lengths:
+        '''tuple with the lengths of :term:`reference` sequences.'''
+        def __get__(self):
+            return self._lengths
+
+    def fetch( self,
+               reference = None,
+               start = None,
+               end = None,
+               region = None):
+
+        '''*(reference = None, start = None, end = None, region = None)*
+
+        fetch :class:`AlignedRead` objects in a :term:`region` using 0-based indexing.
+
+        The region is specified by :term:`reference`, *start* and *end*.
+
+        fetch returns an empty string if the region is out of range or addresses an unknown *reference*.
+
+        If *reference* is given and *start* is None, the sequence from the
+        first base is returned. Similarly, if *end* is None, the sequence
+        until the last base is returned.
+
+        Alternatively, a samtools :term:`region` string can be supplied.
+        '''
+
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+
+        cdef int length
+        cdef char * seq
+
+        if not region:
+            if reference is None:
+                raise ValueError('no sequence/region supplied.')
+            if start is None:
+                start = 0
+            if end is None:
+                end = max_pos - 1
+
+            if start > end:
+                raise ValueError(
+                    'invalid region: start (%i) > end (%i)' % (start, end))
+            if start == end:
+                return b""
+            # valid ranges are from 0 to 2^29-1
+            if not 0 <= start < max_pos:
+                raise IndexError('start out of range (%i)' % start)
+            if not 0 <= end < max_pos:
+                raise IndexError('end out of range (%i)' % end)
+            # note: faidx_fetch_seq has a bug such that out-of-range access
+            # always returns the last residue. Hence do not use faidx_fetch_seq,
+            # but use fai_fetch instead
+            # seq = faidx_fetch_seq(self.fastafile,
+            #                       reference,
+            #                       start,
+            #                       end-1,
+            #                       &length)
+            region = "%s:%i-%i" % (reference, start+1, end)
+            if PY_MAJOR_VERSION >= 3:
+                region = region.encode('ascii')
+            seq = fai_fetch( self.fastafile,
+                             region,
+                             &length )
+        else:
+            # samtools adds a '\0' at the end
+            seq = fai_fetch( self.fastafile, region, &length )
+
+        # copy to python
+        if seq == NULL:
+            return b""
+        else:
+            try:
+                py_seq = seq[:length]
+            finally:
+                free(seq)
+
+        return py_seq
+
+    cdef char * _fetch( self, char * reference, int start, int end, int * length ):
+        '''fetch sequence for reference, start and end'''
+
+        return faidx_fetch_seq(self.fastafile,
+                               reference,
+                               start,
+                               end-1,
+                               length )
+
+    def getReferenceLength( self, reference ):
+        '''return the length of reference.'''
+        return self.reference2length[reference]
+
+    def __getitem__(self, reference):
+        return self.fetch(reference)
+
+    def __contains__( self, reference ):
+        '''return true if reference in fasta file.'''
+        return reference in self.reference2length
+
+######################################################################
+######################################################################
+######################################################################
+## Fastq file
+######################################################################
+
+cdef class FastqProxy:
+    def __init__(self): pass
+
+    property name:
+        def __get__(self):
+            return self._delegate.name.s
+
+    property sequence:
+        def __get__(self):
+            return self._delegate.seq.s
+
+    property comment:
+        def __get__(self):
+            if self._delegate.comment.l:
+                return self._delegate.comment.s
+            else: return None
+
+    property quality:
+        def __get__(self):
+            if self._delegate.qual.l:
+                return self._delegate.qual.s
+            else: return None
+
+cdef class Fastqfile:
+    '''*(filename)*
+
+    A *FASTQ* file. The file is automatically opened.
+
+    '''
+    def __cinit__(self, *args, **kwargs):
+        # self.fastqfile = <gzFile*>NULL
+        self._filename = None
+        self.entry = NULL
+        self._open(*args, **kwargs)
+
+    def _isOpen( self ):
+        '''return true if samfile has been opened.'''
+        return self.entry != NULL
+
+    def _open(self, filename):
+        '''open an indexed fasta file.
+
+        This method expects an indexed fasta file.
+        '''
+        self.close()
+
+        if not os.path.exists(filename):
+            raise IOError("No such file or directory: %s" % filename)
+
+        filename = _encodeFilename(filename)
+        self.fastqfile = gzopen(filename, "r")
+        self.entry = kseq_init(self.fastqfile)
+        self._filename = filename
+
+    def close( self ):
+        '''close file.'''
+        if self.entry != NULL:
+            gzclose(self.fastqfile)
+            if self.entry:
+                kseq_destroy(self.entry)
+                self.entry = NULL
+
+    def __dealloc__(self):
+        self.close()
+
+    property filename:
+        '''number of :term:`filename` associated with this object.'''
+        def __get__(self):
+            return self._filename
+
+    def __iter__(self):
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+        return self
+
+    cdef kseq_t * getCurrent(self):
+        return self.entry
+
+    cdef int cnext(self):
+        '''C version of iterator
+        '''
+        return kseq_read(self.entry)
+
+    def __next__(self):
+        """
+        python version of next().
+        """
+        cdef int l
+        l = kseq_read( self.entry)
+        if (l > 0):
+            return makeFastqProxy( self.entry )
+        else:
+            raise StopIteration
+
+__all__ = ["Fastafile",
+           "Fastqfile"]
diff --git a/pysam/chtslib.c b/pysam/chtslib.c
new file mode 100644
index 0000000..41a3b84
--- /dev/null
+++ b/pysam/chtslib.c
@@ -0,0 +1,3162 @@
+/* Generated by Cython 0.20.1 on Tue Jul 15 21:20:07 2014 */
+
+#define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
+#include "Python.h"
+#ifndef Py_PYTHON_H
+    #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02040000
+    #error Cython requires Python 2.4+.
+#else
+#define CYTHON_ABI "0_20_1"
+#include <stddef.h> /* For offsetof */
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+  #ifndef __stdcall
+    #define __stdcall
+  #endif
+  #ifndef __cdecl
+    #define __cdecl
+  #endif
+  #ifndef __fastcall
+    #define __fastcall
+  #endif
+#endif
+#ifndef DL_IMPORT
+  #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+  #define DL_EXPORT(t) t
+#endif
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+  #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+#define CYTHON_COMPILING_IN_PYPY 1
+#define CYTHON_COMPILING_IN_CPYTHON 0
+#else
+#define CYTHON_COMPILING_IN_PYPY 0
+#define CYTHON_COMPILING_IN_CPYTHON 1
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+#define Py_OptimizeFlag 0
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  typedef int Py_ssize_t;
+  #define PY_SSIZE_T_MAX INT_MAX
+  #define PY_SSIZE_T_MIN INT_MIN
+  #define PY_FORMAT_SIZE_T ""
+  #define CYTHON_FORMAT_SSIZE_T ""
+  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
+  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
+  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
+                                (PyErr_Format(PyExc_TypeError, \
+                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
+                                 (PyObject*)0))
+  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
+                                  !PyComplex_Check(o))
+  #define PyIndex_Check __Pyx_PyIndex_Check
+  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
+  #define __PYX_BUILD_PY_SSIZE_T "i"
+#else
+  #define __PYX_BUILD_PY_SSIZE_T "n"
+  #define CYTHON_FORMAT_SSIZE_T "z"
+  #define __Pyx_PyIndex_Check PyIndex_Check
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
+  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
+  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
+  #define PyVarObject_HEAD_INIT(type, size) \
+          PyObject_HEAD_INIT(type) size,
+  #define PyType_Modified(t)
+  typedef struct {
+     void *buf;
+     PyObject *obj;
+     Py_ssize_t len;
+     Py_ssize_t itemsize;
+     int readonly;
+     int ndim;
+     char *format;
+     Py_ssize_t *shape;
+     Py_ssize_t *strides;
+     Py_ssize_t *suboffsets;
+     void *internal;
+  } Py_buffer;
+  #define PyBUF_SIMPLE 0
+  #define PyBUF_WRITABLE 0x0001
+  #define PyBUF_FORMAT 0x0004
+  #define PyBUF_ND 0x0008
+  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
+  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
+  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
+  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
+  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
+  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
+  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
+  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
+  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
+#endif
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
+#else
+  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define Py_TPFLAGS_CHECKTYPES 0
+  #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
+  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
+#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
+  #define Py_TPFLAGS_IS_ABSTRACT 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+  #define CYTHON_PEP393_ENABLED 1
+  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
+                                              0 : _PyUnicode_Ready((PyObject *)(op)))
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
+  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
+#else
+  #define CYTHON_PEP393_ENABLED 0
+  #define __Pyx_PyUnicode_READY(op)       (0)
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBaseString_Type            PyUnicode_Type
+  #define PyStringObject               PyUnicodeObject
+  #define PyString_Type                PyUnicode_Type
+  #define PyString_Check               PyUnicode_Check
+  #define PyString_CheckExact          PyUnicode_CheckExact
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PyBytesObject                PyStringObject
+  #define PyBytes_Type                 PyString_Type
+  #define PyBytes_Check                PyString_Check
+  #define PyBytes_CheckExact           PyString_CheckExact
+  #define PyBytes_FromString           PyString_FromString
+  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
+  #define PyBytes_FromFormat           PyString_FromFormat
+  #define PyBytes_DecodeEscape         PyString_DecodeEscape
+  #define PyBytes_AsString             PyString_AsString
+  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
+  #define PyBytes_Size                 PyString_Size
+  #define PyBytes_AS_STRING            PyString_AS_STRING
+  #define PyBytes_GET_SIZE             PyString_GET_SIZE
+  #define PyBytes_Repr                 PyString_Repr
+  #define PyBytes_Concat               PyString_Concat
+  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
+  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
+#endif
+#ifndef PySet_CheckExact
+  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#if PY_MAJOR_VERSION >= 3
+  #define PyIntObject                  PyLongObject
+  #define PyInt_Type                   PyLong_Type
+  #define PyInt_Check(op)              PyLong_Check(op)
+  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
+  #define PyInt_FromString             PyLong_FromString
+  #define PyInt_FromUnicode            PyLong_FromUnicode
+  #define PyInt_FromLong               PyLong_FromLong
+  #define PyInt_FromSize_t             PyLong_FromSize_t
+  #define PyInt_FromSsize_t            PyLong_FromSsize_t
+  #define PyInt_AsLong                 PyLong_AsLong
+  #define PyInt_AS_LONG                PyLong_AS_LONG
+  #define PyInt_AsSsize_t              PyLong_AsSsize_t
+  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
+  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBoolObject                 PyLongObject
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+  typedef long Py_hash_t;
+  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
+#else
+  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
+#endif
+#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
+  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
+  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
+#else
+  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
+  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
+  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
+  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
+#else
+  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
+  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
+  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  #define __Pyx_NAMESTR(n) ((char *)(n))
+  #define __Pyx_DOCSTR(n)  ((char *)(n))
+#else
+  #define __Pyx_NAMESTR(n) (n)
+  #define __Pyx_DOCSTR(n)  (n)
+#endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
+
+
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
+#else
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+  #ifdef __cplusplus
+    #define __PYX_EXTERN_C extern "C"
+  #else
+    #define __PYX_EXTERN_C extern
+  #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE__pysam__libchtslib
+#define __PYX_HAVE_API__pysam__libchtslib
+#include "string.h"
+#include "stdio.h"
+#include "pythread.h"
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
+#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
+
+
+#ifdef __GNUC__
+  /* Test for GCC > 2.95 */
+  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
+    #define likely(x)   __builtin_expect(!!(x), 1)
+    #define unlikely(x) __builtin_expect(!!(x), 0)
+  #else /* __GNUC__ > 2 ... */
+    #define likely(x)   (x)
+    #define unlikely(x) (x)
+  #endif /* __GNUC__ > 2 ... */
+#else /* __GNUC__ */
+  #define likely(x)   (x)
+  #define unlikely(x) (x)
+#endif /* __GNUC__ */
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+  "chtslib.pyx",
+  "type.pxd",
+  "bool.pxd",
+  "complex.pxd",
+};
+
+/*--- Type declarations ---*/
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
+  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          if (acquire_gil) { \
+              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+              PyGILState_Release(__pyx_gilstate_save); \
+          } else { \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+          }
+#else
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+  #define __Pyx_RefNannyFinishContext() \
+          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+  #define __Pyx_RefNannyDeclarations
+  #define __Pyx_RefNannySetupContext(name, acquire_gil)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XINCREF(r) Py_XINCREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
+  #define __Pyx_XGOTREF(r)
+  #define __Pyx_XGIVEREF(r)
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
+#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
+
+#ifndef CYTHON_PROFILE
+  #define CYTHON_PROFILE 1
+#endif
+#ifndef CYTHON_TRACE
+  #define CYTHON_TRACE 0
+#endif
+#if CYTHON_TRACE
+  #undef CYTHON_PROFILE_REUSE_FRAME
+#endif
+#ifndef CYTHON_PROFILE_REUSE_FRAME
+  #define CYTHON_PROFILE_REUSE_FRAME 0
+#endif
+#if CYTHON_PROFILE || CYTHON_TRACE
+  #include "compile.h"
+  #include "frameobject.h"
+  #include "traceback.h"
+  #if CYTHON_PROFILE_REUSE_FRAME
+    #define CYTHON_FRAME_MODIFIER static
+    #define CYTHON_FRAME_DEL
+  #else
+    #define CYTHON_FRAME_MODIFIER
+    #define CYTHON_FRAME_DEL Py_CLEAR(__pyx_frame)
+  #endif
+  #define __Pyx_TraceDeclarations                                     \
+  static PyCodeObject *__pyx_frame_code = NULL;                      \
+  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;           \
+  int __Pyx_use_tracing = 0;
+  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)                            \
+  if (unlikely(PyThreadState_GET()->use_tracing &&                                   \
+          (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc)))) {      \
+      __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno);  \
+  }
+  #define __Pyx_TraceException()                                                           \
+  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing &&                   \
+          (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc))) {  \
+      PyThreadState* tstate = PyThreadState_GET();                                         \
+      tstate->use_tracing = 0;                                                             \
+      PyObject *exc_info = __Pyx_GetExceptionTuple();                                      \
+      if (exc_info) {                                                                      \
+          if (CYTHON_TRACE && tstate->c_tracefunc)                                         \
+              tstate->c_tracefunc(                                                         \
+                  tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);          \
+          tstate->c_profilefunc(                                                           \
+              tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);            \
+          Py_DECREF(exc_info);                                                             \
+      }                                                                                    \
+      tstate->use_tracing = 1;                                                             \
+  }
+  #define __Pyx_TraceReturn(result)                                                  \
+  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing) {             \
+      PyThreadState* tstate = PyThreadState_GET();                                   \
+      tstate->use_tracing = 0;                                                        \
+      if (CYTHON_TRACE && tstate->c_tracefunc)                                       \
+          tstate->c_tracefunc(                                                       \
+              tstate->c_traceobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);  \
+      if (tstate->c_profilefunc)                                                     \
+          tstate->c_profilefunc(                                                     \
+              tstate->c_profileobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);  \
+      CYTHON_FRAME_DEL;                                                              \
+      tstate->use_tracing = 1;                                                       \
+  }
+  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/
+  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
+#else
+  #define __Pyx_TraceDeclarations
+  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)
+  #define __Pyx_TraceException()
+  #define __Pyx_TraceReturn(result)
+#endif /* CYTHON_PROFILE */
+#if CYTHON_TRACE
+  #define __Pyx_TraceLine(lineno)                                                          \
+  if (unlikely(__Pyx_use_tracing) && unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_tracefunc)) {    \
+      PyThreadState* tstate = PyThreadState_GET();                                         \
+      __pyx_frame->f_lineno = lineno;                                                     \
+      tstate->use_tracing = 0;                                                             \
+      tstate->c_tracefunc(tstate->c_traceobj, __pyx_frame, PyTrace_LINE, NULL);           \
+      tstate->use_tracing = 1;                                                             \
+  }
+#else
+  #define __Pyx_TraceLine(lineno)
+#endif
+
+#include <string.h>
+
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+static int __Pyx_check_binary_version(void);
+
+#if !defined(__Pyx_PyIdentifier_FromString)
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
+#else
+  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
+#endif
+#endif
+
+static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
+
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
+
+typedef struct {
+    int code_line;
+    PyCodeObject* code_object;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+    int count;
+    int max_count;
+    __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename); /*proto*/
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+
+
+/* Module declarations from 'cpython.version' */
+
+/* Module declarations from 'cpython.ref' */
+
+/* Module declarations from 'cpython.exc' */
+
+/* Module declarations from 'cpython.module' */
+
+/* Module declarations from 'cpython.mem' */
+
+/* Module declarations from 'cpython.tuple' */
+
+/* Module declarations from 'cpython.list' */
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from 'cpython.object' */
+
+/* Module declarations from 'cpython.sequence' */
+
+/* Module declarations from 'cpython.mapping' */
+
+/* Module declarations from 'cpython.iterator' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.type' */
+static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
+
+/* Module declarations from 'cpython.number' */
+
+/* Module declarations from 'cpython.int' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.bool' */
+static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
+
+/* Module declarations from 'cpython.long' */
+
+/* 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' */
+
+/* Module declarations from 'cpython.dict' */
+
+/* Module declarations from 'cpython.instance' */
+
+/* Module declarations from 'cpython.function' */
+
+/* Module declarations from 'cpython.method' */
+
+/* Module declarations from 'cpython.weakref' */
+
+/* Module declarations from 'cpython.getargs' */
+
+/* Module declarations from 'cpython.pythread' */
+
+/* Module declarations from 'cpython.pystate' */
+
+/* Module declarations from 'cpython.cobject' */
+
+/* Module declarations from 'cpython.oldbuffer' */
+
+/* Module declarations from 'cpython.set' */
+
+/* Module declarations from 'cpython.buffer' */
+
+/* Module declarations from 'cpython.bytes' */
+
+/* Module declarations from 'cpython.pycapsule' */
+
+/* Module declarations from 'cpython' */
+
+/* Module declarations from 'pysam.libchtslib' */
+static PyObject *__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING = 0;
+static PyObject *__pyx_f_5pysam_10libchtslib__forceBytes(PyObject *); /*proto*/
+#define __Pyx_MODULE_NAME "pysam.libchtslib"
+int __pyx_module_is_main_pysam__libchtslib = 0;
+
+/* Implementation of 'pysam.libchtslib' */
+static PyObject *__pyx_builtin_TypeError;
+static char __pyx_k_os[] = "os";
+static char __pyx_k_re[] = "re";
+static char __pyx_k_all[] = "__all__";
+static char __pyx_k_sys[] = "sys";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_ascii[] = "ascii";
+static char __pyx_k_types[] = "types";
+static char __pyx_k_ctypes[] = "ctypes";
+static char __pyx_k_decode[] = "decode";
+static char __pyx_k_encode[] = "encode";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_struct[] = "struct";
+static char __pyx_k_platform[] = "platform";
+static char __pyx_k_tempfile[] = "tempfile";
+static char __pyx_k_warnings[] = "warnings";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_itertools[] = "itertools";
+static char __pyx_k_IS_PYTHON3[] = "IS_PYTHON3";
+static char __pyx_k_collections[] = "collections";
+static char __pyx_k_getdefaultencoding[] = "getdefaultencoding";
+static char __pyx_k_getfilesystemencoding[] = "getfilesystemencoding";
+static char __pyx_k_Argument_must_be_string_bytes_or[] = "Argument must be string, bytes or unicode.";
+static char __pyx_k_Argument_must_be_string_or_unico[] = "Argument must be string or unicode.";
+static PyObject *__pyx_kp_u_Argument_must_be_string_bytes_or;
+static PyObject *__pyx_kp_u_Argument_must_be_string_or_unico;
+static PyObject *__pyx_n_s_IS_PYTHON3;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_ascii;
+static PyObject *__pyx_n_s_collections;
+static PyObject *__pyx_n_s_ctypes;
+static PyObject *__pyx_n_s_decode;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_getdefaultencoding;
+static PyObject *__pyx_n_s_getfilesystemencoding;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_itertools;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_os;
+static PyObject *__pyx_n_s_platform;
+static PyObject *__pyx_n_s_re;
+static PyObject *__pyx_n_s_struct;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_tempfile;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_types;
+static PyObject *__pyx_n_s_warnings;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+
+/* "pysam/chtslib.pyx":29
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+ * 
+ * cdef from_string_and_size(char* s, size_t length):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s[:length]
+ */
+
+static PyObject *__pyx_f_5pysam_10libchtslib_from_string_and_size(char *__pyx_v_s, size_t __pyx_v_length) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("from_string_and_size", 0);
+  __Pyx_TraceCall("from_string_and_size", __pyx_f[0], 29);
+
+  /* "pysam/chtslib.pyx":30
+ * 
+ * cdef from_string_and_size(char* s, size_t length):
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s[:length]
+ *     else:
+ */
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/chtslib.pyx":31
+ * cdef from_string_and_size(char* s, size_t length):
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s[:length]             # <<<<<<<<<<<<<<
+ *     else:
+ *         return s[:length].decode("ascii")
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/chtslib.pyx":33
+ *         return s[:length]
+ *     else:
+ *         return s[:length].decode("ascii")             # <<<<<<<<<<<<<<
+ * 
+ * # filename encoding (copied from lxml.etree.pyx)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_s, 0, __pyx_v_length, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":29
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+ * 
+ * cdef from_string_and_size(char* s, size_t length):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s[:length]
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.libchtslib.from_string_and_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/chtslib.pyx":46
+ * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+ * 
+ * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ */
+
+static PyObject *__pyx_f_5pysam_10libchtslib__encodeFilename(PyObject *__pyx_v_filename) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_encodeFilename", 0);
+  __Pyx_TraceCall("_encodeFilename", __pyx_f[0], 46);
+
+  /* "pysam/chtslib.pyx":48
+ * cdef bytes _encodeFilename(object filename):
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:             # <<<<<<<<<<<<<<
+ *         return None
+ *     elif PyBytes_Check(filename):
+ */
+  __pyx_t_1 = (__pyx_v_filename == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":49
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ *         return None             # <<<<<<<<<<<<<<
+ *     elif PyBytes_Check(filename):
+ *         return filename
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = ((PyObject*)Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":50
+ *     if filename is None:
+ *         return None
+ *     elif PyBytes_Check(filename):             # <<<<<<<<<<<<<<
+ *         return filename
+ *     elif PyUnicode_Check(filename):
+ */
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":51
+ *         return None
+ *     elif PyBytes_Check(filename):
+ *         return filename             # <<<<<<<<<<<<<<
+ *     elif PyUnicode_Check(filename):
+ *         return filename.encode(_FILENAME_ENCODING)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_filename);
+    __pyx_r = ((PyObject*)__pyx_v_filename);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":52
+ *     elif PyBytes_Check(filename):
+ *         return filename
+ *     elif PyUnicode_Check(filename):             # <<<<<<<<<<<<<<
+ *         return filename.encode(_FILENAME_ENCODING)
+ *     else:
+ */
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":53
+ *         return filename
+ *     elif PyUnicode_Check(filename):
+ *         return filename.encode(_FILENAME_ENCODING)             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string or unicode."
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_5pysam_10libchtslib__FILENAME_ENCODING);
+    __Pyx_GIVEREF(__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_5);
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/chtslib.pyx":55
+ *         return filename.encode(_FILENAME_ENCODING)
+ *     else:
+ *         raise TypeError, u"Argument must be string or unicode."             # <<<<<<<<<<<<<<
+ * 
+ * cdef _forceStr(object s):
+ */
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_or_unico, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/chtslib.pyx":46
+ * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+ * 
+ * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.libchtslib._encodeFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/chtslib.pyx":57
+ *         raise TypeError, u"Argument must be string or unicode."
+ * 
+ * cdef _forceStr(object s):             # <<<<<<<<<<<<<<
+ *     """Return s converted to str type of current Python
+ *     (bytes in Py2, unicode in Py3)"""
+ */
+
+static PyObject *__pyx_f_5pysam_10libchtslib__forceStr(PyObject *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_forceStr", 0);
+  __Pyx_TraceCall("_forceStr", __pyx_f[0], 57);
+
+  /* "pysam/chtslib.pyx":60
+ *     """Return s converted to str type of current Python
+ *     (bytes in Py2, unicode in Py3)"""
+ *     if s is None:             # <<<<<<<<<<<<<<
+ *         return None
+ *     if PY_MAJOR_VERSION < 3:
+ */
+  __pyx_t_1 = (__pyx_v_s == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":61
+ *     (bytes in Py2, unicode in Py3)"""
+ *     if s is None:
+ *         return None             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":62
+ *     if s is None:
+ *         return None
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s
+ *     elif PyBytes_Check(s):
+ */
+  __pyx_t_2 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":63
+ *         return None
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s             # <<<<<<<<<<<<<<
+ *     elif PyBytes_Check(s):
+ *         return s.decode('ascii')
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = __pyx_v_s;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":64
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
+ *         return s.decode('ascii')
+ *     else:
+ */
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":65
+ *         return s
+ *     elif PyBytes_Check(s):
+ *         return s.decode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         # assume unicode
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/chtslib.pyx":68
+ *     else:
+ *         # assume unicode
+ *         return s             # <<<<<<<<<<<<<<
+ * 
+ * cdef bytes _forceBytes(object s):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = __pyx_v_s;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":57
+ *         raise TypeError, u"Argument must be string or unicode."
+ * 
+ * cdef _forceStr(object s):             # <<<<<<<<<<<<<<
+ *     """Return s converted to str type of current Python
+ *     (bytes in Py2, unicode in Py3)"""
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.libchtslib._forceStr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/chtslib.pyx":70
+ *         return s
+ * 
+ * cdef bytes _forceBytes(object s):             # <<<<<<<<<<<<<<
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ */
+
+static PyObject *__pyx_f_5pysam_10libchtslib__forceBytes(PyObject *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_forceBytes", 0);
+  __Pyx_TraceCall("_forceBytes", __pyx_f[0], 70);
+
+  /* "pysam/chtslib.pyx":73
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s
+ *     elif s is None:
+ */
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/chtslib.pyx":74
+ *     """
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s             # <<<<<<<<<<<<<<
+ *     elif s is None:
+ *         return None
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = ((PyObject*)__pyx_v_s);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":75
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ *     elif s is None:             # <<<<<<<<<<<<<<
+ *         return None
+ *     elif PyBytes_Check(s):
+ */
+  __pyx_t_1 = (__pyx_v_s == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":76
+ *         return s
+ *     elif s is None:
+ *         return None             # <<<<<<<<<<<<<<
+ *     elif PyBytes_Check(s):
+ *         return s
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = ((PyObject*)Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":77
+ *     elif s is None:
+ *         return None
+ *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
+ *         return s
+ *     elif PyUnicode_Check(s):
+ */
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":78
+ *         return None
+ *     elif PyBytes_Check(s):
+ *         return s             # <<<<<<<<<<<<<<
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = ((PyObject*)__pyx_v_s);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":79
+ *     elif PyBytes_Check(s):
+ *         return s
+ *     elif PyUnicode_Check(s):             # <<<<<<<<<<<<<<
+ *         return s.encode('ascii')
+ *     else:
+ */
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/chtslib.pyx":80
+ *         return s
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/chtslib.pyx":82
+ *         return s.encode('ascii')
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):
+ */
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_bytes_or, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/chtslib.pyx":70
+ *         return s
+ * 
+ * cdef bytes _forceBytes(object s):             # <<<<<<<<<<<<<<
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.libchtslib._forceBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/chtslib.pyx":84
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):             # <<<<<<<<<<<<<<
+ *     return _forceBytes(s)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_10libchtslib__forceCmdlineBytes(PyObject *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_forceCmdlineBytes", 0);
+  __Pyx_TraceCall("_forceCmdlineBytes", __pyx_f[0], 84);
+
+  /* "pysam/chtslib.pyx":85
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):
+ *     return _forceBytes(s)             # <<<<<<<<<<<<<<
+ * 
+ * cdef _charptr_to_str(char* s):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_10libchtslib__forceBytes(__pyx_v_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/chtslib.pyx":84
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):             # <<<<<<<<<<<<<<
+ *     return _forceBytes(s)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.libchtslib._forceCmdlineBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/chtslib.pyx":87
+ *     return _forceBytes(s)
+ * 
+ * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ */
+
+static PyObject *__pyx_f_5pysam_10libchtslib__charptr_to_str(char *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_charptr_to_str", 0);
+  __Pyx_TraceCall("_charptr_to_str", __pyx_f[0], 87);
+
+  /* "pysam/chtslib.pyx":88
+ * 
+ * cdef _charptr_to_str(char* s):
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s
+ *     else:
+ */
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/chtslib.pyx":89
+ * cdef _charptr_to_str(char* s):
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s             # <<<<<<<<<<<<<<
+ *     else:
+ *         return s.decode("ascii")
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/chtslib.pyx":91
+ *         return s
+ *     else:
+ *         return s.decode("ascii")             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_s, 0, strlen(__pyx_v_s), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/chtslib.pyx":87
+ *     return _forceBytes(s)
+ * 
+ * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.libchtslib._charptr_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyMethodDef __pyx_methods[] = {
+  {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef __pyx_moduledef = {
+  #if PY_VERSION_HEX < 0x03020000
+    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
+  #else
+    PyModuleDef_HEAD_INIT,
+  #endif
+    __Pyx_NAMESTR("libchtslib"),
+    0, /* m_doc */
+    -1, /* m_size */
+    __pyx_methods /* m_methods */,
+    NULL, /* m_reload */
+    NULL, /* m_traverse */
+    NULL, /* m_clear */
+    NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_kp_u_Argument_must_be_string_bytes_or, __pyx_k_Argument_must_be_string_bytes_or, sizeof(__pyx_k_Argument_must_be_string_bytes_or), 0, 1, 0, 0},
+  {&__pyx_kp_u_Argument_must_be_string_or_unico, __pyx_k_Argument_must_be_string_or_unico, sizeof(__pyx_k_Argument_must_be_string_or_unico), 0, 1, 0, 0},
+  {&__pyx_n_s_IS_PYTHON3, __pyx_k_IS_PYTHON3, sizeof(__pyx_k_IS_PYTHON3), 0, 0, 1, 1},
+  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+  {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
+  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
+  {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
+  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
+  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+  {&__pyx_n_s_getdefaultencoding, __pyx_k_getdefaultencoding, sizeof(__pyx_k_getdefaultencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_getfilesystemencoding, __pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
+  {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
+  {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
+  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
+  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+  {&__pyx_n_s_tempfile, __pyx_k_tempfile, sizeof(__pyx_k_tempfile), 0, 0, 1, 1},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
+  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+  /* "pysam/chtslib.pyx":65
+ *         return s
+ *     elif PyBytes_Check(s):
+ *         return s.decode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         # assume unicode
+ */
+  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple_);
+  __Pyx_GIVEREF(__pyx_tuple_);
+
+  /* "pysam/chtslib.pyx":80
+ *         return s
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ */
+  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__2);
+  __Pyx_GIVEREF(__pyx_tuple__2);
+  __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;};
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initlibchtslib(void); /*proto*/
+PyMODINIT_FUNC initlibchtslib(void)
+#else
+PyMODINIT_FUNC PyInit_libchtslib(void); /*proto*/
+PyMODINIT_FUNC PyInit_libchtslib(void)
+#endif
+{
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  #if CYTHON_REFNANNY
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
+      PyErr_Clear();
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
+  }
+  #endif
+  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_libchtslib(void)", 0);
+  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #ifdef __Pyx_CyFunction_USED
+  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_FusedFunction_USED
+  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_Generator_USED
+  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  /*--- Library function declarations ---*/
+  /*--- Threads initialization code ---*/
+  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+  #ifdef WITH_THREAD /* Python build with threading support? */
+  PyEval_InitThreads();
+  #endif
+  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("libchtslib"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
+  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if CYTHON_COMPILING_IN_PYPY
+  Py_INCREF(__pyx_b);
+  #endif
+  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  if (__pyx_module_is_main_pysam__libchtslib) {
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "pysam.libchtslib")) {
+      if (unlikely(PyDict_SetItemString(modules, "pysam.libchtslib", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+  /*--- Builtin init code ---*/
+  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Constants init code ---*/
+  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Global init code ---*/
+  __pyx_v_5pysam_10libchtslib__FILENAME_ENCODING = ((PyObject*)Py_None); Py_INCREF(Py_None);
+  /*--- Variable export code ---*/
+  /*--- Function export code ---*/
+  /*--- Type init code ---*/
+  /*--- Type import code ---*/
+  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
+  #if CYTHON_COMPILING_IN_PYPY
+  sizeof(PyTypeObject),
+  #else
+  sizeof(PyHeapTypeObject),
+  #endif
+  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[2]; __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[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Variable import code ---*/
+  /*--- Function import code ---*/
+  /*--- Execution code ---*/
+
+  /* "pysam/chtslib.pyx":4
+ * # cython: profile=True
+ * # adds doc-strings for sphinx
+ * import tempfile             # <<<<<<<<<<<<<<
+ * import os
+ * import sys
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_tempfile, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tempfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":5
+ * # adds doc-strings for sphinx
+ * import tempfile
+ * import os             # <<<<<<<<<<<<<<
+ * import sys
+ * import types
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":6
+ * import tempfile
+ * import os
+ * import sys             # <<<<<<<<<<<<<<
+ * import types
+ * import itertools
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":7
+ * import os
+ * import sys
+ * import types             # <<<<<<<<<<<<<<
+ * import itertools
+ * import struct
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_types, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":8
+ * import sys
+ * import types
+ * import itertools             # <<<<<<<<<<<<<<
+ * import struct
+ * import ctypes
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":9
+ * import types
+ * import itertools
+ * import struct             # <<<<<<<<<<<<<<
+ * import ctypes
+ * import collections
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":10
+ * import itertools
+ * import struct
+ * import ctypes             # <<<<<<<<<<<<<<
+ * import collections
+ * import re
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":11
+ * import struct
+ * import ctypes
+ * import collections             # <<<<<<<<<<<<<<
+ * import re
+ * import platform
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":12
+ * import ctypes
+ * import collections
+ * import re             # <<<<<<<<<<<<<<
+ * import platform
+ * import warnings
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":13
+ * import collections
+ * import re
+ * import platform             # <<<<<<<<<<<<<<
+ * import warnings
+ * from cpython cimport PyErr_SetString, \
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_platform, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_platform, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":14
+ * import re
+ * import platform
+ * import warnings             # <<<<<<<<<<<<<<
+ * from cpython cimport PyErr_SetString, \
+ *     PyBytes_Check, \
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":27
+ * ## Python 3 compatibility functions
+ * ########################################################################
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3             # <<<<<<<<<<<<<<
+ * 
+ * cdef from_string_and_size(char* s, size_t length):
+ */
+  __pyx_t_1 = __Pyx_PyBool_FromLong((PY_MAJOR_VERSION >= 3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IS_PYTHON3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":37
+ * # filename encoding (copied from lxml.etree.pyx)
+ * cdef str _FILENAME_ENCODING
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()             # <<<<<<<<<<<<<<
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XGOTREF(__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING);
+  __Pyx_DECREF_SET(__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":38
+ * cdef str _FILENAME_ENCODING
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()
+ * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:
+ */
+  __pyx_t_3 = (__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/chtslib.pyx":39
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()             # <<<<<<<<<<<<<<
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = 'ascii'
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getdefaultencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XGOTREF(__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "pysam/chtslib.pyx":40
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
+ *     _FILENAME_ENCODING = 'ascii'
+ * 
+ */
+  __pyx_t_4 = (__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_3 = (__pyx_t_4 != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/chtslib.pyx":41
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = 'ascii'             # <<<<<<<<<<<<<<
+ * 
+ * #cdef char* _C_FILENAME_ENCODING
+ */
+    __Pyx_INCREF(__pyx_n_s_ascii);
+    __Pyx_XGOTREF(__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_10libchtslib__FILENAME_ENCODING, __pyx_n_s_ascii);
+    __Pyx_GIVEREF(__pyx_n_s_ascii);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/chtslib.pyx":94
+ * 
+ * 
+ * __all__ = []             # <<<<<<<<<<<<<<
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/chtslib.pyx":1
+ * # cython: embedsignature=True             # <<<<<<<<<<<<<<
+ * # cython: profile=True
+ * # adds doc-strings for sphinx
+ */
+  __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(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __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;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  if (__pyx_m) {
+    __Pyx_AddTraceback("init pysam.libchtslib", __pyx_clineno, __pyx_lineno, __pyx_filename);
+    Py_DECREF(__pyx_m); __pyx_m = 0;
+  } else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_ImportError, "init pysam.libchtslib");
+  }
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  #if PY_MAJOR_VERSION < 3
+  return;
+  #else
+  return __pyx_m;
+  #endif
+}
+
+/* Runtime support code */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+    PyObject *m = NULL, *p = NULL;
+    void *r = NULL;
+    m = PyImport_ImportModule((char *)modname);
+    if (!m) goto end;
+    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+    if (!p) goto end;
+    r = PyLong_AsVoidPtr(p);
+end:
+    Py_XDECREF(p);
+    Py_XDECREF(m);
+    return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif /* CYTHON_REFNANNY */
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+    }
+    return result;
+}
+
+#if CYTHON_PROFILE
+static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
+                                   PyFrameObject** frame,
+                                   const char *funcname,
+                                   const char *srcfile,
+                                   int firstlineno) {
+    int retval;
+    PyThreadState* tstate = PyThreadState_GET();
+    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
+        if (*code == NULL) {
+            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
+            if (*code == NULL) return 0;
+        }
+        *frame = PyFrame_New(
+            tstate,                          /*PyThreadState *tstate*/
+            *code,                           /*PyCodeObject *code*/
+            __pyx_d,                  /*PyObject *globals*/
+            0                                /*PyObject *locals*/
+        );
+        if (*frame == NULL) return 0;
+        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
+            Py_INCREF(Py_None);
+            (*frame)->f_trace = Py_None;
+        }
+#if PY_VERSION_HEX < 0x030400B1
+    } else {
+        (*frame)->f_tstate = tstate;
+#endif
+    }
+    (*frame)->f_lineno = firstlineno;
+    tstate->use_tracing = 0;
+    #if CYTHON_TRACE
+    if (tstate->c_tracefunc)
+        tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL);
+    if (!tstate->c_profilefunc)
+        retval = 1;
+    else
+    #endif
+        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
+    tstate->use_tracing = (tstate->c_profilefunc ||
+                           (CYTHON_TRACE && tstate->c_tracefunc));
+    return tstate->use_tracing && retval;
+}
+static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    PyCodeObject *py_code = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_funcname = PyString_FromString(funcname);
+    py_srcfile = PyString_FromString(srcfile);
+    #else
+    py_funcname = PyUnicode_FromString(funcname);
+    py_srcfile = PyUnicode_FromString(srcfile);
+    #endif
+    if (!py_funcname | !py_srcfile) goto bad;
+    py_code = PyCode_New(
+        0,                /*int argcount,*/
+        #if PY_MAJOR_VERSION >= 3
+        0,                /*int kwonlyargcount,*/
+        #endif
+        0,                /*int nlocals,*/
+        0,                /*int stacksize,*/
+        0,                /*int flags,*/
+        __pyx_empty_bytes,     /*PyObject *code,*/
+        __pyx_empty_tuple,     /*PyObject *consts,*/
+        __pyx_empty_tuple,     /*PyObject *names,*/
+        __pyx_empty_tuple,     /*PyObject *varnames,*/
+        __pyx_empty_tuple,     /*PyObject *freevars,*/
+        __pyx_empty_tuple,     /*PyObject *cellvars,*/
+        py_srcfile,       /*PyObject *filename,*/
+        py_funcname,      /*PyObject *name,*/
+        firstlineno,      /*int firstlineno,*/
+        __pyx_empty_bytes      /*PyObject *lnotab*/
+    );
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return py_code;
+}
+#endif /* CYTHON_PROFILE */
+
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
+    Py_ssize_t length;
+    if (unlikely((start < 0) | (stop < 0))) {
+        length = strlen(cstring);
+        if (start < 0) {
+            start += length;
+            if (start < 0)
+                start = 0;
+        }
+        if (stop < 0)
+            stop += length;
+    }
+    length = stop - start;
+    if (unlikely(length <= 0))
+        return PyUnicode_FromUnicode(NULL, 0);
+    cstring += start;
+    if (decode_func) {
+        return decode_func(cstring, length, errors);
+    } else {
+        return PyUnicode_Decode(cstring, length, encoding, errors);
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+#endif
+    result = (*call)(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    Py_LeaveRecursiveCall();
+#endif
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->curexc_type;
+    tmp_value = tstate->curexc_value;
+    tmp_tb = tstate->curexc_traceback;
+    tstate->curexc_type = type;
+    tstate->curexc_value = value;
+    tstate->curexc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_Restore(type, value, tb);
+#endif
+}
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->curexc_type;
+    *value = tstate->curexc_value;
+    *tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(type, value, tb);
+#endif
+}
+
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+                        CYTHON_UNUSED PyObject *cause) {
+    Py_XINCREF(type);
+    if (!value || value == Py_None)
+        value = NULL;
+    else
+        Py_INCREF(value);
+    if (!tb || tb == Py_None)
+        tb = NULL;
+    else {
+        Py_INCREF(tb);
+        if (!PyTraceBack_Check(tb)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: arg 3 must be a traceback or None");
+            goto raise_error;
+        }
+    }
+    #if PY_VERSION_HEX < 0x02050000
+    if (PyClass_Check(type)) {
+    #else
+    if (PyType_Check(type)) {
+    #endif
+#if CYTHON_COMPILING_IN_PYPY
+        if (!value) {
+            Py_INCREF(Py_None);
+            value = Py_None;
+        }
+#endif
+        PyErr_NormalizeException(&type, &value, &tb);
+    } else {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        value = type;
+        #if PY_VERSION_HEX < 0x02050000
+        if (PyInstance_Check(type)) {
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
+            Py_INCREF(type);
+        } else {
+            type = 0;
+            PyErr_SetString(PyExc_TypeError,
+                "raise: exception must be an old-style class or instance");
+            goto raise_error;
+        }
+        #else
+        type = (PyObject*) Py_TYPE(type);
+        Py_INCREF(type);
+        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: exception class must be a subclass of BaseException");
+            goto raise_error;
+        }
+        #endif
+    }
+    __Pyx_ErrRestore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+#else /* Python 3+ */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+    PyObject* owned_instance = NULL;
+    if (tb == Py_None) {
+        tb = 0;
+    } else if (tb && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto bad;
+    }
+    if (value == Py_None)
+        value = 0;
+    if (PyExceptionInstance_Check(type)) {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto bad;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(value);
+    } else if (PyExceptionClass_Check(type)) {
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
+        }
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
+        }
+    } else {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
+    if (cause && cause != Py_None) {
+#endif
+        PyObject *fixed_cause;
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
+            fixed_cause = PyObject_CallObject(cause, NULL);
+            if (fixed_cause == NULL)
+                goto bad;
+        } else if (PyExceptionInstance_Check(cause)) {
+            fixed_cause = cause;
+            Py_INCREF(fixed_cause);
+        } else {
+            PyErr_SetString(PyExc_TypeError,
+                            "exception causes must derive from "
+                            "BaseException");
+            goto bad;
+        }
+        PyException_SetCause(value, fixed_cause);
+    }
+    PyErr_SetObject(type, value);
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+    }
+bad:
+    Py_XDECREF(owned_instance);
+    return;
+}
+#endif
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (result) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
+    }
+    return result;
+}
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+    if (!py_import)
+        goto bad;
+    #endif
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    #if PY_VERSION_HEX >= 0x02050000
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                #if PY_VERSION_HEX < 0x03030000
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
+            }
+            level = 0; /* try absolute import on failure */
+        }
+        #endif
+        if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
+        }
+    }
+    #else
+    if (level>0) {
+        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
+        goto bad;
+    }
+    module = PyObject_CallFunctionObjArgs(py_import,
+        name, global_dict, empty_dict, list, NULL);
+    #endif
+bad:
+    #if PY_VERSION_HEX < 0x03030000
+    Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
+    Py_XDECREF(empty_dict);
+    return module;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
+    }
+}
+
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
+    {                                                                     \
+        func_type value = func(x);                                        \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                PyErr_SetString(PyExc_OverflowError,                      \
+                    (is_unsigned && unlikely(value < zero)) ?             \
+                    "can't convert negative value to " #target_type :     \
+                    "value too large to convert to " #target_type);       \
+                return (target_type) -1;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
+    }
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            return (long) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (long) -1;
+        }
+    } else {
+        long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            return (int) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int) -1;
+        }
+    } else {
+        int val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static int __Pyx_check_binary_version(void) {
+    char ctversion[4], rtversion[4];
+    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+        char message[200];
+        PyOS_snprintf(message, sizeof(message),
+                      "compiletime version %s of module '%.100s' "
+                      "does not match runtime version %s",
+                      ctversion, __Pyx_MODULE_NAME, rtversion);
+        #if PY_VERSION_HEX < 0x02050000
+        return PyErr_Warn(NULL, message);
+        #else
+        return PyErr_WarnEx(NULL, message, 1);
+        #endif
+    }
+    return 0;
+}
+
+#ifndef __PYX_HAVE_RT_ImportModule
+#define __PYX_HAVE_RT_ImportModule
+static PyObject *__Pyx_ImportModule(const char *name) {
+    PyObject *py_name = 0;
+    PyObject *py_module = 0;
+    py_name = __Pyx_PyIdentifier_FromString(name);
+    if (!py_name)
+        goto bad;
+    py_module = PyImport_Import(py_name);
+    Py_DECREF(py_name);
+    return py_module;
+bad:
+    Py_XDECREF(py_name);
+    return 0;
+}
+#endif
+
+#ifndef __PYX_HAVE_RT_ImportType
+#define __PYX_HAVE_RT_ImportType
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
+    size_t size, int strict)
+{
+    PyObject *py_module = 0;
+    PyObject *result = 0;
+    PyObject *py_name = 0;
+    char warning[200];
+    Py_ssize_t basicsize;
+#ifdef Py_LIMITED_API
+    PyObject *py_basicsize;
+#endif
+    py_module = __Pyx_ImportModule(module_name);
+    if (!py_module)
+        goto bad;
+    py_name = __Pyx_PyIdentifier_FromString(class_name);
+    if (!py_name)
+        goto bad;
+    result = PyObject_GetAttr(py_module, py_name);
+    Py_DECREF(py_name);
+    py_name = 0;
+    Py_DECREF(py_module);
+    py_module = 0;
+    if (!result)
+        goto bad;
+    if (!PyType_Check(result)) {
+        PyErr_Format(PyExc_TypeError,
+            "%.200s.%.200s is not a type object",
+            module_name, class_name);
+        goto bad;
+    }
+#ifndef Py_LIMITED_API
+    basicsize = ((PyTypeObject *)result)->tp_basicsize;
+#else
+    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
+    if (!py_basicsize)
+        goto bad;
+    basicsize = PyLong_AsSsize_t(py_basicsize);
+    Py_DECREF(py_basicsize);
+    py_basicsize = 0;
+    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
+        goto bad;
+#endif
+    if (!strict && (size_t)basicsize > size) {
+        PyOS_snprintf(warning, sizeof(warning),
+            "%s.%s size changed, may indicate binary incompatibility",
+            module_name, class_name);
+        #if PY_VERSION_HEX < 0x02050000
+        if (PyErr_Warn(NULL, warning) < 0) goto bad;
+        #else
+        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
+        #endif
+    }
+    else if ((size_t)basicsize != size) {
+        PyErr_Format(PyExc_ValueError,
+            "%.200s.%.200s has the wrong size, try recompiling",
+            module_name, class_name);
+        goto bad;
+    }
+    return (PyTypeObject *)result;
+bad:
+    Py_XDECREF(py_module);
+    Py_XDECREF(result);
+    return NULL;
+}
+#endif
+
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+    int start = 0, mid = 0, end = count - 1;
+    if (end >= 0 && code_line > entries[end].code_line) {
+        return count;
+    }
+    while (start < end) {
+        mid = (start + end) / 2;
+        if (code_line < entries[mid].code_line) {
+            end = mid;
+        } else if (code_line > entries[mid].code_line) {
+             start = mid + 1;
+        } else {
+            return mid;
+        }
+    }
+    if (code_line <= entries[mid].code_line) {
+        return mid;
+    } else {
+        return mid + 1;
+    }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+    PyCodeObject* code_object;
+    int pos;
+    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+        return NULL;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+        return NULL;
+    }
+    code_object = __pyx_code_cache.entries[pos].code_object;
+    Py_INCREF(code_object);
+    return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+    int pos, i;
+    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+    if (unlikely(!code_line)) {
+        return;
+    }
+    if (unlikely(!entries)) {
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (likely(entries)) {
+            __pyx_code_cache.entries = entries;
+            __pyx_code_cache.max_count = 64;
+            __pyx_code_cache.count = 1;
+            entries[0].code_line = code_line;
+            entries[0].code_object = code_object;
+            Py_INCREF(code_object);
+        }
+        return;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+        PyCodeObject* tmp = entries[pos].code_object;
+        entries[pos].code_object = code_object;
+        Py_DECREF(tmp);
+        return;
+    }
+    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+        int new_max = __pyx_code_cache.max_count + 64;
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (unlikely(!entries)) {
+            return;
+        }
+        __pyx_code_cache.entries = entries;
+        __pyx_code_cache.max_count = new_max;
+    }
+    for (i=__pyx_code_cache.count; i>pos; i--) {
+        entries[i] = entries[i-1];
+    }
+    entries[pos].code_line = code_line;
+    entries[pos].code_object = code_object;
+    __pyx_code_cache.count++;
+    Py_INCREF(code_object);
+}
+
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+            const char *funcname, int c_line,
+            int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_srcfile = PyString_FromString(filename);
+    #else
+    py_srcfile = PyUnicode_FromString(filename);
+    #endif
+    if (!py_srcfile) goto bad;
+    if (c_line) {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #else
+        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #endif
+    }
+    else {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromString(funcname);
+        #else
+        py_funcname = PyUnicode_FromString(funcname);
+        #endif
+    }
+    if (!py_funcname) goto bad;
+    py_code = __Pyx_PyCode_New(
+        0,            /*int argcount,*/
+        0,            /*int kwonlyargcount,*/
+        0,            /*int nlocals,*/
+        0,            /*int stacksize,*/
+        0,            /*int flags,*/
+        __pyx_empty_bytes, /*PyObject *code,*/
+        __pyx_empty_tuple, /*PyObject *consts,*/
+        __pyx_empty_tuple, /*PyObject *names,*/
+        __pyx_empty_tuple, /*PyObject *varnames,*/
+        __pyx_empty_tuple, /*PyObject *freevars,*/
+        __pyx_empty_tuple, /*PyObject *cellvars,*/
+        py_srcfile,   /*PyObject *filename,*/
+        py_funcname,  /*PyObject *name,*/
+        py_line,      /*int firstlineno,*/
+        __pyx_empty_bytes  /*PyObject *lnotab*/
+    );
+    Py_DECREF(py_srcfile);
+    Py_DECREF(py_funcname);
+    return py_code;
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_globals = 0;
+    PyFrameObject *py_frame = 0;
+    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
+    if (!py_code) {
+        py_code = __Pyx_CreateCodeObjectForTraceback(
+            funcname, c_line, py_line, filename);
+        if (!py_code) goto bad;
+        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
+    }
+    py_globals = PyModule_GetDict(__pyx_m);
+    if (!py_globals) goto bad;
+    py_frame = PyFrame_New(
+        PyThreadState_GET(), /*PyThreadState *tstate,*/
+        py_code,             /*PyCodeObject *code,*/
+        py_globals,          /*PyObject *globals,*/
+        0                    /*PyObject *locals*/
+    );
+    if (!py_frame) goto bad;
+    py_frame->f_lineno = py_line;
+    PyTraceBack_Here(py_frame);
+bad:
+    Py_XDECREF(py_code);
+    Py_XDECREF(py_frame);
+}
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+    while (t->p) {
+        #if PY_MAJOR_VERSION < 3
+        if (t->is_unicode) {
+            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+        } else if (t->intern) {
+            *t->p = PyString_InternFromString(t->s);
+        } else {
+            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+        }
+        #else  /* Python 3+ has unicode identifiers */
+        if (t->is_unicode | t->is_str) {
+            if (t->intern) {
+                *t->p = PyUnicode_InternFromString(t->s);
+            } else if (t->encoding) {
+                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+            } else {
+                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+            }
+        } else {
+            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+        }
+        #endif
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else /* PY_VERSION_HEX < 0x03030000 */
+        if (PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_DATA_SIZE(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+#endif /* PY_VERSION_HEX < 0x03030000 */
+    } else
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+#if !CYTHON_COMPILING_IN_PYPY
+#if PY_VERSION_HEX >= 0x02060000
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+   int is_true = x == Py_True;
+   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+   else return PyObject_IsTrue(x);
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+  PyNumberMethods *m;
+  const char *name = NULL;
+  PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+  if (PyInt_Check(x) || PyLong_Check(x))
+#else
+  if (PyLong_Check(x))
+#endif
+    return Py_INCREF(x), x;
+  m = Py_TYPE(x)->tp_as_number;
+#if PY_MAJOR_VERSION < 3
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Int(x);
+  }
+  else if (m && m->nb_long) {
+    name = "long";
+    res = PyNumber_Long(x);
+  }
+#else
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Long(x);
+  }
+#endif
+  if (res) {
+#if PY_MAJOR_VERSION < 3
+    if (!PyInt_Check(res) && !PyLong_Check(res)) {
+#else
+    if (!PyLong_Check(res)) {
+#endif
+      PyErr_Format(PyExc_TypeError,
+                   "__%.4s__ returned non-%.4s (type %.200s)",
+                   name, name, Py_TYPE(res)->tp_name);
+      Py_DECREF(res);
+      return NULL;
+    }
+  }
+  else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_TypeError,
+                    "an integer is required");
+  }
+  return res;
+}
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+  Py_ssize_t ival;
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+  #if PY_VERSION_HEX < 0x02060000
+    return PyInt_AsSsize_t(b);
+  #else
+    return PyLong_AsSsize_t(b);
+  #endif
+  }
+  x = PyNumber_Index(b);
+  if (!x) return -1;
+  ival = PyInt_AsSsize_t(x);
+  Py_DECREF(x);
+  return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+#if PY_VERSION_HEX < 0x02050000
+   if (ival <= LONG_MAX)
+       return PyInt_FromLong((long)ival);
+   else {
+       unsigned char *bytes = (unsigned char *) &ival;
+       int one = 1; int little = (int)*(unsigned char*)&one;
+       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
+   }
+#else
+   return PyInt_FromSize_t(ival);
+#endif
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/pysam/chtslib.pxd b/pysam/chtslib.pxd
new file mode 100644
index 0000000..f566b46
--- /dev/null
+++ b/pysam/chtslib.pxd
@@ -0,0 +1,854 @@
+from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
+from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
+from libc.stdlib cimport malloc, calloc, realloc, free
+from libc.string cimport memcpy, memcmp, strncpy, strlen, strdup
+from libc.stdio cimport FILE, printf
+
+cdef extern from "Python.h":
+   long _Py_HashPointer(void*)
+   FILE* PyFile_AsFile(object)
+
+
+cdef extern from "zlib.h" nogil:
+  ctypedef void * gzFile
+  ctypedef int64_t z_off_t
+
+  int gzclose(gzFile fp)
+  int gzread(gzFile fp, void *buf, unsigned int n)
+  char *gzerror(gzFile fp, int *errnum)
+
+  gzFile gzopen( char *path, char *mode)
+  gzFile gzdopen (int fd, char *mode)
+  char * gzgets(gzFile file, char *buf, int len)
+  int gzeof( gzFile file )
+
+cdef extern from "htslib/kstring.h" nogil:
+    ctypedef struct kstring_t:
+        size_t l, m
+        char *s
+
+cdef extern from "htslib/hfile.h" nogil:
+    ctypedef struct hFILE
+
+cdef extern from "htslib/bgzf.h" nogil:
+    ctypedef struct bgzf_mtaux_t
+    ctypedef struct bgzidx_t
+    ctypedef struct z_stream
+
+    ctypedef struct BGZF:
+        int           errcode
+        int           is_write
+        int           is_be
+        int           compress_level
+        int           is_compressed
+        int           is_gzip
+        int           cache_size
+        int64_t       block_address
+        int64_t       uncompressed_address
+        void         *uncompressed_block
+        void         *compressed_block
+        void         *cache
+        hFILE        *fp
+        bgzf_mtaux_t *mt
+        bgzidx_t     *idx
+        int           idx_build_otf
+        z_stream     *gz_stream
+
+    #*****************
+    #  Basic routines *
+    # *****************/
+
+    #  Open an existing file descriptor for reading or writing.
+    #
+    #  @param fd    file descriptor
+    #  @param mode  mode matching /[rwa][u0-9]+/: 'r' for reading, 'w' for
+    #               writing, or 'a' for appending, while a digit specifies
+    #               the zlib compression level.
+    #               Note that there is a distinction between 'u' and '0': the
+    #               first yields plain uncompressed output whereas the latter
+    #               outputs uncompressed data wrapped in the zlib format.
+    #  @return      BGZF file handler; 0 on error
+
+    BGZF* bgzf_dopen(int fd, const char *mode)
+    BGZF* bgzf_fdopen(int fd, const char *mode) # for backward compatibility
+
+    #  Open the specified file for reading or writing.
+    BGZF* bgzf_open(const char* path, const char *mode)
+
+    #  Open an existing hFILE stream for reading or writing.
+    BGZF* bgzf_hopen(hFILE *fp, const char *mode)
+
+    #  Close the BGZF and free all associated resources.
+    #
+    #  @param fp    BGZF file handler
+    #  @return      0 on success and -1 on error
+    int bgzf_close(BGZF *fp)
+
+    #  Read up to _length_ bytes from the file storing into _data_.
+    #
+    #  @param fp     BGZF file handler
+    #  @param data   data array to read into
+    #  @param length size of data to read
+    #  @return       number of bytes actually read; 0 on end-of-file and -1 on error
+    ssize_t bgzf_read(BGZF *fp, void *data, size_t length)
+
+    #  Write _length_ bytes from _data_ to the file.  If no I/O errors occur,
+    #  the complete _length_ bytes will be written (or queued for writing).
+    #
+    #  @param fp     BGZF file handler
+    #  @param data   data array to write
+    #  @param length size of data to write
+    #  @return       number of bytes written (i.e., _length_); negative on error
+    ssize_t bgzf_write(BGZF *fp, const void *data, size_t length)
+
+    #  Read up to _length_ bytes directly from the underlying stream without
+    #  decompressing.  Bypasses BGZF blocking, so must be used with care in
+    #  specialised circumstances only.
+    #
+    #  @param fp     BGZF file handler
+    #  @param data   data array to read into
+    #  @param length number of raw bytes to read
+    #  @return       number of bytes actually read; 0 on end-of-file and -1 on error
+    ssize_t bgzf_raw_read(BGZF *fp, void *data, size_t length)
+
+    #  Write _length_ bytes directly to the underlying stream without
+    #  compressing.  Bypasses BGZF blocking, so must be used with care
+    #  in specialised circumstances only.
+    #
+    #  @param fp     BGZF file handler
+    #  @param data   data array to write
+    #  @param length number of raw bytes to write
+    #  @return       number of bytes actually written; -1 on error
+    ssize_t bgzf_raw_write(BGZF *fp, const void *data, size_t length)
+
+    #  Write the data in the buffer to the file.
+    int bgzf_flush(BGZF *fp)
+
+    #  Return a virtual file pointer to the current location in the file.
+    #  No interpetation of the value should be made, other than a subsequent
+    #  call to bgzf_seek can be used to position the file at the same point.
+    #  Return value is non-negative on success.
+    #define bgzf_tell(fp) (((fp)->block_address << 16) | ((fp)->block_offset & 0xFFFF))
+    int64_t bgzf_tell(BGZF * fp)
+
+    #  Set the file to read from the location specified by _pos_.
+    #
+    #  @param fp     BGZF file handler
+    #  @param pos    virtual file offset returned by bgzf_tell()
+    #  @param whence must be SEEK_SET
+    #  @return       0 on success and -1 on error
+    # /
+    int64_t bgzf_seek(BGZF *fp, int64_t pos, int whence)
+
+    #  Check if the BGZF end-of-file (EOF) marker is present
+    #
+    #  @param fp    BGZF file handler opened for reading
+    #  @return      1 if the EOF marker is present and correct
+    #               2 if it can't be checked, e.g., because fp isn't seekable
+    #               0 if the EOF marker is absent
+    #               -1 (with errno set) on error
+    int bgzf_check_EOF(BGZF *fp)
+
+    #  Check if a file is in the BGZF format
+    #
+    #  @param fn    file name
+    #  @return      1 if _fn_ is BGZF; 0 if not or on I/O error
+    int bgzf_is_bgzf(const char *fn)
+
+    #*********************
+    #  Advanced routines *
+    #*********************
+
+    #  Set the cache size. Only effective when compiled with -DBGZF_CACHE.
+    #
+    #  @param fp    BGZF file handler
+    #  @param size  size of cache in bytes; 0 to disable caching (default)
+    void bgzf_set_cache_size(BGZF *fp, int size)
+
+    #  Flush the file if the remaining buffer size is smaller than _size_
+    #  @return      0 if flushing succeeded or was not needed; negative on error
+    int bgzf_flush_try(BGZF *fp, ssize_t size)
+
+    #  Read one byte from a BGZF file. It is faster than bgzf_read()
+    #  @param fp     BGZF file handler
+    #  @return       byte read; -1 on end-of-file or error
+    int bgzf_getc(BGZF *fp)
+
+    #  Read one line from a BGZF file. It is faster than bgzf_getc()
+    #
+    #  @param fp     BGZF file handler
+    #  @param delim  delimitor
+    #  @param str    string to write to; must be initialized
+    #  @return       length of the string; 0 on end-of-file; negative on error
+    int bgzf_getline(BGZF *fp, int delim, kstring_t *str)
+
+    #  Read the next BGZF block.
+    int bgzf_read_block(BGZF *fp)
+
+    #  Enable multi-threading (only effective on writing and when the
+    #  library was compiled with -DBGZF_MT)
+    #
+    #  @param fp          BGZF file handler; must be opened for writing
+    #  @param n_threads   #threads used for writing
+    #  @param n_sub_blks  #blocks processed by each thread; a value 64-256 is recommended
+    int bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks)
+
+
+    #*******************
+    #  bgzidx routines *
+    #   BGZF at the uncompressed offset
+    #
+    #   @param fp           BGZF file handler; must be opened for reading
+    #   @param uoffset      file offset in the uncompressed data
+    #   @param where        SEEK_SET supported atm
+    #
+    #   Returns 0 on success and -1 on error.
+    int bgzf_useek(BGZF *fp, long uoffset, int where)
+
+    #   Position in uncompressed BGZF
+    #
+    #   @param fp           BGZF file handler; must be opened for reading
+    #
+    #   Returns the current offset on success and -1 on error.
+    long bgzf_utell(BGZF *fp)
+
+    #  Tell BGZF to build index while compressing.
+    #
+    #  @param fp          BGZF file handler; can be opened for reading or writing.
+    #
+    #  Returns 0 on success and -1 on error.
+    int bgzf_index_build_init(BGZF *fp)
+
+    #  Load BGZF index
+    #
+    #  @param fp          BGZF file handler
+    #  @param bname       base name
+    #  @param suffix      suffix to add to bname (can be NULL)
+    #
+    #  Returns 0 on success and -1 on error.
+    int bgzf_index_load(BGZF *fp, const char *bname, const char *suffix)
+
+    #  Save BGZF index
+    #
+    #  @param fp          BGZF file handler
+    #  @param bname       base name
+    #  @param suffix      suffix to add to bname (can be NULL)
+    #
+    #  Returns 0 on success and -1 on error.
+    int bgzf_index_dump(BGZF *fp, const char *bname, const char *suffix)
+
+
+cdef extern from "htslib/hts.h" nogil:
+    uint32_t kroundup32(uint32_t x)
+
+    ctypedef struct cram_fd
+
+    ctypedef union FilePointerUnion:
+        BGZF * bgzf
+        cram_fd * cram
+        hFILE * hfile
+        void * voidp
+
+    ctypedef struct htsFile:
+	# uint32_t is_bin:1, is_write:1, is_be:1, is_cram:1, is_compressed:2, is_kstream:1, dummy:25;
+        uint32_t  is_bin
+        int64_t lineno
+        kstring_t line
+        char * fn
+        char * fn_aux
+        FilePointerUnion fp
+
+    int hts_verbose
+
+    # @abstract Table for converting a nucleotide character to the 4-bit encoding.
+    const unsigned char *seq_nt16_table
+
+    # @abstract Table for converting a 4-bit encoded nucleotide to a letter.
+    const char *seq_nt16_str
+
+    # @abstract  Get the htslib version number
+    # @return    For released versions, a string like "N.N[.N]"; or git describe
+    # output if using a library built within a Git repository.
+    const char *hts_version()
+
+    # @abstract       Open a SAM/BAM/CRAM/VCF/BCF/etc file
+    # @param fn       The file name or "-" for stdin/stdout
+    # @param mode     Mode matching /[rwa][bcuz0-9]+/
+    # @discussion
+    #     With 'r' opens for reading; any further format mode letters are ignored
+    #     as the format is detected by checking the first few bytes or BGZF blocks
+    #     of the file.  With 'w' or 'a' opens for writing or appending, with format
+    #     specifier letters:
+    #       b  binary format (BAM, BCF, etc) rather than text (SAM, VCF, etc)
+    #       c  CRAM format
+    #       u  uncompressed
+    #       z  compressed
+    #       [0-9]  zlib compression level
+    #     Note that there is a distinction between 'u' and '0': the first yields
+    #     plain uncompressed output whereas the latter outputs uncompressed data
+    #     wrapped in the zlib format.
+    # @example
+    #     [rw]b .. compressed BCF, BAM, FAI
+    #     [rw]u .. uncompressed BCF
+    #     [rw]z .. compressed VCF
+    #     [rw]  .. uncompressed VCF
+    htsFile *hts_open(const char *fn, const char *mode)
+
+    # @abstract  Close a file handle, flushing buffered data for output streams
+    # @param fp  The file handle to be closed
+    # @return    0 for success, or negative if an error occurred.
+    int hts_close(htsFile *fp)
+
+    int hts_getline(htsFile *fp, int delimiter, kstring_t *str)
+    char **hts_readlines(const char *fn, int *_n)
+
+    #   @abstract       Parse comma-separated list or read list from a file
+    #   @param list     File name or comma-separated list
+    #   @param is_file
+    #   @param _n       Size of the output array (number of items read)
+    #   @return         NULL on failure or pointer to newly allocated array of
+    #                   strings
+    char **hts_readlist(const char *fn, int is_file, int *_n)
+
+    # @abstract  Create extra threads to aid compress/decompression for this file
+    # @param fp  The file handle
+    # @param n   The number of worker threads to create
+    # @return    0 for success, or negative if an error occurred.
+    # @notes     THIS THREADING API IS LIKELY TO CHANGE IN FUTURE.
+    int hts_set_threads(htsFile *fp, int n)
+
+    # @abstract  Set .fai filename for a file opened for reading
+    # @return    0 for success, negative on failure
+    # @discussion
+    #     Called before *_hdr_read(), this provides the name of a .fai file
+    #     used to provide a reference list if the htsFile contains no @SQ headers.
+    int hts_set_fai_filename(htsFile *fp, const char *fn_aux)
+
+    int8_t HTS_IDX_NOCOOR
+    int8_t HTS_IDX_START
+    int8_t HTS_IDX_REST
+    int8_t HTS_IDX_NONE
+
+    int8_t HTS_FMT_CSI
+    int8_t HTS_FMT_BAI
+    int8_t HTS_FMT_TBI
+    int8_t HTS_FMT_CRAI
+
+    ctypedef struct hts_idx_t
+
+    ctypedef struct hts_pair64_t:
+        uint64_t u, v
+
+    ctypedef int hts_readrec_func(BGZF *fp, void *data, void *r, int *tid, int *beg, int *end)
+
+    ctypedef struct hts_bins_t:
+        int n, m
+        int *a
+
+    ctypedef struct hts_itr_t:
+        uint32_t read_rest
+        uint32_t finished
+        int tid, bed, end, n_off, i
+        uint64_t curr_off
+        hts_pair64_t *off
+        hts_readrec_func *readfunc
+        hts_bins_t bins
+
+    hts_idx_t *hts_idx_init(int n, int fmt, uint64_t offset0, int min_shift, int n_lvls)
+    void hts_idx_destroy(hts_idx_t *idx)
+    int hts_idx_push(hts_idx_t *idx, int tid, int beg, int end, uint64_t offset, int is_mapped)
+    void hts_idx_finish(hts_idx_t *idx, uint64_t final_offset)
+
+    void hts_idx_save(const hts_idx_t *idx, const char *fn, int fmt)
+    hts_idx_t *hts_idx_load(const char *fn, int fmt)
+
+    uint8_t *hts_idx_get_meta(hts_idx_t *idx, int *l_meta)
+    void hts_idx_set_meta(hts_idx_t *idx, int l_meta, uint8_t *meta, int is_copy)
+
+    int hts_idx_get_stat(const hts_idx_t* idx, int tid,
+                         uint64_t* mapped, uint64_t* unmapped)
+
+    uint64_t hts_idx_get_n_no_coor(const hts_idx_t* idx)
+
+    const char *hts_parse_reg(const char *s, int *beg, int *end)
+    hts_itr_t *hts_itr_query(const hts_idx_t *idx, int tid, int beg, int end, hts_readrec_func *readrec)
+    void hts_itr_destroy(hts_itr_t *iter)
+
+    ctypedef int (*hts_name2id_f)(void*, const char*)
+    ctypedef const char *(*hts_id2name_f)(void*, int)
+    ctypedef hts_itr_t *hts_itr_query_func(
+        const hts_idx_t *idx,
+        int tid,
+        int beg,
+        int end,
+        hts_readrec_func *readrec)
+
+    hts_itr_t *hts_itr_querys(
+        const hts_idx_t *idx,
+        const char *reg,
+        hts_name2id_f getid,
+        void *hdr,
+        hts_itr_query_func *itr_query,
+        hts_readrec_func *readrec)
+
+    int hts_itr_next(BGZF *fp, hts_itr_t *iter, void *r, void *data)
+    const char **hts_idx_seqnames(const hts_idx_t *idx, int *n, hts_id2name_f getid, void *hdr)  # free only the array, not the values
+
+    # hts_file_type() - Convenience function to determine file type
+    # @fname: the file name
+    #
+    # Returns one of the FT_* defines.
+    #
+    # This function was added in order to avoid the need for excessive command
+    # line switches.
+    int FT_UNKN
+    int FT_GZ
+    int FT_VCF
+    int FT_VCF_GZ
+    int FT_BCF
+    int FT_BCF_GZ
+    int FT_STDIN
+
+    int hts_file_type(const char *fname)
+
+    inline int hts_reg2bin(int64_t beg, int64_t end, int min_shift, int n_lvls)
+    inline int hts_bin_bot(int bin, int n_lvls)
+
+    # * Endianness *
+    inline int ed_is_big()
+    inline uint16_t ed_swap_2(uint16_t v)
+    inline void *ed_swap_2p(void *x)
+    inline uint32_t ed_swap_4(uint32_t v)
+    inline void *ed_swap_4p(void *x)
+    inline uint64_t ed_swap_8(uint64_t v)
+    inline void *ed_swap_8p(void *x)
+
+
+cdef extern from "htslib/sam.h" nogil:
+    #**********************
+    #*** SAM/BAM header ***
+    #**********************
+
+    # @abstract Structure for the alignment header.
+    # @field n_targets   number of reference sequences
+    # @field l_text      length of the plain text in the header
+    # @field target_len  lengths of the reference sequences
+    # @field target_name names of the reference sequences
+    # @field text        plain text
+    # @field sdict       header dictionary
+
+    ctypedef struct bam_hdr_t:
+         int32_t n_targets, ignore_sam_err
+         uint32_t l_text
+         uint32_t *target_len
+         uint8_t *cigar_tab
+         char **target_name
+         char *text
+         void *sdict
+
+    #****************************
+    #*** CIGAR related macros ***
+    #****************************
+
+    int BAM_CMATCH
+    int BAM_CINS
+    int BAM_CDEL
+    int BAM_CREF_SKIP
+    int BAM_CSOFT_CLIP
+    int BAM_CHARD_CLIP
+    int BAM_CPAD
+    int BAM_CEQUAL
+    int BAM_CDIFF
+    int BAM_CBACK
+
+    char    *BAM_CIGAR_STR
+    int      BAM_CIGAR_SHIFT
+    uint32_t BAM_CIGAR_MASK
+    uint32_t BAM_CIGAR_TYPE
+
+    char bam_cigar_op(uint32_t c)
+    uint32_t bam_cigar_oplen(uint32_t c)
+    char bam_cigar_opchr(uint32_t)
+    uint32_t bam_cigar_gen(char, uint32_t)
+    int bam_cigar_type(char o)
+
+    # @abstract the read is paired in sequencing, no matter whether it is mapped in a pair
+    int BAM_FPAIRED
+    # @abstract the read is mapped in a proper pair
+    int BAM_FPROPER_PAIR
+    # @abstract the read itself is unmapped; conflictive with BAM_FPROPER_PAIR
+    int BAM_FUNMAP
+    # @abstract the mate is unmapped
+    int BAM_FMUNMAP
+    # @abstract the read is mapped to the reverse strand
+    int BAM_FREVERSE
+    # @abstract the mate is mapped to the reverse strand
+    int BAM_FMREVERSE
+    # @abstract this is read1
+    int BAM_FREAD1
+    # @abstract this is read2
+    int BAM_FREAD2
+    # @abstract not primary alignment
+    int BAM_FSECONDARY
+    # @abstract QC failure
+    int BAM_FQCFAIL
+    # @abstract optical or PCR duplicate
+    int BAM_FDUP
+    # @abstract supplementary alignment
+    int BAM_FSUPPLEMENTARY
+
+    #*************************
+    #*** Alignment records ***
+    #*************************
+
+    # @abstract Structure for core alignment information.
+    # @field  tid     chromosome ID, defined by bam_hdr_t
+    # @field  pos     0-based leftmost coordinate
+    # @field  bin     bin calculated by bam_reg2bin()
+    # @field  qual    mapping quality
+    # @field  l_qname length of the query name
+    # @field  flag    bitwise flag
+    # @field  n_cigar number of CIGAR operations
+    # @field  l_qseq  length of the query sequence (read)
+    # @field  mtid    chromosome ID of next read in template, defined by bam_hdr_t
+    # @field  mpos    0-based leftmost coordinate of next read in template
+
+    ctypedef struct bam1_core_t:
+        int32_t tid
+        int32_t pos
+        uint16_t bin
+        uint8_t qual
+        uint8_t l_qname
+        uint16_t flag
+        uint16_t n_cigar
+        int32_t l_qseq
+        int32_t mtid
+        int32_t mpos
+        int32_t isize
+
+    # @abstract Structure for one alignment.
+    # @field  core       core information about the alignment
+    # @field  l_data     current length of bam1_t::data
+    # @field  m_data     maximum length of bam1_t::data
+    # @field  data       all variable-length data, concatenated; structure: qname-cigar-seq-qual-aux
+    #
+    # @discussion Notes:
+    #
+    # 1. qname is zero tailing and core.l_qname includes the tailing '\0'.
+    # 2. l_qseq is calculated from the total length of an alignment block
+    # on reading or from CIGAR.
+    # 3. cigar data is encoded 4 bytes per CIGAR operation.
+    # 4. seq is nybble-encoded according to seq_nt16_table.
+    ctypedef struct bam1_t:
+        bam1_core_t core
+        int l_data, m_data
+        uint8_t *data
+        uint64_t id
+
+    # @abstract  Get whether the query is on the reverse strand
+    # @param  b  pointer to an alignment
+    # @return    boolean true if query is on the reverse strand
+    int bam_is_rev(bam1_t *b)
+
+    # @abstract  Get whether the query's mate is on the reverse strand
+    # @param  b  pointer to an alignment
+    # @return    boolean true if query's mate on the reverse strand
+    int bam_is_mrev(bam1_t *b)
+
+    # @abstract  Get the name of the query
+    # @param  b  pointer to an alignment
+    # @return    pointer to the name string, null terminated
+    char *bam_get_qname(bam1_t *b)
+
+    # @abstract  Get the CIGAR array
+    # @param  b  pointer to an alignment
+    # @return    pointer to the CIGAR array
+    #
+    # @discussion In the CIGAR array, each element is a 32-bit integer. The
+    # lower 4 bits gives a CIGAR operation and the higher 28 bits keep the
+    # length of a CIGAR.
+    uint32_t *bam_get_cigar(bam1_t *b)
+
+    # @abstract  Get query sequence
+    # @param  b  pointer to an alignment
+    # @return    pointer to sequence
+    #
+    # @discussion Each base is encoded in 4 bits: 1 for A, 2 for C, 4 for G,
+    # 8 for T and 15 for N. Two bases are packed in one byte with the base
+    # at the higher 4 bits having smaller coordinate on the read. It is
+    # recommended to use bam_seqi() macro to get the base.
+    char *bam_get_seq(bam1_t *b)
+
+    # @abstract  Get query quality
+    # @param  b  pointer to an alignment
+    # @return    pointer to quality string
+    uint8_t *bam_get_qual(bam1_t *b)
+
+    # @abstract  Get auxiliary data
+    # @param  b  pointer to an alignment
+    # @return    pointer to the concatenated auxiliary data
+    uint8_t *bam_get_aux(bam1_t *b)
+
+    # @abstract  Get length of auxiliary data
+    # @param  b  pointer to an alignment
+    # @return    length of the concatenated auxiliary data
+    int bam_get_l_aux(bam1_t *b)
+
+    # @abstract  Get a base on read
+    # @param  s  Query sequence returned by bam1_seq()
+    # @param  i  The i-th position, 0-based
+    # @return    4-bit integer representing the base.
+    char bam_seqi(char *s, int i)
+
+    #**************************
+    #*** Exported functions ***
+    #**************************
+
+    #***************
+    #*** BAM I/O ***
+    #***************
+
+    bam_hdr_t *bam_hdr_init()
+    bam_hdr_t *bam_hdr_read(BGZF *fp)
+    int bam_hdr_write(BGZF *fp, const bam_hdr_t *h)
+    void bam_hdr_destroy(bam_hdr_t *h)
+    int bam_name2id(bam_hdr_t *h, const char *ref)
+    bam_hdr_t* bam_hdr_dup(const bam_hdr_t *h0)
+
+    bam1_t *bam_init1()
+    void bam_destroy1(bam1_t *b)
+    int bam_read1(BGZF *fp, bam1_t *b)
+    int bam_write1(BGZF *fp, const bam1_t *b)
+    bam1_t *bam_copy1(bam1_t *bdst, const bam1_t *bsrc)
+    bam1_t *bam_dup1(const bam1_t *bsrc)
+
+    int bam_cigar2qlen(int n_cigar, const uint32_t *cigar)
+    int bam_cigar2rlen(int n_cigar, const uint32_t *cigar)
+
+    # @abstract Calculate the rightmost base position of an alignment on the
+    # reference genome.
+
+    # @param  b  pointer to an alignment
+    # @return    the coordinate of the first base after the alignment, 0-based
+
+    # @discussion For a mapped read, this is just b->core.pos + bam_cigar2rlen.
+    # For an unmapped read (either according to its flags or if it has no cigar
+    # string), we return b->core.pos + 1 by convention.
+    int32_t bam_endpos(const bam1_t *b)
+
+    int   bam_str2flag(const char *str)  # returns negative value on error
+    char *bam_flag2str(int flag)         # The string must be freed by the user
+
+    #*************************
+    #*** BAM/CRAM indexing ***
+    #*************************
+
+    # These BAM iterator functions work only on BAM files.  To work with either
+    # BAM or CRAM files use the sam_index_load() & sam_itr_*() functions.
+    void bam_itr_destroy(hts_itr_t *iter)
+    hts_itr_t *bam_itr_queryi(const hts_idx_t *idx, int tid, int beg, int end)
+    hts_itr_t *bam_itr_querys(const hts_idx_t *idx, bam_hdr_t *hdr, const char *region)
+    int bam_itr_next(htsFile *htsfp, hts_itr_t *itr, void *r)
+
+    # Load .csi or .bai BAM index file.
+    hts_idx_t *bam_idx_load(const char *fn)
+    int bam_index_build(const char *fn, int min_shift)
+
+    # Load BAM (.csi or .bai) or CRAM (.crai) index file.
+    hts_idx_t *sam_index_load(htsFile *fp, const char *fn)
+
+    void sam_itr_destroy(hts_itr_t *iter)
+    hts_itr_t *sam_itr_queryi(const hts_idx_t *idx, int tid, int beg, int end)
+    hts_itr_t *sam_itr_querys(const hts_idx_t *idx, bam_hdr_t *hdr, const char *region)
+    int sam_itr_next(htsFile *htsfp, hts_itr_t *itr, void *r)
+
+    #***************
+    #*** SAM I/O ***
+    #***************
+
+    htsFile *sam_open(const char *fn, const char *mode)
+    int sam_close(htsFile *fp)
+
+    bam_hdr_t *sam_hdr_parse(int l_text, const char *text)
+    bam_hdr_t *sam_hdr_read(htsFile *fp)
+    int sam_hdr_write(htsFile *fp, const bam_hdr_t *h)
+
+    int sam_parse1(kstring_t *s, bam_hdr_t *h, bam1_t *b)
+    int sam_format1(const bam_hdr_t *h, const bam1_t *b, kstring_t *str)
+    int sam_read1(htsFile *fp, bam_hdr_t *h, bam1_t *b)
+    int sam_write1(htsFile *fp, const bam_hdr_t *h, const bam1_t *b)
+
+    #*************************************
+    #*** Manipulating auxiliary fields ***
+    #*************************************
+
+    uint8_t *bam_aux_get(const bam1_t *b, const char *tag)
+    int32_t  bam_aux2i(const uint8_t *s)
+    double   bam_aux2f(const uint8_t *s)
+    char     bam_aux2A(const uint8_t *s)
+    char    *bam_aux2Z(const uint8_t *s)
+
+    void bam_aux_append(bam1_t *b, const char *tag, char type, int len, uint8_t *data)
+    int bam_aux_del(bam1_t *b, uint8_t *s)
+
+    #**************************
+    #*** Pileup and Mpileup ***
+    #**************************
+
+    # @abstract Structure for one alignment covering the pileup position.
+    # @field  b          pointer to the alignment
+    # @field  qpos       position of the read base at the pileup site, 0-based
+    # @field  indel      indel length; 0 for no indel, positive for ins and negative for del
+    # @field  level      the level of the read in the "viewer" mode
+    # @field  is_del     1 iff the base on the padded read is a deletion
+    # @field  is_head    ???
+    # @field  is_tail    ???
+    # @field  is_refskip ???
+    # @field  aux        ???
+    #
+    # @discussion See also bam_plbuf_push() and bam_lplbuf_push(). The
+    # difference between the two functions is that the former does not
+    # set bam_pileup1_t::level, while the later does. Level helps the
+    # implementation of alignment viewers, but calculating this has some
+    # overhead.
+    ctypedef struct bam_pileup1_t:
+        bam1_t *b
+        int32_t qpos
+        int indel, level
+        uint32_t is_del
+        uint32_t is_head
+        uint32_t is_tail
+        uint32_t is_refskip
+        uint32_t aux
+
+    ctypedef int (*bam_plp_auto_f)(void *data, bam1_t *b)
+    ctypedef int (*bam_test_f)()
+
+    ctypedef struct __bam_plp_t
+    ctypedef __bam_plp_t *bam_plp_t
+
+    ctypedef struct __bam_mplp_t
+    ctypedef __bam_mplp_t *bam_mplp_t
+
+    # bam_plp_init() - sets an iterator over multiple
+    # @func:      see mplp_func in bam_plcmd.c in samtools for an example. Expected return
+    #             status: 0 on success, -1 on end, < -1 on non-recoverable errors
+    # @data:      user data to pass to @func
+    bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data)
+    void bam_plp_destroy(bam_plp_t iter)
+    int bam_plp_push(bam_plp_t iter, const bam1_t *b)
+    const bam_pileup1_t *bam_plp_next(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
+    const bam_pileup1_t *bam_plp_auto(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
+    void bam_plp_set_maxcnt(bam_plp_t iter, int maxcnt)
+    void bam_plp_reset(bam_plp_t iter)
+
+    bam_mplp_t bam_mplp_init(int n, bam_plp_auto_f func, void **data)
+
+    # bam_mplp_init_overlaps() - if called, mpileup will detect overlapping
+    # read pairs and for each base pair set the base quality of the
+    # lower-quality base to zero, thus effectively discarding it from
+    # calling. If the two bases are identical, the quality of the other base
+    # is increased to the sum of their qualities (capped at 200), otherwise
+    # it is multiplied by 0.8.
+    void bam_mplp_init_overlaps(bam_mplp_t iter)
+    void bam_mplp_destroy(bam_mplp_t iter)
+    void bam_mplp_set_maxcnt(bam_mplp_t iter, int maxcnt)
+    int bam_mplp_auto(bam_mplp_t iter, int *_tid, int *_pos, int *n_plp, const bam_pileup1_t **plp)
+
+    # Added by AH
+    # ctypedef bam_pileup1_t * const_bam_pileup1_t_ptr "const bam_pileup1_t *"
+
+cdef extern from "pysam_stream.h" nogil:
+
+    ctypedef struct kstream_t:
+        pass
+
+    ctypedef struct kseq_t:
+        kstring_t name
+        kstring_t comment
+        kstring_t seq
+        kstring_t qual
+
+    gzFile gzopen(char *, char *)
+    kseq_t * kseq_init(gzFile)
+    int kseq_read(kseq_t *)
+    void kseq_destroy(kseq_t *)
+    int gzclose(gzFile)
+
+    kstream_t * ks_init(gzFile)
+
+    # Retrieve characters from stream until delimiter
+    # is reached placing results in str.
+    int ks_getuntil(kstream_t *,
+                    int delimiter,
+                    kstring_t * str,
+                    int * dret)
+
+cdef extern from "htslib/faidx.h":
+
+   ctypedef struct faidx_t:
+      pass
+
+   int fai_build(char *fn)
+
+   void fai_destroy(faidx_t *fai)
+
+   faidx_t *fai_load(char *fn)
+
+   char *fai_fetch(faidx_t *fai,
+                   char *reg,
+                   int *len)
+
+   int faidx_fetch_nseq(faidx_t *fai)
+
+   char *faidx_fetch_seq(faidx_t *fai,
+                         char *c_name,
+                         int p_beg_i,
+                         int p_end_i,
+                         int *len)
+
+
+# tabix support
+cdef extern from "htslib/tbx.h" nogil:
+    
+    # tbx.h definitions
+    int8_t TBX_MAX_SHIFT
+    int8_t TBX_GENERIC
+    int8_t TBX_SAM
+    int8_t TBX_VCF
+    int8_t TBX_UCSC
+
+    ctypedef struct tbx_conf_t:
+        int32_t preset
+        int32_t sc, bc, ec   # seq col., beg col. and end col.
+        int32_t meta_char, line_skip
+
+    ctypedef struct tbx_t:
+        tbx_conf_t conf
+        hts_idx_t *idx
+        void * dict
+
+    tbx_conf_t tbx_conf_gff
+    tbx_conf_t tbx_conf_bed
+    tbx_conf_t tbx_conf_psltbl
+    tbx_conf_t tbx_conf_sam
+    tbx_conf_t tbx_conf_vcf
+    
+    void tbx_itr_destroy(hts_itr_t * iter)
+    hts_itr_t * tbx_itr_queryi(tbx_t * t, int tid, int bed, int end)
+    hts_itr_t * tbx_itr_querys(tbx_t * t, char * s)
+    int tbx_itr_next(htsFile * fp, tbx_t * t, hts_itr_t * iter, void * data)
+
+    int tbx_name2id(tbx_t *tbx, char *ss)
+
+    int tbx_index_build(char *fn,
+                        int min_shift,
+                        tbx_conf_t *conf)
+    
+    tbx_t * tbx_index_load(char *fn)
+
+    # free the array but not the values
+    char **tbx_seqnames(tbx_t *tbx, int *n)
+
+    void tbx_destroy(tbx_t *tbx)
+
diff --git a/pysam/chtslib.pyx b/pysam/chtslib.pyx
new file mode 100644
index 0000000..5bb2c5f
--- /dev/null
+++ b/pysam/chtslib.pyx
@@ -0,0 +1,94 @@
+# cython: embedsignature=True
+# cython: profile=True
+# adds doc-strings for sphinx
+import tempfile
+import os
+import sys
+import types
+import itertools
+import struct
+import ctypes
+import collections
+import re
+import platform
+import warnings
+from cpython cimport PyErr_SetString, \
+    PyBytes_Check, \
+    PyUnicode_Check, \
+    PyBytes_FromStringAndSize
+
+from cpython.version cimport PY_MAJOR_VERSION
+
+########################################################################
+########################################################################
+########################################################################
+## Python 3 compatibility functions
+########################################################################
+IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+
+cdef from_string_and_size(char* s, size_t length):
+    if PY_MAJOR_VERSION < 3:
+        return s[:length]
+    else:
+        return s[:length].decode("ascii")
+
+# filename encoding (copied from lxml.etree.pyx)
+cdef str _FILENAME_ENCODING
+_FILENAME_ENCODING = sys.getfilesystemencoding()
+if _FILENAME_ENCODING is None:
+    _FILENAME_ENCODING = sys.getdefaultencoding()
+if _FILENAME_ENCODING is None:
+    _FILENAME_ENCODING = 'ascii'
+
+#cdef char* _C_FILENAME_ENCODING
+#_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+
+cdef bytes _encodeFilename(object filename):
+    """Make sure a filename is 8-bit encoded (or None)."""
+    if filename is None:
+        return None
+    elif PyBytes_Check(filename):
+        return filename
+    elif PyUnicode_Check(filename):
+        return filename.encode(_FILENAME_ENCODING)
+    else:
+        raise TypeError, u"Argument must be string or unicode."
+
+cdef _forceStr(object s):
+    """Return s converted to str type of current Python
+    (bytes in Py2, unicode in Py3)"""
+    if s is None:
+        return None
+    if PY_MAJOR_VERSION < 3:
+        return s
+    elif PyBytes_Check(s):
+        return s.decode('ascii')
+    else:
+        # assume unicode
+        return s
+
+cdef bytes _forceBytes(object s):
+    u"""convert string or unicode object to bytes, assuming ascii encoding.
+    """
+    if PY_MAJOR_VERSION < 3:
+        return s
+    elif s is None:
+        return None
+    elif PyBytes_Check(s):
+        return s
+    elif PyUnicode_Check(s):
+        return s.encode('ascii')
+    else:
+        raise TypeError, u"Argument must be string, bytes or unicode."
+
+cdef inline bytes _forceCmdlineBytes(object s):
+    return _forceBytes(s)
+
+cdef _charptr_to_str(char* s):
+    if PY_MAJOR_VERSION < 3:
+        return s
+    else:
+        return s.decode("ascii")
+
+
+__all__ = []
diff --git a/pysam/csamfile.c b/pysam/csamfile.c
new file mode 100644
index 0000000..5b338b9
--- /dev/null
+++ b/pysam/csamfile.c
@@ -0,0 +1,44792 @@
+/* Generated by Cython 0.20.1 on Wed Jul 16 21:19:35 2014 */
+
+#define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
+#include "Python.h"
+#ifndef Py_PYTHON_H
+    #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02040000
+    #error Cython requires Python 2.4+.
+#else
+#define CYTHON_ABI "0_20_1"
+#include <stddef.h> /* For offsetof */
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+  #ifndef __stdcall
+    #define __stdcall
+  #endif
+  #ifndef __cdecl
+    #define __cdecl
+  #endif
+  #ifndef __fastcall
+    #define __fastcall
+  #endif
+#endif
+#ifndef DL_IMPORT
+  #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+  #define DL_EXPORT(t) t
+#endif
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+  #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+#define CYTHON_COMPILING_IN_PYPY 1
+#define CYTHON_COMPILING_IN_CPYTHON 0
+#else
+#define CYTHON_COMPILING_IN_PYPY 0
+#define CYTHON_COMPILING_IN_CPYTHON 1
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+#define Py_OptimizeFlag 0
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  typedef int Py_ssize_t;
+  #define PY_SSIZE_T_MAX INT_MAX
+  #define PY_SSIZE_T_MIN INT_MIN
+  #define PY_FORMAT_SIZE_T ""
+  #define CYTHON_FORMAT_SSIZE_T ""
+  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
+  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
+  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
+                                (PyErr_Format(PyExc_TypeError, \
+                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
+                                 (PyObject*)0))
+  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
+                                  !PyComplex_Check(o))
+  #define PyIndex_Check __Pyx_PyIndex_Check
+  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
+  #define __PYX_BUILD_PY_SSIZE_T "i"
+#else
+  #define __PYX_BUILD_PY_SSIZE_T "n"
+  #define CYTHON_FORMAT_SSIZE_T "z"
+  #define __Pyx_PyIndex_Check PyIndex_Check
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
+  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
+  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
+  #define PyVarObject_HEAD_INIT(type, size) \
+          PyObject_HEAD_INIT(type) size,
+  #define PyType_Modified(t)
+  typedef struct {
+     void *buf;
+     PyObject *obj;
+     Py_ssize_t len;
+     Py_ssize_t itemsize;
+     int readonly;
+     int ndim;
+     char *format;
+     Py_ssize_t *shape;
+     Py_ssize_t *strides;
+     Py_ssize_t *suboffsets;
+     void *internal;
+  } Py_buffer;
+  #define PyBUF_SIMPLE 0
+  #define PyBUF_WRITABLE 0x0001
+  #define PyBUF_FORMAT 0x0004
+  #define PyBUF_ND 0x0008
+  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
+  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
+  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
+  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
+  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
+  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
+  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
+  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
+  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
+#endif
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
+#else
+  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define Py_TPFLAGS_CHECKTYPES 0
+  #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
+  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
+#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
+  #define Py_TPFLAGS_IS_ABSTRACT 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+  #define CYTHON_PEP393_ENABLED 1
+  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
+                                              0 : _PyUnicode_Ready((PyObject *)(op)))
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
+  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
+#else
+  #define CYTHON_PEP393_ENABLED 0
+  #define __Pyx_PyUnicode_READY(op)       (0)
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBaseString_Type            PyUnicode_Type
+  #define PyStringObject               PyUnicodeObject
+  #define PyString_Type                PyUnicode_Type
+  #define PyString_Check               PyUnicode_Check
+  #define PyString_CheckExact          PyUnicode_CheckExact
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PyBytesObject                PyStringObject
+  #define PyBytes_Type                 PyString_Type
+  #define PyBytes_Check                PyString_Check
+  #define PyBytes_CheckExact           PyString_CheckExact
+  #define PyBytes_FromString           PyString_FromString
+  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
+  #define PyBytes_FromFormat           PyString_FromFormat
+  #define PyBytes_DecodeEscape         PyString_DecodeEscape
+  #define PyBytes_AsString             PyString_AsString
+  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
+  #define PyBytes_Size                 PyString_Size
+  #define PyBytes_AS_STRING            PyString_AS_STRING
+  #define PyBytes_GET_SIZE             PyString_GET_SIZE
+  #define PyBytes_Repr                 PyString_Repr
+  #define PyBytes_Concat               PyString_Concat
+  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
+  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
+#endif
+#ifndef PySet_CheckExact
+  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#if PY_MAJOR_VERSION >= 3
+  #define PyIntObject                  PyLongObject
+  #define PyInt_Type                   PyLong_Type
+  #define PyInt_Check(op)              PyLong_Check(op)
+  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
+  #define PyInt_FromString             PyLong_FromString
+  #define PyInt_FromUnicode            PyLong_FromUnicode
+  #define PyInt_FromLong               PyLong_FromLong
+  #define PyInt_FromSize_t             PyLong_FromSize_t
+  #define PyInt_FromSsize_t            PyLong_FromSsize_t
+  #define PyInt_AsLong                 PyLong_AsLong
+  #define PyInt_AS_LONG                PyLong_AS_LONG
+  #define PyInt_AsSsize_t              PyLong_AsSsize_t
+  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
+  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBoolObject                 PyLongObject
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+  typedef long Py_hash_t;
+  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
+#else
+  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
+#endif
+#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
+  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
+  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
+#else
+  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
+  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
+  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
+  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
+#else
+  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
+  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
+  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  #define __Pyx_NAMESTR(n) ((char *)(n))
+  #define __Pyx_DOCSTR(n)  ((char *)(n))
+#else
+  #define __Pyx_NAMESTR(n) (n)
+  #define __Pyx_DOCSTR(n)  (n)
+#endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
+
+
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
+#else
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+  #ifdef __cplusplus
+    #define __PYX_EXTERN_C extern "C"
+  #else
+    #define __PYX_EXTERN_C extern
+  #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE__pysam__csamfile
+#define __PYX_HAVE_API__pysam__csamfile
+#include "stdint.h"
+#include "string.h"
+#include "stdlib.h"
+#include "stdio.h"
+#include "zlib.h"
+#include "htslib/kstring.h"
+#include "htslib/hfile.h"
+#include "htslib/bgzf.h"
+#include "htslib/hts.h"
+#include "htslib/sam.h"
+#include "pysam_stream.h"
+#include "htslib/faidx.h"
+#include "htslib/tbx.h"
+#include "htslib_util.h"
+#include "samfile_util.h"
+#include "pythread.h"
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
+#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
+
+
+#ifdef __GNUC__
+  /* Test for GCC > 2.95 */
+  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
+    #define likely(x)   __builtin_expect(!!(x), 1)
+    #define unlikely(x) __builtin_expect(!!(x), 0)
+  #else /* __GNUC__ > 2 ... */
+    #define likely(x)   (x)
+    #define unlikely(x) (x)
+  #endif /* __GNUC__ > 2 ... */
+#else /* __GNUC__ */
+  #define likely(x)   (x)
+  #define unlikely(x) (x)
+#endif /* __GNUC__ */
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+  "csamfile.pyx",
+  "cfaidx.pxd",
+  "type.pxd",
+  "bool.pxd",
+  "complex.pxd",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_5pysam_6cfaidx_Fastafile;
+struct __pyx_obj_5pysam_6cfaidx_FastqProxy;
+struct __pyx_obj_5pysam_6cfaidx_Fastqfile;
+struct __pyx_obj_5pysam_8csamfile_AlignedRead;
+struct __pyx_obj_5pysam_8csamfile_Samfile;
+struct __pyx_obj_5pysam_8csamfile_PileupProxy;
+struct __pyx_obj_5pysam_8csamfile_PileupRead;
+struct __pyx_obj_5pysam_8csamfile_IteratorRow;
+struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion;
+struct __pyx_obj_5pysam_8csamfile_IteratorRowHead;
+struct __pyx_obj_5pysam_8csamfile_IteratorRowAll;
+struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs;
+struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection;
+struct __pyx_obj_5pysam_8csamfile_IteratorColumn;
+struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion;
+struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs;
+struct __pyx_obj_5pysam_8csamfile_IndexedReads;
+struct __pyx_obj_5pysam_8csamfile_SNPCall;
+struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr;
+struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr;
+struct __pyx_t_5pysam_8csamfile___iterdata;
+typedef struct __pyx_t_5pysam_8csamfile___iterdata __pyx_t_5pysam_8csamfile___iterdata;
+struct __pyx_opt_args_5pysam_8csamfile_11AlignedRead_setTag;
+struct __pyx_opt_args_5pysam_8csamfile_14IteratorColumn_setupIteratorData;
+struct __pyx_opt_args_5pysam_8csamfile_get_type_code;
+
+/* "pysam/csamfile.pxd":54
+ * # Utility types
+ * 
+ * ctypedef struct __iterdata:             # <<<<<<<<<<<<<<
+ *     htsFile * htsfile
+ *     bam_hdr_t * header
+ */
+struct __pyx_t_5pysam_8csamfile___iterdata {
+  htsFile *htsfile;
+  bam_hdr_t *header;
+  hts_itr_t *iter;
+  faidx_t *fastafile;
+  int tid;
+  char *seq;
+  int seq_len;
+};
+
+/* "pysam/csamfile.pxd":73
+ *     # add an alignment tag with value to the AlignedRead
+ *     # an existing tag of the same name will be replaced.
+ *     cpdef setTag( self, tag, value, value_type = ?, replace = ? )             # <<<<<<<<<<<<<<
+ * 
+ * cdef class Samfile:
+ */
+struct __pyx_opt_args_5pysam_8csamfile_11AlignedRead_setTag {
+  int __pyx_n;
+  PyObject *value_type;
+  PyObject *replace;
+};
+
+/* "pysam/csamfile.pxd":179
+ *     cdef char * getSequence( self )
+ *     cdef setMask(self, mask)
+ *     cdef setupIteratorData(self,             # <<<<<<<<<<<<<<
+ *                            int tid,
+ *                            int start,
+ */
+struct __pyx_opt_args_5pysam_8csamfile_14IteratorColumn_setupIteratorData {
+  int __pyx_n;
+  int reopen;
+};
+
+/* "pysam/csamfile.pyx":1948
+ *     return qual
+ * 
+ * cdef inline uint8_t get_type_code(value, value_type = None):             # <<<<<<<<<<<<<<
+ *     '''guess type code for a *value*. If *value_type* is None,
+ *     the type code will be inferred based on the Python type of
+ */
+struct __pyx_opt_args_5pysam_8csamfile_get_type_code {
+  int __pyx_n;
+  PyObject *value_type;
+};
+
+/* "cfaidx.pxd":14
+ *         char *s
+ * 
+ * cdef class Fastafile:             # <<<<<<<<<<<<<<
+ *     cdef object _filename, _references, _lengths, reference2length
+ *     cdef faidx_t* fastafile
+ */
+struct __pyx_obj_5pysam_6cfaidx_Fastafile {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_6cfaidx_Fastafile *__pyx_vtab;
+  PyObject *_filename;
+  PyObject *_references;
+  PyObject *_lengths;
+  PyObject *reference2length;
+  faidx_t *fastafile;
+};
+
+
+/* "cfaidx.pxd":21
+ * 
+ * 
+ * cdef class FastqProxy:             # <<<<<<<<<<<<<<
+ *     cdef kseq_t * _delegate
+ * 
+ */
+struct __pyx_obj_5pysam_6cfaidx_FastqProxy {
+  PyObject_HEAD
+  kseq_t *_delegate;
+};
+
+
+/* "cfaidx.pxd":25
+ * 
+ * 
+ * cdef class Fastqfile:             # <<<<<<<<<<<<<<
+ *     cdef object _filename
+ *     cdef gzFile fastqfile
+ */
+struct __pyx_obj_5pysam_6cfaidx_Fastqfile {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_6cfaidx_Fastqfile *__pyx_vtab;
+  PyObject *_filename;
+  gzFile fastqfile;
+  kseq_t *entry;
+};
+
+
+/* "pysam/csamfile.pxd":66
+ * #
+ * # Note: need to declare all C fields and methods here
+ * cdef class AlignedRead:             # <<<<<<<<<<<<<<
+ * 
+ *     # object that this AlignedRead represents
+ */
+struct __pyx_obj_5pysam_8csamfile_AlignedRead {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_8csamfile_AlignedRead *__pyx_vtab;
+  bam1_t *_delegate;
+};
+
+
+/* "pysam/csamfile.pxd":75
+ *     cpdef setTag( self, tag, value, value_type = ?, replace = ? )
+ * 
+ * cdef class Samfile:             # <<<<<<<<<<<<<<
+ * 
+ *     cdef object _filename
+ */
+struct __pyx_obj_5pysam_8csamfile_Samfile {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_8csamfile_Samfile *__pyx_vtab;
+  PyObject *_filename;
+  htsFile *htsfile;
+  BGZF *fp;
+  hts_idx_t *index;
+  bam_hdr_t *header;
+  int isbam;
+  int isstream;
+  int isremote;
+  bam1_t *b;
+  char *mode;
+  int64_t start_offset;
+};
+
+
+/* "pysam/csamfile.pxd":112
+ *     cdef char * _getrname(self, int tid)
+ * 
+ * cdef class PileupProxy:             # <<<<<<<<<<<<<<
+ *     cdef bam_pileup1_t ** plp
+ *     cdef int tid
+ */
+struct __pyx_obj_5pysam_8csamfile_PileupProxy {
+  PyObject_HEAD
+  bam_pileup1_t **plp;
+  int tid;
+  int pos;
+  int n_pu;
+};
+
+
+/* "pysam/csamfile.pxd":118
+ *     cdef int n_pu
+ * 
+ * cdef class PileupRead:             # <<<<<<<<<<<<<<
+ *     cdef AlignedRead _alignment
+ *     cdef int32_t  _qpos
+ */
+struct __pyx_obj_5pysam_8csamfile_PileupRead {
+  PyObject_HEAD
+  struct __pyx_obj_5pysam_8csamfile_AlignedRead *_alignment;
+  int32_t _qpos;
+  int _indel;
+  int _level;
+  uint32_t _is_del;
+  uint32_t _is_head;
+  uint32_t _is_tail;
+};
+
+
+/* "pysam/csamfile.pxd":127
+ *     cdef uint32_t _is_tail
+ * 
+ * cdef class IteratorRow:             # <<<<<<<<<<<<<<
+ *     cdef int retval
+ *     cdef bam1_t * b
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorRow {
+  PyObject_HEAD
+  int retval;
+  bam1_t *b;
+  struct __pyx_obj_5pysam_8csamfile_Samfile *samfile;
+  htsFile *htsfile;
+  int owns_samfile;
+};
+
+
+/* "pysam/csamfile.pxd":134
+ *     cdef int owns_samfile
+ * 
+ * cdef class IteratorRowRegion(IteratorRow):             # <<<<<<<<<<<<<<
+ *     cdef hts_itr_t * iter
+ *     cdef bam1_t * getCurrent( self )
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow __pyx_base;
+  struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowRegion *__pyx_vtab;
+  hts_itr_t *iter;
+};
+
+
+/* "pysam/csamfile.pxd":139
+ *     cdef int cnext(self)
+ * 
+ * cdef class IteratorRowHead(IteratorRow):             # <<<<<<<<<<<<<<
+ *     cdef int max_rows
+ *     cdef int current_row
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorRowHead {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow __pyx_base;
+  struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowHead *__pyx_vtab;
+  int max_rows;
+  int current_row;
+};
+
+
+/* "pysam/csamfile.pxd":145
+ *     cdef int cnext(self)
+ * 
+ * cdef class IteratorRowAll(IteratorRow):             # <<<<<<<<<<<<<<
+ *     cdef bam1_t * getCurrent( self )
+ *     cdef int cnext(self)
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorRowAll {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow __pyx_base;
+  struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowAll *__pyx_vtab;
+};
+
+
+/* "pysam/csamfile.pxd":149
+ *     cdef int cnext(self)
+ * 
+ * cdef class IteratorRowAllRefs(IteratorRow):             # <<<<<<<<<<<<<<
+ *     cdef int         tid
+ *     cdef IteratorRowRegion rowiter
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow __pyx_base;
+  int tid;
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *rowiter;
+};
+
+
+/* "pysam/csamfile.pxd":153
+ *     cdef IteratorRowRegion rowiter
+ * 
+ * cdef class IteratorRowSelection(IteratorRow):             # <<<<<<<<<<<<<<
+ *     cdef int current_pos
+ *     cdef positions
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow __pyx_base;
+  struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowSelection *__pyx_vtab;
+  int current_pos;
+  PyObject *positions;
+  BGZF *fp;
+};
+
+
+/* "pysam/csamfile.pxd":160
+ *     cdef BGZF * fp
+ * 
+ * cdef class IteratorColumn:             # <<<<<<<<<<<<<<
+ * 
+ *     # result of the last plbuf_push
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorColumn {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumn *__pyx_vtab;
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *iter;
+  int tid;
+  int pos;
+  int n_plp;
+  int mask;
+  bam_pileup1_t *plp;
+  bam_plp_t pileup_iter;
+  __pyx_t_5pysam_8csamfile___iterdata iterdata;
+  struct __pyx_obj_5pysam_8csamfile_Samfile *samfile;
+  struct __pyx_obj_5pysam_6cfaidx_Fastafile *fastafile;
+  PyObject *stepper;
+  int max_depth;
+};
+
+
+/* "pysam/csamfile.pxd":187
+ *     cdef reset(self, tid, start, end)
+ * 
+ * cdef class IteratorColumnRegion(IteratorColumn):             # <<<<<<<<<<<<<<
+ *     cdef int start
+ *     cdef int end
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion {
+  struct __pyx_obj_5pysam_8csamfile_IteratorColumn __pyx_base;
+  int start;
+  int end;
+  int truncate;
+};
+
+
+/* "pysam/csamfile.pxd":192
+ *     cdef int truncate
+ * 
+ * cdef class IteratorColumnAllRefs(IteratorColumn):             # <<<<<<<<<<<<<<
+ *     pass
+ * 
+ */
+struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs {
+  struct __pyx_obj_5pysam_8csamfile_IteratorColumn __pyx_base;
+};
+
+
+/* "pysam/csamfile.pxd":195
+ *     pass
+ * 
+ * cdef class IndexedReads:             # <<<<<<<<<<<<<<
+ *     cdef Samfile samfile
+ *     cdef htsFile * htsfile
+ */
+struct __pyx_obj_5pysam_8csamfile_IndexedReads {
+  PyObject_HEAD
+  struct __pyx_obj_5pysam_8csamfile_Samfile *samfile;
+  htsFile *htsfile;
+  PyObject *index;
+  int owns_samfile;
+  BGZF *fp;
+};
+
+
+/* "pysam/csamfile.pyx":3324
+ * 
+ * 
+ * cdef class SNPCall:             # <<<<<<<<<<<<<<
+ *     '''the results of a SNP call.'''
+ *     cdef int _tid
+ */
+struct __pyx_obj_5pysam_8csamfile_SNPCall {
+  PyObject_HEAD
+  int _tid;
+  int _pos;
+  char _reference_base;
+  char _genotype;
+  int _consensus_quality;
+  int _snp_quality;
+  int _rms_mapping_quality;
+  int _coverage;
+};
+
+
+/* "pysam/csamfile.pyx":105
+ * cdef char* CODE2CIGAR= "MIDNSHP=X"
+ * if IS_PYTHON3:
+ *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
+ * else:
+ *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+ */
+struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr {
+  PyObject_HEAD
+  PyObject *__pyx_v_x;
+  PyObject *__pyx_v_y;
+  PyObject *__pyx_t_0;
+  PyObject *__pyx_t_1;
+  PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pysam/csamfile.pyx":107
+ *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
+ * else:
+ *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
+ * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
+ * 
+ */
+struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr {
+  PyObject_HEAD
+  PyObject *__pyx_v_x;
+  PyObject *__pyx_v_y;
+  PyObject *__pyx_t_0;
+  PyObject *__pyx_t_1;
+  PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+
+/* "cfaidx.pxd":14
+ *         char *s
+ * 
+ * cdef class Fastafile:             # <<<<<<<<<<<<<<
+ *     cdef object _filename, _references, _lengths, reference2length
+ *     cdef faidx_t* fastafile
+ */
+
+struct __pyx_vtabstruct_5pysam_6cfaidx_Fastafile {
+  char *(*_fetch)(struct __pyx_obj_5pysam_6cfaidx_Fastafile *, char *, int, int, int *);
+};
+static struct __pyx_vtabstruct_5pysam_6cfaidx_Fastafile *__pyx_vtabptr_5pysam_6cfaidx_Fastafile;
+
+
+/* "cfaidx.pxd":25
+ * 
+ * 
+ * cdef class Fastqfile:             # <<<<<<<<<<<<<<
+ *     cdef object _filename
+ *     cdef gzFile fastqfile
+ */
+
+struct __pyx_vtabstruct_5pysam_6cfaidx_Fastqfile {
+  kseq_t *(*getCurrent)(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *);
+  int (*cnext)(struct __pyx_obj_5pysam_6cfaidx_Fastqfile *);
+};
+static struct __pyx_vtabstruct_5pysam_6cfaidx_Fastqfile *__pyx_vtabptr_5pysam_6cfaidx_Fastqfile;
+
+
+/* "pysam/csamfile.pyx":2045
+ * ###########################################################
+ * ###########################################################
+ * cdef class AlignedRead:             # <<<<<<<<<<<<<<
+ *     '''
+ *     Class representing an aligned read. See the SAM format specification for
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_AlignedRead {
+  PyObject *(*setTag)(struct __pyx_obj_5pysam_8csamfile_AlignedRead *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_8csamfile_11AlignedRead_setTag *__pyx_optional_args);
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_AlignedRead *__pyx_vtabptr_5pysam_8csamfile_AlignedRead;
+
+
+/* "pysam/csamfile.pyx":247
+ * 
+ * 
+ * cdef class Samfile:             # <<<<<<<<<<<<<<
+ *     '''*(filename, mode=None, template = None,
+ *          referencenames = None, referencelengths = None,
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_Samfile {
+  bam_hdr_t *(*_buildHeader)(struct __pyx_obj_5pysam_8csamfile_Samfile *, PyObject *);
+  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_8csamfile_Samfile *);
+  int (*cnext)(struct __pyx_obj_5pysam_8csamfile_Samfile *);
+  int (*write)(struct __pyx_obj_5pysam_8csamfile_Samfile *, struct __pyx_obj_5pysam_8csamfile_AlignedRead *, int __pyx_skip_dispatch);
+  char *(*_getrname)(struct __pyx_obj_5pysam_8csamfile_Samfile *, int);
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_Samfile *__pyx_vtabptr_5pysam_8csamfile_Samfile;
+
+
+/* "pysam/csamfile.pyx":1266
+ *             hts_close(self.htsfile)
+ * 
+ * cdef class IteratorRowRegion(IteratorRow):             # <<<<<<<<<<<<<<
+ *     """*(Samfile samfile, int tid, int beg, int end, int reopen = True )*
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowRegion {
+  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *);
+  int (*cnext)(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *);
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowRegion *__pyx_vtabptr_5pysam_8csamfile_IteratorRowRegion;
+
+
+/* "pysam/csamfile.pyx":1330
+ *         hts_itr_destroy(self.iter)
+ * 
+ * cdef class IteratorRowHead(IteratorRow):             # <<<<<<<<<<<<<<
+ *     """*(Samfile samfile, n, int reopen = True)*
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowHead {
+  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *);
+  int (*cnext)(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *);
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowHead *__pyx_vtabptr_5pysam_8csamfile_IteratorRowHead;
+
+
+/* "pysam/csamfile.pyx":1383
+ * 
+ * 
+ * cdef class IteratorRowAll(IteratorRow):             # <<<<<<<<<<<<<<
+ *     """*(Samfile samfile, int reopen = True)*
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowAll {
+  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *);
+  int (*cnext)(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *);
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowAll *__pyx_vtabptr_5pysam_8csamfile_IteratorRowAll;
+
+
+/* "pysam/csamfile.pyx":1484
+ * 
+ * 
+ * cdef class IteratorRowSelection(IteratorRow):             # <<<<<<<<<<<<<<
+ *     """*(Samfile samfile)*
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowSelection {
+  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *);
+  int (*cnext)(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *);
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowSelection *__pyx_vtabptr_5pysam_8csamfile_IteratorRowSelection;
+
+
+/* "pysam/csamfile.pyx":1608
+ *     return ret
+ * 
+ * cdef class IteratorColumn:             # <<<<<<<<<<<<<<
+ *     '''abstract base class for iterators over columns.
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumn {
+  int (*cnext)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *);
+  char *(*getSequence)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *);
+  PyObject *(*setMask)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *, PyObject *);
+  PyObject *(*setupIteratorData)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *, int, int, int, struct __pyx_opt_args_5pysam_8csamfile_14IteratorColumn_setupIteratorData *__pyx_optional_args);
+  PyObject *(*reset)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *, PyObject *, PyObject *, PyObject *);
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumn *__pyx_vtabptr_5pysam_8csamfile_IteratorColumn;
+
+
+/* "pysam/csamfile.pyx":1782
+ * 
+ * 
+ * cdef class IteratorColumnRegion(IteratorColumn):             # <<<<<<<<<<<<<<
+ *     '''iterates over a region only.
+ *     '''
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnRegion {
+  struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumn __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnRegion *__pyx_vtabptr_5pysam_8csamfile_IteratorColumnRegion;
+
+
+/* "pysam/csamfile.pyx":1820
+ * 
+ * 
+ * cdef class IteratorColumnAllRefs(IteratorColumn):             # <<<<<<<<<<<<<<
+ *     """iterates over all columns by chaining iterators over each reference
+ *     """
+ */
+
+struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnAllRefs {
+  struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumn __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnAllRefs *__pyx_vtabptr_5pysam_8csamfile_IteratorColumnAllRefs;
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
+  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          if (acquire_gil) { \
+              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+              PyGILState_Release(__pyx_gilstate_save); \
+          } else { \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+          }
+#else
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+  #define __Pyx_RefNannyFinishContext() \
+          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+  #define __Pyx_RefNannyDeclarations
+  #define __Pyx_RefNannySetupContext(name, acquire_gil)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XINCREF(r) Py_XINCREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
+  #define __Pyx_XGOTREF(r)
+  #define __Pyx_XGIVEREF(r)
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
+#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
+
+#ifndef CYTHON_PROFILE
+  #define CYTHON_PROFILE 1
+#endif
+#ifndef CYTHON_TRACE
+  #define CYTHON_TRACE 0
+#endif
+#if CYTHON_TRACE
+  #undef CYTHON_PROFILE_REUSE_FRAME
+#endif
+#ifndef CYTHON_PROFILE_REUSE_FRAME
+  #define CYTHON_PROFILE_REUSE_FRAME 0
+#endif
+#if CYTHON_PROFILE || CYTHON_TRACE
+  #include "compile.h"
+  #include "frameobject.h"
+  #include "traceback.h"
+  #if CYTHON_PROFILE_REUSE_FRAME
+    #define CYTHON_FRAME_MODIFIER static
+    #define CYTHON_FRAME_DEL
+  #else
+    #define CYTHON_FRAME_MODIFIER
+    #define CYTHON_FRAME_DEL Py_CLEAR(__pyx_frame)
+  #endif
+  #define __Pyx_TraceDeclarations                                     \
+  static PyCodeObject *__pyx_frame_code = NULL;                      \
+  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;           \
+  int __Pyx_use_tracing = 0;
+  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)                            \
+  if (unlikely(PyThreadState_GET()->use_tracing &&                                   \
+          (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc)))) {      \
+      __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno);  \
+  }
+  #define __Pyx_TraceException()                                                           \
+  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing &&                   \
+          (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc))) {  \
+      PyThreadState* tstate = PyThreadState_GET();                                         \
+      tstate->use_tracing = 0;                                                             \
+      PyObject *exc_info = __Pyx_GetExceptionTuple();                                      \
+      if (exc_info) {                                                                      \
+          if (CYTHON_TRACE && tstate->c_tracefunc)                                         \
+              tstate->c_tracefunc(                                                         \
+                  tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);          \
+          tstate->c_profilefunc(                                                           \
+              tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);            \
+          Py_DECREF(exc_info);                                                             \
+      }                                                                                    \
+      tstate->use_tracing = 1;                                                             \
+  }
+  #define __Pyx_TraceReturn(result)                                                  \
+  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing) {             \
+      PyThreadState* tstate = PyThreadState_GET();                                   \
+      tstate->use_tracing = 0;                                                        \
+      if (CYTHON_TRACE && tstate->c_tracefunc)                                       \
+          tstate->c_tracefunc(                                                       \
+              tstate->c_traceobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);  \
+      if (tstate->c_profilefunc)                                                     \
+          tstate->c_profilefunc(                                                     \
+              tstate->c_profileobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);  \
+      CYTHON_FRAME_DEL;                                                              \
+      tstate->use_tracing = 1;                                                       \
+  }
+  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/
+  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
+#else
+  #define __Pyx_TraceDeclarations
+  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)
+  #define __Pyx_TraceException()
+  #define __Pyx_TraceReturn(result)
+#endif /* CYTHON_PROFILE */
+#if CYTHON_TRACE
+  #define __Pyx_TraceLine(lineno)                                                          \
+  if (unlikely(__Pyx_use_tracing) && unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_tracefunc)) {    \
+      PyThreadState* tstate = PyThreadState_GET();                                         \
+      __pyx_frame->f_lineno = lineno;                                                     \
+      tstate->use_tracing = 0;                                                             \
+      tstate->c_tracefunc(tstate->c_traceobj, __pyx_frame, PyTrace_LINE, NULL);           \
+      tstate->use_tracing = 1;                                                             \
+  }
+#else
+  #define __Pyx_TraceLine(lineno)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+#include <string.h>
+
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_setattro))
+        return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_setattr))
+        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+    return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+#if PY_MAJOR_VERSION < 3
+#define __Pyx_PyString_Join __Pyx_PyBytes_Join
+#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
+#else
+#define __Pyx_PyString_Join PyUnicode_Join
+#define __Pyx_PyBaseString_Join PyUnicode_Join
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+    #if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyBytes_Join _PyString_Join
+    #else
+    #define __Pyx_PyBytes_Join _PyBytes_Join
+    #endif
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/
+#endif
+
+static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/
+
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
+    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
+    const char* function_name); /*proto*/
+
+static 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_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+    const char *name, int exact); /*proto*/
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
+
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
+#else
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
+#endif
+
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
+               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len)) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
+    PyObject *method, *result = NULL;
+    if (unlikely(!args)) return NULL;
+    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+    if (unlikely(!method)) goto bad;
+    result = __Pyx_PyObject_Call(method, args, NULL);
+    Py_DECREF(method);
+bad:
+    Py_DECREF(args);
+    return result;
+}
+#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
+#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
+#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
+#define __Pyx_PyObject_CallMethod0(obj, name) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
+    int result = PySequence_Contains(seq, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+        int has_cstart, int has_cstop, int wraparound);
+
+static void __Pyx_WriteUnraisable(const char *name, int clineno,
+                                  int lineno, const char *filename,
+                                  int full_traceback); /*proto*/
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
+
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) {
+    int result = PyDict_Contains(dict, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+#if PY_MAJOR_VERSION >= 3
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+    PyObject *value;
+    value = PyDict_GetItemWithError(d, key);
+    if (unlikely(!value)) {
+        if (!PyErr_Occurred()) {
+            PyObject* args = PyTuple_Pack(1, key);
+            if (likely(args))
+                PyErr_SetObject(PyExc_KeyError, args);
+            Py_XDECREF(args);
+        }
+        return NULL;
+    }
+    Py_INCREF(value);
+    return value;
+}
+#else
+    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#endif
+
+static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/
+
+static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */
+
+static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */
+
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+
+static void* __Pyx_GetVtable(PyObject *dict); /*proto*/
+
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
+
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+#define __Pyx_CyFunction_USED 1
+#include <structmember.h>
+#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
+#define __Pyx_CYFUNCTION_CCLASS        0x04
+#define __Pyx_CyFunction_GetClosure(f) \
+    (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f) \
+    (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f) \
+    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
+    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+    PyCFunctionObject func;
+    PyObject *func_dict;
+    PyObject *func_weakreflist;
+    PyObject *func_name;
+    PyObject *func_qualname;
+    PyObject *func_doc;
+    PyObject *func_globals;
+    PyObject *func_code;
+    PyObject *func_closure;
+    PyObject *func_classobj; /* No-args super() class cell */
+    void *defaults;
+    int defaults_pyobjects;
+    int flags;
+    PyObject *defaults_tuple;   /* Const defaults tuple */
+    PyObject *defaults_kwdict;  /* Const kwonly defaults dict */
+    PyObject *(*defaults_getter)(PyObject *);
+    PyObject *func_annotations; /* function annotations dict */
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
+    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+                                      int flags, PyObject* qualname,
+                                      PyObject *self,
+                                      PyObject *module, PyObject *globals,
+                                      PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+                                                         size_t size,
+                                                         int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+                                                            PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+                                                             PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+                                                              PyObject *dict);
+static int __Pyx_CyFunction_init(void);
+
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+                                           PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
+
+static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);
+
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int8_t(int8_t value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint8_t(uint8_t value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
+
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);
+
+static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value);
+
+static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *);
+
+static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);
+
+static CYTHON_INLINE uint16_t __Pyx_PyInt_As_uint16_t(PyObject *);
+
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+#define __Pyx_Generator_USED
+#include <structmember.h>
+#include <frameobject.h>
+typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
+typedef struct {
+    PyObject_HEAD
+    __pyx_generator_body_t body;
+    PyObject *closure;
+    PyObject *exc_type;
+    PyObject *exc_value;
+    PyObject *exc_traceback;
+    PyObject *gi_weakreflist;
+    PyObject *classobj;
+    PyObject *yieldfrom;
+    int resume_label;
+    char is_running;
+} __pyx_GeneratorObject;
+static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
+                                                  PyObject *closure);
+static int __pyx_Generator_init(void);
+static int __Pyx_Generator_clear(PyObject* self);
+#if 1 || PY_VERSION_HEX < 0x030300B0
+static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
+#else
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
+#endif
+
+static int __Pyx_check_binary_version(void);
+
+#if !defined(__Pyx_PyIdentifier_FromString)
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
+#else
+  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
+#endif
+#endif
+
+static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
+
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
+
+typedef struct {
+    int code_line;
+    PyCodeObject* code_object;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+    int count;
+    int max_count;
+    __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename); /*proto*/
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+
+
+/* Module declarations from 'libc.stdint' */
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libc.stdlib' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from 'pysam.chtslib' */
+
+/* Module declarations from 'pysam.cfaidx' */
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx_Fastafile = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx_FastqProxy = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6cfaidx_Fastqfile = 0;
+
+/* Module declarations from 'cpython.version' */
+
+/* Module declarations from 'cpython.ref' */
+
+/* Module declarations from 'cpython.exc' */
+
+/* Module declarations from 'cpython.module' */
+
+/* Module declarations from 'cpython.mem' */
+
+/* Module declarations from 'cpython.tuple' */
+
+/* Module declarations from 'cpython.list' */
+
+/* Module declarations from 'cpython.object' */
+
+/* Module declarations from 'cpython.sequence' */
+
+/* Module declarations from 'cpython.mapping' */
+
+/* Module declarations from 'cpython.iterator' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.type' */
+static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
+
+/* Module declarations from 'cpython.number' */
+
+/* Module declarations from 'cpython.int' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.bool' */
+static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
+
+/* Module declarations from 'cpython.long' */
+
+/* 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' */
+
+/* Module declarations from 'cpython.dict' */
+
+/* Module declarations from 'cpython.instance' */
+
+/* Module declarations from 'cpython.function' */
+
+/* Module declarations from 'cpython.method' */
+
+/* Module declarations from 'cpython.weakref' */
+
+/* Module declarations from 'cpython.getargs' */
+
+/* Module declarations from 'cpython.pythread' */
+
+/* Module declarations from 'cpython.pystate' */
+
+/* Module declarations from 'cpython.cobject' */
+
+/* Module declarations from 'cpython.oldbuffer' */
+
+/* Module declarations from 'cpython.set' */
+
+/* Module declarations from 'cpython.buffer' */
+
+/* Module declarations from 'cpython.bytes' */
+
+/* Module declarations from 'cpython.pycapsule' */
+
+/* Module declarations from 'cpython' */
+
+/* Module declarations from 'pysam.csamfile' */
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_AlignedRead = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_Samfile = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_PileupProxy = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_PileupRead = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorRow = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorRowRegion = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorRowHead = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorRowAll = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorRowAllRefs = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorRowSelection = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorColumn = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorColumnRegion = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IteratorColumnAllRefs = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_IndexedReads = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile_SNPCall = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile___pyx_scope_struct__genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pysam_8csamfile___pyx_scope_struct_1_genexpr = 0;
+static PyObject *__pyx_v_5pysam_8csamfile__FILENAME_ENCODING = 0;
+static char *__pyx_v_5pysam_8csamfile_CODE2CIGAR;
+static int __pyx_v_5pysam_8csamfile_max_pos;
+static PyObject *__pyx_f_5pysam_8csamfile_from_string_and_size(char *, size_t); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile__encodeFilename(PyObject *); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile__forceBytes(PyObject *); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile__charptr_to_str(char *); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile__forceStr(PyObject *); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile_makeAlignedRead(bam1_t *); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile_makePileupProxy(bam_pileup1_t **, int, int, int); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile_makePileupRead(bam_pileup1_t *); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile_convertBinaryTagToList(uint8_t *); /*proto*/
+static int __pyx_f_5pysam_8csamfile___advance_all(void *, bam1_t *); /*proto*/
+static int __pyx_f_5pysam_8csamfile___advance_snpcalls(void *, bam1_t *); /*proto*/
+static CYTHON_INLINE int32_t __pyx_f_5pysam_8csamfile_query_start(bam1_t *); /*proto*/
+static CYTHON_INLINE int32_t __pyx_f_5pysam_8csamfile_query_end(bam1_t *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_8csamfile_get_seq_range(bam1_t *, uint32_t, uint32_t); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_8csamfile_get_qual_range(bam1_t *, uint32_t, uint32_t); /*proto*/
+static CYTHON_INLINE uint8_t __pyx_f_5pysam_8csamfile_get_type_code(PyObject *, struct __pyx_opt_args_5pysam_8csamfile_get_type_code *__pyx_optional_args); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_8csamfile_convert_python_tag(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
+#define __Pyx_MODULE_NAME "pysam.csamfile"
+int __pyx_module_is_main_pysam__csamfile = 0;
+
+/* Implementation of 'pysam.csamfile' */
+static PyObject *__pyx_builtin_object;
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_ord;
+static PyObject *__pyx_builtin_map;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_IOError;
+static PyObject *__pyx_builtin_OverflowError;
+static PyObject *__pyx_builtin_NotImplementedError;
+static PyObject *__pyx_builtin_OSError;
+static PyObject *__pyx_builtin_AttributeError;
+static PyObject *__pyx_builtin_zip;
+static PyObject *__pyx_builtin_sorted;
+static PyObject *__pyx_builtin_KeyError;
+static PyObject *__pyx_builtin_StopIteration;
+static PyObject *__pyx_builtin_min;
+static PyObject *__pyx_builtin_max;
+static PyObject *__pyx_builtin_chr;
+static PyObject *__pyx_pf_5pysam_8csamfile_genexpr(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_3genexpr(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_12PileupColumn___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_7Samfile___cinit__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_2_isOpen(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_4_hasIndex(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_6_open(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_template, PyObject *__pyx_v_referencenames, PyObject *__pyx_v_referencelengths, PyObject *__pyx_v_text, PyObject *__pyx_v_header, PyObject *__pyx_v_port, PyObject *__pyx_v_add_sq_text, PyObject *__pyx_v_check_header, PyObject *__pyx_v_check_sq); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_8gettid(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_10getrname(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_tid); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_12_parseRegion(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_tid); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_14reset(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_16seek(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, uint64_t __pyx_v_offset, int __pyx_v_where); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_18tell(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_20fetch(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_tid, PyObject *__pyx_v_callback, PyObject *__pyx_v_until_eof, PyObject *__pyx_v_reopen); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_22head(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_24mate(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_read); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_26count(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_until_eof); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_28pileup(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_30close(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_8csamfile_7Samfile_32__dealloc__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_34write(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_read); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_36__enter__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_38__exit__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_8filename___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_11nreferences___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_10references___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_7lengths___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_6mapped___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_40_checkIndex(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_8unmapped___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_12nocoordinate___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_4text___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_6header___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_42_buildLine(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_record); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_44__iter__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_46__next__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11IteratorRow___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRow *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_reopen); /* proto */
+static void __pyx_pf_5pysam_8csamfile_11IteratorRow_2__dealloc__(struct __pyx_obj_5pysam_8csamfile_IteratorRow *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_17IteratorRowRegion___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_tid, int __pyx_v_beg, int __pyx_v_end, int __pyx_v_reopen); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_17IteratorRowRegion_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_17IteratorRowRegion_4__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_8csamfile_17IteratorRowRegion_6__dealloc__(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_15IteratorRowHead___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_n, int __pyx_v_reopen); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_15IteratorRowHead_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_15IteratorRowHead_4__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_14IteratorRowAll___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_reopen); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorRowAll_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorRowAll_4__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, PyObject *__pyx_v_reopen); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_2nextiter(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_4__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_6__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_20IteratorRowSelection___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, PyObject *__pyx_v_positions, int __pyx_v_reopen); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_20IteratorRowSelection_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_20IteratorRowSelection_4__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_14IteratorColumn___cinit__(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorColumn_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorColumn_7seq_len___get__(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorColumn_4addReference(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self, struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_fastafile); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorColumn_6hasReference(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_8csamfile_14IteratorColumn_8__dealloc__(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_20IteratorColumnRegion___cinit__(struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end, int __pyx_v_truncate, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_20IteratorColumnRegion_2__next__(struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_21IteratorColumnAllRefs___cinit__(struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__(struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead___init__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_8csamfile_11AlignedRead_2__dealloc__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4__str__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_6compare(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_other); /* proto */
+static Py_hash_t __pyx_pf_5pysam_8csamfile_11AlignedRead_8__hash__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_10_convert_python_tag(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_pytag, PyObject *__pyx_v_value, PyObject *__pyx_v_fmts, PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5qname___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5qname_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qname); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5cigar___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5cigar_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_11cigarstring___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_11cigarstring_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_cigar); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_3seq___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_3seq_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_seq); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4qual___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4qual_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qual); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5query___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5qqual___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_6qstart___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4qend___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4qlen___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4tags___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4tags_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tags); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_12setTag(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value, PyObject *__pyx_v_value_type, PyObject *__pyx_v_replace); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4flag___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4flag_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5rname___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5rname_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tid); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_3tid___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_3tid_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tid); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_3pos___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_3pos_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_pos); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_3bin___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_3bin_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_bin); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4rlen___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4aend___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4alen___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4mapq___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4mapq_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qual); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4mrnm___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4mrnm_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mtid); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5rnext___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5rnext_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mtid); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4mpos___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4mpos_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5pnext___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5pnext_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5isize___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5isize_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_isize); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4tlen___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4tlen_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_isize); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_9is_paired___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_9is_paired_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_14is_proper_pair___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_14is_proper_pair_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_11is_unmapped___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_11is_unmapped_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_10is_reverse___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_10is_reverse_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_15mate_is_reverse___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read1___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read1_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read2___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read2_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_12is_secondary___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_12is_secondary_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_9is_qcfail___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_9is_qcfail_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_12is_duplicate___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_12is_duplicate_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_9positions___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_15inferred_length___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_13aligned_pairs___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_6blocks___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_14overlap(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, uint32_t __pyx_v_start, uint32_t __pyx_v_end); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_16opt(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_18fancy_str(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11PileupProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_2__str__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_3tid___get__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_1n___get__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_11PileupProxy_1n_2__set__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_3pos___get__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_7pileups___get__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_10PileupRead___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_2__str__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_9alignment___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_4qpos___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_5indel___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_6is_del___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_7is_head___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_7is_tail___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_5level___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_3tid___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_3pos___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_14reference_base___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_8genotype___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_17consensus_quality___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_11snp_quality___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_15mapping_quality___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_8coverage___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall___str__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_8csamfile_12IndexedReads___init__(struct __pyx_obj_5pysam_8csamfile_IndexedReads *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_reopen); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_12IndexedReads_2build(struct __pyx_obj_5pysam_8csamfile_IndexedReads *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_8csamfile_12IndexedReads_4find(struct __pyx_obj_5pysam_8csamfile_IndexedReads *__pyx_v_self, PyObject *__pyx_v_qname); /* proto */
+static void __pyx_pf_5pysam_8csamfile_12IndexedReads_6__dealloc__(struct __pyx_obj_5pysam_8csamfile_IndexedReads *__pyx_v_self); /* proto */
+static PyObject *__pyx_tp_new_5pysam_8csamfile_AlignedRead(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_Samfile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_PileupProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_PileupRead(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRow(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowRegion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowHead(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowAll(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowAllRefs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowSelection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorColumn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorColumnRegion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorColumnAllRefs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IndexedReads(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile_SNPCall(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_8csamfile___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_A[] = "A";
+static char __pyx_k_B[] = "B";
+static char __pyx_k_C[] = "C";
+static char __pyx_k_D[] = "D";
+static char __pyx_k_F[] = "F";
+static char __pyx_k_H[] = "H";
+static char __pyx_k_I[] = "I";
+static char __pyx_k_S[] = "S";
+static char __pyx_k_Z[] = "Z";
+static char __pyx_k_b[] = "b";
+static char __pyx_k_c[] = "c";
+static char __pyx_k_d[] = "d";
+static char __pyx_k_f[] = "f";
+static char __pyx_k_h[] = "h";
+static char __pyx_k_i[] = "i";
+static char __pyx_k_n[] = "n";
+static char __pyx_k_r[] = "r";
+static char __pyx_k_s[] = "@%s";
+static char __pyx_k_w[] = "w";
+static char __pyx_k_AS[] = "AS";
+static char __pyx_k_CL[] = "CL";
+static char __pyx_k_CN[] = "CN";
+static char __pyx_k_CO[] = "CO";
+static char __pyx_k_DS[] = "DS";
+static char __pyx_k_DT[] = "DT";
+static char __pyx_k_FO[] = "FO";
+static char __pyx_k_GO[] = "GO";
+static char __pyx_k_HD[] = "HD";
+static char __pyx_k_ID[] = "ID";
+static char __pyx_k_KS[] = "KS";
+static char __pyx_k_LB[] = "LB";
+static char __pyx_k_LN[] = "LN";
+static char __pyx_k_M5[] = "M5";
+static char __pyx_k_PG[] = "PG";
+static char __pyx_k_PI[] = "PI";
+static char __pyx_k_PL[] = "PL";
+static char __pyx_k_PN[] = "PN";
+static char __pyx_k_PP[] = "PP";
+static char __pyx_k_PU[] = "PU";
+static char __pyx_k_RG[] = "RG";
+static char __pyx_k_SM[] = "SM";
+static char __pyx_k_SN[] = "SN";
+static char __pyx_k_SO[] = "SO";
+static char __pyx_k_SP[] = "SP";
+static char __pyx_k_SQ[] = "SQ";
+static char __pyx_k_UR[] = "UR";
+static char __pyx_k_VN[] = "VN";
+static char __pyx_k__3[] = "\t";
+static char __pyx_k__4[] = "\n";
+static char __pyx_k__6[] = "-";
+static char __pyx_k__9[] = "";
+static char __pyx_k_os[] = "os";
+static char __pyx_k_rU[] = "rU";
+static char __pyx_k_rb[] = "rb";
+static char __pyx_k_re[] = "re";
+static char __pyx_k_wb[] = "wb";
+static char __pyx_k_wh[] = "wh";
+static char __pyx_k__14[] = "[:-]";
+static char __pyx_k__41[] = "@";
+static char __pyx_k__47[] = ":";
+static char __pyx_k__76[] = "<";
+static char __pyx_k__79[] = "(";
+static char __pyx_k__80[] = ")";
+static char __pyx_k_all[] = "all";
+static char __pyx_k_bai[] = ".bai";
+static char __pyx_k_beg[] = "beg";
+static char __pyx_k_bin[] = "bin";
+static char __pyx_k_c_2[] = "%c";
+static char __pyx_k_chr[] = "chr";
+static char __pyx_k_doc[] = "__doc__";
+static char __pyx_k_end[] = "end";
+static char __pyx_k_ftp[] = "ftp:";
+static char __pyx_k_get[] = "get";
+static char __pyx_k_i_c[] = "%i%c";
+static char __pyx_k_map[] = "map";
+static char __pyx_k_max[] = "max";
+static char __pyx_k_min[] = "min";
+static char __pyx_k_ord[] = "ord";
+static char __pyx_k_pos[] = "pos";
+static char __pyx_k_raw[] = "raw";
+static char __pyx_k_s_2[] = "s";
+static char __pyx_k_s_s[] = "%s:%s";
+static char __pyx_k_seq[] = "seq";
+static char __pyx_k_str[] = "__str__";
+static char __pyx_k_sys[] = "sys";
+static char __pyx_k_tag[] = "tag";
+static char __pyx_k_tid[] = "tid";
+static char __pyx_k_wbu[] = "wbu";
+static char __pyx_k_zip[] = "zip";
+static char __pyx_k_2scB[] = "2scB";
+static char __pyx_k_2scH[] = "2scH";
+static char __pyx_k_2scI[] = "2scI";
+static char __pyx_k_2scb[] = "2scb";
+static char __pyx_k_2scc[] = "2scc";
+static char __pyx_k_2scf[] = "2scf";
+static char __pyx_k_2sch[] = "2sch";
+static char __pyx_k_2sci[] = "2sci";
+static char __pyx_k_Zidf[] = "Zidf";
+static char __pyx_k_args[] = "args";
+static char __pyx_k_flag[] = "flag";
+static char __pyx_k_fmts[] = "fmts";
+static char __pyx_k_http[] = "http:";
+static char __pyx_k_init[] = "__init__";
+static char __pyx_k_join[] = "join";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_mapq[] = "mapq";
+static char __pyx_k_mode[] = "mode";
+static char __pyx_k_mpos[] = "mpos";
+static char __pyx_k_mrnm[] = "mrnm";
+static char __pyx_k_mtid[] = "mtid";
+static char __pyx_k_open[] = "_open";
+static char __pyx_k_path[] = "path";
+static char __pyx_k_port[] = "port";
+static char __pyx_k_qpos[] = "qpos";
+static char __pyx_k_qseq[] = "qseq";
+static char __pyx_k_qual[] = "qual";
+static char __pyx_k_rlen[] = "rlen";
+static char __pyx_k_seek[] = "seek";
+static char __pyx_k_self[] = "self";
+static char __pyx_k_send[] = "send";
+static char __pyx_k_tags[] = "tags";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_text[] = "text";
+static char __pyx_k_warn[] = "warn";
+static char __pyx_k_all_2[] = "__all__";
+static char __pyx_k_ascii[] = "ascii";
+static char __pyx_k_bqual[] = "bqual";
+static char __pyx_k_cigar[] = "cigar";
+static char __pyx_k_close[] = "close";
+static char __pyx_k_fetch[] = "fetch";
+static char __pyx_k_indel[] = "indel";
+static char __pyx_k_isize[] = "isize";
+static char __pyx_k_items[] = "items";
+static char __pyx_k_level[] = "level";
+static char __pyx_k_pytag[] = "pytag";
+static char __pyx_k_qname[] = "qname";
+static char __pyx_k_rname[] = "rname";
+static char __pyx_k_split[] = "split";
+static char __pyx_k_start[] = "start";
+static char __pyx_k_strip[] = "strip";
+static char __pyx_k_throw[] = "throw";
+static char __pyx_k_types[] = "types";
+static char __pyx_k_value[] = "value";
+static char __pyx_k_where[] = "where";
+static char __pyx_k_write[] = "write";
+static char __pyx_k_2sc_is[] = "2sc%is";
+static char __pyx_k_append[] = "append";
+static char __pyx_k_ctypes[] = "ctypes";
+static char __pyx_k_decode[] = "decode";
+static char __pyx_k_encode[] = "encode";
+static char __pyx_k_exists[] = "exists";
+static char __pyx_k_extend[] = "extend";
+static char __pyx_k_fields[] = "fields";
+static char __pyx_k_gettid[] = "gettid";
+static char __pyx_k_header[] = "header";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_isOpen[] = "_isOpen";
+static char __pyx_k_is_del[] = "is_del";
+static char __pyx_k_l_data[] = "l_data";
+static char __pyx_k_l_qseq[] = "l_qseq";
+static char __pyx_k_m_data[] = "m_data";
+static char __pyx_k_module[] = "__module__";
+static char __pyx_k_object[] = "object";
+static char __pyx_k_offset[] = "offset";
+static char __pyx_k_record[] = "record";
+static char __pyx_k_region[] = "region";
+static char __pyx_k_reopen[] = "reopen";
+static char __pyx_k_setTag[] = "setTag";
+static char __pyx_k_sorted[] = "sorted";
+static char __pyx_k_struct[] = "struct";
+static char __pyx_k_IOError[] = "IOError";
+static char __pyx_k_OSError[] = "OSError";
+static char __pyx_k_Samfile[] = "Samfile";
+static char __pyx_k_compile[] = "compile";
+static char __pyx_k_findall[] = "findall";
+static char __pyx_k_is_head[] = "is_head";
+static char __pyx_k_is_tail[] = "is_tail";
+static char __pyx_k_islower[] = "islower";
+static char __pyx_k_isupper[] = "isupper";
+static char __pyx_k_l_qname[] = "l_qname";
+static char __pyx_k_lengths[] = "lengths";
+static char __pyx_k_n_cigar[] = "n_cigar";
+static char __pyx_k_pileups[] = "pileups";
+static char __pyx_k_prepare[] = "__prepare__";
+static char __pyx_k_replace[] = "replace";
+static char __pyx_k_samfile[] = "samfile";
+static char __pyx_k_stepper[] = "stepper";
+static char __pyx_k_KeyError[] = "KeyError";
+static char __pyx_k_calcsize[] = "calcsize";
+static char __pyx_k_callback[] = "callback";
+static char __pyx_k_check_sq[] = "check_sq";
+static char __pyx_k_coverage[] = "coverage";
+static char __pyx_k_exc_type[] = "exc_type";
+static char __pyx_k_filename[] = "filename";
+static char __pyx_k_genotype[] = "genotype";
+static char __pyx_k_hasIndex[] = "_hasIndex";
+static char __pyx_k_nextiter[] = "nextiter";
+static char __pyx_k_platform[] = "platform";
+static char __pyx_k_qualname[] = "__qualname__";
+static char __pyx_k_samtools[] = "samtools";
+static char __pyx_k_tempfile[] = "tempfile";
+static char __pyx_k_template[] = "template";
+static char __pyx_k_truncate[] = "truncate";
+static char __pyx_k_warnings[] = "warnings";
+static char __pyx_k_2sccI_i_s[] = "2sccI%i%s";
+static char __pyx_k_30s_10s_s[] = "%-30s %-10s= %s";
+static char __pyx_k_MIDNSHP_X[] = "MIDNSHP=X";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_alignment[] = "alignment";
+static char __pyx_k_buildLine[] = "_buildLine";
+static char __pyx_k_enumerate[] = "enumerate";
+static char __pyx_k_exc_value[] = "exc_value";
+static char __pyx_k_fastafile[] = "fastafile";
+static char __pyx_k_itertools[] = "itertools";
+static char __pyx_k_max_depth[] = "max_depth";
+static char __pyx_k_metaclass[] = "__metaclass__";
+static char __pyx_k_pack_into[] = "pack_into";
+static char __pyx_k_positions[] = "positions";
+static char __pyx_k_reference[] = "reference";
+static char __pyx_k_traceback[] = "traceback";
+static char __pyx_k_until_eof[] = "until_eof";
+static char __pyx_k_CIGAR2CODE[] = "CIGAR2CODE";
+static char __pyx_k_IS_PYTHON3[] = "IS_PYTHON3";
+static char __pyx_k_PileupRead[] = "PileupRead";
+static char __pyx_k_Query_name[] = "Query name";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_checkIndex[] = "_checkIndex";
+static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static char __pyx_k_references[] = "references";
+static char __pyx_k_startswith[] = "startswith";
+static char __pyx_k_value_type[] = "value_type";
+static char __pyx_k_AlignedRead[] = "AlignedRead";
+static char __pyx_k_Binary_flag[] = "Binary flag";
+static char __pyx_k_CIGAR_REGEX[] = "CIGAR_REGEX";
+static char __pyx_k_Insert_size[] = "Insert size";
+static char __pyx_k_IteratorRow[] = "IteratorRow";
+static char __pyx_k_PileupProxy[] = "PileupProxy";
+static char __pyx_k_add_sq_text[] = "add_sq_text";
+static char __pyx_k_collections[] = "collections";
+static char __pyx_k_d_MIDNSHP_X[] = "(\\d+)([MIDNSHP=X])";
+static char __pyx_k_defaultdict[] = "defaultdict";
+static char __pyx_k_nreferences[] = "nreferences";
+static char __pyx_k_parseRegion[] = "_parseRegion";
+static char __pyx_k_snp_quality[] = "snp_quality";
+static char __pyx_k_Contig_index[] = "Contig index";
+static char __pyx_k_IndexedReads[] = "IndexedReads";
+static char __pyx_k_PileupColumn[] = "PileupColumn";
+static char __pyx_k_SQ_SN_s_LN_s[] = "@SQ\tSN:%s\tLN:%s\n";
+static char __pyx_k_check_header[] = "check_header";
+static char __pyx_k_getattribute[] = "__getattribute__";
+static char __pyx_k_version_info[] = "version_info";
+static char __pyx_k_Cigar_entries[] = "Cigar entries";
+static char __pyx_k_Invalid_tag_s[] = "Invalid tag: %s";
+static char __pyx_k_OverflowError[] = "OverflowError";
+static char __pyx_k_StopIteration[] = "StopIteration";
+static char __pyx_k_VALID_HEADERS[] = "VALID_HEADERS";
+static char __pyx_k_AttributeError[] = "AttributeError";
+static char __pyx_k_IteratorColumn[] = "IteratorColumn";
+static char __pyx_k_Quality_scores[] = "Quality scores";
+static char __pyx_k_Query_sequence[] = "Query sequence";
+static char __pyx_k_mate_not_found[] = "mate not found";
+static char __pyx_k_properties_bin[] = "properties bin";
+static char __pyx_k_pysam_csamfile[] = "pysam.csamfile";
+static char __pyx_k_reference_base[] = "reference_base";
+static char __pyx_k_referencenames[] = "referencenames";
+static char __pyx_k_unknown_type_s[] = "unknown type '%s'";
+static char __pyx_k_Mapping_quality[] = "Mapping quality";
+static char __pyx_k_mapping_quality[] = "mapping_quality";
+static char __pyx_k_properties_flag[] = "properties flag";
+static char __pyx_k_file_s_not_found[] = "file `%s` not found";
+static char __pyx_k_read_s_not_found[] = "read %s not found";
+static char __pyx_k_referencelengths[] = "referencelengths";
+static char __pyx_k_consensus_quality[] = "consensus_quality";
+static char __pyx_k_mapping_quality_2[] = "mapping quality";
+static char __pyx_k_tag_s_not_present[] = "tag '%s' not present";
+static char __pyx_k_PileupColumn___str[] = "PileupColumn.__str__";
+static char __pyx_k_VALID_HEADER_ORDER[] = "VALID_HEADER_ORDER";
+static char __pyx_k_VALID_HEADER_TYPES[] = "VALID_HEADER_TYPES";
+static char __pyx_k_end_out_of_range_i[] = "end out of range (%i)";
+static char __pyx_k_getdefaultencoding[] = "getdefaultencoding";
+static char __pyx_k_mate_s_is_unmapped[] = "mate %s: is unmapped";
+static char __pyx_k_read_s_is_unpaired[] = "read %s: is unpaired";
+static char __pyx_k_true_if_QC_failure[] = "true if QC failure";
+static char __pyx_k_Maximum_data_length[] = "Maximum data length";
+static char __pyx_k_NotImplementedError[] = "NotImplementedError";
+static char __pyx_k_VALID_HEADER_FIELDS[] = "VALID_HEADER_FIELDS";
+static char __pyx_k_invalid_reference_s[] = "invalid reference `%s`";
+static char __pyx_k_the_genotype_called[] = "the genotype called.";
+static char __pyx_k_the_template_length[] = "the template length";
+static char __pyx_k_Bam_index_bin_number[] = "Bam index bin number";
+static char __pyx_k_Length_of_query_name[] = "Length of query name";
+static char __pyx_k_create_string_buffer[] = "create_string_buffer";
+static char __pyx_k_start_out_of_range_i[] = "start out of range (%i)";
+static char __pyx_k_Position_of_mate_pair[] = "Position of mate pair";
+static char __pyx_k_could_not_open_file_s[] = "could not open file `%s`";
+static char __pyx_k_getfilesystemencoding[] = "getfilesystemencoding";
+static char __pyx_k_header_line_without_s[] = "header line without '@': '%s'";
+static char __pyx_k_true_if_this_is_read1[] = "true if this is read1";
+static char __pyx_k_true_if_this_is_read2[] = "true if this is read2";
+static char __pyx_k_Count_of_cigar_entries[] = "Count of cigar entries";
+static char __pyx_k_error_during_iteration[] = "error during iteration";
+static char __pyx_k_Length_of_auxilary_data[] = "Length of auxilary data";
+static char __pyx_k_current_sequence_length[] = "current sequence length.";
+static char __pyx_k_Length_of_query_sequence[] = "Length of query sequence";
+static char __pyx_k_the_position_of_the_mate[] = "the position of the mate";
+static char __pyx_k_Mapped_position_on_contig[] = "Mapped position on contig";
+static char __pyx_k_unknown_auxilliary_type_s[] = "unknown auxilliary type '%s'";
+static char __pyx_k_Contig_index_for_mate_pair[] = "Contig index for mate pair";
+static char __pyx_k_nucleotide_position_of_SNP[] = "nucleotide position of SNP.";
+static char __pyx_k_tid_i_out_of_range_0_tid_i[] = "tid %i out of range 0<=tid<%i";
+static char __pyx_k_unable_to_open_index_for_s[] = "unable to open index for `%s` ";
+static char __pyx_k_0_based_leftmost_coordinate[] = "0-based leftmost coordinate";
+static char __pyx_k_error_while_opening_index_s[] = "error while opening index `%s` ";
+static char __pyx_k_invalid_file_opening_mode_s[] = "invalid file opening mode `%s`";
+static char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on closed file";
+static char __pyx_k_callback_not_implemented_yet[] = "callback not implemented yet";
+static char __pyx_k_no_index_available_for_fetch[] = "no index available for fetch";
+static char __pyx_k_seek_no_available_in_streams[] = "seek no available in streams";
+static char __pyx_k_true_if_the_mate_is_unmapped[] = "true if the mate is unmapped";
+static char __pyx_k_no_index_available_for_pileup[] = "no index available for pileup";
+static char __pyx_k_true_if_not_primary_alignment[] = "true if not primary alignment";
+static char __pyx_k_home_andreas_devel_pysam_pysam[] = "/home/andreas/devel/pysam/pysam/csamfile.pyx";
+static char __pyx_k_term_target_ID_DEPRECATED_from[] = "\n        :term:`target` ID\n\n        DEPRECATED from pysam-0.4 - use tid in the future.\n        The rname field caused a lot of confusion as it returns\n        the :term:`target` ID instead of the reference sequence\n        name.\n\n        .. note::\n\n            This field contains the index of the reference sequence\n            in the sequence dictionary. To obtain the name\n            of the reference sequence, use :meth [...]
+static char __pyx_k_term_target_ID_note_This_field[] = "\n        :term:`target` ID\n\n        .. note::\n\n            This field contains the index of the reference sequence\n            in the sequence dictionary. To obtain the name\n            of the reference sequence, use :meth:`pysam.Samfile.getrname()`\n\n        ";
+static char __pyx_k_A_pileup_column_A_pileup_column[] = "A pileup column. A pileup column contains\n    all the reads that map to a certain target base.\n\n    tid\n        chromosome ID as is defined in the header\n    pos\n        the target base coordinate (0-based)\n    n\n        number of reads mapping to this column\n    pileups\n        list of reads (:class:`pysam.PileupRead`) aligned to this column\n    ";
+static char __pyx_k_a_list_of_start_and_end_positio[] = " a list of start and end positions of\n        aligned gapless blocks.\n\n        The start and end positions are in genomic \n        coordinates. \n      \n        Blocks are not normalized, i.e. two blocks \n        might be directly adjacent. This happens if\n        the two blocks are separated by an insertion \n        in the read.\n        ";
+static char __pyx_k_fetch_called_on_bamfile_without[] = "fetch called on bamfile without index";
+static char __pyx_k_file_does_not_have_valid_header[] = "file does not have valid header (mode='%s') - is it BAM format?";
+static char __pyx_k_header_line_with_invalid_type_s[] = "header line with invalid type '%s': '%s'";
+static char __pyx_k_incomplete_sequence_information[] = "incomplete sequence information in '%s'";
+static char __pyx_k_inferred_read_length_from_CIGAR[] = "inferred read length from CIGAR string.\n\n        Returns 0 if CIGAR string is not present.\n        ";
+static char __pyx_k_invalid_coordinates_start_i_end[] = "invalid coordinates: start (%i) > end (%i)";
+static char __pyx_k_malformatted_header_no_in_field[] = "malformatted header: no ':' in field";
+static char __pyx_k_number_of_reads_mapping_to_this[] = "number of reads mapping to this column.";
+static char __pyx_k_quality_and_sequence_mismatch_i[] = "quality and sequence mismatch: %i != %i";
+static char __pyx_k_the_chromosome_ID_as_is_defined[] = "the chromosome ID as is defined in the header";
+static char __pyx_k_the_root_mean_square_rms_of_the[] = "the root mean square (rms) of the mapping quality of all reads involved in the call.";
+static char __pyx_k_true_if_read_itself_is_unmapped[] = "true if read itself is unmapped";
+static char __pyx_k_1_iff_the_base_on_the_padded_rea[] = "1 iff the base on the padded read is a deletion";
+static char __pyx_k_Argument_must_be_string_bytes_or[] = "Argument must be string, bytes or unicode.";
+static char __pyx_k_Argument_must_be_string_or_unico[] = "Argument must be string or unicode.";
+static char __pyx_k_Invalid_clipping_in_CIGAR_string[] = "Invalid clipping in CIGAR string";
+static char __pyx_k_PileupProxy_accessed_after_itera[] = "PileupProxy accessed after iterator finished";
+static char __pyx_k_Samfile_mapped_only_available_in[] = "Samfile.mapped only available in bam files";
+static char __pyx_k_This_class_cannot_be_instantiate[] = "This class cannot be instantiated from Python";
+static char __pyx_k_Unsupported_value_type_in_set_op[] = "Unsupported value_type in set_option";
+static char __pyx_k_a_class_pysam_AlignedRead_object[] = "a :class:`pysam.AlignedRead` object of the aligned read";
+static char __pyx_k_a_list_of_aligned_read_and_refer[] = "a list of aligned read and reference positions.\n\n        Unaligned position are marked by None.\n        ";
+static char __pyx_k_a_list_of_reference_positions_th[] = "a list of reference positions that this read aligns to.";
+static char __pyx_k_aligned_length_of_the_read_on_th[] = "aligned length of the read on the reference genome.\n\n        This is equal to `aend - pos`. Returns None if not available.";
+static char __pyx_k_aligned_portion_of_the_read_This[] = "aligned portion of the read.\n\n        This is a substring of :attr:`seq` that excludes flanking bases that were\n        :term:`soft clipped` (None if not present). It is equal to ``seq[qstart:qend]``.\n\n        In Python 3, this property is of type bytes. Assigning a\n        unicode string to it consisting of ASCII characters only will\n        work, but is inefficient.\n\n        SAM/BAM files may include extra flanking base [...]
+static char __pyx_k_aligned_query_sequence_quality_v[] = "aligned query sequence quality values (None if not\n        present). These are the quality values that correspond to :attr:`query`, that is,\n        they exclude qualities of :term:`soft clipped` bases. This is equal to\n        ``qual[qstart:qend]``.\n\n        This property is read-only.\n\n        In Python 3, this property is of type bytes.";
+static char __pyx_k_aligned_reference_position_of_th[] = "aligned reference position of the read on the reference genome.  \n        \n        aend points to one past the last aligned residue.\n        Returns None if not available.";
+static char __pyx_k_can_not_iterate_over_samfile_wit[] = "can not iterate over samfile without header";
+static char __pyx_k_can_only_IndexReads_on_bam_files[] = "can only IndexReads on bam files";
+static char __pyx_k_can_t_guess_type_or_invalid_type[] = "can't guess type or invalid type code specified";
+static char __pyx_k_could_not_open_file_mode_s_is_it[] = "could not open file (mode='%s') - is it SAM/BAM format?";
+static char __pyx_k_coverage_or_read_depth_the_numbe[] = "coverage or read depth - the number of reads involved in the call.";
+static char __pyx_k_either_supply_options_template_h[] = "either supply options `template`, `header` or  both `referencenames` and `referencelengths` for writing";
+static char __pyx_k_end_index_of_the_aligned_query_p[] = "end index of the aligned query portion of the sequence (0-based, exclusive)";
+static char __pyx_k_fetch_called_for_htsfile_without[] = "fetch called for htsfile without header";
+static char __pyx_k_fetching_by_region_is_not_availa[] = "fetching by region is not available for sam files";
+static char __pyx_k_file_header_is_empty_mode_s_is_i[] = "file header is empty (mode='%s') - is it SAM/BAM format?";
+static char __pyx_k_full_contents_of_the_term_sam_fi[] = "full contents of the :term:`sam file` header as a string.";
+static char __pyx_k_header_information_within_the_te[] = "header information within the :term:`sam file`. The records and fields are returned as\n        a two-level dictionary.\n        ";
+static char __pyx_k_indel_length_0_for_no_indel_posi[] = "indel length; 0 for no indel, positive for ins and negative for del";
+static char __pyx_k_integer_i_out_of_range_of_BAM_SA[] = "integer %i out of range of BAM/SAM specification";
+static char __pyx_k_invalid_type_for_record_s_s_expe[] = "invalid type for record %s: %s, expected %s";
+static char __pyx_k_length_of_the_aligned_query_sequ[] = "length of the aligned query sequence.\n\n        This is equal to :attr:`qend` - :attr:`qstart`";
+static char __pyx_k_length_of_the_read_This_includes[] = "length of the read. This includes soft-clipped bases\n        and is equal to ``len(seq)``.\n\n        This property is read-only.\n\n        Returns 0 if not available.";
+static char __pyx_k_list_of_reads_class_pysam_Pileup[] = "list of reads (:class:`pysam.PileupRead`) aligned to this column";
+static char __pyx_k_mapping_information_not_recorded[] = "mapping information not recorded in index or index not available";
+static char __pyx_k_multiple_s_lines_are_not_permitt[] = "multiple '%s' lines are not permitted";
+static char __pyx_k_no_index_available_for_iteration[] = "no index available for iteration";
+static char __pyx_k_number_of_term_filename_associat[] = "number of :term:`filename` associated with this object.";
+static char __pyx_k_number_of_term_reference_sequenc[] = "number of :term:`reference` sequences in the file.";
+static char __pyx_k_pileup_of_samfiles_not_implement[] = "pileup of samfiles not implemented yet";
+static char __pyx_k_position_of_the_read_base_at_the[] = "position of the read base at the pileup site, 0-based";
+static char __pyx_k_read_sequence_base_qualities_inc[] = "read sequence base qualities, including :term:`soft\n        clipped` bases (None if not present).\n\n        In Python 3, this property is of type bytes and assigning a\n        unicode string to it consisting of ASCII characters only will\n        work, but is inefficient.\n\n        Note that to set quality scores the sequence has to be set\n        previously as this will determine the permitted length of\n        the quality  [...]
+static char __pyx_k_read_sequence_bases_including_te[] = "read sequence bases, including :term:`soft clipped` bases \n        (None if not present).\n\n        In Python 3, this property is of type bytes and assigning a\n        unicode string to it consisting of ASCII characters only will\n        work, but is inefficient.\n\n        Note that assigning to seq will invalidate any quality scores.\n        Thus, to in-place edit the sequence and quality scores, copies of\n        the qual [...]
+static char __pyx_k_reference_base_at_pos_N_if_no_re[] = "reference base at pos. ``N`` if no reference sequence supplied.";
+static char __pyx_k_reference_sequence_for_s_tid_i_n[] = "reference sequence for '%s' (tid=%i) not found";
+static char __pyx_k_seek_only_available_in_bam_files[] = "seek only available in bam files";
+static char __pyx_k_start_index_of_the_aligned_query[] = "start index of the aligned query portion of the sequence (0-based, inclusive).\n\n        This the index of the first base in :attr:`seq` that is not soft-clipped.\n        ";
+static char __pyx_k_the_genotype_quality_Phred_scale[] = "the genotype quality (Phred-scaled).";
+static char __pyx_k_the_insert_size_deprecated_use_t[] = "the insert size\n        deprecated: use tlen instead";
+static char __pyx_k_the_position_of_the_mate_depreca[] = "the position of the mate\n        deprecated, use PNEXT instead.";
+static char __pyx_k_the_query_name_None_if_not_prese[] = "the query name (None if not present)";
+static char __pyx_k_the_snp_quality_Phred_scaled_pro[] = "the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.";
+static char __pyx_k_the_tags_in_the_AUX_field_This_p[] = "the tags in the AUX field.\n\n        This property permits convenience access to\n        the tags. Changes it the returned list will\n        not update the tags automatically. Instead,\n        the following is required for adding a\n        new tag::\n\n            read.tags = read.tags + [(\"RG\",0)]\n\n        This method will happily write the same tag\n        multiple times.\n        ";
+static char __pyx_k_the_term_cigar_alignment_The_ali[] = "the :term:`cigar` alignment. The alignment\n        is returned as a list of tuples of (operation, length). \n\n        If the alignment is not present, an empty list is\n        returned.\n\n        The operations are:\n\n        +-----+--------------+-----+\n        |M    |BAM_CMATCH    |0    |\n        +-----+--------------+-----+\n        |I    |BAM_CINS      |1    |\n        +-----+--------------+-----+\n        |D    |BAM_CD [...]
+static char __pyx_k_the_term_cigar_alignment_as_a_st[] = "the :term:`cigar` alignment as a string.\n        \n        The cigar string is a string of alternating integers\n        and characters denoting the length and the type of\n        an operation.\n\n        .. note::\n            The order length,operation is specified in the\n            SAM format. It is different from the order of\n            the :attr:`cigar` property.\n\n        Returns the empty string if not present.\n\n   [...]
+static char __pyx_k_the_term_reference_id_of_the_mat[] = "the :term:`reference` id of the mate\n        deprecated, use RNEXT instead.\n        ";
+static char __pyx_k_total_number_of_mapped_alignment[] = "total number of mapped alignments in file.\n        ";
+static char __pyx_k_total_number_of_reads_without_co[] = "total number of reads without coordinates\n        ";
+static char __pyx_k_total_number_of_unmapped_reads_i[] = "total number of unmapped reads in file.\n        ";
+static char __pyx_k_true_if_optical_or_PCR_duplicate[] = "true if optical or PCR duplicate";
+static char __pyx_k_true_if_read_is_mapped_in_a_prop[] = "true if read is mapped in a proper pair";
+static char __pyx_k_true_if_read_is_mapped_to_revers[] = "true if read is mapped to reverse strand";
+static char __pyx_k_true_if_read_is_paired_in_sequen[] = "true if read is paired in sequencing";
+static char __pyx_k_true_is_read_is_mapped_to_revers[] = "true is read is mapped to reverse strand";
+static char __pyx_k_tuple_of_the_lengths_of_the_term[] = "tuple of the lengths of the :term:`reference` sequences. The lengths are in the same order as\n        :attr:`pysam.Samfile.references`\n        ";
+static char __pyx_k_tuple_with_the_names_of_term_ref[] = "tuple with the names of :term:`reference` sequences.";
+static char __pyx_k_unequal_names_and_lengths_of_ref[] = "unequal names and lengths of reference sequences";
+static char __pyx_k_unknown_field_code_s_in_record_s[] = "unknown field code '%s' in record '%s'";
+static char __pyx_k_unknown_stepper_option_s_in_Iter[] = "unknown stepper option `%s` in IteratorColumn";
+static char __pyx_k_file_does_not_have_valid_header_2[] = "file does not have valid header (mode='%s') - is it SAM format?";
+static char __pyx_k_the_term_reference_id_of_the_mat_2[] = "the :term:`reference` id of the mate ";
+static PyObject *__pyx_kp_s_2scB;
+static PyObject *__pyx_kp_s_2scH;
+static PyObject *__pyx_kp_s_2scI;
+static PyObject *__pyx_kp_s_2sc_is;
+static PyObject *__pyx_kp_s_2scb;
+static PyObject *__pyx_kp_s_2scc;
+static PyObject *__pyx_kp_s_2sccI_i_s;
+static PyObject *__pyx_kp_s_2scf;
+static PyObject *__pyx_kp_s_2sch;
+static PyObject *__pyx_kp_s_2sci;
+static PyObject *__pyx_kp_s_30s_10s_s;
+static PyObject *__pyx_n_s_A;
+static PyObject *__pyx_n_s_AS;
+static PyObject *__pyx_kp_s_A_pileup_column_A_pileup_column;
+static PyObject *__pyx_n_s_AlignedRead;
+static PyObject *__pyx_kp_u_Argument_must_be_string_bytes_or;
+static PyObject *__pyx_kp_u_Argument_must_be_string_or_unico;
+static PyObject *__pyx_n_s_AttributeError;
+static PyObject *__pyx_n_s_B;
+static PyObject *__pyx_kp_s_Bam_index_bin_number;
+static PyObject *__pyx_kp_s_Binary_flag;
+static PyObject *__pyx_n_s_C;
+static PyObject *__pyx_n_s_CIGAR2CODE;
+static PyObject *__pyx_n_s_CIGAR_REGEX;
+static PyObject *__pyx_n_s_CL;
+static PyObject *__pyx_n_s_CN;
+static PyObject *__pyx_n_s_CO;
+static PyObject *__pyx_kp_s_Cigar_entries;
+static PyObject *__pyx_kp_s_Contig_index;
+static PyObject *__pyx_kp_s_Contig_index_for_mate_pair;
+static PyObject *__pyx_kp_s_Count_of_cigar_entries;
+static PyObject *__pyx_n_s_D;
+static PyObject *__pyx_n_s_DS;
+static PyObject *__pyx_n_s_DT;
+static PyObject *__pyx_n_s_F;
+static PyObject *__pyx_n_s_FO;
+static PyObject *__pyx_n_s_GO;
+static PyObject *__pyx_n_s_H;
+static PyObject *__pyx_n_s_HD;
+static PyObject *__pyx_n_s_I;
+static PyObject *__pyx_n_s_ID;
+static PyObject *__pyx_n_s_IOError;
+static PyObject *__pyx_n_s_IS_PYTHON3;
+static PyObject *__pyx_kp_s_I_O_operation_on_closed_file;
+static PyObject *__pyx_n_s_IndexedReads;
+static PyObject *__pyx_kp_s_Insert_size;
+static PyObject *__pyx_kp_s_Invalid_tag_s;
+static PyObject *__pyx_n_s_IteratorColumn;
+static PyObject *__pyx_n_s_IteratorRow;
+static PyObject *__pyx_n_s_KS;
+static PyObject *__pyx_n_s_KeyError;
+static PyObject *__pyx_n_s_LB;
+static PyObject *__pyx_n_s_LN;
+static PyObject *__pyx_kp_s_Length_of_auxilary_data;
+static PyObject *__pyx_kp_s_Length_of_query_name;
+static PyObject *__pyx_kp_s_Length_of_query_sequence;
+static PyObject *__pyx_n_s_M5;
+static PyObject *__pyx_kp_s_Mapped_position_on_contig;
+static PyObject *__pyx_kp_s_Mapping_quality;
+static PyObject *__pyx_kp_s_Maximum_data_length;
+static PyObject *__pyx_n_s_NotImplementedError;
+static PyObject *__pyx_n_s_OSError;
+static PyObject *__pyx_n_s_OverflowError;
+static PyObject *__pyx_n_s_PG;
+static PyObject *__pyx_n_s_PI;
+static PyObject *__pyx_n_s_PL;
+static PyObject *__pyx_n_s_PN;
+static PyObject *__pyx_n_s_PP;
+static PyObject *__pyx_n_s_PU;
+static PyObject *__pyx_n_s_PileupColumn;
+static PyObject *__pyx_n_s_PileupColumn___str;
+static PyObject *__pyx_n_s_PileupProxy;
+static PyObject *__pyx_kp_s_PileupProxy_accessed_after_itera;
+static PyObject *__pyx_n_s_PileupRead;
+static PyObject *__pyx_kp_s_Position_of_mate_pair;
+static PyObject *__pyx_kp_s_Quality_scores;
+static PyObject *__pyx_kp_s_Query_name;
+static PyObject *__pyx_kp_s_Query_sequence;
+static PyObject *__pyx_n_s_RG;
+static PyObject *__pyx_n_s_S;
+static PyObject *__pyx_n_s_SM;
+static PyObject *__pyx_n_s_SN;
+static PyObject *__pyx_n_s_SO;
+static PyObject *__pyx_n_s_SP;
+static PyObject *__pyx_n_s_SQ;
+static PyObject *__pyx_kp_s_SQ_SN_s_LN_s;
+static PyObject *__pyx_n_s_Samfile;
+static PyObject *__pyx_kp_s_Samfile_mapped_only_available_in;
+static PyObject *__pyx_n_s_StopIteration;
+static PyObject *__pyx_kp_s_This_class_cannot_be_instantiate;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_UR;
+static PyObject *__pyx_kp_s_Unsupported_value_type_in_set_op;
+static PyObject *__pyx_n_s_VALID_HEADERS;
+static PyObject *__pyx_n_s_VALID_HEADER_FIELDS;
+static PyObject *__pyx_n_s_VALID_HEADER_ORDER;
+static PyObject *__pyx_n_s_VALID_HEADER_TYPES;
+static PyObject *__pyx_n_s_VN;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_Z;
+static PyObject *__pyx_n_s_Zidf;
+static PyObject *__pyx_kp_s__14;
+static PyObject *__pyx_kp_s__3;
+static PyObject *__pyx_kp_s__4;
+static PyObject *__pyx_kp_s__41;
+static PyObject *__pyx_kp_s__47;
+static PyObject *__pyx_kp_b__6;
+static PyObject *__pyx_kp_s__76;
+static PyObject *__pyx_kp_s__79;
+static PyObject *__pyx_kp_s__80;
+static PyObject *__pyx_kp_s__9;
+static PyObject *__pyx_n_s_add_sq_text;
+static PyObject *__pyx_n_s_alignment;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_all_2;
+static PyObject *__pyx_n_s_append;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_ascii;
+static PyObject *__pyx_n_s_b;
+static PyObject *__pyx_kp_b_bai;
+static PyObject *__pyx_n_s_beg;
+static PyObject *__pyx_n_s_bin;
+static PyObject *__pyx_n_s_bqual;
+static PyObject *__pyx_n_s_buildLine;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_kp_s_c_2;
+static PyObject *__pyx_n_s_calcsize;
+static PyObject *__pyx_n_s_callback;
+static PyObject *__pyx_kp_s_callback_not_implemented_yet;
+static PyObject *__pyx_kp_s_can_not_iterate_over_samfile_wit;
+static PyObject *__pyx_kp_s_can_only_IndexReads_on_bam_files;
+static PyObject *__pyx_kp_s_can_t_guess_type_or_invalid_type;
+static PyObject *__pyx_n_s_checkIndex;
+static PyObject *__pyx_n_s_check_header;
+static PyObject *__pyx_n_s_check_sq;
+static PyObject *__pyx_n_s_chr;
+static PyObject *__pyx_n_s_cigar;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_collections;
+static PyObject *__pyx_n_s_compile;
+static PyObject *__pyx_n_s_consensus_quality;
+static PyObject *__pyx_kp_s_could_not_open_file_mode_s_is_it;
+static PyObject *__pyx_kp_s_could_not_open_file_s;
+static PyObject *__pyx_n_s_coverage;
+static PyObject *__pyx_n_s_create_string_buffer;
+static PyObject *__pyx_n_s_ctypes;
+static PyObject *__pyx_n_s_d;
+static PyObject *__pyx_kp_s_d_MIDNSHP_X;
+static PyObject *__pyx_n_s_decode;
+static PyObject *__pyx_n_s_defaultdict;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_kp_s_either_supply_options_template_h;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_end;
+static PyObject *__pyx_kp_s_end_out_of_range_i;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_kp_s_error_during_iteration;
+static PyObject *__pyx_kp_s_error_while_opening_index_s;
+static PyObject *__pyx_n_s_exc_type;
+static PyObject *__pyx_n_s_exc_value;
+static PyObject *__pyx_n_s_exists;
+static PyObject *__pyx_n_s_extend;
+static PyObject *__pyx_n_s_f;
+static PyObject *__pyx_n_s_fastafile;
+static PyObject *__pyx_n_s_fetch;
+static PyObject *__pyx_kp_s_fetch_called_for_htsfile_without;
+static PyObject *__pyx_kp_s_fetch_called_on_bamfile_without;
+static PyObject *__pyx_kp_s_fetching_by_region_is_not_availa;
+static PyObject *__pyx_n_s_fields;
+static PyObject *__pyx_kp_s_file_does_not_have_valid_header;
+static PyObject *__pyx_kp_s_file_does_not_have_valid_header_2;
+static PyObject *__pyx_kp_s_file_header_is_empty_mode_s_is_i;
+static PyObject *__pyx_kp_s_file_s_not_found;
+static PyObject *__pyx_n_s_filename;
+static PyObject *__pyx_n_s_findall;
+static PyObject *__pyx_n_s_flag;
+static PyObject *__pyx_n_s_fmts;
+static PyObject *__pyx_kp_b_ftp;
+static PyObject *__pyx_n_s_genotype;
+static PyObject *__pyx_n_s_get;
+static PyObject *__pyx_n_s_getattribute;
+static PyObject *__pyx_n_s_getdefaultencoding;
+static PyObject *__pyx_n_s_getfilesystemencoding;
+static PyObject *__pyx_n_s_gettid;
+static PyObject *__pyx_n_s_h;
+static PyObject *__pyx_n_s_hasIndex;
+static PyObject *__pyx_n_s_header;
+static PyObject *__pyx_kp_s_header_line_with_invalid_type_s;
+static PyObject *__pyx_kp_s_header_line_without_s;
+static PyObject *__pyx_kp_s_home_andreas_devel_pysam_pysam;
+static PyObject *__pyx_kp_b_http;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_kp_s_i_c;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_kp_s_incomplete_sequence_information;
+static PyObject *__pyx_n_s_indel;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_kp_s_integer_i_out_of_range_of_BAM_SA;
+static PyObject *__pyx_kp_s_invalid_coordinates_start_i_end;
+static PyObject *__pyx_kp_s_invalid_file_opening_mode_s;
+static PyObject *__pyx_kp_s_invalid_reference_s;
+static PyObject *__pyx_kp_s_invalid_type_for_record_s_s_expe;
+static PyObject *__pyx_n_s_isOpen;
+static PyObject *__pyx_n_s_is_del;
+static PyObject *__pyx_n_s_is_head;
+static PyObject *__pyx_n_s_is_tail;
+static PyObject *__pyx_n_s_isize;
+static PyObject *__pyx_n_s_islower;
+static PyObject *__pyx_n_s_isupper;
+static PyObject *__pyx_n_s_items;
+static PyObject *__pyx_n_s_itertools;
+static PyObject *__pyx_n_s_join;
+static PyObject *__pyx_n_s_l_data;
+static PyObject *__pyx_n_s_l_qname;
+static PyObject *__pyx_n_s_l_qseq;
+static PyObject *__pyx_n_s_lengths;
+static PyObject *__pyx_n_s_level;
+static PyObject *__pyx_n_s_m_data;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_kp_s_malformatted_header_no_in_field;
+static PyObject *__pyx_n_s_map;
+static PyObject *__pyx_kp_s_mapping_information_not_recorded;
+static PyObject *__pyx_n_s_mapping_quality;
+static PyObject *__pyx_n_s_mapq;
+static PyObject *__pyx_kp_s_mate_not_found;
+static PyObject *__pyx_kp_s_mate_s_is_unmapped;
+static PyObject *__pyx_n_s_max;
+static PyObject *__pyx_n_s_max_depth;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_min;
+static PyObject *__pyx_n_s_mode;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_mpos;
+static PyObject *__pyx_n_s_mrnm;
+static PyObject *__pyx_n_s_mtid;
+static PyObject *__pyx_kp_s_multiple_s_lines_are_not_permitt;
+static PyObject *__pyx_n_s_n;
+static PyObject *__pyx_n_s_n_cigar;
+static PyObject *__pyx_n_s_nextiter;
+static PyObject *__pyx_kp_s_no_index_available_for_fetch;
+static PyObject *__pyx_kp_s_no_index_available_for_iteration;
+static PyObject *__pyx_kp_s_no_index_available_for_pileup;
+static PyObject *__pyx_n_s_nreferences;
+static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_offset;
+static PyObject *__pyx_n_s_open;
+static PyObject *__pyx_n_s_ord;
+static PyObject *__pyx_n_s_os;
+static PyObject *__pyx_n_s_pack_into;
+static PyObject *__pyx_n_s_parseRegion;
+static PyObject *__pyx_n_s_path;
+static PyObject *__pyx_kp_s_pileup_of_samfiles_not_implement;
+static PyObject *__pyx_n_s_pileups;
+static PyObject *__pyx_n_s_platform;
+static PyObject *__pyx_n_s_port;
+static PyObject *__pyx_n_s_pos;
+static PyObject *__pyx_n_s_positions;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_pysam_csamfile;
+static PyObject *__pyx_n_s_pytag;
+static PyObject *__pyx_n_s_pyx_vtable;
+static PyObject *__pyx_n_s_qname;
+static PyObject *__pyx_n_s_qpos;
+static PyObject *__pyx_n_s_qseq;
+static PyObject *__pyx_n_s_qual;
+static PyObject *__pyx_kp_s_quality_and_sequence_mismatch_i;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_r;
+static PyObject *__pyx_n_s_rU;
+static PyObject *__pyx_n_s_raw;
+static PyObject *__pyx_n_s_rb;
+static PyObject *__pyx_n_s_re;
+static PyObject *__pyx_kp_s_read_s_is_unpaired;
+static PyObject *__pyx_kp_s_read_s_not_found;
+static PyObject *__pyx_n_s_record;
+static PyObject *__pyx_n_s_reference;
+static PyObject *__pyx_n_s_reference_base;
+static PyObject *__pyx_kp_s_reference_sequence_for_s_tid_i_n;
+static PyObject *__pyx_n_s_referencelengths;
+static PyObject *__pyx_n_s_referencenames;
+static PyObject *__pyx_n_s_references;
+static PyObject *__pyx_n_s_region;
+static PyObject *__pyx_n_s_reopen;
+static PyObject *__pyx_n_s_replace;
+static PyObject *__pyx_n_s_rlen;
+static PyObject *__pyx_n_s_rname;
+static PyObject *__pyx_kp_s_s;
+static PyObject *__pyx_n_s_s_2;
+static PyObject *__pyx_kp_s_s_s;
+static PyObject *__pyx_n_s_samfile;
+static PyObject *__pyx_n_s_samtools;
+static PyObject *__pyx_n_s_seek;
+static PyObject *__pyx_kp_s_seek_no_available_in_streams;
+static PyObject *__pyx_kp_s_seek_only_available_in_bam_files;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_send;
+static PyObject *__pyx_n_s_seq;
+static PyObject *__pyx_n_s_setTag;
+static PyObject *__pyx_n_s_snp_quality;
+static PyObject *__pyx_n_s_sorted;
+static PyObject *__pyx_n_s_split;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_kp_s_start_out_of_range_i;
+static PyObject *__pyx_n_s_startswith;
+static PyObject *__pyx_n_s_stepper;
+static PyObject *__pyx_n_s_str;
+static PyObject *__pyx_n_s_strip;
+static PyObject *__pyx_n_s_struct;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_tag;
+static PyObject *__pyx_kp_s_tag_s_not_present;
+static PyObject *__pyx_n_s_tags;
+static PyObject *__pyx_n_s_tempfile;
+static PyObject *__pyx_n_s_template;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_text;
+static PyObject *__pyx_n_s_throw;
+static PyObject *__pyx_n_s_tid;
+static PyObject *__pyx_kp_s_tid_i_out_of_range_0_tid_i;
+static PyObject *__pyx_n_s_traceback;
+static PyObject *__pyx_n_s_truncate;
+static PyObject *__pyx_n_s_types;
+static PyObject *__pyx_kp_s_unable_to_open_index_for_s;
+static PyObject *__pyx_kp_s_unequal_names_and_lengths_of_ref;
+static PyObject *__pyx_kp_s_unknown_auxilliary_type_s;
+static PyObject *__pyx_kp_s_unknown_field_code_s_in_record_s;
+static PyObject *__pyx_kp_s_unknown_stepper_option_s_in_Iter;
+static PyObject *__pyx_kp_s_unknown_type_s;
+static PyObject *__pyx_n_s_until_eof;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_value_type;
+static PyObject *__pyx_n_s_version_info;
+static PyObject *__pyx_n_s_w;
+static PyObject *__pyx_n_s_warn;
+static PyObject *__pyx_n_s_warnings;
+static PyObject *__pyx_n_s_wb;
+static PyObject *__pyx_n_s_wbu;
+static PyObject *__pyx_n_s_wh;
+static PyObject *__pyx_n_s_where;
+static PyObject *__pyx_n_s_write;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_2;
+static PyObject *__pyx_int_3;
+static PyObject *__pyx_int_255;
+static PyObject *__pyx_int_8000;
+static PyObject *__pyx_int_65535;
+static PyObject *__pyx_int_536870912;
+static PyObject *__pyx_int_4294967295;
+static PyObject *__pyx_int_neg_4;
+static PyObject *__pyx_int_neg_127;
+static PyObject *__pyx_int_neg_32767;
+static PyObject *__pyx_int_neg_2147483648;
+static int __pyx_k__57;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_slice__10;
+static PyObject *__pyx_slice__43;
+static PyObject *__pyx_slice__45;
+static PyObject *__pyx_slice__46;
+static PyObject *__pyx_slice__61;
+static PyObject *__pyx_slice__65;
+static PyObject *__pyx_slice__70;
+static PyObject *__pyx_slice__74;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__21;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__25;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__27;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__29;
+static PyObject *__pyx_tuple__30;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__34;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_tuple__38;
+static PyObject *__pyx_tuple__39;
+static PyObject *__pyx_tuple__40;
+static PyObject *__pyx_tuple__42;
+static PyObject *__pyx_tuple__44;
+static PyObject *__pyx_tuple__48;
+static PyObject *__pyx_tuple__49;
+static PyObject *__pyx_tuple__50;
+static PyObject *__pyx_tuple__51;
+static PyObject *__pyx_tuple__52;
+static PyObject *__pyx_tuple__53;
+static PyObject *__pyx_tuple__54;
+static PyObject *__pyx_tuple__55;
+static PyObject *__pyx_tuple__56;
+static PyObject *__pyx_tuple__58;
+static PyObject *__pyx_tuple__59;
+static PyObject *__pyx_tuple__60;
+static PyObject *__pyx_tuple__62;
+static PyObject *__pyx_tuple__63;
+static PyObject *__pyx_tuple__64;
+static PyObject *__pyx_tuple__66;
+static PyObject *__pyx_tuple__67;
+static PyObject *__pyx_tuple__68;
+static PyObject *__pyx_tuple__69;
+static PyObject *__pyx_tuple__71;
+static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__73;
+static PyObject *__pyx_tuple__75;
+static PyObject *__pyx_tuple__77;
+static PyObject *__pyx_tuple__78;
+static PyObject *__pyx_tuple__81;
+static PyObject *__pyx_tuple__82;
+static PyObject *__pyx_tuple__83;
+static PyObject *__pyx_tuple__84;
+static PyObject *__pyx_tuple__85;
+static PyObject *__pyx_tuple__87;
+static PyObject *__pyx_tuple__88;
+static PyObject *__pyx_tuple__89;
+static PyObject *__pyx_tuple__90;
+static PyObject *__pyx_tuple__91;
+static PyObject *__pyx_codeobj__86;
+static PyObject *__pyx_gb_5pysam_8csamfile_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "pysam/csamfile.pyx":105
+ * cdef char* CODE2CIGAR= "MIDNSHP=X"
+ * if IS_PYTHON3:
+ *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
+ * else:
+ *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+ */
+
+static PyObject *__pyx_pf_5pysam_8csamfile_genexpr(CYTHON_UNUSED PyObject *__pyx_self) {
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *__pyx_cur_scope;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("genexpr", 0);
+  __pyx_cur_scope = (struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *)__pyx_tp_new_5pysam_8csamfile___pyx_scope_struct__genexpr(__pyx_ptype_5pysam_8csamfile___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
+  if (unlikely(!__pyx_cur_scope)) {
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __Pyx_GOTREF(__pyx_cur_scope);
+  __Pyx_TraceCall("genexpr", __pyx_f[0], 105);
+  {
+    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_8csamfile_2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_cur_scope);
+    __Pyx_RefNannyFinishContext();
+    return (PyObject *) gen;
+  }
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pysam_8csamfile_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *)__pyx_generator->closure);
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *(*__pyx_t_4)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("None", 0);
+  switch (__pyx_generator->resume_label) {
+    case 0: goto __pyx_L3_first_run;
+    case 1: goto __pyx_L6_resume_from_yield;
+    default: /* CPython raises the right error here */
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __pyx_L3_first_run:;
+  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_t_1 = __pyx_int_0;
+  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_5pysam_8csamfile_CODE2CIGAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    {
+      __pyx_t_2 = __pyx_t_4(__pyx_t_3);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_y);
+    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_y, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
+    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_1);
+    __Pyx_GIVEREF(__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 = 105; __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_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_y);
+    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_y);
+    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_y);
+    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_x);
+    PyList_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_x);
+    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_x);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    __Pyx_XGIVEREF(__pyx_t_1);
+    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
+    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
+    __Pyx_XGIVEREF(__pyx_r);
+    __Pyx_RefNannyFinishContext();
+    /* return from generator, yielding value */
+    __pyx_generator->resume_label = 1;
+    return __pyx_r;
+    __pyx_L6_resume_from_yield:;
+    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+    __pyx_cur_scope->__pyx_t_0 = 0;
+    __Pyx_XGOTREF(__pyx_t_1);
+    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
+    __pyx_cur_scope->__pyx_t_1 = 0;
+    __Pyx_XGOTREF(__pyx_t_3);
+    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
+    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* function exit code */
+  PyErr_SetNone(PyExc_StopIteration);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_generator->resume_label = -1;
+  __Pyx_Generator_clear((PyObject*)__pyx_generator);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+}
+static PyObject *__pyx_gb_5pysam_8csamfile_5generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "pysam/csamfile.pyx":107
+ *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
+ * else:
+ *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
+ * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
+ * 
+ */
+
+static PyObject *__pyx_pf_5pysam_8csamfile_3genexpr(CYTHON_UNUSED PyObject *__pyx_self) {
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("genexpr", 0);
+  __pyx_cur_scope = (struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *)__pyx_tp_new_5pysam_8csamfile___pyx_scope_struct_1_genexpr(__pyx_ptype_5pysam_8csamfile___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
+  if (unlikely(!__pyx_cur_scope)) {
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __Pyx_GOTREF(__pyx_cur_scope);
+  __Pyx_TraceCall("genexpr", __pyx_f[0], 107);
+  {
+    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_8csamfile_5generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_cur_scope);
+    __Pyx_RefNannyFinishContext();
+    return (PyObject *) gen;
+  }
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pysam_8csamfile_5generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *(*__pyx_t_4)(PyObject *);
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("None", 0);
+  switch (__pyx_generator->resume_label) {
+    case 0: goto __pyx_L3_first_run;
+    case 1: goto __pyx_L6_resume_from_yield;
+    default: /* CPython raises the right error here */
+    __Pyx_RefNannyFinishContext();
+    return NULL;
+  }
+  __pyx_L3_first_run:;
+  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_t_1 = __pyx_int_0;
+  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_5pysam_8csamfile_CODE2CIGAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    {
+      __pyx_t_2 = __pyx_t_4(__pyx_t_3);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_y);
+    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_y, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
+    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_1);
+    __Pyx_GIVEREF(__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 = 107; __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_y);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_y);
+    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_y);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __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(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_x);
+    PyList_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_x);
+    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_x);
+    __pyx_t_5 = 0;
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    __Pyx_XGIVEREF(__pyx_t_1);
+    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
+    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
+    __Pyx_XGIVEREF(__pyx_r);
+    __Pyx_RefNannyFinishContext();
+    /* return from generator, yielding value */
+    __pyx_generator->resume_label = 1;
+    return __pyx_r;
+    __pyx_L6_resume_from_yield:;
+    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+    __pyx_cur_scope->__pyx_t_0 = 0;
+    __Pyx_XGOTREF(__pyx_t_1);
+    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
+    __pyx_cur_scope->__pyx_t_1 = 0;
+    __Pyx_XGOTREF(__pyx_t_3);
+    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
+    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* function exit code */
+  PyErr_SetNone(PyExc_StopIteration);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_generator->resume_label = -1;
+  __Pyx_Generator_clear((PyObject*)__pyx_generator);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+}
+
+/* "pysam/csamfile.pyx":28
+ * ########################################################################
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+ * cdef from_string_and_size(char* s, size_t length):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s[:length]
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile_from_string_and_size(char *__pyx_v_s, size_t __pyx_v_length) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("from_string_and_size", 0);
+  __Pyx_TraceCall("from_string_and_size", __pyx_f[0], 28);
+
+  /* "pysam/csamfile.pyx":29
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+ * cdef from_string_and_size(char* s, size_t length):
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s[:length]
+ *     else:
+ */
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":30
+ * cdef from_string_and_size(char* s, size_t length):
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s[:length]             # <<<<<<<<<<<<<<
+ *     else:
+ *         return s[:length].decode("ascii")
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":32
+ *         return s[:length]
+ *     else:
+ *         return s[:length].decode("ascii")             # <<<<<<<<<<<<<<
+ * 
+ * # filename encoding (copied from lxml.etree.pyx)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_s, 0, __pyx_v_length, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":28
+ * ########################################################################
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+ * cdef from_string_and_size(char* s, size_t length):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s[:length]
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.from_string_and_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":45
+ * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+ * 
+ * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile__encodeFilename(PyObject *__pyx_v_filename) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_encodeFilename", 0);
+  __Pyx_TraceCall("_encodeFilename", __pyx_f[0], 45);
+
+  /* "pysam/csamfile.pyx":47
+ * cdef bytes _encodeFilename(object filename):
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:             # <<<<<<<<<<<<<<
+ *         return None
+ *     elif PyBytes_Check(filename):
+ */
+  __pyx_t_1 = (__pyx_v_filename == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":48
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ *         return None             # <<<<<<<<<<<<<<
+ *     elif PyBytes_Check(filename):
+ *         return filename
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = ((PyObject*)Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":49
+ *     if filename is None:
+ *         return None
+ *     elif PyBytes_Check(filename):             # <<<<<<<<<<<<<<
+ *         return filename
+ *     elif PyUnicode_Check(filename):
+ */
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":50
+ *         return None
+ *     elif PyBytes_Check(filename):
+ *         return filename             # <<<<<<<<<<<<<<
+ *     elif PyUnicode_Check(filename):
+ *         return filename.encode(_FILENAME_ENCODING)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_filename);
+    __pyx_r = ((PyObject*)__pyx_v_filename);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":51
+ *     elif PyBytes_Check(filename):
+ *         return filename
+ *     elif PyUnicode_Check(filename):             # <<<<<<<<<<<<<<
+ *         return filename.encode(_FILENAME_ENCODING)
+ *     else:
+ */
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":52
+ *         return filename
+ *     elif PyUnicode_Check(filename):
+ *         return filename.encode(_FILENAME_ENCODING)             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string or unicode."
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_5pysam_8csamfile__FILENAME_ENCODING);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_5pysam_8csamfile__FILENAME_ENCODING);
+    __Pyx_GIVEREF(__pyx_v_5pysam_8csamfile__FILENAME_ENCODING);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_5);
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":54
+ *         return filename.encode(_FILENAME_ENCODING)
+ *     else:
+ *         raise TypeError, u"Argument must be string or unicode."             # <<<<<<<<<<<<<<
+ * 
+ * cdef bytes _forceBytes(object s):
+ */
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_or_unico, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":45
+ * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+ * 
+ * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ *     """Make sure a filename is 8-bit encoded (or None)."""
+ *     if filename is None:
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.csamfile._encodeFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":56
+ *         raise TypeError, u"Argument must be string or unicode."
+ * 
+ * cdef bytes _forceBytes(object s):             # <<<<<<<<<<<<<<
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile__forceBytes(PyObject *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_forceBytes", 0);
+  __Pyx_TraceCall("_forceBytes", __pyx_f[0], 56);
+
+  /* "pysam/csamfile.pyx":59
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s
+ *     elif s is None:
+ */
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":60
+ *     """
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s             # <<<<<<<<<<<<<<
+ *     elif s is None:
+ *         return None
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = ((PyObject*)__pyx_v_s);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":61
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ *     elif s is None:             # <<<<<<<<<<<<<<
+ *         return None
+ *     elif PyBytes_Check(s):
+ */
+  __pyx_t_1 = (__pyx_v_s == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":62
+ *         return s
+ *     elif s is None:
+ *         return None             # <<<<<<<<<<<<<<
+ *     elif PyBytes_Check(s):
+ *         return s
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = ((PyObject*)Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":63
+ *     elif s is None:
+ *         return None
+ *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
+ *         return s
+ *     elif PyUnicode_Check(s):
+ */
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":64
+ *         return None
+ *     elif PyBytes_Check(s):
+ *         return s             # <<<<<<<<<<<<<<
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = ((PyObject*)__pyx_v_s);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":65
+ *     elif PyBytes_Check(s):
+ *         return s
+ *     elif PyUnicode_Check(s):             # <<<<<<<<<<<<<<
+ *         return s.encode('ascii')
+ *     else:
+ */
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":66
+ *         return s
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":68
+ *         return s.encode('ascii')
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):
+ */
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_bytes_or, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":56
+ *         raise TypeError, u"Argument must be string or unicode."
+ * 
+ * cdef bytes _forceBytes(object s):             # <<<<<<<<<<<<<<
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile._forceBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":70
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):             # <<<<<<<<<<<<<<
+ *     return _forceBytes(s)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_8csamfile__forceCmdlineBytes(PyObject *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_forceCmdlineBytes", 0);
+  __Pyx_TraceCall("_forceCmdlineBytes", __pyx_f[0], 70);
+
+  /* "pysam/csamfile.pyx":71
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):
+ *     return _forceBytes(s)             # <<<<<<<<<<<<<<
+ * 
+ * cdef _charptr_to_str(char* s):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_s); 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_r = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":70
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):             # <<<<<<<<<<<<<<
+ *     return _forceBytes(s)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile._forceCmdlineBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":73
+ *     return _forceBytes(s)
+ * 
+ * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile__charptr_to_str(char *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_charptr_to_str", 0);
+  __Pyx_TraceCall("_charptr_to_str", __pyx_f[0], 73);
+
+  /* "pysam/csamfile.pyx":74
+ * 
+ * cdef _charptr_to_str(char* s):
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s
+ *     else:
+ */
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":75
+ * cdef _charptr_to_str(char* s):
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s             # <<<<<<<<<<<<<<
+ *     else:
+ *         return s.decode("ascii")
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":77
+ *         return s
+ *     else:
+ *         return s.decode("ascii")             # <<<<<<<<<<<<<<
+ * 
+ * cdef _forceStr(object s):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_s, 0, strlen(__pyx_v_s), NULL, NULL, PyUnicode_DecodeASCII); 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_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":73
+ *     return _forceBytes(s)
+ * 
+ * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile._charptr_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":79
+ *         return s.decode("ascii")
+ * 
+ * cdef _forceStr(object s):             # <<<<<<<<<<<<<<
+ *     """Return s converted to str type of current Python
+ *     (bytes in Py2, unicode in Py3)"""
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile__forceStr(PyObject *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_forceStr", 0);
+  __Pyx_TraceCall("_forceStr", __pyx_f[0], 79);
+
+  /* "pysam/csamfile.pyx":82
+ *     """Return s converted to str type of current Python
+ *     (bytes in Py2, unicode in Py3)"""
+ *     if s is None:             # <<<<<<<<<<<<<<
+ *         return None
+ *     if PY_MAJOR_VERSION < 3:
+ */
+  __pyx_t_1 = (__pyx_v_s == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":83
+ *     (bytes in Py2, unicode in Py3)"""
+ *     if s is None:
+ *         return None             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":84
+ *     if s is None:
+ *         return None
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s
+ *     elif PyBytes_Check(s):
+ */
+  __pyx_t_2 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":85
+ *         return None
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s             # <<<<<<<<<<<<<<
+ *     elif PyBytes_Check(s):
+ *         return s.decode('ascii')
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = __pyx_v_s;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":86
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
+ *         return s.decode('ascii')
+ *     else:
+ */
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":87
+ *         return s
+ *     elif PyBytes_Check(s):
+ *         return s.decode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         # assume unicode
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":90
+ *     else:
+ *         # assume unicode
+ *         return s             # <<<<<<<<<<<<<<
+ * 
+ * ########################################################################
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = __pyx_v_s;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":79
+ *         return s.decode("ascii")
+ * 
+ * cdef _forceStr(object s):             # <<<<<<<<<<<<<<
+ *     """Return s converted to str type of current Python
+ *     (bytes in Py2, unicode in Py3)"""
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile._forceStr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":120
+ * #####################################################################
+ * cdef class AlignedRead
+ * cdef makeAlignedRead(bam1_t * src):             # <<<<<<<<<<<<<<
+ *     '''enter src into AlignedRead.'''
+ *     # note that the following does not call __init__
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile_makeAlignedRead(bam1_t *__pyx_v_src) {
+  struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_dest = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("makeAlignedRead", 0);
+  __Pyx_TraceCall("makeAlignedRead", __pyx_f[0], 120);
+
+  /* "pysam/csamfile.pyx":123
+ *     '''enter src into AlignedRead.'''
+ *     # note that the following does not call __init__
+ *     cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)             # <<<<<<<<<<<<<<
+ *     dest._delegate = bam_dup1(src)
+ *     return dest
+ */
+  __pyx_t_1 = __pyx_tp_new_5pysam_8csamfile_AlignedRead(((PyTypeObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_AlignedRead)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_8csamfile_AlignedRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_dest = ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":124
+ *     # note that the following does not call __init__
+ *     cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
+ *     dest._delegate = bam_dup1(src)             # <<<<<<<<<<<<<<
+ *     return dest
+ * 
+ */
+  __pyx_v_dest->_delegate = bam_dup1(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":125
+ *     cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
+ *     dest._delegate = bam_dup1(src)
+ *     return dest             # <<<<<<<<<<<<<<
+ * 
+ * cdef class PileupProxy
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
+  __pyx_r = ((PyObject *)__pyx_v_dest);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":120
+ * #####################################################################
+ * cdef class AlignedRead
+ * cdef makeAlignedRead(bam1_t * src):             # <<<<<<<<<<<<<<
+ *     '''enter src into AlignedRead.'''
+ *     # note that the following does not call __init__
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.makeAlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":128
+ * 
+ * cdef class PileupProxy
+ * cdef makePileupProxy(bam_pileup1_t ** plp, int tid, int pos, int n):             # <<<<<<<<<<<<<<
+ *     # note that the following does not call __init__
+ *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile_makePileupProxy(bam_pileup1_t **__pyx_v_plp, int __pyx_v_tid, int __pyx_v_pos, int __pyx_v_n) {
+  struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_dest = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("makePileupProxy", 0);
+  __Pyx_TraceCall("makePileupProxy", __pyx_f[0], 128);
+
+  /* "pysam/csamfile.pyx":130
+ * cdef makePileupProxy(bam_pileup1_t ** plp, int tid, int pos, int n):
+ *     # note that the following does not call __init__
+ *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)             # <<<<<<<<<<<<<<
+ *      dest.plp = plp
+ *      dest.tid = tid
+ */
+  __pyx_t_1 = __pyx_tp_new_5pysam_8csamfile_PileupProxy(((PyTypeObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_PileupProxy)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_8csamfile_PileupProxy)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_dest = ((struct __pyx_obj_5pysam_8csamfile_PileupProxy *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":131
+ *     # note that the following does not call __init__
+ *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
+ *      dest.plp = plp             # <<<<<<<<<<<<<<
+ *      dest.tid = tid
+ *      dest.pos = pos
+ */
+  __pyx_v_dest->plp = __pyx_v_plp;
+
+  /* "pysam/csamfile.pyx":132
+ *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
+ *      dest.plp = plp
+ *      dest.tid = tid             # <<<<<<<<<<<<<<
+ *      dest.pos = pos
+ *      dest.n = n
+ */
+  __pyx_v_dest->tid = __pyx_v_tid;
+
+  /* "pysam/csamfile.pyx":133
+ *      dest.plp = plp
+ *      dest.tid = tid
+ *      dest.pos = pos             # <<<<<<<<<<<<<<
+ *      dest.n = n
+ *      return dest
+ */
+  __pyx_v_dest->pos = __pyx_v_pos;
+
+  /* "pysam/csamfile.pyx":134
+ *      dest.tid = tid
+ *      dest.pos = pos
+ *      dest.n = n             # <<<<<<<<<<<<<<
+ *      return dest
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_dest), __pyx_n_s_n, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":135
+ *      dest.pos = pos
+ *      dest.n = n
+ *      return dest             # <<<<<<<<<<<<<<
+ * 
+ * cdef class PileupRead
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
+  __pyx_r = ((PyObject *)__pyx_v_dest);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":128
+ * 
+ * cdef class PileupProxy
+ * cdef makePileupProxy(bam_pileup1_t ** plp, int tid, int pos, int n):             # <<<<<<<<<<<<<<
+ *     # note that the following does not call __init__
+ *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.makePileupProxy", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":138
+ * 
+ * cdef class PileupRead
+ * cdef makePileupRead( bam_pileup1_t * src ):             # <<<<<<<<<<<<<<
+ *     '''fill a  PileupRead object from a bam_pileup1_t * object.'''
+ *     cdef PileupRead dest = PileupRead.__new__(PileupRead)
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile_makePileupRead(bam_pileup1_t *__pyx_v_src) {
+  struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_dest = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int32_t __pyx_t_2;
+  int __pyx_t_3;
+  uint32_t __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("makePileupRead", 0);
+  __Pyx_TraceCall("makePileupRead", __pyx_f[0], 138);
+
+  /* "pysam/csamfile.pyx":140
+ * cdef makePileupRead( bam_pileup1_t * src ):
+ *     '''fill a  PileupRead object from a bam_pileup1_t * object.'''
+ *     cdef PileupRead dest = PileupRead.__new__(PileupRead)             # <<<<<<<<<<<<<<
+ *     dest._alignment = makeAlignedRead( src.b )
+ *     dest._qpos = src.qpos
+ */
+  __pyx_t_1 = __pyx_tp_new_5pysam_8csamfile_PileupRead(((PyTypeObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_PileupRead)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_8csamfile_PileupRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_dest = ((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":141
+ *     '''fill a  PileupRead object from a bam_pileup1_t * object.'''
+ *     cdef PileupRead dest = PileupRead.__new__(PileupRead)
+ *     dest._alignment = makeAlignedRead( src.b )             # <<<<<<<<<<<<<<
+ *     dest._qpos = src.qpos
+ *     dest._indel = src.indel
+ */
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile_makeAlignedRead(__pyx_v_src->b); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_8csamfile_AlignedRead))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_dest->_alignment);
+  __Pyx_DECREF(((PyObject *)__pyx_v_dest->_alignment));
+  __pyx_v_dest->_alignment = ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":142
+ *     cdef PileupRead dest = PileupRead.__new__(PileupRead)
+ *     dest._alignment = makeAlignedRead( src.b )
+ *     dest._qpos = src.qpos             # <<<<<<<<<<<<<<
+ *     dest._indel = src.indel
+ *     dest._level = src.level
+ */
+  __pyx_t_2 = __pyx_v_src->qpos;
+  __pyx_v_dest->_qpos = __pyx_t_2;
+
+  /* "pysam/csamfile.pyx":143
+ *     dest._alignment = makeAlignedRead( src.b )
+ *     dest._qpos = src.qpos
+ *     dest._indel = src.indel             # <<<<<<<<<<<<<<
+ *     dest._level = src.level
+ *     dest._is_del = src.is_del
+ */
+  __pyx_t_3 = __pyx_v_src->indel;
+  __pyx_v_dest->_indel = __pyx_t_3;
+
+  /* "pysam/csamfile.pyx":144
+ *     dest._qpos = src.qpos
+ *     dest._indel = src.indel
+ *     dest._level = src.level             # <<<<<<<<<<<<<<
+ *     dest._is_del = src.is_del
+ *     dest._is_head = src.is_head
+ */
+  __pyx_t_3 = __pyx_v_src->level;
+  __pyx_v_dest->_level = __pyx_t_3;
+
+  /* "pysam/csamfile.pyx":145
+ *     dest._indel = src.indel
+ *     dest._level = src.level
+ *     dest._is_del = src.is_del             # <<<<<<<<<<<<<<
+ *     dest._is_head = src.is_head
+ *     dest._is_tail = src.is_tail
+ */
+  __pyx_t_4 = __pyx_v_src->is_del;
+  __pyx_v_dest->_is_del = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":146
+ *     dest._level = src.level
+ *     dest._is_del = src.is_del
+ *     dest._is_head = src.is_head             # <<<<<<<<<<<<<<
+ *     dest._is_tail = src.is_tail
+ *     return dest
+ */
+  __pyx_t_4 = __pyx_v_src->is_head;
+  __pyx_v_dest->_is_head = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":147
+ *     dest._is_del = src.is_del
+ *     dest._is_head = src.is_head
+ *     dest._is_tail = src.is_tail             # <<<<<<<<<<<<<<
+ *     return dest
+ * 
+ */
+  __pyx_t_4 = __pyx_v_src->is_tail;
+  __pyx_v_dest->_is_tail = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":148
+ *     dest._is_head = src.is_head
+ *     dest._is_tail = src.is_tail
+ *     return dest             # <<<<<<<<<<<<<<
+ * 
+ * cdef convertBinaryTagToList( uint8_t * s ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
+  __pyx_r = ((PyObject *)__pyx_v_dest);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":138
+ * 
+ * cdef class PileupRead
+ * cdef makePileupRead( bam_pileup1_t * src ):             # <<<<<<<<<<<<<<
+ *     '''fill a  PileupRead object from a bam_pileup1_t * object.'''
+ *     cdef PileupRead dest = PileupRead.__new__(PileupRead)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.makePileupRead", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":150
+ *     return dest
+ * 
+ * cdef convertBinaryTagToList( uint8_t * s ):             # <<<<<<<<<<<<<<
+ *     """return bytesize, number of values list of values in s."""
+ *     cdef char auxtype
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile_convertBinaryTagToList(uint8_t *__pyx_v_s) {
+  char __pyx_v_auxtype;
+  uint8_t __pyx_v_byte_size;
+  int32_t __pyx_v_nvalues;
+  PyObject *__pyx_v_values = NULL;
+  CYTHON_UNUSED long __pyx_v_x;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int32_t __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("convertBinaryTagToList", 0);
+  __Pyx_TraceCall("convertBinaryTagToList", __pyx_f[0], 150);
+
+  /* "pysam/csamfile.pyx":157
+ * 
+ *     # get byte size
+ *     auxtype = s[0]             # <<<<<<<<<<<<<<
+ *     byte_size = aux_type2size( auxtype )
+ *     s += 1
+ */
+  __pyx_v_auxtype = (__pyx_v_s[0]);
+
+  /* "pysam/csamfile.pyx":158
+ *     # get byte size
+ *     auxtype = s[0]
+ *     byte_size = aux_type2size( auxtype )             # <<<<<<<<<<<<<<
+ *     s += 1
+ *     # get number of values in array
+ */
+  __pyx_v_byte_size = aux_type2size(__pyx_v_auxtype);
+
+  /* "pysam/csamfile.pyx":159
+ *     auxtype = s[0]
+ *     byte_size = aux_type2size( auxtype )
+ *     s += 1             # <<<<<<<<<<<<<<
+ *     # get number of values in array
+ *     nvalues = (<int32_t*>s)[0]
+ */
+  __pyx_v_s = (__pyx_v_s + 1);
+
+  /* "pysam/csamfile.pyx":161
+ *     s += 1
+ *     # get number of values in array
+ *     nvalues = (<int32_t*>s)[0]             # <<<<<<<<<<<<<<
+ *     s += 4
+ *     # get values
+ */
+  __pyx_v_nvalues = (((int32_t *)__pyx_v_s)[0]);
+
+  /* "pysam/csamfile.pyx":162
+ *     # get number of values in array
+ *     nvalues = (<int32_t*>s)[0]
+ *     s += 4             # <<<<<<<<<<<<<<
+ *     # get values
+ *     values = []
+ */
+  __pyx_v_s = (__pyx_v_s + 4);
+
+  /* "pysam/csamfile.pyx":164
+ *     s += 4
+ *     # get values
+ *     values = []             # <<<<<<<<<<<<<<
+ *     if auxtype == 'c':
+ *         for x from 0 <= x < nvalues:
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_values = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":189
+ *             values.append((<uint32_t*>s)[0])
+ *             s += 4
+ *     elif auxtype == 'f':             # <<<<<<<<<<<<<<
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<float*>s)[0])
+ */
+  switch (__pyx_v_auxtype) {
+
+    /* "pysam/csamfile.pyx":165
+ *     # get values
+ *     values = []
+ *     if auxtype == 'c':             # <<<<<<<<<<<<<<
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int8_t*>s)[0])
+ */
+    case 'c':
+
+    /* "pysam/csamfile.pyx":166
+ *     values = []
+ *     if auxtype == 'c':
+ *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
+ *             values.append((<int8_t*>s)[0])
+ *             s += 1
+ */
+    __pyx_t_2 = __pyx_v_nvalues;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+
+      /* "pysam/csamfile.pyx":167
+ *     if auxtype == 'c':
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int8_t*>s)[0])             # <<<<<<<<<<<<<<
+ *             s += 1
+ *     elif auxtype == 'C':
+ */
+      __pyx_t_1 = __Pyx_PyInt_From_int8_t((((int8_t *)__pyx_v_s)[0])); 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_t_3 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":168
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int8_t*>s)[0])
+ *             s += 1             # <<<<<<<<<<<<<<
+ *     elif auxtype == 'C':
+ *         for x from 0 <= x < nvalues:
+ */
+      __pyx_v_s = (__pyx_v_s + 1);
+    }
+    break;
+
+    /* "pysam/csamfile.pyx":169
+ *             values.append((<int8_t*>s)[0])
+ *             s += 1
+ *     elif auxtype == 'C':             # <<<<<<<<<<<<<<
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint8_t*>s)[0])
+ */
+    case 'C':
+
+    /* "pysam/csamfile.pyx":170
+ *             s += 1
+ *     elif auxtype == 'C':
+ *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
+ *             values.append((<uint8_t*>s)[0])
+ *             s += 1
+ */
+    __pyx_t_2 = __pyx_v_nvalues;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+
+      /* "pysam/csamfile.pyx":171
+ *     elif auxtype == 'C':
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint8_t*>s)[0])             # <<<<<<<<<<<<<<
+ *             s += 1
+ *     elif auxtype == 's':
+ */
+      __pyx_t_1 = __Pyx_PyInt_From_uint8_t((((uint8_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":172
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint8_t*>s)[0])
+ *             s += 1             # <<<<<<<<<<<<<<
+ *     elif auxtype == 's':
+ *         for x from 0 <= x < nvalues:
+ */
+      __pyx_v_s = (__pyx_v_s + 1);
+    }
+    break;
+
+    /* "pysam/csamfile.pyx":173
+ *             values.append((<uint8_t*>s)[0])
+ *             s += 1
+ *     elif auxtype == 's':             # <<<<<<<<<<<<<<
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int16_t*>s)[0])
+ */
+    case 's':
+
+    /* "pysam/csamfile.pyx":174
+ *             s += 1
+ *     elif auxtype == 's':
+ *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
+ *             values.append((<int16_t*>s)[0])
+ *             s += 2
+ */
+    __pyx_t_2 = __pyx_v_nvalues;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+
+      /* "pysam/csamfile.pyx":175
+ *     elif auxtype == 's':
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int16_t*>s)[0])             # <<<<<<<<<<<<<<
+ *             s += 2
+ *     elif auxtype == 'S':
+ */
+      __pyx_t_1 = __Pyx_PyInt_From_int16_t((((int16_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":176
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int16_t*>s)[0])
+ *             s += 2             # <<<<<<<<<<<<<<
+ *     elif auxtype == 'S':
+ *         for x from 0 <= x < nvalues:
+ */
+      __pyx_v_s = (__pyx_v_s + 2);
+    }
+    break;
+
+    /* "pysam/csamfile.pyx":177
+ *             values.append((<int16_t*>s)[0])
+ *             s += 2
+ *     elif auxtype == 'S':             # <<<<<<<<<<<<<<
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint16_t*>s)[0])
+ */
+    case 'S':
+
+    /* "pysam/csamfile.pyx":178
+ *             s += 2
+ *     elif auxtype == 'S':
+ *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
+ *             values.append((<uint16_t*>s)[0])
+ *             s += 2
+ */
+    __pyx_t_2 = __pyx_v_nvalues;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+
+      /* "pysam/csamfile.pyx":179
+ *     elif auxtype == 'S':
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint16_t*>s)[0])             # <<<<<<<<<<<<<<
+ *             s += 2
+ *     elif auxtype == 'i':
+ */
+      __pyx_t_1 = __Pyx_PyInt_From_uint16_t((((uint16_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":180
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint16_t*>s)[0])
+ *             s += 2             # <<<<<<<<<<<<<<
+ *     elif auxtype == 'i':
+ *         for x from 0 <= x < nvalues:
+ */
+      __pyx_v_s = (__pyx_v_s + 2);
+    }
+    break;
+
+    /* "pysam/csamfile.pyx":181
+ *             values.append((<uint16_t*>s)[0])
+ *             s += 2
+ *     elif auxtype == 'i':             # <<<<<<<<<<<<<<
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int32_t*>s)[0])
+ */
+    case 'i':
+
+    /* "pysam/csamfile.pyx":182
+ *             s += 2
+ *     elif auxtype == 'i':
+ *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
+ *             values.append((<int32_t*>s)[0])
+ *             s += 4
+ */
+    __pyx_t_2 = __pyx_v_nvalues;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+
+      /* "pysam/csamfile.pyx":183
+ *     elif auxtype == 'i':
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int32_t*>s)[0])             # <<<<<<<<<<<<<<
+ *             s += 4
+ *     elif auxtype == 'I':
+ */
+      __pyx_t_1 = __Pyx_PyInt_From_int32_t((((int32_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":184
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<int32_t*>s)[0])
+ *             s += 4             # <<<<<<<<<<<<<<
+ *     elif auxtype == 'I':
+ *         for x from 0 <= x < nvalues:
+ */
+      __pyx_v_s = (__pyx_v_s + 4);
+    }
+    break;
+
+    /* "pysam/csamfile.pyx":185
+ *             values.append((<int32_t*>s)[0])
+ *             s += 4
+ *     elif auxtype == 'I':             # <<<<<<<<<<<<<<
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint32_t*>s)[0])
+ */
+    case 'I':
+
+    /* "pysam/csamfile.pyx":186
+ *             s += 4
+ *     elif auxtype == 'I':
+ *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
+ *             values.append((<uint32_t*>s)[0])
+ *             s += 4
+ */
+    __pyx_t_2 = __pyx_v_nvalues;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+
+      /* "pysam/csamfile.pyx":187
+ *     elif auxtype == 'I':
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint32_t*>s)[0])             # <<<<<<<<<<<<<<
+ *             s += 4
+ *     elif auxtype == 'f':
+ */
+      __pyx_t_1 = __Pyx_PyInt_From_uint32_t((((uint32_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":188
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<uint32_t*>s)[0])
+ *             s += 4             # <<<<<<<<<<<<<<
+ *     elif auxtype == 'f':
+ *         for x from 0 <= x < nvalues:
+ */
+      __pyx_v_s = (__pyx_v_s + 4);
+    }
+    break;
+
+    /* "pysam/csamfile.pyx":189
+ *             values.append((<uint32_t*>s)[0])
+ *             s += 4
+ *     elif auxtype == 'f':             # <<<<<<<<<<<<<<
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<float*>s)[0])
+ */
+    case 'f':
+
+    /* "pysam/csamfile.pyx":190
+ *             s += 4
+ *     elif auxtype == 'f':
+ *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
+ *             values.append((<float*>s)[0])
+ *             s += 4
+ */
+    __pyx_t_2 = __pyx_v_nvalues;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+
+      /* "pysam/csamfile.pyx":191
+ *     elif auxtype == 'f':
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<float*>s)[0])             # <<<<<<<<<<<<<<
+ *             s += 4
+ * 
+ */
+      __pyx_t_1 = PyFloat_FromDouble((((float *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":192
+ *         for x from 0 <= x < nvalues:
+ *             values.append((<float*>s)[0])
+ *             s += 4             # <<<<<<<<<<<<<<
+ * 
+ *     return byte_size, nvalues, values
+ */
+      __pyx_v_s = (__pyx_v_s + 4);
+    }
+    break;
+    default: break;
+  }
+
+  /* "pysam/csamfile.pyx":194
+ *             s += 4
+ * 
+ *     return byte_size, nvalues, values             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_uint8_t(__pyx_v_byte_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_nvalues); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_v_values);
+  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_values);
+  __Pyx_GIVEREF(__pyx_v_values);
+  __pyx_t_1 = 0;
+  __pyx_t_4 = 0;
+  __pyx_r = __pyx_t_5;
+  __pyx_t_5 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":150
+ *     return dest
+ * 
+ * cdef convertBinaryTagToList( uint8_t * s ):             # <<<<<<<<<<<<<<
+ *     """return bytesize, number of values list of values in s."""
+ *     cdef char auxtype
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.csamfile.convertBinaryTagToList", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_values);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":210
+ *         list of reads (:class:`pysam.PileupRead`) aligned to this column
+ *     '''
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" + "\n".join( map(str, self.pileups) )
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_12PileupColumn_1__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_12PileupColumn___str__[] = "PileupColumn.__str__(self)";
+static PyMethodDef __pyx_mdef_5pysam_8csamfile_12PileupColumn_1__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_12PileupColumn_1__str__, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_12PileupColumn___str__)};
+static PyObject *__pyx_pw_5pysam_8csamfile_12PileupColumn_1__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_12PileupColumn___str__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_12PileupColumn___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__str__", 0);
+  __Pyx_TraceCall("__str__", __pyx_f[0], 210);
+
+  /* "pysam/csamfile.pyx":211
+ *     '''
+ *     def __str__(self):
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\             # <<<<<<<<<<<<<<
+ *             "\n" + "\n".join( map(str, self.pileups) )
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tid); if (unlikely(!__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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos); 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __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 = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_1 = 0;
+  __pyx_t_2 = 0;
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__4); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":212
+ *     def __str__(self):
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" + "\n".join( map(str, self.pileups) )             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pileups); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __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 = 212; __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))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __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_PyString_Join(__pyx_kp_s__4, __pyx_t_3); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __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_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":210
+ *         list of reads (:class:`pysam.PileupRead`) aligned to this column
+ *     '''
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" + "\n".join( map(str, self.pileups) )
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.PileupColumn.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":309
+ *     '''
+ * 
+ *     def __cinit__(self, *args, **kwargs ):             # <<<<<<<<<<<<<<
+ *         self.htsfile = NULL
+ *         self._filename = None
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_7Samfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_7Samfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_args = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
+  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
+  if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  __Pyx_INCREF(__pyx_args);
+  __pyx_v_args = __pyx_args;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile___cinit__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_args);
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_7Samfile___cinit__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_TraceCall("__cinit__", __pyx_f[0], 309);
+
+  /* "pysam/csamfile.pyx":310
+ * 
+ *     def __cinit__(self, *args, **kwargs ):
+ *         self.htsfile = NULL             # <<<<<<<<<<<<<<
+ *         self._filename = None
+ *         self.isbam = False
+ */
+  __pyx_v_self->htsfile = NULL;
+
+  /* "pysam/csamfile.pyx":311
+ *     def __cinit__(self, *args, **kwargs ):
+ *         self.htsfile = NULL
+ *         self._filename = None             # <<<<<<<<<<<<<<
+ *         self.isbam = False
+ *         self.isstream = False
+ */
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_filename);
+  __Pyx_DECREF(__pyx_v_self->_filename);
+  __pyx_v_self->_filename = Py_None;
+
+  /* "pysam/csamfile.pyx":312
+ *         self.htsfile = NULL
+ *         self._filename = None
+ *         self.isbam = False             # <<<<<<<<<<<<<<
+ *         self.isstream = False
+ *         self._open(*args, **kwargs)
+ */
+  __pyx_v_self->isbam = 0;
+
+  /* "pysam/csamfile.pyx":313
+ *         self._filename = None
+ *         self.isbam = False
+ *         self.isstream = False             # <<<<<<<<<<<<<<
+ *         self._open(*args, **kwargs)
+ * 
+ */
+  __pyx_v_self->isstream = 0;
+
+  /* "pysam/csamfile.pyx":314
+ *         self.isbam = False
+ *         self.isstream = False
+ *         self._open(*args, **kwargs)             # <<<<<<<<<<<<<<
+ * 
+ *         # allocate memory for iterator
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PySequence_Tuple(__pyx_v_args); 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_t_3 = __pyx_v_kwargs;
+  __Pyx_INCREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); 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_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":317
+ * 
+ *         # allocate memory for iterator
+ *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))             # <<<<<<<<<<<<<<
+ * 
+ *     def _isOpen( self ):
+ */
+  __pyx_v_self->b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
+
+  /* "pysam/csamfile.pyx":309
+ *     '''
+ * 
+ *     def __cinit__(self, *args, **kwargs ):             # <<<<<<<<<<<<<<
+ *         self.htsfile = NULL
+ *         self._filename = None
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":319
+ *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
+ * 
+ *     def _isOpen( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if htsfile has been opened.'''
+ *         return self.htsfile != NULL
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_2_isOpen[] = "Samfile._isOpen(self)\nreturn true if htsfile has been opened.";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_2_isOpen(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_2_isOpen(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_isOpen", 0);
+  __Pyx_TraceCall("_isOpen", __pyx_f[0], 319);
+
+  /* "pysam/csamfile.pyx":321
+ *     def _isOpen( self ):
+ *         '''return true if htsfile has been opened.'''
+ *         return self.htsfile != NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def _hasIndex( self ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->htsfile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":319
+ *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
+ * 
+ *     def _isOpen( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if htsfile has been opened.'''
+ *         return self.htsfile != NULL
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":323
+ *         return self.htsfile != NULL
+ * 
+ *     def _hasIndex( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if htsfile has an existing (and opened) index.'''
+ *         return self.index != NULL
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_5_hasIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_4_hasIndex[] = "Samfile._hasIndex(self)\nreturn true if htsfile has an existing (and opened) index.";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_5_hasIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_hasIndex (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_4_hasIndex(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_4_hasIndex(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_hasIndex", 0);
+  __Pyx_TraceCall("_hasIndex", __pyx_f[0], 323);
+
+  /* "pysam/csamfile.pyx":325
+ *     def _hasIndex( self ):
+ *         '''return true if htsfile has an existing (and opened) index.'''
+ *         return self.index != NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def _open(self,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->index != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":323
+ *         return self.htsfile != NULL
+ * 
+ *     def _hasIndex( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if htsfile has an existing (and opened) index.'''
+ *         return self.index != NULL
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._hasIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":327
+ *         return self.index != NULL
+ * 
+ *     def _open(self,             # <<<<<<<<<<<<<<
+ *               filename,
+ *               mode=None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_7_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_6_open[] = "Samfile._open(self, filename, mode=None, Samfile template=None, referencenames=None, referencelengths=None, text=None, header=None, port=None, add_sq_text=True, check_header=True, check_sq=True)\nopen a sam/bam file.\n\n        If _open is called on an existing bamfile, the current file will be\n        closed and a new file will be opened.\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_7_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_filename = 0;
+  PyObject *__pyx_v_mode = 0;
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_template = 0;
+  PyObject *__pyx_v_referencenames = 0;
+  PyObject *__pyx_v_referencelengths = 0;
+  PyObject *__pyx_v_text = 0;
+  PyObject *__pyx_v_header = 0;
+  PyObject *__pyx_v_port = 0;
+  PyObject *__pyx_v_add_sq_text = 0;
+  PyObject *__pyx_v_check_header = 0;
+  PyObject *__pyx_v_check_sq = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_open (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_template,&__pyx_n_s_referencenames,&__pyx_n_s_referencelengths,&__pyx_n_s_text,&__pyx_n_s_header,&__pyx_n_s_port,&__pyx_n_s_add_sq_text,&__pyx_n_s_check_header,&__pyx_n_s_check_sq,0};
+    PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
+
+    /* "pysam/csamfile.pyx":329
+ *     def _open(self,
+ *               filename,
+ *               mode=None,             # <<<<<<<<<<<<<<
+ *               Samfile template=None,
+ *               referencenames=None,
+ */
+    values[1] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":330
+ *               filename,
+ *               mode=None,
+ *               Samfile template=None,             # <<<<<<<<<<<<<<
+ *               referencenames=None,
+ *               referencelengths=None,
+ */
+    values[2] = (PyObject *)((struct __pyx_obj_5pysam_8csamfile_Samfile *)Py_None);
+
+    /* "pysam/csamfile.pyx":331
+ *               mode=None,
+ *               Samfile template=None,
+ *               referencenames=None,             # <<<<<<<<<<<<<<
+ *               referencelengths=None,
+ *               text=None,
+ */
+    values[3] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":332
+ *               Samfile template=None,
+ *               referencenames=None,
+ *               referencelengths=None,             # <<<<<<<<<<<<<<
+ *               text=None,
+ *               header=None,
+ */
+    values[4] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":333
+ *               referencenames=None,
+ *               referencelengths=None,
+ *               text=None,             # <<<<<<<<<<<<<<
+ *               header=None,
+ *               port=None,
+ */
+    values[5] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":334
+ *               referencelengths=None,
+ *               text=None,
+ *               header=None,             # <<<<<<<<<<<<<<
+ *               port=None,
+ *               add_sq_text=True,
+ */
+    values[6] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":335
+ *               text=None,
+ *               header=None,
+ *               port=None,             # <<<<<<<<<<<<<<
+ *               add_sq_text=True,
+ *               check_header=True,
+ */
+    values[7] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":336
+ *               header=None,
+ *               port=None,
+ *               add_sq_text=True,             # <<<<<<<<<<<<<<
+ *               check_header=True,
+ *               check_sq=True):
+ */
+    values[8] = ((PyObject *)Py_True);
+
+    /* "pysam/csamfile.pyx":337
+ *               port=None,
+ *               add_sq_text=True,
+ *               check_header=True,             # <<<<<<<<<<<<<<
+ *               check_sq=True):
+ *         '''open a sam/bam file.
+ */
+    values[9] = ((PyObject *)Py_True);
+
+    /* "pysam/csamfile.pyx":338
+ *               add_sq_text=True,
+ *               check_header=True,
+ *               check_sq=True):             # <<<<<<<<<<<<<<
+ *         '''open a sam/bam file.
+ * 
+ */
+    values[10] = ((PyObject *)Py_True);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
+        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_template);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_referencenames);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_referencelengths);
+          if (value) { values[4] = value; kw_args--; }
+        }
+        case  5:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_text);
+          if (value) { values[5] = value; kw_args--; }
+        }
+        case  6:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_header);
+          if (value) { values[6] = value; kw_args--; }
+        }
+        case  7:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_port);
+          if (value) { values[7] = value; kw_args--; }
+        }
+        case  8:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_add_sq_text);
+          if (value) { values[8] = value; kw_args--; }
+        }
+        case  9:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_check_header);
+          if (value) { values[9] = value; kw_args--; }
+        }
+        case 10:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_check_sq);
+          if (value) { values[10] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
+        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_filename = values[0];
+    __pyx_v_mode = values[1];
+    __pyx_v_template = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[2]);
+    __pyx_v_referencenames = values[3];
+    __pyx_v_referencelengths = values[4];
+    __pyx_v_text = values[5];
+    __pyx_v_header = values[6];
+    __pyx_v_port = values[7];
+    __pyx_v_add_sq_text = values[8];
+    __pyx_v_check_header = values[9];
+    __pyx_v_check_sq = values[10];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_template), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "template", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_6_open(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_template, __pyx_v_referencenames, __pyx_v_referencelengths, __pyx_v_text, __pyx_v_header, __pyx_v_port, __pyx_v_add_sq_text, __pyx_v_check_header, __pyx_v_check_sq);
+
+  /* "pysam/csamfile.pyx":327
+ *         return self.index != NULL
+ * 
+ *     def _open(self,             # <<<<<<<<<<<<<<
+ *               filename,
+ *               mode=None,
+ */
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_6_open(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_template, PyObject *__pyx_v_referencenames, PyObject *__pyx_v_referencelengths, PyObject *__pyx_v_text, PyObject *__pyx_v_header, PyObject *__pyx_v_port, PyObject *__pyx_v_add_sq_text, PyObject *__pyx_v_check_header, PyObject *__pyx_v_check_sq) {
+  CYTHON_UNUSED PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_v_bmode = 0;
+  char *__pyx_v_ctext;
+  PyObject *__pyx_v_n = NULL;
+  PyObject *__pyx_v_x = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_ref = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_t_10;
+  int __pyx_t_11;
+  Py_ssize_t __pyx_t_12;
+  Py_ssize_t __pyx_t_13;
+  PyObject *(*__pyx_t_14)(PyObject *);
+  size_t __pyx_t_15;
+  int32_t __pyx_t_16;
+  long __pyx_t_17;
+  uint32_t __pyx_t_18;
+  char const *__pyx_t_19;
+  int __pyx_t_20;
+  char *__pyx_t_21;
+  char const *__pyx_t_22;
+  char const *__pyx_t_23;
+  int __pyx_t_24;
+  BGZF *__pyx_t_25;
+  char const *__pyx_t_26;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_open", 0);
+  __Pyx_TraceCall("_open", __pyx_f[0], 327);
+  __Pyx_INCREF(__pyx_v_filename);
+  __Pyx_INCREF(__pyx_v_referencenames);
+  __Pyx_INCREF(__pyx_v_text);
+
+  /* "pysam/csamfile.pyx":346
+ * 
+ *         # read mode autodetection
+ *         if mode is None:             # <<<<<<<<<<<<<<
+ *             try:
+ *                 self._open(filename, 'rb',
+ */
+  __pyx_t_1 = (__pyx_v_mode == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":347
+ *         # read mode autodetection
+ *         if mode is None:
+ *             try:             # <<<<<<<<<<<<<<
+ *                 self._open(filename, 'rb',
+ *                            template=template,
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
+      __Pyx_XGOTREF(__pyx_t_3);
+      __Pyx_XGOTREF(__pyx_t_4);
+      __Pyx_XGOTREF(__pyx_t_5);
+      /*try:*/ {
+
+        /* "pysam/csamfile.pyx":348
+ *         if mode is None:
+ *             try:
+ *                 self._open(filename, 'rb',             # <<<<<<<<<<<<<<
+ *                            template=template,
+ *                            referencenames=referencenames,
+ */
+        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_INCREF(__pyx_v_filename);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_filename);
+        __Pyx_GIVEREF(__pyx_v_filename);
+        __Pyx_INCREF(__pyx_n_s_rb);
+        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_rb);
+        __Pyx_GIVEREF(__pyx_n_s_rb);
+        __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+
+        /* "pysam/csamfile.pyx":349
+ *             try:
+ *                 self._open(filename, 'rb',
+ *                            template=template,             # <<<<<<<<<<<<<<
+ *                            referencenames=referencenames,
+ *                            referencelengths=referencelengths,
+ */
+        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_template, ((PyObject *)__pyx_v_template)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+
+        /* "pysam/csamfile.pyx":350
+ *                 self._open(filename, 'rb',
+ *                            template=template,
+ *                            referencenames=referencenames,             # <<<<<<<<<<<<<<
+ *                            referencelengths=referencelengths,
+ *                            text=text,
+ */
+        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_referencenames, __pyx_v_referencenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+
+        /* "pysam/csamfile.pyx":351
+ *                            template=template,
+ *                            referencenames=referencenames,
+ *                            referencelengths=referencelengths,             # <<<<<<<<<<<<<<
+ *                            text=text,
+ *                            header=header,
+ */
+        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_referencelengths, __pyx_v_referencelengths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+
+        /* "pysam/csamfile.pyx":352
+ *                            referencenames=referencenames,
+ *                            referencelengths=referencelengths,
+ *                            text=text,             # <<<<<<<<<<<<<<
+ *                            header=header,
+ *                            port=port,
+ */
+        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_text, __pyx_v_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+
+        /* "pysam/csamfile.pyx":353
+ *                            referencelengths=referencelengths,
+ *                            text=text,
+ *                            header=header,             # <<<<<<<<<<<<<<
+ *                            port=port,
+ *                            check_header=check_header,
+ */
+        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_header, __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+
+        /* "pysam/csamfile.pyx":354
+ *                            text=text,
+ *                            header=header,
+ *                            port=port,             # <<<<<<<<<<<<<<
+ *                            check_header=check_header,
+ *                            check_sq=check_sq)
+ */
+        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_port, __pyx_v_port) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+
+        /* "pysam/csamfile.pyx":355
+ *                            header=header,
+ *                            port=port,
+ *                            check_header=check_header,             # <<<<<<<<<<<<<<
+ *                            check_sq=check_sq)
+ *                 return
+ */
+        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_check_header, __pyx_v_check_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+
+        /* "pysam/csamfile.pyx":356
+ *                            port=port,
+ *                            check_header=check_header,
+ *                            check_sq=check_sq)             # <<<<<<<<<<<<<<
+ *                 return
+ *             except ValueError, msg:
+ */
+        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_check_sq, __pyx_v_check_sq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+
+        /* "pysam/csamfile.pyx":348
+ *         if mode is None:
+ *             try:
+ *                 self._open(filename, 'rb',             # <<<<<<<<<<<<<<
+ *                            template=template,
+ *                            referencenames=referencenames,
+ */
+        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+        /* "pysam/csamfile.pyx":357
+ *                            check_header=check_header,
+ *                            check_sq=check_sq)
+ *                 return             # <<<<<<<<<<<<<<
+ *             except ValueError, msg:
+ *                 pass
+ */
+        __Pyx_XDECREF(__pyx_r);
+        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+        goto __pyx_L8_try_return;
+      }
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      goto __pyx_L11_try_end;
+      __pyx_L4_error:;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+      /* "pysam/csamfile.pyx":358
+ *                            check_sq=check_sq)
+ *                 return
+ *             except ValueError, msg:             # <<<<<<<<<<<<<<
+ *                 pass
+ * 
+ */
+      __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+      if (__pyx_t_10) {
+        __Pyx_AddTraceback("pysam.csamfile.Samfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_8);
+        __pyx_v_msg = __pyx_t_8;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        goto __pyx_L5_exception_handled;
+      }
+      goto __pyx_L6_except_error;
+      __pyx_L6_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_3);
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+      goto __pyx_L1_error;
+      __pyx_L8_try_return:;
+      __Pyx_XGIVEREF(__pyx_t_3);
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+      goto __pyx_L0;
+      __pyx_L5_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_3);
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+      __pyx_L11_try_end:;
+    }
+
+    /* "pysam/csamfile.pyx":361
+ *                 pass
+ * 
+ *             self._open(filename, 'r',             # <<<<<<<<<<<<<<
+ *                        template=template,
+ *                        referencenames=referencenames,
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); 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_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_INCREF(__pyx_v_filename);
+    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_filename);
+    __Pyx_GIVEREF(__pyx_v_filename);
+    __Pyx_INCREF(__pyx_n_s_r);
+    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_r);
+    __Pyx_GIVEREF(__pyx_n_s_r);
+    __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+
+    /* "pysam/csamfile.pyx":362
+ * 
+ *             self._open(filename, 'r',
+ *                        template=template,             # <<<<<<<<<<<<<<
+ *                        referencenames=referencenames,
+ *                        referencelengths=referencelengths,
+ */
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_template, ((PyObject *)__pyx_v_template)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":363
+ *             self._open(filename, 'r',
+ *                        template=template,
+ *                        referencenames=referencenames,             # <<<<<<<<<<<<<<
+ *                        referencelengths=referencelengths,
+ *                        text=text,
+ */
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_referencenames, __pyx_v_referencenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":364
+ *                        template=template,
+ *                        referencenames=referencenames,
+ *                        referencelengths=referencelengths,             # <<<<<<<<<<<<<<
+ *                        text=text,
+ *                        header=header,
+ */
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_referencelengths, __pyx_v_referencelengths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":365
+ *                        referencenames=referencenames,
+ *                        referencelengths=referencelengths,
+ *                        text=text,             # <<<<<<<<<<<<<<
+ *                        header=header,
+ *                        port=port,
+ */
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_text, __pyx_v_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":366
+ *                        referencelengths=referencelengths,
+ *                        text=text,
+ *                        header=header,             # <<<<<<<<<<<<<<
+ *                        port=port,
+ *                        check_header=check_header,
+ */
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_header, __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":367
+ *                        text=text,
+ *                        header=header,
+ *                        port=port,             # <<<<<<<<<<<<<<
+ *                        check_header=check_header,
+ *                        check_sq=check_sq)
+ */
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_port, __pyx_v_port) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":368
+ *                        header=header,
+ *                        port=port,
+ *                        check_header=check_header,             # <<<<<<<<<<<<<<
+ *                        check_sq=check_sq)
+ *             return
+ */
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_check_header, __pyx_v_check_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":369
+ *                        port=port,
+ *                        check_header=check_header,
+ *                        check_sq=check_sq)             # <<<<<<<<<<<<<<
+ *             return
+ * 
+ */
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_check_sq, __pyx_v_check_sq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":361
+ *                 pass
+ * 
+ *             self._open(filename, 'r',             # <<<<<<<<<<<<<<
+ *                        template=template,
+ *                        referencenames=referencenames,
+ */
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __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(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+    /* "pysam/csamfile.pyx":370
+ *                        check_header=check_header,
+ *                        check_sq=check_sq)
+ *             return             # <<<<<<<<<<<<<<
+ * 
+ *         assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), \
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":372
+ *             return
+ * 
+ *         assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), \             # <<<<<<<<<<<<<<
+ *             "invalid file opening mode `%s`" % mode
+ * 
+ */
+  #ifndef CYTHON_WITHOUT_ASSERTIONS
+  if (unlikely(!Py_OptimizeFlag)) {
+    __Pyx_INCREF(__pyx_v_mode);
+    __pyx_t_6 = __pyx_v_mode;
+    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_r, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_2) {
+      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __pyx_t_1;
+    } else {
+      __pyx_t_11 = __pyx_t_2;
+    }
+    if (!__pyx_t_11) {
+      __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_rb, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __pyx_t_2;
+    } else {
+      __pyx_t_1 = __pyx_t_11;
+    }
+    if (!__pyx_t_1) {
+      __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_wb, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __pyx_t_11;
+    } else {
+      __pyx_t_2 = __pyx_t_1;
+    }
+    if (!__pyx_t_2) {
+      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_wh, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __pyx_t_1;
+    } else {
+      __pyx_t_11 = __pyx_t_2;
+    }
+    if (!__pyx_t_11) {
+      __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_wbu, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __pyx_t_2;
+    } else {
+      __pyx_t_1 = __pyx_t_11;
+    }
+    if (!__pyx_t_1) {
+      __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_rU, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __pyx_t_11;
+    } else {
+      __pyx_t_2 = __pyx_t_1;
+    }
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (unlikely(!(__pyx_t_2 != 0))) {
+
+      /* "pysam/csamfile.pyx":373
+ * 
+ *         assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), \
+ *             "invalid file opening mode `%s`" % mode             # <<<<<<<<<<<<<<
+ * 
+ *         # close a previously opened file
+ */
+      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_invalid_file_opening_mode_s, __pyx_v_mode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyErr_SetObject(PyExc_AssertionError, __pyx_t_6);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+
+  /* "pysam/csamfile.pyx":376
+ * 
+ *         # close a previously opened file
+ *         if self.htsfile != NULL:             # <<<<<<<<<<<<<<
+ *             self.close()
+ * 
+ */
+  __pyx_t_2 = ((__pyx_v_self->htsfile != NULL) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":377
+ *         # close a previously opened file
+ *         if self.htsfile != NULL:
+ *             self.close()             # <<<<<<<<<<<<<<
+ * 
+ *         cdef bytes bmode = mode.encode('ascii')
+ */
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __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_9); __pyx_t_9 = 0;
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "pysam/csamfile.pyx":379
+ *             self.close()
+ * 
+ *         cdef bytes bmode = mode.encode('ascii')             # <<<<<<<<<<<<<<
+ *         self._filename = filename = _encodeFilename(filename)
+ *         self.isstream = filename == b"-"
+ */
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_mode, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_bmode = ((PyObject*)__pyx_t_6);
+  __pyx_t_6 = 0;
+
+  /* "pysam/csamfile.pyx":380
+ * 
+ *         cdef bytes bmode = mode.encode('ascii')
+ *         self._filename = filename = _encodeFilename(filename)             # <<<<<<<<<<<<<<
+ *         self.isstream = filename == b"-"
+ * 
+ */
+  __pyx_t_6 = __pyx_f_5pysam_8csamfile__encodeFilename(__pyx_v_filename); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __Pyx_GOTREF(__pyx_v_self->_filename);
+  __Pyx_DECREF(__pyx_v_self->_filename);
+  __pyx_v_self->_filename = __pyx_t_6;
+  __Pyx_INCREF(__pyx_t_6);
+  __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_6);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "pysam/csamfile.pyx":381
+ *         cdef bytes bmode = mode.encode('ascii')
+ *         self._filename = filename = _encodeFilename(filename)
+ *         self.isstream = filename == b"-"             # <<<<<<<<<<<<<<
+ * 
+ *         self.isbam = len(mode) > 1 and mode[1] == 'b'
+ */
+  __pyx_t_6 = PyObject_RichCompare(__pyx_v_filename, __pyx_kp_b__6, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_self->isstream = __pyx_t_10;
+
+  /* "pysam/csamfile.pyx":383
+ *         self.isstream = filename == b"-"
+ * 
+ *         self.isbam = len(mode) > 1 and mode[1] == 'b'             # <<<<<<<<<<<<<<
+ * 
+ *         self.isremote = filename.startswith(b"http:") or \
+ */
+  __pyx_t_12 = PyObject_Length(__pyx_v_mode); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyBool_FromLong((__pyx_t_12 > 1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_2) {
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_mode, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_n_s_b, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_9 = __pyx_t_8;
+    __pyx_t_8 = 0;
+  } else {
+    __pyx_t_9 = __pyx_t_6;
+    __pyx_t_6 = 0;
+  }
+  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_v_self->isbam = __pyx_t_10;
+
+  /* "pysam/csamfile.pyx":385
+ *         self.isbam = len(mode) > 1 and mode[1] == 'b'
+ * 
+ *         self.isremote = filename.startswith(b"http:") or \             # <<<<<<<<<<<<<<
+ *                         filename.startswith(b"ftp:")
+ * 
+ */
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_startswith); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_2) {
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+    /* "pysam/csamfile.pyx":386
+ * 
+ *         self.isremote = filename.startswith(b"http:") or \
+ *                         filename.startswith(b"ftp:")             # <<<<<<<<<<<<<<
+ * 
+ *         cdef char * ctext
+ */
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_startswith); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_9 = __pyx_t_8;
+    __pyx_t_8 = 0;
+  } else {
+    __pyx_t_9 = __pyx_t_6;
+    __pyx_t_6 = 0;
+  }
+
+  /* "pysam/csamfile.pyx":385
+ *         self.isbam = len(mode) > 1 and mode[1] == 'b'
+ * 
+ *         self.isremote = filename.startswith(b"http:") or \             # <<<<<<<<<<<<<<
+ *                         filename.startswith(b"ftp:")
+ * 
+ */
+  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_v_self->isremote = __pyx_t_10;
+
+  /* "pysam/csamfile.pyx":389
+ * 
+ *         cdef char * ctext
+ *         ctext = NULL             # <<<<<<<<<<<<<<
+ * 
+ *         if mode[0] == 'w':
+ */
+  __pyx_v_ctext = NULL;
+
+  /* "pysam/csamfile.pyx":391
+ *         ctext = NULL
+ * 
+ *         if mode[0] == 'w':             # <<<<<<<<<<<<<<
+ *             # open file for writing
+ * 
+ */
+  __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":395
+ * 
+ *             # header structure (used for writing)
+ *             if template:             # <<<<<<<<<<<<<<
+ *                 self.header = bam_hdr_dup(template.header)
+ *             elif header:
+ */
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_template)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":396
+ *             # header structure (used for writing)
+ *             if template:
+ *                 self.header = bam_hdr_dup(template.header)             # <<<<<<<<<<<<<<
+ *             elif header:
+ *                 self.header = self._buildHeader(header)
+ */
+      __pyx_v_self->header = bam_hdr_dup(__pyx_v_template->header);
+      goto __pyx_L16;
+    }
+
+    /* "pysam/csamfile.pyx":397
+ *             if template:
+ *                 self.header = bam_hdr_dup(template.header)
+ *             elif header:             # <<<<<<<<<<<<<<
+ *                 self.header = self._buildHeader(header)
+ *             else:
+ */
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_header); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":398
+ *                 self.header = bam_hdr_dup(template.header)
+ *             elif header:
+ *                 self.header = self._buildHeader(header)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # build header from a target names and lengths
+ */
+      __pyx_v_self->header = ((struct __pyx_vtabstruct_5pysam_8csamfile_Samfile *)__pyx_v_self->__pyx_vtab)->_buildHeader(__pyx_v_self, __pyx_v_header);
+      goto __pyx_L16;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":401
+ *             else:
+ *                 # build header from a target names and lengths
+ *                 assert referencenames and referencelengths, \             # <<<<<<<<<<<<<<
+ *                     ("either supply options `template`, `header` "
+ *                      "or  both `referencenames` and `referencelengths` "
+ */
+      #ifndef CYTHON_WITHOUT_ASSERTIONS
+      if (unlikely(!Py_OptimizeFlag)) {
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_referencenames); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_2) {
+          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_referencelengths); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_11 = __pyx_t_1;
+        } else {
+          __pyx_t_11 = __pyx_t_2;
+        }
+        if (unlikely(!__pyx_t_11)) {
+          PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_either_supply_options_template_h);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+      }
+      #endif
+
+      /* "pysam/csamfile.pyx":405
+ *                      "or  both `referencenames` and `referencelengths` "
+ *                      "for writing")
+ *                 assert len(referencenames) == len(referencelengths), \             # <<<<<<<<<<<<<<
+ *                     "unequal names and lengths of reference sequences"
+ * 
+ */
+      #ifndef CYTHON_WITHOUT_ASSERTIONS
+      if (unlikely(!Py_OptimizeFlag)) {
+        __pyx_t_12 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_13 = PyObject_Length(__pyx_v_referencelengths); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(!((__pyx_t_12 == __pyx_t_13) != 0))) {
+          PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_unequal_names_and_lengths_of_ref);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+      }
+      #endif
+
+      /* "pysam/csamfile.pyx":409
+ * 
+ *                 # allocate and fill header
+ *                 referencenames = [_forceBytes(ref) for ref in referencenames]             # <<<<<<<<<<<<<<
+ *                 self.header = bam_hdr_init()
+ *                 self.header.n_targets = len(referencenames)
+ */
+      __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      if (PyList_CheckExact(__pyx_v_referencenames) || PyTuple_CheckExact(__pyx_v_referencenames)) {
+        __pyx_t_6 = __pyx_v_referencenames; __Pyx_INCREF(__pyx_t_6); __pyx_t_13 = 0;
+        __pyx_t_14 = NULL;
+      } else {
+        __pyx_t_13 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_referencenames); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext;
+      }
+      for (;;) {
+        if (!__pyx_t_14 && PyList_CheckExact(__pyx_t_6)) {
+          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_6)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_13); __Pyx_INCREF(__pyx_t_8); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else if (!__pyx_t_14 && PyTuple_CheckExact(__pyx_t_6)) {
+          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_13); __Pyx_INCREF(__pyx_t_8); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          __pyx_t_8 = __pyx_t_14(__pyx_t_6);
+          if (unlikely(!__pyx_t_8)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_8);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_ref, __pyx_t_8);
+        __pyx_t_8 = 0;
+        __pyx_t_8 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_ref); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF_SET(__pyx_v_referencenames, __pyx_t_9);
+      __pyx_t_9 = 0;
+
+      /* "pysam/csamfile.pyx":410
+ *                 # allocate and fill header
+ *                 referencenames = [_forceBytes(ref) for ref in referencenames]
+ *                 self.header = bam_hdr_init()             # <<<<<<<<<<<<<<
+ *                 self.header.n_targets = len(referencenames)
+ *                 n = 0
+ */
+      __pyx_v_self->header = bam_hdr_init();
+
+      /* "pysam/csamfile.pyx":411
+ *                 referencenames = [_forceBytes(ref) for ref in referencenames]
+ *                 self.header = bam_hdr_init()
+ *                 self.header.n_targets = len(referencenames)             # <<<<<<<<<<<<<<
+ *                 n = 0
+ *                 for x in referencenames:
+ */
+      __pyx_t_13 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_self->header->n_targets = __pyx_t_13;
+
+      /* "pysam/csamfile.pyx":412
+ *                 self.header = bam_hdr_init()
+ *                 self.header.n_targets = len(referencenames)
+ *                 n = 0             # <<<<<<<<<<<<<<
+ *                 for x in referencenames:
+ *                     n += len(x) + 1
+ */
+      __Pyx_INCREF(__pyx_int_0);
+      __pyx_v_n = __pyx_int_0;
+
+      /* "pysam/csamfile.pyx":413
+ *                 self.header.n_targets = len(referencenames)
+ *                 n = 0
+ *                 for x in referencenames:             # <<<<<<<<<<<<<<
+ *                     n += len(x) + 1
+ *                 self.header.target_name = <char**>calloc(n, sizeof(char*))
+ */
+      if (PyList_CheckExact(__pyx_v_referencenames) || PyTuple_CheckExact(__pyx_v_referencenames)) {
+        __pyx_t_9 = __pyx_v_referencenames; __Pyx_INCREF(__pyx_t_9); __pyx_t_13 = 0;
+        __pyx_t_14 = NULL;
+      } else {
+        __pyx_t_13 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_referencenames); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_14 = Py_TYPE(__pyx_t_9)->tp_iternext;
+      }
+      for (;;) {
+        if (!__pyx_t_14 && PyList_CheckExact(__pyx_t_9)) {
+          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_9)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else if (!__pyx_t_14 && PyTuple_CheckExact(__pyx_t_9)) {
+          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          __pyx_t_6 = __pyx_t_14(__pyx_t_9);
+          if (unlikely(!__pyx_t_6)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_6);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
+        __pyx_t_6 = 0;
+
+        /* "pysam/csamfile.pyx":414
+ *                 n = 0
+ *                 for x in referencenames:
+ *                     n += len(x) + 1             # <<<<<<<<<<<<<<
+ *                 self.header.target_name = <char**>calloc(n, sizeof(char*))
+ *                 self.header.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
+ */
+        __pyx_t_12 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_12 + 1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_n, __pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_8);
+        __pyx_t_8 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+      /* "pysam/csamfile.pyx":415
+ *                 for x in referencenames:
+ *                     n += len(x) + 1
+ *                 self.header.target_name = <char**>calloc(n, sizeof(char*))             # <<<<<<<<<<<<<<
+ *                 self.header.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
+ *                 for x from 0 <= x < self.header.n_targets:
+ */
+      __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_n); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_self->header->target_name = ((char **)calloc(__pyx_t_15, (sizeof(char *))));
+
+      /* "pysam/csamfile.pyx":416
+ *                     n += len(x) + 1
+ *                 self.header.target_name = <char**>calloc(n, sizeof(char*))
+ *                 self.header.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))             # <<<<<<<<<<<<<<
+ *                 for x from 0 <= x < self.header.n_targets:
+ *                     self.header.target_len[x] = referencelengths[x]
+ */
+      __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_n); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_self->header->target_len = ((uint32_t *)calloc(__pyx_t_15, (sizeof(uint32_t))));
+
+      /* "pysam/csamfile.pyx":417
+ *                 self.header.target_name = <char**>calloc(n, sizeof(char*))
+ *                 self.header.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
+ *                 for x from 0 <= x < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *                     self.header.target_len[x] = referencelengths[x]
+ *                     name = referencenames[x]
+ */
+      __pyx_t_16 = __pyx_v_self->header->n_targets;
+      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17++) {
+        __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9);
+        __pyx_t_9 = 0;
+
+        /* "pysam/csamfile.pyx":418
+ *                 self.header.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
+ *                 for x from 0 <= x < self.header.n_targets:
+ *                     self.header.target_len[x] = referencelengths[x]             # <<<<<<<<<<<<<<
+ *                     name = referencenames[x]
+ *                     self.header.target_name[x] = <char*>calloc(
+ */
+        __pyx_t_9 = PyObject_GetItem(__pyx_v_referencelengths, __pyx_v_x); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_18 = __Pyx_PyInt_As_uint32_t(__pyx_t_9); if (unlikely((__pyx_t_18 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        (__pyx_v_self->header->target_len[__pyx_t_13]) = __pyx_t_18;
+
+        /* "pysam/csamfile.pyx":419
+ *                 for x from 0 <= x < self.header.n_targets:
+ *                     self.header.target_len[x] = referencelengths[x]
+ *                     name = referencenames[x]             # <<<<<<<<<<<<<<
+ *                     self.header.target_name[x] = <char*>calloc(
+ *                         len(name) + 1, sizeof(char))
+ */
+        __pyx_t_9 = PyObject_GetItem(__pyx_v_referencenames, __pyx_v_x); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
+        __pyx_t_9 = 0;
+
+        /* "pysam/csamfile.pyx":421
+ *                     name = referencenames[x]
+ *                     self.header.target_name[x] = <char*>calloc(
+ *                         len(name) + 1, sizeof(char))             # <<<<<<<<<<<<<<
+ *                     strncpy(self.header.target_name[x], name, len(name))
+ * 
+ */
+        __pyx_t_13 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+        /* "pysam/csamfile.pyx":420
+ *                     self.header.target_len[x] = referencelengths[x]
+ *                     name = referencenames[x]
+ *                     self.header.target_name[x] = <char*>calloc(             # <<<<<<<<<<<<<<
+ *                         len(name) + 1, sizeof(char))
+ *                     strncpy(self.header.target_name[x], name, len(name))
+ */
+        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        (__pyx_v_self->header->target_name[__pyx_t_12]) = ((char *)calloc((__pyx_t_13 + 1), (sizeof(char))));
+
+        /* "pysam/csamfile.pyx":422
+ *                     self.header.target_name[x] = <char*>calloc(
+ *                         len(name) + 1, sizeof(char))
+ *                     strncpy(self.header.target_name[x], name, len(name))             # <<<<<<<<<<<<<<
+ * 
+ *                 # Optionally, if there is no text, add a SAM
+ */
+        __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_19 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        strncpy((__pyx_v_self->header->target_name[__pyx_t_13]), __pyx_t_19, __pyx_t_12);
+        __pyx_t_17 = __Pyx_PyInt_As_long(__pyx_v_x); if (unlikely((__pyx_t_17 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "pysam/csamfile.pyx":417
+ *                 self.header.target_name = <char**>calloc(n, sizeof(char*))
+ *                 self.header.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
+ *                 for x from 0 <= x < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *                     self.header.target_len[x] = referencelengths[x]
+ *                     name = referencenames[x]
+ */
+      __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9);
+      __pyx_t_9 = 0;
+
+      /* "pysam/csamfile.pyx":426
+ *                 # 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 < self.header.n_targets:
+ */
+      __pyx_t_11 = (__pyx_v_text == Py_None);
+      if (__pyx_t_11) {
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_add_sq_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __pyx_t_2;
+      } else {
+        __pyx_t_1 = __pyx_t_11;
+      }
+      if (__pyx_t_1) {
+
+        /* "pysam/csamfile.pyx":427
+ *                 # compatible header to output file.
+ *                 if text is None and add_sq_text:
+ *                     text = []             # <<<<<<<<<<<<<<
+ *                     for x from 0 <= x < self.header.n_targets:
+ *                         text.append("@SQ\tSN:%s\tLN:%s\n" % \
+ */
+        __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_9);
+        __pyx_t_9 = 0;
+
+        /* "pysam/csamfile.pyx":428
+ *                 if text is None and add_sq_text:
+ *                     text = []
+ *                     for x from 0 <= x < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *                         text.append("@SQ\tSN:%s\tLN:%s\n" % \
+ *                                     (_forceStr(referencenames[x]),
+ */
+        __pyx_t_16 = __pyx_v_self->header->n_targets;
+        for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17++) {
+          __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9);
+          __pyx_t_9 = 0;
+
+          /* "pysam/csamfile.pyx":430
+ *                     for x from 0 <= x < self.header.n_targets:
+ *                         text.append("@SQ\tSN:%s\tLN:%s\n" % \
+ *                                     (_forceStr(referencenames[x]),             # <<<<<<<<<<<<<<
+ *                                      referencelengths[x]))
+ *                     text = ''.join(text)
+ */
+          __pyx_t_9 = PyObject_GetItem(__pyx_v_referencenames, __pyx_v_x); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_9);
+          __pyx_t_8 = __pyx_f_5pysam_8csamfile__forceStr(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+          /* "pysam/csamfile.pyx":431
+ *                         text.append("@SQ\tSN:%s\tLN:%s\n" % \
+ *                                     (_forceStr(referencenames[x]),
+ *                                      referencelengths[x]))             # <<<<<<<<<<<<<<
+ *                     text = ''.join(text)
+ * 
+ */
+          __pyx_t_9 = PyObject_GetItem(__pyx_v_referencelengths, __pyx_v_x); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_9);
+
+          /* "pysam/csamfile.pyx":430
+ *                     for x from 0 <= x < self.header.n_targets:
+ *                         text.append("@SQ\tSN:%s\tLN:%s\n" % \
+ *                                     (_forceStr(referencenames[x]),             # <<<<<<<<<<<<<<
+ *                                      referencelengths[x]))
+ *                     text = ''.join(text)
+ */
+          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
+          __Pyx_GIVEREF(__pyx_t_8);
+          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
+          __Pyx_GIVEREF(__pyx_t_9);
+          __pyx_t_8 = 0;
+          __pyx_t_9 = 0;
+
+          /* "pysam/csamfile.pyx":429
+ *                     text = []
+ *                     for x from 0 <= x < self.header.n_targets:
+ *                         text.append("@SQ\tSN:%s\tLN:%s\n" % \             # <<<<<<<<<<<<<<
+ *                                     (_forceStr(referencenames[x]),
+ *                                      referencelengths[x]))
+ */
+          __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_SQ_SN_s_LN_s, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_t_20 = __Pyx_PyObject_Append(__pyx_v_text, __pyx_t_9); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_t_17 = __Pyx_PyInt_As_long(__pyx_v_x); if (unlikely((__pyx_t_17 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "pysam/csamfile.pyx":428
+ *                 if text is None and add_sq_text:
+ *                     text = []
+ *                     for x from 0 <= x < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *                         text.append("@SQ\tSN:%s\tLN:%s\n" % \
+ *                                     (_forceStr(referencenames[x]),
+ */
+        __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9);
+        __pyx_t_9 = 0;
+
+        /* "pysam/csamfile.pyx":432
+ *                                     (_forceStr(referencenames[x]),
+ *                                      referencelengths[x]))
+ *                     text = ''.join(text)             # <<<<<<<<<<<<<<
+ * 
+ *                 if text != None:
+ */
+        __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__9, __pyx_v_text); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_9);
+        __pyx_t_9 = 0;
+        goto __pyx_L23;
+      }
+      __pyx_L23:;
+
+      /* "pysam/csamfile.pyx":434
+ *                     text = ''.join(text)
+ * 
+ *                 if text != None:             # <<<<<<<<<<<<<<
+ *                     # copy without \0
+ *                     text = _forceBytes(text)
+ */
+      __pyx_t_9 = PyObject_RichCompare(__pyx_v_text, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (__pyx_t_1) {
+
+        /* "pysam/csamfile.pyx":436
+ *                 if text != None:
+ *                     # copy without \0
+ *                     text = _forceBytes(text)             # <<<<<<<<<<<<<<
+ *                     ctext = text
+ *                     self.header.l_text = strlen(ctext)
+ */
+        __pyx_t_9 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_text); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_9);
+        __pyx_t_9 = 0;
+
+        /* "pysam/csamfile.pyx":437
+ *                     # copy without \0
+ *                     text = _forceBytes(text)
+ *                     ctext = text             # <<<<<<<<<<<<<<
+ *                     self.header.l_text = strlen(ctext)
+ *                     self.header.text = <char*>calloc(
+ */
+        __pyx_t_21 = __Pyx_PyObject_AsString(__pyx_v_text); if (unlikely((!__pyx_t_21) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_ctext = __pyx_t_21;
+
+        /* "pysam/csamfile.pyx":438
+ *                     text = _forceBytes(text)
+ *                     ctext = text
+ *                     self.header.l_text = strlen(ctext)             # <<<<<<<<<<<<<<
+ *                     self.header.text = <char*>calloc(
+ *                         strlen(ctext), sizeof(char))
+ */
+        __pyx_v_self->header->l_text = strlen(__pyx_v_ctext);
+
+        /* "pysam/csamfile.pyx":439
+ *                     ctext = text
+ *                     self.header.l_text = strlen(ctext)
+ *                     self.header.text = <char*>calloc(             # <<<<<<<<<<<<<<
+ *                         strlen(ctext), sizeof(char))
+ *                     memcpy(self.header.text, ctext, strlen(ctext))
+ */
+        __pyx_v_self->header->text = ((char *)calloc(strlen(__pyx_v_ctext), (sizeof(char))));
+
+        /* "pysam/csamfile.pyx":441
+ *                     self.header.text = <char*>calloc(
+ *                         strlen(ctext), sizeof(char))
+ *                     memcpy(self.header.text, ctext, strlen(ctext))             # <<<<<<<<<<<<<<
+ * 
+ *             # open file. Header gets written to file at the same time for bam files
+ */
+        memcpy(__pyx_v_self->header->text, __pyx_v_ctext, strlen(__pyx_v_ctext));
+        goto __pyx_L26;
+      }
+      __pyx_L26:;
+    }
+    __pyx_L16:;
+
+    /* "pysam/csamfile.pyx":445
+ *             # open file. Header gets written to file at the same time for bam files
+ *             # and sam files (in the latter case, the mode needs to be wh)
+ *             self.htsfile = hts_open(filename, bmode)             # <<<<<<<<<<<<<<
+ * 
+ *             # for compatibility - "w" writes sam file without header
+ */
+    __pyx_t_22 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_22) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_23 = __Pyx_PyObject_AsString(__pyx_v_bmode); if (unlikely((!__pyx_t_23) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_self->htsfile = hts_open(__pyx_t_22, __pyx_t_23);
+
+    /* "pysam/csamfile.pyx":448
+ * 
+ *             # for compatibility - "w" writes sam file without header
+ *             if self.isbam or "h" in mode:             # <<<<<<<<<<<<<<
+ *                 # write header to htsfile
+ *                 sam_hdr_write(self.htsfile, self.header)
+ */
+    if (!(__pyx_v_self->isbam != 0)) {
+      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_n_s_h, __pyx_v_mode, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __pyx_t_1;
+    } else {
+      __pyx_t_11 = (__pyx_v_self->isbam != 0);
+    }
+    if (__pyx_t_11) {
+
+      /* "pysam/csamfile.pyx":450
+ *             if self.isbam or "h" in mode:
+ *                 # write header to htsfile
+ *                 sam_hdr_write(self.htsfile, self.header)             # <<<<<<<<<<<<<<
+ * 
+ *         elif mode[0] == "r":
+ */
+      sam_hdr_write(__pyx_v_self->htsfile, __pyx_v_self->header);
+      goto __pyx_L27;
+    }
+    __pyx_L27:;
+    goto __pyx_L15;
+  }
+
+  /* "pysam/csamfile.pyx":452
+ *                 sam_hdr_write(self.htsfile, self.header)
+ * 
+ *         elif mode[0] == "r":             # <<<<<<<<<<<<<<
+ *             # open file for reading
+ *             if (filename != b"-"
+ */
+  __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_r, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  if (__pyx_t_11) {
+
+    /* "pysam/csamfile.pyx":454
+ *         elif mode[0] == "r":
+ *             # open file for reading
+ *             if (filename != b"-"             # <<<<<<<<<<<<<<
+ *                 and not self.isremote
+ *                 and not os.path.exists(filename)):
+ */
+    __pyx_t_11 = (__Pyx_PyBytes_Equals(__pyx_v_filename, __pyx_kp_b__6, Py_NE)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_11) {
+
+      /* "pysam/csamfile.pyx":455
+ *             # open file for reading
+ *             if (filename != b"-"
+ *                 and not self.isremote             # <<<<<<<<<<<<<<
+ *                 and not os.path.exists(filename)):
+ *                 raise IOError("file `%s` not found" % filename)
+ */
+      __pyx_t_1 = (!(__pyx_v_self->isremote != 0));
+      if (__pyx_t_1) {
+
+        /* "pysam/csamfile.pyx":456
+ *             if (filename != b"-"
+ *                 and not self.isremote
+ *                 and not os.path.exists(filename)):             # <<<<<<<<<<<<<<
+ *                 raise IOError("file `%s` not found" % filename)
+ * 
+ */
+        __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exists); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __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 = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_v_filename);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
+        __Pyx_GIVEREF(__pyx_v_filename);
+        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_24 = (!__pyx_t_2);
+        __pyx_t_2 = __pyx_t_24;
+      } else {
+        __pyx_t_2 = __pyx_t_1;
+      }
+      __pyx_t_1 = __pyx_t_2;
+    } else {
+      __pyx_t_1 = __pyx_t_11;
+    }
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":457
+ *                 and not self.isremote
+ *                 and not os.path.exists(filename)):
+ *                 raise IOError("file `%s` not found" % filename)             # <<<<<<<<<<<<<<
+ * 
+ *             # try to detect errors
+ */
+      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_file_s_not_found, __pyx_v_filename); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
+      __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":460
+ * 
+ *             # try to detect errors
+ *             self.htsfile = hts_open(filename, bmode)             # <<<<<<<<<<<<<<
+ *             if self.htsfile == NULL:
+ *                 raise ValueError(
+ */
+    __pyx_t_22 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_22) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_23 = __Pyx_PyObject_AsString(__pyx_v_bmode); if (unlikely((!__pyx_t_23) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_self->htsfile = hts_open(__pyx_t_22, __pyx_t_23);
+
+    /* "pysam/csamfile.pyx":461
+ *             # try to detect errors
+ *             self.htsfile = hts_open(filename, bmode)
+ *             if self.htsfile == NULL:             # <<<<<<<<<<<<<<
+ *                 raise ValueError(
+ *                     "could not open file (mode='%s') - "
+ */
+    __pyx_t_1 = ((__pyx_v_self->htsfile == NULL) != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":464
+ *                 raise ValueError(
+ *                     "could not open file (mode='%s') - "
+ *                     "is it SAM/BAM format?" % mode)             # <<<<<<<<<<<<<<
+ * 
+ *             # get file pointer
+ */
+      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_could_not_open_file_mode_s_is_it, __pyx_v_mode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+
+      /* "pysam/csamfile.pyx":462
+ *             self.htsfile = hts_open(filename, bmode)
+ *             if self.htsfile == NULL:
+ *                 raise ValueError(             # <<<<<<<<<<<<<<
+ *                     "could not open file (mode='%s') - "
+ *                     "is it SAM/BAM format?" % mode)
+ */
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
+      __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":469
+ *             # TODO: this is specific to BAM files
+ *             #       refactor to make generalizable
+ *             self.fp = self.htsfile.fp.bgzf             # <<<<<<<<<<<<<<
+ * 
+ *             # bam files require a valid header
+ */
+    __pyx_t_25 = __pyx_v_self->htsfile->fp.bgzf;
+    __pyx_v_self->fp = __pyx_t_25;
+
+    /* "pysam/csamfile.pyx":472
+ * 
+ *             # bam files require a valid header
+ *             if self.isbam:             # <<<<<<<<<<<<<<
+ *                 self.header = sam_hdr_read(self.htsfile)
+ *                 if self.header == NULL:
+ */
+    __pyx_t_1 = (__pyx_v_self->isbam != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":473
+ *             # bam files require a valid header
+ *             if self.isbam:
+ *                 self.header = sam_hdr_read(self.htsfile)             # <<<<<<<<<<<<<<
+ *                 if self.header == NULL:
+ *                     raise ValueError(
+ */
+      __pyx_v_self->header = sam_hdr_read(__pyx_v_self->htsfile);
+
+      /* "pysam/csamfile.pyx":474
+ *             if self.isbam:
+ *                 self.header = sam_hdr_read(self.htsfile)
+ *                 if self.header == NULL:             # <<<<<<<<<<<<<<
+ *                     raise ValueError(
+ *                         "file does not have valid header (mode='%s') "
+ */
+      __pyx_t_1 = ((__pyx_v_self->header == NULL) != 0);
+      if (__pyx_t_1) {
+
+        /* "pysam/csamfile.pyx":477
+ *                     raise ValueError(
+ *                         "file does not have valid header (mode='%s') "
+ *                         "- is it BAM format?" % mode )             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # in sam files it is optional (htsfile full of unmapped reads)
+ */
+        __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_file_does_not_have_valid_header, __pyx_v_mode); 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);
+
+        /* "pysam/csamfile.pyx":475
+ *                 self.header = sam_hdr_read(self.htsfile)
+ *                 if self.header == NULL:
+ *                     raise ValueError(             # <<<<<<<<<<<<<<
+ *                         "file does not have valid header (mode='%s') "
+ *                         "- is it BAM format?" % mode )
+ */
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L30;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":480
+ *             else:
+ *                 # in sam files it is optional (htsfile full of unmapped reads)
+ *                 if check_header:             # <<<<<<<<<<<<<<
+ *                     self.header = sam_hdr_read(self.htsfile)
+ *                     if self.header == NULL:
+ */
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check_header); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
+
+        /* "pysam/csamfile.pyx":481
+ *                 # in sam files it is optional (htsfile full of unmapped reads)
+ *                 if check_header:
+ *                     self.header = sam_hdr_read(self.htsfile)             # <<<<<<<<<<<<<<
+ *                     if self.header == NULL:
+ *                         raise ValueError(
+ */
+        __pyx_v_self->header = sam_hdr_read(__pyx_v_self->htsfile);
+
+        /* "pysam/csamfile.pyx":482
+ *                 if check_header:
+ *                     self.header = sam_hdr_read(self.htsfile)
+ *                     if self.header == NULL:             # <<<<<<<<<<<<<<
+ *                         raise ValueError(
+ *                             "file does not have valid header (mode='%s') "
+ */
+        __pyx_t_1 = ((__pyx_v_self->header == NULL) != 0);
+        if (__pyx_t_1) {
+
+          /* "pysam/csamfile.pyx":485
+ *                         raise ValueError(
+ *                             "file does not have valid header (mode='%s') "
+ *                             "- is it SAM format?" % mode )             # <<<<<<<<<<<<<<
+ *                     # self.header.ignore_sam_err = True
+ * 
+ */
+          __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_file_does_not_have_valid_header_2, __pyx_v_mode); 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);
+
+          /* "pysam/csamfile.pyx":483
+ *                     self.header = sam_hdr_read(self.htsfile)
+ *                     if self.header == NULL:
+ *                         raise ValueError(             # <<<<<<<<<<<<<<
+ *                             "file does not have valid header (mode='%s') "
+ *                             "- is it SAM format?" % mode )
+ */
+          __pyx_t_6 = PyTuple_New(1); 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);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
+          __Pyx_GIVEREF(__pyx_t_8);
+          __pyx_t_8 = 0;
+          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        goto __pyx_L32;
+      }
+      __pyx_L32:;
+    }
+    __pyx_L30:;
+
+    /* "pysam/csamfile.pyx":490
+ *             # disabled for autodetection to work needs to be disabled
+ *             # so that reading from sam-files without headers works
+ *             if check_sq and self.header.n_targets == 0:             # <<<<<<<<<<<<<<
+ *                 raise ValueError(
+ *                     ("file header is empty (mode='%s') - "
+ */
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check_sq); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+      __pyx_t_11 = (__pyx_v_self->header->n_targets == 0);
+      __pyx_t_2 = __pyx_t_11;
+    } else {
+      __pyx_t_2 = __pyx_t_1;
+    }
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":493
+ *                 raise ValueError(
+ *                     ("file header is empty (mode='%s') - "
+ *                      "is it SAM/BAM format?") % mode)             # <<<<<<<<<<<<<<
+ * 
+ *         if self.htsfile == NULL:
+ */
+      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_file_header_is_empty_mode_s_is_i, __pyx_v_mode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+
+      /* "pysam/csamfile.pyx":491
+ *             # so that reading from sam-files without headers works
+ *             if check_sq and self.header.n_targets == 0:
+ *                 raise ValueError(             # <<<<<<<<<<<<<<
+ *                     ("file header is empty (mode='%s') - "
+ *                      "is it SAM/BAM format?") % mode)
+ */
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    goto __pyx_L15;
+  }
+  __pyx_L15:;
+
+  /* "pysam/csamfile.pyx":495
+ *                      "is it SAM/BAM format?") % mode)
+ * 
+ *         if self.htsfile == NULL:             # <<<<<<<<<<<<<<
+ *             raise IOError("could not open file `%s`" % filename )
+ * 
+ */
+  __pyx_t_2 = ((__pyx_v_self->htsfile == NULL) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":496
+ * 
+ *         if self.htsfile == NULL:
+ *             raise IOError("could not open file `%s`" % filename )             # <<<<<<<<<<<<<<
+ * 
+ *         # check for index and open if present
+ */
+    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_could_not_open_file_s, __pyx_v_filename); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __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 = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__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 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":499
+ * 
+ *         # check for index and open if present
+ *         if mode[0] == "r" and self.isbam:             # <<<<<<<<<<<<<<
+ * 
+ *             if not self.isremote:
+ */
+  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_8);
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_r, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  if (__pyx_t_2) {
+    __pyx_t_1 = (__pyx_v_self->isbam != 0);
+  } else {
+    __pyx_t_1 = __pyx_t_2;
+  }
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":501
+ *         if mode[0] == "r" and self.isbam:
+ * 
+ *             if not self.isremote:             # <<<<<<<<<<<<<<
+ *                 if not os.path.exists(filename + b".bai") \
+ *                         and not os.path.exists( filename[:-4] + b".bai"):
+ */
+    __pyx_t_1 = ((!(__pyx_v_self->isremote != 0)) != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":502
+ * 
+ *             if not self.isremote:
+ *                 if not os.path.exists(filename + b".bai") \             # <<<<<<<<<<<<<<
+ *                         and not os.path.exists( filename[:-4] + b".bai"):
+ *                     self.index = NULL
+ */
+      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exists); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = PyNumber_Add(__pyx_v_filename, __pyx_kp_b_bai); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
+      __Pyx_GIVEREF(__pyx_t_6);
+      __pyx_t_6 = 0;
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_2 = ((!__pyx_t_1) != 0);
+      if (__pyx_t_2) {
+
+        /* "pysam/csamfile.pyx":503
+ *             if not self.isremote:
+ *                 if not os.path.exists(filename + b".bai") \
+ *                         and not os.path.exists( filename[:-4] + b".bai"):             # <<<<<<<<<<<<<<
+ *                     self.index = NULL
+ *                 else:
+ */
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_exists); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_filename, 0, -4, NULL, NULL, &__pyx_slice__10, 0, 1, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_kp_b_bai); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __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 = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+        __Pyx_GIVEREF(__pyx_t_8);
+        __pyx_t_8 = 0;
+        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_11 = ((!__pyx_t_1) != 0);
+        __pyx_t_1 = __pyx_t_11;
+      } else {
+        __pyx_t_1 = __pyx_t_2;
+      }
+      if (__pyx_t_1) {
+
+        /* "pysam/csamfile.pyx":504
+ *                 if not os.path.exists(filename + b".bai") \
+ *                         and not os.path.exists( filename[:-4] + b".bai"):
+ *                     self.index = NULL             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     # returns NULL if there is no index or index could not be opened
+ */
+        __pyx_v_self->index = NULL;
+        goto __pyx_L38;
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":507
+ *                 else:
+ *                     # returns NULL if there is no index or index could not be opened
+ *                     self.index = hts_idx_load(filename, HTS_FMT_BAI)             # <<<<<<<<<<<<<<
+ *                     if self.index == NULL:
+ *                         raise IOError("error while opening index `%s` " % filename )
+ */
+        __pyx_t_26 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_26) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_self->index = hts_idx_load(__pyx_t_26, HTS_FMT_BAI);
+
+        /* "pysam/csamfile.pyx":508
+ *                     # returns NULL if there is no index or index could not be opened
+ *                     self.index = hts_idx_load(filename, HTS_FMT_BAI)
+ *                     if self.index == NULL:             # <<<<<<<<<<<<<<
+ *                         raise IOError("error while opening index `%s` " % filename )
+ *             else:
+ */
+        __pyx_t_1 = ((__pyx_v_self->index == NULL) != 0);
+        if (__pyx_t_1) {
+
+          /* "pysam/csamfile.pyx":509
+ *                     self.index = hts_idx_load(filename, HTS_FMT_BAI)
+ *                     if self.index == NULL:
+ *                         raise IOError("error while opening index `%s` " % filename )             # <<<<<<<<<<<<<<
+ *             else:
+ *                 self.index = hts_idx_load(filename, HTS_FMT_BAI)
+ */
+          __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_error_while_opening_index_s, __pyx_v_filename); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+          __Pyx_GIVEREF(__pyx_t_8);
+          __pyx_t_8 = 0;
+          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+      }
+      __pyx_L38:;
+      goto __pyx_L37;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":511
+ *                         raise IOError("error while opening index `%s` " % filename )
+ *             else:
+ *                 self.index = hts_idx_load(filename, HTS_FMT_BAI)             # <<<<<<<<<<<<<<
+ *                 if self.index == NULL:
+ *                     warnings.warn("unable to open index for `%s` " % filename)
+ */
+      __pyx_t_26 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_26) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_self->index = hts_idx_load(__pyx_t_26, HTS_FMT_BAI);
+
+      /* "pysam/csamfile.pyx":512
+ *             else:
+ *                 self.index = hts_idx_load(filename, HTS_FMT_BAI)
+ *                 if self.index == NULL:             # <<<<<<<<<<<<<<
+ *                     warnings.warn("unable to open index for `%s` " % filename)
+ * 
+ */
+      __pyx_t_1 = ((__pyx_v_self->index == NULL) != 0);
+      if (__pyx_t_1) {
+
+        /* "pysam/csamfile.pyx":513
+ *                 self.index = hts_idx_load(filename, HTS_FMT_BAI)
+ *                 if self.index == NULL:
+ *                     warnings.warn("unable to open index for `%s` " % filename)             # <<<<<<<<<<<<<<
+ * 
+ *             if not self.isstream:
+ */
+        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warn); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_unable_to_open_index_for_s, __pyx_v_filename); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __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 = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__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 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        goto __pyx_L40;
+      }
+      __pyx_L40:;
+    }
+    __pyx_L37:;
+
+    /* "pysam/csamfile.pyx":515
+ *                     warnings.warn("unable to open index for `%s` " % filename)
+ * 
+ *             if not self.isstream:             # <<<<<<<<<<<<<<
+ *                 self.start_offset = bgzf_tell(self.fp)
+ * 
+ */
+    __pyx_t_1 = ((!(__pyx_v_self->isstream != 0)) != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":516
+ * 
+ *             if not self.isstream:
+ *                 self.start_offset = bgzf_tell(self.fp)             # <<<<<<<<<<<<<<
+ * 
+ *     def gettid( self, reference ):
+ */
+      __pyx_v_self->start_offset = bgzf_tell(__pyx_v_self->fp);
+      goto __pyx_L41;
+    }
+    __pyx_L41:;
+    goto __pyx_L36;
+  }
+  __pyx_L36:;
+
+  /* "pysam/csamfile.pyx":327
+ *         return self.index != NULL
+ * 
+ *     def _open(self,             # <<<<<<<<<<<<<<
+ *               filename,
+ *               mode=None,
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_bmode);
+  __Pyx_XDECREF(__pyx_v_n);
+  __Pyx_XDECREF(__pyx_v_x);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_ref);
+  __Pyx_XDECREF(__pyx_v_filename);
+  __Pyx_XDECREF(__pyx_v_referencenames);
+  __Pyx_XDECREF(__pyx_v_text);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":518
+ *                 self.start_offset = bgzf_tell(self.fp)
+ * 
+ *     def gettid( self, reference ):             # <<<<<<<<<<<<<<
+ *         '''
+ *         convert :term:`reference` name into numerical :term:`tid`
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_9gettid(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_8gettid[] = "Samfile.gettid(self, reference)\n\n        convert :term:`reference` name into numerical :term:`tid`\n\n        returns -1 if reference is not known.\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_9gettid(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("gettid (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_8gettid(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_8gettid(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  char const *__pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("gettid", 0);
+  __Pyx_TraceCall("gettid", __pyx_f[0], 518);
+  __Pyx_INCREF(__pyx_v_reference);
+
+  /* "pysam/csamfile.pyx":524
+ *         returns -1 if reference is not known.
+ *         '''
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ *         reference = _forceBytes(reference)
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_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 = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":525
+ *         '''
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         reference = _forceBytes(reference)
+ *         return bam_name2id(self.header, reference)
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":526
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ *         reference = _forceBytes(reference)             # <<<<<<<<<<<<<<
+ *         return bam_name2id(self.header, reference)
+ * 
+ */
+  __pyx_t_2 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_reference); 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_DECREF_SET(__pyx_v_reference, __pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":527
+ *             raise ValueError( "I/O operation on closed file" )
+ *         reference = _forceBytes(reference)
+ *         return bam_name2id(self.header, reference)             # <<<<<<<<<<<<<<
+ * 
+ *     def getrname( self, tid ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_reference); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyInt_From_int(bam_name2id(__pyx_v_self->header, __pyx_t_5)); 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_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":518
+ *                 self.start_offset = bgzf_tell(self.fp)
+ * 
+ *     def gettid( self, reference ):             # <<<<<<<<<<<<<<
+ *         '''
+ *         convert :term:`reference` name into numerical :term:`tid`
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.gettid", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_reference);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":529
+ *         return bam_name2id(self.header, reference)
+ * 
+ *     def getrname( self, tid ):             # <<<<<<<<<<<<<<
+ *         '''
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_11getrname(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_10getrname[] = "Samfile.getrname(self, tid)\n\n        convert numerical :term:`tid` into :term:`reference` name.";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_11getrname(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("getrname (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_10getrname(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), ((PyObject *)__pyx_v_tid));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_10getrname(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_tid) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  Py_ssize_t __pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getrname", 0);
+  __Pyx_TraceCall("getrname", __pyx_f[0], 529);
+
+  /* "pysam/csamfile.pyx":532
+ *         '''
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not 0 <= tid < self.header.n_targets:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __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 = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":533
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         if not 0 <= tid < self.header.n_targets:
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":534
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not 0 <= tid < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %
+ *                              (tid, self.header.n_targets ) )
+ */
+  __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_tid, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
+    __Pyx_DECREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_tid, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_3 = ((!__pyx_t_4) != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":536
+ *         if not 0 <= tid < self.header.n_targets:
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %
+ *                              (tid, self.header.n_targets ) )             # <<<<<<<<<<<<<<
+ *         return _charptr_to_str(self.header.target_name[tid])
+ * 
+ */
+    __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_self->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __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 = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_tid);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tid);
+    __Pyx_GIVEREF(__pyx_v_tid);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "pysam/csamfile.pyx":535
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not 0 <= tid < self.header.n_targets:
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %             # <<<<<<<<<<<<<<
+ *                              (tid, self.header.n_targets ) )
+ *         return _charptr_to_str(self.header.target_name[tid])
+ */
+    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_tid_i_out_of_range_0_tid_i, __pyx_t_1); 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_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 = 535; __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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":537
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %
+ *                              (tid, self.header.n_targets ) )
+ *         return _charptr_to_str(self.header.target_name[tid])             # <<<<<<<<<<<<<<
+ * 
+ *     cdef char * _getrname( self, int tid ): # TODO unused
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_tid); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_f_5pysam_8csamfile__charptr_to_str((__pyx_v_self->header->target_name[__pyx_t_5])); 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_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":529
+ *         return bam_name2id(self.header, reference)
+ * 
+ *     def getrname( self, tid ):             # <<<<<<<<<<<<<<
+ *         '''
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.getrname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":539
+ *         return _charptr_to_str(self.header.target_name[tid])
+ * 
+ *     cdef char * _getrname( self, int tid ): # TODO unused             # <<<<<<<<<<<<<<
+ *         '''
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ */
+
+static char *__pyx_f_5pysam_8csamfile_7Samfile__getrname(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, int __pyx_v_tid) {
+  char *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_getrname", 0);
+  __Pyx_TraceCall("_getrname", __pyx_f[0], 539);
+
+  /* "pysam/csamfile.pyx":542
+ *         '''
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError("I/O operation on closed file")
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __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 = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":543
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ *         if not self._isOpen():
+ *             raise ValueError("I/O operation on closed file")             # <<<<<<<<<<<<<<
+ * 
+ *         if not 0 <= tid < self.header.n_targets:
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":545
+ *             raise ValueError("I/O operation on closed file")
+ * 
+ *         if not 0 <= tid < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %
+ *                              (tid, self.header.n_targets ))
+ */
+  __pyx_t_4 = (0 <= __pyx_v_tid);
+  if (__pyx_t_4) {
+    __pyx_t_4 = (__pyx_v_tid < __pyx_v_self->header->n_targets);
+  }
+  __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":547
+ *         if not 0 <= tid < self.header.n_targets:
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %
+ *                              (tid, self.header.n_targets ))             # <<<<<<<<<<<<<<
+ *         return self.header.target_name[tid]
+ * 
+ */
+    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __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 = 547; __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);
+    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_2 = 0;
+    __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":546
+ * 
+ *         if not 0 <= tid < self.header.n_targets:
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %             # <<<<<<<<<<<<<<
+ *                              (tid, self.header.n_targets ))
+ *         return self.header.target_name[tid]
+ */
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_tid_i_out_of_range_0_tid_i, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __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 = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":548
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %
+ *                              (tid, self.header.n_targets ))
+ *         return self.header.target_name[tid]             # <<<<<<<<<<<<<<
+ * 
+ *     def _parseRegion(self,
+ */
+  __pyx_r = (__pyx_v_self->header->target_name[__pyx_v_tid]);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":539
+ *         return _charptr_to_str(self.header.target_name[tid])
+ * 
+ *     cdef char * _getrname( self, int tid ): # TODO unused             # <<<<<<<<<<<<<<
+ *         '''
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_WriteUnraisable("pysam.csamfile.Samfile._getrname", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":550
+ *         return self.header.target_name[tid]
+ * 
+ *     def _parseRegion(self,             # <<<<<<<<<<<<<<
+ *                      reference=None,
+ *                      start=None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_13_parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_12_parseRegion[] = "Samfile._parseRegion(self, reference=None, start=None, end=None, region=None, tid=None)\n\n        parse region information.\n\n        raise ValueError for for invalid regions.\n\n        returns a tuple of flag, tid, start and end. Flag indicates\n        whether some coordinates were supplied.\n\n        Note that regions are 1-based, while start,end are python coordinates.\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_13_parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_reference = 0;
+  PyObject *__pyx_v_start = 0;
+  PyObject *__pyx_v_end = 0;
+  PyObject *__pyx_v_region = 0;
+  PyObject *__pyx_v_tid = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_parseRegion (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,&__pyx_n_s_tid,0};
+    PyObject* values[5] = {0,0,0,0,0};
+
+    /* "pysam/csamfile.pyx":551
+ * 
+ *     def _parseRegion(self,
+ *                      reference=None,             # <<<<<<<<<<<<<<
+ *                      start=None,
+ *                      end=None,
+ */
+    values[0] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":552
+ *     def _parseRegion(self,
+ *                      reference=None,
+ *                      start=None,             # <<<<<<<<<<<<<<
+ *                      end=None,
+ *                      region=None,
+ */
+    values[1] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":553
+ *                      reference=None,
+ *                      start=None,
+ *                      end=None,             # <<<<<<<<<<<<<<
+ *                      region=None,
+ *                      tid=None):
+ */
+    values[2] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":554
+ *                      start=None,
+ *                      end=None,
+ *                      region=None,             # <<<<<<<<<<<<<<
+ *                      tid=None):
+ *         '''
+ */
+    values[3] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":555
+ *                      end=None,
+ *                      region=None,
+ *                      tid=None):             # <<<<<<<<<<<<<<
+ *         '''
+ *         parse region information.
+ */
+    values[4] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference);
+          if (value) { values[0] = value; kw_args--; }
+        }
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tid);
+          if (value) { values[4] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parseRegion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_reference = values[0];
+    __pyx_v_start = values[1];
+    __pyx_v_end = values[2];
+    __pyx_v_region = values[3];
+    __pyx_v_tid = values[4];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_parseRegion", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_12_parseRegion(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_tid);
+
+  /* "pysam/csamfile.pyx":550
+ *         return self.header.target_name[tid]
+ * 
+ *     def _parseRegion(self,             # <<<<<<<<<<<<<<
+ *                      reference=None,
+ *                      start=None,
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_12_parseRegion(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_tid) {
+  int __pyx_v_rtid;
+  PY_LONG_LONG __pyx_v_rstart;
+  PY_LONG_LONG __pyx_v_rend;
+  PyObject *__pyx_v_parts = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PY_LONG_LONG __pyx_t_6;
+  int __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  Py_ssize_t __pyx_t_12;
+  int __pyx_t_13;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_parseRegion", 0);
+  __Pyx_TraceCall("_parseRegion", __pyx_f[0], 550);
+  __Pyx_INCREF(__pyx_v_reference);
+  __Pyx_INCREF(__pyx_v_region);
+
+  /* "pysam/csamfile.pyx":570
+ *         cdef long long rend
+ * 
+ *         rtid = -1             # <<<<<<<<<<<<<<
+ *         rstart = 0
+ *         rend = max_pos
+ */
+  __pyx_v_rtid = -1;
+
+  /* "pysam/csamfile.pyx":571
+ * 
+ *         rtid = -1
+ *         rstart = 0             # <<<<<<<<<<<<<<
+ *         rend = max_pos
+ *         if start != None:
+ */
+  __pyx_v_rstart = 0;
+
+  /* "pysam/csamfile.pyx":572
+ *         rtid = -1
+ *         rstart = 0
+ *         rend = max_pos             # <<<<<<<<<<<<<<
+ *         if start != None:
+ *             try:
+ */
+  __pyx_v_rend = __pyx_v_5pysam_8csamfile_max_pos;
+
+  /* "pysam/csamfile.pyx":573
+ *         rstart = 0
+ *         rend = max_pos
+ *         if start != None:             # <<<<<<<<<<<<<<
+ *             try:
+ *                 rstart = start
+ */
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __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 = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":574
+ *         rend = max_pos
+ *         if start != None:
+ *             try:             # <<<<<<<<<<<<<<
+ *                 rstart = start
+ *             except OverflowError:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
+      __Pyx_XGOTREF(__pyx_t_3);
+      __Pyx_XGOTREF(__pyx_t_4);
+      __Pyx_XGOTREF(__pyx_t_5);
+      /*try:*/ {
+
+        /* "pysam/csamfile.pyx":575
+ *         if start != None:
+ *             try:
+ *                 rstart = start             # <<<<<<<<<<<<<<
+ *             except OverflowError:
+ *                 raise ValueError( 'start out of range (%i)' % start )
+ */
+        __pyx_t_6 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_start); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __pyx_v_rstart = __pyx_t_6;
+      }
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      goto __pyx_L11_try_end;
+      __pyx_L4_error:;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":576
+ *             try:
+ *                 rstart = start
+ *             except OverflowError:             # <<<<<<<<<<<<<<
+ *                 raise ValueError( 'start out of range (%i)' % start )
+ * 
+ */
+      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
+      if (__pyx_t_7) {
+        __Pyx_AddTraceback("pysam.csamfile.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_GOTREF(__pyx_t_9);
+
+        /* "pysam/csamfile.pyx":577
+ *                 rstart = start
+ *             except OverflowError:
+ *                 raise ValueError( 'start out of range (%i)' % start )             # <<<<<<<<<<<<<<
+ * 
+ *         if end != None:
+ */
+        __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_start_out_of_range_i, __pyx_v_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
+        __Pyx_GIVEREF(__pyx_t_10);
+        __pyx_t_10 = 0;
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        goto __pyx_L5_exception_handled;
+      }
+      goto __pyx_L6_except_error;
+      __pyx_L6_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_3);
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+      goto __pyx_L1_error;
+      __pyx_L5_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_3);
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+      __pyx_L11_try_end:;
+    }
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":579
+ *                 raise ValueError( 'start out of range (%i)' % start )
+ * 
+ *         if end != None:             # <<<<<<<<<<<<<<
+ *             try:
+ *                 rend = end
+ */
+  __pyx_t_9 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":580
+ * 
+ *         if end != None:
+ *             try:             # <<<<<<<<<<<<<<
+ *                 rend = end
+ *             except OverflowError:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
+      __Pyx_XGOTREF(__pyx_t_5);
+      __Pyx_XGOTREF(__pyx_t_4);
+      __Pyx_XGOTREF(__pyx_t_3);
+      /*try:*/ {
+
+        /* "pysam/csamfile.pyx":581
+ *         if end != None:
+ *             try:
+ *                 rend = end             # <<<<<<<<<<<<<<
+ *             except OverflowError:
+ *                 raise ValueError( 'end out of range (%i)' % end )
+ */
+        __pyx_t_6 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_end); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
+        __pyx_v_rend = __pyx_t_6;
+      }
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      goto __pyx_L22_try_end;
+      __pyx_L15_error:;
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __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;
+
+      /* "pysam/csamfile.pyx":582
+ *             try:
+ *                 rend = end
+ *             except OverflowError:             # <<<<<<<<<<<<<<
+ *                 raise ValueError( 'end out of range (%i)' % end )
+ * 
+ */
+      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
+      if (__pyx_t_7) {
+        __Pyx_AddTraceback("pysam.csamfile.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_GOTREF(__pyx_t_1);
+
+        /* "pysam/csamfile.pyx":583
+ *                 rend = end
+ *             except OverflowError:
+ *                 raise ValueError( 'end out of range (%i)' % end )             # <<<<<<<<<<<<<<
+ * 
+ *         if region:
+ */
+        __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_end_out_of_range_i, __pyx_v_end); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
+        __Pyx_GIVEREF(__pyx_t_10);
+        __pyx_t_10 = 0;
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        goto __pyx_L16_exception_handled;
+      }
+      goto __pyx_L17_except_error;
+      __pyx_L17_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_3);
+      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
+      goto __pyx_L1_error;
+      __pyx_L16_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_3);
+      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
+      __pyx_L22_try_end:;
+    }
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "pysam/csamfile.pyx":585
+ *                 raise ValueError( 'end out of range (%i)' % end )
+ * 
+ *         if region:             # <<<<<<<<<<<<<<
+ *             region = _forceStr(region)
+ *             parts = re.split("[:-]", region)
+ */
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":586
+ * 
+ *         if region:
+ *             region = _forceStr(region)             # <<<<<<<<<<<<<<
+ *             parts = re.split("[:-]", region)
+ *             reference = parts[0]
+ */
+    __pyx_t_1 = __pyx_f_5pysam_8csamfile__forceStr(__pyx_v_region); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":587
+ *         if region:
+ *             region = _forceStr(region)
+ *             parts = re.split("[:-]", region)             # <<<<<<<<<<<<<<
+ *             reference = parts[0]
+ *             if len(parts) >= 2:
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); 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_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __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 = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_kp_s__14);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__14);
+    __Pyx_GIVEREF(__pyx_kp_s__14);
+    __Pyx_INCREF(__pyx_v_region);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_region);
+    __Pyx_GIVEREF(__pyx_v_region);
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_parts = __pyx_t_9;
+    __pyx_t_9 = 0;
+
+    /* "pysam/csamfile.pyx":588
+ *             region = _forceStr(region)
+ *             parts = re.split("[:-]", region)
+ *             reference = parts[0]             # <<<<<<<<<<<<<<
+ *             if len(parts) >= 2:
+ *                 rstart = int(parts[1]) - 1
+ */
+    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF_SET(__pyx_v_reference, __pyx_t_9);
+    __pyx_t_9 = 0;
+
+    /* "pysam/csamfile.pyx":589
+ *             parts = re.split("[:-]", region)
+ *             reference = parts[0]
+ *             if len(parts) >= 2:             # <<<<<<<<<<<<<<
+ *                 rstart = int(parts[1]) - 1
+ *             if len(parts) >= 3:
+ */
+    __pyx_t_12 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = ((__pyx_t_12 >= 2) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":590
+ *             reference = parts[0]
+ *             if len(parts) >= 2:
+ *                 rstart = int(parts[1]) - 1             # <<<<<<<<<<<<<<
+ *             if len(parts) >= 3:
+ *                 rend = int(parts[2])
+ */
+      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_1 = PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_6 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_9); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_v_rstart = __pyx_t_6;
+      goto __pyx_L26;
+    }
+    __pyx_L26:;
+
+    /* "pysam/csamfile.pyx":591
+ *             if len(parts) >= 2:
+ *                 rstart = int(parts[1]) - 1
+ *             if len(parts) >= 3:             # <<<<<<<<<<<<<<
+ *                 rend = int(parts[2])
+ * 
+ */
+    __pyx_t_12 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = ((__pyx_t_12 >= 3) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":592
+ *                 rstart = int(parts[1]) - 1
+ *             if len(parts) >= 3:
+ *                 rend = int(parts[2])             # <<<<<<<<<<<<<<
+ * 
+ *         if not reference:
+ */
+      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_1 = PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_6 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_rend = __pyx_t_6;
+      goto __pyx_L27;
+    }
+    __pyx_L27:;
+    goto __pyx_L25;
+  }
+  __pyx_L25:;
+
+  /* "pysam/csamfile.pyx":594
+ *                 rend = int(parts[2])
+ * 
+ *         if not reference:             # <<<<<<<<<<<<<<
+ *             return 0, 0, 0, 0
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_13 = ((!__pyx_t_2) != 0);
+  if (__pyx_t_13) {
+
+    /* "pysam/csamfile.pyx":595
+ * 
+ *         if not reference:
+ *             return 0, 0, 0, 0             # <<<<<<<<<<<<<<
+ * 
+ *         if tid is not None:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_tuple__15);
+    __pyx_r = __pyx_tuple__15;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":597
+ *             return 0, 0, 0, 0
+ * 
+ *         if tid is not None:             # <<<<<<<<<<<<<<
+ *             rtid = tid
+ *         else:
+ */
+  __pyx_t_13 = (__pyx_v_tid != Py_None);
+  __pyx_t_2 = (__pyx_t_13 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":598
+ * 
+ *         if tid is not None:
+ *             rtid = tid             # <<<<<<<<<<<<<<
+ *         else:
+ *             rtid = self.gettid(reference)
+ */
+    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_tid); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_rtid = __pyx_t_7;
+    goto __pyx_L29;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":600
+ *             rtid = tid
+ *         else:
+ *             rtid = self.gettid(reference)             # <<<<<<<<<<<<<<
+ * 
+ *         if rtid < 0:
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gettid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = PyTuple_New(1); 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);
+    __Pyx_INCREF(__pyx_v_reference);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_reference);
+    __Pyx_GIVEREF(__pyx_v_reference);
+    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_v_rtid = __pyx_t_7;
+  }
+  __pyx_L29:;
+
+  /* "pysam/csamfile.pyx":602
+ *             rtid = self.gettid(reference)
+ * 
+ *         if rtid < 0:             # <<<<<<<<<<<<<<
+ *             raise ValueError(
+ *                 "invalid reference `%s`" % reference)
+ */
+  __pyx_t_2 = ((__pyx_v_rtid < 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":604
+ *         if rtid < 0:
+ *             raise ValueError(
+ *                 "invalid reference `%s`" % reference)             # <<<<<<<<<<<<<<
+ *         if rstart > rend:
+ *             raise ValueError(
+ */
+    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_invalid_reference_s, __pyx_v_reference); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+
+    /* "pysam/csamfile.pyx":603
+ * 
+ *         if rtid < 0:
+ *             raise ValueError(             # <<<<<<<<<<<<<<
+ *                 "invalid reference `%s`" % reference)
+ *         if rstart > rend:
+ */
+    __pyx_t_9 = PyTuple_New(1); 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);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+    __Pyx_GIVEREF(__pyx_t_8);
+    __pyx_t_8 = 0;
+    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":605
+ *             raise ValueError(
+ *                 "invalid reference `%s`" % reference)
+ *         if rstart > rend:             # <<<<<<<<<<<<<<
+ *             raise ValueError(
+ *                 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend))
+ */
+  __pyx_t_2 = ((__pyx_v_rstart > __pyx_v_rend) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":607
+ *         if rstart > rend:
+ *             raise ValueError(
+ *                 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend))             # <<<<<<<<<<<<<<
+ *         if not 0 <= rstart < max_pos:
+ *             raise ValueError('start out of range (%i)' % rstart)
+ */
+    __pyx_t_8 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_rstart); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_9 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_rend); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __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 = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__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_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_8 = 0;
+    __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_invalid_coordinates_start_i_end, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":606
+ *                 "invalid reference `%s`" % reference)
+ *         if rstart > rend:
+ *             raise ValueError(             # <<<<<<<<<<<<<<
+ *                 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend))
+ *         if not 0 <= rstart < max_pos:
+ */
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":608
+ *             raise ValueError(
+ *                 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend))
+ *         if not 0 <= rstart < max_pos:             # <<<<<<<<<<<<<<
+ *             raise ValueError('start out of range (%i)' % rstart)
+ *         if not 0 <= rend <= max_pos:
+ */
+  __pyx_t_2 = (0 <= __pyx_v_rstart);
+  if (__pyx_t_2) {
+    __pyx_t_2 = (__pyx_v_rstart < __pyx_v_5pysam_8csamfile_max_pos);
+  }
+  __pyx_t_13 = ((!(__pyx_t_2 != 0)) != 0);
+  if (__pyx_t_13) {
+
+    /* "pysam/csamfile.pyx":609
+ *                 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend))
+ *         if not 0 <= rstart < max_pos:
+ *             raise ValueError('start out of range (%i)' % rstart)             # <<<<<<<<<<<<<<
+ *         if not 0 <= rend <= max_pos:
+ *             raise ValueError('end out of range (%i)' % rend)
+ */
+    __pyx_t_9 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_rstart); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_start_out_of_range_i, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __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 = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":610
+ *         if not 0 <= rstart < max_pos:
+ *             raise ValueError('start out of range (%i)' % rstart)
+ *         if not 0 <= rend <= max_pos:             # <<<<<<<<<<<<<<
+ *             raise ValueError('end out of range (%i)' % rend)
+ * 
+ */
+  __pyx_t_13 = (0 <= __pyx_v_rend);
+  if (__pyx_t_13) {
+    __pyx_t_13 = (__pyx_v_rend <= __pyx_v_5pysam_8csamfile_max_pos);
+  }
+  __pyx_t_2 = ((!(__pyx_t_13 != 0)) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":611
+ *             raise ValueError('start out of range (%i)' % rstart)
+ *         if not 0 <= rend <= max_pos:
+ *             raise ValueError('end out of range (%i)' % rend)             # <<<<<<<<<<<<<<
+ * 
+ *         return 1, rtid, rstart, rend
+ */
+    __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_rend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_end_out_of_range_i, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __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 = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":613
+ *             raise ValueError('end out of range (%i)' % rend)
+ * 
+ *         return 1, rtid, rstart, rend             # <<<<<<<<<<<<<<
+ * 
+ *     def reset(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_rtid); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_rstart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_8 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_rend); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __Pyx_INCREF(__pyx_int_1);
+  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_int_1);
+  __Pyx_GIVEREF(__pyx_int_1);
+  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
+  __pyx_t_9 = 0;
+  __pyx_t_1 = 0;
+  __pyx_t_8 = 0;
+  __pyx_r = __pyx_t_10;
+  __pyx_t_10 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":550
+ *         return self.header.target_name[tid]
+ * 
+ *     def _parseRegion(self,             # <<<<<<<<<<<<<<
+ *                      reference=None,
+ *                      start=None,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_parts);
+  __Pyx_XDECREF(__pyx_v_reference);
+  __Pyx_XDECREF(__pyx_v_region);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":615
+ *         return 1, rtid, rstart, rend
+ * 
+ *     def reset(self):             # <<<<<<<<<<<<<<
+ *         '''reset file position to beginning of read section.'''
+ *         return self.seek(self.start_offset, 0)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_14reset[] = "Samfile.reset(self)\nreset file position to beginning of read section.";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_14reset(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_14reset(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("reset", 0);
+  __Pyx_TraceCall("reset", __pyx_f[0], 615);
+
+  /* "pysam/csamfile.pyx":617
+ *     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):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_self->start_offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __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 = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_int_0);
+  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
+  __Pyx_GIVEREF(__pyx_int_0);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __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_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":615
+ *         return 1, rtid, rstart, rend
+ * 
+ *     def reset(self):             # <<<<<<<<<<<<<<
+ *         '''reset file position to beginning of read section.'''
+ *         return self.seek(self.start_offset, 0)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":619
+ *         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`.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_17seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_16seek[] = "Samfile.seek(self, uint64_t offset, int where=0)\n\n        move file pointer to position *offset*, see :meth:`pysam.Samfile.tell`.\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_17seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  uint64_t __pyx_v_offset;
+  int __pyx_v_where;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("seek (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_where,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_where);
+          if (value) { values[1] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_offset = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_offset == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    if (values[1]) {
+      __pyx_v_where = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_where == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_where = ((int)0);
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("seek", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_16seek(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_offset, __pyx_v_where);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_16seek(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, uint64_t __pyx_v_offset, int __pyx_v_where) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("seek", 0);
+  __Pyx_TraceCall("seek", __pyx_f[0], 619);
+
+  /* "pysam/csamfile.pyx":624
+ *         '''
+ * 
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not self.isbam:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __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 = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":625
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         if not self.isbam:
+ *             raise NotImplementedError("seek only available in bam files")
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":626
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not self.isbam:             # <<<<<<<<<<<<<<
+ *             raise NotImplementedError("seek only available in bam files")
+ *         if self.isstream:
+ */
+  __pyx_t_4 = ((!(__pyx_v_self->isbam != 0)) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":627
+ *             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")
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__17, NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":628
+ *         if not self.isbam:
+ *             raise NotImplementedError("seek only available in bam files")
+ *         if self.isstream:             # <<<<<<<<<<<<<<
+ *             raise OSError("seek no available in streams")
+ * 
+ */
+  __pyx_t_4 = (__pyx_v_self->isstream != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":629
+ *             raise NotImplementedError("seek only available in bam files")
+ *         if self.isstream:
+ *             raise OSError("seek no available in streams")             # <<<<<<<<<<<<<<
+ * 
+ *         return bgzf_seek(self.fp, offset, where)
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__18, NULL); 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);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":631
+ *             raise OSError("seek no available in streams")
+ * 
+ *         return bgzf_seek(self.fp, offset, where)             # <<<<<<<<<<<<<<
+ * 
+ *     def tell(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyInt_From_int64_t(bgzf_seek(__pyx_v_self->fp, __pyx_v_offset, __pyx_v_where)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":619
+ *         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`.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":633
+ *         return bgzf_seek(self.fp, offset, where)
+ * 
+ *     def tell(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         return current file position
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_19tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_18tell[] = "Samfile.tell(self)\n\n        return current file position\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_19tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("tell (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_18tell(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_18tell(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("tell", 0);
+  __Pyx_TraceCall("tell", __pyx_f[0], 633);
+
+  /* "pysam/csamfile.pyx":637
+ *         return current file position
+ *         '''
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not self.isbam:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __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 = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":638
+ *         '''
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         if not self.isbam:
+ *             raise NotImplementedError("seek only available in bam files")
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":639
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not self.isbam:             # <<<<<<<<<<<<<<
+ *             raise NotImplementedError("seek only available in bam files")
+ * 
+ */
+  __pyx_t_4 = ((!(__pyx_v_self->isbam != 0)) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":640
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not self.isbam:
+ *             raise NotImplementedError("seek only available in bam files")             # <<<<<<<<<<<<<<
+ * 
+ *         return bgzf_tell(self.fp)
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":642
+ *             raise NotImplementedError("seek only available in bam files")
+ * 
+ *         return bgzf_tell(self.fp)             # <<<<<<<<<<<<<<
+ * 
+ *     def fetch(self,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyInt_From_int64_t(bgzf_tell(__pyx_v_self->fp)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":633
+ *         return bgzf_seek(self.fp, offset, where)
+ * 
+ *     def tell(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         return current file position
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.tell", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":644
+ *         return bgzf_tell(self.fp)
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_21fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_20fetch[] = "Samfile.fetch(self, reference=None, start=None, end=None, region=None, tid=None, callback=None, until_eof=False, reopen=True)\nfetch aligned reads in a :term:`region` using 0-based indexing. The\n        region is specified by :term:`reference`, *start* and\n        *end*. Alternatively, a samtools :term:`region` string can be\n        supplied.\n\n        Without *reference* or *region* all mapped reads will be\n        fetche [...]
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_21fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_reference = 0;
+  PyObject *__pyx_v_start = 0;
+  PyObject *__pyx_v_end = 0;
+  PyObject *__pyx_v_region = 0;
+  PyObject *__pyx_v_tid = 0;
+  PyObject *__pyx_v_callback = 0;
+  PyObject *__pyx_v_until_eof = 0;
+  PyObject *__pyx_v_reopen = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,&__pyx_n_s_tid,&__pyx_n_s_callback,&__pyx_n_s_until_eof,&__pyx_n_s_reopen,0};
+    PyObject* values[8] = {0,0,0,0,0,0,0,0};
+
+    /* "pysam/csamfile.pyx":645
+ * 
+ *     def fetch(self,
+ *               reference=None,             # <<<<<<<<<<<<<<
+ *               start=None,
+ *               end=None,
+ */
+    values[0] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":646
+ *     def fetch(self,
+ *               reference=None,
+ *               start=None,             # <<<<<<<<<<<<<<
+ *               end=None,
+ *               region=None,
+ */
+    values[1] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":647
+ *               reference=None,
+ *               start=None,
+ *               end=None,             # <<<<<<<<<<<<<<
+ *               region=None,
+ *               tid=None,
+ */
+    values[2] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":648
+ *               start=None,
+ *               end=None,
+ *               region=None,             # <<<<<<<<<<<<<<
+ *               tid=None,
+ *               callback=None,
+ */
+    values[3] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":649
+ *               end=None,
+ *               region=None,
+ *               tid=None,             # <<<<<<<<<<<<<<
+ *               callback=None,
+ *               until_eof=False,
+ */
+    values[4] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":650
+ *               region=None,
+ *               tid=None,
+ *               callback=None,             # <<<<<<<<<<<<<<
+ *               until_eof=False,
+ *               reopen=True):
+ */
+    values[5] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":651
+ *               tid=None,
+ *               callback=None,
+ *               until_eof=False,             # <<<<<<<<<<<<<<
+ *               reopen=True):
+ *         '''fetch aligned reads in a :term:`region` using 0-based indexing. The
+ */
+    values[6] = ((PyObject *)Py_False);
+
+    /* "pysam/csamfile.pyx":652
+ *               callback=None,
+ *               until_eof=False,
+ *               reopen=True):             # <<<<<<<<<<<<<<
+ *         '''fetch aligned reads in a :term:`region` using 0-based indexing. The
+ *         region is specified by :term:`reference`, *start* and
+ */
+    values[7] = ((PyObject *)Py_True);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference);
+          if (value) { values[0] = value; kw_args--; }
+        }
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tid);
+          if (value) { values[4] = value; kw_args--; }
+        }
+        case  5:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback);
+          if (value) { values[5] = value; kw_args--; }
+        }
+        case  6:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_until_eof);
+          if (value) { values[6] = value; kw_args--; }
+        }
+        case  7:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reopen);
+          if (value) { values[7] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_reference = values[0];
+    __pyx_v_start = values[1];
+    __pyx_v_end = values[2];
+    __pyx_v_region = values[3];
+    __pyx_v_tid = values[4];
+    __pyx_v_callback = values[5];
+    __pyx_v_until_eof = values[6];
+    __pyx_v_reopen = values[7];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_20fetch(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_tid, __pyx_v_callback, __pyx_v_until_eof, __pyx_v_reopen);
+
+  /* "pysam/csamfile.pyx":644
+ *         return bgzf_tell(self.fp)
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_20fetch(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_tid, PyObject *__pyx_v_callback, PyObject *__pyx_v_until_eof, PyObject *__pyx_v_reopen) {
+  int __pyx_v_rtid;
+  int __pyx_v_rstart;
+  int __pyx_v_rend;
+  int __pyx_v_has_coord;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  int __pyx_t_10;
+  int __pyx_t_11;
+  int __pyx_t_12;
+  int __pyx_t_13;
+  int __pyx_t_14;
+  int __pyx_t_15;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("fetch", 0);
+  __Pyx_TraceCall("fetch", __pyx_f[0], 644);
+  __Pyx_INCREF(__pyx_v_reopen);
+
+  /* "pysam/csamfile.pyx":685
+ *         cdef int rtid, rstart, rend, has_coord
+ * 
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __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 = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":686
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(reference,
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":688
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(reference,             # <<<<<<<<<<<<<<
+ *                                                           start,
+ *                                                           end,
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+
+  /* "pysam/csamfile.pyx":692
+ *                                                           end,
+ *                                                           region,
+ *                                                           tid)             # <<<<<<<<<<<<<<
+ * 
+ *         # Turn of re-opening if htsfile is a stream
+ */
+  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_reference);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
+  __Pyx_GIVEREF(__pyx_v_reference);
+  __Pyx_INCREF(__pyx_v_start);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
+  __Pyx_GIVEREF(__pyx_v_start);
+  __Pyx_INCREF(__pyx_v_end);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
+  __Pyx_GIVEREF(__pyx_v_end);
+  __Pyx_INCREF(__pyx_v_region);
+  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
+  __Pyx_GIVEREF(__pyx_v_region);
+  __Pyx_INCREF(__pyx_v_tid);
+  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_tid);
+  __Pyx_GIVEREF(__pyx_v_tid);
+
+  /* "pysam/csamfile.pyx":688
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(reference,             # <<<<<<<<<<<<<<
+ *                                                           start,
+ *                                                           end,
+ */
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+    PyObject* sequence = __pyx_t_5;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    Py_ssize_t size = Py_SIZE(sequence);
+    #else
+    Py_ssize_t size = PySequence_Size(sequence);
+    #endif
+    if (unlikely(size != 4)) {
+      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
+      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
+      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
+    } else {
+      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
+      __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
+      __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
+    }
+    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_7);
+    #else
+    {
+      Py_ssize_t i;
+      PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
+      for (i=0; i < 4; i++) {
+        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(item);
+        *(temps[i]) = item;
+      }
+    }
+    #endif
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
+    __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+    for (index=0; index < 4; index++) {
+      PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
+      __Pyx_GOTREF(item);
+      *(temps[index]) = item;
+    }
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = NULL;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    goto __pyx_L5_unpacking_done;
+    __pyx_L4_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_9 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L5_unpacking_done:;
+  }
+  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_v_has_coord = __pyx_t_10;
+  __pyx_v_rtid = __pyx_t_11;
+  __pyx_v_rstart = __pyx_t_12;
+  __pyx_v_rend = __pyx_t_13;
+
+  /* "pysam/csamfile.pyx":695
+ * 
+ *         # Turn of re-opening if htsfile is a stream
+ *         if self.isstream:             # <<<<<<<<<<<<<<
+ *             reopen = False
+ * 
+ */
+  __pyx_t_4 = (__pyx_v_self->isstream != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":696
+ *         # Turn of re-opening if htsfile is a stream
+ *         if self.isstream:
+ *             reopen = False             # <<<<<<<<<<<<<<
+ * 
+ *         if self.isbam:
+ */
+    __Pyx_INCREF(Py_False);
+    __Pyx_DECREF_SET(__pyx_v_reopen, Py_False);
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "pysam/csamfile.pyx":698
+ *             reopen = False
+ * 
+ *         if self.isbam:             # <<<<<<<<<<<<<<
+ *             if not until_eof and not self._hasIndex() and not self.isremote:
+ *                 raise ValueError( "fetch called on bamfile without index" )
+ */
+  __pyx_t_4 = (__pyx_v_self->isbam != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":699
+ * 
+ *         if self.isbam:
+ *             if not until_eof and not self._hasIndex() and not self.isremote:             # <<<<<<<<<<<<<<
+ *                 raise ValueError( "fetch called on bamfile without index" )
+ * 
+ */
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = ((!__pyx_t_4) != 0);
+    if (__pyx_t_3) {
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __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 = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_14 = ((!__pyx_t_4) != 0);
+      if (__pyx_t_14) {
+        __pyx_t_4 = ((!(__pyx_v_self->isremote != 0)) != 0);
+        __pyx_t_15 = __pyx_t_4;
+      } else {
+        __pyx_t_15 = __pyx_t_14;
+      }
+      __pyx_t_14 = __pyx_t_15;
+    } else {
+      __pyx_t_14 = __pyx_t_3;
+    }
+    if (__pyx_t_14) {
+
+      /* "pysam/csamfile.pyx":700
+ *         if self.isbam:
+ *             if not until_eof and not self._hasIndex() and not self.isremote:
+ *                 raise ValueError( "fetch called on bamfile without index" )             # <<<<<<<<<<<<<<
+ * 
+ *             if has_coord:
+ */
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":702
+ *                 raise ValueError( "fetch called on bamfile without index" )
+ * 
+ *             if has_coord:             # <<<<<<<<<<<<<<
+ *                 return IteratorRowRegion(self, rtid, rstart, rend,
+ *                                          reopen=reopen)
+ */
+    __pyx_t_14 = (__pyx_v_has_coord != 0);
+    if (__pyx_t_14) {
+
+      /* "pysam/csamfile.pyx":703
+ * 
+ *             if has_coord:
+ *                 return IteratorRowRegion(self, rtid, rstart, rend,             # <<<<<<<<<<<<<<
+ *                                          reopen=reopen)
+ *             else:
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_rtid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rstart); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_2 = PyTuple_New(4); 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_INCREF(((PyObject *)__pyx_v_self));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_6);
+      __Pyx_GIVEREF(__pyx_t_6);
+      __pyx_t_7 = 0;
+      __pyx_t_5 = 0;
+      __pyx_t_6 = 0;
+      __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+
+      /* "pysam/csamfile.pyx":704
+ *             if has_coord:
+ *                 return IteratorRowRegion(self, rtid, rstart, rend,
+ *                                          reopen=reopen)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 if until_eof:
+ */
+      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_reopen, __pyx_v_reopen) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+      /* "pysam/csamfile.pyx":703
+ * 
+ *             if has_coord:
+ *                 return IteratorRowRegion(self, rtid, rstart, rend,             # <<<<<<<<<<<<<<
+ *                                          reopen=reopen)
+ *             else:
+ */
+      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowRegion)), __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __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_r = __pyx_t_5;
+      __pyx_t_5 = 0;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":706
+ *                                          reopen=reopen)
+ *             else:
+ *                 if until_eof:             # <<<<<<<<<<<<<<
+ *                     return IteratorRowAll(self, reopen=reopen)
+ *                 else:
+ */
+      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_14) {
+
+        /* "pysam/csamfile.pyx":707
+ *             else:
+ *                 if until_eof:
+ *                     return IteratorRowAll(self, reopen=reopen)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     # AH: check - reason why no reopen for AllRefs?
+ */
+        __Pyx_XDECREF(__pyx_r);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_INCREF(((PyObject *)__pyx_v_self));
+        PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self));
+        __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+        __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_reopen, __pyx_v_reopen) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowAll)), __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __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_6); __pyx_t_6 = 0;
+        __pyx_r = __pyx_t_2;
+        __pyx_t_2 = 0;
+        goto __pyx_L0;
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":710
+ *                 else:
+ *                     # AH: check - reason why no reopen for AllRefs?
+ *                     return IteratorRowAllRefs(self) # , reopen=reopen )             # <<<<<<<<<<<<<<
+ *         else:
+ *             if has_coord:
+ */
+        __Pyx_XDECREF(__pyx_r);
+        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_INCREF(((PyObject *)__pyx_v_self));
+        PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+        __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowAllRefs)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_r = __pyx_t_6;
+        __pyx_t_6 = 0;
+        goto __pyx_L0;
+      }
+    }
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":712
+ *                     return IteratorRowAllRefs(self) # , reopen=reopen )
+ *         else:
+ *             if has_coord:             # <<<<<<<<<<<<<<
+ *                 raise ValueError ("fetching by region is not available for sam files")
+ * 
+ */
+    __pyx_t_14 = (__pyx_v_has_coord != 0);
+    if (__pyx_t_14) {
+
+      /* "pysam/csamfile.pyx":713
+ *         else:
+ *             if has_coord:
+ *                 raise ValueError ("fetching by region is not available for sam files")             # <<<<<<<<<<<<<<
+ * 
+ *             if callback:
+ */
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":715
+ *                 raise ValueError ("fetching by region is not available for sam files")
+ * 
+ *             if callback:             # <<<<<<<<<<<<<<
+ *                 raise NotImplementedError("callback not implemented yet")
+ * 
+ */
+    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_14) {
+
+      /* "pysam/csamfile.pyx":716
+ * 
+ *             if callback:
+ *                 raise NotImplementedError("callback not implemented yet")             # <<<<<<<<<<<<<<
+ * 
+ *             if self.header == NULL:
+ */
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":718
+ *                 raise NotImplementedError("callback not implemented yet")
+ * 
+ *             if self.header == NULL:             # <<<<<<<<<<<<<<
+ *                 raise ValueError("fetch called for htsfile without header")
+ * 
+ */
+    __pyx_t_14 = ((__pyx_v_self->header == NULL) != 0);
+    if (__pyx_t_14) {
+
+      /* "pysam/csamfile.pyx":719
+ * 
+ *             if self.header == NULL:
+ *                 raise ValueError("fetch called for htsfile without header")             # <<<<<<<<<<<<<<
+ * 
+ *             # check if targets are defined
+ */
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":723
+ *             # check if targets are defined
+ *             # give warning, sam_read1 segfaults
+ *             if self.header.n_targets == 0:             # <<<<<<<<<<<<<<
+ *                 warnings.warn("fetch called for htsfile without header")
+ * 
+ */
+    __pyx_t_14 = ((__pyx_v_self->header->n_targets == 0) != 0);
+    if (__pyx_t_14) {
+
+      /* "pysam/csamfile.pyx":724
+ *             # give warning, sam_read1 segfaults
+ *             if self.header.n_targets == 0:
+ *                 warnings.warn("fetch called for htsfile without header")             # <<<<<<<<<<<<<<
+ * 
+ *             return IteratorRowAll(self, reopen=reopen)
+ */
+      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      goto __pyx_L14;
+    }
+    __pyx_L14:;
+
+    /* "pysam/csamfile.pyx":726
+ *                 warnings.warn("fetch called for htsfile without header")
+ * 
+ *             return IteratorRowAll(self, reopen=reopen)             # <<<<<<<<<<<<<<
+ * 
+ *     def head(self, n):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reopen, __pyx_v_reopen) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowAll)), __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __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_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_5;
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":644
+ *         return bgzf_tell(self.fp)
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_reopen);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":728
+ *             return IteratorRowAll(self, reopen=reopen)
+ * 
+ *     def head(self, n):             # <<<<<<<<<<<<<<
+ *         '''
+ *         return iterator over the first n alignments.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_23head(PyObject *__pyx_v_self, PyObject *__pyx_v_n); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_22head[] = "Samfile.head(self, n)\n\n        return iterator over the first n alignments. \n\n        This is useful for inspecting the bam-file.\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_23head(PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("head (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_22head(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), ((PyObject *)__pyx_v_n));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_22head(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_n) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("head", 0);
+  __Pyx_TraceCall("head", __pyx_f[0], 728);
+
+  /* "pysam/csamfile.pyx":734
+ *         This is useful for inspecting the bam-file.
+ *         '''
+ *         return IteratorRowHead(self, n)             # <<<<<<<<<<<<<<
+ * 
+ *     def mate(self,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(__pyx_v_n);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_n);
+  __Pyx_GIVEREF(__pyx_v_n);
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowHead)), __pyx_t_1, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":728
+ *             return IteratorRowAll(self, reopen=reopen)
+ * 
+ *     def head(self, n):             # <<<<<<<<<<<<<<
+ *         '''
+ *         return iterator over the first n alignments.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.head", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":736
+ *         return IteratorRowHead(self, n)
+ * 
+ *     def mate(self,             # <<<<<<<<<<<<<<
+ *              AlignedRead read):
+ *         '''return the mate of :class:`AlignedRead` *read*.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_25mate(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_24mate[] = "Samfile.mate(self, AlignedRead read)\nreturn the mate of :class:`AlignedRead` *read*.\n\n        Throws a ValueError if read is unpaired or the mate\n        is unmapped.\n\n        .. note::\n\n            Calling this method will change the file position.\n            This might interfere with any iterators that have\n            not re-opened the file.\n\n        .. note::\n  \n           This method is too slow for high-thro [...]
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_25mate(PyObject *__pyx_v_self, PyObject *__pyx_v_read) {
+  CYTHON_UNUSED int __pyx_lineno = 0;
+  CYTHON_UNUSED const char *__pyx_filename = NULL;
+  CYTHON_UNUSED int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("mate (wrapper)", 0);
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_5pysam_8csamfile_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_24mate(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_read));
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_24mate(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_read) {
+  uint32_t __pyx_v_flag;
+  int __pyx_v_x;
+  PyObject *__pyx_v_mate = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  Py_ssize_t __pyx_t_7;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  int __pyx_t_9;
+  int __pyx_t_10;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("mate", 0);
+  __Pyx_TraceCall("mate", __pyx_f[0], 736);
+
+  /* "pysam/csamfile.pyx":756
+ * 
+ *         '''
+ *         cdef uint32_t flag = read._delegate.core.flag             # <<<<<<<<<<<<<<
+ * 
+ *         if flag & BAM_FPAIRED == 0:
+ */
+  __pyx_t_1 = __pyx_v_read->_delegate->core.flag;
+  __pyx_v_flag = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":758
+ *         cdef uint32_t flag = read._delegate.core.flag
+ * 
+ *         if flag & BAM_FPAIRED == 0:             # <<<<<<<<<<<<<<
+ *             raise ValueError("read %s: is unpaired" % (read.qname))
+ *         if flag & BAM_FMUNMAP != 0:
+ */
+  __pyx_t_2 = (((__pyx_v_flag & BAM_FPAIRED) == 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":759
+ * 
+ *         if flag & BAM_FPAIRED == 0:
+ *             raise ValueError("read %s: is unpaired" % (read.qname))             # <<<<<<<<<<<<<<
+ *         if flag & BAM_FMUNMAP != 0:
+ *             raise ValueError("mate %s: is unmapped" % (read.qname))
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_read), __pyx_n_s_qname); 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_4 = __Pyx_PyString_Format(__pyx_kp_s_read_s_is_unpaired, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __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 = 759; __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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __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, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":760
+ *         if flag & BAM_FPAIRED == 0:
+ *             raise ValueError("read %s: is unpaired" % (read.qname))
+ *         if flag & BAM_FMUNMAP != 0:             # <<<<<<<<<<<<<<
+ *             raise ValueError("mate %s: is unmapped" % (read.qname))
+ * 
+ */
+  __pyx_t_2 = (((__pyx_v_flag & BAM_FMUNMAP) != 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":761
+ *             raise ValueError("read %s: is unpaired" % (read.qname))
+ *         if flag & BAM_FMUNMAP != 0:
+ *             raise ValueError("mate %s: is unmapped" % (read.qname))             # <<<<<<<<<<<<<<
+ * 
+ *         # xor flags to get the other mate
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_read), __pyx_n_s_qname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_mate_s_is_unmapped, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":764
+ * 
+ *         # xor flags to get the other mate
+ *         cdef int x = BAM_FREAD1 + BAM_FREAD2             # <<<<<<<<<<<<<<
+ *         flag = (flag ^ x) & x
+ * 
+ */
+  __pyx_v_x = (BAM_FREAD1 + BAM_FREAD2);
+
+  /* "pysam/csamfile.pyx":765
+ *         # xor flags to get the other mate
+ *         cdef int x = BAM_FREAD1 + BAM_FREAD2
+ *         flag = (flag ^ x) & x             # <<<<<<<<<<<<<<
+ * 
+ *         # the following code is not using the C API and
+ */
+  __pyx_v_flag = ((__pyx_v_flag ^ __pyx_v_x) & __pyx_v_x);
+
+  /* "pysam/csamfile.pyx":769
+ *         # the following code is not using the C API and
+ *         # could thus be made much quicker
+ *         for mate in self.fetch(             # <<<<<<<<<<<<<<
+ *                 read._delegate.core.mpos,
+ *                 read._delegate.core.mpos + 1,
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fetch); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+
+  /* "pysam/csamfile.pyx":770
+ *         # could thus be made much quicker
+ *         for mate in self.fetch(
+ *                 read._delegate.core.mpos,             # <<<<<<<<<<<<<<
+ *                 read._delegate.core.mpos + 1,
+ *                 tid=read._delegate.core.mtid):
+ */
+  __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_read->_delegate->core.mpos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+
+  /* "pysam/csamfile.pyx":771
+ *         for mate in self.fetch(
+ *                 read._delegate.core.mpos,
+ *                 read._delegate.core.mpos + 1,             # <<<<<<<<<<<<<<
+ *                 tid=read._delegate.core.mtid):
+ *             if mate.flag & flag != 0 and \
+ */
+  __pyx_t_5 = __Pyx_PyInt_From_long((__pyx_v_read->_delegate->core.mpos + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+
+  /* "pysam/csamfile.pyx":769
+ *         # the following code is not using the C API and
+ *         # could thus be made much quicker
+ *         for mate in self.fetch(             # <<<<<<<<<<<<<<
+ *                 read._delegate.core.mpos,
+ *                 read._delegate.core.mpos + 1,
+ */
+  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  __pyx_t_4 = 0;
+  __pyx_t_5 = 0;
+  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+
+  /* "pysam/csamfile.pyx":772
+ *                 read._delegate.core.mpos,
+ *                 read._delegate.core.mpos + 1,
+ *                 tid=read._delegate.core.mtid):             # <<<<<<<<<<<<<<
+ *             if mate.flag & flag != 0 and \
+ *                mate.qname == read.qname:
+ */
+  __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_read->_delegate->core.mtid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_tid, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":769
+ *         # the following code is not using the C API and
+ *         # could thus be made much quicker
+ *         for mate in self.fetch(             # <<<<<<<<<<<<<<
+ *                 read._delegate.core.mpos,
+ *                 read._delegate.core.mpos + 1,
+ */
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __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_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
+    __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
+    __pyx_t_8 = NULL;
+  } else {
+    __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  for (;;) {
+    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_5)) {
+      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_5)) {
+      if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_4 = __pyx_t_8(__pyx_t_5);
+      if (unlikely(!__pyx_t_4)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_mate, __pyx_t_4);
+    __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":773
+ *                 read._delegate.core.mpos + 1,
+ *                 tid=read._delegate.core.mtid):
+ *             if mate.flag & flag != 0 and \             # <<<<<<<<<<<<<<
+ *                mate.qname == read.qname:
+ *                 break
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mate, __pyx_n_s_flag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_flag); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = PyNumber_And(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __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_6); __pyx_t_6 = 0;
+    __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":774
+ *                 tid=read._delegate.core.mtid):
+ *             if mate.flag & flag != 0 and \
+ *                mate.qname == read.qname:             # <<<<<<<<<<<<<<
+ *                 break
+ *         else:
+ */
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_mate, __pyx_n_s_qname); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_read), __pyx_n_s_qname); 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_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_10 = __pyx_t_9;
+    } else {
+      __pyx_t_10 = __pyx_t_2;
+    }
+    if (__pyx_t_10) {
+
+      /* "pysam/csamfile.pyx":775
+ *             if mate.flag & flag != 0 and \
+ *                mate.qname == read.qname:
+ *                 break             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise ValueError("mate not found")
+ */
+      goto __pyx_L6_break;
+    }
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":777
+ *                 break
+ *         else:
+ *             raise ValueError("mate not found")             # <<<<<<<<<<<<<<
+ * 
+ *         return mate
+ */
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L6_break:;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "pysam/csamfile.pyx":779
+ *             raise ValueError("mate not found")
+ * 
+ *         return mate             # <<<<<<<<<<<<<<
+ * 
+ *     def count(self,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_mate);
+  __pyx_r = __pyx_v_mate;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":736
+ *         return IteratorRowHead(self, n)
+ * 
+ *     def mate(self,             # <<<<<<<<<<<<<<
+ *              AlignedRead read):
+ *         '''return the mate of :class:`AlignedRead` *read*.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.mate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_mate);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":781
+ *         return mate
+ * 
+ *     def count(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_27count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_26count[] = "Samfile.count(self, reference=None, start=None, end=None, region=None, until_eof=False)\n*(reference = None, start = None, end = None,\n        region = None, callback = None, until_eof = False)*\n\n        count reads :term:`region` using 0-based indexing. The region\n        is specified by :term:`reference`, *start* and\n        *end*. Alternatively, a samtools :term:`region` string can be\n        supplied.\n\n        Note  [...]
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_27count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_reference = 0;
+  PyObject *__pyx_v_start = 0;
+  PyObject *__pyx_v_end = 0;
+  PyObject *__pyx_v_region = 0;
+  PyObject *__pyx_v_until_eof = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("count (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,&__pyx_n_s_until_eof,0};
+    PyObject* values[5] = {0,0,0,0,0};
+
+    /* "pysam/csamfile.pyx":782
+ * 
+ *     def count(self,
+ *               reference=None,             # <<<<<<<<<<<<<<
+ *               start=None,
+ *               end=None,
+ */
+    values[0] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":783
+ *     def count(self,
+ *               reference=None,
+ *               start=None,             # <<<<<<<<<<<<<<
+ *               end=None,
+ *               region=None,
+ */
+    values[1] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":784
+ *               reference=None,
+ *               start=None,
+ *               end=None,             # <<<<<<<<<<<<<<
+ *               region=None,
+ *               until_eof=False):
+ */
+    values[2] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":785
+ *               start=None,
+ *               end=None,
+ *               region=None,             # <<<<<<<<<<<<<<
+ *               until_eof=False):
+ *         '''*(reference = None, start = None, end = None,
+ */
+    values[3] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":786
+ *               end=None,
+ *               region=None,
+ *               until_eof=False):             # <<<<<<<<<<<<<<
+ *         '''*(reference = None, start = None, end = None,
+ *         region = None, callback = None, until_eof = False)*
+ */
+    values[4] = ((PyObject *)Py_False);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference);
+          if (value) { values[0] = value; kw_args--; }
+        }
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_until_eof);
+          if (value) { values[4] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_reference = values[0];
+    __pyx_v_start = values[1];
+    __pyx_v_end = values[2];
+    __pyx_v_region = values[3];
+    __pyx_v_until_eof = values[4];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("count", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_26count(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_until_eof);
+
+  /* "pysam/csamfile.pyx":781
+ *         return mate
+ * 
+ *     def count(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_26count(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_until_eof) {
+  CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_read = 0;
+  long __pyx_v_counter;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *(*__pyx_t_7)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("count", 0);
+  __Pyx_TraceCall("count", __pyx_f[0], 781);
+
+  /* "pysam/csamfile.pyx":799
+ *         '''
+ *         cdef AlignedRead read
+ *         cdef long counter = 0             # <<<<<<<<<<<<<<
+ * 
+ *         if not self._isOpen():
+ */
+  __pyx_v_counter = 0;
+
+  /* "pysam/csamfile.pyx":801
+ *         cdef long counter = 0
+ * 
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__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_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 = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":802
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         for read in self.fetch(reference=reference,
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":804
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ *         for read in self.fetch(reference=reference,             # <<<<<<<<<<<<<<
+ *                                start=start,
+ *                                end=end,
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fetch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_reference, __pyx_v_reference) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":805
+ * 
+ *         for read in self.fetch(reference=reference,
+ *                                start=start,             # <<<<<<<<<<<<<<
+ *                                end=end,
+ *                                region=region,
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start, __pyx_v_start) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":806
+ *         for read in self.fetch(reference=reference,
+ *                                start=start,
+ *                                end=end,             # <<<<<<<<<<<<<<
+ *                                region=region,
+ *                                until_eof=until_eof):
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_v_end) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":807
+ *                                start=start,
+ *                                end=end,
+ *                                region=region,             # <<<<<<<<<<<<<<
+ *                                until_eof=until_eof):
+ *             counter += 1
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":808
+ *                                end=end,
+ *                                region=region,
+ *                                until_eof=until_eof):             # <<<<<<<<<<<<<<
+ *             counter += 1
+ * 
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_until_eof, __pyx_v_until_eof) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":804
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ *         for read in self.fetch(reference=reference,             # <<<<<<<<<<<<<<
+ *                                start=start,
+ *                                end=end,
+ */
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
+    __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
+    __pyx_t_7 = NULL;
+  } else {
+    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  for (;;) {
+    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_1)) {
+      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_1)) {
+      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_5 = __pyx_t_7(__pyx_t_1);
+      if (unlikely(!__pyx_t_5)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+    }
+    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5pysam_8csamfile_AlignedRead))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF_SET(__pyx_v_read, ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_t_5));
+    __pyx_t_5 = 0;
+
+    /* "pysam/csamfile.pyx":809
+ *                                region=region,
+ *                                until_eof=until_eof):
+ *             counter += 1             # <<<<<<<<<<<<<<
+ * 
+ *         return counter
+ */
+    __pyx_v_counter = (__pyx_v_counter + 1);
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":811
+ *             counter += 1
+ * 
+ *         return counter             # <<<<<<<<<<<<<<
+ * 
+ *     def pileup( self,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_counter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":781
+ *         return mate
+ * 
+ *     def count(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_read);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":813
+ *         return counter
+ * 
+ *     def pileup( self,             # <<<<<<<<<<<<<<
+ *                 reference = None,
+ *                 start = None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_29pileup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_28pileup[] = "Samfile.pileup(self, reference=None, start=None, end=None, region=None, **kwargs)\n\n        perform a :term:`pileup` within a :term:`region`. The region is specified by\n        :term:`reference`, *start* and *end* (using 0-based indexing).\n        Alternatively, a samtools *region* string can be supplied.\n\n        Without *reference* or *region* all reads will be used for the pileup. The reads will be returned\n        or [...]
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_29pileup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_reference = 0;
+  PyObject *__pyx_v_start = 0;
+  PyObject *__pyx_v_end = 0;
+  PyObject *__pyx_v_region = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("pileup (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,0};
+    PyObject* values[4] = {0,0,0,0};
+
+    /* "pysam/csamfile.pyx":814
+ * 
+ *     def pileup( self,
+ *                 reference = None,             # <<<<<<<<<<<<<<
+ *                 start = None,
+ *                 end = None,
+ */
+    values[0] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":815
+ *     def pileup( self,
+ *                 reference = None,
+ *                 start = None,             # <<<<<<<<<<<<<<
+ *                 end = None,
+ *                 region = None,
+ */
+    values[1] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":816
+ *                 reference = None,
+ *                 start = None,
+ *                 end = None,             # <<<<<<<<<<<<<<
+ *                 region = None,
+ *                 **kwargs ):
+ */
+    values[2] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":817
+ *                 start = None,
+ *                 end = None,
+ *                 region = None,             # <<<<<<<<<<<<<<
+ *                 **kwargs ):
+ *         '''
+ */
+    values[3] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference);
+          if (value) { values[0] = value; kw_args--; }
+        }
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
+          if (value) { values[3] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "pileup") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_reference = values[0];
+    __pyx_v_start = values[1];
+    __pyx_v_end = values[2];
+    __pyx_v_region = values[3];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("pileup", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.pileup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_28pileup(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_kwargs);
+
+  /* "pysam/csamfile.pyx":813
+ *         return counter
+ * 
+ *     def pileup( self,             # <<<<<<<<<<<<<<
+ *                 reference = None,
+ *                 start = None,
+ */
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_28pileup(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_kwargs) {
+  int __pyx_v_rtid;
+  int __pyx_v_rstart;
+  int __pyx_v_rend;
+  int __pyx_v_has_coord;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  int __pyx_t_10;
+  int __pyx_t_11;
+  int __pyx_t_12;
+  int __pyx_t_13;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("pileup", 0);
+  __Pyx_TraceCall("pileup", __pyx_f[0], 813);
+
+  /* "pysam/csamfile.pyx":867
+ *         cdef int rtid, rstart, rend, has_coord
+ * 
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __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 = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":868
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":870
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(             # <<<<<<<<<<<<<<
+ *             reference, start, end, region )
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+
+  /* "pysam/csamfile.pyx":871
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(
+ *             reference, start, end, region )             # <<<<<<<<<<<<<<
+ * 
+ *         if self.isbam:
+ */
+  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_reference);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
+  __Pyx_GIVEREF(__pyx_v_reference);
+  __Pyx_INCREF(__pyx_v_start);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
+  __Pyx_GIVEREF(__pyx_v_start);
+  __Pyx_INCREF(__pyx_v_end);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
+  __Pyx_GIVEREF(__pyx_v_end);
+  __Pyx_INCREF(__pyx_v_region);
+  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
+  __Pyx_GIVEREF(__pyx_v_region);
+
+  /* "pysam/csamfile.pyx":870
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(             # <<<<<<<<<<<<<<
+ *             reference, start, end, region )
+ * 
+ */
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+    PyObject* sequence = __pyx_t_5;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    Py_ssize_t size = Py_SIZE(sequence);
+    #else
+    Py_ssize_t size = PySequence_Size(sequence);
+    #endif
+    if (unlikely(size != 4)) {
+      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
+      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
+      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
+    } else {
+      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
+      __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
+      __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
+    }
+    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_7);
+    #else
+    {
+      Py_ssize_t i;
+      PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
+      for (i=0; i < 4; i++) {
+        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(item);
+        *(temps[i]) = item;
+      }
+    }
+    #endif
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
+    __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+    for (index=0; index < 4; index++) {
+      PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
+      __Pyx_GOTREF(item);
+      *(temps[index]) = item;
+    }
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = NULL;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    goto __pyx_L5_unpacking_done;
+    __pyx_L4_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_9 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L5_unpacking_done:;
+  }
+  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_v_has_coord = __pyx_t_10;
+  __pyx_v_rtid = __pyx_t_11;
+  __pyx_v_rstart = __pyx_t_12;
+  __pyx_v_rend = __pyx_t_13;
+
+  /* "pysam/csamfile.pyx":873
+ *             reference, start, end, region )
+ * 
+ *         if self.isbam:             # <<<<<<<<<<<<<<
+ *             if not self._hasIndex():
+ *                 raise ValueError("no index available for pileup")
+ */
+  __pyx_t_4 = (__pyx_v_self->isbam != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":874
+ * 
+ *         if self.isbam:
+ *             if not self._hasIndex():             # <<<<<<<<<<<<<<
+ *                 raise ValueError("no index available for pileup")
+ * 
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_3 = ((!__pyx_t_4) != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/csamfile.pyx":875
+ *         if self.isbam:
+ *             if not self._hasIndex():
+ *                 raise ValueError("no index available for pileup")             # <<<<<<<<<<<<<<
+ * 
+ *             if has_coord:
+ */
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":877
+ *                 raise ValueError("no index available for pileup")
+ * 
+ *             if has_coord:             # <<<<<<<<<<<<<<
+ *                 return IteratorColumnRegion(self,
+ *                                             tid = rtid,
+ */
+    __pyx_t_3 = (__pyx_v_has_coord != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/csamfile.pyx":878
+ * 
+ *             if has_coord:
+ *                 return IteratorColumnRegion(self,             # <<<<<<<<<<<<<<
+ *                                             tid = rtid,
+ *                                             start = rstart,
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_INCREF(((PyObject *)__pyx_v_self));
+      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));
+      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+
+      /* "pysam/csamfile.pyx":882
+ *                                             start = rstart,
+ *                                             end = rend,
+ *                                             **kwargs )             # <<<<<<<<<<<<<<
+ *             else:
+ *                 return IteratorColumnAllRefs(self, **kwargs )
+ */
+      __pyx_t_5 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+
+      /* "pysam/csamfile.pyx":879
+ *             if has_coord:
+ *                 return IteratorColumnRegion(self,
+ *                                             tid = rtid,             # <<<<<<<<<<<<<<
+ *                                             start = rstart,
+ *                                             end = rend,
+ */
+      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rtid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      if (unlikely(PyDict_GetItem(__pyx_t_5, __pyx_n_s_tid))) {
+        __Pyx_RaiseDoubleKeywordsError("function", __pyx_n_s_tid); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_tid, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+      /* "pysam/csamfile.pyx":880
+ *                 return IteratorColumnRegion(self,
+ *                                             tid = rtid,
+ *                                             start = rstart,             # <<<<<<<<<<<<<<
+ *                                             end = rend,
+ *                                             **kwargs )
+ */
+      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rstart); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      if (unlikely(PyDict_GetItem(__pyx_t_5, __pyx_n_s_start))) {
+        __Pyx_RaiseDoubleKeywordsError("function", __pyx_n_s_start); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_start, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+      /* "pysam/csamfile.pyx":881
+ *                                             tid = rtid,
+ *                                             start = rstart,
+ *                                             end = rend,             # <<<<<<<<<<<<<<
+ *                                             **kwargs )
+ *             else:
+ */
+      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      if (unlikely(PyDict_GetItem(__pyx_t_5, __pyx_n_s_end))) {
+        __Pyx_RaiseDoubleKeywordsError("function", __pyx_n_s_end); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+      /* "pysam/csamfile.pyx":878
+ * 
+ *             if has_coord:
+ *                 return IteratorColumnRegion(self,             # <<<<<<<<<<<<<<
+ *                                             tid = rtid,
+ *                                             start = rstart,
+ */
+      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorColumnRegion)), __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __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_5); __pyx_t_5 = 0;
+      __pyx_r = __pyx_t_6;
+      __pyx_t_6 = 0;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":884
+ *                                             **kwargs )
+ *             else:
+ *                 return IteratorColumnAllRefs(self, **kwargs )             # <<<<<<<<<<<<<<
+ * 
+ *         else:
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_INCREF(((PyObject *)__pyx_v_self));
+      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
+      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+      __pyx_t_5 = __pyx_v_kwargs;
+      __Pyx_INCREF(__pyx_t_5);
+      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorColumnAllRefs)), __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_r = __pyx_t_7;
+      __pyx_t_7 = 0;
+      goto __pyx_L0;
+    }
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":887
+ * 
+ *         else:
+ *             raise NotImplementedError( "pileup of samfiles not implemented yet" )             # <<<<<<<<<<<<<<
+ * 
+ *     def close( self ):
+ */
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":813
+ *         return counter
+ * 
+ *     def pileup( self,             # <<<<<<<<<<<<<<
+ *                 reference = None,
+ *                 start = None,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.pileup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":889
+ *             raise NotImplementedError( "pileup of samfiles not implemented yet" )
+ * 
+ *     def close( self ):             # <<<<<<<<<<<<<<
+ *         '''
+ *         closes the :class:`pysam.Samfile`.'''
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_31close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_30close[] = "Samfile.close(self)\n\n        closes the :class:`pysam.Samfile`.";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_31close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_30close(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_30close(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("close", 0);
+  __Pyx_TraceCall("close", __pyx_f[0], 889);
+
+  /* "pysam/csamfile.pyx":892
+ *         '''
+ *         closes the :class:`pysam.Samfile`.'''
+ *         if self.htsfile != NULL:             # <<<<<<<<<<<<<<
+ *             hts_close(self.htsfile)
+ *             hts_idx_destroy(self.index);
+ */
+  __pyx_t_1 = ((__pyx_v_self->htsfile != NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":893
+ *         closes the :class:`pysam.Samfile`.'''
+ *         if self.htsfile != NULL:
+ *             hts_close(self.htsfile)             # <<<<<<<<<<<<<<
+ *             hts_idx_destroy(self.index);
+ *             self.htsfile = NULL
+ */
+    hts_close(__pyx_v_self->htsfile);
+
+    /* "pysam/csamfile.pyx":894
+ *         if self.htsfile != NULL:
+ *             hts_close(self.htsfile)
+ *             hts_idx_destroy(self.index);             # <<<<<<<<<<<<<<
+ *             self.htsfile = NULL
+ * 
+ */
+    hts_idx_destroy(__pyx_v_self->index);
+
+    /* "pysam/csamfile.pyx":895
+ *             hts_close(self.htsfile)
+ *             hts_idx_destroy(self.index);
+ *             self.htsfile = NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__( self ):
+ */
+    __pyx_v_self->htsfile = NULL;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":889
+ *             raise NotImplementedError( "pileup of samfiles not implemented yet" )
+ * 
+ *     def close( self ):             # <<<<<<<<<<<<<<
+ *         '''
+ *         closes the :class:`pysam.Samfile`.'''
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":897
+ *             self.htsfile = NULL
+ * 
+ *     def __dealloc__( self ):             # <<<<<<<<<<<<<<
+ *         # remember: dealloc cannot call other methods
+ *         # note: no doc string
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_8csamfile_7Samfile_33__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_8csamfile_7Samfile_33__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_8csamfile_7Samfile_32__dealloc__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_8csamfile_7Samfile_32__dealloc__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 897);
+
+  /* "pysam/csamfile.pyx":901
+ *         # note: no doc string
+ *         # note: __del__ is not called.
+ *         self.close()             # <<<<<<<<<<<<<<
+ *         bam_destroy1(self.b)
+ *         if self.header != NULL:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":902
+ *         # note: __del__ is not called.
+ *         self.close()
+ *         bam_destroy1(self.b)             # <<<<<<<<<<<<<<
+ *         if self.header != NULL:
+ *             bam_hdr_destroy(self.header)
+ */
+  bam_destroy1(__pyx_v_self->b);
+
+  /* "pysam/csamfile.pyx":903
+ *         self.close()
+ *         bam_destroy1(self.b)
+ *         if self.header != NULL:             # <<<<<<<<<<<<<<
+ *             bam_hdr_destroy(self.header)
+ * 
+ */
+  __pyx_t_3 = ((__pyx_v_self->header != NULL) != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":904
+ *         bam_destroy1(self.b)
+ *         if self.header != NULL:
+ *             bam_hdr_destroy(self.header)             # <<<<<<<<<<<<<<
+ * 
+ *     cpdef int write( self, AlignedRead read ) except -1:
+ */
+    bam_hdr_destroy(__pyx_v_self->header);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":897
+ *             self.htsfile = NULL
+ * 
+ *     def __dealloc__( self ):             # <<<<<<<<<<<<<<
+ *         # remember: dealloc cannot call other methods
+ *         # note: no doc string
+ */
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_WriteUnraisable("pysam.csamfile.Samfile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/csamfile.pyx":906
+ *             bam_hdr_destroy(self.header)
+ * 
+ *     cpdef int write( self, AlignedRead read ) except -1:             # <<<<<<<<<<<<<<
+ *         '''
+ *         write a single :class:`pysam.AlignedRead` to disk.
+ */
+
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_35write(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/
+static int __pyx_f_5pysam_8csamfile_7Samfile_write(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_read, int __pyx_skip_dispatch) {
+  int __pyx_v_x;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("write", 0);
+  __Pyx_TraceCall("write", __pyx_f[0], 906);
+  /* Check if called by wrapper */
+  if (unlikely(__pyx_skip_dispatch)) ;
+  /* Check if overridden in Python */
+  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_35write)) {
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(((PyObject *)__pyx_v_read));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_read));
+      __Pyx_GIVEREF(((PyObject *)__pyx_v_read));
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_r = __pyx_t_4;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "pysam/csamfile.pyx":912
+ *         returns the number of bytes written.
+ *         '''
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             return 0
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); 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);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_6 = ((!__pyx_t_5) != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":913
+ *         '''
+ *         if not self._isOpen():
+ *             return 0             # <<<<<<<<<<<<<<
+ * 
+ *         x = sam_write1(self.htsfile,
+ */
+    __pyx_r = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":915
+ *             return 0
+ * 
+ *         x = sam_write1(self.htsfile,             # <<<<<<<<<<<<<<
+ *                        self.header,
+ *                        read._delegate)
+ */
+  __pyx_v_x = sam_write1(__pyx_v_self->htsfile, __pyx_v_self->header, __pyx_v_read->_delegate);
+
+  /* "pysam/csamfile.pyx":919
+ *                        read._delegate)
+ * 
+ *         return x             # <<<<<<<<<<<<<<
+ * 
+ *     def __enter__(self):
+ */
+  __pyx_r = __pyx_v_x;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":906
+ *             bam_hdr_destroy(self.header)
+ * 
+ *     cpdef int write( self, AlignedRead read ) except -1:             # <<<<<<<<<<<<<<
+ *         '''
+ *         write a single :class:`pysam.AlignedRead` to disk.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_WriteUnraisable("pysam.csamfile.Samfile.write", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_35write(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_34write[] = "Samfile.write(self, AlignedRead read) -> int\n\n        write a single :class:`pysam.AlignedRead` to disk.\n\n        returns the number of bytes written.\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_35write(PyObject *__pyx_v_self, PyObject *__pyx_v_read) {
+  CYTHON_UNUSED int __pyx_lineno = 0;
+  CYTHON_UNUSED const char *__pyx_filename = NULL;
+  CYTHON_UNUSED int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("write (wrapper)", 0);
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_5pysam_8csamfile_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_34write(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_read));
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_34write(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_read) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("write", 0);
+  __Pyx_TraceCall("write", __pyx_f[0], 906);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_5pysam_8csamfile_Samfile *)__pyx_v_self->__pyx_vtab)->write(__pyx_v_self, __pyx_v_read, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":921
+ *         return x
+ * 
+ *     def __enter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_37__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_36__enter__[] = "Samfile.__enter__(self)";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_37__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_36__enter__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_36__enter__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__enter__", 0);
+  __Pyx_TraceCall("__enter__", __pyx_f[0], 921);
+
+  /* "pysam/csamfile.pyx":922
+ * 
+ *     def __enter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     def __exit__(self, exc_type, exc_value, traceback):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":921
+ *         return x
+ * 
+ *     def __enter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":924
+ *         return self
+ * 
+ *     def __exit__(self, exc_type, exc_value, traceback):             # <<<<<<<<<<<<<<
+ *         self.close()
+ *         return False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_39__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_38__exit__[] = "Samfile.__exit__(self, exc_type, exc_value, traceback)";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_39__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_exc_value = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_value,&__pyx_n_s_traceback,0};
+    PyObject* values[3] = {0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_type)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_value)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+    }
+    __pyx_v_exc_type = values[0];
+    __pyx_v_exc_value = values[1];
+    __pyx_v_traceback = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_38__exit__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_value, __pyx_v_traceback);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_38__exit__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__exit__", 0);
+  __Pyx_TraceCall("__exit__", __pyx_f[0], 924);
+
+  /* "pysam/csamfile.pyx":925
+ * 
+ *     def __exit__(self, exc_type, exc_value, traceback):
+ *         self.close()             # <<<<<<<<<<<<<<
+ *         return False
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":926
+ *     def __exit__(self, exc_type, exc_value, traceback):
+ *         self.close()
+ *         return False             # <<<<<<<<<<<<<<
+ * 
+ *     ###############################################################
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(Py_False);
+  __pyx_r = Py_False;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":924
+ *         return self
+ * 
+ *     def __exit__(self, exc_type, exc_value, traceback):             # <<<<<<<<<<<<<<
+ *         self.close()
+ *         return False
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":935
+ *     property filename:
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._filename
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_8filename_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_8filename___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_8filename___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 935);
+
+  /* "pysam/csamfile.pyx":936
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):
+ *             return self._filename             # <<<<<<<<<<<<<<
+ * 
+ *     property nreferences:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_filename);
+  __pyx_r = __pyx_v_self->_filename;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":935
+ *     property filename:
+ *         '''number of :term:`filename` associated with this object.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._filename
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":940
+ *     property nreferences:
+ *         '''number of :term:`reference` sequences in the file.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             return self.header.n_targets
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_11nreferences_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_11nreferences_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_11nreferences___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_11nreferences___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 940);
+
+  /* "pysam/csamfile.pyx":941
+ *         '''number of :term:`reference` sequences in the file.'''
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             return self.header.n_targets
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); 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 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_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 = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":942
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             return self.header.n_targets             # <<<<<<<<<<<<<<
+ * 
+ *     property references:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_self->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":940
+ *     property nreferences:
+ *         '''number of :term:`reference` sequences in the file.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             return self.header.n_targets
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.nreferences.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":946
+ *     property references:
+ *         """tuple with the names of :term:`reference` sequences."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             t = []
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_10references_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_10references_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_10references___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_10references___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_v_t = NULL;
+  long __pyx_v_x;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int32_t __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 946);
+
+  /* "pysam/csamfile.pyx":947
+ *         """tuple with the names of :term:`reference` sequences."""
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             t = []
+ *             for x from 0 <= x < self.header.n_targets:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __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 = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":948
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             t = []             # <<<<<<<<<<<<<<
+ *             for x from 0 <= x < self.header.n_targets:
+ *                 t.append(_charptr_to_str(self.header.target_name[x]))
+ */
+  __pyx_t_2 = PyList_New(0); 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_v_t = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":949
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             t = []
+ *             for x from 0 <= x < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *                 t.append(_charptr_to_str(self.header.target_name[x]))
+ *             return tuple(t)
+ */
+  __pyx_t_5 = __pyx_v_self->header->n_targets;
+  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
+
+    /* "pysam/csamfile.pyx":950
+ *             t = []
+ *             for x from 0 <= x < self.header.n_targets:
+ *                 t.append(_charptr_to_str(self.header.target_name[x]))             # <<<<<<<<<<<<<<
+ *             return tuple(t)
+ * 
+ */
+    __pyx_t_2 = __pyx_f_5pysam_8csamfile__charptr_to_str((__pyx_v_self->header->target_name[__pyx_v_x])); 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_6 = __Pyx_PyList_Append(__pyx_v_t, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+
+  /* "pysam/csamfile.pyx":951
+ *             for x from 0 <= x < self.header.n_targets:
+ *                 t.append(_charptr_to_str(self.header.target_name[x]))
+ *             return tuple(t)             # <<<<<<<<<<<<<<
+ * 
+ *     property lengths:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = PyList_AsTuple(__pyx_v_t); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":946
+ *     property references:
+ *         """tuple with the names of :term:`reference` sequences."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             t = []
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.references.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_t);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":957
+ *         :attr:`pysam.Samfile.references`
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             t = []
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_7lengths_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_7lengths_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_7lengths___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_7lengths___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_v_t = NULL;
+  long __pyx_v_x;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int32_t __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 957);
+
+  /* "pysam/csamfile.pyx":958
+ *         """
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             t = []
+ *             for x from 0 <= x < self.header.n_targets:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_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 = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":959
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             t = []             # <<<<<<<<<<<<<<
+ *             for x from 0 <= x < self.header.n_targets:
+ *                 t.append( self.header.target_len[x] )
+ */
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_v_t = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":960
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             t = []
+ *             for x from 0 <= x < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *                 t.append( self.header.target_len[x] )
+ *             return tuple(t)
+ */
+  __pyx_t_5 = __pyx_v_self->header->n_targets;
+  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
+
+    /* "pysam/csamfile.pyx":961
+ *             t = []
+ *             for x from 0 <= x < self.header.n_targets:
+ *                 t.append( self.header.target_len[x] )             # <<<<<<<<<<<<<<
+ *             return tuple(t)
+ * 
+ */
+    __pyx_t_2 = __Pyx_PyInt_From_uint32_t((__pyx_v_self->header->target_len[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_t, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+
+  /* "pysam/csamfile.pyx":962
+ *             for x from 0 <= x < self.header.n_targets:
+ *                 t.append( self.header.target_len[x] )
+ *             return tuple(t)             # <<<<<<<<<<<<<<
+ * 
+ *     property mapped:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = PyList_AsTuple(__pyx_v_t); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":957
+ *         :attr:`pysam.Samfile.references`
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             t = []
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.lengths.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_t);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":967
+ *         """total number of mapped alignments in file.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             self._checkIndex()
+ *             cdef int tid
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_6mapped_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_6mapped_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_6mapped___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_6mapped___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  int __pyx_v_tid;
+  uint64_t __pyx_v_total;
+  uint64_t __pyx_v_mapped;
+  uint64_t __pyx_v_unmapped;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int32_t __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 967);
+
+  /* "pysam/csamfile.pyx":968
+ *         """
+ *         def __get__(self):
+ *             self._checkIndex()             # <<<<<<<<<<<<<<
+ *             cdef int tid
+ *             cdef uint64_t total = 0
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":970
+ *             self._checkIndex()
+ *             cdef int tid
+ *             cdef uint64_t total = 0             # <<<<<<<<<<<<<<
+ *             cdef uint64_t mapped, unmapped
+ *             for tid from 0 <= tid < self.header.n_targets:
+ */
+  __pyx_v_total = 0;
+
+  /* "pysam/csamfile.pyx":972
+ *             cdef uint64_t total = 0
+ *             cdef uint64_t mapped, unmapped
+ *             for tid from 0 <= tid < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *                 hts_idx_get_stat(self.index, tid, &mapped, &unmapped)
+ *                 total += mapped
+ */
+  __pyx_t_3 = __pyx_v_self->header->n_targets;
+  for (__pyx_v_tid = 0; __pyx_v_tid < __pyx_t_3; __pyx_v_tid++) {
+
+    /* "pysam/csamfile.pyx":973
+ *             cdef uint64_t mapped, unmapped
+ *             for tid from 0 <= tid < self.header.n_targets:
+ *                 hts_idx_get_stat(self.index, tid, &mapped, &unmapped)             # <<<<<<<<<<<<<<
+ *                 total += mapped
+ *             return total
+ */
+    hts_idx_get_stat(__pyx_v_self->index, __pyx_v_tid, (&__pyx_v_mapped), (&__pyx_v_unmapped));
+
+    /* "pysam/csamfile.pyx":974
+ *             for tid from 0 <= tid < self.header.n_targets:
+ *                 hts_idx_get_stat(self.index, tid, &mapped, &unmapped)
+ *                 total += mapped             # <<<<<<<<<<<<<<
+ *             return total
+ * 
+ */
+    __pyx_v_total = (__pyx_v_total + __pyx_v_mapped);
+  }
+
+  /* "pysam/csamfile.pyx":975
+ *                 hts_idx_get_stat(self.index, tid, &mapped, &unmapped)
+ *                 total += mapped
+ *             return total             # <<<<<<<<<<<<<<
+ * 
+ *     def _checkIndex(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_total); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":967
+ *         """total number of mapped alignments in file.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             self._checkIndex()
+ *             cdef int tid
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.mapped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":977
+ *             return total
+ * 
+ *     def _checkIndex(self):             # <<<<<<<<<<<<<<
+ *         '''check if index is present. Otherwise raise
+ *         an error.'''
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_41_checkIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_40_checkIndex[] = "Samfile._checkIndex(self)\ncheck if index is present. Otherwise raise\n        an error.";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_41_checkIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_checkIndex (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_40_checkIndex(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_40_checkIndex(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_checkIndex", 0);
+  __Pyx_TraceCall("_checkIndex", __pyx_f[0], 977);
+
+  /* "pysam/csamfile.pyx":980
+ *         '''check if index is present. Otherwise raise
+ *         an error.'''
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError("I/O operation on closed file")
+ *         if not self.isbam:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __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 = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":981
+ *         an error.'''
+ *         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")
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":982
+ *         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")
+ *         if self.index == NULL:
+ */
+  __pyx_t_4 = ((!(__pyx_v_self->isbam != 0)) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":983
+ *             raise ValueError("I/O operation on closed file")
+ *         if not self.isbam:
+ *             raise AttributeError("Samfile.mapped only available in bam files")             # <<<<<<<<<<<<<<
+ *         if self.index == NULL:
+ *             raise ValueError("mapping information not recorded in index "
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":984
+ *         if not self.isbam:
+ *             raise AttributeError("Samfile.mapped only available in bam files")
+ *         if self.index == NULL:             # <<<<<<<<<<<<<<
+ *             raise ValueError("mapping information not recorded in index "
+ *                                  "or index not available")
+ */
+  __pyx_t_4 = ((__pyx_v_self->index == NULL) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":985
+ *             raise AttributeError("Samfile.mapped only available in bam files")
+ *         if self.index == NULL:
+ *             raise ValueError("mapping information not recorded in index "             # <<<<<<<<<<<<<<
+ *                                  "or index not available")
+ * 
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":977
+ *             return total
+ * 
+ *     def _checkIndex(self):             # <<<<<<<<<<<<<<
+ *         '''check if index is present. Otherwise raise
+ *         an error.'''
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._checkIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":992
+ *         """total number of unmapped reads in file.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             self._checkIndex()
+ *             cdef int tid
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_8unmapped_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_8unmapped_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_8unmapped___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_8unmapped___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  int __pyx_v_tid;
+  uint64_t __pyx_v_total;
+  uint64_t __pyx_v_mapped;
+  uint64_t __pyx_v_unmapped;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int32_t __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 992);
+
+  /* "pysam/csamfile.pyx":993
+ *         """
+ *         def __get__(self):
+ *             self._checkIndex()             # <<<<<<<<<<<<<<
+ *             cdef int tid
+ *             cdef uint64_t total = 0
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkIndex); 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);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":995
+ *             self._checkIndex()
+ *             cdef int tid
+ *             cdef uint64_t total = 0             # <<<<<<<<<<<<<<
+ *             cdef uint64_t mapped, unmapped
+ *             for tid from 0 <= tid < self.header.n_targets:
+ */
+  __pyx_v_total = 0;
+
+  /* "pysam/csamfile.pyx":997
+ *             cdef uint64_t total = 0
+ *             cdef uint64_t mapped, unmapped
+ *             for tid from 0 <= tid < self.header.n_targets:             # <<<<<<<<<<<<<<
+ *                 hts_idx_get_stat(self.index, tid, &mapped, &unmapped)
+ *                 total += unmapped
+ */
+  __pyx_t_3 = __pyx_v_self->header->n_targets;
+  for (__pyx_v_tid = 0; __pyx_v_tid < __pyx_t_3; __pyx_v_tid++) {
+
+    /* "pysam/csamfile.pyx":998
+ *             cdef uint64_t mapped, unmapped
+ *             for tid from 0 <= tid < self.header.n_targets:
+ *                 hts_idx_get_stat(self.index, tid, &mapped, &unmapped)             # <<<<<<<<<<<<<<
+ *                 total += unmapped
+ *             return total
+ */
+    hts_idx_get_stat(__pyx_v_self->index, __pyx_v_tid, (&__pyx_v_mapped), (&__pyx_v_unmapped));
+
+    /* "pysam/csamfile.pyx":999
+ *             for tid from 0 <= tid < self.header.n_targets:
+ *                 hts_idx_get_stat(self.index, tid, &mapped, &unmapped)
+ *                 total += unmapped             # <<<<<<<<<<<<<<
+ *             return total
+ * 
+ */
+    __pyx_v_total = (__pyx_v_total + __pyx_v_unmapped);
+  }
+
+  /* "pysam/csamfile.pyx":1000
+ *                 hts_idx_get_stat(self.index, tid, &mapped, &unmapped)
+ *                 total += unmapped
+ *             return total             # <<<<<<<<<<<<<<
+ * 
+ *     property nocoordinate:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_total); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":992
+ *         """total number of unmapped reads in file.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             self._checkIndex()
+ *             cdef int tid
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.unmapped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1005
+ *         """total number of reads without coordinates
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             self._checkIndex()
+ *             return hts_idx_get_n_no_coor(self.index)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_12nocoordinate_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_12nocoordinate_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_12nocoordinate___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_12nocoordinate___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 1005);
+
+  /* "pysam/csamfile.pyx":1006
+ *         """
+ *         def __get__(self):
+ *             self._checkIndex()             # <<<<<<<<<<<<<<
+ *             return hts_idx_get_n_no_coor(self.index)
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkIndex); 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 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, 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_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":1007
+ *         def __get__(self):
+ *             self._checkIndex()
+ *             return hts_idx_get_n_no_coor(self.index)             # <<<<<<<<<<<<<<
+ * 
+ *     property text:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyInt_From_uint64_t(hts_idx_get_n_no_coor(__pyx_v_self->index)); 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_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1005
+ *         """total number of reads without coordinates
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             self._checkIndex()
+ *             return hts_idx_get_n_no_coor(self.index)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.nocoordinate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1011
+ *     property text:
+ *         '''full contents of the :term:`sam file` header as a string.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             return from_string_and_size(self.header.text, self.header.l_text)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_4text_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_4text___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_4text___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 1011);
+
+  /* "pysam/csamfile.pyx":1012
+ *         '''full contents of the :term:`sam file` header as a string.'''
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             return from_string_and_size(self.header.text, self.header.l_text)
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __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 = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1013
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             return from_string_and_size(self.header.text, self.header.l_text)             # <<<<<<<<<<<<<<
+ * 
+ *     property header:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __pyx_f_5pysam_8csamfile_from_string_and_size(__pyx_v_self->header->text, __pyx_v_self->header->l_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1011
+ *     property text:
+ *         '''full contents of the :term:`sam file` header as a string.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             return from_string_and_size(self.header.text, self.header.l_text)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.text.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1019
+ *         a two-level dictionary.
+ *         '''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_6header_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_6header___get__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_6header___get__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_v_result = NULL;
+  PyObject *__pyx_v_t = NULL;
+  PyObject *__pyx_v_line = NULL;
+  PyObject *__pyx_v_fields = NULL;
+  PyObject *__pyx_v_record = NULL;
+  PyObject *__pyx_v_x = NULL;
+  PyObject *__pyx_v_field = NULL;
+  PyObject *__pyx_v_key = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_v_sq = NULL;
+  PyObject *__pyx_v_ref = NULL;
+  PyObject *__pyx_v_length = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  int __pyx_t_9;
+  Py_ssize_t __pyx_t_10;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *(*__pyx_t_14)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 1019);
+
+  /* "pysam/csamfile.pyx":1020
+ *         '''
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *             result = {}
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); 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_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_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 = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1022
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ * 
+ *             result = {}             # <<<<<<<<<<<<<<
+ * 
+ *             if self.header.text != NULL:
+ */
+  __pyx_t_2 = PyDict_New(); 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_v_result = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":1024
+ *             result = {}
+ * 
+ *             if self.header.text != NULL:             # <<<<<<<<<<<<<<
+ *                 # convert to python string (note: call self.text to create 0-terminated string)
+ *                 t = self.text
+ */
+  __pyx_t_4 = ((__pyx_v_self->header->text != NULL) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":1026
+ *             if self.header.text != NULL:
+ *                 # convert to python string (note: call self.text to create 0-terminated string)
+ *                 t = self.text             # <<<<<<<<<<<<<<
+ *                 for line in t.split("\n"):
+ *                     if not line.strip(): continue
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); 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_v_t = __pyx_t_2;
+    __pyx_t_2 = 0;
+
+    /* "pysam/csamfile.pyx":1027
+ *                 # convert to python string (note: call self.text to create 0-terminated string)
+ *                 t = self.text
+ *                 for line in t.split("\n"):             # <<<<<<<<<<<<<<
+ *                     if not line.strip(): continue
+ *                     assert line.startswith("@"), "header line without '@': '%s'" % line
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__40, NULL); 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);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
+      __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
+      __pyx_t_6 = NULL;
+    } else {
+      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    for (;;) {
+      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_1 = __pyx_t_6(__pyx_t_2);
+        if (unlikely(!__pyx_t_1)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_1);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":1028
+ *                 t = self.text
+ *                 for line in t.split("\n"):
+ *                     if not line.strip(): continue             # <<<<<<<<<<<<<<
+ *                     assert line.startswith("@"), "header line without '@': '%s'" % line
+ *                     fields = line[1:].split("\t")
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_3 = ((!__pyx_t_4) != 0);
+      if (__pyx_t_3) {
+        goto __pyx_L5_continue;
+      }
+
+      /* "pysam/csamfile.pyx":1029
+ *                 for line in t.split("\n"):
+ *                     if not line.strip(): continue
+ *                     assert line.startswith("@"), "header line without '@': '%s'" % line             # <<<<<<<<<<<<<<
+ *                     fields = line[1:].split("\t")
+ *                     record = fields[0]
+ */
+      #ifndef CYTHON_WITHOUT_ASSERTIONS
+      if (unlikely(!Py_OptimizeFlag)) {
+        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __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 = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        if (unlikely(!__pyx_t_3)) {
+          __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_header_line_without_s, __pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          PyErr_SetObject(PyExc_AssertionError, __pyx_t_1);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+      }
+      #endif
+
+      /* "pysam/csamfile.pyx":1030
+ *                     if not line.strip(): continue
+ *                     assert line.startswith("@"), "header line without '@': '%s'" % line
+ *                     fields = line[1:].split("\t")             # <<<<<<<<<<<<<<
+ *                     record = fields[0]
+ *                     assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_line, 1, 0, NULL, NULL, &__pyx_slice__43, 1, 0, 1); 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);
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__44, NULL); 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);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_fields, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":1031
+ *                     assert line.startswith("@"), "header line without '@': '%s'" % line
+ *                     fields = line[1:].split("\t")
+ *                     record = fields[0]             # <<<<<<<<<<<<<<
+ *                     assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
+ * 
+ */
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_XDECREF_SET(__pyx_v_record, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "pysam/csamfile.pyx":1032
+ *                     fields = line[1:].split("\t")
+ *                     record = fields[0]
+ *                     assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)             # <<<<<<<<<<<<<<
+ * 
+ *                     # treat comments
+ */
+      #ifndef CYTHON_WITHOUT_ASSERTIONS
+      if (unlikely(!Py_OptimizeFlag)) {
+        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADER_TYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        if (unlikely(!(__pyx_t_3 != 0))) {
+          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_INCREF(__pyx_v_record);
+          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_record);
+          __Pyx_GIVEREF(__pyx_v_record);
+          __Pyx_INCREF(__pyx_v_line);
+          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_line);
+          __Pyx_GIVEREF(__pyx_v_line);
+          __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_header_line_with_invalid_type_s, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          PyErr_SetObject(PyExc_AssertionError, __pyx_t_7);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+      }
+      #endif
+
+      /* "pysam/csamfile.pyx":1035
+ * 
+ *                     # treat comments
+ *                     if record == "CO":             # <<<<<<<<<<<<<<
+ *                         if record not in result: result[record] = []
+ *                         result[record].append( "\t".join( fields[1:] ) )
+ */
+      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_record, __pyx_n_s_CO, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_3) {
+
+        /* "pysam/csamfile.pyx":1036
+ *                     # treat comments
+ *                     if record == "CO":
+ *                         if record not in result: result[record] = []             # <<<<<<<<<<<<<<
+ *                         result[record].append( "\t".join( fields[1:] ) )
+ *                         continue
+ */
+        __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_record, __pyx_v_result, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = (__pyx_t_3 != 0);
+        if (__pyx_t_4) {
+          __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_record, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          goto __pyx_L9;
+        }
+        __pyx_L9:;
+
+        /* "pysam/csamfile.pyx":1037
+ *                     if record == "CO":
+ *                         if record not in result: result[record] = []
+ *                         result[record].append( "\t".join( fields[1:] ) )             # <<<<<<<<<<<<<<
+ *                         continue
+ *                     # the following is clumsy as generators do not work?
+ */
+        __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_v_record); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 1, 0, NULL, NULL, &__pyx_slice__45, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_8 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+        /* "pysam/csamfile.pyx":1038
+ *                         if record not in result: result[record] = []
+ *                         result[record].append( "\t".join( fields[1:] ) )
+ *                         continue             # <<<<<<<<<<<<<<
+ *                     # the following is clumsy as generators do not work?
+ *                     x = {}
+ */
+        goto __pyx_L5_continue;
+      }
+
+      /* "pysam/csamfile.pyx":1040
+ *                         continue
+ *                     # the following is clumsy as generators do not work?
+ *                     x = {}             # <<<<<<<<<<<<<<
+ *                     for field in fields[1:]:
+ *                         if ":" not in field:
+ */
+      __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_XDECREF_SET(__pyx_v_x, ((PyObject*)__pyx_t_8));
+      __pyx_t_8 = 0;
+
+      /* "pysam/csamfile.pyx":1041
+ *                     # the following is clumsy as generators do not work?
+ *                     x = {}
+ *                     for field in fields[1:]:             # <<<<<<<<<<<<<<
+ *                         if ":" not in field:
+ *                             raise ValueError("malformatted header: no ':' in field" )
+ */
+      __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 1, 0, NULL, NULL, &__pyx_slice__46, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
+        __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
+        __pyx_t_11 = NULL;
+      } else {
+        __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); 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_11 = Py_TYPE(__pyx_t_7)->tp_iternext;
+      }
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      for (;;) {
+        if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_7)) {
+          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_7)) {
+          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          __pyx_t_8 = __pyx_t_11(__pyx_t_7);
+          if (unlikely(!__pyx_t_8)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_8);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_8);
+        __pyx_t_8 = 0;
+
+        /* "pysam/csamfile.pyx":1042
+ *                     x = {}
+ *                     for field in fields[1:]:
+ *                         if ":" not in field:             # <<<<<<<<<<<<<<
+ *                             raise ValueError("malformatted header: no ':' in field" )
+ *                         key, value = field.split(":",1)
+ */
+        __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_kp_s__47, __pyx_v_field, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = (__pyx_t_4 != 0);
+        if (__pyx_t_3) {
+
+          /* "pysam/csamfile.pyx":1043
+ *                     for field in fields[1:]:
+ *                         if ":" not in field:
+ *                             raise ValueError("malformatted header: no ':' in field" )             # <<<<<<<<<<<<<<
+ *                         key, value = field.split(":",1)
+ *                         # uppercase keys must be valid
+ */
+          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "pysam/csamfile.pyx":1044
+ *                         if ":" not in field:
+ *                             raise ValueError("malformatted header: no ':' in field" )
+ *                         key, value = field.split(":",1)             # <<<<<<<<<<<<<<
+ *                         # uppercase keys must be valid
+ *                         # lowercase are permitted for user fields
+ */
+        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+          PyObject* sequence = __pyx_t_1;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          Py_ssize_t size = Py_SIZE(sequence);
+          #else
+          Py_ssize_t size = PySequence_Size(sequence);
+          #endif
+          if (unlikely(size != 2)) {
+            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          #if CYTHON_COMPILING_IN_CPYTHON
+          if (likely(PyTuple_CheckExact(sequence))) {
+            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
+            __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); 
+          } else {
+            __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
+            __pyx_t_12 = PyList_GET_ITEM(sequence, 1); 
+          }
+          __Pyx_INCREF(__pyx_t_8);
+          __Pyx_INCREF(__pyx_t_12);
+          #else
+          __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          #endif
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        } else {
+          Py_ssize_t index = -1;
+          __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_13);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext;
+          index = 0; __pyx_t_8 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_8)) goto __pyx_L13_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_8);
+          index = 1; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_12);
+          if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_14 = NULL;
+          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+          goto __pyx_L14_unpacking_done;
+          __pyx_L13_unpacking_failed:;
+          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+          __pyx_t_14 = NULL;
+          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_L14_unpacking_done:;
+        }
+        __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_8);
+        __pyx_t_8 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_12);
+        __pyx_t_12 = 0;
+
+        /* "pysam/csamfile.pyx":1047
+ *                         # uppercase keys must be valid
+ *                         # lowercase are permitted for user fields
+ *                         if key in VALID_HEADER_FIELDS[record]:             # <<<<<<<<<<<<<<
+ *                             x[key] = VALID_HEADER_FIELDS[record][key](value)
+ *                         elif not key.isupper():
+ */
+        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_12 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_t_12, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __pyx_t_4 = (__pyx_t_3 != 0);
+        if (__pyx_t_4) {
+
+          /* "pysam/csamfile.pyx":1048
+ *                         # lowercase are permitted for user fields
+ *                         if key in VALID_HEADER_FIELDS[record]:
+ *                             x[key] = VALID_HEADER_FIELDS[record][key](value)             # <<<<<<<<<<<<<<
+ *                         elif not key.isupper():
+ *                             x[key] = value
+ */
+          __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __pyx_t_1 = PyObject_GetItem(__pyx_t_12, __pyx_v_record); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __pyx_t_12 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_12);
+          __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 = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__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_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          if (unlikely(PyDict_SetItem(__pyx_v_x, __pyx_v_key, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          goto __pyx_L15;
+        }
+
+        /* "pysam/csamfile.pyx":1049
+ *                         if key in VALID_HEADER_FIELDS[record]:
+ *                             x[key] = VALID_HEADER_FIELDS[record][key](value)
+ *                         elif not key.isupper():             # <<<<<<<<<<<<<<
+ *                             x[key] = value
+ *                         else:
+ */
+        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_isupper); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_3 = ((!__pyx_t_4) != 0);
+        if (__pyx_t_3) {
+
+          /* "pysam/csamfile.pyx":1050
+ *                             x[key] = VALID_HEADER_FIELDS[record][key](value)
+ *                         elif not key.isupper():
+ *                             x[key] = value             # <<<<<<<<<<<<<<
+ *                         else:
+ *                             raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )
+ */
+          if (unlikely(PyDict_SetItem(__pyx_v_x, __pyx_v_key, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          goto __pyx_L15;
+        }
+        /*else*/ {
+
+          /* "pysam/csamfile.pyx":1052
+ *                             x[key] = value
+ *                         else:
+ *                             raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )             # <<<<<<<<<<<<<<
+ * 
+ *                     if VALID_HEADER_TYPES[record] == dict:
+ */
+          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_INCREF(__pyx_v_key);
+          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
+          __Pyx_GIVEREF(__pyx_v_key);
+          __Pyx_INCREF(__pyx_v_record);
+          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record);
+          __Pyx_GIVEREF(__pyx_v_record);
+          __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_unknown_field_code_s_in_record_s, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __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 = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __pyx_L15:;
+      }
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+      /* "pysam/csamfile.pyx":1054
+ *                             raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )
+ * 
+ *                     if VALID_HEADER_TYPES[record] == dict:             # <<<<<<<<<<<<<<
+ *                         if record in result:
+ *                             raise ValueError( "multiple '%s' lines are not permitted" % record )
+ */
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADER_TYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_record); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)((PyObject*)(&PyDict_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      if (__pyx_t_3) {
+
+        /* "pysam/csamfile.pyx":1055
+ * 
+ *                     if VALID_HEADER_TYPES[record] == dict:
+ *                         if record in result:             # <<<<<<<<<<<<<<
+ *                             raise ValueError( "multiple '%s' lines are not permitted" % record )
+ *                         result[record] = x
+ */
+        __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_record, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = (__pyx_t_3 != 0);
+        if (__pyx_t_4) {
+
+          /* "pysam/csamfile.pyx":1056
+ *                     if VALID_HEADER_TYPES[record] == dict:
+ *                         if record in result:
+ *                             raise ValueError( "multiple '%s' lines are not permitted" % record )             # <<<<<<<<<<<<<<
+ *                         result[record] = x
+ *                     elif VALID_HEADER_TYPES[record] == list:
+ */
+          __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_multiple_s_lines_are_not_permitt, __pyx_v_record); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
+          __Pyx_GIVEREF(__pyx_t_7);
+          __pyx_t_7 = 0;
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "pysam/csamfile.pyx":1057
+ *                         if record in result:
+ *                             raise ValueError( "multiple '%s' lines are not permitted" % record )
+ *                         result[record] = x             # <<<<<<<<<<<<<<
+ *                     elif VALID_HEADER_TYPES[record] == list:
+ *                         if record not in result: result[record] = []
+ */
+        if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_record, __pyx_v_x) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L16;
+      }
+
+      /* "pysam/csamfile.pyx":1058
+ *                             raise ValueError( "multiple '%s' lines are not permitted" % record )
+ *                         result[record] = x
+ *                     elif VALID_HEADER_TYPES[record] == list:             # <<<<<<<<<<<<<<
+ *                         if record not in result: result[record] = []
+ *                         result[record].append( x )
+ */
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADER_TYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_record); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      if (__pyx_t_4) {
+
+        /* "pysam/csamfile.pyx":1059
+ *                         result[record] = x
+ *                     elif VALID_HEADER_TYPES[record] == list:
+ *                         if record not in result: result[record] = []             # <<<<<<<<<<<<<<
+ *                         result[record].append( x )
+ * 
+ */
+        __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_record, __pyx_v_result, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = (__pyx_t_4 != 0);
+        if (__pyx_t_3) {
+          __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_record, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          goto __pyx_L18;
+        }
+        __pyx_L18:;
+
+        /* "pysam/csamfile.pyx":1060
+ *                     elif VALID_HEADER_TYPES[record] == list:
+ *                         if record not in result: result[record] = []
+ *                         result[record].append( x )             # <<<<<<<<<<<<<<
+ * 
+ *                 # if there are no SQ lines in the header, add the reference names
+ */
+        __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_v_record); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_x); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        goto __pyx_L16;
+      }
+      __pyx_L16:;
+      __pyx_L5_continue:;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "pysam/csamfile.pyx":1068
+ *                 # SQ lines, the SQ information is not part of the textual header and thus
+ *                 # are missing from the output. See issue 84.
+ *                 if "SQ" not in result:             # <<<<<<<<<<<<<<
+ *                     sq = []
+ *                     for ref, length in zip( self.references, self.lengths ):
+ */
+    __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_n_s_SQ, __pyx_v_result, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = (__pyx_t_3 != 0);
+    if (__pyx_t_4) {
+
+      /* "pysam/csamfile.pyx":1069
+ *                 # are missing from the output. See issue 84.
+ *                 if "SQ" not in result:
+ *                     sq = []             # <<<<<<<<<<<<<<
+ *                     for ref, length in zip( self.references, self.lengths ):
+ *                         sq.append( {'LN': length, 'SN': ref } )
+ */
+      __pyx_t_2 = PyList_New(0); 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_v_sq = ((PyObject*)__pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "pysam/csamfile.pyx":1070
+ *                 if "SQ" not in result:
+ *                     sq = []
+ *                     for ref, length in zip( self.references, self.lengths ):             # <<<<<<<<<<<<<<
+ *                         sq.append( {'LN': length, 'SN': ref } )
+ *                     result["SQ"] = sq
+ */
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_references); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lengths); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      __pyx_t_2 = 0;
+      __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
+        __pyx_t_8 = __pyx_t_7; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0;
+        __pyx_t_6 = NULL;
+      } else {
+        __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext;
+      }
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      for (;;) {
+        if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_8)) {
+          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_8)) {
+          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          __pyx_t_7 = __pyx_t_6(__pyx_t_8);
+          if (unlikely(!__pyx_t_7)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_7);
+        }
+        if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
+          PyObject* sequence = __pyx_t_7;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          Py_ssize_t size = Py_SIZE(sequence);
+          #else
+          Py_ssize_t size = PySequence_Size(sequence);
+          #endif
+          if (unlikely(size != 2)) {
+            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          #if CYTHON_COMPILING_IN_CPYTHON
+          if (likely(PyTuple_CheckExact(sequence))) {
+            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
+          } else {
+            __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
+          }
+          __Pyx_INCREF(__pyx_t_2);
+          __Pyx_INCREF(__pyx_t_1);
+          #else
+          __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          #endif
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        } else {
+          Py_ssize_t index = -1;
+          __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __pyx_t_14 = Py_TYPE(__pyx_t_12)->tp_iternext;
+          index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_12); if (unlikely(!__pyx_t_2)) goto __pyx_L22_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_2);
+          index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_12); if (unlikely(!__pyx_t_1)) goto __pyx_L22_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_1);
+          if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_14 = NULL;
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          goto __pyx_L23_unpacking_done;
+          __pyx_L22_unpacking_failed:;
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __pyx_t_14 = NULL;
+          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_L23_unpacking_done:;
+        }
+        __Pyx_XDECREF_SET(__pyx_v_ref, __pyx_t_2);
+        __pyx_t_2 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_1);
+        __pyx_t_1 = 0;
+
+        /* "pysam/csamfile.pyx":1071
+ *                     sq = []
+ *                     for ref, length in zip( self.references, self.lengths ):
+ *                         sq.append( {'LN': length, 'SN': ref } )             # <<<<<<<<<<<<<<
+ *                     result["SQ"] = sq
+ * 
+ */
+        __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_LN, __pyx_v_length) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_SN, __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_sq, __pyx_t_7); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+      /* "pysam/csamfile.pyx":1072
+ *                     for ref, length in zip( self.references, self.lengths ):
+ *                         sq.append( {'LN': length, 'SN': ref } )
+ *                     result["SQ"] = sq             # <<<<<<<<<<<<<<
+ * 
+ *             return result
+ */
+      if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_n_s_SQ, __pyx_v_sq) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L19;
+    }
+    __pyx_L19:;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "pysam/csamfile.pyx":1074
+ *                     result["SQ"] = sq
+ * 
+ *             return result             # <<<<<<<<<<<<<<
+ * 
+ *     def _buildLine( self, fields, record ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __pyx_v_result;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1019
+ *         a two-level dictionary.
+ *         '''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_result);
+  __Pyx_XDECREF(__pyx_v_t);
+  __Pyx_XDECREF(__pyx_v_line);
+  __Pyx_XDECREF(__pyx_v_fields);
+  __Pyx_XDECREF(__pyx_v_record);
+  __Pyx_XDECREF(__pyx_v_x);
+  __Pyx_XDECREF(__pyx_v_field);
+  __Pyx_XDECREF(__pyx_v_key);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XDECREF(__pyx_v_sq);
+  __Pyx_XDECREF(__pyx_v_ref);
+  __Pyx_XDECREF(__pyx_v_length);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1076
+ *             return result
+ * 
+ *     def _buildLine( self, fields, record ):             # <<<<<<<<<<<<<<
+ *         '''build a header line from *fields* dictionary for *record*'''
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_43_buildLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_42_buildLine[] = "Samfile._buildLine(self, fields, record)\nbuild a header line from *fields* dictionary for *record*";
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_43_buildLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_fields = 0;
+  PyObject *__pyx_v_record = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_buildLine (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_record,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fields)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_buildLine", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_buildLine") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_fields = values[0];
+    __pyx_v_record = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_buildLine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._buildLine", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_42_buildLine(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self), __pyx_v_fields, __pyx_v_record);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_42_buildLine(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_record) {
+  PyObject *__pyx_v_line = NULL;
+  PyObject *__pyx_v_key = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_8;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_buildLine", 0);
+  __Pyx_TraceCall("_buildLine", __pyx_f[0], 1076);
+
+  /* "pysam/csamfile.pyx":1080
+ * 
+ *         # TODO: add checking for field and sort order
+ *         line = ["@%s" % record ]             # <<<<<<<<<<<<<<
+ *         # comment
+ *         if record == "CO":
+ */
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_record); 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_t_2 = PyList_New(1); 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);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_v_line = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":1082
+ *         line = ["@%s" % record ]
+ *         # comment
+ *         if record == "CO":             # <<<<<<<<<<<<<<
+ *             line.append( fields )
+ *         # user tags
+ */
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_record, __pyx_n_s_CO, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":1083
+ *         # comment
+ *         if record == "CO":
+ *             line.append( fields )             # <<<<<<<<<<<<<<
+ *         # user tags
+ *         elif record.islower():
+ */
+    __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_line, __pyx_v_fields); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L3;
+  }
+
+  /* "pysam/csamfile.pyx":1085
+ *             line.append( fields )
+ *         # user tags
+ *         elif record.islower():             # <<<<<<<<<<<<<<
+ *             for key in sorted(fields):
+ *                 line.append( "%s:%s" % (key, str(fields[key])))
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_n_s_islower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __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_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":1086
+ *         # user tags
+ *         elif record.islower():
+ *             for key in sorted(fields):             # <<<<<<<<<<<<<<
+ *                 line.append( "%s:%s" % (key, str(fields[key])))
+ *         # defined tags
+ */
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_fields);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
+    __Pyx_GIVEREF(__pyx_v_fields);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, NULL); 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);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+      __pyx_t_6 = NULL;
+    } else {
+      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    for (;;) {
+      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_2 = __pyx_t_6(__pyx_t_1);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "pysam/csamfile.pyx":1087
+ *         elif record.islower():
+ *             for key in sorted(fields):
+ *                 line.append( "%s:%s" % (key, str(fields[key])))             # <<<<<<<<<<<<<<
+ *         # defined tags
+ *         else:
+ */
+      __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __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_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_7, 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_7); __pyx_t_7 = 0;
+      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_INCREF(__pyx_v_key);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
+      __Pyx_GIVEREF(__pyx_v_key);
+      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_7); 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_7); __pyx_t_7 = 0;
+      __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_line, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __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;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1091
+ *         else:
+ *             # write fields of the specification
+ *             for key in VALID_HEADER_ORDER[record]:             # <<<<<<<<<<<<<<
+ *                 if key in fields:
+ *                     line.append( "%s:%s" % (key, str(fields[key])))
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADER_ORDER); 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_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (unlikely(__pyx_t_2 == NULL)) {__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;
+    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+      __pyx_t_6 = NULL;
+    } else {
+      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); 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_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    for (;;) {
+      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_2 = __pyx_t_6(__pyx_t_1);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "pysam/csamfile.pyx":1092
+ *             # write fields of the specification
+ *             for key in VALID_HEADER_ORDER[record]:
+ *                 if key in fields:             # <<<<<<<<<<<<<<
+ *                     line.append( "%s:%s" % (key, str(fields[key])))
+ *             # write user fields
+ */
+      __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_fields, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = (__pyx_t_3 != 0);
+      if (__pyx_t_8) {
+
+        /* "pysam/csamfile.pyx":1093
+ *             for key in VALID_HEADER_ORDER[record]:
+ *                 if key in fields:
+ *                     line.append( "%s:%s" % (key, str(fields[key])))             # <<<<<<<<<<<<<<
+ *             # write user fields
+ *             for key in fields:
+ */
+        __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __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_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_INCREF(__pyx_v_key);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
+        __Pyx_GIVEREF(__pyx_v_key);
+        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_line, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        goto __pyx_L8;
+      }
+      __pyx_L8:;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":1095
+ *                     line.append( "%s:%s" % (key, str(fields[key])))
+ *             # write user fields
+ *             for key in fields:             # <<<<<<<<<<<<<<
+ *                 if not key.isupper():
+ *                     line.append( "%s:%s" % (key, str(fields[key])))
+ */
+    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
+      __pyx_t_1 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+      __pyx_t_6 = NULL;
+    } else {
+      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
+    }
+    for (;;) {
+      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_2 = __pyx_t_6(__pyx_t_1);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "pysam/csamfile.pyx":1096
+ *             # write user fields
+ *             for key in fields:
+ *                 if not key.isupper():             # <<<<<<<<<<<<<<
+ *                     line.append( "%s:%s" % (key, str(fields[key])))
+ * 
+ */
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_isupper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __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 = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_3 = ((!__pyx_t_8) != 0);
+      if (__pyx_t_3) {
+
+        /* "pysam/csamfile.pyx":1097
+ *             for key in fields:
+ *                 if not key.isupper():
+ *                     line.append( "%s:%s" % (key, str(fields[key])))             # <<<<<<<<<<<<<<
+ * 
+ *         return "\t".join( line )
+ */
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __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 = 1097; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __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 = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_INCREF(__pyx_v_key);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
+        __Pyx_GIVEREF(__pyx_v_key);
+        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
+        __Pyx_GIVEREF(__pyx_t_7);
+        __pyx_t_7 = 0;
+        __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_line, __pyx_t_7); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        goto __pyx_L11;
+      }
+      __pyx_L11:;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1099
+ *                     line.append( "%s:%s" % (key, str(fields[key])))
+ * 
+ *         return "\t".join( line )             # <<<<<<<<<<<<<<
+ * 
+ *     cdef bam_hdr_t * _buildHeader( self, new_header ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1076
+ *             return result
+ * 
+ *     def _buildLine( self, fields, record ):             # <<<<<<<<<<<<<<
+ *         '''build a header line from *fields* dictionary for *record*'''
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile._buildLine", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_line);
+  __Pyx_XDECREF(__pyx_v_key);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1101
+ *         return "\t".join( line )
+ * 
+ *     cdef bam_hdr_t * _buildHeader( self, new_header ):             # <<<<<<<<<<<<<<
+ *         '''return a new header built from a dictionary in *new_header*.
+ * 
+ */
+
+static bam_hdr_t *__pyx_f_5pysam_8csamfile_7Samfile__buildHeader(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self, PyObject *__pyx_v_new_header) {
+  PyObject *__pyx_v_lines = NULL;
+  bam_hdr_t *__pyx_v_dest;
+  PyObject *__pyx_v_record = NULL;
+  PyObject *__pyx_v_ttype = NULL;
+  PyObject *__pyx_v_data = NULL;
+  PyObject *__pyx_v_fields = NULL;
+  PyObject *__pyx_v_text = NULL;
+  PyObject *__pyx_v_btext = 0;
+  PyObject *__pyx_v_bseqname = 0;
+  PyObject *__pyx_v_seqs = NULL;
+  long __pyx_v_x;
+  PyObject *__pyx_v_seqname = NULL;
+  PyObject *__pyx_v_seqlen = NULL;
+  bam_hdr_t *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  Py_ssize_t __pyx_t_3;
+  PyObject *(*__pyx_t_4)(PyObject *);
+  int __pyx_t_5;
+  int __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  int __pyx_t_9;
+  Py_ssize_t __pyx_t_10;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *(*__pyx_t_13)(PyObject *);
+  char const *__pyx_t_14;
+  PyObject *__pyx_t_15 = NULL;
+  PyObject *__pyx_t_16 = NULL;
+  PyObject *__pyx_t_17 = NULL;
+  int __pyx_t_18;
+  PyObject *__pyx_t_19 = NULL;
+  int32_t __pyx_t_20;
+  uint32_t __pyx_t_21;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_buildHeader", 0);
+  __Pyx_TraceCall("_buildHeader", __pyx_f[0], 1101);
+
+  /* "pysam/csamfile.pyx":1107
+ *         '''
+ * 
+ *         lines = []             # <<<<<<<<<<<<<<
+ * 
+ *         # check if hash exists
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_lines = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1114
+ *         cdef bam_hdr_t * dest
+ * 
+ *         dest = bam_hdr_init()             # <<<<<<<<<<<<<<
+ * 
+ *         # first: defined tags
+ */
+  __pyx_v_dest = bam_hdr_init();
+
+  /* "pysam/csamfile.pyx":1117
+ * 
+ *         # first: defined tags
+ *         for record in VALID_HEADERS:             # <<<<<<<<<<<<<<
+ *             if record in new_header:
+ *                 ttype = VALID_HEADER_TYPES[record]
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADERS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __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_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+    __pyx_t_4 = NULL;
+  } else {
+    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_record, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":1118
+ *         # first: defined tags
+ *         for record in VALID_HEADERS:
+ *             if record in new_header:             # <<<<<<<<<<<<<<
+ *                 ttype = VALID_HEADER_TYPES[record]
+ *                 data = new_header[record]
+ */
+    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_v_new_header, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = (__pyx_t_5 != 0);
+    if (__pyx_t_6) {
+
+      /* "pysam/csamfile.pyx":1119
+ *         for record in VALID_HEADERS:
+ *             if record in new_header:
+ *                 ttype = VALID_HEADER_TYPES[record]             # <<<<<<<<<<<<<<
+ *                 data = new_header[record]
+ *                 if type(data) != type(ttype()):
+ */
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADER_TYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_ttype, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "pysam/csamfile.pyx":1120
+ *             if record in new_header:
+ *                 ttype = VALID_HEADER_TYPES[record]
+ *                 data = new_header[record]             # <<<<<<<<<<<<<<
+ *                 if type(data) != type(ttype()):
+ *                     raise ValueError(
+ */
+      __pyx_t_7 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "pysam/csamfile.pyx":1121
+ *                 ttype = VALID_HEADER_TYPES[record]
+ *                 data = new_header[record]
+ *                 if type(data) != type(ttype()):             # <<<<<<<<<<<<<<
+ *                     raise ValueError(
+ *                         "invalid type for record %s: %s, expected %s" %
+ */
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_ttype, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_data)), ((PyObject *)Py_TYPE(__pyx_t_7)), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      if (__pyx_t_6) {
+
+        /* "pysam/csamfile.pyx":1124
+ *                     raise ValueError(
+ *                         "invalid type for record %s: %s, expected %s" %
+ *                         (record, type(data), type(ttype())))             # <<<<<<<<<<<<<<
+ *                 if type(data) is dict:
+ *                     lines.append(self._buildLine(data, record))
+ */
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_ttype, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_INCREF(__pyx_v_record);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_record);
+        __Pyx_GIVEREF(__pyx_v_record);
+        __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_data)));
+        PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)Py_TYPE(__pyx_v_data)));
+        __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_data)));
+        __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_1)));
+        PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)Py_TYPE(__pyx_t_1)));
+        __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_1)));
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+        /* "pysam/csamfile.pyx":1123
+ *                 if type(data) != type(ttype()):
+ *                     raise ValueError(
+ *                         "invalid type for record %s: %s, expected %s" %             # <<<<<<<<<<<<<<
+ *                         (record, type(data), type(ttype())))
+ *                 if type(data) is dict:
+ */
+        __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_invalid_type_for_record_s_s_expe, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+        /* "pysam/csamfile.pyx":1122
+ *                 data = new_header[record]
+ *                 if type(data) != type(ttype()):
+ *                     raise ValueError(             # <<<<<<<<<<<<<<
+ *                         "invalid type for record %s: %s, expected %s" %
+ *                         (record, type(data), type(ttype())))
+ */
+        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "pysam/csamfile.pyx":1125
+ *                         "invalid type for record %s: %s, expected %s" %
+ *                         (record, type(data), type(ttype())))
+ *                 if type(data) is dict:             # <<<<<<<<<<<<<<
+ *                     lines.append(self._buildLine(data, record))
+ *                 else:
+ */
+      __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_v_data)) == ((PyObject *)((PyObject*)(&PyDict_Type))));
+      __pyx_t_5 = (__pyx_t_6 != 0);
+      if (__pyx_t_5) {
+
+        /* "pysam/csamfile.pyx":1126
+ *                         (record, type(data), type(ttype())))
+ *                 if type(data) is dict:
+ *                     lines.append(self._buildLine(data, record))             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     for fields in new_header[record]:
+ */
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_buildLine); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_INCREF(__pyx_v_data);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_data);
+        __Pyx_GIVEREF(__pyx_v_data);
+        __Pyx_INCREF(__pyx_v_record);
+        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_record);
+        __Pyx_GIVEREF(__pyx_v_record);
+        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lines, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        goto __pyx_L7;
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":1128
+ *                     lines.append(self._buildLine(data, record))
+ *                 else:
+ *                     for fields in new_header[record]:             # <<<<<<<<<<<<<<
+ *                         lines.append(self._buildLine(fields, record))
+ * 
+ */
+        __pyx_t_8 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_8);
+        if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
+          __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
+          __pyx_t_11 = NULL;
+        } else {
+          __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext;
+        }
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        for (;;) {
+          if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_7)) {
+            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_7)) {
+            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            __pyx_t_8 = __pyx_t_11(__pyx_t_7);
+            if (unlikely(!__pyx_t_8)) {
+              PyObject* exc_type = PyErr_Occurred();
+              if (exc_type) {
+                if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              }
+              break;
+            }
+            __Pyx_GOTREF(__pyx_t_8);
+          }
+          __Pyx_XDECREF_SET(__pyx_v_fields, __pyx_t_8);
+          __pyx_t_8 = 0;
+
+          /* "pysam/csamfile.pyx":1129
+ *                 else:
+ *                     for fields in new_header[record]:
+ *                         lines.append(self._buildLine(fields, record))             # <<<<<<<<<<<<<<
+ * 
+ *         # then: user tags (lower case), sorted alphabetically
+ */
+          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_buildLine); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_INCREF(__pyx_v_fields);
+          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
+          __Pyx_GIVEREF(__pyx_v_fields);
+          __Pyx_INCREF(__pyx_v_record);
+          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record);
+          __Pyx_GIVEREF(__pyx_v_record);
+          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lines, __pyx_t_12); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      }
+      __pyx_L7:;
+      goto __pyx_L5;
+    }
+    __pyx_L5:;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":1132
+ * 
+ *         # then: user tags (lower case), sorted alphabetically
+ *         for record, data in sorted(new_header.items()):             # <<<<<<<<<<<<<<
+ *             if record in VALID_HEADERS: continue
+ *             if type( data ) is dict:
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_header, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __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 = 1132; __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 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
+    __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+    __pyx_t_4 = NULL;
+  } else {
+    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  for (;;) {
+    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_7 = __pyx_t_4(__pyx_t_2);
+      if (unlikely(!__pyx_t_7)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_7);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
+      PyObject* sequence = __pyx_t_7;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_12);
+      __Pyx_INCREF(__pyx_t_1);
+      #else
+      __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      #endif
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext;
+      index = 0; __pyx_t_12 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_12)) goto __pyx_L12_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_12);
+      index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_1);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_13 = NULL;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      goto __pyx_L13_unpacking_done;
+      __pyx_L12_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_13 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L13_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_record, __pyx_t_12);
+    __pyx_t_12 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":1133
+ *         # then: user tags (lower case), sorted alphabetically
+ *         for record, data in sorted(new_header.items()):
+ *             if record in VALID_HEADERS: continue             # <<<<<<<<<<<<<<
+ *             if type( data ) is dict:
+ *                 lines.append( self._buildLine( data, record ) )
+ */
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_VALID_HEADERS); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_6 = (__pyx_t_5 != 0);
+    if (__pyx_t_6) {
+      goto __pyx_L10_continue;
+    }
+
+    /* "pysam/csamfile.pyx":1134
+ *         for record, data in sorted(new_header.items()):
+ *             if record in VALID_HEADERS: continue
+ *             if type( data ) is dict:             # <<<<<<<<<<<<<<
+ *                 lines.append( self._buildLine( data, record ) )
+ *             else:
+ */
+    __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_v_data)) == ((PyObject *)((PyObject*)(&PyDict_Type))));
+    __pyx_t_5 = (__pyx_t_6 != 0);
+    if (__pyx_t_5) {
+
+      /* "pysam/csamfile.pyx":1135
+ *             if record in VALID_HEADERS: continue
+ *             if type( data ) is dict:
+ *                 lines.append( self._buildLine( data, record ) )             # <<<<<<<<<<<<<<
+ *             else:
+ *                 for fields in new_header[record]:
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_buildLine); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_v_data);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
+      __Pyx_GIVEREF(__pyx_v_data);
+      __Pyx_INCREF(__pyx_v_record);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record);
+      __Pyx_GIVEREF(__pyx_v_record);
+      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lines, __pyx_t_12); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      goto __pyx_L15;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":1137
+ *                 lines.append( self._buildLine( data, record ) )
+ *             else:
+ *                 for fields in new_header[record]:             # <<<<<<<<<<<<<<
+ *                     lines.append( self._buildLine( fields, record ) )
+ * 
+ */
+      __pyx_t_12 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_12);
+      if (PyList_CheckExact(__pyx_t_12) || PyTuple_CheckExact(__pyx_t_12)) {
+        __pyx_t_1 = __pyx_t_12; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
+        __pyx_t_11 = NULL;
+      } else {
+        __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext;
+      }
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      for (;;) {
+        if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_1)) {
+          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_12 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_12); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_12 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_1)) {
+          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_12); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_12 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          __pyx_t_12 = __pyx_t_11(__pyx_t_1);
+          if (unlikely(!__pyx_t_12)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_12);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_fields, __pyx_t_12);
+        __pyx_t_12 = 0;
+
+        /* "pysam/csamfile.pyx":1138
+ *             else:
+ *                 for fields in new_header[record]:
+ *                     lines.append( self._buildLine( fields, record ) )             # <<<<<<<<<<<<<<
+ * 
+ *         text = "\n".join(lines) + "\n"
+ */
+        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_buildLine); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_INCREF(__pyx_v_fields);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_fields);
+        __Pyx_GIVEREF(__pyx_v_fields);
+        __Pyx_INCREF(__pyx_v_record);
+        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_record);
+        __Pyx_GIVEREF(__pyx_v_record);
+        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lines, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    }
+    __pyx_L15:;
+    __pyx_L10_continue:;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":1140
+ *                     lines.append( self._buildLine( fields, record ) )
+ * 
+ *         text = "\n".join(lines) + "\n"             # <<<<<<<<<<<<<<
+ *         if dest.text != NULL: free( dest.text )
+ *         dest.text = <char*>calloc( len(text), sizeof(char))
+ */
+  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_s__4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_text = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1141
+ * 
+ *         text = "\n".join(lines) + "\n"
+ *         if dest.text != NULL: free( dest.text )             # <<<<<<<<<<<<<<
+ *         dest.text = <char*>calloc( len(text), sizeof(char))
+ *         dest.l_text = len(text)
+ */
+  __pyx_t_5 = ((__pyx_v_dest->text != NULL) != 0);
+  if (__pyx_t_5) {
+    free(__pyx_v_dest->text);
+    goto __pyx_L18;
+  }
+  __pyx_L18:;
+
+  /* "pysam/csamfile.pyx":1142
+ *         text = "\n".join(lines) + "\n"
+ *         if dest.text != NULL: free( dest.text )
+ *         dest.text = <char*>calloc( len(text), sizeof(char))             # <<<<<<<<<<<<<<
+ *         dest.l_text = len(text)
+ *         cdef bytes btext = text.encode('ascii')
+ */
+  __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_dest->text = ((char *)calloc(__pyx_t_3, (sizeof(char))));
+
+  /* "pysam/csamfile.pyx":1143
+ *         if dest.text != NULL: free( dest.text )
+ *         dest.text = <char*>calloc( len(text), sizeof(char))
+ *         dest.l_text = len(text)             # <<<<<<<<<<<<<<
+ *         cdef bytes btext = text.encode('ascii')
+ *         strncpy( dest.text, btext, dest.l_text )
+ */
+  __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_dest->l_text = __pyx_t_3;
+
+  /* "pysam/csamfile.pyx":1144
+ *         dest.text = <char*>calloc( len(text), sizeof(char))
+ *         dest.l_text = len(text)
+ *         cdef bytes btext = text.encode('ascii')             # <<<<<<<<<<<<<<
+ *         strncpy( dest.text, btext, dest.l_text )
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_btext = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":1145
+ *         dest.l_text = len(text)
+ *         cdef bytes btext = text.encode('ascii')
+ *         strncpy( dest.text, btext, dest.l_text )             # <<<<<<<<<<<<<<
+ * 
+ *         cdef bytes bseqname
+ */
+  __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_v_btext); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  strncpy(__pyx_v_dest->text, __pyx_t_14, __pyx_v_dest->l_text);
+
+  /* "pysam/csamfile.pyx":1149
+ *         cdef bytes bseqname
+ *         # collect targets
+ *         if "SQ" in new_header:             # <<<<<<<<<<<<<<
+ *             seqs = []
+ *             for fields in new_header["SQ"]:
+ */
+  __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_n_s_SQ, __pyx_v_new_header, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = (__pyx_t_5 != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":1150
+ *         # collect targets
+ *         if "SQ" in new_header:
+ *             seqs = []             # <<<<<<<<<<<<<<
+ *             for fields in new_header["SQ"]:
+ *                 try:
+ */
+    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_v_seqs = ((PyObject*)__pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "pysam/csamfile.pyx":1151
+ *         if "SQ" in new_header:
+ *             seqs = []
+ *             for fields in new_header["SQ"]:             # <<<<<<<<<<<<<<
+ *                 try:
+ *                     seqs.append( (fields["SN"], fields["LN"] ) )
+ */
+    __pyx_t_2 = PyObject_GetItem(__pyx_v_new_header, __pyx_n_s_SQ); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __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_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
+      __pyx_t_4 = NULL;
+    } else {
+      __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    for (;;) {
+      if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_2 = __pyx_t_4(__pyx_t_1);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_fields, __pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "pysam/csamfile.pyx":1152
+ *             seqs = []
+ *             for fields in new_header["SQ"]:
+ *                 try:             # <<<<<<<<<<<<<<
+ *                     seqs.append( (fields["SN"], fields["LN"] ) )
+ *                 except KeyError:
+ */
+      {
+        __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+        __Pyx_XGOTREF(__pyx_t_15);
+        __Pyx_XGOTREF(__pyx_t_16);
+        __Pyx_XGOTREF(__pyx_t_17);
+        /*try:*/ {
+
+          /* "pysam/csamfile.pyx":1153
+ *             for fields in new_header["SQ"]:
+ *                 try:
+ *                     seqs.append( (fields["SN"], fields["LN"] ) )             # <<<<<<<<<<<<<<
+ *                 except KeyError:
+ *                     raise KeyError( "incomplete sequence information in '%s'" % str(fields))
+ */
+          __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_n_s_SN); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L22_error;};
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_8 = PyObject_GetItem(__pyx_v_fields, __pyx_n_s_LN); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L22_error;};
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+          __Pyx_GIVEREF(__pyx_t_2);
+          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
+          __Pyx_GIVEREF(__pyx_t_8);
+          __pyx_t_2 = 0;
+          __pyx_t_8 = 0;
+          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_seqs, __pyx_t_7); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        }
+        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+        goto __pyx_L29_try_end;
+        __pyx_L22_error:;
+        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+        /* "pysam/csamfile.pyx":1154
+ *                 try:
+ *                     seqs.append( (fields["SN"], fields["LN"] ) )
+ *                 except KeyError:             # <<<<<<<<<<<<<<
+ *                     raise KeyError( "incomplete sequence information in '%s'" % str(fields))
+ * 
+ */
+        __pyx_t_18 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+        if (__pyx_t_18) {
+          __Pyx_AddTraceback("pysam.csamfile.Samfile._buildHeader", __pyx_clineno, __pyx_lineno, __pyx_filename);
+          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_GOTREF(__pyx_t_2);
+
+          /* "pysam/csamfile.pyx":1155
+ *                     seqs.append( (fields["SN"], fields["LN"] ) )
+ *                 except KeyError:
+ *                     raise KeyError( "incomplete sequence information in '%s'" % str(fields))             # <<<<<<<<<<<<<<
+ * 
+ *             dest.n_targets = len(seqs)
+ */
+          __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_INCREF(__pyx_v_fields);
+          PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_fields);
+          __Pyx_GIVEREF(__pyx_v_fields);
+          __pyx_t_19 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_12, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+          __Pyx_GOTREF(__pyx_t_19);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __pyx_t_12 = __Pyx_PyString_Format(__pyx_kp_s_incomplete_sequence_information, __pyx_t_19); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+          __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+          __Pyx_GOTREF(__pyx_t_19);
+          PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_12);
+          __Pyx_GIVEREF(__pyx_t_12);
+          __pyx_t_12 = 0;
+          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+          __Pyx_Raise(__pyx_t_12, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          goto __pyx_L23_exception_handled;
+        }
+        goto __pyx_L24_except_error;
+        __pyx_L24_except_error:;
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_XGIVEREF(__pyx_t_16);
+        __Pyx_XGIVEREF(__pyx_t_17);
+        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+        goto __pyx_L1_error;
+        __pyx_L23_exception_handled:;
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_XGIVEREF(__pyx_t_16);
+        __Pyx_XGIVEREF(__pyx_t_17);
+        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+        __pyx_L29_try_end:;
+      }
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":1157
+ *                     raise KeyError( "incomplete sequence information in '%s'" % str(fields))
+ * 
+ *             dest.n_targets = len(seqs)             # <<<<<<<<<<<<<<
+ *             dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )
+ *             dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
+ */
+    __pyx_t_3 = PyList_GET_SIZE(__pyx_v_seqs); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_dest->n_targets = __pyx_t_3;
+
+    /* "pysam/csamfile.pyx":1158
+ * 
+ *             dest.n_targets = len(seqs)
+ *             dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )             # <<<<<<<<<<<<<<
+ *             dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
+ * 
+ */
+    __pyx_v_dest->target_name = ((char **)calloc(__pyx_v_dest->n_targets, (sizeof(char *))));
+
+    /* "pysam/csamfile.pyx":1159
+ *             dest.n_targets = len(seqs)
+ *             dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )
+ *             dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )             # <<<<<<<<<<<<<<
+ * 
+ *             for x from 0 <= x < dest.n_targets:
+ */
+    __pyx_v_dest->target_len = ((uint32_t *)calloc(__pyx_v_dest->n_targets, (sizeof(uint32_t))));
+
+    /* "pysam/csamfile.pyx":1161
+ *             dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
+ * 
+ *             for x from 0 <= x < dest.n_targets:             # <<<<<<<<<<<<<<
+ *                 seqname, seqlen = seqs[x]
+ *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
+ */
+    __pyx_t_20 = __pyx_v_dest->n_targets;
+    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_20; __pyx_v_x++) {
+
+      /* "pysam/csamfile.pyx":1162
+ * 
+ *             for x from 0 <= x < dest.n_targets:
+ *                 seqname, seqlen = seqs[x]             # <<<<<<<<<<<<<<
+ *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
+ *                 bseqname = seqname.encode('ascii')
+ */
+      __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_seqs, __pyx_v_x, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+        PyObject* sequence = __pyx_t_1;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        Py_ssize_t size = Py_SIZE(sequence);
+        #else
+        Py_ssize_t size = PySequence_Size(sequence);
+        #endif
+        if (unlikely(size != 2)) {
+          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        #if CYTHON_COMPILING_IN_CPYTHON
+        if (likely(PyTuple_CheckExact(sequence))) {
+          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
+        } else {
+          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
+        }
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_8);
+        #else
+        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        #endif
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      } else {
+        Py_ssize_t index = -1;
+        __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_13 = Py_TYPE(__pyx_t_7)->tp_iternext;
+        index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L34_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_2);
+        index = 1; __pyx_t_8 = __pyx_t_13(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L34_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_8);
+        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_13 = NULL;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        goto __pyx_L35_unpacking_done;
+        __pyx_L34_unpacking_failed:;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_13 = NULL;
+        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_L35_unpacking_done:;
+      }
+      __Pyx_XDECREF_SET(__pyx_v_seqname, __pyx_t_2);
+      __pyx_t_2 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_seqlen, __pyx_t_8);
+      __pyx_t_8 = 0;
+
+      /* "pysam/csamfile.pyx":1163
+ *             for x from 0 <= x < dest.n_targets:
+ *                 seqname, seqlen = seqs[x]
+ *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )             # <<<<<<<<<<<<<<
+ *                 bseqname = seqname.encode('ascii')
+ *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
+ */
+      __pyx_t_3 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_dest->target_name[__pyx_v_x]) = ((char *)calloc((__pyx_t_3 + 1), (sizeof(char))));
+
+      /* "pysam/csamfile.pyx":1164
+ *                 seqname, seqlen = seqs[x]
+ *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
+ *                 bseqname = seqname.encode('ascii')             # <<<<<<<<<<<<<<
+ *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
+ *                 dest.target_len[x] = seqlen
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqname, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      if (!(likely(PyBytes_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_XDECREF_SET(__pyx_v_bseqname, ((PyObject*)__pyx_t_8));
+      __pyx_t_8 = 0;
+
+      /* "pysam/csamfile.pyx":1165
+ *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
+ *                 bseqname = seqname.encode('ascii')
+ *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )             # <<<<<<<<<<<<<<
+ *                 dest.target_len[x] = seqlen
+ * 
+ */
+      __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_v_bseqname); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      strncpy((__pyx_v_dest->target_name[__pyx_v_x]), __pyx_t_14, (__pyx_t_3 + 1));
+
+      /* "pysam/csamfile.pyx":1166
+ *                 bseqname = seqname.encode('ascii')
+ *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
+ *                 dest.target_len[x] = seqlen             # <<<<<<<<<<<<<<
+ * 
+ *         return dest
+ */
+      __pyx_t_21 = __Pyx_PyInt_As_uint32_t(__pyx_v_seqlen); if (unlikely((__pyx_t_21 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_dest->target_len[__pyx_v_x]) = __pyx_t_21;
+    }
+    goto __pyx_L19;
+  }
+  __pyx_L19:;
+
+  /* "pysam/csamfile.pyx":1168
+ *                 dest.target_len[x] = seqlen
+ * 
+ *         return dest             # <<<<<<<<<<<<<<
+ * 
+ *     ###############################################################
+ */
+  __pyx_r = __pyx_v_dest;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1101
+ *         return "\t".join( line )
+ * 
+ *     cdef bam_hdr_t * _buildHeader( self, new_header ):             # <<<<<<<<<<<<<<
+ *         '''return a new header built from a dictionary in *new_header*.
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_19);
+  __Pyx_WriteUnraisable("pysam.csamfile.Samfile._buildHeader", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_lines);
+  __Pyx_XDECREF(__pyx_v_record);
+  __Pyx_XDECREF(__pyx_v_ttype);
+  __Pyx_XDECREF(__pyx_v_data);
+  __Pyx_XDECREF(__pyx_v_fields);
+  __Pyx_XDECREF(__pyx_v_text);
+  __Pyx_XDECREF(__pyx_v_btext);
+  __Pyx_XDECREF(__pyx_v_bseqname);
+  __Pyx_XDECREF(__pyx_v_seqs);
+  __Pyx_XDECREF(__pyx_v_seqname);
+  __Pyx_XDECREF(__pyx_v_seqlen);
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1178
+ *     ## Possible solutions: deprecate or open new file handle
+ *     ###############################################################
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_45__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_45__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_44__iter__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_44__iter__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+  __Pyx_TraceCall("__iter__", __pyx_f[0], 1178);
+
+  /* "pysam/csamfile.pyx":1179
+ *     ###############################################################
+ *     def __iter__(self):
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __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 = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":1180
+ *     def __iter__(self):
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         if not self.isbam and self.header.n_targets == 0:
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1182
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ *         if not self.isbam and self.header.n_targets == 0:             # <<<<<<<<<<<<<<
+ *             raise NotImplementedError(
+ *                 "can not iterate over samfile without header")
+ */
+  __pyx_t_4 = ((!(__pyx_v_self->isbam != 0)) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_3 = ((__pyx_v_self->header->n_targets == 0) != 0);
+    __pyx_t_5 = __pyx_t_3;
+  } else {
+    __pyx_t_5 = __pyx_t_4;
+  }
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":1183
+ * 
+ *         if not self.isbam and self.header.n_targets == 0:
+ *             raise NotImplementedError(             # <<<<<<<<<<<<<<
+ *                 "can not iterate over samfile without header")
+ *         return self
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1185
+ *             raise NotImplementedError(
+ *                 "can not iterate over samfile without header")
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     cdef bam1_t * getCurrent( self ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1178
+ *     ## Possible solutions: deprecate or open new file handle
+ *     ###############################################################
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1187
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+static bam1_t *__pyx_f_5pysam_8csamfile_7Samfile_getCurrent(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  bam1_t *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getCurrent", 0);
+  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1187);
+
+  /* "pysam/csamfile.pyx":1188
+ * 
+ *     cdef bam1_t * getCurrent( self ):
+ *         return self.b             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int cnext(self):
+ */
+  __pyx_r = __pyx_v_self->b;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1187
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1190
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         cversion of iterator. Used by :class:`pysam.Samfile.IteratorColumn`.
+ */
+
+static int __pyx_f_5pysam_8csamfile_7Samfile_cnext(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("cnext", 0);
+  __Pyx_TraceCall("cnext", __pyx_f[0], 1190);
+
+  /* "pysam/csamfile.pyx":1195
+ *         '''
+ *         cdef int ret
+ *         return sam_read1(self.htsfile,             # <<<<<<<<<<<<<<
+ *                          self.header,
+ *                          self.b)
+ */
+  __pyx_r = sam_read1(__pyx_v_self->htsfile, __pyx_v_self->header, __pyx_v_self->b);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1190
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         cversion of iterator. Used by :class:`pysam.Samfile.IteratorColumn`.
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1199
+ *                          self.b)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """
+ *         python version of next().
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_47__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_7Samfile_46__next__[] = "\n        python version of next().\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_7Samfile_46__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_7Samfile_47__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7Samfile_46__next__(((struct __pyx_obj_5pysam_8csamfile_Samfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7Samfile_46__next__(struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_self) {
+  int __pyx_v_ret;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 1199);
+
+  /* "pysam/csamfile.pyx":1204
+ *         """
+ *         cdef int ret
+ *         ret = sam_read1(self.htsfile, self.header, self.b)             # <<<<<<<<<<<<<<
+ *         if (ret >= 0):
+ *             return makeAlignedRead(self.b)
+ */
+  __pyx_v_ret = sam_read1(__pyx_v_self->htsfile, __pyx_v_self->header, __pyx_v_self->b);
+
+  /* "pysam/csamfile.pyx":1205
+ *         cdef int ret
+ *         ret = sam_read1(self.htsfile, self.header, self.b)
+ *         if (ret >= 0):             # <<<<<<<<<<<<<<
+ *             return makeAlignedRead(self.b)
+ *         else:
+ */
+  __pyx_t_1 = ((__pyx_v_ret >= 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1206
+ *         ret = sam_read1(self.htsfile, self.header, self.b)
+ *         if (ret >= 0):
+ *             return makeAlignedRead(self.b)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise StopIteration
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __pyx_f_5pysam_8csamfile_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1208
+ *             return makeAlignedRead(self.b)
+ *         else:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ * ##-------------------------------------------------------------------
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1199
+ *                          self.b)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """
+ *         python version of next().
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.Samfile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1236
+ *     '''
+ * 
+ *     def __init__(self, Samfile samfile, int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         if not samfile._isOpen():
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11IteratorRow_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11IteratorRow_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  int __pyx_v_reopen;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,&__pyx_n_s_reopen,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reopen);
+          if (value) { values[1] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+    if (values[1]) {
+      __pyx_v_reopen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_reopen = ((int)1);
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRow.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11IteratorRow___init__(((struct __pyx_obj_5pysam_8csamfile_IteratorRow *)__pyx_v_self), __pyx_v_samfile, __pyx_v_reopen);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11IteratorRow___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRow *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_reopen) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  char const *__pyx_t_5;
+  htsFile *__pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 1236);
+
+  /* "pysam/csamfile.pyx":1238
+ *     def __init__(self, Samfile samfile, int reopen=True):
+ * 
+ *         if not samfile._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "I/O operation on closed file" )
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_samfile), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __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 = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":1239
+ * 
+ *         if not samfile._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         # makes sure that samfile stays alive as long as the
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1243
+ *         # makes sure that samfile stays alive as long as the
+ *         # iterator is alive
+ *         self.samfile = samfile             # <<<<<<<<<<<<<<
+ * 
+ *         # reopen the file - note that this makes the iterator
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+  __Pyx_GOTREF(__pyx_v_self->samfile);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
+  __pyx_v_self->samfile = __pyx_v_samfile;
+
+  /* "pysam/csamfile.pyx":1247
+ *         # reopen the file - note that this makes the iterator
+ *         # slow and causes pileup to slow down significantly.
+ *         if reopen:             # <<<<<<<<<<<<<<
+ *             self.htsfile = hts_open(samfile._filename, 'r')
+ *             assert self.htsfile != NULL
+ */
+  __pyx_t_4 = (__pyx_v_reopen != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":1248
+ *         # slow and causes pileup to slow down significantly.
+ *         if reopen:
+ *             self.htsfile = hts_open(samfile._filename, 'r')             # <<<<<<<<<<<<<<
+ *             assert self.htsfile != NULL
+ *             # read header - required for accurate positioning
+ */
+    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_samfile->_filename); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_self->htsfile = hts_open(__pyx_t_5, __pyx_k_r);
+
+    /* "pysam/csamfile.pyx":1249
+ *         if reopen:
+ *             self.htsfile = hts_open(samfile._filename, 'r')
+ *             assert self.htsfile != NULL             # <<<<<<<<<<<<<<
+ *             # read header - required for accurate positioning
+ *             sam_hdr_read(self.htsfile)
+ */
+    #ifndef CYTHON_WITHOUT_ASSERTIONS
+    if (unlikely(!Py_OptimizeFlag)) {
+      if (unlikely(!((__pyx_v_self->htsfile != NULL) != 0))) {
+        PyErr_SetNone(PyExc_AssertionError);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+    }
+    #endif
+
+    /* "pysam/csamfile.pyx":1251
+ *             assert self.htsfile != NULL
+ *             # read header - required for accurate positioning
+ *             sam_hdr_read(self.htsfile)             # <<<<<<<<<<<<<<
+ *             self.owns_samfile = True
+ *         else:
+ */
+    sam_hdr_read(__pyx_v_self->htsfile);
+
+    /* "pysam/csamfile.pyx":1252
+ *             # read header - required for accurate positioning
+ *             sam_hdr_read(self.htsfile)
+ *             self.owns_samfile = True             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.htsfile = self.samfile.htsfile
+ */
+    __pyx_v_self->owns_samfile = 1;
+    goto __pyx_L4;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1254
+ *             self.owns_samfile = True
+ *         else:
+ *             self.htsfile = self.samfile.htsfile             # <<<<<<<<<<<<<<
+ *             self.owns_samfile = False
+ * 
+ */
+    __pyx_t_6 = __pyx_v_self->samfile->htsfile;
+    __pyx_v_self->htsfile = __pyx_t_6;
+
+    /* "pysam/csamfile.pyx":1255
+ *         else:
+ *             self.htsfile = self.samfile.htsfile
+ *             self.owns_samfile = False             # <<<<<<<<<<<<<<
+ * 
+ *         self.retval = 0
+ */
+    __pyx_v_self->owns_samfile = 0;
+  }
+  __pyx_L4:;
+
+  /* "pysam/csamfile.pyx":1257
+ *             self.owns_samfile = False
+ * 
+ *         self.retval = 0             # <<<<<<<<<<<<<<
+ * 
+ *         self.b = bam_init1()
+ */
+  __pyx_v_self->retval = 0;
+
+  /* "pysam/csamfile.pyx":1259
+ *         self.retval = 0
+ * 
+ *         self.b = bam_init1()             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__(self):
+ */
+  __pyx_v_self->b = bam_init1();
+
+  /* "pysam/csamfile.pyx":1236
+ *     '''
+ * 
+ *     def __init__(self, Samfile samfile, int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         if not samfile._isOpen():
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRow.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1261
+ *         self.b = bam_init1()
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         bam_destroy1(self.b)
+ *         if self.owns_samfile:
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_8csamfile_11IteratorRow_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_8csamfile_11IteratorRow_3__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_8csamfile_11IteratorRow_2__dealloc__(((struct __pyx_obj_5pysam_8csamfile_IteratorRow *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_8csamfile_11IteratorRow_2__dealloc__(struct __pyx_obj_5pysam_8csamfile_IteratorRow *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1261);
+
+  /* "pysam/csamfile.pyx":1262
+ * 
+ *     def __dealloc__(self):
+ *         bam_destroy1(self.b)             # <<<<<<<<<<<<<<
+ *         if self.owns_samfile:
+ *             hts_close(self.htsfile)
+ */
+  bam_destroy1(__pyx_v_self->b);
+
+  /* "pysam/csamfile.pyx":1263
+ *     def __dealloc__(self):
+ *         bam_destroy1(self.b)
+ *         if self.owns_samfile:             # <<<<<<<<<<<<<<
+ *             hts_close(self.htsfile)
+ * 
+ */
+  __pyx_t_1 = (__pyx_v_self->owns_samfile != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1264
+ *         bam_destroy1(self.b)
+ *         if self.owns_samfile:
+ *             hts_close(self.htsfile)             # <<<<<<<<<<<<<<
+ * 
+ * cdef class IteratorRowRegion(IteratorRow):
+ */
+    hts_close(__pyx_v_self->htsfile);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1261
+ *         self.b = bam_init1()
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         bam_destroy1(self.b)
+ *         if self.owns_samfile:
+ */
+
+  /* function exit code */
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/csamfile.pyx":1291
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile,             # <<<<<<<<<<<<<<
+ *                  int tid, int beg, int end,
+ *                  int reopen=True):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_17IteratorRowRegion_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_17IteratorRowRegion_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  int __pyx_v_tid;
+  int __pyx_v_beg;
+  int __pyx_v_end;
+  int __pyx_v_reopen;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,&__pyx_n_s_tid,&__pyx_n_s_beg,&__pyx_n_s_end,&__pyx_n_s_reopen,0};
+    PyObject* values[5] = {0,0,0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tid)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_beg)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  3:
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reopen);
+          if (value) { values[4] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+    __pyx_v_tid = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_beg = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_beg == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_end = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    if (values[4]) {
+      __pyx_v_reopen = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+
+      /* "pysam/csamfile.pyx":1293
+ *     def __init__(self, Samfile samfile,
+ *                  int tid, int beg, int end,
+ *                  int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+      __pyx_v_reopen = ((int)1);
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowRegion.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_17IteratorRowRegion___init__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)__pyx_v_self), __pyx_v_samfile, __pyx_v_tid, __pyx_v_beg, __pyx_v_end, __pyx_v_reopen);
+
+  /* "pysam/csamfile.pyx":1291
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile,             # <<<<<<<<<<<<<<
+ *                  int tid, int beg, int end,
+ *                  int reopen=True):
+ */
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_17IteratorRowRegion___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_tid, int __pyx_v_beg, int __pyx_v_end, int __pyx_v_reopen) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 1291);
+
+  /* "pysam/csamfile.pyx":1295
+ *                  int reopen=True):
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)             # <<<<<<<<<<<<<<
+ * 
+ *         if not samfile._hasIndex():
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRow)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __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 = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reopen, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __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_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":1297
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ * 
+ *         if not samfile._hasIndex():             # <<<<<<<<<<<<<<
+ *             raise ValueError( "no index available for iteration" )
+ * 
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_samfile), __pyx_n_s_hasIndex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __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 = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_6 = ((!__pyx_t_5) != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":1298
+ * 
+ *         if not samfile._hasIndex():
+ *             raise ValueError( "no index available for iteration" )             # <<<<<<<<<<<<<<
+ * 
+ *         self.iter = sam_itr_queryi(
+ */
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1300
+ *             raise ValueError( "no index available for iteration" )
+ * 
+ *         self.iter = sam_itr_queryi(             # <<<<<<<<<<<<<<
+ *             self.samfile.index,
+ *             tid,
+ */
+  __pyx_v_self->iter = sam_itr_queryi(__pyx_v_self->__pyx_base.samfile->index, __pyx_v_tid, __pyx_v_beg, __pyx_v_end);
+
+  /* "pysam/csamfile.pyx":1291
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile,             # <<<<<<<<<<<<<<
+ *                  int tid, int beg, int end,
+ *                  int reopen=True):
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowRegion.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1306
+ *             end)
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_17IteratorRowRegion_3__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_17IteratorRowRegion_3__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_17IteratorRowRegion_2__iter__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_17IteratorRowRegion_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+  __Pyx_TraceCall("__iter__", __pyx_f[0], 1306);
+
+  /* "pysam/csamfile.pyx":1307
+ * 
+ *     def __iter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     cdef bam1_t * getCurrent( self ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1306
+ *             end)
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1309
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+static bam1_t *__pyx_f_5pysam_8csamfile_17IteratorRowRegion_getCurrent(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self) {
+  bam1_t *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getCurrent", 0);
+  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1309);
+
+  /* "pysam/csamfile.pyx":1310
+ * 
+ *     cdef bam1_t * getCurrent( self ):
+ *         return self.b             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int cnext(self):
+ */
+  __pyx_r = __pyx_v_self->__pyx_base.b;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1309
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1312
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         self.retval = hts_itr_next(self.htsfile.fp.bgzf,
+ */
+
+static int __pyx_f_5pysam_8csamfile_17IteratorRowRegion_cnext(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("cnext", 0);
+  __Pyx_TraceCall("cnext", __pyx_f[0], 1312);
+
+  /* "pysam/csamfile.pyx":1314
+ *     cdef int cnext(self):
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         self.retval = hts_itr_next(self.htsfile.fp.bgzf,             # <<<<<<<<<<<<<<
+ *                                    self.iter,
+ *                                    self.b,
+ */
+  __pyx_v_self->__pyx_base.retval = hts_itr_next(__pyx_v_self->__pyx_base.htsfile->fp.bgzf, __pyx_v_self->iter, __pyx_v_self->__pyx_base.b, NULL);
+
+  /* "pysam/csamfile.pyx":1312
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         self.retval = hts_itr_next(self.htsfile.fp.bgzf,
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1319
+ *                                    NULL)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_17IteratorRowRegion_5__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_17IteratorRowRegion_4__next__[] = "python version of next().\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_17IteratorRowRegion_4__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_17IteratorRowRegion_5__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_17IteratorRowRegion_4__next__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_17IteratorRowRegion_4__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 1319);
+
+  /* "pysam/csamfile.pyx":1322
+ *         """python version of next().
+ *         """
+ *         self.cnext()             # <<<<<<<<<<<<<<
+ *         if self.retval < 0:
+ *             raise StopIteration
+ */
+  ((struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowRegion *)__pyx_v_self->__pyx_vtab)->cnext(__pyx_v_self);
+
+  /* "pysam/csamfile.pyx":1323
+ *         """
+ *         self.cnext()
+ *         if self.retval < 0:             # <<<<<<<<<<<<<<
+ *             raise StopIteration
+ *         return makeAlignedRead(self.b)
+ */
+  __pyx_t_1 = ((__pyx_v_self->__pyx_base.retval < 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1324
+ *         self.cnext()
+ *         if self.retval < 0:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ *         return makeAlignedRead(self.b)
+ * 
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1325
+ *         if self.retval < 0:
+ *             raise StopIteration
+ *         return makeAlignedRead(self.b)             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __pyx_f_5pysam_8csamfile_makeAlignedRead(__pyx_v_self->__pyx_base.b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1319
+ *                                    NULL)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowRegion.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1327
+ *         return makeAlignedRead(self.b)
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         hts_itr_destroy(self.iter)
+ * 
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_8csamfile_17IteratorRowRegion_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_8csamfile_17IteratorRowRegion_7__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_8csamfile_17IteratorRowRegion_6__dealloc__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_8csamfile_17IteratorRowRegion_6__dealloc__(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1327);
+
+  /* "pysam/csamfile.pyx":1328
+ * 
+ *     def __dealloc__(self):
+ *         hts_itr_destroy(self.iter)             # <<<<<<<<<<<<<<
+ * 
+ * cdef class IteratorRowHead(IteratorRow):
+ */
+  hts_itr_destroy(__pyx_v_self->iter);
+
+  /* "pysam/csamfile.pyx":1327
+ *         return makeAlignedRead(self.b)
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         hts_itr_destroy(self.iter)
+ * 
+ */
+
+  /* function exit code */
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/csamfile.pyx":1346
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, int n, int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_15IteratorRowHead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_15IteratorRowHead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  int __pyx_v_n;
+  int __pyx_v_reopen;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,&__pyx_n_s_n,&__pyx_n_s_reopen,0};
+    PyObject* values[3] = {0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reopen);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+    __pyx_v_n = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    if (values[2]) {
+      __pyx_v_reopen = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_reopen = ((int)1);
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowHead.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_15IteratorRowHead___init__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *)__pyx_v_self), __pyx_v_samfile, __pyx_v_n, __pyx_v_reopen);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_15IteratorRowHead___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_n, int __pyx_v_reopen) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 1346);
+
+  /* "pysam/csamfile.pyx":1348
+ *     def __init__(self, Samfile samfile, int n, int reopen=True):
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)             # <<<<<<<<<<<<<<
+ * 
+ *         self.max_rows = n
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRow)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __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 = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reopen, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __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_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":1350
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ * 
+ *         self.max_rows = n             # <<<<<<<<<<<<<<
+ *         self.current_row = 0
+ * 
+ */
+  __pyx_v_self->max_rows = __pyx_v_n;
+
+  /* "pysam/csamfile.pyx":1351
+ * 
+ *         self.max_rows = n
+ *         self.current_row = 0             # <<<<<<<<<<<<<<
+ * 
+ *     def __iter__(self):
+ */
+  __pyx_v_self->current_row = 0;
+
+  /* "pysam/csamfile.pyx":1346
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, int n, int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowHead.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1353
+ *         self.current_row = 0
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_15IteratorRowHead_3__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_15IteratorRowHead_3__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_15IteratorRowHead_2__iter__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_15IteratorRowHead_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+  __Pyx_TraceCall("__iter__", __pyx_f[0], 1353);
+
+  /* "pysam/csamfile.pyx":1354
+ * 
+ *     def __iter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     cdef bam1_t * getCurrent( self ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1353
+ *         self.current_row = 0
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1356
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+static bam1_t *__pyx_f_5pysam_8csamfile_15IteratorRowHead_getCurrent(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *__pyx_v_self) {
+  bam1_t *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getCurrent", 0);
+  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1356);
+
+  /* "pysam/csamfile.pyx":1357
+ * 
+ *     cdef bam1_t * getCurrent( self ):
+ *         return self.b             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int cnext(self):
+ */
+  __pyx_r = __pyx_v_self->__pyx_base.b;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1356
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1359
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         return sam_read1(self.htsfile,
+ */
+
+static int __pyx_f_5pysam_8csamfile_15IteratorRowHead_cnext(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("cnext", 0);
+  __Pyx_TraceCall("cnext", __pyx_f[0], 1359);
+
+  /* "pysam/csamfile.pyx":1361
+ *     cdef int cnext(self):
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         return sam_read1(self.htsfile,             # <<<<<<<<<<<<<<
+ *                          self.samfile.header,
+ *                          self.b)
+ */
+  __pyx_r = sam_read1(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->__pyx_base.samfile->header, __pyx_v_self->__pyx_base.b);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1359
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         return sam_read1(self.htsfile,
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1365
+ *                          self.b)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_15IteratorRowHead_5__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_15IteratorRowHead_4__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_15IteratorRowHead_4__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_15IteratorRowHead_5__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_15IteratorRowHead_4__next__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_15IteratorRowHead_4__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *__pyx_v_self) {
+  int __pyx_v_ret;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 1365);
+
+  /* "pysam/csamfile.pyx":1370
+ *         pyrex uses this non-standard name instead of next()
+ *         """
+ *         if self.current_row >= self.max_rows:             # <<<<<<<<<<<<<<
+ *             raise StopIteration
+ * 
+ */
+  __pyx_t_1 = ((__pyx_v_self->current_row >= __pyx_v_self->max_rows) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1371
+ *         """
+ *         if self.current_row >= self.max_rows:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ *         cdef int ret
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1374
+ * 
+ *         cdef int ret
+ *         ret = sam_read1(self.htsfile,             # <<<<<<<<<<<<<<
+ *                         self.samfile.header, self.b)
+ *         if (ret >= 0):
+ */
+  __pyx_v_ret = sam_read1(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->__pyx_base.samfile->header, __pyx_v_self->__pyx_base.b);
+
+  /* "pysam/csamfile.pyx":1376
+ *         ret = sam_read1(self.htsfile,
+ *                         self.samfile.header, self.b)
+ *         if (ret >= 0):             # <<<<<<<<<<<<<<
+ *             self.current_row += 1
+ *             return makeAlignedRead( self.b )
+ */
+  __pyx_t_1 = ((__pyx_v_ret >= 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1377
+ *                         self.samfile.header, self.b)
+ *         if (ret >= 0):
+ *             self.current_row += 1             # <<<<<<<<<<<<<<
+ *             return makeAlignedRead( self.b )
+ *         else:
+ */
+    __pyx_v_self->current_row = (__pyx_v_self->current_row + 1);
+
+    /* "pysam/csamfile.pyx":1378
+ *         if (ret >= 0):
+ *             self.current_row += 1
+ *             return makeAlignedRead( self.b )             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise StopIteration
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __pyx_f_5pysam_8csamfile_makeAlignedRead(__pyx_v_self->__pyx_base.b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1380
+ *             return makeAlignedRead( self.b )
+ *         else:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1365
+ *                          self.b)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowHead.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1399
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, int reopen = True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_14IteratorRowAll_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_14IteratorRowAll_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  int __pyx_v_reopen;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,&__pyx_n_s_reopen,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reopen);
+          if (value) { values[1] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+    if (values[1]) {
+      __pyx_v_reopen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_reopen = ((int)1);
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowAll.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_14IteratorRowAll___init__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *)__pyx_v_self), __pyx_v_samfile, __pyx_v_reopen);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_14IteratorRowAll___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_reopen) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 1399);
+
+  /* "pysam/csamfile.pyx":1401
+ *     def __init__(self, Samfile samfile, int reopen = True):
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)             # <<<<<<<<<<<<<<
+ * 
+ *     def __iter__(self):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRow)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __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 = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reopen, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __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_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":1399
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, int reopen = True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowAll.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1403
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorRowAll_3__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorRowAll_3__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_14IteratorRowAll_2__iter__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorRowAll_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+  __Pyx_TraceCall("__iter__", __pyx_f[0], 1403);
+
+  /* "pysam/csamfile.pyx":1404
+ * 
+ *     def __iter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     cdef bam1_t * getCurrent( self ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1403
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1406
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+static bam1_t *__pyx_f_5pysam_8csamfile_14IteratorRowAll_getCurrent(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *__pyx_v_self) {
+  bam1_t *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getCurrent", 0);
+  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1406);
+
+  /* "pysam/csamfile.pyx":1407
+ * 
+ *     cdef bam1_t * getCurrent( self ):
+ *         return self.b             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int cnext(self):
+ */
+  __pyx_r = __pyx_v_self->__pyx_base.b;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1406
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1409
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         return sam_read1(self.htsfile,
+ */
+
+static int __pyx_f_5pysam_8csamfile_14IteratorRowAll_cnext(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("cnext", 0);
+  __Pyx_TraceCall("cnext", __pyx_f[0], 1409);
+
+  /* "pysam/csamfile.pyx":1411
+ *     cdef int cnext(self):
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         return sam_read1(self.htsfile,             # <<<<<<<<<<<<<<
+ *                          self.samfile.header,
+ *                          self.b)
+ */
+  __pyx_r = sam_read1(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->__pyx_base.samfile->header, __pyx_v_self->__pyx_base.b);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1409
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''cversion of iterator. Used by IteratorColumn'''
+ *         return sam_read1(self.htsfile,
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1415
+ *                          self.b)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorRowAll_5__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_14IteratorRowAll_4__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_14IteratorRowAll_4__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorRowAll_5__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_14IteratorRowAll_4__next__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorRowAll_4__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *__pyx_v_self) {
+  int __pyx_v_ret;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 1415);
+
+  /* "pysam/csamfile.pyx":1421
+ *         """
+ *         cdef int ret
+ *         ret = sam_read1(self.htsfile,             # <<<<<<<<<<<<<<
+ *                         self.samfile.header,
+ *                         self.b)
+ */
+  __pyx_v_ret = sam_read1(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->__pyx_base.samfile->header, __pyx_v_self->__pyx_base.b);
+
+  /* "pysam/csamfile.pyx":1424
+ *                         self.samfile.header,
+ *                         self.b)
+ *         if (ret >= 0):             # <<<<<<<<<<<<<<
+ *             return makeAlignedRead(self.b)
+ *         else:
+ */
+  __pyx_t_1 = ((__pyx_v_ret >= 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1425
+ *                         self.b)
+ *         if (ret >= 0):
+ *             return makeAlignedRead(self.b)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise StopIteration
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __pyx_f_5pysam_8csamfile_makeAlignedRead(__pyx_v_self->__pyx_base.b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1427
+ *             return makeAlignedRead(self.b)
+ *         else:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1415
+ *                          self.b)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowAll.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1438
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  PyObject *__pyx_v_reopen = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,&__pyx_n_s_reopen,0};
+    PyObject* values[2] = {0,0};
+    values[1] = ((PyObject *)Py_True);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reopen);
+          if (value) { values[1] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+    __pyx_v_reopen = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowAllRefs.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs___init__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *)__pyx_v_self), __pyx_v_samfile, __pyx_v_reopen);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, PyObject *__pyx_v_reopen) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 1438);
+
+  /* "pysam/csamfile.pyx":1440
+ *     def __init__(self, Samfile samfile, reopen=True):
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)             # <<<<<<<<<<<<<<
+ * 
+ *         if not samfile._hasIndex():
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRow)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __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 = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reopen, __pyx_v_reopen) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __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_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":1442
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ * 
+ *         if not samfile._hasIndex():             # <<<<<<<<<<<<<<
+ *             raise ValueError("no index available for fetch")
+ * 
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_samfile), __pyx_n_s_hasIndex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __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 = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_6 = ((!__pyx_t_5) != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":1443
+ * 
+ *         if not samfile._hasIndex():
+ *             raise ValueError("no index available for fetch")             # <<<<<<<<<<<<<<
+ * 
+ *         self.tid = -1
+ */
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1445
+ *             raise ValueError("no index available for fetch")
+ * 
+ *         self.tid = -1             # <<<<<<<<<<<<<<
+ * 
+ *     def nextiter(self):
+ */
+  __pyx_v_self->tid = -1;
+
+  /* "pysam/csamfile.pyx":1438
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowAllRefs.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1447
+ *         self.tid = -1
+ * 
+ *     def nextiter(self):             # <<<<<<<<<<<<<<
+ *         self.rowiter = IteratorRowRegion(self.samfile,
+ *                                          self.tid,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_3nextiter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_18IteratorRowAllRefs_2nextiter[] = "IteratorRowAllRefs.nextiter(self)";
+static PyObject *__pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_3nextiter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("nextiter (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_2nextiter(((struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_2nextiter(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("nextiter", 0);
+  __Pyx_TraceCall("nextiter", __pyx_f[0], 1447);
+
+  /* "pysam/csamfile.pyx":1449
+ *     def nextiter(self):
+ *         self.rowiter = IteratorRowRegion(self.samfile,
+ *                                          self.tid,             # <<<<<<<<<<<<<<
+ *                                          0,
+ *                                          1<<29)
+ */
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "pysam/csamfile.pyx":1448
+ * 
+ *     def nextiter(self):
+ *         self.rowiter = IteratorRowRegion(self.samfile,             # <<<<<<<<<<<<<<
+ *                                          self.tid,
+ *                                          0,
+ */
+  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.samfile));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base.samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.samfile));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_int_0);
+  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0);
+  __Pyx_GIVEREF(__pyx_int_0);
+  __Pyx_INCREF(__pyx_int_536870912);
+  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_536870912);
+  __Pyx_GIVEREF(__pyx_int_536870912);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowRegion)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->rowiter);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->rowiter));
+  __pyx_v_self->rowiter = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1447
+ *         self.tid = -1
+ * 
+ *     def nextiter(self):             # <<<<<<<<<<<<<<
+ *         self.rowiter = IteratorRowRegion(self.samfile,
+ *                                          self.tid,
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowAllRefs.nextiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1453
+ *                                          1<<29)
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_5__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_5__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_4__iter__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_4__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+  __Pyx_TraceCall("__iter__", __pyx_f[0], 1453);
+
+  /* "pysam/csamfile.pyx":1454
+ * 
+ *     def __iter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     def __next__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1453
+ *                                          1<<29)
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1456
+ *         return self
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_7__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_18IteratorRowAllRefs_6__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_18IteratorRowAllRefs_6__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_7__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_6__next__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_18IteratorRowAllRefs_6__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 1456);
+
+  /* "pysam/csamfile.pyx":1462
+ *         """
+ *         # Create an initial iterator
+ *         if self.tid == -1:             # <<<<<<<<<<<<<<
+ *             if not self.samfile.nreferences:
+ *                 raise StopIteration
+ */
+  __pyx_t_1 = ((__pyx_v_self->tid == -1) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1463
+ *         # Create an initial iterator
+ *         if self.tid == -1:
+ *             if not self.samfile.nreferences:             # <<<<<<<<<<<<<<
+ *                 raise StopIteration
+ *             self.tid = 0
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.samfile), __pyx_n_s_nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_3 = ((!__pyx_t_1) != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/csamfile.pyx":1464
+ *         if self.tid == -1:
+ *             if not self.samfile.nreferences:
+ *                 raise StopIteration             # <<<<<<<<<<<<<<
+ *             self.tid = 0
+ *             self.nextiter()
+ */
+      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":1465
+ *             if not self.samfile.nreferences:
+ *                 raise StopIteration
+ *             self.tid = 0             # <<<<<<<<<<<<<<
+ *             self.nextiter()
+ * 
+ */
+    __pyx_v_self->tid = 0;
+
+    /* "pysam/csamfile.pyx":1466
+ *                 raise StopIteration
+ *             self.tid = 0
+ *             self.nextiter()             # <<<<<<<<<<<<<<
+ * 
+ *         while 1:
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nextiter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __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_4); __pyx_t_4 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1468
+ *             self.nextiter()
+ * 
+ *         while 1:             # <<<<<<<<<<<<<<
+ *             self.rowiter.cnext()
+ * 
+ */
+  while (1) {
+
+    /* "pysam/csamfile.pyx":1469
+ * 
+ *         while 1:
+ *             self.rowiter.cnext()             # <<<<<<<<<<<<<<
+ * 
+ *             # If current iterator is not exhausted, return aligned read
+ */
+    ((struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowRegion *)__pyx_v_self->rowiter->__pyx_vtab)->cnext(__pyx_v_self->rowiter);
+
+    /* "pysam/csamfile.pyx":1472
+ * 
+ *             # If current iterator is not exhausted, return aligned read
+ *             if self.rowiter.retval>0:             # <<<<<<<<<<<<<<
+ *                 return makeAlignedRead(self.rowiter.b)
+ * 
+ */
+    __pyx_t_3 = ((__pyx_v_self->rowiter->__pyx_base.retval > 0) != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/csamfile.pyx":1473
+ *             # If current iterator is not exhausted, return aligned read
+ *             if self.rowiter.retval>0:
+ *                 return makeAlignedRead(self.rowiter.b)             # <<<<<<<<<<<<<<
+ * 
+ *             self.tid += 1
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_4 = __pyx_f_5pysam_8csamfile_makeAlignedRead(__pyx_v_self->rowiter->__pyx_base.b); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_r = __pyx_t_4;
+      __pyx_t_4 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "pysam/csamfile.pyx":1475
+ *                 return makeAlignedRead(self.rowiter.b)
+ * 
+ *             self.tid += 1             # <<<<<<<<<<<<<<
+ * 
+ *             # Otherwise, proceed to next reference or stop
+ */
+    __pyx_v_self->tid = (__pyx_v_self->tid + 1);
+
+    /* "pysam/csamfile.pyx":1478
+ * 
+ *             # Otherwise, proceed to next reference or stop
+ *             if self.tid < self.samfile.nreferences:             # <<<<<<<<<<<<<<
+ *                 self.nextiter()
+ *             else:
+ */
+    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->tid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.samfile), __pyx_n_s_nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_3) {
+
+      /* "pysam/csamfile.pyx":1479
+ *             # Otherwise, proceed to next reference or stop
+ *             if self.tid < self.samfile.nreferences:
+ *                 self.nextiter()             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise StopIteration
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nextiter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; __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_2); __pyx_t_2 = 0;
+      goto __pyx_L8;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":1481
+ *                 self.nextiter()
+ *             else:
+ *                 raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L8:;
+  }
+
+  /* "pysam/csamfile.pyx":1456
+ *         return self
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowAllRefs.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1494
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, positions, int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_20IteratorRowSelection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_20IteratorRowSelection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  PyObject *__pyx_v_positions = 0;
+  int __pyx_v_reopen;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,&__pyx_n_s_positions,&__pyx_n_s_reopen,0};
+    PyObject* values[3] = {0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reopen);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+    __pyx_v_positions = values[1];
+    if (values[2]) {
+      __pyx_v_reopen = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_reopen = ((int)1);
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowSelection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_20IteratorRowSelection___init__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *)__pyx_v_self), __pyx_v_samfile, __pyx_v_positions, __pyx_v_reopen);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_20IteratorRowSelection___init__(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, PyObject *__pyx_v_positions, int __pyx_v_reopen) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  BGZF *__pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 1494);
+
+  /* "pysam/csamfile.pyx":1496
+ *     def __init__(self, Samfile samfile, positions, int reopen=True):
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)             # <<<<<<<<<<<<<<
+ * 
+ *         self.positions = positions
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRow)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __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 = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reopen, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __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_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":1498
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ * 
+ *         self.positions = positions             # <<<<<<<<<<<<<<
+ *         self.current_pos = 0
+ * 
+ */
+  __Pyx_INCREF(__pyx_v_positions);
+  __Pyx_GIVEREF(__pyx_v_positions);
+  __Pyx_GOTREF(__pyx_v_self->positions);
+  __Pyx_DECREF(__pyx_v_self->positions);
+  __pyx_v_self->positions = __pyx_v_positions;
+
+  /* "pysam/csamfile.pyx":1499
+ * 
+ *         self.positions = positions
+ *         self.current_pos = 0             # <<<<<<<<<<<<<<
+ * 
+ *         self.fp = self.htsfile.fp.bgzf
+ */
+  __pyx_v_self->current_pos = 0;
+
+  /* "pysam/csamfile.pyx":1501
+ *         self.current_pos = 0
+ * 
+ *         self.fp = self.htsfile.fp.bgzf             # <<<<<<<<<<<<<<
+ * 
+ *     def __iter__(self):
+ */
+  __pyx_t_5 = __pyx_v_self->__pyx_base.htsfile->fp.bgzf;
+  __pyx_v_self->fp = __pyx_t_5;
+
+  /* "pysam/csamfile.pyx":1494
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, positions, int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         IteratorRow.__init__(self, samfile, reopen=reopen)
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowSelection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1503
+ *         self.fp = self.htsfile.fp.bgzf
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_20IteratorRowSelection_3__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_20IteratorRowSelection_3__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_20IteratorRowSelection_2__iter__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_20IteratorRowSelection_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+  __Pyx_TraceCall("__iter__", __pyx_f[0], 1503);
+
+  /* "pysam/csamfile.pyx":1504
+ * 
+ *     def __iter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     cdef bam1_t * getCurrent(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1503
+ *         self.fp = self.htsfile.fp.bgzf
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1506
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent(self):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+static bam1_t *__pyx_f_5pysam_8csamfile_20IteratorRowSelection_getCurrent(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *__pyx_v_self) {
+  bam1_t *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getCurrent", 0);
+  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1506);
+
+  /* "pysam/csamfile.pyx":1507
+ * 
+ *     cdef bam1_t * getCurrent(self):
+ *         return self.b             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int cnext(self):
+ */
+  __pyx_r = __pyx_v_self->__pyx_base.b;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1506
+ *         return self
+ * 
+ *     cdef bam1_t * getCurrent(self):             # <<<<<<<<<<<<<<
+ *         return self.b
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1509
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''cversion of iterator'''
+ * 
+ */
+
+static int __pyx_f_5pysam_8csamfile_20IteratorRowSelection_cnext(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  int __pyx_t_3;
+  int64_t __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("cnext", 0);
+  __Pyx_TraceCall("cnext", __pyx_f[0], 1509);
+
+  /* "pysam/csamfile.pyx":1513
+ * 
+ *         # end iteration if out of positions
+ *         if self.current_pos >= len(self.positions): return -1             # <<<<<<<<<<<<<<
+ * 
+ *         bgzf_seek(self.fp,
+ */
+  __pyx_t_1 = __pyx_v_self->positions;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = ((__pyx_v_self->current_pos >= __pyx_t_2) != 0);
+  if (__pyx_t_3) {
+    __pyx_r = -1;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":1516
+ * 
+ *         bgzf_seek(self.fp,
+ *                   self.positions[self.current_pos],             # <<<<<<<<<<<<<<
+ *                   0)
+ *         self.current_pos += 1
+ */
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->positions, __pyx_v_self->current_pos, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (int64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1515
+ *         if self.current_pos >= len(self.positions): return -1
+ * 
+ *         bgzf_seek(self.fp,             # <<<<<<<<<<<<<<
+ *                   self.positions[self.current_pos],
+ *                   0)
+ */
+  bgzf_seek(__pyx_v_self->fp, __pyx_t_4, 0);
+
+  /* "pysam/csamfile.pyx":1518
+ *                   self.positions[self.current_pos],
+ *                   0)
+ *         self.current_pos += 1             # <<<<<<<<<<<<<<
+ *         return sam_read1(self.htsfile,
+ *                          self.samfile.header,
+ */
+  __pyx_v_self->current_pos = (__pyx_v_self->current_pos + 1);
+
+  /* "pysam/csamfile.pyx":1519
+ *                   0)
+ *         self.current_pos += 1
+ *         return sam_read1(self.htsfile,             # <<<<<<<<<<<<<<
+ *                          self.samfile.header,
+ *                          self.b)
+ */
+  __pyx_r = sam_read1(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->__pyx_base.samfile->header, __pyx_v_self->__pyx_base.b);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1509
+ *         return self.b
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''cversion of iterator'''
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_WriteUnraisable("pysam.csamfile.IteratorRowSelection.cnext", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1523
+ *                          self.b)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_20IteratorRowSelection_5__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_20IteratorRowSelection_4__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_20IteratorRowSelection_4__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_20IteratorRowSelection_5__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_20IteratorRowSelection_4__next__(((struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_20IteratorRowSelection_4__next__(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *__pyx_v_self) {
+  int __pyx_v_ret;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 1523);
+
+  /* "pysam/csamfile.pyx":1529
+ *         """
+ * 
+ *         cdef int ret = self.cnext()             # <<<<<<<<<<<<<<
+ *         if (ret >= 0):
+ *             return makeAlignedRead(self.b)
+ */
+  __pyx_v_ret = ((struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowSelection *)__pyx_v_self->__pyx_vtab)->cnext(__pyx_v_self);
+
+  /* "pysam/csamfile.pyx":1530
+ * 
+ *         cdef int ret = self.cnext()
+ *         if (ret >= 0):             # <<<<<<<<<<<<<<
+ *             return makeAlignedRead(self.b)
+ *         else:
+ */
+  __pyx_t_1 = ((__pyx_v_ret >= 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1531
+ *         cdef int ret = self.cnext()
+ *         if (ret >= 0):
+ *             return makeAlignedRead(self.b)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise StopIteration
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __pyx_f_5pysam_8csamfile_makeAlignedRead(__pyx_v_self->__pyx_base.b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1533
+ *             return makeAlignedRead(self.b)
+ *         else:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1523
+ *                          self.b)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorRowSelection.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1536
+ * 
+ * 
+ * cdef int __advance_all(void *data, bam1_t *b):             # <<<<<<<<<<<<<<
+ *     '''advance without any read filtering.
+ *     '''
+ */
+
+static int __pyx_f_5pysam_8csamfile___advance_all(void *__pyx_v_data, bam1_t *__pyx_v_b) {
+  __pyx_t_5pysam_8csamfile___iterdata *__pyx_v_d;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__advance_all", 0);
+  __Pyx_TraceCall("__advance_all", __pyx_f[0], 1536);
+
+  /* "pysam/csamfile.pyx":1540
+ *     '''
+ *     cdef __iterdata * d
+ *     d = <__iterdata*>data             # <<<<<<<<<<<<<<
+ *     return sam_itr_next(d.htsfile, d.iter, b)
+ * 
+ */
+  __pyx_v_d = ((__pyx_t_5pysam_8csamfile___iterdata *)__pyx_v_data);
+
+  /* "pysam/csamfile.pyx":1541
+ *     cdef __iterdata * d
+ *     d = <__iterdata*>data
+ *     return sam_itr_next(d.htsfile, d.iter, b)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_r = sam_itr_next(__pyx_v_d->htsfile, __pyx_v_d->iter, __pyx_v_b);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1536
+ * 
+ * 
+ * cdef int __advance_all(void *data, bam1_t *b):             # <<<<<<<<<<<<<<
+ *     '''advance without any read filtering.
+ *     '''
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1544
+ * 
+ * 
+ * cdef int __advance_snpcalls(void * data, bam1_t * b):             # <<<<<<<<<<<<<<
+ *     '''advance using same filter and read processing as in
+ *     the samtools pileup.
+ */
+
+static int __pyx_f_5pysam_8csamfile___advance_snpcalls(void *__pyx_v_data, bam1_t *__pyx_v_b) {
+  __pyx_t_5pysam_8csamfile___iterdata *__pyx_v_d;
+  int __pyx_v_ret;
+  int __pyx_v_skip;
+  int __pyx_v_q;
+  int __pyx_v_is_cns;
+  int __pyx_v_is_nobaq;
+  int __pyx_v_capQ_thres;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  int32_t __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__advance_snpcalls", 0);
+  __Pyx_TraceCall("__advance_snpcalls", __pyx_f[0], 1544);
+
+  /* "pysam/csamfile.pyx":1556
+ *     # 2. bam_cap_mapQ
+ *     cdef __iterdata * d
+ *     d = <__iterdata*>data             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int ret = sam_itr_next(d.htsfile, d.iter, b)
+ */
+  __pyx_v_d = ((__pyx_t_5pysam_8csamfile___iterdata *)__pyx_v_data);
+
+  /* "pysam/csamfile.pyx":1558
+ *     d = <__iterdata*>data
+ * 
+ *     cdef int ret = sam_itr_next(d.htsfile, d.iter, b)             # <<<<<<<<<<<<<<
+ *     cdef int skip = 0
+ *     cdef int q
+ */
+  __pyx_v_ret = sam_itr_next(__pyx_v_d->htsfile, __pyx_v_d->iter, __pyx_v_b);
+
+  /* "pysam/csamfile.pyx":1559
+ * 
+ *     cdef int ret = sam_itr_next(d.htsfile, d.iter, b)
+ *     cdef int skip = 0             # <<<<<<<<<<<<<<
+ *     cdef int q
+ *     cdef int is_cns = 1
+ */
+  __pyx_v_skip = 0;
+
+  /* "pysam/csamfile.pyx":1561
+ *     cdef int skip = 0
+ *     cdef int q
+ *     cdef int is_cns = 1             # <<<<<<<<<<<<<<
+ *     cdef int is_nobaq = 0
+ *     cdef int capQ_thres = 0
+ */
+  __pyx_v_is_cns = 1;
+
+  /* "pysam/csamfile.pyx":1562
+ *     cdef int q
+ *     cdef int is_cns = 1
+ *     cdef int is_nobaq = 0             # <<<<<<<<<<<<<<
+ *     cdef int capQ_thres = 0
+ * 
+ */
+  __pyx_v_is_nobaq = 0;
+
+  /* "pysam/csamfile.pyx":1563
+ *     cdef int is_cns = 1
+ *     cdef int is_nobaq = 0
+ *     cdef int capQ_thres = 0             # <<<<<<<<<<<<<<
+ * 
+ *     # reload sequence
+ */
+  __pyx_v_capQ_thres = 0;
+
+  /* "pysam/csamfile.pyx":1566
+ * 
+ *     # reload sequence
+ *     if d.fastafile != NULL and b.core.tid != d.tid:             # <<<<<<<<<<<<<<
+ *         if d.seq != NULL:
+ *             free(d.seq)
+ */
+  __pyx_t_1 = ((__pyx_v_d->fastafile != NULL) != 0);
+  if (__pyx_t_1) {
+    __pyx_t_2 = ((__pyx_v_b->core.tid != __pyx_v_d->tid) != 0);
+    __pyx_t_3 = __pyx_t_2;
+  } else {
+    __pyx_t_3 = __pyx_t_1;
+  }
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":1567
+ *     # reload sequence
+ *     if d.fastafile != NULL and b.core.tid != d.tid:
+ *         if d.seq != NULL:             # <<<<<<<<<<<<<<
+ *             free(d.seq)
+ *         d.tid = b.core.tid
+ */
+    __pyx_t_3 = ((__pyx_v_d->seq != NULL) != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/csamfile.pyx":1568
+ *     if d.fastafile != NULL and b.core.tid != d.tid:
+ *         if d.seq != NULL:
+ *             free(d.seq)             # <<<<<<<<<<<<<<
+ *         d.tid = b.core.tid
+ *         d.seq = faidx_fetch_seq(
+ */
+      free(__pyx_v_d->seq);
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+
+    /* "pysam/csamfile.pyx":1569
+ *         if d.seq != NULL:
+ *             free(d.seq)
+ *         d.tid = b.core.tid             # <<<<<<<<<<<<<<
+ *         d.seq = faidx_fetch_seq(
+ *             d.fastafile,
+ */
+    __pyx_t_4 = __pyx_v_b->core.tid;
+    __pyx_v_d->tid = __pyx_t_4;
+
+    /* "pysam/csamfile.pyx":1570
+ *             free(d.seq)
+ *         d.tid = b.core.tid
+ *         d.seq = faidx_fetch_seq(             # <<<<<<<<<<<<<<
+ *             d.fastafile,
+ *             d.header.target_name[d.tid],
+ */
+    __pyx_v_d->seq = faidx_fetch_seq(__pyx_v_d->fastafile, (__pyx_v_d->header->target_name[__pyx_v_d->tid]), 0, __pyx_v_5pysam_8csamfile_max_pos, (&__pyx_v_d->seq_len));
+
+    /* "pysam/csamfile.pyx":1576
+ *             &d.seq_len)
+ * 
+ *         if d.seq == NULL:             # <<<<<<<<<<<<<<
+ *             raise ValueError(
+ *                 "reference sequence for '%s' (tid=%i) not found" % \
+ */
+    __pyx_t_3 = ((__pyx_v_d->seq == NULL) != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/csamfile.pyx":1579
+ *             raise ValueError(
+ *                 "reference sequence for '%s' (tid=%i) not found" % \
+ *                 (d.header.target_name[d.tid],             # <<<<<<<<<<<<<<
+ *                  d.tid))
+ * 
+ */
+      __pyx_t_5 = __Pyx_PyBytes_FromString((__pyx_v_d->header->target_name[__pyx_v_d->tid])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+
+      /* "pysam/csamfile.pyx":1580
+ *                 "reference sequence for '%s' (tid=%i) not found" % \
+ *                 (d.header.target_name[d.tid],
+ *                  d.tid))             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_d->tid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+
+      /* "pysam/csamfile.pyx":1579
+ *             raise ValueError(
+ *                 "reference sequence for '%s' (tid=%i) not found" % \
+ *                 (d.header.target_name[d.tid],             # <<<<<<<<<<<<<<
+ *                  d.tid))
+ * 
+ */
+      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
+      __Pyx_GIVEREF(__pyx_t_6);
+      __pyx_t_5 = 0;
+      __pyx_t_6 = 0;
+
+      /* "pysam/csamfile.pyx":1578
+ *         if d.seq == NULL:
+ *             raise ValueError(
+ *                 "reference sequence for '%s' (tid=%i) not found" % \             # <<<<<<<<<<<<<<
+ *                 (d.header.target_name[d.tid],
+ *                  d.tid))
+ */
+      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_reference_sequence_for_s_tid_i_n, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+      /* "pysam/csamfile.pyx":1577
+ * 
+ *         if d.seq == NULL:
+ *             raise ValueError(             # <<<<<<<<<<<<<<
+ *                 "reference sequence for '%s' (tid=%i) not found" % \
+ *                 (d.header.target_name[d.tid],
+ */
+      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1583
+ * 
+ * 
+ *     while ret >= 0:             # <<<<<<<<<<<<<<
+ *         skip = 0
+ * 
+ */
+  while (1) {
+    __pyx_t_3 = ((__pyx_v_ret >= 0) != 0);
+    if (!__pyx_t_3) break;
+
+    /* "pysam/csamfile.pyx":1584
+ * 
+ *     while ret >= 0:
+ *         skip = 0             # <<<<<<<<<<<<<<
+ * 
+ *         # realign read - changes base qualities
+ */
+    __pyx_v_skip = 0;
+
+    /* "pysam/csamfile.pyx":1587
+ * 
+ *         # realign read - changes base qualities
+ *         if d.seq != NULL and is_cns and not is_nobaq:             # <<<<<<<<<<<<<<
+ *             bam_prob_realn(b, d.seq)
+ * 
+ */
+    __pyx_t_3 = (__pyx_v_d->seq != NULL);
+    if (__pyx_t_3) {
+      if ((__pyx_v_is_cns != 0)) {
+        __pyx_t_1 = (!(__pyx_v_is_nobaq != 0));
+        __pyx_t_2 = __pyx_t_1;
+      } else {
+        __pyx_t_2 = (__pyx_v_is_cns != 0);
+      }
+      __pyx_t_1 = __pyx_t_2;
+    } else {
+      __pyx_t_1 = __pyx_t_3;
+    }
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1588
+ *         # realign read - changes base qualities
+ *         if d.seq != NULL and is_cns and not is_nobaq:
+ *             bam_prob_realn(b, d.seq)             # <<<<<<<<<<<<<<
+ * 
+ *         if d.seq != NULL and capQ_thres > 10:
+ */
+      bam_prob_realn(__pyx_v_b, __pyx_v_d->seq);
+      goto __pyx_L8;
+    }
+    __pyx_L8:;
+
+    /* "pysam/csamfile.pyx":1590
+ *             bam_prob_realn(b, d.seq)
+ * 
+ *         if d.seq != NULL and capQ_thres > 10:             # <<<<<<<<<<<<<<
+ *             q = bam_cap_mapQ(b, d.seq, capQ_thres)
+ *             if q < 0:
+ */
+    __pyx_t_1 = ((__pyx_v_d->seq != NULL) != 0);
+    if (__pyx_t_1) {
+      __pyx_t_3 = ((__pyx_v_capQ_thres > 10) != 0);
+      __pyx_t_2 = __pyx_t_3;
+    } else {
+      __pyx_t_2 = __pyx_t_1;
+    }
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":1591
+ * 
+ *         if d.seq != NULL and capQ_thres > 10:
+ *             q = bam_cap_mapQ(b, d.seq, capQ_thres)             # <<<<<<<<<<<<<<
+ *             if q < 0:
+ *                 skip = 1
+ */
+      __pyx_v_q = bam_cap_mapQ(__pyx_v_b, __pyx_v_d->seq, __pyx_v_capQ_thres);
+
+      /* "pysam/csamfile.pyx":1592
+ *         if d.seq != NULL and capQ_thres > 10:
+ *             q = bam_cap_mapQ(b, d.seq, capQ_thres)
+ *             if q < 0:             # <<<<<<<<<<<<<<
+ *                 skip = 1
+ *             elif b.core.qual > q:
+ */
+      __pyx_t_2 = ((__pyx_v_q < 0) != 0);
+      if (__pyx_t_2) {
+
+        /* "pysam/csamfile.pyx":1593
+ *             q = bam_cap_mapQ(b, d.seq, capQ_thres)
+ *             if q < 0:
+ *                 skip = 1             # <<<<<<<<<<<<<<
+ *             elif b.core.qual > q:
+ *                 b.core.qual = q
+ */
+        __pyx_v_skip = 1;
+        goto __pyx_L10;
+      }
+
+      /* "pysam/csamfile.pyx":1594
+ *             if q < 0:
+ *                 skip = 1
+ *             elif b.core.qual > q:             # <<<<<<<<<<<<<<
+ *                 b.core.qual = q
+ *         if b.core.flag & BAM_FUNMAP:
+ */
+      __pyx_t_2 = ((__pyx_v_b->core.qual > __pyx_v_q) != 0);
+      if (__pyx_t_2) {
+
+        /* "pysam/csamfile.pyx":1595
+ *                 skip = 1
+ *             elif b.core.qual > q:
+ *                 b.core.qual = q             # <<<<<<<<<<<<<<
+ *         if b.core.flag & BAM_FUNMAP:
+ *             skip = 1
+ */
+        __pyx_v_b->core.qual = __pyx_v_q;
+        goto __pyx_L10;
+      }
+      __pyx_L10:;
+      goto __pyx_L9;
+    }
+    __pyx_L9:;
+
+    /* "pysam/csamfile.pyx":1596
+ *             elif b.core.qual > q:
+ *                 b.core.qual = q
+ *         if b.core.flag & BAM_FUNMAP:             # <<<<<<<<<<<<<<
+ *             skip = 1
+ *         elif b.core.flag & 1 and not b.core.flag & 2:
+ */
+    __pyx_t_2 = ((__pyx_v_b->core.flag & BAM_FUNMAP) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":1597
+ *                 b.core.qual = q
+ *         if b.core.flag & BAM_FUNMAP:
+ *             skip = 1             # <<<<<<<<<<<<<<
+ *         elif b.core.flag & 1 and not b.core.flag & 2:
+ *             skip = 1
+ */
+      __pyx_v_skip = 1;
+      goto __pyx_L11;
+    }
+
+    /* "pysam/csamfile.pyx":1598
+ *         if b.core.flag & BAM_FUNMAP:
+ *             skip = 1
+ *         elif b.core.flag & 1 and not b.core.flag & 2:             # <<<<<<<<<<<<<<
+ *             skip = 1
+ * 
+ */
+    if (((__pyx_v_b->core.flag & 1) != 0)) {
+      __pyx_t_2 = (!((__pyx_v_b->core.flag & 2) != 0));
+      __pyx_t_1 = __pyx_t_2;
+    } else {
+      __pyx_t_1 = ((__pyx_v_b->core.flag & 1) != 0);
+    }
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1599
+ *             skip = 1
+ *         elif b.core.flag & 1 and not b.core.flag & 2:
+ *             skip = 1             # <<<<<<<<<<<<<<
+ * 
+ *         if not skip: break
+ */
+      __pyx_v_skip = 1;
+      goto __pyx_L11;
+    }
+    __pyx_L11:;
+
+    /* "pysam/csamfile.pyx":1601
+ *             skip = 1
+ * 
+ *         if not skip: break             # <<<<<<<<<<<<<<
+ *         # additional filters
+ * 
+ */
+    __pyx_t_1 = ((!(__pyx_v_skip != 0)) != 0);
+    if (__pyx_t_1) {
+      goto __pyx_L7_break;
+    }
+
+    /* "pysam/csamfile.pyx":1604
+ *         # additional filters
+ * 
+ *         ret = sam_itr_next(d.htsfile, d.iter, b)             # <<<<<<<<<<<<<<
+ * 
+ *     return ret
+ */
+    __pyx_v_ret = sam_itr_next(__pyx_v_d->htsfile, __pyx_v_d->iter, __pyx_v_b);
+  }
+  __pyx_L7_break:;
+
+  /* "pysam/csamfile.pyx":1606
+ *         ret = sam_itr_next(d.htsfile, d.iter, b)
+ * 
+ *     return ret             # <<<<<<<<<<<<<<
+ * 
+ * cdef class IteratorColumn:
+ */
+  __pyx_r = __pyx_v_ret;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1544
+ * 
+ * 
+ * cdef int __advance_snpcalls(void * data, bam1_t * b):             # <<<<<<<<<<<<<<
+ *     '''advance using same filter and read processing as in
+ *     the samtools pileup.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_WriteUnraisable("pysam.csamfile.__advance_snpcalls", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1658
+ *     '''
+ * 
+ *     def __cinit__( self, Samfile samfile, **kwargs ):             # <<<<<<<<<<<<<<
+ *         self.samfile = samfile
+ *         # TODO
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_14IteratorColumn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_14IteratorColumn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,0};
+    PyObject* values[1] = {0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumn.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_14IteratorColumn___cinit__(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self), __pyx_v_samfile, __pyx_v_kwargs);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_14IteratorColumn___cinit__(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, PyObject *__pyx_v_kwargs) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1658);
+
+  /* "pysam/csamfile.pyx":1659
+ * 
+ *     def __cinit__( self, Samfile samfile, **kwargs ):
+ *         self.samfile = samfile             # <<<<<<<<<<<<<<
+ *         # TODO
+ *         # self.mask = kwargs.get("mask", BAM_DEF_MASK )
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+  __Pyx_GOTREF(__pyx_v_self->samfile);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
+  __pyx_v_self->samfile = __pyx_v_samfile;
+
+  /* "pysam/csamfile.pyx":1662
+ *         # TODO
+ *         # 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)
+ */
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_fastafile, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_6cfaidx_Fastafile))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->fastafile);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->fastafile));
+  __pyx_v_self->fastafile = ((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1663
+ *         # 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
+ */
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_stepper, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->stepper);
+  __Pyx_DECREF(__pyx_v_self->stepper);
+  __pyx_v_self->stepper = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1664
+ *         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
+ */
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_max_depth, __pyx_int_8000); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_self->max_depth = __pyx_t_2;
+
+  /* "pysam/csamfile.pyx":1665
+ *         self.stepper = kwargs.get("stepper", None)
+ *         self.max_depth = kwargs.get("max_depth", 8000)
+ *         self.iterdata.seq = NULL             # <<<<<<<<<<<<<<
+ *         self.tid = 0
+ *         self.pos = 0
+ */
+  __pyx_v_self->iterdata.seq = NULL;
+
+  /* "pysam/csamfile.pyx":1666
+ *         self.max_depth = kwargs.get("max_depth", 8000)
+ *         self.iterdata.seq = NULL
+ *         self.tid = 0             # <<<<<<<<<<<<<<
+ *         self.pos = 0
+ *         self.n_plp = 0
+ */
+  __pyx_v_self->tid = 0;
+
+  /* "pysam/csamfile.pyx":1667
+ *         self.iterdata.seq = NULL
+ *         self.tid = 0
+ *         self.pos = 0             # <<<<<<<<<<<<<<
+ *         self.n_plp = 0
+ *         self.plp = NULL
+ */
+  __pyx_v_self->pos = 0;
+
+  /* "pysam/csamfile.pyx":1668
+ *         self.tid = 0
+ *         self.pos = 0
+ *         self.n_plp = 0             # <<<<<<<<<<<<<<
+ *         self.plp = NULL
+ *         self.pileup_iter = <bam_plp_t>NULL
+ */
+  __pyx_v_self->n_plp = 0;
+
+  /* "pysam/csamfile.pyx":1669
+ *         self.pos = 0
+ *         self.n_plp = 0
+ *         self.plp = NULL             # <<<<<<<<<<<<<<
+ *         self.pileup_iter = <bam_plp_t>NULL
+ * 
+ */
+  __pyx_v_self->plp = NULL;
+
+  /* "pysam/csamfile.pyx":1670
+ *         self.n_plp = 0
+ *         self.plp = NULL
+ *         self.pileup_iter = <bam_plp_t>NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def __iter__(self):
+ */
+  __pyx_v_self->pileup_iter = ((bam_plp_t)NULL);
+
+  /* "pysam/csamfile.pyx":1658
+ *     '''
+ * 
+ *     def __cinit__( self, Samfile samfile, **kwargs ):             # <<<<<<<<<<<<<<
+ *         self.samfile = samfile
+ *         # TODO
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumn.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1672
+ *         self.pileup_iter = <bam_plp_t>NULL
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorColumn_3__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorColumn_3__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_14IteratorColumn_2__iter__(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorColumn_2__iter__(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+  __Pyx_TraceCall("__iter__", __pyx_f[0], 1672);
+
+  /* "pysam/csamfile.pyx":1673
+ * 
+ *     def __iter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int cnext(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1672
+ *         self.pileup_iter = <bam_plp_t>NULL
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1675
+ *         return self
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''perform next iteration.
+ *         '''
+ */
+
+static int __pyx_f_5pysam_8csamfile_14IteratorColumn_cnext(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("cnext", 0);
+  __Pyx_TraceCall("cnext", __pyx_f[0], 1675);
+
+  /* "pysam/csamfile.pyx":1678
+ *         '''perform next iteration.
+ *         '''
+ *         self.plp = bam_plp_auto( self.pileup_iter,             # <<<<<<<<<<<<<<
+ *                                  &self.tid,
+ *                                  &self.pos,
+ */
+  __pyx_v_self->plp = bam_plp_auto(__pyx_v_self->pileup_iter, (&__pyx_v_self->tid), (&__pyx_v_self->pos), (&__pyx_v_self->n_plp));
+
+  /* "pysam/csamfile.pyx":1675
+ *         return self
+ * 
+ *     cdef int cnext(self):             # <<<<<<<<<<<<<<
+ *         '''perform next iteration.
+ *         '''
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1683
+ *                                  &self.n_plp )
+ * 
+ *     cdef char * getSequence( self ):             # <<<<<<<<<<<<<<
+ *         '''return current reference sequence underlying the iterator.
+ *         '''
+ */
+
+static char *__pyx_f_5pysam_8csamfile_14IteratorColumn_getSequence(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self) {
+  char *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("getSequence", 0);
+  __Pyx_TraceCall("getSequence", __pyx_f[0], 1683);
+
+  /* "pysam/csamfile.pyx":1686
+ *         '''return current reference sequence underlying the iterator.
+ *         '''
+ *         return self.iterdata.seq             # <<<<<<<<<<<<<<
+ * 
+ *     property seq_len:
+ */
+  __pyx_r = __pyx_v_self->iterdata.seq;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1683
+ *                                  &self.n_plp )
+ * 
+ *     cdef char * getSequence( self ):             # <<<<<<<<<<<<<<
+ *         '''return current reference sequence underlying the iterator.
+ *         '''
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1690
+ *     property seq_len:
+ *         '''current sequence length.'''
+ *         def __get__(self): return self.iterdata.seq_len             # <<<<<<<<<<<<<<
+ * 
+ *     def addReference(self, Fastafile fastafile):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorColumn_7seq_len_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorColumn_7seq_len_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_14IteratorColumn_7seq_len___get__(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorColumn_7seq_len___get__(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 1690);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->iterdata.seq_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumn.seq_len.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1692
+ *         def __get__(self): return self.iterdata.seq_len
+ * 
+ *     def addReference(self, Fastafile fastafile):             # <<<<<<<<<<<<<<
+ *        '''
+ *        add reference sequences in *fastafile* to iterator.'''
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorColumn_5addReference(PyObject *__pyx_v_self, PyObject *__pyx_v_fastafile); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_14IteratorColumn_4addReference[] = "IteratorColumn.addReference(self, Fastafile fastafile)\n\n       add reference sequences in *fastafile* to iterator.";
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorColumn_5addReference(PyObject *__pyx_v_self, PyObject *__pyx_v_fastafile) {
+  CYTHON_UNUSED int __pyx_lineno = 0;
+  CYTHON_UNUSED const char *__pyx_filename = NULL;
+  CYTHON_UNUSED int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("addReference (wrapper)", 0);
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fastafile), __pyx_ptype_5pysam_6cfaidx_Fastafile, 1, "fastafile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_14IteratorColumn_4addReference(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self), ((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)__pyx_v_fastafile));
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorColumn_4addReference(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self, struct __pyx_obj_5pysam_6cfaidx_Fastafile *__pyx_v_fastafile) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  faidx_t *__pyx_t_2;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("addReference", 0);
+  __Pyx_TraceCall("addReference", __pyx_f[0], 1692);
+
+  /* "pysam/csamfile.pyx":1695
+ *        '''
+ *        add reference sequences in *fastafile* to iterator.'''
+ *        self.fastafile = fastafile             # <<<<<<<<<<<<<<
+ *        if self.iterdata.seq != NULL: free(self.iterdata.seq)
+ *        self.iterdata.tid = -1
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_fastafile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_fastafile));
+  __Pyx_GOTREF(__pyx_v_self->fastafile);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->fastafile));
+  __pyx_v_self->fastafile = __pyx_v_fastafile;
+
+  /* "pysam/csamfile.pyx":1696
+ *        add reference sequences in *fastafile* to iterator.'''
+ *        self.fastafile = fastafile
+ *        if self.iterdata.seq != NULL: free(self.iterdata.seq)             # <<<<<<<<<<<<<<
+ *        self.iterdata.tid = -1
+ *        self.iterdata.fastafile = self.fastafile.fastafile
+ */
+  __pyx_t_1 = ((__pyx_v_self->iterdata.seq != NULL) != 0);
+  if (__pyx_t_1) {
+    free(__pyx_v_self->iterdata.seq);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1697
+ *        self.fastafile = fastafile
+ *        if self.iterdata.seq != NULL: free(self.iterdata.seq)
+ *        self.iterdata.tid = -1             # <<<<<<<<<<<<<<
+ *        self.iterdata.fastafile = self.fastafile.fastafile
+ * 
+ */
+  __pyx_v_self->iterdata.tid = -1;
+
+  /* "pysam/csamfile.pyx":1698
+ *        if self.iterdata.seq != NULL: free(self.iterdata.seq)
+ *        self.iterdata.tid = -1
+ *        self.iterdata.fastafile = self.fastafile.fastafile             # <<<<<<<<<<<<<<
+ * 
+ *     def hasReference(self):
+ */
+  __pyx_t_2 = __pyx_v_self->fastafile->fastafile;
+  __pyx_v_self->iterdata.fastafile = __pyx_t_2;
+
+  /* "pysam/csamfile.pyx":1692
+ *         def __get__(self): return self.iterdata.seq_len
+ * 
+ *     def addReference(self, Fastafile fastafile):             # <<<<<<<<<<<<<<
+ *        '''
+ *        add reference sequences in *fastafile* to iterator.'''
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1700
+ *        self.iterdata.fastafile = self.fastafile.fastafile
+ * 
+ *     def hasReference(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         return true if iterator is associated with a reference'''
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorColumn_7hasReference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_14IteratorColumn_6hasReference[] = "IteratorColumn.hasReference(self)\n\n        return true if iterator is associated with a reference";
+static PyObject *__pyx_pw_5pysam_8csamfile_14IteratorColumn_7hasReference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("hasReference (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_14IteratorColumn_6hasReference(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_14IteratorColumn_6hasReference(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("hasReference", 0);
+  __Pyx_TraceCall("hasReference", __pyx_f[0], 1700);
+
+  /* "pysam/csamfile.pyx":1703
+ *         '''
+ *         return true if iterator is associated with a reference'''
+ *         return self.fastafile             # <<<<<<<<<<<<<<
+ * 
+ *     cdef setMask(self, mask):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self->fastafile));
+  __pyx_r = ((PyObject *)__pyx_v_self->fastafile);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1700
+ *        self.iterdata.fastafile = self.fastafile.fastafile
+ * 
+ *     def hasReference(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         return true if iterator is associated with a reference'''
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1705
+ *         return self.fastafile
+ * 
+ *     cdef setMask(self, mask):             # <<<<<<<<<<<<<<
+ *         '''set masking flag in iterator.
+ * 
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile_14IteratorColumn_setMask(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_mask) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("setMask", 0);
+  __Pyx_TraceCall("setMask", __pyx_f[0], 1705);
+
+  /* "pysam/csamfile.pyx":1710
+ *         reads with bits set in *mask* will be skipped.
+ *         '''
+ *         raise NotImplementedError()             # <<<<<<<<<<<<<<
+ *         # self.mask = mask
+ *         # bam_plp_set_mask( self.pileup_iter, self.mask )
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":1705
+ *         return self.fastafile
+ * 
+ *     cdef setMask(self, mask):             # <<<<<<<<<<<<<<
+ *         '''set masking flag in iterator.
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumn.setMask", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1714
+ *         # bam_plp_set_mask( self.pileup_iter, self.mask )
+ * 
+ *     cdef setupIteratorData( self,             # <<<<<<<<<<<<<<
+ *                             int tid,
+ *                             int start,
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile_14IteratorColumn_setupIteratorData(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end, struct __pyx_opt_args_5pysam_8csamfile_14IteratorColumn_setupIteratorData *__pyx_optional_args) {
+  int __pyx_v_reopen = ((int)0);
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  htsFile *__pyx_t_6;
+  hts_itr_t *__pyx_t_7;
+  bam_hdr_t *__pyx_t_8;
+  int __pyx_t_9;
+  faidx_t *__pyx_t_10;
+  int __pyx_t_11;
+  int __pyx_t_12;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("setupIteratorData", 0);
+  __Pyx_TraceCall("setupIteratorData", __pyx_f[0], 1714);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_reopen = __pyx_optional_args->reopen;
+    }
+  }
+
+  /* "pysam/csamfile.pyx":1721
+ *         '''setup the iterator structure'''
+ * 
+ *         self.iter = IteratorRowRegion(self.samfile, tid, start, end, reopen)             # <<<<<<<<<<<<<<
+ *         self.iterdata.htsfile = self.samfile.htsfile
+ *         self.iterdata.iter = self.iter.iter
+ */
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
+  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->samfile));
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_1 = 0;
+  __pyx_t_2 = 0;
+  __pyx_t_3 = 0;
+  __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowRegion)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_GIVEREF(__pyx_t_4);
+  __Pyx_GOTREF(__pyx_v_self->iter);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->iter));
+  __pyx_v_self->iter = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)__pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":1722
+ * 
+ *         self.iter = IteratorRowRegion(self.samfile, tid, start, end, reopen)
+ *         self.iterdata.htsfile = self.samfile.htsfile             # <<<<<<<<<<<<<<
+ *         self.iterdata.iter = self.iter.iter
+ *         self.iterdata.seq = NULL
+ */
+  __pyx_t_6 = __pyx_v_self->samfile->htsfile;
+  __pyx_v_self->iterdata.htsfile = __pyx_t_6;
+
+  /* "pysam/csamfile.pyx":1723
+ *         self.iter = IteratorRowRegion(self.samfile, tid, start, end, reopen)
+ *         self.iterdata.htsfile = self.samfile.htsfile
+ *         self.iterdata.iter = self.iter.iter             # <<<<<<<<<<<<<<
+ *         self.iterdata.seq = NULL
+ *         self.iterdata.tid = -1
+ */
+  __pyx_t_7 = __pyx_v_self->iter->iter;
+  __pyx_v_self->iterdata.iter = __pyx_t_7;
+
+  /* "pysam/csamfile.pyx":1724
+ *         self.iterdata.htsfile = self.samfile.htsfile
+ *         self.iterdata.iter = self.iter.iter
+ *         self.iterdata.seq = NULL             # <<<<<<<<<<<<<<
+ *         self.iterdata.tid = -1
+ *         self.iterdata.header = self.samfile.header
+ */
+  __pyx_v_self->iterdata.seq = NULL;
+
+  /* "pysam/csamfile.pyx":1725
+ *         self.iterdata.iter = self.iter.iter
+ *         self.iterdata.seq = NULL
+ *         self.iterdata.tid = -1             # <<<<<<<<<<<<<<
+ *         self.iterdata.header = self.samfile.header
+ * 
+ */
+  __pyx_v_self->iterdata.tid = -1;
+
+  /* "pysam/csamfile.pyx":1726
+ *         self.iterdata.seq = NULL
+ *         self.iterdata.tid = -1
+ *         self.iterdata.header = self.samfile.header             # <<<<<<<<<<<<<<
+ * 
+ *         if self.fastafile != None:
+ */
+  __pyx_t_8 = __pyx_v_self->samfile->header;
+  __pyx_v_self->iterdata.header = __pyx_t_8;
+
+  /* "pysam/csamfile.pyx":1728
+ *         self.iterdata.header = self.samfile.header
+ * 
+ *         if self.fastafile != None:             # <<<<<<<<<<<<<<
+ *             self.iterdata.fastafile = self.fastafile.fastafile
+ *         else:
+ */
+  __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_self->fastafile), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (__pyx_t_9) {
+
+    /* "pysam/csamfile.pyx":1729
+ * 
+ *         if self.fastafile != None:
+ *             self.iterdata.fastafile = self.fastafile.fastafile             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.iterdata.fastafile = NULL
+ */
+    __pyx_t_10 = __pyx_v_self->fastafile->fastafile;
+    __pyx_v_self->iterdata.fastafile = __pyx_t_10;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1731
+ *             self.iterdata.fastafile = self.fastafile.fastafile
+ *         else:
+ *             self.iterdata.fastafile = NULL             # <<<<<<<<<<<<<<
+ * 
+ *         if self.stepper == None or self.stepper == "all":
+ */
+    __pyx_v_self->iterdata.fastafile = NULL;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1733
+ *             self.iterdata.fastafile = NULL
+ * 
+ *         if self.stepper == None or self.stepper == "all":             # <<<<<<<<<<<<<<
+ *             self.pileup_iter = bam_plp_init(
+ *                 <bam_plp_auto_f>&__advance_all,
+ */
+  __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (!__pyx_t_9) {
+    __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->stepper, __pyx_n_s_all, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_12 = __pyx_t_11;
+  } else {
+    __pyx_t_12 = __pyx_t_9;
+  }
+  if (__pyx_t_12) {
+
+    /* "pysam/csamfile.pyx":1734
+ * 
+ *         if self.stepper == None or self.stepper == "all":
+ *             self.pileup_iter = bam_plp_init(             # <<<<<<<<<<<<<<
+ *                 <bam_plp_auto_f>&__advance_all,
+ *                 &self.iterdata)
+ */
+    __pyx_v_self->pileup_iter = bam_plp_init(((bam_plp_auto_f)(&__pyx_f_5pysam_8csamfile___advance_all)), (&__pyx_v_self->iterdata));
+    goto __pyx_L4;
+  }
+
+  /* "pysam/csamfile.pyx":1737
+ *                 <bam_plp_auto_f>&__advance_all,
+ *                 &self.iterdata)
+ *         elif self.stepper == "samtools":             # <<<<<<<<<<<<<<
+ *             self.pileup_iter = bam_plp_init(
+ *                 <bam_plp_auto_f>&__advance_snpcalls,
+ */
+  __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_self->stepper, __pyx_n_s_samtools, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_12) {
+
+    /* "pysam/csamfile.pyx":1738
+ *                 &self.iterdata)
+ *         elif self.stepper == "samtools":
+ *             self.pileup_iter = bam_plp_init(             # <<<<<<<<<<<<<<
+ *                 <bam_plp_auto_f>&__advance_snpcalls,
+ *                 &self.iterdata)
+ */
+    __pyx_v_self->pileup_iter = bam_plp_init(((bam_plp_auto_f)(&__pyx_f_5pysam_8csamfile___advance_snpcalls)), (&__pyx_v_self->iterdata));
+    goto __pyx_L4;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1743
+ *         else:
+ *             raise ValueError(
+ *                 "unknown stepper option `%s` in IteratorColumn" % self.stepper)             # <<<<<<<<<<<<<<
+ * 
+ *         if self.max_depth:
+ */
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unknown_stepper_option_s_in_Iter, __pyx_v_self->stepper); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+
+    /* "pysam/csamfile.pyx":1742
+ *                 &self.iterdata)
+ *         else:
+ *             raise ValueError(             # <<<<<<<<<<<<<<
+ *                 "unknown stepper option `%s` in IteratorColumn" % self.stepper)
+ * 
+ */
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L4:;
+
+  /* "pysam/csamfile.pyx":1745
+ *                 "unknown stepper option `%s` in IteratorColumn" % self.stepper)
+ * 
+ *         if self.max_depth:             # <<<<<<<<<<<<<<
+ *             bam_plp_set_maxcnt(self.pileup_iter, self.max_depth)
+ * 
+ */
+  __pyx_t_12 = (__pyx_v_self->max_depth != 0);
+  if (__pyx_t_12) {
+
+    /* "pysam/csamfile.pyx":1746
+ * 
+ *         if self.max_depth:
+ *             bam_plp_set_maxcnt(self.pileup_iter, self.max_depth)             # <<<<<<<<<<<<<<
+ * 
+ *         # bam_plp_set_mask( self.pileup_iter, self.mask )
+ */
+    bam_plp_set_maxcnt(__pyx_v_self->pileup_iter, __pyx_v_self->max_depth);
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "pysam/csamfile.pyx":1714
+ *         # bam_plp_set_mask( self.pileup_iter, self.mask )
+ * 
+ *     cdef setupIteratorData( self,             # <<<<<<<<<<<<<<
+ *                             int tid,
+ *                             int start,
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumn.setupIteratorData", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1750
+ *         # bam_plp_set_mask( self.pileup_iter, self.mask )
+ * 
+ *     cdef reset( self, tid, start, end ):             # <<<<<<<<<<<<<<
+ *         '''reset iterator position.
+ * 
+ */
+
+static PyObject *__pyx_f_5pysam_8csamfile_14IteratorColumn_reset(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self, PyObject *__pyx_v_tid, PyObject *__pyx_v_start, PyObject *__pyx_v_end) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  hts_itr_t *__pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("reset", 0);
+  __Pyx_TraceCall("reset", __pyx_f[0], 1750);
+
+  /* "pysam/csamfile.pyx":1756
+ *         having to incur the full set-up costs.
+ *         '''
+ *         self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 )             # <<<<<<<<<<<<<<
+ *         self.iterdata.iter = self.iter.iter
+ * 
+ */
+  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->samfile));
+  __Pyx_INCREF(__pyx_v_tid);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tid);
+  __Pyx_GIVEREF(__pyx_v_tid);
+  __Pyx_INCREF(__pyx_v_start);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_start);
+  __Pyx_GIVEREF(__pyx_v_start);
+  __Pyx_INCREF(__pyx_v_end);
+  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_end);
+  __Pyx_GIVEREF(__pyx_v_end);
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reopen, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowRegion)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __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_GIVEREF(__pyx_t_3);
+  __Pyx_GOTREF(__pyx_v_self->iter);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->iter));
+  __pyx_v_self->iter = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":1757
+ *         '''
+ *         self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 )
+ *         self.iterdata.iter = self.iter.iter             # <<<<<<<<<<<<<<
+ * 
+ *         # invalidate sequence if different tid
+ */
+  __pyx_t_4 = __pyx_v_self->iter->iter;
+  __pyx_v_self->iterdata.iter = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":1760
+ * 
+ *         # invalidate sequence if different tid
+ *         if self.tid != tid:             # <<<<<<<<<<<<<<
+ *             if self.iterdata.seq != NULL: free( self.iterdata.seq )
+ *             self.iterdata.seq = NULL
+ */
+  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->tid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_tid, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":1761
+ *         # invalidate sequence if different tid
+ *         if self.tid != tid:
+ *             if self.iterdata.seq != NULL: free( self.iterdata.seq )             # <<<<<<<<<<<<<<
+ *             self.iterdata.seq = NULL
+ *             self.iterdata.tid = -1
+ */
+    __pyx_t_5 = ((__pyx_v_self->iterdata.seq != NULL) != 0);
+    if (__pyx_t_5) {
+      free(__pyx_v_self->iterdata.seq);
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+
+    /* "pysam/csamfile.pyx":1762
+ *         if self.tid != tid:
+ *             if self.iterdata.seq != NULL: free( self.iterdata.seq )
+ *             self.iterdata.seq = NULL             # <<<<<<<<<<<<<<
+ *             self.iterdata.tid = -1
+ * 
+ */
+    __pyx_v_self->iterdata.seq = NULL;
+
+    /* "pysam/csamfile.pyx":1763
+ *             if self.iterdata.seq != NULL: free( self.iterdata.seq )
+ *             self.iterdata.seq = NULL
+ *             self.iterdata.tid = -1             # <<<<<<<<<<<<<<
+ * 
+ *         # self.pileup_iter = bam_plp_init( &__advancepileup, &self.iterdata )
+ */
+    __pyx_v_self->iterdata.tid = -1;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1766
+ * 
+ *         # self.pileup_iter = bam_plp_init( &__advancepileup, &self.iterdata )
+ *         bam_plp_reset(self.pileup_iter)             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__(self):
+ */
+  bam_plp_reset(__pyx_v_self->pileup_iter);
+
+  /* "pysam/csamfile.pyx":1750
+ *         # bam_plp_set_mask( self.pileup_iter, self.mask )
+ * 
+ *     cdef reset( self, tid, start, end ):             # <<<<<<<<<<<<<<
+ *         '''reset iterator position.
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumn.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1768
+ *         bam_plp_reset(self.pileup_iter)
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         # reset in order to avoid memory leak messages for iterators
+ *         # that have not been fully consumed
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_8csamfile_14IteratorColumn_9__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_8csamfile_14IteratorColumn_9__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_8csamfile_14IteratorColumn_8__dealloc__(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_8csamfile_14IteratorColumn_8__dealloc__(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1768);
+
+  /* "pysam/csamfile.pyx":1771
+ *         # reset in order to avoid memory leak messages for iterators
+ *         # that have not been fully consumed
+ *         if self.pileup_iter != <bam_plp_t>NULL:             # <<<<<<<<<<<<<<
+ *             bam_plp_reset(self.pileup_iter)
+ *             bam_plp_destroy(self.pileup_iter)
+ */
+  __pyx_t_1 = ((__pyx_v_self->pileup_iter != ((bam_plp_t)NULL)) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1772
+ *         # that have not been fully consumed
+ *         if self.pileup_iter != <bam_plp_t>NULL:
+ *             bam_plp_reset(self.pileup_iter)             # <<<<<<<<<<<<<<
+ *             bam_plp_destroy(self.pileup_iter)
+ *             self.pileup_iter = <bam_plp_t>NULL
+ */
+    bam_plp_reset(__pyx_v_self->pileup_iter);
+
+    /* "pysam/csamfile.pyx":1773
+ *         if self.pileup_iter != <bam_plp_t>NULL:
+ *             bam_plp_reset(self.pileup_iter)
+ *             bam_plp_destroy(self.pileup_iter)             # <<<<<<<<<<<<<<
+ *             self.pileup_iter = <bam_plp_t>NULL
+ *             self.plp = <bam_pileup1_t*>NULL
+ */
+    bam_plp_destroy(__pyx_v_self->pileup_iter);
+
+    /* "pysam/csamfile.pyx":1774
+ *             bam_plp_reset(self.pileup_iter)
+ *             bam_plp_destroy(self.pileup_iter)
+ *             self.pileup_iter = <bam_plp_t>NULL             # <<<<<<<<<<<<<<
+ *             self.plp = <bam_pileup1_t*>NULL
+ * 
+ */
+    __pyx_v_self->pileup_iter = ((bam_plp_t)NULL);
+
+    /* "pysam/csamfile.pyx":1775
+ *             bam_plp_destroy(self.pileup_iter)
+ *             self.pileup_iter = <bam_plp_t>NULL
+ *             self.plp = <bam_pileup1_t*>NULL             # <<<<<<<<<<<<<<
+ * 
+ *         if self.iterdata.seq != NULL:
+ */
+    __pyx_v_self->plp = ((bam_pileup1_t *)NULL);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1777
+ *             self.plp = <bam_pileup1_t*>NULL
+ * 
+ *         if self.iterdata.seq != NULL:             # <<<<<<<<<<<<<<
+ *             free(self.iterdata.seq)
+ *             self.iterdata.seq = NULL
+ */
+  __pyx_t_1 = ((__pyx_v_self->iterdata.seq != NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1778
+ * 
+ *         if self.iterdata.seq != NULL:
+ *             free(self.iterdata.seq)             # <<<<<<<<<<<<<<
+ *             self.iterdata.seq = NULL
+ * 
+ */
+    free(__pyx_v_self->iterdata.seq);
+
+    /* "pysam/csamfile.pyx":1779
+ *         if self.iterdata.seq != NULL:
+ *             free(self.iterdata.seq)
+ *             self.iterdata.seq = NULL             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __pyx_v_self->iterdata.seq = NULL;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "pysam/csamfile.pyx":1768
+ *         bam_plp_reset(self.pileup_iter)
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         # reset in order to avoid memory leak messages for iterators
+ *         # that have not been fully consumed
+ */
+
+  /* function exit code */
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/csamfile.pyx":1785
+ *     '''iterates over a region only.
+ *     '''
+ *     def __cinit__(self, Samfile samfile,             # <<<<<<<<<<<<<<
+ *                   int tid = 0,
+ *                   int start = 0,
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_20IteratorColumnRegion_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_20IteratorColumnRegion_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  int __pyx_v_tid;
+  int __pyx_v_start;
+  int __pyx_v_end;
+  int __pyx_v_truncate;
+  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,&__pyx_n_s_tid,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_truncate,0};
+    PyObject* values[5] = {0,0,0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tid);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_truncate);
+          if (value) { values[4] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+    if (values[1]) {
+      __pyx_v_tid = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_tid = ((int)0);
+    }
+    if (values[2]) {
+      __pyx_v_start = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_start = ((int)0);
+    }
+    if (values[3]) {
+      __pyx_v_end = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_end = __pyx_k__57;
+    }
+    if (values[4]) {
+      __pyx_v_truncate = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_truncate == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1789; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+
+      /* "pysam/csamfile.pyx":1789
+ *                   int start = 0,
+ *                   int end = max_pos,
+ *                   int truncate = False,             # <<<<<<<<<<<<<<
+ *                   **kwargs ):
+ * 
+ */
+      __pyx_v_truncate = ((int)0);
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumnRegion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_20IteratorColumnRegion___cinit__(((struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion *)__pyx_v_self), __pyx_v_samfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end, __pyx_v_truncate, __pyx_v_kwargs);
+
+  /* "pysam/csamfile.pyx":1785
+ *     '''iterates over a region only.
+ *     '''
+ *     def __cinit__(self, Samfile samfile,             # <<<<<<<<<<<<<<
+ *                   int tid = 0,
+ *                   int start = 0,
+ */
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_20IteratorColumnRegion___cinit__(struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end, int __pyx_v_truncate, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  struct __pyx_opt_args_5pysam_8csamfile_14IteratorColumn_setupIteratorData __pyx_t_2;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1785);
+
+  /* "pysam/csamfile.pyx":1793
+ * 
+ *         # initialize iterator
+ *         self.setupIteratorData( tid, start, end, 1 )             # <<<<<<<<<<<<<<
+ *         self.start = start
+ *         self.end = end
+ */
+  __pyx_t_2.__pyx_n = 1;
+  __pyx_t_2.reopen = 1;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnRegion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self), __pyx_v_tid, __pyx_v_start, __pyx_v_end, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1794
+ *         # initialize iterator
+ *         self.setupIteratorData( tid, start, end, 1 )
+ *         self.start = start             # <<<<<<<<<<<<<<
+ *         self.end = end
+ *         self.truncate = truncate
+ */
+  __pyx_v_self->start = __pyx_v_start;
+
+  /* "pysam/csamfile.pyx":1795
+ *         self.setupIteratorData( tid, start, end, 1 )
+ *         self.start = start
+ *         self.end = end             # <<<<<<<<<<<<<<
+ *         self.truncate = truncate
+ * 
+ */
+  __pyx_v_self->end = __pyx_v_end;
+
+  /* "pysam/csamfile.pyx":1796
+ *         self.start = start
+ *         self.end = end
+ *         self.truncate = truncate             # <<<<<<<<<<<<<<
+ * 
+ *     def __next__(self):
+ */
+  __pyx_v_self->truncate = __pyx_v_truncate;
+
+  /* "pysam/csamfile.pyx":1785
+ *     '''iterates over a region only.
+ *     '''
+ *     def __cinit__(self, Samfile samfile,             # <<<<<<<<<<<<<<
+ *                   int tid = 0,
+ *                   int start = 0,
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumnRegion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1798
+ *         self.truncate = truncate
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_20IteratorColumnRegion_3__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_20IteratorColumnRegion_2__next__[] = "python version of next().\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_20IteratorColumnRegion_2__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_20IteratorColumnRegion_3__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_20IteratorColumnRegion_2__next__(((struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_20IteratorColumnRegion_2__next__(struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 1798);
+
+  /* "pysam/csamfile.pyx":1802
+ *         """
+ * 
+ *         while 1:             # <<<<<<<<<<<<<<
+ *             self.cnext()
+ *             if self.n_plp < 0:
+ */
+  while (1) {
+
+    /* "pysam/csamfile.pyx":1803
+ * 
+ *         while 1:
+ *             self.cnext()             # <<<<<<<<<<<<<<
+ *             if self.n_plp < 0:
+ *                 raise ValueError("error during iteration" )
+ */
+    ((struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnRegion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.cnext(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self));
+
+    /* "pysam/csamfile.pyx":1804
+ *         while 1:
+ *             self.cnext()
+ *             if self.n_plp < 0:             # <<<<<<<<<<<<<<
+ *                 raise ValueError("error during iteration" )
+ * 
+ */
+    __pyx_t_1 = ((__pyx_v_self->__pyx_base.n_plp < 0) != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1805
+ *             self.cnext()
+ *             if self.n_plp < 0:
+ *                 raise ValueError("error during iteration" )             # <<<<<<<<<<<<<<
+ * 
+ *             if self.plp == NULL:
+ */
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":1807
+ *                 raise ValueError("error during iteration" )
+ * 
+ *             if self.plp == NULL:             # <<<<<<<<<<<<<<
+ *                 raise StopIteration
+ * 
+ */
+    __pyx_t_1 = ((__pyx_v_self->__pyx_base.plp == NULL) != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1808
+ * 
+ *             if self.plp == NULL:
+ *                 raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ *             if self.truncate:
+ */
+      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":1810
+ *                 raise StopIteration
+ * 
+ *             if self.truncate:             # <<<<<<<<<<<<<<
+ *                 if self.start > self.pos: continue
+ *                 if self.pos >= self.end: raise StopIteration
+ */
+    __pyx_t_1 = (__pyx_v_self->truncate != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1811
+ * 
+ *             if self.truncate:
+ *                 if self.start > self.pos: continue             # <<<<<<<<<<<<<<
+ *                 if self.pos >= self.end: raise StopIteration
+ * 
+ */
+      __pyx_t_1 = ((__pyx_v_self->start > __pyx_v_self->__pyx_base.pos) != 0);
+      if (__pyx_t_1) {
+        goto __pyx_L3_continue;
+      }
+
+      /* "pysam/csamfile.pyx":1812
+ *             if self.truncate:
+ *                 if self.start > self.pos: continue
+ *                 if self.pos >= self.end: raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ *             return makePileupProxy(&self.plp,
+ */
+      __pyx_t_1 = ((__pyx_v_self->__pyx_base.pos >= __pyx_v_self->end) != 0);
+      if (__pyx_t_1) {
+        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "pysam/csamfile.pyx":1814
+ *                 if self.pos >= self.end: raise StopIteration
+ * 
+ *             return makePileupProxy(&self.plp,             # <<<<<<<<<<<<<<
+ *                                    self.tid,
+ *                                    self.pos,
+ */
+    __Pyx_XDECREF(__pyx_r);
+
+    /* "pysam/csamfile.pyx":1817
+ *                                    self.tid,
+ *                                    self.pos,
+ *                                    self.n_plp)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __pyx_t_2 = __pyx_f_5pysam_8csamfile_makePileupProxy((&__pyx_v_self->__pyx_base.plp), __pyx_v_self->__pyx_base.tid, __pyx_v_self->__pyx_base.pos, __pyx_v_self->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+    __pyx_L3_continue:;
+  }
+
+  /* "pysam/csamfile.pyx":1798
+ *         self.truncate = truncate
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumnRegion.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1824
+ *     """
+ * 
+ *     def __cinit__(self,             # <<<<<<<<<<<<<<
+ *                   Samfile samfile,
+ *                   **kwargs):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_21IteratorColumnAllRefs_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_21IteratorColumnAllRefs_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,0};
+    PyObject* values[1] = {0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumnAllRefs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_21IteratorColumnAllRefs___cinit__(((struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs *)__pyx_v_self), __pyx_v_samfile, __pyx_v_kwargs);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_21IteratorColumnAllRefs___cinit__(struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  struct __pyx_opt_args_5pysam_8csamfile_14IteratorColumn_setupIteratorData __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1824);
+
+  /* "pysam/csamfile.pyx":1829
+ * 
+ *         # no iteration over empty files
+ *         if not samfile.nreferences:             # <<<<<<<<<<<<<<
+ *             raise StopIteration
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_samfile), __pyx_n_s_nreferences); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __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 = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = ((!__pyx_t_2) != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":1830
+ *         # no iteration over empty files
+ *         if not samfile.nreferences:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ *         # initialize iterator
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":1833
+ * 
+ *         # initialize iterator
+ *         self.setupIteratorData(self.tid, 0, max_pos, 1)             # <<<<<<<<<<<<<<
+ * 
+ *     def __next__(self):
+ */
+  __pyx_t_4.__pyx_n = 1;
+  __pyx_t_4.reopen = 1;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self), __pyx_v_self->__pyx_base.tid, 0, __pyx_v_5pysam_8csamfile_max_pos, &__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1824
+ *     """
+ * 
+ *     def __cinit__(self,             # <<<<<<<<<<<<<<
+ *                   Samfile samfile,
+ *                   **kwargs):
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumnAllRefs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1835
+ *         self.setupIteratorData(self.tid, 0, max_pos, 1)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_21IteratorColumnAllRefs_3__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__[] = "python version of next().\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_21IteratorColumnAllRefs_3__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__(((struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__(struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  struct __pyx_opt_args_5pysam_8csamfile_14IteratorColumn_setupIteratorData __pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__next__", 0);
+  __Pyx_TraceCall("__next__", __pyx_f[0], 1835);
+
+  /* "pysam/csamfile.pyx":1839
+ *         """
+ * 
+ *         while 1:             # <<<<<<<<<<<<<<
+ *             self.cnext()
+ * 
+ */
+  while (1) {
+
+    /* "pysam/csamfile.pyx":1840
+ * 
+ *         while 1:
+ *             self.cnext()             # <<<<<<<<<<<<<<
+ * 
+ *             if self.n_plp < 0:
+ */
+    ((struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.cnext(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self));
+
+    /* "pysam/csamfile.pyx":1842
+ *             self.cnext()
+ * 
+ *             if self.n_plp < 0:             # <<<<<<<<<<<<<<
+ *                 raise ValueError("error during iteration" )
+ * 
+ */
+    __pyx_t_1 = ((__pyx_v_self->__pyx_base.n_plp < 0) != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1843
+ * 
+ *             if self.n_plp < 0:
+ *                 raise ValueError("error during iteration" )             # <<<<<<<<<<<<<<
+ * 
+ *             # return result, if within same reference
+ */
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "pysam/csamfile.pyx":1846
+ * 
+ *             # return result, if within same reference
+ *             if self.plp != NULL:             # <<<<<<<<<<<<<<
+ *                 return makePileupProxy(&self.plp,
+ *                                        self.tid,
+ */
+    __pyx_t_1 = ((__pyx_v_self->__pyx_base.plp != NULL) != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1847
+ *             # return result, if within same reference
+ *             if self.plp != NULL:
+ *                 return makePileupProxy(&self.plp,             # <<<<<<<<<<<<<<
+ *                                        self.tid,
+ *                                        self.pos,
+ */
+      __Pyx_XDECREF(__pyx_r);
+
+      /* "pysam/csamfile.pyx":1850
+ *                                        self.tid,
+ *                                        self.pos,
+ *                                        self.n_plp)             # <<<<<<<<<<<<<<
+ * 
+ *             # otherwise, proceed to next reference or stop
+ */
+      __pyx_t_2 = __pyx_f_5pysam_8csamfile_makePileupProxy((&__pyx_v_self->__pyx_base.plp), __pyx_v_self->__pyx_base.tid, __pyx_v_self->__pyx_base.pos, __pyx_v_self->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_r = __pyx_t_2;
+      __pyx_t_2 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "pysam/csamfile.pyx":1853
+ * 
+ *             # otherwise, proceed to next reference or stop
+ *             self.tid += 1             # <<<<<<<<<<<<<<
+ *             if self.tid < self.samfile.nreferences:
+ *                 self.setupIteratorData(self.tid, 0, max_pos, 0)
+ */
+    __pyx_v_self->__pyx_base.tid = (__pyx_v_self->__pyx_base.tid + 1);
+
+    /* "pysam/csamfile.pyx":1854
+ *             # otherwise, proceed to next reference or stop
+ *             self.tid += 1
+ *             if self.tid < self.samfile.nreferences:             # <<<<<<<<<<<<<<
+ *                 self.setupIteratorData(self.tid, 0, max_pos, 0)
+ *             else:
+ */
+    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.samfile), __pyx_n_s_nreferences); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1855
+ *             self.tid += 1
+ *             if self.tid < self.samfile.nreferences:
+ *                 self.setupIteratorData(self.tid, 0, max_pos, 0)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise StopIteration
+ */
+      __pyx_t_5.__pyx_n = 1;
+      __pyx_t_5.reopen = 0;
+      __pyx_t_4 = ((struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)__pyx_v_self), __pyx_v_self->__pyx_base.tid, 0, __pyx_v_5pysam_8csamfile_max_pos, &__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      goto __pyx_L7;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":1857
+ *                 self.setupIteratorData(self.tid, 0, max_pos, 0)
+ *             else:
+ *                 raise StopIteration             # <<<<<<<<<<<<<<
+ * 
+ * ##-------------------------------------------------------------------
+ */
+      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L7:;
+  }
+
+  /* "pysam/csamfile.pyx":1835
+ *         self.setupIteratorData(self.tid, 0, max_pos, 1)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.IteratorColumnAllRefs.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1862
+ * ##-------------------------------------------------------------------
+ * ##-------------------------------------------------------------------
+ * cdef inline int32_t query_start(bam1_t *src) except -1:             # <<<<<<<<<<<<<<
+ *     cdef uint32_t * cigar_p
+ *     cdef uint32_t k, op
+ */
+
+static CYTHON_INLINE int32_t __pyx_f_5pysam_8csamfile_query_start(bam1_t *__pyx_v_src) {
+  uint32_t *__pyx_v_cigar_p;
+  uint32_t __pyx_v_k;
+  uint32_t __pyx_v_op;
+  uint32_t __pyx_v_start_offset;
+  int32_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  uint16_t __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("query_start", 0);
+  __Pyx_TraceCall("query_start", __pyx_f[0], 1862);
+
+  /* "pysam/csamfile.pyx":1865
+ *     cdef uint32_t * cigar_p
+ *     cdef uint32_t k, op
+ *     cdef uint32_t start_offset = 0             # <<<<<<<<<<<<<<
+ * 
+ *     if pysam_get_n_cigar(src):
+ */
+  __pyx_v_start_offset = 0;
+
+  /* "pysam/csamfile.pyx":1867
+ *     cdef uint32_t start_offset = 0
+ * 
+ *     if pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *         cigar_p = pysam_bam_get_cigar(src);
+ *         for k from 0 <= k < pysam_get_n_cigar(src):
+ */
+  __pyx_t_1 = (pysam_get_n_cigar(__pyx_v_src) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1868
+ * 
+ *     if pysam_get_n_cigar(src):
+ *         cigar_p = pysam_bam_get_cigar(src);             # <<<<<<<<<<<<<<
+ *         for k from 0 <= k < pysam_get_n_cigar(src):
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ */
+    __pyx_v_cigar_p = pysam_bam_get_cigar(__pyx_v_src);
+
+    /* "pysam/csamfile.pyx":1869
+ *     if pysam_get_n_cigar(src):
+ *         cigar_p = pysam_bam_get_cigar(src);
+ *         for k from 0 <= k < pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ *             if op == BAM_CHARD_CLIP:
+ */
+    __pyx_t_2 = pysam_get_n_cigar(__pyx_v_src);
+    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_2; __pyx_v_k++) {
+
+      /* "pysam/csamfile.pyx":1870
+ *         cigar_p = pysam_bam_get_cigar(src);
+ *         for k from 0 <= k < pysam_get_n_cigar(src):
+ *             op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
+ *             if op == BAM_CHARD_CLIP:
+ *                 if start_offset != 0 and start_offset != src.core.l_qseq:
+ */
+      __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & BAM_CIGAR_MASK);
+
+      /* "pysam/csamfile.pyx":1871
+ *         for k from 0 <= k < pysam_get_n_cigar(src):
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ *             if op == BAM_CHARD_CLIP:             # <<<<<<<<<<<<<<
+ *                 if start_offset != 0 and start_offset != src.core.l_qseq:
+ *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
+ */
+      __pyx_t_1 = ((__pyx_v_op == BAM_CHARD_CLIP) != 0);
+      if (__pyx_t_1) {
+
+        /* "pysam/csamfile.pyx":1872
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ *             if op == BAM_CHARD_CLIP:
+ *                 if start_offset != 0 and start_offset != src.core.l_qseq:             # <<<<<<<<<<<<<<
+ *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
+ *                     return -1
+ */
+        __pyx_t_1 = ((__pyx_v_start_offset != 0) != 0);
+        if (__pyx_t_1) {
+          __pyx_t_3 = ((__pyx_v_start_offset != __pyx_v_src->core.l_qseq) != 0);
+          __pyx_t_4 = __pyx_t_3;
+        } else {
+          __pyx_t_4 = __pyx_t_1;
+        }
+        if (__pyx_t_4) {
+
+          /* "pysam/csamfile.pyx":1873
+ *             if op == BAM_CHARD_CLIP:
+ *                 if start_offset != 0 and start_offset != src.core.l_qseq:
+ *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')             # <<<<<<<<<<<<<<
+ *                     return -1
+ *             elif op == BAM_CSOFT_CLIP:
+ */
+          PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_Invalid_clipping_in_CIGAR_string);
+
+          /* "pysam/csamfile.pyx":1874
+ *                 if start_offset != 0 and start_offset != src.core.l_qseq:
+ *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
+ *                     return -1             # <<<<<<<<<<<<<<
+ *             elif op == BAM_CSOFT_CLIP:
+ *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
+ */
+          __pyx_r = -1;
+          goto __pyx_L0;
+        }
+        goto __pyx_L6;
+      }
+
+      /* "pysam/csamfile.pyx":1875
+ *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
+ *                     return -1
+ *             elif op == BAM_CSOFT_CLIP:             # <<<<<<<<<<<<<<
+ *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
+ *             else:
+ */
+      __pyx_t_4 = ((__pyx_v_op == BAM_CSOFT_CLIP) != 0);
+      if (__pyx_t_4) {
+
+        /* "pysam/csamfile.pyx":1876
+ *                     return -1
+ *             elif op == BAM_CSOFT_CLIP:
+ *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
+ *             else:
+ *                 break
+ */
+        __pyx_v_start_offset = (__pyx_v_start_offset + ((__pyx_v_cigar_p[__pyx_v_k]) >> BAM_CIGAR_SHIFT));
+        goto __pyx_L6;
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":1878
+ *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
+ *             else:
+ *                 break             # <<<<<<<<<<<<<<
+ * 
+ *     return start_offset
+ */
+        goto __pyx_L5_break;
+      }
+      __pyx_L6:;
+    }
+    __pyx_L5_break:;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1880
+ *                 break
+ * 
+ *     return start_offset             # <<<<<<<<<<<<<<
+ * 
+ * ##-------------------------------------------------------------------
+ */
+  __pyx_r = __pyx_v_start_offset;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1862
+ * ##-------------------------------------------------------------------
+ * ##-------------------------------------------------------------------
+ * cdef inline int32_t query_start(bam1_t *src) except -1:             # <<<<<<<<<<<<<<
+ *     cdef uint32_t * cigar_p
+ *     cdef uint32_t k, op
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1885
+ * ##-------------------------------------------------------------------
+ * ##-------------------------------------------------------------------
+ * cdef inline int32_t query_end(bam1_t *src) except -1:             # <<<<<<<<<<<<<<
+ *     cdef uint32_t * cigar_p
+ *     cdef uint32_t k, op
+ */
+
+static CYTHON_INLINE int32_t __pyx_f_5pysam_8csamfile_query_end(bam1_t *__pyx_v_src) {
+  uint32_t *__pyx_v_cigar_p;
+  uint32_t __pyx_v_k;
+  uint32_t __pyx_v_op;
+  uint32_t __pyx_v_end_offset;
+  int32_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("query_end", 0);
+  __Pyx_TraceCall("query_end", __pyx_f[0], 1885);
+
+  /* "pysam/csamfile.pyx":1888
+ *     cdef uint32_t * cigar_p
+ *     cdef uint32_t k, op
+ *     cdef uint32_t end_offset = src.core.l_qseq             # <<<<<<<<<<<<<<
+ * 
+ *     if pysam_get_n_cigar(src) > 1:
+ */
+  __pyx_t_1 = __pyx_v_src->core.l_qseq;
+  __pyx_v_end_offset = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":1890
+ *     cdef uint32_t end_offset = src.core.l_qseq
+ * 
+ *     if pysam_get_n_cigar(src) > 1:             # <<<<<<<<<<<<<<
+ *         cigar_p = pysam_bam_get_cigar(src);
+ *         for k from pysam_get_n_cigar(src) > k >= 1:
+ */
+  __pyx_t_2 = ((pysam_get_n_cigar(__pyx_v_src) > 1) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":1891
+ * 
+ *     if pysam_get_n_cigar(src) > 1:
+ *         cigar_p = pysam_bam_get_cigar(src);             # <<<<<<<<<<<<<<
+ *         for k from pysam_get_n_cigar(src) > k >= 1:
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ */
+    __pyx_v_cigar_p = pysam_bam_get_cigar(__pyx_v_src);
+
+    /* "pysam/csamfile.pyx":1892
+ *     if pysam_get_n_cigar(src) > 1:
+ *         cigar_p = pysam_bam_get_cigar(src);
+ *         for k from pysam_get_n_cigar(src) > k >= 1:             # <<<<<<<<<<<<<<
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ *             if op == BAM_CHARD_CLIP:
+ */
+    for (__pyx_v_k = pysam_get_n_cigar(__pyx_v_src)-1; __pyx_v_k >= 1; __pyx_v_k--) {
+
+      /* "pysam/csamfile.pyx":1893
+ *         cigar_p = pysam_bam_get_cigar(src);
+ *         for k from pysam_get_n_cigar(src) > k >= 1:
+ *             op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
+ *             if op == BAM_CHARD_CLIP:
+ *                 if end_offset != 0 and end_offset != src.core.l_qseq:
+ */
+      __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & BAM_CIGAR_MASK);
+
+      /* "pysam/csamfile.pyx":1894
+ *         for k from pysam_get_n_cigar(src) > k >= 1:
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ *             if op == BAM_CHARD_CLIP:             # <<<<<<<<<<<<<<
+ *                 if end_offset != 0 and end_offset != src.core.l_qseq:
+ *                     PyErr_SetString(ValueError,
+ */
+      __pyx_t_2 = ((__pyx_v_op == BAM_CHARD_CLIP) != 0);
+      if (__pyx_t_2) {
+
+        /* "pysam/csamfile.pyx":1895
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ *             if op == BAM_CHARD_CLIP:
+ *                 if end_offset != 0 and end_offset != src.core.l_qseq:             # <<<<<<<<<<<<<<
+ *                     PyErr_SetString(ValueError,
+ *                                     'Invalid clipping in CIGAR string')
+ */
+        __pyx_t_2 = ((__pyx_v_end_offset != 0) != 0);
+        if (__pyx_t_2) {
+          __pyx_t_3 = ((__pyx_v_end_offset != __pyx_v_src->core.l_qseq) != 0);
+          __pyx_t_4 = __pyx_t_3;
+        } else {
+          __pyx_t_4 = __pyx_t_2;
+        }
+        if (__pyx_t_4) {
+
+          /* "pysam/csamfile.pyx":1896
+ *             if op == BAM_CHARD_CLIP:
+ *                 if end_offset != 0 and end_offset != src.core.l_qseq:
+ *                     PyErr_SetString(ValueError,             # <<<<<<<<<<<<<<
+ *                                     'Invalid clipping in CIGAR string')
+ *                     return -1
+ */
+          PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_Invalid_clipping_in_CIGAR_string);
+
+          /* "pysam/csamfile.pyx":1898
+ *                     PyErr_SetString(ValueError,
+ *                                     'Invalid clipping in CIGAR string')
+ *                     return -1             # <<<<<<<<<<<<<<
+ *             elif op == BAM_CSOFT_CLIP:
+ *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
+ */
+          __pyx_r = -1;
+          goto __pyx_L0;
+        }
+        goto __pyx_L6;
+      }
+
+      /* "pysam/csamfile.pyx":1899
+ *                                     'Invalid clipping in CIGAR string')
+ *                     return -1
+ *             elif op == BAM_CSOFT_CLIP:             # <<<<<<<<<<<<<<
+ *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
+ *             else:
+ */
+      __pyx_t_4 = ((__pyx_v_op == BAM_CSOFT_CLIP) != 0);
+      if (__pyx_t_4) {
+
+        /* "pysam/csamfile.pyx":1900
+ *                     return -1
+ *             elif op == BAM_CSOFT_CLIP:
+ *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
+ *             else:
+ *                 break
+ */
+        __pyx_v_end_offset = (__pyx_v_end_offset - ((__pyx_v_cigar_p[__pyx_v_k]) >> BAM_CIGAR_SHIFT));
+        goto __pyx_L6;
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":1902
+ *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
+ *             else:
+ *                 break             # <<<<<<<<<<<<<<
+ * 
+ *     if end_offset == 0:
+ */
+        goto __pyx_L5_break;
+      }
+      __pyx_L6:;
+    }
+    __pyx_L5_break:;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1904
+ *                 break
+ * 
+ *     if end_offset == 0:             # <<<<<<<<<<<<<<
+ *         end_offset = src.core.l_qseq
+ * 
+ */
+  __pyx_t_4 = ((__pyx_v_end_offset == 0) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":1905
+ * 
+ *     if end_offset == 0:
+ *         end_offset = src.core.l_qseq             # <<<<<<<<<<<<<<
+ * 
+ *     return end_offset
+ */
+    __pyx_t_1 = __pyx_v_src->core.l_qseq;
+    __pyx_v_end_offset = __pyx_t_1;
+    goto __pyx_L8;
+  }
+  __pyx_L8:;
+
+  /* "pysam/csamfile.pyx":1907
+ *         end_offset = src.core.l_qseq
+ * 
+ *     return end_offset             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_r = __pyx_v_end_offset;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1885
+ * ##-------------------------------------------------------------------
+ * ##-------------------------------------------------------------------
+ * cdef inline int32_t query_end(bam1_t *src) except -1:             # <<<<<<<<<<<<<<
+ *     cdef uint32_t * cigar_p
+ *     cdef uint32_t k, op
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1910
+ * 
+ * 
+ * cdef inline object get_seq_range(bam1_t *src, uint32_t start, uint32_t end):             # <<<<<<<<<<<<<<
+ *     cdef uint8_t * p
+ *     cdef uint32_t k
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_8csamfile_get_seq_range(bam1_t *__pyx_v_src, uint32_t __pyx_v_start, uint32_t __pyx_v_end) {
+  uint8_t *__pyx_v_p;
+  uint32_t __pyx_v_k;
+  char *__pyx_v_s;
+  PyObject *__pyx_v_seq = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  char *__pyx_t_3;
+  uint32_t __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("get_seq_range", 0);
+  __Pyx_TraceCall("get_seq_range", __pyx_f[0], 1910);
+
+  /* "pysam/csamfile.pyx":1915
+ *     cdef char * s
+ * 
+ *     if not src.core.l_qseq:             # <<<<<<<<<<<<<<
+ *         return None
+ * 
+ */
+  __pyx_t_1 = ((!(__pyx_v_src->core.l_qseq != 0)) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1916
+ * 
+ *     if not src.core.l_qseq:
+ *         return None             # <<<<<<<<<<<<<<
+ * 
+ *     seq = PyBytes_FromStringAndSize(NULL, end - start)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":1918
+ *         return None
+ * 
+ *     seq = PyBytes_FromStringAndSize(NULL, end - start)             # <<<<<<<<<<<<<<
+ *     s   = <char*>seq
+ *     p   = pysam_bam_get_seq(src)
+ */
+  __pyx_t_2 = PyBytes_FromStringAndSize(NULL, (__pyx_v_end - __pyx_v_start)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_v_seq = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":1919
+ * 
+ *     seq = PyBytes_FromStringAndSize(NULL, end - start)
+ *     s   = <char*>seq             # <<<<<<<<<<<<<<
+ *     p   = pysam_bam_get_seq(src)
+ * 
+ */
+  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_seq); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_s = ((char *)__pyx_t_3);
+
+  /* "pysam/csamfile.pyx":1920
+ *     seq = PyBytes_FromStringAndSize(NULL, end - start)
+ *     s   = <char*>seq
+ *     p   = pysam_bam_get_seq(src)             # <<<<<<<<<<<<<<
+ * 
+ *     for k from start <= k < end:
+ */
+  __pyx_v_p = pysam_bam_get_seq(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":1922
+ *     p   = pysam_bam_get_seq(src)
+ * 
+ *     for k from start <= k < end:             # <<<<<<<<<<<<<<
+ *         # equivalent to seq_nt16_str[bam1_seqi(s, i)] (see bam.c)
+ *         # note: do not use string literal as it will be a python string
+ */
+  __pyx_t_4 = __pyx_v_end;
+  for (__pyx_v_k = __pyx_v_start; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":1925
+ *         # equivalent to seq_nt16_str[bam1_seqi(s, i)] (see bam.c)
+ *         # note: do not use string literal as it will be a python string
+ *         s[k-start] = seq_nt16_str[p[k/2] >> 4 * (1 - k%2) & 0xf]             # <<<<<<<<<<<<<<
+ * 
+ *     return seq
+ */
+    (__pyx_v_s[(__pyx_v_k - __pyx_v_start)]) = (seq_nt16_str[(((__pyx_v_p[__Pyx_div_long(__pyx_v_k, 2)]) >> (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2)))) & 0xf)]);
+  }
+
+  /* "pysam/csamfile.pyx":1927
+ *         s[k-start] = seq_nt16_str[p[k/2] >> 4 * (1 - k%2) & 0xf]
+ * 
+ *     return seq             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_seq);
+  __pyx_r = __pyx_v_seq;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1910
+ * 
+ * 
+ * cdef inline object get_seq_range(bam1_t *src, uint32_t start, uint32_t end):             # <<<<<<<<<<<<<<
+ *     cdef uint8_t * p
+ *     cdef uint32_t k
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.get_seq_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_seq);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1930
+ * 
+ * 
+ * cdef inline object get_qual_range(bam1_t *src, uint32_t start, uint32_t end):             # <<<<<<<<<<<<<<
+ *     cdef uint8_t * p
+ *     cdef uint32_t k
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_8csamfile_get_qual_range(bam1_t *__pyx_v_src, uint32_t __pyx_v_start, uint32_t __pyx_v_end) {
+  uint8_t *__pyx_v_p;
+  uint32_t __pyx_v_k;
+  char *__pyx_v_q;
+  PyObject *__pyx_v_qual = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  char *__pyx_t_3;
+  uint32_t __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("get_qual_range", 0);
+  __Pyx_TraceCall("get_qual_range", __pyx_f[0], 1930);
+
+  /* "pysam/csamfile.pyx":1935
+ *     cdef char * q
+ * 
+ *     p = pysam_bam_get_qual(src)             # <<<<<<<<<<<<<<
+ *     if p[0] == 0xff:
+ *         return None
+ */
+  __pyx_v_p = pysam_bam_get_qual(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":1936
+ * 
+ *     p = pysam_bam_get_qual(src)
+ *     if p[0] == 0xff:             # <<<<<<<<<<<<<<
+ *         return None
+ * 
+ */
+  __pyx_t_1 = (((__pyx_v_p[0]) == 0xff) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":1937
+ *     p = pysam_bam_get_qual(src)
+ *     if p[0] == 0xff:
+ *         return None             # <<<<<<<<<<<<<<
+ * 
+ *     qual = PyBytes_FromStringAndSize(NULL, end - start)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":1939
+ *         return None
+ * 
+ *     qual = PyBytes_FromStringAndSize(NULL, end - start)             # <<<<<<<<<<<<<<
+ *     q    = <char*>qual
+ * 
+ */
+  __pyx_t_2 = PyBytes_FromStringAndSize(NULL, (__pyx_v_end - __pyx_v_start)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_v_qual = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":1940
+ * 
+ *     qual = PyBytes_FromStringAndSize(NULL, end - start)
+ *     q    = <char*>qual             # <<<<<<<<<<<<<<
+ * 
+ *     for k from start <= k < end:
+ */
+  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_qual); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_q = ((char *)__pyx_t_3);
+
+  /* "pysam/csamfile.pyx":1942
+ *     q    = <char*>qual
+ * 
+ *     for k from start <= k < end:             # <<<<<<<<<<<<<<
+ *         ## equivalent to t[i] + 33 (see bam.c)
+ *         q[k-start] = p[k] + 33
+ */
+  __pyx_t_4 = __pyx_v_end;
+  for (__pyx_v_k = __pyx_v_start; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":1944
+ *     for k from start <= k < end:
+ *         ## equivalent to t[i] + 33 (see bam.c)
+ *         q[k-start] = p[k] + 33             # <<<<<<<<<<<<<<
+ * 
+ *     return qual
+ */
+    (__pyx_v_q[(__pyx_v_k - __pyx_v_start)]) = ((__pyx_v_p[__pyx_v_k]) + 33);
+  }
+
+  /* "pysam/csamfile.pyx":1946
+ *         q[k-start] = p[k] + 33
+ * 
+ *     return qual             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline uint8_t get_type_code(value, value_type = None):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_qual);
+  __pyx_r = __pyx_v_qual;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1930
+ * 
+ * 
+ * cdef inline object get_qual_range(bam1_t *src, uint32_t start, uint32_t end):             # <<<<<<<<<<<<<<
+ *     cdef uint8_t * p
+ *     cdef uint32_t k
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.get_qual_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_qual);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1948
+ *     return qual
+ * 
+ * cdef inline uint8_t get_type_code(value, value_type = None):             # <<<<<<<<<<<<<<
+ *     '''guess type code for a *value*. If *value_type* is None,
+ *     the type code will be inferred based on the Python type of
+ */
+
+static CYTHON_INLINE uint8_t __pyx_f_5pysam_8csamfile_get_type_code(PyObject *__pyx_v_value, struct __pyx_opt_args_5pysam_8csamfile_get_type_code *__pyx_optional_args) {
+  PyObject *__pyx_v_value_type = ((PyObject *)Py_None);
+  uint8_t __pyx_v_type_code;
+  char *__pyx_v__char_type;
+  uint8_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  char *__pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("get_type_code", 0);
+  __Pyx_TraceCall("get_type_code", __pyx_f[0], 1948);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_value_type = __pyx_optional_args->value_type;
+    }
+  }
+  __Pyx_INCREF(__pyx_v_value_type);
+
+  /* "pysam/csamfile.pyx":1955
+ *     cdef char * _char_type
+ * 
+ *     if value_type is None:             # <<<<<<<<<<<<<<
+ *         if isinstance(value, int):
+ *             type_code = 'i'
+ */
+  __pyx_t_1 = (__pyx_v_value_type == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":1956
+ * 
+ *     if value_type is None:
+ *         if isinstance(value, int):             # <<<<<<<<<<<<<<
+ *             type_code = 'i'
+ *         elif isinstance(value, float):
+ */
+    __pyx_t_2 = PyInt_Check(__pyx_v_value); 
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1957
+ *     if value_type is None:
+ *         if isinstance(value, int):
+ *             type_code = 'i'             # <<<<<<<<<<<<<<
+ *         elif isinstance(value, float):
+ *             type_code = 'd'
+ */
+      __pyx_v_type_code = 'i';
+      goto __pyx_L4;
+    }
+
+    /* "pysam/csamfile.pyx":1958
+ *         if isinstance(value, int):
+ *             type_code = 'i'
+ *         elif isinstance(value, float):             # <<<<<<<<<<<<<<
+ *             type_code = 'd'
+ *         elif isinstance(value, str):
+ */
+    __pyx_t_1 = PyFloat_Check(__pyx_v_value); 
+    __pyx_t_2 = (__pyx_t_1 != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":1959
+ *             type_code = 'i'
+ *         elif isinstance(value, float):
+ *             type_code = 'd'             # <<<<<<<<<<<<<<
+ *         elif isinstance(value, str):
+ *             type_code = 'Z'
+ */
+      __pyx_v_type_code = 'd';
+      goto __pyx_L4;
+    }
+
+    /* "pysam/csamfile.pyx":1960
+ *         elif isinstance(value, float):
+ *             type_code = 'd'
+ *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
+ *             type_code = 'Z'
+ *         elif isinstance(value, bytes):
+ */
+    __pyx_t_2 = PyString_Check(__pyx_v_value); 
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1961
+ *             type_code = 'd'
+ *         elif isinstance(value, str):
+ *             type_code = 'Z'             # <<<<<<<<<<<<<<
+ *         elif isinstance(value, bytes):
+ *             type_code = 'Z'
+ */
+      __pyx_v_type_code = 'Z';
+      goto __pyx_L4;
+    }
+
+    /* "pysam/csamfile.pyx":1962
+ *         elif isinstance(value, str):
+ *             type_code = 'Z'
+ *         elif isinstance(value, bytes):             # <<<<<<<<<<<<<<
+ *             type_code = 'Z'
+ *         else:
+ */
+    __pyx_t_1 = PyBytes_Check(__pyx_v_value); 
+    __pyx_t_2 = (__pyx_t_1 != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":1963
+ *             type_code = 'Z'
+ *         elif isinstance(value, bytes):
+ *             type_code = 'Z'             # <<<<<<<<<<<<<<
+ *         else:
+ *             return 0
+ */
+      __pyx_v_type_code = 'Z';
+      goto __pyx_L4;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":1965
+ *             type_code = 'Z'
+ *         else:
+ *             return 0             # <<<<<<<<<<<<<<
+ *     else:
+ *         if value_type not in 'Zidf':
+ */
+      __pyx_r = 0;
+      goto __pyx_L0;
+    }
+    __pyx_L4:;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":1967
+ *             return 0
+ *     else:
+ *         if value_type not in 'Zidf':             # <<<<<<<<<<<<<<
+ *             return 0
+ *         value_type = _forceBytes( value_type )
+ */
+    __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_value_type, __pyx_n_s_Zidf, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/csamfile.pyx":1968
+ *     else:
+ *         if value_type not in 'Zidf':
+ *             return 0             # <<<<<<<<<<<<<<
+ *         value_type = _forceBytes( value_type )
+ *         _char_type = value_type
+ */
+      __pyx_r = 0;
+      goto __pyx_L0;
+    }
+
+    /* "pysam/csamfile.pyx":1969
+ *         if value_type not in 'Zidf':
+ *             return 0
+ *         value_type = _forceBytes( value_type )             # <<<<<<<<<<<<<<
+ *         _char_type = value_type
+ *         type_code = (<uint8_t*>_char_type)[0]
+ */
+    __pyx_t_3 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_value_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF_SET(__pyx_v_value_type, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "pysam/csamfile.pyx":1970
+ *             return 0
+ *         value_type = _forceBytes( value_type )
+ *         _char_type = value_type             # <<<<<<<<<<<<<<
+ *         type_code = (<uint8_t*>_char_type)[0]
+ * 
+ */
+    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_value_type); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v__char_type = __pyx_t_4;
+
+    /* "pysam/csamfile.pyx":1971
+ *         value_type = _forceBytes( value_type )
+ *         _char_type = value_type
+ *         type_code = (<uint8_t*>_char_type)[0]             # <<<<<<<<<<<<<<
+ * 
+ *     return type_code
+ */
+    __pyx_v_type_code = (((uint8_t *)__pyx_v__char_type)[0]);
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1973
+ *         type_code = (<uint8_t*>_char_type)[0]
+ * 
+ *     return type_code             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline convert_python_tag(pytag, value, fmts, args):
+ */
+  __pyx_r = __pyx_v_type_code;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":1948
+ *     return qual
+ * 
+ * cdef inline uint8_t get_type_code(value, value_type = None):             # <<<<<<<<<<<<<<
+ *     '''guess type code for a *value*. If *value_type* is None,
+ *     the type code will be inferred based on the Python type of
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_WriteUnraisable("pysam.csamfile.get_type_code", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_value_type);
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":1975
+ *     return type_code
+ * 
+ * cdef inline convert_python_tag(pytag, value, fmts, args):             # <<<<<<<<<<<<<<
+ * 
+ *     if not type(pytag) is bytes:
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_8csamfile_convert_python_tag(PyObject *__pyx_v_pytag, PyObject *__pyx_v_value, PyObject *__pyx_v_fmts, PyObject *__pyx_v_args) {
+  PyObject *__pyx_v_t = NULL;
+  PyObject *__pyx_v_pytype = NULL;
+  PyObject *__pyx_v_datafmt = NULL;
+  PyObject *__pyx_v_datatype = NULL;
+  PyObject *__pyx_v_mi = NULL;
+  PyObject *__pyx_v_ma = NULL;
+  PyObject *__pyx_v_absmax = NULL;
+  PyObject *__pyx_v_fmt = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  Py_ssize_t __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("convert_python_tag", 0);
+  __Pyx_TraceCall("convert_python_tag", __pyx_f[0], 1975);
+  __Pyx_INCREF(__pyx_v_pytag);
+  __Pyx_INCREF(__pyx_v_value);
+
+  /* "pysam/csamfile.pyx":1977
+ * cdef inline convert_python_tag(pytag, value, fmts, args):
+ * 
+ *     if not type(pytag) is bytes:             # <<<<<<<<<<<<<<
+ *         pytag = pytag.encode('ascii')
+ *     t = type(value)
+ */
+  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_pytag)) != ((PyObject *)((PyObject*)(&PyBytes_Type))));
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":1978
+ * 
+ *     if not type(pytag) is bytes:
+ *         pytag = pytag.encode('ascii')             # <<<<<<<<<<<<<<
+ *     t = type(value)
+ * 
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytag, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF_SET(__pyx_v_pytag, __pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":1979
+ *     if not type(pytag) is bytes:
+ *         pytag = pytag.encode('ascii')
+ *     t = type(value)             # <<<<<<<<<<<<<<
+ * 
+ *     if t is tuple or t is list:
+ */
+  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
+  __pyx_v_t = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_value)));
+
+  /* "pysam/csamfile.pyx":1981
+ *     t = type(value)
+ * 
+ *     if t is tuple or t is list:             # <<<<<<<<<<<<<<
+ *         # binary tags - treat separately
+ *         pytype = 'B'
+ */
+  __pyx_t_2 = (__pyx_v_t == ((PyObject*)(&PyTuple_Type)));
+  if (!(__pyx_t_2 != 0)) {
+    __pyx_t_1 = (__pyx_v_t == ((PyObject*)(&PyList_Type)));
+    __pyx_t_5 = (__pyx_t_1 != 0);
+  } else {
+    __pyx_t_5 = (__pyx_t_2 != 0);
+  }
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":1983
+ *     if t is tuple or t is list:
+ *         # binary tags - treat separately
+ *         pytype = 'B'             # <<<<<<<<<<<<<<
+ *         # get data type - first value determines type
+ *         if type(value[0]) is float:
+ */
+    __Pyx_INCREF(__pyx_n_s_B);
+    __pyx_v_pytype = __pyx_n_s_B;
+
+    /* "pysam/csamfile.pyx":1985
+ *         pytype = 'B'
+ *         # get data type - first value determines type
+ *         if type(value[0]) is float:             # <<<<<<<<<<<<<<
+ *             datafmt, datatype = "f", "f"
+ *         else:
+ */
+    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_t_4)) == ((PyObject *)((PyObject*)(&PyFloat_Type))));
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_2 = (__pyx_t_5 != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":1986
+ *         # get data type - first value determines type
+ *         if type(value[0]) is float:
+ *             datafmt, datatype = "f", "f"             # <<<<<<<<<<<<<<
+ *         else:
+ *             mi, ma = min(value), max(value)
+ */
+      __pyx_t_4 = __pyx_n_s_f;
+      __Pyx_INCREF(__pyx_t_4);
+      __pyx_t_3 = __pyx_n_s_f;
+      __Pyx_INCREF(__pyx_t_3);
+      __pyx_v_datafmt = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_v_datatype = __pyx_t_3;
+      __pyx_t_3 = 0;
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":1988
+ *             datafmt, datatype = "f", "f"
+ *         else:
+ *             mi, ma = min(value), max(value)             # <<<<<<<<<<<<<<
+ *             absmax = max( abs(mi), abs(ma) )
+ *             # signed ints
+ */
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __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 = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_mi = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_v_ma = __pyx_t_6;
+      __pyx_t_6 = 0;
+
+      /* "pysam/csamfile.pyx":1989
+ *         else:
+ *             mi, ma = min(value), max(value)
+ *             absmax = max( abs(mi), abs(ma) )             # <<<<<<<<<<<<<<
+ *             # signed ints
+ *             if mi < 0:
+ */
+      __pyx_t_6 = PyNumber_Absolute(__pyx_v_ma); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_4 = PyNumber_Absolute(__pyx_v_mi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      if (__pyx_t_2) {
+        __Pyx_INCREF(__pyx_t_6);
+        __pyx_t_3 = __pyx_t_6;
+      } else {
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_t_3 = __pyx_t_4;
+      }
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = __pyx_t_3;
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_absmax = __pyx_t_6;
+      __pyx_t_6 = 0;
+
+      /* "pysam/csamfile.pyx":1991
+ *             absmax = max( abs(mi), abs(ma) )
+ *             # signed ints
+ *             if mi < 0:             # <<<<<<<<<<<<<<
+ *                 if mi >= -127: datafmt, datatype = "b", 'c'
+ *                 elif mi >= -32767: datafmt, datatype = "h", 's'
+ */
+      __pyx_t_6 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (__pyx_t_2) {
+
+        /* "pysam/csamfile.pyx":1992
+ *             # signed ints
+ *             if mi < 0:
+ *                 if mi >= -127: datafmt, datatype = "b", 'c'             # <<<<<<<<<<<<<<
+ *                 elif mi >= -32767: datafmt, datatype = "h", 's'
+ *                 elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ */
+        __pyx_t_6 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_6 = __pyx_n_s_b;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_t_3 = __pyx_n_s_c;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_v_datafmt = __pyx_t_6;
+          __pyx_t_6 = 0;
+          __pyx_v_datatype = __pyx_t_3;
+          __pyx_t_3 = 0;
+          goto __pyx_L7;
+        }
+
+        /* "pysam/csamfile.pyx":1993
+ *             if mi < 0:
+ *                 if mi >= -127: datafmt, datatype = "b", 'c'
+ *                 elif mi >= -32767: datafmt, datatype = "h", 's'             # <<<<<<<<<<<<<<
+ *                 elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                 else: datafmt, datatype = "i", 'i'
+ */
+        __pyx_t_3 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __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 = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_3 = __pyx_n_s_h;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_t_6 = __pyx_n_s_s_2;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_v_datafmt = __pyx_t_3;
+          __pyx_t_3 = 0;
+          __pyx_v_datatype = __pyx_t_6;
+          __pyx_t_6 = 0;
+          goto __pyx_L7;
+        }
+
+        /* "pysam/csamfile.pyx":1994
+ *                 if mi >= -127: datafmt, datatype = "b", 'c'
+ *                 elif mi >= -32767: datafmt, datatype = "h", 's'
+ *                 elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
+ *                 else: datafmt, datatype = "i", 'i'
+ * 
+ */
+        __pyx_t_6 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_v_value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+          __Pyx_GIVEREF(__pyx_t_6);
+          __pyx_t_6 = 0;
+          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        /*else*/ {
+
+          /* "pysam/csamfile.pyx":1995
+ *                 elif mi >= -32767: datafmt, datatype = "h", 's'
+ *                 elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                 else: datafmt, datatype = "i", 'i'             # <<<<<<<<<<<<<<
+ * 
+ *             # unsigned ints
+ */
+          __pyx_t_6 = __pyx_n_s_i;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_t_3 = __pyx_n_s_i;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_v_datafmt = __pyx_t_6;
+          __pyx_t_6 = 0;
+          __pyx_v_datatype = __pyx_t_3;
+          __pyx_t_3 = 0;
+        }
+        __pyx_L7:;
+        goto __pyx_L6;
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":1999
+ *             # unsigned ints
+ *             else:
+ *                 if absmax <= 255: datafmt, datatype = "B", 'C'             # <<<<<<<<<<<<<<
+ *                 elif absmax <= 65535: datafmt, datatype = "H", 'S'
+ *                 elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ */
+        __pyx_t_3 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __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 = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_3 = __pyx_n_s_B;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_t_6 = __pyx_n_s_C;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_v_datafmt = __pyx_t_3;
+          __pyx_t_3 = 0;
+          __pyx_v_datatype = __pyx_t_6;
+          __pyx_t_6 = 0;
+          goto __pyx_L8;
+        }
+
+        /* "pysam/csamfile.pyx":2000
+ *             else:
+ *                 if absmax <= 255: datafmt, datatype = "B", 'C'
+ *                 elif absmax <= 65535: datafmt, datatype = "H", 'S'             # <<<<<<<<<<<<<<
+ *                 elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                 else: datafmt, datatype = "I", 'I'
+ */
+        __pyx_t_6 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_6 = __pyx_n_s_H;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_t_3 = __pyx_n_s_S;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_v_datafmt = __pyx_t_6;
+          __pyx_t_6 = 0;
+          __pyx_v_datatype = __pyx_t_3;
+          __pyx_t_3 = 0;
+          goto __pyx_L8;
+        }
+
+        /* "pysam/csamfile.pyx":2001
+ *                 if absmax <= 255: datafmt, datatype = "B", 'C'
+ *                 elif absmax <= 65535: datafmt, datatype = "H", 'S'
+ *                 elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
+ *                 else: datafmt, datatype = "I", 'I'
+ * 
+ */
+        __pyx_t_3 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __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 = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __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 = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        /*else*/ {
+
+          /* "pysam/csamfile.pyx":2002
+ *                 elif absmax <= 65535: datafmt, datatype = "H", 'S'
+ *                 elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                 else: datafmt, datatype = "I", 'I'             # <<<<<<<<<<<<<<
+ * 
+ *         datafmt = "2sccI%i%s" % (len(value), datafmt)
+ */
+          __pyx_t_3 = __pyx_n_s_I;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_t_6 = __pyx_n_s_I;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_v_datafmt = __pyx_t_3;
+          __pyx_t_3 = 0;
+          __pyx_v_datatype = __pyx_t_6;
+          __pyx_t_6 = 0;
+        }
+        __pyx_L8:;
+      }
+      __pyx_L6:;
+    }
+    __pyx_L5:;
+
+    /* "pysam/csamfile.pyx":2004
+ *                 else: datafmt, datatype = "I", 'I'
+ * 
+ *         datafmt = "2sccI%i%s" % (len(value), datafmt)             # <<<<<<<<<<<<<<
+ *         args.extend( [pytag[:2],
+ *                       pytype.encode('ascii'),
+ */
+    __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_v_datafmt);
+    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_datafmt);
+    __Pyx_GIVEREF(__pyx_v_datafmt);
+    __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_2sccI_i_s, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF_SET(__pyx_v_datafmt, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "pysam/csamfile.pyx":2005
+ * 
+ *         datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *         args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                       pytype.encode('ascii'),
+ *                       datatype.encode('ascii'),
+ */
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_extend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_pytag, 0, 2, NULL, NULL, &__pyx_slice__61, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+
+    /* "pysam/csamfile.pyx":2006
+ *         datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *         args.extend( [pytag[:2],
+ *                       pytype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                       datatype.encode('ascii'),
+ *                       len(value)] + list(value) )
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":2007
+ *         args.extend( [pytag[:2],
+ *                       pytype.encode('ascii'),
+ *                       datatype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                       len(value)] + list(value) )
+ *         fmts.append( datafmt )
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":2008
+ *                       pytype.encode('ascii'),
+ *                       datatype.encode('ascii'),
+ *                       len(value)] + list(value) )             # <<<<<<<<<<<<<<
+ *         fmts.append( datafmt )
+ *         return
+ */
+    __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __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 = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+
+    /* "pysam/csamfile.pyx":2005
+ * 
+ *         datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *         args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                       pytype.encode('ascii'),
+ *                       datatype.encode('ascii'),
+ */
+    __pyx_t_10 = PyList_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_3 = 0;
+    __pyx_t_7 = 0;
+    __pyx_t_9 = 0;
+    __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":2008
+ *                       pytype.encode('ascii'),
+ *                       datatype.encode('ascii'),
+ *                       len(value)] + list(value) )             # <<<<<<<<<<<<<<
+ *         fmts.append( datafmt )
+ *         return
+ */
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
+    __Pyx_GIVEREF(__pyx_v_value);
+    __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+    /* "pysam/csamfile.pyx":2005
+ * 
+ *         datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *         args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                       pytype.encode('ascii'),
+ *                       datatype.encode('ascii'),
+ */
+    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __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_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":2009
+ *                       datatype.encode('ascii'),
+ *                       len(value)] + list(value) )
+ *         fmts.append( datafmt )             # <<<<<<<<<<<<<<
+ *         return
+ * 
+ */
+    __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_fmts, __pyx_v_datafmt); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":2010
+ *                       len(value)] + list(value) )
+ *         fmts.append( datafmt )
+ *         return             # <<<<<<<<<<<<<<
+ * 
+ *     if t is float:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2012
+ *         return
+ * 
+ *     if t is float:             # <<<<<<<<<<<<<<
+ *         fmt, pytype = "2scf", 'f'
+ *     elif t is int:
+ */
+  __pyx_t_2 = (__pyx_v_t == ((PyObject*)(&PyFloat_Type)));
+  __pyx_t_5 = (__pyx_t_2 != 0);
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":2013
+ * 
+ *     if t is float:
+ *         fmt, pytype = "2scf", 'f'             # <<<<<<<<<<<<<<
+ *     elif t is int:
+ *         # negative values
+ */
+    __pyx_t_4 = __pyx_kp_s_2scf;
+    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_9 = __pyx_n_s_f;
+    __Pyx_INCREF(__pyx_t_9);
+    __pyx_v_fmt = __pyx_t_4;
+    __pyx_t_4 = 0;
+    __pyx_v_pytype = __pyx_t_9;
+    __pyx_t_9 = 0;
+    goto __pyx_L9;
+  }
+
+  /* "pysam/csamfile.pyx":2014
+ *     if t is float:
+ *         fmt, pytype = "2scf", 'f'
+ *     elif t is int:             # <<<<<<<<<<<<<<
+ *         # negative values
+ *         if value < 0:
+ */
+  __pyx_t_5 = (__pyx_v_t == ((PyObject*)(&PyInt_Type)));
+  __pyx_t_2 = (__pyx_t_5 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":2016
+ *     elif t is int:
+ *         # negative values
+ *         if value < 0:             # <<<<<<<<<<<<<<
+ *             if value >= -127: fmt, pytype = "2scb", 'c'
+ *             elif value >= -32767: fmt, pytype = "2sch", 's'
+ */
+    __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":2017
+ *         # negative values
+ *         if value < 0:
+ *             if value >= -127: fmt, pytype = "2scb", 'c'             # <<<<<<<<<<<<<<
+ *             elif value >= -32767: fmt, pytype = "2sch", 's'
+ *             elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ */
+      __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_9 = __pyx_kp_s_2scb;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_t_4 = __pyx_n_s_c;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_v_fmt = __pyx_t_9;
+        __pyx_t_9 = 0;
+        __pyx_v_pytype = __pyx_t_4;
+        __pyx_t_4 = 0;
+        goto __pyx_L11;
+      }
+
+      /* "pysam/csamfile.pyx":2018
+ *         if value < 0:
+ *             if value >= -127: fmt, pytype = "2scb", 'c'
+ *             elif value >= -32767: fmt, pytype = "2sch", 's'             # <<<<<<<<<<<<<<
+ *             elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *             else: fmt, pytype = "2sci", 'i'
+ */
+      __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_4 = __pyx_kp_s_2sch;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_t_9 = __pyx_n_s_s_2;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_v_fmt = __pyx_t_4;
+        __pyx_t_4 = 0;
+        __pyx_v_pytype = __pyx_t_9;
+        __pyx_t_9 = 0;
+        goto __pyx_L11;
+      }
+
+      /* "pysam/csamfile.pyx":2019
+ *             if value >= -127: fmt, pytype = "2scb", 'c'
+ *             elif value >= -32767: fmt, pytype = "2sch", 's'
+ *             elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
+ *             else: fmt, pytype = "2sci", 'i'
+ *         # positive values
+ */
+      __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_v_value); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
+        __Pyx_GIVEREF(__pyx_t_9);
+        __pyx_t_9 = 0;
+        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":2020
+ *             elif value >= -32767: fmt, pytype = "2sch", 's'
+ *             elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *             else: fmt, pytype = "2sci", 'i'             # <<<<<<<<<<<<<<
+ *         # positive values
+ *         else:
+ */
+        __pyx_t_9 = __pyx_kp_s_2sci;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_t_4 = __pyx_n_s_i;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_v_fmt = __pyx_t_9;
+        __pyx_t_9 = 0;
+        __pyx_v_pytype = __pyx_t_4;
+        __pyx_t_4 = 0;
+      }
+      __pyx_L11:;
+      goto __pyx_L10;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":2023
+ *         # positive values
+ *         else:
+ *             if value <= 255: fmt, pytype = "2scB", 'C'             # <<<<<<<<<<<<<<
+ *             elif value <= 65535: fmt, pytype = "2scH", 'S'
+ *             elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ */
+      __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_4 = __pyx_kp_s_2scB;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_t_9 = __pyx_n_s_C;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_v_fmt = __pyx_t_4;
+        __pyx_t_4 = 0;
+        __pyx_v_pytype = __pyx_t_9;
+        __pyx_t_9 = 0;
+        goto __pyx_L12;
+      }
+
+      /* "pysam/csamfile.pyx":2024
+ *         else:
+ *             if value <= 255: fmt, pytype = "2scB", 'C'
+ *             elif value <= 65535: fmt, pytype = "2scH", 'S'             # <<<<<<<<<<<<<<
+ *             elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *             else: fmt, pytype = "2scI", 'I'
+ */
+      __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_9 = __pyx_kp_s_2scH;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_t_4 = __pyx_n_s_S;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_v_fmt = __pyx_t_9;
+        __pyx_t_9 = 0;
+        __pyx_v_pytype = __pyx_t_4;
+        __pyx_t_4 = 0;
+        goto __pyx_L12;
+      }
+
+      /* "pysam/csamfile.pyx":2025
+ *             if value <= 255: fmt, pytype = "2scB", 'C'
+ *             elif value <= 65535: fmt, pytype = "2scH", 'S'
+ *             elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
+ *             else: fmt, pytype = "2scI", 'I'
+ *     else:
+ */
+      __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
+        __Pyx_GIVEREF(__pyx_t_4);
+        __pyx_t_4 = 0;
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":2026
+ *             elif value <= 65535: fmt, pytype = "2scH", 'S'
+ *             elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *             else: fmt, pytype = "2scI", 'I'             # <<<<<<<<<<<<<<
+ *     else:
+ *         # Note: hex strings (H) are not supported yet
+ */
+        __pyx_t_4 = __pyx_kp_s_2scI;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_t_9 = __pyx_n_s_I;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_v_fmt = __pyx_t_4;
+        __pyx_t_4 = 0;
+        __pyx_v_pytype = __pyx_t_9;
+        __pyx_t_9 = 0;
+      }
+      __pyx_L12:;
+    }
+    __pyx_L10:;
+    goto __pyx_L9;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":2029
+ *     else:
+ *         # Note: hex strings (H) are not supported yet
+ *         if t is not bytes:             # <<<<<<<<<<<<<<
+ *             value = value.encode('ascii')
+ *         if len(value) == 1:
+ */
+    __pyx_t_2 = (__pyx_v_t != ((PyObject*)(&PyBytes_Type)));
+    __pyx_t_5 = (__pyx_t_2 != 0);
+    if (__pyx_t_5) {
+
+      /* "pysam/csamfile.pyx":2030
+ *         # Note: hex strings (H) are not supported yet
+ *         if t is not bytes:
+ *             value = value.encode('ascii')             # <<<<<<<<<<<<<<
+ *         if len(value) == 1:
+ *             fmt, pytype = "2scc", 'A'
+ */
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
+      __pyx_t_4 = 0;
+      goto __pyx_L13;
+    }
+    __pyx_L13:;
+
+    /* "pysam/csamfile.pyx":2031
+ *         if t is not bytes:
+ *             value = value.encode('ascii')
+ *         if len(value) == 1:             # <<<<<<<<<<<<<<
+ *             fmt, pytype = "2scc", 'A'
+ *         else:
+ */
+    __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = ((__pyx_t_8 == 1) != 0);
+    if (__pyx_t_5) {
+
+      /* "pysam/csamfile.pyx":2032
+ *             value = value.encode('ascii')
+ *         if len(value) == 1:
+ *             fmt, pytype = "2scc", 'A'             # <<<<<<<<<<<<<<
+ *         else:
+ *             fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+ */
+      __pyx_t_4 = __pyx_kp_s_2scc;
+      __Pyx_INCREF(__pyx_t_4);
+      __pyx_t_9 = __pyx_n_s_A;
+      __Pyx_INCREF(__pyx_t_9);
+      __pyx_v_fmt = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_v_pytype = __pyx_t_9;
+      __pyx_t_9 = 0;
+      goto __pyx_L14;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":2034
+ *             fmt, pytype = "2scc", 'A'
+ *         else:
+ *             fmt, pytype = "2sc%is" % (len(value)+1), 'Z'             # <<<<<<<<<<<<<<
+ * 
+ *     args.extend( [pytag[:2],
+ */
+      __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyInt_FromSsize_t((__pyx_t_8 + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_2sc_is, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = __pyx_n_s_Z;
+      __Pyx_INCREF(__pyx_t_9);
+      __pyx_v_fmt = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_v_pytype = __pyx_t_9;
+      __pyx_t_9 = 0;
+    }
+    __pyx_L14:;
+  }
+  __pyx_L9:;
+
+  /* "pysam/csamfile.pyx":2036
+ *             fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+ * 
+ *     args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                   pytype.encode('ascii'),
+ *                   value ] )
+ */
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_extend); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_pytag, 0, 2, NULL, NULL, &__pyx_slice__65, 0, 1, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+
+  /* "pysam/csamfile.pyx":2037
+ * 
+ *     args.extend( [pytag[:2],
+ *                   pytype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                   value ] )
+ * 
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "pysam/csamfile.pyx":2036
+ *             fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+ * 
+ *     args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                   pytype.encode('ascii'),
+ *                   value ] )
+ */
+  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_10);
+  __Pyx_GIVEREF(__pyx_t_10);
+  __Pyx_INCREF(__pyx_v_value);
+  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __pyx_t_4 = 0;
+  __pyx_t_10 = 0;
+  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __pyx_t_6 = 0;
+  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "pysam/csamfile.pyx":2040
+ *                   value ] )
+ * 
+ *     fmts.append( fmt )             # <<<<<<<<<<<<<<
+ * 
+ * ###########################################################
+ */
+  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_fmts, __pyx_v_fmt); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":1975
+ *     return type_code
+ * 
+ * cdef inline convert_python_tag(pytag, value, fmts, args):             # <<<<<<<<<<<<<<
+ * 
+ *     if not type(pytag) is bytes:
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("pysam.csamfile.convert_python_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_t);
+  __Pyx_XDECREF(__pyx_v_pytype);
+  __Pyx_XDECREF(__pyx_v_datafmt);
+  __Pyx_XDECREF(__pyx_v_datatype);
+  __Pyx_XDECREF(__pyx_v_mi);
+  __Pyx_XDECREF(__pyx_v_ma);
+  __Pyx_XDECREF(__pyx_v_absmax);
+  __Pyx_XDECREF(__pyx_v_fmt);
+  __Pyx_XDECREF(__pyx_v_pytag);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2074
+ * 
+ *     # Now only called when instances are created from Python
+ *     def __init__(self):             # <<<<<<<<<<<<<<
+ *         # see bam_init1
+ *         self._delegate = <bam1_t*>calloc( 1, sizeof( bam1_t) )
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead___init__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead___init__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 2074);
+
+  /* "pysam/csamfile.pyx":2076
+ *     def __init__(self):
+ *         # see bam_init1
+ *         self._delegate = <bam1_t*>calloc( 1, sizeof( bam1_t) )             # <<<<<<<<<<<<<<
+ *         # allocate some memory
+ *         # If size is 0, calloc does not return a pointer that can be passed to free()
+ */
+  __pyx_v_self->_delegate = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
+
+  /* "pysam/csamfile.pyx":2080
+ *         # If size is 0, calloc does not return a pointer that can be passed to free()
+ *         # so allocate 40 bytes for a new read
+ *         self._delegate.m_data = 40             # <<<<<<<<<<<<<<
+ *         self._delegate.data = <uint8_t *>calloc(
+ *             self._delegate.m_data, 1)
+ */
+  __pyx_v_self->_delegate->m_data = 40;
+
+  /* "pysam/csamfile.pyx":2081
+ *         # so allocate 40 bytes for a new read
+ *         self._delegate.m_data = 40
+ *         self._delegate.data = <uint8_t *>calloc(             # <<<<<<<<<<<<<<
+ *             self._delegate.m_data, 1)
+ *         self._delegate.l_data = 0
+ */
+  __pyx_v_self->_delegate->data = ((uint8_t *)calloc(__pyx_v_self->_delegate->m_data, 1));
+
+  /* "pysam/csamfile.pyx":2083
+ *         self._delegate.data = <uint8_t *>calloc(
+ *             self._delegate.m_data, 1)
+ *         self._delegate.l_data = 0             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__(self):
+ */
+  __pyx_v_self->_delegate->l_data = 0;
+
+  /* "pysam/csamfile.pyx":2074
+ * 
+ *     # Now only called when instances are created from Python
+ *     def __init__(self):             # <<<<<<<<<<<<<<
+ *         # see bam_init1
+ *         self._delegate = <bam1_t*>calloc( 1, sizeof( bam1_t) )
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2085
+ *         self._delegate.l_data = 0
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         bam_destroy1(self._delegate)
+ * 
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_8csamfile_11AlignedRead_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_8csamfile_11AlignedRead_3__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_8csamfile_11AlignedRead_2__dealloc__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_8csamfile_11AlignedRead_2__dealloc__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2085);
+
+  /* "pysam/csamfile.pyx":2086
+ * 
+ *     def __dealloc__(self):
+ *         bam_destroy1(self._delegate)             # <<<<<<<<<<<<<<
+ * 
+ *     def __str__(self):
+ */
+  bam_destroy1(__pyx_v_self->_delegate);
+
+  /* "pysam/csamfile.pyx":2085
+ *         self._delegate.l_data = 0
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         bam_destroy1(self._delegate)
+ * 
+ */
+
+  /* function exit code */
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/csamfile.pyx":2088
+ *         bam_destroy1(self._delegate)
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         """return string representation of alignment.
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5__str__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_11AlignedRead_4__str__[] = "return string representation of alignment.\n\n        The representation is an approximate :term:`sam` format.\n\n        An aligned read might not be associated with a :term:`Samfile`.\n        As a result :term:`tid` is shown instead of the reference name.\n\n        Similarly, the tags field is returned in its parsed state.\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_8csamfile_11AlignedRead_4__str__;
+#endif
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5__str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4__str__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4__str__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_v_seq = NULL;
+  PyObject *__pyx_v_qual = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__str__", 0);
+  __Pyx_TraceCall("__str__", __pyx_f[0], 2088);
+
+  /* "pysam/csamfile.pyx":2100
+ *         # sam-parsing is done in sam.c/bam_format1_core which
+ *         # requires a valid header.
+ *         if sys.version_info[0] < 3:             # <<<<<<<<<<<<<<
+ *             seq = self.seq
+ *             qual = self.qual
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2100; __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 = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":2101
+ *         # requires a valid header.
+ *         if sys.version_info[0] < 3:
+ *             seq = self.seq             # <<<<<<<<<<<<<<
+ *             qual = self.qual
+ *         else:
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_v_seq = __pyx_t_2;
+    __pyx_t_2 = 0;
+
+    /* "pysam/csamfile.pyx":2102
+ *         if sys.version_info[0] < 3:
+ *             seq = self.seq
+ *             qual = self.qual             # <<<<<<<<<<<<<<
+ *         else:
+ *             seq = self.seq.decode('ascii')
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_v_qual = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":2104
+ *             qual = self.qual
+ *         else:
+ *             seq = self.seq.decode('ascii')             # <<<<<<<<<<<<<<
+ *             qual = self.qual.decode('ascii')
+ *         return "\t".join(map(str, (self.qname,
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_seq = __pyx_t_2;
+    __pyx_t_2 = 0;
+
+    /* "pysam/csamfile.pyx":2105
+ *         else:
+ *             seq = self.seq.decode('ascii')
+ *             qual = self.qual.decode('ascii')             # <<<<<<<<<<<<<<
+ *         return "\t".join(map(str, (self.qname,
+ *                                    self.flag,
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_qual = __pyx_t_2;
+    __pyx_t_2 = 0;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":2106
+ *             seq = self.seq.decode('ascii')
+ *             qual = self.qual.decode('ascii')
+ *         return "\t".join(map(str, (self.qname,             # <<<<<<<<<<<<<<
+ *                                    self.flag,
+ *                                    self.rname,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+
+  /* "pysam/csamfile.pyx":2107
+ *             qual = self.qual.decode('ascii')
+ *         return "\t".join(map(str, (self.qname,
+ *                                    self.flag,             # <<<<<<<<<<<<<<
+ *                                    self.rname,
+ *                                    self.pos,
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "pysam/csamfile.pyx":2108
+ *         return "\t".join(map(str, (self.qname,
+ *                                    self.flag,
+ *                                    self.rname,             # <<<<<<<<<<<<<<
+ *                                    self.pos,
+ *                                    self.mapq,
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+
+  /* "pysam/csamfile.pyx":2109
+ *                                    self.flag,
+ *                                    self.rname,
+ *                                    self.pos,             # <<<<<<<<<<<<<<
+ *                                    self.mapq,
+ *                                    self.cigar,
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+
+  /* "pysam/csamfile.pyx":2110
+ *                                    self.rname,
+ *                                    self.pos,
+ *                                    self.mapq,             # <<<<<<<<<<<<<<
+ *                                    self.cigar,
+ *                                    self.mrnm,
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mapq); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+
+  /* "pysam/csamfile.pyx":2111
+ *                                    self.pos,
+ *                                    self.mapq,
+ *                                    self.cigar,             # <<<<<<<<<<<<<<
+ *                                    self.mrnm,
+ *                                    self.mpos,
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cigar); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+
+  /* "pysam/csamfile.pyx":2112
+ *                                    self.mapq,
+ *                                    self.cigar,
+ *                                    self.mrnm,             # <<<<<<<<<<<<<<
+ *                                    self.mpos,
+ *                                    self.rlen,
+ */
+  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mrnm); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+
+  /* "pysam/csamfile.pyx":2113
+ *                                    self.cigar,
+ *                                    self.mrnm,
+ *                                    self.mpos,             # <<<<<<<<<<<<<<
+ *                                    self.rlen,
+ *                                    seq,
+ */
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mpos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+
+  /* "pysam/csamfile.pyx":2114
+ *                                    self.mrnm,
+ *                                    self.mpos,
+ *                                    self.rlen,             # <<<<<<<<<<<<<<
+ *                                    seq,
+ *                                    qual,
+ */
+  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rlen); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+
+  /* "pysam/csamfile.pyx":2117
+ *                                    seq,
+ *                                    qual,
+ *                                    self.tags )))             # <<<<<<<<<<<<<<
+ * 
+ *     def compare(self, AlignedRead other):
+ */
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tags); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+
+  /* "pysam/csamfile.pyx":2106
+ *             seq = self.seq.decode('ascii')
+ *             qual = self.qual.decode('ascii')
+ *         return "\t".join(map(str, (self.qname,             # <<<<<<<<<<<<<<
+ *                                    self.flag,
+ *                                    self.rname,
+ */
+  __pyx_t_12 = PyTuple_New(12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  PyTuple_SET_ITEM(__pyx_t_12, 0, __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, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_12, 5, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  PyTuple_SET_ITEM(__pyx_t_12, 6, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
+  PyTuple_SET_ITEM(__pyx_t_12, 7, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  PyTuple_SET_ITEM(__pyx_t_12, 8, __pyx_t_10);
+  __Pyx_GIVEREF(__pyx_t_10);
+  __Pyx_INCREF(__pyx_v_seq);
+  PyTuple_SET_ITEM(__pyx_t_12, 9, __pyx_v_seq);
+  __Pyx_GIVEREF(__pyx_v_seq);
+  __Pyx_INCREF(__pyx_v_qual);
+  PyTuple_SET_ITEM(__pyx_t_12, 10, __pyx_v_qual);
+  __Pyx_GIVEREF(__pyx_v_qual);
+  PyTuple_SET_ITEM(__pyx_t_12, 11, __pyx_t_11);
+  __Pyx_GIVEREF(__pyx_t_11);
+  __pyx_t_2 = 0;
+  __pyx_t_1 = 0;
+  __pyx_t_4 = 0;
+  __pyx_t_5 = 0;
+  __pyx_t_6 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_8 = 0;
+  __pyx_t_9 = 0;
+  __pyx_t_10 = 0;
+  __pyx_t_11 = 0;
+  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12);
+  __Pyx_GIVEREF(__pyx_t_12);
+  __pyx_t_12 = 0;
+  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  __pyx_t_11 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+  __pyx_r = __pyx_t_11;
+  __pyx_t_11 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2088
+ *         bam_destroy1(self._delegate)
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         """return string representation of alignment.
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_seq);
+  __Pyx_XDECREF(__pyx_v_qual);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2119
+ *                                    self.tags )))
+ * 
+ *     def compare(self, AlignedRead other):             # <<<<<<<<<<<<<<
+ *         '''return -1,0,1, if contents in this are binary <,=,> to *other*'''
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_7compare(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_11AlignedRead_6compare[] = "AlignedRead.compare(self, AlignedRead other)\nreturn -1,0,1, if contents in this are binary <,=,> to *other*";
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_7compare(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+  CYTHON_UNUSED int __pyx_lineno = 0;
+  CYTHON_UNUSED const char *__pyx_filename = NULL;
+  CYTHON_UNUSED int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_8csamfile_AlignedRead, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_6compare(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_other));
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_6compare(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_other) {
+  int __pyx_v_retval;
+  bam1_t *__pyx_v_t;
+  bam1_t *__pyx_v_o;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("compare", 0);
+  __Pyx_TraceCall("compare", __pyx_f[0], 2119);
+
+  /* "pysam/csamfile.pyx":2126
+ *         cdef bam1_t *o
+ * 
+ *         t = self._delegate             # <<<<<<<<<<<<<<
+ *         o = other._delegate
+ * 
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_t = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2127
+ * 
+ *         t = self._delegate
+ *         o = other._delegate             # <<<<<<<<<<<<<<
+ * 
+ *         # uncomment for debugging purposes
+ */
+  __pyx_t_1 = __pyx_v_other->_delegate;
+  __pyx_v_o = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2139
+ * 
+ *         # Fast-path test for object identity
+ *         if t == o:             # <<<<<<<<<<<<<<
+ *             return 0
+ * 
+ */
+  __pyx_t_2 = ((__pyx_v_t == __pyx_v_o) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":2140
+ *         # Fast-path test for object identity
+ *         if t == o:
+ *             return 0             # <<<<<<<<<<<<<<
+ * 
+ *         retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_int_0);
+    __pyx_r = __pyx_int_0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2142
+ *             return 0
+ * 
+ *         retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))             # <<<<<<<<<<<<<<
+ * 
+ *         if retval: return retval
+ */
+  __pyx_v_retval = memcmp((&__pyx_v_t->core), (&__pyx_v_o->core), (sizeof(bam1_core_t)));
+
+  /* "pysam/csamfile.pyx":2144
+ *         retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))
+ * 
+ *         if retval: return retval             # <<<<<<<<<<<<<<
+ *         retval = (t.l_data > o.l_data) - (t.l_data < o.l_data) # cmp(t.l_data, o.l_data)
+ *         if retval: return retval
+ */
+  __pyx_t_2 = (__pyx_v_retval != 0);
+  if (__pyx_t_2) {
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2145
+ * 
+ *         if retval: return retval
+ *         retval = (t.l_data > o.l_data) - (t.l_data < o.l_data) # cmp(t.l_data, o.l_data)             # <<<<<<<<<<<<<<
+ *         if retval: return retval
+ *         return memcmp(t.data, o.data, t.l_data)
+ */
+  __pyx_v_retval = ((__pyx_v_t->l_data > __pyx_v_o->l_data) - (__pyx_v_t->l_data < __pyx_v_o->l_data));
+
+  /* "pysam/csamfile.pyx":2146
+ *         if retval: return retval
+ *         retval = (t.l_data > o.l_data) - (t.l_data < o.l_data) # cmp(t.l_data, o.l_data)
+ *         if retval: return retval             # <<<<<<<<<<<<<<
+ *         return memcmp(t.data, o.data, t.l_data)
+ * 
+ */
+  __pyx_t_2 = (__pyx_v_retval != 0);
+  if (__pyx_t_2) {
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2147
+ *         retval = (t.l_data > o.l_data) - (t.l_data < o.l_data) # cmp(t.l_data, o.l_data)
+ *         if retval: return retval
+ *         return memcmp(t.data, o.data, t.l_data)             # <<<<<<<<<<<<<<
+ * 
+ *     # Disabled so long as __cmp__ is a special method
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = __Pyx_PyInt_From_int(memcmp(__pyx_v_t->data, __pyx_v_o->data, __pyx_v_t->l_data)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2119
+ *                                    self.tags )))
+ * 
+ *     def compare(self, AlignedRead other):             # <<<<<<<<<<<<<<
+ *         '''return -1,0,1, if contents in this are binary <,=,> to *other*'''
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2150
+ * 
+ *     # Disabled so long as __cmp__ is a special method
+ *     def __hash__(self):             # <<<<<<<<<<<<<<
+ *         return _Py_HashPointer(<void *>self)
+ * 
+ */
+
+/* Python wrapper */
+static Py_hash_t __pyx_pw_5pysam_8csamfile_11AlignedRead_9__hash__(PyObject *__pyx_v_self); /*proto*/
+static Py_hash_t __pyx_pw_5pysam_8csamfile_11AlignedRead_9__hash__(PyObject *__pyx_v_self) {
+  Py_hash_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_8__hash__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static Py_hash_t __pyx_pf_5pysam_8csamfile_11AlignedRead_8__hash__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  Py_hash_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__hash__", 0);
+  __Pyx_TraceCall("__hash__", __pyx_f[0], 2150);
+
+  /* "pysam/csamfile.pyx":2151
+ *     # Disabled so long as __cmp__ is a special method
+ *     def __hash__(self):
+ *         return _Py_HashPointer(<void *>self)             # <<<<<<<<<<<<<<
+ * 
+ *     def _convert_python_tag(self, pytag, value, fmts, args):
+ */
+  __pyx_r = _Py_HashPointer(((void *)__pyx_v_self));
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2150
+ * 
+ *     # Disabled so long as __cmp__ is a special method
+ *     def __hash__(self):             # <<<<<<<<<<<<<<
+ *         return _Py_HashPointer(<void *>self)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2153
+ *         return _Py_HashPointer(<void *>self)
+ * 
+ *     def _convert_python_tag(self, pytag, value, fmts, args):             # <<<<<<<<<<<<<<
+ * 
+ *         if not type(pytag) is bytes:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_11_convert_python_tag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_11AlignedRead_10_convert_python_tag[] = "AlignedRead._convert_python_tag(self, pytag, value, fmts, args)";
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_11_convert_python_tag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_pytag = 0;
+  PyObject *__pyx_v_value = 0;
+  PyObject *__pyx_v_fmts = 0;
+  PyObject *__pyx_v_args = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_convert_python_tag (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pytag,&__pyx_n_s_value,&__pyx_n_s_fmts,&__pyx_n_s_args,0};
+    PyObject* values[4] = {0,0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pytag)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_convert_python_tag", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmts)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_convert_python_tag", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  3:
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_convert_python_tag", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_convert_python_tag") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+    }
+    __pyx_v_pytag = values[0];
+    __pyx_v_value = values[1];
+    __pyx_v_fmts = values[2];
+    __pyx_v_args = values[3];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_convert_python_tag", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead._convert_python_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_10_convert_python_tag(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), __pyx_v_pytag, __pyx_v_value, __pyx_v_fmts, __pyx_v_args);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_10_convert_python_tag(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_pytag, PyObject *__pyx_v_value, PyObject *__pyx_v_fmts, PyObject *__pyx_v_args) {
+  PyObject *__pyx_v_t = NULL;
+  PyObject *__pyx_v_pytype = NULL;
+  PyObject *__pyx_v_datafmt = NULL;
+  PyObject *__pyx_v_datatype = NULL;
+  PyObject *__pyx_v_mi = NULL;
+  PyObject *__pyx_v_ma = NULL;
+  PyObject *__pyx_v_absmax = NULL;
+  PyObject *__pyx_v_fmt = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  Py_ssize_t __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_convert_python_tag", 0);
+  __Pyx_TraceCall("_convert_python_tag", __pyx_f[0], 2153);
+  __Pyx_INCREF(__pyx_v_pytag);
+  __Pyx_INCREF(__pyx_v_value);
+
+  /* "pysam/csamfile.pyx":2155
+ *     def _convert_python_tag(self, pytag, value, fmts, args):
+ * 
+ *         if not type(pytag) is bytes:             # <<<<<<<<<<<<<<
+ *             pytag = pytag.encode('ascii')
+ *         t = type(value)
+ */
+  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_pytag)) != ((PyObject *)((PyObject*)(&PyBytes_Type))));
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":2156
+ * 
+ *         if not type(pytag) is bytes:
+ *             pytag = pytag.encode('ascii')             # <<<<<<<<<<<<<<
+ *         t = type(value)
+ * 
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytag, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF_SET(__pyx_v_pytag, __pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":2157
+ *         if not type(pytag) is bytes:
+ *             pytag = pytag.encode('ascii')
+ *         t = type(value)             # <<<<<<<<<<<<<<
+ * 
+ *         if t is tuple or t is list:
+ */
+  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
+  __pyx_v_t = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_value)));
+
+  /* "pysam/csamfile.pyx":2159
+ *         t = type(value)
+ * 
+ *         if t is tuple or t is list:             # <<<<<<<<<<<<<<
+ *             # binary tags - treat separately
+ *             pytype = 'B'
+ */
+  __pyx_t_2 = (__pyx_v_t == ((PyObject*)(&PyTuple_Type)));
+  if (!(__pyx_t_2 != 0)) {
+    __pyx_t_1 = (__pyx_v_t == ((PyObject*)(&PyList_Type)));
+    __pyx_t_5 = (__pyx_t_1 != 0);
+  } else {
+    __pyx_t_5 = (__pyx_t_2 != 0);
+  }
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":2161
+ *         if t is tuple or t is list:
+ *             # binary tags - treat separately
+ *             pytype = 'B'             # <<<<<<<<<<<<<<
+ *             # get data type - first value determines type
+ *             if type(value[0]) is float:
+ */
+    __Pyx_INCREF(__pyx_n_s_B);
+    __pyx_v_pytype = __pyx_n_s_B;
+
+    /* "pysam/csamfile.pyx":2163
+ *             pytype = 'B'
+ *             # get data type - first value determines type
+ *             if type(value[0]) is float:             # <<<<<<<<<<<<<<
+ *                 datafmt, datatype = "f", "f"
+ *             else:
+ */
+    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_t_4)) == ((PyObject *)((PyObject*)(&PyFloat_Type))));
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_2 = (__pyx_t_5 != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":2164
+ *             # get data type - first value determines type
+ *             if type(value[0]) is float:
+ *                 datafmt, datatype = "f", "f"             # <<<<<<<<<<<<<<
+ *             else:
+ *                 mi, ma = min(value), max(value)
+ */
+      __pyx_t_4 = __pyx_n_s_f;
+      __Pyx_INCREF(__pyx_t_4);
+      __pyx_t_3 = __pyx_n_s_f;
+      __Pyx_INCREF(__pyx_t_3);
+      __pyx_v_datafmt = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_v_datatype = __pyx_t_3;
+      __pyx_t_3 = 0;
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":2166
+ *                 datafmt, datatype = "f", "f"
+ *             else:
+ *                 mi, ma = min(value), max(value)             # <<<<<<<<<<<<<<
+ *                 absmax = max( abs(mi), abs(ma) )
+ *                 # signed ints
+ */
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __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 = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_mi = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_v_ma = __pyx_t_6;
+      __pyx_t_6 = 0;
+
+      /* "pysam/csamfile.pyx":2167
+ *             else:
+ *                 mi, ma = min(value), max(value)
+ *                 absmax = max( abs(mi), abs(ma) )             # <<<<<<<<<<<<<<
+ *                 # signed ints
+ *                 if mi < 0:
+ */
+      __pyx_t_6 = PyNumber_Absolute(__pyx_v_ma); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_4 = PyNumber_Absolute(__pyx_v_mi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      if (__pyx_t_2) {
+        __Pyx_INCREF(__pyx_t_6);
+        __pyx_t_3 = __pyx_t_6;
+      } else {
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_t_3 = __pyx_t_4;
+      }
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = __pyx_t_3;
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_absmax = __pyx_t_6;
+      __pyx_t_6 = 0;
+
+      /* "pysam/csamfile.pyx":2169
+ *                 absmax = max( abs(mi), abs(ma) )
+ *                 # signed ints
+ *                 if mi < 0:             # <<<<<<<<<<<<<<
+ *                     if mi >= -127: datafmt, datatype = "b", 'c'
+ *                     elif mi >= -32767: datafmt, datatype = "h", 's'
+ */
+      __pyx_t_6 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (__pyx_t_2) {
+
+        /* "pysam/csamfile.pyx":2170
+ *                 # signed ints
+ *                 if mi < 0:
+ *                     if mi >= -127: datafmt, datatype = "b", 'c'             # <<<<<<<<<<<<<<
+ *                     elif mi >= -32767: datafmt, datatype = "h", 's'
+ *                     elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ */
+        __pyx_t_6 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_6 = __pyx_n_s_b;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_t_3 = __pyx_n_s_c;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_v_datafmt = __pyx_t_6;
+          __pyx_t_6 = 0;
+          __pyx_v_datatype = __pyx_t_3;
+          __pyx_t_3 = 0;
+          goto __pyx_L7;
+        }
+
+        /* "pysam/csamfile.pyx":2171
+ *                 if mi < 0:
+ *                     if mi >= -127: datafmt, datatype = "b", 'c'
+ *                     elif mi >= -32767: datafmt, datatype = "h", 's'             # <<<<<<<<<<<<<<
+ *                     elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                     else: datafmt, datatype = "i", 'i'
+ */
+        __pyx_t_3 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; __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 = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_3 = __pyx_n_s_h;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_t_6 = __pyx_n_s_s_2;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_v_datafmt = __pyx_t_3;
+          __pyx_t_3 = 0;
+          __pyx_v_datatype = __pyx_t_6;
+          __pyx_t_6 = 0;
+          goto __pyx_L7;
+        }
+
+        /* "pysam/csamfile.pyx":2172
+ *                     if mi >= -127: datafmt, datatype = "b", 'c'
+ *                     elif mi >= -32767: datafmt, datatype = "h", 's'
+ *                     elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
+ *                     else: datafmt, datatype = "i", 'i'
+ * 
+ */
+        __pyx_t_6 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_v_value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+          __Pyx_GIVEREF(__pyx_t_6);
+          __pyx_t_6 = 0;
+          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        /*else*/ {
+
+          /* "pysam/csamfile.pyx":2173
+ *                     elif mi >= -32767: datafmt, datatype = "h", 's'
+ *                     elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                     else: datafmt, datatype = "i", 'i'             # <<<<<<<<<<<<<<
+ * 
+ *                 # unsigned ints
+ */
+          __pyx_t_6 = __pyx_n_s_i;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_t_3 = __pyx_n_s_i;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_v_datafmt = __pyx_t_6;
+          __pyx_t_6 = 0;
+          __pyx_v_datatype = __pyx_t_3;
+          __pyx_t_3 = 0;
+        }
+        __pyx_L7:;
+        goto __pyx_L6;
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":2177
+ *                 # unsigned ints
+ *                 else:
+ *                     if absmax <= 255: datafmt, datatype = "B", 'C'             # <<<<<<<<<<<<<<
+ *                     elif absmax <= 65535: datafmt, datatype = "H", 'S'
+ *                     elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ */
+        __pyx_t_3 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2177; __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 = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_3 = __pyx_n_s_B;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_t_6 = __pyx_n_s_C;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_v_datafmt = __pyx_t_3;
+          __pyx_t_3 = 0;
+          __pyx_v_datatype = __pyx_t_6;
+          __pyx_t_6 = 0;
+          goto __pyx_L8;
+        }
+
+        /* "pysam/csamfile.pyx":2178
+ *                 else:
+ *                     if absmax <= 255: datafmt, datatype = "B", 'C'
+ *                     elif absmax <= 65535: datafmt, datatype = "H", 'S'             # <<<<<<<<<<<<<<
+ *                     elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                     else: datafmt, datatype = "I", 'I'
+ */
+        __pyx_t_6 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_6 = __pyx_n_s_H;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_t_3 = __pyx_n_s_S;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_v_datafmt = __pyx_t_6;
+          __pyx_t_6 = 0;
+          __pyx_v_datatype = __pyx_t_3;
+          __pyx_t_3 = 0;
+          goto __pyx_L8;
+        }
+
+        /* "pysam/csamfile.pyx":2179
+ *                     if absmax <= 255: datafmt, datatype = "B", 'C'
+ *                     elif absmax <= 65535: datafmt, datatype = "H", 'S'
+ *                     elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
+ *                     else: datafmt, datatype = "I", 'I'
+ * 
+ */
+        __pyx_t_3 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __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 = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __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 = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        /*else*/ {
+
+          /* "pysam/csamfile.pyx":2180
+ *                     elif absmax <= 65535: datafmt, datatype = "H", 'S'
+ *                     elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                     else: datafmt, datatype = "I", 'I'             # <<<<<<<<<<<<<<
+ * 
+ *             datafmt = "2sccI%i%s" % (len(value), datafmt)
+ */
+          __pyx_t_3 = __pyx_n_s_I;
+          __Pyx_INCREF(__pyx_t_3);
+          __pyx_t_6 = __pyx_n_s_I;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_v_datafmt = __pyx_t_3;
+          __pyx_t_3 = 0;
+          __pyx_v_datatype = __pyx_t_6;
+          __pyx_t_6 = 0;
+        }
+        __pyx_L8:;
+      }
+      __pyx_L6:;
+    }
+    __pyx_L5:;
+
+    /* "pysam/csamfile.pyx":2182
+ *                     else: datafmt, datatype = "I", 'I'
+ * 
+ *             datafmt = "2sccI%i%s" % (len(value), datafmt)             # <<<<<<<<<<<<<<
+ *             args.extend( [pytag[:2],
+ *                           pytype.encode('ascii'),
+ */
+    __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_v_datafmt);
+    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_datafmt);
+    __Pyx_GIVEREF(__pyx_v_datafmt);
+    __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_2sccI_i_s, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF_SET(__pyx_v_datafmt, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "pysam/csamfile.pyx":2183
+ * 
+ *             datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *             args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                           pytype.encode('ascii'),
+ *                           datatype.encode('ascii'),
+ */
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_extend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_pytag, 0, 2, NULL, NULL, &__pyx_slice__70, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+
+    /* "pysam/csamfile.pyx":2184
+ *             datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *             args.extend( [pytag[:2],
+ *                           pytype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                           datatype.encode('ascii'),
+ *                           len(value)] + list(value) )
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":2185
+ *             args.extend( [pytag[:2],
+ *                           pytype.encode('ascii'),
+ *                           datatype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                           len(value)] + list(value) )
+ *             fmts.append( datafmt )
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":2186
+ *                           pytype.encode('ascii'),
+ *                           datatype.encode('ascii'),
+ *                           len(value)] + list(value) )             # <<<<<<<<<<<<<<
+ *             fmts.append( datafmt )
+ *             return
+ */
+    __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __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 = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+
+    /* "pysam/csamfile.pyx":2183
+ * 
+ *             datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *             args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                           pytype.encode('ascii'),
+ *                           datatype.encode('ascii'),
+ */
+    __pyx_t_10 = PyList_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_3 = 0;
+    __pyx_t_7 = 0;
+    __pyx_t_9 = 0;
+    __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":2186
+ *                           pytype.encode('ascii'),
+ *                           datatype.encode('ascii'),
+ *                           len(value)] + list(value) )             # <<<<<<<<<<<<<<
+ *             fmts.append( datafmt )
+ *             return
+ */
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
+    __Pyx_GIVEREF(__pyx_v_value);
+    __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+    /* "pysam/csamfile.pyx":2183
+ * 
+ *             datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *             args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                           pytype.encode('ascii'),
+ *                           datatype.encode('ascii'),
+ */
+    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; __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_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "pysam/csamfile.pyx":2187
+ *                           datatype.encode('ascii'),
+ *                           len(value)] + list(value) )
+ *             fmts.append( datafmt )             # <<<<<<<<<<<<<<
+ *             return
+ * 
+ */
+    __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_fmts, __pyx_v_datafmt); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":2188
+ *                           len(value)] + list(value) )
+ *             fmts.append( datafmt )
+ *             return             # <<<<<<<<<<<<<<
+ * 
+ *         if t is float:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2190
+ *             return
+ * 
+ *         if t is float:             # <<<<<<<<<<<<<<
+ *             fmt, pytype = "2scf", 'f'
+ *         elif t is int:
+ */
+  __pyx_t_2 = (__pyx_v_t == ((PyObject*)(&PyFloat_Type)));
+  __pyx_t_5 = (__pyx_t_2 != 0);
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":2191
+ * 
+ *         if t is float:
+ *             fmt, pytype = "2scf", 'f'             # <<<<<<<<<<<<<<
+ *         elif t is int:
+ *             # negative values
+ */
+    __pyx_t_4 = __pyx_kp_s_2scf;
+    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_9 = __pyx_n_s_f;
+    __Pyx_INCREF(__pyx_t_9);
+    __pyx_v_fmt = __pyx_t_4;
+    __pyx_t_4 = 0;
+    __pyx_v_pytype = __pyx_t_9;
+    __pyx_t_9 = 0;
+    goto __pyx_L9;
+  }
+
+  /* "pysam/csamfile.pyx":2192
+ *         if t is float:
+ *             fmt, pytype = "2scf", 'f'
+ *         elif t is int:             # <<<<<<<<<<<<<<
+ *             # negative values
+ *             if value < 0:
+ */
+  __pyx_t_5 = (__pyx_v_t == ((PyObject*)(&PyInt_Type)));
+  __pyx_t_2 = (__pyx_t_5 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":2194
+ *         elif t is int:
+ *             # negative values
+ *             if value < 0:             # <<<<<<<<<<<<<<
+ *                 if value >= -127: fmt, pytype = "2scb", 'c'
+ *                 elif value >= -32767: fmt, pytype = "2sch", 's'
+ */
+    __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":2195
+ *             # negative values
+ *             if value < 0:
+ *                 if value >= -127: fmt, pytype = "2scb", 'c'             # <<<<<<<<<<<<<<
+ *                 elif value >= -32767: fmt, pytype = "2sch", 's'
+ *                 elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ */
+      __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_9 = __pyx_kp_s_2scb;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_t_4 = __pyx_n_s_c;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_v_fmt = __pyx_t_9;
+        __pyx_t_9 = 0;
+        __pyx_v_pytype = __pyx_t_4;
+        __pyx_t_4 = 0;
+        goto __pyx_L11;
+      }
+
+      /* "pysam/csamfile.pyx":2196
+ *             if value < 0:
+ *                 if value >= -127: fmt, pytype = "2scb", 'c'
+ *                 elif value >= -32767: fmt, pytype = "2sch", 's'             # <<<<<<<<<<<<<<
+ *                 elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                 else: fmt, pytype = "2sci", 'i'
+ */
+      __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_4 = __pyx_kp_s_2sch;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_t_9 = __pyx_n_s_s_2;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_v_fmt = __pyx_t_4;
+        __pyx_t_4 = 0;
+        __pyx_v_pytype = __pyx_t_9;
+        __pyx_t_9 = 0;
+        goto __pyx_L11;
+      }
+
+      /* "pysam/csamfile.pyx":2197
+ *                 if value >= -127: fmt, pytype = "2scb", 'c'
+ *                 elif value >= -32767: fmt, pytype = "2sch", 's'
+ *                 elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
+ *                 else: fmt, pytype = "2sci", 'i'
+ *             # positive values
+ */
+      __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_v_value); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
+        __Pyx_GIVEREF(__pyx_t_9);
+        __pyx_t_9 = 0;
+        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":2198
+ *                 elif value >= -32767: fmt, pytype = "2sch", 's'
+ *                 elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                 else: fmt, pytype = "2sci", 'i'             # <<<<<<<<<<<<<<
+ *             # positive values
+ *             else:
+ */
+        __pyx_t_9 = __pyx_kp_s_2sci;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_t_4 = __pyx_n_s_i;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_v_fmt = __pyx_t_9;
+        __pyx_t_9 = 0;
+        __pyx_v_pytype = __pyx_t_4;
+        __pyx_t_4 = 0;
+      }
+      __pyx_L11:;
+      goto __pyx_L10;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":2201
+ *             # positive values
+ *             else:
+ *                 if value <= 255: fmt, pytype = "2scB", 'C'             # <<<<<<<<<<<<<<
+ *                 elif value <= 65535: fmt, pytype = "2scH", 'S'
+ *                 elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ */
+      __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_4 = __pyx_kp_s_2scB;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_t_9 = __pyx_n_s_C;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_v_fmt = __pyx_t_4;
+        __pyx_t_4 = 0;
+        __pyx_v_pytype = __pyx_t_9;
+        __pyx_t_9 = 0;
+        goto __pyx_L12;
+      }
+
+      /* "pysam/csamfile.pyx":2202
+ *             else:
+ *                 if value <= 255: fmt, pytype = "2scB", 'C'
+ *                 elif value <= 65535: fmt, pytype = "2scH", 'S'             # <<<<<<<<<<<<<<
+ *                 elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                 else: fmt, pytype = "2scI", 'I'
+ */
+      __pyx_t_9 = PyObject_RichCompare(__pyx_v_value, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_9 = __pyx_kp_s_2scH;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_t_4 = __pyx_n_s_S;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_v_fmt = __pyx_t_9;
+        __pyx_t_9 = 0;
+        __pyx_v_pytype = __pyx_t_4;
+        __pyx_t_4 = 0;
+        goto __pyx_L12;
+      }
+
+      /* "pysam/csamfile.pyx":2203
+ *                 if value <= 255: fmt, pytype = "2scB", 'C'
+ *                 elif value <= 65535: fmt, pytype = "2scH", 'S'
+ *                 elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
+ *                 else: fmt, pytype = "2scI", 'I'
+ *         else:
+ */
+      __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
+        __Pyx_GIVEREF(__pyx_t_4);
+        __pyx_t_4 = 0;
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      /*else*/ {
+
+        /* "pysam/csamfile.pyx":2204
+ *                 elif value <= 65535: fmt, pytype = "2scH", 'S'
+ *                 elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+ *                 else: fmt, pytype = "2scI", 'I'             # <<<<<<<<<<<<<<
+ *         else:
+ *             # Note: hex strings (H) are not supported yet
+ */
+        __pyx_t_4 = __pyx_kp_s_2scI;
+        __Pyx_INCREF(__pyx_t_4);
+        __pyx_t_9 = __pyx_n_s_I;
+        __Pyx_INCREF(__pyx_t_9);
+        __pyx_v_fmt = __pyx_t_4;
+        __pyx_t_4 = 0;
+        __pyx_v_pytype = __pyx_t_9;
+        __pyx_t_9 = 0;
+      }
+      __pyx_L12:;
+    }
+    __pyx_L10:;
+    goto __pyx_L9;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":2207
+ *         else:
+ *             # Note: hex strings (H) are not supported yet
+ *             if t is not bytes:             # <<<<<<<<<<<<<<
+ *                 value = value.encode('ascii')
+ *             if len(value) == 1:
+ */
+    __pyx_t_2 = (__pyx_v_t != ((PyObject*)(&PyBytes_Type)));
+    __pyx_t_5 = (__pyx_t_2 != 0);
+    if (__pyx_t_5) {
+
+      /* "pysam/csamfile.pyx":2208
+ *             # Note: hex strings (H) are not supported yet
+ *             if t is not bytes:
+ *                 value = value.encode('ascii')             # <<<<<<<<<<<<<<
+ *             if len(value) == 1:
+ *                 fmt, pytype = "2scc", 'A'
+ */
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
+      __pyx_t_4 = 0;
+      goto __pyx_L13;
+    }
+    __pyx_L13:;
+
+    /* "pysam/csamfile.pyx":2209
+ *             if t is not bytes:
+ *                 value = value.encode('ascii')
+ *             if len(value) == 1:             # <<<<<<<<<<<<<<
+ *                 fmt, pytype = "2scc", 'A'
+ *             else:
+ */
+    __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = ((__pyx_t_8 == 1) != 0);
+    if (__pyx_t_5) {
+
+      /* "pysam/csamfile.pyx":2210
+ *                 value = value.encode('ascii')
+ *             if len(value) == 1:
+ *                 fmt, pytype = "2scc", 'A'             # <<<<<<<<<<<<<<
+ *             else:
+ *                 fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+ */
+      __pyx_t_4 = __pyx_kp_s_2scc;
+      __Pyx_INCREF(__pyx_t_4);
+      __pyx_t_9 = __pyx_n_s_A;
+      __Pyx_INCREF(__pyx_t_9);
+      __pyx_v_fmt = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_v_pytype = __pyx_t_9;
+      __pyx_t_9 = 0;
+      goto __pyx_L14;
+    }
+    /*else*/ {
+
+      /* "pysam/csamfile.pyx":2212
+ *                 fmt, pytype = "2scc", 'A'
+ *             else:
+ *                 fmt, pytype = "2sc%is" % (len(value)+1), 'Z'             # <<<<<<<<<<<<<<
+ * 
+ *         args.extend( [pytag[:2],
+ */
+      __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyInt_FromSsize_t((__pyx_t_8 + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_2sc_is, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = __pyx_n_s_Z;
+      __Pyx_INCREF(__pyx_t_9);
+      __pyx_v_fmt = __pyx_t_4;
+      __pyx_t_4 = 0;
+      __pyx_v_pytype = __pyx_t_9;
+      __pyx_t_9 = 0;
+    }
+    __pyx_L14:;
+  }
+  __pyx_L9:;
+
+  /* "pysam/csamfile.pyx":2214
+ *                 fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+ * 
+ *         args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                       pytype.encode('ascii'),
+ *                       value ] )
+ */
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_extend); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_pytag, 0, 2, NULL, NULL, &__pyx_slice__74, 0, 1, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+
+  /* "pysam/csamfile.pyx":2215
+ * 
+ *         args.extend( [pytag[:2],
+ *                       pytype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                       value ] )
+ * 
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "pysam/csamfile.pyx":2214
+ *                 fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+ * 
+ *         args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                       pytype.encode('ascii'),
+ *                       value ] )
+ */
+  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_10);
+  __Pyx_GIVEREF(__pyx_t_10);
+  __Pyx_INCREF(__pyx_v_value);
+  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __pyx_t_4 = 0;
+  __pyx_t_10 = 0;
+  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __pyx_t_6 = 0;
+  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "pysam/csamfile.pyx":2218
+ *                       value ] )
+ * 
+ *         fmts.append( fmt )             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_fmts, __pyx_v_fmt); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":2153
+ *         return _Py_HashPointer(<void *>self)
+ * 
+ *     def _convert_python_tag(self, pytag, value, fmts, args):             # <<<<<<<<<<<<<<
+ * 
+ *         if not type(pytag) is bytes:
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead._convert_python_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_t);
+  __Pyx_XDECREF(__pyx_v_pytype);
+  __Pyx_XDECREF(__pyx_v_datafmt);
+  __Pyx_XDECREF(__pyx_v_datatype);
+  __Pyx_XDECREF(__pyx_v_mi);
+  __Pyx_XDECREF(__pyx_v_ma);
+  __Pyx_XDECREF(__pyx_v_absmax);
+  __Pyx_XDECREF(__pyx_v_fmt);
+  __Pyx_XDECREF(__pyx_v_pytag);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2227
+ *     property qname:
+ *         """the query name (None if not present)"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5qname_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5qname_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5qname___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5qname___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2227);
+
+  /* "pysam/csamfile.pyx":2229
+ *         def __get__(self):
+ *             cdef bam1_t * src
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             if pysam_get_l_qname(src) == 0:
+ *                 return None
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2230
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ *             if pysam_get_l_qname(src) == 0:             # <<<<<<<<<<<<<<
+ *                 return None
+ *             return _charptr_to_str(<char *>pysam_bam_get_qname(src))
+ */
+  __pyx_t_2 = ((pysam_get_l_qname(__pyx_v_src) == 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":2231
+ *             src = self._delegate
+ *             if pysam_get_l_qname(src) == 0:
+ *                 return None             # <<<<<<<<<<<<<<
+ *             return _charptr_to_str(<char *>pysam_bam_get_qname(src))
+ * 
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2232
+ *             if pysam_get_l_qname(src) == 0:
+ *                 return None
+ *             return _charptr_to_str(<char *>pysam_bam_get_qname(src))             # <<<<<<<<<<<<<<
+ * 
+ *         def __set__(self, qname ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = __pyx_f_5pysam_8csamfile__charptr_to_str(((char *)pysam_bam_get_qname(__pyx_v_src))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2227
+ *     property qname:
+ *         """the query name (None if not present)"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.qname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2234
+ *             return _charptr_to_str(<char *>pysam_bam_get_qname(src))
+ * 
+ *         def __set__(self, qname ):             # <<<<<<<<<<<<<<
+ *             if qname == None or len(qname) == 0: return
+ *             qname = _forceBytes(qname)
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5qname_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qname); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5qname_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qname) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5qname_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_qname));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5qname_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qname) {
+  bam1_t *__pyx_v_src;
+  int __pyx_v_l;
+  char *__pyx_v_p;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  Py_ssize_t __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  bam1_t *__pyx_t_6;
+  char const *__pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2234);
+  __Pyx_INCREF(__pyx_v_qname);
+
+  /* "pysam/csamfile.pyx":2235
+ * 
+ *         def __set__(self, qname ):
+ *             if qname == None or len(qname) == 0: return             # <<<<<<<<<<<<<<
+ *             qname = _forceBytes(qname)
+ *             cdef bam1_t * src
+ */
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_qname, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2235; __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 = 2235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (!__pyx_t_2) {
+    __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = (__pyx_t_3 == 0);
+    __pyx_t_5 = __pyx_t_4;
+  } else {
+    __pyx_t_5 = __pyx_t_2;
+  }
+  if (__pyx_t_5) {
+    __pyx_r = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2236
+ *         def __set__(self, qname ):
+ *             if qname == None or len(qname) == 0: return
+ *             qname = _forceBytes(qname)             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef int l
+ */
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_qname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_qname, __pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":2241
+ *             cdef char * p
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             p = pysam_bam_get_qname( src )
+ * 
+ */
+  __pyx_t_6 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_6;
+
+  /* "pysam/csamfile.pyx":2242
+ * 
+ *             src = self._delegate
+ *             p = pysam_bam_get_qname( src )             # <<<<<<<<<<<<<<
+ * 
+ *             # the qname is \0 terminated
+ */
+  __pyx_v_p = pysam_bam_get_qname(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2245
+ * 
+ *             # the qname is \0 terminated
+ *             l = len(qname) + 1             # <<<<<<<<<<<<<<
+ *             pysam_bam_update(src,
+ *                              pysam_get_l_qname(src),
+ */
+  __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_l = (__pyx_t_3 + 1);
+
+  /* "pysam/csamfile.pyx":2246
+ *             # the qname is \0 terminated
+ *             l = len(qname) + 1
+ *             pysam_bam_update(src,             # <<<<<<<<<<<<<<
+ *                              pysam_get_l_qname(src),
+ *                              l,
+ */
+  pysam_bam_update(__pyx_v_src, pysam_get_l_qname(__pyx_v_src), __pyx_v_l, ((uint8_t *)__pyx_v_p));
+
+  /* "pysam/csamfile.pyx":2252
+ * 
+ * 
+ *             pysam_set_l_qname(src, l)             # <<<<<<<<<<<<<<
+ * 
+ *             # re-acquire pointer to location in memory
+ */
+  pysam_set_l_qname(__pyx_v_src, __pyx_v_l);
+
+  /* "pysam/csamfile.pyx":2256
+ *             # re-acquire pointer to location in memory
+ *             # as it might have moved
+ *             p = pysam_bam_get_qname(src)             # <<<<<<<<<<<<<<
+ * 
+ *             strncpy(p, qname, l)
+ */
+  __pyx_v_p = pysam_bam_get_qname(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2258
+ *             p = pysam_bam_get_qname(src)
+ * 
+ *             strncpy(p, qname, l)             # <<<<<<<<<<<<<<
+ * 
+ *     property cigar:
+ */
+  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_qname); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  strncpy(__pyx_v_p, __pyx_t_7, __pyx_v_l);
+
+  /* "pysam/csamfile.pyx":2234
+ *             return _charptr_to_str(<char *>pysam_bam_get_qname(src))
+ * 
+ *         def __set__(self, qname ):             # <<<<<<<<<<<<<<
+ *             if qname == None or len(qname) == 0: return
+ *             qname = _forceBytes(qname)
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.qname.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_qname);
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2299
+ *         or None.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t * cigar_p
+ *             cdef bam1_t * src
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5cigar_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5cigar_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5cigar___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5cigar___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  uint32_t *__pyx_v_cigar_p;
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_v_op = 0;
+  PyObject *__pyx_v_l = 0;
+  PyObject *__pyx_v_cigar = 0;
+  int __pyx_v_k;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  bam1_t *__pyx_t_2;
+  int __pyx_t_3;
+  uint16_t __pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2299);
+
+  /* "pysam/csamfile.pyx":2304
+ *             cdef op, l, cigar
+ *             cdef int k
+ *             cigar = []             # <<<<<<<<<<<<<<
+ * 
+ *             src = self._delegate
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_cigar = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":2306
+ *             cigar = []
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             if pysam_get_n_cigar(src) == 0:
+ *                 return cigar
+ */
+  __pyx_t_2 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_2;
+
+  /* "pysam/csamfile.pyx":2307
+ * 
+ *             src = self._delegate
+ *             if pysam_get_n_cigar(src) == 0:             # <<<<<<<<<<<<<<
+ *                 return cigar
+ * 
+ */
+  __pyx_t_3 = ((pysam_get_n_cigar(__pyx_v_src) == 0) != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":2308
+ *             src = self._delegate
+ *             if pysam_get_n_cigar(src) == 0:
+ *                 return cigar             # <<<<<<<<<<<<<<
+ * 
+ *             cigar_p = pysam_bam_get_cigar(src);
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_cigar);
+    __pyx_r = __pyx_v_cigar;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2310
+ *                 return cigar
+ * 
+ *             cigar_p = pysam_bam_get_cigar(src);             # <<<<<<<<<<<<<<
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ */
+  __pyx_v_cigar_p = pysam_bam_get_cigar(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2311
+ * 
+ *             cigar_p = pysam_bam_get_cigar(src);
+ *             for k from 0 <= k < pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ */
+  __pyx_t_4 = pysam_get_n_cigar(__pyx_v_src);
+  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":2312
+ *             cigar_p = pysam_bam_get_cigar(src);
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 cigar.append((op, l))
+ */
+    __pyx_t_1 = __Pyx_PyInt_From_uint32_t(((__pyx_v_cigar_p[__pyx_v_k]) & BAM_CIGAR_MASK)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":2313
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
+ *                 cigar.append((op, l))
+ *             return cigar
+ */
+    __pyx_t_1 = __Pyx_PyInt_From_uint32_t(((__pyx_v_cigar_p[__pyx_v_k]) >> BAM_CIGAR_SHIFT)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":2314
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 cigar.append((op, l))             # <<<<<<<<<<<<<<
+ *             return cigar
+ * 
+ */
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_op);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_op);
+    __Pyx_GIVEREF(__pyx_v_op);
+    __Pyx_INCREF(__pyx_v_l);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_l);
+    __Pyx_GIVEREF(__pyx_v_l);
+    __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_cigar, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "pysam/csamfile.pyx":2315
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 cigar.append((op, l))
+ *             return cigar             # <<<<<<<<<<<<<<
+ * 
+ *         def __set__(self, values):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_cigar);
+  __pyx_r = __pyx_v_cigar;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2299
+ *         or None.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t * cigar_p
+ *             cdef bam1_t * src
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.cigar.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_op);
+  __Pyx_XDECREF(__pyx_v_l);
+  __Pyx_XDECREF(__pyx_v_cigar);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2317
+ *             return cigar
+ * 
+ *         def __set__(self, values):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t * p
+ *             cdef bam1_t * src
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5cigar_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5cigar_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5cigar_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_values));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5cigar_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_values) {
+  uint32_t *__pyx_v_p;
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_v_op = 0;
+  PyObject *__pyx_v_l = 0;
+  int __pyx_v_k;
+  int __pyx_v_ncigar;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  uint32_t __pyx_t_12;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2317);
+  __Pyx_INCREF(__pyx_v_values);
+
+  /* "pysam/csamfile.pyx":2323
+ *             cdef int k, ncigar
+ * 
+ *             k = 0             # <<<<<<<<<<<<<<
+ * 
+ *             src = self._delegate
+ */
+  __pyx_v_k = 0;
+
+  /* "pysam/csamfile.pyx":2325
+ *             k = 0
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ * 
+ *             # get location of cigar string
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2328
+ * 
+ *             # get location of cigar string
+ *             p = pysam_bam_get_cigar(src)             # <<<<<<<<<<<<<<
+ * 
+ *             # empty values for cigar string
+ */
+  __pyx_v_p = pysam_bam_get_cigar(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2331
+ * 
+ *             # empty values for cigar string
+ *             if values is None:             # <<<<<<<<<<<<<<
+ *                 values = []
+ * 
+ */
+  __pyx_t_2 = (__pyx_v_values == Py_None);
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":2332
+ *             # empty values for cigar string
+ *             if values is None:
+ *                 values = []             # <<<<<<<<<<<<<<
+ * 
+ *             ncigar = len(values)
+ */
+    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":2334
+ *                 values = []
+ * 
+ *             ncigar = len(values)             # <<<<<<<<<<<<<<
+ *             # create space for cigar data within src.data
+ *             pysam_bam_update(src,
+ */
+  __pyx_t_5 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_ncigar = __pyx_t_5;
+
+  /* "pysam/csamfile.pyx":2336
+ *             ncigar = len(values)
+ *             # create space for cigar data within src.data
+ *             pysam_bam_update(src,             # <<<<<<<<<<<<<<
+ *                              pysam_get_n_cigar(src) * 4,
+ *                              ncigar * 4,
+ */
+  pysam_bam_update(__pyx_v_src, (pysam_get_n_cigar(__pyx_v_src) * 4), (__pyx_v_ncigar * 4), ((uint8_t *)__pyx_v_p));
+
+  /* "pysam/csamfile.pyx":2342
+ * 
+ *             # length is number of cigar operations, not bytes
+ *             pysam_set_n_cigar(src, ncigar)             # <<<<<<<<<<<<<<
+ * 
+ *             # re-acquire pointer to location in memory
+ */
+  pysam_set_n_cigar(__pyx_v_src, __pyx_v_ncigar);
+
+  /* "pysam/csamfile.pyx":2346
+ *             # re-acquire pointer to location in memory
+ *             # as it might have moved
+ *             p = pysam_bam_get_cigar(src)             # <<<<<<<<<<<<<<
+ * 
+ *             # insert cigar operations
+ */
+  __pyx_v_p = pysam_bam_get_cigar(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2349
+ * 
+ *             # insert cigar operations
+ *             for op, l in values:             # <<<<<<<<<<<<<<
+ *                 p[k] = l << BAM_CIGAR_SHIFT | op
+ *                 k += 1
+ */
+  if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
+    __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
+  }
+  for (;;) {
+    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
+      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
+      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
+      if (unlikely(!__pyx_t_7)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_7);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
+      PyObject* sequence = __pyx_t_7;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(__pyx_t_9);
+      #else
+      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      #endif
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
+      index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_8);
+      index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_9);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      goto __pyx_L7_unpacking_done;
+      __pyx_L6_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L7_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_8);
+    __pyx_t_8 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_9);
+    __pyx_t_9 = 0;
+
+    /* "pysam/csamfile.pyx":2350
+ *             # insert cigar operations
+ *             for op, l in values:
+ *                 p[k] = l << BAM_CIGAR_SHIFT | op             # <<<<<<<<<<<<<<
+ *                 k += 1
+ * 
+ */
+    __pyx_t_7 = __Pyx_PyInt_From_int(BAM_CIGAR_SHIFT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_9 = PyNumber_Lshift(__pyx_v_l, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_7 = PyNumber_Or(__pyx_t_9, __pyx_v_op); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_12 = __Pyx_PyInt_As_uint32_t(__pyx_t_7); if (unlikely((__pyx_t_12 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    (__pyx_v_p[__pyx_v_k]) = __pyx_t_12;
+
+    /* "pysam/csamfile.pyx":2351
+ *             for op, l in values:
+ *                 p[k] = l << BAM_CIGAR_SHIFT | op
+ *                 k += 1             # <<<<<<<<<<<<<<
+ * 
+ *             ## setting the cigar string requires updating the bin
+ */
+    __pyx_v_k = (__pyx_v_k + 1);
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pysam/csamfile.pyx":2354
+ * 
+ *             ## setting the cigar string requires updating the bin
+ *             pysam_set_bin(src,             # <<<<<<<<<<<<<<
+ *                           hts_reg2bin(
+ *                               src.core.pos,
+ */
+  pysam_set_bin(__pyx_v_src, hts_reg2bin(__pyx_v_src->core.pos, bam_endpos(__pyx_v_src), 14, 5));
+
+  /* "pysam/csamfile.pyx":2317
+ *             return cigar
+ * 
+ *         def __set__(self, values):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t * p
+ *             cdef bam1_t * src
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.cigar.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_op);
+  __Pyx_XDECREF(__pyx_v_l);
+  __Pyx_XDECREF(__pyx_v_values);
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2378
+ *         empty string.
+ *         '''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             c = self.cigar
+ *             if c == None: return ""
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_11cigarstring_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_11cigarstring_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_11cigarstring___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_11cigarstring___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_v_c = NULL;
+  PyObject *__pyx_v_x = NULL;
+  PyObject *__pyx_v_y = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *(*__pyx_t_10)(PyObject *);
+  Py_ssize_t __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2378);
+
+  /* "pysam/csamfile.pyx":2379
+ *         '''
+ *         def __get__(self):
+ *             c = self.cigar             # <<<<<<<<<<<<<<
+ *             if c == None: return ""
+ *             # reverse order
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cigar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_c = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":2380
+ *         def __get__(self):
+ *             c = self.cigar
+ *             if c == None: return ""             # <<<<<<<<<<<<<<
+ *             # reverse order
+ *             else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
+ */
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_c, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2380; __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 = 2380; __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(__pyx_kp_s__9);
+    __pyx_r = __pyx_kp_s__9;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":2382
+ *             if c == None: return ""
+ *             # reverse order
+ *             else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])             # <<<<<<<<<<<<<<
+ * 
+ *         def __set__(self, cigar):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (PyList_CheckExact(__pyx_v_c) || PyTuple_CheckExact(__pyx_v_c)) {
+      __pyx_t_3 = __pyx_v_c; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+      __pyx_t_5 = NULL;
+    } else {
+      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_c); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
+    }
+    for (;;) {
+      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
+        if (unlikely(!__pyx_t_6)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_6);
+      }
+      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
+        PyObject* sequence = __pyx_t_6;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        Py_ssize_t size = Py_SIZE(sequence);
+        #else
+        Py_ssize_t size = PySequence_Size(sequence);
+        #endif
+        if (unlikely(size != 2)) {
+          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        #if CYTHON_COMPILING_IN_CPYTHON
+        if (likely(PyTuple_CheckExact(sequence))) {
+          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
+          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
+        } else {
+          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
+          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
+        }
+        __Pyx_INCREF(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_8);
+        #else
+        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        #endif
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      } else {
+        Py_ssize_t index = -1;
+        __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
+        index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_7);
+        index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_8);
+        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = NULL;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        goto __pyx_L7_unpacking_done;
+        __pyx_L6_unpacking_failed:;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_10 = NULL;
+        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_L7_unpacking_done:;
+      }
+      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_7);
+      __pyx_t_7 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_8);
+      __pyx_t_8 = 0;
+      __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_PyInt_From_char((__pyx_v_5pysam_8csamfile_CODE2CIGAR[__pyx_t_11])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_INCREF(__pyx_v_y);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_y);
+      __Pyx_GIVEREF(__pyx_v_y);
+      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
+      __Pyx_GIVEREF(__pyx_t_6);
+      __pyx_t_6 = 0;
+      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_i_c, __pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__9, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2378
+ *         empty string.
+ *         '''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             c = self.cigar
+ *             if c == None: return ""
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.cigarstring.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_c);
+  __Pyx_XDECREF(__pyx_v_x);
+  __Pyx_XDECREF(__pyx_v_y);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2384
+ *             else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
+ * 
+ *         def __set__(self, cigar):             # <<<<<<<<<<<<<<
+ *             if cigar is None or len(cigar) == 0:
+ *                 self.cigar = []
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_11cigarstring_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cigar); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_11cigarstring_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cigar) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_11cigarstring_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_cigar));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_11cigarstring_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_cigar) {
+  PyObject *__pyx_v_parts = NULL;
+  PyObject *__pyx_v_x = NULL;
+  PyObject *__pyx_v_y = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  Py_ssize_t __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *(*__pyx_t_12)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2384);
+
+  /* "pysam/csamfile.pyx":2385
+ * 
+ *         def __set__(self, cigar):
+ *             if cigar is None or len(cigar) == 0:             # <<<<<<<<<<<<<<
+ *                 self.cigar = []
+ *             else:
+ */
+  __pyx_t_1 = (__pyx_v_cigar == Py_None);
+  if (!(__pyx_t_1 != 0)) {
+    __pyx_t_2 = PyObject_Length(__pyx_v_cigar); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = ((__pyx_t_2 == 0) != 0);
+    __pyx_t_4 = __pyx_t_3;
+  } else {
+    __pyx_t_4 = (__pyx_t_1 != 0);
+  }
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":2386
+ *         def __set__(self, cigar):
+ *             if cigar is None or len(cigar) == 0:
+ *                 self.cigar = []             # <<<<<<<<<<<<<<
+ *             else:
+ *                 parts = CIGAR_REGEX.findall(cigar)
+ */
+    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cigar, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":2388
+ *                 self.cigar = []
+ *             else:
+ *                 parts = CIGAR_REGEX.findall(cigar)             # <<<<<<<<<<<<<<
+ *                 # reverse order
+ *                 self.cigar = [(CIGAR2CODE[ord(y)], int(x)) for x,y in parts]
+ */
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_CIGAR_REGEX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_findall); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_v_cigar);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cigar);
+    __Pyx_GIVEREF(__pyx_v_cigar);
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __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_v_parts = __pyx_t_7;
+    __pyx_t_7 = 0;
+
+    /* "pysam/csamfile.pyx":2390
+ *                 parts = CIGAR_REGEX.findall(cigar)
+ *                 # reverse order
+ *                 self.cigar = [(CIGAR2CODE[ord(y)], int(x)) for x,y in parts]             # <<<<<<<<<<<<<<
+ * 
+ *     property seq:
+ */
+    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    if (PyList_CheckExact(__pyx_v_parts) || PyTuple_CheckExact(__pyx_v_parts)) {
+      __pyx_t_5 = __pyx_v_parts; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0;
+      __pyx_t_8 = NULL;
+    } else {
+      __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_parts); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
+    }
+    for (;;) {
+      if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_5)) {
+        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_5)) {
+        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_6 = __pyx_t_8(__pyx_t_5);
+        if (unlikely(!__pyx_t_6)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_6);
+      }
+      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
+        PyObject* sequence = __pyx_t_6;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        Py_ssize_t size = Py_SIZE(sequence);
+        #else
+        Py_ssize_t size = PySequence_Size(sequence);
+        #endif
+        if (unlikely(size != 2)) {
+          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        #if CYTHON_COMPILING_IN_CPYTHON
+        if (likely(PyTuple_CheckExact(sequence))) {
+          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
+          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
+        } else {
+          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
+          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
+        }
+        __Pyx_INCREF(__pyx_t_9);
+        __Pyx_INCREF(__pyx_t_10);
+        #else
+        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        #endif
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      } else {
+        Py_ssize_t index = -1;
+        __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
+        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_9);
+        index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_10);
+        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = NULL;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        goto __pyx_L7_unpacking_done;
+        __pyx_L6_unpacking_failed:;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __pyx_t_12 = NULL;
+        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_L7_unpacking_done:;
+      }
+      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9);
+      __pyx_t_9 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_10);
+      __pyx_t_10 = 0;
+      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_CIGAR2CODE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_INCREF(__pyx_v_y);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_y);
+      __Pyx_GIVEREF(__pyx_v_y);
+      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __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_GetItem(__pyx_t_6, __pyx_t_9); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
+      __pyx_t_10 = 0;
+      __pyx_t_9 = 0;
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cigar, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":2384
+ *             else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
+ * 
+ *         def __set__(self, cigar):             # <<<<<<<<<<<<<<
+ *             if cigar is None or len(cigar) == 0:
+ *                 self.cigar = []
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  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_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.cigarstring.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_parts);
+  __Pyx_XDECREF(__pyx_v_x);
+  __Pyx_XDECREF(__pyx_v_y);
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2412
+ *         sequence.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef char * s
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_3seq_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_3seq_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_3seq___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_3seq___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2412);
+
+  /* "pysam/csamfile.pyx":2415
+ *             cdef bam1_t * src
+ *             cdef char * s
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ * 
+ *             if src.core.l_qseq == 0: return None
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2417
+ *             src = self._delegate
+ * 
+ *             if src.core.l_qseq == 0: return None             # <<<<<<<<<<<<<<
+ * 
+ *             return get_seq_range(src, 0, src.core.l_qseq)
+ */
+  __pyx_t_2 = ((__pyx_v_src->core.l_qseq == 0) != 0);
+  if (__pyx_t_2) {
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2419
+ *             if src.core.l_qseq == 0: return None
+ * 
+ *             return get_seq_range(src, 0, src.core.l_qseq)             # <<<<<<<<<<<<<<
+ * 
+ *         def __set__(self, seq):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = __pyx_f_5pysam_8csamfile_get_seq_range(__pyx_v_src, 0, __pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2412
+ *         sequence.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef char * s
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.seq.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2421
+ *             return get_seq_range(src, 0, src.core.l_qseq)
+ * 
+ *         def __set__(self, seq):             # <<<<<<<<<<<<<<
+ *             # samtools manages sequence and quality length memory together
+ *             # if no quality information is present, the first byte says 0xff.
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_3seq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_3seq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_3seq_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_seq));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_3seq_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_seq) {
+  bam1_t *__pyx_v_src;
+  uint8_t *__pyx_v_p;
+  char *__pyx_v_s;
+  int __pyx_v_l;
+  int __pyx_v_k;
+  int __pyx_v_nbytes_new;
+  int __pyx_v_nbytes_old;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  Py_ssize_t __pyx_t_3;
+  bam1_t *__pyx_t_4;
+  int __pyx_t_5;
+  char *__pyx_t_6;
+  long __pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2421);
+  __Pyx_INCREF(__pyx_v_seq);
+
+  /* "pysam/csamfile.pyx":2429
+ *             cdef int l, k, nbytes_new, nbytes_old
+ * 
+ *             if seq == None:             # <<<<<<<<<<<<<<
+ *                 l = 0
+ *             else:
+ */
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_seq, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2429; __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 = 2429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":2430
+ * 
+ *             if seq == None:
+ *                 l = 0             # <<<<<<<<<<<<<<
+ *             else:
+ *                 l = len(seq)
+ */
+    __pyx_v_l = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":2432
+ *                 l = 0
+ *             else:
+ *                 l = len(seq)             # <<<<<<<<<<<<<<
+ *                 seq = _forceBytes(seq)
+ * 
+ */
+    __pyx_t_3 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_l = __pyx_t_3;
+
+    /* "pysam/csamfile.pyx":2433
+ *             else:
+ *                 l = len(seq)
+ *                 seq = _forceBytes(seq)             # <<<<<<<<<<<<<<
+ * 
+ *             src = self._delegate
+ */
+    __pyx_t_1 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_seq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF_SET(__pyx_v_seq, __pyx_t_1);
+    __pyx_t_1 = 0;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":2435
+ *                 seq = _forceBytes(seq)
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ * 
+ *             # as the sequence is stored in half-bytes, the total length (sequence
+ */
+  __pyx_t_4 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":2439
+ *             # as the sequence is stored in half-bytes, the total length (sequence
+ *             # plus quality scores) is (l+1)/2 + l
+ *             nbytes_new = (l + 1) / 2 + l             # <<<<<<<<<<<<<<
+ *             nbytes_old = (src.core.l_qseq + 1) / 2 + src.core.l_qseq
+ * 
+ */
+  __pyx_v_nbytes_new = (__Pyx_div_long((__pyx_v_l + 1), 2) + __pyx_v_l);
+
+  /* "pysam/csamfile.pyx":2440
+ *             # plus quality scores) is (l+1)/2 + l
+ *             nbytes_new = (l + 1) / 2 + l
+ *             nbytes_old = (src.core.l_qseq + 1) / 2 + src.core.l_qseq             # <<<<<<<<<<<<<<
+ * 
+ *             # acquire pointer to location in memory
+ */
+  __pyx_v_nbytes_old = (__Pyx_div_long((__pyx_v_src->core.l_qseq + 1), 2) + __pyx_v_src->core.l_qseq);
+
+  /* "pysam/csamfile.pyx":2443
+ * 
+ *             # acquire pointer to location in memory
+ *             p = pysam_bam_get_seq(src)             # <<<<<<<<<<<<<<
+ *             src.core.l_qseq = l
+ * 
+ */
+  __pyx_v_p = pysam_bam_get_seq(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2444
+ *             # acquire pointer to location in memory
+ *             p = pysam_bam_get_seq(src)
+ *             src.core.l_qseq = l             # <<<<<<<<<<<<<<
+ * 
+ *             # change length of data field
+ */
+  __pyx_v_src->core.l_qseq = __pyx_v_l;
+
+  /* "pysam/csamfile.pyx":2447
+ * 
+ *             # change length of data field
+ *             pysam_bam_update(src,             # <<<<<<<<<<<<<<
+ *                              nbytes_old,
+ *                              nbytes_new,
+ */
+  pysam_bam_update(__pyx_v_src, __pyx_v_nbytes_old, __pyx_v_nbytes_new, __pyx_v_p);
+
+  /* "pysam/csamfile.pyx":2452
+ *                              p)
+ * 
+ *             if l > 0:             # <<<<<<<<<<<<<<
+ *                 # re-acquire pointer to location in memory
+ *                 # as it might have moved
+ */
+  __pyx_t_2 = ((__pyx_v_l > 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":2455
+ *                 # re-acquire pointer to location in memory
+ *                 # as it might have moved
+ *                 p = pysam_bam_get_seq(src)             # <<<<<<<<<<<<<<
+ *                 for k from 0 <= k < nbytes_new:
+ *                     p[k] = 0
+ */
+    __pyx_v_p = pysam_bam_get_seq(__pyx_v_src);
+
+    /* "pysam/csamfile.pyx":2456
+ *                 # as it might have moved
+ *                 p = pysam_bam_get_seq(src)
+ *                 for k from 0 <= k < nbytes_new:             # <<<<<<<<<<<<<<
+ *                     p[k] = 0
+ *                 # convert to C string
+ */
+    __pyx_t_5 = __pyx_v_nbytes_new;
+    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
+
+      /* "pysam/csamfile.pyx":2457
+ *                 p = pysam_bam_get_seq(src)
+ *                 for k from 0 <= k < nbytes_new:
+ *                     p[k] = 0             # <<<<<<<<<<<<<<
+ *                 # convert to C string
+ *                 s = seq
+ */
+      (__pyx_v_p[__pyx_v_k]) = 0;
+    }
+
+    /* "pysam/csamfile.pyx":2459
+ *                     p[k] = 0
+ *                 # convert to C string
+ *                 s = seq             # <<<<<<<<<<<<<<
+ *                 for k from 0 <= k < l:
+ *                     p[k/2] |= seq_nt16_table[<unsigned char>s[k]] << 4 * (1 - k % 2)
+ */
+    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_seq); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_s = __pyx_t_6;
+
+    /* "pysam/csamfile.pyx":2460
+ *                 # convert to C string
+ *                 s = seq
+ *                 for k from 0 <= k < l:             # <<<<<<<<<<<<<<
+ *                     p[k/2] |= seq_nt16_table[<unsigned char>s[k]] << 4 * (1 - k % 2)
+ * 
+ */
+    __pyx_t_5 = __pyx_v_l;
+    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
+
+      /* "pysam/csamfile.pyx":2461
+ *                 s = seq
+ *                 for k from 0 <= k < l:
+ *                     p[k/2] |= seq_nt16_table[<unsigned char>s[k]] << 4 * (1 - k % 2)             # <<<<<<<<<<<<<<
+ * 
+ *                 # erase qualities
+ */
+      __pyx_t_7 = __Pyx_div_long(__pyx_v_k, 2);
+      (__pyx_v_p[__pyx_t_7]) = ((__pyx_v_p[__pyx_t_7]) | ((seq_nt16_table[((unsigned char)(__pyx_v_s[__pyx_v_k]))]) << (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2)))));
+    }
+
+    /* "pysam/csamfile.pyx":2464
+ * 
+ *                 # erase qualities
+ *                 p = pysam_bam_get_qual(src)             # <<<<<<<<<<<<<<
+ *                 p[0] = 0xff
+ * 
+ */
+    __pyx_v_p = pysam_bam_get_qual(__pyx_v_src);
+
+    /* "pysam/csamfile.pyx":2465
+ *                 # erase qualities
+ *                 p = pysam_bam_get_qual(src)
+ *                 p[0] = 0xff             # <<<<<<<<<<<<<<
+ * 
+ *     property qual:
+ */
+    (__pyx_v_p[0]) = 0xff;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "pysam/csamfile.pyx":2421
+ *             return get_seq_range(src, 0, src.core.l_qseq)
+ * 
+ *         def __set__(self, seq):             # <<<<<<<<<<<<<<
+ *             # samtools manages sequence and quality length memory together
+ *             # if no quality information is present, the first byte says 0xff.
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.seq.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_seq);
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2482
+ *         quality scores and the sequence are not the same.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ * 
+ *             cdef bam1_t * src
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4qual_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4qual_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4qual___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4qual___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2482);
+
+  /* "pysam/csamfile.pyx":2487
+ *             cdef char * q
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ * 
+ *             if src.core.l_qseq == 0: return None
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2489
+ *             src = self._delegate
+ * 
+ *             if src.core.l_qseq == 0: return None             # <<<<<<<<<<<<<<
+ * 
+ *             return get_qual_range(src, 0, src.core.l_qseq)
+ */
+  __pyx_t_2 = ((__pyx_v_src->core.l_qseq == 0) != 0);
+  if (__pyx_t_2) {
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2491
+ *             if src.core.l_qseq == 0: return None
+ * 
+ *             return get_qual_range(src, 0, src.core.l_qseq)             # <<<<<<<<<<<<<<
+ * 
+ *         def __set__(self,qual):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = __pyx_f_5pysam_8csamfile_get_qual_range(__pyx_v_src, 0, __pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2482
+ *         quality scores and the sequence are not the same.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ * 
+ *             cdef bam1_t * src
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.qual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2493
+ *             return get_qual_range(src, 0, src.core.l_qseq)
+ * 
+ *         def __set__(self,qual):             # <<<<<<<<<<<<<<
+ *             # note that space is already allocated via the sequences
+ *             cdef bam1_t * src
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4qual_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4qual_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4qual_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_qual));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4qual_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qual) {
+  bam1_t *__pyx_v_src;
+  uint8_t *__pyx_v_p;
+  char *__pyx_v_q;
+  int __pyx_v_k;
+  int __pyx_v_l;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  Py_ssize_t __pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  char *__pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_t_10;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2493);
+  __Pyx_INCREF(__pyx_v_qual);
+
+  /* "pysam/csamfile.pyx":2500
+ *             cdef int k
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             p = pysam_bam_get_qual(src)
+ *             if qual == None or len(qual) == 0:
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2501
+ * 
+ *             src = self._delegate
+ *             p = pysam_bam_get_qual(src)             # <<<<<<<<<<<<<<
+ *             if qual == None or len(qual) == 0:
+ *                 # if absent - set to 0xff
+ */
+  __pyx_v_p = pysam_bam_get_qual(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2502
+ *             src = self._delegate
+ *             p = pysam_bam_get_qual(src)
+ *             if qual == None or len(qual) == 0:             # <<<<<<<<<<<<<<
+ *                 # if absent - set to 0xff
+ *                 p[0] = 0xff
+ */
+  __pyx_t_2 = PyObject_RichCompare(__pyx_v_qual, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (!__pyx_t_3) {
+    __pyx_t_4 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = (__pyx_t_4 == 0);
+    __pyx_t_6 = __pyx_t_5;
+  } else {
+    __pyx_t_6 = __pyx_t_3;
+  }
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":2504
+ *             if qual == None or len(qual) == 0:
+ *                 # if absent - set to 0xff
+ *                 p[0] = 0xff             # <<<<<<<<<<<<<<
+ *                 return
+ *             qual = _forceBytes(qual)
+ */
+    (__pyx_v_p[0]) = 0xff;
+
+    /* "pysam/csamfile.pyx":2505
+ *                 # if absent - set to 0xff
+ *                 p[0] = 0xff
+ *                 return             # <<<<<<<<<<<<<<
+ *             qual = _forceBytes(qual)
+ *             cdef int l
+ */
+    __pyx_r = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2506
+ *                 p[0] = 0xff
+ *                 return
+ *             qual = _forceBytes(qual)             # <<<<<<<<<<<<<<
+ *             cdef int l
+ *             # convert to C string
+ */
+  __pyx_t_2 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF_SET(__pyx_v_qual, __pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":2509
+ *             cdef int l
+ *             # convert to C string
+ *             q = qual             # <<<<<<<<<<<<<<
+ *             l = len(qual)
+ *             if src.core.l_qseq != l:
+ */
+  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_qual); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_q = __pyx_t_7;
+
+  /* "pysam/csamfile.pyx":2510
+ *             # convert to C string
+ *             q = qual
+ *             l = len(qual)             # <<<<<<<<<<<<<<
+ *             if src.core.l_qseq != l:
+ *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
+ */
+  __pyx_t_4 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_l = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":2511
+ *             q = qual
+ *             l = len(qual)
+ *             if src.core.l_qseq != l:             # <<<<<<<<<<<<<<
+ *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
+ *             assert src.core.l_qseq == l
+ */
+  __pyx_t_6 = ((__pyx_v_src->core.l_qseq != __pyx_v_l) != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":2512
+ *             l = len(qual)
+ *             if src.core.l_qseq != l:
+ *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))             # <<<<<<<<<<<<<<
+ *             assert src.core.l_qseq == l
+ *             for k from 0 <= k < l:
+ */
+    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_8 = __Pyx_PyInt_From_int32_t(__pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __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_8);
+    __Pyx_GIVEREF(__pyx_t_8);
+    __pyx_t_2 = 0;
+    __pyx_t_8 = 0;
+    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_quality_and_sequence_mismatch_i, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+    __Pyx_GIVEREF(__pyx_t_8);
+    __pyx_t_8 = 0;
+    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":2513
+ *             if src.core.l_qseq != l:
+ *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
+ *             assert src.core.l_qseq == l             # <<<<<<<<<<<<<<
+ *             for k from 0 <= k < l:
+ *                 p[k] = <uint8_t>q[k] - 33
+ */
+  #ifndef CYTHON_WITHOUT_ASSERTIONS
+  if (unlikely(!Py_OptimizeFlag)) {
+    if (unlikely(!((__pyx_v_src->core.l_qseq == __pyx_v_l) != 0))) {
+      PyErr_SetNone(PyExc_AssertionError);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+
+  /* "pysam/csamfile.pyx":2514
+ *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
+ *             assert src.core.l_qseq == l
+ *             for k from 0 <= k < l:             # <<<<<<<<<<<<<<
+ *                 p[k] = <uint8_t>q[k] - 33
+ * 
+ */
+  __pyx_t_10 = __pyx_v_l;
+  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_10; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":2515
+ *             assert src.core.l_qseq == l
+ *             for k from 0 <= k < l:
+ *                 p[k] = <uint8_t>q[k] - 33             # <<<<<<<<<<<<<<
+ * 
+ *     property query:
+ */
+    (__pyx_v_p[__pyx_v_k]) = (((uint8_t)(__pyx_v_q[__pyx_v_k])) - 33);
+  }
+
+  /* "pysam/csamfile.pyx":2493
+ *             return get_qual_range(src, 0, src.core.l_qseq)
+ * 
+ *         def __set__(self,qual):             # <<<<<<<<<<<<<<
+ *             # note that space is already allocated via the sequences
+ *             cdef bam1_t * src
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.qual.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_qual);
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2534
+ *         were not considered for alignment may have been retained."""
+ * 
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef uint32_t start, end
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5query_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5query_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5query___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5query___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  uint32_t __pyx_v_start;
+  uint32_t __pyx_v_end;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  int32_t __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2534);
+
+  /* "pysam/csamfile.pyx":2539
+ *             cdef char * s
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ * 
+ *             if src.core.l_qseq == 0: return None
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2541
+ *             src = self._delegate
+ * 
+ *             if src.core.l_qseq == 0: return None             # <<<<<<<<<<<<<<
+ * 
+ *             start = query_start(src)
+ */
+  __pyx_t_2 = ((__pyx_v_src->core.l_qseq == 0) != 0);
+  if (__pyx_t_2) {
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2543
+ *             if src.core.l_qseq == 0: return None
+ * 
+ *             start = query_start(src)             # <<<<<<<<<<<<<<
+ *             end   = query_end(src)
+ * 
+ */
+  __pyx_t_3 = __pyx_f_5pysam_8csamfile_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_start = __pyx_t_3;
+
+  /* "pysam/csamfile.pyx":2544
+ * 
+ *             start = query_start(src)
+ *             end   = query_end(src)             # <<<<<<<<<<<<<<
+ * 
+ *             return get_seq_range(src, start, end)
+ */
+  __pyx_t_3 = __pyx_f_5pysam_8csamfile_query_end(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_end = __pyx_t_3;
+
+  /* "pysam/csamfile.pyx":2546
+ *             end   = query_end(src)
+ * 
+ *             return get_seq_range(src, start, end)             # <<<<<<<<<<<<<<
+ * 
+ *     property qqual:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_4 = __pyx_f_5pysam_8csamfile_get_seq_range(__pyx_v_src, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_r = __pyx_t_4;
+  __pyx_t_4 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2534
+ *         were not considered for alignment may have been retained."""
+ * 
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef uint32_t start, end
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.query.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2557
+ * 
+ *         In Python 3, this property is of type bytes."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef uint32_t start, end
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5qqual_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5qqual_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5qqual___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5qqual___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  uint32_t __pyx_v_start;
+  uint32_t __pyx_v_end;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  int32_t __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2557);
+
+  /* "pysam/csamfile.pyx":2561
+ *             cdef uint32_t start, end
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ * 
+ *             if src.core.l_qseq == 0: return None
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2563
+ *             src = self._delegate
+ * 
+ *             if src.core.l_qseq == 0: return None             # <<<<<<<<<<<<<<
+ * 
+ *             start = query_start(src)
+ */
+  __pyx_t_2 = ((__pyx_v_src->core.l_qseq == 0) != 0);
+  if (__pyx_t_2) {
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2565
+ *             if src.core.l_qseq == 0: return None
+ * 
+ *             start = query_start(src)             # <<<<<<<<<<<<<<
+ *             end   = query_end(src)
+ * 
+ */
+  __pyx_t_3 = __pyx_f_5pysam_8csamfile_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_start = __pyx_t_3;
+
+  /* "pysam/csamfile.pyx":2566
+ * 
+ *             start = query_start(src)
+ *             end   = query_end(src)             # <<<<<<<<<<<<<<
+ * 
+ *             return get_qual_range(src, start, end)
+ */
+  __pyx_t_3 = __pyx_f_5pysam_8csamfile_query_end(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_end = __pyx_t_3;
+
+  /* "pysam/csamfile.pyx":2568
+ *             end   = query_end(src)
+ * 
+ *             return get_qual_range(src, start, end)             # <<<<<<<<<<<<<<
+ * 
+ *     property qstart:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_4 = __pyx_f_5pysam_8csamfile_get_qual_range(__pyx_v_src, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_r = __pyx_t_4;
+  __pyx_t_4 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2557
+ * 
+ *         In Python 3, this property is of type bytes."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef uint32_t start, end
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.qqual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2575
+ *         This the index of the first base in :attr:`seq` that is not soft-clipped.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return query_start(self._delegate)
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_6qstart_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_6qstart_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_6qstart___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_6qstart___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2575);
+
+  /* "pysam/csamfile.pyx":2576
+ *         """
+ *         def __get__(self):
+ *             return query_start(self._delegate)             # <<<<<<<<<<<<<<
+ * 
+ *     property qend:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile_query_start(__pyx_v_self->_delegate); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2575
+ *         This the index of the first base in :attr:`seq` that is not soft-clipped.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return query_start(self._delegate)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.qstart.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2580
+ *     property qend:
+ *         """end index of the aligned query portion of the sequence (0-based, exclusive)"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return query_end(self._delegate)
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4qend_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4qend_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4qend___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4qend___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2580);
+
+  /* "pysam/csamfile.pyx":2581
+ *         """end index of the aligned query portion of the sequence (0-based, exclusive)"""
+ *         def __get__(self):
+ *             return query_end(self._delegate)             # <<<<<<<<<<<<<<
+ * 
+ *     property qlen:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile_query_end(__pyx_v_self->_delegate); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2580
+ *     property qend:
+ *         """end index of the aligned query portion of the sequence (0-based, exclusive)"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return query_end(self._delegate)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.qend.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2587
+ * 
+ *         This is equal to :attr:`qend` - :attr:`qstart`"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4qlen_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4qlen_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4qlen___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4qlen___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int32_t __pyx_t_2;
+  int32_t __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2587);
+
+  /* "pysam/csamfile.pyx":2589
+ *         def __get__(self):
+ *             cdef bam1_t * src
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             return query_end(src)-query_start(src)
+ * 
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2590
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ *             return query_end(src)-query_start(src)             # <<<<<<<<<<<<<<
+ * 
+ *     property tags:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __pyx_f_5pysam_8csamfile_query_end(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_f_5pysam_8csamfile_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_t_2 - __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_r = __pyx_t_4;
+  __pyx_t_4 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2587
+ * 
+ *         This is equal to :attr:`qend` - :attr:`qstart`"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.qlen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2606
+ *         multiple times.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef char * ctag
+ *             cdef bam1_t * src
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4tags_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4tags_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4tags___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4tags___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  uint8_t *__pyx_v_s;
+  char __pyx_v_auxtag[3];
+  char __pyx_v_auxtype;
+  uint8_t __pyx_v_byte_size;
+  int32_t __pyx_v_nvalues;
+  PyObject *__pyx_v_result = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  uint8_t __pyx_t_10;
+  int32_t __pyx_t_11;
+  int __pyx_t_12;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2606);
+
+  /* "pysam/csamfile.pyx":2615
+ *             cdef int32_t nvalues
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             if src.l_data == 0:
+ *                 return []
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2616
+ * 
+ *             src = self._delegate
+ *             if src.l_data == 0:             # <<<<<<<<<<<<<<
+ *                 return []
+ *             s = pysam_bam_get_aux(src)
+ */
+  __pyx_t_2 = ((__pyx_v_src->l_data == 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":2617
+ *             src = self._delegate
+ *             if src.l_data == 0:
+ *                 return []             # <<<<<<<<<<<<<<
+ *             s = pysam_bam_get_aux(src)
+ *             result = []
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2618
+ *             if src.l_data == 0:
+ *                 return []
+ *             s = pysam_bam_get_aux(src)             # <<<<<<<<<<<<<<
+ *             result = []
+ *             auxtag[2] = 0
+ */
+  __pyx_v_s = pysam_bam_get_aux(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2619
+ *                 return []
+ *             s = pysam_bam_get_aux(src)
+ *             result = []             # <<<<<<<<<<<<<<
+ *             auxtag[2] = 0
+ *             while s < (src.data + src.l_data):
+ */
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_result = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":2620
+ *             s = pysam_bam_get_aux(src)
+ *             result = []
+ *             auxtag[2] = 0             # <<<<<<<<<<<<<<
+ *             while s < (src.data + src.l_data):
+ *                 # get tag
+ */
+  (__pyx_v_auxtag[2]) = 0;
+
+  /* "pysam/csamfile.pyx":2621
+ *             result = []
+ *             auxtag[2] = 0
+ *             while s < (src.data + src.l_data):             # <<<<<<<<<<<<<<
+ *                 # get tag
+ *                 auxtag[0] = s[0]
+ */
+  while (1) {
+    __pyx_t_2 = ((__pyx_v_s < (__pyx_v_src->data + __pyx_v_src->l_data)) != 0);
+    if (!__pyx_t_2) break;
+
+    /* "pysam/csamfile.pyx":2623
+ *             while s < (src.data + src.l_data):
+ *                 # get tag
+ *                 auxtag[0] = s[0]             # <<<<<<<<<<<<<<
+ *                 auxtag[1] = s[1]
+ *                 s += 2
+ */
+    (__pyx_v_auxtag[0]) = (__pyx_v_s[0]);
+
+    /* "pysam/csamfile.pyx":2624
+ *                 # get tag
+ *                 auxtag[0] = s[0]
+ *                 auxtag[1] = s[1]             # <<<<<<<<<<<<<<
+ *                 s += 2
+ *                 auxtype = s[0]
+ */
+    (__pyx_v_auxtag[1]) = (__pyx_v_s[1]);
+
+    /* "pysam/csamfile.pyx":2625
+ *                 auxtag[0] = s[0]
+ *                 auxtag[1] = s[1]
+ *                 s += 2             # <<<<<<<<<<<<<<
+ *                 auxtype = s[0]
+ *                 if auxtype in ('c', 'C'):
+ */
+    __pyx_v_s = (__pyx_v_s + 2);
+
+    /* "pysam/csamfile.pyx":2626
+ *                 auxtag[1] = s[1]
+ *                 s += 2
+ *                 auxtype = s[0]             # <<<<<<<<<<<<<<
+ *                 if auxtype in ('c', 'C'):
+ *                     value = <int>bam_aux2i(s)
+ */
+    __pyx_v_auxtype = (__pyx_v_s[0]);
+
+    /* "pysam/csamfile.pyx":2649
+ *                     # +1 for NULL terminated string
+ *                     s += len(value) + 1
+ *                 elif auxtype == 'B':             # <<<<<<<<<<<<<<
+ *                     s += 1
+ *                     byte_size, nvalues, value = convertBinaryTagToList( s )
+ */
+    switch (__pyx_v_auxtype) {
+
+      /* "pysam/csamfile.pyx":2627
+ *                 s += 2
+ *                 auxtype = s[0]
+ *                 if auxtype in ('c', 'C'):             # <<<<<<<<<<<<<<
+ *                     value = <int>bam_aux2i(s)
+ *                     s += 1
+ */
+      case 'c':
+      case 'C':
+
+      /* "pysam/csamfile.pyx":2628
+ *                 auxtype = s[0]
+ *                 if auxtype in ('c', 'C'):
+ *                     value = <int>bam_aux2i(s)             # <<<<<<<<<<<<<<
+ *                     s += 1
+ *                 elif auxtype in ('s', 'S'):
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_int(((int)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
+      __pyx_t_3 = 0;
+
+      /* "pysam/csamfile.pyx":2629
+ *                 if auxtype in ('c', 'C'):
+ *                     value = <int>bam_aux2i(s)
+ *                     s += 1             # <<<<<<<<<<<<<<
+ *                 elif auxtype in ('s', 'S'):
+ *                     value = <int>bam_aux2i(s)
+ */
+      __pyx_v_s = (__pyx_v_s + 1);
+      break;
+
+      /* "pysam/csamfile.pyx":2630
+ *                     value = <int>bam_aux2i(s)
+ *                     s += 1
+ *                 elif auxtype in ('s', 'S'):             # <<<<<<<<<<<<<<
+ *                     value = <int>bam_aux2i(s)
+ *                     s += 2
+ */
+      case 's':
+      case 'S':
+
+      /* "pysam/csamfile.pyx":2631
+ *                     s += 1
+ *                 elif auxtype in ('s', 'S'):
+ *                     value = <int>bam_aux2i(s)             # <<<<<<<<<<<<<<
+ *                     s += 2
+ *                 elif auxtype in ('i', 'I'):
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_int(((int)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
+      __pyx_t_3 = 0;
+
+      /* "pysam/csamfile.pyx":2632
+ *                 elif auxtype in ('s', 'S'):
+ *                     value = <int>bam_aux2i(s)
+ *                     s += 2             # <<<<<<<<<<<<<<
+ *                 elif auxtype in ('i', 'I'):
+ *                     value = <int32_t>bam_aux2i(s)
+ */
+      __pyx_v_s = (__pyx_v_s + 2);
+      break;
+
+      /* "pysam/csamfile.pyx":2633
+ *                     value = <int>bam_aux2i(s)
+ *                     s += 2
+ *                 elif auxtype in ('i', 'I'):             # <<<<<<<<<<<<<<
+ *                     value = <int32_t>bam_aux2i(s)
+ *                     s += 4
+ */
+      case 'i':
+      case 'I':
+
+      /* "pysam/csamfile.pyx":2634
+ *                     s += 2
+ *                 elif auxtype in ('i', 'I'):
+ *                     value = <int32_t>bam_aux2i(s)             # <<<<<<<<<<<<<<
+ *                     s += 4
+ *                 elif auxtype == 'f':
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_int32_t(((int32_t)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
+      __pyx_t_3 = 0;
+
+      /* "pysam/csamfile.pyx":2635
+ *                 elif auxtype in ('i', 'I'):
+ *                     value = <int32_t>bam_aux2i(s)
+ *                     s += 4             # <<<<<<<<<<<<<<
+ *                 elif auxtype == 'f':
+ *                     value = <float>bam_aux2f(s)
+ */
+      __pyx_v_s = (__pyx_v_s + 4);
+      break;
+
+      /* "pysam/csamfile.pyx":2636
+ *                     value = <int32_t>bam_aux2i(s)
+ *                     s += 4
+ *                 elif auxtype == 'f':             # <<<<<<<<<<<<<<
+ *                     value = <float>bam_aux2f(s)
+ *                     s += 4
+ */
+      case 'f':
+
+      /* "pysam/csamfile.pyx":2637
+ *                     s += 4
+ *                 elif auxtype == 'f':
+ *                     value = <float>bam_aux2f(s)             # <<<<<<<<<<<<<<
+ *                     s += 4
+ *                 elif auxtype == 'd':
+ */
+      __pyx_t_3 = PyFloat_FromDouble(((float)bam_aux2f(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
+      __pyx_t_3 = 0;
+
+      /* "pysam/csamfile.pyx":2638
+ *                 elif auxtype == 'f':
+ *                     value = <float>bam_aux2f(s)
+ *                     s += 4             # <<<<<<<<<<<<<<
+ *                 elif auxtype == 'd':
+ *                     value = <double>bam_aux2f(s)
+ */
+      __pyx_v_s = (__pyx_v_s + 4);
+      break;
+
+      /* "pysam/csamfile.pyx":2639
+ *                     value = <float>bam_aux2f(s)
+ *                     s += 4
+ *                 elif auxtype == 'd':             # <<<<<<<<<<<<<<
+ *                     value = <double>bam_aux2f(s)
+ *                     s += 8
+ */
+      case 'd':
+
+      /* "pysam/csamfile.pyx":2640
+ *                     s += 4
+ *                 elif auxtype == 'd':
+ *                     value = <double>bam_aux2f(s)             # <<<<<<<<<<<<<<
+ *                     s += 8
+ *                 elif auxtype == 'A':
+ */
+      __pyx_t_3 = PyFloat_FromDouble(((double)bam_aux2f(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
+      __pyx_t_3 = 0;
+
+      /* "pysam/csamfile.pyx":2641
+ *                 elif auxtype == 'd':
+ *                     value = <double>bam_aux2f(s)
+ *                     s += 8             # <<<<<<<<<<<<<<
+ *                 elif auxtype == 'A':
+ *                     value = "%c" % <char>bam_aux2A(s)
+ */
+      __pyx_v_s = (__pyx_v_s + 8);
+      break;
+
+      /* "pysam/csamfile.pyx":2642
+ *                     value = <double>bam_aux2f(s)
+ *                     s += 8
+ *                 elif auxtype == 'A':             # <<<<<<<<<<<<<<
+ *                     value = "%c" % <char>bam_aux2A(s)
+ *                     s += 1
+ */
+      case 'A':
+
+      /* "pysam/csamfile.pyx":2643
+ *                     s += 8
+ *                 elif auxtype == 'A':
+ *                     value = "%c" % <char>bam_aux2A(s)             # <<<<<<<<<<<<<<
+ *                     s += 1
+ *                 elif auxtype in ('Z', 'H'):
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_char(((char)bam_aux2A(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_c_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
+      __pyx_t_4 = 0;
+
+      /* "pysam/csamfile.pyx":2644
+ *                 elif auxtype == 'A':
+ *                     value = "%c" % <char>bam_aux2A(s)
+ *                     s += 1             # <<<<<<<<<<<<<<
+ *                 elif auxtype in ('Z', 'H'):
+ *                     value = _charptr_to_str(<char*>bam_aux2Z(s))
+ */
+      __pyx_v_s = (__pyx_v_s + 1);
+      break;
+
+      /* "pysam/csamfile.pyx":2645
+ *                     value = "%c" % <char>bam_aux2A(s)
+ *                     s += 1
+ *                 elif auxtype in ('Z', 'H'):             # <<<<<<<<<<<<<<
+ *                     value = _charptr_to_str(<char*>bam_aux2Z(s))
+ *                     # +1 for NULL terminated string
+ */
+      case 'Z':
+      case 'H':
+
+      /* "pysam/csamfile.pyx":2646
+ *                     s += 1
+ *                 elif auxtype in ('Z', 'H'):
+ *                     value = _charptr_to_str(<char*>bam_aux2Z(s))             # <<<<<<<<<<<<<<
+ *                     # +1 for NULL terminated string
+ *                     s += len(value) + 1
+ */
+      __pyx_t_4 = __pyx_f_5pysam_8csamfile__charptr_to_str(((char *)bam_aux2Z(__pyx_v_s))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
+      __pyx_t_4 = 0;
+
+      /* "pysam/csamfile.pyx":2648
+ *                     value = _charptr_to_str(<char*>bam_aux2Z(s))
+ *                     # +1 for NULL terminated string
+ *                     s += len(value) + 1             # <<<<<<<<<<<<<<
+ *                 elif auxtype == 'B':
+ *                     s += 1
+ */
+      __pyx_t_5 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_s = (__pyx_v_s + (__pyx_t_5 + 1));
+      break;
+
+      /* "pysam/csamfile.pyx":2649
+ *                     # +1 for NULL terminated string
+ *                     s += len(value) + 1
+ *                 elif auxtype == 'B':             # <<<<<<<<<<<<<<
+ *                     s += 1
+ *                     byte_size, nvalues, value = convertBinaryTagToList( s )
+ */
+      case 'B':
+
+      /* "pysam/csamfile.pyx":2650
+ *                     s += len(value) + 1
+ *                 elif auxtype == 'B':
+ *                     s += 1             # <<<<<<<<<<<<<<
+ *                     byte_size, nvalues, value = convertBinaryTagToList( s )
+ *                     # 5 for 1 char and 1 int
+ */
+      __pyx_v_s = (__pyx_v_s + 1);
+
+      /* "pysam/csamfile.pyx":2651
+ *                 elif auxtype == 'B':
+ *                     s += 1
+ *                     byte_size, nvalues, value = convertBinaryTagToList( s )             # <<<<<<<<<<<<<<
+ *                     # 5 for 1 char and 1 int
+ *                     s += 5 + ( nvalues * byte_size) - 1
+ */
+      __pyx_t_4 = __pyx_f_5pysam_8csamfile_convertBinaryTagToList(__pyx_v_s); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+        PyObject* sequence = __pyx_t_4;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        Py_ssize_t size = Py_SIZE(sequence);
+        #else
+        Py_ssize_t size = PySequence_Size(sequence);
+        #endif
+        if (unlikely(size != 3)) {
+          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        #if CYTHON_COMPILING_IN_CPYTHON
+        if (likely(PyTuple_CheckExact(sequence))) {
+          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
+          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
+        } else {
+          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
+          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+          __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
+        }
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_7);
+        #else
+        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        #endif
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      } else {
+        Py_ssize_t index = -1;
+        __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+        index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_3);
+        index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_6);
+        index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_7);
+        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = NULL;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        goto __pyx_L7_unpacking_done;
+        __pyx_L6_unpacking_failed:;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_9 = NULL;
+        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_L7_unpacking_done:;
+      }
+      __pyx_t_10 = __Pyx_PyInt_As_uint8_t(__pyx_t_3); if (unlikely((__pyx_t_10 == (uint8_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_11 = __Pyx_PyInt_As_int32_t(__pyx_t_6); if (unlikely((__pyx_t_11 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_v_byte_size = __pyx_t_10;
+      __pyx_v_nvalues = __pyx_t_11;
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "pysam/csamfile.pyx":2653
+ *                     byte_size, nvalues, value = convertBinaryTagToList( s )
+ *                     # 5 for 1 char and 1 int
+ *                     s += 5 + ( nvalues * byte_size) - 1             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     raise KeyError("unknown type '%s'" % auxtype)
+ */
+      __pyx_v_s = (__pyx_v_s + ((5 + (__pyx_v_nvalues * __pyx_v_byte_size)) - 1));
+      break;
+      default:
+
+      /* "pysam/csamfile.pyx":2655
+ *                     s += 5 + ( nvalues * byte_size) - 1
+ *                 else:
+ *                     raise KeyError("unknown type '%s'" % auxtype)             # <<<<<<<<<<<<<<
+ * 
+ *                 s += 1
+ */
+      __pyx_t_4 = __Pyx_PyInt_From_char(__pyx_v_auxtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_unknown_type_s, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __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 = 2655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      break;
+    }
+
+    /* "pysam/csamfile.pyx":2657
+ *                     raise KeyError("unknown type '%s'" % auxtype)
+ * 
+ *                 s += 1             # <<<<<<<<<<<<<<
+ * 
+ *                 result.append((_charptr_to_str(auxtag), value))
+ */
+    __pyx_v_s = (__pyx_v_s + 1);
+
+    /* "pysam/csamfile.pyx":2659
+ *                 s += 1
+ * 
+ *                 result.append((_charptr_to_str(auxtag), value))             # <<<<<<<<<<<<<<
+ * 
+ *             return result
+ */
+    __pyx_t_7 = __pyx_f_5pysam_8csamfile__charptr_to_str(__pyx_v_auxtag); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2659; __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 = 2659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __Pyx_INCREF(__pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
+    __Pyx_GIVEREF(__pyx_v_value);
+    __pyx_t_7 = 0;
+    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  }
+
+  /* "pysam/csamfile.pyx":2661
+ *                 result.append((_charptr_to_str(auxtag), value))
+ * 
+ *             return result             # <<<<<<<<<<<<<<
+ * 
+ *         def __set__(self, tags):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __pyx_v_result;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2606
+ *         multiple times.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef char * ctag
+ *             cdef bam1_t * src
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.tags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_result);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2663
+ *             return result
+ * 
+ *         def __set__(self, tags):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef uint8_t * s
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4tags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tags); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4tags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tags) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4tags_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_tags));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4tags_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tags) {
+  bam1_t *__pyx_v_src;
+  uint8_t *__pyx_v_s;
+  char *__pyx_v_temp;
+  int __pyx_v_new_size;
+  int __pyx_v_old_size;
+  PyObject *__pyx_v_fmts = NULL;
+  PyObject *__pyx_v_args = NULL;
+  PyObject *__pyx_v_pytag = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_v_fmt = NULL;
+  PyObject *__pyx_v_buffer = NULL;
+  PyObject *__pyx_v_p = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  Py_ssize_t __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *(*__pyx_t_12)(PyObject *);
+  int __pyx_t_13;
+  char *__pyx_t_14;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2663);
+
+  /* "pysam/csamfile.pyx":2667
+ *             cdef uint8_t * s
+ *             cdef char * temp
+ *             cdef int new_size = 0             # <<<<<<<<<<<<<<
+ *             cdef int old_size
+ *             src = self._delegate
+ */
+  __pyx_v_new_size = 0;
+
+  /* "pysam/csamfile.pyx":2669
+ *             cdef int new_size = 0
+ *             cdef int old_size
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             fmts, args = ["<"], []
+ * 
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2670
+ *             cdef int old_size
+ *             src = self._delegate
+ *             fmts, args = ["<"], []             # <<<<<<<<<<<<<<
+ * 
+ *             if tags is not None and len(tags) > 0:
+ */
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_kp_s__76);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__76);
+  __Pyx_GIVEREF(__pyx_kp_s__76);
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_fmts = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_v_args = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":2672
+ *             fmts, args = ["<"], []
+ * 
+ *             if tags is not None and len(tags) > 0:             # <<<<<<<<<<<<<<
+ *                 for pytag, value in tags:
+ *                     convert_python_tag(pytag, value, fmts, args)
+ */
+  __pyx_t_4 = (__pyx_v_tags != Py_None);
+  if ((__pyx_t_4 != 0)) {
+    __pyx_t_5 = PyObject_Length(__pyx_v_tags); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = ((__pyx_t_5 > 0) != 0);
+    __pyx_t_7 = __pyx_t_6;
+  } else {
+    __pyx_t_7 = (__pyx_t_4 != 0);
+  }
+  if (__pyx_t_7) {
+
+    /* "pysam/csamfile.pyx":2673
+ * 
+ *             if tags is not None and len(tags) > 0:
+ *                 for pytag, value in tags:             # <<<<<<<<<<<<<<
+ *                     convert_python_tag(pytag, value, fmts, args)
+ *                 fmt = "".join(fmts)
+ */
+    if (PyList_CheckExact(__pyx_v_tags) || PyTuple_CheckExact(__pyx_v_tags)) {
+      __pyx_t_3 = __pyx_v_tags; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
+      __pyx_t_8 = NULL;
+    } else {
+      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_tags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
+    }
+    for (;;) {
+      if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_3)) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_3)) {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_2 = __pyx_t_8(__pyx_t_3);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+        PyObject* sequence = __pyx_t_2;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        Py_ssize_t size = Py_SIZE(sequence);
+        #else
+        Py_ssize_t size = PySequence_Size(sequence);
+        #endif
+        if (unlikely(size != 2)) {
+          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        #if CYTHON_COMPILING_IN_CPYTHON
+        if (likely(PyTuple_CheckExact(sequence))) {
+          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
+          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
+        } else {
+          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
+          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
+        }
+        __Pyx_INCREF(__pyx_t_9);
+        __Pyx_INCREF(__pyx_t_10);
+        #else
+        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        #endif
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      } else {
+        Py_ssize_t index = -1;
+        __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
+        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_9);
+        index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_10);
+        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = NULL;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        goto __pyx_L7_unpacking_done;
+        __pyx_L6_unpacking_failed:;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __pyx_t_12 = NULL;
+        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_L7_unpacking_done:;
+      }
+      __Pyx_XDECREF_SET(__pyx_v_pytag, __pyx_t_9);
+      __pyx_t_9 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10);
+      __pyx_t_10 = 0;
+
+      /* "pysam/csamfile.pyx":2674
+ *             if tags is not None and len(tags) > 0:
+ *                 for pytag, value in tags:
+ *                     convert_python_tag(pytag, value, fmts, args)             # <<<<<<<<<<<<<<
+ *                 fmt = "".join(fmts)
+ *                 new_size = struct.calcsize(fmt)
+ */
+      __pyx_t_2 = __pyx_f_5pysam_8csamfile_convert_python_tag(__pyx_v_pytag, __pyx_v_value, __pyx_v_fmts, __pyx_v_args); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __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_3); __pyx_t_3 = 0;
+
+    /* "pysam/csamfile.pyx":2675
+ *                 for pytag, value in tags:
+ *                     convert_python_tag(pytag, value, fmts, args)
+ *                 fmt = "".join(fmts)             # <<<<<<<<<<<<<<
+ *                 new_size = struct.calcsize(fmt)
+ *                 buffer = ctypes.create_string_buffer(new_size)
+ */
+    __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__9, __pyx_v_fmts); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_v_fmt = ((PyObject*)__pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "pysam/csamfile.pyx":2676
+ *                     convert_python_tag(pytag, value, fmts, args)
+ *                 fmt = "".join(fmts)
+ *                 new_size = struct.calcsize(fmt)             # <<<<<<<<<<<<<<
+ *                 buffer = ctypes.create_string_buffer(new_size)
+ *                 struct.pack_into(fmt,
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_struct); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_calcsize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __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 = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_fmt);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fmt);
+    __Pyx_GIVEREF(__pyx_v_fmt);
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __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_3); __pyx_t_3 = 0;
+    __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_10); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_v_new_size = __pyx_t_13;
+
+    /* "pysam/csamfile.pyx":2677
+ *                 fmt = "".join(fmts)
+ *                 new_size = struct.calcsize(fmt)
+ *                 buffer = ctypes.create_string_buffer(new_size)             # <<<<<<<<<<<<<<
+ *                 struct.pack_into(fmt,
+ *                                  buffer,
+ */
+    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_create_string_buffer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_new_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10);
+    __Pyx_GIVEREF(__pyx_t_10);
+    __pyx_t_10 = 0;
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2677; __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_2); __pyx_t_2 = 0;
+    __pyx_v_buffer = __pyx_t_10;
+    __pyx_t_10 = 0;
+
+    /* "pysam/csamfile.pyx":2678
+ *                 new_size = struct.calcsize(fmt)
+ *                 buffer = ctypes.create_string_buffer(new_size)
+ *                 struct.pack_into(fmt,             # <<<<<<<<<<<<<<
+ *                                  buffer,
+ *                                  0,
+ */
+    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_struct); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_pack_into); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+    /* "pysam/csamfile.pyx":2679
+ *                 buffer = ctypes.create_string_buffer(new_size)
+ *                 struct.pack_into(fmt,
+ *                                  buffer,             # <<<<<<<<<<<<<<
+ *                                  0,
+ *                                  *args)
+ */
+    __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_INCREF(__pyx_v_fmt);
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_fmt);
+    __Pyx_GIVEREF(__pyx_v_fmt);
+    __Pyx_INCREF(__pyx_v_buffer);
+    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_buffer);
+    __Pyx_GIVEREF(__pyx_v_buffer);
+    __Pyx_INCREF(__pyx_int_0);
+    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_int_0);
+    __Pyx_GIVEREF(__pyx_int_0);
+
+    /* "pysam/csamfile.pyx":2678
+ *                 new_size = struct.calcsize(fmt)
+ *                 buffer = ctypes.create_string_buffer(new_size)
+ *                 struct.pack_into(fmt,             # <<<<<<<<<<<<<<
+ *                                  buffer,
+ *                                  0,
+ */
+    __pyx_t_3 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __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_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __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_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":2686
+ *             # If total_size == 0, the aux field will be
+ *             # empty
+ *             old_size = pysam_bam_get_l_aux(src)             # <<<<<<<<<<<<<<
+ *             pysam_bam_update(src,
+ *                              old_size,
+ */
+  __pyx_v_old_size = pysam_bam_get_l_aux(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":2687
+ *             # empty
+ *             old_size = pysam_bam_get_l_aux(src)
+ *             pysam_bam_update(src,             # <<<<<<<<<<<<<<
+ *                              old_size,
+ *                              new_size,
+ */
+  pysam_bam_update(__pyx_v_src, __pyx_v_old_size, __pyx_v_new_size, pysam_bam_get_aux(__pyx_v_src));
+
+  /* "pysam/csamfile.pyx":2693
+ * 
+ *             # copy data only if there is any
+ *             if new_size > 0:             # <<<<<<<<<<<<<<
+ * 
+ *                 # get location of new data
+ */
+  __pyx_t_7 = ((__pyx_v_new_size > 0) != 0);
+  if (__pyx_t_7) {
+
+    /* "pysam/csamfile.pyx":2696
+ * 
+ *                 # get location of new data
+ *                 s = pysam_bam_get_aux(src)             # <<<<<<<<<<<<<<
+ * 
+ *                 # check if there is direct path from buffer.raw to tmp
+ */
+    __pyx_v_s = pysam_bam_get_aux(__pyx_v_src);
+
+    /* "pysam/csamfile.pyx":2699
+ * 
+ *                 # check if there is direct path from buffer.raw to tmp
+ *                 p = buffer.raw             # <<<<<<<<<<<<<<
+ *                 # create handle to make sure buffer stays alive long
+ *                 # enough for memcpy, see issue 129
+ */
+    if (unlikely(!__pyx_v_buffer)) { __Pyx_RaiseUnboundLocalError("buffer"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_n_s_raw); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_v_p = __pyx_t_3;
+    __pyx_t_3 = 0;
+
+    /* "pysam/csamfile.pyx":2702
+ *                 # create handle to make sure buffer stays alive long
+ *                 # enough for memcpy, see issue 129
+ *                 temp = p             # <<<<<<<<<<<<<<
+ *                 memcpy(s, temp, new_size)
+ * 
+ */
+    __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_v_p); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_temp = __pyx_t_14;
+
+    /* "pysam/csamfile.pyx":2703
+ *                 # enough for memcpy, see issue 129
+ *                 temp = p
+ *                 memcpy(s, temp, new_size)             # <<<<<<<<<<<<<<
+ * 
+ *     cpdef setTag(self, tag, value,
+ */
+    memcpy(__pyx_v_s, __pyx_v_temp, __pyx_v_new_size);
+    goto __pyx_L8;
+  }
+  __pyx_L8:;
+
+  /* "pysam/csamfile.pyx":2663
+ *             return result
+ * 
+ *         def __set__(self, tags):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             cdef uint8_t * s
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.tags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_fmts);
+  __Pyx_XDECREF(__pyx_v_args);
+  __Pyx_XDECREF(__pyx_v_pytag);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XDECREF(__pyx_v_fmt);
+  __Pyx_XDECREF(__pyx_v_buffer);
+  __Pyx_XDECREF(__pyx_v_p);
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2705
+ *                 memcpy(s, temp, new_size)
+ * 
+ *     cpdef setTag(self, tag, value,             # <<<<<<<<<<<<<<
+ *                  value_type = None,
+ *                  replace = True):
+ */
+
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_13setTag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_f_5pysam_8csamfile_11AlignedRead_setTag(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_8csamfile_11AlignedRead_setTag *__pyx_optional_args) {
+
+  /* "pysam/csamfile.pyx":2706
+ * 
+ *     cpdef setTag(self, tag, value,
+ *                  value_type = None,             # <<<<<<<<<<<<<<
+ *                  replace = True):
+ *         '''
+ */
+  PyObject *__pyx_v_value_type = ((PyObject *)Py_None);
+
+  /* "pysam/csamfile.pyx":2707
+ *     cpdef setTag(self, tag, value,
+ *                  value_type = None,
+ *                  replace = True):             # <<<<<<<<<<<<<<
+ *         '''
+ *         Set optional field of alignment *tag* to *value*.  *value_type* may be specified,
+ */
+  PyObject *__pyx_v_replace = ((PyObject *)Py_True);
+  int __pyx_v_value_size;
+  uint8_t *__pyx_v_value_ptr;
+  uint8_t *__pyx_v_existing_ptr;
+  uint8_t __pyx_v_type_code;
+  float __pyx_v_float_value;
+  double __pyx_v_double_value;
+  int32_t __pyx_v_int_value;
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  bam1_t *__pyx_t_4;
+  Py_ssize_t __pyx_t_5;
+  int __pyx_t_6;
+  uint8_t __pyx_t_7;
+  struct __pyx_opt_args_5pysam_8csamfile_get_type_code __pyx_t_8;
+  char *__pyx_t_9;
+  int32_t __pyx_t_10;
+  double __pyx_t_11;
+  float __pyx_t_12;
+  char const *__pyx_t_13;
+  char const *__pyx_t_14;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("setTag", 0);
+  __Pyx_TraceCall("setTag", __pyx_f[0], 2705);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_value_type = __pyx_optional_args->value_type;
+      if (__pyx_optional_args->__pyx_n > 1) {
+        __pyx_v_replace = __pyx_optional_args->replace;
+      }
+    }
+  }
+  __Pyx_INCREF(__pyx_v_tag);
+  __Pyx_INCREF(__pyx_v_value);
+
+  /* "pysam/csamfile.pyx":2705
+ *                 memcpy(s, temp, new_size)
+ * 
+ *     cpdef setTag(self, tag, value,             # <<<<<<<<<<<<<<
+ *                  value_type = None,
+ *                  replace = True):
+ */
+  /* Check if called by wrapper */
+  if (unlikely(__pyx_skip_dispatch)) ;
+  /* Check if overridden in Python */
+  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5pysam_8csamfile_11AlignedRead_13setTag)) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_tag);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tag);
+      __Pyx_GIVEREF(__pyx_v_tag);
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __Pyx_INCREF(__pyx_v_value_type);
+      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_value_type);
+      __Pyx_GIVEREF(__pyx_v_value_type);
+      __Pyx_INCREF(__pyx_v_replace);
+      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_replace);
+      __Pyx_GIVEREF(__pyx_v_replace);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_r = __pyx_t_3;
+      __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "pysam/csamfile.pyx":2723
+ *         cdef double   double_value
+ *         cdef int32_t  int_value
+ *         cdef bam1_t * src = self._delegate             # <<<<<<<<<<<<<<
+ *         cdef char * _value_type
+ * 
+ */
+  __pyx_t_4 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":2726
+ *         cdef char * _value_type
+ * 
+ *         if len(tag) != 2:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid tag: %s' % tag)
+ * 
+ */
+  __pyx_t_5 = PyObject_Length(__pyx_v_tag); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = ((__pyx_t_5 != 2) != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":2727
+ * 
+ *         if len(tag) != 2:
+ *             raise ValueError('Invalid tag: %s' % tag)             # <<<<<<<<<<<<<<
+ * 
+ *         type_code = get_type_code(value, value_type)
+ */
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_tag_s, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2727; __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 = 2727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":2729
+ *             raise ValueError('Invalid tag: %s' % tag)
+ * 
+ *         type_code = get_type_code(value, value_type)             # <<<<<<<<<<<<<<
+ *         if type_code == 0:
+ *             raise ValueError("can't guess type or invalid type code specified")
+ */
+  __pyx_t_8.__pyx_n = 1;
+  __pyx_t_8.value_type = __pyx_v_value_type;
+  __pyx_t_7 = __pyx_f_5pysam_8csamfile_get_type_code(__pyx_v_value, &__pyx_t_8); 
+  __pyx_v_type_code = __pyx_t_7;
+
+  /* "pysam/csamfile.pyx":2730
+ * 
+ *         type_code = get_type_code(value, value_type)
+ *         if type_code == 0:             # <<<<<<<<<<<<<<
+ *             raise ValueError("can't guess type or invalid type code specified")
+ * 
+ */
+  __pyx_t_6 = ((__pyx_v_type_code == 0) != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":2731
+ *         type_code = get_type_code(value, value_type)
+ *         if type_code == 0:
+ *             raise ValueError("can't guess type or invalid type code specified")             # <<<<<<<<<<<<<<
+ * 
+ *         # Not Endian-safe, but then again neither is samtools!
+ */
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":2746
+ *             value_ptr    = <uint8_t*>&double_value
+ *             value_size   = sizeof(double)
+ *         elif type_code == 'f':             # <<<<<<<<<<<<<<
+ *             float_value  = value
+ *             value_ptr    = <uint8_t*>&float_value
+ */
+  switch (__pyx_v_type_code) {
+
+    /* "pysam/csamfile.pyx":2734
+ * 
+ *         # Not Endian-safe, but then again neither is samtools!
+ *         if type_code == 'Z':             # <<<<<<<<<<<<<<
+ *             value = _forceBytes( value )
+ *             value_ptr    = <uint8_t*><char*>value
+ */
+    case 'Z':
+
+    /* "pysam/csamfile.pyx":2735
+ *         # Not Endian-safe, but then again neither is samtools!
+ *         if type_code == 'Z':
+ *             value = _forceBytes( value )             # <<<<<<<<<<<<<<
+ *             value_ptr    = <uint8_t*><char*>value
+ *             value_size   = len(value)+1
+ */
+    __pyx_t_1 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "pysam/csamfile.pyx":2736
+ *         if type_code == 'Z':
+ *             value = _forceBytes( value )
+ *             value_ptr    = <uint8_t*><char*>value             # <<<<<<<<<<<<<<
+ *             value_size   = len(value)+1
+ *         elif type_code == 'i':
+ */
+    __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_value_ptr = ((uint8_t *)((char *)__pyx_t_9));
+
+    /* "pysam/csamfile.pyx":2737
+ *             value = _forceBytes( value )
+ *             value_ptr    = <uint8_t*><char*>value
+ *             value_size   = len(value)+1             # <<<<<<<<<<<<<<
+ *         elif type_code == 'i':
+ *             int_value    = value
+ */
+    __pyx_t_5 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_value_size = (__pyx_t_5 + 1);
+    break;
+
+    /* "pysam/csamfile.pyx":2738
+ *             value_ptr    = <uint8_t*><char*>value
+ *             value_size   = len(value)+1
+ *         elif type_code == 'i':             # <<<<<<<<<<<<<<
+ *             int_value    = value
+ *             value_ptr    = <uint8_t*>&int_value
+ */
+    case 'i':
+
+    /* "pysam/csamfile.pyx":2739
+ *             value_size   = len(value)+1
+ *         elif type_code == 'i':
+ *             int_value    = value             # <<<<<<<<<<<<<<
+ *             value_ptr    = <uint8_t*>&int_value
+ *             value_size   = sizeof(int32_t)
+ */
+    __pyx_t_10 = __Pyx_PyInt_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_10 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_int_value = __pyx_t_10;
+
+    /* "pysam/csamfile.pyx":2740
+ *         elif type_code == 'i':
+ *             int_value    = value
+ *             value_ptr    = <uint8_t*>&int_value             # <<<<<<<<<<<<<<
+ *             value_size   = sizeof(int32_t)
+ *         elif type_code == 'd':
+ */
+    __pyx_v_value_ptr = ((uint8_t *)(&__pyx_v_int_value));
+
+    /* "pysam/csamfile.pyx":2741
+ *             int_value    = value
+ *             value_ptr    = <uint8_t*>&int_value
+ *             value_size   = sizeof(int32_t)             # <<<<<<<<<<<<<<
+ *         elif type_code == 'd':
+ *             double_value = value
+ */
+    __pyx_v_value_size = (sizeof(int32_t));
+    break;
+
+    /* "pysam/csamfile.pyx":2742
+ *             value_ptr    = <uint8_t*>&int_value
+ *             value_size   = sizeof(int32_t)
+ *         elif type_code == 'd':             # <<<<<<<<<<<<<<
+ *             double_value = value
+ *             value_ptr    = <uint8_t*>&double_value
+ */
+    case 'd':
+
+    /* "pysam/csamfile.pyx":2743
+ *             value_size   = sizeof(int32_t)
+ *         elif type_code == 'd':
+ *             double_value = value             # <<<<<<<<<<<<<<
+ *             value_ptr    = <uint8_t*>&double_value
+ *             value_size   = sizeof(double)
+ */
+    __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_double_value = __pyx_t_11;
+
+    /* "pysam/csamfile.pyx":2744
+ *         elif type_code == 'd':
+ *             double_value = value
+ *             value_ptr    = <uint8_t*>&double_value             # <<<<<<<<<<<<<<
+ *             value_size   = sizeof(double)
+ *         elif type_code == 'f':
+ */
+    __pyx_v_value_ptr = ((uint8_t *)(&__pyx_v_double_value));
+
+    /* "pysam/csamfile.pyx":2745
+ *             double_value = value
+ *             value_ptr    = <uint8_t*>&double_value
+ *             value_size   = sizeof(double)             # <<<<<<<<<<<<<<
+ *         elif type_code == 'f':
+ *             float_value  = value
+ */
+    __pyx_v_value_size = (sizeof(double));
+    break;
+
+    /* "pysam/csamfile.pyx":2746
+ *             value_ptr    = <uint8_t*>&double_value
+ *             value_size   = sizeof(double)
+ *         elif type_code == 'f':             # <<<<<<<<<<<<<<
+ *             float_value  = value
+ *             value_ptr    = <uint8_t*>&float_value
+ */
+    case 'f':
+
+    /* "pysam/csamfile.pyx":2747
+ *             value_size   = sizeof(double)
+ *         elif type_code == 'f':
+ *             float_value  = value             # <<<<<<<<<<<<<<
+ *             value_ptr    = <uint8_t*>&float_value
+ *             value_size   = sizeof(float)
+ */
+    __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_float_value = __pyx_t_12;
+
+    /* "pysam/csamfile.pyx":2748
+ *         elif type_code == 'f':
+ *             float_value  = value
+ *             value_ptr    = <uint8_t*>&float_value             # <<<<<<<<<<<<<<
+ *             value_size   = sizeof(float)
+ *         else:
+ */
+    __pyx_v_value_ptr = ((uint8_t *)(&__pyx_v_float_value));
+
+    /* "pysam/csamfile.pyx":2749
+ *             float_value  = value
+ *             value_ptr    = <uint8_t*>&float_value
+ *             value_size   = sizeof(float)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise ValueError('Unsupported value_type in set_option')
+ */
+    __pyx_v_value_size = (sizeof(float));
+    break;
+    default:
+
+    /* "pysam/csamfile.pyx":2751
+ *             value_size   = sizeof(float)
+ *         else:
+ *             raise ValueError('Unsupported value_type in set_option')             # <<<<<<<<<<<<<<
+ * 
+ *         tag = _forceBytes( tag )
+ */
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    break;
+  }
+
+  /* "pysam/csamfile.pyx":2753
+ *             raise ValueError('Unsupported value_type in set_option')
+ * 
+ *         tag = _forceBytes( tag )             # <<<<<<<<<<<<<<
+ *         if replace:
+ *             existing_ptr = bam_aux_get(src, tag)
+ */
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":2754
+ * 
+ *         tag = _forceBytes( tag )
+ *         if replace:             # <<<<<<<<<<<<<<
+ *             existing_ptr = bam_aux_get(src, tag)
+ *             if existing_ptr:
+ */
+  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_replace); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":2755
+ *         tag = _forceBytes( tag )
+ *         if replace:
+ *             existing_ptr = bam_aux_get(src, tag)             # <<<<<<<<<<<<<<
+ *             if existing_ptr:
+ *                 bam_aux_del(src, existing_ptr)
+ */
+    __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_v_tag); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_existing_ptr = bam_aux_get(__pyx_v_src, __pyx_t_13);
+
+    /* "pysam/csamfile.pyx":2756
+ *         if replace:
+ *             existing_ptr = bam_aux_get(src, tag)
+ *             if existing_ptr:             # <<<<<<<<<<<<<<
+ *                 bam_aux_del(src, existing_ptr)
+ * 
+ */
+    __pyx_t_6 = (__pyx_v_existing_ptr != 0);
+    if (__pyx_t_6) {
+
+      /* "pysam/csamfile.pyx":2757
+ *             existing_ptr = bam_aux_get(src, tag)
+ *             if existing_ptr:
+ *                 bam_aux_del(src, existing_ptr)             # <<<<<<<<<<<<<<
+ * 
+ *         bam_aux_append(src,
+ */
+      bam_aux_del(__pyx_v_src, __pyx_v_existing_ptr);
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "pysam/csamfile.pyx":2760
+ * 
+ *         bam_aux_append(src,
+ *                        tag,             # <<<<<<<<<<<<<<
+ *                        type_code,
+ *                        value_size,
+ */
+  __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_v_tag); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":2759
+ *                 bam_aux_del(src, existing_ptr)
+ * 
+ *         bam_aux_append(src,             # <<<<<<<<<<<<<<
+ *                        tag,
+ *                        type_code,
+ */
+  bam_aux_append(__pyx_v_src, __pyx_t_14, __pyx_v_type_code, __pyx_v_value_size, __pyx_v_value_ptr);
+
+  /* "pysam/csamfile.pyx":2705
+ *                 memcpy(s, temp, new_size)
+ * 
+ *     cpdef setTag(self, tag, value,             # <<<<<<<<<<<<<<
+ *                  value_type = None,
+ *                  replace = True):
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.setTag", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_tag);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_13setTag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_11AlignedRead_12setTag[] = "AlignedRead.setTag(self, tag, value, value_type=None, replace=True)\n\n        Set optional field of alignment *tag* to *value*.  *value_type* may be specified,\n        but if not the type will be inferred based on the Python type of *value*\n\n        An existing value of the same tag will be overwritten unless\n        *replace* is set to False.\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_13setTag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_tag = 0;
+  PyObject *__pyx_v_value = 0;
+  PyObject *__pyx_v_value_type = 0;
+  PyObject *__pyx_v_replace = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("setTag (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,&__pyx_n_s_value,&__pyx_n_s_value_type,&__pyx_n_s_replace,0};
+    PyObject* values[4] = {0,0,0,0};
+
+    /* "pysam/csamfile.pyx":2706
+ * 
+ *     cpdef setTag(self, tag, value,
+ *                  value_type = None,             # <<<<<<<<<<<<<<
+ *                  replace = True):
+ *         '''
+ */
+    values[2] = ((PyObject *)Py_None);
+
+    /* "pysam/csamfile.pyx":2707
+ *     cpdef setTag(self, tag, value,
+ *                  value_type = None,
+ *                  replace = True):             # <<<<<<<<<<<<<<
+ *         '''
+ *         Set optional field of alignment *tag* to *value*.  *value_type* may be specified,
+ */
+    values[3] = ((PyObject *)Py_True);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("setTag", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_type);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_replace);
+          if (value) { values[3] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTag") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_tag = values[0];
+    __pyx_v_value = values[1];
+    __pyx_v_value_type = values[2];
+    __pyx_v_replace = values[3];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("setTag", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.setTag", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_12setTag(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), __pyx_v_tag, __pyx_v_value, __pyx_v_value_type, __pyx_v_replace);
+
+  /* "pysam/csamfile.pyx":2705
+ *                 memcpy(s, temp, new_size)
+ * 
+ *     cpdef setTag(self, tag, value,             # <<<<<<<<<<<<<<
+ *                  value_type = None,
+ *                  replace = True):
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_12setTag(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value, PyObject *__pyx_v_value_type, PyObject *__pyx_v_replace) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  struct __pyx_opt_args_5pysam_8csamfile_11AlignedRead_setTag __pyx_t_2;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("setTag", 0);
+  __Pyx_TraceCall("setTag", __pyx_f[0], 2705);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2.__pyx_n = 2;
+  __pyx_t_2.value_type = __pyx_v_value_type;
+  __pyx_t_2.replace = __pyx_v_replace;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_8csamfile_AlignedRead *)__pyx_v_self->__pyx_vtab)->setTag(__pyx_v_self, __pyx_v_tag, __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.setTag", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2767
+ *     property flag:
+ *         """properties flag"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return pysam_get_flag(self._delegate)
+ *         def __set__(self, flag):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4flag_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4flag_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4flag___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4flag___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2767);
+
+  /* "pysam/csamfile.pyx":2768
+ *         """properties flag"""
+ *         def __get__(self):
+ *             return pysam_get_flag(self._delegate)             # <<<<<<<<<<<<<<
+ *         def __set__(self, flag):
+ *             pysam_set_flag(self._delegate, flag)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_uint16_t(pysam_get_flag(__pyx_v_self->_delegate)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2767
+ *     property flag:
+ *         """properties flag"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return pysam_get_flag(self._delegate)
+ *         def __set__(self, flag):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.flag.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2769
+ *         def __get__(self):
+ *             return pysam_get_flag(self._delegate)
+ *         def __set__(self, flag):             # <<<<<<<<<<<<<<
+ *             pysam_set_flag(self._delegate, flag)
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4flag_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flag); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4flag_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flag) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4flag_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_flag));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4flag_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_flag) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint8_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2769);
+
+  /* "pysam/csamfile.pyx":2770
+ *             return pysam_get_flag(self._delegate)
+ *         def __set__(self, flag):
+ *             pysam_set_flag(self._delegate, flag)             # <<<<<<<<<<<<<<
+ * 
+ *     property rname:
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint8_t(__pyx_v_flag); if (unlikely((__pyx_t_1 == (uint8_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_set_flag(__pyx_v_self->_delegate, __pyx_t_1);
+
+  /* "pysam/csamfile.pyx":2769
+ *         def __get__(self):
+ *             return pysam_get_flag(self._delegate)
+ *         def __set__(self, flag):             # <<<<<<<<<<<<<<
+ *             pysam_set_flag(self._delegate, flag)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.flag.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2788
+ * 
+ *         """
+ *         def __get__(self): return self._delegate.core.tid             # <<<<<<<<<<<<<<
+ *         def __set__(self, tid): self._delegate.core.tid = tid
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5rname_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5rname_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5rname___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5rname___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2788);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.rname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2789
+ *         """
+ *         def __get__(self): return self._delegate.core.tid
+ *         def __set__(self, tid): self._delegate.core.tid = tid             # <<<<<<<<<<<<<<
+ * 
+ *     property tid:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5rname_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5rname_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5rname_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_tid));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5rname_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tid) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2789);
+  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_tid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_delegate->core.tid = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.rname.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2802
+ * 
+ *         """
+ *         def __get__(self): return self._delegate.core.tid             # <<<<<<<<<<<<<<
+ *         def __set__(self, tid): self._delegate.core.tid = tid
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_3tid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_3tid_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_3tid___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_3tid___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2802);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.tid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2803
+ *         """
+ *         def __get__(self): return self._delegate.core.tid
+ *         def __set__(self, tid): self._delegate.core.tid = tid             # <<<<<<<<<<<<<<
+ * 
+ *     property pos:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_3tid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_3tid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_3tid_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_tid));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_3tid_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tid) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2803);
+  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_tid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_delegate->core.tid = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.tid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2807
+ *     property pos:
+ *         """0-based leftmost coordinate"""
+ *         def __get__(self): return self._delegate.core.pos             # <<<<<<<<<<<<<<
+ *         def __set__(self, pos):
+ *             ## setting the position requires updating the "bin" attribute
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_3pos_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_3pos___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_3pos___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2807);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2808
+ *         """0-based leftmost coordinate"""
+ *         def __get__(self): return self._delegate.core.pos
+ *         def __set__(self, pos):             # <<<<<<<<<<<<<<
+ *             ## setting the position requires updating the "bin" attribute
+ *             cdef bam1_t * src
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_3pos_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_pos));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_3pos_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_pos) {
+  bam1_t *__pyx_v_src;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int32_t __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2808);
+
+  /* "pysam/csamfile.pyx":2811
+ *             ## setting the position requires updating the "bin" attribute
+ *             cdef bam1_t * src
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             src.core.pos = pos
+ *             if pysam_get_n_cigar(src):
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2812
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ *             src.core.pos = pos             # <<<<<<<<<<<<<<
+ *             if pysam_get_n_cigar(src):
+ *                 pysam_set_bin(src,
+ */
+  __pyx_t_2 = __Pyx_PyInt_As_int32_t(__pyx_v_pos); if (unlikely((__pyx_t_2 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_src->core.pos = __pyx_t_2;
+
+  /* "pysam/csamfile.pyx":2813
+ *             src = self._delegate
+ *             src.core.pos = pos
+ *             if pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *                 pysam_set_bin(src,
+ *                               hts_reg2bin(
+ */
+  __pyx_t_3 = (pysam_get_n_cigar(__pyx_v_src) != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":2814
+ *             src.core.pos = pos
+ *             if pysam_get_n_cigar(src):
+ *                 pysam_set_bin(src,             # <<<<<<<<<<<<<<
+ *                               hts_reg2bin(
+ *                                   src.core.pos,
+ */
+    pysam_set_bin(__pyx_v_src, hts_reg2bin(__pyx_v_src->core.pos, bam_endpos(__pyx_v_src), 14, 5));
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":2821
+ *                                   5))
+ *             else:
+ *                 pysam_set_bin(src,             # <<<<<<<<<<<<<<
+ *                               hts_reg2bin(
+ *                                   src.core.pos,
+ */
+    pysam_set_bin(__pyx_v_src, hts_reg2bin(__pyx_v_src->core.pos, (__pyx_v_src->core.pos + 1), 14, 5));
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":2808
+ *         """0-based leftmost coordinate"""
+ *         def __get__(self): return self._delegate.core.pos
+ *         def __set__(self, pos):             # <<<<<<<<<<<<<<
+ *             ## setting the position requires updating the "bin" attribute
+ *             cdef bam1_t * src
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2830
+ *     property bin:
+ *         """properties bin"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return pysam_get_bin(self._delegate)
+ *         def __set__(self, bin):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_3bin_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_3bin_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_3bin___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_3bin___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2830);
+
+  /* "pysam/csamfile.pyx":2831
+ *         """properties bin"""
+ *         def __get__(self):
+ *             return pysam_get_bin(self._delegate)             # <<<<<<<<<<<<<<
+ *         def __set__(self, bin):
+ *             pysam_set_bin(self._delegate, bin)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_uint16_t(pysam_get_bin(__pyx_v_self->_delegate)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2830
+ *     property bin:
+ *         """properties bin"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return pysam_get_bin(self._delegate)
+ *         def __set__(self, bin):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.bin.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2832
+ *         def __get__(self):
+ *             return pysam_get_bin(self._delegate)
+ *         def __set__(self, bin):             # <<<<<<<<<<<<<<
+ *             pysam_set_bin(self._delegate, bin)
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_3bin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_bin); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_3bin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_bin) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_3bin_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_bin));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_3bin_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_bin) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2832);
+
+  /* "pysam/csamfile.pyx":2833
+ *             return pysam_get_bin(self._delegate)
+ *         def __set__(self, bin):
+ *             pysam_set_bin(self._delegate, bin)             # <<<<<<<<<<<<<<
+ * 
+ *     property rlen:
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_bin); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_set_bin(__pyx_v_self->_delegate, __pyx_t_1);
+
+  /* "pysam/csamfile.pyx":2832
+ *         def __get__(self):
+ *             return pysam_get_bin(self._delegate)
+ *         def __set__(self, bin):             # <<<<<<<<<<<<<<
+ *             pysam_set_bin(self._delegate, bin)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.bin.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2842
+ * 
+ *         Returns 0 if not available."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.l_qseq
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4rlen_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4rlen_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4rlen___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4rlen___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2842);
+
+  /* "pysam/csamfile.pyx":2843
+ *         Returns 0 if not available."""
+ *         def __get__(self):
+ *             return self._delegate.core.l_qseq             # <<<<<<<<<<<<<<
+ * 
+ *     property aend:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.l_qseq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2842
+ * 
+ *         Returns 0 if not available."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.l_qseq
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.rlen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2850
+ *         aend points to one past the last aligned residue.
+ *         Returns None if not available.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4aend_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4aend_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4aend___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4aend___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2850);
+
+  /* "pysam/csamfile.pyx":2852
+ *         def __get__(self):
+ *             cdef bam1_t * src
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:
+ *                 return None
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2853
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ *             if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:             # <<<<<<<<<<<<<<
+ *                 return None
+ *             return bam_endpos(src)
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyInt_From_int(BAM_FUNMAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyNumber_And(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __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_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (!__pyx_t_5) {
+    __pyx_t_6 = (pysam_get_n_cigar(__pyx_v_src) == 0);
+    __pyx_t_7 = __pyx_t_6;
+  } else {
+    __pyx_t_7 = __pyx_t_5;
+  }
+  if (__pyx_t_7) {
+
+    /* "pysam/csamfile.pyx":2854
+ *             src = self._delegate
+ *             if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:
+ *                 return None             # <<<<<<<<<<<<<<
+ *             return bam_endpos(src)
+ * 
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2855
+ *             if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:
+ *                 return None
+ *             return bam_endpos(src)             # <<<<<<<<<<<<<<
+ * 
+ *     property alen:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_4 = __Pyx_PyInt_From_int32_t(bam_endpos(__pyx_v_src)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_r = __pyx_t_4;
+  __pyx_t_4 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2850
+ *         aend points to one past the last aligned residue.
+ *         Returns None if not available.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.aend.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2861
+ * 
+ *         This is equal to `aend - pos`. Returns None if not available.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4alen_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4alen_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4alen___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4alen___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2861);
+
+  /* "pysam/csamfile.pyx":2863
+ *         def __get__(self):
+ *             cdef bam1_t * src
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:
+ *                 return None
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2864
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ *             if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:             # <<<<<<<<<<<<<<
+ *                 return None
+ *             return bam_endpos(src) - \
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyInt_From_int(BAM_FUNMAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyNumber_And(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __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_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (!__pyx_t_5) {
+    __pyx_t_6 = (pysam_get_n_cigar(__pyx_v_src) == 0);
+    __pyx_t_7 = __pyx_t_6;
+  } else {
+    __pyx_t_7 = __pyx_t_5;
+  }
+  if (__pyx_t_7) {
+
+    /* "pysam/csamfile.pyx":2865
+ *             src = self._delegate
+ *             if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:
+ *                 return None             # <<<<<<<<<<<<<<
+ *             return bam_endpos(src) - \
+ *                 self._delegate.core.pos
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":2866
+ *             if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:
+ *                 return None
+ *             return bam_endpos(src) - \             # <<<<<<<<<<<<<<
+ *                 self._delegate.core.pos
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+
+  /* "pysam/csamfile.pyx":2867
+ *                 return None
+ *             return bam_endpos(src) - \
+ *                 self._delegate.core.pos             # <<<<<<<<<<<<<<
+ * 
+ *     property mapq:
+ */
+  __pyx_t_4 = __Pyx_PyInt_From_int((bam_endpos(__pyx_v_src) - __pyx_v_self->_delegate->core.pos)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_r = __pyx_t_4;
+  __pyx_t_4 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2861
+ * 
+ *         This is equal to `aend - pos`. Returns None if not available.'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef bam1_t * src
+ *             src = self._delegate
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.alen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2871
+ *     property mapq:
+ *         """mapping quality"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return pysam_get_qual(self._delegate)
+ *         def __set__(self, qual):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4mapq_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4mapq_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4mapq___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4mapq___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2871);
+
+  /* "pysam/csamfile.pyx":2872
+ *         """mapping quality"""
+ *         def __get__(self):
+ *             return pysam_get_qual(self._delegate)             # <<<<<<<<<<<<<<
+ *         def __set__(self, qual):
+ *             pysam_set_qual(self._delegate, qual)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_uint8_t(pysam_get_qual(__pyx_v_self->_delegate)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2871
+ *     property mapq:
+ *         """mapping quality"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return pysam_get_qual(self._delegate)
+ *         def __set__(self, qual):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mapq.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2873
+ *         def __get__(self):
+ *             return pysam_get_qual(self._delegate)
+ *         def __set__(self, qual):             # <<<<<<<<<<<<<<
+ *             pysam_set_qual(self._delegate, qual)
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4mapq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4mapq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4mapq_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_qual));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4mapq_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qual) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint8_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2873);
+
+  /* "pysam/csamfile.pyx":2874
+ *             return pysam_get_qual(self._delegate)
+ *         def __set__(self, qual):
+ *             pysam_set_qual(self._delegate, qual)             # <<<<<<<<<<<<<<
+ * 
+ *     property mrnm:
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint8_t(__pyx_v_qual); if (unlikely((__pyx_t_1 == (uint8_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_set_qual(__pyx_v_self->_delegate, __pyx_t_1);
+
+  /* "pysam/csamfile.pyx":2873
+ *         def __get__(self):
+ *             return pysam_get_qual(self._delegate)
+ *         def __set__(self, qual):             # <<<<<<<<<<<<<<
+ *             pysam_set_qual(self._delegate, qual)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mapq.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2880
+ *         deprecated, use RNEXT instead.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.mtid
+ *         def __set__(self, mtid):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4mrnm_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4mrnm_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4mrnm___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4mrnm___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2880);
+
+  /* "pysam/csamfile.pyx":2881
+ *         """
+ *         def __get__(self):
+ *             return self._delegate.core.mtid             # <<<<<<<<<<<<<<
+ *         def __set__(self, mtid):
+ *             self._delegate.core.mtid = mtid
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.mtid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2880
+ *         deprecated, use RNEXT instead.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.mtid
+ *         def __set__(self, mtid):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mrnm.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2882
+ *         def __get__(self):
+ *             return self._delegate.core.mtid
+ *         def __set__(self, mtid):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.mtid = mtid
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4mrnm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4mrnm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4mrnm_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_mtid));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4mrnm_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mtid) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2882);
+
+  /* "pysam/csamfile.pyx":2883
+ *             return self._delegate.core.mtid
+ *         def __set__(self, mtid):
+ *             self._delegate.core.mtid = mtid             # <<<<<<<<<<<<<<
+ * 
+ *     property rnext:
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_mtid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_delegate->core.mtid = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2882
+ *         def __get__(self):
+ *             return self._delegate.core.mtid
+ *         def __set__(self, mtid):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.mtid = mtid
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mrnm.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2887
+ *     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
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5rnext_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5rnext_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5rnext___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5rnext___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2887);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.mtid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.rnext.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2888
+ *         """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:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5rnext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5rnext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5rnext_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_mtid));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5rnext_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mtid) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2888);
+  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_mtid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_delegate->core.mtid = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.rnext.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2893
+ *         """the position of the mate
+ *         deprecated, use PNEXT instead."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4mpos_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4mpos_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4mpos___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4mpos___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2893);
+
+  /* "pysam/csamfile.pyx":2894
+ *         deprecated, use PNEXT instead."""
+ *         def __get__(self):
+ *             return self._delegate.core.mpos             # <<<<<<<<<<<<<<
+ *         def __set__(self, mpos):
+ *             self._delegate.core.mpos = mpos
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.mpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2893
+ *         """the position of the mate
+ *         deprecated, use PNEXT instead."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mpos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2895
+ *         def __get__(self):
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.mpos = mpos
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4mpos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4mpos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4mpos_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_mpos));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4mpos_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2895);
+
+  /* "pysam/csamfile.pyx":2896
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):
+ *             self._delegate.core.mpos = mpos             # <<<<<<<<<<<<<<
+ * 
+ *     property pnext:
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_mpos); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_delegate->core.mpos = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2895
+ *         def __get__(self):
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.mpos = mpos
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mpos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2900
+ *     property pnext:
+ *         """the position of the mate"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5pnext_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5pnext_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5pnext___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5pnext___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2900);
+
+  /* "pysam/csamfile.pyx":2901
+ *         """the position of the mate"""
+ *         def __get__(self):
+ *             return self._delegate.core.mpos             # <<<<<<<<<<<<<<
+ *         def __set__(self, mpos):
+ *             self._delegate.core.mpos = mpos
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.mpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2900
+ *     property pnext:
+ *         """the position of the mate"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.pnext.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2902
+ *         def __get__(self):
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.mpos = mpos
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5pnext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5pnext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5pnext_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_mpos));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5pnext_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2902);
+
+  /* "pysam/csamfile.pyx":2903
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):
+ *             self._delegate.core.mpos = mpos             # <<<<<<<<<<<<<<
+ * 
+ *     #######################################################################
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_mpos); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_delegate->core.mpos = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2902
+ *         def __get__(self):
+ *             return self._delegate.core.mpos
+ *         def __set__(self, mpos):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.mpos = mpos
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.pnext.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2912
+ *         """the insert size
+ *         deprecated: use tlen instead"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5isize_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_5isize_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5isize___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_5isize___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2912);
+
+  /* "pysam/csamfile.pyx":2913
+ *         deprecated: use tlen instead"""
+ *         def __get__(self):
+ *             return self._delegate.core.isize             # <<<<<<<<<<<<<<
+ *         def __set__(self, isize):
+ *             self._delegate.core.isize = isize
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.isize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2912
+ *         """the insert size
+ *         deprecated: use tlen instead"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.isize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2914
+ *         def __get__(self):
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.isize = isize
+ *     property tlen:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5isize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_5isize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_5isize_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_isize));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_5isize_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_isize) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2914);
+
+  /* "pysam/csamfile.pyx":2915
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):
+ *             self._delegate.core.isize = isize             # <<<<<<<<<<<<<<
+ *     property tlen:
+ *         """the template length"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_isize); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_delegate->core.isize = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2914
+ *         def __get__(self):
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.isize = isize
+ *     property tlen:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.isize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2918
+ *     property tlen:
+ *         """the template length"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4tlen_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_4tlen_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4tlen___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_4tlen___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2918);
+
+  /* "pysam/csamfile.pyx":2919
+ *         """the template length"""
+ *         def __get__(self):
+ *             return self._delegate.core.isize             # <<<<<<<<<<<<<<
+ *         def __set__(self, isize):
+ *             self._delegate.core.isize = isize
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_delegate->core.isize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2918
+ *     property tlen:
+ *         """the template length"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.tlen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2920
+ *         def __get__(self):
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.isize = isize
+ *     property is_paired:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4tlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_4tlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_4tlen_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_isize));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_4tlen_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_isize) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int32_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2920);
+
+  /* "pysam/csamfile.pyx":2921
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):
+ *             self._delegate.core.isize = isize             # <<<<<<<<<<<<<<
+ *     property is_paired:
+ *         """true if read is paired in sequencing"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_isize); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_delegate->core.isize = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":2920
+ *         def __get__(self):
+ *             return self._delegate.core.isize
+ *         def __set__(self, isize):             # <<<<<<<<<<<<<<
+ *             self._delegate.core.isize = isize
+ *     property is_paired:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.tlen.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2924
+ *     property is_paired:
+ *         """true if read is paired in sequencing"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FPAIRED) != 0
+ *         def __set__(self,val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_9is_paired_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_9is_paired_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_9is_paired___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_9is_paired___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2924);
+
+  /* "pysam/csamfile.pyx":2925
+ *         """true if read is paired in sequencing"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FPAIRED) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FPAIRED)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FPAIRED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2924
+ *     property is_paired:
+ *         """true if read is paired in sequencing"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FPAIRED) != 0
+ *         def __set__(self,val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_paired.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2926
+ *         def __get__(self):
+ *             return (self.flag & BAM_FPAIRED) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FPAIRED)
+ *     property is_proper_pair:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_9is_paired_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_9is_paired_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_9is_paired_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_9is_paired_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2926);
+
+  /* "pysam/csamfile.pyx":2927
+ *             return (self.flag & BAM_FPAIRED) != 0
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FPAIRED)             # <<<<<<<<<<<<<<
+ *     property is_proper_pair:
+ *         """true if read is mapped in a proper pair"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FPAIRED);
+
+  /* "pysam/csamfile.pyx":2926
+ *         def __get__(self):
+ *             return (self.flag & BAM_FPAIRED) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FPAIRED)
+ *     property is_proper_pair:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_paired.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2930
+ *     property is_proper_pair:
+ *         """true if read is mapped in a proper pair"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FPROPER_PAIR) != 0
+ *         def __set__(self,val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_14is_proper_pair_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_14is_proper_pair_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_14is_proper_pair___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_14is_proper_pair___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2930);
+
+  /* "pysam/csamfile.pyx":2931
+ *         """true if read is mapped in a proper pair"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FPROPER_PAIR) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FPROPER_PAIR)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FPROPER_PAIR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2930
+ *     property is_proper_pair:
+ *         """true if read is mapped in a proper pair"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FPROPER_PAIR) != 0
+ *         def __set__(self,val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_proper_pair.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2932
+ *         def __get__(self):
+ *             return (self.flag & BAM_FPROPER_PAIR) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FPROPER_PAIR)
+ *     property is_unmapped:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_14is_proper_pair_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_14is_proper_pair_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_14is_proper_pair_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_14is_proper_pair_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2932);
+
+  /* "pysam/csamfile.pyx":2933
+ *             return (self.flag & BAM_FPROPER_PAIR) != 0
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FPROPER_PAIR)             # <<<<<<<<<<<<<<
+ *     property is_unmapped:
+ *         """true if read itself is unmapped"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FPROPER_PAIR);
+
+  /* "pysam/csamfile.pyx":2932
+ *         def __get__(self):
+ *             return (self.flag & BAM_FPROPER_PAIR) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FPROPER_PAIR)
+ *     property is_unmapped:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_proper_pair.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2936
+ *     property is_unmapped:
+ *         """true if read itself is unmapped"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FUNMAP) != 0
+ *         def __set__(self, val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_11is_unmapped_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_11is_unmapped_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_11is_unmapped___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_11is_unmapped___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2936);
+
+  /* "pysam/csamfile.pyx":2937
+ *         """true if read itself is unmapped"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FUNMAP) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FUNMAP)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FUNMAP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2936
+ *     property is_unmapped:
+ *         """true if read itself is unmapped"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FUNMAP) != 0
+ *         def __set__(self, val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_unmapped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2938
+ *         def __get__(self):
+ *             return (self.flag & BAM_FUNMAP) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FUNMAP)
+ *     property mate_is_unmapped:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_11is_unmapped_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_11is_unmapped_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_11is_unmapped_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_11is_unmapped_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2938);
+
+  /* "pysam/csamfile.pyx":2939
+ *             return (self.flag & BAM_FUNMAP) != 0
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FUNMAP)             # <<<<<<<<<<<<<<
+ *     property mate_is_unmapped:
+ *         """true if the mate is unmapped"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FUNMAP);
+
+  /* "pysam/csamfile.pyx":2938
+ *         def __get__(self):
+ *             return (self.flag & BAM_FUNMAP) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FUNMAP)
+ *     property mate_is_unmapped:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_unmapped.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2942
+ *     property mate_is_unmapped:
+ *         """true if the mate is unmapped"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FMUNMAP) != 0
+ *         def __set__(self,val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2942);
+
+  /* "pysam/csamfile.pyx":2943
+ *         """true if the mate is unmapped"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FMUNMAP) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FMUNMAP)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FMUNMAP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2942
+ *     property mate_is_unmapped:
+ *         """true if the mate is unmapped"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FMUNMAP) != 0
+ *         def __set__(self,val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mate_is_unmapped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2944
+ *         def __get__(self):
+ *             return (self.flag & BAM_FMUNMAP) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FMUNMAP)
+ *     property is_reverse:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2944);
+
+  /* "pysam/csamfile.pyx":2945
+ *             return (self.flag & BAM_FMUNMAP) != 0
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FMUNMAP)             # <<<<<<<<<<<<<<
+ *     property is_reverse:
+ *         """true if read is mapped to reverse strand"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FMUNMAP);
+
+  /* "pysam/csamfile.pyx":2944
+ *         def __get__(self):
+ *             return (self.flag & BAM_FMUNMAP) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FMUNMAP)
+ *     property is_reverse:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mate_is_unmapped.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2948
+ *     property is_reverse:
+ *         """true if read is mapped to reverse strand"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FREVERSE) != 0
+ *         def __set__(self,val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_10is_reverse_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_10is_reverse_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_10is_reverse___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_10is_reverse___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2948);
+
+  /* "pysam/csamfile.pyx":2949
+ *         """true if read is mapped to reverse strand"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREVERSE) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FREVERSE)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FREVERSE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2949; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2948
+ *     property is_reverse:
+ *         """true if read is mapped to reverse strand"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FREVERSE) != 0
+ *         def __set__(self,val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_reverse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2950
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREVERSE) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FREVERSE)
+ *     property mate_is_reverse:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_10is_reverse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_10is_reverse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_10is_reverse_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_10is_reverse_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2950);
+
+  /* "pysam/csamfile.pyx":2951
+ *             return (self.flag & BAM_FREVERSE) != 0
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FREVERSE)             # <<<<<<<<<<<<<<
+ *     property mate_is_reverse:
+ *         """true is read is mapped to reverse strand"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FREVERSE);
+
+  /* "pysam/csamfile.pyx":2950
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREVERSE) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FREVERSE)
+ *     property mate_is_reverse:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_reverse.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2954
+ *     property mate_is_reverse:
+ *         """true is read is mapped to reverse strand"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FMREVERSE) != 0
+ *         def __set__(self,val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_15mate_is_reverse___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_15mate_is_reverse___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2954);
+
+  /* "pysam/csamfile.pyx":2955
+ *         """true is read is mapped to reverse strand"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FMREVERSE) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FMREVERSE)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FMREVERSE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2955; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2954
+ *     property mate_is_reverse:
+ *         """true is read is mapped to reverse strand"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FMREVERSE) != 0
+ *         def __set__(self,val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mate_is_reverse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2956
+ *         def __get__(self):
+ *             return (self.flag & BAM_FMREVERSE) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FMREVERSE)
+ *     property is_read1:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2956);
+
+  /* "pysam/csamfile.pyx":2957
+ *             return (self.flag & BAM_FMREVERSE) != 0
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FMREVERSE)             # <<<<<<<<<<<<<<
+ *     property is_read1:
+ *         """true if this is read1"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FMREVERSE);
+
+  /* "pysam/csamfile.pyx":2956
+ *         def __get__(self):
+ *             return (self.flag & BAM_FMREVERSE) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FMREVERSE)
+ *     property is_read1:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.mate_is_reverse.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2960
+ *     property is_read1:
+ *         """true if this is read1"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FREAD1) != 0
+ *         def __set__(self,val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read1_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read1_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read1___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read1___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2960);
+
+  /* "pysam/csamfile.pyx":2961
+ *         """true if this is read1"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREAD1) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FREAD1)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FREAD1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2960
+ *     property is_read1:
+ *         """true if this is read1"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FREAD1) != 0
+ *         def __set__(self,val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_read1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2962
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREAD1) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FREAD1)
+ *     property is_read2:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read1_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read1_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2962);
+
+  /* "pysam/csamfile.pyx":2963
+ *             return (self.flag & BAM_FREAD1) != 0
+ *         def __set__(self,val):
+ *             pysam_update_flag(self._delegate, val, BAM_FREAD1)             # <<<<<<<<<<<<<<
+ *     property is_read2:
+ *         """true if this is read2"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FREAD1);
+
+  /* "pysam/csamfile.pyx":2962
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREAD1) != 0
+ *         def __set__(self,val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FREAD1)
+ *     property is_read2:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_read1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2966
+ *     property is_read2:
+ *         """true if this is read2"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FREAD2) != 0
+ *         def __set__(self, val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read2_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read2_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read2___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read2___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2966);
+
+  /* "pysam/csamfile.pyx":2967
+ *         """true if this is read2"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREAD2) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FREAD2)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FREAD2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2966
+ *     property is_read2:
+ *         """true if this is read2"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FREAD2) != 0
+ *         def __set__(self, val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_read2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2968
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREAD2) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FREAD2)
+ *     property is_secondary:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read2_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_8is_read2_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2968);
+
+  /* "pysam/csamfile.pyx":2969
+ *             return (self.flag & BAM_FREAD2) != 0
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FREAD2)             # <<<<<<<<<<<<<<
+ *     property is_secondary:
+ *         """true if not primary alignment"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FREAD2);
+
+  /* "pysam/csamfile.pyx":2968
+ *         def __get__(self):
+ *             return (self.flag & BAM_FREAD2) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FREAD2)
+ *     property is_secondary:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_read2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2972
+ *     property is_secondary:
+ *         """true if not primary alignment"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FSECONDARY) != 0
+ *         def __set__(self, val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_12is_secondary_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_12is_secondary_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_12is_secondary___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_12is_secondary___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2972);
+
+  /* "pysam/csamfile.pyx":2973
+ *         """true if not primary alignment"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FSECONDARY) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FSECONDARY)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FSECONDARY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2972
+ *     property is_secondary:
+ *         """true if not primary alignment"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FSECONDARY) != 0
+ *         def __set__(self, val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_secondary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2974
+ *         def __get__(self):
+ *             return (self.flag & BAM_FSECONDARY) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FSECONDARY)
+ *     property is_qcfail:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_12is_secondary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_12is_secondary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_12is_secondary_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_12is_secondary_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2974);
+
+  /* "pysam/csamfile.pyx":2975
+ *             return (self.flag & BAM_FSECONDARY) != 0
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FSECONDARY)             # <<<<<<<<<<<<<<
+ *     property is_qcfail:
+ *         """true if QC failure"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FSECONDARY);
+
+  /* "pysam/csamfile.pyx":2974
+ *         def __get__(self):
+ *             return (self.flag & BAM_FSECONDARY) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FSECONDARY)
+ *     property is_qcfail:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_secondary.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2978
+ *     property is_qcfail:
+ *         """true if QC failure"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FQCFAIL) != 0
+ *         def __set__(self, val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_9is_qcfail_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_9is_qcfail_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_9is_qcfail___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_9is_qcfail___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2978);
+
+  /* "pysam/csamfile.pyx":2979
+ *         """true if QC failure"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FQCFAIL) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FQCFAIL)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FQCFAIL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2978
+ *     property is_qcfail:
+ *         """true if QC failure"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FQCFAIL) != 0
+ *         def __set__(self, val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_qcfail.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2980
+ *         def __get__(self):
+ *             return (self.flag & BAM_FQCFAIL) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FQCFAIL)
+ *     property is_duplicate:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_9is_qcfail_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_9is_qcfail_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_9is_qcfail_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_9is_qcfail_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2980);
+
+  /* "pysam/csamfile.pyx":2981
+ *             return (self.flag & BAM_FQCFAIL) != 0
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FQCFAIL)             # <<<<<<<<<<<<<<
+ *     property is_duplicate:
+ *         """true if optical or PCR duplicate"""
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FQCFAIL);
+
+  /* "pysam/csamfile.pyx":2980
+ *         def __get__(self):
+ *             return (self.flag & BAM_FQCFAIL) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FQCFAIL)
+ *     property is_duplicate:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_qcfail.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2984
+ *     property is_duplicate:
+ *         """true if optical or PCR duplicate"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FDUP) != 0
+ *         def __set__(self, val):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_12is_duplicate_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_12is_duplicate_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_12is_duplicate___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_12is_duplicate___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2984);
+
+  /* "pysam/csamfile.pyx":2985
+ *         """true if optical or PCR duplicate"""
+ *         def __get__(self):
+ *             return (self.flag & BAM_FDUP) != 0             # <<<<<<<<<<<<<<
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FDUP)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(BAM_FDUP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __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_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2984
+ *     property is_duplicate:
+ *         """true if optical or PCR duplicate"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return (self.flag & BAM_FDUP) != 0
+ *         def __set__(self, val):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_duplicate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2986
+ *         def __get__(self):
+ *             return (self.flag & BAM_FDUP) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FDUP)
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_12is_duplicate_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11AlignedRead_12is_duplicate_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_12is_duplicate_2__set__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11AlignedRead_12is_duplicate_2__set__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  uint16_t __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 2986);
+
+  /* "pysam/csamfile.pyx":2987
+ *             return (self.flag & BAM_FDUP) != 0
+ *         def __set__(self, val):
+ *             pysam_update_flag(self._delegate, val, BAM_FDUP)             # <<<<<<<<<<<<<<
+ * 
+ *     #######################################################################
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_uint16_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (uint16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_update_flag(__pyx_v_self->_delegate, __pyx_t_1, BAM_FDUP);
+
+  /* "pysam/csamfile.pyx":2986
+ *         def __get__(self):
+ *             return (self.flag & BAM_FDUP) != 0
+ *         def __set__(self, val):             # <<<<<<<<<<<<<<
+ *             pysam_update_flag(self._delegate, val, BAM_FDUP)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.is_duplicate.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":2995
+ *     property positions:
+ *         """a list of reference positions that this read aligns to."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t k, i, pos
+ *             cdef int op
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_9positions_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_9positions_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_9positions___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_9positions___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  uint32_t __pyx_v_k;
+  uint32_t __pyx_v_i;
+  uint32_t __pyx_v_pos;
+  int __pyx_v_op;
+  uint32_t *__pyx_v_cigar_p;
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_v_result = NULL;
+  PyObject *__pyx_v_l = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int32_t __pyx_t_4;
+  uint16_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  uint32_t __pyx_t_7;
+  int __pyx_t_8;
+  int __pyx_t_9;
+  int __pyx_t_10;
+  int __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 2995);
+
+  /* "pysam/csamfile.pyx":3001
+ *             cdef bam1_t * src
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             if pysam_get_n_cigar(src) == 0:
+ *                 return []
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":3002
+ * 
+ *             src = self._delegate
+ *             if pysam_get_n_cigar(src) == 0:             # <<<<<<<<<<<<<<
+ *                 return []
+ * 
+ */
+  __pyx_t_2 = ((pysam_get_n_cigar(__pyx_v_src) == 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":3003
+ *             src = self._delegate
+ *             if pysam_get_n_cigar(src) == 0:
+ *                 return []             # <<<<<<<<<<<<<<
+ * 
+ *             result = []
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3005
+ *                 return []
+ * 
+ *             result = []             # <<<<<<<<<<<<<<
+ *             pos = src.core.pos
+ *             cigar_p = pysam_bam_get_cigar(src)
+ */
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_result = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":3006
+ * 
+ *             result = []
+ *             pos = src.core.pos             # <<<<<<<<<<<<<<
+ *             cigar_p = pysam_bam_get_cigar(src)
+ * 
+ */
+  __pyx_t_4 = __pyx_v_src->core.pos;
+  __pyx_v_pos = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":3007
+ *             result = []
+ *             pos = src.core.pos
+ *             cigar_p = pysam_bam_get_cigar(src)             # <<<<<<<<<<<<<<
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ */
+  __pyx_v_cigar_p = pysam_bam_get_cigar(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":3009
+ *             cigar_p = pysam_bam_get_cigar(src)
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ */
+  __pyx_t_5 = pysam_get_n_cigar(__pyx_v_src);
+  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":3010
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 if op == BAM_CMATCH:
+ */
+    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & BAM_CIGAR_MASK);
+
+    /* "pysam/csamfile.pyx":3011
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
+ *                 if op == BAM_CMATCH:
+ *                     for i from pos <= i < pos + l:
+ */
+    __pyx_t_3 = __Pyx_PyInt_From_uint32_t(((__pyx_v_cigar_p[__pyx_v_k]) >> BAM_CIGAR_SHIFT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "pysam/csamfile.pyx":3012
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 if op == BAM_CMATCH:             # <<<<<<<<<<<<<<
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( i )
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CMATCH) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":3013
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 if op == BAM_CMATCH:
+ *                     for i from pos <= i < pos + l:             # <<<<<<<<<<<<<<
+ *                         result.append( i )
+ * 
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
+
+        /* "pysam/csamfile.pyx":3014
+ *                 if op == BAM_CMATCH:
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( i )             # <<<<<<<<<<<<<<
+ * 
+ *                 if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
+ */
+        __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      }
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+
+    /* "pysam/csamfile.pyx":3016
+ *                         result.append( i )
+ * 
+ *                 if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:             # <<<<<<<<<<<<<<
+ *                     pos += l
+ * 
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CMATCH) != 0);
+    if (!__pyx_t_2) {
+      __pyx_t_9 = ((__pyx_v_op == BAM_CDEL) != 0);
+      if (!__pyx_t_9) {
+        __pyx_t_10 = ((__pyx_v_op == BAM_CREF_SKIP) != 0);
+        __pyx_t_11 = __pyx_t_10;
+      } else {
+        __pyx_t_11 = __pyx_t_9;
+      }
+      __pyx_t_9 = __pyx_t_11;
+    } else {
+      __pyx_t_9 = __pyx_t_2;
+    }
+    if (__pyx_t_9) {
+
+      /* "pysam/csamfile.pyx":3017
+ * 
+ *                 if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
+ *                     pos += l             # <<<<<<<<<<<<<<
+ * 
+ *             return result
+ */
+      __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_pos = __pyx_t_7;
+      goto __pyx_L9;
+    }
+    __pyx_L9:;
+  }
+
+  /* "pysam/csamfile.pyx":3019
+ *                     pos += l
+ * 
+ *             return result             # <<<<<<<<<<<<<<
+ * 
+ *     property inferred_length:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __pyx_v_result;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":2995
+ *     property positions:
+ *         """a list of reference positions that this read aligns to."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t k, i, pos
+ *             cdef int op
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.positions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_result);
+  __Pyx_XDECREF(__pyx_v_l);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3026
+ *         Returns 0 if CIGAR string is not present.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *            cdef uint32_t k, qpos
+ *            cdef int op
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_15inferred_length_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_15inferred_length_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_15inferred_length___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_15inferred_length___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  uint32_t __pyx_v_k;
+  uint32_t __pyx_v_qpos;
+  int __pyx_v_op;
+  uint32_t *__pyx_v_cigar_p;
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  uint16_t __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3026);
+
+  /* "pysam/csamfile.pyx":3032
+ *            cdef bam1_t * src
+ * 
+ *            src = self._delegate             # <<<<<<<<<<<<<<
+ *            if pysam_get_n_cigar(src) == 0: return 0
+ * 
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":3033
+ * 
+ *            src = self._delegate
+ *            if pysam_get_n_cigar(src) == 0: return 0             # <<<<<<<<<<<<<<
+ * 
+ *            qpos = 0
+ */
+  __pyx_t_2 = ((pysam_get_n_cigar(__pyx_v_src) == 0) != 0);
+  if (__pyx_t_2) {
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_int_0);
+    __pyx_r = __pyx_int_0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3035
+ *            if pysam_get_n_cigar(src) == 0: return 0
+ * 
+ *            qpos = 0             # <<<<<<<<<<<<<<
+ *            cigar_p = pysam_bam_get_cigar(src)
+ * 
+ */
+  __pyx_v_qpos = 0;
+
+  /* "pysam/csamfile.pyx":3036
+ * 
+ *            qpos = 0
+ *            cigar_p = pysam_bam_get_cigar(src)             # <<<<<<<<<<<<<<
+ * 
+ *            for k from 0 <= k < pysam_get_n_cigar(src):
+ */
+  __pyx_v_cigar_p = pysam_bam_get_cigar(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":3038
+ *            cigar_p = pysam_bam_get_cigar(src)
+ * 
+ *            for k from 0 <= k < pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *                op = cigar_p[k] & BAM_CIGAR_MASK
+ * 
+ */
+  __pyx_t_3 = pysam_get_n_cigar(__pyx_v_src);
+  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":3039
+ * 
+ *            for k from 0 <= k < pysam_get_n_cigar(src):
+ *                op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
+ * 
+ *                if op == BAM_CMATCH or op == BAM_CINS or \
+ */
+    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & BAM_CIGAR_MASK);
+
+    /* "pysam/csamfile.pyx":3041
+ *                op = cigar_p[k] & BAM_CIGAR_MASK
+ * 
+ *                if op == BAM_CMATCH or op == BAM_CINS or \             # <<<<<<<<<<<<<<
+ *                   op == BAM_CSOFT_CLIP or \
+ *                   op == BAM_CEQUAL or op == BAM_CDIFF:
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CMATCH) != 0);
+    if (!__pyx_t_2) {
+      __pyx_t_4 = ((__pyx_v_op == BAM_CINS) != 0);
+      if (!__pyx_t_4) {
+
+        /* "pysam/csamfile.pyx":3042
+ * 
+ *                if op == BAM_CMATCH or op == BAM_CINS or \
+ *                   op == BAM_CSOFT_CLIP or \             # <<<<<<<<<<<<<<
+ *                   op == BAM_CEQUAL or op == BAM_CDIFF:
+ *                    qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
+ */
+        __pyx_t_5 = ((__pyx_v_op == BAM_CSOFT_CLIP) != 0);
+        if (!__pyx_t_5) {
+
+          /* "pysam/csamfile.pyx":3043
+ *                if op == BAM_CMATCH or op == BAM_CINS or \
+ *                   op == BAM_CSOFT_CLIP or \
+ *                   op == BAM_CEQUAL or op == BAM_CDIFF:             # <<<<<<<<<<<<<<
+ *                    qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
+ * 
+ */
+          __pyx_t_6 = ((__pyx_v_op == BAM_CEQUAL) != 0);
+          if (!__pyx_t_6) {
+            __pyx_t_7 = ((__pyx_v_op == BAM_CDIFF) != 0);
+            __pyx_t_8 = __pyx_t_7;
+          } else {
+            __pyx_t_8 = __pyx_t_6;
+          }
+          __pyx_t_6 = __pyx_t_8;
+        } else {
+          __pyx_t_6 = __pyx_t_5;
+        }
+        __pyx_t_5 = __pyx_t_6;
+      } else {
+        __pyx_t_5 = __pyx_t_4;
+      }
+      __pyx_t_4 = __pyx_t_5;
+    } else {
+      __pyx_t_4 = __pyx_t_2;
+    }
+    if (__pyx_t_4) {
+
+      /* "pysam/csamfile.pyx":3044
+ *                   op == BAM_CSOFT_CLIP or \
+ *                   op == BAM_CEQUAL or op == BAM_CDIFF:
+ *                    qpos += cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
+ * 
+ *            return qpos
+ */
+      __pyx_v_qpos = (__pyx_v_qpos + ((__pyx_v_cigar_p[__pyx_v_k]) >> BAM_CIGAR_SHIFT));
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+  }
+
+  /* "pysam/csamfile.pyx":3046
+ *                    qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
+ * 
+ *            return qpos             # <<<<<<<<<<<<<<
+ * 
+ *     property aligned_pairs:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_r = __pyx_t_9;
+  __pyx_t_9 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3026
+ *         Returns 0 if CIGAR string is not present.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *            cdef uint32_t k, qpos
+ *            cdef int op
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.inferred_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3053
+ *         Unaligned position are marked by None.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t k, i, pos, qpos
+ *             cdef int op
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_13aligned_pairs_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_13aligned_pairs_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_13aligned_pairs___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_13aligned_pairs___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  uint32_t __pyx_v_k;
+  uint32_t __pyx_v_i;
+  uint32_t __pyx_v_pos;
+  uint32_t __pyx_v_qpos;
+  int __pyx_v_op;
+  uint32_t *__pyx_v_cigar_p;
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_v_result = NULL;
+  PyObject *__pyx_v_l = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int32_t __pyx_t_4;
+  uint16_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  uint32_t __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  int __pyx_t_9;
+  int __pyx_t_10;
+  int __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3053);
+
+  /* "pysam/csamfile.pyx":3059
+ *             cdef bam1_t * src
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             if pysam_get_n_cigar(src) == 0:
+ *                 return []
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":3060
+ * 
+ *             src = self._delegate
+ *             if pysam_get_n_cigar(src) == 0:             # <<<<<<<<<<<<<<
+ *                 return []
+ * 
+ */
+  __pyx_t_2 = ((pysam_get_n_cigar(__pyx_v_src) == 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":3061
+ *             src = self._delegate
+ *             if pysam_get_n_cigar(src) == 0:
+ *                 return []             # <<<<<<<<<<<<<<
+ * 
+ *             result = []
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3063
+ *                 return []
+ * 
+ *             result = []             # <<<<<<<<<<<<<<
+ *             pos = src.core.pos
+ *             qpos = 0
+ */
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_result = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":3064
+ * 
+ *             result = []
+ *             pos = src.core.pos             # <<<<<<<<<<<<<<
+ *             qpos = 0
+ *             cigar_p = pysam_bam_get_cigar(src)
+ */
+  __pyx_t_4 = __pyx_v_src->core.pos;
+  __pyx_v_pos = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":3065
+ *             result = []
+ *             pos = src.core.pos
+ *             qpos = 0             # <<<<<<<<<<<<<<
+ *             cigar_p = pysam_bam_get_cigar(src)
+ * 
+ */
+  __pyx_v_qpos = 0;
+
+  /* "pysam/csamfile.pyx":3066
+ *             pos = src.core.pos
+ *             qpos = 0
+ *             cigar_p = pysam_bam_get_cigar(src)             # <<<<<<<<<<<<<<
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ */
+  __pyx_v_cigar_p = pysam_bam_get_cigar(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":3068
+ *             cigar_p = pysam_bam_get_cigar(src)
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ */
+  __pyx_t_5 = pysam_get_n_cigar(__pyx_v_src);
+  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":3069
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ * 
+ */
+    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & BAM_CIGAR_MASK);
+
+    /* "pysam/csamfile.pyx":3070
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
+ * 
+ *                 if op == BAM_CMATCH:
+ */
+    __pyx_t_3 = __Pyx_PyInt_From_uint32_t(((__pyx_v_cigar_p[__pyx_v_k]) >> BAM_CIGAR_SHIFT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "pysam/csamfile.pyx":3072
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ * 
+ *                 if op == BAM_CMATCH:             # <<<<<<<<<<<<<<
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (qpos, i) )
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CMATCH) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":3073
+ * 
+ *                 if op == BAM_CMATCH:
+ *                     for i from pos <= i < pos + l:             # <<<<<<<<<<<<<<
+ *                         result.append( (qpos, i) )
+ *                         qpos += 1
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
+
+        /* "pysam/csamfile.pyx":3074
+ *                 if op == BAM_CMATCH:
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (qpos, i) )             # <<<<<<<<<<<<<<
+ *                         qpos += 1
+ *                     pos += l
+ */
+        __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
+        __Pyx_GIVEREF(__pyx_t_6);
+        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __pyx_t_6 = 0;
+        __pyx_t_3 = 0;
+        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+        /* "pysam/csamfile.pyx":3075
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (qpos, i) )
+ *                         qpos += 1             # <<<<<<<<<<<<<<
+ *                     pos += l
+ * 
+ */
+        __pyx_v_qpos = (__pyx_v_qpos + 1);
+      }
+
+      /* "pysam/csamfile.pyx":3076
+ *                         result.append( (qpos, i) )
+ *                         qpos += 1
+ *                     pos += l             # <<<<<<<<<<<<<<
+ * 
+ *                 elif op == BAM_CINS:
+ */
+      __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_pos = __pyx_t_7;
+      goto __pyx_L6;
+    }
+
+    /* "pysam/csamfile.pyx":3078
+ *                     pos += l
+ * 
+ *                 elif op == BAM_CINS:             # <<<<<<<<<<<<<<
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (qpos, None) )
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CINS) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":3079
+ * 
+ *                 elif op == BAM_CINS:
+ *                     for i from pos <= i < pos + l:             # <<<<<<<<<<<<<<
+ *                         result.append( (qpos, None) )
+ *                         qpos += 1
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
+
+        /* "pysam/csamfile.pyx":3080
+ *                 elif op == BAM_CINS:
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (qpos, None) )             # <<<<<<<<<<<<<<
+ *                         qpos += 1
+ * 
+ */
+        __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
+        __Pyx_GIVEREF(__pyx_t_8);
+        __Pyx_INCREF(Py_None);
+        PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
+        __Pyx_GIVEREF(Py_None);
+        __pyx_t_8 = 0;
+        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+        /* "pysam/csamfile.pyx":3081
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (qpos, None) )
+ *                         qpos += 1             # <<<<<<<<<<<<<<
+ * 
+ *                 elif op == BAM_CDEL or op == BAM_CREF_SKIP:
+ */
+        __pyx_v_qpos = (__pyx_v_qpos + 1);
+      }
+      goto __pyx_L6;
+    }
+
+    /* "pysam/csamfile.pyx":3083
+ *                         qpos += 1
+ * 
+ *                 elif op == BAM_CDEL or op == BAM_CREF_SKIP:             # <<<<<<<<<<<<<<
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (None, i) )
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CDEL) != 0);
+    if (!__pyx_t_2) {
+      __pyx_t_10 = ((__pyx_v_op == BAM_CREF_SKIP) != 0);
+      __pyx_t_11 = __pyx_t_10;
+    } else {
+      __pyx_t_11 = __pyx_t_2;
+    }
+    if (__pyx_t_11) {
+
+      /* "pysam/csamfile.pyx":3084
+ * 
+ *                 elif op == BAM_CDEL or op == BAM_CREF_SKIP:
+ *                     for i from pos <= i < pos + l:             # <<<<<<<<<<<<<<
+ *                         result.append( (None, i) )
+ *                     pos += l
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
+
+        /* "pysam/csamfile.pyx":3085
+ *                 elif op == BAM_CDEL or op == BAM_CREF_SKIP:
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (None, i) )             # <<<<<<<<<<<<<<
+ *                     pos += l
+ * 
+ */
+        __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_INCREF(Py_None);
+        PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
+        __Pyx_GIVEREF(Py_None);
+        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
+        __Pyx_GIVEREF(__pyx_t_8);
+        __pyx_t_8 = 0;
+        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      }
+
+      /* "pysam/csamfile.pyx":3086
+ *                     for i from pos <= i < pos + l:
+ *                         result.append( (None, i) )
+ *                     pos += l             # <<<<<<<<<<<<<<
+ * 
+ *             return result
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_v_pos = __pyx_t_7;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+  }
+
+  /* "pysam/csamfile.pyx":3088
+ *                     pos += l
+ * 
+ *             return result             # <<<<<<<<<<<<<<
+ * 
+ *     property blocks:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __pyx_v_result;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3053
+ *         Unaligned position are marked by None.
+ *         """
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t k, i, pos, qpos
+ *             cdef int op
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.aligned_pairs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_result);
+  __Pyx_XDECREF(__pyx_v_l);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3103
+ *         """
+ * 
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t k, pos, l
+ *             cdef int op
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_6blocks_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_6blocks_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_6blocks___get__(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_6blocks___get__(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  uint32_t __pyx_v_k;
+  uint32_t __pyx_v_pos;
+  uint32_t __pyx_v_l;
+  int __pyx_v_op;
+  uint32_t *__pyx_v_cigar_p;
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_v_result = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int32_t __pyx_t_4;
+  uint16_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_8;
+  int __pyx_t_9;
+  int __pyx_t_10;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3103);
+
+  /* "pysam/csamfile.pyx":3109
+ *             cdef bam1_t * src
+ * 
+ *             src = self._delegate             # <<<<<<<<<<<<<<
+ *             if pysam_get_n_cigar(src) == 0:
+ *                 return []
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":3110
+ * 
+ *             src = self._delegate
+ *             if pysam_get_n_cigar(src) == 0:             # <<<<<<<<<<<<<<
+ *                 return []
+ * 
+ */
+  __pyx_t_2 = ((pysam_get_n_cigar(__pyx_v_src) == 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":3111
+ *             src = self._delegate
+ *             if pysam_get_n_cigar(src) == 0:
+ *                 return []             # <<<<<<<<<<<<<<
+ * 
+ *             result = []
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3113
+ *                 return []
+ * 
+ *             result = []             # <<<<<<<<<<<<<<
+ *             pos = src.core.pos
+ *             cigar_p = pysam_bam_get_cigar(src)
+ */
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_result = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":3114
+ * 
+ *             result = []
+ *             pos = src.core.pos             # <<<<<<<<<<<<<<
+ *             cigar_p = pysam_bam_get_cigar(src)
+ *             l = 0
+ */
+  __pyx_t_4 = __pyx_v_src->core.pos;
+  __pyx_v_pos = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":3115
+ *             result = []
+ *             pos = src.core.pos
+ *             cigar_p = pysam_bam_get_cigar(src)             # <<<<<<<<<<<<<<
+ *             l = 0
+ * 
+ */
+  __pyx_v_cigar_p = pysam_bam_get_cigar(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":3116
+ *             pos = src.core.pos
+ *             cigar_p = pysam_bam_get_cigar(src)
+ *             l = 0             # <<<<<<<<<<<<<<
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ */
+  __pyx_v_l = 0;
+
+  /* "pysam/csamfile.pyx":3118
+ *             l = 0
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ */
+  __pyx_t_5 = pysam_get_n_cigar(__pyx_v_src);
+  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":3119
+ * 
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 if op == BAM_CMATCH:
+ */
+    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & BAM_CIGAR_MASK);
+
+    /* "pysam/csamfile.pyx":3120
+ *             for k from 0 <= k < pysam_get_n_cigar(src):
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
+ *                 if op == BAM_CMATCH:
+ *                     result.append((pos, pos + l))
+ */
+    __pyx_v_l = ((__pyx_v_cigar_p[__pyx_v_k]) >> BAM_CIGAR_SHIFT);
+
+    /* "pysam/csamfile.pyx":3121
+ *                 op = cigar_p[k] & BAM_CIGAR_MASK
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 if op == BAM_CMATCH:             # <<<<<<<<<<<<<<
+ *                     result.append((pos, pos + l))
+ *                     pos += l
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CMATCH) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":3122
+ *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ *                 if op == BAM_CMATCH:
+ *                     result.append((pos, pos + l))             # <<<<<<<<<<<<<<
+ *                     pos += l
+ *                 elif op == BAM_CDEL or op == BAM_CREF_SKIP:
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = __Pyx_PyInt_From_uint32_t((__pyx_v_pos + __pyx_v_l)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
+      __Pyx_GIVEREF(__pyx_t_6);
+      __pyx_t_3 = 0;
+      __pyx_t_6 = 0;
+      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+      /* "pysam/csamfile.pyx":3123
+ *                 if op == BAM_CMATCH:
+ *                     result.append((pos, pos + l))
+ *                     pos += l             # <<<<<<<<<<<<<<
+ *                 elif op == BAM_CDEL or op == BAM_CREF_SKIP:
+ *                     pos += l
+ */
+      __pyx_v_pos = (__pyx_v_pos + __pyx_v_l);
+      goto __pyx_L6;
+    }
+
+    /* "pysam/csamfile.pyx":3124
+ *                     result.append((pos, pos + l))
+ *                     pos += l
+ *                 elif op == BAM_CDEL or op == BAM_CREF_SKIP:             # <<<<<<<<<<<<<<
+ *                     pos += l
+ * 
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CDEL) != 0);
+    if (!__pyx_t_2) {
+      __pyx_t_9 = ((__pyx_v_op == BAM_CREF_SKIP) != 0);
+      __pyx_t_10 = __pyx_t_9;
+    } else {
+      __pyx_t_10 = __pyx_t_2;
+    }
+    if (__pyx_t_10) {
+
+      /* "pysam/csamfile.pyx":3125
+ *                     pos += l
+ *                 elif op == BAM_CDEL or op == BAM_CREF_SKIP:
+ *                     pos += l             # <<<<<<<<<<<<<<
+ * 
+ *             return result
+ */
+      __pyx_v_pos = (__pyx_v_pos + __pyx_v_l);
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+  }
+
+  /* "pysam/csamfile.pyx":3127
+ *                     pos += l
+ * 
+ *             return result             # <<<<<<<<<<<<<<
+ * 
+ *     #######################################################################
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __pyx_v_result;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3103
+ *         """
+ * 
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef uint32_t k, pos, l
+ *             cdef int op
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.blocks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_result);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3133
+ *     ##
+ *     #######################################################################
+ *     def overlap( self, uint32_t start, uint32_t end ):             # <<<<<<<<<<<<<<
+ *         """return number of aligned bases of read overlapping the interval *start* and *end*
+ *         on the reference sequence.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_15overlap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_11AlignedRead_14overlap[] = "AlignedRead.overlap(self, uint32_t start, uint32_t end)\nreturn number of aligned bases of read overlapping the interval *start* and *end*\n        on the reference sequence.\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_15overlap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  uint32_t __pyx_v_start;
+  uint32_t __pyx_v_end;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("overlap (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("overlap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlap") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_start = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_start == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_end = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_end == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("overlap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.overlap", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_14overlap(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), __pyx_v_start, __pyx_v_end);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_14overlap(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, uint32_t __pyx_v_start, uint32_t __pyx_v_end) {
+  uint32_t __pyx_v_k;
+  uint32_t __pyx_v_pos;
+  uint32_t __pyx_v_overlap;
+  int __pyx_v_op;
+  int __pyx_v_o;
+  uint32_t *__pyx_v_cigar_p;
+  bam1_t *__pyx_v_src;
+  PyObject *__pyx_v_l = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  bam1_t *__pyx_t_1;
+  int __pyx_t_2;
+  int32_t __pyx_t_3;
+  uint16_t __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  uint32_t __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  uint32_t __pyx_t_10;
+  uint32_t __pyx_t_11;
+  int __pyx_t_12;
+  int __pyx_t_13;
+  int __pyx_t_14;
+  int __pyx_t_15;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("overlap", 0);
+  __Pyx_TraceCall("overlap", __pyx_f[0], 3133);
+
+  /* "pysam/csamfile.pyx":3142
+ *         cdef bam1_t * src
+ * 
+ *         overlap = 0             # <<<<<<<<<<<<<<
+ * 
+ *         src = self._delegate
+ */
+  __pyx_v_overlap = 0;
+
+  /* "pysam/csamfile.pyx":3144
+ *         overlap = 0
+ * 
+ *         src = self._delegate             # <<<<<<<<<<<<<<
+ *         if pysam_get_n_cigar(src) == 0:
+ *             return 0
+ */
+  __pyx_t_1 = __pyx_v_self->_delegate;
+  __pyx_v_src = __pyx_t_1;
+
+  /* "pysam/csamfile.pyx":3145
+ * 
+ *         src = self._delegate
+ *         if pysam_get_n_cigar(src) == 0:             # <<<<<<<<<<<<<<
+ *             return 0
+ *         pos = src.core.pos
+ */
+  __pyx_t_2 = ((pysam_get_n_cigar(__pyx_v_src) == 0) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":3146
+ *         src = self._delegate
+ *         if pysam_get_n_cigar(src) == 0:
+ *             return 0             # <<<<<<<<<<<<<<
+ *         pos = src.core.pos
+ *         o = 0
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_int_0);
+    __pyx_r = __pyx_int_0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3147
+ *         if pysam_get_n_cigar(src) == 0:
+ *             return 0
+ *         pos = src.core.pos             # <<<<<<<<<<<<<<
+ *         o = 0
+ * 
+ */
+  __pyx_t_3 = __pyx_v_src->core.pos;
+  __pyx_v_pos = __pyx_t_3;
+
+  /* "pysam/csamfile.pyx":3148
+ *             return 0
+ *         pos = src.core.pos
+ *         o = 0             # <<<<<<<<<<<<<<
+ * 
+ *         cigar_p = pysam_bam_get_cigar(src)
+ */
+  __pyx_v_o = 0;
+
+  /* "pysam/csamfile.pyx":3150
+ *         o = 0
+ * 
+ *         cigar_p = pysam_bam_get_cigar(src)             # <<<<<<<<<<<<<<
+ *         for k from 0 <= k < pysam_get_n_cigar(src):
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ */
+  __pyx_v_cigar_p = pysam_bam_get_cigar(__pyx_v_src);
+
+  /* "pysam/csamfile.pyx":3151
+ * 
+ *         cigar_p = pysam_bam_get_cigar(src)
+ *         for k from 0 <= k < pysam_get_n_cigar(src):             # <<<<<<<<<<<<<<
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ *             l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ */
+  __pyx_t_4 = pysam_get_n_cigar(__pyx_v_src);
+  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
+
+    /* "pysam/csamfile.pyx":3152
+ *         cigar_p = pysam_bam_get_cigar(src)
+ *         for k from 0 <= k < pysam_get_n_cigar(src):
+ *             op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
+ *             l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ * 
+ */
+    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & BAM_CIGAR_MASK);
+
+    /* "pysam/csamfile.pyx":3153
+ *         for k from 0 <= k < pysam_get_n_cigar(src):
+ *             op = cigar_p[k] & BAM_CIGAR_MASK
+ *             l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
+ * 
+ *             if op == BAM_CMATCH:
+ */
+    __pyx_t_5 = __Pyx_PyInt_From_uint32_t(((__pyx_v_cigar_p[__pyx_v_k]) >> BAM_CIGAR_SHIFT)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "pysam/csamfile.pyx":3155
+ *             l = cigar_p[k] >> BAM_CIGAR_SHIFT
+ * 
+ *             if op == BAM_CMATCH:             # <<<<<<<<<<<<<<
+ *                 o = min( pos + l, end) - max( pos, start )
+ *                 if o > 0: overlap += o
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CMATCH) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/csamfile.pyx":3156
+ * 
+ *             if op == BAM_CMATCH:
+ *                 o = min( pos + l, end) - max( pos, start )             # <<<<<<<<<<<<<<
+ *                 if o > 0: overlap += o
+ * 
+ */
+      __pyx_t_6 = __pyx_v_end;
+      __pyx_t_5 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v_l); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (__pyx_t_2) {
+        __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_5 = __pyx_t_9;
+        __pyx_t_9 = 0;
+      } else {
+        __Pyx_INCREF(__pyx_t_7);
+        __pyx_t_5 = __pyx_t_7;
+      }
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_6 = __pyx_v_start;
+      __pyx_t_10 = __pyx_v_pos;
+      if (((__pyx_t_6 > __pyx_t_10) != 0)) {
+        __pyx_t_11 = __pyx_t_6;
+      } else {
+        __pyx_t_11 = __pyx_t_10;
+      }
+      __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_9 = PyNumber_Subtract(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_v_o = __pyx_t_12;
+
+      /* "pysam/csamfile.pyx":3157
+ *             if op == BAM_CMATCH:
+ *                 o = min( pos + l, end) - max( pos, start )
+ *                 if o > 0: overlap += o             # <<<<<<<<<<<<<<
+ * 
+ *             if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
+ */
+      __pyx_t_2 = ((__pyx_v_o > 0) != 0);
+      if (__pyx_t_2) {
+        __pyx_v_overlap = (__pyx_v_overlap + __pyx_v_o);
+        goto __pyx_L7;
+      }
+      __pyx_L7:;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+
+    /* "pysam/csamfile.pyx":3159
+ *                 if o > 0: overlap += o
+ * 
+ *             if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:             # <<<<<<<<<<<<<<
+ *                 pos += l
+ * 
+ */
+    __pyx_t_2 = ((__pyx_v_op == BAM_CMATCH) != 0);
+    if (!__pyx_t_2) {
+      __pyx_t_13 = ((__pyx_v_op == BAM_CDEL) != 0);
+      if (!__pyx_t_13) {
+        __pyx_t_14 = ((__pyx_v_op == BAM_CREF_SKIP) != 0);
+        __pyx_t_15 = __pyx_t_14;
+      } else {
+        __pyx_t_15 = __pyx_t_13;
+      }
+      __pyx_t_13 = __pyx_t_15;
+    } else {
+      __pyx_t_13 = __pyx_t_2;
+    }
+    if (__pyx_t_13) {
+
+      /* "pysam/csamfile.pyx":3160
+ * 
+ *             if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
+ *                 pos += l             # <<<<<<<<<<<<<<
+ * 
+ *         return overlap
+ */
+      __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_v_l); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_11 = __Pyx_PyInt_As_uint32_t(__pyx_t_7); if (unlikely((__pyx_t_11 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_v_pos = __pyx_t_11;
+      goto __pyx_L8;
+    }
+    __pyx_L8:;
+  }
+
+  /* "pysam/csamfile.pyx":3162
+ *                 pos += l
+ * 
+ *         return overlap             # <<<<<<<<<<<<<<
+ * 
+ *     def opt(self, tag):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_overlap); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_r = __pyx_t_7;
+  __pyx_t_7 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3133
+ *     ##
+ *     #######################################################################
+ *     def overlap( self, uint32_t start, uint32_t end ):             # <<<<<<<<<<<<<<
+ *         """return number of aligned bases of read overlapping the interval *start* and *end*
+ *         on the reference sequence.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.overlap", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_l);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3164
+ *         return overlap
+ * 
+ *     def opt(self, tag):             # <<<<<<<<<<<<<<
+ *         """retrieves optional data given a two-letter *tag*"""
+ *         #see bam_aux.c: bam_aux_get() and bam_aux2i() etc
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_17opt(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_11AlignedRead_16opt[] = "AlignedRead.opt(self, tag)\nretrieves optional data given a two-letter *tag*";
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_17opt(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("opt (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_16opt(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_16opt(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tag) {
+  uint8_t *__pyx_v_v;
+  CYTHON_UNUSED int __pyx_v_nvalues;
+  PyObject *__pyx_v_btag = NULL;
+  PyObject *__pyx_v_auxtype = NULL;
+  CYTHON_UNUSED PyObject *__pyx_v_bytesize = NULL;
+  PyObject *__pyx_v_values = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char const *__pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *(*__pyx_t_12)(PyObject *);
+  int __pyx_t_13;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("opt", 0);
+  __Pyx_TraceCall("opt", __pyx_f[0], 3164);
+
+  /* "pysam/csamfile.pyx":3169
+ *         cdef uint8_t * v
+ *         cdef int nvalues
+ *         btag = _forceBytes(tag)             # <<<<<<<<<<<<<<
+ *         v = bam_aux_get(self._delegate, btag)
+ *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )
+ */
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile__forceBytes(__pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_btag = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":3170
+ *         cdef int nvalues
+ *         btag = _forceBytes(tag)
+ *         v = bam_aux_get(self._delegate, btag)             # <<<<<<<<<<<<<<
+ *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )
+ *         auxtype = chr(v[0])
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_btag); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_v = bam_aux_get(__pyx_v_self->_delegate, __pyx_t_2);
+
+  /* "pysam/csamfile.pyx":3171
+ *         btag = _forceBytes(tag)
+ *         v = bam_aux_get(self._delegate, btag)
+ *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )             # <<<<<<<<<<<<<<
+ *         auxtype = chr(v[0])
+ *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
+ */
+  __pyx_t_3 = ((__pyx_v_v == NULL) != 0);
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_tag_s_not_present, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __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 = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":3172
+ *         v = bam_aux_get(self._delegate, btag)
+ *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )
+ *         auxtype = chr(v[0])             # <<<<<<<<<<<<<<
+ *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
+ *             return <int>bam_aux2i(v)
+ */
+  __pyx_t_1 = __Pyx_PyInt_From_uint8_t((__pyx_v_v[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3172; __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 = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_auxtype = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":3173
+ *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )
+ *         auxtype = chr(v[0])
+ *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':             # <<<<<<<<<<<<<<
+ *             return <int>bam_aux2i(v)
+ *         elif auxtype == 'i' or auxtype == 'I':
+ */
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_3) {
+    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_C, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_5) {
+      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_s_2, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (!__pyx_t_6) {
+        __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_7;
+      } else {
+        __pyx_t_8 = __pyx_t_6;
+      }
+      __pyx_t_6 = __pyx_t_8;
+    } else {
+      __pyx_t_6 = __pyx_t_5;
+    }
+    __pyx_t_5 = __pyx_t_6;
+  } else {
+    __pyx_t_5 = __pyx_t_3;
+  }
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":3174
+ *         auxtype = chr(v[0])
+ *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
+ *             return <int>bam_aux2i(v)             # <<<<<<<<<<<<<<
+ *         elif auxtype == 'i' or auxtype == 'I':
+ *             return <int32_t>bam_aux2i(v)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = __Pyx_PyInt_From_int(((int)bam_aux2i(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3175
+ *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
+ *             return <int>bam_aux2i(v)
+ *         elif auxtype == 'i' or auxtype == 'I':             # <<<<<<<<<<<<<<
+ *             return <int32_t>bam_aux2i(v)
+ *         elif auxtype == 'f' or auxtype == 'F':
+ */
+  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_5) {
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_I, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __pyx_t_3;
+  } else {
+    __pyx_t_6 = __pyx_t_5;
+  }
+  if (__pyx_t_6) {
+
+    /* "pysam/csamfile.pyx":3176
+ *             return <int>bam_aux2i(v)
+ *         elif auxtype == 'i' or auxtype == 'I':
+ *             return <int32_t>bam_aux2i(v)             # <<<<<<<<<<<<<<
+ *         elif auxtype == 'f' or auxtype == 'F':
+ *             return <float>bam_aux2f(v)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = __Pyx_PyInt_From_int32_t(((int32_t)bam_aux2i(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3177
+ *         elif auxtype == 'i' or auxtype == 'I':
+ *             return <int32_t>bam_aux2i(v)
+ *         elif auxtype == 'f' or auxtype == 'F':             # <<<<<<<<<<<<<<
+ *             return <float>bam_aux2f(v)
+ *         elif auxtype == 'd' or auxtype == 'D':
+ */
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_f, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_F, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __pyx_t_5;
+  } else {
+    __pyx_t_3 = __pyx_t_6;
+  }
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":3178
+ *             return <int32_t>bam_aux2i(v)
+ *         elif auxtype == 'f' or auxtype == 'F':
+ *             return <float>bam_aux2f(v)             # <<<<<<<<<<<<<<
+ *         elif auxtype == 'd' or auxtype == 'D':
+ *             return <double>bam_aux2f(v)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = PyFloat_FromDouble(((float)bam_aux2f(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3179
+ *         elif auxtype == 'f' or auxtype == 'F':
+ *             return <float>bam_aux2f(v)
+ *         elif auxtype == 'd' or auxtype == 'D':             # <<<<<<<<<<<<<<
+ *             return <double>bam_aux2f(v)
+ *         elif auxtype == 'A':
+ */
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_d, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_3) {
+    __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_D, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __pyx_t_6;
+  } else {
+    __pyx_t_5 = __pyx_t_3;
+  }
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":3180
+ *             return <float>bam_aux2f(v)
+ *         elif auxtype == 'd' or auxtype == 'D':
+ *             return <double>bam_aux2f(v)             # <<<<<<<<<<<<<<
+ *         elif auxtype == 'A':
+ *             # there might a more efficient way
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = PyFloat_FromDouble(((double)bam_aux2f(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3181
+ *         elif auxtype == 'd' or auxtype == 'D':
+ *             return <double>bam_aux2f(v)
+ *         elif auxtype == 'A':             # <<<<<<<<<<<<<<
+ *             # there might a more efficient way
+ *             # to convert a char into a string
+ */
+  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_A, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":3184
+ *             # there might a more efficient way
+ *             # to convert a char into a string
+ *             return '%c' % <char>bam_aux2A(v)             # <<<<<<<<<<<<<<
+ *         elif auxtype == 'Z':
+ *             return _charptr_to_str(<char*>bam_aux2Z(v))
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = __Pyx_PyInt_From_char(((char)bam_aux2A(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_c_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3185
+ *             # to convert a char into a string
+ *             return '%c' % <char>bam_aux2A(v)
+ *         elif auxtype == 'Z':             # <<<<<<<<<<<<<<
+ *             return _charptr_to_str(<char*>bam_aux2Z(v))
+ *         elif auxtype == 'B':
+ */
+  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_Z, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":3186
+ *             return '%c' % <char>bam_aux2A(v)
+ *         elif auxtype == 'Z':
+ *             return _charptr_to_str(<char*>bam_aux2Z(v))             # <<<<<<<<<<<<<<
+ *         elif auxtype == 'B':
+ *             bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_4 = __pyx_f_5pysam_8csamfile__charptr_to_str(((char *)bam_aux2Z(__pyx_v_v))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "pysam/csamfile.pyx":3187
+ *         elif auxtype == 'Z':
+ *             return _charptr_to_str(<char*>bam_aux2Z(v))
+ *         elif auxtype == 'B':             # <<<<<<<<<<<<<<
+ *             bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
+ *             return values
+ */
+  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_auxtype, __pyx_n_s_B, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_5) {
+
+    /* "pysam/csamfile.pyx":3188
+ *             return _charptr_to_str(<char*>bam_aux2Z(v))
+ *         elif auxtype == 'B':
+ *             bytesize, nvalues, values = convertBinaryTagToList( v + 1 )             # <<<<<<<<<<<<<<
+ *             return values
+ *         else:
+ */
+    __pyx_t_4 = __pyx_f_5pysam_8csamfile_convertBinaryTagToList((__pyx_v_v + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+      PyObject* sequence = __pyx_t_4;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 3)) {
+        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
+        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 2); 
+      } else {
+        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
+        __pyx_t_10 = PyList_GET_ITEM(sequence, 2); 
+      }
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_9);
+      __Pyx_INCREF(__pyx_t_10);
+      #else
+      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      #endif
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
+      index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_1);
+      index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_9);
+      index = 2; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_10);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_12 = NULL;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      goto __pyx_L6_unpacking_done;
+      __pyx_L5_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_t_12 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L6_unpacking_done:;
+    }
+    __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_v_bytesize = __pyx_t_1;
+    __pyx_t_1 = 0;
+    __pyx_v_nvalues = __pyx_t_13;
+    __pyx_v_values = __pyx_t_10;
+    __pyx_t_10 = 0;
+
+    /* "pysam/csamfile.pyx":3189
+ *         elif auxtype == 'B':
+ *             bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
+ *             return values             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise ValueError("unknown auxilliary type '%s'" % auxtype)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_values);
+    __pyx_r = __pyx_v_values;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":3191
+ *             return values
+ *         else:
+ *             raise ValueError("unknown auxilliary type '%s'" % auxtype)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unknown_auxilliary_type_s, __pyx_v_auxtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __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 = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":3164
+ *         return overlap
+ * 
+ *     def opt(self, tag):             # <<<<<<<<<<<<<<
+ *         """retrieves optional data given a two-letter *tag*"""
+ *         #see bam_aux.c: bam_aux_get() and bam_aux2i() etc
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.opt", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_btag);
+  __Pyx_XDECREF(__pyx_v_auxtype);
+  __Pyx_XDECREF(__pyx_v_bytesize);
+  __Pyx_XDECREF(__pyx_v_values);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3194
+ * 
+ * 
+ *     def fancy_str (self):             # <<<<<<<<<<<<<<
+ *         """returns list of fieldnames/values in pretty format for debugging.
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_19fancy_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_11AlignedRead_18fancy_str[] = "AlignedRead.fancy_str(self)\nreturns list of fieldnames/values in pretty format for debugging.\n\n        ";
+static PyObject *__pyx_pw_5pysam_8csamfile_11AlignedRead_19fancy_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("fancy_str (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11AlignedRead_18fancy_str(((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11AlignedRead_18fancy_str(struct __pyx_obj_5pysam_8csamfile_AlignedRead *__pyx_v_self) {
+  PyObject *__pyx_v_ret_string = NULL;
+  PyObject *__pyx_v_field_names = NULL;
+  PyObject *__pyx_v_fields_names_in_order = NULL;
+  PyObject *__pyx_v_f = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_t_10;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("fancy_str", 0);
+  __Pyx_TraceCall("fancy_str", __pyx_f[0], 3194);
+
+  /* "pysam/csamfile.pyx":3198
+ * 
+ *         """
+ *         ret_string = []             # <<<<<<<<<<<<<<
+ * 
+ *         # Originally written by Leo. Note that not all of these fields
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_ret_string = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":3202
+ *         # Originally written by Leo. Note that not all of these fields
+ *         # exist. Deprecate?
+ *         field_names = {             # <<<<<<<<<<<<<<
+ *            "tid":           "Contig index",
+ *            "pos":           "Mapped position on contig",
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_tid, __pyx_kp_s_Contig_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pos, __pyx_kp_s_Mapped_position_on_contig) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mtid, __pyx_kp_s_Contig_index_for_mate_pair) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mpos, __pyx_kp_s_Position_of_mate_pair) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_isize, __pyx_kp_s_Insert_size) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_flag, __pyx_kp_s_Binary_flag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_n_cigar, __pyx_kp_s_Count_of_cigar_entries) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_cigar, __pyx_kp_s_Cigar_entries) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_qual, __pyx_kp_s_Mapping_quality) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bin, __pyx_kp_s_Bam_index_bin_number) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_l_qname, __pyx_kp_s_Length_of_query_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_qname, __pyx_kp_s_Query_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_l_qseq, __pyx_kp_s_Length_of_query_sequence) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_qseq, __pyx_kp_s_Query_sequence) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bqual, __pyx_kp_s_Quality_scores) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_l_data, __pyx_kp_s_Length_of_auxilary_data) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_m_data, __pyx_kp_s_Maximum_data_length) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_field_names = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":3221
+ *            "m_data":        "Maximum data length",
+ *            }
+ *         fields_names_in_order = ["tid", "pos", "mtid", "mpos", "isize", "flag",             # <<<<<<<<<<<<<<
+ *                                  "n_cigar", "cigar", "qual", "bin", "l_qname", "qname",
+ *                                  "l_qseq", "qseq", "bqual", "l_data", "m_data"]
+ */
+  __pyx_t_1 = PyList_New(17); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_n_s_tid);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tid);
+  __Pyx_GIVEREF(__pyx_n_s_tid);
+  __Pyx_INCREF(__pyx_n_s_pos);
+  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_pos);
+  __Pyx_GIVEREF(__pyx_n_s_pos);
+  __Pyx_INCREF(__pyx_n_s_mtid);
+  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_mtid);
+  __Pyx_GIVEREF(__pyx_n_s_mtid);
+  __Pyx_INCREF(__pyx_n_s_mpos);
+  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_mpos);
+  __Pyx_GIVEREF(__pyx_n_s_mpos);
+  __Pyx_INCREF(__pyx_n_s_isize);
+  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_isize);
+  __Pyx_GIVEREF(__pyx_n_s_isize);
+  __Pyx_INCREF(__pyx_n_s_flag);
+  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_flag);
+  __Pyx_GIVEREF(__pyx_n_s_flag);
+  __Pyx_INCREF(__pyx_n_s_n_cigar);
+  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_n_cigar);
+  __Pyx_GIVEREF(__pyx_n_s_n_cigar);
+  __Pyx_INCREF(__pyx_n_s_cigar);
+  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_cigar);
+  __Pyx_GIVEREF(__pyx_n_s_cigar);
+  __Pyx_INCREF(__pyx_n_s_qual);
+  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_qual);
+  __Pyx_GIVEREF(__pyx_n_s_qual);
+  __Pyx_INCREF(__pyx_n_s_bin);
+  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_s_bin);
+  __Pyx_GIVEREF(__pyx_n_s_bin);
+  __Pyx_INCREF(__pyx_n_s_l_qname);
+  PyList_SET_ITEM(__pyx_t_1, 10, __pyx_n_s_l_qname);
+  __Pyx_GIVEREF(__pyx_n_s_l_qname);
+  __Pyx_INCREF(__pyx_n_s_qname);
+  PyList_SET_ITEM(__pyx_t_1, 11, __pyx_n_s_qname);
+  __Pyx_GIVEREF(__pyx_n_s_qname);
+  __Pyx_INCREF(__pyx_n_s_l_qseq);
+  PyList_SET_ITEM(__pyx_t_1, 12, __pyx_n_s_l_qseq);
+  __Pyx_GIVEREF(__pyx_n_s_l_qseq);
+  __Pyx_INCREF(__pyx_n_s_qseq);
+  PyList_SET_ITEM(__pyx_t_1, 13, __pyx_n_s_qseq);
+  __Pyx_GIVEREF(__pyx_n_s_qseq);
+  __Pyx_INCREF(__pyx_n_s_bqual);
+  PyList_SET_ITEM(__pyx_t_1, 14, __pyx_n_s_bqual);
+  __Pyx_GIVEREF(__pyx_n_s_bqual);
+  __Pyx_INCREF(__pyx_n_s_l_data);
+  PyList_SET_ITEM(__pyx_t_1, 15, __pyx_n_s_l_data);
+  __Pyx_GIVEREF(__pyx_n_s_l_data);
+  __Pyx_INCREF(__pyx_n_s_m_data);
+  PyList_SET_ITEM(__pyx_t_1, 16, __pyx_n_s_m_data);
+  __Pyx_GIVEREF(__pyx_n_s_m_data);
+  __pyx_v_fields_names_in_order = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":3225
+ *                                  "l_qseq", "qseq", "bqual", "l_data", "m_data"]
+ * 
+ *         for f in fields_names_in_order:             # <<<<<<<<<<<<<<
+ *             if f not in dir(self):
+ *                 continue
+ */
+  __pyx_t_1 = __pyx_v_fields_names_in_order; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+  for (;;) {
+    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #else
+    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #endif
+    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "pysam/csamfile.pyx":3226
+ * 
+ *         for f in fields_names_in_order:
+ *             if f not in dir(self):             # <<<<<<<<<<<<<<
+ *                 continue
+ *             ret_string.append("%-30s %-10s= %s" %
+ */
+    __pyx_t_3 = PyObject_Dir(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_5 = (__pyx_t_4 != 0);
+    if (__pyx_t_5) {
+
+      /* "pysam/csamfile.pyx":3227
+ *         for f in fields_names_in_order:
+ *             if f not in dir(self):
+ *                 continue             # <<<<<<<<<<<<<<
+ *             ret_string.append("%-30s %-10s= %s" %
+ *                               (field_names[f],
+ */
+      goto __pyx_L3_continue;
+    }
+
+    /* "pysam/csamfile.pyx":3229
+ *                 continue
+ *             ret_string.append("%-30s %-10s= %s" %
+ *                               (field_names[f],             # <<<<<<<<<<<<<<
+ *                                "(" + f + ")",
+ *                                self.__getattribute__(f)))
+ */
+    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_field_names, __pyx_v_f); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+
+    /* "pysam/csamfile.pyx":3230
+ *             ret_string.append("%-30s %-10s= %s" %
+ *                               (field_names[f],
+ *                                "(" + f + ")",             # <<<<<<<<<<<<<<
+ *                                self.__getattribute__(f)))
+ * 
+ */
+    __pyx_t_6 = PyNumber_Add(__pyx_kp_s__79, __pyx_v_f); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__80); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+    /* "pysam/csamfile.pyx":3231
+ *                               (field_names[f],
+ *                                "(" + f + ")",
+ *                                self.__getattribute__(f)))             # <<<<<<<<<<<<<<
+ * 
+ *         return ret_string
+ */
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getattribute); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __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 = 3231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_INCREF(__pyx_v_f);
+    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f);
+    __Pyx_GIVEREF(__pyx_v_f);
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __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_8); __pyx_t_8 = 0;
+
+    /* "pysam/csamfile.pyx":3229
+ *                 continue
+ *             ret_string.append("%-30s %-10s= %s" %
+ *                               (field_names[f],             # <<<<<<<<<<<<<<
+ *                                "(" + f + ")",
+ *                                self.__getattribute__(f)))
+ */
+    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_3 = 0;
+    __pyx_t_7 = 0;
+    __pyx_t_9 = 0;
+
+    /* "pysam/csamfile.pyx":3228
+ *             if f not in dir(self):
+ *                 continue
+ *             ret_string.append("%-30s %-10s= %s" %             # <<<<<<<<<<<<<<
+ *                               (field_names[f],
+ *                                "(" + f + ")",
+ */
+    __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_30s_10s_s, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ret_string, __pyx_t_9); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_L3_continue:;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":3233
+ *                                self.__getattribute__(f)))
+ * 
+ *         return ret_string             # <<<<<<<<<<<<<<
+ * 
+ * cdef class PileupProxy:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_ret_string);
+  __pyx_r = __pyx_v_ret_string;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3194
+ * 
+ * 
+ *     def fancy_str (self):             # <<<<<<<<<<<<<<
+ *         """returns list of fieldnames/values in pretty format for debugging.
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("pysam.csamfile.AlignedRead.fancy_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_ret_string);
+  __Pyx_XDECREF(__pyx_v_field_names);
+  __Pyx_XDECREF(__pyx_v_fields_names_in_order);
+  __Pyx_XDECREF(__pyx_v_f);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3252
+ *     will change.
+ *     '''
+ *     def __init__(self):             # <<<<<<<<<<<<<<
+ *         raise TypeError("This class cannot be instantiated from Python")
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11PileupProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11PileupProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11PileupProxy___init__(((struct __pyx_obj_5pysam_8csamfile_PileupProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11PileupProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 3252);
+
+  /* "pysam/csamfile.pyx":3253
+ *     '''
+ *     def __init__(self):
+ *         raise TypeError("This class cannot be instantiated from Python")             # <<<<<<<<<<<<<<
+ * 
+ *     def __str__(self):
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":3252
+ *     will change.
+ *     '''
+ *     def __init__(self):             # <<<<<<<<<<<<<<
+ *         raise TypeError("This class cannot be instantiated from Python")
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupProxy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3255
+ *         raise TypeError("This class cannot be instantiated from Python")
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" +\
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_3__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_3__str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11PileupProxy_2__str__(((struct __pyx_obj_5pysam_8csamfile_PileupProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_2__str__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__str__", 0);
+  __Pyx_TraceCall("__str__", __pyx_f[0], 3255);
+
+  /* "pysam/csamfile.pyx":3256
+ * 
+ *     def __str__(self):
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\             # <<<<<<<<<<<<<<
+ *             "\n" +\
+ *             "\n".join( map(str, self.pileups) )
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __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 = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_1 = 0;
+  __pyx_t_2 = 0;
+  __pyx_t_3 = 0;
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":3258
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" +\
+ *             "\n".join( map(str, self.pileups) )             # <<<<<<<<<<<<<<
+ * 
+ *     property tid:
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pileups); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3258; __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 = 3258; __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))));
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3258; __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_PyString_Join(__pyx_kp_s__4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":3257
+ *     def __str__(self):
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" +\             # <<<<<<<<<<<<<<
+ *             "\n".join( map(str, self.pileups) )
+ * 
+ */
+  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3257; __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_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3255
+ *         raise TypeError("This class cannot be instantiated from Python")
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" +\
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamfile.PileupProxy.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3262
+ *     property tid:
+ *         '''the chromosome ID as is defined in the header'''
+ *         def __get__(self): return self.tid             # <<<<<<<<<<<<<<
+ * 
+ *     property n:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_3tid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_3tid_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11PileupProxy_3tid___get__(((struct __pyx_obj_5pysam_8csamfile_PileupProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_3tid___get__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3262);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupProxy.tid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3266
+ *     property n:
+ *         '''number of reads mapping to this column.'''
+ *         def __get__(self): return self.n_pu             # <<<<<<<<<<<<<<
+ *         def __set__(self, n): self.n_pu = n
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_1n_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_1n_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11PileupProxy_1n___get__(((struct __pyx_obj_5pysam_8csamfile_PileupProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_1n___get__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3266);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->n_pu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupProxy.n.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3267
+ *         '''number of reads mapping to this column.'''
+ *         def __get__(self): return self.n_pu
+ *         def __set__(self, n): self.n_pu = n             # <<<<<<<<<<<<<<
+ * 
+ *     property pos:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_11PileupProxy_1n_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_11PileupProxy_1n_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11PileupProxy_1n_2__set__(((struct __pyx_obj_5pysam_8csamfile_PileupProxy *)__pyx_v_self), ((PyObject *)__pyx_v_n));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_11PileupProxy_1n_2__set__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self, PyObject *__pyx_v_n) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_TraceCall("__set__", __pyx_f[0], 3267);
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_n); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->n_pu = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.PileupProxy.n.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3270
+ * 
+ *     property pos:
+ *         def __get__(self): return self.pos             # <<<<<<<<<<<<<<
+ * 
+ *     property pileups:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_3pos_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11PileupProxy_3pos___get__(((struct __pyx_obj_5pysam_8csamfile_PileupProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_3pos___get__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3270);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupProxy.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3274
+ *     property pileups:
+ *         '''list of reads (:class:`pysam.PileupRead`) aligned to this column'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef int x
+ *             pileups = []
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_7pileups_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_11PileupProxy_7pileups_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_11PileupProxy_7pileups___get__(((struct __pyx_obj_5pysam_8csamfile_PileupProxy *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_11PileupProxy_7pileups___get__(struct __pyx_obj_5pysam_8csamfile_PileupProxy *__pyx_v_self) {
+  int __pyx_v_x;
+  PyObject *__pyx_v_pileups = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3274);
+
+  /* "pysam/csamfile.pyx":3276
+ *         def __get__(self):
+ *             cdef int x
+ *             pileups = []             # <<<<<<<<<<<<<<
+ * 
+ *             if self.plp == NULL or self.plp[0] == NULL:
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_pileups = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":3278
+ *             pileups = []
+ * 
+ *             if self.plp == NULL or self.plp[0] == NULL:             # <<<<<<<<<<<<<<
+ *                 raise ValueError("PileupProxy accessed after iterator finished")
+ * 
+ */
+  __pyx_t_2 = ((__pyx_v_self->plp == NULL) != 0);
+  if (!__pyx_t_2) {
+    __pyx_t_3 = (((__pyx_v_self->plp[0]) == NULL) != 0);
+    __pyx_t_4 = __pyx_t_3;
+  } else {
+    __pyx_t_4 = __pyx_t_2;
+  }
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":3279
+ * 
+ *             if self.plp == NULL or self.plp[0] == NULL:
+ *                 raise ValueError("PileupProxy accessed after iterator finished")             # <<<<<<<<<<<<<<
+ * 
+ *             # warning: there could be problems if self.n and self.buf are
+ */
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":3283
+ *             # warning: there could be problems if self.n and self.buf are
+ *             # out of sync.
+ *             for x from 0 <= x < self.n_pu:             # <<<<<<<<<<<<<<
+ *                 pileups.append(makePileupRead(&(self.plp[0][x])))
+ *             return pileups
+ */
+  __pyx_t_5 = __pyx_v_self->n_pu;
+  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
+
+    /* "pysam/csamfile.pyx":3284
+ *             # out of sync.
+ *             for x from 0 <= x < self.n_pu:
+ *                 pileups.append(makePileupRead(&(self.plp[0][x])))             # <<<<<<<<<<<<<<
+ *             return pileups
+ * 
+ */
+    __pyx_t_1 = __pyx_f_5pysam_8csamfile_makePileupRead((&((__pyx_v_self->plp[0])[__pyx_v_x]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_pileups, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "pysam/csamfile.pyx":3285
+ *             for x from 0 <= x < self.n_pu:
+ *                 pileups.append(makePileupRead(&(self.plp[0][x])))
+ *             return pileups             # <<<<<<<<<<<<<<
+ * 
+ * cdef class PileupRead:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_pileups);
+  __pyx_r = __pyx_v_pileups;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3274
+ *     property pileups:
+ *         '''list of reads (:class:`pysam.PileupRead`) aligned to this column'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef int x
+ *             pileups = []
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupProxy.pileups.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_pileups);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3291
+ *     '''
+ * 
+ *     def __init__(self):             # <<<<<<<<<<<<<<
+ *         raise TypeError("This class cannot be instantiated from Python")
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_10PileupRead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_10PileupRead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead___init__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_10PileupRead___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 3291);
+
+  /* "pysam/csamfile.pyx":3292
+ * 
+ *     def __init__(self):
+ *         raise TypeError("This class cannot be instantiated from Python")             # <<<<<<<<<<<<<<
+ * 
+ *     def __str__(self):
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":3291
+ *     '''
+ * 
+ *     def __init__(self):             # <<<<<<<<<<<<<<
+ *         raise TypeError("This class cannot be instantiated from Python")
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupRead.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3294
+ *         raise TypeError("This class cannot be instantiated from Python")
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         return "\t".join( map(str, (self.alignment, self.qpos, self.indel, self.level, self.is_del, self.is_head, self.is_tail ) ) )
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_3__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_3__str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead_2__str__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_2__str__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__str__", 0);
+  __Pyx_TraceCall("__str__", __pyx_f[0], 3294);
+
+  /* "pysam/csamfile.pyx":3295
+ * 
+ *     def __str__(self):
+ *         return "\t".join( map(str, (self.alignment, self.qpos, self.indel, self.level, self.is_del, self.is_head, self.is_tail ) ) )             # <<<<<<<<<<<<<<
+ * 
+ *     property alignment:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qpos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_level); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_del); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_head); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_tail); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = PyTuple_New(7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  __pyx_t_1 = 0;
+  __pyx_t_2 = 0;
+  __pyx_t_3 = 0;
+  __pyx_t_4 = 0;
+  __pyx_t_5 = 0;
+  __pyx_t_6 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
+  __pyx_t_8 = 0;
+  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_r = __pyx_t_7;
+  __pyx_t_7 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3294
+ *         raise TypeError("This class cannot be instantiated from Python")
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         return "\t".join( map(str, (self.alignment, self.qpos, self.indel, self.level, self.is_del, self.is_head, self.is_tail ) ) )
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("pysam.csamfile.PileupRead.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3299
+ *     property alignment:
+ *         """a :class:`pysam.AlignedRead` object of the aligned read"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._alignment
+ *     property qpos:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_9alignment_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_9alignment_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead_9alignment___get__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_9alignment___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3299);
+
+  /* "pysam/csamfile.pyx":3300
+ *         """a :class:`pysam.AlignedRead` object of the aligned read"""
+ *         def __get__(self):
+ *             return self._alignment             # <<<<<<<<<<<<<<
+ *     property qpos:
+ *         """position of the read base at the pileup site, 0-based"""
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self->_alignment));
+  __pyx_r = ((PyObject *)__pyx_v_self->_alignment);
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3299
+ *     property alignment:
+ *         """a :class:`pysam.AlignedRead` object of the aligned read"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._alignment
+ *     property qpos:
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3303
+ *     property qpos:
+ *         """position of the read base at the pileup site, 0-based"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._qpos
+ *     property indel:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_4qpos_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_4qpos_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead_4qpos___get__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_4qpos___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3303);
+
+  /* "pysam/csamfile.pyx":3304
+ *         """position of the read base at the pileup site, 0-based"""
+ *         def __get__(self):
+ *             return self._qpos             # <<<<<<<<<<<<<<
+ *     property indel:
+ *         """indel length; 0 for no indel, positive for ins and negative for del"""
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_qpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3303
+ *     property qpos:
+ *         """position of the read base at the pileup site, 0-based"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._qpos
+ *     property indel:
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupRead.qpos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3307
+ *     property indel:
+ *         """indel length; 0 for no indel, positive for ins and negative for del"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._indel
+ *     property is_del:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_5indel_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_5indel_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead_5indel___get__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_5indel___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3307);
+
+  /* "pysam/csamfile.pyx":3308
+ *         """indel length; 0 for no indel, positive for ins and negative for del"""
+ *         def __get__(self):
+ *             return self._indel             # <<<<<<<<<<<<<<
+ *     property is_del:
+ *         """1 iff the base on the padded read is a deletion"""
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3307
+ *     property indel:
+ *         """indel length; 0 for no indel, positive for ins and negative for del"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._indel
+ *     property is_del:
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupRead.indel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3311
+ *     property is_del:
+ *         """1 iff the base on the padded read is a deletion"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._is_del
+ *     property is_head:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_6is_del_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_6is_del_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead_6is_del___get__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_6is_del___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3311);
+
+  /* "pysam/csamfile.pyx":3312
+ *         """1 iff the base on the padded read is a deletion"""
+ *         def __get__(self):
+ *             return self._is_del             # <<<<<<<<<<<<<<
+ *     property is_head:
+ *         def __get__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->_is_del); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3311
+ *     property is_del:
+ *         """1 iff the base on the padded read is a deletion"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._is_del
+ *     property is_head:
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupRead.is_del.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3314
+ *             return self._is_del
+ *     property is_head:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._is_head
+ *     property is_tail:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_7is_head_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_7is_head_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead_7is_head___get__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_7is_head___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3314);
+
+  /* "pysam/csamfile.pyx":3315
+ *     property is_head:
+ *         def __get__(self):
+ *             return self._is_head             # <<<<<<<<<<<<<<
+ *     property is_tail:
+ *         def __get__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->_is_head); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3314
+ *             return self._is_del
+ *     property is_head:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._is_head
+ *     property is_tail:
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupRead.is_head.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3317
+ *             return self._is_head
+ *     property is_tail:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._is_tail
+ *     property level:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_7is_tail_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_7is_tail_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead_7is_tail___get__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_7is_tail___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3317);
+
+  /* "pysam/csamfile.pyx":3318
+ *     property is_tail:
+ *         def __get__(self):
+ *             return self._is_tail             # <<<<<<<<<<<<<<
+ *     property level:
+ *         def __get__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->_is_tail); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3317
+ *             return self._is_head
+ *     property is_tail:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._is_tail
+ *     property level:
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupRead.is_tail.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3320
+ *             return self._is_tail
+ *     property level:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._level
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_10PileupRead_5level_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_10PileupRead_5level___get__(((struct __pyx_obj_5pysam_8csamfile_PileupRead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_10PileupRead_5level___get__(struct __pyx_obj_5pysam_8csamfile_PileupRead *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3320);
+
+  /* "pysam/csamfile.pyx":3321
+ *     property level:
+ *         def __get__(self):
+ *             return self._level             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3320
+ *             return self._is_tail
+ *     property level:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._level
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.PileupRead.level.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3337
+ *     property tid:
+ *         '''the chromosome ID as is defined in the header'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._tid
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_3tid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_3tid_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall_3tid___get__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_3tid___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3337);
+
+  /* "pysam/csamfile.pyx":3338
+ *         '''the chromosome ID as is defined in the header'''
+ *         def __get__(self):
+ *             return self._tid             # <<<<<<<<<<<<<<
+ * 
+ *     property pos:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3337
+ *     property tid:
+ *         '''the chromosome ID as is defined in the header'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._tid
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.tid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3342
+ *     property pos:
+ *        '''nucleotide position of SNP.'''
+ *        def __get__(self): return self._pos             # <<<<<<<<<<<<<<
+ * 
+ *     property reference_base:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_3pos_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall_3pos___get__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_3pos___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3342);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3346
+ *     property reference_base:
+ *        '''reference base at pos. ``N`` if no reference sequence supplied.'''
+ *        def __get__(self): return from_string_and_size( &self._reference_base, 1 )             # <<<<<<<<<<<<<<
+ * 
+ *     property genotype:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_14reference_base_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_14reference_base_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall_14reference_base___get__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_14reference_base___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3346);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile_from_string_and_size((&__pyx_v_self->_reference_base), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.reference_base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3350
+ *     property genotype:
+ *        '''the genotype called.'''
+ *        def __get__(self): return from_string_and_size( &self._genotype, 1 )             # <<<<<<<<<<<<<<
+ * 
+ *     property consensus_quality:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_8genotype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_8genotype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall_8genotype___get__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_8genotype___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3350);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_8csamfile_from_string_and_size((&__pyx_v_self->_genotype), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.genotype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3354
+ *     property consensus_quality:
+ *        '''the genotype quality (Phred-scaled).'''
+ *        def __get__(self): return self._consensus_quality             # <<<<<<<<<<<<<<
+ * 
+ *     property snp_quality:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_17consensus_quality_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_17consensus_quality_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall_17consensus_quality___get__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_17consensus_quality___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3354);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_consensus_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.consensus_quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3358
+ *     property snp_quality:
+ *        '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
+ *        def __get__(self): return self._snp_quality             # <<<<<<<<<<<<<<
+ * 
+ *     property mapping_quality:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_11snp_quality_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_11snp_quality_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall_11snp_quality___get__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_11snp_quality___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3358);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_snp_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.snp_quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3362
+ *     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:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_15mapping_quality_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_15mapping_quality_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall_15mapping_quality___get__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_15mapping_quality___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3362);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_rms_mapping_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.mapping_quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3366
+ *     property coverage:
+ *        '''coverage or read depth - the number of reads involved in the call.'''
+ *        def __get__(self): return self._coverage             # <<<<<<<<<<<<<<
+ * 
+ *     def __str__(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_8coverage_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_8coverage_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall_8coverage___get__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall_8coverage___get__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_TraceCall("__get__", __pyx_f[0], 3366);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_coverage); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.coverage.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3368
+ *        def __get__(self): return self._coverage
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ * 
+ *         return "\t".join( map(str, (
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_1__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_8csamfile_7SNPCall_1__str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_7SNPCall___str__(((struct __pyx_obj_5pysam_8csamfile_SNPCall *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_7SNPCall___str__(struct __pyx_obj_5pysam_8csamfile_SNPCall *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__str__", 0);
+  __Pyx_TraceCall("__str__", __pyx_f[0], 3368);
+
+  /* "pysam/csamfile.pyx":3370
+ *     def __str__(self):
+ * 
+ *         return "\t".join( map(str, (             # <<<<<<<<<<<<<<
+ *                     self.tid,
+ *                     self.pos,
+ */
+  __Pyx_XDECREF(__pyx_r);
+
+  /* "pysam/csamfile.pyx":3371
+ * 
+ *         return "\t".join( map(str, (
+ *                     self.tid,             # <<<<<<<<<<<<<<
+ *                     self.pos,
+ *                     self.reference_base,
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "pysam/csamfile.pyx":3372
+ *         return "\t".join( map(str, (
+ *                     self.tid,
+ *                     self.pos,             # <<<<<<<<<<<<<<
+ *                     self.reference_base,
+ *                     self.genotype,
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+
+  /* "pysam/csamfile.pyx":3373
+ *                     self.tid,
+ *                     self.pos,
+ *                     self.reference_base,             # <<<<<<<<<<<<<<
+ *                     self.genotype,
+ *                     self.consensus_quality,
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reference_base); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+
+  /* "pysam/csamfile.pyx":3374
+ *                     self.pos,
+ *                     self.reference_base,
+ *                     self.genotype,             # <<<<<<<<<<<<<<
+ *                     self.consensus_quality,
+ *                     self.snp_quality,
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_genotype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+
+  /* "pysam/csamfile.pyx":3375
+ *                     self.reference_base,
+ *                     self.genotype,
+ *                     self.consensus_quality,             # <<<<<<<<<<<<<<
+ *                     self.snp_quality,
+ *                     self.mapping_quality,
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_consensus_quality); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+
+  /* "pysam/csamfile.pyx":3376
+ *                     self.genotype,
+ *                     self.consensus_quality,
+ *                     self.snp_quality,             # <<<<<<<<<<<<<<
+ *                     self.mapping_quality,
+ *                     self.coverage ) ) )
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_snp_quality); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+
+  /* "pysam/csamfile.pyx":3377
+ *                     self.consensus_quality,
+ *                     self.snp_quality,
+ *                     self.mapping_quality,             # <<<<<<<<<<<<<<
+ *                     self.coverage ) ) )
+ * 
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mapping_quality); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+
+  /* "pysam/csamfile.pyx":3378
+ *                     self.snp_quality,
+ *                     self.mapping_quality,
+ *                     self.coverage ) ) )             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_coverage); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+
+  /* "pysam/csamfile.pyx":3371
+ * 
+ *         return "\t".join( map(str, (
+ *                     self.tid,             # <<<<<<<<<<<<<<
+ *                     self.pos,
+ *                     self.reference_base,
+ */
+  __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__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_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
+  __pyx_t_1 = 0;
+  __pyx_t_2 = 0;
+  __pyx_t_3 = 0;
+  __pyx_t_4 = 0;
+  __pyx_t_5 = 0;
+  __pyx_t_6 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_8 = 0;
+
+  /* "pysam/csamfile.pyx":3370
+ *     def __str__(self):
+ * 
+ *         return "\t".join( map(str, (             # <<<<<<<<<<<<<<
+ *                     self.tid,
+ *                     self.pos,
+ */
+  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __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))));
+  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  __pyx_t_9 = 0;
+  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_t_8 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_r = __pyx_t_8;
+  __pyx_t_8 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/csamfile.pyx":3368
+ *        def __get__(self): return self._coverage
+ * 
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ * 
+ *         return "\t".join( map(str, (
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("pysam.csamfile.SNPCall.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3391
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         # makes sure that samfile stays alive as long as this
+ */
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_8csamfile_12IndexedReads_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_8csamfile_12IndexedReads_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile = 0;
+  int __pyx_v_reopen;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samfile,&__pyx_n_s_reopen,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reopen);
+          if (value) { values[1] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)values[0]);
+    if (values[1]) {
+      __pyx_v_reopen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_reopen = ((int)1);
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamfile.IndexedReads.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_8csamfile_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_8csamfile_12IndexedReads___init__(((struct __pyx_obj_5pysam_8csamfile_IndexedReads *)__pyx_v_self), __pyx_v_samfile, __pyx_v_reopen);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_5pysam_8csamfile_12IndexedReads___init__(struct __pyx_obj_5pysam_8csamfile_IndexedReads *__pyx_v_self, struct __pyx_obj_5pysam_8csamfile_Samfile *__pyx_v_samfile, int __pyx_v_reopen) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char const *__pyx_t_2;
+  htsFile *__pyx_t_3;
+  BGZF *__pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 3391);
+
+  /* "pysam/csamfile.pyx":3395
+ *         # makes sure that samfile stays alive as long as this
+ *         # object is alive.
+ *         self.samfile = samfile             # <<<<<<<<<<<<<<
+ * 
+ *         assert samfile.isbam, "can only IndexReads on bam files"
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+  __Pyx_GOTREF(__pyx_v_self->samfile);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
+  __pyx_v_self->samfile = __pyx_v_samfile;
+
+  /* "pysam/csamfile.pyx":3397
+ *         self.samfile = samfile
+ * 
+ *         assert samfile.isbam, "can only IndexReads on bam files"             # <<<<<<<<<<<<<<
+ * 
+ *         # reopen the file - note that this makes the iterator
+ */
+  #ifndef CYTHON_WITHOUT_ASSERTIONS
+  if (unlikely(!Py_OptimizeFlag)) {
+    if (unlikely(!(__pyx_v_samfile->isbam != 0))) {
+      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_can_only_IndexReads_on_bam_files);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+
+  /* "pysam/csamfile.pyx":3401
+ *         # reopen the file - note that this makes the iterator
+ *         # slow and causes pileup to slow down significantly.
+ *         if reopen:             # <<<<<<<<<<<<<<
+ *             self.htsfile = hts_open(samfile._filename, 'r')
+ *             assert self.htsfile != NULL
+ */
+  __pyx_t_1 = (__pyx_v_reopen != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":3402
+ *         # slow and causes pileup to slow down significantly.
+ *         if reopen:
+ *             self.htsfile = hts_open(samfile._filename, 'r')             # <<<<<<<<<<<<<<
+ *             assert self.htsfile != NULL
+ *             # read header - required for accurate positioning
+ */
+    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_samfile->_filename); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_self->htsfile = hts_open(__pyx_t_2, __pyx_k_r);
+
+    /* "pysam/csamfile.pyx":3403
+ *         if reopen:
+ *             self.htsfile = hts_open(samfile._filename, 'r')
+ *             assert self.htsfile != NULL             # <<<<<<<<<<<<<<
+ *             # read header - required for accurate positioning
+ *             sam_hdr_read(self.htsfile)
+ */
+    #ifndef CYTHON_WITHOUT_ASSERTIONS
+    if (unlikely(!Py_OptimizeFlag)) {
+      if (unlikely(!((__pyx_v_self->htsfile != NULL) != 0))) {
+        PyErr_SetNone(PyExc_AssertionError);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+    }
+    #endif
+
+    /* "pysam/csamfile.pyx":3405
+ *             assert self.htsfile != NULL
+ *             # read header - required for accurate positioning
+ *             sam_hdr_read(self.htsfile)             # <<<<<<<<<<<<<<
+ *             self.owns_samfile = True
+ *         else:
+ */
+    sam_hdr_read(__pyx_v_self->htsfile);
+
+    /* "pysam/csamfile.pyx":3406
+ *             # read header - required for accurate positioning
+ *             sam_hdr_read(self.htsfile)
+ *             self.owns_samfile = True             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.htsfile = self.samfile.htsfile
+ */
+    __pyx_v_self->owns_samfile = 1;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":3408
+ *             self.owns_samfile = True
+ *         else:
+ *             self.htsfile = self.samfile.htsfile             # <<<<<<<<<<<<<<
+ *             self.owns_samfile = False
+ * 
+ */
+    __pyx_t_3 = __pyx_v_self->samfile->htsfile;
+    __pyx_v_self->htsfile = __pyx_t_3;
+
+    /* "pysam/csamfile.pyx":3409
+ *         else:
+ *             self.htsfile = self.samfile.htsfile
+ *             self.owns_samfile = False             # <<<<<<<<<<<<<<
+ * 
+ *         # TODO: BAM file specific
+ */
+    __pyx_v_self->owns_samfile = 0;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":3412
+ * 
+ *         # TODO: BAM file specific
+ *         self.fp = self.htsfile.fp.bgzf             # <<<<<<<<<<<<<<
+ * 
+ *     def build(self):
+ */
+  __pyx_t_4 = __pyx_v_self->htsfile->fp.bgzf;
+  __pyx_v_self->fp = __pyx_t_4;
+
+  /* "pysam/csamfile.pyx":3391
+ *     """
+ * 
+ *     def __init__(self, Samfile samfile, int reopen=True):             # <<<<<<<<<<<<<<
+ * 
+ *         # makes sure that samfile stays alive as long as this
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("pysam.csamfile.IndexedReads.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3414
+ *         self.fp = self.htsfile.fp.bgzf
+ * 
+ *     def build(self):             # <<<<<<<<<<<<<<
+ *         '''build index.'''
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_12IndexedReads_3build(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_12IndexedReads_2build[] = "IndexedReads.build(self)\nbuild index.";
+static PyObject *__pyx_pw_5pysam_8csamfile_12IndexedReads_3build(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("build (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_12IndexedReads_2build(((struct __pyx_obj_5pysam_8csamfile_IndexedReads *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_12IndexedReads_2build(struct __pyx_obj_5pysam_8csamfile_IndexedReads *__pyx_v_self) {
+  int __pyx_v_ret;
+  bam1_t *__pyx_v_b;
+  uint64_t __pyx_v_pos;
+  PyObject *__pyx_v_qname = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("build", 0);
+  __Pyx_TraceCall("build", __pyx_f[0], 3414);
+
+  /* "pysam/csamfile.pyx":3417
+ *         '''build index.'''
+ * 
+ *         self.index = collections.defaultdict(list)             # <<<<<<<<<<<<<<
+ * 
+ *         # this method will start indexing from the current file position
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3417; __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 = 3417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyList_Type))));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyList_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyList_Type))));
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3417; __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_GIVEREF(__pyx_t_3);
+  __Pyx_GOTREF(__pyx_v_self->index);
+  __Pyx_DECREF(__pyx_v_self->index);
+  __pyx_v_self->index = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "pysam/csamfile.pyx":3421
+ *         # this method will start indexing from the current file position
+ *         # if you decide
+ *         cdef int ret = 1             # <<<<<<<<<<<<<<
+ *         cdef bam1_t * b = <bam1_t*>calloc(1, sizeof( bam1_t))
+ * 
+ */
+  __pyx_v_ret = 1;
+
+  /* "pysam/csamfile.pyx":3422
+ *         # if you decide
+ *         cdef int ret = 1
+ *         cdef bam1_t * b = <bam1_t*>calloc(1, sizeof( bam1_t))             # <<<<<<<<<<<<<<
+ * 
+ *         cdef uint64_t pos
+ */
+  __pyx_v_b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
+
+  /* "pysam/csamfile.pyx":3426
+ *         cdef uint64_t pos
+ * 
+ *         while ret > 0:             # <<<<<<<<<<<<<<
+ *             pos = bgzf_tell(self.fp)
+ *             ret = sam_read1(self.htsfile,
+ */
+  while (1) {
+    __pyx_t_4 = ((__pyx_v_ret > 0) != 0);
+    if (!__pyx_t_4) break;
+
+    /* "pysam/csamfile.pyx":3427
+ * 
+ *         while ret > 0:
+ *             pos = bgzf_tell(self.fp)             # <<<<<<<<<<<<<<
+ *             ret = sam_read1(self.htsfile,
+ *                             self.samfile.header,
+ */
+    __pyx_v_pos = bgzf_tell(__pyx_v_self->fp);
+
+    /* "pysam/csamfile.pyx":3428
+ *         while ret > 0:
+ *             pos = bgzf_tell(self.fp)
+ *             ret = sam_read1(self.htsfile,             # <<<<<<<<<<<<<<
+ *                             self.samfile.header,
+ *                             b)
+ */
+    __pyx_v_ret = sam_read1(__pyx_v_self->htsfile, __pyx_v_self->samfile->header, __pyx_v_b);
+
+    /* "pysam/csamfile.pyx":3431
+ *                             self.samfile.header,
+ *                             b)
+ *             if ret > 0:             # <<<<<<<<<<<<<<
+ *                 qname = _charptr_to_str(pysam_bam_get_qname(b))
+ *                 self.index[qname].append(pos)
+ */
+    __pyx_t_4 = ((__pyx_v_ret > 0) != 0);
+    if (__pyx_t_4) {
+
+      /* "pysam/csamfile.pyx":3432
+ *                             b)
+ *             if ret > 0:
+ *                 qname = _charptr_to_str(pysam_bam_get_qname(b))             # <<<<<<<<<<<<<<
+ *                 self.index[qname].append(pos)
+ * 
+ */
+      __pyx_t_3 = __pyx_f_5pysam_8csamfile__charptr_to_str(pysam_bam_get_qname(__pyx_v_b)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_XDECREF_SET(__pyx_v_qname, __pyx_t_3);
+      __pyx_t_3 = 0;
+
+      /* "pysam/csamfile.pyx":3433
+ *             if ret > 0:
+ *                 qname = _charptr_to_str(pysam_bam_get_qname(b))
+ *                 self.index[qname].append(pos)             # <<<<<<<<<<<<<<
+ * 
+ *         bam_destroy1(b)
+ */
+      __pyx_t_3 = PyObject_GetItem(__pyx_v_self->index, __pyx_v_qname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      goto __pyx_L5;
+    }
+    __pyx_L5:;
+  }
+
+  /* "pysam/csamfile.pyx":3435
+ *                 self.index[qname].append(pos)
+ * 
+ *         bam_destroy1(b)             # <<<<<<<<<<<<<<
+ * 
+ *     def find(self, qname):
+ */
+  bam_destroy1(__pyx_v_b);
+
+  /* "pysam/csamfile.pyx":3414
+ *         self.fp = self.htsfile.fp.bgzf
+ * 
+ *     def build(self):             # <<<<<<<<<<<<<<
+ *         '''build index.'''
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamfile.IndexedReads.build", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_qname);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3437
+ *         bam_destroy1(b)
+ * 
+ *     def find(self, qname):             # <<<<<<<<<<<<<<
+ *         if qname in self.index:
+ *             return IteratorRowSelection(
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_8csamfile_12IndexedReads_5find(PyObject *__pyx_v_self, PyObject *__pyx_v_qname); /*proto*/
+static char __pyx_doc_5pysam_8csamfile_12IndexedReads_4find[] = "IndexedReads.find(self, qname)";
+static PyObject *__pyx_pw_5pysam_8csamfile_12IndexedReads_5find(PyObject *__pyx_v_self, PyObject *__pyx_v_qname) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("find (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_8csamfile_12IndexedReads_4find(((struct __pyx_obj_5pysam_8csamfile_IndexedReads *)__pyx_v_self), ((PyObject *)__pyx_v_qname));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_8csamfile_12IndexedReads_4find(struct __pyx_obj_5pysam_8csamfile_IndexedReads *__pyx_v_self, PyObject *__pyx_v_qname) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("find", 0);
+  __Pyx_TraceCall("find", __pyx_f[0], 3437);
+
+  /* "pysam/csamfile.pyx":3438
+ * 
+ *     def find(self, qname):
+ *         if qname in self.index:             # <<<<<<<<<<<<<<
+ *             return IteratorRowSelection(
+ *                 self.samfile,
+ */
+  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_qname, __pyx_v_self->index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamfile.pyx":3439
+ *     def find(self, qname):
+ *         if qname in self.index:
+ *             return IteratorRowSelection(             # <<<<<<<<<<<<<<
+ *                 self.samfile,
+ *                 self.index[qname],
+ */
+    __Pyx_XDECREF(__pyx_r);
+
+    /* "pysam/csamfile.pyx":3441
+ *             return IteratorRowSelection(
+ *                 self.samfile,
+ *                 self.index[qname],             # <<<<<<<<<<<<<<
+ *                 reopen = False)
+ *         else:
+ */
+    __pyx_t_3 = PyObject_GetItem(__pyx_v_self->index, __pyx_v_qname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+
+    /* "pysam/csamfile.pyx":3439
+ *     def find(self, qname):
+ *         if qname in self.index:
+ *             return IteratorRowSelection(             # <<<<<<<<<<<<<<
+ *                 self.samfile,
+ *                 self.index[qname],
+ */
+    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
+    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->samfile));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->samfile));
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+
+    /* "pysam/csamfile.pyx":3442
+ *                 self.samfile,
+ *                 self.index[qname],
+ *                 reopen = False)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise KeyError("read %s not found" % qname)
+ */
+    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reopen, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/csamfile.pyx":3439
+ *     def find(self, qname):
+ *         if qname in self.index:
+ *             return IteratorRowSelection(             # <<<<<<<<<<<<<<
+ *                 self.samfile,
+ *                 self.index[qname],
+ */
+    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_8csamfile_IteratorRowSelection)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __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;
+    __pyx_r = __pyx_t_5;
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":3444
+ *                 reopen = False)
+ *         else:
+ *             raise KeyError("read %s not found" % qname)             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__(self):
+ */
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_read_s_not_found, __pyx_v_qname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __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 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/csamfile.pyx":3437
+ *         bam_destroy1(b)
+ * 
+ *     def find(self, qname):             # <<<<<<<<<<<<<<
+ *         if qname in self.index:
+ *             return IteratorRowSelection(
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.csamfile.IndexedReads.find", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/csamfile.pyx":3446
+ *             raise KeyError("read %s not found" % qname)
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         if self.owns_samfile:
+ *             hts_close(self.htsfile)
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_8csamfile_12IndexedReads_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_8csamfile_12IndexedReads_7__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_8csamfile_12IndexedReads_6__dealloc__(((struct __pyx_obj_5pysam_8csamfile_IndexedReads *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_8csamfile_12IndexedReads_6__dealloc__(struct __pyx_obj_5pysam_8csamfile_IndexedReads *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3446);
+
+  /* "pysam/csamfile.pyx":3447
+ * 
+ *     def __dealloc__(self):
+ *         if self.owns_samfile:             # <<<<<<<<<<<<<<
+ *             hts_close(self.htsfile)
+ * 
+ */
+  __pyx_t_1 = (__pyx_v_self->owns_samfile != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/csamfile.pyx":3448
+ *     def __dealloc__(self):
+ *         if self.owns_samfile:
+ *             hts_close(self.htsfile)             # <<<<<<<<<<<<<<
+ * 
+ * __all__ = ["Samfile",
+ */
+    hts_close(__pyx_v_self->htsfile);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":3446
+ *             raise KeyError("read %s not found" % qname)
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         if self.owns_samfile:
+ *             hts_close(self.htsfile)
+ */
+
+  /* function exit code */
+  __Pyx_TraceReturn(Py_None);
+  __Pyx_RefNannyFinishContext();
+}
+static struct __pyx_vtabstruct_5pysam_8csamfile_AlignedRead __pyx_vtable_5pysam_8csamfile_AlignedRead;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_AlignedRead(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_AlignedRead *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_8csamfile_AlignedRead;
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_AlignedRead(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_8csamfile_11AlignedRead_3__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_qname(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_5qname_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_qname(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_5qname_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_cigar(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_5cigar_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_cigar(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_5cigar_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_cigarstring(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_11cigarstring_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_cigarstring(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_11cigarstring_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_seq(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_3seq_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_seq(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_3seq_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_qual(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4qual_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_qual(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_4qual_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_query(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_5query_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_qqual(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_5qqual_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_qstart(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_6qstart_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_qend(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4qend_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_qlen(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4qlen_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_tags(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4tags_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_tags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_4tags_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_flag(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4flag_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_flag(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_4flag_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_rname(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_5rname_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_rname(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_5rname_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_tid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_3tid_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_tid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_3tid_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_pos(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_3pos_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_3pos_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_bin(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_3bin_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_bin(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_3bin_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_rlen(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4rlen_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_aend(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4aend_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_alen(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4alen_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_mapq(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4mapq_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_mapq(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_4mapq_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_mrnm(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4mrnm_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_mrnm(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_4mrnm_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_rnext(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_5rnext_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_rnext(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_5rnext_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_mpos(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4mpos_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_mpos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_4mpos_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_pnext(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_5pnext_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_pnext(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_5pnext_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_isize(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_5isize_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_isize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_5isize_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_tlen(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_4tlen_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_tlen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_4tlen_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_paired(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_9is_paired_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_paired(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_9is_paired_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_proper_pair(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_14is_proper_pair_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_proper_pair(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_14is_proper_pair_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_unmapped(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_11is_unmapped_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_unmapped(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_11is_unmapped_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_mate_is_unmapped(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_mate_is_unmapped(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_16mate_is_unmapped_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_reverse(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_10is_reverse_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_reverse(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_10is_reverse_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_mate_is_reverse(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_mate_is_reverse(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_15mate_is_reverse_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_read1(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read1_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_read1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read1_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_read2(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read2_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_read2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_8is_read2_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_secondary(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_12is_secondary_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_secondary(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_12is_secondary_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_qcfail(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_9is_qcfail_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_qcfail(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_9is_qcfail_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_is_duplicate(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_12is_duplicate_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_duplicate(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11AlignedRead_12is_duplicate_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_positions(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_9positions_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_inferred_length(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_15inferred_length_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_aligned_pairs(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_13aligned_pairs_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11AlignedRead_blocks(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11AlignedRead_6blocks_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_AlignedRead[] = {
+  {__Pyx_NAMESTR("compare"), (PyCFunction)__pyx_pw_5pysam_8csamfile_11AlignedRead_7compare, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_11AlignedRead_6compare)},
+  {__Pyx_NAMESTR("_convert_python_tag"), (PyCFunction)__pyx_pw_5pysam_8csamfile_11AlignedRead_11_convert_python_tag, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_11AlignedRead_10_convert_python_tag)},
+  {__Pyx_NAMESTR("setTag"), (PyCFunction)__pyx_pw_5pysam_8csamfile_11AlignedRead_13setTag, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_11AlignedRead_12setTag)},
+  {__Pyx_NAMESTR("overlap"), (PyCFunction)__pyx_pw_5pysam_8csamfile_11AlignedRead_15overlap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_11AlignedRead_14overlap)},
+  {__Pyx_NAMESTR("opt"), (PyCFunction)__pyx_pw_5pysam_8csamfile_11AlignedRead_17opt, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_11AlignedRead_16opt)},
+  {__Pyx_NAMESTR("fancy_str"), (PyCFunction)__pyx_pw_5pysam_8csamfile_11AlignedRead_19fancy_str, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_11AlignedRead_18fancy_str)},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_8csamfile_AlignedRead[] = {
+  {(char *)"qname", __pyx_getprop_5pysam_8csamfile_11AlignedRead_qname, __pyx_setprop_5pysam_8csamfile_11AlignedRead_qname, __Pyx_DOCSTR(__pyx_k_the_query_name_None_if_not_prese), 0},
+  {(char *)"cigar", __pyx_getprop_5pysam_8csamfile_11AlignedRead_cigar, __pyx_setprop_5pysam_8csamfile_11AlignedRead_cigar, __Pyx_DOCSTR(__pyx_k_the_term_cigar_alignment_The_ali), 0},
+  {(char *)"cigarstring", __pyx_getprop_5pysam_8csamfile_11AlignedRead_cigarstring, __pyx_setprop_5pysam_8csamfile_11AlignedRead_cigarstring, __Pyx_DOCSTR(__pyx_k_the_term_cigar_alignment_as_a_st), 0},
+  {(char *)"seq", __pyx_getprop_5pysam_8csamfile_11AlignedRead_seq, __pyx_setprop_5pysam_8csamfile_11AlignedRead_seq, __Pyx_DOCSTR(__pyx_k_read_sequence_bases_including_te), 0},
+  {(char *)"qual", __pyx_getprop_5pysam_8csamfile_11AlignedRead_qual, __pyx_setprop_5pysam_8csamfile_11AlignedRead_qual, __Pyx_DOCSTR(__pyx_k_read_sequence_base_qualities_inc), 0},
+  {(char *)"query", __pyx_getprop_5pysam_8csamfile_11AlignedRead_query, 0, __Pyx_DOCSTR(__pyx_k_aligned_portion_of_the_read_This), 0},
+  {(char *)"qqual", __pyx_getprop_5pysam_8csamfile_11AlignedRead_qqual, 0, __Pyx_DOCSTR(__pyx_k_aligned_query_sequence_quality_v), 0},
+  {(char *)"qstart", __pyx_getprop_5pysam_8csamfile_11AlignedRead_qstart, 0, __Pyx_DOCSTR(__pyx_k_start_index_of_the_aligned_query), 0},
+  {(char *)"qend", __pyx_getprop_5pysam_8csamfile_11AlignedRead_qend, 0, __Pyx_DOCSTR(__pyx_k_end_index_of_the_aligned_query_p), 0},
+  {(char *)"qlen", __pyx_getprop_5pysam_8csamfile_11AlignedRead_qlen, 0, __Pyx_DOCSTR(__pyx_k_length_of_the_aligned_query_sequ), 0},
+  {(char *)"tags", __pyx_getprop_5pysam_8csamfile_11AlignedRead_tags, __pyx_setprop_5pysam_8csamfile_11AlignedRead_tags, __Pyx_DOCSTR(__pyx_k_the_tags_in_the_AUX_field_This_p), 0},
+  {(char *)"flag", __pyx_getprop_5pysam_8csamfile_11AlignedRead_flag, __pyx_setprop_5pysam_8csamfile_11AlignedRead_flag, __Pyx_DOCSTR(__pyx_k_properties_flag), 0},
+  {(char *)"rname", __pyx_getprop_5pysam_8csamfile_11AlignedRead_rname, __pyx_setprop_5pysam_8csamfile_11AlignedRead_rname, __Pyx_DOCSTR(__pyx_k_term_target_ID_DEPRECATED_from), 0},
+  {(char *)"tid", __pyx_getprop_5pysam_8csamfile_11AlignedRead_tid, __pyx_setprop_5pysam_8csamfile_11AlignedRead_tid, __Pyx_DOCSTR(__pyx_k_term_target_ID_note_This_field), 0},
+  {(char *)"pos", __pyx_getprop_5pysam_8csamfile_11AlignedRead_pos, __pyx_setprop_5pysam_8csamfile_11AlignedRead_pos, __Pyx_DOCSTR(__pyx_k_0_based_leftmost_coordinate), 0},
+  {(char *)"bin", __pyx_getprop_5pysam_8csamfile_11AlignedRead_bin, __pyx_setprop_5pysam_8csamfile_11AlignedRead_bin, __Pyx_DOCSTR(__pyx_k_properties_bin), 0},
+  {(char *)"rlen", __pyx_getprop_5pysam_8csamfile_11AlignedRead_rlen, 0, __Pyx_DOCSTR(__pyx_k_length_of_the_read_This_includes), 0},
+  {(char *)"aend", __pyx_getprop_5pysam_8csamfile_11AlignedRead_aend, 0, __Pyx_DOCSTR(__pyx_k_aligned_reference_position_of_th), 0},
+  {(char *)"alen", __pyx_getprop_5pysam_8csamfile_11AlignedRead_alen, 0, __Pyx_DOCSTR(__pyx_k_aligned_length_of_the_read_on_th), 0},
+  {(char *)"mapq", __pyx_getprop_5pysam_8csamfile_11AlignedRead_mapq, __pyx_setprop_5pysam_8csamfile_11AlignedRead_mapq, __Pyx_DOCSTR(__pyx_k_mapping_quality_2), 0},
+  {(char *)"mrnm", __pyx_getprop_5pysam_8csamfile_11AlignedRead_mrnm, __pyx_setprop_5pysam_8csamfile_11AlignedRead_mrnm, __Pyx_DOCSTR(__pyx_k_the_term_reference_id_of_the_mat), 0},
+  {(char *)"rnext", __pyx_getprop_5pysam_8csamfile_11AlignedRead_rnext, __pyx_setprop_5pysam_8csamfile_11AlignedRead_rnext, __Pyx_DOCSTR(__pyx_k_the_term_reference_id_of_the_mat_2), 0},
+  {(char *)"mpos", __pyx_getprop_5pysam_8csamfile_11AlignedRead_mpos, __pyx_setprop_5pysam_8csamfile_11AlignedRead_mpos, __Pyx_DOCSTR(__pyx_k_the_position_of_the_mate_depreca), 0},
+  {(char *)"pnext", __pyx_getprop_5pysam_8csamfile_11AlignedRead_pnext, __pyx_setprop_5pysam_8csamfile_11AlignedRead_pnext, __Pyx_DOCSTR(__pyx_k_the_position_of_the_mate), 0},
+  {(char *)"isize", __pyx_getprop_5pysam_8csamfile_11AlignedRead_isize, __pyx_setprop_5pysam_8csamfile_11AlignedRead_isize, __Pyx_DOCSTR(__pyx_k_the_insert_size_deprecated_use_t), 0},
+  {(char *)"tlen", __pyx_getprop_5pysam_8csamfile_11AlignedRead_tlen, __pyx_setprop_5pysam_8csamfile_11AlignedRead_tlen, __Pyx_DOCSTR(__pyx_k_the_template_length), 0},
+  {(char *)"is_paired", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_paired, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_paired, __Pyx_DOCSTR(__pyx_k_true_if_read_is_paired_in_sequen), 0},
+  {(char *)"is_proper_pair", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_proper_pair, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_proper_pair, __Pyx_DOCSTR(__pyx_k_true_if_read_is_mapped_in_a_prop), 0},
+  {(char *)"is_unmapped", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_unmapped, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_unmapped, __Pyx_DOCSTR(__pyx_k_true_if_read_itself_is_unmapped), 0},
+  {(char *)"mate_is_unmapped", __pyx_getprop_5pysam_8csamfile_11AlignedRead_mate_is_unmapped, __pyx_setprop_5pysam_8csamfile_11AlignedRead_mate_is_unmapped, __Pyx_DOCSTR(__pyx_k_true_if_the_mate_is_unmapped), 0},
+  {(char *)"is_reverse", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_reverse, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_reverse, __Pyx_DOCSTR(__pyx_k_true_if_read_is_mapped_to_revers), 0},
+  {(char *)"mate_is_reverse", __pyx_getprop_5pysam_8csamfile_11AlignedRead_mate_is_reverse, __pyx_setprop_5pysam_8csamfile_11AlignedRead_mate_is_reverse, __Pyx_DOCSTR(__pyx_k_true_is_read_is_mapped_to_revers), 0},
+  {(char *)"is_read1", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_read1, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_read1, __Pyx_DOCSTR(__pyx_k_true_if_this_is_read1), 0},
+  {(char *)"is_read2", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_read2, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_read2, __Pyx_DOCSTR(__pyx_k_true_if_this_is_read2), 0},
+  {(char *)"is_secondary", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_secondary, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_secondary, __Pyx_DOCSTR(__pyx_k_true_if_not_primary_alignment), 0},
+  {(char *)"is_qcfail", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_qcfail, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_qcfail, __Pyx_DOCSTR(__pyx_k_true_if_QC_failure), 0},
+  {(char *)"is_duplicate", __pyx_getprop_5pysam_8csamfile_11AlignedRead_is_duplicate, __pyx_setprop_5pysam_8csamfile_11AlignedRead_is_duplicate, __Pyx_DOCSTR(__pyx_k_true_if_optical_or_PCR_duplicate), 0},
+  {(char *)"positions", __pyx_getprop_5pysam_8csamfile_11AlignedRead_positions, 0, __Pyx_DOCSTR(__pyx_k_a_list_of_reference_positions_th), 0},
+  {(char *)"inferred_length", __pyx_getprop_5pysam_8csamfile_11AlignedRead_inferred_length, 0, __Pyx_DOCSTR(__pyx_k_inferred_read_length_from_CIGAR), 0},
+  {(char *)"aligned_pairs", __pyx_getprop_5pysam_8csamfile_11AlignedRead_aligned_pairs, 0, __Pyx_DOCSTR(__pyx_k_a_list_of_aligned_read_and_refer), 0},
+  {(char *)"blocks", __pyx_getprop_5pysam_8csamfile_11AlignedRead_blocks, 0, __Pyx_DOCSTR(__pyx_k_a_list_of_start_and_end_positio), 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_AlignedRead = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.AlignedRead"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_AlignedRead), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_AlignedRead, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  __pyx_pw_5pysam_8csamfile_11AlignedRead_9__hash__, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_pw_5pysam_8csamfile_11AlignedRead_5__str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  __Pyx_DOCSTR("AlignedRead()\n\n    Class representing an aligned read. See the SAM format specification for\n    the meaning of fields (http://samtools.sourceforge.net/).\n\n    This class stores a handle to the samtools C-structure representing\n    an aligned read. Member read access is forwarded to the C-structure\n    and converted into python objects. This implementation should be fast,\n    as only the data needed is converted.\n\n    For write access, the C-structure is updated  [...]
+  0, /*tp_traverse*/
+  0, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_AlignedRead, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_8csamfile_AlignedRead, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_11AlignedRead_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_AlignedRead, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_Samfile __pyx_vtable_5pysam_8csamfile_Samfile;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_Samfile(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_8csamfile_Samfile;
+  p->_filename = Py_None; Py_INCREF(Py_None);
+  if (unlikely(__pyx_pw_5pysam_8csamfile_7Samfile_1__cinit__(o, a, k) < 0)) {
+    Py_DECREF(o); o = 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_Samfile(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile_Samfile *p = (struct __pyx_obj_5pysam_8csamfile_Samfile *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_8csamfile_7Samfile_33__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->_filename);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile_Samfile(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile_Samfile *p = (struct __pyx_obj_5pysam_8csamfile_Samfile *)o;
+  if (p->_filename) {
+    e = (*v)(p->_filename, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile_Samfile(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile_Samfile *p = (struct __pyx_obj_5pysam_8csamfile_Samfile *)o;
+  tmp = ((PyObject*)p->_filename);
+  p->_filename = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_filename(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_8filename_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_nreferences(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_11nreferences_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_references(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_10references_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_lengths(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_7lengths_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_mapped(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_6mapped_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_unmapped(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_8unmapped_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_nocoordinate(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_12nocoordinate_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_text(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_4text_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7Samfile_header(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7Samfile_6header_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_Samfile[] = {
+  {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_3_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_2_isOpen)},
+  {__Pyx_NAMESTR("_hasIndex"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_5_hasIndex, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_4_hasIndex)},
+  {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_7_open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_6_open)},
+  {__Pyx_NAMESTR("gettid"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_9gettid, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_8gettid)},
+  {__Pyx_NAMESTR("getrname"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_11getrname, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_10getrname)},
+  {__Pyx_NAMESTR("_parseRegion"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_13_parseRegion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_12_parseRegion)},
+  {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_15reset, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_14reset)},
+  {__Pyx_NAMESTR("seek"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_17seek, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_16seek)},
+  {__Pyx_NAMESTR("tell"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_19tell, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_18tell)},
+  {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_21fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_20fetch)},
+  {__Pyx_NAMESTR("head"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_23head, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_22head)},
+  {__Pyx_NAMESTR("mate"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_25mate, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_24mate)},
+  {__Pyx_NAMESTR("count"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_27count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_26count)},
+  {__Pyx_NAMESTR("pileup"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_29pileup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_28pileup)},
+  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_31close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_30close)},
+  {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_35write, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_34write)},
+  {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_37__enter__, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_36__enter__)},
+  {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_39__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_38__exit__)},
+  {__Pyx_NAMESTR("_checkIndex"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_41_checkIndex, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_40_checkIndex)},
+  {__Pyx_NAMESTR("_buildLine"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_43_buildLine, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_42_buildLine)},
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_7Samfile_47__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_7Samfile_46__next__)},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_8csamfile_Samfile[] = {
+  {(char *)"filename", __pyx_getprop_5pysam_8csamfile_7Samfile_filename, 0, __Pyx_DOCSTR(__pyx_k_number_of_term_filename_associat), 0},
+  {(char *)"nreferences", __pyx_getprop_5pysam_8csamfile_7Samfile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_number_of_term_reference_sequenc), 0},
+  {(char *)"references", __pyx_getprop_5pysam_8csamfile_7Samfile_references, 0, __Pyx_DOCSTR(__pyx_k_tuple_with_the_names_of_term_ref), 0},
+  {(char *)"lengths", __pyx_getprop_5pysam_8csamfile_7Samfile_lengths, 0, __Pyx_DOCSTR(__pyx_k_tuple_of_the_lengths_of_the_term), 0},
+  {(char *)"mapped", __pyx_getprop_5pysam_8csamfile_7Samfile_mapped, 0, __Pyx_DOCSTR(__pyx_k_total_number_of_mapped_alignment), 0},
+  {(char *)"unmapped", __pyx_getprop_5pysam_8csamfile_7Samfile_unmapped, 0, __Pyx_DOCSTR(__pyx_k_total_number_of_unmapped_reads_i), 0},
+  {(char *)"nocoordinate", __pyx_getprop_5pysam_8csamfile_7Samfile_nocoordinate, 0, __Pyx_DOCSTR(__pyx_k_total_number_of_reads_without_co), 0},
+  {(char *)"text", __pyx_getprop_5pysam_8csamfile_7Samfile_text, 0, __Pyx_DOCSTR(__pyx_k_full_contents_of_the_term_sam_fi), 0},
+  {(char *)"header", __pyx_getprop_5pysam_8csamfile_7Samfile_header, 0, __Pyx_DOCSTR(__pyx_k_header_information_within_the_te), 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_Samfile = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.Samfile"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_Samfile), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_Samfile, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("*(filename, mode=None, template = None,\n         referencenames = None, referencelengths = None,\n         text = NULL, header = None,\n         add_sq_text = False, check_header = True,\n         check_sq = True )*\n\n    A :term:`SAM`/:term:`BAM` formatted file. The file is\n    automatically opened.\n\n    *mode* should be ``r`` for reading or ``w`` for writing. The\n    default is text mode (:term:`SAM`). For binary (:term:`BAM`) I/O\n    you should append ``b`` for  [...]
+  __pyx_tp_traverse_5pysam_8csamfile_Samfile, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_Samfile, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  __pyx_pw_5pysam_8csamfile_7Samfile_45__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_8csamfile_7Samfile_47__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_Samfile, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_8csamfile_Samfile, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_Samfile, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_PileupProxy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_PileupProxy(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11PileupProxy_tid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11PileupProxy_3tid_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11PileupProxy_n(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11PileupProxy_1n_1__get__(o);
+}
+
+static int __pyx_setprop_5pysam_8csamfile_11PileupProxy_n(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_5pysam_8csamfile_11PileupProxy_1n_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11PileupProxy_pos(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11PileupProxy_3pos_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_11PileupProxy_pileups(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_11PileupProxy_7pileups_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_PileupProxy[] = {
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_8csamfile_PileupProxy[] = {
+  {(char *)"tid", __pyx_getprop_5pysam_8csamfile_11PileupProxy_tid, 0, __Pyx_DOCSTR(__pyx_k_the_chromosome_ID_as_is_defined), 0},
+  {(char *)"n", __pyx_getprop_5pysam_8csamfile_11PileupProxy_n, __pyx_setprop_5pysam_8csamfile_11PileupProxy_n, __Pyx_DOCSTR(__pyx_k_number_of_reads_mapping_to_this), 0},
+  {(char *)"pos", __pyx_getprop_5pysam_8csamfile_11PileupProxy_pos, 0, 0, 0},
+  {(char *)"pileups", __pyx_getprop_5pysam_8csamfile_11PileupProxy_pileups, 0, __Pyx_DOCSTR(__pyx_k_list_of_reads_class_pysam_Pileup), 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_PileupProxy = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.PileupProxy"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_PileupProxy), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_PileupProxy, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_pw_5pysam_8csamfile_11PileupProxy_3__str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  __Pyx_DOCSTR("PileupProxy()\nA pileup column. A pileup column contains\n    all the reads that map to a certain target base.\n\n    tid\n        chromosome ID as is defined in the header\n    pos\n        the target base coordinate (0-based)\n    n\n        number of reads mapping to this column\n    pileups\n        list of reads (:class:`pysam.PileupRead`) aligned to this column\n\n    This class is a proxy for results returned by the samtools pileup engine.\n    If the underlying en [...]
+  0, /*tp_traverse*/
+  0, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_PileupProxy, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_8csamfile_PileupProxy, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_11PileupProxy_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_PileupProxy, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_PileupRead(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_PileupRead *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_PileupRead *)o);
+  p->_alignment = ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)Py_None); Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_PileupRead(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile_PileupRead *p = (struct __pyx_obj_5pysam_8csamfile_PileupRead *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->_alignment);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile_PileupRead(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile_PileupRead *p = (struct __pyx_obj_5pysam_8csamfile_PileupRead *)o;
+  if (p->_alignment) {
+    e = (*v)(((PyObject*)p->_alignment), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile_PileupRead(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile_PileupRead *p = (struct __pyx_obj_5pysam_8csamfile_PileupRead *)o;
+  tmp = ((PyObject*)p->_alignment);
+  p->_alignment = ((struct __pyx_obj_5pysam_8csamfile_AlignedRead *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_10PileupRead_alignment(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_10PileupRead_9alignment_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_10PileupRead_qpos(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_10PileupRead_4qpos_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_10PileupRead_indel(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_10PileupRead_5indel_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_10PileupRead_is_del(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_10PileupRead_6is_del_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_10PileupRead_is_head(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_10PileupRead_7is_head_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_10PileupRead_is_tail(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_10PileupRead_7is_tail_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_10PileupRead_level(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_10PileupRead_5level_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_PileupRead[] = {
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_8csamfile_PileupRead[] = {
+  {(char *)"alignment", __pyx_getprop_5pysam_8csamfile_10PileupRead_alignment, 0, __Pyx_DOCSTR(__pyx_k_a_class_pysam_AlignedRead_object), 0},
+  {(char *)"qpos", __pyx_getprop_5pysam_8csamfile_10PileupRead_qpos, 0, __Pyx_DOCSTR(__pyx_k_position_of_the_read_base_at_the), 0},
+  {(char *)"indel", __pyx_getprop_5pysam_8csamfile_10PileupRead_indel, 0, __Pyx_DOCSTR(__pyx_k_indel_length_0_for_no_indel_posi), 0},
+  {(char *)"is_del", __pyx_getprop_5pysam_8csamfile_10PileupRead_is_del, 0, __Pyx_DOCSTR(__pyx_k_1_iff_the_base_on_the_padded_rea), 0},
+  {(char *)"is_head", __pyx_getprop_5pysam_8csamfile_10PileupRead_is_head, 0, 0, 0},
+  {(char *)"is_tail", __pyx_getprop_5pysam_8csamfile_10PileupRead_is_tail, 0, 0, 0},
+  {(char *)"level", __pyx_getprop_5pysam_8csamfile_10PileupRead_level, 0, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_PileupRead = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.PileupRead"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_PileupRead), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_PileupRead, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_pw_5pysam_8csamfile_10PileupRead_3__str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("PileupRead()\nA read aligned to a column.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_8csamfile_PileupRead, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_PileupRead, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_PileupRead, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_8csamfile_PileupRead, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_10PileupRead_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_PileupRead, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRow(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorRow *)o);
+  p->samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)Py_None); Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_IteratorRow(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRow *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_8csamfile_11IteratorRow_3__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->samfile);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile_IteratorRow(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRow *)o;
+  if (p->samfile) {
+    e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile_IteratorRow(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile_IteratorRow *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRow *)o;
+  tmp = ((PyObject*)p->samfile);
+  p->samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorRow[] = {
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorRow = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorRow"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorRow), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRow, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("IteratorRow(Samfile samfile, int reopen=True)\nabstract base class for iterators over mapped reads.\n\n    Various iterators implement different behaviours for wrapping around\n    contig boundaries. Examples include:\n\n    :class:`pysam.IteratorRowRegion`\n        iterate within a single contig and a defined region.\n\n    :class:`pysam.IteratorRowAll`\n        iterate until EOF. This iterator will also include unmapped reads.\n\n    :class:`pysam.IteratorRowAllRefs`\n  [...]
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorRow, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorRow, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorRow, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_11IteratorRow_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorRow, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowRegion __pyx_vtable_5pysam_8csamfile_IteratorRowRegion;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowRegion(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *p;
+  PyObject *o = __pyx_tp_new_5pysam_8csamfile_IteratorRow(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_8csamfile_IteratorRowRegion;
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_IteratorRowRegion(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_8csamfile_17IteratorRowRegion_7__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  PyObject_GC_Track(o);
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRow(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorRowRegion[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_17IteratorRowRegion_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_17IteratorRowRegion_4__next__)},
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorRowRegion = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorRowRegion"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRowRegion, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("IteratorRowRegion(Samfile samfile, int tid, int beg, int end, int reopen=True)\n*(Samfile samfile, int tid, int beg, int end, int reopen = True )*\n\n    iterate over mapped reads in a region.\n\n    By default, the file is re-openend to avoid conflicts between\n    multiple iterators working on the same file. Set *reopen* = False\n    to not re-open *samfile*.\n\n    The samtools iterators assume that the file\n    position between iterations do not change.\n    As a con [...]
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorRow, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorRow, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  __pyx_pw_5pysam_8csamfile_17IteratorRowRegion_3__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_8csamfile_17IteratorRowRegion_5__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorRowRegion, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_17IteratorRowRegion_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorRowRegion, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowHead __pyx_vtable_5pysam_8csamfile_IteratorRowHead;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowHead(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *p;
+  PyObject *o = __pyx_tp_new_5pysam_8csamfile_IteratorRow(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_8csamfile_IteratorRowHead;
+  return o;
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorRowHead[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_15IteratorRowHead_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_15IteratorRowHead_4__next__)},
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorRowHead = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorRowHead"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRow, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("IteratorRowHead(Samfile samfile, int n, int reopen=True)\n*(Samfile samfile, n, int reopen = True)*\n\n    iterate over first n reads in *samfile*\n\n    By default, the file is re-openend to avoid conflicts between\n    multiple iterators working on the same file. Set *reopen* = False\n    to not re-open *samfile*.\n\n    .. note::\n        It is usually not necessary to create an object of this class\n        explicitely. It is returned as a result of call to a :meth:`S [...]
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorRow, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorRow, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  __pyx_pw_5pysam_8csamfile_15IteratorRowHead_3__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_8csamfile_15IteratorRowHead_5__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorRowHead, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_15IteratorRowHead_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorRowHead, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowAll __pyx_vtable_5pysam_8csamfile_IteratorRowAll;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowAll(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *p;
+  PyObject *o = __pyx_tp_new_5pysam_8csamfile_IteratorRow(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_8csamfile_IteratorRowAll;
+  return o;
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorRowAll[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_14IteratorRowAll_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_14IteratorRowAll_4__next__)},
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorRowAll = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorRowAll"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRow, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("IteratorRowAll(Samfile samfile, int reopen=True)\n*(Samfile samfile, int reopen = True)*\n\n    iterate over all reads in *samfile*\n\n    By default, the file is re-openend to avoid conflicts between\n    multiple iterators working on the same file. Set *reopen* = False\n    to not re-open *samfile*.\n\n    .. note::\n        It is usually not necessary to create an object of this class\n        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\ [...]
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorRow, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorRow, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  __pyx_pw_5pysam_8csamfile_14IteratorRowAll_3__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_8csamfile_14IteratorRowAll_5__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorRowAll, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_14IteratorRowAll_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorRowAll, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowAllRefs(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *p;
+  PyObject *o = __pyx_tp_new_5pysam_8csamfile_IteratorRow(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *)o);
+  p->rowiter = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_IteratorRowAllRefs(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->rowiter);
+  PyObject_GC_Track(o);
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRow(o);
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile_IteratorRowAllRefs(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *)o;
+  e = __pyx_tp_traverse_5pysam_8csamfile_IteratorRow(o, v, a); if (e) return e;
+  if (p->rowiter) {
+    e = (*v)(((PyObject*)p->rowiter), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile_IteratorRowAllRefs(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs *)o;
+  __pyx_tp_clear_5pysam_8csamfile_IteratorRow(o);
+  tmp = ((PyObject*)p->rowiter);
+  p->rowiter = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorRowAllRefs[] = {
+  {__Pyx_NAMESTR("nextiter"), (PyCFunction)__pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_3nextiter, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_18IteratorRowAllRefs_2nextiter)},
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_7__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_18IteratorRowAllRefs_6__next__)},
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorRowAllRefs = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorRowAllRefs"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorRowAllRefs), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRowAllRefs, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("IteratorRowAllRefs(Samfile samfile, reopen=True)\niterates over all mapped reads by chaining iterators over each reference\n\n    .. note::\n        It is usually not necessary to create an object of this class\n        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorRowAllRefs, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorRowAllRefs, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  __pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_5__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_7__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorRowAllRefs, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_18IteratorRowAllRefs_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorRowAllRefs, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorRowSelection __pyx_vtable_5pysam_8csamfile_IteratorRowSelection;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorRowSelection(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *p;
+  PyObject *o = __pyx_tp_new_5pysam_8csamfile_IteratorRow(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_8csamfile_IteratorRowSelection;
+  p->positions = Py_None; Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_IteratorRowSelection(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->positions);
+  PyObject_GC_Track(o);
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRow(o);
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile_IteratorRowSelection(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *)o;
+  e = __pyx_tp_traverse_5pysam_8csamfile_IteratorRow(o, v, a); if (e) return e;
+  if (p->positions) {
+    e = (*v)(p->positions, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile_IteratorRowSelection(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *p = (struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *)o;
+  __pyx_tp_clear_5pysam_8csamfile_IteratorRow(o);
+  tmp = ((PyObject*)p->positions);
+  p->positions = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorRowSelection[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_20IteratorRowSelection_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_20IteratorRowSelection_4__next__)},
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorRowSelection = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorRowSelection"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorRowSelection, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("IteratorRowSelection(Samfile samfile, positions, int reopen=True)\n*(Samfile samfile)*\n\n    iterate over reads in *samfile* at a given list of file positions.\n\n    .. note::\n        It is usually not necessary to create an object of this class\n        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorRowSelection, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorRowSelection, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  __pyx_pw_5pysam_8csamfile_20IteratorRowSelection_3__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_8csamfile_20IteratorRowSelection_5__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorRowSelection, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_20IteratorRowSelection_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorRowSelection, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumn __pyx_vtable_5pysam_8csamfile_IteratorColumn;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorColumn(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorColumn *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_8csamfile_IteratorColumn;
+  p->iter = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
+  p->samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)Py_None); Py_INCREF(Py_None);
+  p->fastafile = ((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)Py_None); Py_INCREF(Py_None);
+  p->stepper = Py_None; Py_INCREF(Py_None);
+  if (unlikely(__pyx_pw_5pysam_8csamfile_14IteratorColumn_1__cinit__(o, a, k) < 0)) {
+    Py_DECREF(o); o = 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_IteratorColumn(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorColumn *p = (struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_8csamfile_14IteratorColumn_9__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->iter);
+  Py_CLEAR(p->samfile);
+  Py_CLEAR(p->fastafile);
+  Py_CLEAR(p->stepper);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile_IteratorColumn(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile_IteratorColumn *p = (struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)o;
+  if (p->iter) {
+    e = (*v)(((PyObject*)p->iter), a); if (e) return e;
+  }
+  if (p->samfile) {
+    e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
+  }
+  if (p->fastafile) {
+    e = (*v)(((PyObject*)p->fastafile), a); if (e) return e;
+  }
+  if (p->stepper) {
+    e = (*v)(p->stepper, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile_IteratorColumn(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile_IteratorColumn *p = (struct __pyx_obj_5pysam_8csamfile_IteratorColumn *)o;
+  tmp = ((PyObject*)p->iter);
+  p->iter = ((struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->samfile);
+  p->samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->fastafile);
+  p->fastafile = ((struct __pyx_obj_5pysam_6cfaidx_Fastafile *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->stepper);
+  p->stepper = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_14IteratorColumn_seq_len(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_14IteratorColumn_7seq_len_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorColumn[] = {
+  {__Pyx_NAMESTR("addReference"), (PyCFunction)__pyx_pw_5pysam_8csamfile_14IteratorColumn_5addReference, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_14IteratorColumn_4addReference)},
+  {__Pyx_NAMESTR("hasReference"), (PyCFunction)__pyx_pw_5pysam_8csamfile_14IteratorColumn_7hasReference, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_14IteratorColumn_6hasReference)},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_8csamfile_IteratorColumn[] = {
+  {(char *)"seq_len", __pyx_getprop_5pysam_8csamfile_14IteratorColumn_seq_len, 0, __Pyx_DOCSTR(__pyx_k_current_sequence_length), 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorColumn = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorColumn"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorColumn), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorColumn, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("abstract base class for iterators over columns.\n\n    IteratorColumn objects wrap the pileup functionality of samtools.\n\n    For reasons of efficiency, the iterator points to the current\n    pileup buffer. The pileup buffer is updated at every iteration.\n    This might cause some unexpected behavious. For example,\n    consider the conversion to a list::\n\n       f = Samfile(\"file.bam\", \"rb\")\n       result = list( f.pileup() )\n\n    Here, ``result`` will conta [...]
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorColumn, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorColumn, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  __pyx_pw_5pysam_8csamfile_14IteratorColumn_3__iter__, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorColumn, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_8csamfile_IteratorColumn, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorColumn, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnRegion __pyx_vtable_5pysam_8csamfile_IteratorColumnRegion;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorColumnRegion(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion *p;
+  PyObject *o = __pyx_tp_new_5pysam_8csamfile_IteratorColumn(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumn*)__pyx_vtabptr_5pysam_8csamfile_IteratorColumnRegion;
+  if (unlikely(__pyx_pw_5pysam_8csamfile_20IteratorColumnRegion_1__cinit__(o, a, k) < 0)) {
+    Py_DECREF(o); o = 0;
+  }
+  return o;
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorColumnRegion[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_20IteratorColumnRegion_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_20IteratorColumnRegion_2__next__)},
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorColumnRegion = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorColumnRegion"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorColumnRegion), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorColumn, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("iterates over a region only.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorColumn, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorColumn, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_5pysam_8csamfile_14IteratorColumn_3__iter__, /*tp_iter*/
+  #else
+  0, /*tp_iter*/
+  #endif
+  __pyx_pw_5pysam_8csamfile_20IteratorColumnRegion_3__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorColumnRegion, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorColumnRegion, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+static struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumnAllRefs __pyx_vtable_5pysam_8csamfile_IteratorColumnAllRefs;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IteratorColumnAllRefs(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs *p;
+  PyObject *o = __pyx_tp_new_5pysam_8csamfile_IteratorColumn(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_8csamfile_IteratorColumn*)__pyx_vtabptr_5pysam_8csamfile_IteratorColumnAllRefs;
+  if (unlikely(__pyx_pw_5pysam_8csamfile_21IteratorColumnAllRefs_1__cinit__(o, a, k) < 0)) {
+    Py_DECREF(o); o = 0;
+  }
+  return o;
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IteratorColumnAllRefs[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_8csamfile_21IteratorColumnAllRefs_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__)},
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IteratorColumnAllRefs = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IteratorColumnAllRefs"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IteratorColumnAllRefs), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IteratorColumn, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("iterates over all columns by chaining iterators over each reference\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_8csamfile_IteratorColumn, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IteratorColumn, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_5pysam_8csamfile_14IteratorColumn_3__iter__, /*tp_iter*/
+  #else
+  0, /*tp_iter*/
+  #endif
+  __pyx_pw_5pysam_8csamfile_21IteratorColumnAllRefs_3__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IteratorColumnAllRefs, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IteratorColumnAllRefs, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_IndexedReads(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_5pysam_8csamfile_IndexedReads *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_8csamfile_IndexedReads *)o);
+  p->samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)Py_None); Py_INCREF(Py_None);
+  p->index = Py_None; Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_IndexedReads(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile_IndexedReads *p = (struct __pyx_obj_5pysam_8csamfile_IndexedReads *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_8csamfile_12IndexedReads_7__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->samfile);
+  Py_CLEAR(p->index);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile_IndexedReads(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile_IndexedReads *p = (struct __pyx_obj_5pysam_8csamfile_IndexedReads *)o;
+  if (p->samfile) {
+    e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
+  }
+  if (p->index) {
+    e = (*v)(p->index, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile_IndexedReads(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile_IndexedReads *p = (struct __pyx_obj_5pysam_8csamfile_IndexedReads *)o;
+  tmp = ((PyObject*)p->samfile);
+  p->samfile = ((struct __pyx_obj_5pysam_8csamfile_Samfile *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->index);
+  p->index = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_IndexedReads[] = {
+  {__Pyx_NAMESTR("build"), (PyCFunction)__pyx_pw_5pysam_8csamfile_12IndexedReads_3build, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_12IndexedReads_2build)},
+  {__Pyx_NAMESTR("find"), (PyCFunction)__pyx_pw_5pysam_8csamfile_12IndexedReads_5find, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_8csamfile_12IndexedReads_4find)},
+  {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_IndexedReads = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.IndexedReads"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_IndexedReads), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_IndexedReads, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("IndexedReads(Samfile samfile, int reopen=True)\nindex a bamfile by read.\n\n    The index is kept in memory.\n\n    By default, the file is re-openend to avoid conflicts if\n    multiple operators work on the same file. Set *reopen* = False\n    to not re-open *samfile*.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_8csamfile_IndexedReads, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile_IndexedReads, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_IndexedReads, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_8csamfile_12IndexedReads_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_IndexedReads, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile_SNPCall(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile_SNPCall(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7SNPCall_tid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7SNPCall_3tid_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7SNPCall_pos(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7SNPCall_3pos_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7SNPCall_reference_base(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7SNPCall_14reference_base_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7SNPCall_genotype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7SNPCall_8genotype_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7SNPCall_consensus_quality(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7SNPCall_17consensus_quality_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7SNPCall_snp_quality(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7SNPCall_11snp_quality_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7SNPCall_mapping_quality(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7SNPCall_15mapping_quality_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_8csamfile_7SNPCall_coverage(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_8csamfile_7SNPCall_8coverage_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_8csamfile_SNPCall[] = {
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_8csamfile_SNPCall[] = {
+  {(char *)"tid", __pyx_getprop_5pysam_8csamfile_7SNPCall_tid, 0, __Pyx_DOCSTR(__pyx_k_the_chromosome_ID_as_is_defined), 0},
+  {(char *)"pos", __pyx_getprop_5pysam_8csamfile_7SNPCall_pos, 0, __Pyx_DOCSTR(__pyx_k_nucleotide_position_of_SNP), 0},
+  {(char *)"reference_base", __pyx_getprop_5pysam_8csamfile_7SNPCall_reference_base, 0, __Pyx_DOCSTR(__pyx_k_reference_base_at_pos_N_if_no_re), 0},
+  {(char *)"genotype", __pyx_getprop_5pysam_8csamfile_7SNPCall_genotype, 0, __Pyx_DOCSTR(__pyx_k_the_genotype_called), 0},
+  {(char *)"consensus_quality", __pyx_getprop_5pysam_8csamfile_7SNPCall_consensus_quality, 0, __Pyx_DOCSTR(__pyx_k_the_genotype_quality_Phred_scale), 0},
+  {(char *)"snp_quality", __pyx_getprop_5pysam_8csamfile_7SNPCall_snp_quality, 0, __Pyx_DOCSTR(__pyx_k_the_snp_quality_Phred_scaled_pro), 0},
+  {(char *)"mapping_quality", __pyx_getprop_5pysam_8csamfile_7SNPCall_mapping_quality, 0, __Pyx_DOCSTR(__pyx_k_the_root_mean_square_rms_of_the), 0},
+  {(char *)"coverage", __pyx_getprop_5pysam_8csamfile_7SNPCall_coverage, 0, __Pyx_DOCSTR(__pyx_k_coverage_or_read_depth_the_numbe), 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_5pysam_8csamfile_SNPCall = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.SNPCall"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile_SNPCall), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile_SNPCall, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_pw_5pysam_8csamfile_7SNPCall_1__str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  __Pyx_DOCSTR("the results of a SNP call."), /*tp_doc*/
+  0, /*tp_traverse*/
+  0, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_8csamfile_SNPCall, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_5pysam_8csamfile_SNPCall, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile_SNPCall, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *__pyx_freelist_5pysam_8csamfile___pyx_scope_struct__genexpr[8];
+static int __pyx_freecount_5pysam_8csamfile___pyx_scope_struct__genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile___pyx_scope_struct__genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((__pyx_freecount_5pysam_8csamfile___pyx_scope_struct__genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr)))) {
+    o = (PyObject*)__pyx_freelist_5pysam_8csamfile___pyx_scope_struct__genexpr[--__pyx_freecount_5pysam_8csamfile___pyx_scope_struct__genexpr];
+    memset(o, 0, sizeof(struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr));
+    (void) PyObject_INIT(o, t);
+    PyObject_GC_Track(o);
+  } else {
+    o = (*t->tp_alloc)(t, 0);
+    if (unlikely(!o)) return 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile___pyx_scope_struct__genexpr(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *p = (struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *)o;
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->__pyx_v_x);
+  Py_CLEAR(p->__pyx_v_y);
+  Py_CLEAR(p->__pyx_t_0);
+  Py_CLEAR(p->__pyx_t_1);
+  if ((__pyx_freecount_5pysam_8csamfile___pyx_scope_struct__genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr))) {
+    __pyx_freelist_5pysam_8csamfile___pyx_scope_struct__genexpr[__pyx_freecount_5pysam_8csamfile___pyx_scope_struct__genexpr++] = ((struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *)o);
+  } else {
+    (*Py_TYPE(o)->tp_free)(o);
+  }
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *p = (struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *)o;
+  if (p->__pyx_v_x) {
+    e = (*v)(p->__pyx_v_x, a); if (e) return e;
+  }
+  if (p->__pyx_v_y) {
+    e = (*v)(p->__pyx_v_y, a); if (e) return e;
+  }
+  if (p->__pyx_t_0) {
+    e = (*v)(p->__pyx_t_0, a); if (e) return e;
+  }
+  if (p->__pyx_t_1) {
+    e = (*v)(p->__pyx_t_1, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile___pyx_scope_struct__genexpr(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *p = (struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr *)o;
+  tmp = ((PyObject*)p->__pyx_v_x);
+  p->__pyx_v_x = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_v_y);
+  p->__pyx_v_y = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_t_0);
+  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_t_1);
+  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyTypeObject __pyx_type_5pysam_8csamfile___pyx_scope_struct__genexpr = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.__pyx_scope_struct__genexpr"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct__genexpr), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile___pyx_scope_struct__genexpr, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_doc*/
+  __pyx_tp_traverse_5pysam_8csamfile___pyx_scope_struct__genexpr, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile___pyx_scope_struct__genexpr, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  0, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile___pyx_scope_struct__genexpr, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *__pyx_freelist_5pysam_8csamfile___pyx_scope_struct_1_genexpr[8];
+static int __pyx_freecount_5pysam_8csamfile___pyx_scope_struct_1_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pysam_8csamfile___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((__pyx_freecount_5pysam_8csamfile___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr)))) {
+    o = (PyObject*)__pyx_freelist_5pysam_8csamfile___pyx_scope_struct_1_genexpr[--__pyx_freecount_5pysam_8csamfile___pyx_scope_struct_1_genexpr];
+    memset(o, 0, sizeof(struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr));
+    (void) PyObject_INIT(o, t);
+    PyObject_GC_Track(o);
+  } else {
+    o = (*t->tp_alloc)(t, 0);
+    if (unlikely(!o)) return 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_8csamfile___pyx_scope_struct_1_genexpr(PyObject *o) {
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *)o;
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->__pyx_v_x);
+  Py_CLEAR(p->__pyx_v_y);
+  Py_CLEAR(p->__pyx_t_0);
+  Py_CLEAR(p->__pyx_t_1);
+  if ((__pyx_freecount_5pysam_8csamfile___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr))) {
+    __pyx_freelist_5pysam_8csamfile___pyx_scope_struct_1_genexpr[__pyx_freecount_5pysam_8csamfile___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *)o);
+  } else {
+    (*Py_TYPE(o)->tp_free)(o);
+  }
+}
+
+static int __pyx_tp_traverse_5pysam_8csamfile___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *)o;
+  if (p->__pyx_v_x) {
+    e = (*v)(p->__pyx_v_x, a); if (e) return e;
+  }
+  if (p->__pyx_v_y) {
+    e = (*v)(p->__pyx_v_y, a); if (e) return e;
+  }
+  if (p->__pyx_t_0) {
+    e = (*v)(p->__pyx_t_0, a); if (e) return e;
+  }
+  if (p->__pyx_t_1) {
+    e = (*v)(p->__pyx_t_1, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_8csamfile___pyx_scope_struct_1_genexpr(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr *)o;
+  tmp = ((PyObject*)p->__pyx_v_x);
+  p->__pyx_v_x = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_v_y);
+  p->__pyx_v_y = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_t_0);
+  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_t_1);
+  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyTypeObject __pyx_type_5pysam_8csamfile___pyx_scope_struct_1_genexpr = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.csamfile.__pyx_scope_struct_1_genexpr"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_8csamfile___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_8csamfile___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_doc*/
+  __pyx_tp_traverse_5pysam_8csamfile___pyx_scope_struct_1_genexpr, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_8csamfile___pyx_scope_struct_1_genexpr, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  0, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_8csamfile___pyx_scope_struct_1_genexpr, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+  {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef __pyx_moduledef = {
+  #if PY_VERSION_HEX < 0x03020000
+    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
+  #else
+    PyModuleDef_HEAD_INIT,
+  #endif
+    __Pyx_NAMESTR("csamfile"),
+    0, /* m_doc */
+    -1, /* m_size */
+    __pyx_methods /* m_methods */,
+    NULL, /* m_reload */
+    NULL, /* m_traverse */
+    NULL, /* m_clear */
+    NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_kp_s_2scB, __pyx_k_2scB, sizeof(__pyx_k_2scB), 0, 0, 1, 0},
+  {&__pyx_kp_s_2scH, __pyx_k_2scH, sizeof(__pyx_k_2scH), 0, 0, 1, 0},
+  {&__pyx_kp_s_2scI, __pyx_k_2scI, sizeof(__pyx_k_2scI), 0, 0, 1, 0},
+  {&__pyx_kp_s_2sc_is, __pyx_k_2sc_is, sizeof(__pyx_k_2sc_is), 0, 0, 1, 0},
+  {&__pyx_kp_s_2scb, __pyx_k_2scb, sizeof(__pyx_k_2scb), 0, 0, 1, 0},
+  {&__pyx_kp_s_2scc, __pyx_k_2scc, sizeof(__pyx_k_2scc), 0, 0, 1, 0},
+  {&__pyx_kp_s_2sccI_i_s, __pyx_k_2sccI_i_s, sizeof(__pyx_k_2sccI_i_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_2scf, __pyx_k_2scf, sizeof(__pyx_k_2scf), 0, 0, 1, 0},
+  {&__pyx_kp_s_2sch, __pyx_k_2sch, sizeof(__pyx_k_2sch), 0, 0, 1, 0},
+  {&__pyx_kp_s_2sci, __pyx_k_2sci, sizeof(__pyx_k_2sci), 0, 0, 1, 0},
+  {&__pyx_kp_s_30s_10s_s, __pyx_k_30s_10s_s, sizeof(__pyx_k_30s_10s_s), 0, 0, 1, 0},
+  {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
+  {&__pyx_n_s_AS, __pyx_k_AS, sizeof(__pyx_k_AS), 0, 0, 1, 1},
+  {&__pyx_kp_s_A_pileup_column_A_pileup_column, __pyx_k_A_pileup_column_A_pileup_column, sizeof(__pyx_k_A_pileup_column_A_pileup_column), 0, 0, 1, 0},
+  {&__pyx_n_s_AlignedRead, __pyx_k_AlignedRead, sizeof(__pyx_k_AlignedRead), 0, 0, 1, 1},
+  {&__pyx_kp_u_Argument_must_be_string_bytes_or, __pyx_k_Argument_must_be_string_bytes_or, sizeof(__pyx_k_Argument_must_be_string_bytes_or), 0, 1, 0, 0},
+  {&__pyx_kp_u_Argument_must_be_string_or_unico, __pyx_k_Argument_must_be_string_or_unico, sizeof(__pyx_k_Argument_must_be_string_or_unico), 0, 1, 0, 0},
+  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
+  {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1},
+  {&__pyx_kp_s_Bam_index_bin_number, __pyx_k_Bam_index_bin_number, sizeof(__pyx_k_Bam_index_bin_number), 0, 0, 1, 0},
+  {&__pyx_kp_s_Binary_flag, __pyx_k_Binary_flag, sizeof(__pyx_k_Binary_flag), 0, 0, 1, 0},
+  {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
+  {&__pyx_n_s_CIGAR2CODE, __pyx_k_CIGAR2CODE, sizeof(__pyx_k_CIGAR2CODE), 0, 0, 1, 1},
+  {&__pyx_n_s_CIGAR_REGEX, __pyx_k_CIGAR_REGEX, sizeof(__pyx_k_CIGAR_REGEX), 0, 0, 1, 1},
+  {&__pyx_n_s_CL, __pyx_k_CL, sizeof(__pyx_k_CL), 0, 0, 1, 1},
+  {&__pyx_n_s_CN, __pyx_k_CN, sizeof(__pyx_k_CN), 0, 0, 1, 1},
+  {&__pyx_n_s_CO, __pyx_k_CO, sizeof(__pyx_k_CO), 0, 0, 1, 1},
+  {&__pyx_kp_s_Cigar_entries, __pyx_k_Cigar_entries, sizeof(__pyx_k_Cigar_entries), 0, 0, 1, 0},
+  {&__pyx_kp_s_Contig_index, __pyx_k_Contig_index, sizeof(__pyx_k_Contig_index), 0, 0, 1, 0},
+  {&__pyx_kp_s_Contig_index_for_mate_pair, __pyx_k_Contig_index_for_mate_pair, sizeof(__pyx_k_Contig_index_for_mate_pair), 0, 0, 1, 0},
+  {&__pyx_kp_s_Count_of_cigar_entries, __pyx_k_Count_of_cigar_entries, sizeof(__pyx_k_Count_of_cigar_entries), 0, 0, 1, 0},
+  {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1},
+  {&__pyx_n_s_DS, __pyx_k_DS, sizeof(__pyx_k_DS), 0, 0, 1, 1},
+  {&__pyx_n_s_DT, __pyx_k_DT, sizeof(__pyx_k_DT), 0, 0, 1, 1},
+  {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
+  {&__pyx_n_s_FO, __pyx_k_FO, sizeof(__pyx_k_FO), 0, 0, 1, 1},
+  {&__pyx_n_s_GO, __pyx_k_GO, sizeof(__pyx_k_GO), 0, 0, 1, 1},
+  {&__pyx_n_s_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 0, 1, 1},
+  {&__pyx_n_s_HD, __pyx_k_HD, sizeof(__pyx_k_HD), 0, 0, 1, 1},
+  {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1},
+  {&__pyx_n_s_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 0, 0, 1, 1},
+  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
+  {&__pyx_n_s_IS_PYTHON3, __pyx_k_IS_PYTHON3, sizeof(__pyx_k_IS_PYTHON3), 0, 0, 1, 1},
+  {&__pyx_kp_s_I_O_operation_on_closed_file, __pyx_k_I_O_operation_on_closed_file, sizeof(__pyx_k_I_O_operation_on_closed_file), 0, 0, 1, 0},
+  {&__pyx_n_s_IndexedReads, __pyx_k_IndexedReads, sizeof(__pyx_k_IndexedReads), 0, 0, 1, 1},
+  {&__pyx_kp_s_Insert_size, __pyx_k_Insert_size, sizeof(__pyx_k_Insert_size), 0, 0, 1, 0},
+  {&__pyx_kp_s_Invalid_tag_s, __pyx_k_Invalid_tag_s, sizeof(__pyx_k_Invalid_tag_s), 0, 0, 1, 0},
+  {&__pyx_n_s_IteratorColumn, __pyx_k_IteratorColumn, sizeof(__pyx_k_IteratorColumn), 0, 0, 1, 1},
+  {&__pyx_n_s_IteratorRow, __pyx_k_IteratorRow, sizeof(__pyx_k_IteratorRow), 0, 0, 1, 1},
+  {&__pyx_n_s_KS, __pyx_k_KS, sizeof(__pyx_k_KS), 0, 0, 1, 1},
+  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
+  {&__pyx_n_s_LB, __pyx_k_LB, sizeof(__pyx_k_LB), 0, 0, 1, 1},
+  {&__pyx_n_s_LN, __pyx_k_LN, sizeof(__pyx_k_LN), 0, 0, 1, 1},
+  {&__pyx_kp_s_Length_of_auxilary_data, __pyx_k_Length_of_auxilary_data, sizeof(__pyx_k_Length_of_auxilary_data), 0, 0, 1, 0},
+  {&__pyx_kp_s_Length_of_query_name, __pyx_k_Length_of_query_name, sizeof(__pyx_k_Length_of_query_name), 0, 0, 1, 0},
+  {&__pyx_kp_s_Length_of_query_sequence, __pyx_k_Length_of_query_sequence, sizeof(__pyx_k_Length_of_query_sequence), 0, 0, 1, 0},
+  {&__pyx_n_s_M5, __pyx_k_M5, sizeof(__pyx_k_M5), 0, 0, 1, 1},
+  {&__pyx_kp_s_Mapped_position_on_contig, __pyx_k_Mapped_position_on_contig, sizeof(__pyx_k_Mapped_position_on_contig), 0, 0, 1, 0},
+  {&__pyx_kp_s_Mapping_quality, __pyx_k_Mapping_quality, sizeof(__pyx_k_Mapping_quality), 0, 0, 1, 0},
+  {&__pyx_kp_s_Maximum_data_length, __pyx_k_Maximum_data_length, sizeof(__pyx_k_Maximum_data_length), 0, 0, 1, 0},
+  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
+  {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
+  {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
+  {&__pyx_n_s_PG, __pyx_k_PG, sizeof(__pyx_k_PG), 0, 0, 1, 1},
+  {&__pyx_n_s_PI, __pyx_k_PI, sizeof(__pyx_k_PI), 0, 0, 1, 1},
+  {&__pyx_n_s_PL, __pyx_k_PL, sizeof(__pyx_k_PL), 0, 0, 1, 1},
+  {&__pyx_n_s_PN, __pyx_k_PN, sizeof(__pyx_k_PN), 0, 0, 1, 1},
+  {&__pyx_n_s_PP, __pyx_k_PP, sizeof(__pyx_k_PP), 0, 0, 1, 1},
+  {&__pyx_n_s_PU, __pyx_k_PU, sizeof(__pyx_k_PU), 0, 0, 1, 1},
+  {&__pyx_n_s_PileupColumn, __pyx_k_PileupColumn, sizeof(__pyx_k_PileupColumn), 0, 0, 1, 1},
+  {&__pyx_n_s_PileupColumn___str, __pyx_k_PileupColumn___str, sizeof(__pyx_k_PileupColumn___str), 0, 0, 1, 1},
+  {&__pyx_n_s_PileupProxy, __pyx_k_PileupProxy, sizeof(__pyx_k_PileupProxy), 0, 0, 1, 1},
+  {&__pyx_kp_s_PileupProxy_accessed_after_itera, __pyx_k_PileupProxy_accessed_after_itera, sizeof(__pyx_k_PileupProxy_accessed_after_itera), 0, 0, 1, 0},
+  {&__pyx_n_s_PileupRead, __pyx_k_PileupRead, sizeof(__pyx_k_PileupRead), 0, 0, 1, 1},
+  {&__pyx_kp_s_Position_of_mate_pair, __pyx_k_Position_of_mate_pair, sizeof(__pyx_k_Position_of_mate_pair), 0, 0, 1, 0},
+  {&__pyx_kp_s_Quality_scores, __pyx_k_Quality_scores, sizeof(__pyx_k_Quality_scores), 0, 0, 1, 0},
+  {&__pyx_kp_s_Query_name, __pyx_k_Query_name, sizeof(__pyx_k_Query_name), 0, 0, 1, 0},
+  {&__pyx_kp_s_Query_sequence, __pyx_k_Query_sequence, sizeof(__pyx_k_Query_sequence), 0, 0, 1, 0},
+  {&__pyx_n_s_RG, __pyx_k_RG, sizeof(__pyx_k_RG), 0, 0, 1, 1},
+  {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1},
+  {&__pyx_n_s_SM, __pyx_k_SM, sizeof(__pyx_k_SM), 0, 0, 1, 1},
+  {&__pyx_n_s_SN, __pyx_k_SN, sizeof(__pyx_k_SN), 0, 0, 1, 1},
+  {&__pyx_n_s_SO, __pyx_k_SO, sizeof(__pyx_k_SO), 0, 0, 1, 1},
+  {&__pyx_n_s_SP, __pyx_k_SP, sizeof(__pyx_k_SP), 0, 0, 1, 1},
+  {&__pyx_n_s_SQ, __pyx_k_SQ, sizeof(__pyx_k_SQ), 0, 0, 1, 1},
+  {&__pyx_kp_s_SQ_SN_s_LN_s, __pyx_k_SQ_SN_s_LN_s, sizeof(__pyx_k_SQ_SN_s_LN_s), 0, 0, 1, 0},
+  {&__pyx_n_s_Samfile, __pyx_k_Samfile, sizeof(__pyx_k_Samfile), 0, 0, 1, 1},
+  {&__pyx_kp_s_Samfile_mapped_only_available_in, __pyx_k_Samfile_mapped_only_available_in, sizeof(__pyx_k_Samfile_mapped_only_available_in), 0, 0, 1, 0},
+  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
+  {&__pyx_kp_s_This_class_cannot_be_instantiate, __pyx_k_This_class_cannot_be_instantiate, sizeof(__pyx_k_This_class_cannot_be_instantiate), 0, 0, 1, 0},
+  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s_UR, __pyx_k_UR, sizeof(__pyx_k_UR), 0, 0, 1, 1},
+  {&__pyx_kp_s_Unsupported_value_type_in_set_op, __pyx_k_Unsupported_value_type_in_set_op, sizeof(__pyx_k_Unsupported_value_type_in_set_op), 0, 0, 1, 0},
+  {&__pyx_n_s_VALID_HEADERS, __pyx_k_VALID_HEADERS, sizeof(__pyx_k_VALID_HEADERS), 0, 0, 1, 1},
+  {&__pyx_n_s_VALID_HEADER_FIELDS, __pyx_k_VALID_HEADER_FIELDS, sizeof(__pyx_k_VALID_HEADER_FIELDS), 0, 0, 1, 1},
+  {&__pyx_n_s_VALID_HEADER_ORDER, __pyx_k_VALID_HEADER_ORDER, sizeof(__pyx_k_VALID_HEADER_ORDER), 0, 0, 1, 1},
+  {&__pyx_n_s_VALID_HEADER_TYPES, __pyx_k_VALID_HEADER_TYPES, sizeof(__pyx_k_VALID_HEADER_TYPES), 0, 0, 1, 1},
+  {&__pyx_n_s_VN, __pyx_k_VN, sizeof(__pyx_k_VN), 0, 0, 1, 1},
+  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+  {&__pyx_n_s_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 0, 1, 1},
+  {&__pyx_n_s_Zidf, __pyx_k_Zidf, sizeof(__pyx_k_Zidf), 0, 0, 1, 1},
+  {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0},
+  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
+  {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
+  {&__pyx_kp_s__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 1, 0},
+  {&__pyx_kp_s__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 0, 1, 0},
+  {&__pyx_kp_b__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 0, 0},
+  {&__pyx_kp_s__76, __pyx_k__76, sizeof(__pyx_k__76), 0, 0, 1, 0},
+  {&__pyx_kp_s__79, __pyx_k__79, sizeof(__pyx_k__79), 0, 0, 1, 0},
+  {&__pyx_kp_s__80, __pyx_k__80, sizeof(__pyx_k__80), 0, 0, 1, 0},
+  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
+  {&__pyx_n_s_add_sq_text, __pyx_k_add_sq_text, sizeof(__pyx_k_add_sq_text), 0, 0, 1, 1},
+  {&__pyx_n_s_alignment, __pyx_k_alignment, sizeof(__pyx_k_alignment), 0, 0, 1, 1},
+  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+  {&__pyx_n_s_all_2, __pyx_k_all_2, sizeof(__pyx_k_all_2), 0, 0, 1, 1},
+  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
+  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+  {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
+  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
+  {&__pyx_kp_b_bai, __pyx_k_bai, sizeof(__pyx_k_bai), 0, 0, 0, 0},
+  {&__pyx_n_s_beg, __pyx_k_beg, sizeof(__pyx_k_beg), 0, 0, 1, 1},
+  {&__pyx_n_s_bin, __pyx_k_bin, sizeof(__pyx_k_bin), 0, 0, 1, 1},
+  {&__pyx_n_s_bqual, __pyx_k_bqual, sizeof(__pyx_k_bqual), 0, 0, 1, 1},
+  {&__pyx_n_s_buildLine, __pyx_k_buildLine, sizeof(__pyx_k_buildLine), 0, 0, 1, 1},
+  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
+  {&__pyx_kp_s_c_2, __pyx_k_c_2, sizeof(__pyx_k_c_2), 0, 0, 1, 0},
+  {&__pyx_n_s_calcsize, __pyx_k_calcsize, sizeof(__pyx_k_calcsize), 0, 0, 1, 1},
+  {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
+  {&__pyx_kp_s_callback_not_implemented_yet, __pyx_k_callback_not_implemented_yet, sizeof(__pyx_k_callback_not_implemented_yet), 0, 0, 1, 0},
+  {&__pyx_kp_s_can_not_iterate_over_samfile_wit, __pyx_k_can_not_iterate_over_samfile_wit, sizeof(__pyx_k_can_not_iterate_over_samfile_wit), 0, 0, 1, 0},
+  {&__pyx_kp_s_can_only_IndexReads_on_bam_files, __pyx_k_can_only_IndexReads_on_bam_files, sizeof(__pyx_k_can_only_IndexReads_on_bam_files), 0, 0, 1, 0},
+  {&__pyx_kp_s_can_t_guess_type_or_invalid_type, __pyx_k_can_t_guess_type_or_invalid_type, sizeof(__pyx_k_can_t_guess_type_or_invalid_type), 0, 0, 1, 0},
+  {&__pyx_n_s_checkIndex, __pyx_k_checkIndex, sizeof(__pyx_k_checkIndex), 0, 0, 1, 1},
+  {&__pyx_n_s_check_header, __pyx_k_check_header, sizeof(__pyx_k_check_header), 0, 0, 1, 1},
+  {&__pyx_n_s_check_sq, __pyx_k_check_sq, sizeof(__pyx_k_check_sq), 0, 0, 1, 1},
+  {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
+  {&__pyx_n_s_cigar, __pyx_k_cigar, sizeof(__pyx_k_cigar), 0, 0, 1, 1},
+  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
+  {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
+  {&__pyx_n_s_consensus_quality, __pyx_k_consensus_quality, sizeof(__pyx_k_consensus_quality), 0, 0, 1, 1},
+  {&__pyx_kp_s_could_not_open_file_mode_s_is_it, __pyx_k_could_not_open_file_mode_s_is_it, sizeof(__pyx_k_could_not_open_file_mode_s_is_it), 0, 0, 1, 0},
+  {&__pyx_kp_s_could_not_open_file_s, __pyx_k_could_not_open_file_s, sizeof(__pyx_k_could_not_open_file_s), 0, 0, 1, 0},
+  {&__pyx_n_s_coverage, __pyx_k_coverage, sizeof(__pyx_k_coverage), 0, 0, 1, 1},
+  {&__pyx_n_s_create_string_buffer, __pyx_k_create_string_buffer, sizeof(__pyx_k_create_string_buffer), 0, 0, 1, 1},
+  {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
+  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
+  {&__pyx_kp_s_d_MIDNSHP_X, __pyx_k_d_MIDNSHP_X, sizeof(__pyx_k_d_MIDNSHP_X), 0, 0, 1, 0},
+  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
+  {&__pyx_n_s_defaultdict, __pyx_k_defaultdict, sizeof(__pyx_k_defaultdict), 0, 0, 1, 1},
+  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+  {&__pyx_kp_s_either_supply_options_template_h, __pyx_k_either_supply_options_template_h, sizeof(__pyx_k_either_supply_options_template_h), 0, 0, 1, 0},
+  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
+  {&__pyx_kp_s_end_out_of_range_i, __pyx_k_end_out_of_range_i, sizeof(__pyx_k_end_out_of_range_i), 0, 0, 1, 0},
+  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+  {&__pyx_kp_s_error_during_iteration, __pyx_k_error_during_iteration, sizeof(__pyx_k_error_during_iteration), 0, 0, 1, 0},
+  {&__pyx_kp_s_error_while_opening_index_s, __pyx_k_error_while_opening_index_s, sizeof(__pyx_k_error_while_opening_index_s), 0, 0, 1, 0},
+  {&__pyx_n_s_exc_type, __pyx_k_exc_type, sizeof(__pyx_k_exc_type), 0, 0, 1, 1},
+  {&__pyx_n_s_exc_value, __pyx_k_exc_value, sizeof(__pyx_k_exc_value), 0, 0, 1, 1},
+  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
+  {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
+  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
+  {&__pyx_n_s_fastafile, __pyx_k_fastafile, sizeof(__pyx_k_fastafile), 0, 0, 1, 1},
+  {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
+  {&__pyx_kp_s_fetch_called_for_htsfile_without, __pyx_k_fetch_called_for_htsfile_without, sizeof(__pyx_k_fetch_called_for_htsfile_without), 0, 0, 1, 0},
+  {&__pyx_kp_s_fetch_called_on_bamfile_without, __pyx_k_fetch_called_on_bamfile_without, sizeof(__pyx_k_fetch_called_on_bamfile_without), 0, 0, 1, 0},
+  {&__pyx_kp_s_fetching_by_region_is_not_availa, __pyx_k_fetching_by_region_is_not_availa, sizeof(__pyx_k_fetching_by_region_is_not_availa), 0, 0, 1, 0},
+  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
+  {&__pyx_kp_s_file_does_not_have_valid_header, __pyx_k_file_does_not_have_valid_header, sizeof(__pyx_k_file_does_not_have_valid_header), 0, 0, 1, 0},
+  {&__pyx_kp_s_file_does_not_have_valid_header_2, __pyx_k_file_does_not_have_valid_header_2, sizeof(__pyx_k_file_does_not_have_valid_header_2), 0, 0, 1, 0},
+  {&__pyx_kp_s_file_header_is_empty_mode_s_is_i, __pyx_k_file_header_is_empty_mode_s_is_i, sizeof(__pyx_k_file_header_is_empty_mode_s_is_i), 0, 0, 1, 0},
+  {&__pyx_kp_s_file_s_not_found, __pyx_k_file_s_not_found, sizeof(__pyx_k_file_s_not_found), 0, 0, 1, 0},
+  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
+  {&__pyx_n_s_findall, __pyx_k_findall, sizeof(__pyx_k_findall), 0, 0, 1, 1},
+  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
+  {&__pyx_n_s_fmts, __pyx_k_fmts, sizeof(__pyx_k_fmts), 0, 0, 1, 1},
+  {&__pyx_kp_b_ftp, __pyx_k_ftp, sizeof(__pyx_k_ftp), 0, 0, 0, 0},
+  {&__pyx_n_s_genotype, __pyx_k_genotype, sizeof(__pyx_k_genotype), 0, 0, 1, 1},
+  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
+  {&__pyx_n_s_getattribute, __pyx_k_getattribute, sizeof(__pyx_k_getattribute), 0, 0, 1, 1},
+  {&__pyx_n_s_getdefaultencoding, __pyx_k_getdefaultencoding, sizeof(__pyx_k_getdefaultencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_getfilesystemencoding, __pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_gettid, __pyx_k_gettid, sizeof(__pyx_k_gettid), 0, 0, 1, 1},
+  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
+  {&__pyx_n_s_hasIndex, __pyx_k_hasIndex, sizeof(__pyx_k_hasIndex), 0, 0, 1, 1},
+  {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1},
+  {&__pyx_kp_s_header_line_with_invalid_type_s, __pyx_k_header_line_with_invalid_type_s, sizeof(__pyx_k_header_line_with_invalid_type_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_header_line_without_s, __pyx_k_header_line_without_s, sizeof(__pyx_k_header_line_without_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_k_home_andreas_devel_pysam_pysam, sizeof(__pyx_k_home_andreas_devel_pysam_pysam), 0, 0, 1, 0},
+  {&__pyx_kp_b_http, __pyx_k_http, sizeof(__pyx_k_http), 0, 0, 0, 0},
+  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+  {&__pyx_kp_s_i_c, __pyx_k_i_c, sizeof(__pyx_k_i_c), 0, 0, 1, 0},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_kp_s_incomplete_sequence_information, __pyx_k_incomplete_sequence_information, sizeof(__pyx_k_incomplete_sequence_information), 0, 0, 1, 0},
+  {&__pyx_n_s_indel, __pyx_k_indel, sizeof(__pyx_k_indel), 0, 0, 1, 1},
+  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+  {&__pyx_kp_s_integer_i_out_of_range_of_BAM_SA, __pyx_k_integer_i_out_of_range_of_BAM_SA, sizeof(__pyx_k_integer_i_out_of_range_of_BAM_SA), 0, 0, 1, 0},
+  {&__pyx_kp_s_invalid_coordinates_start_i_end, __pyx_k_invalid_coordinates_start_i_end, sizeof(__pyx_k_invalid_coordinates_start_i_end), 0, 0, 1, 0},
+  {&__pyx_kp_s_invalid_file_opening_mode_s, __pyx_k_invalid_file_opening_mode_s, sizeof(__pyx_k_invalid_file_opening_mode_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_invalid_reference_s, __pyx_k_invalid_reference_s, sizeof(__pyx_k_invalid_reference_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_invalid_type_for_record_s_s_expe, __pyx_k_invalid_type_for_record_s_s_expe, sizeof(__pyx_k_invalid_type_for_record_s_s_expe), 0, 0, 1, 0},
+  {&__pyx_n_s_isOpen, __pyx_k_isOpen, sizeof(__pyx_k_isOpen), 0, 0, 1, 1},
+  {&__pyx_n_s_is_del, __pyx_k_is_del, sizeof(__pyx_k_is_del), 0, 0, 1, 1},
+  {&__pyx_n_s_is_head, __pyx_k_is_head, sizeof(__pyx_k_is_head), 0, 0, 1, 1},
+  {&__pyx_n_s_is_tail, __pyx_k_is_tail, sizeof(__pyx_k_is_tail), 0, 0, 1, 1},
+  {&__pyx_n_s_isize, __pyx_k_isize, sizeof(__pyx_k_isize), 0, 0, 1, 1},
+  {&__pyx_n_s_islower, __pyx_k_islower, sizeof(__pyx_k_islower), 0, 0, 1, 1},
+  {&__pyx_n_s_isupper, __pyx_k_isupper, sizeof(__pyx_k_isupper), 0, 0, 1, 1},
+  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
+  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
+  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
+  {&__pyx_n_s_l_data, __pyx_k_l_data, sizeof(__pyx_k_l_data), 0, 0, 1, 1},
+  {&__pyx_n_s_l_qname, __pyx_k_l_qname, sizeof(__pyx_k_l_qname), 0, 0, 1, 1},
+  {&__pyx_n_s_l_qseq, __pyx_k_l_qseq, sizeof(__pyx_k_l_qseq), 0, 0, 1, 1},
+  {&__pyx_n_s_lengths, __pyx_k_lengths, sizeof(__pyx_k_lengths), 0, 0, 1, 1},
+  {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
+  {&__pyx_n_s_m_data, __pyx_k_m_data, sizeof(__pyx_k_m_data), 0, 0, 1, 1},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_kp_s_malformatted_header_no_in_field, __pyx_k_malformatted_header_no_in_field, sizeof(__pyx_k_malformatted_header_no_in_field), 0, 0, 1, 0},
+  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
+  {&__pyx_kp_s_mapping_information_not_recorded, __pyx_k_mapping_information_not_recorded, sizeof(__pyx_k_mapping_information_not_recorded), 0, 0, 1, 0},
+  {&__pyx_n_s_mapping_quality, __pyx_k_mapping_quality, sizeof(__pyx_k_mapping_quality), 0, 0, 1, 1},
+  {&__pyx_n_s_mapq, __pyx_k_mapq, sizeof(__pyx_k_mapq), 0, 0, 1, 1},
+  {&__pyx_kp_s_mate_not_found, __pyx_k_mate_not_found, sizeof(__pyx_k_mate_not_found), 0, 0, 1, 0},
+  {&__pyx_kp_s_mate_s_is_unmapped, __pyx_k_mate_s_is_unmapped, sizeof(__pyx_k_mate_s_is_unmapped), 0, 0, 1, 0},
+  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
+  {&__pyx_n_s_max_depth, __pyx_k_max_depth, sizeof(__pyx_k_max_depth), 0, 0, 1, 1},
+  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
+  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
+  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+  {&__pyx_n_s_mpos, __pyx_k_mpos, sizeof(__pyx_k_mpos), 0, 0, 1, 1},
+  {&__pyx_n_s_mrnm, __pyx_k_mrnm, sizeof(__pyx_k_mrnm), 0, 0, 1, 1},
+  {&__pyx_n_s_mtid, __pyx_k_mtid, sizeof(__pyx_k_mtid), 0, 0, 1, 1},
+  {&__pyx_kp_s_multiple_s_lines_are_not_permitt, __pyx_k_multiple_s_lines_are_not_permitt, sizeof(__pyx_k_multiple_s_lines_are_not_permitt), 0, 0, 1, 0},
+  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
+  {&__pyx_n_s_n_cigar, __pyx_k_n_cigar, sizeof(__pyx_k_n_cigar), 0, 0, 1, 1},
+  {&__pyx_n_s_nextiter, __pyx_k_nextiter, sizeof(__pyx_k_nextiter), 0, 0, 1, 1},
+  {&__pyx_kp_s_no_index_available_for_fetch, __pyx_k_no_index_available_for_fetch, sizeof(__pyx_k_no_index_available_for_fetch), 0, 0, 1, 0},
+  {&__pyx_kp_s_no_index_available_for_iteration, __pyx_k_no_index_available_for_iteration, sizeof(__pyx_k_no_index_available_for_iteration), 0, 0, 1, 0},
+  {&__pyx_kp_s_no_index_available_for_pileup, __pyx_k_no_index_available_for_pileup, sizeof(__pyx_k_no_index_available_for_pileup), 0, 0, 1, 0},
+  {&__pyx_n_s_nreferences, __pyx_k_nreferences, sizeof(__pyx_k_nreferences), 0, 0, 1, 1},
+  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
+  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
+  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
+  {&__pyx_n_s_ord, __pyx_k_ord, sizeof(__pyx_k_ord), 0, 0, 1, 1},
+  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
+  {&__pyx_n_s_pack_into, __pyx_k_pack_into, sizeof(__pyx_k_pack_into), 0, 0, 1, 1},
+  {&__pyx_n_s_parseRegion, __pyx_k_parseRegion, sizeof(__pyx_k_parseRegion), 0, 0, 1, 1},
+  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
+  {&__pyx_kp_s_pileup_of_samfiles_not_implement, __pyx_k_pileup_of_samfiles_not_implement, sizeof(__pyx_k_pileup_of_samfiles_not_implement), 0, 0, 1, 0},
+  {&__pyx_n_s_pileups, __pyx_k_pileups, sizeof(__pyx_k_pileups), 0, 0, 1, 1},
+  {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
+  {&__pyx_n_s_port, __pyx_k_port, sizeof(__pyx_k_port), 0, 0, 1, 1},
+  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
+  {&__pyx_n_s_positions, __pyx_k_positions, sizeof(__pyx_k_positions), 0, 0, 1, 1},
+  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+  {&__pyx_n_s_pysam_csamfile, __pyx_k_pysam_csamfile, sizeof(__pyx_k_pysam_csamfile), 0, 0, 1, 1},
+  {&__pyx_n_s_pytag, __pyx_k_pytag, sizeof(__pyx_k_pytag), 0, 0, 1, 1},
+  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
+  {&__pyx_n_s_qname, __pyx_k_qname, sizeof(__pyx_k_qname), 0, 0, 1, 1},
+  {&__pyx_n_s_qpos, __pyx_k_qpos, sizeof(__pyx_k_qpos), 0, 0, 1, 1},
+  {&__pyx_n_s_qseq, __pyx_k_qseq, sizeof(__pyx_k_qseq), 0, 0, 1, 1},
+  {&__pyx_n_s_qual, __pyx_k_qual, sizeof(__pyx_k_qual), 0, 0, 1, 1},
+  {&__pyx_kp_s_quality_and_sequence_mismatch_i, __pyx_k_quality_and_sequence_mismatch_i, sizeof(__pyx_k_quality_and_sequence_mismatch_i), 0, 0, 1, 0},
+  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
+  {&__pyx_n_s_rU, __pyx_k_rU, sizeof(__pyx_k_rU), 0, 0, 1, 1},
+  {&__pyx_n_s_raw, __pyx_k_raw, sizeof(__pyx_k_raw), 0, 0, 1, 1},
+  {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1},
+  {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
+  {&__pyx_kp_s_read_s_is_unpaired, __pyx_k_read_s_is_unpaired, sizeof(__pyx_k_read_s_is_unpaired), 0, 0, 1, 0},
+  {&__pyx_kp_s_read_s_not_found, __pyx_k_read_s_not_found, sizeof(__pyx_k_read_s_not_found), 0, 0, 1, 0},
+  {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
+  {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1},
+  {&__pyx_n_s_reference_base, __pyx_k_reference_base, sizeof(__pyx_k_reference_base), 0, 0, 1, 1},
+  {&__pyx_kp_s_reference_sequence_for_s_tid_i_n, __pyx_k_reference_sequence_for_s_tid_i_n, sizeof(__pyx_k_reference_sequence_for_s_tid_i_n), 0, 0, 1, 0},
+  {&__pyx_n_s_referencelengths, __pyx_k_referencelengths, sizeof(__pyx_k_referencelengths), 0, 0, 1, 1},
+  {&__pyx_n_s_referencenames, __pyx_k_referencenames, sizeof(__pyx_k_referencenames), 0, 0, 1, 1},
+  {&__pyx_n_s_references, __pyx_k_references, sizeof(__pyx_k_references), 0, 0, 1, 1},
+  {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1},
+  {&__pyx_n_s_reopen, __pyx_k_reopen, sizeof(__pyx_k_reopen), 0, 0, 1, 1},
+  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
+  {&__pyx_n_s_rlen, __pyx_k_rlen, sizeof(__pyx_k_rlen), 0, 0, 1, 1},
+  {&__pyx_n_s_rname, __pyx_k_rname, sizeof(__pyx_k_rname), 0, 0, 1, 1},
+  {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
+  {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
+  {&__pyx_n_s_samfile, __pyx_k_samfile, sizeof(__pyx_k_samfile), 0, 0, 1, 1},
+  {&__pyx_n_s_samtools, __pyx_k_samtools, sizeof(__pyx_k_samtools), 0, 0, 1, 1},
+  {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
+  {&__pyx_kp_s_seek_no_available_in_streams, __pyx_k_seek_no_available_in_streams, sizeof(__pyx_k_seek_no_available_in_streams), 0, 0, 1, 0},
+  {&__pyx_kp_s_seek_only_available_in_bam_files, __pyx_k_seek_only_available_in_bam_files, sizeof(__pyx_k_seek_only_available_in_bam_files), 0, 0, 1, 0},
+  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
+  {&__pyx_n_s_seq, __pyx_k_seq, sizeof(__pyx_k_seq), 0, 0, 1, 1},
+  {&__pyx_n_s_setTag, __pyx_k_setTag, sizeof(__pyx_k_setTag), 0, 0, 1, 1},
+  {&__pyx_n_s_snp_quality, __pyx_k_snp_quality, sizeof(__pyx_k_snp_quality), 0, 0, 1, 1},
+  {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1},
+  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
+  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
+  {&__pyx_kp_s_start_out_of_range_i, __pyx_k_start_out_of_range_i, sizeof(__pyx_k_start_out_of_range_i), 0, 0, 1, 0},
+  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
+  {&__pyx_n_s_stepper, __pyx_k_stepper, sizeof(__pyx_k_stepper), 0, 0, 1, 1},
+  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
+  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
+  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
+  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+  {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1},
+  {&__pyx_kp_s_tag_s_not_present, __pyx_k_tag_s_not_present, sizeof(__pyx_k_tag_s_not_present), 0, 0, 1, 0},
+  {&__pyx_n_s_tags, __pyx_k_tags, sizeof(__pyx_k_tags), 0, 0, 1, 1},
+  {&__pyx_n_s_tempfile, __pyx_k_tempfile, sizeof(__pyx_k_tempfile), 0, 0, 1, 1},
+  {&__pyx_n_s_template, __pyx_k_template, sizeof(__pyx_k_template), 0, 0, 1, 1},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
+  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
+  {&__pyx_n_s_tid, __pyx_k_tid, sizeof(__pyx_k_tid), 0, 0, 1, 1},
+  {&__pyx_kp_s_tid_i_out_of_range_0_tid_i, __pyx_k_tid_i_out_of_range_0_tid_i, sizeof(__pyx_k_tid_i_out_of_range_0_tid_i), 0, 0, 1, 0},
+  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
+  {&__pyx_n_s_truncate, __pyx_k_truncate, sizeof(__pyx_k_truncate), 0, 0, 1, 1},
+  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
+  {&__pyx_kp_s_unable_to_open_index_for_s, __pyx_k_unable_to_open_index_for_s, sizeof(__pyx_k_unable_to_open_index_for_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_unequal_names_and_lengths_of_ref, __pyx_k_unequal_names_and_lengths_of_ref, sizeof(__pyx_k_unequal_names_and_lengths_of_ref), 0, 0, 1, 0},
+  {&__pyx_kp_s_unknown_auxilliary_type_s, __pyx_k_unknown_auxilliary_type_s, sizeof(__pyx_k_unknown_auxilliary_type_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_unknown_field_code_s_in_record_s, __pyx_k_unknown_field_code_s_in_record_s, sizeof(__pyx_k_unknown_field_code_s_in_record_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_unknown_stepper_option_s_in_Iter, __pyx_k_unknown_stepper_option_s_in_Iter, sizeof(__pyx_k_unknown_stepper_option_s_in_Iter), 0, 0, 1, 0},
+  {&__pyx_kp_s_unknown_type_s, __pyx_k_unknown_type_s, sizeof(__pyx_k_unknown_type_s), 0, 0, 1, 0},
+  {&__pyx_n_s_until_eof, __pyx_k_until_eof, sizeof(__pyx_k_until_eof), 0, 0, 1, 1},
+  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+  {&__pyx_n_s_value_type, __pyx_k_value_type, sizeof(__pyx_k_value_type), 0, 0, 1, 1},
+  {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
+  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
+  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
+  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
+  {&__pyx_n_s_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 0, 1, 1},
+  {&__pyx_n_s_wbu, __pyx_k_wbu, sizeof(__pyx_k_wbu), 0, 0, 1, 1},
+  {&__pyx_n_s_wh, __pyx_k_wh, sizeof(__pyx_k_wh), 0, 0, 1, 1},
+  {&__pyx_n_s_where, __pyx_k_where, sizeof(__pyx_k_where), 0, 0, 1, 1},
+  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
+  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ord = __Pyx_GetBuiltinName(__pyx_n_s_ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+  /* "pysam/csamfile.pyx":66
+ *         return s
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ */
+  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple_);
+  __Pyx_GIVEREF(__pyx_tuple_);
+
+  /* "pysam/csamfile.pyx":87
+ *         return s
+ *     elif PyBytes_Check(s):
+ *         return s.decode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         # assume unicode
+ */
+  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__2);
+  __Pyx_GIVEREF(__pyx_tuple__2);
+
+  /* "pysam/csamfile.pyx":379
+ *             self.close()
+ * 
+ *         cdef bytes bmode = mode.encode('ascii')             # <<<<<<<<<<<<<<
+ *         self._filename = filename = _encodeFilename(filename)
+ *         self.isstream = filename == b"-"
+ */
+  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__5);
+  __Pyx_GIVEREF(__pyx_tuple__5);
+
+  /* "pysam/csamfile.pyx":385
+ *         self.isbam = len(mode) > 1 and mode[1] == 'b'
+ * 
+ *         self.isremote = filename.startswith(b"http:") or \             # <<<<<<<<<<<<<<
+ *                         filename.startswith(b"ftp:")
+ * 
+ */
+  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_b_http); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__7);
+  __Pyx_GIVEREF(__pyx_tuple__7);
+
+  /* "pysam/csamfile.pyx":386
+ * 
+ *         self.isremote = filename.startswith(b"http:") or \
+ *                         filename.startswith(b"ftp:")             # <<<<<<<<<<<<<<
+ * 
+ *         cdef char * ctext
+ */
+  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_b_ftp); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__8);
+  __Pyx_GIVEREF(__pyx_tuple__8);
+
+  /* "pysam/csamfile.pyx":503
+ *             if not self.isremote:
+ *                 if not os.path.exists(filename + b".bai") \
+ *                         and not os.path.exists( filename[:-4] + b".bai"):             # <<<<<<<<<<<<<<
+ *                     self.index = NULL
+ *                 else:
+ */
+  __pyx_slice__10 = PySlice_New(Py_None, __pyx_int_neg_4, Py_None); if (unlikely(!__pyx_slice__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__10);
+  __Pyx_GIVEREF(__pyx_slice__10);
+
+  /* "pysam/csamfile.pyx":525
+ *         '''
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         reference = _forceBytes(reference)
+ *         return bam_name2id(self.header, reference)
+ */
+  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__11);
+  __Pyx_GIVEREF(__pyx_tuple__11);
+
+  /* "pysam/csamfile.pyx":533
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         if not 0 <= tid < self.header.n_targets:
+ *             raise ValueError("tid %i out of range 0<=tid<%i" %
+ */
+  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__12);
+  __Pyx_GIVEREF(__pyx_tuple__12);
+
+  /* "pysam/csamfile.pyx":543
+ *         convert numerical :term:`tid` into :term:`reference` name.'''
+ *         if not self._isOpen():
+ *             raise ValueError("I/O operation on closed file")             # <<<<<<<<<<<<<<
+ * 
+ *         if not 0 <= tid < self.header.n_targets:
+ */
+  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__13);
+  __Pyx_GIVEREF(__pyx_tuple__13);
+
+  /* "pysam/csamfile.pyx":595
+ * 
+ *         if not reference:
+ *             return 0, 0, 0, 0             # <<<<<<<<<<<<<<
+ * 
+ *         if tid is not None:
+ */
+  __pyx_tuple__15 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__15);
+  __Pyx_GIVEREF(__pyx_tuple__15);
+
+  /* "pysam/csamfile.pyx":625
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         if not self.isbam:
+ *             raise NotImplementedError("seek only available in bam files")
+ */
+  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__16);
+  __Pyx_GIVEREF(__pyx_tuple__16);
+
+  /* "pysam/csamfile.pyx":627
+ *             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")
+ */
+  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_seek_only_available_in_bam_files); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__17);
+  __Pyx_GIVEREF(__pyx_tuple__17);
+
+  /* "pysam/csamfile.pyx":629
+ *             raise NotImplementedError("seek only available in bam files")
+ *         if self.isstream:
+ *             raise OSError("seek no available in streams")             # <<<<<<<<<<<<<<
+ * 
+ *         return bgzf_seek(self.fp, offset, where)
+ */
+  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_seek_no_available_in_streams); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__18);
+  __Pyx_GIVEREF(__pyx_tuple__18);
+
+  /* "pysam/csamfile.pyx":638
+ *         '''
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *         if not self.isbam:
+ *             raise NotImplementedError("seek only available in bam files")
+ */
+  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__19);
+  __Pyx_GIVEREF(__pyx_tuple__19);
+
+  /* "pysam/csamfile.pyx":640
+ *             raise ValueError( "I/O operation on closed file" )
+ *         if not self.isbam:
+ *             raise NotImplementedError("seek only available in bam files")             # <<<<<<<<<<<<<<
+ * 
+ *         return bgzf_tell(self.fp)
+ */
+  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_seek_only_available_in_bam_files); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__20);
+  __Pyx_GIVEREF(__pyx_tuple__20);
+
+  /* "pysam/csamfile.pyx":686
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(reference,
+ */
+  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__21);
+  __Pyx_GIVEREF(__pyx_tuple__21);
+
+  /* "pysam/csamfile.pyx":700
+ *         if self.isbam:
+ *             if not until_eof and not self._hasIndex() and not self.isremote:
+ *                 raise ValueError( "fetch called on bamfile without index" )             # <<<<<<<<<<<<<<
+ * 
+ *             if has_coord:
+ */
+  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_fetch_called_on_bamfile_without); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__22);
+  __Pyx_GIVEREF(__pyx_tuple__22);
+
+  /* "pysam/csamfile.pyx":713
+ *         else:
+ *             if has_coord:
+ *                 raise ValueError ("fetching by region is not available for sam files")             # <<<<<<<<<<<<<<
+ * 
+ *             if callback:
+ */
+  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_fetching_by_region_is_not_availa); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__23);
+  __Pyx_GIVEREF(__pyx_tuple__23);
+
+  /* "pysam/csamfile.pyx":716
+ * 
+ *             if callback:
+ *                 raise NotImplementedError("callback not implemented yet")             # <<<<<<<<<<<<<<
+ * 
+ *             if self.header == NULL:
+ */
+  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_callback_not_implemented_yet); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__24);
+  __Pyx_GIVEREF(__pyx_tuple__24);
+
+  /* "pysam/csamfile.pyx":719
+ * 
+ *             if self.header == NULL:
+ *                 raise ValueError("fetch called for htsfile without header")             # <<<<<<<<<<<<<<
+ * 
+ *             # check if targets are defined
+ */
+  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_fetch_called_for_htsfile_without); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__25);
+  __Pyx_GIVEREF(__pyx_tuple__25);
+
+  /* "pysam/csamfile.pyx":724
+ *             # give warning, sam_read1 segfaults
+ *             if self.header.n_targets == 0:
+ *                 warnings.warn("fetch called for htsfile without header")             # <<<<<<<<<<<<<<
+ * 
+ *             return IteratorRowAll(self, reopen=reopen)
+ */
+  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_fetch_called_for_htsfile_without); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__26);
+  __Pyx_GIVEREF(__pyx_tuple__26);
+
+  /* "pysam/csamfile.pyx":777
+ *                 break
+ *         else:
+ *             raise ValueError("mate not found")             # <<<<<<<<<<<<<<
+ * 
+ *         return mate
+ */
+  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_mate_not_found); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__27);
+  __Pyx_GIVEREF(__pyx_tuple__27);
+
+  /* "pysam/csamfile.pyx":802
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         for read in self.fetch(reference=reference,
+ */
+  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__28);
+  __Pyx_GIVEREF(__pyx_tuple__28);
+
+  /* "pysam/csamfile.pyx":868
+ * 
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         has_coord, rtid, rstart, rend = self._parseRegion(
+ */
+  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__29);
+  __Pyx_GIVEREF(__pyx_tuple__29);
+
+  /* "pysam/csamfile.pyx":875
+ *         if self.isbam:
+ *             if not self._hasIndex():
+ *                 raise ValueError("no index available for pileup")             # <<<<<<<<<<<<<<
+ * 
+ *             if has_coord:
+ */
+  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_index_available_for_pileup); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__30);
+  __Pyx_GIVEREF(__pyx_tuple__30);
+
+  /* "pysam/csamfile.pyx":887
+ * 
+ *         else:
+ *             raise NotImplementedError( "pileup of samfiles not implemented yet" )             # <<<<<<<<<<<<<<
+ * 
+ *     def close( self ):
+ */
+  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_pileup_of_samfiles_not_implement); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__31);
+  __Pyx_GIVEREF(__pyx_tuple__31);
+
+  /* "pysam/csamfile.pyx":941
+ *         '''number of :term:`reference` sequences in the file.'''
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             return self.header.n_targets
+ * 
+ */
+  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__32);
+  __Pyx_GIVEREF(__pyx_tuple__32);
+
+  /* "pysam/csamfile.pyx":947
+ *         """tuple with the names of :term:`reference` sequences."""
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             t = []
+ *             for x from 0 <= x < self.header.n_targets:
+ */
+  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__33);
+  __Pyx_GIVEREF(__pyx_tuple__33);
+
+  /* "pysam/csamfile.pyx":958
+ *         """
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             t = []
+ *             for x from 0 <= x < self.header.n_targets:
+ */
+  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__34);
+  __Pyx_GIVEREF(__pyx_tuple__34);
+
+  /* "pysam/csamfile.pyx":981
+ *         an error.'''
+ *         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")
+ */
+  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__35);
+  __Pyx_GIVEREF(__pyx_tuple__35);
+
+  /* "pysam/csamfile.pyx":983
+ *             raise ValueError("I/O operation on closed file")
+ *         if not self.isbam:
+ *             raise AttributeError("Samfile.mapped only available in bam files")             # <<<<<<<<<<<<<<
+ *         if self.index == NULL:
+ *             raise ValueError("mapping information not recorded in index "
+ */
+  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_Samfile_mapped_only_available_in); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__36);
+  __Pyx_GIVEREF(__pyx_tuple__36);
+
+  /* "pysam/csamfile.pyx":985
+ *             raise AttributeError("Samfile.mapped only available in bam files")
+ *         if self.index == NULL:
+ *             raise ValueError("mapping information not recorded in index "             # <<<<<<<<<<<<<<
+ *                                  "or index not available")
+ * 
+ */
+  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_mapping_information_not_recorded); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__37);
+  __Pyx_GIVEREF(__pyx_tuple__37);
+
+  /* "pysam/csamfile.pyx":1012
+ *         '''full contents of the :term:`sam file` header as a string.'''
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             return from_string_and_size(self.header.text, self.header.l_text)
+ * 
+ */
+  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__38);
+  __Pyx_GIVEREF(__pyx_tuple__38);
+
+  /* "pysam/csamfile.pyx":1020
+ *         '''
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *             result = {}
+ */
+  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__39);
+  __Pyx_GIVEREF(__pyx_tuple__39);
+
+  /* "pysam/csamfile.pyx":1027
+ *                 # convert to python string (note: call self.text to create 0-terminated string)
+ *                 t = self.text
+ *                 for line in t.split("\n"):             # <<<<<<<<<<<<<<
+ *                     if not line.strip(): continue
+ *                     assert line.startswith("@"), "header line without '@': '%s'" % line
+ */
+  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__40);
+  __Pyx_GIVEREF(__pyx_tuple__40);
+
+  /* "pysam/csamfile.pyx":1029
+ *                 for line in t.split("\n"):
+ *                     if not line.strip(): continue
+ *                     assert line.startswith("@"), "header line without '@': '%s'" % line             # <<<<<<<<<<<<<<
+ *                     fields = line[1:].split("\t")
+ *                     record = fields[0]
+ */
+  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s__41); if (unlikely(!__pyx_tuple__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__42);
+  __Pyx_GIVEREF(__pyx_tuple__42);
+
+  /* "pysam/csamfile.pyx":1030
+ *                     if not line.strip(): continue
+ *                     assert line.startswith("@"), "header line without '@': '%s'" % line
+ *                     fields = line[1:].split("\t")             # <<<<<<<<<<<<<<
+ *                     record = fields[0]
+ *                     assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
+ */
+  __pyx_slice__43 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__43);
+  __Pyx_GIVEREF(__pyx_slice__43);
+  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s__3); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__44);
+  __Pyx_GIVEREF(__pyx_tuple__44);
+
+  /* "pysam/csamfile.pyx":1037
+ *                     if record == "CO":
+ *                         if record not in result: result[record] = []
+ *                         result[record].append( "\t".join( fields[1:] ) )             # <<<<<<<<<<<<<<
+ *                         continue
+ *                     # the following is clumsy as generators do not work?
+ */
+  __pyx_slice__45 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__45);
+  __Pyx_GIVEREF(__pyx_slice__45);
+
+  /* "pysam/csamfile.pyx":1041
+ *                     # the following is clumsy as generators do not work?
+ *                     x = {}
+ *                     for field in fields[1:]:             # <<<<<<<<<<<<<<
+ *                         if ":" not in field:
+ *                             raise ValueError("malformatted header: no ':' in field" )
+ */
+  __pyx_slice__46 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__46);
+  __Pyx_GIVEREF(__pyx_slice__46);
+
+  /* "pysam/csamfile.pyx":1043
+ *                     for field in fields[1:]:
+ *                         if ":" not in field:
+ *                             raise ValueError("malformatted header: no ':' in field" )             # <<<<<<<<<<<<<<
+ *                         key, value = field.split(":",1)
+ *                         # uppercase keys must be valid
+ */
+  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_malformatted_header_no_in_field); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__48);
+  __Pyx_GIVEREF(__pyx_tuple__48);
+
+  /* "pysam/csamfile.pyx":1044
+ *                         if ":" not in field:
+ *                             raise ValueError("malformatted header: no ':' in field" )
+ *                         key, value = field.split(":",1)             # <<<<<<<<<<<<<<
+ *                         # uppercase keys must be valid
+ *                         # lowercase are permitted for user fields
+ */
+  __pyx_tuple__49 = PyTuple_Pack(2, __pyx_kp_s__47, __pyx_int_1); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__49);
+  __Pyx_GIVEREF(__pyx_tuple__49);
+
+  /* "pysam/csamfile.pyx":1144
+ *         dest.text = <char*>calloc( len(text), sizeof(char))
+ *         dest.l_text = len(text)
+ *         cdef bytes btext = text.encode('ascii')             # <<<<<<<<<<<<<<
+ *         strncpy( dest.text, btext, dest.l_text )
+ * 
+ */
+  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__50);
+  __Pyx_GIVEREF(__pyx_tuple__50);
+
+  /* "pysam/csamfile.pyx":1164
+ *                 seqname, seqlen = seqs[x]
+ *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
+ *                 bseqname = seqname.encode('ascii')             # <<<<<<<<<<<<<<
+ *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
+ *                 dest.target_len[x] = seqlen
+ */
+  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__51);
+  __Pyx_GIVEREF(__pyx_tuple__51);
+
+  /* "pysam/csamfile.pyx":1180
+ *     def __iter__(self):
+ *         if not self._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         if not self.isbam and self.header.n_targets == 0:
+ */
+  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__52);
+  __Pyx_GIVEREF(__pyx_tuple__52);
+
+  /* "pysam/csamfile.pyx":1183
+ * 
+ *         if not self.isbam and self.header.n_targets == 0:
+ *             raise NotImplementedError(             # <<<<<<<<<<<<<<
+ *                 "can not iterate over samfile without header")
+ *         return self
+ */
+  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_can_not_iterate_over_samfile_wit); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__53);
+  __Pyx_GIVEREF(__pyx_tuple__53);
+
+  /* "pysam/csamfile.pyx":1239
+ * 
+ *         if not samfile._isOpen():
+ *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ * 
+ *         # makes sure that samfile stays alive as long as the
+ */
+  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__54);
+  __Pyx_GIVEREF(__pyx_tuple__54);
+
+  /* "pysam/csamfile.pyx":1298
+ * 
+ *         if not samfile._hasIndex():
+ *             raise ValueError( "no index available for iteration" )             # <<<<<<<<<<<<<<
+ * 
+ *         self.iter = sam_itr_queryi(
+ */
+  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_no_index_available_for_iteration); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__55);
+  __Pyx_GIVEREF(__pyx_tuple__55);
+
+  /* "pysam/csamfile.pyx":1443
+ * 
+ *         if not samfile._hasIndex():
+ *             raise ValueError("no index available for fetch")             # <<<<<<<<<<<<<<
+ * 
+ *         self.tid = -1
+ */
+  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_no_index_available_for_fetch); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__56);
+  __Pyx_GIVEREF(__pyx_tuple__56);
+
+  /* "pysam/csamfile.pyx":1805
+ *             self.cnext()
+ *             if self.n_plp < 0:
+ *                 raise ValueError("error during iteration" )             # <<<<<<<<<<<<<<
+ * 
+ *             if self.plp == NULL:
+ */
+  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_error_during_iteration); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__58);
+  __Pyx_GIVEREF(__pyx_tuple__58);
+
+  /* "pysam/csamfile.pyx":1843
+ * 
+ *             if self.n_plp < 0:
+ *                 raise ValueError("error during iteration" )             # <<<<<<<<<<<<<<
+ * 
+ *             # return result, if within same reference
+ */
+  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_error_during_iteration); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__59);
+  __Pyx_GIVEREF(__pyx_tuple__59);
+
+  /* "pysam/csamfile.pyx":1978
+ * 
+ *     if not type(pytag) is bytes:
+ *         pytag = pytag.encode('ascii')             # <<<<<<<<<<<<<<
+ *     t = type(value)
+ * 
+ */
+  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__60);
+  __Pyx_GIVEREF(__pyx_tuple__60);
+
+  /* "pysam/csamfile.pyx":2005
+ * 
+ *         datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *         args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                       pytype.encode('ascii'),
+ *                       datatype.encode('ascii'),
+ */
+  __pyx_slice__61 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__61);
+  __Pyx_GIVEREF(__pyx_slice__61);
+
+  /* "pysam/csamfile.pyx":2006
+ *         datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *         args.extend( [pytag[:2],
+ *                       pytype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                       datatype.encode('ascii'),
+ *                       len(value)] + list(value) )
+ */
+  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__62);
+  __Pyx_GIVEREF(__pyx_tuple__62);
+
+  /* "pysam/csamfile.pyx":2007
+ *         args.extend( [pytag[:2],
+ *                       pytype.encode('ascii'),
+ *                       datatype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                       len(value)] + list(value) )
+ *         fmts.append( datafmt )
+ */
+  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__63);
+  __Pyx_GIVEREF(__pyx_tuple__63);
+
+  /* "pysam/csamfile.pyx":2030
+ *         # Note: hex strings (H) are not supported yet
+ *         if t is not bytes:
+ *             value = value.encode('ascii')             # <<<<<<<<<<<<<<
+ *         if len(value) == 1:
+ *             fmt, pytype = "2scc", 'A'
+ */
+  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__64);
+  __Pyx_GIVEREF(__pyx_tuple__64);
+
+  /* "pysam/csamfile.pyx":2036
+ *             fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+ * 
+ *     args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                   pytype.encode('ascii'),
+ *                   value ] )
+ */
+  __pyx_slice__65 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__65);
+  __Pyx_GIVEREF(__pyx_slice__65);
+
+  /* "pysam/csamfile.pyx":2037
+ * 
+ *     args.extend( [pytag[:2],
+ *                   pytype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                   value ] )
+ * 
+ */
+  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__66);
+  __Pyx_GIVEREF(__pyx_tuple__66);
+
+  /* "pysam/csamfile.pyx":2104
+ *             qual = self.qual
+ *         else:
+ *             seq = self.seq.decode('ascii')             # <<<<<<<<<<<<<<
+ *             qual = self.qual.decode('ascii')
+ *         return "\t".join(map(str, (self.qname,
+ */
+  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__67);
+  __Pyx_GIVEREF(__pyx_tuple__67);
+
+  /* "pysam/csamfile.pyx":2105
+ *         else:
+ *             seq = self.seq.decode('ascii')
+ *             qual = self.qual.decode('ascii')             # <<<<<<<<<<<<<<
+ *         return "\t".join(map(str, (self.qname,
+ *                                    self.flag,
+ */
+  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__68);
+  __Pyx_GIVEREF(__pyx_tuple__68);
+
+  /* "pysam/csamfile.pyx":2156
+ * 
+ *         if not type(pytag) is bytes:
+ *             pytag = pytag.encode('ascii')             # <<<<<<<<<<<<<<
+ *         t = type(value)
+ * 
+ */
+  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__69);
+  __Pyx_GIVEREF(__pyx_tuple__69);
+
+  /* "pysam/csamfile.pyx":2183
+ * 
+ *             datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *             args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                           pytype.encode('ascii'),
+ *                           datatype.encode('ascii'),
+ */
+  __pyx_slice__70 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__70);
+  __Pyx_GIVEREF(__pyx_slice__70);
+
+  /* "pysam/csamfile.pyx":2184
+ *             datafmt = "2sccI%i%s" % (len(value), datafmt)
+ *             args.extend( [pytag[:2],
+ *                           pytype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                           datatype.encode('ascii'),
+ *                           len(value)] + list(value) )
+ */
+  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__71);
+  __Pyx_GIVEREF(__pyx_tuple__71);
+
+  /* "pysam/csamfile.pyx":2185
+ *             args.extend( [pytag[:2],
+ *                           pytype.encode('ascii'),
+ *                           datatype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                           len(value)] + list(value) )
+ *             fmts.append( datafmt )
+ */
+  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__72);
+  __Pyx_GIVEREF(__pyx_tuple__72);
+
+  /* "pysam/csamfile.pyx":2208
+ *             # Note: hex strings (H) are not supported yet
+ *             if t is not bytes:
+ *                 value = value.encode('ascii')             # <<<<<<<<<<<<<<
+ *             if len(value) == 1:
+ *                 fmt, pytype = "2scc", 'A'
+ */
+  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__73);
+  __Pyx_GIVEREF(__pyx_tuple__73);
+
+  /* "pysam/csamfile.pyx":2214
+ *                 fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+ * 
+ *         args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
+ *                       pytype.encode('ascii'),
+ *                       value ] )
+ */
+  __pyx_slice__74 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__74);
+  __Pyx_GIVEREF(__pyx_slice__74);
+
+  /* "pysam/csamfile.pyx":2215
+ * 
+ *         args.extend( [pytag[:2],
+ *                       pytype.encode('ascii'),             # <<<<<<<<<<<<<<
+ *                       value ] )
+ * 
+ */
+  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__75);
+  __Pyx_GIVEREF(__pyx_tuple__75);
+
+  /* "pysam/csamfile.pyx":2731
+ *         type_code = get_type_code(value, value_type)
+ *         if type_code == 0:
+ *             raise ValueError("can't guess type or invalid type code specified")             # <<<<<<<<<<<<<<
+ * 
+ *         # Not Endian-safe, but then again neither is samtools!
+ */
+  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_can_t_guess_type_or_invalid_type); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__77);
+  __Pyx_GIVEREF(__pyx_tuple__77);
+
+  /* "pysam/csamfile.pyx":2751
+ *             value_size   = sizeof(float)
+ *         else:
+ *             raise ValueError('Unsupported value_type in set_option')             # <<<<<<<<<<<<<<
+ * 
+ *         tag = _forceBytes( tag )
+ */
+  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_value_type_in_set_op); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__78);
+  __Pyx_GIVEREF(__pyx_tuple__78);
+
+  /* "pysam/csamfile.pyx":3253
+ *     '''
+ *     def __init__(self):
+ *         raise TypeError("This class cannot be instantiated from Python")             # <<<<<<<<<<<<<<
+ * 
+ *     def __str__(self):
+ */
+  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_This_class_cannot_be_instantiate); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__81);
+  __Pyx_GIVEREF(__pyx_tuple__81);
+
+  /* "pysam/csamfile.pyx":3279
+ * 
+ *             if self.plp == NULL or self.plp[0] == NULL:
+ *                 raise ValueError("PileupProxy accessed after iterator finished")             # <<<<<<<<<<<<<<
+ * 
+ *             # warning: there could be problems if self.n and self.buf are
+ */
+  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_PileupProxy_accessed_after_itera); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__82);
+  __Pyx_GIVEREF(__pyx_tuple__82);
+
+  /* "pysam/csamfile.pyx":3292
+ * 
+ *     def __init__(self):
+ *         raise TypeError("This class cannot be instantiated from Python")             # <<<<<<<<<<<<<<
+ * 
+ *     def __str__(self):
+ */
+  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_This_class_cannot_be_instantiate); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__83);
+  __Pyx_GIVEREF(__pyx_tuple__83);
+
+  /* "pysam/csamfile.pyx":108
+ * else:
+ *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+ * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )             # <<<<<<<<<<<<<<
+ * 
+ * #####################################################################
+ */
+  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_d_MIDNSHP_X); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__84);
+  __Pyx_GIVEREF(__pyx_tuple__84);
+
+  /* "pysam/csamfile.pyx":210
+ *         list of reads (:class:`pysam.PileupRead`) aligned to this column
+ *     '''
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" + "\n".join( map(str, self.pileups) )
+ */
+  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__85);
+  __Pyx_GIVEREF(__pyx_tuple__85);
+  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_str, 210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":223
+ * 
+ * # order of records within sam headers
+ * VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO")             # <<<<<<<<<<<<<<
+ * 
+ * # type conversions within sam header records
+ */
+  __pyx_tuple__87 = PyTuple_Pack(5, __pyx_n_s_HD, __pyx_n_s_SQ, __pyx_n_s_RG, __pyx_n_s_PG, __pyx_n_s_CO); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__87);
+  __Pyx_GIVEREF(__pyx_tuple__87);
+
+  /* "pysam/csamfile.pyx":237
+ * 
+ * # output order of fields within records
+ * VALID_HEADER_ORDER = {"HD" : ("VN", "SO", "GO"),             # <<<<<<<<<<<<<<
+ *                       "SQ" : ("SN", "LN", "AS", "M5",
+ *                                "UR", "SP"),
+ */
+  __pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_VN, __pyx_n_s_SO, __pyx_n_s_GO); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__88);
+  __Pyx_GIVEREF(__pyx_tuple__88);
+
+  /* "pysam/csamfile.pyx":238
+ * # output order of fields within records
+ * VALID_HEADER_ORDER = {"HD" : ("VN", "SO", "GO"),
+ *                       "SQ" : ("SN", "LN", "AS", "M5",             # <<<<<<<<<<<<<<
+ *                                "UR", "SP"),
+ *                       "RG" : ("ID", "SM", "LB", "DS",
+ */
+  __pyx_tuple__89 = PyTuple_Pack(6, __pyx_n_s_SN, __pyx_n_s_LN, __pyx_n_s_AS, __pyx_n_s_M5, __pyx_n_s_UR, __pyx_n_s_SP); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__89);
+  __Pyx_GIVEREF(__pyx_tuple__89);
+
+  /* "pysam/csamfile.pyx":240
+ *                       "SQ" : ("SN", "LN", "AS", "M5",
+ *                                "UR", "SP"),
+ *                       "RG" : ("ID", "SM", "LB", "DS",             # <<<<<<<<<<<<<<
+ *                               "PU", "PI", "CN", "DT",
+ *                               "PL", "FO", "KS", "PG"),
+ */
+  __pyx_tuple__90 = PyTuple_Pack(12, __pyx_n_s_ID, __pyx_n_s_SM, __pyx_n_s_LB, __pyx_n_s_DS, __pyx_n_s_PU, __pyx_n_s_PI, __pyx_n_s_CN, __pyx_n_s_DT, __pyx_n_s_PL, __pyx_n_s_FO, __pyx_n_s_KS, __pyx_n_s_PG); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__90);
+  __Pyx_GIVEREF(__pyx_tuple__90);
+
+  /* "pysam/csamfile.pyx":243
+ *                               "PU", "PI", "CN", "DT",
+ *                               "PL", "FO", "KS", "PG"),
+ *                       "PG" : ("PN", "ID", "VN", "CL",             # <<<<<<<<<<<<<<
+ *                               "PP"),}
+ * 
+ */
+  __pyx_tuple__91 = PyTuple_Pack(5, __pyx_n_s_PN, __pyx_n_s_ID, __pyx_n_s_VN, __pyx_n_s_CL, __pyx_n_s_PP); if (unlikely(!__pyx_tuple__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__91);
+  __Pyx_GIVEREF(__pyx_tuple__91);
+  __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_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_8000 = PyInt_FromLong(8000); if (unlikely(!__pyx_int_8000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_65535 = PyInt_FromLong(65535L); if (unlikely(!__pyx_int_65535)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_536870912 = PyInt_FromLong(536870912L); if (unlikely(!__pyx_int_536870912)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_neg_4 = PyInt_FromLong(-4); if (unlikely(!__pyx_int_neg_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_neg_127 = PyInt_FromLong(-127); if (unlikely(!__pyx_int_neg_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_neg_32767 = PyInt_FromLong(-32767L); if (unlikely(!__pyx_int_neg_32767)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_neg_2147483648 = PyInt_FromLong(-2147483648L); if (unlikely(!__pyx_int_neg_2147483648)) {__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 initcsamfile(void); /*proto*/
+PyMODINIT_FUNC initcsamfile(void)
+#else
+PyMODINIT_FUNC PyInit_csamfile(void); /*proto*/
+PyMODINIT_FUNC PyInit_csamfile(void)
+#endif
+{
+  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;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  #if CYTHON_REFNANNY
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
+      PyErr_Clear();
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
+  }
+  #endif
+  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_csamfile(void)", 0);
+  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #ifdef __Pyx_CyFunction_USED
+  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_FusedFunction_USED
+  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_Generator_USED
+  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  /*--- Library function declarations ---*/
+  /*--- Threads initialization code ---*/
+  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+  #ifdef WITH_THREAD /* Python build with threading support? */
+  PyEval_InitThreads();
+  #endif
+  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("csamfile"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
+  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if CYTHON_COMPILING_IN_PYPY
+  Py_INCREF(__pyx_b);
+  #endif
+  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  if (__pyx_module_is_main_pysam__csamfile) {
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "pysam.csamfile")) {
+      if (unlikely(PyDict_SetItemString(modules, "pysam.csamfile", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+  /*--- Builtin init code ---*/
+  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Constants init code ---*/
+  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Global init code ---*/
+  __pyx_v_5pysam_8csamfile__FILENAME_ENCODING = ((PyObject*)Py_None); Py_INCREF(Py_None);
+  /*--- Variable export code ---*/
+  /*--- Function export code ---*/
+  /*--- Type init code ---*/
+  __pyx_vtabptr_5pysam_8csamfile_AlignedRead = &__pyx_vtable_5pysam_8csamfile_AlignedRead;
+  __pyx_vtable_5pysam_8csamfile_AlignedRead.setTag = (PyObject *(*)(struct __pyx_obj_5pysam_8csamfile_AlignedRead *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_8csamfile_11AlignedRead_setTag *__pyx_optional_args))__pyx_f_5pysam_8csamfile_11AlignedRead_setTag;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_AlignedRead.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_AlignedRead, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_11AlignedRead_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_11AlignedRead_4__str__.doc = __pyx_doc_5pysam_8csamfile_11AlignedRead_4__str__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_11AlignedRead_4__str__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_AlignedRead.tp_dict, __pyx_vtabptr_5pysam_8csamfile_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "AlignedRead", (PyObject *)&__pyx_type_5pysam_8csamfile_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_AlignedRead = &__pyx_type_5pysam_8csamfile_AlignedRead;
+  __pyx_vtabptr_5pysam_8csamfile_Samfile = &__pyx_vtable_5pysam_8csamfile_Samfile;
+  __pyx_vtable_5pysam_8csamfile_Samfile._buildHeader = (bam_hdr_t *(*)(struct __pyx_obj_5pysam_8csamfile_Samfile *, PyObject *))__pyx_f_5pysam_8csamfile_7Samfile__buildHeader;
+  __pyx_vtable_5pysam_8csamfile_Samfile.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_8csamfile_Samfile *))__pyx_f_5pysam_8csamfile_7Samfile_getCurrent;
+  __pyx_vtable_5pysam_8csamfile_Samfile.cnext = (int (*)(struct __pyx_obj_5pysam_8csamfile_Samfile *))__pyx_f_5pysam_8csamfile_7Samfile_cnext;
+  __pyx_vtable_5pysam_8csamfile_Samfile.write = (int (*)(struct __pyx_obj_5pysam_8csamfile_Samfile *, struct __pyx_obj_5pysam_8csamfile_AlignedRead *, int __pyx_skip_dispatch))__pyx_f_5pysam_8csamfile_7Samfile_write;
+  __pyx_vtable_5pysam_8csamfile_Samfile._getrname = (char *(*)(struct __pyx_obj_5pysam_8csamfile_Samfile *, int))__pyx_f_5pysam_8csamfile_7Samfile__getrname;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_Samfile.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_Samfile, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_7Samfile_46__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_7Samfile_46__next__.doc = __pyx_doc_5pysam_8csamfile_7Samfile_46__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_7Samfile_46__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_Samfile.tp_dict, __pyx_vtabptr_5pysam_8csamfile_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "Samfile", (PyObject *)&__pyx_type_5pysam_8csamfile_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_Samfile = &__pyx_type_5pysam_8csamfile_Samfile;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_PileupProxy.tp_print = 0;
+  if (__Pyx_SetAttrString(__pyx_m, "PileupProxy", (PyObject *)&__pyx_type_5pysam_8csamfile_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_PileupProxy = &__pyx_type_5pysam_8csamfile_PileupProxy;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_PileupRead.tp_print = 0;
+  if (__Pyx_SetAttrString(__pyx_m, "PileupRead", (PyObject *)&__pyx_type_5pysam_8csamfile_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_PileupRead = &__pyx_type_5pysam_8csamfile_PileupRead;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorRow.tp_print = 0;
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorRow", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorRow = &__pyx_type_5pysam_8csamfile_IteratorRow;
+  __pyx_vtabptr_5pysam_8csamfile_IteratorRowRegion = &__pyx_vtable_5pysam_8csamfile_IteratorRowRegion;
+  __pyx_vtable_5pysam_8csamfile_IteratorRowRegion.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *))__pyx_f_5pysam_8csamfile_17IteratorRowRegion_getCurrent;
+  __pyx_vtable_5pysam_8csamfile_IteratorRowRegion.cnext = (int (*)(struct __pyx_obj_5pysam_8csamfile_IteratorRowRegion *))__pyx_f_5pysam_8csamfile_17IteratorRowRegion_cnext;
+  __pyx_type_5pysam_8csamfile_IteratorRowRegion.tp_base = __pyx_ptype_5pysam_8csamfile_IteratorRow;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorRowRegion.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_17IteratorRowRegion_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_17IteratorRowRegion_4__next__.doc = __pyx_doc_5pysam_8csamfile_17IteratorRowRegion_4__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_17IteratorRowRegion_4__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_IteratorRowRegion.tp_dict, __pyx_vtabptr_5pysam_8csamfile_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowRegion", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorRowRegion = &__pyx_type_5pysam_8csamfile_IteratorRowRegion;
+  __pyx_vtabptr_5pysam_8csamfile_IteratorRowHead = &__pyx_vtable_5pysam_8csamfile_IteratorRowHead;
+  __pyx_vtable_5pysam_8csamfile_IteratorRowHead.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *))__pyx_f_5pysam_8csamfile_15IteratorRowHead_getCurrent;
+  __pyx_vtable_5pysam_8csamfile_IteratorRowHead.cnext = (int (*)(struct __pyx_obj_5pysam_8csamfile_IteratorRowHead *))__pyx_f_5pysam_8csamfile_15IteratorRowHead_cnext;
+  __pyx_type_5pysam_8csamfile_IteratorRowHead.tp_base = __pyx_ptype_5pysam_8csamfile_IteratorRow;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorRowHead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorRowHead.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowHead, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_15IteratorRowHead_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_15IteratorRowHead_4__next__.doc = __pyx_doc_5pysam_8csamfile_15IteratorRowHead_4__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_15IteratorRowHead_4__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_IteratorRowHead.tp_dict, __pyx_vtabptr_5pysam_8csamfile_IteratorRowHead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowHead", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowHead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorRowHead = &__pyx_type_5pysam_8csamfile_IteratorRowHead;
+  __pyx_vtabptr_5pysam_8csamfile_IteratorRowAll = &__pyx_vtable_5pysam_8csamfile_IteratorRowAll;
+  __pyx_vtable_5pysam_8csamfile_IteratorRowAll.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *))__pyx_f_5pysam_8csamfile_14IteratorRowAll_getCurrent;
+  __pyx_vtable_5pysam_8csamfile_IteratorRowAll.cnext = (int (*)(struct __pyx_obj_5pysam_8csamfile_IteratorRowAll *))__pyx_f_5pysam_8csamfile_14IteratorRowAll_cnext;
+  __pyx_type_5pysam_8csamfile_IteratorRowAll.tp_base = __pyx_ptype_5pysam_8csamfile_IteratorRow;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorRowAll.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowAll, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_14IteratorRowAll_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_14IteratorRowAll_4__next__.doc = __pyx_doc_5pysam_8csamfile_14IteratorRowAll_4__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_14IteratorRowAll_4__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_IteratorRowAll.tp_dict, __pyx_vtabptr_5pysam_8csamfile_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAll", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorRowAll = &__pyx_type_5pysam_8csamfile_IteratorRowAll;
+  __pyx_type_5pysam_8csamfile_IteratorRowAllRefs.tp_base = __pyx_ptype_5pysam_8csamfile_IteratorRow;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorRowAllRefs.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_18IteratorRowAllRefs_6__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_18IteratorRowAllRefs_6__next__.doc = __pyx_doc_5pysam_8csamfile_18IteratorRowAllRefs_6__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_18IteratorRowAllRefs_6__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAllRefs", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorRowAllRefs = &__pyx_type_5pysam_8csamfile_IteratorRowAllRefs;
+  __pyx_vtabptr_5pysam_8csamfile_IteratorRowSelection = &__pyx_vtable_5pysam_8csamfile_IteratorRowSelection;
+  __pyx_vtable_5pysam_8csamfile_IteratorRowSelection.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *))__pyx_f_5pysam_8csamfile_20IteratorRowSelection_getCurrent;
+  __pyx_vtable_5pysam_8csamfile_IteratorRowSelection.cnext = (int (*)(struct __pyx_obj_5pysam_8csamfile_IteratorRowSelection *))__pyx_f_5pysam_8csamfile_20IteratorRowSelection_cnext;
+  __pyx_type_5pysam_8csamfile_IteratorRowSelection.tp_base = __pyx_ptype_5pysam_8csamfile_IteratorRow;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorRowSelection.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowSelection, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_20IteratorRowSelection_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_20IteratorRowSelection_4__next__.doc = __pyx_doc_5pysam_8csamfile_20IteratorRowSelection_4__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_20IteratorRowSelection_4__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_IteratorRowSelection.tp_dict, __pyx_vtabptr_5pysam_8csamfile_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowSelection", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorRowSelection = &__pyx_type_5pysam_8csamfile_IteratorRowSelection;
+  __pyx_vtabptr_5pysam_8csamfile_IteratorColumn = &__pyx_vtable_5pysam_8csamfile_IteratorColumn;
+  __pyx_vtable_5pysam_8csamfile_IteratorColumn.cnext = (int (*)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *))__pyx_f_5pysam_8csamfile_14IteratorColumn_cnext;
+  __pyx_vtable_5pysam_8csamfile_IteratorColumn.getSequence = (char *(*)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *))__pyx_f_5pysam_8csamfile_14IteratorColumn_getSequence;
+  __pyx_vtable_5pysam_8csamfile_IteratorColumn.setMask = (PyObject *(*)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *, PyObject *))__pyx_f_5pysam_8csamfile_14IteratorColumn_setMask;
+  __pyx_vtable_5pysam_8csamfile_IteratorColumn.setupIteratorData = (PyObject *(*)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *, int, int, int, struct __pyx_opt_args_5pysam_8csamfile_14IteratorColumn_setupIteratorData *__pyx_optional_args))__pyx_f_5pysam_8csamfile_14IteratorColumn_setupIteratorData;
+  __pyx_vtable_5pysam_8csamfile_IteratorColumn.reset = (PyObject *(*)(struct __pyx_obj_5pysam_8csamfile_IteratorColumn *, PyObject *, PyObject *, PyObject *))__pyx_f_5pysam_8csamfile_14IteratorColumn_reset;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorColumn.tp_print = 0;
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_IteratorColumn.tp_dict, __pyx_vtabptr_5pysam_8csamfile_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorColumn", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorColumn = &__pyx_type_5pysam_8csamfile_IteratorColumn;
+  __pyx_vtabptr_5pysam_8csamfile_IteratorColumnRegion = &__pyx_vtable_5pysam_8csamfile_IteratorColumnRegion;
+  __pyx_vtable_5pysam_8csamfile_IteratorColumnRegion.__pyx_base = *__pyx_vtabptr_5pysam_8csamfile_IteratorColumn;
+  __pyx_type_5pysam_8csamfile_IteratorColumnRegion.tp_base = __pyx_ptype_5pysam_8csamfile_IteratorColumn;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorColumnRegion.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_IteratorColumnRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_20IteratorColumnRegion_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_20IteratorColumnRegion_2__next__.doc = __pyx_doc_5pysam_8csamfile_20IteratorColumnRegion_2__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_20IteratorColumnRegion_2__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_IteratorColumnRegion.tp_dict, __pyx_vtabptr_5pysam_8csamfile_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnRegion", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorColumnRegion = &__pyx_type_5pysam_8csamfile_IteratorColumnRegion;
+  __pyx_vtabptr_5pysam_8csamfile_IteratorColumnAllRefs = &__pyx_vtable_5pysam_8csamfile_IteratorColumnAllRefs;
+  __pyx_vtable_5pysam_8csamfile_IteratorColumnAllRefs.__pyx_base = *__pyx_vtabptr_5pysam_8csamfile_IteratorColumn;
+  __pyx_type_5pysam_8csamfile_IteratorColumnAllRefs.tp_base = __pyx_ptype_5pysam_8csamfile_IteratorColumn;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IteratorColumnAllRefs.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_8csamfile_IteratorColumnAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__.doc = __pyx_doc_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_8csamfile_21IteratorColumnAllRefs_2__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_8csamfile_IteratorColumnAllRefs.tp_dict, __pyx_vtabptr_5pysam_8csamfile_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnAllRefs", (PyObject *)&__pyx_type_5pysam_8csamfile_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IteratorColumnAllRefs = &__pyx_type_5pysam_8csamfile_IteratorColumnAllRefs;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_IndexedReads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_IndexedReads.tp_print = 0;
+  if (__Pyx_SetAttrString(__pyx_m, "IndexedReads", (PyObject *)&__pyx_type_5pysam_8csamfile_IndexedReads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_IndexedReads = &__pyx_type_5pysam_8csamfile_IndexedReads;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile_SNPCall.tp_print = 0;
+  if (__Pyx_SetAttrString(__pyx_m, "SNPCall", (PyObject *)&__pyx_type_5pysam_8csamfile_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_8csamfile_SNPCall = &__pyx_type_5pysam_8csamfile_SNPCall;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile___pyx_scope_struct__genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile___pyx_scope_struct__genexpr.tp_print = 0;
+  __pyx_ptype_5pysam_8csamfile___pyx_scope_struct__genexpr = &__pyx_type_5pysam_8csamfile___pyx_scope_struct__genexpr;
+  if (PyType_Ready(&__pyx_type_5pysam_8csamfile___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_8csamfile___pyx_scope_struct_1_genexpr.tp_print = 0;
+  __pyx_ptype_5pysam_8csamfile___pyx_scope_struct_1_genexpr = &__pyx_type_5pysam_8csamfile___pyx_scope_struct_1_genexpr;
+  /*--- Type import code ---*/
+  __pyx_ptype_5pysam_6cfaidx_Fastafile = __Pyx_ImportType("pysam.cfaidx", "Fastafile", sizeof(struct __pyx_obj_5pysam_6cfaidx_Fastafile), 1); if (unlikely(!__pyx_ptype_5pysam_6cfaidx_Fastafile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6cfaidx_Fastafile = (struct __pyx_vtabstruct_5pysam_6cfaidx_Fastafile*)__Pyx_GetVtable(__pyx_ptype_5pysam_6cfaidx_Fastafile->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6cfaidx_Fastafile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6cfaidx_FastqProxy = __Pyx_ImportType("pysam.cfaidx", "FastqProxy", sizeof(struct __pyx_obj_5pysam_6cfaidx_FastqProxy), 1); if (unlikely(!__pyx_ptype_5pysam_6cfaidx_FastqProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6cfaidx_Fastqfile = __Pyx_ImportType("pysam.cfaidx", "Fastqfile", sizeof(struct __pyx_obj_5pysam_6cfaidx_Fastqfile), 1); if (unlikely(!__pyx_ptype_5pysam_6cfaidx_Fastqfile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6cfaidx_Fastqfile = (struct __pyx_vtabstruct_5pysam_6cfaidx_Fastqfile*)__Pyx_GetVtable(__pyx_ptype_5pysam_6cfaidx_Fastqfile->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6cfaidx_Fastqfile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
+  #if CYTHON_COMPILING_IN_PYPY
+  sizeof(PyTypeObject),
+  #else
+  sizeof(PyHeapTypeObject),
+  #endif
+  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[3]; __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[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Variable import code ---*/
+  /*--- Function import code ---*/
+  /*--- Execution code ---*/
+
+  /* "pysam/csamfile.pyx":4
+ * # cython: profile=True
+ * # adds doc-strings for sphinx
+ * import tempfile             # <<<<<<<<<<<<<<
+ * import os
+ * import sys
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_tempfile, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tempfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":5
+ * # adds doc-strings for sphinx
+ * import tempfile
+ * import os             # <<<<<<<<<<<<<<
+ * import sys
+ * import types
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":6
+ * import tempfile
+ * import os
+ * import sys             # <<<<<<<<<<<<<<
+ * import types
+ * import itertools
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":7
+ * import os
+ * import sys
+ * import types             # <<<<<<<<<<<<<<
+ * import itertools
+ * import struct
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_types, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":8
+ * import sys
+ * import types
+ * import itertools             # <<<<<<<<<<<<<<
+ * import struct
+ * import ctypes
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":9
+ * import types
+ * import itertools
+ * import struct             # <<<<<<<<<<<<<<
+ * import ctypes
+ * import collections
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":10
+ * import itertools
+ * import struct
+ * import ctypes             # <<<<<<<<<<<<<<
+ * import collections
+ * import re
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":11
+ * import struct
+ * import ctypes
+ * import collections             # <<<<<<<<<<<<<<
+ * import re
+ * import platform
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":12
+ * import ctypes
+ * import collections
+ * import re             # <<<<<<<<<<<<<<
+ * import platform
+ * import warnings
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":13
+ * import collections
+ * import re
+ * import platform             # <<<<<<<<<<<<<<
+ * import warnings
+ * from cpython cimport PyErr_SetString, \
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_platform, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_platform, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":14
+ * import re
+ * import platform
+ * import warnings             # <<<<<<<<<<<<<<
+ * from cpython cimport PyErr_SetString, \
+ *     PyBytes_Check, \
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":27
+ * ## Python 3 compatibility functions
+ * ########################################################################
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3             # <<<<<<<<<<<<<<
+ * cdef from_string_and_size(char* s, size_t length):
+ *     if PY_MAJOR_VERSION < 3:
+ */
+  __pyx_t_1 = __Pyx_PyBool_FromLong((PY_MAJOR_VERSION >= 3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IS_PYTHON3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":36
+ * # filename encoding (copied from lxml.etree.pyx)
+ * cdef str _FILENAME_ENCODING
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()             # <<<<<<<<<<<<<<
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XGOTREF(__pyx_v_5pysam_8csamfile__FILENAME_ENCODING);
+  __Pyx_DECREF_SET(__pyx_v_5pysam_8csamfile__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":37
+ * cdef str _FILENAME_ENCODING
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()
+ * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:
+ */
+  __pyx_t_3 = (__pyx_v_5pysam_8csamfile__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/csamfile.pyx":38
+ * _FILENAME_ENCODING = sys.getfilesystemencoding()
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()             # <<<<<<<<<<<<<<
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = 'ascii'
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getdefaultencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XGOTREF(__pyx_v_5pysam_8csamfile__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_8csamfile__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "pysam/csamfile.pyx":39
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
+ *     _FILENAME_ENCODING = 'ascii'
+ * 
+ */
+  __pyx_t_4 = (__pyx_v_5pysam_8csamfile__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_3 = (__pyx_t_4 != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":40
+ *     _FILENAME_ENCODING = sys.getdefaultencoding()
+ * if _FILENAME_ENCODING is None:
+ *     _FILENAME_ENCODING = 'ascii'             # <<<<<<<<<<<<<<
+ * 
+ * #cdef char* _C_FILENAME_ENCODING
+ */
+    __Pyx_INCREF(__pyx_n_s_ascii);
+    __Pyx_XGOTREF(__pyx_v_5pysam_8csamfile__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_8csamfile__FILENAME_ENCODING, __pyx_n_s_ascii);
+    __Pyx_GIVEREF(__pyx_n_s_ascii);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/csamfile.pyx":103
+ * DEF SEEK_END = 2
+ * 
+ * cdef char* CODE2CIGAR= "MIDNSHP=X"             # <<<<<<<<<<<<<<
+ * if IS_PYTHON3:
+ *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
+ */
+  __pyx_v_5pysam_8csamfile_CODE2CIGAR = __pyx_k_MIDNSHP_X;
+
+  /* "pysam/csamfile.pyx":104
+ * 
+ * cdef char* CODE2CIGAR= "MIDNSHP=X"
+ * if IS_PYTHON3:             # <<<<<<<<<<<<<<
+ *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
+ * else:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_IS_PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __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 = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_3) {
+
+    /* "pysam/csamfile.pyx":105
+ * cdef char* CODE2CIGAR= "MIDNSHP=X"
+ * if IS_PYTHON3:
+ *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
+ * else:
+ *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+ */
+    __pyx_t_1 = __pyx_pf_5pysam_8csamfile_genexpr(NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (PyDict_SetItem(__pyx_d, __pyx_n_s_CIGAR2CODE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L4;
+  }
+  /*else*/ {
+
+    /* "pysam/csamfile.pyx":107
+ *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
+ * else:
+ *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
+ * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
+ * 
+ */
+    __pyx_t_1 = __pyx_pf_5pysam_8csamfile_3genexpr(NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __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 = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (PyDict_SetItem(__pyx_d, __pyx_n_s_CIGAR2CODE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __pyx_L4:;
+
+  /* "pysam/csamfile.pyx":108
+ * else:
+ *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+ * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )             # <<<<<<<<<<<<<<
+ * 
+ * #####################################################################
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CIGAR_REGEX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":112
+ * #####################################################################
+ * # hard-coded constants
+ * cdef int max_pos = 2 << 29             # <<<<<<<<<<<<<<
+ * 
+ * #####################################################################
+ */
+  __pyx_v_5pysam_8csamfile_max_pos = 1073741824;
+
+  /* "pysam/csamfile.pyx":197
+ * 
+ * 
+ * class PileupColumn(object):             # <<<<<<<<<<<<<<
+ *     '''A pileup column. A pileup column contains
+ *     all the reads that map to a certain target base.
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_builtin_object);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
+  __Pyx_GIVEREF(__pyx_builtin_object);
+  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); 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_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PileupColumn, __pyx_n_s_PileupColumn, (PyObject *) NULL, __pyx_n_s_pysam_csamfile, __pyx_kp_s_A_pileup_column_A_pileup_column); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+
+  /* "pysam/csamfile.pyx":210
+ *         list of reads (:class:`pysam.PileupRead`) aligned to this column
+ *     '''
+ *     def __str__(self):             # <<<<<<<<<<<<<<
+ *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+ *             "\n" + "\n".join( map(str, self.pileups) )
+ */
+  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_8csamfile_12PileupColumn_1__str__, 0, __pyx_n_s_PileupColumn___str, NULL, __pyx_n_s_pysam_csamfile, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_str, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "pysam/csamfile.pyx":197
+ * 
+ * 
+ * class PileupColumn(object):             # <<<<<<<<<<<<<<
+ *     '''A pileup column. A pileup column contains
+ *     all the reads that map to a certain target base.
+ */
+  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PileupColumn, __pyx_t_1, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PileupColumn, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":216
+ * 
+ * # valid types for sam headers
+ * VALID_HEADER_TYPES = {"HD" : dict,             # <<<<<<<<<<<<<<
+ *                       "SQ" : list,
+ *                       "RG" : list,
+ */
+  __pyx_t_1 = PyDict_New(); 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);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_HD, ((PyObject *)((PyObject*)(&PyDict_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":217
+ * # valid types for sam headers
+ * VALID_HEADER_TYPES = {"HD" : dict,
+ *                       "SQ" : list,             # <<<<<<<<<<<<<<
+ *                       "RG" : list,
+ *                       "PG" : list,
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_SQ, ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":218
+ * VALID_HEADER_TYPES = {"HD" : dict,
+ *                       "SQ" : list,
+ *                       "RG" : list,             # <<<<<<<<<<<<<<
+ *                       "PG" : list,
+ *                       "CO" : list}
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RG, ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":219
+ *                       "SQ" : list,
+ *                       "RG" : list,
+ *                       "PG" : list,             # <<<<<<<<<<<<<<
+ *                       "CO" : list}
+ * 
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_PG, ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":220
+ *                       "RG" : list,
+ *                       "PG" : list,
+ *                       "CO" : list}             # <<<<<<<<<<<<<<
+ * 
+ * # order of records within sam headers
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_CO, ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VALID_HEADER_TYPES, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":223
+ * 
+ * # order of records within sam headers
+ * VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO")             # <<<<<<<<<<<<<<
+ * 
+ * # type conversions within sam header records
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VALID_HEADERS, __pyx_tuple__87) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":226
+ * 
+ * # type conversions within sam header records
+ * VALID_HEADER_FIELDS = {"HD" : {"VN" : str, "SO" : str, "GO" : str},             # <<<<<<<<<<<<<<
+ *                        "SQ" : {"SN" : str, "LN" : int, "AS" : str,
+ *                                "M5" : str, "SP" : str, "UR" : str,},
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_VN, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_SO, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_GO, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_HD, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":227
+ * # type conversions within sam header records
+ * VALID_HEADER_FIELDS = {"HD" : {"VN" : str, "SO" : str, "GO" : str},
+ *                        "SQ" : {"SN" : str, "LN" : int, "AS" : str,             # <<<<<<<<<<<<<<
+ *                                "M5" : str, "SP" : str, "UR" : str,},
+ *                        "RG" : {"ID" : str, "CN" : str, "DS" : str,
+ */
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_SN, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_LN, ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_AS, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":228
+ * VALID_HEADER_FIELDS = {"HD" : {"VN" : str, "SO" : str, "GO" : str},
+ *                        "SQ" : {"SN" : str, "LN" : int, "AS" : str,
+ *                                "M5" : str, "SP" : str, "UR" : str,},             # <<<<<<<<<<<<<<
+ *                        "RG" : {"ID" : str, "CN" : str, "DS" : str,
+ *                                "DT" : str, "FO" : str, "KS" : str,
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_M5, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_SP, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_UR, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_SQ, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":229
+ *                        "SQ" : {"SN" : str, "LN" : int, "AS" : str,
+ *                                "M5" : str, "SP" : str, "UR" : str,},
+ *                        "RG" : {"ID" : str, "CN" : str, "DS" : str,             # <<<<<<<<<<<<<<
+ *                                "DT" : str, "FO" : str, "KS" : str,
+ *                                "LB" : str, "PG" : str, "PI" : str,
+ */
+  __pyx_t_2 = PyDict_New(); 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);
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ID, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CN, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DS, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":230
+ *                                "M5" : str, "SP" : str, "UR" : str,},
+ *                        "RG" : {"ID" : str, "CN" : str, "DS" : str,
+ *                                "DT" : str, "FO" : str, "KS" : str,             # <<<<<<<<<<<<<<
+ *                                "LB" : str, "PG" : str, "PI" : str,
+ *                                "PL" : str, "PU" : str, "SM" : str,},
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DT, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_FO, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_KS, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":231
+ *                        "RG" : {"ID" : str, "CN" : str, "DS" : str,
+ *                                "DT" : str, "FO" : str, "KS" : str,
+ *                                "LB" : str, "PG" : str, "PI" : str,             # <<<<<<<<<<<<<<
+ *                                "PL" : str, "PU" : str, "SM" : str,},
+ *                        "PG" : {"ID" : str, "PN" : str, "CL" : str,
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_LB, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_PG, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_PI, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":232
+ *                                "DT" : str, "FO" : str, "KS" : str,
+ *                                "LB" : str, "PG" : str, "PI" : str,
+ *                                "PL" : str, "PU" : str, "SM" : str,},             # <<<<<<<<<<<<<<
+ *                        "PG" : {"ID" : str, "PN" : str, "CL" : str,
+ *                                "PP" : str, "DS" : str, "VN" : str,},}
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_PL, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_PU, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_SM, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RG, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pysam/csamfile.pyx":233
+ *                                "LB" : str, "PG" : str, "PI" : str,
+ *                                "PL" : str, "PU" : str, "SM" : str,},
+ *                        "PG" : {"ID" : str, "PN" : str, "CL" : str,             # <<<<<<<<<<<<<<
+ *                                "PP" : str, "DS" : str, "VN" : str,},}
+ * 
+ */
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ID, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_PN, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CL, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":234
+ *                                "PL" : str, "PU" : str, "SM" : str,},
+ *                        "PG" : {"ID" : str, "PN" : str, "CL" : str,
+ *                                "PP" : str, "DS" : str, "VN" : str,},}             # <<<<<<<<<<<<<<
+ * 
+ * # output order of fields within records
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_PP, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DS, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_VN, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_PG, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VALID_HEADER_FIELDS, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":237
+ * 
+ * # output order of fields within records
+ * VALID_HEADER_ORDER = {"HD" : ("VN", "SO", "GO"),             # <<<<<<<<<<<<<<
+ *                       "SQ" : ("SN", "LN", "AS", "M5",
+ *                                "UR", "SP"),
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_HD, __pyx_tuple__88) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":238
+ * # output order of fields within records
+ * VALID_HEADER_ORDER = {"HD" : ("VN", "SO", "GO"),
+ *                       "SQ" : ("SN", "LN", "AS", "M5",             # <<<<<<<<<<<<<<
+ *                                "UR", "SP"),
+ *                       "RG" : ("ID", "SM", "LB", "DS",
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_SQ, __pyx_tuple__89) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":240
+ *                       "SQ" : ("SN", "LN", "AS", "M5",
+ *                                "UR", "SP"),
+ *                       "RG" : ("ID", "SM", "LB", "DS",             # <<<<<<<<<<<<<<
+ *                               "PU", "PI", "CN", "DT",
+ *                               "PL", "FO", "KS", "PG"),
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RG, __pyx_tuple__90) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/csamfile.pyx":243
+ *                               "PU", "PI", "CN", "DT",
+ *                               "PL", "FO", "KS", "PG"),
+ *                       "PG" : ("PN", "ID", "VN", "CL",             # <<<<<<<<<<<<<<
+ *                               "PP"),}
+ * 
+ */
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_PG, __pyx_tuple__91) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VALID_HEADER_ORDER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1788
+ *                   int tid = 0,
+ *                   int start = 0,
+ *                   int end = max_pos,             # <<<<<<<<<<<<<<
+ *                   int truncate = False,
+ *                   **kwargs ):
+ */
+  __pyx_k__57 = __pyx_v_5pysam_8csamfile_max_pos;
+
+  /* "pysam/csamfile.pyx":3450
+ *             hts_close(self.htsfile)
+ * 
+ * __all__ = ["Samfile",             # <<<<<<<<<<<<<<
+ *            "IteratorRow",
+ *            "IteratorColumn",
+ */
+  __pyx_t_1 = PyList_New(8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_n_s_Samfile);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Samfile);
+  __Pyx_GIVEREF(__pyx_n_s_Samfile);
+  __Pyx_INCREF(__pyx_n_s_IteratorRow);
+  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_IteratorRow);
+  __Pyx_GIVEREF(__pyx_n_s_IteratorRow);
+  __Pyx_INCREF(__pyx_n_s_IteratorColumn);
+  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_IteratorColumn);
+  __Pyx_GIVEREF(__pyx_n_s_IteratorColumn);
+  __Pyx_INCREF(__pyx_n_s_AlignedRead);
+  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_AlignedRead);
+  __Pyx_GIVEREF(__pyx_n_s_AlignedRead);
+  __Pyx_INCREF(__pyx_n_s_PileupColumn);
+  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_PileupColumn);
+  __Pyx_GIVEREF(__pyx_n_s_PileupColumn);
+  __Pyx_INCREF(__pyx_n_s_PileupProxy);
+  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_PileupProxy);
+  __Pyx_GIVEREF(__pyx_n_s_PileupProxy);
+  __Pyx_INCREF(__pyx_n_s_PileupRead);
+  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_PileupRead);
+  __Pyx_GIVEREF(__pyx_n_s_PileupRead);
+  __Pyx_INCREF(__pyx_n_s_IndexedReads);
+  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_IndexedReads);
+  __Pyx_GIVEREF(__pyx_n_s_IndexedReads);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all_2, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pysam/csamfile.pyx":1
+ * # cython: embedsignature=True             # <<<<<<<<<<<<<<
+ * # cython: profile=True
+ * # adds doc-strings for sphinx
+ */
+  __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(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __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;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  if (__pyx_m) {
+    __Pyx_AddTraceback("init pysam.csamfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
+    Py_DECREF(__pyx_m); __pyx_m = 0;
+  } else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_ImportError, "init pysam.csamfile");
+  }
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  #if PY_MAJOR_VERSION < 3
+  return;
+  #else
+  return __pyx_m;
+  #endif
+}
+
+/* Runtime support code */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+    PyObject *m = NULL, *p = NULL;
+    void *r = NULL;
+    m = PyImport_ImportModule((char *)modname);
+    if (!m) goto end;
+    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+    if (!p) goto end;
+    r = PyLong_AsVoidPtr(p);
+end:
+    Py_XDECREF(p);
+    Py_XDECREF(m);
+    return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif /* CYTHON_REFNANNY */
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+    }
+    return result;
+}
+
+#if CYTHON_PROFILE
+static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
+                                   PyFrameObject** frame,
+                                   const char *funcname,
+                                   const char *srcfile,
+                                   int firstlineno) {
+    int retval;
+    PyThreadState* tstate = PyThreadState_GET();
+    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
+        if (*code == NULL) {
+            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
+            if (*code == NULL) return 0;
+        }
+        *frame = PyFrame_New(
+            tstate,                          /*PyThreadState *tstate*/
+            *code,                           /*PyCodeObject *code*/
+            __pyx_d,                  /*PyObject *globals*/
+            0                                /*PyObject *locals*/
+        );
+        if (*frame == NULL) return 0;
+        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
+            Py_INCREF(Py_None);
+            (*frame)->f_trace = Py_None;
+        }
+#if PY_VERSION_HEX < 0x030400B1
+    } else {
+        (*frame)->f_tstate = tstate;
+#endif
+    }
+    (*frame)->f_lineno = firstlineno;
+    tstate->use_tracing = 0;
+    #if CYTHON_TRACE
+    if (tstate->c_tracefunc)
+        tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL);
+    if (!tstate->c_profilefunc)
+        retval = 1;
+    else
+    #endif
+        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
+    tstate->use_tracing = (tstate->c_profilefunc ||
+                           (CYTHON_TRACE && tstate->c_tracefunc));
+    return tstate->use_tracing && retval;
+}
+static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    PyCodeObject *py_code = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_funcname = PyString_FromString(funcname);
+    py_srcfile = PyString_FromString(srcfile);
+    #else
+    py_funcname = PyUnicode_FromString(funcname);
+    py_srcfile = PyUnicode_FromString(srcfile);
+    #endif
+    if (!py_funcname | !py_srcfile) goto bad;
+    py_code = PyCode_New(
+        0,                /*int argcount,*/
+        #if PY_MAJOR_VERSION >= 3
+        0,                /*int kwonlyargcount,*/
+        #endif
+        0,                /*int nlocals,*/
+        0,                /*int stacksize,*/
+        0,                /*int flags,*/
+        __pyx_empty_bytes,     /*PyObject *code,*/
+        __pyx_empty_tuple,     /*PyObject *consts,*/
+        __pyx_empty_tuple,     /*PyObject *names,*/
+        __pyx_empty_tuple,     /*PyObject *varnames,*/
+        __pyx_empty_tuple,     /*PyObject *freevars,*/
+        __pyx_empty_tuple,     /*PyObject *cellvars,*/
+        py_srcfile,       /*PyObject *filename,*/
+        py_funcname,      /*PyObject *name,*/
+        firstlineno,      /*int firstlineno,*/
+        __pyx_empty_bytes      /*PyObject *lnotab*/
+    );
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return py_code;
+}
+#endif /* CYTHON_PROFILE */
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+#endif
+    result = (*call)(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    Py_LeaveRecursiveCall();
+#endif
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
+    Py_ssize_t length;
+    if (unlikely((start < 0) | (stop < 0))) {
+        length = strlen(cstring);
+        if (start < 0) {
+            start += length;
+            if (start < 0)
+                start = 0;
+        }
+        if (stop < 0)
+            stop += length;
+    }
+    length = stop - start;
+    if (unlikely(length <= 0))
+        return PyUnicode_FromUnicode(NULL, 0);
+    cstring += start;
+    if (decode_func) {
+        return decode_func(cstring, length, errors);
+    } else {
+        return PyUnicode_Decode(cstring, length, encoding, errors);
+    }
+}
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->curexc_type;
+    tmp_value = tstate->curexc_value;
+    tmp_tb = tstate->curexc_traceback;
+    tstate->curexc_type = type;
+    tstate->curexc_value = value;
+    tstate->curexc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_Restore(type, value, tb);
+#endif
+}
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->curexc_type;
+    *value = tstate->curexc_value;
+    *tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(type, value, tb);
+#endif
+}
+
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+                        CYTHON_UNUSED PyObject *cause) {
+    Py_XINCREF(type);
+    if (!value || value == Py_None)
+        value = NULL;
+    else
+        Py_INCREF(value);
+    if (!tb || tb == Py_None)
+        tb = NULL;
+    else {
+        Py_INCREF(tb);
+        if (!PyTraceBack_Check(tb)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: arg 3 must be a traceback or None");
+            goto raise_error;
+        }
+    }
+    #if PY_VERSION_HEX < 0x02050000
+    if (PyClass_Check(type)) {
+    #else
+    if (PyType_Check(type)) {
+    #endif
+#if CYTHON_COMPILING_IN_PYPY
+        if (!value) {
+            Py_INCREF(Py_None);
+            value = Py_None;
+        }
+#endif
+        PyErr_NormalizeException(&type, &value, &tb);
+    } else {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        value = type;
+        #if PY_VERSION_HEX < 0x02050000
+        if (PyInstance_Check(type)) {
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
+            Py_INCREF(type);
+        } else {
+            type = 0;
+            PyErr_SetString(PyExc_TypeError,
+                "raise: exception must be an old-style class or instance");
+            goto raise_error;
+        }
+        #else
+        type = (PyObject*) Py_TYPE(type);
+        Py_INCREF(type);
+        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: exception class must be a subclass of BaseException");
+            goto raise_error;
+        }
+        #endif
+    }
+    __Pyx_ErrRestore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+#else /* Python 3+ */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+    PyObject* owned_instance = NULL;
+    if (tb == Py_None) {
+        tb = 0;
+    } else if (tb && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto bad;
+    }
+    if (value == Py_None)
+        value = 0;
+    if (PyExceptionInstance_Check(type)) {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto bad;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(value);
+    } else if (PyExceptionClass_Check(type)) {
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
+        }
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
+        }
+    } else {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
+    if (cause && cause != Py_None) {
+#endif
+        PyObject *fixed_cause;
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
+            fixed_cause = PyObject_CallObject(cause, NULL);
+            if (fixed_cause == NULL)
+                goto bad;
+        } else if (PyExceptionInstance_Check(cause)) {
+            fixed_cause = cause;
+            Py_INCREF(fixed_cause);
+        } else {
+            PyErr_SetString(PyExc_TypeError,
+                            "exception causes must derive from "
+                            "BaseException");
+            goto bad;
+        }
+        PyException_SetCause(value, fixed_cause);
+    }
+    PyErr_SetObject(type, value);
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+    }
+bad:
+    Py_XDECREF(owned_instance);
+    return;
+}
+#endif
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+    if (unlikely(!type)) {
+        PyErr_SetString(PyExc_SystemError, "Missing type object");
+        return 0;
+    }
+    if (likely(PyObject_TypeCheck(obj, type)))
+        return 1;
+    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+                 Py_TYPE(obj)->tp_name, type->tp_name);
+    return 0;
+}
+
+#if !CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
+    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL)
+}
+#endif
+
+static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
+    PyObject *kwdict,
+    const char* function_name,
+    int kw_allowed)
+{
+    PyObject* key = 0;
+    Py_ssize_t pos = 0;
+#if CPYTHON_COMPILING_IN_PYPY
+    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
+        goto invalid_keyword;
+    return 1;
+#else
+    while (PyDict_Next(kwdict, &pos, &key, 0)) {
+        #if PY_MAJOR_VERSION < 3
+        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
+        #endif
+            if (unlikely(!PyUnicode_Check(key)))
+                goto invalid_keyword_type;
+    }
+    if ((!kw_allowed) && unlikely(key))
+        goto invalid_keyword;
+    return 1;
+invalid_keyword_type:
+    PyErr_Format(PyExc_TypeError,
+        "%.200s() keywords must be strings", function_name);
+    return 0;
+#endif
+invalid_keyword:
+    PyErr_Format(PyExc_TypeError,
+    #if PY_MAJOR_VERSION < 3
+        "%.200s() got an unexpected keyword argument '%.200s'",
+        function_name, PyString_AsString(key));
+    #else
+        "%s() got an unexpected keyword argument '%U'",
+        function_name, key);
+    #endif
+    return 0;
+}
+
+static void __Pyx_RaiseDoubleKeywordsError(
+    const char* func_name,
+    PyObject* kw_name)
+{
+    PyErr_Format(PyExc_TypeError,
+        #if PY_MAJOR_VERSION >= 3
+        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+        #else
+        "%s() got multiple values for keyword argument '%s'", func_name,
+        PyString_AsString(kw_name));
+        #endif
+}
+
+static int __Pyx_ParseOptionalKeywords(
+    PyObject *kwds,
+    PyObject **argnames[],
+    PyObject *kwds2,
+    PyObject *values[],
+    Py_ssize_t num_pos_args,
+    const char* function_name)
+{
+    PyObject *key = 0, *value = 0;
+    Py_ssize_t pos = 0;
+    PyObject*** name;
+    PyObject*** first_kw_arg = argnames + num_pos_args;
+    while (PyDict_Next(kwds, &pos, &key, &value)) {
+        name = first_kw_arg;
+        while (*name && (**name != key)) name++;
+        if (*name) {
+            values[name-argnames] = value;
+            continue;
+        }
+        name = first_kw_arg;
+        #if PY_MAJOR_VERSION < 3
+        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+            while (*name) {
+                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+                        && _PyString_Eq(**name, key)) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    if ((**argname == key) || (
+                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+                             && _PyString_Eq(**argname, key))) {
+                        goto arg_passed_twice;
+                    }
+                    argname++;
+                }
+            }
+        } else
+        #endif
+        if (likely(PyUnicode_Check(key))) {
+            while (*name) {
+                int cmp = (**name == key) ? 0 :
+                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+                #endif
+                    PyUnicode_Compare(**name, key);
+                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                if (cmp == 0) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    int cmp = (**argname == key) ? 0 :
+                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+                    #endif
+                        PyUnicode_Compare(**argname, key);
+                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                    if (cmp == 0) goto arg_passed_twice;
+                    argname++;
+                }
+            }
+        } else
+            goto invalid_keyword_type;
+        if (kwds2) {
+            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+        } else {
+            goto invalid_keyword;
+        }
+    }
+    return 0;
+arg_passed_twice:
+    __Pyx_RaiseDoubleKeywordsError(function_name, key);
+    goto bad;
+invalid_keyword_type:
+    PyErr_Format(PyExc_TypeError,
+        "%.200s() keywords must be strings", function_name);
+    goto bad;
+invalid_keyword:
+    PyErr_Format(PyExc_TypeError,
+    #if PY_MAJOR_VERSION < 3
+        "%.200s() got an unexpected keyword argument '%.200s'",
+        function_name, PyString_AsString(key));
+    #else
+        "%s() got an unexpected keyword argument '%U'",
+        function_name, key);
+    #endif
+bad:
+    return -1;
+}
+
+static void __Pyx_RaiseArgtupleInvalid(
+    const char* func_name,
+    int exact,
+    Py_ssize_t num_min,
+    Py_ssize_t num_max,
+    Py_ssize_t num_found)
+{
+    Py_ssize_t num_expected;
+    const char *more_or_less;
+    if (num_found < num_min) {
+        num_expected = num_min;
+        more_or_less = "at least";
+    } else {
+        num_expected = num_max;
+        more_or_less = "at most";
+    }
+    if (exact) {
+        more_or_less = "exactly";
+    }
+    PyErr_Format(PyExc_TypeError,
+                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 func_name, more_or_less, num_expected,
+                 (num_expected == 1) ? "" : "s", num_found);
+}
+
+static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
+    PyErr_Format(PyExc_TypeError,
+        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
+        name, type->tp_name, Py_TYPE(obj)->tp_name);
+}
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+    const char *name, int exact)
+{
+    if (unlikely(!type)) {
+        PyErr_SetString(PyExc_SystemError, "Missing type object");
+        return 0;
+    }
+    if (none_allowed && obj == Py_None) return 1;
+    else if (exact) {
+        if (likely(Py_TYPE(obj) == type)) return 1;
+        #if PY_MAJOR_VERSION == 2
+        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
+        #endif
+    }
+    else {
+        if (likely(PyObject_TypeCheck(obj, type))) return 1;
+    }
+    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
+    return 0;
+}
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->exc_type;
+    *value = tstate->exc_value;
+    *tb = tstate->exc_traceback;
+    Py_XINCREF(*type);
+    Py_XINCREF(*value);
+    Py_XINCREF(*tb);
+#else
+    PyErr_GetExcInfo(type, value, tb);
+#endif
+}
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = type;
+    tstate->exc_value = value;
+    tstate->exc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(type, value, tb);
+#endif
+}
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    local_type = tstate->curexc_type;
+    local_value = tstate->curexc_value;
+    local_tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (unlikely(tstate->curexc_type))
+#else
+    if (unlikely(PyErr_Occurred()))
+#endif
+        goto bad;
+    #if PY_MAJOR_VERSION >= 3
+    if (local_tb) {
+        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+            goto bad;
+    }
+    #endif
+    Py_XINCREF(local_tb);
+    Py_XINCREF(local_type);
+    Py_XINCREF(local_value);
+    *type = local_type;
+    *value = local_value;
+    *tb = local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = local_type;
+    tstate->exc_value = local_value;
+    tstate->exc_traceback = local_tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+    return 0;
+bad:
+    *type = 0;
+    *value = 0;
+    *tb = 0;
+    Py_XDECREF(local_type);
+    Py_XDECREF(local_value);
+    Py_XDECREF(local_tb);
+    return -1;
+}
+
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+    if (s1 == s2) {
+        return (equals == Py_EQ);
+    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
+        const char *ps1, *ps2;
+        Py_ssize_t length = PyBytes_GET_SIZE(s1);
+        if (length != PyBytes_GET_SIZE(s2))
+            return (equals == Py_NE);
+        ps1 = PyBytes_AS_STRING(s1);
+        ps2 = PyBytes_AS_STRING(s2);
+        if (ps1[0] != ps2[0]) {
+            return (equals == Py_NE);
+        } else if (length == 1) {
+            return (equals == Py_EQ);
+        } else {
+            int result = memcmp(ps1, ps2, (size_t)length);
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
+        return (equals == Py_NE);
+    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
+        return (equals == Py_NE);
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+#endif
+}
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+#if PY_MAJOR_VERSION < 3
+    PyObject* owned_ref = NULL;
+#endif
+    int s1_is_unicode, s2_is_unicode;
+    if (s1 == s2) {
+        goto return_eq;
+    }
+    s1_is_unicode = PyUnicode_CheckExact(s1);
+    s2_is_unicode = PyUnicode_CheckExact(s2);
+#if PY_MAJOR_VERSION < 3
+    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
+        owned_ref = PyUnicode_FromObject(s2);
+        if (unlikely(!owned_ref))
+            return -1;
+        s2 = owned_ref;
+        s2_is_unicode = 1;
+    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
+        owned_ref = PyUnicode_FromObject(s1);
+        if (unlikely(!owned_ref))
+            return -1;
+        s1 = owned_ref;
+        s1_is_unicode = 1;
+    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
+        return __Pyx_PyBytes_Equals(s1, s2, equals);
+    }
+#endif
+    if (s1_is_unicode & s2_is_unicode) {
+        Py_ssize_t length;
+        int kind;
+        void *data1, *data2;
+        #if CYTHON_PEP393_ENABLED
+        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
+            return -1;
+        #endif
+        length = __Pyx_PyUnicode_GET_LENGTH(s1);
+        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
+            goto return_ne;
+        }
+        kind = __Pyx_PyUnicode_KIND(s1);
+        if (kind != __Pyx_PyUnicode_KIND(s2)) {
+            goto return_ne;
+        }
+        data1 = __Pyx_PyUnicode_DATA(s1);
+        data2 = __Pyx_PyUnicode_DATA(s2);
+        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
+            goto return_ne;
+        } else if (length == 1) {
+            goto return_eq;
+        } else {
+            int result = memcmp(data1, data2, length * kind);
+            #if PY_MAJOR_VERSION < 3
+            Py_XDECREF(owned_ref);
+            #endif
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & s2_is_unicode) {
+        goto return_ne;
+    } else if ((s2 == Py_None) & s1_is_unicode) {
+        goto return_ne;
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+return_eq:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_EQ);
+return_ne:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_NE);
+#endif
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        PyObject *r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        PyObject *r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+            PyObject *r = PyList_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    else if (PyTuple_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return NULL;
+                }
+            }
+            return m->sq_item(o, i);
+        }
+    }
+#else
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
+    }
+#endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+    if (likely(PyList_CheckExact(L))) {
+        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+    } else {
+        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+        if (unlikely(!retval))
+            return -1;
+        Py_DECREF(retval);
+    }
+    return 0;
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (result) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
+    }
+    return result;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
+        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyMappingMethods* mp;
+#if PY_MAJOR_VERSION < 3
+    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
+    if (likely(ms && ms->sq_slice)) {
+        if (!has_cstart) {
+            if (_py_start && (*_py_start != Py_None)) {
+                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
+                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstart = 0;
+        }
+        if (!has_cstop) {
+            if (_py_stop && (*_py_stop != Py_None)) {
+                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
+                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstop = PY_SSIZE_T_MAX;
+        }
+        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
+            Py_ssize_t l = ms->sq_length(obj);
+            if (likely(l >= 0)) {
+                if (cstop < 0) {
+                    cstop += l;
+                    if (cstop < 0) cstop = 0;
+                }
+                if (cstart < 0) {
+                    cstart += l;
+                    if (cstart < 0) cstart = 0;
+                }
+            } else {
+                if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                    PyErr_Clear();
+                else
+                    goto bad;
+            }
+        }
+        return ms->sq_slice(obj, cstart, cstop);
+    }
+#endif
+    mp = Py_TYPE(obj)->tp_as_mapping;
+    if (likely(mp && mp->mp_subscript))
+#endif
+    {
+        PyObject* result;
+        PyObject *py_slice, *py_start, *py_stop;
+        if (_py_slice) {
+            py_slice = *_py_slice;
+        } else {
+            PyObject* owned_start = NULL;
+            PyObject* owned_stop = NULL;
+            if (_py_start) {
+                py_start = *_py_start;
+            } else {
+                if (has_cstart) {
+                    owned_start = py_start = PyInt_FromSsize_t(cstart);
+                    if (unlikely(!py_start)) goto bad;
+                } else
+                    py_start = Py_None;
+            }
+            if (_py_stop) {
+                py_stop = *_py_stop;
+            } else {
+                if (has_cstop) {
+                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
+                    if (unlikely(!py_stop)) {
+                        Py_XDECREF(owned_start);
+                        goto bad;
+                    }
+                } else
+                    py_stop = Py_None;
+            }
+            py_slice = PySlice_New(py_start, py_stop, Py_None);
+            Py_XDECREF(owned_start);
+            Py_XDECREF(owned_stop);
+            if (unlikely(!py_slice)) goto bad;
+        }
+#if CYTHON_COMPILING_IN_CPYTHON
+        result = mp->mp_subscript(obj, py_slice);
+#else
+        result = PyObject_GetItem(obj, py_slice);
+#endif
+        if (!_py_slice) {
+            Py_DECREF(py_slice);
+        }
+        return result;
+    }
+    PyErr_Format(PyExc_TypeError,
+        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
+bad:
+    return NULL;
+}
+
+static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
+                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
+                                  int full_traceback) {
+    PyObject *old_exc, *old_val, *old_tb;
+    PyObject *ctx;
+    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
+    if (full_traceback) {
+        Py_XINCREF(old_exc);
+        Py_XINCREF(old_val);
+        Py_XINCREF(old_tb);
+        __Pyx_ErrRestore(old_exc, old_val, old_tb);
+        PyErr_PrintEx(1);
+    }
+    #if PY_MAJOR_VERSION < 3
+    ctx = PyString_FromString(name);
+    #else
+    ctx = PyUnicode_FromString(name);
+    #endif
+    __Pyx_ErrRestore(old_exc, old_val, old_tb);
+    if (!ctx) {
+        PyErr_WriteUnraisable(Py_None);
+    } else {
+        PyErr_WriteUnraisable(ctx);
+        Py_DECREF(ctx);
+    }
+}
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+    PyErr_Format(PyExc_ValueError,
+                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+    PyErr_Format(PyExc_ValueError,
+                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+                 index, (index == 1) ? "" : "s");
+}
+
+static CYTHON_INLINE int __Pyx_IterFinish(void) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    PyObject* exc_type = tstate->curexc_type;
+    if (unlikely(exc_type)) {
+        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
+            PyObject *exc_value, *exc_tb;
+            exc_value = tstate->curexc_value;
+            exc_tb = tstate->curexc_traceback;
+            tstate->curexc_type = 0;
+            tstate->curexc_value = 0;
+            tstate->curexc_traceback = 0;
+            Py_DECREF(exc_type);
+            Py_XDECREF(exc_value);
+            Py_XDECREF(exc_tb);
+            return 0;
+        } else {
+            return -1;
+        }
+    }
+    return 0;
+#else
+    if (unlikely(PyErr_Occurred())) {
+        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+            PyErr_Clear();
+            return 0;
+        } else {
+            return -1;
+        }
+    }
+    return 0;
+#endif
+}
+
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+    if (unlikely(retval)) {
+        Py_DECREF(retval);
+        __Pyx_RaiseTooManyValuesError(expected);
+        return -1;
+    } else {
+        return __Pyx_IterFinish();
+    }
+    return 0;
+}
+
+static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
+    PyObject* value;
+#if PY_MAJOR_VERSION >= 3
+    value = PyDict_GetItemWithError(d, key);
+    if (unlikely(!value)) {
+        if (unlikely(PyErr_Occurred()))
+            return NULL;
+        value = default_value;
+    }
+    Py_INCREF(value);
+#else
+    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
+        value = PyDict_GetItem(d, key);
+        if (unlikely(!value)) {
+            value = default_value;
+        }
+        Py_INCREF(value);
+    } else {
+        if (default_value == Py_None)
+            default_value = NULL;
+        value = PyObject_CallMethodObjArgs(
+            d, __pyx_n_s_get, key, default_value, NULL);
+    }
+#endif
+    return value;
+}
+
+static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
+    long q = a / b;
+    long r = a - q*b;
+    q -= ((r != 0) & ((r ^ b) < 0));
+    return q;
+}
+
+static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
+    long r = a % b;
+    r += ((r != 0) & ((r ^ b) < 0)) * b;
+    return r;
+}
+
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
+    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
+}
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    PyObject *ob = PyCapsule_New(vtable, 0, 0);
+#else
+    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+#endif
+    if (!ob)
+        goto bad;
+    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
+        goto bad;
+    Py_DECREF(ob);
+    return 0;
+bad:
+    Py_XDECREF(ob);
+    return -1;
+}
+
+static void* __Pyx_GetVtable(PyObject *dict) {
+    void* ptr;
+    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
+    if (!ob)
+        goto bad;
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    ptr = PyCapsule_GetPointer(ob, 0);
+#else
+    ptr = PyCObject_AsVoidPtr(ob);
+#endif
+    if (!ptr && !PyErr_Occurred())
+        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
+    Py_DECREF(ob);
+    return ptr;
+bad:
+    Py_XDECREF(ob);
+    return NULL;
+}
+
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+    for (i=0; i < nbases; i++) {
+        PyTypeObject *tmptype;
+        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+        tmptype = Py_TYPE(tmp);
+#if PY_MAJOR_VERSION < 3
+        if (tmptype == &PyClass_Type)
+            continue;
+#endif
+        if (!metaclass) {
+            metaclass = tmptype;
+            continue;
+        }
+        if (PyType_IsSubtype(metaclass, tmptype))
+            continue;
+        if (PyType_IsSubtype(tmptype, metaclass)) {
+            metaclass = tmptype;
+            continue;
+        }
+        PyErr_SetString(PyExc_TypeError,
+                        "metaclass conflict: "
+                        "the metaclass of a derived class "
+                        "must be a (non-strict) subclass "
+                        "of the metaclasses of all its bases");
+        return NULL;
+    }
+    if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+        metaclass = &PyClass_Type;
+#else
+        metaclass = &PyType_Type;
+#endif
+    }
+    Py_INCREF((PyObject*) metaclass);
+    return (PyObject*) metaclass;
+}
+
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+    PyObject* fake_module;
+    PyTypeObject* cached_type = NULL;
+    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+    if (!fake_module) return NULL;
+    Py_INCREF(fake_module);
+    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+    if (cached_type) {
+        if (!PyType_Check((PyObject*)cached_type)) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s is not a type object",
+                type->tp_name);
+            goto bad;
+        }
+        if (cached_type->tp_basicsize != type->tp_basicsize) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s has the wrong size, try recompiling",
+                type->tp_name);
+            goto bad;
+        }
+    } else {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+        PyErr_Clear();
+        if (PyType_Ready(type) < 0) goto bad;
+        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+            goto bad;
+        Py_INCREF(type);
+        cached_type = type;
+    }
+done:
+    Py_DECREF(fake_module);
+    return cached_type;
+bad:
+    Py_XDECREF(cached_type);
+    cached_type = NULL;
+    goto done;
+}
+
+static PyObject *
+__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+{
+    if (unlikely(op->func_doc == NULL)) {
+        if (op->func.m_ml->ml_doc) {
+#if PY_MAJOR_VERSION >= 3
+            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
+#else
+            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
+#endif
+            if (unlikely(op->func_doc == NULL))
+                return NULL;
+        } else {
+            Py_INCREF(Py_None);
+            return Py_None;
+        }
+    }
+    Py_INCREF(op->func_doc);
+    return op->func_doc;
+}
+static int
+__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
+{
+    PyObject *tmp = op->func_doc;
+    if (value == NULL)
+        value = Py_None; /* Mark as deleted */
+    Py_INCREF(value);
+    op->func_doc = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
+{
+    if (unlikely(op->func_name == NULL)) {
+#if PY_MAJOR_VERSION >= 3
+        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+#else
+        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+#endif
+        if (unlikely(op->func_name == NULL))
+            return NULL;
+    }
+    Py_INCREF(op->func_name);
+    return op->func_name;
+}
+static int
+__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
+{
+    PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+    if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+        PyErr_SetString(PyExc_TypeError,
+                        "__name__ must be set to a string object");
+        return -1;
+    }
+    tmp = op->func_name;
+    Py_INCREF(value);
+    op->func_name = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
+{
+    Py_INCREF(op->func_qualname);
+    return op->func_qualname;
+}
+static int
+__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
+{
+    PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+    if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+        PyErr_SetString(PyExc_TypeError,
+                        "__qualname__ must be set to a string object");
+        return -1;
+    }
+    tmp = op->func_qualname;
+    Py_INCREF(value);
+    op->func_qualname = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
+{
+    PyObject *self;
+    self = m->func_closure;
+    if (self == NULL)
+        self = Py_None;
+    Py_INCREF(self);
+    return self;
+}
+static PyObject *
+__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
+{
+    if (unlikely(op->func_dict == NULL)) {
+        op->func_dict = PyDict_New();
+        if (unlikely(op->func_dict == NULL))
+            return NULL;
+    }
+    Py_INCREF(op->func_dict);
+    return op->func_dict;
+}
+static int
+__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
+{
+    PyObject *tmp;
+    if (unlikely(value == NULL)) {
+        PyErr_SetString(PyExc_TypeError,
+               "function's dictionary may not be deleted");
+        return -1;
+    }
+    if (unlikely(!PyDict_Check(value))) {
+        PyErr_SetString(PyExc_TypeError,
+               "setting function's dictionary to a non-dict");
+        return -1;
+    }
+    tmp = op->func_dict;
+    Py_INCREF(value);
+    op->func_dict = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
+{
+    Py_INCREF(op->func_globals);
+    return op->func_globals;
+}
+static PyObject *
+__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+{
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+static PyObject *
+__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
+{
+    PyObject* result = (op->func_code) ? op->func_code : Py_None;
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+    PyObject *res = op->defaults_getter((PyObject *) op);
+    if (unlikely(!res))
+        return -1;
+    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+    Py_INCREF(op->defaults_tuple);
+    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+    Py_INCREF(op->defaults_kwdict);
+    Py_DECREF(res);
+    return 0;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyTuple_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__defaults__ must be set to a tuple object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_tuple;
+    op->defaults_tuple = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_tuple;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_tuple;
+        } else {
+            result = Py_None;
+        }
+    }
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__kwdefaults__ must be set to a dict object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_kwdict;
+    op->defaults_kwdict = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_kwdict;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_kwdict;
+        } else {
+            result = Py_None;
+        }
+    }
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value || value == Py_None) {
+        value = NULL;
+    } else if (!PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__annotations__ must be set to a dict object");
+        return -1;
+    }
+    Py_XINCREF(value);
+    tmp = op->func_annotations;
+    op->func_annotations = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->func_annotations;
+    if (unlikely(!result)) {
+        result = PyDict_New();
+        if (unlikely(!result)) return NULL;
+        op->func_annotations = result;
+    }
+    Py_INCREF(result);
+    return result;
+}
+static PyGetSetDef __pyx_CyFunction_getsets[] = {
+    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
+    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
+    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
+    {0, 0, 0, 0, 0}
+};
+#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
+#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
+#endif
+static PyMemberDef __pyx_CyFunction_members[] = {
+    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
+    {0, 0, 0,  0, 0}
+};
+static PyObject *
+__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
+{
+#if PY_MAJOR_VERSION >= 3
+    return PyUnicode_FromString(m->func.m_ml->ml_name);
+#else
+    return PyString_FromString(m->func.m_ml->ml_name);
+#endif
+}
+static PyMethodDef __pyx_CyFunction_methods[] = {
+    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
+    {0, 0, 0, 0}
+};
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
+                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
+    if (op == NULL)
+        return NULL;
+    op->flags = flags;
+    op->func_weakreflist = NULL;
+    op->func.m_ml = ml;
+    op->func.m_self = (PyObject *) op;
+    Py_XINCREF(closure);
+    op->func_closure = closure;
+    Py_XINCREF(module);
+    op->func.m_module = module;
+    op->func_dict = NULL;
+    op->func_name = NULL;
+    Py_INCREF(qualname);
+    op->func_qualname = qualname;
+    op->func_doc = NULL;
+    op->func_classobj = NULL;
+    op->func_globals = globals;
+    Py_INCREF(op->func_globals);
+    Py_XINCREF(code);
+    op->func_code = code;
+    op->defaults_pyobjects = 0;
+    op->defaults = NULL;
+    op->defaults_tuple = NULL;
+    op->defaults_kwdict = NULL;
+    op->defaults_getter = NULL;
+    op->func_annotations = NULL;
+    PyObject_GC_Track(op);
+    return (PyObject *) op;
+}
+static int
+__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
+{
+    Py_CLEAR(m->func_closure);
+    Py_CLEAR(m->func.m_module);
+    Py_CLEAR(m->func_dict);
+    Py_CLEAR(m->func_name);
+    Py_CLEAR(m->func_qualname);
+    Py_CLEAR(m->func_doc);
+    Py_CLEAR(m->func_globals);
+    Py_CLEAR(m->func_code);
+    Py_CLEAR(m->func_classobj);
+    Py_CLEAR(m->defaults_tuple);
+    Py_CLEAR(m->defaults_kwdict);
+    Py_CLEAR(m->func_annotations);
+    if (m->defaults) {
+        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+        int i;
+        for (i = 0; i < m->defaults_pyobjects; i++)
+            Py_XDECREF(pydefaults[i]);
+        PyMem_Free(m->defaults);
+        m->defaults = NULL;
+    }
+    return 0;
+}
+static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+    PyObject_GC_UnTrack(m);
+    if (m->func_weakreflist != NULL)
+        PyObject_ClearWeakRefs((PyObject *) m);
+    __Pyx_CyFunction_clear(m);
+    PyObject_GC_Del(m);
+}
+static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
+{
+    Py_VISIT(m->func_closure);
+    Py_VISIT(m->func.m_module);
+    Py_VISIT(m->func_dict);
+    Py_VISIT(m->func_name);
+    Py_VISIT(m->func_qualname);
+    Py_VISIT(m->func_doc);
+    Py_VISIT(m->func_globals);
+    Py_VISIT(m->func_code);
+    Py_VISIT(m->func_classobj);
+    Py_VISIT(m->defaults_tuple);
+    Py_VISIT(m->defaults_kwdict);
+    if (m->defaults) {
+        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+        int i;
+        for (i = 0; i < m->defaults_pyobjects; i++)
+            Py_VISIT(pydefaults[i]);
+    }
+    return 0;
+}
+static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+{
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+        Py_INCREF(func);
+        return func;
+    }
+    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+        if (type == NULL)
+            type = (PyObject *)(Py_TYPE(obj));
+        return PyMethod_New(func,
+                            type, (PyObject *)(Py_TYPE(type)));
+    }
+    if (obj == Py_None)
+        obj = NULL;
+    return PyMethod_New(func, obj, type);
+}
+static PyObject*
+__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
+{
+#if PY_MAJOR_VERSION >= 3
+    return PyUnicode_FromFormat("<cyfunction %U at %p>",
+                                op->func_qualname, (void *)op);
+#else
+    return PyString_FromFormat("<cyfunction %s at %p>",
+                               PyString_AsString(op->func_qualname), (void *)op);
+#endif
+}
+#if CYTHON_COMPILING_IN_PYPY
+static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyCFunctionObject* f = (PyCFunctionObject*)func;
+    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+    PyObject *self = PyCFunction_GET_SELF(func);
+    Py_ssize_t size;
+    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
+    case METH_VARARGS:
+        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
+            return (*meth)(self, arg);
+        break;
+    case METH_VARARGS | METH_KEYWORDS:
+        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
+    case METH_NOARGS:
+        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
+            size = PyTuple_GET_SIZE(arg);
+            if (size == 0)
+                return (*meth)(self, NULL);
+            PyErr_Format(PyExc_TypeError,
+                "%.200s() takes no arguments (%zd given)",
+                f->m_ml->ml_name, size);
+            return NULL;
+        }
+        break;
+    case METH_O:
+        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
+            size = PyTuple_GET_SIZE(arg);
+            if (size == 1)
+                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
+            PyErr_Format(PyExc_TypeError,
+                "%.200s() takes exactly one argument (%zd given)",
+                f->m_ml->ml_name, size);
+            return NULL;
+        }
+        break;
+    default:
+        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
+                        "longer supported!");
+        return NULL;
+    }
+    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+                 f->m_ml->ml_name);
+    return NULL;
+}
+#else
+static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+	return PyCFunction_Call(func, arg, kw);
+}
+#endif
+static PyTypeObject __pyx_CyFunctionType_type = {
+    PyVarObject_HEAD_INIT(0, 0)
+    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
+    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
+    0,                                  /*tp_itemsize*/
+    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
+    0,                                  /*tp_print*/
+    0,                                  /*tp_getattr*/
+    0,                                  /*tp_setattr*/
+#if PY_MAJOR_VERSION < 3
+    0,                                  /*tp_compare*/
+#else
+    0,                                  /*reserved*/
+#endif
+    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
+    0,                                  /*tp_as_number*/
+    0,                                  /*tp_as_sequence*/
+    0,                                  /*tp_as_mapping*/
+    0,                                  /*tp_hash*/
+    __Pyx_CyFunction_Call,              /*tp_call*/
+    0,                                  /*tp_str*/
+    0,                                  /*tp_getattro*/
+    0,                                  /*tp_setattro*/
+    0,                                  /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
+    0,                                  /*tp_doc*/
+    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
+    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
+    0,                                  /*tp_richcompare*/
+    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
+    0,                                  /*tp_iter*/
+    0,                                  /*tp_iternext*/
+    __pyx_CyFunction_methods,           /*tp_methods*/
+    __pyx_CyFunction_members,           /*tp_members*/
+    __pyx_CyFunction_getsets,           /*tp_getset*/
+    0,                                  /*tp_base*/
+    0,                                  /*tp_dict*/
+    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
+    0,                                  /*tp_descr_set*/
+    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
+    0,                                  /*tp_init*/
+    0,                                  /*tp_alloc*/
+    0,                                  /*tp_new*/
+    0,                                  /*tp_free*/
+    0,                                  /*tp_is_gc*/
+    0,                                  /*tp_bases*/
+    0,                                  /*tp_mro*/
+    0,                                  /*tp_cache*/
+    0,                                  /*tp_subclasses*/
+    0,                                  /*tp_weaklist*/
+    0,                                  /*tp_del*/
+#if PY_VERSION_HEX >= 0x02060000
+    0,                                  /*tp_version_tag*/
+#endif
+#if PY_VERSION_HEX >= 0x030400a1
+    0,                                  /*tp_finalize*/
+#endif
+};
+static int __Pyx_CyFunction_init(void) {
+#if !CYTHON_COMPILING_IN_PYPY
+    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
+#endif
+    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+    if (__pyx_CyFunctionType == NULL) {
+        return -1;
+    }
+    return 0;
+}
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults = PyMem_Malloc(size);
+    if (!m->defaults)
+        return PyErr_NoMemory();
+    memset(m->defaults, 0, size);
+    m->defaults_pyobjects = pyobjects;
+    return m->defaults;
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults_tuple = tuple;
+    Py_INCREF(tuple);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults_kwdict = dict;
+    Py_INCREF(dict);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->func_annotations = dict;
+    Py_INCREF(dict);
+}
+
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+    PyObject *ns;
+    if (metaclass) {
+        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+        if (prep) {
+            PyObject *pargs = PyTuple_Pack(2, name, bases);
+            if (unlikely(!pargs)) {
+                Py_DECREF(prep);
+                return NULL;
+            }
+            ns = PyObject_Call(prep, pargs, mkw);
+            Py_DECREF(prep);
+            Py_DECREF(pargs);
+        } else {
+            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+                return NULL;
+            PyErr_Clear();
+            ns = PyDict_New();
+        }
+    } else {
+        ns = PyDict_New();
+    }
+    if (unlikely(!ns))
+        return NULL;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+    return ns;
+bad:
+    Py_DECREF(ns);
+    return NULL;
+}
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+                                      PyObject *dict, PyObject *mkw,
+                                      int calculate_metaclass, int allow_py2_metaclass) {
+    PyObject *result, *margs;
+    PyObject *owned_metaclass = NULL;
+    if (allow_py2_metaclass) {
+        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+        if (owned_metaclass) {
+            metaclass = owned_metaclass;
+        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+            PyErr_Clear();
+        } else {
+            return NULL;
+        }
+    }
+    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+        Py_XDECREF(owned_metaclass);
+        if (unlikely(!metaclass))
+            return NULL;
+        owned_metaclass = metaclass;
+    }
+    margs = PyTuple_Pack(3, name, bases, dict);
+    if (unlikely(!margs)) {
+        result = NULL;
+    } else {
+        result = PyObject_Call(metaclass, margs, mkw);
+        Py_DECREF(margs);
+    }
+    Py_XDECREF(owned_metaclass);
+    return result;
+}
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+    if (!py_import)
+        goto bad;
+    #endif
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    #if PY_VERSION_HEX >= 0x02050000
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                #if PY_VERSION_HEX < 0x03030000
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
+            }
+            level = 0; /* try absolute import on failure */
+        }
+        #endif
+        if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
+        }
+    }
+    #else
+    if (level>0) {
+        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
+        goto bad;
+    }
+    module = PyObject_CallFunctionObjArgs(py_import,
+        name, global_dict, empty_dict, list, NULL);
+    #endif
+bad:
+    #if PY_VERSION_HEX < 0x03030000
+    Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
+    Py_XDECREF(empty_dict);
+    return module;
+}
+
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
+    {                                                                     \
+        func_type value = func(x);                                        \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                PyErr_SetString(PyExc_OverflowError,                      \
+                    (is_unsigned && unlikely(value < zero)) ?             \
+                    "can't convert negative value to " #target_type :     \
+                    "value too large to convert to " #target_type);       \
+                return (target_type) -1;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
+    }
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
+    const uint64_t neg_one = (uint64_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(uint64_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint64_t");
+                return (uint64_t) -1;
+            }
+            return (uint64_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint64_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (uint64_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint64_t");
+                return (uint64_t) -1;
+            }
+            if (sizeof(uint64_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(uint64_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint64_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(uint64_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(uint64_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(uint64_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(uint64_t, long, PyLong_AsLong)
+            } else if (sizeof(uint64_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(uint64_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            uint64_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (uint64_t) -1;
+        }
+    } else {
+        uint64_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (uint64_t) -1;
+        val = __Pyx_PyInt_As_uint64_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            return (int) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int) -1;
+        }
+    } else {
+        int val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
+    const uint32_t neg_one = (uint32_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(uint32_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint32_t");
+                return (uint32_t) -1;
+            }
+            return (uint32_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint32_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (uint32_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint32_t");
+                return (uint32_t) -1;
+            }
+            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(uint32_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint32_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(uint32_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(uint32_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(uint32_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(uint32_t, long, PyLong_AsLong)
+            } else if (sizeof(uint32_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(uint32_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            uint32_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (uint32_t) -1;
+        }
+    } else {
+        uint32_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (uint32_t) -1;
+        val = __Pyx_PyInt_As_uint32_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(int) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int8_t(int8_t value) {
+    const int8_t neg_one = (int8_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int8_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int8_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int8_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(int8_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int8_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int8_t),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint8_t(uint8_t value) {
+    const uint8_t neg_one = (uint8_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(uint8_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint8_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(uint8_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(uint8_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint8_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(uint8_t),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value) {
+    const int16_t neg_one = (int16_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int16_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int16_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int16_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(int16_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int16_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int16_t),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value) {
+    const uint16_t neg_one = (uint16_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(uint16_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint16_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(uint16_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(uint16_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint16_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
+    const int32_t neg_one = (int32_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int32_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int32_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(int32_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int32_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
+    const uint32_t neg_one = (uint32_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(uint32_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(uint32_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(uint32_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint32_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
+    const size_t neg_one = (size_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(size_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to size_t");
+                return (size_t) -1;
+            }
+            return (size_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(size_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (size_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to size_t");
+                return (size_t) -1;
+            }
+            if (sizeof(size_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(size_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(size_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(size_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(size_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong)
+            } else if (sizeof(size_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            size_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (size_t) -1;
+        }
+    } else {
+        size_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (size_t) -1;
+        val = __Pyx_PyInt_As_size_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) {
+    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to PY_LONG_LONG");
+                return (PY_LONG_LONG) -1;
+            }
+            return (PY_LONG_LONG) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(PY_LONG_LONG)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to PY_LONG_LONG");
+                return (PY_LONG_LONG) -1;
+            }
+            if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(PY_LONG_LONG)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyLong_AsLong)
+            } else if (sizeof(PY_LONG_LONG) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            PY_LONG_LONG val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (PY_LONG_LONG) -1;
+        }
+    } else {
+        PY_LONG_LONG val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (PY_LONG_LONG) -1;
+        val = __Pyx_PyInt_As_PY_LONG_LONG(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) {
+    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(PY_LONG_LONG) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
+    const int64_t neg_one = (int64_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int64_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int64_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(int64_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int64_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
+    const uint64_t neg_one = (uint64_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(uint64_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(uint64_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(uint64_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint64_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
+                                     little, !is_unsigned);
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
+    const int64_t neg_one = (int64_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(int64_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int64_t");
+                return (int64_t) -1;
+            }
+            return (int64_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int64_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int64_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int64_t");
+                return (int64_t) -1;
+            }
+            if (sizeof(int64_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int64_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int64_t, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int64_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int64_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int64_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(int64_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int64_t, long, PyLong_AsLong)
+            } else if (sizeof(int64_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int64_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int64_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int64_t) -1;
+        }
+    } else {
+        int64_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (int64_t) -1;
+        val = __Pyx_PyInt_As_int64_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
+    const char neg_one = (char) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(char) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(char) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(char) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(char) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(char) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(char),
+                                     little, !is_unsigned);
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *x) {
+    const uint8_t neg_one = (uint8_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(uint8_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(uint8_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint8_t");
+                return (uint8_t) -1;
+            }
+            return (uint8_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint8_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (uint8_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint8_t");
+                return (uint8_t) -1;
+            }
+            if (sizeof(uint8_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(uint8_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint8_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(uint8_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(uint8_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(uint8_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(uint8_t, long, PyLong_AsLong)
+            } else if (sizeof(uint8_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(uint8_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            uint8_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (uint8_t) -1;
+        }
+    } else {
+        uint8_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (uint8_t) -1;
+        val = __Pyx_PyInt_As_uint8_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
+    const int32_t neg_one = (int32_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(int32_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int32_t");
+                return (int32_t) -1;
+            }
+            return (int32_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int32_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int32_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int32_t");
+                return (int32_t) -1;
+            }
+            if (sizeof(int32_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int32_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int32_t, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int32_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int32_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int32_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(int32_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int32_t, long, PyLong_AsLong)
+            } else if (sizeof(int32_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int32_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int32_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int32_t) -1;
+        }
+    } else {
+        int32_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (int32_t) -1;
+        val = __Pyx_PyInt_As_int32_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE uint16_t __Pyx_PyInt_As_uint16_t(PyObject *x) {
+    const uint16_t neg_one = (uint16_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(uint16_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(uint16_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint16_t");
+                return (uint16_t) -1;
+            }
+            return (uint16_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint16_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (uint16_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to uint16_t");
+                return (uint16_t) -1;
+            }
+            if (sizeof(uint16_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(uint16_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(uint16_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(uint16_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(uint16_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(uint16_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(uint16_t, long, PyLong_AsLong)
+            } else if (sizeof(uint16_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(uint16_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            uint16_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (uint16_t) -1;
+        }
+    } else {
+        uint16_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (uint16_t) -1;
+        val = __Pyx_PyInt_As_uint16_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            return (long) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (long) -1;
+        }
+    } else {
+        long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = *type;
+    tstate->exc_value = *value;
+    tstate->exc_traceback = *tb;
+#else
+    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+    PyErr_SetExcInfo(*type, *value, *tb);
+#endif
+    *type = tmp_type;
+    *value = tmp_value;
+    *tb = tmp_tb;
+}
+
+static PyObject *__Pyx_Generator_Next(PyObject *self);
+static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
+static PyObject *__Pyx_Generator_Close(PyObject *self);
+static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
+static PyTypeObject *__pyx_GeneratorType = 0;
+#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
+#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
+#if 1 || PY_VERSION_HEX < 0x030300B0
+static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
+    PyObject *et, *ev, *tb;
+    PyObject *value = NULL;
+    __Pyx_ErrFetch(&et, &ev, &tb);
+    if (!et) {
+        Py_XDECREF(tb);
+        Py_XDECREF(ev);
+        Py_INCREF(Py_None);
+        *pvalue = Py_None;
+        return 0;
+    }
+    if (unlikely(et != PyExc_StopIteration) &&
+            unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
+        __Pyx_ErrRestore(et, ev, tb);
+        return -1;
+    }
+    if (likely(et == PyExc_StopIteration)) {
+        if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
+            if (!ev) {
+                Py_INCREF(Py_None);
+                ev = Py_None;
+            }
+            Py_XDECREF(tb);
+            Py_DECREF(et);
+            *pvalue = ev;
+            return 0;
+        }
+    }
+    PyErr_NormalizeException(&et, &ev, &tb);
+    if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
+        __Pyx_ErrRestore(et, ev, tb);
+        return -1;
+    }
+    Py_XDECREF(tb);
+    Py_DECREF(et);
+#if PY_VERSION_HEX >= 0x030300A0
+    value = ((PyStopIterationObject *)ev)->value;
+    Py_INCREF(value);
+    Py_DECREF(ev);
+#else
+    {
+        PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args);
+        Py_DECREF(ev);
+        if (likely(args)) {
+            value = PyObject_GetItem(args, 0);
+            Py_DECREF(args);
+        }
+        if (unlikely(!value)) {
+            __Pyx_ErrRestore(NULL, NULL, NULL);
+            Py_INCREF(Py_None);
+            value = Py_None;
+        }
+    }
+#endif
+    *pvalue = value;
+    return 0;
+}
+#endif
+static CYTHON_INLINE
+void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
+    PyObject *exc_type = self->exc_type;
+    PyObject *exc_value = self->exc_value;
+    PyObject *exc_traceback = self->exc_traceback;
+    self->exc_type = NULL;
+    self->exc_value = NULL;
+    self->exc_traceback = NULL;
+    Py_XDECREF(exc_type);
+    Py_XDECREF(exc_value);
+    Py_XDECREF(exc_traceback);
+}
+static CYTHON_INLINE
+int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
+    if (unlikely(gen->is_running)) {
+        PyErr_SetString(PyExc_ValueError,
+                        "generator already executing");
+        return 1;
+    }
+    return 0;
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
+    PyObject *retval;
+    assert(!self->is_running);
+    if (unlikely(self->resume_label == 0)) {
+        if (unlikely(value && value != Py_None)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "can't send non-None value to a "
+                            "just-started generator");
+            return NULL;
+        }
+    }
+    if (unlikely(self->resume_label == -1)) {
+        PyErr_SetNone(PyExc_StopIteration);
+        return NULL;
+    }
+    if (value) {
+#if CYTHON_COMPILING_IN_PYPY
+#else
+        /* Generators always return to their most recent caller, not
+         * necessarily their creator. */
+        if (self->exc_traceback) {
+            PyThreadState *tstate = PyThreadState_GET();
+            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+            PyFrameObject *f = tb->tb_frame;
+            Py_XINCREF(tstate->frame);
+            assert(f->f_back == NULL);
+            f->f_back = tstate->frame;
+        }
+#endif
+        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
+                            &self->exc_traceback);
+    } else {
+        __Pyx_Generator_ExceptionClear(self);
+    }
+    self->is_running = 1;
+    retval = self->body((PyObject *) self, value);
+    self->is_running = 0;
+    if (retval) {
+        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
+                            &self->exc_traceback);
+#if CYTHON_COMPILING_IN_PYPY
+#else
+        /* Don't keep the reference to f_back any longer than necessary.  It
+         * may keep a chain of frames alive or it could create a reference
+         * cycle. */
+        if (self->exc_traceback) {
+            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+            PyFrameObject *f = tb->tb_frame;
+            Py_CLEAR(f->f_back);
+        }
+#endif
+    } else {
+        __Pyx_Generator_ExceptionClear(self);
+    }
+    return retval;
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
+    PyObject *ret;
+    PyObject *val = NULL;
+    __Pyx_Generator_Undelegate(gen);
+    __Pyx_PyGen_FetchStopIterationValue(&val);
+    ret = __Pyx_Generator_SendEx(gen, val);
+    Py_XDECREF(val);
+    return ret;
+}
+static PyObject *__Pyx_Generator_Next(PyObject *self) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
+    PyObject *yf = gen->yieldfrom;
+    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
+        return NULL;
+    if (yf) {
+        PyObject *ret;
+        gen->is_running = 1;
+        ret = Py_TYPE(yf)->tp_iternext(yf);
+        gen->is_running = 0;
+        if (likely(ret)) {
+            return ret;
+        }
+        return __Pyx_Generator_FinishDelegation(gen);
+    }
+    return __Pyx_Generator_SendEx(gen, Py_None);
+}
+static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
+    PyObject *yf = gen->yieldfrom;
+    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
+        return NULL;
+    if (yf) {
+        PyObject *ret;
+        gen->is_running = 1;
+        if (__Pyx_Generator_CheckExact(yf)) {
+            ret = __Pyx_Generator_Send(yf, value);
+        } else {
+            if (value == Py_None)
+                ret = PyIter_Next(yf);
+            else
+                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
+        }
+        gen->is_running = 0;
+        if (likely(ret)) {
+            return ret;
+        }
+        return __Pyx_Generator_FinishDelegation(gen);
+    }
+    return __Pyx_Generator_SendEx(gen, value);
+}
+static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
+    PyObject *retval = NULL;
+    int err = 0;
+    if (__Pyx_Generator_CheckExact(yf)) {
+        retval = __Pyx_Generator_Close(yf);
+        if (!retval)
+            return -1;
+    } else {
+        PyObject *meth;
+        gen->is_running = 1;
+        meth = PyObject_GetAttr(yf, __pyx_n_s_close);
+        if (unlikely(!meth)) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+                PyErr_WriteUnraisable(yf);
+            }
+            PyErr_Clear();
+        } else {
+            retval = PyObject_CallFunction(meth, NULL);
+            Py_DECREF(meth);
+            if (!retval)
+                err = -1;
+        }
+        gen->is_running = 0;
+    }
+    Py_XDECREF(retval);
+    return err;
+}
+static PyObject *__Pyx_Generator_Close(PyObject *self) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    PyObject *retval, *raised_exception;
+    PyObject *yf = gen->yieldfrom;
+    int err = 0;
+    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
+        return NULL;
+    if (yf) {
+        Py_INCREF(yf);
+        err = __Pyx_Generator_CloseIter(gen, yf);
+        __Pyx_Generator_Undelegate(gen);
+        Py_DECREF(yf);
+    }
+    if (err == 0)
+#if PY_VERSION_HEX < 0x02050000
+        PyErr_SetNone(PyExc_StopIteration);
+#else
+        PyErr_SetNone(PyExc_GeneratorExit);
+#endif
+    retval = __Pyx_Generator_SendEx(gen, NULL);
+    if (retval) {
+        Py_DECREF(retval);
+        PyErr_SetString(PyExc_RuntimeError,
+                        "generator ignored GeneratorExit");
+        return NULL;
+    }
+    raised_exception = PyErr_Occurred();
+    if (!raised_exception
+        || raised_exception == PyExc_StopIteration
+#if PY_VERSION_HEX >= 0x02050000
+        || raised_exception == PyExc_GeneratorExit
+        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
+#endif
+        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
+    {
+        if (raised_exception) PyErr_Clear();      /* ignore these errors */
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return NULL;
+}
+static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    PyObject *typ;
+    PyObject *tb = NULL;
+    PyObject *val = NULL;
+    PyObject *yf = gen->yieldfrom;
+    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
+        return NULL;
+    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
+        return NULL;
+    if (yf) {
+        PyObject *ret;
+        Py_INCREF(yf);
+#if PY_VERSION_HEX >= 0x02050000
+        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
+            int err = __Pyx_Generator_CloseIter(gen, yf);
+            Py_DECREF(yf);
+            __Pyx_Generator_Undelegate(gen);
+            if (err < 0)
+                return __Pyx_Generator_SendEx(gen, NULL);
+            goto throw_here;
+        }
+#endif
+        gen->is_running = 1;
+        if (__Pyx_Generator_CheckExact(yf)) {
+            ret = __Pyx_Generator_Throw(yf, args);
+        } else {
+            PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw);
+            if (unlikely(!meth)) {
+                Py_DECREF(yf);
+                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+                    gen->is_running = 0;
+                    return NULL;
+                }
+                PyErr_Clear();
+                __Pyx_Generator_Undelegate(gen);
+                gen->is_running = 0;
+                goto throw_here;
+            }
+            ret = PyObject_CallObject(meth, args);
+            Py_DECREF(meth);
+        }
+        gen->is_running = 0;
+        Py_DECREF(yf);
+        if (!ret) {
+            ret = __Pyx_Generator_FinishDelegation(gen);
+        }
+        return ret;
+    }
+throw_here:
+    __Pyx_Raise(typ, val, tb, NULL);
+    return __Pyx_Generator_SendEx(gen, NULL);
+}
+static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    Py_VISIT(gen->closure);
+    Py_VISIT(gen->classobj);
+    Py_VISIT(gen->yieldfrom);
+    Py_VISIT(gen->exc_type);
+    Py_VISIT(gen->exc_value);
+    Py_VISIT(gen->exc_traceback);
+    return 0;
+}
+static int __Pyx_Generator_clear(PyObject *self) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    Py_CLEAR(gen->closure);
+    Py_CLEAR(gen->classobj);
+    Py_CLEAR(gen->yieldfrom);
+    Py_CLEAR(gen->exc_type);
+    Py_CLEAR(gen->exc_value);
+    Py_CLEAR(gen->exc_traceback);
+    return 0;
+}
+static void __Pyx_Generator_dealloc(PyObject *self) {
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    PyObject_GC_UnTrack(gen);
+    if (gen->gi_weakreflist != NULL)
+        PyObject_ClearWeakRefs(self);
+    if (gen->resume_label > 0) {
+        PyObject_GC_Track(self);
+#if PY_VERSION_HEX >= 0x030400a1
+        if (PyObject_CallFinalizerFromDealloc(self))
+#else
+        Py_TYPE(gen)->tp_del(self);
+        if (self->ob_refcnt > 0)
+#endif
+            return;                     /* resurrected.  :( */
+        PyObject_GC_UnTrack(self);
+    }
+    __Pyx_Generator_clear(self);
+    PyObject_GC_Del(gen);
+}
+static void __Pyx_Generator_del(PyObject *self) {
+    PyObject *res;
+    PyObject *error_type, *error_value, *error_traceback;
+    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+    if (gen->resume_label <= 0)
+        return ;
+#if PY_VERSION_HEX < 0x030400a1
+    assert(self->ob_refcnt == 0);
+    self->ob_refcnt = 1;
+#endif
+    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
+    res = __Pyx_Generator_Close(self);
+    if (res == NULL)
+        PyErr_WriteUnraisable(self);
+    else
+        Py_DECREF(res);
+    __Pyx_ErrRestore(error_type, error_value, error_traceback);
+#if PY_VERSION_HEX < 0x030400a1
+    /* Undo the temporary resurrection; can't use DECREF here, it would
+     * cause a recursive call.
+     */
+    assert(self->ob_refcnt > 0);
+    if (--self->ob_refcnt == 0)
+        return; /* this is the normal path out */
+    /* close() resurrected it!  Make it look like the original Py_DECREF
+     * never happened.
+     */
+    {
+        Py_ssize_t refcnt = self->ob_refcnt;
+        _Py_NewReference(self);
+        self->ob_refcnt = refcnt;
+    }
+#if CYTHON_COMPILING_IN_CPYTHON
+    assert(PyType_IS_GC(self->ob_type) &&
+           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
+    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
+     * we need to undo that. */
+    _Py_DEC_REFTOTAL;
+#endif
+    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
+     * chain, so no more to do there.
+     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
+     * _Py_NewReference bumped tp_allocs:  both of those need to be
+     * undone.
+     */
+#ifdef COUNT_ALLOCS
+    --Py_TYPE(self)->tp_frees;
+    --Py_TYPE(self)->tp_allocs;
+#endif
+#endif
+}
+static PyMemberDef __pyx_Generator_memberlist[] = {
+    {(char *) "gi_running",
+#if PY_VERSION_HEX >= 0x02060000
+     T_BOOL,
+#else
+     T_BYTE,
+#endif
+     offsetof(__pyx_GeneratorObject, is_running),
+     READONLY,
+     NULL},
+    {0, 0, 0, 0, 0}
+};
+static PyMethodDef __pyx_Generator_methods[] = {
+    {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
+    {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
+    {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
+    {0, 0, 0, 0}
+};
+static PyTypeObject __pyx_GeneratorType_type = {
+    PyVarObject_HEAD_INIT(0, 0)
+    __Pyx_NAMESTR("generator"),         /*tp_name*/
+    sizeof(__pyx_GeneratorObject),      /*tp_basicsize*/
+    0,                                  /*tp_itemsize*/
+    (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/
+    0,                                  /*tp_print*/
+    0,                                  /*tp_getattr*/
+    0,                                  /*tp_setattr*/
+#if PY_MAJOR_VERSION < 3
+    0,                                  /*tp_compare*/
+#else
+    0,                                  /*reserved*/
+#endif
+    0,                                   /*tp_repr*/
+    0,                                  /*tp_as_number*/
+    0,                                  /*tp_as_sequence*/
+    0,                                  /*tp_as_mapping*/
+    0,                                  /*tp_hash*/
+    0,                                  /*tp_call*/
+    0,                                  /*tp_str*/
+    0,                                  /*tp_getattro*/
+    0,                                  /*tp_setattro*/
+    0,                                  /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/
+    0,                                  /*tp_doc*/
+    (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
+    0,                                  /*tp_clear*/
+    0,                                  /*tp_richcompare*/
+    offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
+    0,                                  /*tp_iter*/
+    (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
+    __pyx_Generator_methods,            /*tp_methods*/
+    __pyx_Generator_memberlist,         /*tp_members*/
+    0,                                  /*tp_getset*/
+    0,                                  /*tp_base*/
+    0,                                  /*tp_dict*/
+    0,                                  /*tp_descr_get*/
+    0,                                  /*tp_descr_set*/
+    0,                                  /*tp_dictoffset*/
+    0,                                  /*tp_init*/
+    0,                                  /*tp_alloc*/
+    0,                                  /*tp_new*/
+    0,                                  /*tp_free*/
+    0,                                  /*tp_is_gc*/
+    0,                                  /*tp_bases*/
+    0,                                  /*tp_mro*/
+    0,                                  /*tp_cache*/
+    0,                                  /*tp_subclasses*/
+    0,                                  /*tp_weaklist*/
+#if PY_VERSION_HEX >= 0x030400a1
+    0,                                  /*tp_del*/
+#else
+    __Pyx_Generator_del,                /*tp_del*/
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+    0,                                  /*tp_version_tag*/
+#endif
+#if PY_VERSION_HEX >= 0x030400a1
+    __Pyx_Generator_del,                /*tp_finalize*/
+#endif
+};
+static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
+                                                  PyObject *closure) {
+    __pyx_GeneratorObject *gen =
+        PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
+    if (gen == NULL)
+        return NULL;
+    gen->body = body;
+    gen->closure = closure;
+    Py_XINCREF(closure);
+    gen->is_running = 0;
+    gen->resume_label = 0;
+    gen->classobj = NULL;
+    gen->yieldfrom = NULL;
+    gen->exc_type = NULL;
+    gen->exc_value = NULL;
+    gen->exc_traceback = NULL;
+    gen->gi_weakreflist = NULL;
+    PyObject_GC_Track(gen);
+    return gen;
+}
+static int __pyx_Generator_init(void) {
+    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
+    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
+    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
+    if (__pyx_GeneratorType == NULL) {
+        return -1;
+    }
+    return 0;
+}
+
+static int __Pyx_check_binary_version(void) {
+    char ctversion[4], rtversion[4];
+    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+        char message[200];
+        PyOS_snprintf(message, sizeof(message),
+                      "compiletime version %s of module '%.100s' "
+                      "does not match runtime version %s",
+                      ctversion, __Pyx_MODULE_NAME, rtversion);
+        #if PY_VERSION_HEX < 0x02050000
+        return PyErr_Warn(NULL, message);
+        #else
+        return PyErr_WarnEx(NULL, message, 1);
+        #endif
+    }
+    return 0;
+}
+
+#ifndef __PYX_HAVE_RT_ImportModule
+#define __PYX_HAVE_RT_ImportModule
+static PyObject *__Pyx_ImportModule(const char *name) {
+    PyObject *py_name = 0;
+    PyObject *py_module = 0;
+    py_name = __Pyx_PyIdentifier_FromString(name);
+    if (!py_name)
+        goto bad;
+    py_module = PyImport_Import(py_name);
+    Py_DECREF(py_name);
+    return py_module;
+bad:
+    Py_XDECREF(py_name);
+    return 0;
+}
+#endif
+
+#ifndef __PYX_HAVE_RT_ImportType
+#define __PYX_HAVE_RT_ImportType
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
+    size_t size, int strict)
+{
+    PyObject *py_module = 0;
+    PyObject *result = 0;
+    PyObject *py_name = 0;
+    char warning[200];
+    Py_ssize_t basicsize;
+#ifdef Py_LIMITED_API
+    PyObject *py_basicsize;
+#endif
+    py_module = __Pyx_ImportModule(module_name);
+    if (!py_module)
+        goto bad;
+    py_name = __Pyx_PyIdentifier_FromString(class_name);
+    if (!py_name)
+        goto bad;
+    result = PyObject_GetAttr(py_module, py_name);
+    Py_DECREF(py_name);
+    py_name = 0;
+    Py_DECREF(py_module);
+    py_module = 0;
+    if (!result)
+        goto bad;
+    if (!PyType_Check(result)) {
+        PyErr_Format(PyExc_TypeError,
+            "%.200s.%.200s is not a type object",
+            module_name, class_name);
+        goto bad;
+    }
+#ifndef Py_LIMITED_API
+    basicsize = ((PyTypeObject *)result)->tp_basicsize;
+#else
+    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
+    if (!py_basicsize)
+        goto bad;
+    basicsize = PyLong_AsSsize_t(py_basicsize);
+    Py_DECREF(py_basicsize);
+    py_basicsize = 0;
+    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
+        goto bad;
+#endif
+    if (!strict && (size_t)basicsize > size) {
+        PyOS_snprintf(warning, sizeof(warning),
+            "%s.%s size changed, may indicate binary incompatibility",
+            module_name, class_name);
+        #if PY_VERSION_HEX < 0x02050000
+        if (PyErr_Warn(NULL, warning) < 0) goto bad;
+        #else
+        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
+        #endif
+    }
+    else if ((size_t)basicsize != size) {
+        PyErr_Format(PyExc_ValueError,
+            "%.200s.%.200s has the wrong size, try recompiling",
+            module_name, class_name);
+        goto bad;
+    }
+    return (PyTypeObject *)result;
+bad:
+    Py_XDECREF(py_module);
+    Py_XDECREF(result);
+    return NULL;
+}
+#endif
+
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+    int start = 0, mid = 0, end = count - 1;
+    if (end >= 0 && code_line > entries[end].code_line) {
+        return count;
+    }
+    while (start < end) {
+        mid = (start + end) / 2;
+        if (code_line < entries[mid].code_line) {
+            end = mid;
+        } else if (code_line > entries[mid].code_line) {
+             start = mid + 1;
+        } else {
+            return mid;
+        }
+    }
+    if (code_line <= entries[mid].code_line) {
+        return mid;
+    } else {
+        return mid + 1;
+    }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+    PyCodeObject* code_object;
+    int pos;
+    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+        return NULL;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+        return NULL;
+    }
+    code_object = __pyx_code_cache.entries[pos].code_object;
+    Py_INCREF(code_object);
+    return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+    int pos, i;
+    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+    if (unlikely(!code_line)) {
+        return;
+    }
+    if (unlikely(!entries)) {
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (likely(entries)) {
+            __pyx_code_cache.entries = entries;
+            __pyx_code_cache.max_count = 64;
+            __pyx_code_cache.count = 1;
+            entries[0].code_line = code_line;
+            entries[0].code_object = code_object;
+            Py_INCREF(code_object);
+        }
+        return;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+        PyCodeObject* tmp = entries[pos].code_object;
+        entries[pos].code_object = code_object;
+        Py_DECREF(tmp);
+        return;
+    }
+    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+        int new_max = __pyx_code_cache.max_count + 64;
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (unlikely(!entries)) {
+            return;
+        }
+        __pyx_code_cache.entries = entries;
+        __pyx_code_cache.max_count = new_max;
+    }
+    for (i=__pyx_code_cache.count; i>pos; i--) {
+        entries[i] = entries[i-1];
+    }
+    entries[pos].code_line = code_line;
+    entries[pos].code_object = code_object;
+    __pyx_code_cache.count++;
+    Py_INCREF(code_object);
+}
+
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+            const char *funcname, int c_line,
+            int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_srcfile = PyString_FromString(filename);
+    #else
+    py_srcfile = PyUnicode_FromString(filename);
+    #endif
+    if (!py_srcfile) goto bad;
+    if (c_line) {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #else
+        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #endif
+    }
+    else {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromString(funcname);
+        #else
+        py_funcname = PyUnicode_FromString(funcname);
+        #endif
+    }
+    if (!py_funcname) goto bad;
+    py_code = __Pyx_PyCode_New(
+        0,            /*int argcount,*/
+        0,            /*int kwonlyargcount,*/
+        0,            /*int nlocals,*/
+        0,            /*int stacksize,*/
+        0,            /*int flags,*/
+        __pyx_empty_bytes, /*PyObject *code,*/
+        __pyx_empty_tuple, /*PyObject *consts,*/
+        __pyx_empty_tuple, /*PyObject *names,*/
+        __pyx_empty_tuple, /*PyObject *varnames,*/
+        __pyx_empty_tuple, /*PyObject *freevars,*/
+        __pyx_empty_tuple, /*PyObject *cellvars,*/
+        py_srcfile,   /*PyObject *filename,*/
+        py_funcname,  /*PyObject *name,*/
+        py_line,      /*int firstlineno,*/
+        __pyx_empty_bytes  /*PyObject *lnotab*/
+    );
+    Py_DECREF(py_srcfile);
+    Py_DECREF(py_funcname);
+    return py_code;
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_globals = 0;
+    PyFrameObject *py_frame = 0;
+    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
+    if (!py_code) {
+        py_code = __Pyx_CreateCodeObjectForTraceback(
+            funcname, c_line, py_line, filename);
+        if (!py_code) goto bad;
+        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
+    }
+    py_globals = PyModule_GetDict(__pyx_m);
+    if (!py_globals) goto bad;
+    py_frame = PyFrame_New(
+        PyThreadState_GET(), /*PyThreadState *tstate,*/
+        py_code,             /*PyCodeObject *code,*/
+        py_globals,          /*PyObject *globals,*/
+        0                    /*PyObject *locals*/
+    );
+    if (!py_frame) goto bad;
+    py_frame->f_lineno = py_line;
+    PyTraceBack_Here(py_frame);
+bad:
+    Py_XDECREF(py_code);
+    Py_XDECREF(py_frame);
+}
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+    while (t->p) {
+        #if PY_MAJOR_VERSION < 3
+        if (t->is_unicode) {
+            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+        } else if (t->intern) {
+            *t->p = PyString_InternFromString(t->s);
+        } else {
+            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+        }
+        #else  /* Python 3+ has unicode identifiers */
+        if (t->is_unicode | t->is_str) {
+            if (t->intern) {
+                *t->p = PyUnicode_InternFromString(t->s);
+            } else if (t->encoding) {
+                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+            } else {
+                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+            }
+        } else {
+            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+        }
+        #endif
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else /* PY_VERSION_HEX < 0x03030000 */
+        if (PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_DATA_SIZE(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+#endif /* PY_VERSION_HEX < 0x03030000 */
+    } else
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+#if !CYTHON_COMPILING_IN_PYPY
+#if PY_VERSION_HEX >= 0x02060000
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+   int is_true = x == Py_True;
+   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+   else return PyObject_IsTrue(x);
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+  PyNumberMethods *m;
+  const char *name = NULL;
+  PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+  if (PyInt_Check(x) || PyLong_Check(x))
+#else
+  if (PyLong_Check(x))
+#endif
+    return Py_INCREF(x), x;
+  m = Py_TYPE(x)->tp_as_number;
+#if PY_MAJOR_VERSION < 3
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Int(x);
+  }
+  else if (m && m->nb_long) {
+    name = "long";
+    res = PyNumber_Long(x);
+  }
+#else
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Long(x);
+  }
+#endif
+  if (res) {
+#if PY_MAJOR_VERSION < 3
+    if (!PyInt_Check(res) && !PyLong_Check(res)) {
+#else
+    if (!PyLong_Check(res)) {
+#endif
+      PyErr_Format(PyExc_TypeError,
+                   "__%.4s__ returned non-%.4s (type %.200s)",
+                   name, name, Py_TYPE(res)->tp_name);
+      Py_DECREF(res);
+      return NULL;
+    }
+  }
+  else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_TypeError,
+                    "an integer is required");
+  }
+  return res;
+}
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+  Py_ssize_t ival;
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+  #if PY_VERSION_HEX < 0x02060000
+    return PyInt_AsSsize_t(b);
+  #else
+    return PyLong_AsSsize_t(b);
+  #endif
+  }
+  x = PyNumber_Index(b);
+  if (!x) return -1;
+  ival = PyInt_AsSsize_t(x);
+  Py_DECREF(x);
+  return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+#if PY_VERSION_HEX < 0x02050000
+   if (ival <= LONG_MAX)
+       return PyInt_FromLong((long)ival);
+   else {
+       unsigned char *bytes = (unsigned char *) &ival;
+       int one = 1; int little = (int)*(unsigned char*)&one;
+       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
+   }
+#else
+   return PyInt_FromSize_t(ival);
+#endif
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/pysam/csamfile.pxd b/pysam/csamfile.pxd
new file mode 100644
index 0000000..28cabd1
--- /dev/null
+++ b/pysam/csamfile.pxd
@@ -0,0 +1,200 @@
+from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
+from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
+from libc.stdlib cimport malloc, calloc, realloc, free
+from libc.string cimport memcpy, memcmp, strncpy, strlen, strdup
+from libc.stdio cimport FILE, printf
+
+from cfaidx cimport faidx_t, Fastafile
+from chtslib cimport *
+
+cdef extern from *:
+    ctypedef char* const_char_ptr "const char*"
+
+cdef extern from "htslib_util.h":
+
+    # add *nbytes* into the variable length data of *src* at *pos*
+    bam1_t * pysam_bam_update( bam1_t * b,
+                               size_t nbytes_old,
+                               size_t nbytes_new,
+                               uint8_t * pos )
+
+    # now: static
+    int aux_type2size(int)
+
+    char * pysam_bam_get_qname(bam1_t * b)
+    uint32_t * pysam_bam_get_cigar(bam1_t * b)
+    uint8_t * pysam_bam_get_seq(bam1_t * b)
+    uint8_t * pysam_bam_get_qual(bam1_t * b)
+    uint8_t * pysam_bam_get_aux(bam1_t * b)
+    int pysam_bam_get_l_aux(bam1_t * b)
+    char pysam_bam_seqi(uint8_t * s, int i)
+
+    uint16_t pysam_get_bin(bam1_t * b)
+    uint8_t pysam_get_qual(bam1_t * b)
+    uint8_t pysam_get_l_qname(bam1_t * b)
+    uint16_t pysam_get_flag(bam1_t * b)
+    uint16_t pysam_get_n_cigar(bam1_t * b)
+    void pysam_set_bin(bam1_t * b, uint16_t v)
+    void pysam_set_qual(bam1_t * b, uint8_t v)
+    void pysam_set_l_qname(bam1_t * b, uint8_t v)
+    void pysam_set_flag(bam1_t * b, uint8_t v)
+    void pysam_set_n_cigar(bam1_t * b, uint16_t v)
+    void pysam_update_flag(bam1_t * b, uint16_t v, uint16_t flag)
+
+
+cdef extern from "samfile_util.h":
+
+    int bam_cap_mapQ(bam1_t *b, char *ref, int thres)
+    int bam_prob_realn(bam1_t *b, const char *ref)
+
+
+####################################################################
+# Utility types
+
+ctypedef struct __iterdata:
+    htsFile * htsfile
+    bam_hdr_t * header
+    hts_itr_t * iter
+    faidx_t * fastafile
+    int tid
+    char * seq
+    int seq_len
+
+# Exposing pysam extension classes
+#
+# Note: need to declare all C fields and methods here
+cdef class AlignedRead:
+
+    # object that this AlignedRead represents
+    cdef bam1_t * _delegate
+
+    # add an alignment tag with value to the AlignedRead
+    # an existing tag of the same name will be replaced.
+    cpdef setTag( self, tag, value, value_type = ?, replace = ? )
+
+cdef class Samfile:
+
+    cdef object _filename
+
+    # pointer to htsFile structure
+    cdef htsFile * htsfile
+
+    # pointer to compressed file
+    cdef BGZF * fp
+
+    # pointer to index
+    cdef hts_idx_t *index
+    # header structure
+    cdef bam_hdr_t * header
+    # 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
+    cdef bam1_t * b
+    # file opening mode
+    cdef char * mode
+
+    # beginning of read section
+    cdef int64_t start_offset
+
+    cdef bam_hdr_t * _buildHeader(self, new_header)
+    cdef bam1_t * getCurrent(self)
+    cdef int cnext(self)
+
+    # write an aligned read
+    cpdef int write(self, AlignedRead read)
+
+    cdef char * _getrname(self, int tid)
+
+cdef class PileupProxy:
+    cdef bam_pileup1_t ** plp
+    cdef int tid
+    cdef int pos
+    cdef int n_pu
+
+cdef class PileupRead:
+    cdef AlignedRead _alignment
+    cdef int32_t  _qpos
+    cdef int _indel
+    cdef int _level
+    cdef uint32_t _is_del
+    cdef uint32_t _is_head
+    cdef uint32_t _is_tail
+
+cdef class IteratorRow:
+    cdef int retval
+    cdef bam1_t * b
+    cdef Samfile samfile
+    cdef htsFile * htsfile
+    cdef int owns_samfile
+
+cdef class IteratorRowRegion(IteratorRow):
+    cdef hts_itr_t * iter
+    cdef bam1_t * getCurrent( self )
+    cdef int cnext(self)
+
+cdef class IteratorRowHead(IteratorRow):
+    cdef int max_rows
+    cdef int current_row
+    cdef bam1_t * getCurrent(self)
+    cdef int cnext(self)
+
+cdef class IteratorRowAll(IteratorRow):
+    cdef bam1_t * getCurrent( self )
+    cdef int cnext(self)
+
+cdef class IteratorRowAllRefs(IteratorRow):
+    cdef int         tid
+    cdef IteratorRowRegion rowiter
+
+cdef class IteratorRowSelection(IteratorRow):
+    cdef int current_pos
+    cdef positions
+    cdef bam1_t * getCurrent( self )
+    cdef int cnext(self)
+    cdef BGZF * fp
+
+cdef class IteratorColumn:
+
+    # result of the last plbuf_push
+    cdef IteratorRowRegion iter
+    cdef int tid
+    cdef int pos
+    cdef int n_plp
+    cdef int mask
+    cdef bam_pileup1_t * plp
+    cdef bam_plp_t pileup_iter
+    cdef __iterdata iterdata
+    cdef Samfile samfile
+    cdef Fastafile fastafile
+    cdef stepper
+    cdef int max_depth
+
+    cdef int cnext(self)
+    cdef char * getSequence( self )
+    cdef setMask(self, mask)
+    cdef setupIteratorData(self,
+                           int tid,
+                           int start,
+                           int end,
+                           int reopen = ?)
+
+    cdef reset(self, tid, start, end)
+
+cdef class IteratorColumnRegion(IteratorColumn):
+    cdef int start
+    cdef int end
+    cdef int truncate
+
+cdef class IteratorColumnAllRefs(IteratorColumn):
+    pass
+
+cdef class IndexedReads:
+    cdef Samfile samfile
+    cdef htsFile * htsfile
+    cdef index
+    cdef int owns_samfile
+    cdef BGZF * fp
diff --git a/pysam/csamfile.pyx b/pysam/csamfile.pyx
new file mode 100644
index 0000000..e91f7b8
--- /dev/null
+++ b/pysam/csamfile.pyx
@@ -0,0 +1,3464 @@
+# cython: embedsignature=True
+# cython: profile=True
+# adds doc-strings for sphinx
+import tempfile
+import os
+import sys
+import types
+import itertools
+import struct
+import ctypes
+import collections
+import re
+import platform
+import warnings
+from cpython cimport PyErr_SetString, \
+    PyBytes_Check, \
+    PyUnicode_Check, \
+    PyBytes_FromStringAndSize
+
+from cpython.version cimport PY_MAJOR_VERSION
+
+########################################################################
+########################################################################
+########################################################################
+## Python 3 compatibility functions
+########################################################################
+IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+cdef from_string_and_size(char* s, size_t length):
+    if PY_MAJOR_VERSION < 3:
+        return s[:length]
+    else:
+        return s[:length].decode("ascii")
+
+# filename encoding (copied from lxml.etree.pyx)
+cdef str _FILENAME_ENCODING
+_FILENAME_ENCODING = sys.getfilesystemencoding()
+if _FILENAME_ENCODING is None:
+    _FILENAME_ENCODING = sys.getdefaultencoding()
+if _FILENAME_ENCODING is None:
+    _FILENAME_ENCODING = 'ascii'
+
+#cdef char* _C_FILENAME_ENCODING
+#_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+
+cdef bytes _encodeFilename(object filename):
+    """Make sure a filename is 8-bit encoded (or None)."""
+    if filename is None:
+        return None
+    elif PyBytes_Check(filename):
+        return filename
+    elif PyUnicode_Check(filename):
+        return filename.encode(_FILENAME_ENCODING)
+    else:
+        raise TypeError, u"Argument must be string or unicode."
+
+cdef bytes _forceBytes(object s):
+    u"""convert string or unicode object to bytes, assuming ascii encoding.
+    """
+    if PY_MAJOR_VERSION < 3:
+        return s
+    elif s is None:
+        return None
+    elif PyBytes_Check(s):
+        return s
+    elif PyUnicode_Check(s):
+        return s.encode('ascii')
+    else:
+        raise TypeError, u"Argument must be string, bytes or unicode."
+
+cdef inline bytes _forceCmdlineBytes(object s):
+    return _forceBytes(s)
+
+cdef _charptr_to_str(char* s):
+    if PY_MAJOR_VERSION < 3:
+        return s
+    else:
+        return s.decode("ascii")
+
+cdef _forceStr(object s):
+    """Return s converted to str type of current Python
+    (bytes in Py2, unicode in Py3)"""
+    if s is None:
+        return None
+    if PY_MAJOR_VERSION < 3:
+        return s
+    elif PyBytes_Check(s):
+        return s.decode('ascii')
+    else:
+        # assume unicode
+        return s
+
+########################################################################
+########################################################################
+########################################################################
+## Constants and global variables
+########################################################################
+
+# defines imported from samtools
+DEF SEEK_SET = 0
+DEF SEEK_CUR = 1
+DEF SEEK_END = 2
+
+cdef char* CODE2CIGAR= "MIDNSHP=X"
+if IS_PYTHON3:
+    CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
+else:
+    CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
+
+#####################################################################
+# hard-coded constants
+cdef int max_pos = 2 << 29
+
+#####################################################################
+#####################################################################
+#####################################################################
+## private factory methods
+#####################################################################
+cdef class AlignedRead
+cdef makeAlignedRead(bam1_t * src):
+    '''enter src into AlignedRead.'''
+    # note that the following does not call __init__
+    cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
+    dest._delegate = bam_dup1(src)
+    return dest
+
+cdef class PileupProxy
+cdef makePileupProxy(bam_pileup1_t ** plp, int tid, int pos, int n):
+    # note that the following does not call __init__
+     cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
+     dest.plp = plp
+     dest.tid = tid
+     dest.pos = pos
+     dest.n = n
+     return dest
+
+cdef class PileupRead
+cdef makePileupRead( bam_pileup1_t * src ):
+    '''fill a  PileupRead object from a bam_pileup1_t * object.'''
+    cdef PileupRead dest = PileupRead.__new__(PileupRead)
+    dest._alignment = makeAlignedRead( src.b )
+    dest._qpos = src.qpos
+    dest._indel = src.indel
+    dest._level = src.level
+    dest._is_del = src.is_del
+    dest._is_head = src.is_head
+    dest._is_tail = src.is_tail
+    return dest
+
+cdef convertBinaryTagToList( uint8_t * s ):
+    """return bytesize, number of values list of values in s."""
+    cdef char auxtype
+    cdef uint8_t byte_size
+    cdef int32_t nvalues
+
+    # get byte size
+    auxtype = s[0]
+    byte_size = aux_type2size( auxtype )
+    s += 1
+    # get number of values in array
+    nvalues = (<int32_t*>s)[0]
+    s += 4
+    # get values
+    values = []
+    if auxtype == 'c':
+        for x from 0 <= x < nvalues:
+            values.append((<int8_t*>s)[0])
+            s += 1
+    elif auxtype == 'C':
+        for x from 0 <= x < nvalues:
+            values.append((<uint8_t*>s)[0])
+            s += 1
+    elif auxtype == 's':
+        for x from 0 <= x < nvalues:
+            values.append((<int16_t*>s)[0])
+            s += 2
+    elif auxtype == 'S':
+        for x from 0 <= x < nvalues:
+            values.append((<uint16_t*>s)[0])
+            s += 2
+    elif auxtype == 'i':
+        for x from 0 <= x < nvalues:
+            values.append((<int32_t*>s)[0])
+            s += 4
+    elif auxtype == 'I':
+        for x from 0 <= x < nvalues:
+            values.append((<uint32_t*>s)[0])
+            s += 4
+    elif auxtype == 'f':
+        for x from 0 <= x < nvalues:
+            values.append((<float*>s)[0])
+            s += 4
+
+    return byte_size, nvalues, values
+
+
+class PileupColumn(object):
+    '''A pileup column. A pileup column contains
+    all the reads that map to a certain target base.
+
+    tid
+        chromosome ID as is defined in the header
+    pos
+        the target base coordinate (0-based)
+    n
+        number of reads mapping to this column
+    pileups
+        list of reads (:class:`pysam.PileupRead`) aligned to this column
+    '''
+    def __str__(self):
+        return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+            "\n" + "\n".join( map(str, self.pileups) )
+
+
+# valid types for sam headers
+VALID_HEADER_TYPES = {"HD" : dict,
+                      "SQ" : list,
+                      "RG" : list,
+                      "PG" : list,
+                      "CO" : list}
+
+# order of records within sam headers
+VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO")
+
+# type conversions within sam header records
+VALID_HEADER_FIELDS = {"HD" : {"VN" : str, "SO" : str, "GO" : str},
+                       "SQ" : {"SN" : str, "LN" : int, "AS" : str, 
+                               "M5" : str, "SP" : str, "UR" : str,},
+                       "RG" : {"ID" : str, "CN" : str, "DS" : str,
+                               "DT" : str, "FO" : str, "KS" : str,
+                               "LB" : str, "PG" : str, "PI" : str,
+                               "PL" : str, "PU" : str, "SM" : str,},
+                       "PG" : {"ID" : str, "PN" : str, "CL" : str, 
+                               "PP" : str, "DS" : str, "VN" : str,},}
+
+# output order of fields within records
+VALID_HEADER_ORDER = {"HD" : ("VN", "SO", "GO"),
+                      "SQ" : ("SN", "LN", "AS", "M5",
+                               "UR", "SP"),
+                      "RG" : ("ID", "SM", "LB", "DS", 
+                              "PU", "PI", "CN", "DT",
+                              "PL", "FO", "KS", "PG"),
+                      "PG" : ("PN", "ID", "VN", "CL", 
+                              "PP"),}
+
+
+cdef class Samfile:
+    '''*(filename, mode=None, template = None,
+         referencenames = None, referencelengths = None,
+         text = NULL, header = None,
+         add_sq_text = False, check_header = True,
+         check_sq = True )*
+
+    A :term:`SAM`/:term:`BAM` formatted file. The file is
+    automatically opened.
+
+    *mode* should be ``r`` for reading or ``w`` for writing. The
+    default is text mode (:term:`SAM`). For binary (:term:`BAM`) I/O
+    you should append ``b`` for compressed or ``u`` for uncompressed
+    :term:`BAM` output.  Use ``h`` to output header information in
+    text (:term:`TAM`) mode.
+
+    If ``b`` is present, it must immediately follow ``r`` or ``w``.
+    Valid modes are ``r``, ``w``, ``wh``, ``rb``, ``wb`` and
+    ``wbu``. For instance, to open a :term:`BAM` formatted file for
+    reading, type::
+
+        f = pysam.Samfile('ex1.bam','rb')
+
+    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.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.
+
+    For writing, the header of a :term:`SAM` file/:term:`BAM` file can
+    be constituted from several sources (see also the samtools format
+    specification):
+
+        1. If *template* is given, the header is copied from a another
+           *Samfile* (*template* must be of type *Samfile*).
+
+        2. If *header* is given, the header is built from a
+           multi-level dictionary. The first level are the four types
+           ('HD', 'SQ', ...). The second level are a list of lines,
+           with each line being a list of tag-value pairs. The header
+           is constructed first from all the defined fields, followed
+           by user tags in alphabetical order.
+
+        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*.
+
+    By default, if a file is opened in mode 'r', it is checked
+    for a valid header (*check_header* = True) and a definition of
+    chromosome names (*check_sq* = True).
+
+    '''
+
+    def __cinit__(self, *args, **kwargs ):
+        self.htsfile = NULL
+        self._filename = None
+        self.isbam = False
+        self.isstream = False
+        self._open(*args, **kwargs)
+
+        # allocate memory for iterator
+        self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
+
+    def _isOpen( self ):
+        '''return true if htsfile has been opened.'''
+        return self.htsfile != NULL
+
+    def _hasIndex( self ):
+        '''return true if htsfile has an existing (and opened) index.'''
+        return self.index != NULL
+
+    def _open(self,
+              filename,
+              mode=None,
+              Samfile template=None,
+              referencenames=None,
+              referencelengths=None,
+              text=None,
+              header=None,
+              port=None,
+              add_sq_text=True,
+              check_header=True,
+              check_sq=True):
+        '''open a sam/bam file.
+
+        If _open is called on an existing bamfile, the current file will be
+        closed and a new file will be opened.
+        '''
+
+        # read mode autodetection
+        if mode is None:
+            try:
+                self._open(filename, 'rb',
+                           template=template,
+                           referencenames=referencenames,
+                           referencelengths=referencelengths,
+                           text=text,
+                           header=header,
+                           port=port,
+                           check_header=check_header,
+                           check_sq=check_sq)
+                return
+            except ValueError, msg:
+                pass
+
+            self._open(filename, 'r',
+                       template=template,
+                       referencenames=referencenames,
+                       referencelengths=referencelengths,
+                       text=text,
+                       header=header,
+                       port=port,
+                       check_header=check_header,
+                       check_sq=check_sq)
+            return
+
+        assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), \
+            "invalid file opening mode `%s`" % mode
+
+        # close a previously opened file
+        if self.htsfile != NULL:
+            self.close()
+
+        cdef bytes bmode = mode.encode('ascii')
+        self._filename = filename = _encodeFilename(filename)
+        self.isstream = filename == b"-"
+
+        self.isbam = len(mode) > 1 and mode[1] == 'b'
+
+        self.isremote = filename.startswith(b"http:") or \
+                        filename.startswith(b"ftp:")
+
+        cdef char * ctext
+        ctext = NULL
+
+        if mode[0] == 'w':
+            # open file for writing
+
+            # header structure (used for writing)
+            if template:
+                self.header = bam_hdr_dup(template.header)
+            elif header:
+                self.header = self._buildHeader(header)
+            else:
+                # build header from a target names and lengths
+                assert referencenames and referencelengths, \
+                    ("either supply options `template`, `header` "
+                     "or  both `referencenames` and `referencelengths` "
+                     "for writing")
+                assert len(referencenames) == len(referencelengths), \
+                    "unequal names and lengths of reference sequences"
+
+                # allocate and fill header
+                referencenames = [_forceBytes(ref) for ref in referencenames]
+                self.header = bam_hdr_init()
+                self.header.n_targets = len(referencenames)
+                n = 0
+                for x in referencenames:
+                    n += len(x) + 1
+                self.header.target_name = <char**>calloc(n, sizeof(char*))
+                self.header.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
+                for x from 0 <= x < self.header.n_targets:
+                    self.header.target_len[x] = referencelengths[x]
+                    name = referencenames[x]
+                    self.header.target_name[x] = <char*>calloc(
+                        len(name) + 1, sizeof(char))
+                    strncpy(self.header.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 < self.header.n_targets:
+                        text.append("@SQ\tSN:%s\tLN:%s\n" % \
+                                    (_forceStr(referencenames[x]), 
+                                     referencelengths[x]))
+                    text = ''.join(text)
+
+                if text != None:
+                    # copy without \0
+                    text = _forceBytes(text)
+                    ctext = text
+                    self.header.l_text = strlen(ctext)
+                    self.header.text = <char*>calloc(
+                        strlen(ctext), sizeof(char))
+                    memcpy(self.header.text, ctext, strlen(ctext))
+
+            # open file. Header gets written to file at the same time for bam files
+            # and sam files (in the latter case, the mode needs to be wh)
+            self.htsfile = hts_open(filename, bmode)
+            
+            # for compatibility - "w" writes sam file without header
+            if self.isbam or "h" in mode:
+                # write header to htsfile
+                sam_hdr_write(self.htsfile, self.header)
+                
+        elif mode[0] == "r":
+            # open file for reading
+            if (filename != b"-"
+                and not self.isremote
+                and not os.path.exists(filename)):
+                raise IOError("file `%s` not found" % filename)
+
+            # try to detect errors
+            self.htsfile = hts_open(filename, bmode)
+            if self.htsfile == NULL:
+                raise ValueError(
+                    "could not open file (mode='%s') - "
+                    "is it SAM/BAM format?" % mode)
+
+            # get file pointer
+            # TODO: this is specific to BAM files
+            #       refactor to make generalizable
+            self.fp = self.htsfile.fp.bgzf
+
+            # bam files require a valid header
+            if self.isbam:
+                self.header = sam_hdr_read(self.htsfile)
+                if self.header == NULL:
+                    raise ValueError(
+                        "file does not have valid header (mode='%s') "
+                        "- is it BAM format?" % mode )
+            else:
+                # in sam files it is optional (htsfile full of unmapped reads)
+                if check_header:
+                    self.header = sam_hdr_read(self.htsfile)
+                    if self.header == NULL:
+                        raise ValueError(
+                            "file does not have valid header (mode='%s') "
+                            "- is it SAM format?" % mode )
+                    # self.header.ignore_sam_err = True
+
+            # disabled for autodetection to work needs to be disabled
+            # so that reading from sam-files without headers works
+            if check_sq and self.header.n_targets == 0:
+                raise ValueError(
+                    ("file header is empty (mode='%s') - "
+                     "is it SAM/BAM format?") % mode)
+
+        if self.htsfile == NULL:
+            raise IOError("could not open file `%s`" % filename )
+
+        # check for index and open if present
+        if mode[0] == "r" and self.isbam:
+
+            if not self.isremote:
+                if not os.path.exists(filename + b".bai") \
+                        and not os.path.exists( filename[:-4] + b".bai"):
+                    self.index = NULL
+                else:
+                    # returns NULL if there is no index or index could not be opened
+                    self.index = hts_idx_load(filename, HTS_FMT_BAI)
+                    if self.index == NULL:
+                        raise IOError("error while opening index `%s` " % filename )
+            else:
+                self.index = hts_idx_load(filename, HTS_FMT_BAI)
+                if self.index == NULL:
+                    warnings.warn("unable to open index for `%s` " % filename)
+
+            if not self.isstream:
+                self.start_offset = bgzf_tell(self.fp)
+
+    def gettid( self, reference ):
+        '''
+        convert :term:`reference` name into numerical :term:`tid`
+
+        returns -1 if reference is not known.
+        '''
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+        reference = _forceBytes(reference)
+        return bam_name2id(self.header, reference)
+
+    def getrname( self, tid ):
+        '''
+        convert numerical :term:`tid` into :term:`reference` name.'''
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+        if not 0 <= tid < self.header.n_targets:
+            raise ValueError("tid %i out of range 0<=tid<%i" % 
+                             (tid, self.header.n_targets ) )
+        return _charptr_to_str(self.header.target_name[tid])
+
+    cdef char * _getrname( self, int tid ): # TODO unused
+        '''
+        convert numerical :term:`tid` into :term:`reference` name.'''
+        if not self._isOpen():
+            raise ValueError("I/O operation on closed file")
+
+        if not 0 <= tid < self.header.n_targets:
+            raise ValueError("tid %i out of range 0<=tid<%i" %
+                             (tid, self.header.n_targets ))
+        return self.header.target_name[tid]
+
+    def _parseRegion(self,
+                     reference=None,
+                     start=None,
+                     end=None,
+                     region=None,
+                     tid=None):
+        '''
+        parse region information.
+
+        raise ValueError for for invalid regions.
+
+        returns a tuple of flag, tid, start and end. Flag indicates
+        whether some coordinates were supplied.
+
+        Note that regions are 1-based, while start,end are python coordinates.
+        '''
+        cdef int rtid
+        cdef long long rstart
+        cdef long long rend
+
+        rtid = -1
+        rstart = 0
+        rend = max_pos
+        if start != None:
+            try:
+                rstart = start
+            except OverflowError:
+                raise ValueError( 'start out of range (%i)' % start )
+
+        if end != None:
+            try:
+                rend = end
+            except OverflowError:
+                raise ValueError( 'end out of range (%i)' % end )
+
+        if region:
+            region = _forceStr(region)
+            parts = re.split("[:-]", region)
+            reference = parts[0]
+            if len(parts) >= 2:
+                rstart = int(parts[1]) - 1
+            if len(parts) >= 3:
+                rend = int(parts[2])
+
+        if not reference:
+            return 0, 0, 0, 0
+
+        if tid is not None:
+            rtid = tid
+        else:
+            rtid = self.gettid(reference)
+
+        if rtid < 0:
+            raise ValueError(
+                "invalid reference `%s`" % reference)
+        if rstart > rend:
+            raise ValueError(
+                'invalid coordinates: start (%i) > end (%i)' % (rstart, rend))
+        if not 0 <= rstart < max_pos:
+            raise ValueError('start out of range (%i)' % rstart)
+        if not 0 <= rend <= max_pos:
+            raise ValueError('end out of range (%i)' % rend)
+
+        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`.
+        '''
+
+        if not self._isOpen():
+            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 bgzf_seek(self.fp, offset, where)
+
+    def tell(self):
+        '''
+        return current file position
+        '''
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+        if not self.isbam:
+            raise NotImplementedError("seek only available in bam files")
+
+        return bgzf_tell(self.fp)
+
+    def fetch(self,
+              reference=None,
+              start=None,
+              end=None,
+              region=None,
+              tid=None,
+              callback=None,
+              until_eof=False,
+              reopen=True):
+        '''fetch aligned reads in a :term:`region` using 0-based indexing. The
+        region is specified by :term:`reference`, *start* and
+        *end*. Alternatively, a samtools :term:`region` string can be
+        supplied.
+
+        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. Using this option will also fetch unmapped reads.
+
+        If *reopen* is set to true, the iterator returned will receive
+        its own filehandle to the htsfile effectively opening its own
+        copy of the file. The default behaviour is to re-open in order
+        to safely work with multiple concurrent iterators on the same
+        file. Re-opening a htsfile creates some overhead, so when
+        using many calls to fetch() *reopen* can be set to False to
+        gain some speed. Also, the tell() method will only work if
+        *reopen* is set to False.
+
+        If only *reference* is set, all reads aligned to *reference*
+        will be fetched.
+
+        Note that a :term:`SAM` file does not allow random access. If
+        *region* or *reference* are given, an exception is raised.
+
+        '''
+        cdef int rtid, rstart, rend, has_coord
+
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+
+        has_coord, rtid, rstart, rend = self._parseRegion(reference,
+                                                          start,
+                                                          end,
+                                                          region,
+                                                          tid)
+
+        # Turn of re-opening if htsfile is a stream
+        if self.isstream:
+            reopen = False
+
+        if self.isbam:
+            if not until_eof and not self._hasIndex() and not self.isremote:
+                raise ValueError( "fetch called on bamfile without index" )
+
+            if has_coord:
+                return IteratorRowRegion(self, rtid, rstart, rend, 
+                                         reopen=reopen)
+            else:
+                if until_eof:
+                    return IteratorRowAll(self, reopen=reopen)
+                else:
+                    # AH: check - reason why no reopen for AllRefs?
+                    return IteratorRowAllRefs(self) # , reopen=reopen )
+        else:
+            if has_coord:
+                raise ValueError ("fetching by region is not available for sam files")
+
+            if callback:
+                raise NotImplementedError("callback not implemented yet")
+
+            if self.header == NULL:
+                raise ValueError("fetch called for htsfile without header")
+
+            # check if targets are defined
+            # give warning, sam_read1 segfaults
+            if self.header.n_targets == 0:
+                warnings.warn("fetch called for htsfile without header")
+                
+            return IteratorRowAll(self, reopen=reopen)
+
+    def head(self, n):
+        '''
+        return iterator over the first n alignments. 
+
+        This is useful for inspecting the bam-file.
+        '''
+        return IteratorRowHead(self, n)
+
+    def mate(self,
+             AlignedRead read):
+        '''return the mate of :class:`AlignedRead` *read*.
+
+        Throws a ValueError if read is unpaired or the mate
+        is unmapped.
+
+        .. note::
+
+            Calling this method will change the file position.
+            This might interfere with any iterators that have
+            not re-opened the file.
+
+        .. note::
+  
+           This method is too slow for high-throughput processing.
+           If a read needs to be processed with its mate, work
+           from a read name sorted file or, better, cache reads.
+
+        '''
+        cdef uint32_t flag = read._delegate.core.flag
+
+        if flag & BAM_FPAIRED == 0:
+            raise ValueError("read %s: is unpaired" % (read.qname))
+        if flag & BAM_FMUNMAP != 0:
+            raise ValueError("mate %s: is unmapped" % (read.qname))
+
+        # xor flags to get the other mate
+        cdef int x = BAM_FREAD1 + BAM_FREAD2
+        flag = (flag ^ x) & x
+
+        # the following code is not using the C API and
+        # could thus be made much quicker
+        for mate in self.fetch(
+                read._delegate.core.mpos,
+                read._delegate.core.mpos + 1,
+                tid=read._delegate.core.mtid):
+            if mate.flag & flag != 0 and \
+               mate.qname == read.qname:
+                break
+        else:
+            raise ValueError("mate not found")
+        
+        return mate
+
+    def count(self,
+              reference=None,
+              start=None,
+              end=None,
+              region=None,
+              until_eof=False):
+        '''*(reference = None, start = None, end = None,
+        region = None, callback = None, until_eof = False)*
+
+        count reads :term:`region` using 0-based indexing. The region
+        is specified by :term:`reference`, *start* and
+        *end*. Alternatively, a samtools :term:`region` string can be
+        supplied.
+
+        Note that a :term:`TAM` file does not allow random access. If
+        *region* or *reference* are given, an exception is raised.
+        '''
+        cdef AlignedRead read
+        cdef long counter = 0
+
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+            
+        for read in self.fetch(reference=reference,
+                               start=start,
+                               end=end,
+                               region=region,
+                               until_eof=until_eof):
+            counter += 1
+
+        return counter
+
+    def pileup( self,
+                reference = None,
+                start = None,
+                end = None,
+                region = None,
+                **kwargs ):
+        '''
+        perform a :term:`pileup` within a :term:`region`. The region is specified by
+        :term:`reference`, *start* and *end* (using 0-based indexing).
+        Alternatively, a samtools *region* string can be supplied.
+
+        Without *reference* or *region* all reads will be used for the pileup. The reads will be returned
+        ordered by :term:`reference` sequence, which will not necessarily be the order within the file.
+
+        The method returns an iterator of type :class:`pysam.IteratorColumn` unless
+        a *callback is provided. If a *callback* is given, the callback will be executed
+        for each column within the :term:`region`.
+
+        Note that :term:`SAM` formatted files do not allow random access.
+        In these files, if a *region* or *reference* are given an exception is raised.
+
+        Optional *kwargs* to the iterator:
+
+        stepper
+           The stepper controlls how the iterator advances.
+           Possible options for the stepper are
+
+           ``all``
+              use all reads for pileup.
+           ``samtools``
+              same filter and read processing as in :term:`csamtools` pileup
+
+        fastafile
+           A :class:`FastaFile` object
+
+         mask
+           Skip all reads with bits set in mask if mask=True.
+
+         max_depth
+           Maximum read depth permitted. The default limit is *8000*.
+
+         truncate
+           By default, the samtools pileup engine outputs all reads overlapping a region (see note below).
+           If truncate is True and a region is given, only output columns in the exact region
+           specificied.
+
+        .. 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.
+
+        '''
+        cdef int rtid, rstart, rend, has_coord
+
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+
+        has_coord, rtid, rstart, rend = self._parseRegion(
+            reference, start, end, region )
+
+        if self.isbam:
+            if not self._hasIndex():
+                raise ValueError("no index available for pileup")
+
+            if has_coord:
+                return IteratorColumnRegion(self,
+                                            tid = rtid,
+                                            start = rstart,
+                                            end = rend,
+                                            **kwargs )
+            else:
+                return IteratorColumnAllRefs(self, **kwargs )
+
+        else:
+            raise NotImplementedError( "pileup of samfiles not implemented yet" )
+
+    def close( self ):
+        '''
+        closes the :class:`pysam.Samfile`.'''
+        if self.htsfile != NULL:
+            hts_close(self.htsfile)
+            hts_idx_destroy(self.index);
+            self.htsfile = NULL
+
+    def __dealloc__( self ):
+        # remember: dealloc cannot call other methods
+        # note: no doc string
+        # note: __del__ is not called.
+        self.close()
+        bam_destroy1(self.b)
+        if self.header != NULL:
+            bam_hdr_destroy(self.header)
+            
+    cpdef int write( self, AlignedRead read ) except -1:
+        '''
+        write a single :class:`pysam.AlignedRead` to disk.
+
+        returns the number of bytes written.
+        '''
+        if not self._isOpen():
+            return 0
+
+        x = sam_write1(self.htsfile,
+                       self.header,
+                       read._delegate)
+
+        return x
+
+    def __enter__(self):
+        return self
+
+    def __exit__(self, exc_type, exc_value, traceback):
+        self.close()
+        return False
+
+    ###############################################################
+    ###############################################################
+    ###############################################################
+    ## properties
+    ###############################################################
+    property filename:
+        '''number of :term:`filename` associated with this object.'''
+        def __get__(self):
+            return self._filename
+
+    property nreferences:
+        '''number of :term:`reference` sequences in the file.'''
+        def __get__(self):
+            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+            return self.header.n_targets
+
+    property references:
+        """tuple with the names of :term:`reference` sequences."""
+        def __get__(self):
+            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+            t = []
+            for x from 0 <= x < self.header.n_targets:
+                t.append(_charptr_to_str(self.header.target_name[x]))
+            return tuple(t)
+
+    property lengths:
+        """tuple of the lengths of the :term:`reference` sequences. The lengths are in the same order as
+        :attr:`pysam.Samfile.references`
+        """
+        def __get__(self):
+            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+            t = []
+            for x from 0 <= x < self.header.n_targets:
+                t.append( self.header.target_len[x] )
+            return tuple(t)
+
+    property mapped:
+        """total number of mapped alignments in file.
+        """
+        def __get__(self):
+            self._checkIndex()
+            cdef int tid
+            cdef uint64_t total = 0
+            cdef uint64_t mapped, unmapped
+            for tid from 0 <= tid < self.header.n_targets:
+                hts_idx_get_stat(self.index, tid, &mapped, &unmapped)
+                total += mapped
+            return total
+
+    def _checkIndex(self):
+        '''check if index is present. Otherwise raise
+        an error.'''
+        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")
+        if self.index == NULL:
+            raise ValueError("mapping information not recorded in index "
+                                 "or index not available")
+
+
+    property unmapped:
+        """total number of unmapped reads in file.
+        """
+        def __get__(self):
+            self._checkIndex()
+            cdef int tid
+            cdef uint64_t total = 0
+            cdef uint64_t mapped, unmapped
+            for tid from 0 <= tid < self.header.n_targets:
+                hts_idx_get_stat(self.index, tid, &mapped, &unmapped)
+                total += unmapped
+            return total
+
+    property nocoordinate:
+        """total number of reads without coordinates
+        """
+        def __get__(self):
+            self._checkIndex()
+            return hts_idx_get_n_no_coor(self.index)
+
+    property text:
+        '''full contents of the :term:`sam file` header as a string.'''
+        def __get__(self):
+            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+            return from_string_and_size(self.header.text, self.header.l_text)
+
+    property header:
+        '''header information within the :term:`sam file`. The records and fields are returned as
+        a two-level dictionary.
+        '''
+        def __get__(self):
+            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+
+            result = {}
+            
+            if self.header.text != NULL:
+                # convert to python string (note: call self.text to create 0-terminated string)
+                t = self.text
+                for line in t.split("\n"):
+                    if not line.strip(): continue
+                    assert line.startswith("@"), "header line without '@': '%s'" % line
+                    fields = line[1:].split("\t")
+                    record = fields[0]
+                    assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
+
+                    # treat comments
+                    if record == "CO":
+                        if record not in result: result[record] = []
+                        result[record].append( "\t".join( fields[1:] ) )
+                        continue
+                    # the following is clumsy as generators do not work?
+                    x = {}
+                    for field in fields[1:]:
+                        if ":" not in field: 
+                            raise ValueError("malformatted header: no ':' in field" )
+                        key, value = field.split(":",1)
+                        # uppercase keys must be valid
+                        # lowercase are permitted for user fields
+                        if key in VALID_HEADER_FIELDS[record]:
+                            x[key] = VALID_HEADER_FIELDS[record][key](value)
+                        elif not key.isupper():
+                            x[key] = value
+                        else:
+                            raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )
+
+                    if VALID_HEADER_TYPES[record] == dict:
+                        if record in result:
+                            raise ValueError( "multiple '%s' lines are not permitted" % record )
+                        result[record] = x
+                    elif VALID_HEADER_TYPES[record] == list:
+                        if record not in result: result[record] = []
+                        result[record].append( x )
+
+                # if there are no SQ lines in the header, add the reference names
+                # from the information in the bam file.
+                # Background: c-samtools keeps the textual part of the header separate from
+                # the list of reference names and lengths. Thus, if a header contains only 
+                # SQ lines, the SQ information is not part of the textual header and thus
+                # are missing from the output. See issue 84.
+                if "SQ" not in result:
+                    sq = []
+                    for ref, length in zip( self.references, self.lengths ):
+                        sq.append( {'LN': length, 'SN': ref } )
+                    result["SQ"] = sq
+
+            return result
+
+    def _buildLine( self, fields, record ):
+        '''build a header line from *fields* dictionary for *record*'''
+
+        # TODO: add checking for field and sort order
+        line = ["@%s" % record ]
+        # comment
+        if record == "CO":
+            line.append( fields )
+        # user tags
+        elif record.islower():
+            for key in sorted(fields):
+                line.append( "%s:%s" % (key, str(fields[key])))
+        # defined tags
+        else:
+            # write fields of the specification
+            for key in VALID_HEADER_ORDER[record]:
+                if key in fields:
+                    line.append( "%s:%s" % (key, str(fields[key])))
+            # write user fields
+            for key in fields:
+                if not key.isupper():
+                    line.append( "%s:%s" % (key, str(fields[key])))
+
+        return "\t".join( line )
+
+    cdef bam_hdr_t * _buildHeader( self, new_header ):
+        '''return a new header built from a dictionary in *new_header*.
+
+        This method inserts the text field, target_name and target_len.
+        '''
+
+        lines = []
+
+        # check if hash exists
+
+        # create new header and copy old data
+        cdef bam_hdr_t * dest
+
+        dest = bam_hdr_init()
+
+        # first: defined tags
+        for record in VALID_HEADERS:
+            if record in new_header:
+                ttype = VALID_HEADER_TYPES[record]
+                data = new_header[record]
+                if type(data) != type(ttype()):
+                    raise ValueError(
+                        "invalid type for record %s: %s, expected %s" %
+                        (record, type(data), type(ttype())))
+                if type(data) is dict:
+                    lines.append(self._buildLine(data, record))
+                else:
+                    for fields in new_header[record]:
+                        lines.append(self._buildLine(fields, record))
+
+        # then: user tags (lower case), sorted alphabetically
+        for record, data in sorted(new_header.items()):
+            if record in VALID_HEADERS: continue
+            if type( data ) is dict:
+                lines.append( self._buildLine( data, record ) )
+            else:
+                for fields in new_header[record]:
+                    lines.append( self._buildLine( fields, record ) )
+
+        text = "\n".join(lines) + "\n"
+        if dest.text != NULL: free( dest.text )
+        dest.text = <char*>calloc( len(text), sizeof(char))
+        dest.l_text = len(text)
+        cdef bytes btext = text.encode('ascii')
+        strncpy( dest.text, btext, dest.l_text )
+
+        cdef bytes bseqname
+        # collect targets
+        if "SQ" in new_header:
+            seqs = []
+            for fields in new_header["SQ"]:
+                try:
+                    seqs.append( (fields["SN"], fields["LN"] ) )
+                except KeyError:
+                    raise KeyError( "incomplete sequence information in '%s'" % str(fields))
+
+            dest.n_targets = len(seqs)
+            dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )
+            dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
+
+            for x from 0 <= x < dest.n_targets:
+                seqname, seqlen = seqs[x]
+                dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
+                bseqname = seqname.encode('ascii')
+                strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
+                dest.target_len[x] = seqlen
+
+        return dest
+
+    ###############################################################
+    ###############################################################
+    ###############################################################
+    ## file-object like iterator access
+    ## note: concurrent access will cause errors (see IteratorRow
+    ## and reopen)
+    ## Possible solutions: deprecate or open new file handle
+    ###############################################################
+    def __iter__(self):
+        if not self._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+
+        if not self.isbam and self.header.n_targets == 0:
+            raise NotImplementedError(
+                "can not iterate over samfile without header")
+        return self
+
+    cdef bam1_t * getCurrent( self ):
+        return self.b
+
+    cdef int cnext(self):
+        '''
+        cversion of iterator. Used by :class:`pysam.Samfile.IteratorColumn`.
+        '''
+        cdef int ret
+        return sam_read1(self.htsfile,
+                         self.header,
+                         self.b)
+
+    def __next__(self):
+        """
+        python version of next().
+        """
+        cdef int ret
+        ret = sam_read1(self.htsfile, self.header, self.b)
+        if (ret >= 0):
+            return makeAlignedRead(self.b)
+        else:
+            raise StopIteration
+
+##-------------------------------------------------------------------
+##-------------------------------------------------------------------
+##-------------------------------------------------------------------
+cdef class IteratorRow:
+    '''abstract base class for iterators over mapped reads.
+
+    Various iterators implement different behaviours for wrapping around
+    contig boundaries. Examples include:
+
+    :class:`pysam.IteratorRowRegion`
+        iterate within a single contig and a defined region.
+
+    :class:`pysam.IteratorRowAll`
+        iterate until EOF. This iterator will also include unmapped reads.
+
+    :class:`pysam.IteratorRowAllRefs`
+        iterate over all reads in all reference sequences.
+
+    The method :meth:`Samfile.fetch` returns an IteratorRow.
+
+    .. note::
+        It is usually not necessary to create an object of this class
+        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
+
+    '''
+
+    def __init__(self, Samfile samfile, int reopen=True):
+        
+        if not samfile._isOpen():
+            raise ValueError( "I/O operation on closed file" )
+
+        # makes sure that samfile stays alive as long as the
+        # iterator is alive
+        self.samfile = samfile
+
+        # reopen the file - note that this makes the iterator
+        # slow and causes pileup to slow down significantly.
+        if reopen:
+            self.htsfile = hts_open(samfile._filename, 'r')
+            assert self.htsfile != NULL
+            # read header - required for accurate positioning
+            sam_hdr_read(self.htsfile)
+            self.owns_samfile = True
+        else:
+            self.htsfile = self.samfile.htsfile
+            self.owns_samfile = False
+
+        self.retval = 0
+
+        self.b = bam_init1()
+
+    def __dealloc__(self):
+        bam_destroy1(self.b)
+        if self.owns_samfile:
+            hts_close(self.htsfile)
+
+cdef class IteratorRowRegion(IteratorRow):
+    """*(Samfile samfile, int tid, int beg, int end, int reopen = True )*
+
+    iterate over mapped reads in a region.
+
+    By default, the file is re-openend to avoid conflicts between
+    multiple iterators working on the same file. Set *reopen* = False
+    to not re-open *samfile*.
+
+    The samtools iterators assume that the file
+    position between iterations do not change.
+    As a consequence, no two iterators can work
+    on the same file. To permit this, each iterator
+    creates its own file handle by re-opening the
+    file.
+
+    Note that the index will be shared between
+    samfile and the iterator.
+
+    .. note::
+        It is usually not necessary to create an object of this class
+        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
+
+    """
+
+    def __init__(self, Samfile samfile,
+                 int tid, int beg, int end,
+                 int reopen=True):
+
+        IteratorRow.__init__(self, samfile, reopen=reopen)
+
+        if not samfile._hasIndex():
+            raise ValueError( "no index available for iteration" )
+
+        self.iter = sam_itr_queryi(
+            self.samfile.index,
+            tid,
+            beg,
+            end)
+    
+    def __iter__(self):
+        return self
+
+    cdef bam1_t * getCurrent( self ):
+        return self.b
+
+    cdef int cnext(self):
+        '''cversion of iterator. Used by IteratorColumn'''
+        self.retval = hts_itr_next(self.htsfile.fp.bgzf,
+                                   self.iter,
+                                   self.b,
+                                   NULL)
+
+    def __next__(self):
+        """python version of next().
+        """
+        self.cnext()
+        if self.retval < 0:
+            raise StopIteration
+        return makeAlignedRead(self.b)
+
+    def __dealloc__(self):
+        hts_itr_destroy(self.iter)
+
+cdef class IteratorRowHead(IteratorRow):
+    """*(Samfile samfile, n, int reopen = True)*
+
+    iterate over first n reads in *samfile*
+
+    By default, the file is re-openend to avoid conflicts between
+    multiple iterators working on the same file. Set *reopen* = False
+    to not re-open *samfile*.
+
+    .. note::
+        It is usually not necessary to create an object of this class
+        explicitely. It is returned as a result of call to a :meth:`Samfile.head`.
+        
+
+    """
+
+    def __init__(self, Samfile samfile, int n, int reopen=True):
+
+        IteratorRow.__init__(self, samfile, reopen=reopen)
+
+        self.max_rows = n
+        self.current_row = 0
+
+    def __iter__(self):
+        return self
+
+    cdef bam1_t * getCurrent( self ):
+        return self.b
+
+    cdef int cnext(self):
+        '''cversion of iterator. Used by IteratorColumn'''
+        return sam_read1(self.htsfile,
+                         self.samfile.header,
+                         self.b)
+
+    def __next__(self):
+        """python version of next().
+
+        pyrex uses this non-standard name instead of next()
+        """
+        if self.current_row >= self.max_rows:
+            raise StopIteration
+
+        cdef int ret
+        ret = sam_read1(self.htsfile,
+                        self.samfile.header, self.b)
+        if (ret >= 0):
+            self.current_row += 1
+            return makeAlignedRead( self.b )
+        else:
+            raise StopIteration
+
+
+cdef class IteratorRowAll(IteratorRow):
+    """*(Samfile samfile, int reopen = True)*
+
+    iterate over all reads in *samfile*
+
+    By default, the file is re-openend to avoid conflicts between
+    multiple iterators working on the same file. Set *reopen* = False
+    to not re-open *samfile*.
+
+    .. note::
+        It is usually not necessary to create an object of this class
+        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
+        
+
+    """
+
+    def __init__(self, Samfile samfile, int reopen = True):
+
+        IteratorRow.__init__(self, samfile, reopen=reopen)
+
+    def __iter__(self):
+        return self
+
+    cdef bam1_t * getCurrent( self ):
+        return self.b
+
+    cdef int cnext(self):
+        '''cversion of iterator. Used by IteratorColumn'''
+        return sam_read1(self.htsfile,
+                         self.samfile.header,
+                         self.b)
+
+    def __next__(self):
+        """python version of next().
+
+        pyrex uses this non-standard name instead of next()
+        """
+        cdef int ret
+        ret = sam_read1(self.htsfile,
+                        self.samfile.header,
+                        self.b)
+        if (ret >= 0):
+            return makeAlignedRead(self.b)
+        else:
+            raise StopIteration
+
+
+cdef class IteratorRowAllRefs(IteratorRow):
+    """iterates over all mapped reads by chaining iterators over each reference
+
+    .. note::
+        It is usually not necessary to create an object of this class
+        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
+    """
+
+    def __init__(self, Samfile samfile, reopen=True):
+
+        IteratorRow.__init__(self, samfile, reopen=reopen)
+
+        if not samfile._hasIndex():
+            raise ValueError("no index available for fetch")
+
+        self.tid = -1
+
+    def nextiter(self):
+        self.rowiter = IteratorRowRegion(self.samfile,
+                                         self.tid,
+                                         0,
+                                         1<<29)
+
+    def __iter__(self):
+        return self
+
+    def __next__(self):
+        """python version of next().
+
+        pyrex uses this non-standard name instead of next()
+        """
+        # Create an initial iterator
+        if self.tid == -1:
+            if not self.samfile.nreferences:
+                raise StopIteration
+            self.tid = 0
+            self.nextiter()
+
+        while 1:
+            self.rowiter.cnext()
+
+            # If current iterator is not exhausted, return aligned read
+            if self.rowiter.retval>0:
+                return makeAlignedRead(self.rowiter.b)
+
+            self.tid += 1
+
+            # Otherwise, proceed to next reference or stop
+            if self.tid < self.samfile.nreferences:
+                self.nextiter()
+            else:
+                raise StopIteration
+
+
+cdef class IteratorRowSelection(IteratorRow):
+    """*(Samfile samfile)*
+
+    iterate over reads in *samfile* at a given list of file positions.
+
+    .. note::
+        It is usually not necessary to create an object of this class
+        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
+    """
+
+    def __init__(self, Samfile samfile, positions, int reopen=True):
+
+        IteratorRow.__init__(self, samfile, reopen=reopen)
+
+        self.positions = positions
+        self.current_pos = 0
+
+        self.fp = self.htsfile.fp.bgzf
+
+    def __iter__(self):
+        return self
+
+    cdef bam1_t * getCurrent(self):
+        return self.b
+
+    cdef int cnext(self):
+        '''cversion of iterator'''
+
+        # end iteration if out of positions
+        if self.current_pos >= len(self.positions): return -1
+
+        bgzf_seek(self.fp,
+                  self.positions[self.current_pos],
+                  0)
+        self.current_pos += 1
+        return sam_read1(self.htsfile,
+                         self.samfile.header,
+                         self.b)
+
+    def __next__(self):
+        """python version of next().
+
+        pyrex uses this non-standard name instead of next()
+        """
+
+        cdef int ret = self.cnext()
+        if (ret >= 0):
+            return makeAlignedRead(self.b)
+        else:
+            raise StopIteration
+
+
+cdef int __advance_all(void *data, bam1_t *b):
+    '''advance without any read filtering.
+    '''
+    cdef __iterdata * d
+    d = <__iterdata*>data
+    return sam_itr_next(d.htsfile, d.iter, b)
+
+
+cdef int __advance_snpcalls(void * data, bam1_t * b):
+    '''advance using same filter and read processing as in
+    the samtools pileup.
+    '''
+
+    # Note that this method requries acces to some 
+    # functions in the samtools code base and is thus
+    # not htslib only.
+    # The functions accessed in samtools are:
+    # 1. bam_prob_realn
+    # 2. bam_cap_mapQ
+    cdef __iterdata * d
+    d = <__iterdata*>data
+
+    cdef int ret = sam_itr_next(d.htsfile, d.iter, b)
+    cdef int skip = 0
+    cdef int q
+    cdef int is_cns = 1
+    cdef int is_nobaq = 0
+    cdef int capQ_thres = 0
+
+    # reload sequence
+    if d.fastafile != NULL and b.core.tid != d.tid:
+        if d.seq != NULL:
+            free(d.seq)
+        d.tid = b.core.tid
+        d.seq = faidx_fetch_seq(
+            d.fastafile,
+            d.header.target_name[d.tid],
+            0, max_pos,
+            &d.seq_len)
+
+        if d.seq == NULL:
+            raise ValueError(
+                "reference sequence for '%s' (tid=%i) not found" % \
+                (d.header.target_name[d.tid],
+                 d.tid))
+
+
+    while ret >= 0:
+        skip = 0
+
+        # realign read - changes base qualities
+        if d.seq != NULL and is_cns and not is_nobaq: 
+            bam_prob_realn(b, d.seq)
+
+        if d.seq != NULL and capQ_thres > 10:
+            q = bam_cap_mapQ(b, d.seq, capQ_thres)
+            if q < 0:
+                skip = 1
+            elif b.core.qual > q:
+                b.core.qual = q
+        if b.core.flag & BAM_FUNMAP:
+            skip = 1
+        elif b.core.flag & 1 and not b.core.flag & 2:
+            skip = 1
+
+        if not skip: break
+        # additional filters
+
+        ret = sam_itr_next(d.htsfile, d.iter, b)
+
+    return ret
+
+cdef class IteratorColumn:
+    '''abstract base class for iterators over columns.
+
+    IteratorColumn objects wrap the pileup functionality of samtools.
+
+    For reasons of efficiency, the iterator points to the current
+    pileup buffer. The pileup buffer is updated at every iteration.
+    This might cause some unexpected behavious. For example,
+    consider the conversion to a list::
+
+       f = Samfile("file.bam", "rb")
+       result = list( f.pileup() )
+
+    Here, ``result`` will contain ``n`` objects of type
+    :class:`PileupProxy` for ``n`` columns, but each object in
+    ``result`` will contain the same information.
+
+    The desired behaviour can be achieved by list comprehension::
+
+       result = [ x.pileups() for x in f.pileup() ]
+
+    ``result`` will be a list of ``n`` lists of objects of type :class:`PileupRead`.
+
+    If the iterator is associated with a :class:`Fastafile` using the
+    :meth:`addReference` method, then the iterator will export the
+    current sequence via the methods :meth:`getSequence` and
+    :meth:`seq_len`.
+
+    Optional kwargs to the iterator:
+
+    stepper
+       The stepper controls how the iterator advances.
+
+       Valid values are None, "all" or "samtools".
+
+       The default stepper "all" uses all reads for
+       computing the pileup. This corresponds to the
+       mpileup options "-B" and "-A".
+
+       The stepper "samtools" uses the mpileup default
+       parameterization to advance.
+
+    fastafile
+       A :class:`FastaFile` object
+
+    max_depth
+       maximum read depth. The default is 8000.
+
+    '''
+
+    def __cinit__( self, Samfile samfile, **kwargs ):
+        self.samfile = samfile
+        # TODO
+        # 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
+        self.n_plp = 0
+        self.plp = NULL
+        self.pileup_iter = <bam_plp_t>NULL
+
+    def __iter__(self):
+        return self
+
+    cdef int cnext(self):
+        '''perform next iteration.
+        '''
+        self.plp = bam_plp_auto( self.pileup_iter,
+                                 &self.tid,
+                                 &self.pos,
+                                 &self.n_plp )
+
+    cdef char * getSequence( self ):
+        '''return current reference sequence underlying the iterator.
+        '''
+        return self.iterdata.seq
+
+    property seq_len:
+        '''current sequence length.'''
+        def __get__(self): return self.iterdata.seq_len
+
+    def addReference(self, Fastafile fastafile):
+       '''
+       add reference sequences in *fastafile* to iterator.'''
+       self.fastafile = fastafile
+       if self.iterdata.seq != NULL: free(self.iterdata.seq)
+       self.iterdata.tid = -1
+       self.iterdata.fastafile = self.fastafile.fastafile
+
+    def hasReference(self):
+        '''
+        return true if iterator is associated with a reference'''
+        return self.fastafile
+
+    cdef setMask(self, mask):
+        '''set masking flag in iterator.
+
+        reads with bits set in *mask* will be skipped.
+        '''
+        raise NotImplementedError()
+        # self.mask = mask
+        # bam_plp_set_mask( self.pileup_iter, self.mask )
+
+    cdef setupIteratorData( self,
+                            int tid,
+                            int start,
+                            int end,
+                            int reopen = 0 ):
+        '''setup the iterator structure'''
+
+        self.iter = IteratorRowRegion(self.samfile, tid, start, end, reopen)
+        self.iterdata.htsfile = self.samfile.htsfile
+        self.iterdata.iter = self.iter.iter
+        self.iterdata.seq = NULL
+        self.iterdata.tid = -1
+        self.iterdata.header = self.samfile.header
+
+        if self.fastafile != None:
+            self.iterdata.fastafile = self.fastafile.fastafile
+        else:
+            self.iterdata.fastafile = NULL
+
+        if self.stepper == None or self.stepper == "all":
+            self.pileup_iter = bam_plp_init(
+                <bam_plp_auto_f>&__advance_all,
+                &self.iterdata)
+        elif self.stepper == "samtools":
+            self.pileup_iter = bam_plp_init(
+                <bam_plp_auto_f>&__advance_snpcalls,
+                &self.iterdata)
+        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 ):
+        '''reset iterator position.
+
+        This permits using the iterator multiple times without
+        having to incur the full set-up costs.
+        '''
+        self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 )
+        self.iterdata.iter = self.iter.iter
+
+        # invalidate sequence if different tid
+        if self.tid != tid:
+            if self.iterdata.seq != NULL: free( self.iterdata.seq )
+            self.iterdata.seq = NULL
+            self.iterdata.tid = -1
+
+        # self.pileup_iter = bam_plp_init( &__advancepileup, &self.iterdata )
+        bam_plp_reset(self.pileup_iter)
+
+    def __dealloc__(self):
+        # reset in order to avoid memory leak messages for iterators 
+        # that have not been fully consumed
+        if self.pileup_iter != <bam_plp_t>NULL:
+            bam_plp_reset(self.pileup_iter)
+            bam_plp_destroy(self.pileup_iter)
+            self.pileup_iter = <bam_plp_t>NULL
+            self.plp = <bam_pileup1_t*>NULL
+
+        if self.iterdata.seq != NULL:
+            free(self.iterdata.seq)
+            self.iterdata.seq = NULL
+
+
+cdef class IteratorColumnRegion(IteratorColumn):
+    '''iterates over a region only.
+    '''
+    def __cinit__(self, Samfile samfile,
+                  int tid = 0,
+                  int start = 0,
+                  int end = max_pos,
+                  int truncate = False,
+                  **kwargs ):
+
+        # initialize iterator
+        self.setupIteratorData( tid, start, end, 1 )
+        self.start = start
+        self.end = end
+        self.truncate = truncate
+
+    def __next__(self):
+        """python version of next().
+        """
+
+        while 1:
+            self.cnext()
+            if self.n_plp < 0:
+                raise ValueError("error during iteration" )
+
+            if self.plp == NULL:
+                raise StopIteration
+            
+            if self.truncate:
+                if self.start > self.pos: continue
+                if self.pos >= self.end: raise StopIteration
+
+            return makePileupProxy(&self.plp,
+                                   self.tid,
+                                   self.pos,
+                                   self.n_plp)
+
+
+cdef class IteratorColumnAllRefs(IteratorColumn):
+    """iterates over all columns by chaining iterators over each reference
+    """
+
+    def __cinit__(self,
+                  Samfile samfile,
+                  **kwargs):
+
+        # no iteration over empty files
+        if not samfile.nreferences:
+            raise StopIteration
+
+        # initialize iterator
+        self.setupIteratorData(self.tid, 0, max_pos, 1)
+
+    def __next__(self):
+        """python version of next().
+        """
+
+        while 1:
+            self.cnext()
+
+            if self.n_plp < 0:
+                raise ValueError("error during iteration" )
+
+            # return result, if within same reference
+            if self.plp != NULL:
+                return makePileupProxy(&self.plp,
+                                       self.tid,
+                                       self.pos,
+                                       self.n_plp)
+                
+            # otherwise, proceed to next reference or stop
+            self.tid += 1
+            if self.tid < self.samfile.nreferences:
+                self.setupIteratorData(self.tid, 0, max_pos, 0)
+            else:
+                raise StopIteration
+
+##-------------------------------------------------------------------
+##-------------------------------------------------------------------
+##-------------------------------------------------------------------
+cdef inline int32_t query_start(bam1_t *src) except -1:
+    cdef uint32_t * cigar_p
+    cdef uint32_t k, op
+    cdef uint32_t start_offset = 0
+
+    if pysam_get_n_cigar(src):
+        cigar_p = pysam_bam_get_cigar(src);
+        for k from 0 <= k < pysam_get_n_cigar(src):
+            op = cigar_p[k] & BAM_CIGAR_MASK
+            if op == BAM_CHARD_CLIP:
+                if start_offset != 0 and start_offset != src.core.l_qseq:
+                    PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
+                    return -1
+            elif op == BAM_CSOFT_CLIP:
+                start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
+            else:
+                break
+
+    return start_offset
+
+##-------------------------------------------------------------------
+##-------------------------------------------------------------------
+##-------------------------------------------------------------------
+cdef inline int32_t query_end(bam1_t *src) except -1:
+    cdef uint32_t * cigar_p
+    cdef uint32_t k, op
+    cdef uint32_t end_offset = src.core.l_qseq
+
+    if pysam_get_n_cigar(src) > 1:
+        cigar_p = pysam_bam_get_cigar(src);
+        for k from pysam_get_n_cigar(src) > k >= 1:
+            op = cigar_p[k] & BAM_CIGAR_MASK
+            if op == BAM_CHARD_CLIP:
+                if end_offset != 0 and end_offset != src.core.l_qseq:
+                    PyErr_SetString(ValueError,
+                                    'Invalid clipping in CIGAR string')
+                    return -1
+            elif op == BAM_CSOFT_CLIP:
+                end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
+            else:
+                break
+
+    if end_offset == 0:
+        end_offset = src.core.l_qseq
+
+    return end_offset
+
+
+cdef inline object get_seq_range(bam1_t *src, uint32_t start, uint32_t end):
+    cdef uint8_t * p
+    cdef uint32_t k
+    cdef char * s
+
+    if not src.core.l_qseq:
+        return None
+
+    seq = PyBytes_FromStringAndSize(NULL, end - start)
+    s   = <char*>seq
+    p   = pysam_bam_get_seq(src)
+
+    for k from start <= k < end:
+        # equivalent to seq_nt16_str[bam1_seqi(s, i)] (see bam.c)
+        # note: do not use string literal as it will be a python string
+        s[k-start] = seq_nt16_str[p[k/2] >> 4 * (1 - k%2) & 0xf]
+
+    return seq
+
+
+cdef inline object get_qual_range(bam1_t *src, uint32_t start, uint32_t end):
+    cdef uint8_t * p
+    cdef uint32_t k
+    cdef char * q
+
+    p = pysam_bam_get_qual(src)
+    if p[0] == 0xff:
+        return None
+
+    qual = PyBytes_FromStringAndSize(NULL, end - start)
+    q    = <char*>qual
+
+    for k from start <= k < end:
+        ## equivalent to t[i] + 33 (see bam.c)
+        q[k-start] = p[k] + 33
+
+    return qual
+
+cdef inline uint8_t get_type_code(value, value_type = None):
+    '''guess type code for a *value*. If *value_type* is None,
+    the type code will be inferred based on the Python type of
+    *value*'''
+    cdef uint8_t  type_code    
+    cdef char * _char_type
+
+    if value_type is None:
+        if isinstance(value, int):
+            type_code = 'i'
+        elif isinstance(value, float):
+            type_code = 'd'
+        elif isinstance(value, str):
+            type_code = 'Z'
+        elif isinstance(value, bytes):
+            type_code = 'Z'
+        else:
+            return 0
+    else:
+        if value_type not in 'Zidf':
+            return 0
+        value_type = _forceBytes( value_type )
+        _char_type = value_type
+        type_code = (<uint8_t*>_char_type)[0]
+
+    return type_code
+
+cdef inline convert_python_tag(pytag, value, fmts, args):
+    
+    if not type(pytag) is bytes:
+        pytag = pytag.encode('ascii')
+    t = type(value)
+
+    if t is tuple or t is list:
+        # binary tags - treat separately
+        pytype = 'B'
+        # get data type - first value determines type
+        if type(value[0]) is float:
+            datafmt, datatype = "f", "f"
+        else:
+            mi, ma = min(value), max(value)
+            absmax = max( abs(mi), abs(ma) )
+            # signed ints
+            if mi < 0: 
+                if mi >= -127: datafmt, datatype = "b", 'c'
+                elif mi >= -32767: datafmt, datatype = "h", 's'
+                elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+                else: datafmt, datatype = "i", 'i'
+
+            # unsigned ints
+            else:
+                if absmax <= 255: datafmt, datatype = "B", 'C'
+                elif absmax <= 65535: datafmt, datatype = "H", 'S'
+                elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+                else: datafmt, datatype = "I", 'I'
+
+        datafmt = "2sccI%i%s" % (len(value), datafmt)
+        args.extend( [pytag[:2], 
+                      pytype.encode('ascii'),
+                      datatype.encode('ascii'),
+                      len(value)] + list(value) )
+        fmts.append( datafmt )
+        return
+
+    if t is float:
+        fmt, pytype = "2scf", 'f'
+    elif t is int:
+        # negative values
+        if value < 0:
+            if value >= -127: fmt, pytype = "2scb", 'c'
+            elif value >= -32767: fmt, pytype = "2sch", 's'
+            elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+            else: fmt, pytype = "2sci", 'i'
+        # positive values
+        else:
+            if value <= 255: fmt, pytype = "2scB", 'C'
+            elif value <= 65535: fmt, pytype = "2scH", 'S'
+            elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+            else: fmt, pytype = "2scI", 'I'
+    else:
+        # Note: hex strings (H) are not supported yet
+        if t is not bytes:
+            value = value.encode('ascii')
+        if len(value) == 1:
+            fmt, pytype = "2scc", 'A'
+        else:
+            fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+
+    args.extend( [pytag[:2],
+                  pytype.encode('ascii'),
+                  value ] )
+
+    fmts.append( fmt )
+    
+###########################################################
+###########################################################
+###########################################################
+cdef class AlignedRead:
+    '''
+    Class representing an aligned read. See the SAM format specification for
+    the meaning of fields (http://samtools.sourceforge.net/).
+
+    This class stores a handle to the samtools C-structure representing
+    an aligned read. Member read access is forwarded to the C-structure
+    and converted into python objects. This implementation should be fast,
+    as only the data needed is converted.
+
+    For write access, the C-structure is updated in-place. This is
+    not the most efficient way to build BAM entries, as the variable
+    length data is concatenated and thus needs to be resized if
+    a field is updated. Furthermore, the BAM entry might be
+    in an inconsistent state.
+
+    One issue to look out for is that the sequence should always
+    be set *before* the quality scores. Setting the sequence will
+    also erase any quality scores that were set previously.
+
+    In Python 3, the fields containing sequence and quality
+    (seq, query, qual and qqual) data are of type bytes. Other
+    string data, such as the qname field and strings in the
+    tags tuple, is represented as unicode strings. On assignment,
+    both bytes and unicode objects are allowed, but unicode strings
+    must contain only ASCII characters.
+    '''
+
+    # Now only called when instances are created from Python
+    def __init__(self):
+        # see bam_init1
+        self._delegate = <bam1_t*>calloc( 1, sizeof( bam1_t) )
+        # allocate some memory
+        # If size is 0, calloc does not return a pointer that can be passed to free()
+        # so allocate 40 bytes for a new read
+        self._delegate.m_data = 40
+        self._delegate.data = <uint8_t *>calloc(
+            self._delegate.m_data, 1)
+        self._delegate.l_data = 0
+
+    def __dealloc__(self):
+        bam_destroy1(self._delegate)
+
+    def __str__(self):
+        """return string representation of alignment.
+
+        The representation is an approximate :term:`sam` format.
+
+        An aligned read might not be associated with a :term:`Samfile`.
+        As a result :term:`tid` is shown instead of the reference name.
+
+        Similarly, the tags field is returned in its parsed state.
+        """
+        # sam-parsing is done in sam.c/bam_format1_core which
+        # requires a valid header.
+        if sys.version_info[0] < 3:
+            seq = self.seq
+            qual = self.qual
+        else:
+            seq = self.seq.decode('ascii')
+            qual = self.qual.decode('ascii')
+        return "\t".join(map(str, (self.qname,
+                                   self.flag,
+                                   self.rname,
+                                   self.pos,
+                                   self.mapq,
+                                   self.cigar,
+                                   self.mrnm,
+                                   self.mpos,
+                                   self.rlen,
+                                   seq,
+                                   qual,
+                                   self.tags )))
+
+    def compare(self, AlignedRead other):
+        '''return -1,0,1, if contents in this are binary <,=,> to *other*'''
+
+        cdef int retval, x
+        cdef bam1_t *t
+        cdef bam1_t *o
+
+        t = self._delegate
+        o = other._delegate
+
+        # uncomment for debugging purposes
+        # cdef unsigned char * oo, * tt
+        # tt = <unsigned char*>(&t.core)
+        # oo = <unsigned char*>(&o.core)
+        # for x from 0 <= x < sizeof( bam1_core_t): print x, tt[x], oo[x]
+        # tt = <unsigned char*>(t.data)
+        # oo = <unsigned char*>(o.data)
+        # for x from 0 <= x < max(t.l_data, o.l_data): print x, tt[x], oo[x], chr(tt[x]), chr(oo[x])
+
+        # Fast-path test for object identity
+        if t == o:
+            return 0
+
+        retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))
+
+        if retval: return retval
+        retval = (t.l_data > o.l_data) - (t.l_data < o.l_data) # cmp(t.l_data, o.l_data)
+        if retval: return retval
+        return memcmp(t.data, o.data, t.l_data)
+
+    # Disabled so long as __cmp__ is a special method
+    def __hash__(self):
+        return _Py_HashPointer(<void *>self)
+
+    def _convert_python_tag(self, pytag, value, fmts, args):
+
+        if not type(pytag) is bytes:
+            pytag = pytag.encode('ascii')
+        t = type(value)
+
+        if t is tuple or t is list:
+            # binary tags - treat separately
+            pytype = 'B'
+            # get data type - first value determines type
+            if type(value[0]) is float:
+                datafmt, datatype = "f", "f"
+            else:
+                mi, ma = min(value), max(value)
+                absmax = max( abs(mi), abs(ma) )
+                # signed ints
+                if mi < 0: 
+                    if mi >= -127: datafmt, datatype = "b", 'c'
+                    elif mi >= -32767: datafmt, datatype = "h", 's'
+                    elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+                    else: datafmt, datatype = "i", 'i'
+
+                # unsigned ints
+                else:
+                    if absmax <= 255: datafmt, datatype = "B", 'C'
+                    elif absmax <= 65535: datafmt, datatype = "H", 'S'
+                    elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+                    else: datafmt, datatype = "I", 'I'
+                    
+            datafmt = "2sccI%i%s" % (len(value), datafmt)
+            args.extend( [pytag[:2], 
+                          pytype.encode('ascii'),
+                          datatype.encode('ascii'),
+                          len(value)] + list(value) )
+            fmts.append( datafmt )
+            return
+
+        if t is float:
+            fmt, pytype = "2scf", 'f'
+        elif t is int:
+            # negative values
+            if value < 0:
+                if value >= -127: fmt, pytype = "2scb", 'c'
+                elif value >= -32767: fmt, pytype = "2sch", 's'
+                elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+                else: fmt, pytype = "2sci", 'i'
+            # positive values
+            else:
+                if value <= 255: fmt, pytype = "2scB", 'C'
+                elif value <= 65535: fmt, pytype = "2scH", 'S'
+                elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
+                else: fmt, pytype = "2scI", 'I'
+        else:
+            # Note: hex strings (H) are not supported yet
+            if t is not bytes:
+                value = value.encode('ascii')
+            if len(value) == 1:
+                fmt, pytype = "2scc", 'A'
+            else:
+                fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
+
+        args.extend( [pytag[:2],
+                      pytype.encode('ascii'),
+                      value ] )
+        
+        fmts.append( fmt )
+
+
+    #######################################################################
+    #######################################################################
+    ## Basic properties
+    #######################################################################
+    property qname:
+        """the query name (None if not present)"""
+        def __get__(self):
+            cdef bam1_t * src
+            src = self._delegate
+            if pysam_get_l_qname(src) == 0:
+                return None
+            return _charptr_to_str(<char *>pysam_bam_get_qname(src))
+
+        def __set__(self, qname ):
+            if qname == None or len(qname) == 0: return
+            qname = _forceBytes(qname)
+            cdef bam1_t * src
+            cdef int l
+            cdef char * p
+
+            src = self._delegate
+            p = pysam_bam_get_qname( src )
+
+            # the qname is \0 terminated
+            l = len(qname) + 1
+            pysam_bam_update(src,
+                             pysam_get_l_qname(src),
+                             l,
+                             <uint8_t*>p)
+
+            
+            pysam_set_l_qname(src, l)
+
+            # re-acquire pointer to location in memory
+            # as it might have moved
+            p = pysam_bam_get_qname(src)
+
+            strncpy(p, qname, l)
+
+    property cigar:
+        """the :term:`cigar` alignment. The alignment
+        is returned as a list of tuples of (operation, length). 
+
+        If the alignment is not present, an empty list is
+        returned.
+
+        The operations are:
+
+        +-----+--------------+-----+
+        |M    |BAM_CMATCH    |0    |
+        +-----+--------------+-----+
+        |I    |BAM_CINS      |1    |
+        +-----+--------------+-----+
+        |D    |BAM_CDEL      |2    |
+        +-----+--------------+-----+
+        |N    |BAM_CREF_SKIP |3    |
+        +-----+--------------+-----+
+        |S    |BAM_CSOFT_CLIP|4    |
+        +-----+--------------+-----+
+        |H    |BAM_CHARD_CLIP|5    |
+        +-----+--------------+-----+
+        |P    |BAM_CPAD      |6    |
+        +-----+--------------+-----+
+        |=    |BAM_CEQUAL    |7    |
+        +-----+--------------+-----+
+        |X    |BAM_CDIFF     |8    |
+        +-----+--------------+-----+
+
+        .. note::
+            The output is a list of (operation, length) tuples, such as
+            ``[(0, 30)]``.
+            This is different from the SAM specification and
+            the :attr:`cigarstring` property, which uses a
+            (length, operation) order, for example: ``30M``.
+
+        To unset the cigar property, assign an empty list
+        or None.
+        """
+        def __get__(self):
+            cdef uint32_t * cigar_p
+            cdef bam1_t * src
+            cdef op, l, cigar
+            cdef int k
+            cigar = []
+
+            src = self._delegate
+            if pysam_get_n_cigar(src) == 0:
+                return cigar
+
+            cigar_p = pysam_bam_get_cigar(src);
+            for k from 0 <= k < pysam_get_n_cigar(src):
+                op = cigar_p[k] & BAM_CIGAR_MASK
+                l = cigar_p[k] >> BAM_CIGAR_SHIFT
+                cigar.append((op, l))
+            return cigar
+
+        def __set__(self, values):
+            cdef uint32_t * p
+            cdef bam1_t * src
+            cdef op, l
+            cdef int k, ncigar
+
+            k = 0
+
+            src = self._delegate
+
+            # get location of cigar string
+            p = pysam_bam_get_cigar(src)
+
+            # empty values for cigar string
+            if values is None:
+                values = []
+
+            ncigar = len(values)
+            # create space for cigar data within src.data
+            pysam_bam_update(src,
+                             pysam_get_n_cigar(src) * 4,
+                             ncigar * 4,
+                             <uint8_t*>p)
+
+            # length is number of cigar operations, not bytes
+            pysam_set_n_cigar(src, ncigar)
+
+            # re-acquire pointer to location in memory
+            # as it might have moved
+            p = pysam_bam_get_cigar(src)
+
+            # insert cigar operations
+            for op, l in values:
+                p[k] = l << BAM_CIGAR_SHIFT | op
+                k += 1
+
+            ## setting the cigar string requires updating the bin
+            pysam_set_bin(src,
+                          hts_reg2bin(
+                              src.core.pos,
+                              bam_endpos(src),
+                              14,
+                              5))
+
+    property cigarstring:
+        '''the :term:`cigar` alignment as a string.
+        
+        The cigar string is a string of alternating integers
+        and characters denoting the length and the type of
+        an operation.
+
+        .. note::
+            The order length,operation is specified in the
+            SAM format. It is different from the order of
+            the :attr:`cigar` property.
+
+        Returns the empty string if not present.
+
+        To unset the cigarstring, assign None or the
+        empty string.
+        '''
+        def __get__(self):
+            c = self.cigar
+            if c == None: return ""
+            # reverse order
+            else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
+            
+        def __set__(self, cigar):
+            if cigar is None or len(cigar) == 0:
+                self.cigar = []
+            else:
+                parts = CIGAR_REGEX.findall(cigar)
+                # reverse order
+                self.cigar = [(CIGAR2CODE[ord(y)], int(x)) for x,y in parts]
+
+    property seq:
+        """read sequence bases, including :term:`soft clipped` bases 
+        (None if not present).
+
+        In Python 3, this property is of type bytes and assigning a
+        unicode string to it consisting of ASCII characters only will
+        work, but is inefficient.
+
+        Note that assigning to seq will invalidate any quality scores.
+        Thus, to in-place edit the sequence and quality scores, copies of
+        the quality scores need to be taken. Consider trimming for example::
+
+           q = read.qual
+           read.seq = read.seq[5:10]
+           read.qual = q[5:10]
+
+        The sequence is returned as it is stored in the BAM file. Some mappers
+        might have stored a reverse complement of the original read 
+        sequence.
+        """
+        def __get__(self):
+            cdef bam1_t * src
+            cdef char * s
+            src = self._delegate
+
+            if src.core.l_qseq == 0: return None
+
+            return get_seq_range(src, 0, src.core.l_qseq)
+
+        def __set__(self, seq):
+            # samtools manages sequence and quality length memory together
+            # if no quality information is present, the first byte says 0xff.
+            cdef bam1_t * src
+            cdef uint8_t * p
+            cdef char * s
+            cdef int l, k, nbytes_new, nbytes_old
+
+            if seq == None:
+                l = 0
+            else:
+                l = len(seq)                
+                seq = _forceBytes(seq)
+
+            src = self._delegate
+
+            # as the sequence is stored in half-bytes, the total length (sequence
+            # plus quality scores) is (l+1)/2 + l
+            nbytes_new = (l + 1) / 2 + l
+            nbytes_old = (src.core.l_qseq + 1) / 2 + src.core.l_qseq
+
+            # acquire pointer to location in memory
+            p = pysam_bam_get_seq(src)
+            src.core.l_qseq = l
+
+            # change length of data field
+            pysam_bam_update(src,
+                             nbytes_old,
+                             nbytes_new,
+                             p)
+
+            if l > 0:
+                # re-acquire pointer to location in memory
+                # as it might have moved
+                p = pysam_bam_get_seq(src)
+                for k from 0 <= k < nbytes_new:
+                    p[k] = 0
+                # convert to C string
+                s = seq
+                for k from 0 <= k < l:
+                    p[k/2] |= seq_nt16_table[<unsigned char>s[k]] << 4 * (1 - k % 2)
+
+                # erase qualities
+                p = pysam_bam_get_qual(src)
+                p[0] = 0xff
+
+    property qual:
+        """read sequence base qualities, including :term:`soft
+        clipped` bases (None if not present).
+
+        In Python 3, this property is of type bytes and assigning a
+        unicode string to it consisting of ASCII characters only will
+        work, but is inefficient.
+
+        Note that to set quality scores the sequence has to be set
+        previously as this will determine the permitted length of
+        the quality score array.
+
+        This method raises a ValueError if the length of the 
+        quality scores and the sequence are not the same.
+        """
+        def __get__(self):
+
+            cdef bam1_t * src
+            cdef char * q
+
+            src = self._delegate
+
+            if src.core.l_qseq == 0: return None
+
+            return get_qual_range(src, 0, src.core.l_qseq)
+
+        def __set__(self,qual):
+            # note that space is already allocated via the sequences
+            cdef bam1_t * src
+            cdef uint8_t * p
+            cdef char * q
+            cdef int k
+
+            src = self._delegate
+            p = pysam_bam_get_qual(src)
+            if qual == None or len(qual) == 0:
+                # if absent - set to 0xff
+                p[0] = 0xff
+                return
+            qual = _forceBytes(qual)
+            cdef int l
+            # convert to C string
+            q = qual
+            l = len(qual)
+            if src.core.l_qseq != l:
+                raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
+            assert src.core.l_qseq == l
+            for k from 0 <= k < l:
+                p[k] = <uint8_t>q[k] - 33
+
+    property query:
+        """aligned portion of the read.
+
+        This is a substring of :attr:`seq` that excludes flanking bases that were
+        :term:`soft clipped` (None if not present). It is equal to ``seq[qstart:qend]``.
+
+        In Python 3, this property is of type bytes. Assigning a
+        unicode string to it consisting of ASCII characters only will
+        work, but is inefficient.
+
+        SAM/BAM files may include extra flanking bases that are
+        not part of the alignment.  These bases may be the result of the
+        Smith-Waterman or other algorithms, which may not require alignments
+        that begin at the first residue or end at the last.  In addition,
+        extra sequencing adapters, multiplex identifiers, and low-quality bases that
+        were not considered for alignment may have been retained."""
+
+        def __get__(self):
+            cdef bam1_t * src
+            cdef uint32_t start, end
+            cdef char * s
+
+            src = self._delegate
+
+            if src.core.l_qseq == 0: return None
+
+            start = query_start(src)
+            end   = query_end(src)
+
+            return get_seq_range(src, start, end)
+
+    property qqual:
+        """aligned query sequence quality values (None if not
+        present). These are the quality values that correspond to :attr:`query`, that is,
+        they exclude qualities of :term:`soft clipped` bases. This is equal to
+        ``qual[qstart:qend]``.
+
+        This property is read-only.
+
+        In Python 3, this property is of type bytes."""
+        def __get__(self):
+            cdef bam1_t * src
+            cdef uint32_t start, end
+
+            src = self._delegate
+
+            if src.core.l_qseq == 0: return None
+
+            start = query_start(src)
+            end   = query_end(src)
+
+            return get_qual_range(src, start, end)
+
+    property qstart:
+        """start index of the aligned query portion of the sequence (0-based, inclusive).
+
+        This the index of the first base in :attr:`seq` that is not soft-clipped.
+        """
+        def __get__(self):
+            return query_start(self._delegate)
+
+    property qend:
+        """end index of the aligned query portion of the sequence (0-based, exclusive)"""
+        def __get__(self):
+            return query_end(self._delegate)
+
+    property qlen:
+        """length of the aligned query sequence.
+
+        This is equal to :attr:`qend` - :attr:`qstart`"""
+        def __get__(self):
+            cdef bam1_t * src
+            src = self._delegate
+            return query_end(src)-query_start(src)
+
+    property tags:
+        """the tags in the AUX field.
+
+        This property permits convenience access to
+        the tags. Changes it the returned list will
+        not update the tags automatically. Instead,
+        the following is required for adding a
+        new tag::
+
+            read.tags = read.tags + [("RG",0)]
+
+        This method will happily write the same tag
+        multiple times.
+        """
+        def __get__(self):
+            cdef char * ctag
+            cdef bam1_t * src
+            cdef uint8_t * s
+            cdef char auxtag[3]
+            cdef char auxtype
+            cdef uint8_t byte_size
+            cdef int32_t nvalues
+
+            src = self._delegate
+            if src.l_data == 0:
+                return []
+            s = pysam_bam_get_aux(src)
+            result = []
+            auxtag[2] = 0
+            while s < (src.data + src.l_data):
+                # get tag
+                auxtag[0] = s[0]
+                auxtag[1] = s[1]
+                s += 2
+                auxtype = s[0]
+                if auxtype in ('c', 'C'):
+                    value = <int>bam_aux2i(s)
+                    s += 1
+                elif auxtype in ('s', 'S'):
+                    value = <int>bam_aux2i(s)
+                    s += 2
+                elif auxtype in ('i', 'I'):
+                    value = <int32_t>bam_aux2i(s)
+                    s += 4
+                elif auxtype == 'f':
+                    value = <float>bam_aux2f(s)
+                    s += 4
+                elif auxtype == 'd':
+                    value = <double>bam_aux2f(s)
+                    s += 8
+                elif auxtype == 'A':
+                    value = "%c" % <char>bam_aux2A(s)
+                    s += 1
+                elif auxtype in ('Z', 'H'):
+                    value = _charptr_to_str(<char*>bam_aux2Z(s))
+                    # +1 for NULL terminated string
+                    s += len(value) + 1
+                elif auxtype == 'B':
+                    s += 1
+                    byte_size, nvalues, value = convertBinaryTagToList( s )
+                    # 5 for 1 char and 1 int
+                    s += 5 + ( nvalues * byte_size) - 1
+                else:
+                    raise KeyError("unknown type '%s'" % auxtype)
+
+                s += 1
+
+                result.append((_charptr_to_str(auxtag), value))
+
+            return result
+
+        def __set__(self, tags):
+            cdef bam1_t * src
+            cdef uint8_t * s
+            cdef char * temp
+            cdef int new_size = 0
+            cdef int old_size
+            src = self._delegate
+            fmts, args = ["<"], []
+            
+            if tags is not None and len(tags) > 0:
+                for pytag, value in tags:
+                    convert_python_tag(pytag, value, fmts, args)
+                fmt = "".join(fmts)
+                new_size = struct.calcsize(fmt)
+                buffer = ctypes.create_string_buffer(new_size)
+                struct.pack_into(fmt,
+                                 buffer,
+                                 0, 
+                                 *args)
+
+            # delete the old data and allocate new space.
+            # If total_size == 0, the aux field will be
+            # empty
+            old_size = pysam_bam_get_l_aux(src)
+            pysam_bam_update(src,
+                             old_size,
+                             new_size,
+                             pysam_bam_get_aux(src))
+
+            # copy data only if there is any
+            if new_size > 0:
+                
+                # get location of new data
+                s = pysam_bam_get_aux(src)
+
+                # check if there is direct path from buffer.raw to tmp
+                p = buffer.raw
+                # create handle to make sure buffer stays alive long 
+                # enough for memcpy, see issue 129
+                temp = p
+                memcpy(s, temp, new_size)
+
+    cpdef setTag(self, tag, value, 
+                 value_type = None, 
+                 replace = True):
+        '''
+        Set optional field of alignment *tag* to *value*.  *value_type* may be specified,
+        but if not the type will be inferred based on the Python type of *value*
+
+        An existing value of the same tag will be overwritten unless
+        *replace* is set to False.
+        '''
+
+        cdef int      value_size
+        cdef uint8_t * value_ptr
+        cdef uint8_t *existing_ptr
+        cdef uint8_t  type_code
+        cdef float    float_value
+        cdef double   double_value
+        cdef int32_t  int_value
+        cdef bam1_t * src = self._delegate
+        cdef char * _value_type
+        
+        if len(tag) != 2:
+            raise ValueError('Invalid tag: %s' % tag)
+        
+        type_code = get_type_code(value, value_type)
+        if type_code == 0:
+            raise ValueError("can't guess type or invalid type code specified")
+
+        # Not Endian-safe, but then again neither is samtools!
+        if type_code == 'Z':
+            value = _forceBytes( value )
+            value_ptr    = <uint8_t*><char*>value
+            value_size   = len(value)+1
+        elif type_code == 'i':
+            int_value    = value
+            value_ptr    = <uint8_t*>&int_value
+            value_size   = sizeof(int32_t)
+        elif type_code == 'd':
+            double_value = value
+            value_ptr    = <uint8_t*>&double_value
+            value_size   = sizeof(double)
+        elif type_code == 'f':
+            float_value  = value
+            value_ptr    = <uint8_t*>&float_value
+            value_size   = sizeof(float)
+        else:
+            raise ValueError('Unsupported value_type in set_option')
+
+        tag = _forceBytes( tag )
+        if replace:
+            existing_ptr = bam_aux_get(src, tag)
+            if existing_ptr:
+                bam_aux_del(src, existing_ptr)
+
+        bam_aux_append(src,
+                       tag,
+                       type_code, 
+                       value_size,
+                       value_ptr)
+
+    property flag:
+        """properties flag"""
+        def __get__(self):
+            return pysam_get_flag(self._delegate)
+        def __set__(self, flag):
+            pysam_set_flag(self._delegate, flag)
+
+    property rname:
+        """
+        :term:`target` ID
+
+        DEPRECATED from pysam-0.4 - use tid in the future.
+        The rname field caused a lot of confusion as it returns
+        the :term:`target` ID instead of the reference sequence
+        name.
+
+        .. note::
+
+            This field contains the index of the reference sequence
+            in the sequence dictionary. To obtain the name
+            of the reference sequence, use :meth:`pysam.Samfile.getrname()`
+
+        """
+        def __get__(self): return self._delegate.core.tid
+        def __set__(self, tid): self._delegate.core.tid = tid
+
+    property tid:
+        """
+        :term:`target` ID
+
+        .. note::
+
+            This field contains the index of the reference sequence
+            in the sequence dictionary. To obtain the name
+            of the reference sequence, use :meth:`pysam.Samfile.getrname()`
+
+        """
+        def __get__(self): return self._delegate.core.tid
+        def __set__(self, tid): self._delegate.core.tid = tid
+
+    property pos:
+        """0-based leftmost coordinate"""
+        def __get__(self): return self._delegate.core.pos
+        def __set__(self, pos):
+            ## setting the position requires updating the "bin" attribute
+            cdef bam1_t * src
+            src = self._delegate
+            src.core.pos = pos
+            if pysam_get_n_cigar(src):
+                pysam_set_bin(src, 
+                              hts_reg2bin(
+                                  src.core.pos,
+                                  bam_endpos(src),
+                                  14,
+                                  5))
+            else:
+                pysam_set_bin(src,
+                              hts_reg2bin(
+                                  src.core.pos,
+                                  src.core.pos + 1,
+                                  14,
+                                  5))
+
+    property bin:
+        """properties bin"""
+        def __get__(self):
+            return pysam_get_bin(self._delegate)
+        def __set__(self, bin):
+            pysam_set_bin(self._delegate, bin)
+
+    property rlen:
+        """length of the read. This includes soft-clipped bases
+        and is equal to ``len(seq)``.
+
+        This property is read-only.
+
+        Returns 0 if not available."""
+        def __get__(self):
+            return self._delegate.core.l_qseq
+
+    property aend:
+        '''aligned reference position of the read on the reference genome.  
+        
+        aend points to one past the last aligned residue.
+        Returns None if not available.'''
+        def __get__(self):
+            cdef bam1_t * src
+            src = self._delegate
+            if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:
+                return None
+            return bam_endpos(src)
+
+    property alen:
+        '''aligned length of the read on the reference genome.
+
+        This is equal to `aend - pos`. Returns None if not available.'''
+        def __get__(self):
+            cdef bam1_t * src
+            src = self._delegate
+            if (self.flag & BAM_FUNMAP) or pysam_get_n_cigar(src) == 0:
+                return None
+            return bam_endpos(src) - \
+                self._delegate.core.pos
+
+    property mapq:
+        """mapping quality"""
+        def __get__(self):
+            return pysam_get_qual(self._delegate)
+        def __set__(self, qual):
+            pysam_set_qual(self._delegate, 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
+
+    #######################################################################
+    #######################################################################
+    ## Flags
+    #######################################################################
+    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 template length"""
+        def __get__(self):
+            return self._delegate.core.isize
+        def __set__(self, isize):
+            self._delegate.core.isize = isize
+    property is_paired:
+        """true if read is paired in sequencing"""
+        def __get__(self):
+            return (self.flag & BAM_FPAIRED) != 0
+        def __set__(self,val):
+            pysam_update_flag(self._delegate, val, BAM_FPAIRED)
+    property is_proper_pair:
+        """true if read is mapped in a proper pair"""
+        def __get__(self):
+            return (self.flag & BAM_FPROPER_PAIR) != 0
+        def __set__(self,val):
+            pysam_update_flag(self._delegate, val, BAM_FPROPER_PAIR)
+    property is_unmapped:
+        """true if read itself is unmapped"""
+        def __get__(self):
+            return (self.flag & BAM_FUNMAP) != 0
+        def __set__(self, val):
+            pysam_update_flag(self._delegate, val, BAM_FUNMAP)
+    property mate_is_unmapped:
+        """true if the mate is unmapped"""
+        def __get__(self):
+            return (self.flag & BAM_FMUNMAP) != 0
+        def __set__(self,val):
+            pysam_update_flag(self._delegate, val, BAM_FMUNMAP)
+    property is_reverse:
+        """true if read is mapped to reverse strand"""
+        def __get__(self):
+            return (self.flag & BAM_FREVERSE) != 0
+        def __set__(self,val):
+            pysam_update_flag(self._delegate, val, BAM_FREVERSE)
+    property mate_is_reverse:
+        """true is read is mapped to reverse strand"""
+        def __get__(self):
+            return (self.flag & BAM_FMREVERSE) != 0
+        def __set__(self,val):
+            pysam_update_flag(self._delegate, val, BAM_FMREVERSE)
+    property is_read1:
+        """true if this is read1"""
+        def __get__(self):
+            return (self.flag & BAM_FREAD1) != 0
+        def __set__(self,val):
+            pysam_update_flag(self._delegate, val, BAM_FREAD1)
+    property is_read2:
+        """true if this is read2"""
+        def __get__(self):
+            return (self.flag & BAM_FREAD2) != 0
+        def __set__(self, val):
+            pysam_update_flag(self._delegate, val, BAM_FREAD2)
+    property is_secondary:
+        """true if not primary alignment"""
+        def __get__(self):
+            return (self.flag & BAM_FSECONDARY) != 0
+        def __set__(self, val):
+            pysam_update_flag(self._delegate, val, BAM_FSECONDARY)
+    property is_qcfail:
+        """true if QC failure"""
+        def __get__(self):
+            return (self.flag & BAM_FQCFAIL) != 0
+        def __set__(self, val):
+            pysam_update_flag(self._delegate, val, BAM_FQCFAIL)
+    property is_duplicate:
+        """true if optical or PCR duplicate"""
+        def __get__(self):
+            return (self.flag & BAM_FDUP) != 0
+        def __set__(self, val):
+            pysam_update_flag(self._delegate, val, BAM_FDUP)
+
+    #######################################################################
+    #######################################################################
+    ## Derived properties
+    #######################################################################
+    property positions:
+        """a list of reference positions that this read aligns to."""
+        def __get__(self):
+            cdef uint32_t k, i, pos
+            cdef int op
+            cdef uint32_t * cigar_p
+            cdef bam1_t * src
+
+            src = self._delegate
+            if pysam_get_n_cigar(src) == 0:
+                return []
+
+            result = []
+            pos = src.core.pos
+            cigar_p = pysam_bam_get_cigar(src)
+
+            for k from 0 <= k < pysam_get_n_cigar(src):
+                op = cigar_p[k] & BAM_CIGAR_MASK
+                l = cigar_p[k] >> BAM_CIGAR_SHIFT
+                if op == BAM_CMATCH:
+                    for i from pos <= i < pos + l:
+                        result.append( i )
+
+                if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
+                    pos += l
+
+            return result
+
+    property inferred_length:
+        """inferred read length from CIGAR string.
+
+        Returns 0 if CIGAR string is not present.
+        """
+        def __get__(self):
+           cdef uint32_t k, qpos
+           cdef int op
+           cdef uint32_t * cigar_p
+           cdef bam1_t * src 
+
+           src = self._delegate
+           if pysam_get_n_cigar(src) == 0: return 0
+
+           qpos = 0
+           cigar_p = pysam_bam_get_cigar(src)
+
+           for k from 0 <= k < pysam_get_n_cigar(src):
+               op = cigar_p[k] & BAM_CIGAR_MASK
+
+               if op == BAM_CMATCH or op == BAM_CINS or \
+                  op == BAM_CSOFT_CLIP or \
+                  op == BAM_CEQUAL or op == BAM_CDIFF:
+                   qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
+
+           return qpos
+            
+    property aligned_pairs:
+        """a list of aligned read and reference positions.
+
+        Unaligned position are marked by None.
+        """
+        def __get__(self):
+            cdef uint32_t k, i, pos, qpos
+            cdef int op
+            cdef uint32_t * cigar_p
+            cdef bam1_t * src 
+
+            src = self._delegate
+            if pysam_get_n_cigar(src) == 0:
+                return []
+
+            result = []
+            pos = src.core.pos
+            qpos = 0
+            cigar_p = pysam_bam_get_cigar(src)
+
+            for k from 0 <= k < pysam_get_n_cigar(src):
+                op = cigar_p[k] & BAM_CIGAR_MASK
+                l = cigar_p[k] >> BAM_CIGAR_SHIFT
+
+                if op == BAM_CMATCH:
+                    for i from pos <= i < pos + l:
+                        result.append( (qpos, i) )
+                        qpos += 1
+                    pos += l
+
+                elif op == BAM_CINS:
+                    for i from pos <= i < pos + l:
+                        result.append( (qpos, None) )
+                        qpos += 1
+
+                elif op == BAM_CDEL or op == BAM_CREF_SKIP:
+                    for i from pos <= i < pos + l:
+                        result.append( (None, i) )
+                    pos += l
+                       
+            return result
+
+    property blocks:
+        """ a list of start and end positions of
+        aligned gapless blocks.
+
+        The start and end positions are in genomic 
+        coordinates. 
+      
+        Blocks are not normalized, i.e. two blocks 
+        might be directly adjacent. This happens if
+        the two blocks are separated by an insertion 
+        in the read.
+        """
+
+        def __get__(self):
+            cdef uint32_t k, pos, l
+            cdef int op
+            cdef uint32_t * cigar_p
+            cdef bam1_t * src
+
+            src = self._delegate
+            if pysam_get_n_cigar(src) == 0:
+                return []
+            
+            result = []
+            pos = src.core.pos
+            cigar_p = pysam_bam_get_cigar(src)
+            l = 0
+
+            for k from 0 <= k < pysam_get_n_cigar(src):
+                op = cigar_p[k] & BAM_CIGAR_MASK
+                l = cigar_p[k] >> BAM_CIGAR_SHIFT
+                if op == BAM_CMATCH:
+                    result.append((pos, pos + l))
+                    pos += l
+                elif op == BAM_CDEL or op == BAM_CREF_SKIP:
+                    pos += l
+
+            return result
+
+    #######################################################################
+    #######################################################################
+    ## 
+    #######################################################################
+    def overlap( self, uint32_t start, uint32_t 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
+        cdef uint32_t * cigar_p
+        cdef bam1_t * src
+
+        overlap = 0
+
+        src = self._delegate
+        if pysam_get_n_cigar(src) == 0:
+            return 0
+        pos = src.core.pos
+        o = 0
+
+        cigar_p = pysam_bam_get_cigar(src)
+        for k from 0 <= k < pysam_get_n_cigar(src):
+            op = cigar_p[k] & BAM_CIGAR_MASK
+            l = cigar_p[k] >> BAM_CIGAR_SHIFT
+
+            if op == BAM_CMATCH:
+                o = min( pos + l, end) - max( pos, start )
+                if o > 0: overlap += o
+
+            if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
+                pos += l
+
+        return overlap
+
+    def opt(self, tag):
+        """retrieves optional data given a two-letter *tag*"""
+        #see bam_aux.c: bam_aux_get() and bam_aux2i() etc
+        cdef uint8_t * v
+        cdef int nvalues
+        btag = _forceBytes(tag)
+        v = bam_aux_get(self._delegate, btag)
+        if v == NULL: raise KeyError( "tag '%s' not present" % tag )
+        auxtype = chr(v[0])
+        if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
+            return <int>bam_aux2i(v)
+        elif auxtype == 'i' or auxtype == 'I':
+            return <int32_t>bam_aux2i(v)
+        elif auxtype == 'f' or auxtype == 'F':
+            return <float>bam_aux2f(v)
+        elif auxtype == 'd' or auxtype == 'D':
+            return <double>bam_aux2f(v)
+        elif auxtype == 'A':
+            # there might a more efficient way
+            # to convert a char into a string
+            return '%c' % <char>bam_aux2A(v)
+        elif auxtype == 'Z':
+            return _charptr_to_str(<char*>bam_aux2Z(v))
+        elif auxtype == 'B':
+            bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
+            return values
+        else:
+            raise ValueError("unknown auxilliary type '%s'" % auxtype)
+
+
+    def fancy_str (self):
+        """returns list of fieldnames/values in pretty format for debugging.
+
+        """
+        ret_string = []
+
+        # Originally written by Leo. Note that not all of these fields
+        # exist. Deprecate?
+        field_names = {
+           "tid":           "Contig index",
+           "pos":           "Mapped position on contig",
+           "mtid":          "Contig index for mate pair",
+           "mpos":          "Position of mate pair",
+           "isize":         "Insert size",
+           "flag":          "Binary flag",
+           "n_cigar":       "Count of cigar entries",
+           "cigar":         "Cigar entries",
+           "qual":          "Mapping quality",
+           "bin":           "Bam index bin number",
+           "l_qname":       "Length of query name",
+           "qname":         "Query name",
+           "l_qseq":        "Length of query sequence",
+           "qseq":          "Query sequence",
+           "bqual":         "Quality scores",
+           "l_data":         "Length of auxilary data",
+           "m_data":        "Maximum data length",
+           }
+        fields_names_in_order = ["tid", "pos", "mtid", "mpos", "isize", "flag",
+                                 "n_cigar", "cigar", "qual", "bin", "l_qname", "qname",
+                                 "l_qseq", "qseq", "bqual", "l_data", "m_data"]
+
+        for f in fields_names_in_order:
+            if f not in dir(self):
+                continue
+            ret_string.append("%-30s %-10s= %s" %
+                              (field_names[f],
+                               "(" + f + ")",
+                               self.__getattribute__(f)))
+
+        return ret_string
+
+cdef class PileupProxy:
+    '''A pileup column. A pileup column contains
+    all the reads that map to a certain target base.
+
+    tid
+        chromosome ID as is defined in the header
+    pos
+        the target base coordinate (0-based)
+    n
+        number of reads mapping to this column
+    pileups
+        list of reads (:class:`pysam.PileupRead`) aligned to this column
+
+    This class is a proxy for results returned by the samtools pileup engine.
+    If the underlying engine iterator advances, the results of this column
+    will change.
+    '''
+    def __init__(self):
+        raise TypeError("This class cannot be instantiated from Python")
+
+    def __str__(self):
+        return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
+            "\n" +\
+            "\n".join( map(str, self.pileups) )
+
+    property tid:
+        '''the chromosome ID as is defined in the header'''
+        def __get__(self): return self.tid
+
+    property n:
+        '''number of reads mapping to this column.'''
+        def __get__(self): return self.n_pu
+        def __set__(self, n): self.n_pu = n
+
+    property pos:
+        def __get__(self): return self.pos
+
+    property pileups:
+        '''list of reads (:class:`pysam.PileupRead`) aligned to this column'''
+        def __get__(self):
+            cdef int x
+            pileups = []
+
+            if self.plp == NULL or self.plp[0] == NULL:
+                raise ValueError("PileupProxy accessed after iterator finished")
+
+            # warning: there could be problems if self.n and self.buf are
+            # out of sync.
+            for x from 0 <= x < self.n_pu:
+                pileups.append(makePileupRead(&(self.plp[0][x])))
+            return pileups
+
+cdef class PileupRead:
+    '''A read aligned to a column.
+    '''
+
+    def __init__(self):
+        raise TypeError("This class cannot be instantiated from Python")
+
+    def __str__(self):
+        return "\t".join( map(str, (self.alignment, self.qpos, self.indel, self.level, self.is_del, self.is_head, self.is_tail ) ) )
+
+    property alignment:
+        """a :class:`pysam.AlignedRead` object of the aligned read"""
+        def __get__(self):
+            return self._alignment
+    property qpos:
+        """position of the read base at the pileup site, 0-based"""
+        def __get__(self):
+            return self._qpos
+    property indel:
+        """indel length; 0 for no indel, positive for ins and negative for del"""
+        def __get__(self):
+            return self._indel
+    property is_del:
+        """1 iff the base on the padded read is a deletion"""
+        def __get__(self):
+            return self._is_del
+    property is_head:
+        def __get__(self):
+            return self._is_head
+    property is_tail:
+        def __get__(self):
+            return self._is_tail
+    property level:
+        def __get__(self):
+            return self._level
+
+
+cdef class SNPCall:
+    '''the results of a SNP call.'''
+    cdef int _tid
+    cdef int _pos
+    cdef char _reference_base
+    cdef char _genotype
+    cdef int _consensus_quality
+    cdef int _snp_quality
+    cdef int _rms_mapping_quality
+    cdef int _coverage
+
+    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 reference_base:
+       '''reference base at pos. ``N`` if no reference sequence supplied.'''
+       def __get__(self): return from_string_and_size( &self._reference_base, 1 )
+
+    property genotype:
+       '''the genotype called.'''
+       def __get__(self): return from_string_and_size( &self._genotype, 1 )
+
+    property consensus_quality:
+       '''the genotype quality (Phred-scaled).'''
+       def __get__(self): return self._consensus_quality
+
+    property snp_quality:
+       '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
+       def __get__(self): return self._snp_quality
+
+    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
+
+    def __str__(self):
+
+        return "\t".join( map(str, (
+                    self.tid,
+                    self.pos,
+                    self.reference_base,
+                    self.genotype,
+                    self.consensus_quality,
+                    self.snp_quality,
+                    self.mapping_quality,
+                    self.coverage ) ) )
+
+
+cdef class IndexedReads:
+    """index a bamfile by read.
+
+    The index is kept in memory.
+
+    By default, the file is re-openend to avoid conflicts if
+    multiple operators work on the same file. Set *reopen* = False
+    to not re-open *samfile*.
+    """
+
+    def __init__(self, Samfile samfile, int reopen=True):
+
+        # makes sure that samfile stays alive as long as this
+        # object is alive.
+        self.samfile = samfile
+
+        assert samfile.isbam, "can only IndexReads on bam files"
+
+        # reopen the file - note that this makes the iterator
+        # slow and causes pileup to slow down significantly.
+        if reopen:
+            self.htsfile = hts_open(samfile._filename, 'r')
+            assert self.htsfile != NULL
+            # read header - required for accurate positioning
+            sam_hdr_read(self.htsfile)
+            self.owns_samfile = True
+        else:
+            self.htsfile = self.samfile.htsfile
+            self.owns_samfile = False
+
+        # TODO: BAM file specific
+        self.fp = self.htsfile.fp.bgzf
+
+    def build(self):
+        '''build index.'''
+
+        self.index = collections.defaultdict(list)
+
+        # this method will start indexing from the current file position
+        # if you decide
+        cdef int ret = 1
+        cdef bam1_t * b = <bam1_t*>calloc(1, sizeof( bam1_t))
+
+        cdef uint64_t pos
+
+        while ret > 0:
+            pos = bgzf_tell(self.fp)
+            ret = sam_read1(self.htsfile,
+                            self.samfile.header,
+                            b)
+            if ret > 0:
+                qname = _charptr_to_str(pysam_bam_get_qname(b))
+                self.index[qname].append(pos)
+
+        bam_destroy1(b)
+
+    def find(self, qname):
+        if qname in self.index:
+            return IteratorRowSelection(
+                self.samfile,
+                self.index[qname],
+                reopen = False)
+        else:
+            raise KeyError("read %s not found" % qname)
+
+    def __dealloc__(self):
+        if self.owns_samfile:
+            hts_close(self.htsfile)
+
+__all__ = ["Samfile",
+           "IteratorRow",
+           "IteratorColumn",
+           "AlignedRead",
+           "PileupColumn",
+           "PileupProxy",
+           "PileupRead",
+           "IndexedReads" ]
+           # "IteratorSNPCalls",
+           # "SNPCaller",
+           # "IndelCaller",
+           # "IteratorIndelCalls",
+
+
+
diff --git a/pysam/csamtools.c b/pysam/csamtools.c
index 5eff100..9118d0b 100644
--- a/pysam/csamtools.c
+++ b/pysam/csamtools.c
@@ -1,12 +1,25 @@
-/* Generated by Cython 0.18 on Sat Nov 16 01:37:33 2013 */
+/* Generated by Cython 0.20.1 on Tue Jul 15 21:20:07 2014 */
 
 #define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
 #include "Python.h"
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
 #elif PY_VERSION_HEX < 0x02040000
     #error Cython requires Python 2.4+.
 #else
+#define CYTHON_ABI "0_20_1"
 #include <stddef.h> /* For offsetof */
 #ifndef offsetof
 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -41,6 +54,9 @@
 #define CYTHON_COMPILING_IN_PYPY 0
 #define CYTHON_COMPILING_IN_CPYTHON 1
 #endif
+#if CYTHON_COMPILING_IN_PYPY
+#define Py_OptimizeFlag 0
+#endif
 #if PY_VERSION_HEX < 0x02050000
   typedef int Py_ssize_t;
   #define PY_SSIZE_T_MAX INT_MAX
@@ -48,7 +64,7 @@
   #define PY_FORMAT_SIZE_T ""
   #define CYTHON_FORMAT_SSIZE_T ""
   #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
-  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
+  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
   #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                 (PyErr_Format(PyExc_TypeError, \
                                               "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
@@ -100,13 +116,15 @@
 #if PY_MAJOR_VERSION < 3
   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
-          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
 #else
   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
 #endif
-#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
+#if PY_VERSION_HEX < 0x02060000
   #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
 #endif
 #if PY_MAJOR_VERSION >= 3
@@ -116,19 +134,47 @@
 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
+#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
+  #define Py_TPFLAGS_IS_ABSTRACT 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
   #define CYTHON_PEP393_ENABLED 1
   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                               0 : _PyUnicode_Ready((PyObject *)(op)))
   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
 #else
   #define CYTHON_PEP393_ENABLED 0
   #define __Pyx_PyUnicode_READY(op)       (0)
   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
-  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
 #endif
 #if PY_MAJOR_VERSION >= 3
   #define PyBaseString_Type            PyUnicode_Type
@@ -155,6 +201,14 @@
   #define PyBytes_Concat               PyString_Concat
   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
 #endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
 #if PY_VERSION_HEX < 0x02060000
   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
@@ -178,11 +232,12 @@
   #define PyInt_AsSsize_t              PyLong_AsSsize_t
   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
 #endif
 #if PY_MAJOR_VERSION >= 3
   #define PyBoolObject                 PyLongObject
 #endif
-#if PY_VERSION_HEX < 0x03020000
+#if PY_VERSION_HEX < 0x030200A4
   typedef long Py_hash_t;
   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
@@ -227,6 +282,40 @@
   #define __Pyx_NAMESTR(n) (n)
   #define __Pyx_DOCSTR(n)  (n)
 #endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
 
 
 #if PY_MAJOR_VERSION >= 3
@@ -253,16 +342,9 @@
 #define __PYX_HAVE_API__pysam__csamtools
 #include "string.h"
 #include "stdlib.h"
-#include "math.h"
-#include "stdio.h"
-#include "ctype.h"
-#include "unistd.h"
-#include "razf.h"
-#include "stdint.h"
-#include "bam.h"
-#include "sam.h"
-#include "faidx.h"
 #include "pysam_util.h"
+#include "sam.h"
+#include "stdio.h"
 #include "pythread.h"
 #ifdef _OPENMP
 #include <omp.h>
@@ -272,17 +354,6 @@
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
-    #define CYTHON_INLINE __inline__
-  #elif defined(_MSC_VER)
-    #define CYTHON_INLINE __inline
-  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-    #define CYTHON_INLINE inline
-  #else
-    #define CYTHON_INLINE
-  #endif
-#endif
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
@@ -296,23 +367,142 @@
 #   define CYTHON_UNUSED
 # endif
 #endif
-typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
-
-#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
-#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 #if CYTHON_COMPILING_IN_CPYTHON
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 #else
 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
 #endif
 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
 
 
 #ifdef __GNUC__
@@ -328,8 +518,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
   #define likely(x)   (x)
   #define unlikely(x) (x)
 #endif /* __GNUC__ */
-    
+
 static PyObject *__pyx_m;
+static PyObject *__pyx_d;
 static PyObject *__pyx_b;
 static PyObject *__pyx_empty_tuple;
 static PyObject *__pyx_empty_bytes;
@@ -347,45362 +538,4013 @@ static const char *__pyx_f[] = {
 };
 
 /*--- Type declarations ---*/
-struct __pyx_obj_5pysam_9csamtools_PileupRead;
-struct __pyx_obj_5pysam_9csamtools_SNPCall;
-struct __pyx_obj_5pysam_9csamtools_IteratorColumn;
-struct __pyx_obj_5pysam_9csamtools_IteratorRow;
-struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion;
-struct __pyx_obj_5pysam_9csamtools_IndexedReads;
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr;
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr;
-struct __pyx_obj_5pysam_9csamtools_Fastqfile;
-struct __pyx_obj_5pysam_9csamtools_FastqProxy;
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr;
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open;
-struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs;
-struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs;
-struct __pyx_obj_5pysam_9csamtools_Fastafile;
-struct __pyx_obj_5pysam_9csamtools_AlignedRead;
-struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection;
-struct __pyx_obj_5pysam_9csamtools_Samfile;
-struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion;
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr;
-struct __pyx_obj_5pysam_9csamtools_PileupProxy;
-struct __pyx_obj_5pysam_9csamtools_IteratorRowAll;
-struct __pyx_t_5pysam_9csamtools___iterdata;
-typedef struct __pyx_t_5pysam_9csamtools___iterdata __pyx_t_5pysam_9csamtools___iterdata;
-struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData;
-struct __pyx_t_5pysam_9csamtools_MateData;
-typedef struct __pyx_t_5pysam_9csamtools_MateData __pyx_t_5pysam_9csamtools_MateData;
-
-/* "pysam/csamtools.pxd":414
- * # Utility types
- * 
- * ctypedef struct __iterdata:             # <<<<<<<<<<<<<<
- *     samfile_t * samfile
- *     bam_iter_t iter
- */
-struct __pyx_t_5pysam_9csamtools___iterdata {
-  samfile_t *samfile;
-  bam_iter_t iter;
-  faidx_t *fastafile;
-  int tid;
-  char *seq;
-  int seq_len;
-};
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
+  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          if (acquire_gil) { \
+              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+              PyGILState_Release(__pyx_gilstate_save); \
+          } else { \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+          }
+#else
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+  #define __Pyx_RefNannyFinishContext() \
+          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+  #define __Pyx_RefNannyDeclarations
+  #define __Pyx_RefNannySetupContext(name, acquire_gil)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XINCREF(r) Py_XINCREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
+  #define __Pyx_XGOTREF(r)
+  #define __Pyx_XGIVEREF(r)
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
+#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
 
-/* "pysam/csamtools.pxd":552
- *     cdef char * getSequence( self )
- *     cdef setMask( self, mask )
- *     cdef setupIteratorData( self,             # <<<<<<<<<<<<<<
- *                             int tid,
- *                             int start,
- */
-struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData {
-  int __pyx_n;
-  int reopen;
-};
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
 
-/* "pysam/csamtools.pyx":657
- *      counter[0] += 1;
- * 
- * ctypedef struct MateData:             # <<<<<<<<<<<<<<
- *      char * name
- *      bam1_t * mate
- */
-struct __pyx_t_5pysam_9csamtools_MateData {
-  char *name;
-  bam1_t *mate;
-  uint32_t flag;
-};
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
 
-/* "pysam/csamtools.pxd":484
- *     cdef int n_pu
- * 
- * cdef class PileupRead:             # <<<<<<<<<<<<<<
- *     cdef AlignedRead _alignment
- *     cdef int32_t  _qpos
- */
-struct __pyx_obj_5pysam_9csamtools_PileupRead {
-  PyObject_HEAD
-  struct __pyx_obj_5pysam_9csamtools_AlignedRead *_alignment;
-  int32_t _qpos;
-  int _indel;
-  int _level;
-  uint32_t _is_del;
-  uint32_t _is_head;
-  uint32_t _is_tail;
-};
+#ifndef CYTHON_PROFILE
+  #define CYTHON_PROFILE 1
+#endif
+#ifndef CYTHON_TRACE
+  #define CYTHON_TRACE 0
+#endif
+#if CYTHON_TRACE
+  #undef CYTHON_PROFILE_REUSE_FRAME
+#endif
+#ifndef CYTHON_PROFILE_REUSE_FRAME
+  #define CYTHON_PROFILE_REUSE_FRAME 0
+#endif
+#if CYTHON_PROFILE || CYTHON_TRACE
+  #include "compile.h"
+  #include "frameobject.h"
+  #include "traceback.h"
+  #if CYTHON_PROFILE_REUSE_FRAME
+    #define CYTHON_FRAME_MODIFIER static
+    #define CYTHON_FRAME_DEL
+  #else
+    #define CYTHON_FRAME_MODIFIER
+    #define CYTHON_FRAME_DEL Py_CLEAR(__pyx_frame)
+  #endif
+  #define __Pyx_TraceDeclarations                                     \
+  static PyCodeObject *__pyx_frame_code = NULL;                      \
+  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;           \
+  int __Pyx_use_tracing = 0;
+  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)                            \
+  if (unlikely(PyThreadState_GET()->use_tracing &&                                   \
+          (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc)))) {      \
+      __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno);  \
+  }
+  #define __Pyx_TraceException()                                                           \
+  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing &&                   \
+          (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc))) {  \
+      PyThreadState* tstate = PyThreadState_GET();                                         \
+      tstate->use_tracing = 0;                                                             \
+      PyObject *exc_info = __Pyx_GetExceptionTuple();                                      \
+      if (exc_info) {                                                                      \
+          if (CYTHON_TRACE && tstate->c_tracefunc)                                         \
+              tstate->c_tracefunc(                                                         \
+                  tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);          \
+          tstate->c_profilefunc(                                                           \
+              tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);            \
+          Py_DECREF(exc_info);                                                             \
+      }                                                                                    \
+      tstate->use_tracing = 1;                                                             \
+  }
+  #define __Pyx_TraceReturn(result)                                                  \
+  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing) {             \
+      PyThreadState* tstate = PyThreadState_GET();                                   \
+      tstate->use_tracing = 0;                                                        \
+      if (CYTHON_TRACE && tstate->c_tracefunc)                                       \
+          tstate->c_tracefunc(                                                       \
+              tstate->c_traceobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);  \
+      if (tstate->c_profilefunc)                                                     \
+          tstate->c_profilefunc(                                                     \
+              tstate->c_profileobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);  \
+      CYTHON_FRAME_DEL;                                                              \
+      tstate->use_tracing = 1;                                                       \
+  }
+  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/
+  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
+#else
+  #define __Pyx_TraceDeclarations
+  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)
+  #define __Pyx_TraceException()
+  #define __Pyx_TraceReturn(result)
+#endif /* CYTHON_PROFILE */
+#if CYTHON_TRACE
+  #define __Pyx_TraceLine(lineno)                                                          \
+  if (unlikely(__Pyx_use_tracing) && unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_tracefunc)) {    \
+      PyThreadState* tstate = PyThreadState_GET();                                         \
+      __pyx_frame->f_lineno = lineno;                                                     \
+      tstate->use_tracing = 0;                                                             \
+      tstate->c_tracefunc(tstate->c_traceobj, __pyx_frame, PyTrace_LINE, NULL);           \
+      tstate->use_tracing = 1;                                                             \
+  }
+#else
+  #define __Pyx_TraceLine(lineno)
+#endif
 
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
 
-/* "pysam/csamtools.pyx":3474
- *     return retval, out_stderr, out_stdout
- * 
- * cdef class SNPCall:             # <<<<<<<<<<<<<<
- *     '''the results of a SNP call.'''
- *     cdef int _tid
- */
-struct __pyx_obj_5pysam_9csamtools_SNPCall {
-  PyObject_HEAD
-  int _tid;
-  int _pos;
-  char _reference_base;
-  char _genotype;
-  int _consensus_quality;
-  int _snp_quality;
-  int _rms_mapping_quality;
-  int _coverage;
-};
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
 
-/* "pysam/csamtools.pxd":533
- *     cdef int cnext(self)
- * 
- * cdef class IteratorColumn:             # <<<<<<<<<<<<<<
- * 
- *     # result of the last plbuf_push
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorColumn {
-  PyObject_HEAD
-  struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn *__pyx_vtab;
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *iter;
-  int tid;
-  int pos;
-  int n_plp;
-  int mask;
-  const bam_pileup1_t * plp;
-  bam_plp_t pileup_iter;
-  __pyx_t_5pysam_9csamtools___iterdata iterdata;
-  struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
-  struct __pyx_obj_5pysam_9csamtools_Fastafile *fastafile;
-  PyObject *stepper;
-  int max_depth;
-};
+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*/
 
-/* "pysam/csamtools.pxd":493
- *     cdef uint32_t _is_tail
- * 
- * cdef class IteratorRow:             # <<<<<<<<<<<<<<
- *     pass
- * 
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorRow {
-  PyObject_HEAD
-};
+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*/
 
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_setattro))
+        return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_setattr))
+        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+    return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
 
-/* "pysam/csamtools.pxd":496
- *     pass
- * 
- * cdef class IteratorRowRegion(IteratorRow):             # <<<<<<<<<<<<<<
- *     cdef bam_iter_t             iter # iterator state object
- *     cdef bam1_t *               b
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
-  struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *__pyx_vtab;
-  bam_iter_t iter;
-  bam1_t *b;
-  int retval;
-  struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
-  samfile_t *fp;
-  int owns_samfile;
-};
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
 
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
 
-/* "pysam/csamtools.pxd":568
- *     pass
- * 
- * cdef class IndexedReads:             # <<<<<<<<<<<<<<
- *     cdef Samfile samfile
- *     cdef samfile_t * fp
- */
-struct __pyx_obj_5pysam_9csamtools_IndexedReads {
-  PyObject_HEAD
-  struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
-  samfile_t *fp;
-  PyObject *index;
-  int owns_samfile;
-};
+static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
+    PyObject *method, *result = NULL;
+    if (unlikely(!args)) return NULL;
+    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+    if (unlikely(!method)) goto bad;
+    result = __Pyx_PyObject_Call(method, args, NULL);
+    Py_DECREF(method);
+bad:
+    Py_DECREF(args);
+    return result;
+}
+#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
+#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
+#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
+#define __Pyx_PyObject_CallMethod0(obj, name) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/
+
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
+               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck);
+
+#define __Pyx_DelItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_DelItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
+               __Pyx_DelItem_Generic(o, to_py_func(i))))
+static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j);
+static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                               CYTHON_UNUSED int is_list, int wraparound);
 
+#include <string.h>
 
-/* "pysam/csamtools.pyx":432
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)
- *             self._lengths = tuple(int(x[1]) for x in data)             # <<<<<<<<<<<<<<
- *             self.reference2length = dict(zip(self._references, self._lengths))
- * 
- */
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr {
-  PyObject_HEAD
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *__pyx_outer_scope;
-  PyObject *__pyx_v_x;
-  PyObject *__pyx_t_0;
-  Py_ssize_t __pyx_t_1;
-};
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
 
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
 
-/* "pysam/csamtools.pyx":141
- *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
- * else:
- *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
- * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
- * 
- */
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr {
-  PyObject_HEAD
-  PyObject *__pyx_v_x;
-  PyObject *__pyx_v_y;
-  PyObject *__pyx_t_0;
-  PyObject *__pyx_t_1;
-  PyObject *(*__pyx_t_2)(PyObject *);
-};
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
+#else
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
+#endif
 
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
 
-/* "pysam/csamtools.pxd":436
- *     cdef kseq_t * _delegate
- * 
- * cdef class Fastqfile:             # <<<<<<<<<<<<<<
- *     cdef object _filename
- *     cdef gzFile fastqfile
- */
-struct __pyx_obj_5pysam_9csamtools_Fastqfile {
-  PyObject_HEAD
-  struct __pyx_vtabstruct_5pysam_9csamtools_Fastqfile *__pyx_vtab;
-  PyObject *_filename;
-  gzFile fastqfile;
-  kseq_t *entry;
-};
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
 
+static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
 
-/* "pysam/csamtools.pxd":433
- *     cdef char* _fetch(self, char* reference, int start, int end, int* length)
- * 
- * cdef class FastqProxy:             # <<<<<<<<<<<<<<
- *     cdef kseq_t * _delegate
- * 
- */
-struct __pyx_obj_5pysam_9csamtools_FastqProxy {
-  PyObject_HEAD
-  kseq_t *_delegate;
-};
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, 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*/
 
-/* "pysam/csamtools.pyx":431
- *         with open( self._filename + b".fai" ) as inf:
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)             # <<<<<<<<<<<<<<
- *             self._lengths = tuple(int(x[1]) for x in data)
- *             self.reference2length = dict(zip(self._references, self._lengths))
- */
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr {
-  PyObject_HEAD
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *__pyx_outer_scope;
-  PyObject *__pyx_v_x;
-  PyObject *__pyx_t_0;
-  Py_ssize_t __pyx_t_1;
-};
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
+static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
+    int result = PySequence_Contains(seq, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
 
-/* "pysam/csamtools.pyx":411
- *         return faidx_fetch_nseq(self.fastafile)
- * 
- *     def _open(self, filename):             # <<<<<<<<<<<<<<
- *         '''open an indexed fasta file.
- * 
- */
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open {
-  PyObject_HEAD
-  PyObject *__pyx_v_data;
-};
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len)) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
 
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
 
-/* "pysam/csamtools.pxd":516
- *     cdef int cnext(self)
- * 
- * cdef class IteratorRowAllRefs(IteratorRow):             # <<<<<<<<<<<<<<
- *     cdef Samfile     samfile
- *     cdef int         tid
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
-  struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
-  int tid;
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *rowiter;
-};
+#if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX >= 0x03020000 || PY_MAJOR_VERSION < 3 && PY_VERSION_HEX >= 0x02070000)
+static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
+    PyObject *res;
+    PyTypeObject *tp = Py_TYPE(obj);
+#if PY_MAJOR_VERSION < 3
+    if (unlikely(PyInstance_Check(obj)))
+        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
+#endif
+    res = _PyType_Lookup(tp, attr_name);
+    if (likely(res)) {
+        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
+        if (!f) {
+            Py_INCREF(res);
+        } else {
+            res = f(res, obj, (PyObject *)tp);
+        }
+    } else {
+        PyErr_SetObject(PyExc_AttributeError, attr_name);
+    }
+    return res;
+}
+#else
+#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
+#endif
 
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
-/* "pysam/csamtools.pxd":565
- *     cdef int truncate
- * 
- * cdef class IteratorColumnAllRefs(IteratorColumn):             # <<<<<<<<<<<<<<
- *     pass
- * 
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs {
-  struct __pyx_obj_5pysam_9csamtools_IteratorColumn __pyx_base;
-};
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+#define __Pyx_CyFunction_USED 1
+#include <structmember.h>
+#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
+#define __Pyx_CYFUNCTION_CCLASS        0x04
+#define __Pyx_CyFunction_GetClosure(f) \
+    (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f) \
+    (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f) \
+    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
+    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+    PyCFunctionObject func;
+    PyObject *func_dict;
+    PyObject *func_weakreflist;
+    PyObject *func_name;
+    PyObject *func_qualname;
+    PyObject *func_doc;
+    PyObject *func_globals;
+    PyObject *func_code;
+    PyObject *func_closure;
+    PyObject *func_classobj; /* No-args super() class cell */
+    void *defaults;
+    int defaults_pyobjects;
+    int flags;
+    PyObject *defaults_tuple;   /* Const defaults tuple */
+    PyObject *defaults_kwdict;  /* Const kwonly defaults dict */
+    PyObject *(*defaults_getter)(PyObject *);
+    PyObject *func_annotations; /* function annotations dict */
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
+    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+                                      int flags, PyObject* qualname,
+                                      PyObject *self,
+                                      PyObject *module, PyObject *globals,
+                                      PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+                                                         size_t size,
+                                                         int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+                                                            PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+                                                             PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+                                                              PyObject *dict);
+static int __Pyx_CyFunction_init(void);
 
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
 
-/* "pysam/csamtools.pxd":428
- * # Note: need to declare all C fields and methods here
- * #
- * cdef class Fastafile:             # <<<<<<<<<<<<<<
- *     cdef object _filename, _references, _lengths, reference2length
- *     cdef faidx_t* fastafile
- */
-struct __pyx_obj_5pysam_9csamtools_Fastafile {
-  PyObject_HEAD
-  struct __pyx_vtabstruct_5pysam_9csamtools_Fastafile *__pyx_vtab;
-  PyObject *_filename;
-  PyObject *_references;
-  PyObject *_lengths;
-  PyObject *reference2length;
-  faidx_t *fastafile;
-};
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+                                           PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/
 
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
 
-/* "pysam/csamtools.pxd":444
- *     cdef int cnext(self)
- * 
- * cdef class AlignedRead:             # <<<<<<<<<<<<<<
- * 
- *     # object that this AlignedRead represents
- */
-struct __pyx_obj_5pysam_9csamtools_AlignedRead {
-  PyObject_HEAD
-  bam1_t *_delegate;
-};
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
 
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
 
-/* "pysam/csamtools.pxd":521
- *     cdef IteratorRowRegion rowiter
- * 
- * cdef class IteratorRowSelection(IteratorRow):             # <<<<<<<<<<<<<<
- *     cdef bam1_t * b
- *     cdef int current_pos
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
-  struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection *__pyx_vtab;
-  bam1_t *b;
-  int current_pos;
-  samfile_t *fp;
-  PyObject *positions;
-  int owns_samfile;
-};
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
 
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
 
-/* "pysam/csamtools.pxd":449
- *     cdef bam1_t * _delegate
- * 
- * cdef class Samfile:             # <<<<<<<<<<<<<<
- *     cdef object _filename
- *     # pointer to samfile
- */
-struct __pyx_obj_5pysam_9csamtools_Samfile {
-  PyObject_HEAD
-  struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *__pyx_vtab;
-  PyObject *_filename;
-  samfile_t *samfile;
-  bam_index_t *index;
-  int isbam;
-  int isstream;
-  int isremote;
-  bam1_t *b;
-  char *mode;
-  int64_t start_offset;
-};
+static int __Pyx_check_binary_version(void);
 
+#if !defined(__Pyx_PyIdentifier_FromString)
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
+#else
+  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
+#endif
+#endif
 
-/* "pysam/csamtools.pxd":560
- *     cdef reset( self, tid, start, end )
- * 
- * cdef class IteratorColumnRegion(IteratorColumn):             # <<<<<<<<<<<<<<
- *     cdef int start
- *     cdef int end
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion {
-  struct __pyx_obj_5pysam_9csamtools_IteratorColumn __pyx_base;
-  int start;
-  int end;
-  int truncate;
-};
+static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
 
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
 
-/* "pysam/csamtools.pyx":139
- * cdef char* CODE2CIGAR= "MIDNSHP=X"
- * if IS_PYTHON3:
- *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
- * else:
- *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
- */
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr {
-  PyObject_HEAD
-  PyObject *__pyx_v_x;
-  PyObject *__pyx_v_y;
-  PyObject *__pyx_t_0;
-  PyObject *__pyx_t_1;
-  PyObject *(*__pyx_t_2)(PyObject *);
+typedef struct {
+    int code_line;
+    PyCodeObject* code_object;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+    int count;
+    int max_count;
+    __Pyx_CodeObjectCacheEntry* entries;
 };
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
 
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename); /*proto*/
 
-/* "pysam/csamtools.pxd":478
- *     cdef char * _getrname( self, int tid )
- * 
- * cdef class PileupProxy:             # <<<<<<<<<<<<<<
- *     cdef bam_pileup1_t ** plp
- *     cdef int tid
- */
-struct __pyx_obj_5pysam_9csamtools_PileupProxy {
-  PyObject_HEAD
-  bam_pileup1_t **plp;
-  int tid;
-  int pos;
-  int n_pu;
-};
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 
 
-/* "pysam/csamtools.pxd":509
- *     cdef int cnext(self)
- * 
- * cdef class IteratorRowAll(IteratorRow):             # <<<<<<<<<<<<<<
- *     cdef bam1_t * b
- *     cdef samfile_t * fp
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorRowAll {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
-  struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll *__pyx_vtab;
-  bam1_t *b;
-  samfile_t *fp;
-  int owns_samfile;
-};
+/* Module declarations from 'libc.string' */
 
+/* Module declarations from 'libc.stdlib' */
 
+/* Module declarations from 'cpython.version' */
 
-/* "pysam/csamtools.pyx":381
- * ## Public methods
- * ######################################################################
- * cdef class Fastafile:             # <<<<<<<<<<<<<<
- *     '''*(filename)*
- * 
- */
+/* Module declarations from 'cpython.ref' */
 
-struct __pyx_vtabstruct_5pysam_9csamtools_Fastafile {
-  char *(*_fetch)(struct __pyx_obj_5pysam_9csamtools_Fastafile *, char *, int, int, int *);
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_Fastafile *__pyx_vtabptr_5pysam_9csamtools_Fastafile;
+/* Module declarations from 'cpython.exc' */
 
+/* Module declarations from 'cpython.module' */
 
-/* "pysam/csamtools.pyx":578
- *             else: return None
- * 
- * cdef class Fastqfile:             # <<<<<<<<<<<<<<
- *     '''*(filename)*
- * 
- */
+/* Module declarations from 'cpython.mem' */
 
-struct __pyx_vtabstruct_5pysam_9csamtools_Fastqfile {
-  kseq_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_Fastqfile *);
-  int (*cnext)(struct __pyx_obj_5pysam_9csamtools_Fastqfile *);
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_Fastqfile *__pyx_vtabptr_5pysam_9csamtools_Fastqfile;
+/* Module declarations from 'cpython.tuple' */
 
+/* Module declarations from 'cpython.list' */
 
-/* "pysam/csamtools.pyx":1924
- *     return ret
- * 
- * cdef class IteratorColumn:             # <<<<<<<<<<<<<<
- *     '''abstract base class for iterators over columns.
- * 
- */
+/* Module declarations from 'libc.stdio' */
 
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn {
-  int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *);
-  char *(*getSequence)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *);
-  PyObject *(*setMask)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *);
-  PyObject *(*setupIteratorData)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, int, int, int, struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData *__pyx_optional_args);
-  PyObject *(*reset)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *, PyObject *, PyObject *);
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn *__pyx_vtabptr_5pysam_9csamtools_IteratorColumn;
+/* Module declarations from 'cpython.object' */
 
+/* Module declarations from 'cpython.sequence' */
 
-/* "pysam/csamtools.pyx":2086
- *             self.iterdata.seq = NULL
- * 
- * cdef class IteratorColumnRegion(IteratorColumn):             # <<<<<<<<<<<<<<
- *     '''iterates over a region only.
- *     '''
- */
+/* Module declarations from 'cpython.mapping' */
 
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion {
-  struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn __pyx_base;
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion *__pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion;
+/* Module declarations from 'cpython.iterator' */
 
+/* Module declarations from '__builtin__' */
 
-/* "pysam/csamtools.pyx":1684
- *         if self.owns_samfile: samclose( self.fp )
- * 
- * cdef class IteratorRowAll(IteratorRow):             # <<<<<<<<<<<<<<
- *     """*(Samfile samfile, int reopen = True)*
- * 
- */
+/* Module declarations from 'cpython.type' */
+static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
 
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll {
-  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *);
-  int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *);
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll *__pyx_vtabptr_5pysam_9csamtools_IteratorRowAll;
+/* Module declarations from 'cpython.number' */
 
+/* Module declarations from 'cpython.int' */
 
-/* "pysam/csamtools.pyx":1795
- *                 raise StopIteration
- * 
- * cdef class IteratorRowSelection(IteratorRow):             # <<<<<<<<<<<<<<
- *     """*(Samfile samfile)*
- * 
- */
+/* Module declarations from '__builtin__' */
 
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection {
-  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *);
-  int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *);
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection *__pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection;
+/* Module declarations from 'cpython.bool' */
+static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
 
+/* Module declarations from 'cpython.long' */
 
-/* "pysam/csamtools.pyx":684
- * 
- * 
- * cdef class Samfile:             # <<<<<<<<<<<<<<
- *     '''*(filename, mode=None, template = None, referencenames = None, referencelengths = None, text = NULL, header = None,
- *          add_sq_text = False, check_header = True, check_sq = True )*
- */
+/* Module declarations from 'cpython.float' */
 
-struct __pyx_vtabstruct_5pysam_9csamtools_Samfile {
-  bam_header_t *(*_buildHeader)(struct __pyx_obj_5pysam_9csamtools_Samfile *, PyObject *);
-  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_Samfile *);
-  int (*cnext)(struct __pyx_obj_5pysam_9csamtools_Samfile *);
-  int (*write)(struct __pyx_obj_5pysam_9csamtools_Samfile *, struct __pyx_obj_5pysam_9csamtools_AlignedRead *, int __pyx_skip_dispatch);
-  char *(*_getrname)(struct __pyx_obj_5pysam_9csamtools_Samfile *, int);
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *__pyx_vtabptr_5pysam_9csamtools_Samfile;
+/* Module declarations from '__builtin__' */
 
+/* Module declarations from 'cpython.complex' */
+static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
 
-/* "pysam/csamtools.pyx":2123
- *                                      self.n_plp )
- * 
- * cdef class IteratorColumnAllRefs(IteratorColumn):             # <<<<<<<<<<<<<<
- *     """iterates over all columns by chaining iterators over each reference
- *     """
- */
+/* Module declarations from 'cpython.string' */
 
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs {
-  struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn __pyx_base;
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *__pyx_vtabptr_5pysam_9csamtools_IteratorColumnAllRefs;
+/* Module declarations from 'cpython.unicode' */
 
+/* Module declarations from 'cpython.dict' */
 
-/* "pysam/csamtools.pyx":1600
- * 
- * 
- * cdef class IteratorRowRegion(IteratorRow):             # <<<<<<<<<<<<<<
- *     """*(Samfile samfile, int tid, int beg, int end, int reopen = True )*
+/* Module declarations from 'cpython.instance' */
+
+/* Module declarations from 'cpython.function' */
+
+/* Module declarations from 'cpython.method' */
+
+/* Module declarations from 'cpython.weakref' */
+
+/* Module declarations from 'cpython.getargs' */
+
+/* Module declarations from 'cpython.pythread' */
+
+/* Module declarations from 'cpython.pystate' */
+
+/* Module declarations from 'cpython.cobject' */
+
+/* Module declarations from 'cpython.oldbuffer' */
+
+/* Module declarations from 'cpython.set' */
+
+/* Module declarations from 'cpython.buffer' */
+
+/* Module declarations from 'cpython.bytes' */
+
+/* Module declarations from 'cpython.pycapsule' */
+
+/* Module declarations from 'cpython' */
+
+/* Module declarations from 'pysam.csamtools' */
+static PyObject *__pyx_f_5pysam_9csamtools__forceBytes(PyObject *); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_9csamtools__forceCmdlineBytes(PyObject *); /*proto*/
+#define __Pyx_MODULE_NAME "pysam.csamtools"
+int __pyx_module_is_main_pysam__csamtools = 0;
+
+/* Implementation of 'pysam.csamtools' */
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_IOError;
+static PyObject *__pyx_builtin_AttributeError;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_open;
+static PyObject *__pyx_builtin_UnicodeDecodeError;
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_2setdevice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_4setfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_6setfd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_8restore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools__samtools_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_method, PyObject *__pyx_v_args, PyObject *__pyx_v_catch_stdout); /* proto */
+static char __pyx_k_a[] = "a";
+static char __pyx_k_i[] = "i";
+static char __pyx_k_n[] = "n";
+static char __pyx_k_o[] = "-o";
+static char __pyx_k_r[] = "r";
+static char __pyx_k_fd[] = "fd";
+static char __pyx_k_id[] = "id";
+static char __pyx_k_os[] = "os";
+static char __pyx_k_rb[] = "rb";
+static char __pyx_k_doc[] = "__doc__";
+static char __pyx_k_dup[] = "dup";
+static char __pyx_k_inf[] = "inf";
+static char __pyx_k_ofd[] = "ofd";
+static char __pyx_k_sys[] = "sys";
+static char __pyx_k_Outs[] = "Outs";
+static char __pyx_k_args[] = "args";
+static char __pyx_k_dup2[] = "dup2";
+static char __pyx_k_exit[] = "__exit__";
+static char __pyx_k_init[] = "__init__";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_open[] = "open";
+static char __pyx_k_path[] = "path";
+static char __pyx_k_read[] = "read";
+static char __pyx_k_self[] = "self";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_view[] = "view";
+static char __pyx_k_ascii[] = "ascii";
+static char __pyx_k_cargs[] = "cargs";
+static char __pyx_k_close[] = "close";
+static char __pyx_k_enter[] = "__enter__";
+static char __pyx_k_flush[] = "flush";
+static char __pyx_k_index[] = "index";
+static char __pyx_k_setfd[] = "setfd";
+static char __pyx_k_append[] = "append";
+static char __pyx_k_encode[] = "encode";
+static char __pyx_k_exists[] = "exists";
+static char __pyx_k_fileno[] = "fileno";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_method[] = "method";
+static char __pyx_k_module[] = "__module__";
+static char __pyx_k_remove[] = "remove";
+static char __pyx_k_retval[] = "retval";
+static char __pyx_k_stderr[] = "stderr";
+static char __pyx_k_stdout[] = "stdout";
+static char __pyx_k_IOError[] = "IOError";
+static char __pyx_k_O_CREAT[] = "O_CREAT";
+static char __pyx_k_mkstemp[] = "mkstemp";
+static char __pyx_k_prepare[] = "__prepare__";
+static char __pyx_k_restore[] = "restore";
+static char __pyx_k_setfile[] = "setfile";
+static char __pyx_k_streams[] = "streams";
+static char __pyx_k_O_WRONLY[] = "O_WRONLY";
+static char __pyx_k_filename[] = "filename";
+static char __pyx_k_platform[] = "platform";
+static char __pyx_k_qualname[] = "__qualname__";
+static char __pyx_k_samtools[] = "samtools";
+static char __pyx_k_stderr_f[] = "stderr_f";
+static char __pyx_k_stderr_h[] = "stderr_h";
+static char __pyx_k_stdout_f[] = "stdout_f";
+static char __pyx_k_stdout_h[] = "stdout_h";
+static char __pyx_k_tempfile[] = "tempfile";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_metaclass[] = "__metaclass__";
+static char __pyx_k_readlines[] = "readlines";
+static char __pyx_k_setdevice[] = "setdevice";
+static char __pyx_k_IS_PYTHON3[] = "IS_PYTHON3";
+static char __pyx_k_Outs_setfd[] = "Outs.setfd";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_out_stderr[] = "out_stderr";
+static char __pyx_k_out_stdout[] = "out_stdout";
+static char __pyx_k_Outs___init[] = "Outs.__init__";
+static char __pyx_k_stdout_save[] = "stdout_save";
+static char __pyx_k_Outs_restore[] = "Outs.restore";
+static char __pyx_k_Outs_setfile[] = "Outs.setfile";
+static char __pyx_k_catch_stdout[] = "catch_stdout";
+static char __pyx_k_AttributeError[] = "AttributeError";
+static char __pyx_k_Outs_setdevice[] = "Outs.setdevice";
+static char __pyx_k_pysam_csamtools[] = "pysam.csamtools";
+static char __pyx_k_samtools_dispatch[] = "_samtools_dispatch";
+static char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
+static char __pyx_k_No_such_file_or_directory_s[] = "No such file or directory: '%s'";
+static char __pyx_k_home_andreas_devel_pysam_pysam[] = "/home/andreas/devel/pysam/pysam/csamtools.pyx";
+static char __pyx_k_Argument_must_be_string_bytes_or[] = "Argument must be string, bytes or unicode.";
+static char __pyx_k_http_mail_python_org_pipermail_p[] = "http://mail.python.org/pipermail/python-list/2000-June/038406.html";
+static char __pyx_k_option_o_is_forbidden_in_samtool[] = "option -o is forbidden in samtools view";
+static PyObject *__pyx_kp_u_Argument_must_be_string_bytes_or;
+static PyObject *__pyx_n_s_AttributeError;
+static PyObject *__pyx_n_s_IOError;
+static PyObject *__pyx_n_s_IS_PYTHON3;
+static PyObject *__pyx_kp_s_No_such_file_or_directory_s;
+static PyObject *__pyx_n_s_O_CREAT;
+static PyObject *__pyx_n_s_O_WRONLY;
+static PyObject *__pyx_n_s_Outs;
+static PyObject *__pyx_n_s_Outs___init;
+static PyObject *__pyx_n_s_Outs_restore;
+static PyObject *__pyx_n_s_Outs_setdevice;
+static PyObject *__pyx_n_s_Outs_setfd;
+static PyObject *__pyx_n_s_Outs_setfile;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_UnicodeDecodeError;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_a;
+static PyObject *__pyx_n_s_append;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_ascii;
+static PyObject *__pyx_n_s_cargs;
+static PyObject *__pyx_n_s_catch_stdout;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_dup;
+static PyObject *__pyx_n_s_dup2;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_enter;
+static PyObject *__pyx_n_s_exists;
+static PyObject *__pyx_n_s_exit;
+static PyObject *__pyx_n_s_fd;
+static PyObject *__pyx_n_s_filename;
+static PyObject *__pyx_n_s_fileno;
+static PyObject *__pyx_n_s_flush;
+static PyObject *__pyx_kp_s_home_andreas_devel_pysam_pysam;
+static PyObject *__pyx_kp_s_http_mail_python_org_pipermail_p;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_index;
+static PyObject *__pyx_n_s_inf;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_method;
+static PyObject *__pyx_n_s_mkstemp;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_n;
+static PyObject *__pyx_kp_s_o;
+static PyObject *__pyx_n_s_ofd;
+static PyObject *__pyx_n_s_open;
+static PyObject *__pyx_kp_s_option_o_is_forbidden_in_samtool;
+static PyObject *__pyx_n_s_os;
+static PyObject *__pyx_n_s_out_stderr;
+static PyObject *__pyx_n_s_out_stdout;
+static PyObject *__pyx_n_s_path;
+static PyObject *__pyx_n_s_platform;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_pysam_csamtools;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_r;
+static PyObject *__pyx_n_s_rb;
+static PyObject *__pyx_n_s_read;
+static PyObject *__pyx_n_s_readlines;
+static PyObject *__pyx_n_s_remove;
+static PyObject *__pyx_n_s_restore;
+static PyObject *__pyx_n_s_retval;
+static PyObject *__pyx_n_s_samtools_dispatch;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_setdevice;
+static PyObject *__pyx_n_s_setfd;
+static PyObject *__pyx_n_s_setfile;
+static PyObject *__pyx_n_s_stderr;
+static PyObject *__pyx_n_s_stderr_f;
+static PyObject *__pyx_n_s_stderr_h;
+static PyObject *__pyx_n_s_stdout;
+static PyObject *__pyx_n_s_stdout_f;
+static PyObject *__pyx_n_s_stdout_h;
+static PyObject *__pyx_n_s_stdout_save;
+static PyObject *__pyx_n_s_streams;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_tempfile;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_view;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_432;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_codeobj__8;
+static PyObject *__pyx_codeobj__11;
+static PyObject *__pyx_codeobj__13;
+static PyObject *__pyx_codeobj__15;
+static PyObject *__pyx_codeobj__17;
+static PyObject *__pyx_codeobj__19;
+
+/* "pysam/csamtools.pyx":18
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
  * 
+ * cdef bytes _forceBytes(object s):             # <<<<<<<<<<<<<<
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
  */
 
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion {
-  bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *);
-  int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *);
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *__pyx_vtabptr_5pysam_9csamtools_IteratorRowRegion;
-#ifndef CYTHON_REFNANNY
-  #define CYTHON_REFNANNY 0
-#endif
-#if CYTHON_REFNANNY
-  typedef struct {
-    void (*INCREF)(void*, PyObject*, int);
-    void (*DECREF)(void*, PyObject*, int);
-    void (*GOTREF)(void*, PyObject*, int);
-    void (*GIVEREF)(void*, PyObject*, int);
-    void* (*SetupContext)(const char*, int, const char*);
-    void (*FinishContext)(void**);
-  } __Pyx_RefNannyAPIStruct;
-  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
-  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
-  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
-#ifdef WITH_THREAD
-  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
-          if (acquire_gil) { \
-              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
-              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
-              PyGILState_Release(__pyx_gilstate_save); \
-          } else { \
-              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
-          }
-#else
-  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
-          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
-#endif
-  #define __Pyx_RefNannyFinishContext() \
-          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
-  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
-  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
-  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
-  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
-  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
-  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
-  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
-  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
-#else
-  #define __Pyx_RefNannyDeclarations
-  #define __Pyx_RefNannySetupContext(name, acquire_gil)
-  #define __Pyx_RefNannyFinishContext()
-  #define __Pyx_INCREF(r) Py_INCREF(r)
-  #define __Pyx_DECREF(r) Py_DECREF(r)
-  #define __Pyx_GOTREF(r)
-  #define __Pyx_GIVEREF(r)
-  #define __Pyx_XINCREF(r) Py_XINCREF(r)
-  #define __Pyx_XDECREF(r) Py_XDECREF(r)
-  #define __Pyx_XGOTREF(r)
-  #define __Pyx_XGIVEREF(r)
-#endif /* CYTHON_REFNANNY */
-#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
-#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+static PyObject *__pyx_f_5pysam_9csamtools__forceBytes(PyObject *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_forceBytes", 0);
+  __Pyx_TraceCall("_forceBytes", __pyx_f[0], 18);
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+  /* "pysam/csamtools.pyx":21
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
+ *         return s
+ *     elif s is None:
+ */
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_1) {
 
-#ifndef CYTHON_PROFILE
-  #define CYTHON_PROFILE 1
-#endif
-#ifndef CYTHON_PROFILE_REUSE_FRAME
-  #define CYTHON_PROFILE_REUSE_FRAME 0
-#endif
-#if CYTHON_PROFILE
-  #include "compile.h"
-  #include "frameobject.h"
-  #include "traceback.h"
-  #if CYTHON_PROFILE_REUSE_FRAME
-    #define CYTHON_FRAME_MODIFIER static
-    #define CYTHON_FRAME_DEL
-  #else
-    #define CYTHON_FRAME_MODIFIER
-    #define CYTHON_FRAME_DEL Py_DECREF(__pyx_frame)
-  #endif
-  #define __Pyx_TraceDeclarations                                  \
-  static PyCodeObject *__pyx_frame_code = NULL;                      \
-  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;           \
-  int __Pyx_use_tracing = 0;
-  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)                            \
-  if (unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc)) {      \
-      __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno);  \
+    /* "pysam/csamtools.pyx":22
+ *     """
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s             # <<<<<<<<<<<<<<
+ *     elif s is None:
+ *         return None
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = ((PyObject*)__pyx_v_s);
+    goto __pyx_L0;
   }
-  #define __Pyx_TraceException()                                                           \
-  if (unlikely(__Pyx_use_tracing( && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) {  \
-      PyObject *exc_info = __Pyx_GetExceptionTuple();                                      \
-      if (exc_info) {                                                                      \
-          PyThreadState_GET()->c_profilefunc(                                              \
-              PyThreadState_GET()->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);  \
-          Py_DECREF(exc_info);                                                             \
-      }                                                                                    \
+
+  /* "pysam/csamtools.pyx":23
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ *     elif s is None:             # <<<<<<<<<<<<<<
+ *         return None
+ *     elif PyBytes_Check(s):
+ */
+  __pyx_t_1 = (__pyx_v_s == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamtools.pyx":24
+ *         return s
+ *     elif s is None:
+ *         return None             # <<<<<<<<<<<<<<
+ *     elif PyBytes_Check(s):
+ *         return s
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = ((PyObject*)Py_None);
+    goto __pyx_L0;
   }
-  #define __Pyx_TraceReturn(result)                                                  \
-  if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) {  \
-      PyThreadState_GET()->c_profilefunc(                                            \
-          PyThreadState_GET()->c_profileobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result);     \
-      CYTHON_FRAME_DEL;                                                               \
+
+  /* "pysam/csamtools.pyx":25
+ *     elif s is None:
+ *         return None
+ *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
+ *         return s
+ *     elif PyUnicode_Check(s):
+ */
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/csamtools.pyx":26
+ *         return None
+ *     elif PyBytes_Check(s):
+ *         return s             # <<<<<<<<<<<<<<
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_s);
+    __pyx_r = ((PyObject*)__pyx_v_s);
+    goto __pyx_L0;
   }
-  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/
-  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
-#else
-  #define __Pyx_TraceDeclarations
-  #define __Pyx_TraceCall(funcname, srcfile, firstlineno)
-  #define __Pyx_TraceException()
-  #define __Pyx_TraceReturn(result)
-#endif /* CYTHON_PROFILE */
 
-static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
-         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
-         const char* encoding, const char* errors,
-         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+  /* "pysam/csamtools.pyx":27
+ *     elif PyBytes_Check(s):
+ *         return s
+ *     elif PyUnicode_Check(s):             # <<<<<<<<<<<<<<
+ *         return s.encode('ascii')
+ *     else:
+ */
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
 
-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*/
+    /* "pysam/csamtools.pyx":28
+ *         return s
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
 
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+    /* "pysam/csamtools.pyx":30
+ *         return s.encode('ascii')
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_bytes_or, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-#include <string.h>
+  /* "pysam/csamtools.pyx":18
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
+ * 
+ * cdef bytes _forceBytes(object s):             # <<<<<<<<<<<<<<
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ */
 
-static CYTHON_INLINE PyObject* __Pyx_tp_new(PyObject* type_obj) {
-    return (PyObject*) (((PyTypeObject*)(type_obj))->tp_new(
-        (PyTypeObject*)(type_obj), __pyx_empty_tuple, NULL));
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamtools._forceBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+/* "pysam/csamtools.pyx":33
+ * 
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):             # <<<<<<<<<<<<<<
+ *     return _forceBytes(s)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5pysam_9csamtools__forceCmdlineBytes(PyObject *__pyx_v_s) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_forceCmdlineBytes", 0);
+  __Pyx_TraceCall("_forceCmdlineBytes", __pyx_f[0], 33);
 
-static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/
+  /* "pysam/csamtools.pyx":34
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):
+ *     return _forceBytes(s)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_9csamtools__forceBytes(__pyx_v_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
 
-static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
+  /* "pysam/csamtools.pyx":33
+ * 
+ * 
+ * cdef inline bytes _forceCmdlineBytes(object s):             # <<<<<<<<<<<<<<
+ *     return _forceBytes(s)
+ * 
+ */
 
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-    PyObject *r;
-    if (!j) return NULL;
-    r = PyObject_GetItem(o, j);
-    Py_DECREF(j);
-    return r;
-}
-#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-        PyObject *r = PyList_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
-    }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-#else
-    return PySequence_GetItem(o, i);
-#endif
-}
-#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
-        PyObject *r = PyTuple_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
-    }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-#else
-    return PySequence_GetItem(o, i);
-#endif
-}
-#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (PyList_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-            PyObject *r = PyList_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    }
-    else if (PyTuple_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
-            PyObject *r = PyTuple_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    } else {  /* inlined PySequence_GetItem() */
-        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-        if (likely(m && m->sq_item)) {
-            if (unlikely(i < 0) && likely(m->sq_length)) {
-                Py_ssize_t l = m->sq_length(o);
-                if (unlikely(l < 0)) return NULL;
-                i += l;
-            }
-            return m->sq_item(o, i);
-        }
-    }
-#else
-    if (PySequence_Check(o)) {
-        return PySequence_GetItem(o, i);
-    }
-#endif
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-}
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
-    PyListObject* L = (PyListObject*) list;
-    Py_ssize_t len = Py_SIZE(list);
-    if (likely(L->allocated > len)) {
-        Py_INCREF(x);
-        PyList_SET_ITEM(list, len, x);
-        Py_SIZE(list) = len+1;
-        return 0;
-    }
-    return PyList_Append(list, x);
-}
-#else
-#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
-#endif
-
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-
-static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
-
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
-    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
-    const char* function_name); /*proto*/
-
-static 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_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
-    int result = PySequence_Contains(seq, item);
-    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamtools._forceCmdlineBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
-    const char *name, int exact); /*proto*/
+/* "pysam/csamtools.pyx":39
+ * class Outs:
+ *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
+ *     def __init__(self, id = 1):             # <<<<<<<<<<<<<<
+ *         self.streams = []
+ *         self.id = id
+ */
 
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
-    if (likely(PyList_CheckExact(L))) {
-        if (unlikely(PyList_Append(L, x) < 0)) return NULL;
-        Py_INCREF(Py_None);
-        return Py_None; /* this is just to have an accurate signature */
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_4Outs___init__[] = "Outs.__init__(self, id=1)";
+static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs___init__)};
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_id = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_id,0};
+    PyObject* values[2] = {0,0};
+    values[1] = ((PyObject *)((PyObject *)__pyx_int_1));
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_id);
+          if (value) { values[1] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
     } else {
-        PyObject *r, *m;
-        m = __Pyx_GetAttrString(L, "append");
-        if (!m) return NULL;
-        r = PyObject_CallFunctionObjArgs(m, x, NULL);
-        Py_DECREF(m);
-        return r;
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
     }
+    __pyx_v_self = values[0];
+    __pyx_v_id = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamtools.Outs.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs___init__(__pyx_self, __pyx_v_self, __pyx_v_id);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 39);
 
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+  /* "pysam/csamtools.pyx":40
+ *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
+ *     def __init__(self, id = 1):
+ *         self.streams = []             # <<<<<<<<<<<<<<
+ *         self.id = id
+ * 
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_streams, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
+  /* "pysam/csamtools.pyx":41
+ *     def __init__(self, id = 1):
+ *         self.streams = []
+ *         self.id = id             # <<<<<<<<<<<<<<
+ * 
+ *     def setdevice(self, filename):
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_id, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
+  /* "pysam/csamtools.pyx":39
+ * class Outs:
+ *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
+ *     def __init__(self, id = 1):             # <<<<<<<<<<<<<<
+ *         self.streams = []
+ *         self.id = id
+ */
 
-static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) {
-    int result = PyDict_Contains(dict, item);
-    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.csamtools.Outs.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-#if PY_MAJOR_VERSION >= 3
-static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
-    PyObject *value;
-    value = PyDict_GetItemWithError(d, key);
-    if (unlikely(!value)) {
-        if (!PyErr_Occurred())
-            PyErr_SetObject(PyExc_KeyError, key);
-        return NULL;
-    }
-    Py_INCREF(value);
-    return value;
-}
-#else
-    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
-#endif
+/* "pysam/csamtools.pyx":43
+ *         self.id = id
+ * 
+ *     def setdevice(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an existing file, like "/dev/null"'''
+ *         fd = os.open(filename, os.O_WRONLY)
+ */
 
-static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
-    PyObject* value;
-#if PY_MAJOR_VERSION >= 3
-    value = PyDict_GetItemWithError(d, key);
-    if (unlikely(!value)) {
-        if (unlikely(PyErr_Occurred()))
-            return NULL;
-        value = default_value;
-    }
-    Py_INCREF(value);
-#else
-    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
-        value = PyDict_GetItem(d, key);
-        if (unlikely(!value)) {
-            value = default_value;
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_3setdevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_4Outs_2setdevice[] = "Outs.setdevice(self, filename)\nopen an existing file, like \"/dev/null\"";
+static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_3setdevice = {__Pyx_NAMESTR("setdevice"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_3setdevice, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs_2setdevice)};
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_3setdevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_filename = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("setdevice (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("setdevice", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
-        Py_INCREF(value);
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setdevice") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
     } else {
-        PyObject *m;
-        m = __Pyx_GetAttrString(d, "get");
-        if (!m) return NULL;
-        value = PyObject_CallFunctionObjArgs(m, key,
-                                             (default_value == Py_None) ? NULL : default_value, NULL);
-        Py_DECREF(m);
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
     }
-#endif
-    return value;
-}
-
-static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */
-
-static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */
+    __pyx_v_self = values[0];
+    __pyx_v_filename = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("setdevice", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamtools.Outs.setdevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs_2setdevice(__pyx_self, __pyx_v_self, __pyx_v_filename);
 
-static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-#define __Pyx_DelItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_DelItemInt_Fast(o, i) : \
-                                                    __Pyx_DelItem_Generic(o, to_py_func(i)))
-static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
-    int r;
-    if (!j) return -1;
-    r = PyObject_DelItem(o, j);
-    Py_DECREF(j);
-    return r;
-}
-static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_PYPY
-    if (PySequence_Check(o)) {
-        return PySequence_DelItem(o, i);
-    }
-#else
-    PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-    if (likely(m && m->sq_ass_item)) {
-        if (unlikely(i < 0) && likely(m->sq_length)) {
-            Py_ssize_t l = m->sq_length(o);
-            if (unlikely(l < 0)) return -1;
-            i += l;
-        }
-        return m->sq_ass_item(o, i, (PyObject *)NULL);
-    }
-#endif
-    return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
-}
-
-static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
-
-static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
-
-static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
-
-static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/
-
-static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
-                                   PyObject *qualname, PyObject *modname); /*proto*/
-
-#define __Pyx_CyFunction_USED 1
-#include <structmember.h>
-#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
-#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
-#define __Pyx_CYFUNCTION_CCLASS        0x04
-#define __Pyx_CyFunction_GetClosure(f) \
-    (((__pyx_CyFunctionObject *) (f))->func_closure)
-#define __Pyx_CyFunction_GetClassObj(f) \
-    (((__pyx_CyFunctionObject *) (f))->func_classobj)
-#define __Pyx_CyFunction_Defaults(type, f) \
-    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
-#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
-    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
-typedef struct {
-    PyCFunctionObject func;
-    int flags;
-    PyObject *func_dict;
-    PyObject *func_weakreflist;
-    PyObject *func_name;
-    PyObject *func_qualname;
-    PyObject *func_doc;
-    PyObject *func_code;
-    PyObject *func_closure;
-    PyObject *func_classobj; /* No-args super() class cell */
-    void *defaults;
-    int defaults_pyobjects;
-    PyObject *defaults_tuple; /* Const defaults tuple */
-    PyObject *(*defaults_getter)(PyObject *);
-} __pyx_CyFunctionObject;
-static PyTypeObject *__pyx_CyFunctionType = 0;
-#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \
-    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code)
-static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
-                                      int flags, PyObject* qualname,
-                                      PyObject *self, PyObject *module,
-                                      PyObject* code);
-static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
-                                                         size_t size,
-                                                         int pyobjects);
-static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
-                                                            PyObject *tuple);
-static int __Pyx_CyFunction_init(void);
-
-static CYTHON_INLINE uint64_t __Pyx_PyInt_from_py_uint64_t(PyObject *);
-
-static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject *);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int8_t(int8_t);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint8_t(uint8_t);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int16_t(int16_t);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint16_t(uint16_t);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int32_t(int32_t);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int64_t(int64_t);
-
-static CYTHON_INLINE uint8_t __Pyx_PyInt_from_py_uint8_t(PyObject *);
-
-static CYTHON_INLINE int32_t __Pyx_PyInt_from_py_int32_t(PyObject *);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint64_t(uint64_t);
-
-static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
-
-static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
-
-static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
-
-static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
-
-static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
-
-static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
-
-static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
-
-static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
-
-static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
-
-static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
-
-static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
-
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
-
-static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
-
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
-
-static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
-
-static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
-
-static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-
-#define __Pyx_Generator_USED
-#include <structmember.h>
-#include <frameobject.h>
-typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
-typedef struct {
-    PyObject_HEAD
-    __pyx_generator_body_t body;
-    PyObject *closure;
-    PyObject *exc_type;
-    PyObject *exc_value;
-    PyObject *exc_traceback;
-    PyObject *gi_weakreflist;
-    PyObject *classobj;
-    PyObject *yieldfrom;
-    int resume_label;
-    char is_running;  // using T_BOOL for property below requires char value
-} __pyx_GeneratorObject;
-static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
-                                                  PyObject *closure);
-static int __pyx_Generator_init(void);
-static int __Pyx_Generator_clear(PyObject* self);
-#if 1 || PY_VERSION_HEX < 0x030300B0
-static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
-#else
-#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
-#endif
-
-static void __Pyx_WriteUnraisable(const char *name, int clineno,
-                                  int lineno, const char *filename); /*proto*/
-
-static int __Pyx_check_binary_version(void);
-
-static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
-
-#if !defined(__Pyx_PyIdentifier_FromString)
-#if PY_MAJOR_VERSION < 3
-  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
-#else
-  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
-#endif
-#endif
-
-static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
-
-static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
-
-typedef struct {
-    int code_line;
-    PyCodeObject* code_object;
-} __Pyx_CodeObjectCacheEntry;
-struct __Pyx_CodeObjectCache {
-    int count;
-    int max_count;
-    __Pyx_CodeObjectCacheEntry* entries;
-};
-static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
-static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
-static PyCodeObject *__pyx_find_code_object(int code_line);
-static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
-
-static void __Pyx_AddTraceback(const char *funcname, int c_line,
-                               int py_line, const char *filename); /*proto*/
-
-static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
-
-
-/* Module declarations from 'cpython.version' */
-
-/* Module declarations from 'cpython.ref' */
-
-/* Module declarations from 'cpython.exc' */
-
-/* Module declarations from 'cpython.module' */
-
-/* Module declarations from 'cpython.mem' */
-
-/* Module declarations from 'cpython.tuple' */
-
-/* Module declarations from 'cpython.list' */
-
-/* Module declarations from 'libc.string' */
-
-/* Module declarations from 'libc.stdio' */
-
-/* Module declarations from 'cpython.object' */
-
-/* Module declarations from 'cpython.sequence' */
-
-/* Module declarations from 'cpython.mapping' */
-
-/* Module declarations from 'cpython.iterator' */
-
-/* Module declarations from '__builtin__' */
-
-/* Module declarations from 'cpython.type' */
-static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
-
-/* Module declarations from 'cpython.number' */
-
-/* Module declarations from 'cpython.int' */
-
-/* Module declarations from '__builtin__' */
-
-/* Module declarations from 'cpython.bool' */
-static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
-
-/* Module declarations from 'cpython.long' */
-
-/* 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' */
-
-/* Module declarations from 'cpython.dict' */
-
-/* Module declarations from 'cpython.instance' */
-
-/* Module declarations from 'cpython.function' */
-
-/* Module declarations from 'cpython.method' */
-
-/* Module declarations from 'cpython.weakref' */
-
-/* Module declarations from 'cpython.getargs' */
-
-/* Module declarations from 'cpython.pythread' */
-
-/* Module declarations from 'cpython.pystate' */
-
-/* Module declarations from 'cpython.cobject' */
-
-/* Module declarations from 'cpython.oldbuffer' */
-
-/* Module declarations from 'cpython.set' */
-
-/* Module declarations from 'cpython.buffer' */
-
-/* Module declarations from 'cpython.bytes' */
-
-/* Module declarations from 'cpython.pycapsule' */
-
-/* Module declarations from 'cpython' */
-
-/* Module declarations from 'pysam.csamtools' */
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_Fastafile = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_FastqProxy = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_Fastqfile = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_AlignedRead = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_Samfile = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_PileupProxy = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_PileupRead = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IteratorRow = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IteratorRowRegion = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IteratorRowAll = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IteratorRowAllRefs = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IteratorRowSelection = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IteratorColumn = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IteratorColumnRegion = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IteratorColumnAllRefs = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_IndexedReads = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools_SNPCall = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools___pyx_scope_struct__genexpr = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_1_genexpr = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_2__open = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_3_genexpr = 0;
-static PyTypeObject *__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_4_genexpr = 0;
-static PyObject *__pyx_v_5pysam_9csamtools__FILENAME_ENCODING = 0;
-static char *__pyx_v_5pysam_9csamtools_CODE2CIGAR;
-static char *__pyx_v_5pysam_9csamtools_bam_nt16_rev_table;
-static int __pyx_v_5pysam_9csamtools_max_pos;
-static PyObject *__pyx_f_5pysam_9csamtools_from_string_and_size(char *, size_t); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools__encodeFilename(PyObject *); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools__force_bytes(PyObject *); /*proto*/
-static CYTHON_INLINE PyObject *__pyx_f_5pysam_9csamtools__force_cmdline_bytes(PyObject *); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools__charptr_to_str(char *); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools__force_str(PyObject *); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools_makeAlignedRead(bam1_t *); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools_makePileupProxy(bam_pileup1_t **, int, int, int); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools_makePileupRead(bam_pileup1_t *); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools_makeFastqProxy(kseq_t *); /*proto*/
-static PyObject *__pyx_f_5pysam_9csamtools_convertBinaryTagToList(uint8_t *); /*proto*/
-static int __pyx_f_5pysam_9csamtools_fetch_callback(bam1_t *, void *); /*proto*/
-static int __pyx_f_5pysam_9csamtools_pileup_callback(uint32_t, uint32_t, int, bam_pileup1_t *, void *); /*proto*/
-static int __pyx_f_5pysam_9csamtools_pileup_fetch_callback(bam1_t *, void *); /*proto*/
-static int __pyx_f_5pysam_9csamtools_count_callback(bam1_t *, void *); /*proto*/
-static int __pyx_f_5pysam_9csamtools_mate_callback(bam1_t *, void *); /*proto*/
-static int __pyx_f_5pysam_9csamtools___advance_all(void *, bam1_t *); /*proto*/
-static int __pyx_f_5pysam_9csamtools___advance_snpcalls(void *, bam1_t *); /*proto*/
-static CYTHON_INLINE int32_t __pyx_f_5pysam_9csamtools_query_start(bam1_t *); /*proto*/
-static CYTHON_INLINE int32_t __pyx_f_5pysam_9csamtools_query_end(bam1_t *); /*proto*/
-static CYTHON_INLINE PyObject *__pyx_f_5pysam_9csamtools_get_seq_range(bam1_t *, uint32_t, uint32_t); /*proto*/
-static CYTHON_INLINE PyObject *__pyx_f_5pysam_9csamtools_get_qual_range(bam1_t *, uint32_t, uint32_t); /*proto*/
-#define __Pyx_MODULE_NAME "pysam.csamtools"
-int __pyx_module_is_main_pysam__csamtools = 0;
-
-/* Implementation of 'pysam.csamtools' */
-static PyObject *__pyx_builtin_object;
-static PyObject *__pyx_builtin_TypeError;
-static PyObject *__pyx_builtin_enumerate;
-static PyObject *__pyx_builtin_ord;
-static PyObject *__pyx_builtin_map;
-static PyObject *__pyx_builtin_ValueError;
-static PyObject *__pyx_builtin_IOError;
-static PyObject *__pyx_builtin_open;
-static PyObject *__pyx_builtin_zip;
-static PyObject *__pyx_builtin_IndexError;
-static PyObject *__pyx_builtin_StopIteration;
-static PyObject *__pyx_builtin_OverflowError;
-static PyObject *__pyx_builtin_NotImplementedError;
-static PyObject *__pyx_builtin_OSError;
-static PyObject *__pyx_builtin_AttributeError;
-static PyObject *__pyx_builtin_sorted;
-static PyObject *__pyx_builtin_KeyError;
-static PyObject *__pyx_builtin_min;
-static PyObject *__pyx_builtin_max;
-static PyObject *__pyx_builtin_chr;
-static PyObject *__pyx_builtin_UnicodeDecodeError;
-static PyObject *__pyx_pf_5pysam_9csamtools_2genexpr(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_5genexpr(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_12PileupColumn___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11StderrStore___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11StderrStore_2readAndRelease(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11StderrStore_4release(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11StderrStore_6__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_18StderrStoreWindows___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_18StderrStoreWindows_2readAndRelease(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_18StderrStoreWindows_4release(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_9Fastafile___cinit__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
-static Py_ssize_t __pyx_pf_5pysam_9csamtools_9Fastafile_4__len__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_5_open_genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_5_open_3genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_6_open(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_8close(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_9csamtools_9Fastafile_10__dealloc__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_10references___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_11nreferences___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_7lengths___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_12fetch(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_14getReferenceLength(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_16__getitem__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
-static int __pyx_pf_5pysam_9csamtools_9Fastafile_18__contains__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
-static int __pyx_pf_5pysam_9csamtools_10FastqProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_4name___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_8sequence___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_7comment___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_7quality___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_9Fastqfile___cinit__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_4_open(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_6close(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_9csamtools_9Fastqfile_8__dealloc__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_10__iter__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_12__next__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_7Samfile___cinit__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_4_hasIndex(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_6_open(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_template, PyObject *__pyx_v_referencenames, PyObject *__pyx_v_referencelengths, PyObject *__pyx_v_text, PyObject *__pyx_v_header, PyObject *__pyx_v_port, PyObject *__pyx_v_add_sq_text, PyObject *__pyx_v_check_header, PyObject *__pyx_v_check_sq); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_8gettid(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_10getrname(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_tid); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_12_parseRegion(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_14reset(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_16seek(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, uint64_t __pyx_v_offset, int __pyx_v_where); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_18tell(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_20fetch(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_callback, PyObject *__pyx_v_until_eof); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_22mate(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_read); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_24count(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_until_eof); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_26pileup(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_callback, PyObject *__pyx_v_kwargs); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_28close(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_9csamtools_7Samfile_30__dealloc__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_32write(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_read); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_34__enter__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_36__exit__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_11nreferences___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_10references___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_7lengths___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_6mapped___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_8unmapped___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_4text___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_6header___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_38_buildLine(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_record); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_40__iter__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_42__next__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_17IteratorRowRegion___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, int __pyx_v_tid, int __pyx_v_beg, int __pyx_v_end, int __pyx_v_reopen); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_17IteratorRowRegion_2__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_17IteratorRowRegion_4__next__(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_9csamtools_17IteratorRowRegion_6__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_14IteratorRowAll___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, int __pyx_v_reopen); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorRowAll_2__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorRowAll_4__next__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_9csamtools_14IteratorRowAll_6__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_2nextiter(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_4__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_6__next__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_20IteratorRowSelection___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, PyObject *__pyx_v_positions, int __pyx_v_reopen); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_20IteratorRowSelection_2__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_20IteratorRowSelection_4__next__(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_9csamtools_20IteratorRowSelection_6__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_14IteratorColumn___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, PyObject *__pyx_v_kwargs); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorColumn_2__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorColumn_7seq_len___get__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorColumn_4addReference(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_fastafile); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorColumn_6hasReference(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_9csamtools_14IteratorColumn_8__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_20IteratorColumnRegion___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end, int __pyx_v_truncate, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_20IteratorColumnRegion_2__next__(struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_21IteratorColumnAllRefs___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__(struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead___init__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_9csamtools_11AlignedRead_2__dealloc__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4__str__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_6compare(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_other); /* proto */
-static Py_hash_t __pyx_pf_5pysam_9csamtools_11AlignedRead_8__hash__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5qname___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5qname_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qname); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5cigar___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5cigar_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_11cigarstring___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_11cigarstring_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_cigar); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_3seq___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_3seq_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_seq); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4qual___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4qual_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qual); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5query___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5qqual___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_6qstart___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4qend___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4qlen___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4tags___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4tags_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tags); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4flag___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4flag_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5rname___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5rname_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tid); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_3tid___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_3tid_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tid); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_3pos___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_3pos_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_pos); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_3bin___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_3bin_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_bin); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4rlen___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4aend___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4alen___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4mapq___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4mapq_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qual); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4mrnm___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4mrnm_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mtid); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5rnext___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5rnext_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mtid); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4mpos___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4mpos_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5pnext___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5pnext_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5isize___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5isize_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_isize); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4tlen___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4tlen_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_isize); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_9is_paired___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_9is_paired_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_14is_proper_pair___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_14is_proper_pair_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_11is_unmapped___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_11is_unmapped_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_10is_reverse___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_10is_reverse_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_15mate_is_reverse___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read1___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read1_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read2___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read2_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_12is_secondary___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_secondary_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_9is_qcfail___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_9is_qcfail_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_12is_duplicate___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_duplicate_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_9positions___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_15inferred_length___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_13aligned_pairs___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_10overlap(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, uint32_t __pyx_v_start, uint32_t __pyx_v_end); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_12opt(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_14fancy_str(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11PileupProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_2__str__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_3tid___get__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_1n___get__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_11PileupProxy_1n_2__set__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_3pos___get__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_7pileups___get__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_10PileupRead___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_2__str__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_9alignment___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_4qpos___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_5indel___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_6is_del___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_7is_head___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_7is_tail___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_5level___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_2setdevice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_4setfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_6setfd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_8restore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools__samtools_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_method, PyObject *__pyx_v_args, PyObject *__pyx_v_catch_stdout); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_3tid___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_3pos___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_14reference_base___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_8genotype___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_17consensus_quality___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_11snp_quality___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_15mapping_quality___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_8coverage___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall___str__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_9csamtools_12IndexedReads___init__(struct __pyx_obj_5pysam_9csamtools_IndexedReads *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, int __pyx_v_reopen); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_12IndexedReads_2build(struct __pyx_obj_5pysam_9csamtools_IndexedReads *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_9csamtools_12IndexedReads_4find(struct __pyx_obj_5pysam_9csamtools_IndexedReads *__pyx_v_self, PyObject *__pyx_v_qname); /* proto */
-static void __pyx_pf_5pysam_9csamtools_12IndexedReads_6__dealloc__(struct __pyx_obj_5pysam_9csamtools_IndexedReads *__pyx_v_self); /* proto */
-static char __pyx_k_1[] = "Argument must be string or unicode.";
-static char __pyx_k_3[] = "Argument must be string, bytes or unicode.";
-static char __pyx_k_5[] = "\t";
-static char __pyx_k_6[] = "\n";
-static char __pyx_k_7[] = "calling len() on closed file";
-static char __pyx_k_9[] = "could not open file `%s`";
-static char __pyx_k_10[] = ".fai";
-static char __pyx_k_11[] = "could not locate index file";
-static char __pyx_k_15[] = "I/O operation on closed file";
-static char __pyx_k_17[] = "no sequence/region supplied.";
-static char __pyx_k_19[] = "invalid region: start (%i) > end (%i)";
-static char __pyx_k_20[] = "";
-static char __pyx_k_21[] = "start out of range (%i)";
-static char __pyx_k_22[] = "end out of range (%i)";
-static char __pyx_k_23[] = "%s:%i-%i";
-static char __pyx_k_25[] = "No such file or directory: %s";
-static char __pyx_k_30[] = "invalid file opening mode `%s`";
-static char __pyx_k_32[] = "-";
-static char __pyx_k_33[] = "http:";
-static char __pyx_k_35[] = "ftp:";
-static char __pyx_k_37[] = "either supply options `template`, `header` or  both `referencenames` and `referencelengths` for writing";
-static char __pyx_k_38[] = "unequal names and lengths of reference sequences";
-static char __pyx_k_39[] = "@SQ\tSN:%s\tLN:%s\n";
-static char __pyx_k_40[] = "file `%s` not found";
-static char __pyx_k_41[] = "could not open file (mode='%s') - is it SAM/BAM format?";
-static char __pyx_k_42[] = "file does not have valid header (mode='%s') - is it BAM format?";
-static char __pyx_k_43[] = "file does not have valid header (mode='%s') - is it SAM format?";
-static char __pyx_k_44[] = "file header is empty (mode='%s') - is it SAM/BAM format?";
-static char __pyx_k_45[] = ".bai";
-static char __pyx_k_46[] = "error while opening index `%s` ";
-static char __pyx_k_49[] = "tid %i out of range 0<=tid<%i";
-static char __pyx_k_51[] = "[:-]";
-static char __pyx_k_53[] = "invalid reference `%s`";
-static char __pyx_k_54[] = "invalid coordinates: start (%i) > end (%i)";
-static char __pyx_k_56[] = "seek only available in bam files";
-static char __pyx_k_58[] = "seek no available in streams";
-static char __pyx_k_64[] = "fetch called on bamfile without index";
-static char __pyx_k_66[] = "callback functionality requires a region/reference";
-static char __pyx_k_68[] = "no index available for fetch";
-static char __pyx_k_70[] = "fetching by region is not available for sam files";
-static char __pyx_k_72[] = "callback not implemented yet";
-static char __pyx_k_74[] = "fetch called for samfile without header";
-static char __pyx_k_77[] = "read %s: is unpaired";
-static char __pyx_k_78[] = "mate %s: is unmapped";
-static char __pyx_k_79[] = "mate not found";
-static char __pyx_k_84[] = "counting functionality requires a region/reference";
-static char __pyx_k_87[] = "count for a region is not available for sam files";
-static char __pyx_k_90[] = "no index available for pileup";
-static char __pyx_k_93[] = "pileup of samfiles not implemented yet";
-static char __pyx_k_99[] = "Samfile.mapped only available in bam files";
-static char __pyx_k__A[] = "A";
-static char __pyx_k__B[] = "B";
-static char __pyx_k__C[] = "C";
-static char __pyx_k__D[] = "D";
-static char __pyx_k__F[] = "F";
-static char __pyx_k__H[] = "H";
-static char __pyx_k__I[] = "I";
-static char __pyx_k__S[] = "S";
-static char __pyx_k__Z[] = "Z";
-static char __pyx_k__a[] = "a";
-static char __pyx_k__b[] = "b";
-static char __pyx_k__c[] = "c";
-static char __pyx_k__d[] = "d";
-static char __pyx_k__f[] = "f";
-static char __pyx_k__h[] = "h";
-static char __pyx_k__i[] = "i";
-static char __pyx_k__n[] = "n";
-static char __pyx_k__r[] = "r";
-static char __pyx_k__s[] = "s";
-static char __pyx_k__w[] = "w";
-static char __pyx_k_101[] = "mapping information not recorded in index or index not available";
-static char __pyx_k_104[] = "Samfile.unmapped only available in bam files";
-static char __pyx_k_109[] = "@";
-static char __pyx_k_111[] = "header line without '@': '%s'";
-static char __pyx_k_113[] = "header line with invalid type '%s': '%s'";
-static char __pyx_k_114[] = ":";
-static char __pyx_k_115[] = "malformatted header: no ':' in field";
-static char __pyx_k_118[] = "unknown field code '%s' in record '%s'";
-static char __pyx_k_119[] = "multiple '%s' lines are not permitted";
-static char __pyx_k_120[] = "@%s";
-static char __pyx_k_121[] = "%s:%s";
-static char __pyx_k_122[] = "invalid type for record %s: %s, expected %s";
-static char __pyx_k_124[] = "incomplete sequence information in '%s'";
-static char __pyx_k_127[] = "can not iterate over samfile without header";
-static char __pyx_k_130[] = "no index available for iteration";
-static char __pyx_k_136[] = "can only use this iterator on bam files";
-static char __pyx_k_137[] = "reference sequence for '%s' (tid=%i) not found";
-static char __pyx_k_138[] = "unknown stepper option `%s` in IteratorColumn";
-static char __pyx_k_140[] = "error during iteration";
-static char __pyx_k_143[] = "Invalid clipping in CIGAR string";
-static char __pyx_k_146[] = "%i%c";
-static char __pyx_k_147[] = "quality and sequence mismatch: %i != %i";
-static char __pyx_k_148[] = "%c";
-static char __pyx_k_149[] = "<";
-static char __pyx_k_151[] = "integer %i out of range of BAM/SAM specification";
-static char __pyx_k_152[] = "2sccI%i%s";
-static char __pyx_k_156[] = "2sc%is";
-static char __pyx_k_158[] = "create_string_buffer";
-static char __pyx_k_159[] = "tag '%s' not present";
-static char __pyx_k_160[] = "unknown auxilliary type '%s'";
-static char __pyx_k_161[] = "Contig index";
-static char __pyx_k_162[] = "Mapped position on contig";
-static char __pyx_k_163[] = "Contig index for mate pair";
-static char __pyx_k_164[] = "Position of mate pair";
-static char __pyx_k_165[] = "Insert size";
-static char __pyx_k_166[] = "Binary flag";
-static char __pyx_k_167[] = "Count of cigar entries";
-static char __pyx_k_168[] = "Cigar entries";
-static char __pyx_k_169[] = "Mapping quality";
-static char __pyx_k_170[] = "Bam index bin number";
-static char __pyx_k_171[] = "Length of query name";
-static char __pyx_k_172[] = "Query name";
-static char __pyx_k_173[] = "Length of query sequence";
-static char __pyx_k_174[] = "Query sequence";
-static char __pyx_k_175[] = "Quality scores";
-static char __pyx_k_176[] = "Length of auxilary data";
-static char __pyx_k_177[] = "Maximum data length";
-static char __pyx_k_178[] = "Current data length";
-static char __pyx_k_179[] = "%-30s %-10s= %s";
-static char __pyx_k_180[] = "(";
-static char __pyx_k_181[] = ")";
-static char __pyx_k_182[] = "This class cannot be instantiated from Python";
-static char __pyx_k_184[] = "PileupProxy accessed after iterator finished";
-static char __pyx_k_188[] = "No such file or directory: '%s'";
-static char __pyx_k_189[] = "-o";
-static char __pyx_k_190[] = "option -o is forbidden in samtools view";
-static char __pyx_k_196[] = "can only IndexReads on bam files";
-static char __pyx_k_197[] = "read %s not found";
-static char __pyx_k_198[] = "number of :term:`filename` associated with this object.";
-static char __pyx_k_199[] = "tuple with the names of :term:`reference` sequences.";
-static char __pyx_k_200[] = "number of :term:`reference` sequences in the file.";
-static char __pyx_k_201[] = "tuple with the lengths of :term:`reference` sequences.";
-static char __pyx_k_202[] = "the query name (None if not present)";
-static char __pyx_k_203[] = "the :term:`cigar` alignment (None if not present). The alignment\n        is returned as a list of tuples of (operation, length). \n        The operations are:\n\n        +-----+--------------+-----+\n        |M    |BAM_CMATCH    |0    |\n        +-----+--------------+-----+\n        |I    |BAM_CINS      |1    |\n        +-----+--------------+-----+\n        |D    |BAM_CDEL      |2    |\n        +-----+--------------+-----+\n        |N    |BAM_CREF_SKIP |3    [...]
-static char __pyx_k_204[] = "the :term:`cigar` alignment as a string.\n        \n        The cigar string is a string of alternating integers\n        and characters denoting the length and the type of\n        an operation.\n\n        .. note::\n            The order length,operation is specified in the\n            SAM format. It is different from the order of\n            the :meth:`cigar` property.\n\n        Returns the empty string if not present.\n        ";
-static char __pyx_k_205[] = "read sequence bases, including :term:`soft clipped` bases \n        (None if not present).\n\n        In Python 3, this property is of type bytes and assigning a\n        unicode string to it consisting of ASCII characters only will\n        work, but is inefficient.\n\n        Note that assigning to seq will invalidate any quality scores.\n        Thus, to in-place edit the sequence and quality scores, copies of\n        the quality scores need to be taken.  [...]
-static char __pyx_k_206[] = "read sequence base qualities, including :term:`soft\n        clipped` bases (None if not present).\n\n        In Python 3, this property is of type bytes and assigning a\n        unicode string to it consisting of ASCII characters only will\n        work, but is inefficient.\n\n        Note that to set quality scores the sequence has to be set\n        previously as this will determine the permitted length of\n        the quality score array.\n\n        This  [...]
-static char __pyx_k_207[] = "aligned portion of the read and excludes any flanking bases\n        that were :term:`soft clipped` (None if not present).\n\n        In Python 3, this property is of type bytes. Assigning a\n        unicode string to it consisting of ASCII characters only will\n        work, but is inefficient.\n\n        SAM/BAM files may included extra flanking bases sequences that were\n        not part of the alignment.  These bases may be the result of the\n        Smit [...]
-static char __pyx_k_208[] = "aligned query sequence quality values (None if not\n        present). This property is read-only.\n\n        In Python 3, this property is of type bytes.";
-static char __pyx_k_209[] = "start index of the aligned query portion of the sequence (0-based, inclusive)";
-static char __pyx_k_210[] = "end index of the aligned query portion of the sequence (0-based, exclusive)";
-static char __pyx_k_211[] = "Length of the aligned query sequence";
-static char __pyx_k_212[] = "the tags in the AUX field.\n\n        This property permits convenience access to\n        the tags. Changes it the returned list will\n        not update the tags automatically. Instead,\n        the following is required for adding a\n        new tag::\n\n            read.tags = read.tags + [(\"RG\",0)]\n\n\n        This method will happily write the same tag\n        multiple times.\n        ";
-static char __pyx_k_213[] = "properties flag";
-static char __pyx_k_214[] = "\n        :term:`target` ID\n\n        DEPRECATED from pysam-0.4 - use tid in the future.\n        The rname field caused a lot of confusion as it returns\n        the :term:`target` ID instead of the reference sequence\n        name.\n\n        .. note::\n\n            This field contains the index of the reference sequence\n            in the sequence dictionary. To obtain the name\n            of the reference sequence, use :meth:`pysam.Samfile.getrname()` [...]
-static char __pyx_k_215[] = "\n        :term:`target` ID\n\n        .. note::\n\n            This field contains the index of the reference sequence\n            in the sequence dictionary. To obtain the name\n            of the reference sequence, use :meth:`pysam.Samfile.getrname()`\n\n        ";
-static char __pyx_k_216[] = "0-based leftmost coordinate";
-static char __pyx_k_217[] = "properties bin";
-static char __pyx_k_218[] = "length of the read (read only). Returns 0 if not given.";
-static char __pyx_k_219[] = "aligned reference position of the read on the reference genome.  \n        \n        aend points to one past the last aligned residue.\n        Returns None if not available.";
-static char __pyx_k_220[] = "aligned length of the read on the reference genome.  Returns None if\n        not available.";
-static char __pyx_k_221[] = "mapping quality";
-static char __pyx_k_222[] = "the :term:`reference` id of the mate\n        deprecated, use RNEXT instead.\n        ";
-static char __pyx_k_223[] = "the :term:`reference` id of the mate ";
-static char __pyx_k_224[] = "the position of the mate\n        deprecated, use PNEXT instead.";
-static char __pyx_k_225[] = "the position of the mate";
-static char __pyx_k_226[] = "the insert size\n        deprecated: use tlen instead";
-static char __pyx_k_227[] = "the insert size";
-static char __pyx_k_228[] = "true if read is paired in sequencing";
-static char __pyx_k_229[] = "true if read is mapped in a proper pair";
-static char __pyx_k_230[] = "true if read itself is unmapped";
-static char __pyx_k_231[] = "true if the mate is unmapped";
-static char __pyx_k_232[] = "true if read is mapped to reverse strand";
-static char __pyx_k_233[] = "true is read is mapped to reverse strand";
-static char __pyx_k_234[] = "true if this is read1";
-static char __pyx_k_235[] = "true if this is read2";
-static char __pyx_k_236[] = "true if not primary alignment";
-static char __pyx_k_237[] = "true if QC failure";
-static char __pyx_k_238[] = "true if optical or PCR duplicate";
-static char __pyx_k_239[] = "a list of reference positions that this read aligns to.";
-static char __pyx_k_240[] = "inferred read length from CIGAR string.\n\n        Returns 0 if CIGAR string is not present.\n        ";
-static char __pyx_k_241[] = "a list of aligned read and reference positions.\n\n       Unaligned position are marked by None.\n       ";
-static char __pyx_k_242[] = "tuple of the lengths of the :term:`reference` sequences. The lengths are in the same order as\n        :attr:`pysam.Samfile.references`\n        ";
-static char __pyx_k_243[] = "total number of mapped reads in file.\n        ";
-static char __pyx_k_244[] = "total number of unmapped reads in file.\n        ";
-static char __pyx_k_245[] = "full contents of the :term:`sam file` header as a string.";
-static char __pyx_k_246[] = "header information within the :term:`sam file`. The records and fields are returned as\n        a two-level dictionary.\n        ";
-static char __pyx_k_247[] = "the chromosome ID as is defined in the header";
-static char __pyx_k_248[] = "number of reads mapping to this column.";
-static char __pyx_k_249[] = "list of reads (:class:`pysam.PileupRead`) aligned to this column";
-static char __pyx_k_250[] = "a :class:`pysam.AlignedRead` object of the aligned read";
-static char __pyx_k_251[] = "position of the read base at the pileup site, 0-based";
-static char __pyx_k_252[] = "indel length; 0 for no indel, positive for ins and negative for del";
-static char __pyx_k_253[] = "1 iff the base on the padded read is a deletion";
-static char __pyx_k_254[] = "current sequence length.";
-static char __pyx_k_255[] = "nucleotide position of SNP.";
-static char __pyx_k_256[] = "reference base at pos. ``N`` if no reference sequence supplied.";
-static char __pyx_k_257[] = "the genotype called.";
-static char __pyx_k_258[] = "the genotype quality (Phred-scaled).";
-static char __pyx_k_259[] = "the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.";
-static char __pyx_k_260[] = "the root mean square (rms) of the mapping quality of all reads involved in the call.";
-static char __pyx_k_261[] = "coverage or read depth - the number of reads involved in the call.";
-static char __pyx_k_262[] = "getfilesystemencoding";
-static char __pyx_k_263[] = "MIDNSHP=X";
-static char __pyx_k_264[] = "(\\d+)([MIDNSHP=X])";
-static char __pyx_k_266[] = "=ACMGRSVTWYHKDBN";
-static char __pyx_k_269[] = "/home/andreas/devel/pysam/pysam/csamtools.pyx";
-static char __pyx_k_270[] = "PileupColumn.__str__";
-static char __pyx_k_271[] = "pysam.csamtools";
-static char __pyx_k_272[] = "A pileup column. A pileup column contains\n    all the reads that map to a certain target base.\n\n    tid\n        chromosome ID as is defined in the header\n    pos\n        the target base coordinate (0-based)\n    n\n        number of reads mapping to this column\n    pileups\n        list of reads (:class:`pysam.PileupRead`) aligned to this column\n    ";
-static char __pyx_k_275[] = "StderrStore.__init__";
-static char __pyx_k_278[] = "StderrStore.readAndRelease";
-static char __pyx_k_281[] = "StderrStore.release";
-static char __pyx_k_284[] = "StderrStore.__del__";
-static char __pyx_k_285[] = "\n    stderr is captured.\n    ";
-static char __pyx_k_288[] = "StderrStoreWindows.__init__";
-static char __pyx_k_291[] = "StderrStoreWindows.readAndRelease";
-static char __pyx_k_294[] = "StderrStoreWindows.release";
-static char __pyx_k_295[] = "does nothing. stderr can't be redirected on windows";
-static char __pyx_k_304[] = "Outs.__init__";
-static char __pyx_k_307[] = "Outs.setdevice";
-static char __pyx_k_310[] = "Outs.setfile";
-static char __pyx_k_313[] = "Outs.setfd";
-static char __pyx_k_316[] = "Outs.restore";
-static char __pyx_k_317[] = "http://mail.python.org/pipermail/python-list/2000-June/038406.html";
-static char __pyx_k__AS[] = "AS";
-static char __pyx_k__CL[] = "CL";
-static char __pyx_k__CN[] = "CN";
-static char __pyx_k__CO[] = "CO";
-static char __pyx_k__DS[] = "DS";
-static char __pyx_k__DT[] = "DT";
-static char __pyx_k__FO[] = "FO";
-static char __pyx_k__GO[] = "GO";
-static char __pyx_k__HD[] = "HD";
-static char __pyx_k__ID[] = "ID";
-static char __pyx_k__KS[] = "KS";
-static char __pyx_k__LB[] = "LB";
-static char __pyx_k__LN[] = "LN";
-static char __pyx_k__M5[] = "M5";
-static char __pyx_k__PG[] = "PG";
-static char __pyx_k__PI[] = "PI";
-static char __pyx_k__PL[] = "PL";
-static char __pyx_k__PN[] = "PN";
-static char __pyx_k__PP[] = "PP";
-static char __pyx_k__PU[] = "PU";
-static char __pyx_k__RG[] = "RG";
-static char __pyx_k__SM[] = "SM";
-static char __pyx_k__SN[] = "SN";
-static char __pyx_k__SO[] = "SO";
-static char __pyx_k__SP[] = "SP";
-static char __pyx_k__SQ[] = "SQ";
-static char __pyx_k__UR[] = "UR";
-static char __pyx_k__VN[] = "VN";
-static char __pyx_k__fd[] = "fd";
-static char __pyx_k__id[] = "id";
-static char __pyx_k__os[] = "os";
-static char __pyx_k__rU[] = "rU";
-static char __pyx_k__rb[] = "rb";
-static char __pyx_k__re[] = "re";
-static char __pyx_k__wb[] = "wb";
-static char __pyx_k__wh[] = "wh";
-static char __pyx_k__all[] = "all";
-static char __pyx_k__beg[] = "beg";
-static char __pyx_k__bin[] = "bin";
-static char __pyx_k__chr[] = "chr";
-static char __pyx_k__dup[] = "dup";
-static char __pyx_k__end[] = "end";
-static char __pyx_k__inf[] = "inf";
-static char __pyx_k__map[] = "map";
-static char __pyx_k__max[] = "max";
-static char __pyx_k__min[] = "min";
-static char __pyx_k__ofd[] = "ofd";
-static char __pyx_k__ord[] = "ord";
-static char __pyx_k__pos[] = "pos";
-static char __pyx_k__raw[] = "raw";
-static char __pyx_k__seq[] = "seq";
-static char __pyx_k__sys[] = "sys";
-static char __pyx_k__tid[] = "tid";
-static char __pyx_k__wbu[] = "wbu";
-static char __pyx_k__zip[] = "zip";
-static char __pyx_k__2scB[] = "2scB";
-static char __pyx_k__2scH[] = "2scH";
-static char __pyx_k__2scI[] = "2scI";
-static char __pyx_k__2scb[] = "2scb";
-static char __pyx_k__2scc[] = "2scc";
-static char __pyx_k__2scf[] = "2scf";
-static char __pyx_k__2sch[] = "2sch";
-static char __pyx_k__2sci[] = "2sci";
-static char __pyx_k__Outs[] = "Outs";
-static char __pyx_k__args[] = "args";
-static char __pyx_k__dup2[] = "dup2";
-static char __pyx_k__flag[] = "flag";
-static char __pyx_k__join[] = "join";
-static char __pyx_k__mapq[] = "mapq";
-static char __pyx_k__mask[] = "mask";
-static char __pyx_k__mode[] = "mode";
-static char __pyx_k__mpos[] = "mpos";
-static char __pyx_k__mrnm[] = "mrnm";
-static char __pyx_k__mtid[] = "mtid";
-static char __pyx_k__open[] = "open";
-static char __pyx_k__path[] = "path";
-static char __pyx_k__port[] = "port";
-static char __pyx_k__qpos[] = "qpos";
-static char __pyx_k__qseq[] = "qseq";
-static char __pyx_k__qual[] = "qual";
-static char __pyx_k__read[] = "read";
-static char __pyx_k__rlen[] = "rlen";
-static char __pyx_k__seek[] = "seek";
-static char __pyx_k__self[] = "self";
-static char __pyx_k__tags[] = "tags";
-static char __pyx_k__text[] = "text";
-static char __pyx_k__view[] = "view";
-static char __pyx_k__warn[] = "warn";
-static char __pyx_k___open[] = "_open";
-static char __pyx_k__ascii[] = "ascii";
-static char __pyx_k__bqual[] = "bqual";
-static char __pyx_k__cargs[] = "cargs";
-static char __pyx_k__cigar[] = "cigar";
-static char __pyx_k__close[] = "close";
-static char __pyx_k__fetch[] = "fetch";
-static char __pyx_k__flush[] = "flush";
-static char __pyx_k__indel[] = "indel";
-static char __pyx_k__index[] = "index";
-static char __pyx_k__isize[] = "isize";
-static char __pyx_k__items[] = "items";
-static char __pyx_k__l_aux[] = "l_aux";
-static char __pyx_k__level[] = "level";
-static char __pyx_k__qname[] = "qname";
-static char __pyx_k__rname[] = "rname";
-static char __pyx_k__setfd[] = "setfd";
-static char __pyx_k__split[] = "split";
-static char __pyx_k__start[] = "start";
-static char __pyx_k__strip[] = "strip";
-static char __pyx_k__types[] = "types";
-static char __pyx_k__where[] = "where";
-static char __pyx_k__write[] = "write";
-static char __pyx_k__ctypes[] = "ctypes";
-static char __pyx_k__decode[] = "decode";
-static char __pyx_k__encode[] = "encode";
-static char __pyx_k__exists[] = "exists";
-static char __pyx_k__extend[] = "extend";
-static char __pyx_k__fields[] = "fields";
-static char __pyx_k__fileno[] = "fileno";
-static char __pyx_k__gettid[] = "gettid";
-static char __pyx_k__header[] = "header";
-static char __pyx_k__is_del[] = "is_del";
-static char __pyx_k__l_qseq[] = "l_qseq";
-static char __pyx_k__m_data[] = "m_data";
-static char __pyx_k__method[] = "method";
-static char __pyx_k__object[] = "object";
-static char __pyx_k__offset[] = "offset";
-static char __pyx_k__record[] = "record";
-static char __pyx_k__region[] = "region";
-static char __pyx_k__remove[] = "remove";
-static char __pyx_k__reopen[] = "reopen";
-static char __pyx_k__retval[] = "retval";
-static char __pyx_k__sorted[] = "sorted";
-static char __pyx_k__stderr[] = "stderr";
-static char __pyx_k__stdout[] = "stdout";
-static char __pyx_k__struct[] = "struct";
-static char __pyx_k__system[] = "system";
-static char __pyx_k__IOError[] = "IOError";
-static char __pyx_k__OSError[] = "OSError";
-static char __pyx_k__O_CREAT[] = "O_CREAT";
-static char __pyx_k__Samfile[] = "Samfile";
-static char __pyx_k__Windows[] = "Windows";
-static char __pyx_k____all__[] = "__all__";
-static char __pyx_k____del__[] = "__del__";
-static char __pyx_k____str__[] = "__str__";
-static char __pyx_k___isOpen[] = "_isOpen";
-static char __pyx_k__compile[] = "compile";
-static char __pyx_k__findall[] = "findall";
-static char __pyx_k__is_head[] = "is_head";
-static char __pyx_k__is_tail[] = "is_tail";
-static char __pyx_k__islower[] = "islower";
-static char __pyx_k__isupper[] = "isupper";
-static char __pyx_k__l_qname[] = "l_qname";
-static char __pyx_k__lengths[] = "lengths";
-static char __pyx_k__mkstemp[] = "mkstemp";
-static char __pyx_k__n_cigar[] = "n_cigar";
-static char __pyx_k__pileups[] = "pileups";
-static char __pyx_k__release[] = "release";
-static char __pyx_k__restore[] = "restore";
-static char __pyx_k__samfile[] = "samfile";
-static char __pyx_k__setfile[] = "setfile";
-static char __pyx_k__stepper[] = "stepper";
-static char __pyx_k__streams[] = "streams";
-static char __pyx_k__KeyError[] = "KeyError";
-static char __pyx_k__O_WRONLY[] = "O_WRONLY";
-static char __pyx_k____dict__[] = "__dict__";
-static char __pyx_k____exit__[] = "__exit__";
-static char __pyx_k____init__[] = "__init__";
-static char __pyx_k____main__[] = "__main__";
-static char __pyx_k____test__[] = "__test__";
-static char __pyx_k__calcsize[] = "calcsize";
-static char __pyx_k__callback[] = "callback";
-static char __pyx_k__check_sq[] = "check_sq";
-static char __pyx_k__coverage[] = "coverage";
-static char __pyx_k__data_len[] = "data_len";
-static char __pyx_k__exc_type[] = "exc_type";
-static char __pyx_k__filename[] = "filename";
-static char __pyx_k__genotype[] = "genotype";
-static char __pyx_k__nextiter[] = "nextiter";
-static char __pyx_k__platform[] = "platform";
-static char __pyx_k__samtools[] = "samtools";
-static char __pyx_k__stderr_f[] = "stderr_f";
-static char __pyx_k__stderr_h[] = "stderr_h";
-static char __pyx_k__stdout_f[] = "stdout_f";
-static char __pyx_k__stdout_h[] = "stdout_h";
-static char __pyx_k__tempfile[] = "tempfile";
-static char __pyx_k__template[] = "template";
-static char __pyx_k__truncate[] = "truncate";
-static char __pyx_k__warnings[] = "warnings";
-static char __pyx_k__Fastafile[] = "Fastafile";
-static char __pyx_k__Fastqfile[] = "Fastqfile";
-static char __pyx_k__TypeError[] = "TypeError";
-static char __pyx_k____enter__[] = "__enter__";
-static char __pyx_k___hasIndex[] = "_hasIndex";
-static char __pyx_k__alignment[] = "alignment";
-static char __pyx_k__enumerate[] = "enumerate";
-static char __pyx_k__exc_value[] = "exc_value";
-static char __pyx_k__fastafile[] = "fastafile";
-static char __pyx_k__itertools[] = "itertools";
-static char __pyx_k__max_depth[] = "max_depth";
-static char __pyx_k__pack_into[] = "pack_into";
-static char __pyx_k__positions[] = "positions";
-static char __pyx_k__readlines[] = "readlines";
-static char __pyx_k__reference[] = "reference";
-static char __pyx_k__setdevice[] = "setdevice";
-static char __pyx_k__traceback[] = "traceback";
-static char __pyx_k__until_eof[] = "until_eof";
-static char __pyx_k__CIGAR2CODE[] = "CIGAR2CODE";
-static char __pyx_k__IS_PYTHON3[] = "IS_PYTHON3";
-static char __pyx_k__IndexError[] = "IndexError";
-static char __pyx_k__PileupRead[] = "PileupRead";
-static char __pyx_k__ValueError[] = "ValueError";
-static char __pyx_k___buildLine[] = "_buildLine";
-static char __pyx_k__out_stderr[] = "out_stderr";
-static char __pyx_k__out_stdout[] = "out_stdout";
-static char __pyx_k__references[] = "references";
-static char __pyx_k__startswith[] = "startswith";
-static char __pyx_k__AlignedRead[] = "AlignedRead";
-static char __pyx_k__CIGAR_REGEX[] = "CIGAR_REGEX";
-static char __pyx_k__IteratorRow[] = "IteratorRow";
-static char __pyx_k__PileupProxy[] = "PileupProxy";
-static char __pyx_k__StderrStore[] = "StderrStore";
-static char __pyx_k__add_sq_text[] = "add_sq_text";
-static char __pyx_k__collections[] = "collections";
-static char __pyx_k__defaultdict[] = "defaultdict";
-static char __pyx_k__nreferences[] = "nreferences";
-static char __pyx_k__snp_quality[] = "snp_quality";
-static char __pyx_k__stdout_save[] = "stdout_save";
-static char __pyx_k__IndexedReads[] = "IndexedReads";
-static char __pyx_k__PileupColumn[] = "PileupColumn";
-static char __pyx_k___parseRegion[] = "_parseRegion";
-static char __pyx_k__catch_stdout[] = "catch_stdout";
-static char __pyx_k__check_header[] = "check_header";
-static char __pyx_k__version_info[] = "version_info";
-static char __pyx_k__OverflowError[] = "OverflowError";
-static char __pyx_k__StopIteration[] = "StopIteration";
-static char __pyx_k__VALID_HEADERS[] = "VALID_HEADERS";
-static char __pyx_k__AttributeError[] = "AttributeError";
-static char __pyx_k__IteratorColumn[] = "IteratorColumn";
-static char __pyx_k__readAndRelease[] = "readAndRelease";
-static char __pyx_k__reference_base[] = "reference_base";
-static char __pyx_k__referencenames[] = "referencenames";
-static char __pyx_k__mapping_quality[] = "mapping_quality";
-static char __pyx_k____getattribute__[] = "__getattribute__";
-static char __pyx_k__referencelengths[] = "referencelengths";
-static char __pyx_k__consensus_quality[] = "consensus_quality";
-static char __pyx_k__StderrStoreWindows[] = "StderrStoreWindows";
-static char __pyx_k__UnicodeDecodeError[] = "UnicodeDecodeError";
-static char __pyx_k__VALID_HEADER_ORDER[] = "VALID_HEADER_ORDER";
-static char __pyx_k__VALID_HEADER_TYPES[] = "VALID_HEADER_TYPES";
-static char __pyx_k___samtools_dispatch[] = "_samtools_dispatch";
-static char __pyx_k__getdefaultencoding[] = "getdefaultencoding";
-static char __pyx_k__NotImplementedError[] = "NotImplementedError";
-static char __pyx_k__VALID_HEADER_FIELDS[] = "VALID_HEADER_FIELDS";
-static PyObject *__pyx_kp_u_1;
-static PyObject *__pyx_kp_b_10;
-static PyObject *__pyx_kp_s_101;
-static PyObject *__pyx_kp_s_104;
-static PyObject *__pyx_kp_s_109;
-static PyObject *__pyx_kp_s_11;
-static PyObject *__pyx_kp_s_111;
-static PyObject *__pyx_kp_s_113;
-static PyObject *__pyx_kp_s_114;
-static PyObject *__pyx_kp_s_115;
-static PyObject *__pyx_kp_s_118;
-static PyObject *__pyx_kp_s_119;
-static PyObject *__pyx_kp_s_120;
-static PyObject *__pyx_kp_s_121;
-static PyObject *__pyx_kp_s_122;
-static PyObject *__pyx_kp_s_124;
-static PyObject *__pyx_kp_s_127;
-static PyObject *__pyx_kp_s_130;
-static PyObject *__pyx_kp_s_136;
-static PyObject *__pyx_kp_s_137;
-static PyObject *__pyx_kp_s_138;
-static PyObject *__pyx_kp_s_140;
-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_15;
-static PyObject *__pyx_kp_s_151;
-static PyObject *__pyx_kp_s_152;
-static PyObject *__pyx_kp_s_156;
-static PyObject *__pyx_n_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_kp_s_163;
-static PyObject *__pyx_kp_s_164;
-static PyObject *__pyx_kp_s_165;
-static PyObject *__pyx_kp_s_166;
-static PyObject *__pyx_kp_s_167;
-static PyObject *__pyx_kp_s_168;
-static PyObject *__pyx_kp_s_169;
-static PyObject *__pyx_kp_s_17;
-static PyObject *__pyx_kp_s_170;
-static PyObject *__pyx_kp_s_171;
-static PyObject *__pyx_kp_s_172;
-static PyObject *__pyx_kp_s_173;
-static PyObject *__pyx_kp_s_174;
-static PyObject *__pyx_kp_s_175;
-static PyObject *__pyx_kp_s_176;
-static PyObject *__pyx_kp_s_177;
-static PyObject *__pyx_kp_s_178;
-static PyObject *__pyx_kp_s_179;
-static PyObject *__pyx_kp_s_180;
-static PyObject *__pyx_kp_s_181;
-static PyObject *__pyx_kp_s_182;
-static PyObject *__pyx_kp_s_184;
-static PyObject *__pyx_kp_s_188;
-static PyObject *__pyx_kp_s_189;
-static PyObject *__pyx_kp_s_19;
-static PyObject *__pyx_kp_s_190;
-static PyObject *__pyx_kp_s_196;
-static PyObject *__pyx_kp_s_197;
-static PyObject *__pyx_kp_b_20;
-static PyObject *__pyx_kp_s_20;
-static PyObject *__pyx_kp_s_21;
-static PyObject *__pyx_kp_s_22;
-static PyObject *__pyx_kp_s_23;
-static PyObject *__pyx_kp_s_25;
-static PyObject *__pyx_n_s_262;
-static PyObject *__pyx_kp_s_264;
-static PyObject *__pyx_kp_s_269;
-static PyObject *__pyx_n_s_270;
-static PyObject *__pyx_n_s_271;
-static PyObject *__pyx_kp_s_272;
-static PyObject *__pyx_n_s_275;
-static PyObject *__pyx_n_s_278;
-static PyObject *__pyx_n_s_281;
-static PyObject *__pyx_n_s_284;
-static PyObject *__pyx_kp_s_285;
-static PyObject *__pyx_n_s_288;
-static PyObject *__pyx_n_s_291;
-static PyObject *__pyx_n_s_294;
-static PyObject *__pyx_kp_s_295;
-static PyObject *__pyx_kp_u_3;
-static PyObject *__pyx_kp_s_30;
-static PyObject *__pyx_n_s_304;
-static PyObject *__pyx_n_s_307;
-static PyObject *__pyx_n_s_310;
-static PyObject *__pyx_n_s_313;
-static PyObject *__pyx_n_s_316;
-static PyObject *__pyx_kp_s_317;
-static PyObject *__pyx_kp_b_32;
-static PyObject *__pyx_kp_b_33;
-static PyObject *__pyx_kp_b_35;
-static PyObject *__pyx_kp_s_37;
-static PyObject *__pyx_kp_s_38;
-static PyObject *__pyx_kp_s_39;
-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_b_45;
-static PyObject *__pyx_kp_s_46;
-static PyObject *__pyx_kp_s_49;
-static PyObject *__pyx_kp_s_5;
-static PyObject *__pyx_kp_s_51;
-static PyObject *__pyx_kp_s_53;
-static PyObject *__pyx_kp_s_54;
-static PyObject *__pyx_kp_s_56;
-static PyObject *__pyx_kp_s_58;
-static PyObject *__pyx_kp_s_6;
-static PyObject *__pyx_kp_s_64;
-static PyObject *__pyx_kp_s_66;
-static PyObject *__pyx_kp_s_68;
-static PyObject *__pyx_kp_s_7;
-static PyObject *__pyx_kp_s_70;
-static PyObject *__pyx_kp_s_72;
-static PyObject *__pyx_kp_s_74;
-static PyObject *__pyx_kp_s_77;
-static PyObject *__pyx_kp_s_78;
-static PyObject *__pyx_kp_s_79;
-static PyObject *__pyx_kp_s_84;
-static PyObject *__pyx_kp_s_87;
-static PyObject *__pyx_kp_s_9;
-static PyObject *__pyx_kp_s_90;
-static PyObject *__pyx_kp_s_93;
-static PyObject *__pyx_kp_s_99;
-static PyObject *__pyx_kp_s__2scB;
-static PyObject *__pyx_kp_s__2scH;
-static PyObject *__pyx_kp_s__2scI;
-static PyObject *__pyx_kp_s__2scb;
-static PyObject *__pyx_kp_s__2scc;
-static PyObject *__pyx_kp_s__2scf;
-static PyObject *__pyx_kp_s__2sch;
-static PyObject *__pyx_kp_s__2sci;
-static PyObject *__pyx_n_s__A;
-static PyObject *__pyx_n_s__AS;
-static PyObject *__pyx_n_s__AlignedRead;
-static PyObject *__pyx_n_s__AttributeError;
-static PyObject *__pyx_n_s__B;
-static PyObject *__pyx_n_s__C;
-static PyObject *__pyx_n_s__CIGAR2CODE;
-static PyObject *__pyx_n_s__CIGAR_REGEX;
-static PyObject *__pyx_n_s__CL;
-static PyObject *__pyx_n_s__CN;
-static PyObject *__pyx_n_s__CO;
-static PyObject *__pyx_n_s__D;
-static PyObject *__pyx_n_s__DS;
-static PyObject *__pyx_n_s__DT;
-static PyObject *__pyx_n_s__F;
-static PyObject *__pyx_n_s__FO;
-static PyObject *__pyx_n_s__Fastafile;
-static PyObject *__pyx_n_s__Fastqfile;
-static PyObject *__pyx_n_s__GO;
-static PyObject *__pyx_n_s__H;
-static PyObject *__pyx_n_s__HD;
-static PyObject *__pyx_n_s__I;
-static PyObject *__pyx_n_s__ID;
-static PyObject *__pyx_n_s__IOError;
-static PyObject *__pyx_n_s__IS_PYTHON3;
-static PyObject *__pyx_n_s__IndexError;
-static PyObject *__pyx_n_s__IndexedReads;
-static PyObject *__pyx_n_s__IteratorColumn;
-static PyObject *__pyx_n_s__IteratorRow;
-static PyObject *__pyx_n_s__KS;
-static PyObject *__pyx_n_s__KeyError;
-static PyObject *__pyx_n_s__LB;
-static PyObject *__pyx_n_s__LN;
-static PyObject *__pyx_n_s__M5;
-static PyObject *__pyx_n_s__NotImplementedError;
-static PyObject *__pyx_n_s__OSError;
-static PyObject *__pyx_n_s__O_CREAT;
-static PyObject *__pyx_n_s__O_WRONLY;
-static PyObject *__pyx_n_s__Outs;
-static PyObject *__pyx_n_s__OverflowError;
-static PyObject *__pyx_n_s__PG;
-static PyObject *__pyx_n_s__PI;
-static PyObject *__pyx_n_s__PL;
-static PyObject *__pyx_n_s__PN;
-static PyObject *__pyx_n_s__PP;
-static PyObject *__pyx_n_s__PU;
-static PyObject *__pyx_n_s__PileupColumn;
-static PyObject *__pyx_n_s__PileupProxy;
-static PyObject *__pyx_n_s__PileupRead;
-static PyObject *__pyx_n_s__RG;
-static PyObject *__pyx_n_s__S;
-static PyObject *__pyx_n_s__SM;
-static PyObject *__pyx_n_s__SN;
-static PyObject *__pyx_n_s__SO;
-static PyObject *__pyx_n_s__SP;
-static PyObject *__pyx_n_s__SQ;
-static PyObject *__pyx_n_s__Samfile;
-static PyObject *__pyx_n_s__StderrStore;
-static PyObject *__pyx_n_s__StderrStoreWindows;
-static PyObject *__pyx_n_s__StopIteration;
-static PyObject *__pyx_n_s__TypeError;
-static PyObject *__pyx_n_s__UR;
-static PyObject *__pyx_n_s__UnicodeDecodeError;
-static PyObject *__pyx_n_s__VALID_HEADERS;
-static PyObject *__pyx_n_s__VALID_HEADER_FIELDS;
-static PyObject *__pyx_n_s__VALID_HEADER_ORDER;
-static PyObject *__pyx_n_s__VALID_HEADER_TYPES;
-static PyObject *__pyx_n_s__VN;
-static PyObject *__pyx_n_s__ValueError;
-static PyObject *__pyx_n_s__Windows;
-static PyObject *__pyx_n_s__Z;
-static PyObject *__pyx_n_s____all__;
-static PyObject *__pyx_n_s____del__;
-static PyObject *__pyx_n_s____dict__;
-static PyObject *__pyx_n_s____enter__;
-static PyObject *__pyx_n_s____exit__;
-static PyObject *__pyx_n_s____getattribute__;
-static PyObject *__pyx_n_s____init__;
-static PyObject *__pyx_n_s____main__;
-static PyObject *__pyx_n_s____str__;
-static PyObject *__pyx_n_s____test__;
-static PyObject *__pyx_n_s___buildLine;
-static PyObject *__pyx_n_s___hasIndex;
-static PyObject *__pyx_n_s___isOpen;
-static PyObject *__pyx_n_s___open;
-static PyObject *__pyx_n_s___parseRegion;
-static PyObject *__pyx_n_s___samtools_dispatch;
-static PyObject *__pyx_n_s__a;
-static PyObject *__pyx_n_s__add_sq_text;
-static PyObject *__pyx_n_s__alignment;
-static PyObject *__pyx_n_s__all;
-static PyObject *__pyx_n_s__args;
-static PyObject *__pyx_n_s__ascii;
-static PyObject *__pyx_n_s__b;
-static PyObject *__pyx_n_s__beg;
-static PyObject *__pyx_n_s__bin;
-static PyObject *__pyx_n_s__bqual;
-static PyObject *__pyx_n_s__c;
-static PyObject *__pyx_n_s__calcsize;
-static PyObject *__pyx_n_s__callback;
-static PyObject *__pyx_n_s__cargs;
-static PyObject *__pyx_n_s__catch_stdout;
-static PyObject *__pyx_n_s__check_header;
-static PyObject *__pyx_n_s__check_sq;
-static PyObject *__pyx_n_s__chr;
-static PyObject *__pyx_n_s__cigar;
-static PyObject *__pyx_n_s__close;
-static PyObject *__pyx_n_s__collections;
-static PyObject *__pyx_n_s__compile;
-static PyObject *__pyx_n_s__consensus_quality;
-static PyObject *__pyx_n_s__coverage;
-static PyObject *__pyx_n_s__ctypes;
-static PyObject *__pyx_n_s__d;
-static PyObject *__pyx_n_s__data_len;
-static PyObject *__pyx_n_s__decode;
-static PyObject *__pyx_n_s__defaultdict;
-static PyObject *__pyx_n_s__dup;
-static PyObject *__pyx_n_s__dup2;
-static PyObject *__pyx_n_s__encode;
-static PyObject *__pyx_n_s__end;
-static PyObject *__pyx_n_s__enumerate;
-static PyObject *__pyx_n_s__exc_type;
-static PyObject *__pyx_n_s__exc_value;
-static PyObject *__pyx_n_s__exists;
-static PyObject *__pyx_n_s__extend;
-static PyObject *__pyx_n_s__f;
-static PyObject *__pyx_n_s__fastafile;
-static PyObject *__pyx_n_s__fd;
-static PyObject *__pyx_n_s__fetch;
-static PyObject *__pyx_n_s__fields;
-static PyObject *__pyx_n_s__filename;
-static PyObject *__pyx_n_s__fileno;
-static PyObject *__pyx_n_s__findall;
-static PyObject *__pyx_n_s__flag;
-static PyObject *__pyx_n_s__flush;
-static PyObject *__pyx_n_s__genotype;
-static PyObject *__pyx_n_s__getdefaultencoding;
-static PyObject *__pyx_n_s__gettid;
-static PyObject *__pyx_n_s__h;
-static PyObject *__pyx_n_s__header;
-static PyObject *__pyx_n_s__i;
-static PyObject *__pyx_n_s__id;
-static PyObject *__pyx_n_s__indel;
-static PyObject *__pyx_n_s__index;
-static PyObject *__pyx_n_s__inf;
-static PyObject *__pyx_n_s__is_del;
-static PyObject *__pyx_n_s__is_head;
-static PyObject *__pyx_n_s__is_tail;
-static PyObject *__pyx_n_s__isize;
-static PyObject *__pyx_n_s__islower;
-static PyObject *__pyx_n_s__isupper;
-static PyObject *__pyx_n_s__items;
-static PyObject *__pyx_n_s__itertools;
-static PyObject *__pyx_n_s__join;
-static PyObject *__pyx_n_s__l_aux;
-static PyObject *__pyx_n_s__l_qname;
-static PyObject *__pyx_n_s__l_qseq;
-static PyObject *__pyx_n_s__lengths;
-static PyObject *__pyx_n_s__level;
-static PyObject *__pyx_n_s__m_data;
-static PyObject *__pyx_n_s__map;
-static PyObject *__pyx_n_s__mapping_quality;
-static PyObject *__pyx_n_s__mapq;
-static PyObject *__pyx_n_s__mask;
-static PyObject *__pyx_n_s__max;
-static PyObject *__pyx_n_s__max_depth;
-static PyObject *__pyx_n_s__method;
-static PyObject *__pyx_n_s__min;
-static PyObject *__pyx_n_s__mkstemp;
-static PyObject *__pyx_n_s__mode;
-static PyObject *__pyx_n_s__mpos;
-static PyObject *__pyx_n_s__mrnm;
-static PyObject *__pyx_n_s__mtid;
-static PyObject *__pyx_n_s__n;
-static PyObject *__pyx_n_s__n_cigar;
-static PyObject *__pyx_n_s__nextiter;
-static PyObject *__pyx_n_s__nreferences;
-static PyObject *__pyx_n_s__object;
-static PyObject *__pyx_n_s__ofd;
-static PyObject *__pyx_n_s__offset;
-static PyObject *__pyx_n_s__open;
-static PyObject *__pyx_n_s__ord;
-static PyObject *__pyx_n_s__os;
-static PyObject *__pyx_n_s__out_stderr;
-static PyObject *__pyx_n_s__out_stdout;
-static PyObject *__pyx_n_s__pack_into;
-static PyObject *__pyx_n_s__path;
-static PyObject *__pyx_n_s__pileups;
-static PyObject *__pyx_n_s__platform;
-static PyObject *__pyx_n_s__port;
-static PyObject *__pyx_n_s__pos;
-static PyObject *__pyx_n_s__positions;
-static PyObject *__pyx_n_s__qname;
-static PyObject *__pyx_n_s__qpos;
-static PyObject *__pyx_n_s__qseq;
-static PyObject *__pyx_n_s__qual;
-static PyObject *__pyx_n_b__r;
-static PyObject *__pyx_n_s__r;
-static PyObject *__pyx_n_s__rU;
-static PyObject *__pyx_n_s__raw;
-static PyObject *__pyx_n_b__rb;
-static PyObject *__pyx_n_s__rb;
-static PyObject *__pyx_n_s__re;
-static PyObject *__pyx_n_s__read;
-static PyObject *__pyx_n_s__readAndRelease;
-static PyObject *__pyx_n_s__readlines;
-static PyObject *__pyx_n_s__record;
-static PyObject *__pyx_n_s__reference;
-static PyObject *__pyx_n_s__reference_base;
-static PyObject *__pyx_n_s__referencelengths;
-static PyObject *__pyx_n_s__referencenames;
-static PyObject *__pyx_n_s__references;
-static PyObject *__pyx_n_s__region;
-static PyObject *__pyx_n_s__release;
-static PyObject *__pyx_n_s__remove;
-static PyObject *__pyx_n_s__reopen;
-static PyObject *__pyx_n_s__restore;
-static PyObject *__pyx_n_s__retval;
-static PyObject *__pyx_n_s__rlen;
-static PyObject *__pyx_n_s__rname;
-static PyObject *__pyx_n_s__s;
-static PyObject *__pyx_n_s__samfile;
-static PyObject *__pyx_n_s__samtools;
-static PyObject *__pyx_n_s__seek;
-static PyObject *__pyx_n_s__self;
-static PyObject *__pyx_n_s__seq;
-static PyObject *__pyx_n_s__setdevice;
-static PyObject *__pyx_n_s__setfd;
-static PyObject *__pyx_n_s__setfile;
-static PyObject *__pyx_n_s__snp_quality;
-static PyObject *__pyx_n_s__sorted;
-static PyObject *__pyx_n_s__split;
-static PyObject *__pyx_n_s__start;
-static PyObject *__pyx_n_s__startswith;
-static PyObject *__pyx_n_s__stderr;
-static PyObject *__pyx_n_s__stderr_f;
-static PyObject *__pyx_n_s__stderr_h;
-static PyObject *__pyx_n_s__stdout;
-static PyObject *__pyx_n_s__stdout_f;
-static PyObject *__pyx_n_s__stdout_h;
-static PyObject *__pyx_n_s__stdout_save;
-static PyObject *__pyx_n_s__stepper;
-static PyObject *__pyx_n_s__streams;
-static PyObject *__pyx_n_s__strip;
-static PyObject *__pyx_n_s__struct;
-static PyObject *__pyx_n_s__sys;
-static PyObject *__pyx_n_s__system;
-static PyObject *__pyx_n_s__tags;
-static PyObject *__pyx_n_s__tempfile;
-static PyObject *__pyx_n_s__template;
-static PyObject *__pyx_n_s__text;
-static PyObject *__pyx_n_s__tid;
-static PyObject *__pyx_n_s__traceback;
-static PyObject *__pyx_n_s__truncate;
-static PyObject *__pyx_n_s__types;
-static PyObject *__pyx_n_s__until_eof;
-static PyObject *__pyx_n_s__version_info;
-static PyObject *__pyx_n_s__view;
-static PyObject *__pyx_n_s__w;
-static PyObject *__pyx_n_s__warn;
-static PyObject *__pyx_n_s__warnings;
-static PyObject *__pyx_n_s__wb;
-static PyObject *__pyx_n_s__wbu;
-static PyObject *__pyx_n_s__wh;
-static PyObject *__pyx_n_s__where;
-static PyObject *__pyx_n_s__write;
-static PyObject *__pyx_n_s__zip;
-static PyObject *__pyx_int_0;
-static PyObject *__pyx_int_1;
-static PyObject *__pyx_int_2;
-static PyObject *__pyx_int_3;
-static PyObject *__pyx_int_4;
-static PyObject *__pyx_int_8;
-static PyObject *__pyx_int_16;
-static PyObject *__pyx_int_32;
-static PyObject *__pyx_int_64;
-static PyObject *__pyx_int_128;
-static PyObject *__pyx_int_255;
-static PyObject *__pyx_int_256;
-static PyObject *__pyx_int_512;
-static PyObject *__pyx_int_neg_127;
-static PyObject *__pyx_int_0660;
-static PyObject *__pyx_int_1024;
-static PyObject *__pyx_int_8000;
-static PyObject *__pyx_int_65535;
-static PyObject *__pyx_int_neg_32767;
-static PyObject *__pyx_int_536870912;
-static PyObject *__pyx_int_4294967295;
-static PyObject *__pyx_int_neg_2147483648;
-static PyObject *__pyx_k_27;
-static PyObject *__pyx_k_28;
-static PyObject *__pyx_k_29;
-static PyObject *__pyx_k_62;
-static PyObject *__pyx_k_81;
-static int __pyx_k_139;
-static PyObject *__pyx_k_187;
-static PyObject *__pyx_k_tuple_2;
-static PyObject *__pyx_k_tuple_4;
-static PyObject *__pyx_k_tuple_8;
-static PyObject *__pyx_k_tuple_12;
-static PyObject *__pyx_k_tuple_13;
-static PyObject *__pyx_k_tuple_14;
-static PyObject *__pyx_k_tuple_16;
-static PyObject *__pyx_k_tuple_18;
-static PyObject *__pyx_k_tuple_24;
-static PyObject *__pyx_k_tuple_26;
-static PyObject *__pyx_k_tuple_31;
-static PyObject *__pyx_k_tuple_34;
-static PyObject *__pyx_k_tuple_36;
-static PyObject *__pyx_k_tuple_47;
-static PyObject *__pyx_k_tuple_48;
-static PyObject *__pyx_k_tuple_50;
-static PyObject *__pyx_k_tuple_52;
-static PyObject *__pyx_k_tuple_55;
-static PyObject *__pyx_k_tuple_57;
-static PyObject *__pyx_k_tuple_59;
-static PyObject *__pyx_k_tuple_60;
-static PyObject *__pyx_k_tuple_61;
-static PyObject *__pyx_k_tuple_63;
-static PyObject *__pyx_k_tuple_65;
-static PyObject *__pyx_k_tuple_67;
-static PyObject *__pyx_k_tuple_69;
-static PyObject *__pyx_k_tuple_71;
-static PyObject *__pyx_k_tuple_73;
-static PyObject *__pyx_k_tuple_75;
-static PyObject *__pyx_k_tuple_76;
-static PyObject *__pyx_k_tuple_80;
-static PyObject *__pyx_k_tuple_82;
-static PyObject *__pyx_k_tuple_83;
-static PyObject *__pyx_k_tuple_85;
-static PyObject *__pyx_k_tuple_86;
-static PyObject *__pyx_k_tuple_88;
-static PyObject *__pyx_k_tuple_89;
-static PyObject *__pyx_k_tuple_91;
-static PyObject *__pyx_k_tuple_92;
-static PyObject *__pyx_k_tuple_94;
-static PyObject *__pyx_k_tuple_95;
-static PyObject *__pyx_k_tuple_96;
-static PyObject *__pyx_k_tuple_97;
-static PyObject *__pyx_k_tuple_98;
-static PyObject *__pyx_k_tuple_100;
-static PyObject *__pyx_k_tuple_102;
-static PyObject *__pyx_k_tuple_103;
-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_110;
-static PyObject *__pyx_k_tuple_112;
-static PyObject *__pyx_k_tuple_116;
-static PyObject *__pyx_k_tuple_117;
-static PyObject *__pyx_k_tuple_123;
-static PyObject *__pyx_k_tuple_125;
-static PyObject *__pyx_k_tuple_126;
-static PyObject *__pyx_k_tuple_128;
-static PyObject *__pyx_k_tuple_129;
-static PyObject *__pyx_k_tuple_131;
-static PyObject *__pyx_k_tuple_132;
-static PyObject *__pyx_k_tuple_133;
-static PyObject *__pyx_k_tuple_134;
-static PyObject *__pyx_k_tuple_135;
-static PyObject *__pyx_k_tuple_141;
-static PyObject *__pyx_k_tuple_142;
-static PyObject *__pyx_k_tuple_144;
-static PyObject *__pyx_k_tuple_145;
-static PyObject *__pyx_k_tuple_150;
-static PyObject *__pyx_k_tuple_153;
-static PyObject *__pyx_k_tuple_154;
-static PyObject *__pyx_k_tuple_155;
-static PyObject *__pyx_k_tuple_157;
-static PyObject *__pyx_k_tuple_183;
-static PyObject *__pyx_k_tuple_185;
-static PyObject *__pyx_k_tuple_186;
-static PyObject *__pyx_k_tuple_191;
-static PyObject *__pyx_k_tuple_192;
-static PyObject *__pyx_k_tuple_193;
-static PyObject *__pyx_k_tuple_194;
-static PyObject *__pyx_k_tuple_195;
-static PyObject *__pyx_k_tuple_265;
-static PyObject *__pyx_k_tuple_267;
-static PyObject *__pyx_k_tuple_273;
-static PyObject *__pyx_k_tuple_276;
-static PyObject *__pyx_k_tuple_279;
-static PyObject *__pyx_k_tuple_282;
-static PyObject *__pyx_k_tuple_286;
-static PyObject *__pyx_k_tuple_289;
-static PyObject *__pyx_k_tuple_292;
-static PyObject *__pyx_k_tuple_296;
-static PyObject *__pyx_k_tuple_297;
-static PyObject *__pyx_k_tuple_298;
-static PyObject *__pyx_k_tuple_299;
-static PyObject *__pyx_k_tuple_300;
-static PyObject *__pyx_k_tuple_301;
-static PyObject *__pyx_k_tuple_303;
-static PyObject *__pyx_k_tuple_305;
-static PyObject *__pyx_k_tuple_308;
-static PyObject *__pyx_k_tuple_311;
-static PyObject *__pyx_k_tuple_314;
-static PyObject *__pyx_k_tuple_318;
-static PyObject *__pyx_k_codeobj_268;
-static PyObject *__pyx_k_codeobj_274;
-static PyObject *__pyx_k_codeobj_277;
-static PyObject *__pyx_k_codeobj_280;
-static PyObject *__pyx_k_codeobj_283;
-static PyObject *__pyx_k_codeobj_287;
-static PyObject *__pyx_k_codeobj_290;
-static PyObject *__pyx_k_codeobj_293;
-static PyObject *__pyx_k_codeobj_302;
-static PyObject *__pyx_k_codeobj_306;
-static PyObject *__pyx_k_codeobj_309;
-static PyObject *__pyx_k_codeobj_312;
-static PyObject *__pyx_k_codeobj_315;
-static PyObject *__pyx_k_codeobj_319;
-static PyObject *__pyx_gb_5pysam_9csamtools_4generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-
-/* "pysam/csamtools.pyx":139
- * cdef char* CODE2CIGAR= "MIDNSHP=X"
- * if IS_PYTHON3:
- *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
- * else:
- *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_2genexpr(CYTHON_UNUSED PyObject *__pyx_self) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_2setdevice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
+  PyObject *__pyx_v_fd = NULL;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("genexpr", 0);
-  __pyx_cur_scope = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *)__pyx_ptype_5pysam_9csamtools___pyx_scope_struct__genexpr->tp_new(__pyx_ptype_5pysam_9csamtools___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
-  if (unlikely(!__pyx_cur_scope)) {
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __Pyx_GOTREF(__pyx_cur_scope);
-  __Pyx_TraceCall("genexpr", __pyx_f[0], 139);
-  {
-    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_9csamtools_4generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_cur_scope);
-    __Pyx_RefNannyFinishContext();
-    return (PyObject *) gen;
-  }
+  __Pyx_RefNannySetupContext("setdevice", 0);
+  __Pyx_TraceCall("setdevice", __pyx_f[0], 43);
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-static PyObject *__pyx_gb_5pysam_9csamtools_4generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
-{
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *)__pyx_generator->closure);
-  PyObject *__pyx_r = NULL;
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *(*__pyx_t_4)(PyObject *);
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("None", 0);
-  switch (__pyx_generator->resume_label) {
-    case 0: goto __pyx_L3_first_run;
-    case 1: goto __pyx_L6_resume_from_yield;
-    default: /* CPython raises the right error here */
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __pyx_L3_first_run:;
-  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_INCREF(__pyx_int_0);
-  __pyx_t_1 = __pyx_int_0;
-  __pyx_t_2 = PyBytes_FromString(__pyx_v_5pysam_9csamtools_CODE2CIGAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = PyObject_GetIter(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  for (;;) {
-    {
-      __pyx_t_2 = __pyx_t_4(__pyx_t_3);
-      if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_2);
-    }
-    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_y);
-    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_y);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_cur_scope->__pyx_v_y = __pyx_t_2;
-    __pyx_t_2 = 0;
-    __Pyx_INCREF(__pyx_t_1);
-    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
-    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_x);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_cur_scope->__pyx_v_x = __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 = 139; __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_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_y);
-    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_y);
-    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_y);
-    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_x);
-    PyList_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_x);
-    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_x);
-    __pyx_r = ((PyObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
-    __Pyx_XGIVEREF(__pyx_t_1);
-    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
-    __Pyx_XGIVEREF(__pyx_t_3);
-    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
-    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
-    __Pyx_XGIVEREF(__pyx_r);
-    __Pyx_RefNannyFinishContext();
-    /* return from generator, yielding value */
-    __pyx_generator->resume_label = 1;
-    return __pyx_r;
-    __pyx_L6_resume_from_yield:;
-    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
-    __pyx_cur_scope->__pyx_t_0 = 0;
-    __Pyx_XGOTREF(__pyx_t_1);
-    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
-    __pyx_cur_scope->__pyx_t_1 = 0;
-    __Pyx_XGOTREF(__pyx_t_3);
-    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
-    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  PyErr_SetNone(PyExc_StopIteration);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_generator->resume_label = -1;
-  __Pyx_Generator_clear((PyObject*)__pyx_generator);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-}
-static PyObject *__pyx_gb_5pysam_9csamtools_7generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-
-/* "pysam/csamtools.pyx":141
- *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
- * else:
- *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
- * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
+  /* "pysam/csamtools.pyx":45
+ *     def setdevice(self, filename):
+ *         '''open an existing file, like "/dev/null"'''
+ *         fd = os.open(filename, os.O_WRONLY)             # <<<<<<<<<<<<<<
+ *         self.setfd(fd)
  * 
  */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_5genexpr(CYTHON_UNUSED PyObject *__pyx_self) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("genexpr", 0);
-  __pyx_cur_scope = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *)__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_1_genexpr->tp_new(__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
-  if (unlikely(!__pyx_cur_scope)) {
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __Pyx_GOTREF(__pyx_cur_scope);
-  __Pyx_TraceCall("genexpr", __pyx_f[0], 141);
-  {
-    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_9csamtools_7generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_cur_scope);
-    __Pyx_RefNannyFinishContext();
-    return (PyObject *) gen;
-  }
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-static PyObject *__pyx_gb_5pysam_9csamtools_7generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
-{
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
-  PyObject *__pyx_r = NULL;
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *(*__pyx_t_4)(PyObject *);
-  PyObject *__pyx_t_5 = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("None", 0);
-  switch (__pyx_generator->resume_label) {
-    case 0: goto __pyx_L3_first_run;
-    case 1: goto __pyx_L6_resume_from_yield;
-    default: /* CPython raises the right error here */
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __pyx_L3_first_run:;
-  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_INCREF(__pyx_int_0);
-  __pyx_t_1 = __pyx_int_0;
-  __pyx_t_2 = PyBytes_FromString(__pyx_v_5pysam_9csamtools_CODE2CIGAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = PyObject_GetIter(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_O_WRONLY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  for (;;) {
-    {
-      __pyx_t_2 = __pyx_t_4(__pyx_t_3);
-      if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_2);
-    }
-    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_y);
-    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_y);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_cur_scope->__pyx_v_y = __pyx_t_2;
-    __pyx_t_2 = 0;
-    __Pyx_INCREF(__pyx_t_1);
-    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
-    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_x);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_cur_scope->__pyx_v_x = __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 = 141; __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_y);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_y);
-    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_y);
-    __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
-    __Pyx_GIVEREF(__pyx_t_5);
-    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_x);
-    PyList_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_x);
-    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_x);
-    __pyx_t_5 = 0;
-    __pyx_r = ((PyObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
-    __Pyx_XGIVEREF(__pyx_t_1);
-    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
-    __Pyx_XGIVEREF(__pyx_t_3);
-    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
-    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
-    __Pyx_XGIVEREF(__pyx_r);
-    __Pyx_RefNannyFinishContext();
-    /* return from generator, yielding value */
-    __pyx_generator->resume_label = 1;
-    return __pyx_r;
-    __pyx_L6_resume_from_yield:;
-    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
-    __pyx_cur_scope->__pyx_t_0 = 0;
-    __Pyx_XGOTREF(__pyx_t_1);
-    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
-    __pyx_cur_scope->__pyx_t_1 = 0;
-    __Pyx_XGOTREF(__pyx_t_3);
-    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
-    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  PyErr_SetNone(PyExc_StopIteration);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_generator->resume_label = -1;
-  __Pyx_Generator_clear((PyObject*)__pyx_generator);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-}
-
-/* "pysam/csamtools.pyx":24
- * ########################################################################
- * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
- * cdef from_string_and_size(char* s, size_t length):             # <<<<<<<<<<<<<<
- *     if PY_MAJOR_VERSION < 3:
- *         return s[:length]
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_from_string_and_size(char *__pyx_v_s, size_t __pyx_v_length) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("from_string_and_size", 0);
-  __Pyx_TraceCall("from_string_and_size", __pyx_f[0], 24);
-
-  /* "pysam/csamtools.pyx":25
- * IS_PYTHON3 = PY_MAJOR_VERSION >= 3
- * cdef from_string_and_size(char* s, size_t length):
- *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
- *         return s[:length]
- *     else:
- */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":26
- * cdef from_string_and_size(char* s, size_t length):
- *     if PY_MAJOR_VERSION < 3:
- *         return s[:length]             # <<<<<<<<<<<<<<
- *     else:
- *         return s[:length].decode("ascii")
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_s + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __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_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":28
- *         return s[:length]
- *     else:
- *         return s[:length].decode("ascii")             # <<<<<<<<<<<<<<
- * 
- * # filename encoding (copied from lxml.etree.pyx)
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_s, 0, __pyx_v_length, NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __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;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.from_string_and_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":41
- * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
- * 
- * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
- *     """Make sure a filename is 8-bit encoded (or None)."""
- *     if filename is None:
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools__encodeFilename(PyObject *__pyx_v_filename) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_encodeFilename", 0);
-  __Pyx_TraceCall("_encodeFilename", __pyx_f[0], 41);
-
-  /* "pysam/csamtools.pyx":43
- * cdef bytes _encodeFilename(object filename):
- *     """Make sure a filename is 8-bit encoded (or None)."""
- *     if filename is None:             # <<<<<<<<<<<<<<
- *         return None
- *     elif PyBytes_Check(filename):
- */
-  __pyx_t_1 = (__pyx_v_filename == Py_None);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":44
- *     """Make sure a filename is 8-bit encoded (or None)."""
- *     if filename is None:
- *         return None             # <<<<<<<<<<<<<<
- *     elif PyBytes_Check(filename):
- *         return filename
- */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __Pyx_INCREF(Py_None);
-    __pyx_r = ((PyObject*)Py_None);
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":45
- *     if filename is None:
- *         return None
- *     elif PyBytes_Check(filename):             # <<<<<<<<<<<<<<
- *         return filename
- *     elif PyUnicode_Check(filename):
- */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_filename);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":46
- *         return None
- *     elif PyBytes_Check(filename):
- *         return filename             # <<<<<<<<<<<<<<
- *     elif PyUnicode_Check(filename):
- *         return filename.encode(_FILENAME_ENCODING)
- */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_INCREF(__pyx_v_filename);
-    __pyx_r = ((PyObject*)__pyx_v_filename);
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":47
- *     elif PyBytes_Check(filename):
- *         return filename
- *     elif PyUnicode_Check(filename):             # <<<<<<<<<<<<<<
- *         return filename.encode(_FILENAME_ENCODING)
- *     else:
- */
-  __pyx_t_1 = PyUnicode_Check(__pyx_v_filename);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":48
- *         return filename
- *     elif PyUnicode_Check(filename):
- *         return filename.encode(_FILENAME_ENCODING)             # <<<<<<<<<<<<<<
- *     else:
- *         raise TypeError, u"Argument must be string or unicode."
- */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-    __Pyx_GIVEREF(((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-    __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 = 48; __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_3)); __pyx_t_3 = 0;
-    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_r = ((PyObject*)__pyx_t_4);
-    __pyx_t_4 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":50
- *         return filename.encode(_FILENAME_ENCODING)
- *     else:
- *         raise TypeError, u"Argument must be string or unicode."             # <<<<<<<<<<<<<<
- * 
- * 
- */
-    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_1), 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
-
-  __pyx_r = ((PyObject*)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("pysam.csamtools._encodeFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_filename);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
+  __Pyx_GIVEREF(__pyx_v_filename);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_fd = __pyx_t_3;
+  __pyx_t_3 = 0;
 
-/* "pysam/csamtools.pyx":53
- * 
- * 
- * cdef bytes _force_bytes(object s):             # <<<<<<<<<<<<<<
- *     u"""convert string or unicode object to bytes, assuming ascii encoding.
- *     """
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools__force_bytes(PyObject *__pyx_v_s) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_force_bytes", 0);
-  __Pyx_TraceCall("_force_bytes", __pyx_f[0], 53);
-
-  /* "pysam/csamtools.pyx":56
- *     u"""convert string or unicode object to bytes, assuming ascii encoding.
- *     """
- *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
- *         return s
- *     elif s is None:
- */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":57
- *     """
- *     if PY_MAJOR_VERSION < 3:
- *         return s             # <<<<<<<<<<<<<<
- *     elif s is None:
- *         return None
- */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_INCREF(__pyx_v_s);
-    __pyx_r = ((PyObject*)__pyx_v_s);
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":58
- *     if PY_MAJOR_VERSION < 3:
- *         return s
- *     elif s is None:             # <<<<<<<<<<<<<<
- *         return None
- *     elif PyBytes_Check(s):
- */
-  __pyx_t_1 = (__pyx_v_s == Py_None);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":59
- *         return s
- *     elif s is None:
- *         return None             # <<<<<<<<<<<<<<
- *     elif PyBytes_Check(s):
- *         return s
- */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __Pyx_INCREF(Py_None);
-    __pyx_r = ((PyObject*)Py_None);
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":60
- *     elif s is None:
- *         return None
- *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
- *         return s
- *     elif PyUnicode_Check(s):
- */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_s);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":61
- *         return None
- *     elif PyBytes_Check(s):
- *         return s             # <<<<<<<<<<<<<<
- *     elif PyUnicode_Check(s):
- *         return s.encode('ascii')
- */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_INCREF(__pyx_v_s);
-    __pyx_r = ((PyObject*)__pyx_v_s);
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":62
- *     elif PyBytes_Check(s):
- *         return s
- *     elif PyUnicode_Check(s):             # <<<<<<<<<<<<<<
- *         return s.encode('ascii')
- *     else:
- */
-  __pyx_t_1 = PyUnicode_Check(__pyx_v_s);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":63
- *         return s
- *     elif PyUnicode_Check(s):
- *         return s.encode('ascii')             # <<<<<<<<<<<<<<
- *     else:
- *         raise TypeError, u"Argument must be string, bytes or unicode."
- */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_r = ((PyObject*)__pyx_t_3);
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":65
- *         return s.encode('ascii')
- *     else:
- *         raise TypeError, u"Argument must be string, bytes or unicode."             # <<<<<<<<<<<<<<
- * 
- * cdef inline bytes _force_cmdline_bytes(object s):
- */
-    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_3), 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
-
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools._force_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":67
- *         raise TypeError, u"Argument must be string, bytes or unicode."
- * 
- * cdef inline bytes _force_cmdline_bytes(object s):             # <<<<<<<<<<<<<<
- *     return _force_bytes(s)
- * 
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5pysam_9csamtools__force_cmdline_bytes(PyObject *__pyx_v_s) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_force_cmdline_bytes", 0);
-  __Pyx_TraceCall("_force_cmdline_bytes", __pyx_f[0], 67);
-
-  /* "pysam/csamtools.pyx":68
- * 
- * cdef inline bytes _force_cmdline_bytes(object s):
- *     return _force_bytes(s)             # <<<<<<<<<<<<<<
- * 
- * cdef _charptr_to_str(char* s):
- */
-  __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_s)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools._force_cmdline_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":70
- *     return _force_bytes(s)
- * 
- * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
- *     if PY_MAJOR_VERSION < 3:
- *         return s
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools__charptr_to_str(char *__pyx_v_s) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_charptr_to_str", 0);
-  __Pyx_TraceCall("_charptr_to_str", __pyx_f[0], 70);
-
-  /* "pysam/csamtools.pyx":71
- * 
- * cdef _charptr_to_str(char* s):
- *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
- *         return s
- *     else:
- */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":72
- * cdef _charptr_to_str(char* s):
- *     if PY_MAJOR_VERSION < 3:
- *         return s             # <<<<<<<<<<<<<<
- *     else:
- *         return s.decode("ascii")
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __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_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":74
- *         return s
- *     else:
- *         return s.decode("ascii")             # <<<<<<<<<<<<<<
- * 
- * cdef _force_str(object s):
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_s, 0, strlen(__pyx_v_s), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __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;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools._charptr_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":76
- *         return s.decode("ascii")
- * 
- * cdef _force_str(object s):             # <<<<<<<<<<<<<<
- *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
- *     if s is None:
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools__force_str(PyObject *__pyx_v_s) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_force_str", 0);
-  __Pyx_TraceCall("_force_str", __pyx_f[0], 76);
-
-  /* "pysam/csamtools.pyx":78
- * cdef _force_str(object s):
- *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
- *     if s is None:             # <<<<<<<<<<<<<<
- *         return None
- *     if PY_MAJOR_VERSION < 3:
- */
-  __pyx_t_1 = (__pyx_v_s == Py_None);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":79
- *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
- *     if s is None:
- *         return None             # <<<<<<<<<<<<<<
- *     if PY_MAJOR_VERSION < 3:
- *         return s
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":80
- *     if s is None:
- *         return None
- *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
- *         return s
- *     elif PyBytes_Check(s):
- */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":81
- *         return None
- *     if PY_MAJOR_VERSION < 3:
- *         return s             # <<<<<<<<<<<<<<
- *     elif PyBytes_Check(s):
- *         return s.decode('ascii')
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_v_s);
-    __pyx_r = __pyx_v_s;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-
-  /* "pysam/csamtools.pyx":82
- *     if PY_MAJOR_VERSION < 3:
- *         return s
- *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
- *         return s.decode('ascii')
- *     else:
- */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_s);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":83
- *         return s
- *     elif PyBytes_Check(s):
- *         return s.decode('ascii')             # <<<<<<<<<<<<<<
- *     else:
- *         # assume unicode
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":86
- *     else:
- *         # assume unicode
- *         return s             # <<<<<<<<<<<<<<
- * ########################################################################
- * ########################################################################
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_v_s);
-    __pyx_r = __pyx_v_s;
-    goto __pyx_L0;
-  }
-  __pyx_L4:;
-
-  __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("pysam.csamtools._force_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":159
- * #####################################################################
- * cdef class AlignedRead
- * cdef makeAlignedRead(bam1_t * src):             # <<<<<<<<<<<<<<
- *     '''enter src into AlignedRead.'''
- *     cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_makeAlignedRead(bam1_t *__pyx_v_src) {
-  struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_dest = 0;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("makeAlignedRead", 0);
-  __Pyx_TraceCall("makeAlignedRead", __pyx_f[0], 159);
-
-  /* "pysam/csamtools.pyx":161
- * cdef makeAlignedRead(bam1_t * src):
- *     '''enter src into AlignedRead.'''
- *     cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)             # <<<<<<<<<<<<<<
- *     dest._delegate = bam_dup1(src)
- *     return dest
- */
-  __pyx_t_1 = __Pyx_tp_new(((PyObject*)__pyx_ptype_5pysam_9csamtools_AlignedRead)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_9csamtools_AlignedRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_dest = ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":162
- *     '''enter src into AlignedRead.'''
- *     cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
- *     dest._delegate = bam_dup1(src)             # <<<<<<<<<<<<<<
- *     return dest
- * 
- */
-  __pyx_v_dest->_delegate = bam_dup1(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":163
- *     cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
- *     dest._delegate = bam_dup1(src)
- *     return dest             # <<<<<<<<<<<<<<
- * 
- * cdef class PileupProxy
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
-  __pyx_r = ((PyObject *)__pyx_v_dest);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.makeAlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":166
- * 
- * cdef class PileupProxy
- * cdef makePileupProxy( bam_pileup1_t ** plp, int tid, int pos, int n ):             # <<<<<<<<<<<<<<
- *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
- *      dest.plp = plp
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_makePileupProxy(bam_pileup1_t **__pyx_v_plp, int __pyx_v_tid, int __pyx_v_pos, int __pyx_v_n) {
-  struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_dest = 0;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("makePileupProxy", 0);
-  __Pyx_TraceCall("makePileupProxy", __pyx_f[0], 166);
-
-  /* "pysam/csamtools.pyx":167
- * cdef class PileupProxy
- * cdef makePileupProxy( bam_pileup1_t ** plp, int tid, int pos, int n ):
- *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)             # <<<<<<<<<<<<<<
- *      dest.plp = plp
- *      dest.tid = tid
- */
-  __pyx_t_1 = __Pyx_tp_new(((PyObject*)__pyx_ptype_5pysam_9csamtools_PileupProxy)); 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);
-  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_9csamtools_PileupProxy)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_dest = ((struct __pyx_obj_5pysam_9csamtools_PileupProxy *)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":168
- * cdef makePileupProxy( bam_pileup1_t ** plp, int tid, int pos, int n ):
- *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
- *      dest.plp = plp             # <<<<<<<<<<<<<<
- *      dest.tid = tid
- *      dest.pos = pos
- */
-  __pyx_v_dest->plp = __pyx_v_plp;
-
-  /* "pysam/csamtools.pyx":169
- *      cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
- *      dest.plp = plp
- *      dest.tid = tid             # <<<<<<<<<<<<<<
- *      dest.pos = pos
- *      dest.n = n
- */
-  __pyx_v_dest->tid = __pyx_v_tid;
-
-  /* "pysam/csamtools.pyx":170
- *      dest.plp = plp
- *      dest.tid = tid
- *      dest.pos = pos             # <<<<<<<<<<<<<<
- *      dest.n = n
- *      return dest
- */
-  __pyx_v_dest->pos = __pyx_v_pos;
-
-  /* "pysam/csamtools.pyx":171
- *      dest.tid = tid
- *      dest.pos = pos
- *      dest.n = n             # <<<<<<<<<<<<<<
- *      return dest
- * 
- */
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(((PyObject *)__pyx_v_dest), __pyx_n_s__n, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":172
- *      dest.pos = pos
- *      dest.n = n
- *      return dest             # <<<<<<<<<<<<<<
- * 
- * cdef class PileupRead
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
-  __pyx_r = ((PyObject *)__pyx_v_dest);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.makePileupProxy", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":175
- * 
- * cdef class PileupRead
- * cdef makePileupRead( bam_pileup1_t * src ):             # <<<<<<<<<<<<<<
- *     '''fill a  PileupRead object from a bam_pileup1_t * object.'''
- *     cdef PileupRead dest = PileupRead.__new__(PileupRead)
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) {
-  struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_dest = 0;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int32_t __pyx_t_2;
-  int __pyx_t_3;
-  uint32_t __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("makePileupRead", 0);
-  __Pyx_TraceCall("makePileupRead", __pyx_f[0], 175);
-
-  /* "pysam/csamtools.pyx":177
- * cdef makePileupRead( bam_pileup1_t * src ):
- *     '''fill a  PileupRead object from a bam_pileup1_t * object.'''
- *     cdef PileupRead dest = PileupRead.__new__(PileupRead)             # <<<<<<<<<<<<<<
- *     dest._alignment = makeAlignedRead( src.b )
- *     dest._qpos = src.qpos
- */
-  __pyx_t_1 = __Pyx_tp_new(((PyObject*)__pyx_ptype_5pysam_9csamtools_PileupRead)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_9csamtools_PileupRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_dest = ((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":178
- *     '''fill a  PileupRead object from a bam_pileup1_t * object.'''
- *     cdef PileupRead dest = PileupRead.__new__(PileupRead)
- *     dest._alignment = makeAlignedRead( src.b )             # <<<<<<<<<<<<<<
- *     dest._qpos = src.qpos
- *     dest._indel = src.indel
- */
-  __pyx_t_1 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_src->b); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_9csamtools_AlignedRead))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GIVEREF(__pyx_t_1);
-  __Pyx_GOTREF(__pyx_v_dest->_alignment);
-  __Pyx_DECREF(((PyObject *)__pyx_v_dest->_alignment));
-  __pyx_v_dest->_alignment = ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":179
- *     cdef PileupRead dest = PileupRead.__new__(PileupRead)
- *     dest._alignment = makeAlignedRead( src.b )
- *     dest._qpos = src.qpos             # <<<<<<<<<<<<<<
- *     dest._indel = src.indel
- *     dest._level = src.level
- */
-  __pyx_t_2 = __pyx_v_src->qpos;
-  __pyx_v_dest->_qpos = __pyx_t_2;
-
-  /* "pysam/csamtools.pyx":180
- *     dest._alignment = makeAlignedRead( src.b )
- *     dest._qpos = src.qpos
- *     dest._indel = src.indel             # <<<<<<<<<<<<<<
- *     dest._level = src.level
- *     dest._is_del = src.is_del
- */
-  __pyx_t_3 = __pyx_v_src->indel;
-  __pyx_v_dest->_indel = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":181
- *     dest._qpos = src.qpos
- *     dest._indel = src.indel
- *     dest._level = src.level             # <<<<<<<<<<<<<<
- *     dest._is_del = src.is_del
- *     dest._is_head = src.is_head
- */
-  __pyx_t_3 = __pyx_v_src->level;
-  __pyx_v_dest->_level = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":182
- *     dest._indel = src.indel
- *     dest._level = src.level
- *     dest._is_del = src.is_del             # <<<<<<<<<<<<<<
- *     dest._is_head = src.is_head
- *     dest._is_tail = src.is_tail
- */
-  __pyx_t_4 = __pyx_v_src->is_del;
-  __pyx_v_dest->_is_del = __pyx_t_4;
-
-  /* "pysam/csamtools.pyx":183
- *     dest._level = src.level
- *     dest._is_del = src.is_del
- *     dest._is_head = src.is_head             # <<<<<<<<<<<<<<
- *     dest._is_tail = src.is_tail
- *     return dest
- */
-  __pyx_t_4 = __pyx_v_src->is_head;
-  __pyx_v_dest->_is_head = __pyx_t_4;
-
-  /* "pysam/csamtools.pyx":184
- *     dest._is_del = src.is_del
- *     dest._is_head = src.is_head
- *     dest._is_tail = src.is_tail             # <<<<<<<<<<<<<<
- *     return dest
- * 
- */
-  __pyx_t_4 = __pyx_v_src->is_tail;
-  __pyx_v_dest->_is_tail = __pyx_t_4;
-
-  /* "pysam/csamtools.pyx":185
- *     dest._is_head = src.is_head
- *     dest._is_tail = src.is_tail
- *     return dest             # <<<<<<<<<<<<<<
- * 
- * cdef class FastqProxy
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
-  __pyx_r = ((PyObject *)__pyx_v_dest);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.makePileupRead", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":188
- * 
- * cdef class FastqProxy
- * cdef makeFastqProxy( kseq_t * src):             # <<<<<<<<<<<<<<
- *     '''enter src into AlignedRead.'''
- *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_makeFastqProxy(kseq_t *__pyx_v_src) {
-  struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_dest = 0;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("makeFastqProxy", 0);
-  __Pyx_TraceCall("makeFastqProxy", __pyx_f[0], 188);
-
-  /* "pysam/csamtools.pyx":190
- * cdef makeFastqProxy( kseq_t * src):
- *     '''enter src into AlignedRead.'''
- *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)             # <<<<<<<<<<<<<<
- *     dest._delegate = src
- *     return dest
- */
-  __pyx_t_1 = __Pyx_tp_new(((PyObject*)__pyx_ptype_5pysam_9csamtools_FastqProxy)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_9csamtools_FastqProxy)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_dest = ((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":191
- *     '''enter src into AlignedRead.'''
- *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
- *     dest._delegate = src             # <<<<<<<<<<<<<<
- *     return dest
- * 
- */
-  __pyx_v_dest->_delegate = __pyx_v_src;
-
-  /* "pysam/csamtools.pyx":192
- *     cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
- *     dest._delegate = src
- *     return dest             # <<<<<<<<<<<<<<
- * 
- * cdef convertBinaryTagToList( uint8_t * s ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
-  __pyx_r = ((PyObject *)__pyx_v_dest);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.makeFastqProxy", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":194
- *     return dest
- * 
- * cdef convertBinaryTagToList( uint8_t * s ):             # <<<<<<<<<<<<<<
- *     """return bytesize, number of values list of values in s."""
- *     cdef char auxtype
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_convertBinaryTagToList(uint8_t *__pyx_v_s) {
-  char __pyx_v_auxtype;
-  uint8_t __pyx_v_byte_size;
-  int32_t __pyx_v_nvalues;
-  PyObject *__pyx_v_values = NULL;
-  CYTHON_UNUSED long __pyx_v_x;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  int32_t __pyx_t_3;
-  int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("convertBinaryTagToList", 0);
-  __Pyx_TraceCall("convertBinaryTagToList", __pyx_f[0], 194);
-
-  /* "pysam/csamtools.pyx":201
- * 
- *     # get byte size
- *     auxtype = s[0]             # <<<<<<<<<<<<<<
- *     byte_size = bam_aux_type2size( auxtype )
- *     s += 1
- */
-  __pyx_v_auxtype = (__pyx_v_s[0]);
-
-  /* "pysam/csamtools.pyx":202
- *     # get byte size
- *     auxtype = s[0]
- *     byte_size = bam_aux_type2size( auxtype )             # <<<<<<<<<<<<<<
- *     s += 1
- *     # get number of values in array
- */
-  __pyx_v_byte_size = bam_aux_type2size(__pyx_v_auxtype);
-
-  /* "pysam/csamtools.pyx":203
- *     auxtype = s[0]
- *     byte_size = bam_aux_type2size( auxtype )
- *     s += 1             # <<<<<<<<<<<<<<
- *     # get number of values in array
- *     nvalues = (<int32_t*>s)[0]
- */
-  __pyx_v_s = (__pyx_v_s + 1);
-
-  /* "pysam/csamtools.pyx":205
- *     s += 1
- *     # get number of values in array
- *     nvalues = (<int32_t*>s)[0]             # <<<<<<<<<<<<<<
- *     s += 4
- *     # get values
- */
-  __pyx_v_nvalues = (((int32_t *)__pyx_v_s)[0]);
-
-  /* "pysam/csamtools.pyx":206
- *     # get number of values in array
- *     nvalues = (<int32_t*>s)[0]
- *     s += 4             # <<<<<<<<<<<<<<
- *     # get values
- *     values = []
- */
-  __pyx_v_s = (__pyx_v_s + 4);
-
-  /* "pysam/csamtools.pyx":208
- *     s += 4
- *     # get values
- *     values = []             # <<<<<<<<<<<<<<
- *     if auxtype == 'c':
- *         for x from 0 <= x < nvalues:
- */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_values = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":209
- *     # get values
- *     values = []
- *     if auxtype == 'c':             # <<<<<<<<<<<<<<
- *         for x from 0 <= x < nvalues:
- *             values.append((<int8_t*>s)[0])
- */
-  __pyx_t_2 = (__pyx_v_auxtype == 'c');
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":210
- *     values = []
- *     if auxtype == 'c':
- *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
- *             values.append((<int8_t*>s)[0])
- *             s += 1
- */
-    __pyx_t_3 = __pyx_v_nvalues;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
-
-      /* "pysam/csamtools.pyx":211
- *     if auxtype == 'c':
- *         for x from 0 <= x < nvalues:
- *             values.append((<int8_t*>s)[0])             # <<<<<<<<<<<<<<
- *             s += 1
- *     elif auxtype == 'C':
- */
-      __pyx_t_1 = __Pyx_PyInt_to_py_int8_t((((int8_t *)__pyx_v_s)[0])); if (unlikely(!__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 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":212
- *         for x from 0 <= x < nvalues:
- *             values.append((<int8_t*>s)[0])
- *             s += 1             # <<<<<<<<<<<<<<
- *     elif auxtype == 'C':
- *         for x from 0 <= x < nvalues:
- */
-      __pyx_v_s = (__pyx_v_s + 1);
-    }
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":213
- *             values.append((<int8_t*>s)[0])
- *             s += 1
- *     elif auxtype == 'C':             # <<<<<<<<<<<<<<
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint8_t*>s)[0])
- */
-  __pyx_t_2 = (__pyx_v_auxtype == 'C');
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":214
- *             s += 1
- *     elif auxtype == 'C':
- *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
- *             values.append((<uint8_t*>s)[0])
- *             s += 1
- */
-    __pyx_t_3 = __pyx_v_nvalues;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
-
-      /* "pysam/csamtools.pyx":215
- *     elif auxtype == 'C':
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint8_t*>s)[0])             # <<<<<<<<<<<<<<
- *             s += 1
- *     elif auxtype == 's':
- */
-      __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t((((uint8_t *)__pyx_v_s)[0])); 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_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -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;
-
-      /* "pysam/csamtools.pyx":216
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint8_t*>s)[0])
- *             s += 1             # <<<<<<<<<<<<<<
- *     elif auxtype == 's':
- *         for x from 0 <= x < nvalues:
- */
-      __pyx_v_s = (__pyx_v_s + 1);
-    }
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":217
- *             values.append((<uint8_t*>s)[0])
- *             s += 1
- *     elif auxtype == 's':             # <<<<<<<<<<<<<<
- *         for x from 0 <= x < nvalues:
- *             values.append((<int16_t*>s)[0])
- */
-  __pyx_t_2 = (__pyx_v_auxtype == 's');
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":218
- *             s += 1
- *     elif auxtype == 's':
- *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
- *             values.append((<int16_t*>s)[0])
- *             s += 2
- */
-    __pyx_t_3 = __pyx_v_nvalues;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
-
-      /* "pysam/csamtools.pyx":219
- *     elif auxtype == 's':
- *         for x from 0 <= x < nvalues:
- *             values.append((<int16_t*>s)[0])             # <<<<<<<<<<<<<<
- *             s += 2
- *     elif auxtype == 'S':
- */
-      __pyx_t_1 = __Pyx_PyInt_to_py_int16_t((((int16_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":220
- *         for x from 0 <= x < nvalues:
- *             values.append((<int16_t*>s)[0])
- *             s += 2             # <<<<<<<<<<<<<<
- *     elif auxtype == 'S':
- *         for x from 0 <= x < nvalues:
- */
-      __pyx_v_s = (__pyx_v_s + 2);
-    }
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":221
- *             values.append((<int16_t*>s)[0])
- *             s += 2
- *     elif auxtype == 'S':             # <<<<<<<<<<<<<<
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint16_t*>s)[0])
- */
-  __pyx_t_2 = (__pyx_v_auxtype == 'S');
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":222
- *             s += 2
- *     elif auxtype == 'S':
- *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
- *             values.append((<uint16_t*>s)[0])
- *             s += 2
- */
-    __pyx_t_3 = __pyx_v_nvalues;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
-
-      /* "pysam/csamtools.pyx":223
- *     elif auxtype == 'S':
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint16_t*>s)[0])             # <<<<<<<<<<<<<<
- *             s += 2
- *     elif auxtype == 'i':
- */
-      __pyx_t_1 = __Pyx_PyInt_to_py_uint16_t((((uint16_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":224
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint16_t*>s)[0])
- *             s += 2             # <<<<<<<<<<<<<<
- *     elif auxtype == 'i':
- *         for x from 0 <= x < nvalues:
- */
-      __pyx_v_s = (__pyx_v_s + 2);
-    }
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":225
- *             values.append((<uint16_t*>s)[0])
- *             s += 2
- *     elif auxtype == 'i':             # <<<<<<<<<<<<<<
- *         for x from 0 <= x < nvalues:
- *             values.append((<int32_t*>s)[0])
- */
-  __pyx_t_2 = (__pyx_v_auxtype == 'i');
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":226
- *             s += 2
- *     elif auxtype == 'i':
- *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
- *             values.append((<int32_t*>s)[0])
- *             s += 4
- */
-    __pyx_t_3 = __pyx_v_nvalues;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
-
-      /* "pysam/csamtools.pyx":227
- *     elif auxtype == 'i':
- *         for x from 0 <= x < nvalues:
- *             values.append((<int32_t*>s)[0])             # <<<<<<<<<<<<<<
- *             s += 4
- *     elif auxtype == 'I':
- */
-      __pyx_t_1 = __Pyx_PyInt_to_py_int32_t((((int32_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":228
- *         for x from 0 <= x < nvalues:
- *             values.append((<int32_t*>s)[0])
- *             s += 4             # <<<<<<<<<<<<<<
- *     elif auxtype == 'I':
- *         for x from 0 <= x < nvalues:
- */
-      __pyx_v_s = (__pyx_v_s + 4);
-    }
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":229
- *             values.append((<int32_t*>s)[0])
- *             s += 4
- *     elif auxtype == 'I':             # <<<<<<<<<<<<<<
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint32_t*>s)[0])
- */
-  __pyx_t_2 = (__pyx_v_auxtype == 'I');
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":230
- *             s += 4
- *     elif auxtype == 'I':
- *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
- *             values.append((<uint32_t*>s)[0])
- *             s += 4
- */
-    __pyx_t_3 = __pyx_v_nvalues;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
-
-      /* "pysam/csamtools.pyx":231
- *     elif auxtype == 'I':
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint32_t*>s)[0])             # <<<<<<<<<<<<<<
- *             s += 4
- *     elif auxtype == 'f':
- */
-      __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t((((uint32_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":232
- *         for x from 0 <= x < nvalues:
- *             values.append((<uint32_t*>s)[0])
- *             s += 4             # <<<<<<<<<<<<<<
- *     elif auxtype == 'f':
- *         for x from 0 <= x < nvalues:
- */
-      __pyx_v_s = (__pyx_v_s + 4);
-    }
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":233
- *             values.append((<uint32_t*>s)[0])
- *             s += 4
- *     elif auxtype == 'f':             # <<<<<<<<<<<<<<
- *         for x from 0 <= x < nvalues:
- *             values.append((<float*>s)[0])
- */
-  __pyx_t_2 = (__pyx_v_auxtype == 'f');
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":234
- *             s += 4
- *     elif auxtype == 'f':
- *         for x from 0 <= x < nvalues:             # <<<<<<<<<<<<<<
- *             values.append((<float*>s)[0])
- *             s += 4
- */
-    __pyx_t_3 = __pyx_v_nvalues;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
-
-      /* "pysam/csamtools.pyx":235
- *     elif auxtype == 'f':
- *         for x from 0 <= x < nvalues:
- *             values.append((<float*>s)[0])             # <<<<<<<<<<<<<<
- *             s += 4
- * 
- */
-      __pyx_t_1 = PyFloat_FromDouble((((float *)__pyx_v_s)[0])); 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_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":236
- *         for x from 0 <= x < nvalues:
- *             values.append((<float*>s)[0])
- *             s += 4             # <<<<<<<<<<<<<<
- * 
- *     return byte_size, nvalues, values
- */
-      __pyx_v_s = (__pyx_v_s + 4);
-    }
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":238
- *             s += 4
- * 
- *     return byte_size, nvalues, values             # <<<<<<<<<<<<<<
- * 
- * #####################################################################
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t(__pyx_v_byte_size); 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_t_5 = __Pyx_PyInt_to_py_int32_t(__pyx_v_nvalues); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __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 = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  __Pyx_INCREF(((PyObject *)__pyx_v_values));
-  PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_v_values));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
-  __pyx_t_1 = 0;
-  __pyx_t_5 = 0;
-  __pyx_r = ((PyObject *)__pyx_t_6);
-  __pyx_t_6 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_AddTraceback("pysam.csamtools.convertBinaryTagToList", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_values);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":245
- * ## Generic callbacks for inserting python callbacks.
- * #####################################################################
- * cdef int fetch_callback( bam1_t *alignment, void *f):             # <<<<<<<<<<<<<<
- *     '''callback for bam_fetch.
- * 
- */
-
-static int __pyx_f_5pysam_9csamtools_fetch_callback(bam1_t *__pyx_v_alignment, void *__pyx_v_f) {
-  PyObject *__pyx_v_a = NULL;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("fetch_callback", 0);
-  __Pyx_TraceCall("fetch_callback", __pyx_f[0], 245);
-
-  /* "pysam/csamtools.pyx":250
- *     calls function in *f* with a new :class:`AlignedRead` object as parameter.
- *     '''
- *     a = makeAlignedRead( alignment )             # <<<<<<<<<<<<<<
- *     (<object>f)(a)
- * 
- */
-  __pyx_t_1 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_a = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":251
- *     '''
- *     a = makeAlignedRead( alignment )
- *     (<object>f)(a)             # <<<<<<<<<<<<<<
- * 
- * class PileupColumn(object):
- */
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_a);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_a);
-  __Pyx_GIVEREF(__pyx_v_a);
-  __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_f), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_WriteUnraisable("pysam.csamtools.fetch_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_a);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_12PileupColumn_1__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_12PileupColumn___str__[] = "PileupColumn.__str__(self)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_12PileupColumn_1__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_12PileupColumn_1__str__, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_12PileupColumn___str__)};
-static PyObject *__pyx_pw_5pysam_9csamtools_12PileupColumn_1__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_12PileupColumn___str__(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":266
- *         list of reads (:class:`pysam.PileupRead`) aligned to this column
- *     '''
- *     def __str__(self):             # <<<<<<<<<<<<<<
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
- *             "\n" + "\n".join( map(str, self.pileups) )
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_12PileupColumn___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__str__", 0);
-  __Pyx_TraceCall("__str__", __pyx_f[0], 266);
-
-  /* "pysam/csamtools.pyx":267
- *     '''
- *     def __str__(self):
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\             # <<<<<<<<<<<<<<
- *             "\n" + "\n".join( map(str, self.pileups) )
- * 
- */
-  __Pyx_XDECREF(__pyx_r);
-
-  /* "pysam/csamtools.pyx":268
- *     def __str__(self):
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
- *             "\n" + "\n".join( map(str, self.pileups) )             # <<<<<<<<<<<<<<
- * 
- * cdef int pileup_callback( uint32_t tid, uint32_t pos, int n, bam_pileup1_t *pl, void *f):
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-
-  /* "pysam/csamtools.pyx":267
- *     '''
- *     def __str__(self):
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\             # <<<<<<<<<<<<<<
- *             "\n" + "\n".join( map(str, self.pileups) )
- * 
- */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __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);
-  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_2 = 0;
-  __pyx_t_3 = 0;
-  __pyx_t_4 = 0;
-  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_5));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-  __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-
-  /* "pysam/csamtools.pyx":268
- *     def __str__(self):
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
- *             "\n" + "\n".join( map(str, self.pileups) )             # <<<<<<<<<<<<<<
- * 
- * cdef int pileup_callback( uint32_t tid, uint32_t pos, int n, bam_pileup1_t *pl, void *f):
- */
-  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pileups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __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 = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  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_builtin_map, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __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 = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __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_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __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_1); __pyx_t_1 = 0;
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("pysam.csamtools.PileupColumn.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":270
- *             "\n" + "\n".join( map(str, self.pileups) )
- * 
- * cdef int pileup_callback( uint32_t tid, uint32_t pos, int n, bam_pileup1_t *pl, void *f):             # <<<<<<<<<<<<<<
- *     '''callback for pileup.
- * 
- */
-
-static int __pyx_f_5pysam_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __pyx_v_pos, int __pyx_v_n, bam_pileup1_t *__pyx_v_pl, void *__pyx_v_f) {
-  PyObject *__pyx_v_p = NULL;
-  PyObject *__pyx_v_pileups = NULL;
-  int __pyx_v_x;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("pileup_callback", 0);
-  __Pyx_TraceCall("pileup_callback", __pyx_f[0], 270);
-
-  /* "pysam/csamtools.pyx":287
- *     '''
- * 
- *     p = PileupColumn()             # <<<<<<<<<<<<<<
- *     p.tid = tid
- *     p.pos = pos
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PileupColumn); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __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 = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_p = __pyx_t_2;
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":288
- * 
- *     p = PileupColumn()
- *     p.tid = tid             # <<<<<<<<<<<<<<
- *     p.pos = pos
- *     p.n = n
- */
-  __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__tid, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":289
- *     p = PileupColumn()
- *     p.tid = tid
- *     p.pos = pos             # <<<<<<<<<<<<<<
- *     p.n = n
- *     pileups = []
- */
-  __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__pos, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":290
- *     p.tid = tid
- *     p.pos = pos
- *     p.n = n             # <<<<<<<<<<<<<<
- *     pileups = []
- * 
- */
-  __pyx_t_2 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__n, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":291
- *     p.pos = pos
- *     p.n = n
- *     pileups = []             # <<<<<<<<<<<<<<
- * 
- *     cdef int x
- */
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_pileups = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":294
- * 
- *     cdef int x
- *     for x from 0 <= x < n:             # <<<<<<<<<<<<<<
- *         pileups.append( makePileupRead( &(pl[x]) ) )
- *     p.pileups = pileups
- */
-  __pyx_t_3 = __pyx_v_n;
-  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
-
-    /* "pysam/csamtools.pyx":295
- *     cdef int x
- *     for x from 0 <= x < n:
- *         pileups.append( makePileupRead( &(pl[x]) ) )             # <<<<<<<<<<<<<<
- *     p.pileups = pileups
- * 
- */
-    __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupRead((&(__pyx_v_pl[__pyx_v_x]))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_4 = PyList_Append(__pyx_v_pileups, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  }
-
-  /* "pysam/csamtools.pyx":296
- *     for x from 0 <= x < n:
- *         pileups.append( makePileupRead( &(pl[x]) ) )
- *     p.pileups = pileups             # <<<<<<<<<<<<<<
- * 
- *     (<object>f)(p)
- */
-  if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__pileups, ((PyObject *)__pyx_v_pileups)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":298
- *     p.pileups = pileups
- * 
- *     (<object>f)(p)             # <<<<<<<<<<<<<<
- * 
- * cdef int pileup_fetch_callback( bam1_t *b, void *data):
- */
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_v_p);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_p);
-  __Pyx_GIVEREF(__pyx_v_p);
-  __pyx_t_1 = PyObject_Call(((PyObject *)__pyx_v_f), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_WriteUnraisable("pysam.csamtools.pileup_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_p);
-  __Pyx_XDECREF(__pyx_v_pileups);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":300
- *     (<object>f)(p)
- * 
- * cdef int pileup_fetch_callback( bam1_t *b, void *data):             # <<<<<<<<<<<<<<
- *     '''callback for bam_fetch.
- * 
- */
-
-static int __pyx_f_5pysam_9csamtools_pileup_fetch_callback(bam1_t *__pyx_v_b, void *__pyx_v_data) {
-  bam_plbuf_t *__pyx_v_buf;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("pileup_fetch_callback", 0);
-  __Pyx_TraceCall("pileup_fetch_callback", __pyx_f[0], 300);
-
-  /* "pysam/csamtools.pyx":306
- *     '''
- *     cdef bam_plbuf_t * buf
- *     buf = <bam_plbuf_t*>data             # <<<<<<<<<<<<<<
- *     bam_plbuf_push(b, buf)
- *     return 0
- */
-  __pyx_v_buf = ((bam_plbuf_t *)__pyx_v_data);
-
-  /* "pysam/csamtools.pyx":307
- *     cdef bam_plbuf_t * buf
- *     buf = <bam_plbuf_t*>data
- *     bam_plbuf_push(b, buf)             # <<<<<<<<<<<<<<
- *     return 0
- * 
- */
-  bam_plbuf_push(__pyx_v_b, __pyx_v_buf);
-
-  /* "pysam/csamtools.pyx":308
- *     buf = <bam_plbuf_t*>data
- *     bam_plbuf_push(b, buf)
- *     return 0             # <<<<<<<<<<<<<<
- * 
- * class StderrStore():
- */
-  __pyx_r = 0;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11StderrStore_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11StderrStore___init__[] = "StderrStore.__init__(self)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_11StderrStore_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_11StderrStore_1__init__, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_11StderrStore___init__)};
-static PyObject *__pyx_pw_5pysam_9csamtools_11StderrStore_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11StderrStore___init__(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":314
- *     stderr is captured.
- *     '''
- *     def __init__(self):             # <<<<<<<<<<<<<<
- *         return
- *         self.stderr_h, self.stderr_f = tempfile.mkstemp()
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11StderrStore___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 314);
-
-  /* "pysam/csamtools.pyx":315
- *     '''
- *     def __init__(self):
- *         return             # <<<<<<<<<<<<<<
- *         self.stderr_h, self.stderr_f = tempfile.mkstemp()
- *         self.stderr_save = Outs( sys.stderr.fileno() )
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11StderrStore_3readAndRelease(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11StderrStore_2readAndRelease[] = "StderrStore.readAndRelease(self)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_11StderrStore_3readAndRelease = {__Pyx_NAMESTR("readAndRelease"), (PyCFunction)__pyx_pw_5pysam_9csamtools_11StderrStore_3readAndRelease, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_11StderrStore_2readAndRelease)};
-static PyObject *__pyx_pw_5pysam_9csamtools_11StderrStore_3readAndRelease(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("readAndRelease (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11StderrStore_2readAndRelease(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":320
- *         self.stderr_save.setfd( self.stderr_h )
- * 
- *     def readAndRelease( self ):             # <<<<<<<<<<<<<<
- *         return []
- *         self.stderr_save.restore()
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11StderrStore_2readAndRelease(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("readAndRelease", 0);
-  __Pyx_TraceCall("readAndRelease", __pyx_f[0], 320);
-
-  /* "pysam/csamtools.pyx":321
- * 
- *     def readAndRelease( self ):
- *         return []             # <<<<<<<<<<<<<<
- *         self.stderr_save.restore()
- *         lines = []
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.StderrStore.readAndRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11StderrStore_5release(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11StderrStore_4release[] = "StderrStore.release(self)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_11StderrStore_5release = {__Pyx_NAMESTR("release"), (PyCFunction)__pyx_pw_5pysam_9csamtools_11StderrStore_5release, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_11StderrStore_4release)};
-static PyObject *__pyx_pw_5pysam_9csamtools_11StderrStore_5release(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("release (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11StderrStore_4release(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":329
- *         return lines
- * 
- *     def release(self):             # <<<<<<<<<<<<<<
- *         return
- *         self.stderr_save.restore()
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11StderrStore_4release(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("release", 0);
-  __Pyx_TraceCall("release", __pyx_f[0], 329);
-
-  /* "pysam/csamtools.pyx":330
- * 
- *     def release(self):
- *         return             # <<<<<<<<<<<<<<
- *         self.stderr_save.restore()
- *         if os.path.exists(self.stderr_f):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11StderrStore_7__del__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11StderrStore_6__del__[] = "StderrStore.__del__(self)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_11StderrStore_7__del__ = {__Pyx_NAMESTR("__del__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_11StderrStore_7__del__, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_11StderrStore_6__del__)};
-static PyObject *__pyx_pw_5pysam_9csamtools_11StderrStore_7__del__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11StderrStore_6__del__(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":335
- *             os.remove( self.stderr_f )
- * 
- *     def __del__(self):             # <<<<<<<<<<<<<<
- *         self.release()
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11StderrStore_6__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__del__", 0);
-  __Pyx_TraceCall("__del__", __pyx_f[0], 335);
-
-  /* "pysam/csamtools.pyx":336
- * 
- *     def __del__(self):
- *         self.release()             # <<<<<<<<<<<<<<
- * 
- * class StderrStoreWindows():
- */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__release); 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_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.StderrStore.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_18StderrStoreWindows___init__[] = "StderrStoreWindows.__init__(self)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_1__init__, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_18StderrStoreWindows___init__)};
-static PyObject *__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_18StderrStoreWindows___init__(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":340
- * class StderrStoreWindows():
- *     '''does nothing. stderr can't be redirected on windows'''
- *     def __init__(self): pass             # <<<<<<<<<<<<<<
- *     def readAndRelease(self): return []
- *     def release(self): pass
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_18StderrStoreWindows___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 340);
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_3readAndRelease(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_18StderrStoreWindows_2readAndRelease[] = "StderrStoreWindows.readAndRelease(self)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_3readAndRelease = {__Pyx_NAMESTR("readAndRelease"), (PyCFunction)__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_3readAndRelease, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_18StderrStoreWindows_2readAndRelease)};
-static PyObject *__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_3readAndRelease(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("readAndRelease (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_18StderrStoreWindows_2readAndRelease(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":341
- *     '''does nothing. stderr can't be redirected on windows'''
- *     def __init__(self): pass
- *     def readAndRelease(self): return []             # <<<<<<<<<<<<<<
- *     def release(self): pass
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_18StderrStoreWindows_2readAndRelease(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("readAndRelease", 0);
-  __Pyx_TraceCall("readAndRelease", __pyx_f[0], 341);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyList_New(0); 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_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.StderrStoreWindows.readAndRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_5release(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_18StderrStoreWindows_4release[] = "StderrStoreWindows.release(self)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_5release = {__Pyx_NAMESTR("release"), (PyCFunction)__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_5release, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_18StderrStoreWindows_4release)};
-static PyObject *__pyx_pw_5pysam_9csamtools_18StderrStoreWindows_5release(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("release (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_18StderrStoreWindows_4release(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":342
- *     def __init__(self): pass
- *     def readAndRelease(self): return []
- *     def release(self): pass             # <<<<<<<<<<<<<<
- * 
- * if platform.system()=='Windows':
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_18StderrStoreWindows_4release(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("release", 0);
-  __Pyx_TraceCall("release", __pyx_f[0], 342);
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_9Fastafile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_9Fastafile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_args = 0;
-  PyObject *__pyx_v_kwargs = 0;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
-  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
-  if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
-  __Pyx_INCREF(__pyx_args);
-  __pyx_v_args = __pyx_args;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile___cinit__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
-  __Pyx_XDECREF(__pyx_v_args);
-  __Pyx_XDECREF(__pyx_v_kwargs);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":393
- *     '''
- * 
- *     def __cinit__(self, *args, **kwargs ):             # <<<<<<<<<<<<<<
- *         self.fastafile = NULL
- *         self._filename = None
- */
-
-static int __pyx_pf_5pysam_9csamtools_9Fastafile___cinit__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 393);
-
-  /* "pysam/csamtools.pyx":394
- * 
- *     def __cinit__(self, *args, **kwargs ):
- *         self.fastafile = NULL             # <<<<<<<<<<<<<<
- *         self._filename = None
- *         self._references = None
- */
-  __pyx_v_self->fastafile = NULL;
-
-  /* "pysam/csamtools.pyx":395
- *     def __cinit__(self, *args, **kwargs ):
- *         self.fastafile = NULL
- *         self._filename = None             # <<<<<<<<<<<<<<
- *         self._references = None
- *         self._lengths = None
- */
-  __Pyx_INCREF(Py_None);
-  __Pyx_GIVEREF(Py_None);
-  __Pyx_GOTREF(__pyx_v_self->_filename);
-  __Pyx_DECREF(__pyx_v_self->_filename);
-  __pyx_v_self->_filename = Py_None;
-
-  /* "pysam/csamtools.pyx":396
- *         self.fastafile = NULL
- *         self._filename = None
- *         self._references = None             # <<<<<<<<<<<<<<
- *         self._lengths = None
- *         self.reference2length = None
- */
-  __Pyx_INCREF(Py_None);
-  __Pyx_GIVEREF(Py_None);
-  __Pyx_GOTREF(__pyx_v_self->_references);
-  __Pyx_DECREF(__pyx_v_self->_references);
-  __pyx_v_self->_references = Py_None;
-
-  /* "pysam/csamtools.pyx":397
- *         self._filename = None
- *         self._references = None
- *         self._lengths = None             # <<<<<<<<<<<<<<
- *         self.reference2length = None
- *         self._open( *args, **kwargs )
- */
-  __Pyx_INCREF(Py_None);
-  __Pyx_GIVEREF(Py_None);
-  __Pyx_GOTREF(__pyx_v_self->_lengths);
-  __Pyx_DECREF(__pyx_v_self->_lengths);
-  __pyx_v_self->_lengths = Py_None;
-
-  /* "pysam/csamtools.pyx":398
- *         self._references = None
- *         self._lengths = None
- *         self.reference2length = None             # <<<<<<<<<<<<<<
- *         self._open( *args, **kwargs )
- * 
- */
-  __Pyx_INCREF(Py_None);
-  __Pyx_GIVEREF(Py_None);
-  __Pyx_GOTREF(__pyx_v_self->reference2length);
-  __Pyx_DECREF(__pyx_v_self->reference2length);
-  __pyx_v_self->reference2length = Py_None;
-
-  /* "pysam/csamtools.pyx":399
- *         self._lengths = None
- *         self.reference2length = None
- *         self._open( *args, **kwargs )             # <<<<<<<<<<<<<<
- * 
- *     def _isOpen( self ):
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); 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 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = ((PyObject *)__pyx_v_kwargs);
-  __Pyx_INCREF(__pyx_t_3);
-  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastafile_2_isOpen[] = "Fastafile._isOpen(self)\nreturn true if samfile has been opened.";
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_2_isOpen(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":401
- *         self._open( *args, **kwargs )
- * 
- *     def _isOpen( self ):             # <<<<<<<<<<<<<<
- *         '''return true if samfile has been opened.'''
- *         return self.fastafile != NULL
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_isOpen", 0);
-  __Pyx_TraceCall("_isOpen", __pyx_f[0], 401);
-
-  /* "pysam/csamtools.pyx":403
- *     def _isOpen( self ):
- *         '''return true if samfile has been opened.'''
- *         return self.fastafile != NULL             # <<<<<<<<<<<<<<
- * 
- *     def __len__(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->fastafile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __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("pysam.csamtools.Fastafile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static Py_ssize_t __pyx_pw_5pysam_9csamtools_9Fastafile_5__len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pw_5pysam_9csamtools_9Fastafile_5__len__(PyObject *__pyx_v_self) {
-  Py_ssize_t __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_4__len__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":405
- *         return self.fastafile != NULL
- * 
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         if self.fastafile == NULL:
- *             raise ValueError( "calling len() on closed file" )
- */
-
-static Py_ssize_t __pyx_pf_5pysam_9csamtools_9Fastafile_4__len__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self) {
-  Py_ssize_t __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__len__", 0);
-  __Pyx_TraceCall("__len__", __pyx_f[0], 405);
-
-  /* "pysam/csamtools.pyx":406
- * 
- *     def __len__(self):
- *         if self.fastafile == NULL:             # <<<<<<<<<<<<<<
- *             raise ValueError( "calling len() on closed file" )
- * 
- */
-  __pyx_t_1 = (__pyx_v_self->fastafile == NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":407
- *     def __len__(self):
- *         if self.fastafile == NULL:
- *             raise ValueError( "calling len() on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         return faidx_fetch_nseq(self.fastafile)
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":409
- *             raise ValueError( "calling len() on closed file" )
- * 
- *         return faidx_fetch_nseq(self.fastafile)             # <<<<<<<<<<<<<<
- * 
- *     def _open(self, filename):
- */
-  __pyx_r = faidx_fetch_nseq(__pyx_v_self->fastafile);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_7_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastafile_6_open[] = "Fastafile._open(self, filename)\nopen an indexed fasta file.\n\n        This method expects an indexed fasta file.\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_7_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_open (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_6_open(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-static PyObject *__pyx_gb_5pysam_9csamtools_9Fastafile_5_open_2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-
-/* "pysam/csamtools.pyx":431
- *         with open( self._filename + b".fai" ) as inf:
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)             # <<<<<<<<<<<<<<
- *             self._lengths = tuple(int(x[1]) for x in data)
- *             self.reference2length = dict(zip(self._references, self._lengths))
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_5_open_genexpr(PyObject *__pyx_self) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("genexpr", 0);
-  __pyx_cur_scope = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *)__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_3_genexpr->tp_new(__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
-  if (unlikely(!__pyx_cur_scope)) {
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __Pyx_GOTREF(__pyx_cur_scope);
-  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *) __pyx_self;
-  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
-  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
-  __Pyx_TraceCall("genexpr", __pyx_f[0], 431);
-  {
-    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_9csamtools_9Fastafile_5_open_2generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_cur_scope);
-    __Pyx_RefNannyFinishContext();
-    return (PyObject *) gen;
-  }
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile._open.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-static PyObject *__pyx_gb_5pysam_9csamtools_9Fastafile_5_open_2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
-{
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
-  PyObject *__pyx_r = NULL;
-  PyObject *__pyx_t_1 = NULL;
-  Py_ssize_t __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("None", 0);
-  switch (__pyx_generator->resume_label) {
-    case 0: goto __pyx_L3_first_run;
-    case 1: goto __pyx_L6_resume_from_yield;
-    default: /* CPython raises the right error here */
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __pyx_L3_first_run:;
-  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data)) { __Pyx_RaiseClosureNameError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-  if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data) == Py_None)) {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
-  for (;;) {
-    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
-    #if CYTHON_COMPILING_IN_CPYTHON
-    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    #else
-    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    #endif
-    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
-    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_x);
-    __Pyx_GIVEREF(__pyx_t_3);
-    __pyx_cur_scope->__pyx_v_x = __pyx_t_3;
-    __pyx_t_3 = 0;
-    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_x, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
-    __Pyx_XGIVEREF(__pyx_t_1);
-    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
-    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
-    __Pyx_XGIVEREF(__pyx_r);
-    __Pyx_RefNannyFinishContext();
-    /* return from generator, yielding value */
-    __pyx_generator->resume_label = 1;
-    return __pyx_r;
-    __pyx_L6_resume_from_yield:;
-    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
-    __pyx_cur_scope->__pyx_t_0 = 0;
-    __Pyx_XGOTREF(__pyx_t_1);
-    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
-    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  PyErr_SetNone(PyExc_StopIteration);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_generator->resume_label = -1;
-  __Pyx_Generator_clear((PyObject*)__pyx_generator);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-}
-static PyObject *__pyx_gb_5pysam_9csamtools_9Fastafile_5_open_5generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-
-/* "pysam/csamtools.pyx":432
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)
- *             self._lengths = tuple(int(x[1]) for x in data)             # <<<<<<<<<<<<<<
- *             self.reference2length = dict(zip(self._references, self._lengths))
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_5_open_3genexpr(PyObject *__pyx_self) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("genexpr", 0);
-  __pyx_cur_scope = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *)__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_4_genexpr->tp_new(__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
-  if (unlikely(!__pyx_cur_scope)) {
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __Pyx_GOTREF(__pyx_cur_scope);
-  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *) __pyx_self;
-  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
-  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
-  __Pyx_TraceCall("genexpr", __pyx_f[0], 432);
-  {
-    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_9csamtools_9Fastafile_5_open_5generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_cur_scope);
-    __Pyx_RefNannyFinishContext();
-    return (PyObject *) gen;
-  }
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile._open.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-static PyObject *__pyx_gb_5pysam_9csamtools_9Fastafile_5_open_5generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
-{
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
-  PyObject *__pyx_r = NULL;
-  PyObject *__pyx_t_1 = NULL;
-  Py_ssize_t __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("None", 0);
-  switch (__pyx_generator->resume_label) {
-    case 0: goto __pyx_L3_first_run;
-    case 1: goto __pyx_L6_resume_from_yield;
-    default: /* CPython raises the right error here */
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __pyx_L3_first_run:;
-  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data)) { __Pyx_RaiseClosureNameError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-  if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data) == Py_None)) {
-    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_data); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
-  for (;;) {
-    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
-    #if CYTHON_COMPILING_IN_CPYTHON
-    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    #else
-    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    #endif
-    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
-    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_x);
-    __Pyx_GIVEREF(__pyx_t_3);
-    __pyx_cur_scope->__pyx_v_x = __pyx_t_3;
-    __pyx_t_3 = 0;
-    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_x, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
-    __Pyx_GIVEREF(__pyx_t_3);
-    __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
-    __Pyx_XGIVEREF(__pyx_t_1);
-    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
-    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
-    __Pyx_XGIVEREF(__pyx_r);
-    __Pyx_RefNannyFinishContext();
-    /* return from generator, yielding value */
-    __pyx_generator->resume_label = 1;
-    return __pyx_r;
-    __pyx_L6_resume_from_yield:;
-    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
-    __pyx_cur_scope->__pyx_t_0 = 0;
-    __Pyx_XGOTREF(__pyx_t_1);
-    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
-    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  PyErr_SetNone(PyExc_StopIteration);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_generator->resume_label = -1;
-  __Pyx_Generator_clear((PyObject*)__pyx_generator);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-}
-
-/* "pysam/csamtools.pyx":411
- *         return faidx_fetch_nseq(self.fastafile)
- * 
- *     def _open(self, filename):             # <<<<<<<<<<<<<<
- *         '''open an indexed fasta file.
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_6_open(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_filename) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *__pyx_cur_scope;
-  PyObject *__pyx_v_inf = NULL;
-  PyObject *__pyx_v_x = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  char *__pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  int __pyx_t_6;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  Py_ssize_t __pyx_t_11;
-  PyObject *(*__pyx_t_12)(PyObject *);
-  PyObject *__pyx_t_13 = NULL;
-  PyObject *__pyx_t_14 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_open", 0);
-  __pyx_cur_scope = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *)__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_2__open->tp_new(__pyx_ptype_5pysam_9csamtools___pyx_scope_struct_2__open, __pyx_empty_tuple, NULL);
-  if (unlikely(!__pyx_cur_scope)) {
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __Pyx_GOTREF(__pyx_cur_scope);
-  __Pyx_TraceCall("_open", __pyx_f[0], 411);
-
-  /* "pysam/csamtools.pyx":418
- * 
- *         # close a previously opened file
- *         if self.fastafile != NULL: self.close()             # <<<<<<<<<<<<<<
- *         self._filename = _encodeFilename(filename)
- *         self.fastafile = fai_load(self._filename)
- */
-  __pyx_t_1 = (__pyx_v_self->fastafile != NULL);
-  if (__pyx_t_1) {
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __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 = 418; __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_3); __pyx_t_3 = 0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":419
- *         # close a previously opened file
- *         if self.fastafile != NULL: self.close()
- *         self._filename = _encodeFilename(filename)             # <<<<<<<<<<<<<<
- *         self.fastafile = fai_load(self._filename)
- * 
- */
-  __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_9csamtools__encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  __Pyx_GOTREF(__pyx_v_self->_filename);
-  __Pyx_DECREF(__pyx_v_self->_filename);
-  __pyx_v_self->_filename = __pyx_t_3;
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":420
- *         if self.fastafile != NULL: self.close()
- *         self._filename = _encodeFilename(filename)
- *         self.fastafile = fai_load(self._filename)             # <<<<<<<<<<<<<<
- * 
- *         if self.fastafile == NULL:
- */
-  __pyx_t_4 = PyBytes_AsString(__pyx_v_self->_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->fastafile = fai_load(__pyx_t_4);
-
-  /* "pysam/csamtools.pyx":422
- *         self.fastafile = fai_load(self._filename)
- * 
- *         if self.fastafile == NULL:             # <<<<<<<<<<<<<<
- *             raise IOError("could not open file `%s`" % filename)
- * 
- */
-  __pyx_t_1 = (__pyx_v_self->fastafile == NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":423
- * 
- *         if self.fastafile == NULL:
- *             raise IOError("could not open file `%s`" % filename)             # <<<<<<<<<<<<<<
- * 
- *         # read index
- */
-    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __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_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":426
- * 
- *         # read index
- *         if not os.path.exists( self._filename + b".fai" ):             # <<<<<<<<<<<<<<
- *             raise ValueError("could not locate index file")
- * 
- */
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __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_GetAttr(__pyx_t_2, __pyx_n_s__exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyNumber_Add(__pyx_v_self->_filename, ((PyObject *)__pyx_kp_b_10)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __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 = 426; __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_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __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_5)); __pyx_t_5 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_6 = (!__pyx_t_1);
-  if (__pyx_t_6) {
-
-    /* "pysam/csamtools.pyx":427
- *         # read index
- *         if not os.path.exists( self._filename + b".fai" ):
- *             raise ValueError("could not locate index file")             # <<<<<<<<<<<<<<
- * 
- *         with open( self._filename + b".fai" ) as inf:
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":429
- *             raise ValueError("could not locate index file")
- * 
- *         with open( self._filename + b".fai" ) as inf:             # <<<<<<<<<<<<<<
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)
- */
-  /*with:*/ {
-    __pyx_t_2 = PyNumber_Add(__pyx_v_self->_filename, ((PyObject *)__pyx_kp_b_10)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    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_open, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____exit__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____enter__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    /*try:*/ {
-      {
-        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
-        __Pyx_XGOTREF(__pyx_t_8);
-        __Pyx_XGOTREF(__pyx_t_9);
-        __Pyx_XGOTREF(__pyx_t_10);
-        /*try:*/ {
-          __Pyx_INCREF(__pyx_t_3);
-          __pyx_v_inf = __pyx_t_3;
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-          /* "pysam/csamtools.pyx":430
- * 
- *         with open( self._filename + b".fai" ) as inf:
- *             data = [ x.split("\t") for x in inf ]             # <<<<<<<<<<<<<<
- *             self._references = tuple(x[0] for x in data)
- *             self._lengths = tuple(int(x[1]) for x in data)
- */
-          __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          if (PyList_CheckExact(__pyx_v_inf) || PyTuple_CheckExact(__pyx_v_inf)) {
-            __pyx_t_2 = __pyx_v_inf; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
-            __pyx_t_12 = NULL;
-          } else {
-            __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_GOTREF(__pyx_t_2);
-            __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext;
-          }
-          for (;;) {
-            if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_2)) {
-              if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
-              #if CYTHON_COMPILING_IN_CPYTHON
-              __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-              #else
-              __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-              #endif
-            } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_2)) {
-              if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-              #if CYTHON_COMPILING_IN_CPYTHON
-              __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-              #else
-              __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-              #endif
-            } else {
-              __pyx_t_5 = __pyx_t_12(__pyx_t_2);
-              if (unlikely(!__pyx_t_5)) {
-                if (PyErr_Occurred()) {
-                  if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-                  else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-                }
-                break;
-              }
-              __Pyx_GOTREF(__pyx_t_5);
-            }
-            __Pyx_XDECREF(__pyx_v_x);
-            __pyx_v_x = __pyx_t_5;
-            __pyx_t_5 = 0;
-            __pyx_t_5 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_GOTREF(__pyx_t_5);
-            __pyx_t_13 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_GOTREF(__pyx_t_13);
-            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-            if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 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_GIVEREF(__pyx_t_2);
-          __pyx_cur_scope->__pyx_v_data = ((PyObject*)__pyx_t_2);
-          __pyx_t_2 = 0;
-
-          /* "pysam/csamtools.pyx":431
- *         with open( self._filename + b".fai" ) as inf:
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)             # <<<<<<<<<<<<<<
- *             self._lengths = tuple(int(x[1]) for x in data)
- *             self.reference2length = dict(zip(self._references, self._lengths))
- */
-          __pyx_t_2 = __pyx_pf_5pysam_9csamtools_9Fastafile_5_open_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-          __Pyx_GIVEREF(__pyx_t_2);
-          __pyx_t_2 = 0;
-          __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-          __Pyx_GIVEREF(__pyx_t_2);
-          __Pyx_GOTREF(__pyx_v_self->_references);
-          __Pyx_DECREF(__pyx_v_self->_references);
-          __pyx_v_self->_references = __pyx_t_2;
-          __pyx_t_2 = 0;
-
-          /* "pysam/csamtools.pyx":432
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)
- *             self._lengths = tuple(int(x[1]) for x in data)             # <<<<<<<<<<<<<<
- *             self.reference2length = dict(zip(self._references, self._lengths))
- * 
- */
-          __pyx_t_2 = __pyx_pf_5pysam_9csamtools_9Fastafile_5_open_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-          __Pyx_GIVEREF(__pyx_t_2);
-          __pyx_t_2 = 0;
-          __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-          __Pyx_GIVEREF(__pyx_t_2);
-          __Pyx_GOTREF(__pyx_v_self->_lengths);
-          __Pyx_DECREF(__pyx_v_self->_lengths);
-          __pyx_v_self->_lengths = __pyx_t_2;
-          __pyx_t_2 = 0;
-
-          /* "pysam/csamtools.pyx":433
- *             self._references = tuple(x[0] for x in data)
- *             self._lengths = tuple(int(x[1]) for x in data)
- *             self.reference2length = dict(zip(self._references, self._lengths))             # <<<<<<<<<<<<<<
- * 
- *     def close( self ):
- */
-          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_INCREF(__pyx_v_self->_references);
-          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_references);
-          __Pyx_GIVEREF(__pyx_v_self->_references);
-          __Pyx_INCREF(__pyx_v_self->_lengths);
-          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_lengths);
-          __Pyx_GIVEREF(__pyx_v_self->_lengths);
-          __pyx_t_3 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__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 = 433; __pyx_clineno = __LINE__; goto __pyx_L10_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(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-          __Pyx_GIVEREF(__pyx_t_3);
-          __Pyx_GOTREF(__pyx_v_self->reference2length);
-          __Pyx_DECREF(__pyx_v_self->reference2length);
-          __pyx_v_self->reference2length = __pyx_t_3;
-          __pyx_t_3 = 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;
-        goto __pyx_L17_try_end;
-        __pyx_L10_error:;
-        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
-        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-        /* "pysam/csamtools.pyx":429
- *             raise ValueError("could not locate index file")
- * 
- *         with open( self._filename + b".fai" ) as inf:             # <<<<<<<<<<<<<<
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)
- */
-        /*except:*/ {
-          __Pyx_AddTraceback("pysam.csamtools.Fastafile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
-          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_GOTREF(__pyx_t_13);
-          __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-          __Pyx_GOTREF(__pyx_t_5);
-          __Pyx_INCREF(__pyx_t_3);
-          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
-          __Pyx_GIVEREF(__pyx_t_3);
-          __Pyx_INCREF(__pyx_t_2);
-          PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
-          __Pyx_GIVEREF(__pyx_t_2);
-          __Pyx_INCREF(__pyx_t_13);
-          PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_13);
-          __Pyx_GIVEREF(__pyx_t_13);
-          __pyx_t_14 = PyObject_Call(__pyx_t_7, __pyx_t_5, NULL);
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-          __Pyx_GOTREF(__pyx_t_14);
-          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14);
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-          if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-          __pyx_t_1 = (!__pyx_t_6);
-          if (__pyx_t_1) {
-            __Pyx_GIVEREF(__pyx_t_3);
-            __Pyx_GIVEREF(__pyx_t_2);
-            __Pyx_GIVEREF(__pyx_t_13);
-            __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_13);
-            __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_13 = 0; 
-            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-            goto __pyx_L23;
-          }
-          __pyx_L23:;
-          __Pyx_DECREF(((PyObject *)__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(__pyx_t_13); __pyx_t_13 = 0;
-          goto __pyx_L11_exception_handled;
-        }
-        __pyx_L12_except_error:;
-        __Pyx_XGIVEREF(__pyx_t_8);
-        __Pyx_XGIVEREF(__pyx_t_9);
-        __Pyx_XGIVEREF(__pyx_t_10);
-        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
-        goto __pyx_L1_error;
-        __pyx_L11_exception_handled:;
-        __Pyx_XGIVEREF(__pyx_t_8);
-        __Pyx_XGIVEREF(__pyx_t_9);
-        __Pyx_XGIVEREF(__pyx_t_10);
-        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
-        __pyx_L17_try_end:;
-      }
-    }
-    /*finally:*/ {
-      if (__pyx_t_7) {
-        __pyx_t_10 = PyObject_Call(__pyx_t_7, __pyx_k_tuple_14, NULL);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-    }
-    goto __pyx_L24;
-    __pyx_L6_error:;
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    goto __pyx_L1_error;
-    __pyx_L24:;
-  }
-
-  __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_5);
-  __Pyx_XDECREF(__pyx_t_13);
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_inf);
-  __Pyx_XDECREF(__pyx_v_x);
-  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastafile_8close[] = "Fastafile.close(self)";
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("close (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_8close(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":435
- *             self.reference2length = dict(zip(self._references, self._lengths))
- * 
- *     def close( self ):             # <<<<<<<<<<<<<<
- *         if self.fastafile != NULL:
- *             fai_destroy( self.fastafile )
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_8close(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("close", 0);
-  __Pyx_TraceCall("close", __pyx_f[0], 435);
-
-  /* "pysam/csamtools.pyx":436
- * 
- *     def close( self ):
- *         if self.fastafile != NULL:             # <<<<<<<<<<<<<<
- *             fai_destroy( self.fastafile )
- *             self.fastafile = NULL
- */
-  __pyx_t_1 = (__pyx_v_self->fastafile != NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":437
- *     def close( self ):
- *         if self.fastafile != NULL:
- *             fai_destroy( self.fastafile )             # <<<<<<<<<<<<<<
- *             self.fastafile = NULL
- * 
- */
-    fai_destroy(__pyx_v_self->fastafile);
-
-    /* "pysam/csamtools.pyx":438
- *         if self.fastafile != NULL:
- *             fai_destroy( self.fastafile )
- *             self.fastafile = NULL             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-    __pyx_v_self->fastafile = NULL;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_9Fastafile_11__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_9Fastafile_11__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_9Fastafile_10__dealloc__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":440
- *             self.fastafile = NULL
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         self.close()
- * 
- */
-
-static void __pyx_pf_5pysam_9csamtools_9Fastafile_10__dealloc__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 440);
-
-  /* "pysam/csamtools.pyx":441
- * 
- *     def __dealloc__(self):
- *         self.close()             # <<<<<<<<<<<<<<
- * 
- *     property filename:
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __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 = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_8filename_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_8filename___get__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":445
- *     property filename:
- *         '''number of :term:`filename` associated with this object.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._filename
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 445);
-
-  /* "pysam/csamtools.pyx":446
- *         '''number of :term:`filename` associated with this object.'''
- *         def __get__(self):
- *             return self._filename             # <<<<<<<<<<<<<<
- * 
- *     property references:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->_filename);
-  __pyx_r = __pyx_v_self->_filename;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_10references_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_10references_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_10references___get__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":450
- *     property references:
- *         '''tuple with the names of :term:`reference` sequences.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._references
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_10references___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 450);
-
-  /* "pysam/csamtools.pyx":451
- *         '''tuple with the names of :term:`reference` sequences.'''
- *         def __get__(self):
- *             return self._references             # <<<<<<<<<<<<<<
- * 
- *     property nreferences:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->_references);
-  __pyx_r = __pyx_v_self->_references;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_11nreferences_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_11nreferences_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_11nreferences___get__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":455
- *     property nreferences:
- *         '''number of :term:`reference` sequences in the file.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return len(self._references) if self.references else None
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_11nreferences___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  Py_ssize_t __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 455);
-
-  /* "pysam/csamtools.pyx":456
- *         '''number of :term:`reference` sequences in the file.'''
- *         def __get__(self):
- *             return len(self._references) if self.references else None             # <<<<<<<<<<<<<<
- * 
- *     property lengths:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__references); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __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 = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_3) {
-    __pyx_t_2 = __pyx_v_self->_references;
-    __Pyx_INCREF(__pyx_t_2);
-    __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = __pyx_t_2;
-    __pyx_t_2 = 0;
-  } else {
-    __Pyx_INCREF(Py_None);
-    __pyx_t_1 = Py_None;
-  }
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.nreferences.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_7lengths_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_7lengths_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_7lengths___get__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":460
- *     property lengths:
- *         '''tuple with the lengths of :term:`reference` sequences.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._lengths
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_7lengths___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 460);
-
-  /* "pysam/csamtools.pyx":461
- *         '''tuple with the lengths of :term:`reference` sequences.'''
- *         def __get__(self):
- *             return self._lengths             # <<<<<<<<<<<<<<
- * 
- *     def fetch( self,
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->_lengths);
-  __pyx_r = __pyx_v_self->_lengths;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_13fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastafile_12fetch[] = "Fastafile.fetch(self, reference=None, start=None, end=None, region=None)\n*(reference = None, start = None, end = None, region = None)*\n\n        fetch :meth:`AlignedRead` objects in a :term:`region` using 0-based indexing.\n\n        The region is specified by :term:`reference`, *start* and *end*.\n\n        fetch returns an empty string if the region is out of range or addresses an unknown *reference*.\n\n        If *refe [...]
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_13fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_reference = 0;
-  PyObject *__pyx_v_start = 0;
-  PyObject *__pyx_v_end = 0;
-  PyObject *__pyx_v_region = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,0};
-    PyObject* values[4] = {0,0,0,0};
-
-    /* "pysam/csamtools.pyx":464
- * 
- *     def fetch( self,
- *                reference = None,             # <<<<<<<<<<<<<<
- *                start = None,
- *                end = None,
- */
-    values[0] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":465
- *     def fetch( self,
- *                reference = None,
- *                start = None,             # <<<<<<<<<<<<<<
- *                end = None,
- *                region = None):
- */
-    values[1] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":466
- *                reference = None,
- *                start = None,
- *                end = None,             # <<<<<<<<<<<<<<
- *                region = None):
- * 
- */
-    values[2] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":467
- *                start = None,
- *                end = None,
- *                region = None):             # <<<<<<<<<<<<<<
- * 
- *         '''*(reference = None, start = None, end = None, region = None)*
- */
-    values[3] = ((PyObject *)Py_None);
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
-          if (value) { values[0] = value; kw_args--; }
-        }
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
-          if (value) { values[2] = value; kw_args--; }
-        }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
-          if (value) { values[3] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_reference = values[0];
-    __pyx_v_start = values[1];
-    __pyx_v_end = values[2];
-    __pyx_v_region = values[3];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_12fetch(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":463
- *             return self._lengths
- * 
- *     def fetch( self,             # <<<<<<<<<<<<<<
- *                reference = None,
- *                start = None,
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_12fetch(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region) {
-  int __pyx_v_length;
-  char *__pyx_v_seq;
-  PyObject *__pyx_v_py_seq = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  char *__pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("fetch", 0);
-  __Pyx_TraceCall("fetch", __pyx_f[0], 463);
-  __Pyx_INCREF(__pyx_v_start);
-  __Pyx_INCREF(__pyx_v_end);
-  __Pyx_INCREF(__pyx_v_region);
-
-  /* "pysam/csamtools.pyx":484
- *         '''
- * 
- *         if not self._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = 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_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 = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":485
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         cdef int length
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":490
- *         cdef char * seq
- * 
- *         if not region:             # <<<<<<<<<<<<<<
- *             if reference is None: raise ValueError( 'no sequence/region supplied.' )
- *             if start is None: start = 0
- */
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = (!__pyx_t_4);
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":491
- * 
- *         if not region:
- *             if reference is None: raise ValueError( 'no sequence/region supplied.' )             # <<<<<<<<<<<<<<
- *             if start is None: start = 0
- *             if end is None: end = max_pos -1
- */
-    __pyx_t_3 = (__pyx_v_reference == Py_None);
-    if (__pyx_t_3) {
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_18), 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_Raise(__pyx_t_2, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
-
-    /* "pysam/csamtools.pyx":492
- *         if not region:
- *             if reference is None: raise ValueError( 'no sequence/region supplied.' )
- *             if start is None: start = 0             # <<<<<<<<<<<<<<
- *             if end is None: end = max_pos -1
- * 
- */
-    __pyx_t_3 = (__pyx_v_start == Py_None);
-    if (__pyx_t_3) {
-      __Pyx_INCREF(__pyx_int_0);
-      __Pyx_DECREF(__pyx_v_start);
-      __pyx_v_start = __pyx_int_0;
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-
-    /* "pysam/csamtools.pyx":493
- *             if reference is None: raise ValueError( 'no sequence/region supplied.' )
- *             if start is None: start = 0
- *             if end is None: end = max_pos -1             # <<<<<<<<<<<<<<
- * 
- *             if start > end: raise ValueError( 'invalid region: start (%i) > end (%i)' % (start, end) )
- */
-    __pyx_t_3 = (__pyx_v_end == Py_None);
-    if (__pyx_t_3) {
-      __pyx_t_2 = PyInt_FromLong((__pyx_v_5pysam_9csamtools_max_pos - 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);
-      __Pyx_DECREF(__pyx_v_end);
-      __pyx_v_end = __pyx_t_2;
-      __pyx_t_2 = 0;
-      goto __pyx_L7;
-    }
-    __pyx_L7:;
-
-    /* "pysam/csamtools.pyx":495
- *             if end is None: end = max_pos -1
- * 
- *             if start > end: raise ValueError( 'invalid region: start (%i) > end (%i)' % (start, end) )             # <<<<<<<<<<<<<<
- *             if start == end: return b""
- *             # valid ranges are from 0 to 2^29-1
- */
-    __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_3) {
-      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(__pyx_v_start);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_start);
-      __Pyx_GIVEREF(__pyx_v_start);
-      __Pyx_INCREF(__pyx_v_end);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_end);
-      __Pyx_GIVEREF(__pyx_v_end);
-      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_2)); 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));
-      __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 = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L8;
-    }
-    __pyx_L8:;
-
-    /* "pysam/csamtools.pyx":496
- * 
- *             if start > end: raise ValueError( 'invalid region: start (%i) > end (%i)' % (start, end) )
- *             if start == end: return b""             # <<<<<<<<<<<<<<
- *             # valid ranges are from 0 to 2^29-1
- *             if not 0 <= start < max_pos: raise IndexError( 'start out of range (%i)' % start )
- */
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __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 = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_3) {
-      __Pyx_XDECREF(__pyx_r);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_b_20));
-      __pyx_r = ((PyObject *)__pyx_kp_b_20);
-      goto __pyx_L0;
-      goto __pyx_L9;
-    }
-    __pyx_L9:;
-
-    /* "pysam/csamtools.pyx":498
- *             if start == end: return b""
- *             # valid ranges are from 0 to 2^29-1
- *             if not 0 <= start < max_pos: raise IndexError( 'start out of range (%i)' % start )             # <<<<<<<<<<<<<<
- *             if not 0 <= end < max_pos: raise IndexError( 'end out of range (%i)' % end )
- *             # note: faidx_fetch_seq has a bug such that out-of-range access
- */
-    __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_start, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
-      __Pyx_DECREF(__pyx_t_1);
-      __pyx_t_2 = PyInt_FromLong(__pyx_v_5pysam_9csamtools_max_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __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 = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_4 = (!__pyx_t_3);
-    if (__pyx_t_4) {
-      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), __pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_2), NULL); 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_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L10;
-    }
-    __pyx_L10:;
-
-    /* "pysam/csamtools.pyx":499
- *             # valid ranges are from 0 to 2^29-1
- *             if not 0 <= start < max_pos: raise IndexError( 'start out of range (%i)' % start )
- *             if not 0 <= end < max_pos: raise IndexError( 'end out of range (%i)' % end )             # <<<<<<<<<<<<<<
- *             # note: faidx_fetch_seq has a bug such that out-of-range access
- *             # always returns the last residue. Hence do not use faidx_fetch_seq,
- */
-    __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_end, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
-      __Pyx_DECREF(__pyx_t_1);
-      __pyx_t_2 = PyInt_FromLong(__pyx_v_5pysam_9csamtools_max_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyObject_RichCompare(__pyx_v_end, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __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 = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = (!__pyx_t_4);
-    if (__pyx_t_3) {
-      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L11;
-    }
-    __pyx_L11:;
-
-    /* "pysam/csamtools.pyx":508
- *             #                       end-1,
- *             #                       &length)
- *             region = "%s:%i-%i" % (reference, start+1, end)             # <<<<<<<<<<<<<<
- *             if PY_MAJOR_VERSION >= 3:
- *                 region = region.encode('ascii')
- */
-    __pyx_t_1 = PyNumber_Add(__pyx_v_start, __pyx_int_1); 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_2 = PyTuple_New(3); 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_INCREF(__pyx_v_reference);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference);
-    __Pyx_GIVEREF(__pyx_v_reference);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_v_end);
-    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end);
-    __Pyx_GIVEREF(__pyx_v_end);
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), ((PyObject *)__pyx_t_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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_v_region);
-    __pyx_v_region = ((PyObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":509
- *             #                       &length)
- *             region = "%s:%i-%i" % (reference, start+1, end)
- *             if PY_MAJOR_VERSION >= 3:             # <<<<<<<<<<<<<<
- *                 region = region.encode('ascii')
- *             seq = fai_fetch( self.fastafile,
- */
-    __pyx_t_3 = (PY_MAJOR_VERSION >= 3);
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":510
- *             region = "%s:%i-%i" % (reference, start+1, end)
- *             if PY_MAJOR_VERSION >= 3:
- *                 region = region.encode('ascii')             # <<<<<<<<<<<<<<
- *             seq = fai_fetch( self.fastafile,
- *                              region,
- */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_region, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_24), 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_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(__pyx_v_region);
-      __pyx_v_region = __pyx_t_2;
-      __pyx_t_2 = 0;
-      goto __pyx_L12;
-    }
-    __pyx_L12:;
-
-    /* "pysam/csamtools.pyx":512
- *                 region = region.encode('ascii')
- *             seq = fai_fetch( self.fastafile,
- *                              region,             # <<<<<<<<<<<<<<
- *                              &length )
- *         else:
- */
-    __pyx_t_5 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-    /* "pysam/csamtools.pyx":513
- *             seq = fai_fetch( self.fastafile,
- *                              region,
- *                              &length )             # <<<<<<<<<<<<<<
- *         else:
- *             # samtools adds a '\0' at the end
- */
-    __pyx_v_seq = fai_fetch(__pyx_v_self->fastafile, __pyx_t_5, (&__pyx_v_length));
-    goto __pyx_L4;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":516
- *         else:
- *             # samtools adds a '\0' at the end
- *             seq = fai_fetch( self.fastafile, region, &length )             # <<<<<<<<<<<<<<
- * 
- *         # copy to python
- */
-    __pyx_t_5 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_seq = fai_fetch(__pyx_v_self->fastafile, __pyx_t_5, (&__pyx_v_length));
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":519
- * 
- *         # copy to python
- *         if seq == NULL:             # <<<<<<<<<<<<<<
- *             return b""
- *         else:
- */
-  __pyx_t_3 = (__pyx_v_seq == NULL);
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":520
- *         # copy to python
- *         if seq == NULL:
- *             return b""             # <<<<<<<<<<<<<<
- *         else:
- *             try:
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_b_20));
-    __pyx_r = ((PyObject *)__pyx_kp_b_20);
-    goto __pyx_L0;
-    goto __pyx_L13;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":522
- *             return b""
- *         else:
- *             try:             # <<<<<<<<<<<<<<
- *                 py_seq = seq[:length]
- *             finally:
- */
-    /*try:*/ {
-
-      /* "pysam/csamtools.pyx":523
- *         else:
- *             try:
- *                 py_seq = seq[:length]             # <<<<<<<<<<<<<<
- *             finally:
- *                 free(seq)
- */
-      __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_seq + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L15;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __pyx_v_py_seq = ((PyObject*)__pyx_t_2);
-      __pyx_t_2 = 0;
-    }
-
-    /* "pysam/csamtools.pyx":525
- *                 py_seq = seq[:length]
- *             finally:
- *                 free(seq)             # <<<<<<<<<<<<<<
- * 
- *         return py_seq
- */
-    /*finally:*/ {
-      int __pyx_why;
-      PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
-      int __pyx_exc_lineno;
-      __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
-      __pyx_why = 0; goto __pyx_L16;
-      __pyx_L15: {
-        __pyx_why = 4;
-        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
-        __pyx_exc_lineno = __pyx_lineno;
-        goto __pyx_L16;
-      }
-      __pyx_L16:;
-      free(__pyx_v_seq);
-      switch (__pyx_why) {
-        case 4: {
-          __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
-          __pyx_lineno = __pyx_exc_lineno;
-          __pyx_exc_type = 0;
-          __pyx_exc_value = 0;
-          __pyx_exc_tb = 0;
-          goto __pyx_L1_error;
-        }
-      }
-    }
-  }
-  __pyx_L13:;
-
-  /* "pysam/csamtools.pyx":527
- *                 free(seq)
- * 
- *         return py_seq             # <<<<<<<<<<<<<<
- * 
- *     cdef char * _fetch( self, char * reference, int start, int end, int * length ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_py_seq));
-  __pyx_r = ((PyObject *)__pyx_v_py_seq);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_py_seq);
-  __Pyx_XDECREF(__pyx_v_start);
-  __Pyx_XDECREF(__pyx_v_end);
-  __Pyx_XDECREF(__pyx_v_region);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":529
- *         return py_seq
- * 
- *     cdef char * _fetch( self, char * reference, int start, int end, int * length ):             # <<<<<<<<<<<<<<
- *         '''fetch sequence for reference, start and end'''
- * 
- */
-
-static char *__pyx_f_5pysam_9csamtools_9Fastafile__fetch(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, char *__pyx_v_reference, int __pyx_v_start, int __pyx_v_end, int *__pyx_v_length) {
-  char *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_fetch", 0);
-  __Pyx_TraceCall("_fetch", __pyx_f[0], 529);
-
-  /* "pysam/csamtools.pyx":536
- *                                start,
- *                                end-1,
- *                                length )             # <<<<<<<<<<<<<<
- * 
- *     def getReferenceLength( self, reference ):
- */
-  __pyx_r = faidx_fetch_seq(__pyx_v_self->fastafile, __pyx_v_reference, __pyx_v_start, (__pyx_v_end - 1), __pyx_v_length);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_15getReferenceLength(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastafile_14getReferenceLength[] = "Fastafile.getReferenceLength(self, reference)\nreturn the length of reference.";
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_15getReferenceLength(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("getReferenceLength (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_14getReferenceLength(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":538
- *                                length )
- * 
- *     def getReferenceLength( self, reference ):             # <<<<<<<<<<<<<<
- *         '''return the length of reference.'''
- *         return self.reference2length[reference]
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_14getReferenceLength(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("getReferenceLength", 0);
-  __Pyx_TraceCall("getReferenceLength", __pyx_f[0], 538);
-
-  /* "pysam/csamtools.pyx":540
- *     def getReferenceLength( self, reference ):
- *         '''return the length of reference.'''
- *         return self.reference2length[reference]             # <<<<<<<<<<<<<<
- * 
- *     def __getitem__(self, reference):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetItem(__pyx_v_self->reference2length, __pyx_v_reference); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.getReferenceLength", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_17__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastafile_17__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_16__getitem__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":542
- *         return self.reference2length[reference]
- * 
- *     def __getitem__(self, reference):             # <<<<<<<<<<<<<<
- *         return self.fetch(reference)
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_16__getitem__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__getitem__", 0);
-  __Pyx_TraceCall("__getitem__", __pyx_f[0], 542);
-
-  /* "pysam/csamtools.pyx":543
- * 
- *     def __getitem__(self, reference):
- *         return self.fetch(reference)             # <<<<<<<<<<<<<<
- * 
- *     def __contains__( self, reference ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__fetch); 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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_v_reference);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference);
-  __Pyx_GIVEREF(__pyx_v_reference);
-  __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 = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_9Fastafile_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastafile_18__contains__[] = "return true if reference in fasta file.";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_9Fastafile_18__contains__;
-#endif
-static int __pyx_pw_5pysam_9csamtools_9Fastafile_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastafile_18__contains__(((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":545
- *         return self.fetch(reference)
- * 
- *     def __contains__( self, reference ):             # <<<<<<<<<<<<<<
- *         '''return true if reference in fasta file.'''
- *         return reference in self.reference2length
- */
-
-static int __pyx_pf_5pysam_9csamtools_9Fastafile_18__contains__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__contains__", 0);
-  __Pyx_TraceCall("__contains__", __pyx_f[0], 545);
-
-  /* "pysam/csamtools.pyx":547
- *     def __contains__( self, reference ):
- *         '''return true if reference in fasta file.'''
- *         return reference in self.reference2length             # <<<<<<<<<<<<<<
- * 
- * ######################################################################
- */
-  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_reference, __pyx_v_self->reference2length, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_t_1;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Fastafile.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_10FastqProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_10FastqProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy___init__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":556
- * 
- * cdef class FastqProxy:
- *     def __init__(self): pass             # <<<<<<<<<<<<<<
- * 
- *     property name:
- */
-
-static int __pyx_pf_5pysam_9csamtools_10FastqProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 556);
-
-  __pyx_r = 0;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_4name_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy_4name___get__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":559
- * 
- *     property name:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._delegate.name.s
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_4name___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 559);
-
-  /* "pysam/csamtools.pyx":560
- *     property name:
- *         def __get__(self):
- *             return self._delegate.name.s             # <<<<<<<<<<<<<<
- * 
- *     property sequence:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_delegate->name.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.FastqProxy.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_8sequence_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_8sequence_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy_8sequence___get__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":563
- * 
- *     property sequence:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._delegate.seq.s
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_8sequence___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 563);
-
-  /* "pysam/csamtools.pyx":564
- *     property sequence:
- *         def __get__(self):
- *             return self._delegate.seq.s             # <<<<<<<<<<<<<<
- * 
- *     property comment:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_delegate->seq.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.FastqProxy.sequence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_7comment_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_7comment_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy_7comment___get__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":567
- * 
- *     property comment:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             if self._delegate.comment.l:
- *                 return self._delegate.comment.s
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_7comment___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 567);
-
-  /* "pysam/csamtools.pyx":568
- *     property comment:
- *         def __get__(self):
- *             if self._delegate.comment.l:             # <<<<<<<<<<<<<<
- *                 return self._delegate.comment.s
- *             else: return None
- */
-  if (__pyx_v_self->_delegate->comment.l) {
-
-    /* "pysam/csamtools.pyx":569
- *         def __get__(self):
- *             if self._delegate.comment.l:
- *                 return self._delegate.comment.s             # <<<<<<<<<<<<<<
- *             else: return None
- * 
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_delegate->comment.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_r = ((PyObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":570
- *             if self._delegate.comment.l:
- *                 return self._delegate.comment.s
- *             else: return None             # <<<<<<<<<<<<<<
- * 
- *     property quality:
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.FastqProxy.comment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_7quality_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_7quality_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy_7quality___get__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":573
- * 
- *     property quality:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             if self._delegate.qual.l:
- *                 return self._delegate.qual.s
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_7quality___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 573);
-
-  /* "pysam/csamtools.pyx":574
- *     property quality:
- *         def __get__(self):
- *             if self._delegate.qual.l:             # <<<<<<<<<<<<<<
- *                 return self._delegate.qual.s
- *             else: return None
- */
-  if (__pyx_v_self->_delegate->qual.l) {
-
-    /* "pysam/csamtools.pyx":575
- *         def __get__(self):
- *             if self._delegate.qual.l:
- *                 return self._delegate.qual.s             # <<<<<<<<<<<<<<
- *             else: return None
- * 
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_delegate->qual.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_r = ((PyObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":576
- *             if self._delegate.qual.l:
- *                 return self._delegate.qual.s
- *             else: return None             # <<<<<<<<<<<<<<
- * 
- * cdef class Fastqfile:
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.FastqProxy.quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_9Fastqfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_9Fastqfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_args = 0;
-  PyObject *__pyx_v_kwargs = 0;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
-  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
-  if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
-  __Pyx_INCREF(__pyx_args);
-  __pyx_v_args = __pyx_args;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile___cinit__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
-  __Pyx_XDECREF(__pyx_v_args);
-  __Pyx_XDECREF(__pyx_v_kwargs);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":584
- * 
- *     '''
- *     def __cinit__(self, *args, **kwargs ):             # <<<<<<<<<<<<<<
- *         # self.fastqfile = <gzFile*>NULL
- *         self._filename = None
- */
-
-static int __pyx_pf_5pysam_9csamtools_9Fastqfile___cinit__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 584);
-
-  /* "pysam/csamtools.pyx":586
- *     def __cinit__(self, *args, **kwargs ):
- *         # self.fastqfile = <gzFile*>NULL
- *         self._filename = None             # <<<<<<<<<<<<<<
- *         self.entry = NULL
- *         self._open( *args, **kwargs )
- */
-  __Pyx_INCREF(Py_None);
-  __Pyx_GIVEREF(Py_None);
-  __Pyx_GOTREF(__pyx_v_self->_filename);
-  __Pyx_DECREF(__pyx_v_self->_filename);
-  __pyx_v_self->_filename = Py_None;
-
-  /* "pysam/csamtools.pyx":587
- *         # self.fastqfile = <gzFile*>NULL
- *         self._filename = None
- *         self.entry = NULL             # <<<<<<<<<<<<<<
- *         self._open( *args, **kwargs )
- * 
- */
-  __pyx_v_self->entry = NULL;
-
-  /* "pysam/csamtools.pyx":588
- *         self._filename = None
- *         self.entry = NULL
- *         self._open( *args, **kwargs )             # <<<<<<<<<<<<<<
- * 
- *     def _isOpen( self ):
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_args)); 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_t_3 = ((PyObject *)__pyx_v_kwargs);
-  __Pyx_INCREF(__pyx_t_3);
-  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.Fastqfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastqfile_2_isOpen[] = "Fastqfile._isOpen(self)\nreturn true if samfile has been opened.";
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_2_isOpen(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":590
- *         self._open( *args, **kwargs )
- * 
- *     def _isOpen( self ):             # <<<<<<<<<<<<<<
- *         '''return true if samfile has been opened.'''
- *         return self.entry != NULL
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_isOpen", 0);
-  __Pyx_TraceCall("_isOpen", __pyx_f[0], 590);
-
-  /* "pysam/csamtools.pyx":592
- *     def _isOpen( self ):
- *         '''return true if samfile has been opened.'''
- *         return self.entry != NULL             # <<<<<<<<<<<<<<
- * 
- *     def _open(self, filename):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->entry != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __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("pysam.csamtools.Fastqfile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_5_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastqfile_4_open[] = "Fastqfile._open(self, filename)\nopen an indexed fasta file.\n\n        This method expects an indexed fasta file.\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_5_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_open (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_4_open(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":594
- *         return self.entry != NULL
- * 
- *     def _open(self, filename):             # <<<<<<<<<<<<<<
- *         '''open an indexed fasta file.
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_4_open(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self, PyObject *__pyx_v_filename) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  char *__pyx_t_6;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_open", 0);
-  __Pyx_TraceCall("_open", __pyx_f[0], 594);
-  __Pyx_INCREF(__pyx_v_filename);
-
-  /* "pysam/csamtools.pyx":599
- *         This method expects an indexed fasta file.
- *         '''
- *         self.close()             # <<<<<<<<<<<<<<
- * 
- *         if not os.path.exists( filename ):
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __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 = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":601
- *         self.close()
- * 
- *         if not os.path.exists( filename ):             # <<<<<<<<<<<<<<
- *             raise IOError( "No such file or directory: %s" % filename )
- * 
- */
-  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); 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_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__exists); 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_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 = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_filename);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
-  __Pyx_GIVEREF(__pyx_v_filename);
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_5 = (!__pyx_t_4);
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":602
- * 
- *         if not os.path.exists( filename ):
- *             raise IOError( "No such file or directory: %s" % filename )             # <<<<<<<<<<<<<<
- * 
- *         filename = _encodeFilename(filename)
- */
-    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_25), __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
-    __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":604
- *             raise IOError( "No such file or directory: %s" % filename )
- * 
- *         filename = _encodeFilename(filename)             # <<<<<<<<<<<<<<
- *         self.fastqfile = gzopen( filename, "r" )
- *         self.entry = kseq_init( self.fastqfile )
- */
-  __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_9csamtools__encodeFilename(__pyx_v_filename)); 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_DECREF(__pyx_v_filename);
-  __pyx_v_filename = __pyx_t_3;
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":605
- * 
- *         filename = _encodeFilename(filename)
- *         self.fastqfile = gzopen( filename, "r" )             # <<<<<<<<<<<<<<
- *         self.entry = kseq_init( self.fastqfile )
- *         self._filename = filename
- */
-  __pyx_t_6 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->fastqfile = gzopen(__pyx_t_6, __pyx_k__r);
-
-  /* "pysam/csamtools.pyx":606
- *         filename = _encodeFilename(filename)
- *         self.fastqfile = gzopen( filename, "r" )
- *         self.entry = kseq_init( self.fastqfile )             # <<<<<<<<<<<<<<
- *         self._filename = filename
- * 
- */
-  __pyx_v_self->entry = kseq_init(__pyx_v_self->fastqfile);
-
-  /* "pysam/csamtools.pyx":607
- *         self.fastqfile = gzopen( filename, "r" )
- *         self.entry = kseq_init( self.fastqfile )
- *         self._filename = filename             # <<<<<<<<<<<<<<
- * 
- *     def close( self ):
- */
-  __Pyx_INCREF(__pyx_v_filename);
-  __Pyx_GIVEREF(__pyx_v_filename);
-  __Pyx_GOTREF(__pyx_v_self->_filename);
-  __Pyx_DECREF(__pyx_v_self->_filename);
-  __pyx_v_self->_filename = __pyx_v_filename;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.Fastqfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_filename);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastqfile_6close[] = "Fastqfile.close(self)\nclose file.";
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("close (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_6close(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":609
- *         self._filename = filename
- * 
- *     def close( self ):             # <<<<<<<<<<<<<<
- *         '''close file.'''
- *         if self.entry != NULL:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_6close(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("close", 0);
-  __Pyx_TraceCall("close", __pyx_f[0], 609);
-
-  /* "pysam/csamtools.pyx":611
- *     def close( self ):
- *         '''close file.'''
- *         if self.entry != NULL:             # <<<<<<<<<<<<<<
- *             gzclose( self.fastqfile )
- *             if self.entry:
- */
-  __pyx_t_1 = (__pyx_v_self->entry != NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":612
- *         '''close file.'''
- *         if self.entry != NULL:
- *             gzclose( self.fastqfile )             # <<<<<<<<<<<<<<
- *             if self.entry:
- *                 kseq_destroy(self.entry)
- */
-    gzclose(__pyx_v_self->fastqfile);
-
-    /* "pysam/csamtools.pyx":613
- *         if self.entry != NULL:
- *             gzclose( self.fastqfile )
- *             if self.entry:             # <<<<<<<<<<<<<<
- *                 kseq_destroy(self.entry)
- *                 self.entry = NULL
- */
-    __pyx_t_1 = (__pyx_v_self->entry != 0);
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":614
- *             gzclose( self.fastqfile )
- *             if self.entry:
- *                 kseq_destroy(self.entry)             # <<<<<<<<<<<<<<
- *                 self.entry = NULL
- * 
- */
-      kseq_destroy(__pyx_v_self->entry);
-
-      /* "pysam/csamtools.pyx":615
- *             if self.entry:
- *                 kseq_destroy(self.entry)
- *                 self.entry = NULL             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-      __pyx_v_self->entry = NULL;
-      goto __pyx_L4;
-    }
-    __pyx_L4:;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_9Fastqfile_9__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_9Fastqfile_9__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_9Fastqfile_8__dealloc__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":617
- *                 self.entry = NULL
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         self.close()
- * 
- */
-
-static void __pyx_pf_5pysam_9csamtools_9Fastqfile_8__dealloc__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 617);
-
-  /* "pysam/csamtools.pyx":618
- * 
- *     def __dealloc__(self):
- *         self.close()             # <<<<<<<<<<<<<<
- * 
- *     property filename:
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __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 = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Fastqfile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_8filename_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_8filename___get__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":622
- *     property filename:
- *         '''number of :term:`filename` associated with this object.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._filename
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 622);
-
-  /* "pysam/csamtools.pyx":623
- *         '''number of :term:`filename` associated with this object.'''
- *         def __get__(self):
- *             return self._filename             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->_filename);
-  __pyx_r = __pyx_v_self->_filename;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_11__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_11__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_10__iter__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":625
- *             return self._filename
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *         return self
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_10__iter__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-  __Pyx_TraceCall("__iter__", __pyx_f[0], 625);
-
-  /* "pysam/csamtools.pyx":626
- * 
- *     def __iter__(self):
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); 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_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 = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_26), NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":627
- *     def __iter__(self):
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *         return self             # <<<<<<<<<<<<<<
- * 
- *     cdef kseq_t * getCurrent( self ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Fastqfile.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":629
- *         return self
- * 
- *     cdef kseq_t * getCurrent( self ):             # <<<<<<<<<<<<<<
- *         return self.entry
- * 
- */
-
-static kseq_t *__pyx_f_5pysam_9csamtools_9Fastqfile_getCurrent(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
-  kseq_t *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("getCurrent", 0);
-  __Pyx_TraceCall("getCurrent", __pyx_f[0], 629);
-
-  /* "pysam/csamtools.pyx":630
- * 
- *     cdef kseq_t * getCurrent( self ):
- *         return self.entry             # <<<<<<<<<<<<<<
- * 
- *     cdef int cnext(self):
- */
-  __pyx_r = __pyx_v_self->entry;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":632
- *         return self.entry
- * 
- *     cdef int cnext(self):             # <<<<<<<<<<<<<<
- *         '''C version of iterator
- *         '''
- */
-
-static int __pyx_f_5pysam_9csamtools_9Fastqfile_cnext(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("cnext", 0);
-  __Pyx_TraceCall("cnext", __pyx_f[0], 632);
-
-  /* "pysam/csamtools.pyx":635
- *         '''C version of iterator
- *         '''
- *         return kseq_read(self.entry)             # <<<<<<<<<<<<<<
- * 
- *     def __next__(self):
- */
-  __pyx_r = kseq_read(__pyx_v_self->entry);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_13__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_9Fastqfile_12__next__[] = "\n        python version of next().\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_9Fastqfile_12__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_13__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_12__next__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":637
- *         return kseq_read(self.entry)
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """
- *         python version of next().
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_12__next__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
-  int __pyx_v_l;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__next__", 0);
-  __Pyx_TraceCall("__next__", __pyx_f[0], 637);
-
-  /* "pysam/csamtools.pyx":642
- *         """
- *         cdef int l
- *         l = kseq_read( self.entry)             # <<<<<<<<<<<<<<
- *         if (l > 0):
- *             return makeFastqProxy( self.entry )
- */
-  __pyx_v_l = kseq_read(__pyx_v_self->entry);
-
-  /* "pysam/csamtools.pyx":643
- *         cdef int l
- *         l = kseq_read( self.entry)
- *         if (l > 0):             # <<<<<<<<<<<<<<
- *             return makeFastqProxy( self.entry )
- *         else:
- */
-  __pyx_t_1 = (__pyx_v_l > 0);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":644
- *         l = kseq_read( self.entry)
- *         if (l > 0):
- *             return makeFastqProxy( self.entry )             # <<<<<<<<<<<<<<
- *         else:
- *             raise StopIteration
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeFastqProxy(__pyx_v_self->entry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":646
- *             return makeFastqProxy( self.entry )
- *         else:
- *             raise StopIteration             # <<<<<<<<<<<<<<
- * 
- * #------------------------------------------------------------------------
- */
-    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Fastqfile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":651
- * #------------------------------------------------------------------------
- * #------------------------------------------------------------------------
- * cdef int count_callback( bam1_t *alignment, void *f):             # <<<<<<<<<<<<<<
- *      '''callback for bam_fetch - count number of reads.
- *      '''
- */
-
-static int __pyx_f_5pysam_9csamtools_count_callback(CYTHON_UNUSED bam1_t *__pyx_v_alignment, void *__pyx_v_f) {
-  int *__pyx_v_counter;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  long __pyx_t_1;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("count_callback", 0);
-  __Pyx_TraceCall("count_callback", __pyx_f[0], 651);
-
-  /* "pysam/csamtools.pyx":654
- *      '''callback for bam_fetch - count number of reads.
- *      '''
- *      cdef int* counter = (<int*>f)             # <<<<<<<<<<<<<<
- *      counter[0] += 1;
- * 
- */
-  __pyx_v_counter = ((int *)__pyx_v_f);
-
-  /* "pysam/csamtools.pyx":655
- *      '''
- *      cdef int* counter = (<int*>f)
- *      counter[0] += 1;             # <<<<<<<<<<<<<<
- * 
- * ctypedef struct MateData:
- */
-  __pyx_t_1 = 0;
-  (__pyx_v_counter[__pyx_t_1]) = ((__pyx_v_counter[__pyx_t_1]) + 1);
-
-  __pyx_r = 0;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":665
- * #------------------------------------------------------------------------
- * #------------------------------------------------------------------------
- * cdef int mate_callback( bam1_t *alignment, void *f):             # <<<<<<<<<<<<<<
- *      '''callback for bam_fetch = filter mate
- *      '''
- */
-
-static int __pyx_f_5pysam_9csamtools_mate_callback(bam1_t *__pyx_v_alignment, void *__pyx_v_f) {
-  __pyx_t_5pysam_9csamtools_MateData *__pyx_v_d;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("mate_callback", 0);
-  __Pyx_TraceCall("mate_callback", __pyx_f[0], 665);
-
-  /* "pysam/csamtools.pyx":668
- *      '''callback for bam_fetch = filter mate
- *      '''
- *      cdef MateData * d = (<MateData*>f)             # <<<<<<<<<<<<<<
- *      # printf("mate = %p, name1 = %s, name2=%s\t%i\t%i\t%i\n",
- *      #        d.mate, d.name, bam1_qname(alignment),
- */
-  __pyx_v_d = ((__pyx_t_5pysam_9csamtools_MateData *)__pyx_v_f);
-
-  /* "pysam/csamtools.pyx":673
- *      #        d.flag, alignment.core.flag, alignment.core.flag & d.flag)
- * 
- *      if d.mate == NULL:             # <<<<<<<<<<<<<<
- *          # could be sped up by comparing the lengths of query strings first
- *          # using l_qname
- */
-  __pyx_t_1 = (__pyx_v_d->mate == NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":679
- *          # also, make sure that we get the other read by comparing
- *          # the flags
- *          if alignment.core.flag & d.flag != 0 and \             # <<<<<<<<<<<<<<
- *                  strcmp( bam1_qname( alignment ), d.name ) == 0:
- *              d.mate = bam_dup1( alignment )
- */
-    __pyx_t_1 = ((__pyx_v_alignment->core.flag & __pyx_v_d->flag) != 0);
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":680
- *          # the flags
- *          if alignment.core.flag & d.flag != 0 and \
- *                  strcmp( bam1_qname( alignment ), d.name ) == 0:             # <<<<<<<<<<<<<<
- *              d.mate = bam_dup1( alignment )
- * 
- */
-      __pyx_t_2 = (strcmp(bam1_qname(__pyx_v_alignment), __pyx_v_d->name) == 0);
-      __pyx_t_3 = __pyx_t_2;
-    } else {
-      __pyx_t_3 = __pyx_t_1;
-    }
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":681
- *          if alignment.core.flag & d.flag != 0 and \
- *                  strcmp( bam1_qname( alignment ), d.name ) == 0:
- *              d.mate = bam_dup1( alignment )             # <<<<<<<<<<<<<<
- * 
- * 
- */
-      __pyx_v_d->mate = bam_dup1(__pyx_v_alignment);
-      goto __pyx_L4;
-    }
-    __pyx_L4:;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_7Samfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_7Samfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_args = 0;
-  PyObject *__pyx_v_kwargs = 0;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
-  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
-  if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
-  __Pyx_INCREF(__pyx_args);
-  __pyx_v_args = __pyx_args;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile___cinit__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
-  __Pyx_XDECREF(__pyx_v_args);
-  __Pyx_XDECREF(__pyx_v_kwargs);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":731
- *     '''
- * 
- *     def __cinit__(self, *args, **kwargs ):             # <<<<<<<<<<<<<<
- *         self.samfile = NULL
- *         self._filename = None
- */
-
-static int __pyx_pf_5pysam_9csamtools_7Samfile___cinit__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 731);
-
-  /* "pysam/csamtools.pyx":732
- * 
- *     def __cinit__(self, *args, **kwargs ):
- *         self.samfile = NULL             # <<<<<<<<<<<<<<
- *         self._filename = None
- *         self.isbam = False
- */
-  __pyx_v_self->samfile = NULL;
-
-  /* "pysam/csamtools.pyx":733
- *     def __cinit__(self, *args, **kwargs ):
- *         self.samfile = NULL
- *         self._filename = None             # <<<<<<<<<<<<<<
- *         self.isbam = False
- *         self.isstream = False
- */
-  __Pyx_INCREF(Py_None);
-  __Pyx_GIVEREF(Py_None);
-  __Pyx_GOTREF(__pyx_v_self->_filename);
-  __Pyx_DECREF(__pyx_v_self->_filename);
-  __pyx_v_self->_filename = Py_None;
-
-  /* "pysam/csamtools.pyx":734
- *         self.samfile = NULL
- *         self._filename = None
- *         self.isbam = False             # <<<<<<<<<<<<<<
- *         self.isstream = False
- *         self._open( *args, **kwargs )
- */
-  __pyx_v_self->isbam = 0;
-
-  /* "pysam/csamtools.pyx":735
- *         self._filename = None
- *         self.isbam = False
- *         self.isstream = False             # <<<<<<<<<<<<<<
- *         self._open( *args, **kwargs )
- * 
- */
-  __pyx_v_self->isstream = 0;
-
-  /* "pysam/csamtools.pyx":736
- *         self.isbam = False
- *         self.isstream = False
- *         self._open( *args, **kwargs )             # <<<<<<<<<<<<<<
- * 
- *         # allocate memory for iterator
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = ((PyObject *)__pyx_v_kwargs);
-  __Pyx_INCREF(__pyx_t_3);
-  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-  /* "pysam/csamtools.pyx":739
- * 
- *         # allocate memory for iterator
- *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))             # <<<<<<<<<<<<<<
- * 
- *     def _isOpen( self ):
- */
-  __pyx_v_self->b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_2_isOpen[] = "Samfile._isOpen(self)\nreturn true if samfile has been opened.";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_2_isOpen(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":741
- *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
- * 
- *     def _isOpen( self ):             # <<<<<<<<<<<<<<
- *         '''return true if samfile has been opened.'''
- *         return self.samfile != NULL
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_isOpen", 0);
-  __Pyx_TraceCall("_isOpen", __pyx_f[0], 741);
-
-  /* "pysam/csamtools.pyx":743
- *     def _isOpen( self ):
- *         '''return true if samfile has been opened.'''
- *         return self.samfile != NULL             # <<<<<<<<<<<<<<
- * 
- *     def _hasIndex( self ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->samfile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_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("pysam.csamtools.Samfile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_5_hasIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_4_hasIndex[] = "Samfile._hasIndex(self)\nreturn true if samfile has an existing (and opened) index.";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_5_hasIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_hasIndex (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_4_hasIndex(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":745
- *         return self.samfile != NULL
- * 
- *     def _hasIndex( self ):             # <<<<<<<<<<<<<<
- *         '''return true if samfile has an existing (and opened) index.'''
- *         return self.index != NULL
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_4_hasIndex(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_hasIndex", 0);
-  __Pyx_TraceCall("_hasIndex", __pyx_f[0], 745);
-
-  /* "pysam/csamtools.pyx":747
- *     def _hasIndex( self ):
- *         '''return true if samfile has an existing (and opened) index.'''
- *         return self.index != NULL             # <<<<<<<<<<<<<<
- * 
- *     def _open( self,
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->index != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __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("pysam.csamtools.Samfile._hasIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_7_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_6_open[] = "Samfile._open(self, filename, mode=None, Samfile template=None, referencenames=None, referencelengths=None, text=None, header=None, port=None, add_sq_text=True, check_header=True, check_sq=True)\nopen a sam/bam file.\n\n        If _open is called on an existing bamfile, the current file will be\n        closed and a new file will be opened.\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_7_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_filename = 0;
-  PyObject *__pyx_v_mode = 0;
-  struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_template = 0;
-  PyObject *__pyx_v_referencenames = 0;
-  PyObject *__pyx_v_referencelengths = 0;
-  PyObject *__pyx_v_text = 0;
-  PyObject *__pyx_v_header = 0;
-  PyObject *__pyx_v_port = 0;
-  PyObject *__pyx_v_add_sq_text = 0;
-  PyObject *__pyx_v_check_header = 0;
-  PyObject *__pyx_v_check_sq = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_open (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__mode,&__pyx_n_s__template,&__pyx_n_s__referencenames,&__pyx_n_s__referencelengths,&__pyx_n_s__text,&__pyx_n_s__header,&__pyx_n_s__port,&__pyx_n_s__add_sq_text,&__pyx_n_s__check_header,&__pyx_n_s__check_sq,0};
-    PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
-
-    /* "pysam/csamtools.pyx":751
- *     def _open( self,
- *                filename,
- *                mode = None,             # <<<<<<<<<<<<<<
- *                Samfile template = None,
- *                referencenames = None,
- */
-    values[1] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":752
- *                filename,
- *                mode = None,
- *                Samfile template = None,             # <<<<<<<<<<<<<<
- *                referencenames = None,
- *                referencelengths = None,
- */
-    values[2] = (PyObject *)((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None);
-
-    /* "pysam/csamtools.pyx":753
- *                mode = None,
- *                Samfile template = None,
- *                referencenames = None,             # <<<<<<<<<<<<<<
- *                referencelengths = None,
- *                text = None,
- */
-    values[3] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":754
- *                Samfile template = None,
- *                referencenames = None,
- *                referencelengths = None,             # <<<<<<<<<<<<<<
- *                text = None,
- *                header = None,
- */
-    values[4] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":755
- *                referencenames = None,
- *                referencelengths = None,
- *                text = None,             # <<<<<<<<<<<<<<
- *                header = None,
- *                port = None,
- */
-    values[5] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":756
- *                referencelengths = None,
- *                text = None,
- *                header = None,             # <<<<<<<<<<<<<<
- *                port = None,
- *                add_sq_text = True,
- */
-    values[6] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":757
- *                text = None,
- *                header = None,
- *                port = None,             # <<<<<<<<<<<<<<
- *                add_sq_text = True,
- *                check_header = True,
- */
-    values[7] = ((PyObject *)Py_None);
-    values[8] = __pyx_k_27;
-    values[9] = __pyx_k_28;
-    values[10] = __pyx_k_29;
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
-        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
-        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
-        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
-        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
-        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__template);
-          if (value) { values[2] = value; kw_args--; }
-        }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__referencenames);
-          if (value) { values[3] = value; kw_args--; }
-        }
-        case  4:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__referencelengths);
-          if (value) { values[4] = value; kw_args--; }
-        }
-        case  5:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__text);
-          if (value) { values[5] = value; kw_args--; }
-        }
-        case  6:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__header);
-          if (value) { values[6] = value; kw_args--; }
-        }
-        case  7:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__port);
-          if (value) { values[7] = value; kw_args--; }
-        }
-        case  8:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__add_sq_text);
-          if (value) { values[8] = value; kw_args--; }
-        }
-        case  9:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__check_header);
-          if (value) { values[9] = value; kw_args--; }
-        }
-        case 10:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__check_sq);
-          if (value) { values[10] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
-        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
-        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
-        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
-        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
-        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_filename = values[0];
-    __pyx_v_mode = values[1];
-    __pyx_v_template = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[2]);
-    __pyx_v_referencenames = values[3];
-    __pyx_v_referencelengths = values[4];
-    __pyx_v_text = values[5];
-    __pyx_v_header = values[6];
-    __pyx_v_port = values[7];
-    __pyx_v_add_sq_text = values[8];
-    __pyx_v_check_header = values[9];
-    __pyx_v_check_sq = values[10];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Samfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_template), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "template", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_6_open(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_template, __pyx_v_referencenames, __pyx_v_referencelengths, __pyx_v_text, __pyx_v_header, __pyx_v_port, __pyx_v_add_sq_text, __pyx_v_check_header, __pyx_v_check_sq);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":749
- *         return self.index != NULL
- * 
- *     def _open( self,             # <<<<<<<<<<<<<<
- *                filename,
- *                mode = None,
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_6_open(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_template, PyObject *__pyx_v_referencenames, PyObject *__pyx_v_referencelengths, PyObject *__pyx_v_text, PyObject *__pyx_v_header, PyObject *__pyx_v_port, PyObject *__pyx_v_add_sq_text, PyObject *__pyx_v_check_header, PyObject *__pyx_v_check_sq) {
-  CYTHON_UNUSED PyObject *__pyx_v_msg = NULL;
-  bam_header_t *__pyx_v_header_to_write;
-  PyObject *__pyx_v_bmode = 0;
-  char *__pyx_v_ctext;
-  PyObject *__pyx_v_n = NULL;
-  PyObject *__pyx_v_x = NULL;
-  PyObject *__pyx_v_name = NULL;
-  PyObject *__pyx_v_store = NULL;
-  PyObject *__pyx_v_ref = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  int __pyx_t_9;
-  int __pyx_t_10;
-  int __pyx_t_11;
-  Py_ssize_t __pyx_t_12;
-  bam_header_t *__pyx_t_13;
-  Py_ssize_t __pyx_t_14;
-  PyObject *(*__pyx_t_15)(PyObject *);
-  size_t __pyx_t_16;
-  int32_t __pyx_t_17;
-  long __pyx_t_18;
-  uint32_t __pyx_t_19;
-  char *__pyx_t_20;
-  const char* __pyx_t_21;
-  int __pyx_t_22;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_open", 0);
-  __Pyx_TraceCall("_open", __pyx_f[0], 749);
-  __Pyx_INCREF(__pyx_v_filename);
-  __Pyx_INCREF(__pyx_v_referencenames);
-  __Pyx_INCREF(__pyx_v_text);
-
-  /* "pysam/csamtools.pyx":769
- * 
- *         # read mode autodetection
- *         if mode is None:             # <<<<<<<<<<<<<<
- *             try:
- *                 self._open(filename, 'rb', template=template,
- */
-  __pyx_t_1 = (__pyx_v_mode == Py_None);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":770
- *         # read mode autodetection
- *         if mode is None:
- *             try:             # <<<<<<<<<<<<<<
- *                 self._open(filename, 'rb', template=template,
- *                            referencenames=referencenames,
- */
-    {
-      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
-      __Pyx_XGOTREF(__pyx_t_2);
-      __Pyx_XGOTREF(__pyx_t_3);
-      __Pyx_XGOTREF(__pyx_t_4);
-      /*try:*/ {
-
-        /* "pysam/csamtools.pyx":771
- *         if mode is None:
- *             try:
- *                 self._open(filename, 'rb', template=template,             # <<<<<<<<<<<<<<
- *                            referencenames=referencenames,
- *                            referencelengths=referencelengths,
- */
-        __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_INCREF(__pyx_v_filename);
-        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
-        __Pyx_GIVEREF(__pyx_v_filename);
-        __Pyx_INCREF(((PyObject *)__pyx_n_s__rb));
-        PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__rb));
-        __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rb));
-        __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-        if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__template), ((PyObject *)__pyx_v_template)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-
-        /* "pysam/csamtools.pyx":772
- *             try:
- *                 self._open(filename, 'rb', template=template,
- *                            referencenames=referencenames,             # <<<<<<<<<<<<<<
- *                            referencelengths=referencelengths,
- *                            text=text, header=header, port=port,
- */
-        if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__referencenames), __pyx_v_referencenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-
-        /* "pysam/csamtools.pyx":773
- *                 self._open(filename, 'rb', template=template,
- *                            referencenames=referencenames,
- *                            referencelengths=referencelengths,             # <<<<<<<<<<<<<<
- *                            text=text, header=header, port=port,
- *                            check_header=check_header,
- */
-        if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__referencelengths), __pyx_v_referencelengths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-
-        /* "pysam/csamtools.pyx":774
- *                            referencenames=referencenames,
- *                            referencelengths=referencelengths,
- *                            text=text, header=header, port=port,             # <<<<<<<<<<<<<<
- *                            check_header=check_header,
- *                            check_sq=check_sq)
- */
-        if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__text), __pyx_v_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__header), __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__port), __pyx_v_port) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-
-        /* "pysam/csamtools.pyx":775
- *                            referencelengths=referencelengths,
- *                            text=text, header=header, port=port,
- *                            check_header=check_header,             # <<<<<<<<<<<<<<
- *                            check_sq=check_sq)
- *                 return
- */
-        if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__check_header), __pyx_v_check_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-
-        /* "pysam/csamtools.pyx":776
- *                            text=text, header=header, port=port,
- *                            check_header=check_header,
- *                            check_sq=check_sq)             # <<<<<<<<<<<<<<
- *                 return
- *             except ValueError, msg:
- */
-        if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__check_sq), __pyx_v_check_sq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L4_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_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-        /* "pysam/csamtools.pyx":777
- *                            check_header=check_header,
- *                            check_sq=check_sq)
- *                 return             # <<<<<<<<<<<<<<
- *             except ValueError, msg:
- *                 pass
- */
-        __Pyx_XDECREF(__pyx_r);
-        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-        goto __pyx_L8_try_return;
-      }
-      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-      goto __pyx_L11_try_end;
-      __pyx_L8_try_return:;
-      __Pyx_XGIVEREF(__pyx_t_2);
-      __Pyx_XGIVEREF(__pyx_t_3);
-      __Pyx_XGIVEREF(__pyx_t_4);
-      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
-      goto __pyx_L0;
-      __pyx_L4_error:;
-      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-      /* "pysam/csamtools.pyx":778
- *                            check_sq=check_sq)
- *                 return
- *             except ValueError, msg:             # <<<<<<<<<<<<<<
- *                 pass
- * 
- */
-      __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
-      if (__pyx_t_9) {
-        __Pyx_AddTraceback("pysam.csamtools.Samfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_INCREF(__pyx_t_7);
-        __pyx_v_msg = __pyx_t_7;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        goto __pyx_L5_exception_handled;
-      }
-      __pyx_L6_except_error:;
-      __Pyx_XGIVEREF(__pyx_t_2);
-      __Pyx_XGIVEREF(__pyx_t_3);
-      __Pyx_XGIVEREF(__pyx_t_4);
-      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
-      goto __pyx_L1_error;
-      __pyx_L5_exception_handled:;
-      __Pyx_XGIVEREF(__pyx_t_2);
-      __Pyx_XGIVEREF(__pyx_t_3);
-      __Pyx_XGIVEREF(__pyx_t_4);
-      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
-      __pyx_L11_try_end:;
-    }
-
-    /* "pysam/csamtools.pyx":781
- *                 pass
- * 
- *             self._open(filename, 'r', template=template,             # <<<<<<<<<<<<<<
- *                        referencenames=referencenames,
- *                        referencelengths=referencelengths,
- */
-    __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_INCREF(__pyx_v_filename);
-    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_filename);
-    __Pyx_GIVEREF(__pyx_v_filename);
-    __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
-    PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__r));
-    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
-    __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__template), ((PyObject *)__pyx_v_template)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-    /* "pysam/csamtools.pyx":782
- * 
- *             self._open(filename, 'r', template=template,
- *                        referencenames=referencenames,             # <<<<<<<<<<<<<<
- *                        referencelengths=referencelengths,
- *                        text=text, header=header, port=port,
- */
-    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__referencenames), __pyx_v_referencenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-    /* "pysam/csamtools.pyx":783
- *             self._open(filename, 'r', template=template,
- *                        referencenames=referencenames,
- *                        referencelengths=referencelengths,             # <<<<<<<<<<<<<<
- *                        text=text, header=header, port=port,
- *                        check_header=check_header,
- */
-    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__referencelengths), __pyx_v_referencelengths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-    /* "pysam/csamtools.pyx":784
- *                        referencenames=referencenames,
- *                        referencelengths=referencelengths,
- *                        text=text, header=header, port=port,             # <<<<<<<<<<<<<<
- *                        check_header=check_header,
- *                        check_sq=check_sq)
- */
-    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__text), __pyx_v_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__header), __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__port), __pyx_v_port) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-    /* "pysam/csamtools.pyx":785
- *                        referencelengths=referencelengths,
- *                        text=text, header=header, port=port,
- *                        check_header=check_header,             # <<<<<<<<<<<<<<
- *                        check_sq=check_sq)
- *             return
- */
-    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__check_header), __pyx_v_check_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-    /* "pysam/csamtools.pyx":786
- *                        text=text, header=header, port=port,
- *                        check_header=check_header,
- *                        check_sq=check_sq)             # <<<<<<<<<<<<<<
- *             return
- * 
- */
-    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__check_sq), __pyx_v_check_sq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __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_7)); __pyx_t_7 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-
-    /* "pysam/csamtools.pyx":787
- *                        check_header=check_header,
- *                        check_sq=check_sq)
- *             return             # <<<<<<<<<<<<<<
- * 
- *         assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), "invalid file opening mode `%s`" % mode
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":789
- *             return
- * 
- *         assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), "invalid file opening mode `%s`" % mode             # <<<<<<<<<<<<<<
- * 
- *         # close a previously opened file
- */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  __Pyx_INCREF(__pyx_v_mode);
-  __pyx_t_5 = __pyx_v_mode;
-  __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  if (!((int)__pyx_t_1)) {
-    __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_11 = ((int)__pyx_t_10);
-  } else {
-    __pyx_t_11 = ((int)__pyx_t_1);
-  }
-  if (!__pyx_t_11) {
-    __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__rb), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_10 = ((int)__pyx_t_1);
-  } else {
-    __pyx_t_10 = __pyx_t_11;
-  }
-  if (!__pyx_t_10) {
-    __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wb), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_1 = ((int)__pyx_t_11);
-  } else {
-    __pyx_t_1 = __pyx_t_10;
-  }
-  if (!__pyx_t_1) {
-    __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wh), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_11 = ((int)__pyx_t_10);
-  } else {
-    __pyx_t_11 = __pyx_t_1;
-  }
-  if (!__pyx_t_11) {
-    __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wbu), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_10 = ((int)__pyx_t_1);
-  } else {
-    __pyx_t_10 = __pyx_t_11;
-  }
-  if (!__pyx_t_10) {
-    __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__rU), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_1 = ((int)__pyx_t_11);
-  } else {
-    __pyx_t_1 = __pyx_t_10;
-  }
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  if (unlikely(!__pyx_t_1)) {
-    __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-    PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_5));
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
-
-  /* "pysam/csamtools.pyx":792
- * 
- *         # close a previously opened file
- *         if self.samfile != NULL: self.close()             # <<<<<<<<<<<<<<
- * 
- *         cdef bam_header_t * header_to_write
- */
-  __pyx_t_1 = (__pyx_v_self->samfile != NULL);
-  if (__pyx_t_1) {
-    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    goto __pyx_L14;
-  }
-  __pyx_L14:;
-
-  /* "pysam/csamtools.pyx":795
- * 
- *         cdef bam_header_t * header_to_write
- *         header_to_write = NULL             # <<<<<<<<<<<<<<
- * 
- *         cdef bytes bmode = mode.encode('ascii')
- */
-  __pyx_v_header_to_write = NULL;
-
-  /* "pysam/csamtools.pyx":797
- *         header_to_write = NULL
- * 
- *         cdef bytes bmode = mode.encode('ascii')             # <<<<<<<<<<<<<<
- *         self._filename = filename = _encodeFilename(filename)
- *         self.isstream = filename == b"-"
- */
-  __pyx_t_8 = PyObject_GetAttr(__pyx_v_mode, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_bmode = ((PyObject*)__pyx_t_5);
-  __pyx_t_5 = 0;
-
-  /* "pysam/csamtools.pyx":798
- * 
- *         cdef bytes bmode = mode.encode('ascii')
- *         self._filename = filename = _encodeFilename(filename)             # <<<<<<<<<<<<<<
- *         self.isstream = filename == b"-"
- * 
- */
-  __pyx_t_5 = ((PyObject *)__pyx_f_5pysam_9csamtools__encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_INCREF(__pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  __Pyx_GOTREF(__pyx_v_self->_filename);
-  __Pyx_DECREF(__pyx_v_self->_filename);
-  __pyx_v_self->_filename = __pyx_t_5;
-  __Pyx_INCREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_v_filename);
-  __pyx_v_filename = __pyx_t_5;
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-
-  /* "pysam/csamtools.pyx":799
- *         cdef bytes bmode = mode.encode('ascii')
- *         self._filename = filename = _encodeFilename(filename)
- *         self.isstream = filename == b"-"             # <<<<<<<<<<<<<<
- * 
- *         self.isbam = len(mode) > 1 and mode[1] == 'b'
- */
-  __pyx_t_5 = PyObject_RichCompare(__pyx_v_filename, ((PyObject *)__pyx_kp_b_32), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_v_self->isstream = __pyx_t_9;
-
-  /* "pysam/csamtools.pyx":801
- *         self.isstream = filename == b"-"
- * 
- *         self.isbam = len(mode) > 1 and mode[1] == 'b'             # <<<<<<<<<<<<<<
- * 
- *         self.isremote = filename.startswith(b"http:") or filename.startswith(b"ftp:")
- */
-  __pyx_t_12 = PyObject_Length(__pyx_v_mode); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = __Pyx_PyBool_FromLong((__pyx_t_12 > 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__b), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_8 = __pyx_t_7;
-    __pyx_t_7 = 0;
-  } else {
-    __pyx_t_8 = __pyx_t_5;
-    __pyx_t_5 = 0;
-  }
-  __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __pyx_v_self->isbam = __pyx_t_9;
-
-  /* "pysam/csamtools.pyx":803
- *         self.isbam = len(mode) > 1 and mode[1] == 'b'
- * 
- *         self.isremote = filename.startswith(b"http:") or filename.startswith(b"ftp:")             # <<<<<<<<<<<<<<
- * 
- *         cdef char * ctext
- */
-  __pyx_t_8 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__startswith); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_1) {
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_8 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__startswith); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_8 = __pyx_t_7;
-    __pyx_t_7 = 0;
-  } else {
-    __pyx_t_8 = __pyx_t_5;
-    __pyx_t_5 = 0;
-  }
-  __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __pyx_v_self->isremote = __pyx_t_9;
-
-  /* "pysam/csamtools.pyx":806
- * 
- *         cdef char * ctext
- *         ctext = NULL             # <<<<<<<<<<<<<<
- * 
- *         if mode[0] == 'w':
- */
-  __pyx_v_ctext = NULL;
-
-  /* "pysam/csamtools.pyx":808
- *         ctext = NULL
- * 
- *         if mode[0] == 'w':             # <<<<<<<<<<<<<<
- *             # open file for writing
- * 
- */
-  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":812
- * 
- *             # header structure (used for writing)
- *             if template:             # <<<<<<<<<<<<<<
- *                 # copy header from another file
- *                 header_to_write = template.samfile.header
- */
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_template)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":814
- *             if template:
- *                 # copy header from another file
- *                 header_to_write = template.samfile.header             # <<<<<<<<<<<<<<
- * 
- *             elif header:
- */
-      __pyx_t_13 = __pyx_v_template->samfile->header;
-      __pyx_v_header_to_write = __pyx_t_13;
-      goto __pyx_L16;
-    }
-
-    /* "pysam/csamtools.pyx":816
- *                 header_to_write = template.samfile.header
- * 
- *             elif header:             # <<<<<<<<<<<<<<
- *                 header_to_write = self._buildHeader( header )
- * 
- */
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_header); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":817
- * 
- *             elif header:
- *                 header_to_write = self._buildHeader( header )             # <<<<<<<<<<<<<<
- * 
- *             else:
- */
-      __pyx_v_header_to_write = ((struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *)__pyx_v_self->__pyx_vtab)->_buildHeader(__pyx_v_self, __pyx_v_header);
-      goto __pyx_L16;
-    }
-    /*else*/ {
-
-      /* "pysam/csamtools.pyx":821
- *             else:
- *                 # build header from a target names and lengths
- *                 assert referencenames and referencelengths, "either supply options `template`, `header` or  both `referencenames` and `referencelengths` for writing"             # <<<<<<<<<<<<<<
- *                 assert len(referencenames) == len(referencelengths), "unequal names and lengths of reference sequences"
- * 
- */
-      #ifndef CYTHON_WITHOUT_ASSERTIONS
-      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_referencenames); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_1) {
-        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_referencelengths); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_11 = __pyx_t_10;
-      } else {
-        __pyx_t_11 = __pyx_t_1;
-      }
-      if (unlikely(!__pyx_t_11)) {
-        PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_37));
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #endif
-
-      /* "pysam/csamtools.pyx":822
- *                 # build header from a target names and lengths
- *                 assert referencenames and referencelengths, "either supply options `template`, `header` or  both `referencenames` and `referencelengths` for writing"
- *                 assert len(referencenames) == len(referencelengths), "unequal names and lengths of reference sequences"             # <<<<<<<<<<<<<<
- * 
- *                 # allocate and fill header
- */
-      #ifndef CYTHON_WITHOUT_ASSERTIONS
-      __pyx_t_12 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_14 = PyObject_Length(__pyx_v_referencelengths); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (unlikely(!(__pyx_t_12 == __pyx_t_14))) {
-        PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_38));
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #endif
-
-      /* "pysam/csamtools.pyx":825
- * 
- *                 # allocate and fill header
- *                 referencenames = [ _force_bytes(ref) for ref in referencenames ]             # <<<<<<<<<<<<<<
- *                 header_to_write = bam_header_init()
- *                 header_to_write.n_targets = len(referencenames)
- */
-      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      if (PyList_CheckExact(__pyx_v_referencenames) || PyTuple_CheckExact(__pyx_v_referencenames)) {
-        __pyx_t_8 = __pyx_v_referencenames; __Pyx_INCREF(__pyx_t_8); __pyx_t_14 = 0;
-        __pyx_t_15 = NULL;
-      } else {
-        __pyx_t_14 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_referencenames); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
-      }
-      for (;;) {
-        if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
-          if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_8)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
-          if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          __pyx_t_7 = __pyx_t_15(__pyx_t_8);
-          if (unlikely(!__pyx_t_7)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            }
-            break;
-          }
-          __Pyx_GOTREF(__pyx_t_7);
-        }
-        __Pyx_XDECREF(__pyx_v_ref);
-        __pyx_v_ref = __pyx_t_7;
-        __pyx_t_7 = 0;
-        __pyx_t_7 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_ref)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        if (unlikely(__Pyx_PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      }
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_8 = ((PyObject *)__pyx_t_5);
-      __Pyx_INCREF(__pyx_t_8);
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-      __Pyx_DECREF(__pyx_v_referencenames);
-      __pyx_v_referencenames = __pyx_t_8;
-      __pyx_t_8 = 0;
-
-      /* "pysam/csamtools.pyx":826
- *                 # allocate and fill header
- *                 referencenames = [ _force_bytes(ref) for ref in referencenames ]
- *                 header_to_write = bam_header_init()             # <<<<<<<<<<<<<<
- *                 header_to_write.n_targets = len(referencenames)
- *                 n = 0
- */
-      __pyx_v_header_to_write = bam_header_init();
-
-      /* "pysam/csamtools.pyx":827
- *                 referencenames = [ _force_bytes(ref) for ref in referencenames ]
- *                 header_to_write = bam_header_init()
- *                 header_to_write.n_targets = len(referencenames)             # <<<<<<<<<<<<<<
- *                 n = 0
- *                 for x in referencenames: n += len(x) + 1
- */
-      __pyx_t_14 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_header_to_write->n_targets = __pyx_t_14;
-
-      /* "pysam/csamtools.pyx":828
- *                 header_to_write = bam_header_init()
- *                 header_to_write.n_targets = len(referencenames)
- *                 n = 0             # <<<<<<<<<<<<<<
- *                 for x in referencenames: n += len(x) + 1
- *                 header_to_write.target_name = <char**>calloc(n, sizeof(char*))
- */
-      __Pyx_INCREF(__pyx_int_0);
-      __pyx_v_n = __pyx_int_0;
-
-      /* "pysam/csamtools.pyx":829
- *                 header_to_write.n_targets = len(referencenames)
- *                 n = 0
- *                 for x in referencenames: n += len(x) + 1             # <<<<<<<<<<<<<<
- *                 header_to_write.target_name = <char**>calloc(n, sizeof(char*))
- *                 header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
- */
-      if (PyList_CheckExact(__pyx_v_referencenames) || PyTuple_CheckExact(__pyx_v_referencenames)) {
-        __pyx_t_8 = __pyx_v_referencenames; __Pyx_INCREF(__pyx_t_8); __pyx_t_14 = 0;
-        __pyx_t_15 = NULL;
-      } else {
-        __pyx_t_14 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_referencenames); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
-      }
-      for (;;) {
-        if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
-          if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_8)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
-          if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          __pyx_t_5 = __pyx_t_15(__pyx_t_8);
-          if (unlikely(!__pyx_t_5)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            }
-            break;
-          }
-          __Pyx_GOTREF(__pyx_t_5);
-        }
-        __Pyx_XDECREF(__pyx_v_x);
-        __pyx_v_x = __pyx_t_5;
-        __pyx_t_5 = 0;
-        __pyx_t_12 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_12 + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_n, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __Pyx_DECREF(__pyx_v_n);
-        __pyx_v_n = __pyx_t_7;
-        __pyx_t_7 = 0;
-      }
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-      /* "pysam/csamtools.pyx":830
- *                 n = 0
- *                 for x in referencenames: n += len(x) + 1
- *                 header_to_write.target_name = <char**>calloc(n, sizeof(char*))             # <<<<<<<<<<<<<<
- *                 header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
- *                 for x from 0 <= x < header_to_write.n_targets:
- */
-      __pyx_t_16 = __Pyx_PyInt_AsSize_t(__pyx_v_n); if (unlikely((__pyx_t_16 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_header_to_write->target_name = ((char **)calloc(__pyx_t_16, (sizeof(char *))));
-
-      /* "pysam/csamtools.pyx":831
- *                 for x in referencenames: n += len(x) + 1
- *                 header_to_write.target_name = <char**>calloc(n, sizeof(char*))
- *                 header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))             # <<<<<<<<<<<<<<
- *                 for x from 0 <= x < header_to_write.n_targets:
- *                     header_to_write.target_len[x] = referencelengths[x]
- */
-      __pyx_t_16 = __Pyx_PyInt_AsSize_t(__pyx_v_n); if (unlikely((__pyx_t_16 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_header_to_write->target_len = ((uint32_t *)calloc(__pyx_t_16, (sizeof(uint32_t))));
-
-      /* "pysam/csamtools.pyx":832
- *                 header_to_write.target_name = <char**>calloc(n, sizeof(char*))
- *                 header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
- *                 for x from 0 <= x < header_to_write.n_targets:             # <<<<<<<<<<<<<<
- *                     header_to_write.target_len[x] = referencelengths[x]
- *                     name = referencenames[x]
- */
-      __pyx_t_17 = __pyx_v_header_to_write->n_targets;
-      for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18++) {
-        __pyx_t_8 = PyInt_FromLong(__pyx_t_18); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_XDECREF(__pyx_v_x);
-        __pyx_v_x = __pyx_t_8;
-        __pyx_t_8 = 0;
-
-        /* "pysam/csamtools.pyx":833
- *                 header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
- *                 for x from 0 <= x < header_to_write.n_targets:
- *                     header_to_write.target_len[x] = referencelengths[x]             # <<<<<<<<<<<<<<
- *                     name = referencenames[x]
- *                     header_to_write.target_name[x] = <char*>calloc(len(name)+1, sizeof(char))
- */
-        __pyx_t_8 = PyObject_GetItem(__pyx_v_referencelengths, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_19 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_19 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        (__pyx_v_header_to_write->target_len[__pyx_t_14]) = __pyx_t_19;
-
-        /* "pysam/csamtools.pyx":834
- *                 for x from 0 <= x < header_to_write.n_targets:
- *                     header_to_write.target_len[x] = referencelengths[x]
- *                     name = referencenames[x]             # <<<<<<<<<<<<<<
- *                     header_to_write.target_name[x] = <char*>calloc(len(name)+1, sizeof(char))
- *                     strncpy( header_to_write.target_name[x], name, len(name) )
- */
-        __pyx_t_8 = PyObject_GetItem(__pyx_v_referencenames, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_XDECREF(__pyx_v_name);
-        __pyx_v_name = __pyx_t_8;
-        __pyx_t_8 = 0;
-
-        /* "pysam/csamtools.pyx":835
- *                     header_to_write.target_len[x] = referencelengths[x]
- *                     name = referencenames[x]
- *                     header_to_write.target_name[x] = <char*>calloc(len(name)+1, sizeof(char))             # <<<<<<<<<<<<<<
- *                     strncpy( header_to_write.target_name[x], name, len(name) )
- * 
- */
-        __pyx_t_14 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        (__pyx_v_header_to_write->target_name[__pyx_t_12]) = ((char *)calloc((__pyx_t_14 + 1), (sizeof(char))));
-
-        /* "pysam/csamtools.pyx":836
- *                     name = referencenames[x]
- *                     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
- */
-        __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_20 = PyBytes_AsString(__pyx_v_name); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_12 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        strncpy((__pyx_v_header_to_write->target_name[__pyx_t_14]), __pyx_t_20, __pyx_t_12);
-        __pyx_t_18 = __Pyx_PyInt_AsLong(__pyx_v_x); if (unlikely((__pyx_t_18 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-
-      /* "pysam/csamtools.pyx":832
- *                 header_to_write.target_name = <char**>calloc(n, sizeof(char*))
- *                 header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
- *                 for x from 0 <= x < header_to_write.n_targets:             # <<<<<<<<<<<<<<
- *                     header_to_write.target_len[x] = referencelengths[x]
- *                     name = referencenames[x]
- */
-      __pyx_t_8 = PyInt_FromLong(__pyx_t_18); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_XDECREF(__pyx_v_x);
-      __pyx_v_x = __pyx_t_8;
-      __pyx_t_8 = 0;
-
-      /* "pysam/csamtools.pyx":840
- *                 # 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:
- */
-      __pyx_t_11 = (__pyx_v_text == Py_None);
-      if (__pyx_t_11) {
-        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_add_sq_text); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_10 = __pyx_t_1;
-      } else {
-        __pyx_t_10 = __pyx_t_11;
-      }
-      if (__pyx_t_10) {
-
-        /* "pysam/csamtools.pyx":841
- *                 # file.
- *                 if text is None and add_sq_text:
- *                     text = []             # <<<<<<<<<<<<<<
- *                     for x from 0 <= x < header_to_write.n_targets:
- *                         text.append( "@SQ\tSN:%s\tLN:%s\n" % \
- */
-        __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_v_text);
-        __pyx_v_text = ((PyObject *)__pyx_t_8);
-        __pyx_t_8 = 0;
-
-        /* "pysam/csamtools.pyx":842
- *                 if text is None and add_sq_text:
- *                     text = []
- *                     for x from 0 <= x < header_to_write.n_targets:             # <<<<<<<<<<<<<<
- *                         text.append( "@SQ\tSN:%s\tLN:%s\n" % \
- *                                          (_force_str(referencenames[x]),
- */
-        __pyx_t_17 = __pyx_v_header_to_write->n_targets;
-        for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18++) {
-          __pyx_t_8 = PyInt_FromLong(__pyx_t_18); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __Pyx_XDECREF(__pyx_v_x);
-          __pyx_v_x = __pyx_t_8;
-          __pyx_t_8 = 0;
-
-          /* "pysam/csamtools.pyx":844
- *                     for x from 0 <= x < header_to_write.n_targets:
- *                         text.append( "@SQ\tSN:%s\tLN:%s\n" % \
- *                                          (_force_str(referencenames[x]),             # <<<<<<<<<<<<<<
- *                                           referencelengths[x] ) )
- *                     text = ''.join(text)
- */
-          __pyx_t_8 = PyObject_GetItem(__pyx_v_referencenames, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __pyx_t_7 = __pyx_f_5pysam_9csamtools__force_str(__pyx_t_8); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-          /* "pysam/csamtools.pyx":845
- *                         text.append( "@SQ\tSN:%s\tLN:%s\n" % \
- *                                          (_force_str(referencenames[x]),
- *                                           referencelengths[x] ) )             # <<<<<<<<<<<<<<
- *                     text = ''.join(text)
- * 
- */
-          __pyx_t_8 = PyObject_GetItem(__pyx_v_referencelengths, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_5);
-          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
-          __Pyx_GIVEREF(__pyx_t_7);
-          PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
-          __Pyx_GIVEREF(__pyx_t_8);
-          __pyx_t_7 = 0;
-          __pyx_t_8 = 0;
-          __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_39), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-          __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-          __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_text, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_5);
-          __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-          __pyx_t_18 = __Pyx_PyInt_AsLong(__pyx_v_x); if (unlikely((__pyx_t_18 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-
-        /* "pysam/csamtools.pyx":842
- *                 if text is None and add_sq_text:
- *                     text = []
- *                     for x from 0 <= x < header_to_write.n_targets:             # <<<<<<<<<<<<<<
- *                         text.append( "@SQ\tSN:%s\tLN:%s\n" % \
- *                                          (_force_str(referencenames[x]),
- */
-        __pyx_t_5 = PyInt_FromLong(__pyx_t_18); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_XDECREF(__pyx_v_x);
-        __pyx_v_x = __pyx_t_5;
-        __pyx_t_5 = 0;
-
-        /* "pysam/csamtools.pyx":846
- *                                          (_force_str(referencenames[x]),
- *                                           referencelengths[x] ) )
- *                     text = ''.join(text)             # <<<<<<<<<<<<<<
- * 
- *                 if text != None:
- */
-        __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_20), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_INCREF(__pyx_v_text);
-        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_text);
-        __Pyx_GIVEREF(__pyx_v_text);
-        __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __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_8)); __pyx_t_8 = 0;
-        __Pyx_DECREF(__pyx_v_text);
-        __pyx_v_text = __pyx_t_7;
-        __pyx_t_7 = 0;
-        goto __pyx_L23;
-      }
-      __pyx_L23:;
-
-      /* "pysam/csamtools.pyx":848
- *                     text = ''.join(text)
- * 
- *                 if text != None:             # <<<<<<<<<<<<<<
- *                     # copy without \0
- *                     text = _force_bytes(text)
- */
-      __pyx_t_7 = PyObject_RichCompare(__pyx_v_text, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_10) {
-
-        /* "pysam/csamtools.pyx":850
- *                 if text != None:
- *                     # copy without \0
- *                     text = _force_bytes(text)             # <<<<<<<<<<<<<<
- *                     ctext = text
- *                     header_to_write.l_text = strlen(ctext)
- */
-        __pyx_t_7 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_text)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_v_text);
-        __pyx_v_text = __pyx_t_7;
-        __pyx_t_7 = 0;
-
-        /* "pysam/csamtools.pyx":851
- *                     # copy without \0
- *                     text = _force_bytes(text)
- *                     ctext = text             # <<<<<<<<<<<<<<
- *                     header_to_write.l_text = strlen(ctext)
- *                     header_to_write.text = <char*>calloc( strlen(ctext), sizeof(char) )
- */
-        __pyx_t_20 = PyBytes_AsString(__pyx_v_text); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_v_ctext = __pyx_t_20;
-
-        /* "pysam/csamtools.pyx":852
- *                     text = _force_bytes(text)
- *                     ctext = text
- *                     header_to_write.l_text = strlen(ctext)             # <<<<<<<<<<<<<<
- *                     header_to_write.text = <char*>calloc( strlen(ctext), sizeof(char) )
- *                     memcpy( header_to_write.text, ctext, strlen(ctext) )
- */
-        __pyx_v_header_to_write->l_text = strlen(__pyx_v_ctext);
-
-        /* "pysam/csamtools.pyx":853
- *                     ctext = text
- *                     header_to_write.l_text = strlen(ctext)
- *                     header_to_write.text = <char*>calloc( strlen(ctext), sizeof(char) )             # <<<<<<<<<<<<<<
- *                     memcpy( header_to_write.text, ctext, strlen(ctext) )
- * 
- */
-        __pyx_v_header_to_write->text = ((char *)calloc(strlen(__pyx_v_ctext), (sizeof(char))));
-
-        /* "pysam/csamtools.pyx":854
- *                     header_to_write.l_text = strlen(ctext)
- *                     header_to_write.text = <char*>calloc( strlen(ctext), sizeof(char) )
- *                     memcpy( header_to_write.text, ctext, strlen(ctext) )             # <<<<<<<<<<<<<<
- * 
- *                 header_to_write.hash = NULL
- */
-        memcpy(__pyx_v_header_to_write->text, __pyx_v_ctext, strlen(__pyx_v_ctext));
-        goto __pyx_L26;
-      }
-      __pyx_L26:;
-
-      /* "pysam/csamtools.pyx":856
- *                     memcpy( header_to_write.text, ctext, strlen(ctext) )
- * 
- *                 header_to_write.hash = NULL             # <<<<<<<<<<<<<<
- *                 header_to_write.rg2lib = NULL
- * 
- */
-      __pyx_v_header_to_write->hash = NULL;
-
-      /* "pysam/csamtools.pyx":857
- * 
- *                 header_to_write.hash = NULL
- *                 header_to_write.rg2lib = NULL             # <<<<<<<<<<<<<<
- * 
- *             # open file. Header gets written to file at the same time for bam files
- */
-      __pyx_v_header_to_write->rg2lib = NULL;
-    }
-    __pyx_L16:;
-
-    /* "pysam/csamtools.pyx":861
- *             # open file. Header gets written to file at the same time for bam files
- *             # and sam files (in the latter case, the mode needs to be wh)
- *             store = StderrStore()             # <<<<<<<<<<<<<<
- *             self.samfile = samopen( filename, bmode, header_to_write )
- *             store.release()
- */
-    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_v_store = __pyx_t_8;
-    __pyx_t_8 = 0;
-
-    /* "pysam/csamtools.pyx":862
- *             # and sam files (in the latter case, the mode needs to be wh)
- *             store = StderrStore()
- *             self.samfile = samopen( filename, bmode, header_to_write )             # <<<<<<<<<<<<<<
- *             store.release()
- * 
- */
-    __pyx_t_21 = PyBytes_AsString(__pyx_v_filename); if (unlikely((__pyx_t_21 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_20 = PyBytes_AsString(((PyObject *)__pyx_v_bmode)); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->samfile = samopen(__pyx_t_21, __pyx_t_20, __pyx_v_header_to_write);
-
-    /* "pysam/csamtools.pyx":863
- *             store = StderrStore()
- *             self.samfile = samopen( filename, bmode, header_to_write )
- *             store.release()             # <<<<<<<<<<<<<<
- * 
- *             # bam_header_destroy takes care of cleaning up of all the members
- */
-    __pyx_t_8 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-    /* "pysam/csamtools.pyx":866
- * 
- *             # bam_header_destroy takes care of cleaning up of all the members
- *             if not template and header_to_write != NULL:             # <<<<<<<<<<<<<<
- *                 bam_header_destroy( header_to_write )
- * 
- */
-    __pyx_t_10 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_template)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_11 = (!__pyx_t_10);
-    if (__pyx_t_11) {
-      __pyx_t_10 = (__pyx_v_header_to_write != NULL);
-      __pyx_t_1 = __pyx_t_10;
-    } else {
-      __pyx_t_1 = __pyx_t_11;
-    }
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":867
- *             # bam_header_destroy takes care of cleaning up of all the members
- *             if not template and header_to_write != NULL:
- *                 bam_header_destroy( header_to_write )             # <<<<<<<<<<<<<<
- * 
- *         elif mode[0] == "r":
- */
-      bam_header_destroy(__pyx_v_header_to_write);
-      goto __pyx_L27;
-    }
-    __pyx_L27:;
-    goto __pyx_L15;
-  }
-
-  /* "pysam/csamtools.pyx":869
- *                 bam_header_destroy( header_to_write )
- * 
- *         elif mode[0] == "r":             # <<<<<<<<<<<<<<
- *             # open file for reading
- *             if filename != b"-" and not self.isremote and not os.path.exists( filename ):
- */
-  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":871
- *         elif mode[0] == "r":
- *             # open file for reading
- *             if filename != b"-" and not self.isremote and not os.path.exists( filename ):             # <<<<<<<<<<<<<<
- *                 raise IOError( "file `%s` not found" % filename)
- * 
- */
-    __pyx_t_8 = PyObject_RichCompare(__pyx_v_filename, ((PyObject *)__pyx_kp_b_32), Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    if (__pyx_t_1) {
-      __pyx_t_11 = (!__pyx_v_self->isremote);
-      if (__pyx_t_11) {
-        __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__path); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__exists); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_INCREF(__pyx_v_filename);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_filename);
-        __Pyx_GIVEREF(__pyx_v_filename);
-        __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __pyx_t_22 = (!__pyx_t_10);
-        __pyx_t_10 = __pyx_t_22;
-      } else {
-        __pyx_t_10 = __pyx_t_11;
-      }
-      __pyx_t_11 = __pyx_t_10;
-    } else {
-      __pyx_t_11 = __pyx_t_1;
-    }
-    if (__pyx_t_11) {
-
-      /* "pysam/csamtools.pyx":872
- *             # open file for reading
- *             if filename != b"-" and not self.isremote and not os.path.exists( filename ):
- *                 raise IOError( "file `%s` not found" % filename)             # <<<<<<<<<<<<<<
- * 
- *             # try to detect errors
- */
-      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_40), __pyx_v_filename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-      __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L28;
-    }
-    __pyx_L28:;
-
-    /* "pysam/csamtools.pyx":875
- * 
- *             # try to detect errors
- *             self.samfile = samopen( filename, bmode, NULL )             # <<<<<<<<<<<<<<
- *             if self.samfile == NULL:
- *                 raise ValueError( "could not open file (mode='%s') - is it SAM/BAM format?" % mode)
- */
-    __pyx_t_21 = PyBytes_AsString(__pyx_v_filename); if (unlikely((__pyx_t_21 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_20 = PyBytes_AsString(((PyObject *)__pyx_v_bmode)); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->samfile = samopen(__pyx_t_21, __pyx_t_20, NULL);
-
-    /* "pysam/csamtools.pyx":876
- *             # try to detect errors
- *             self.samfile = samopen( filename, bmode, NULL )
- *             if self.samfile == NULL:             # <<<<<<<<<<<<<<
- *                 raise ValueError( "could not open file (mode='%s') - is it SAM/BAM format?" % mode)
- * 
- */
-    __pyx_t_11 = (__pyx_v_self->samfile == NULL);
-    if (__pyx_t_11) {
-
-      /* "pysam/csamtools.pyx":877
- *             self.samfile = samopen( filename, bmode, NULL )
- *             if self.samfile == NULL:
- *                 raise ValueError( "could not open file (mode='%s') - is it SAM/BAM format?" % mode)             # <<<<<<<<<<<<<<
- * 
- *             # bam files require a valid header
- */
-      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_41), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-      __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L29;
-    }
-    __pyx_L29:;
-
-    /* "pysam/csamtools.pyx":880
- * 
- *             # bam files require a valid header
- *             if self.isbam:             # <<<<<<<<<<<<<<
- *                 if self.samfile.header == NULL:
- *                     raise ValueError( "file does not have valid header (mode='%s') - is it BAM format?" % mode )
- */
-    if (__pyx_v_self->isbam) {
-
-      /* "pysam/csamtools.pyx":881
- *             # bam files require a valid header
- *             if self.isbam:
- *                 if self.samfile.header == NULL:             # <<<<<<<<<<<<<<
- *                     raise ValueError( "file does not have valid header (mode='%s') - is it BAM format?" % mode )
- *             else:
- */
-      __pyx_t_11 = (__pyx_v_self->samfile->header == NULL);
-      if (__pyx_t_11) {
-
-        /* "pysam/csamtools.pyx":882
- *             if self.isbam:
- *                 if self.samfile.header == NULL:
- *                     raise ValueError( "file does not have valid header (mode='%s') - is it BAM format?" % mode )             # <<<<<<<<<<<<<<
- *             else:
- *                 # in sam files it is optional (samfile full of unmapped reads)
- */
-        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_42), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-        __pyx_t_5 = 0;
-        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L31;
-      }
-      __pyx_L31:;
-      goto __pyx_L30;
-    }
-    /*else*/ {
-
-      /* "pysam/csamtools.pyx":885
- *             else:
- *                 # in sam files it is optional (samfile full of unmapped reads)
- *                 if check_header and self.samfile.header == NULL:             # <<<<<<<<<<<<<<
- *                     raise ValueError( "file does not have valid header (mode='%s') - is it SAM format?" % mode )
- * 
- */
-      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_check_header); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_11) {
-        __pyx_t_1 = (__pyx_v_self->samfile->header == NULL);
-        __pyx_t_10 = __pyx_t_1;
-      } else {
-        __pyx_t_10 = __pyx_t_11;
-      }
-      if (__pyx_t_10) {
-
-        /* "pysam/csamtools.pyx":886
- *                 # in sam files it is optional (samfile full of unmapped reads)
- *                 if check_header and self.samfile.header == NULL:
- *                     raise ValueError( "file does not have valid header (mode='%s') - is it SAM format?" % mode )             # <<<<<<<<<<<<<<
- * 
- *             # disabled for autodetection to work
- */
-        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_43), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-        __pyx_t_5 = 0;
-        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L32;
-      }
-      __pyx_L32:;
-    }
-    __pyx_L30:;
-
-    /* "pysam/csamtools.pyx":890
- *             # disabled for autodetection to work
- *             # needs to be disabled so that reading from sam-files without headers works
- *             if check_sq and self.samfile.header.n_targets == 0:             # <<<<<<<<<<<<<<
- *                 raise ValueError( "file header is empty (mode='%s') - is it SAM/BAM format?" % mode)
- * 
- */
-    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_check_sq); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_10) {
-      __pyx_t_11 = (__pyx_v_self->samfile->header->n_targets == 0);
-      __pyx_t_1 = __pyx_t_11;
-    } else {
-      __pyx_t_1 = __pyx_t_10;
-    }
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":891
- *             # needs to be disabled so that reading from sam-files without headers works
- *             if check_sq and self.samfile.header.n_targets == 0:
- *                 raise ValueError( "file header is empty (mode='%s') - is it SAM/BAM format?" % mode)             # <<<<<<<<<<<<<<
- * 
- *         if self.samfile == NULL:
- */
-      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-      __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L33;
-    }
-    __pyx_L33:;
-    goto __pyx_L15;
-  }
-  __pyx_L15:;
-
-  /* "pysam/csamtools.pyx":893
- *                 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 )
- * 
- */
-  __pyx_t_1 = (__pyx_v_self->samfile == NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":894
- * 
- *         if self.samfile == NULL:
- *             raise IOError("could not open file `%s`" % filename )             # <<<<<<<<<<<<<<
- * 
- *         # check for index and open if present
- */
-    __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_filename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-    __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L34;
-  }
-  __pyx_L34:;
-
-  /* "pysam/csamtools.pyx":897
- * 
- *         # check for index and open if present
- *         if mode[0] == "r" and self.isbam:             # <<<<<<<<<<<<<<
- * 
- *             if not self.isremote:
- */
-  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (__pyx_t_1) {
-    __pyx_t_10 = __pyx_v_self->isbam;
-  } else {
-    __pyx_t_10 = __pyx_t_1;
-  }
-  if (__pyx_t_10) {
-
-    /* "pysam/csamtools.pyx":899
- *         if mode[0] == "r" and self.isbam:
- * 
- *             if not self.isremote:             # <<<<<<<<<<<<<<
- *                 if not os.path.exists(filename + b".bai") \
- *                         and not os.path.exists( filename[:-4] + b".bai"):
- */
-    __pyx_t_10 = (!__pyx_v_self->isremote);
-    if (__pyx_t_10) {
-
-      /* "pysam/csamtools.pyx":900
- * 
- *             if not self.isremote:
- *                 if not os.path.exists(filename + b".bai") \             # <<<<<<<<<<<<<<
- *                         and not os.path.exists( filename[:-4] + b".bai"):
- *                     self.index = NULL
- */
-      __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_5 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__exists); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_5 = PyNumber_Add(__pyx_v_filename, ((PyObject *)__pyx_kp_b_45)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __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);
-      __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __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_8)); __pyx_t_8 = 0;
-      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_1 = (!__pyx_t_10);
-      if (__pyx_t_1) {
-
-        /* "pysam/csamtools.pyx":901
- *             if not self.isremote:
- *                 if not os.path.exists(filename + b".bai") \
- *                         and not os.path.exists( filename[:-4] + b".bai"):             # <<<<<<<<<<<<<<
- *                     self.index = NULL
- *                 else:
- */
-        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_8 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__path); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __pyx_t_5 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__exists); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_filename, 0, -4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_7 = PyNumber_Add(__pyx_t_8, ((PyObject *)__pyx_kp_b_45)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __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_8)); __pyx_t_8 = 0;
-        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_11 = (!__pyx_t_10);
-        __pyx_t_10 = __pyx_t_11;
-      } else {
-        __pyx_t_10 = __pyx_t_1;
-      }
-      if (__pyx_t_10) {
-
-        /* "pysam/csamtools.pyx":902
- *                 if not os.path.exists(filename + b".bai") \
- *                         and not os.path.exists( filename[:-4] + b".bai"):
- *                     self.index = NULL             # <<<<<<<<<<<<<<
- *                 else:
- *                     # returns NULL if there is no index or index could not be opened
- */
-        __pyx_v_self->index = NULL;
-        goto __pyx_L37;
-      }
-      /*else*/ {
-
-        /* "pysam/csamtools.pyx":905
- *                 else:
- *                     # returns NULL if there is no index or index could not be opened
- *                     self.index = bam_index_load(filename)             # <<<<<<<<<<<<<<
- *                     if self.index == NULL:
- *                         raise IOError("error while opening index `%s` " % filename )
- */
-        __pyx_t_20 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_v_self->index = bam_index_load(__pyx_t_20);
-
-        /* "pysam/csamtools.pyx":906
- *                     # returns NULL if there is no index or index could not be opened
- *                     self.index = bam_index_load(filename)
- *                     if self.index == NULL:             # <<<<<<<<<<<<<<
- *                         raise IOError("error while opening index `%s` " % filename )
- *             else:
- */
-        __pyx_t_10 = (__pyx_v_self->index == NULL);
-        if (__pyx_t_10) {
-
-          /* "pysam/csamtools.pyx":907
- *                     self.index = bam_index_load(filename)
- *                     if self.index == NULL:
- *                         raise IOError("error while opening index `%s` " % filename )             # <<<<<<<<<<<<<<
- *             else:
- *                 self.index = bam_index_load(filename)
- */
-          __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), __pyx_v_filename); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_7));
-          __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
-          __pyx_t_7 = 0;
-          __pyx_t_7 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          goto __pyx_L38;
-        }
-        __pyx_L38:;
-      }
-      __pyx_L37:;
-      goto __pyx_L36;
-    }
-    /*else*/ {
-
-      /* "pysam/csamtools.pyx":909
- *                         raise IOError("error while opening index `%s` " % filename )
- *             else:
- *                 self.index = bam_index_load(filename)             # <<<<<<<<<<<<<<
- *                 if self.index == NULL:
- *                     raise IOError("error while opening index `%s` " % filename )
- */
-      __pyx_t_20 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_self->index = bam_index_load(__pyx_t_20);
-
-      /* "pysam/csamtools.pyx":910
- *             else:
- *                 self.index = bam_index_load(filename)
- *                 if self.index == NULL:             # <<<<<<<<<<<<<<
- *                     raise IOError("error while opening index `%s` " % filename )
- * 
- */
-      __pyx_t_10 = (__pyx_v_self->index == NULL);
-      if (__pyx_t_10) {
-
-        /* "pysam/csamtools.pyx":911
- *                 self.index = bam_index_load(filename)
- *                 if self.index == NULL:
- *                     raise IOError("error while opening index `%s` " % filename )             # <<<<<<<<<<<<<<
- * 
- *             if not self.isstream:
- */
-        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), __pyx_v_filename); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_7));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
-        __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L39;
-      }
-      __pyx_L39:;
-    }
-    __pyx_L36:;
-
-    /* "pysam/csamtools.pyx":913
- *                     raise IOError("error while opening index `%s` " % filename )
- * 
- *             if not self.isstream:             # <<<<<<<<<<<<<<
- *                 self.start_offset = bam_tell( self.samfile.x.bam )
- * 
- */
-    __pyx_t_10 = (!__pyx_v_self->isstream);
-    if (__pyx_t_10) {
-
-      /* "pysam/csamtools.pyx":914
- * 
- *             if not self.isstream:
- *                 self.start_offset = bam_tell( self.samfile.x.bam )             # <<<<<<<<<<<<<<
- * 
- *     def gettid( self, reference ):
- */
-      __pyx_v_self->start_offset = bam_tell(__pyx_v_self->samfile->x.bam);
-      goto __pyx_L40;
-    }
-    __pyx_L40:;
-    goto __pyx_L35;
-  }
-  __pyx_L35:;
-
-  __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_8);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_msg);
-  __Pyx_XDECREF(__pyx_v_bmode);
-  __Pyx_XDECREF(__pyx_v_n);
-  __Pyx_XDECREF(__pyx_v_x);
-  __Pyx_XDECREF(__pyx_v_name);
-  __Pyx_XDECREF(__pyx_v_store);
-  __Pyx_XDECREF(__pyx_v_ref);
-  __Pyx_XDECREF(__pyx_v_filename);
-  __Pyx_XDECREF(__pyx_v_referencenames);
-  __Pyx_XDECREF(__pyx_v_text);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_9gettid(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_8gettid[] = "Samfile.gettid(self, reference)\n\n        convert :term:`reference` name into numerical :term:`tid`\n\n        returns -1 if reference is not known.\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_9gettid(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("gettid (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_8gettid(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":916
- *                 self.start_offset = bam_tell( self.samfile.x.bam )
- * 
- *     def gettid( self, reference ):             # <<<<<<<<<<<<<<
- *         '''
- *         convert :term:`reference` name into numerical :term:`tid`
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_8gettid(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  char *__pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("gettid", 0);
-  __Pyx_TraceCall("gettid", __pyx_f[0], 916);
-  __Pyx_INCREF(__pyx_v_reference);
-
-  /* "pysam/csamtools.pyx":922
- *         returns -1 if reference is not known.
- *         '''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         reference = _force_bytes(reference)
- *         return pysam_reference2tid( self.samfile.header, reference )
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_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 = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":923
- *         '''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *         reference = _force_bytes(reference)             # <<<<<<<<<<<<<<
- *         return pysam_reference2tid( self.samfile.header, reference )
- * 
- */
-  __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_reference)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_v_reference);
-  __pyx_v_reference = __pyx_t_2;
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":924
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *         reference = _force_bytes(reference)
- *         return pysam_reference2tid( self.samfile.header, reference )             # <<<<<<<<<<<<<<
- * 
- *     def getrname( self, tid ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_5 = PyBytes_AsString(__pyx_v_reference); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = PyInt_FromLong(pysam_reference2tid(__pyx_v_self->samfile->header, __pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.gettid", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_reference);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_11getrname(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_10getrname[] = "Samfile.getrname(self, tid)\n\n        convert numerical :term:`tid` into :term:`reference` name.";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_11getrname(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("getrname (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_10getrname(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), ((PyObject *)__pyx_v_tid));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":926
- *         return pysam_reference2tid( self.samfile.header, reference )
- * 
- *     def getrname( self, tid ):             # <<<<<<<<<<<<<<
- *         '''
- *         convert numerical :term:`tid` into :term:`reference` name.'''
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_10getrname(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_tid) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  Py_ssize_t __pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("getrname", 0);
-  __Pyx_TraceCall("getrname", __pyx_f[0], 926);
-
-  /* "pysam/csamtools.pyx":929
- *         '''
- *         convert numerical :term:`tid` into :term:`reference` name.'''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         if not 0 <= tid < self.samfile.header.n_targets:
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":930
- *         convert numerical :term:`tid` into :term:`reference` name.'''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *         if not 0 <= tid < self.samfile.header.n_targets:             # <<<<<<<<<<<<<<
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
- *         return _charptr_to_str(self.samfile.header.target_name[tid])
- */
-  __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_tid, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
-    __Pyx_DECREF(__pyx_t_2);
-    __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_v_tid, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  }
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_3 = (!__pyx_t_4);
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":931
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *         if not 0 <= tid < self.samfile.header.n_targets:
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )             # <<<<<<<<<<<<<<
- *         return _charptr_to_str(self.samfile.header.target_name[tid])
- * 
- */
-    __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __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 = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_v_tid);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tid);
-    __Pyx_GIVEREF(__pyx_v_tid);
-    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_t_2 = 0;
-    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__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 = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
-    __pyx_t_2 = 0;
-    __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 = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":932
- *         if not 0 <= tid < self.samfile.header.n_targets:
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
- *         return _charptr_to_str(self.samfile.header.target_name[tid])             # <<<<<<<<<<<<<<
- * 
- *     cdef char * _getrname( self, int tid ): # TODO unused
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_tid); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = __pyx_f_5pysam_9csamtools__charptr_to_str((__pyx_v_self->samfile->header->target_name[__pyx_t_5])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.getrname", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":934
- *         return _charptr_to_str(self.samfile.header.target_name[tid])
- * 
- *     cdef char * _getrname( self, int tid ): # TODO unused             # <<<<<<<<<<<<<<
- *         '''
- *         convert numerical :term:`tid` into :term:`reference` name.'''
- */
-
-static char *__pyx_f_5pysam_9csamtools_7Samfile__getrname(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, int __pyx_v_tid) {
-  char *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_getrname", 0);
-  __Pyx_TraceCall("_getrname", __pyx_f[0], 934);
-
-  /* "pysam/csamtools.pyx":937
- *         '''
- *         convert numerical :term:`tid` into :term:`reference` name.'''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         if not 0 <= tid < self.samfile.header.n_targets:
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":938
- *         convert numerical :term:`tid` into :term:`reference` name.'''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *         if not 0 <= tid < self.samfile.header.n_targets:             # <<<<<<<<<<<<<<
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
- *         return self.samfile.header.target_name[tid]
- */
-  __pyx_t_4 = (0 <= __pyx_v_tid);
-  if (__pyx_t_4) {
-    __pyx_t_4 = (__pyx_v_tid < __pyx_v_self->samfile->header->n_targets);
-  }
-  __pyx_t_3 = (!__pyx_t_4);
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":939
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *         if not 0 <= tid < self.samfile.header.n_targets:
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )             # <<<<<<<<<<<<<<
- *         return self.samfile.header.target_name[tid]
- * 
- */
-    __pyx_t_2 = PyInt_FromLong(__pyx_v_tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __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_2 = 0;
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__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 = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":940
- *         if not 0 <= tid < self.samfile.header.n_targets:
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
- *         return self.samfile.header.target_name[tid]             # <<<<<<<<<<<<<<
- * 
- *     def _parseRegion( self,
- */
-  __pyx_r = (__pyx_v_self->samfile->header->target_name[__pyx_v_tid]);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_WriteUnraisable("pysam.csamtools.Samfile._getrname", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_13_parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_12_parseRegion[] = "Samfile._parseRegion(self, reference=None, start=None, end=None, region=None)\n\n        parse region information.\n\n        raise ValueError for for invalid regions.\n\n        returns a tuple of flag, tid, start and end. Flag indicates\n        whether some coordinates were supplied.\n\n        Note that regions are 1-based, while start,end are python coordinates.\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_13_parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_reference = 0;
-  PyObject *__pyx_v_start = 0;
-  PyObject *__pyx_v_end = 0;
-  PyObject *__pyx_v_region = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_parseRegion (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,0};
-    PyObject* values[4] = {0,0,0,0};
-
-    /* "pysam/csamtools.pyx":943
- * 
- *     def _parseRegion( self,
- *                       reference = None,             # <<<<<<<<<<<<<<
- *                       start = None,
- *                       end = None,
- */
-    values[0] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":944
- *     def _parseRegion( self,
- *                       reference = None,
- *                       start = None,             # <<<<<<<<<<<<<<
- *                       end = None,
- *                       region = None ):
- */
-    values[1] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":945
- *                       reference = None,
- *                       start = None,
- *                       end = None,             # <<<<<<<<<<<<<<
- *                       region = None ):
- *         '''
- */
-    values[2] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":946
- *                       start = None,
- *                       end = None,
- *                       region = None ):             # <<<<<<<<<<<<<<
- *         '''
- *         parse region information.
- */
-    values[3] = ((PyObject *)Py_None);
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
-          if (value) { values[0] = value; kw_args--; }
-        }
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
-          if (value) { values[2] = value; kw_args--; }
-        }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
-          if (value) { values[3] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parseRegion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_reference = values[0];
-    __pyx_v_start = values[1];
-    __pyx_v_end = values[2];
-    __pyx_v_region = values[3];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_parseRegion", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_12_parseRegion(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":942
- *         return self.samfile.header.target_name[tid]
- * 
- *     def _parseRegion( self,             # <<<<<<<<<<<<<<
- *                       reference = None,
- *                       start = None,
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_12_parseRegion(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region) {
-  int __pyx_v_rtid;
-  PY_LONG_LONG __pyx_v_rstart;
-  PY_LONG_LONG __pyx_v_rend;
-  PyObject *__pyx_v_parts = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  PY_LONG_LONG __pyx_t_6;
-  int __pyx_t_7;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
-  Py_ssize_t __pyx_t_12;
-  int __pyx_t_13;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_parseRegion", 0);
-  __Pyx_TraceCall("_parseRegion", __pyx_f[0], 942);
-  __Pyx_INCREF(__pyx_v_reference);
-  __Pyx_INCREF(__pyx_v_region);
-
-  /* "pysam/csamtools.pyx":965
- *         cdef long long rend
- * 
- *         rtid = -1             # <<<<<<<<<<<<<<
- *         rstart = 0
- *         rend = max_pos
- */
-  __pyx_v_rtid = -1;
-
-  /* "pysam/csamtools.pyx":966
- * 
- *         rtid = -1
- *         rstart = 0             # <<<<<<<<<<<<<<
- *         rend = max_pos
- *         if start != None:
- */
-  __pyx_v_rstart = 0;
-
-  /* "pysam/csamtools.pyx":967
- *         rtid = -1
- *         rstart = 0
- *         rend = max_pos             # <<<<<<<<<<<<<<
- *         if start != None:
- *             try:
- */
-  __pyx_v_rend = __pyx_v_5pysam_9csamtools_max_pos;
-
-  /* "pysam/csamtools.pyx":968
- *         rstart = 0
- *         rend = max_pos
- *         if start != None:             # <<<<<<<<<<<<<<
- *             try:
- *                 rstart = start
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __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 = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":969
- *         rend = max_pos
- *         if start != None:
- *             try:             # <<<<<<<<<<<<<<
- *                 rstart = start
- *             except OverflowError:
- */
-    {
-      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
-      __Pyx_XGOTREF(__pyx_t_3);
-      __Pyx_XGOTREF(__pyx_t_4);
-      __Pyx_XGOTREF(__pyx_t_5);
-      /*try:*/ {
-
-        /* "pysam/csamtools.pyx":970
- *         if start != None:
- *             try:
- *                 rstart = start             # <<<<<<<<<<<<<<
- *             except OverflowError:
- *                 raise ValueError( 'start out of range (%i)' % start )
- */
-        __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_v_start); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __pyx_v_rstart = __pyx_t_6;
-      }
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-      goto __pyx_L11_try_end;
-      __pyx_L4_error:;
-      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":971
- *             try:
- *                 rstart = start
- *             except OverflowError:             # <<<<<<<<<<<<<<
- *                 raise ValueError( 'start out of range (%i)' % start )
- * 
- */
-      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
-      if (__pyx_t_7) {
-        __Pyx_AddTraceback("pysam.csamtools.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_GOTREF(__pyx_t_9);
-
-        /* "pysam/csamtools.pyx":972
- *                 rstart = start
- *             except OverflowError:
- *                 raise ValueError( 'start out of range (%i)' % start )             # <<<<<<<<<<<<<<
- * 
- *         if end != None:
- */
-        __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), __pyx_v_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
-        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-        __Pyx_GOTREF(__pyx_t_11);
-        PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_10));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
-        __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
-        __Pyx_Raise(__pyx_t_10, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        goto __pyx_L5_exception_handled;
-      }
-      __pyx_L6_except_error:;
-      __Pyx_XGIVEREF(__pyx_t_3);
-      __Pyx_XGIVEREF(__pyx_t_4);
-      __Pyx_XGIVEREF(__pyx_t_5);
-      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
-      goto __pyx_L1_error;
-      __pyx_L5_exception_handled:;
-      __Pyx_XGIVEREF(__pyx_t_3);
-      __Pyx_XGIVEREF(__pyx_t_4);
-      __Pyx_XGIVEREF(__pyx_t_5);
-      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
-      __pyx_L11_try_end:;
-    }
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":974
- *                 raise ValueError( 'start out of range (%i)' % start )
- * 
- *         if end != None:             # <<<<<<<<<<<<<<
- *             try:
- *                 rend = end
- */
-  __pyx_t_9 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":975
- * 
- *         if end != None:
- *             try:             # <<<<<<<<<<<<<<
- *                 rend = end
- *             except OverflowError:
- */
-    {
-      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
-      __Pyx_XGOTREF(__pyx_t_5);
-      __Pyx_XGOTREF(__pyx_t_4);
-      __Pyx_XGOTREF(__pyx_t_3);
-      /*try:*/ {
-
-        /* "pysam/csamtools.pyx":976
- *         if end != None:
- *             try:
- *                 rend = end             # <<<<<<<<<<<<<<
- *             except OverflowError:
- *                 raise ValueError( 'end out of range (%i)' % end )
- */
-        __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_v_end); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
-        __pyx_v_rend = __pyx_t_6;
-      }
-      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-      goto __pyx_L22_try_end;
-      __pyx_L15_error:;
-      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __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;
-
-      /* "pysam/csamtools.pyx":977
- *             try:
- *                 rend = end
- *             except OverflowError:             # <<<<<<<<<<<<<<
- *                 raise ValueError( 'end out of range (%i)' % end )
- * 
- */
-      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
-      if (__pyx_t_7) {
-        __Pyx_AddTraceback("pysam.csamtools.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_GOTREF(__pyx_t_1);
-
-        /* "pysam/csamtools.pyx":978
- *                 rend = end
- *             except OverflowError:
- *                 raise ValueError( 'end out of range (%i)' % end )             # <<<<<<<<<<<<<<
- * 
- *         if region:
- */
-        __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), __pyx_v_end); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_10));
-        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
-        __Pyx_GOTREF(__pyx_t_11);
-        PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_10));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
-        __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
-        __Pyx_Raise(__pyx_t_10, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        goto __pyx_L16_exception_handled;
-      }
-      __pyx_L17_except_error:;
-      __Pyx_XGIVEREF(__pyx_t_5);
-      __Pyx_XGIVEREF(__pyx_t_4);
-      __Pyx_XGIVEREF(__pyx_t_3);
-      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
-      goto __pyx_L1_error;
-      __pyx_L16_exception_handled:;
-      __Pyx_XGIVEREF(__pyx_t_5);
-      __Pyx_XGIVEREF(__pyx_t_4);
-      __Pyx_XGIVEREF(__pyx_t_3);
-      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
-      __pyx_L22_try_end:;
-    }
-    goto __pyx_L14;
-  }
-  __pyx_L14:;
-
-  /* "pysam/csamtools.pyx":980
- *                 raise ValueError( 'end out of range (%i)' % end )
- * 
- *         if region:             # <<<<<<<<<<<<<<
- *             region = _force_str(region)
- *             parts = re.split( "[:-]", region )
- */
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":981
- * 
- *         if region:
- *             region = _force_str(region)             # <<<<<<<<<<<<<<
- *             parts = re.split( "[:-]", region )
- *             reference = parts[0]
- */
-    __pyx_t_1 = __pyx_f_5pysam_9csamtools__force_str(__pyx_v_region); 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_DECREF(__pyx_v_region);
-    __pyx_v_region = __pyx_t_1;
-    __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":982
- *         if region:
- *             region = _force_str(region)
- *             parts = re.split( "[:-]", region )             # <<<<<<<<<<<<<<
- *             reference = parts[0]
- *             if len(parts) >= 2: rstart = int(parts[1]) - 1
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); 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_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __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 = 982; __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_INCREF(__pyx_v_region);
-    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_region);
-    __Pyx_GIVEREF(__pyx_v_region);
-    __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 = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __pyx_v_parts = __pyx_t_9;
-    __pyx_t_9 = 0;
-
-    /* "pysam/csamtools.pyx":983
- *             region = _force_str(region)
- *             parts = re.split( "[:-]", region )
- *             reference = parts[0]             # <<<<<<<<<<<<<<
- *             if len(parts) >= 2: rstart = int(parts[1]) - 1
- *             if len(parts) >= 3: rend = int(parts[2])
- */
-    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_v_reference);
-    __pyx_v_reference = __pyx_t_9;
-    __pyx_t_9 = 0;
-
-    /* "pysam/csamtools.pyx":984
- *             parts = re.split( "[:-]", region )
- *             reference = parts[0]
- *             if len(parts) >= 2: rstart = int(parts[1]) - 1             # <<<<<<<<<<<<<<
- *             if len(parts) >= 3: rend = int(parts[2])
- * 
- */
-    __pyx_t_12 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_2 = (__pyx_t_12 >= 2);
-    if (__pyx_t_2) {
-      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_1 = PyTuple_New(1); 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);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
-      __Pyx_GIVEREF(__pyx_t_9);
-      __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      __pyx_t_1 = PyNumber_Subtract(__pyx_t_9, __pyx_int_1); 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);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_t_1); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_v_rstart = __pyx_t_6;
-      goto __pyx_L26;
-    }
-    __pyx_L26:;
-
-    /* "pysam/csamtools.pyx":985
- *             reference = parts[0]
- *             if len(parts) >= 2: rstart = int(parts[1]) - 1
- *             if len(parts) >= 3: rend = int(parts[2])             # <<<<<<<<<<<<<<
- * 
- *         if not reference: return 0, 0, 0, 0
- */
-    __pyx_t_12 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_2 = (__pyx_t_12 >= 3);
-    if (__pyx_t_2) {
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_parts, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
-      __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-      __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_t_1); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_v_rend = __pyx_t_6;
-      goto __pyx_L27;
-    }
-    __pyx_L27:;
-    goto __pyx_L25;
-  }
-  __pyx_L25:;
-
-  /* "pysam/csamtools.pyx":987
- *             if len(parts) >= 3: rend = int(parts[2])
- * 
- *         if not reference: return 0, 0, 0, 0             # <<<<<<<<<<<<<<
- * 
- *         rtid = self.gettid( reference )
- */
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_13 = (!__pyx_t_2);
-  if (__pyx_t_13) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(((PyObject *)__pyx_k_tuple_52));
-    __pyx_r = ((PyObject *)__pyx_k_tuple_52);
-    goto __pyx_L0;
-    goto __pyx_L28;
-  }
-  __pyx_L28:;
-
-  /* "pysam/csamtools.pyx":989
- *         if not reference: return 0, 0, 0, 0
- * 
- *         rtid = self.gettid( reference )             # <<<<<<<<<<<<<<
- *         if rtid < 0: raise ValueError( "invalid reference `%s`" % reference )
- *         if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__gettid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_INCREF(__pyx_v_reference);
-  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_reference);
-  __Pyx_GIVEREF(__pyx_v_reference);
-  __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __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_9)); __pyx_t_9 = 0;
-  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __pyx_v_rtid = __pyx_t_7;
-
-  /* "pysam/csamtools.pyx":990
- * 
- *         rtid = self.gettid( reference )
- *         if rtid < 0: raise ValueError( "invalid reference `%s`" % reference )             # <<<<<<<<<<<<<<
- *         if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )
- *         if not 0 <= rstart < max_pos: raise ValueError( 'start out of range (%i)' % rstart )
- */
-  __pyx_t_13 = (__pyx_v_rtid < 0);
-  if (__pyx_t_13) {
-    __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_53), __pyx_v_reference); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __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 = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
-    __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L29;
-  }
-  __pyx_L29:;
-
-  /* "pysam/csamtools.pyx":991
- *         rtid = self.gettid( reference )
- *         if rtid < 0: raise ValueError( "invalid reference `%s`" % reference )
- *         if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )             # <<<<<<<<<<<<<<
- *         if not 0 <= rstart < max_pos: raise ValueError( 'start out of range (%i)' % rstart )
- *         if not 0 <= rend <= max_pos: raise ValueError( 'end out of range (%i)' % rend )
- */
-  __pyx_t_13 = (__pyx_v_rstart > __pyx_v_rend);
-  if (__pyx_t_13) {
-    __pyx_t_8 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_9 = PyLong_FromLongLong(__pyx_v_rend); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __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 = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__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_9);
-    __Pyx_GIVEREF(__pyx_t_9);
-    __pyx_t_8 = 0;
-    __pyx_t_9 = 0;
-    __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_54), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-    __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 = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__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(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L30;
-  }
-  __pyx_L30:;
-
-  /* "pysam/csamtools.pyx":992
- *         if rtid < 0: raise ValueError( "invalid reference `%s`" % reference )
- *         if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )
- *         if not 0 <= rstart < max_pos: raise ValueError( 'start out of range (%i)' % rstart )             # <<<<<<<<<<<<<<
- *         if not 0 <= rend <= max_pos: raise ValueError( 'end out of range (%i)' % rend )
- * 
- */
-  __pyx_t_13 = (0 <= __pyx_v_rstart);
-  if (__pyx_t_13) {
-    __pyx_t_13 = (__pyx_v_rstart < __pyx_v_5pysam_9csamtools_max_pos);
-  }
-  __pyx_t_2 = (!__pyx_t_13);
-  if (__pyx_t_2) {
-    __pyx_t_9 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __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 = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_1));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L31;
-  }
-  __pyx_L31:;
-
-  /* "pysam/csamtools.pyx":993
- *         if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )
- *         if not 0 <= rstart < max_pos: raise ValueError( 'start out of range (%i)' % rstart )
- *         if not 0 <= rend <= max_pos: raise ValueError( 'end out of range (%i)' % rend )             # <<<<<<<<<<<<<<
- * 
- *         return 1, rtid, rstart, rend
- */
-  __pyx_t_2 = (0 <= __pyx_v_rend);
-  if (__pyx_t_2) {
-    __pyx_t_2 = (__pyx_v_rend <= __pyx_v_5pysam_9csamtools_max_pos);
-  }
-  __pyx_t_13 = (!__pyx_t_2);
-  if (__pyx_t_13) {
-    __pyx_t_1 = PyLong_FromLongLong(__pyx_v_rend); 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);
-    __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-    __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 = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__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(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L32;
-  }
-  __pyx_L32:;
-
-  /* "pysam/csamtools.pyx":995
- *         if not 0 <= rend <= max_pos: raise ValueError( 'end out of range (%i)' % rend )
- * 
- *         return 1, rtid, rstart, rend             # <<<<<<<<<<<<<<
- * 
- *     def reset( self ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_9 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_1 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_8 = PyLong_FromLongLong(__pyx_v_rend); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-  __Pyx_INCREF(__pyx_int_1);
-  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_int_1);
-  __Pyx_GIVEREF(__pyx_int_1);
-  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
-  __Pyx_GIVEREF(__pyx_t_9);
-  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_8);
-  __Pyx_GIVEREF(__pyx_t_8);
-  __pyx_t_9 = 0;
-  __pyx_t_1 = 0;
-  __pyx_t_8 = 0;
-  __pyx_r = ((PyObject *)__pyx_t_10);
-  __pyx_t_10 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_parts);
-  __Pyx_XDECREF(__pyx_v_reference);
-  __Pyx_XDECREF(__pyx_v_region);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_14reset[] = "Samfile.reset(self)\nreset file position to beginning of read section.";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_14reset(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":997
- *         return 1, rtid, rstart, rend
- * 
- *     def reset( self ):             # <<<<<<<<<<<<<<
- *         '''reset file position to beginning of read section.'''
- *         return self.seek( self.start_offset, 0 )
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_14reset(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("reset", 0);
-  __Pyx_TraceCall("reset", __pyx_f[0], 997);
-
-  /* "pysam/csamtools.pyx":999
- *     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):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seek); 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_t_2 = __Pyx_PyInt_to_py_int64_t(__pyx_v_self->start_offset); 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_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_int_0);
-  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
-  __Pyx_GIVEREF(__pyx_int_0);
-  __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_17seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_16seek[] = "Samfile.seek(self, uint64_t offset, int where=0)\n\n        move file pointer to position *offset*, see :meth:`pysam.Samfile.tell`.\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_17seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  uint64_t __pyx_v_offset;
-  int __pyx_v_where;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("seek (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__offset,&__pyx_n_s__where,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__where);
-          if (value) { values[1] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_offset = __Pyx_PyInt_from_py_uint64_t(values[0]); if (unlikely((__pyx_v_offset == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    if (values[1]) {
-      __pyx_v_where = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_where == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-      __pyx_v_where = ((int)0);
-    }
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("seek", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_16seek(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_offset, __pyx_v_where);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1001
- *         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`.
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_16seek(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, uint64_t __pyx_v_offset, int __pyx_v_where) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("seek", 0);
-  __Pyx_TraceCall("seek", __pyx_f[0], 1001);
-
-  /* "pysam/csamtools.pyx":1006
- *         '''
- * 
- *         if not self._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- *         if not self.isbam:
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); 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 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), 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_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1007
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         if not self.isbam:
- *             raise NotImplementedError("seek only available in bam files")
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), 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_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1008
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )
- *         if not self.isbam:             # <<<<<<<<<<<<<<
- *             raise NotImplementedError("seek only available in bam files")
- *         if self.isstream:
- */
-  __pyx_t_4 = (!__pyx_v_self->isbam);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1009
- *             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")
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1010
- *         if not self.isbam:
- *             raise NotImplementedError("seek only available in bam files")
- *         if self.isstream:             # <<<<<<<<<<<<<<
- *             raise OSError("seek no available in streams")
- * 
- */
-  if (__pyx_v_self->isstream) {
-
-    /* "pysam/csamtools.pyx":1011
- *             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 )
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_OSError, ((PyObject *)__pyx_k_tuple_59), 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_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":1013
- *             raise OSError("seek no available in streams")
- * 
- *         return bam_seek( self.samfile.x.bam, offset, where )             # <<<<<<<<<<<<<<
- * 
- *     def tell( self ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __Pyx_PyInt_to_py_int64_t(bam_seek(__pyx_v_self->samfile->x.bam, __pyx_v_offset, __pyx_v_where)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_19tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_18tell[] = "Samfile.tell(self)\n\n        return current file position\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_19tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("tell (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_18tell(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1015
- *         return bam_seek( self.samfile.x.bam, offset, where )
- * 
- *     def tell( self ):             # <<<<<<<<<<<<<<
- *         '''
- *         return current file position
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_18tell(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("tell", 0);
-  __Pyx_TraceCall("tell", __pyx_f[0], 1015);
-
-  /* "pysam/csamtools.pyx":1019
- *         return current file position
- *         '''
- *         if not self._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- *         if not self.isbam:
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); 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_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); 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_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 = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1020
- *         '''
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         if not self.isbam:
- *             raise NotImplementedError("seek only available in bam files")
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_60), NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1021
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )
- *         if not self.isbam:             # <<<<<<<<<<<<<<
- *             raise NotImplementedError("seek only available in bam files")
- * 
- */
-  __pyx_t_4 = (!__pyx_v_self->isbam);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1022
- *             raise ValueError( "I/O operation on closed file" )
- *         if not self.isbam:
- *             raise NotImplementedError("seek only available in bam files")             # <<<<<<<<<<<<<<
- * 
- *         return bam_tell( self.samfile.x.bam )
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_61), 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_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1024
- *             raise NotImplementedError("seek only available in bam files")
- * 
- *         return bam_tell( self.samfile.x.bam )             # <<<<<<<<<<<<<<
- * 
- *     def fetch( self,
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __Pyx_PyInt_to_py_int64_t(bam_tell(__pyx_v_self->samfile->x.bam)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.tell", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_21fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_20fetch[] = "Samfile.fetch(self, reference=None, start=None, end=None, region=None, callback=None, until_eof=False)\n\n        fetch aligned reads in a :term:`region` using 0-based indexing. The region is specified by\n        :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can\n        be supplied.\n\n        Without *reference* or *region* all mapped reads will be fetched. The reads will be returned\ [...]
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_21fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_reference = 0;
-  PyObject *__pyx_v_start = 0;
-  PyObject *__pyx_v_end = 0;
-  PyObject *__pyx_v_region = 0;
-  PyObject *__pyx_v_callback = 0;
-  PyObject *__pyx_v_until_eof = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,&__pyx_n_s__callback,&__pyx_n_s__until_eof,0};
-    PyObject* values[6] = {0,0,0,0,0,0};
-
-    /* "pysam/csamtools.pyx":1027
- * 
- *     def fetch( self,
- *                reference = None,             # <<<<<<<<<<<<<<
- *                start = None,
- *                end = None,
- */
-    values[0] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1028
- *     def fetch( self,
- *                reference = None,
- *                start = None,             # <<<<<<<<<<<<<<
- *                end = None,
- *                region = None,
- */
-    values[1] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1029
- *                reference = None,
- *                start = None,
- *                end = None,             # <<<<<<<<<<<<<<
- *                region = None,
- *                callback = None,
- */
-    values[2] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1030
- *                start = None,
- *                end = None,
- *                region = None,             # <<<<<<<<<<<<<<
- *                callback = None,
- *                until_eof = False ):
- */
-    values[3] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1031
- *                end = None,
- *                region = None,
- *                callback = None,             # <<<<<<<<<<<<<<
- *                until_eof = False ):
- *         '''
- */
-    values[4] = ((PyObject *)Py_None);
-    values[5] = __pyx_k_62;
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
-          if (value) { values[0] = value; kw_args--; }
-        }
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
-          if (value) { values[2] = value; kw_args--; }
-        }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
-          if (value) { values[3] = value; kw_args--; }
-        }
-        case  4:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__callback);
-          if (value) { values[4] = value; kw_args--; }
-        }
-        case  5:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__until_eof);
-          if (value) { values[5] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      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);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_reference = values[0];
-    __pyx_v_start = values[1];
-    __pyx_v_end = values[2];
-    __pyx_v_region = values[3];
-    __pyx_v_callback = values[4];
-    __pyx_v_until_eof = values[5];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_20fetch(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_callback, __pyx_v_until_eof);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1026
- *         return bam_tell( self.samfile.x.bam )
- * 
- *     def fetch( self,             # <<<<<<<<<<<<<<
- *                reference = None,
- *                start = None,
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_20fetch(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_callback, PyObject *__pyx_v_until_eof) {
-  int __pyx_v_rtid;
-  int __pyx_v_rstart;
-  int __pyx_v_rend;
-  int __pyx_v_has_coord;
-  int __pyx_v_reopen;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *(*__pyx_t_9)(PyObject *);
-  int __pyx_t_10;
-  int __pyx_t_11;
-  int __pyx_t_12;
-  int __pyx_t_13;
-  int __pyx_t_14;
-  int __pyx_t_15;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("fetch", 0);
-  __Pyx_TraceCall("fetch", __pyx_f[0], 1026);
-
-  /* "pysam/csamtools.pyx":1056
- *         cdef int rtid, rstart, rend, has_coord
- * 
- *         if not self._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __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 = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1057
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1059
- *             raise ValueError( "I/O operation on closed file" )
- * 
- *         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )             # <<<<<<<<<<<<<<
- * 
- *         if self.isstream: reopen = False
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __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 = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_reference);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
-  __Pyx_GIVEREF(__pyx_v_reference);
-  __Pyx_INCREF(__pyx_v_start);
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
-  __Pyx_GIVEREF(__pyx_v_start);
-  __Pyx_INCREF(__pyx_v_end);
-  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
-  __Pyx_GIVEREF(__pyx_v_end);
-  __Pyx_INCREF(__pyx_v_region);
-  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
-  __Pyx_GIVEREF(__pyx_v_region);
-  __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 = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
-    PyObject* sequence = __pyx_t_5;
-    #if CYTHON_COMPILING_IN_CPYTHON
-    Py_ssize_t size = Py_SIZE(sequence);
-    #else
-    Py_ssize_t size = PySequence_Size(sequence);
-    #endif
-    if (unlikely(size != 4)) {
-      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
-      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely(PyTuple_CheckExact(sequence))) {
-      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
-      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
-      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
-      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
-    } else {
-      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
-      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
-      __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
-      __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
-    }
-    __Pyx_INCREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_t_2);
-    __Pyx_INCREF(__pyx_t_6);
-    __Pyx_INCREF(__pyx_t_7);
-    #else
-    Py_ssize_t i;
-    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
-    for (i=0; i < 4; i++) {
-      PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(item);
-      *(temps[i]) = item;
-    }
-    #endif
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  } else
-  {
-    Py_ssize_t index = -1;
-    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
-    __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
-    for (index=0; index < 4; index++) {
-      PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
-      __Pyx_GOTREF(item);
-      *(temps[index]) = item;
-    }
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_9 = NULL;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    goto __pyx_L5_unpacking_done;
-    __pyx_L4_unpacking_failed:;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_9 = NULL;
-    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_L5_unpacking_done:;
-  }
-  __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_v_has_coord = __pyx_t_10;
-  __pyx_v_rtid = __pyx_t_11;
-  __pyx_v_rstart = __pyx_t_12;
-  __pyx_v_rend = __pyx_t_13;
-
-  /* "pysam/csamtools.pyx":1061
- *         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
- * 
- *         if self.isstream: reopen = False             # <<<<<<<<<<<<<<
- *         else: reopen = True
- * 
- */
-  if (__pyx_v_self->isstream) {
-    __pyx_v_reopen = 0;
-    goto __pyx_L6;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1062
- * 
- *         if self.isstream: reopen = False
- *         else: reopen = True             # <<<<<<<<<<<<<<
- * 
- *         if self.isbam:
- */
-    __pyx_v_reopen = 1;
-  }
-  __pyx_L6:;
-
-  /* "pysam/csamtools.pyx":1064
- *         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" )
- */
-  if (__pyx_v_self->isbam) {
-
-    /* "pysam/csamtools.pyx":1065
- * 
- *         if self.isbam:
- *             if not until_eof and not self._hasIndex() and not self.isremote:             # <<<<<<<<<<<<<<
- *                 raise ValueError( "fetch called on bamfile without index" )
- * 
- */
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = (!__pyx_t_4);
-    if (__pyx_t_3) {
-      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __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 = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_14 = (!__pyx_t_4);
-      if (__pyx_t_14) {
-        __pyx_t_4 = (!__pyx_v_self->isremote);
-        __pyx_t_15 = __pyx_t_4;
-      } else {
-        __pyx_t_15 = __pyx_t_14;
-      }
-      __pyx_t_14 = __pyx_t_15;
-    } else {
-      __pyx_t_14 = __pyx_t_3;
-    }
-    if (__pyx_t_14) {
-
-      /* "pysam/csamtools.pyx":1066
- *         if self.isbam:
- *             if not until_eof and not self._hasIndex() and not self.isremote:
- *                 raise ValueError( "fetch called on bamfile without index" )             # <<<<<<<<<<<<<<
- * 
- *             if callback:
- */
-      __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L8;
-    }
-    __pyx_L8:;
-
-    /* "pysam/csamtools.pyx":1068
- *                 raise ValueError( "fetch called on bamfile without index" )
- * 
- *             if callback:             # <<<<<<<<<<<<<<
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
- *                 if not self._hasIndex(): raise ValueError( "no index available for fetch" )
- */
-    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_14) {
-
-      /* "pysam/csamtools.pyx":1069
- * 
- *             if callback:
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )             # <<<<<<<<<<<<<<
- *                 if not self._hasIndex(): raise ValueError( "no index available for fetch" )
- *                 return bam_fetch(self.samfile.x.bam,
- */
-      __pyx_t_14 = (!__pyx_v_has_coord);
-      if (__pyx_t_14) {
-        __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L10;
-      }
-      __pyx_L10:;
-
-      /* "pysam/csamtools.pyx":1070
- *             if callback:
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
- *                 if not self._hasIndex(): raise ValueError( "no index available for fetch" )             # <<<<<<<<<<<<<<
- *                 return bam_fetch(self.samfile.x.bam,
- *                                  self.index,
- */
-      __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); 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);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) {__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_t_3 = (!__pyx_t_14);
-      if (__pyx_t_3) {
-        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_69), NULL); 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);
-        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L11;
-      }
-      __pyx_L11:;
-
-      /* "pysam/csamtools.pyx":1071
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
- *                 if not self._hasIndex(): raise ValueError( "no index available for fetch" )
- *                 return bam_fetch(self.samfile.x.bam,             # <<<<<<<<<<<<<<
- *                                  self.index,
- *                                  rtid,
- */
-      __Pyx_XDECREF(__pyx_r);
-
-      /* "pysam/csamtools.pyx":1077
- *                                  rend,
- *                                  <void*>callback,
- *                                  fetch_callback )             # <<<<<<<<<<<<<<
- *             else:
- *                 if has_coord:
- */
-      __pyx_t_5 = PyInt_FromLong(bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, ((void *)__pyx_v_callback), __pyx_f_5pysam_9csamtools_fetch_callback)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_r = __pyx_t_5;
-      __pyx_t_5 = 0;
-      goto __pyx_L0;
-      goto __pyx_L9;
-    }
-    /*else*/ {
-
-      /* "pysam/csamtools.pyx":1079
- *                                  fetch_callback )
- *             else:
- *                 if has_coord:             # <<<<<<<<<<<<<<
- *                     return IteratorRowRegion( self, rtid, rstart, rend,
- *                                               reopen=reopen )
- */
-      if (__pyx_v_has_coord) {
-
-        /* "pysam/csamtools.pyx":1080
- *             else:
- *                 if has_coord:
- *                     return IteratorRowRegion( self, rtid, rstart, rend,             # <<<<<<<<<<<<<<
- *                                               reopen=reopen )
- *                 else:
- */
-        __Pyx_XDECREF(__pyx_r);
-        __pyx_t_5 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_7 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_2 = PyTuple_New(4); 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_INCREF(((PyObject *)__pyx_v_self));
-        PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
-        __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
-        __Pyx_GIVEREF(__pyx_t_5);
-        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_6);
-        __Pyx_GIVEREF(__pyx_t_6);
-        __pyx_t_5 = 0;
-        __pyx_t_7 = 0;
-        __pyx_t_6 = 0;
-        __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-
-        /* "pysam/csamtools.pyx":1081
- *                 if has_coord:
- *                     return IteratorRowRegion( self, rtid, rstart, rend,
- *                                               reopen=reopen )             # <<<<<<<<<<<<<<
- *                 else:
- *                     if until_eof:
- */
-        __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__reopen), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-        __pyx_r = __pyx_t_7;
-        __pyx_t_7 = 0;
-        goto __pyx_L0;
-        goto __pyx_L12;
-      }
-      /*else*/ {
-
-        /* "pysam/csamtools.pyx":1083
- *                                               reopen=reopen )
- *                 else:
- *                     if until_eof:             # <<<<<<<<<<<<<<
- *                         return IteratorRowAll( self, reopen=reopen )
- *                     else:
- */
-        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_3) {
-
-          /* "pysam/csamtools.pyx":1084
- *                 else:
- *                     if until_eof:
- *                         return IteratorRowAll( self, reopen=reopen )             # <<<<<<<<<<<<<<
- *                     else:
- *                         # AH: check - reason why no reopen for AllRefs?
- */
-          __Pyx_XDECREF(__pyx_r);
-          __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __Pyx_INCREF(((PyObject *)__pyx_v_self));
-          PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));
-          __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-          __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-          __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__reopen), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAll)), ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-          __pyx_r = __pyx_t_2;
-          __pyx_t_2 = 0;
-          goto __pyx_L0;
-          goto __pyx_L13;
-        }
-        /*else*/ {
-
-          /* "pysam/csamtools.pyx":1087
- *                     else:
- *                         # AH: check - reason why no reopen for AllRefs?
- *                         return IteratorRowAllRefs(self ) # , reopen=reopen )             # <<<<<<<<<<<<<<
- *         else:
- *             if has_coord:
- */
-          __Pyx_XDECREF(__pyx_r);
-          __pyx_t_2 = PyTuple_New(1); 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_INCREF(((PyObject *)__pyx_v_self));
-          PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
-          __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-          __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAllRefs)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-          __pyx_r = __pyx_t_6;
-          __pyx_t_6 = 0;
-          goto __pyx_L0;
-        }
-        __pyx_L13:;
-      }
-      __pyx_L12:;
-    }
-    __pyx_L9:;
-    goto __pyx_L7;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1089
- *                         return IteratorRowAllRefs(self ) # , reopen=reopen )
- *         else:
- *             if has_coord:             # <<<<<<<<<<<<<<
- *                 raise ValueError ("fetching by region is not available for sam files" )
- * 
- */
-    if (__pyx_v_has_coord) {
-
-      /* "pysam/csamtools.pyx":1090
- *         else:
- *             if has_coord:
- *                 raise ValueError ("fetching by region is not available for sam files" )             # <<<<<<<<<<<<<<
- * 
- *             if callback:
- */
-      __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L14;
-    }
-    __pyx_L14:;
-
-    /* "pysam/csamtools.pyx":1092
- *                 raise ValueError ("fetching by region is not available for sam files" )
- * 
- *             if callback:             # <<<<<<<<<<<<<<
- *                 raise NotImplementedError( "callback not implemented yet" )
- * 
- */
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1093
- * 
- *             if callback:
- *                 raise NotImplementedError( "callback not implemented yet" )             # <<<<<<<<<<<<<<
- * 
- *             if self.samfile.header == NULL:
- */
-      __pyx_t_6 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L15;
-    }
-    __pyx_L15:;
-
-    /* "pysam/csamtools.pyx":1095
- *                 raise NotImplementedError( "callback not implemented yet" )
- * 
- *             if self.samfile.header == NULL:             # <<<<<<<<<<<<<<
- *                 raise ValueError( "fetch called for samfile without header")
- * 
- */
-    __pyx_t_3 = (__pyx_v_self->samfile->header == NULL);
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1096
- * 
- *             if self.samfile.header == NULL:
- *                 raise ValueError( "fetch called for samfile without header")             # <<<<<<<<<<<<<<
- * 
- *             # check if targets are defined
- */
-      __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L16;
-    }
-    __pyx_L16:;
-
-    /* "pysam/csamtools.pyx":1100
- *             # check if targets are defined
- *             # give warning, sam_read1 segfaults
- *             if self.samfile.header.n_targets == 0:             # <<<<<<<<<<<<<<
- *                 warnings.warn( "fetch called for samfile without header")
- * 
- */
-    __pyx_t_3 = (__pyx_v_self->samfile->header->n_targets == 0);
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1101
- *             # give warning, sam_read1 segfaults
- *             if self.samfile.header.n_targets == 0:
- *                 warnings.warn( "fetch called for samfile without header")             # <<<<<<<<<<<<<<
- * 
- *             return IteratorRowAll( self, reopen=reopen )
- */
-      __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__warn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      goto __pyx_L17;
-    }
-    __pyx_L17:;
-
-    /* "pysam/csamtools.pyx":1103
- *                 warnings.warn( "fetch called for samfile without header")
- * 
- *             return IteratorRowAll( self, reopen=reopen )             # <<<<<<<<<<<<<<
- * 
- *     def mate( self,
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_INCREF(((PyObject *)__pyx_v_self));
-    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
-    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAll)), ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __pyx_r = __pyx_t_7;
-    __pyx_t_7 = 0;
-    goto __pyx_L0;
-  }
-  __pyx_L7:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_23mate(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_22mate[] = "Samfile.mate(self, AlignedRead read)\nreturn the mate of :class:`AlignedRead` *read*.\n\n        Throws a ValueError if read is unpaired or the mate\n        is unmapped.\n\n        .. note::\n            Calling this method will change the file position.\n            This might interfere with any iterators that have\n            not re-opened the file.\n\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_23mate(PyObject *__pyx_v_self, PyObject *__pyx_v_read) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("mate (wrapper)", 0);
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_22mate(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_read));
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1105
- *             return IteratorRowAll( self, reopen=reopen )
- * 
- *     def mate( self,             # <<<<<<<<<<<<<<
- *               AlignedRead read ):
- *         '''return the mate of :class:`AlignedRead` *read*.
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_22mate(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_read) {
-  uint32_t __pyx_v_flag;
-  __pyx_t_5pysam_9csamtools_MateData __pyx_v_mate_data;
-  int __pyx_v_x;
-  struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_dest = 0;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  uint32_t __pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  bam1_t *__pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("mate", 0);
-  __Pyx_TraceCall("mate", __pyx_f[0], 1105);
-
-  /* "pysam/csamtools.pyx":1118
- * 
- *         '''
- *         cdef uint32_t flag = read._delegate.core.flag             # <<<<<<<<<<<<<<
- * 
- *         if flag & BAM_FPAIRED == 0:
- */
-  __pyx_t_1 = __pyx_v_read->_delegate->core.flag;
-  __pyx_v_flag = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":1120
- *         cdef uint32_t flag = read._delegate.core.flag
- * 
- *         if flag & BAM_FPAIRED == 0:             # <<<<<<<<<<<<<<
- *             raise ValueError( "read %s: is unpaired" % (read.qname))
- *         if flag & BAM_FMUNMAP != 0:
- */
-  __pyx_t_2 = ((__pyx_v_flag & 1) == 0);
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":1121
- * 
- *         if flag & BAM_FPAIRED == 0:
- *             raise ValueError( "read %s: is unpaired" % (read.qname))             # <<<<<<<<<<<<<<
- *         if flag & BAM_FMUNMAP != 0:
- *             raise ValueError( "mate %s: is unmapped" % (read.qname))
- */
-    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_read), __pyx_n_s__qname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_77), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __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 = 1121; __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_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1122
- *         if flag & BAM_FPAIRED == 0:
- *             raise ValueError( "read %s: is unpaired" % (read.qname))
- *         if flag & BAM_FMUNMAP != 0:             # <<<<<<<<<<<<<<
- *             raise ValueError( "mate %s: is unmapped" % (read.qname))
- * 
- */
-  __pyx_t_2 = ((__pyx_v_flag & 8) != 0);
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":1123
- *             raise ValueError( "read %s: is unpaired" % (read.qname))
- *         if flag & BAM_FMUNMAP != 0:
- *             raise ValueError( "mate %s: is unmapped" % (read.qname))             # <<<<<<<<<<<<<<
- * 
- *         cdef MateData mate_data
- */
-    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_read), __pyx_n_s__qname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_78), __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __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 = 1123; __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(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1127
- *         cdef MateData mate_data
- * 
- *         mate_data.name = <char *>bam1_qname(read._delegate)             # <<<<<<<<<<<<<<
- *         mate_data.mate = NULL
- *         # xor flags to get the other mate
- */
-  __pyx_v_mate_data.name = ((char *)bam1_qname(__pyx_v_read->_delegate));
-
-  /* "pysam/csamtools.pyx":1128
- * 
- *         mate_data.name = <char *>bam1_qname(read._delegate)
- *         mate_data.mate = NULL             # <<<<<<<<<<<<<<
- *         # xor flags to get the other mate
- *         cdef int x = BAM_FREAD1 + BAM_FREAD2
- */
-  __pyx_v_mate_data.mate = NULL;
-
-  /* "pysam/csamtools.pyx":1130
- *         mate_data.mate = NULL
- *         # xor flags to get the other mate
- *         cdef int x = BAM_FREAD1 + BAM_FREAD2             # <<<<<<<<<<<<<<
- *         mate_data.flag = ( flag ^ x) & x
- * 
- */
-  __pyx_v_x = 192;
-
-  /* "pysam/csamtools.pyx":1131
- *         # xor flags to get the other mate
- *         cdef int x = BAM_FREAD1 + BAM_FREAD2
- *         mate_data.flag = ( flag ^ x) & x             # <<<<<<<<<<<<<<
- * 
- *         bam_fetch(self.samfile.x.bam,
- */
-  __pyx_v_mate_data.flag = ((__pyx_v_flag ^ __pyx_v_x) & __pyx_v_x);
-
-  /* "pysam/csamtools.pyx":1139
- *                   read._delegate.core.mpos + 1,
- *                   <void*>&mate_data,
- *                   mate_callback )             # <<<<<<<<<<<<<<
- * 
- *         if mate_data.mate == NULL:
- */
-  bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_read->_delegate->core.mtid, __pyx_v_read->_delegate->core.mpos, (__pyx_v_read->_delegate->core.mpos + 1), ((void *)(&__pyx_v_mate_data)), __pyx_f_5pysam_9csamtools_mate_callback);
-
-  /* "pysam/csamtools.pyx":1141
- *                   mate_callback )
- * 
- *         if mate_data.mate == NULL:             # <<<<<<<<<<<<<<
- *             raise ValueError( "mate not found" )
- * 
- */
-  __pyx_t_2 = (__pyx_v_mate_data.mate == NULL);
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":1142
- * 
- *         if mate_data.mate == NULL:
- *             raise ValueError( "mate not found" )             # <<<<<<<<<<<<<<
- * 
- *         cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
- */
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":1144
- *             raise ValueError( "mate not found" )
- * 
- *         cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)             # <<<<<<<<<<<<<<
- *         dest._delegate = mate_data.mate
- *         return dest
- */
-  __pyx_t_3 = __Pyx_tp_new(((PyObject*)__pyx_ptype_5pysam_9csamtools_AlignedRead)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5pysam_9csamtools_AlignedRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_dest = ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_t_3);
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":1145
- * 
- *         cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
- *         dest._delegate = mate_data.mate             # <<<<<<<<<<<<<<
- *         return dest
- * 
- */
-  __pyx_t_5 = __pyx_v_mate_data.mate;
-  __pyx_v_dest->_delegate = __pyx_t_5;
-
-  /* "pysam/csamtools.pyx":1146
- *         cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
- *         dest._delegate = mate_data.mate
- *         return dest             # <<<<<<<<<<<<<<
- * 
- *     def count( self,
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_dest));
-  __pyx_r = ((PyObject *)__pyx_v_dest);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.mate", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_dest);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_25count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_24count[] = "Samfile.count(self, reference=None, start=None, end=None, region=None, until_eof=False)\n*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)*\n\n        count  reads :term:`region` using 0-based indexing. The region is specified by\n        :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can be supplied.\n\n        Note that a :term:`TAM` file d [...]
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_25count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_reference = 0;
-  PyObject *__pyx_v_start = 0;
-  PyObject *__pyx_v_end = 0;
-  PyObject *__pyx_v_region = 0;
-  PyObject *__pyx_v_until_eof = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("count (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,&__pyx_n_s__until_eof,0};
-    PyObject* values[5] = {0,0,0,0,0};
-
-    /* "pysam/csamtools.pyx":1149
- * 
- *     def count( self,
- *                reference = None,             # <<<<<<<<<<<<<<
- *                start = None,
- *                end = None,
- */
-    values[0] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1150
- *     def count( self,
- *                reference = None,
- *                start = None,             # <<<<<<<<<<<<<<
- *                end = None,
- *                region = None,
- */
-    values[1] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1151
- *                reference = None,
- *                start = None,
- *                end = None,             # <<<<<<<<<<<<<<
- *                region = None,
- *                until_eof = False ):
- */
-    values[2] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1152
- *                start = None,
- *                end = None,
- *                region = None,             # <<<<<<<<<<<<<<
- *                until_eof = False ):
- *         '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)*
- */
-    values[3] = ((PyObject *)Py_None);
-    values[4] = __pyx_k_81;
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
-          if (value) { values[0] = value; kw_args--; }
-        }
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
-          if (value) { values[2] = value; kw_args--; }
-        }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
-          if (value) { values[3] = value; kw_args--; }
-        }
-        case  4:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__until_eof);
-          if (value) { values[4] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_reference = values[0];
-    __pyx_v_start = values[1];
-    __pyx_v_end = values[2];
-    __pyx_v_region = values[3];
-    __pyx_v_until_eof = values[4];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("count", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_24count(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_until_eof);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1148
- *         return dest
- * 
- *     def count( self,             # <<<<<<<<<<<<<<
- *                reference = None,
- *                start = None,
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_24count(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_until_eof) {
-  int __pyx_v_rtid;
-  int __pyx_v_rstart;
-  int __pyx_v_rend;
-  int __pyx_v_counter;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *(*__pyx_t_9)(PyObject *);
-  int __pyx_t_10;
-  int __pyx_t_11;
-  int __pyx_t_12;
-  int __pyx_t_13;
-  int __pyx_t_14;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("count", 0);
-  __Pyx_TraceCall("count", __pyx_f[0], 1148);
-  __Pyx_INCREF(__pyx_v_region);
-
-  /* "pysam/csamtools.pyx":1166
- *         cdef int rend
- * 
- *         if not self._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __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 = 1166; __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 = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1167
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         region, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_82), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1169
- *             raise ValueError( "I/O operation on closed file" )
- * 
- *         region, rtid, rstart, rend = self._parseRegion( reference, start, end, region )             # <<<<<<<<<<<<<<
- * 
- *         cdef int counter
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __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 = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_reference);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
-  __Pyx_GIVEREF(__pyx_v_reference);
-  __Pyx_INCREF(__pyx_v_start);
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
-  __Pyx_GIVEREF(__pyx_v_start);
-  __Pyx_INCREF(__pyx_v_end);
-  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
-  __Pyx_GIVEREF(__pyx_v_end);
-  __Pyx_INCREF(__pyx_v_region);
-  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
-  __Pyx_GIVEREF(__pyx_v_region);
-  __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 = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
-    PyObject* sequence = __pyx_t_5;
-    #if CYTHON_COMPILING_IN_CPYTHON
-    Py_ssize_t size = Py_SIZE(sequence);
-    #else
-    Py_ssize_t size = PySequence_Size(sequence);
-    #endif
-    if (unlikely(size != 4)) {
-      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
-      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely(PyTuple_CheckExact(sequence))) {
-      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
-      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
-      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
-      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
-    } else {
-      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
-      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
-      __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
-      __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
-    }
-    __Pyx_INCREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_t_2);
-    __Pyx_INCREF(__pyx_t_6);
-    __Pyx_INCREF(__pyx_t_7);
-    #else
-    Py_ssize_t i;
-    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
-    for (i=0; i < 4; i++) {
-      PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(item);
-      *(temps[i]) = item;
-    }
-    #endif
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  } else
-  {
-    Py_ssize_t index = -1;
-    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
-    __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
-    for (index=0; index < 4; index++) {
-      PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
-      __Pyx_GOTREF(item);
-      *(temps[index]) = item;
-    }
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_9 = NULL;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    goto __pyx_L5_unpacking_done;
-    __pyx_L4_unpacking_failed:;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_9 = NULL;
-    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_L5_unpacking_done:;
-  }
-  __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __Pyx_DECREF(__pyx_v_region);
-  __pyx_v_region = __pyx_t_1;
-  __pyx_t_1 = 0;
-  __pyx_v_rtid = __pyx_t_10;
-  __pyx_v_rstart = __pyx_t_11;
-  __pyx_v_rend = __pyx_t_12;
-
-  /* "pysam/csamtools.pyx":1172
- * 
- *         cdef int counter
- *         counter = 0;             # <<<<<<<<<<<<<<
- * 
- *         if self.isbam:
- */
-  __pyx_v_counter = 0;
-
-  /* "pysam/csamtools.pyx":1174
- *         counter = 0;
- * 
- *         if self.isbam:             # <<<<<<<<<<<<<<
- *             if not until_eof and not self._hasIndex() and not self.isremote:
- *                 raise ValueError( "fetch called on bamfile without index" )
- */
-  if (__pyx_v_self->isbam) {
-
-    /* "pysam/csamtools.pyx":1175
- * 
- *         if self.isbam:
- *             if not until_eof and not self._hasIndex() and not self.isremote:             # <<<<<<<<<<<<<<
- *                 raise ValueError( "fetch called on bamfile without index" )
- * 
- */
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = (!__pyx_t_4);
-    if (__pyx_t_3) {
-      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __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 = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_13 = (!__pyx_t_4);
-      if (__pyx_t_13) {
-        __pyx_t_4 = (!__pyx_v_self->isremote);
-        __pyx_t_14 = __pyx_t_4;
-      } else {
-        __pyx_t_14 = __pyx_t_13;
-      }
-      __pyx_t_13 = __pyx_t_14;
-    } else {
-      __pyx_t_13 = __pyx_t_3;
-    }
-    if (__pyx_t_13) {
-
-      /* "pysam/csamtools.pyx":1176
- *         if self.isbam:
- *             if not until_eof and not self._hasIndex() and not self.isremote:
- *                 raise ValueError( "fetch called on bamfile without index" )             # <<<<<<<<<<<<<<
- * 
- *             if not region:
- */
-      __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L7;
-    }
-    __pyx_L7:;
-
-    /* "pysam/csamtools.pyx":1178
- *                 raise ValueError( "fetch called on bamfile without index" )
- * 
- *             if not region:             # <<<<<<<<<<<<<<
- *                 raise ValueError( "counting functionality requires a region/reference" )
- *             if not self._hasIndex(): raise ValueError( "no index available for fetch" )
- */
-    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = (!__pyx_t_13);
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1179
- * 
- *             if not region:
- *                 raise ValueError( "counting functionality requires a region/reference" )             # <<<<<<<<<<<<<<
- *             if not self._hasIndex(): raise ValueError( "no index available for fetch" )
- *             bam_fetch(self.samfile.x.bam,
- */
-      __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L8;
-    }
-    __pyx_L8:;
-
-    /* "pysam/csamtools.pyx":1180
- *             if not region:
- *                 raise ValueError( "counting functionality requires a region/reference" )
- *             if not self._hasIndex(): raise ValueError( "no index available for fetch" )             # <<<<<<<<<<<<<<
- *             bam_fetch(self.samfile.x.bam,
- *                              self.index,
- */
-    __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_13 = (!__pyx_t_3);
-    if (__pyx_t_13) {
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L9;
-    }
-    __pyx_L9:;
-
-    /* "pysam/csamtools.pyx":1187
- *                              rend,
- *                              <void*>&counter,
- *                              count_callback )             # <<<<<<<<<<<<<<
- *             return counter
- *         else:
- */
-    bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, ((void *)(&__pyx_v_counter)), __pyx_f_5pysam_9csamtools_count_callback);
-
-    /* "pysam/csamtools.pyx":1188
- *                              <void*>&counter,
- *                              count_callback )
- *             return counter             # <<<<<<<<<<<<<<
- *         else:
- *             raise ValueError ("count for a region is not available for sam files" )
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_5 = PyInt_FromLong(__pyx_v_counter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_r = __pyx_t_5;
-    __pyx_t_5 = 0;
-    goto __pyx_L0;
-    goto __pyx_L6;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1190
- *             return counter
- *         else:
- *             raise ValueError ("count for a region is not available for sam files" )             # <<<<<<<<<<<<<<
- * 
- *     def pileup( self,
- */
-    __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L6:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_region);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_27pileup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_26pileup[] = "Samfile.pileup(self, reference=None, start=None, end=None, region=None, callback=None, **kwargs)\n\n        perform a :term:`pileup` within a :term:`region`. The region is specified by\n        :term:`reference`, *start* and *end* (using 0-based indexing).\n        Alternatively, a samtools *region* string can be supplied.\n\n        Without *reference* or *region* all reads will be used for the pileup. The reads will be retu [...]
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_27pileup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_reference = 0;
-  PyObject *__pyx_v_start = 0;
-  PyObject *__pyx_v_end = 0;
-  PyObject *__pyx_v_region = 0;
-  PyObject *__pyx_v_callback = 0;
-  PyObject *__pyx_v_kwargs = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("pileup (wrapper)", 0);
-  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
-  __Pyx_GOTREF(__pyx_v_kwargs);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,&__pyx_n_s__callback,0};
-    PyObject* values[5] = {0,0,0,0,0};
-
-    /* "pysam/csamtools.pyx":1193
- * 
- *     def pileup( self,
- *                 reference = None,             # <<<<<<<<<<<<<<
- *                 start = None,
- *                 end = None,
- */
-    values[0] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1194
- *     def pileup( self,
- *                 reference = None,
- *                 start = None,             # <<<<<<<<<<<<<<
- *                 end = None,
- *                 region = None,
- */
-    values[1] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1195
- *                 reference = None,
- *                 start = None,
- *                 end = None,             # <<<<<<<<<<<<<<
- *                 region = None,
- *                 callback = None,
- */
-    values[2] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1196
- *                 start = None,
- *                 end = None,
- *                 region = None,             # <<<<<<<<<<<<<<
- *                 callback = None,
- *                 **kwargs ):
- */
-    values[3] = ((PyObject *)Py_None);
-
-    /* "pysam/csamtools.pyx":1197
- *                 end = None,
- *                 region = None,
- *                 callback = None,             # <<<<<<<<<<<<<<
- *                 **kwargs ):
- *         '''
- */
-    values[4] = ((PyObject *)Py_None);
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
-          if (value) { values[0] = value; kw_args--; }
-        }
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
-          if (value) { values[2] = value; kw_args--; }
-        }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
-          if (value) { values[3] = value; kw_args--; }
-        }
-        case  4:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__callback);
-          if (value) { values[4] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "pileup") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_reference = values[0];
-    __pyx_v_start = values[1];
-    __pyx_v_end = values[2];
-    __pyx_v_region = values[3];
-    __pyx_v_callback = values[4];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("pileup", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.pileup", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_26pileup(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_callback, __pyx_v_kwargs);
-  __Pyx_XDECREF(__pyx_v_kwargs);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1192
- *             raise ValueError ("count for a region is not available for sam files" )
- * 
- *     def pileup( self,             # <<<<<<<<<<<<<<
- *                 reference = None,
- *                 start = None,
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_26pileup(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_callback, PyObject *__pyx_v_kwargs) {
-  int __pyx_v_rtid;
-  int __pyx_v_rstart;
-  int __pyx_v_rend;
-  int __pyx_v_has_coord;
-  bam_plbuf_t *__pyx_v_buf;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *(*__pyx_t_9)(PyObject *);
-  int __pyx_t_10;
-  int __pyx_t_11;
-  int __pyx_t_12;
-  int __pyx_t_13;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("pileup", 0);
-  __Pyx_TraceCall("pileup", __pyx_f[0], 1192);
-
-  /* "pysam/csamtools.pyx":1248
- *         cdef bam_plbuf_t *buf
- * 
- *         if not self._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __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 = 1248; __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 = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1249
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1251
- *             raise ValueError( "I/O operation on closed file" )
- * 
- *         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )             # <<<<<<<<<<<<<<
- * 
- *         if self.isbam:
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __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 = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_reference);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
-  __Pyx_GIVEREF(__pyx_v_reference);
-  __Pyx_INCREF(__pyx_v_start);
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
-  __Pyx_GIVEREF(__pyx_v_start);
-  __Pyx_INCREF(__pyx_v_end);
-  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
-  __Pyx_GIVEREF(__pyx_v_end);
-  __Pyx_INCREF(__pyx_v_region);
-  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
-  __Pyx_GIVEREF(__pyx_v_region);
-  __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 = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
-    PyObject* sequence = __pyx_t_5;
-    #if CYTHON_COMPILING_IN_CPYTHON
-    Py_ssize_t size = Py_SIZE(sequence);
-    #else
-    Py_ssize_t size = PySequence_Size(sequence);
-    #endif
-    if (unlikely(size != 4)) {
-      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
-      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely(PyTuple_CheckExact(sequence))) {
-      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
-      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
-      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
-      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
-    } else {
-      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
-      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
-      __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
-      __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
-    }
-    __Pyx_INCREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_t_2);
-    __Pyx_INCREF(__pyx_t_6);
-    __Pyx_INCREF(__pyx_t_7);
-    #else
-    Py_ssize_t i;
-    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
-    for (i=0; i < 4; i++) {
-      PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(item);
-      *(temps[i]) = item;
-    }
-    #endif
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  } else
-  {
-    Py_ssize_t index = -1;
-    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
-    __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
-    for (index=0; index < 4; index++) {
-      PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
-      __Pyx_GOTREF(item);
-      *(temps[index]) = item;
-    }
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_9 = NULL;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    goto __pyx_L5_unpacking_done;
-    __pyx_L4_unpacking_failed:;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_9 = NULL;
-    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_L5_unpacking_done:;
-  }
-  __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_v_has_coord = __pyx_t_10;
-  __pyx_v_rtid = __pyx_t_11;
-  __pyx_v_rstart = __pyx_t_12;
-  __pyx_v_rend = __pyx_t_13;
-
-  /* "pysam/csamtools.pyx":1253
- *         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
- * 
- *         if self.isbam:             # <<<<<<<<<<<<<<
- *             if not self._hasIndex(): raise ValueError( "no index available for pileup" )
- * 
- */
-  if (__pyx_v_self->isbam) {
-
-    /* "pysam/csamtools.pyx":1254
- * 
- *         if self.isbam:
- *             if not self._hasIndex(): raise ValueError( "no index available for pileup" )             # <<<<<<<<<<<<<<
- * 
- *             if callback:
- */
-    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __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 = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_3 = (!__pyx_t_4);
-    if (__pyx_t_3) {
-      __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L7;
-    }
-    __pyx_L7:;
-
-    /* "pysam/csamtools.pyx":1256
- *             if not self._hasIndex(): raise ValueError( "no index available for pileup" )
- * 
- *             if callback:             # <<<<<<<<<<<<<<
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
- * 
- */
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1257
- * 
- *             if callback:
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )             # <<<<<<<<<<<<<<
- * 
- *                 buf = bam_plbuf_init( <bam_pileup_f>pileup_callback, <void*>callback )
- */
-      __pyx_t_3 = (!__pyx_v_has_coord);
-      if (__pyx_t_3) {
-        __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L9;
-      }
-      __pyx_L9:;
-
-      /* "pysam/csamtools.pyx":1259
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
- * 
- *                 buf = bam_plbuf_init( <bam_pileup_f>pileup_callback, <void*>callback )             # <<<<<<<<<<<<<<
- *                 bam_fetch(self.samfile.x.bam,
- *                           self.index, rtid, rstart, rend,
- */
-      __pyx_v_buf = bam_plbuf_init(((bam_pileup_f)__pyx_f_5pysam_9csamtools_pileup_callback), ((void *)__pyx_v_callback));
-
-      /* "pysam/csamtools.pyx":1262
- *                 bam_fetch(self.samfile.x.bam,
- *                           self.index, rtid, rstart, rend,
- *                           buf, pileup_fetch_callback )             # <<<<<<<<<<<<<<
- * 
- *                 # finalize pileup
- */
-      bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, __pyx_v_buf, __pyx_f_5pysam_9csamtools_pileup_fetch_callback);
-
-      /* "pysam/csamtools.pyx":1265
- * 
- *                 # finalize pileup
- *                 bam_plbuf_push( NULL, buf)             # <<<<<<<<<<<<<<
- *                 bam_plbuf_destroy(buf)
- *             else:
- */
-      bam_plbuf_push(NULL, __pyx_v_buf);
-
-      /* "pysam/csamtools.pyx":1266
- *                 # finalize pileup
- *                 bam_plbuf_push( NULL, buf)
- *                 bam_plbuf_destroy(buf)             # <<<<<<<<<<<<<<
- *             else:
- *                 if has_coord:
- */
-      bam_plbuf_destroy(__pyx_v_buf);
-      goto __pyx_L8;
-    }
-    /*else*/ {
-
-      /* "pysam/csamtools.pyx":1268
- *                 bam_plbuf_destroy(buf)
- *             else:
- *                 if has_coord:             # <<<<<<<<<<<<<<
- *                     return IteratorColumnRegion( self,
- *                                                  tid = rtid,
- */
-      if (__pyx_v_has_coord) {
-
-        /* "pysam/csamtools.pyx":1269
- *             else:
- *                 if has_coord:
- *                     return IteratorColumnRegion( self,             # <<<<<<<<<<<<<<
- *                                                  tid = rtid,
- *                                                  start = rstart,
- */
-        __Pyx_XDECREF(__pyx_r);
-        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_INCREF(((PyObject *)__pyx_v_self));
-        PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));
-        __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-
-        /* "pysam/csamtools.pyx":1273
- *                                                  start = rstart,
- *                                                  end = rend,
- *                                                  **kwargs )             # <<<<<<<<<<<<<<
- *                 else:
- *                     return IteratorColumnAllRefs(self, **kwargs )
- */
-        __pyx_t_5 = PyDict_Copy(((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-
-        /* "pysam/csamtools.pyx":1270
- *                 if has_coord:
- *                     return IteratorColumnRegion( self,
- *                                                  tid = rtid,             # <<<<<<<<<<<<<<
- *                                                  start = rstart,
- *                                                  end = rend,
- */
-        __pyx_t_6 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        if (unlikely(PyDict_GetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__tid)))) {
-          __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__tid)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__tid), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-        /* "pysam/csamtools.pyx":1271
- *                     return IteratorColumnRegion( self,
- *                                                  tid = rtid,
- *                                                  start = rstart,             # <<<<<<<<<<<<<<
- *                                                  end = rend,
- *                                                  **kwargs )
- */
-        __pyx_t_6 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        if (unlikely(PyDict_GetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__start)))) {
-          __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__start)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__start), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-        /* "pysam/csamtools.pyx":1272
- *                                                  tid = rtid,
- *                                                  start = rstart,
- *                                                  end = rend,             # <<<<<<<<<<<<<<
- *                                                  **kwargs )
- *                 else:
- */
-        __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        if (unlikely(PyDict_GetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__end)))) {
-          __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__end)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__end), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorColumnRegion)), ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-        __pyx_r = __pyx_t_6;
-        __pyx_t_6 = 0;
-        goto __pyx_L0;
-        goto __pyx_L10;
-      }
-      /*else*/ {
-
-        /* "pysam/csamtools.pyx":1275
- *                                                  **kwargs )
- *                 else:
- *                     return IteratorColumnAllRefs(self, **kwargs )             # <<<<<<<<<<<<<<
- * 
- *         else:
- */
-        __Pyx_XDECREF(__pyx_r);
-        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_INCREF(((PyObject *)__pyx_v_self));
-        PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
-        __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-        __pyx_t_5 = ((PyObject *)__pyx_v_kwargs);
-        __Pyx_INCREF(__pyx_t_5);
-        __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorColumnAllRefs)), ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-        __pyx_r = __pyx_t_7;
-        __pyx_t_7 = 0;
-        goto __pyx_L0;
-      }
-      __pyx_L10:;
-    }
-    __pyx_L8:;
-    goto __pyx_L6;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1278
- * 
- *         else:
- *             raise NotImplementedError( "pileup of samfiles not implemented yet" )             # <<<<<<<<<<<<<<
- * 
- *     def close( self ):
- */
-    __pyx_t_7 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L6:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.pileup", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_29close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_28close[] = "Samfile.close(self)\n\n        closes the :class:`pysam.Samfile`.";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_29close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("close (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_28close(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1280
- *             raise NotImplementedError( "pileup of samfiles not implemented yet" )
- * 
- *     def close( self ):             # <<<<<<<<<<<<<<
- *         '''
- *         closes the :class:`pysam.Samfile`.'''
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_28close(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("close", 0);
-  __Pyx_TraceCall("close", __pyx_f[0], 1280);
-
-  /* "pysam/csamtools.pyx":1283
- *         '''
- *         closes the :class:`pysam.Samfile`.'''
- *         if self.samfile != NULL:             # <<<<<<<<<<<<<<
- *             samclose( self.samfile )
- *             bam_index_destroy(self.index);
- */
-  __pyx_t_1 = (__pyx_v_self->samfile != NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":1284
- *         closes the :class:`pysam.Samfile`.'''
- *         if self.samfile != NULL:
- *             samclose( self.samfile )             # <<<<<<<<<<<<<<
- *             bam_index_destroy(self.index);
- *             self.samfile = NULL
- */
-    samclose(__pyx_v_self->samfile);
-
-    /* "pysam/csamtools.pyx":1285
- *         if self.samfile != NULL:
- *             samclose( self.samfile )
- *             bam_index_destroy(self.index);             # <<<<<<<<<<<<<<
- *             self.samfile = NULL
- * 
- */
-    bam_index_destroy(__pyx_v_self->index);
-
-    /* "pysam/csamtools.pyx":1286
- *             samclose( self.samfile )
- *             bam_index_destroy(self.index);
- *             self.samfile = NULL             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__( self ):
- */
-    __pyx_v_self->samfile = NULL;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_7Samfile_31__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_7Samfile_31__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_7Samfile_30__dealloc__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":1288
- *             self.samfile = NULL
- * 
- *     def __dealloc__( self ):             # <<<<<<<<<<<<<<
- *         # remember: dealloc cannot call other methods
- *         # note: no doc string
- */
-
-static void __pyx_pf_5pysam_9csamtools_7Samfile_30__dealloc__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1288);
-
-  /* "pysam/csamtools.pyx":1292
- *         # note: no doc string
- *         # note: __del__ is not called.
- *         self.close()             # <<<<<<<<<<<<<<
- *         bam_destroy1(self.b)
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __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 = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1293
- *         # note: __del__ is not called.
- *         self.close()
- *         bam_destroy1(self.b)             # <<<<<<<<<<<<<<
- * 
- *     cpdef int write( self, AlignedRead read ) except -1:
- */
-  bam_destroy1(__pyx_v_self->b);
-
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":1295
- *         bam_destroy1(self.b)
- * 
- *     cpdef int write( self, AlignedRead read ) except -1:             # <<<<<<<<<<<<<<
- *         '''
- *         write a single :class:`pysam.AlignedRead` to disk.
- */
-
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_33write(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/
-static int __pyx_f_5pysam_9csamtools_7Samfile_write(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_read, int __pyx_skip_dispatch) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_t_6;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("write", 0);
-  __Pyx_TraceCall("write", __pyx_f[0], 1295);
-  /* Check if called by wrapper */
-  if (unlikely(__pyx_skip_dispatch)) ;
-  /* Check if overridden in Python */
-  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_33write)) {
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_v_read));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_read));
-      __Pyx_GIVEREF(((PyObject *)__pyx_v_read));
-      __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 = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_r = __pyx_t_4;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      goto __pyx_L0;
-    }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  }
-
-  /* "pysam/csamtools.pyx":1301
- *         returns the number of bytes written.
- *         '''
- *         if not self._isOpen():             # <<<<<<<<<<<<<<
- *             return 0
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __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 = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_6 = (!__pyx_t_5);
-  if (__pyx_t_6) {
-
-    /* "pysam/csamtools.pyx":1302
- *         '''
- *         if not self._isOpen():
- *             return 0             # <<<<<<<<<<<<<<
- * 
- *         return samwrite( self.samfile, read._delegate )
- */
-    __pyx_r = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1304
- *             return 0
- * 
- *         return samwrite( self.samfile, read._delegate )             # <<<<<<<<<<<<<<
- * 
- *     def __enter__(self):
- */
-  __pyx_r = samwrite(__pyx_v_self->samfile, __pyx_v_read->_delegate);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_WriteUnraisable("pysam.csamtools.Samfile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_33write(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_32write[] = "Samfile.write(self, AlignedRead read) -> int\n\n        write a single :class:`pysam.AlignedRead` to disk.\n\n        returns the number of bytes written.\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_33write(PyObject *__pyx_v_self, PyObject *__pyx_v_read) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("write (wrapper)", 0);
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_32write(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_read));
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1295
- *         bam_destroy1(self.b)
- * 
- *     cpdef int write( self, AlignedRead read ) except -1:             # <<<<<<<<<<<<<<
- *         '''
- *         write a single :class:`pysam.AlignedRead` to disk.
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_32write(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_read) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("write", 0);
-  __Pyx_TraceCall("write", __pyx_f[0], 1295);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *)__pyx_v_self->__pyx_vtab)->write(__pyx_v_self, __pyx_v_read, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __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("pysam.csamtools.Samfile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_35__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_34__enter__[] = "Samfile.__enter__(self)";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_35__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_34__enter__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1306
- *         return samwrite( self.samfile, read._delegate )
- * 
- *     def __enter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_34__enter__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__enter__", 0);
-  __Pyx_TraceCall("__enter__", __pyx_f[0], 1306);
-
-  /* "pysam/csamtools.pyx":1307
- * 
- *     def __enter__(self):
- *         return self             # <<<<<<<<<<<<<<
- * 
- *     def __exit__(self, exc_type, exc_value, traceback):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_37__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_36__exit__[] = "Samfile.__exit__(self, exc_type, exc_value, traceback)";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_37__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
-  CYTHON_UNUSED PyObject *__pyx_v_exc_value = 0;
-  CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__exc_type,&__pyx_n_s__exc_value,&__pyx_n_s__traceback,0};
-    PyObject* values[3] = {0,0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exc_type)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exc_value)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__traceback)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-    }
-    __pyx_v_exc_type = values[0];
-    __pyx_v_exc_value = values[1];
-    __pyx_v_traceback = values[2];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_36__exit__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_value, __pyx_v_traceback);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1309
- *         return self
- * 
- *     def __exit__(self, exc_type, exc_value, traceback):             # <<<<<<<<<<<<<<
- *         self.close()
- *         return False
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_36__exit__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__exit__", 0);
-  __Pyx_TraceCall("__exit__", __pyx_f[0], 1309);
-
-  /* "pysam/csamtools.pyx":1310
- * 
- *     def __exit__(self, exc_type, exc_value, traceback):
- *         self.close()             # <<<<<<<<<<<<<<
- *         return False
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1311
- *     def __exit__(self, exc_type, exc_value, traceback):
- *         self.close()
- *         return False             # <<<<<<<<<<<<<<
- * 
- *     ###############################################################
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_8filename_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_8filename___get__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1320
- *     property filename:
- *         '''number of :term:`filename` associated with this object.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._filename
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 1320);
-
-  /* "pysam/csamtools.pyx":1321
- *         '''number of :term:`filename` associated with this object.'''
- *         def __get__(self):
- *             return self._filename             # <<<<<<<<<<<<<<
- * 
- *     property nreferences:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->_filename);
-  __pyx_r = __pyx_v_self->_filename;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_11nreferences_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_11nreferences_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_11nreferences___get__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1325
- *     property nreferences:
- *         '''number of :term:`reference` sequences in the file.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             return self.samfile.header.n_targets
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_11nreferences___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 1325);
-
-  /* "pysam/csamtools.pyx":1326
- *         '''number of :term:`reference` sequences in the file.'''
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             return self.samfile.header.n_targets
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1327
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             return self.samfile.header.n_targets             # <<<<<<<<<<<<<<
- * 
- *     property references:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.nreferences.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_10references_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_10references_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_10references___get__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1331
- *     property references:
- *         """tuple with the names of :term:`reference` sequences."""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             t = []
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_10references___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_v_t = NULL;
-  long __pyx_v_x;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int32_t __pyx_t_5;
-  int __pyx_t_6;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 1331);
-
-  /* "pysam/csamtools.pyx":1332
- *         """tuple with the names of :term:`reference` sequences."""
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             t = []
- *             for x from 0 <= x < self.samfile.header.n_targets:
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __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 = 1332; __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 = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1333
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             t = []             # <<<<<<<<<<<<<<
- *             for x from 0 <= x < self.samfile.header.n_targets:
- *                 t.append( _charptr_to_str(self.samfile.header.target_name[x]) )
- */
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_t = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1334
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             t = []
- *             for x from 0 <= x < self.samfile.header.n_targets:             # <<<<<<<<<<<<<<
- *                 t.append( _charptr_to_str(self.samfile.header.target_name[x]) )
- *             return tuple(t)
- */
-  __pyx_t_5 = __pyx_v_self->samfile->header->n_targets;
-  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
-
-    /* "pysam/csamtools.pyx":1335
- *             t = []
- *             for x from 0 <= x < self.samfile.header.n_targets:
- *                 t.append( _charptr_to_str(self.samfile.header.target_name[x]) )             # <<<<<<<<<<<<<<
- *             return tuple(t)
- * 
- */
-    __pyx_t_2 = __pyx_f_5pysam_9csamtools__charptr_to_str((__pyx_v_self->samfile->header->target_name[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_6 = PyList_Append(__pyx_v_t, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  }
-
-  /* "pysam/csamtools.pyx":1336
- *             for x from 0 <= x < self.samfile.header.n_targets:
- *                 t.append( _charptr_to_str(self.samfile.header.target_name[x]) )
- *             return tuple(t)             # <<<<<<<<<<<<<<
- * 
- *     property lengths:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = ((PyObject *)PyList_AsTuple(__pyx_v_t)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __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;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.references.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_t);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_7lengths_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_7lengths_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_7lengths___get__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1342
- *         :attr:`pysam.Samfile.references`
- *         """
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             t = []
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_7lengths___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_v_t = NULL;
-  long __pyx_v_x;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int32_t __pyx_t_5;
-  int __pyx_t_6;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 1342);
-
-  /* "pysam/csamtools.pyx":1343
- *         """
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             t = []
- *             for x from 0 <= x < self.samfile.header.n_targets:
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __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 = 1343; __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 = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1344
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             t = []             # <<<<<<<<<<<<<<
- *             for x from 0 <= x < self.samfile.header.n_targets:
- *                 t.append( self.samfile.header.target_len[x] )
- */
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_t = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1345
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             t = []
- *             for x from 0 <= x < self.samfile.header.n_targets:             # <<<<<<<<<<<<<<
- *                 t.append( self.samfile.header.target_len[x] )
- *             return tuple(t)
- */
-  __pyx_t_5 = __pyx_v_self->samfile->header->n_targets;
-  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
-
-    /* "pysam/csamtools.pyx":1346
- *             t = []
- *             for x from 0 <= x < self.samfile.header.n_targets:
- *                 t.append( self.samfile.header.target_len[x] )             # <<<<<<<<<<<<<<
- *             return tuple(t)
- * 
- */
-    __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t((__pyx_v_self->samfile->header->target_len[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_6 = PyList_Append(__pyx_v_t, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  }
-
-  /* "pysam/csamtools.pyx":1347
- *             for x from 0 <= x < self.samfile.header.n_targets:
- *                 t.append( self.samfile.header.target_len[x] )
- *             return tuple(t)             # <<<<<<<<<<<<<<
- * 
- *     property mapped:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = ((PyObject *)PyList_AsTuple(__pyx_v_t)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __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;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.lengths.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_t);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_6mapped_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_6mapped_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_6mapped___get__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1352
- *         """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" )
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_6mapped___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  int __pyx_v_tid;
-  uint32_t __pyx_v_total;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int32_t __pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 1352);
-
-  /* "pysam/csamtools.pyx":1353
- *         """
- *         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" )
- *             if self.index == NULL:
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_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 = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1354
- *         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" )             # <<<<<<<<<<<<<<
- *             if self.index == NULL:
- *                 raise ValueError( "mapping information not recorded in index or index not available")
- */
-  __pyx_t_4 = (!__pyx_v_self->isbam);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1355
- *             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" )
- *             if self.index == NULL:             # <<<<<<<<<<<<<<
- *                 raise ValueError( "mapping information not recorded in index or index not available")
- * 
- */
-  __pyx_t_4 = (__pyx_v_self->index == NULL);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1356
- *             if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" )
- *             if self.index == NULL:
- *                 raise ValueError( "mapping information not recorded in index or index not available")             # <<<<<<<<<<<<<<
- * 
- *             cdef int tid
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_102), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":1359
- * 
- *             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 )
- */
-  __pyx_v_total = 0;
-
-  /* "pysam/csamtools.pyx":1360
- *             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
- */
-  __pyx_t_5 = __pyx_v_self->samfile->header->n_targets;
-  for (__pyx_v_tid = 0; __pyx_v_tid < __pyx_t_5; __pyx_v_tid++) {
-
-    /* "pysam/csamtools.pyx":1361
- *             cdef uint32_t total = 0
- *             for tid from 0 <= tid < self.samfile.header.n_targets:
- *                 total += pysam_get_mapped( self.index, tid )             # <<<<<<<<<<<<<<
- *             return total
- * 
- */
-    __pyx_v_total = (__pyx_v_total + pysam_get_mapped(__pyx_v_self->index, __pyx_v_tid));
-  }
-
-  /* "pysam/csamtools.pyx":1362
- *             for tid from 0 <= tid < self.samfile.header.n_targets:
- *                 total += pysam_get_mapped( self.index, tid )
- *             return total             # <<<<<<<<<<<<<<
- * 
- *     property unmapped:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_total); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.mapped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_8unmapped_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_8unmapped_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_8unmapped___get__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1367
- *         """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" )
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_8unmapped___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  int __pyx_v_tid;
-  uint32_t __pyx_v_total;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int32_t __pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 1367);
-
-  /* "pysam/csamtools.pyx":1368
- *         """
- *         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
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1369
- *         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
- */
-  __pyx_t_4 = (!__pyx_v_self->isbam);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1371
- *             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 )
- */
-  __pyx_v_total = 0;
-
-  /* "pysam/csamtools.pyx":1372
- *             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
- */
-  __pyx_t_5 = __pyx_v_self->samfile->header->n_targets;
-  for (__pyx_v_tid = 0; __pyx_v_tid < __pyx_t_5; __pyx_v_tid++) {
-
-    /* "pysam/csamtools.pyx":1373
- *             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 )
- */
-    __pyx_v_total = (__pyx_v_total + pysam_get_unmapped(__pyx_v_self->index, __pyx_v_tid));
-  }
-
-  /* "pysam/csamtools.pyx":1375
- *                 total += pysam_get_unmapped( self.index, tid )
- *             # get unmapped reads without coordinates
- *             total += pysam_get_unmapped( self.index, -1 )             # <<<<<<<<<<<<<<
- *             return total
- * 
- */
-  __pyx_v_total = (__pyx_v_total + pysam_get_unmapped(__pyx_v_self->index, -1));
-
-  /* "pysam/csamtools.pyx":1376
- *             # get unmapped reads without coordinates
- *             total += pysam_get_unmapped( self.index, -1 )
- *             return total             # <<<<<<<<<<<<<<
- * 
- *     property text:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_total); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.unmapped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_4text_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_4text___get__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1380
- *     property text:
- *         '''full contents of the :term:`sam file` header as a string.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             return from_string_and_size(self.samfile.header.text, self.samfile.header.l_text)
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_4text___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 1380);
-
-  /* "pysam/csamtools.pyx":1381
- *         '''full contents of the :term:`sam file` header as a string.'''
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             return from_string_and_size(self.samfile.header.text, self.samfile.header.l_text)
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __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 = 1381; __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 = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_106), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1382
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             return from_string_and_size(self.samfile.header.text, self.samfile.header.l_text)             # <<<<<<<<<<<<<<
- * 
- *     property header:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __pyx_f_5pysam_9csamtools_from_string_and_size(__pyx_v_self->samfile->header->text, __pyx_v_self->samfile->header->l_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.text.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_6header_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_6header___get__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1388
- *         a two-level dictionary.
- *         '''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_6header___get__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_v_result = NULL;
-  PyObject *__pyx_v_t = NULL;
-  PyObject *__pyx_v_line = NULL;
-  PyObject *__pyx_v_fields = NULL;
-  PyObject *__pyx_v_record = NULL;
-  PyObject *__pyx_v_x = NULL;
-  PyObject *__pyx_v_field = NULL;
-  PyObject *__pyx_v_key = NULL;
-  PyObject *__pyx_v_value = NULL;
-  PyObject *__pyx_v_sq = NULL;
-  PyObject *__pyx_v_ref = NULL;
-  PyObject *__pyx_v_length = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  Py_ssize_t __pyx_t_5;
-  PyObject *(*__pyx_t_6)(PyObject *);
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  Py_ssize_t __pyx_t_10;
-  PyObject *(*__pyx_t_11)(PyObject *);
-  PyObject *__pyx_t_12 = NULL;
-  PyObject *(*__pyx_t_13)(PyObject *);
-  int __pyx_t_14;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 1388);
-
-  /* "pysam/csamtools.pyx":1389
- *         '''
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *             result = {}
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_107), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1391
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- * 
- *             result = {}             # <<<<<<<<<<<<<<
- * 
- *             if self.samfile.header.text != NULL:
- */
-  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_v_result = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1393
- *             result = {}
- * 
- *             if self.samfile.header.text != NULL:             # <<<<<<<<<<<<<<
- *                 # convert to python string (note: call self.text to create 0-terminated string)
- *                 t = self.text
- */
-  __pyx_t_4 = (__pyx_v_self->samfile->header->text != NULL);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1395
- *             if self.samfile.header.text != NULL:
- *                 # convert to python string (note: call self.text to create 0-terminated string)
- *                 t = self.text             # <<<<<<<<<<<<<<
- *                 for line in t.split("\n"):
- *                     if not line.strip(): continue
- */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_v_t = __pyx_t_2;
-    __pyx_t_2 = 0;
-
-    /* "pysam/csamtools.pyx":1396
- *                 # convert to python string (note: call self.text to create 0-terminated string)
- *                 t = self.text
- *                 for line in t.split("\n"):             # <<<<<<<<<<<<<<
- *                     if not line.strip(): continue
- *                     assert line.startswith("@"), "header line without '@': '%s'" % line
- */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_t, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
-      __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
-      __pyx_t_6 = NULL;
-    } else {
-      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
-    }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    for (;;) {
-      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_1 = __pyx_t_6(__pyx_t_2);
-        if (unlikely(!__pyx_t_1)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_1);
-      }
-      __Pyx_XDECREF(__pyx_v_line);
-      __pyx_v_line = __pyx_t_1;
-      __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":1397
- *                 t = self.text
- *                 for line in t.split("\n"):
- *                     if not line.strip(): continue             # <<<<<<<<<<<<<<
- *                     assert line.startswith("@"), "header line without '@': '%s'" % line
- *                     fields = line[1:].split("\t")
- */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_3 = (!__pyx_t_4);
-      if (__pyx_t_3) {
-        goto __pyx_L5_continue;
-        goto __pyx_L7;
-      }
-      __pyx_L7:;
-
-      /* "pysam/csamtools.pyx":1398
- *                 for line in t.split("\n"):
- *                     if not line.strip(): continue
- *                     assert line.startswith("@"), "header line without '@': '%s'" % line             # <<<<<<<<<<<<<<
- *                     fields = line[1:].split("\t")
- *                     record = fields[0]
- */
-      #ifndef CYTHON_WITHOUT_ASSERTIONS
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_110), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __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 = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      if (unlikely(!__pyx_t_3)) {
-        __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_111), __pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-        PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_1));
-        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #endif
-
-      /* "pysam/csamtools.pyx":1399
- *                     if not line.strip(): continue
- *                     assert line.startswith("@"), "header line without '@': '%s'" % line
- *                     fields = line[1:].split("\t")             # <<<<<<<<<<<<<<
- *                     record = fields[0]
- *                     assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
- */
-      __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 = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __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_7, ((PyObject *)__pyx_k_tuple_112), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __Pyx_XDECREF(__pyx_v_fields);
-      __pyx_v_fields = __pyx_t_1;
-      __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":1400
- *                     assert line.startswith("@"), "header line without '@': '%s'" % line
- *                     fields = line[1:].split("\t")
- *                     record = fields[0]             # <<<<<<<<<<<<<<
- *                     assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
- * 
- */
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fields, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_XDECREF(__pyx_v_record);
-      __pyx_v_record = __pyx_t_1;
-      __pyx_t_1 = 0;
-
-      /* "pysam/csamtools.pyx":1401
- *                     fields = line[1:].split("\t")
- *                     record = fields[0]
- *                     assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)             # <<<<<<<<<<<<<<
- * 
- *                     # treat comments
- */
-      #ifndef CYTHON_WITHOUT_ASSERTIONS
-      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      if (unlikely(!__pyx_t_3)) {
-        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_INCREF(__pyx_v_record);
-        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_record);
-        __Pyx_GIVEREF(__pyx_v_record);
-        __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_line);
-        __Pyx_GIVEREF(__pyx_v_line);
-        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_113), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-        PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_7));
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #endif
-
-      /* "pysam/csamtools.pyx":1404
- * 
- *                     # treat comments
- *                     if record == "CO":             # <<<<<<<<<<<<<<
- *                         if record not in result: result[record] = []
- *                         result[record].append( "\t".join( fields[1:] ) )
- */
-      __pyx_t_7 = PyObject_RichCompare(__pyx_v_record, ((PyObject *)__pyx_n_s__CO), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_3) {
-
-        /* "pysam/csamtools.pyx":1405
- *                     # treat comments
- *                     if record == "CO":
- *                         if record not in result: result[record] = []             # <<<<<<<<<<<<<<
- *                         result[record].append( "\t".join( fields[1:] ) )
- *                         continue
- */
-        __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_3) {
-          __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-          goto __pyx_L9;
-        }
-        __pyx_L9:;
-
-        /* "pysam/csamtools.pyx":1406
- *                     if record == "CO":
- *                         if record not in result: result[record] = []
- *                         result[record].append( "\t".join( fields[1:] ) )             # <<<<<<<<<<<<<<
- *                         continue
- *                     # the following is clumsy as generators do not work?
- */
-        __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
-        __Pyx_GIVEREF(__pyx_t_8);
-        __pyx_t_8 = 0;
-        __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __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_9)); __pyx_t_9 = 0;
-        __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-
-        /* "pysam/csamtools.pyx":1407
- *                         if record not in result: result[record] = []
- *                         result[record].append( "\t".join( fields[1:] ) )
- *                         continue             # <<<<<<<<<<<<<<
- *                     # the following is clumsy as generators do not work?
- *                     x = {}
- */
-        goto __pyx_L5_continue;
-        goto __pyx_L8;
-      }
-      __pyx_L8:;
-
-      /* "pysam/csamtools.pyx":1409
- *                         continue
- *                     # the following is clumsy as generators do not work?
- *                     x = {}             # <<<<<<<<<<<<<<
- *                     for field in fields[1:]:
- *                         if ":" not in field:
- */
-      __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-      __Pyx_XDECREF(((PyObject *)__pyx_v_x));
-      __pyx_v_x = ((PyObject*)__pyx_t_9);
-      __pyx_t_9 = 0;
-
-      /* "pysam/csamtools.pyx":1410
- *                     # the following is clumsy as generators do not work?
- *                     x = {}
- *                     for field in fields[1:]:             # <<<<<<<<<<<<<<
- *                         if ":" not in field:
- *                             raise ValueError("malformatted header: no ':' in field" )
- */
-      __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __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_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
-        __pyx_t_11 = NULL;
-      } else {
-        __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext;
-      }
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      for (;;) {
-        if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_8)) {
-          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_8)) {
-          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          __pyx_t_9 = __pyx_t_11(__pyx_t_8);
-          if (unlikely(!__pyx_t_9)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            }
-            break;
-          }
-          __Pyx_GOTREF(__pyx_t_9);
-        }
-        __Pyx_XDECREF(__pyx_v_field);
-        __pyx_v_field = __pyx_t_9;
-        __pyx_t_9 = 0;
-
-        /* "pysam/csamtools.pyx":1411
- *                     x = {}
- *                     for field in fields[1:]:
- *                         if ":" not in field:             # <<<<<<<<<<<<<<
- *                             raise ValueError("malformatted header: no ':' in field" )
- *                         key, value = field.split(":",1)
- */
-        __pyx_t_3 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_114), __pyx_v_field, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_3) {
-
-          /* "pysam/csamtools.pyx":1412
- *                     for field in fields[1:]:
- *                         if ":" not in field:
- *                             raise ValueError("malformatted header: no ':' in field" )             # <<<<<<<<<<<<<<
- *                         key, value = field.split(":",1)
- *                         # uppercase keys must be valid
- */
-          __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_116), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __Pyx_Raise(__pyx_t_9, 0, 0, 0);
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          goto __pyx_L12;
-        }
-        __pyx_L12:;
-
-        /* "pysam/csamtools.pyx":1413
- *                         if ":" not in field:
- *                             raise ValueError("malformatted header: no ':' in field" )
- *                         key, value = field.split(":",1)             # <<<<<<<<<<<<<<
- *                         # uppercase keys must be valid
- *                         # lowercase are permitted for user fields
- */
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_field, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_117), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
-          PyObject* sequence = __pyx_t_7;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          Py_ssize_t size = Py_SIZE(sequence);
-          #else
-          Py_ssize_t size = PySequence_Size(sequence);
-          #endif
-          if (unlikely(size != 2)) {
-            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          #if CYTHON_COMPILING_IN_CPYTHON
-          if (likely(PyTuple_CheckExact(sequence))) {
-            __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
-            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
-          } else {
-            __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
-            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
-          }
-          __Pyx_INCREF(__pyx_t_9);
-          __Pyx_INCREF(__pyx_t_1);
-          #else
-          __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          #endif
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        } else
-        {
-          Py_ssize_t index = -1;
-          __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_12);
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
-          index = 0; __pyx_t_9 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_9)) goto __pyx_L13_unpacking_failed;
-          __Pyx_GOTREF(__pyx_t_9);
-          index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
-          __Pyx_GOTREF(__pyx_t_1);
-          if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_13 = NULL;
-          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-          goto __pyx_L14_unpacking_done;
-          __pyx_L13_unpacking_failed:;
-          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-          __pyx_t_13 = NULL;
-          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_L14_unpacking_done:;
-        }
-        __Pyx_XDECREF(__pyx_v_key);
-        __pyx_v_key = __pyx_t_9;
-        __pyx_t_9 = 0;
-        __Pyx_XDECREF(__pyx_v_value);
-        __pyx_v_value = __pyx_t_1;
-        __pyx_t_1 = 0;
-
-        /* "pysam/csamtools.pyx":1416
- *                         # uppercase keys must be valid
- *                         # lowercase are permitted for user fields
- *                         if key in VALID_HEADER_FIELDS[record]:             # <<<<<<<<<<<<<<
- *                             x[key] = VALID_HEADER_FIELDS[record][key](value)
- *                         elif not key.isupper():
- */
-        __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_1 = PyObject_GetItem(__pyx_t_7, __pyx_v_record); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        if (__pyx_t_3) {
-
-          /* "pysam/csamtools.pyx":1417
- *                         # lowercase are permitted for user fields
- *                         if key in VALID_HEADER_FIELDS[record]:
- *                             x[key] = VALID_HEADER_FIELDS[record][key](value)             # <<<<<<<<<<<<<<
- *                         elif not key.isupper():
- *                             x[key] = value
- */
-          __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __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_GetItem(__pyx_t_7, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __Pyx_INCREF(__pyx_v_value);
-          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_value);
-          __Pyx_GIVEREF(__pyx_v_value);
-          __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-          if (PyDict_SetItem(((PyObject *)__pyx_v_x), __pyx_v_key, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          goto __pyx_L15;
-        }
-
-        /* "pysam/csamtools.pyx":1418
- *                         if key in VALID_HEADER_FIELDS[record]:
- *                             x[key] = VALID_HEADER_FIELDS[record][key](value)
- *                         elif not key.isupper():             # <<<<<<<<<<<<<<
- *                             x[key] = value
- *                         else:
- */
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__isupper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_4 = (!__pyx_t_3);
-        if (__pyx_t_4) {
-
-          /* "pysam/csamtools.pyx":1419
- *                             x[key] = VALID_HEADER_FIELDS[record][key](value)
- *                         elif not key.isupper():
- *                             x[key] = value             # <<<<<<<<<<<<<<
- *                         else:
- *                             raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )
- */
-          if (PyDict_SetItem(((PyObject *)__pyx_v_x), __pyx_v_key, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          goto __pyx_L15;
-        }
-        /*else*/ {
-
-          /* "pysam/csamtools.pyx":1421
- *                             x[key] = value
- *                         else:
- *                             raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )             # <<<<<<<<<<<<<<
- * 
- *                     if VALID_HEADER_TYPES[record] == dict:
- */
-          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __Pyx_INCREF(__pyx_v_key);
-          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
-          __Pyx_GIVEREF(__pyx_v_key);
-          __Pyx_INCREF(__pyx_v_record);
-          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_record);
-          __Pyx_GIVEREF(__pyx_v_record);
-          __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_118), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-          __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-          __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_9));
-          __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
-          __pyx_t_9 = 0;
-          __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-          __Pyx_Raise(__pyx_t_9, 0, 0, 0);
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        __pyx_L15:;
-      }
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-      /* "pysam/csamtools.pyx":1423
- *                             raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )
- * 
- *                     if VALID_HEADER_TYPES[record] == dict:             # <<<<<<<<<<<<<<
- *                         if record in result:
- *                             raise ValueError( "multiple '%s' lines are not permitted" % record )
- */
-      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_record); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)((PyObject*)(&PyDict_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      if (__pyx_t_4) {
-
-        /* "pysam/csamtools.pyx":1424
- * 
- *                     if VALID_HEADER_TYPES[record] == dict:
- *                         if record in result:             # <<<<<<<<<<<<<<
- *                             raise ValueError( "multiple '%s' lines are not permitted" % record )
- *                         result[record] = x
- */
-        __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_4) {
-
-          /* "pysam/csamtools.pyx":1425
- *                     if VALID_HEADER_TYPES[record] == dict:
- *                         if record in result:
- *                             raise ValueError( "multiple '%s' lines are not permitted" % record )             # <<<<<<<<<<<<<<
- *                         result[record] = x
- *                     elif VALID_HEADER_TYPES[record] == list:
- */
-          __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_119), __pyx_v_record); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __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 = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_9);
-          PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
-          __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
-          __pyx_t_8 = 0;
-          __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          goto __pyx_L17;
-        }
-        __pyx_L17:;
-
-        /* "pysam/csamtools.pyx":1426
- *                         if record in result:
- *                             raise ValueError( "multiple '%s' lines are not permitted" % record )
- *                         result[record] = x             # <<<<<<<<<<<<<<
- *                     elif VALID_HEADER_TYPES[record] == list:
- *                         if record not in result: result[record] = []
- */
-        if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_v_x)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L16;
-      }
-
-      /* "pysam/csamtools.pyx":1427
- *                             raise ValueError( "multiple '%s' lines are not permitted" % record )
- *                         result[record] = x
- *                     elif VALID_HEADER_TYPES[record] == list:             # <<<<<<<<<<<<<<
- *                         if record not in result: result[record] = []
- *                         result[record].append( x )
- */
-      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_record); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      if (__pyx_t_4) {
-
-        /* "pysam/csamtools.pyx":1428
- *                         result[record] = x
- *                     elif VALID_HEADER_TYPES[record] == list:
- *                         if record not in result: result[record] = []             # <<<<<<<<<<<<<<
- *                         result[record].append( x )
- * 
- */
-        __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_4) {
-          __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-          goto __pyx_L18;
-        }
-        __pyx_L18:;
-
-        /* "pysam/csamtools.pyx":1429
- *                     elif VALID_HEADER_TYPES[record] == list:
- *                         if record not in result: result[record] = []
- *                         result[record].append( x )             # <<<<<<<<<<<<<<
- * 
- *                 # if there are no SQ lines in the header, add the reference names
- */
-        __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_8, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; __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_9); __pyx_t_9 = 0;
-        goto __pyx_L16;
-      }
-      __pyx_L16:;
-      __pyx_L5_continue:;
-    }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-    /* "pysam/csamtools.pyx":1437
- *                 # SQ lines, the SQ information is not part of the textual header and thus
- *                 # are missing from the output. See issue 84.
- *                 if "SQ" not in result:             # <<<<<<<<<<<<<<
- *                     sq = []
- *                     for ref, length in zip( self.references, self.lengths ):
- */
-    __pyx_t_4 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_4) {
-
-      /* "pysam/csamtools.pyx":1438
- *                 # are missing from the output. See issue 84.
- *                 if "SQ" not in result:
- *                     sq = []             # <<<<<<<<<<<<<<
- *                     for ref, length in zip( self.references, self.lengths ):
- *                         sq.append( {'LN': length, 'SN': ref } )
- */
-      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_v_sq = ((PyObject*)__pyx_t_2);
-      __pyx_t_2 = 0;
-
-      /* "pysam/csamtools.pyx":1439
- *                 if "SQ" not in result:
- *                     sq = []
- *                     for ref, length in zip( self.references, self.lengths ):             # <<<<<<<<<<<<<<
- *                         sq.append( {'LN': length, 'SN': ref } )
- *                     result["SQ"] = sq
- */
-      __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__references); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__lengths); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
-      __Pyx_GIVEREF(__pyx_t_9);
-      __pyx_t_2 = 0;
-      __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-      if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
-        __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0;
-        __pyx_t_6 = NULL;
-      } else {
-        __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext;
-      }
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      for (;;) {
-        if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_8)) {
-          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_8)) {
-          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          __pyx_t_9 = __pyx_t_6(__pyx_t_8);
-          if (unlikely(!__pyx_t_9)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            }
-            break;
-          }
-          __Pyx_GOTREF(__pyx_t_9);
-        }
-        if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
-          PyObject* sequence = __pyx_t_9;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          Py_ssize_t size = Py_SIZE(sequence);
-          #else
-          Py_ssize_t size = PySequence_Size(sequence);
-          #endif
-          if (unlikely(size != 2)) {
-            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          #if CYTHON_COMPILING_IN_CPYTHON
-          if (likely(PyTuple_CheckExact(sequence))) {
-            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
-            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
-          } else {
-            __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
-            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
-          }
-          __Pyx_INCREF(__pyx_t_2);
-          __Pyx_INCREF(__pyx_t_7);
-          #else
-          __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          #endif
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        } else
-        {
-          Py_ssize_t index = -1;
-          __pyx_t_1 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext;
-          index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L22_unpacking_failed;
-          __Pyx_GOTREF(__pyx_t_2);
-          index = 1; __pyx_t_7 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L22_unpacking_failed;
-          __Pyx_GOTREF(__pyx_t_7);
-          if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_13 = NULL;
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          goto __pyx_L23_unpacking_done;
-          __pyx_L22_unpacking_failed:;
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          __pyx_t_13 = NULL;
-          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_L23_unpacking_done:;
-        }
-        __Pyx_XDECREF(__pyx_v_ref);
-        __pyx_v_ref = __pyx_t_2;
-        __pyx_t_2 = 0;
-        __Pyx_XDECREF(__pyx_v_length);
-        __pyx_v_length = __pyx_t_7;
-        __pyx_t_7 = 0;
-
-        /* "pysam/csamtools.pyx":1440
- *                     sq = []
- *                     for ref, length in zip( self.references, self.lengths ):
- *                         sq.append( {'LN': length, 'SN': ref } )             # <<<<<<<<<<<<<<
- *                     result["SQ"] = sq
- * 
- */
-        __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-        if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__LN), __pyx_v_length) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__SN), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_14 = PyList_Append(__pyx_v_sq, ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-      }
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-      /* "pysam/csamtools.pyx":1441
- *                     for ref, length in zip( self.references, self.lengths ):
- *                         sq.append( {'LN': length, 'SN': ref } )
- *                     result["SQ"] = sq             # <<<<<<<<<<<<<<
- * 
- *             return result
- */
-      if (PyDict_SetItem(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_v_sq)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L19;
-    }
-    __pyx_L19:;
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1443
- *                     result["SQ"] = sq
- * 
- *             return result             # <<<<<<<<<<<<<<
- * 
- *     def _buildLine( self, fields, record ):
- */
-  __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_2);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_12);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_result);
-  __Pyx_XDECREF(__pyx_v_t);
-  __Pyx_XDECREF(__pyx_v_line);
-  __Pyx_XDECREF(__pyx_v_fields);
-  __Pyx_XDECREF(__pyx_v_record);
-  __Pyx_XDECREF(__pyx_v_x);
-  __Pyx_XDECREF(__pyx_v_field);
-  __Pyx_XDECREF(__pyx_v_key);
-  __Pyx_XDECREF(__pyx_v_value);
-  __Pyx_XDECREF(__pyx_v_sq);
-  __Pyx_XDECREF(__pyx_v_ref);
-  __Pyx_XDECREF(__pyx_v_length);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_39_buildLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_38_buildLine[] = "Samfile._buildLine(self, fields, record)\nbuild a header line from *fields* dictionary for *record*";
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_39_buildLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_fields = 0;
-  PyObject *__pyx_v_record = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_buildLine (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fields,&__pyx_n_s__record,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__record)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("_buildLine", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_buildLine") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-    }
-    __pyx_v_fields = values[0];
-    __pyx_v_record = values[1];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_buildLine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Samfile._buildLine", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_38_buildLine(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_fields, __pyx_v_record);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1445
- *             return result
- * 
- *     def _buildLine( self, fields, record ):             # <<<<<<<<<<<<<<
- *         '''build a header line from *fields* dictionary for *record*'''
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_38_buildLine(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_record) {
-  PyObject *__pyx_v_line = NULL;
-  PyObject *__pyx_v_key = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  Py_ssize_t __pyx_t_5;
-  PyObject *(*__pyx_t_6)(PyObject *);
-  PyObject *__pyx_t_7 = NULL;
-  int __pyx_t_8;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_buildLine", 0);
-  __Pyx_TraceCall("_buildLine", __pyx_f[0], 1445);
-
-  /* "pysam/csamtools.pyx":1449
- * 
- *         # TODO: add checking for field and sort order
- *         line = ["@%s" % record ]             # <<<<<<<<<<<<<<
- *         # comment
- *         if record == "CO":
- */
-  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_120), __pyx_v_record); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-  __pyx_t_1 = 0;
-  __pyx_v_line = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1451
- *         line = ["@%s" % record ]
- *         # comment
- *         if record == "CO":             # <<<<<<<<<<<<<<
- *             line.append( fields )
- *         # user tags
- */
-  __pyx_t_2 = PyObject_RichCompare(__pyx_v_record, ((PyObject *)__pyx_n_s__CO), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":1452
- *         # comment
- *         if record == "CO":
- *             line.append( fields )             # <<<<<<<<<<<<<<
- *         # user tags
- *         elif record.islower():
- */
-    __pyx_t_4 = PyList_Append(__pyx_v_line, __pyx_v_fields); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-
-  /* "pysam/csamtools.pyx":1454
- *             line.append( fields )
- *         # user tags
- *         elif record.islower():             # <<<<<<<<<<<<<<
- *             for key in sorted(fields):
- *                 line.append( "%s:%s" % (key, str(fields[key])))
- */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__islower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __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_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":1455
- *         # user tags
- *         elif record.islower():
- *             for key in sorted(fields):             # <<<<<<<<<<<<<<
- *                 line.append( "%s:%s" % (key, str(fields[key])))
- *         # defined tags
- */
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_v_fields);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
-    __Pyx_GIVEREF(__pyx_v_fields);
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
-      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
-      __pyx_t_6 = NULL;
-    } else {
-      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
-    }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    for (;;) {
-      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_2 = __pyx_t_6(__pyx_t_1);
-        if (unlikely(!__pyx_t_2)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_2);
-      }
-      __Pyx_XDECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_t_2;
-      __pyx_t_2 = 0;
-
-      /* "pysam/csamtools.pyx":1456
- *         elif record.islower():
- *             for key in sorted(fields):
- *                 line.append( "%s:%s" % (key, str(fields[key])))             # <<<<<<<<<<<<<<
- *         # defined tags
- *         else:
- */
-      __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __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_t_2 = 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 = 1456; __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 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_INCREF(__pyx_v_key);
-      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
-      __Pyx_GIVEREF(__pyx_v_key);
-      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_121), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1460
- *         else:
- *             # write fields of the specification
- *             for key in VALID_HEADER_ORDER[record]:             # <<<<<<<<<<<<<<
- *                 if key in fields:
- *                     line.append( "%s:%s" % (key, str(fields[key])))
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_ORDER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
-      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
-      __pyx_t_6 = NULL;
-    } else {
-      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
-    }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    for (;;) {
-      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_2 = __pyx_t_6(__pyx_t_1);
-        if (unlikely(!__pyx_t_2)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_2);
-      }
-      __Pyx_XDECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_t_2;
-      __pyx_t_2 = 0;
-
-      /* "pysam/csamtools.pyx":1461
- *             # write fields of the specification
- *             for key in VALID_HEADER_ORDER[record]:
- *                 if key in fields:             # <<<<<<<<<<<<<<
- *                     line.append( "%s:%s" % (key, str(fields[key])))
- *             # write user fields
- */
-      __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_fields, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_3) {
-
-        /* "pysam/csamtools.pyx":1462
- *             for key in VALID_HEADER_ORDER[record]:
- *                 if key in fields:
- *                     line.append( "%s:%s" % (key, str(fields[key])))             # <<<<<<<<<<<<<<
- *             # write user fields
- *             for key in fields:
- */
-        __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __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_t_2 = 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 = 1462; __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 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_INCREF(__pyx_v_key);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
-        __Pyx_GIVEREF(__pyx_v_key);
-        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
-        __pyx_t_2 = 0;
-        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_121), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        goto __pyx_L8;
-      }
-      __pyx_L8:;
-    }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":1464
- *                     line.append( "%s:%s" % (key, str(fields[key])))
- *             # write user fields
- *             for key in fields:             # <<<<<<<<<<<<<<
- *                 if not key.isupper():
- *                     line.append( "%s:%s" % (key, str(fields[key])))
- */
-    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
-      __pyx_t_1 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
-      __pyx_t_6 = NULL;
-    } else {
-      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
-    }
-    for (;;) {
-      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_2 = __pyx_t_6(__pyx_t_1);
-        if (unlikely(!__pyx_t_2)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_2);
-      }
-      __Pyx_XDECREF(__pyx_v_key);
-      __pyx_v_key = __pyx_t_2;
-      __pyx_t_2 = 0;
-
-      /* "pysam/csamtools.pyx":1465
- *             # write user fields
- *             for key in fields:
- *                 if not key.isupper():             # <<<<<<<<<<<<<<
- *                     line.append( "%s:%s" % (key, str(fields[key])))
- * 
- */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__isupper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __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 = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_8 = (!__pyx_t_3);
-      if (__pyx_t_8) {
-
-        /* "pysam/csamtools.pyx":1466
- *             for key in fields:
- *                 if not key.isupper():
- *                     line.append( "%s:%s" % (key, str(fields[key])))             # <<<<<<<<<<<<<<
- * 
- *         return "\t".join( line )
- */
-        __pyx_t_7 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __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 = 1466; __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(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __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 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_INCREF(__pyx_v_key);
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
-        __Pyx_GIVEREF(__pyx_v_key);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        __pyx_t_7 = 0;
-        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_121), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        goto __pyx_L11;
-      }
-      __pyx_L11:;
-    }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1468
- *                     line.append( "%s:%s" % (key, str(fields[key])))
- * 
- *         return "\t".join( line )             # <<<<<<<<<<<<<<
- * 
- *     cdef bam_header_t * _buildHeader( self, new_header ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; __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 = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_INCREF(((PyObject *)__pyx_v_line));
-  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_line));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_line));
-  __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 = 1468; __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_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile._buildLine", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_line);
-  __Pyx_XDECREF(__pyx_v_key);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1470
- *         return "\t".join( line )
- * 
- *     cdef bam_header_t * _buildHeader( self, new_header ):             # <<<<<<<<<<<<<<
- *         '''return a new header built from a dictionary in *new_header*.
- * 
- */
-
-static bam_header_t *__pyx_f_5pysam_9csamtools_7Samfile__buildHeader(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_new_header) {
-  PyObject *__pyx_v_lines = NULL;
-  bam_header_t *__pyx_v_dest;
-  PyObject *__pyx_v_record = NULL;
-  PyObject *__pyx_v_ttype = NULL;
-  PyObject *__pyx_v_data = NULL;
-  PyObject *__pyx_v_fields = NULL;
-  PyObject *__pyx_v_text = NULL;
-  PyObject *__pyx_v_btext = 0;
-  PyObject *__pyx_v_bseqname = 0;
-  PyObject *__pyx_v_seqs = NULL;
-  long __pyx_v_x;
-  PyObject *__pyx_v_seqname = NULL;
-  PyObject *__pyx_v_seqlen = NULL;
-  bam_header_t *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  Py_ssize_t __pyx_t_3;
-  PyObject *(*__pyx_t_4)(PyObject *);
-  int __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  int __pyx_t_8;
-  Py_ssize_t __pyx_t_9;
-  PyObject *(*__pyx_t_10)(PyObject *);
-  PyObject *__pyx_t_11 = NULL;
-  PyObject *(*__pyx_t_12)(PyObject *);
-  char *__pyx_t_13;
-  PyObject *__pyx_t_14 = NULL;
-  PyObject *__pyx_t_15 = NULL;
-  PyObject *__pyx_t_16 = NULL;
-  int __pyx_t_17;
-  PyObject *__pyx_t_18 = NULL;
-  int32_t __pyx_t_19;
-  uint32_t __pyx_t_20;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_buildHeader", 0);
-  __Pyx_TraceCall("_buildHeader", __pyx_f[0], 1470);
-
-  /* "pysam/csamtools.pyx":1476
- *         '''
- * 
- *         lines = []             # <<<<<<<<<<<<<<
- * 
- *         # check if hash exists
- */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_lines = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":1483
- *         cdef bam_header_t * dest
- * 
- *         dest = bam_header_init()             # <<<<<<<<<<<<<<
- * 
- *         # first: defined tags
- */
-  __pyx_v_dest = bam_header_init();
-
-  /* "pysam/csamtools.pyx":1486
- * 
- *         # first: defined tags
- *         for record in VALID_HEADERS:             # <<<<<<<<<<<<<<
- *             if record in new_header:
- *                 ttype = VALID_HEADER_TYPES[record]
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADERS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __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_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
-    __pyx_t_4 = NULL;
-  } else {
-    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  for (;;) {
-    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
-      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
-      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else {
-      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
-      if (unlikely(!__pyx_t_1)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_1);
-    }
-    __Pyx_XDECREF(__pyx_v_record);
-    __pyx_v_record = __pyx_t_1;
-    __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":1487
- *         # first: defined tags
- *         for record in VALID_HEADERS:
- *             if record in new_header:             # <<<<<<<<<<<<<<
- *                 ttype = VALID_HEADER_TYPES[record]
- *                 data = new_header[record]
- */
-    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_v_new_header, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_5) {
-
-      /* "pysam/csamtools.pyx":1488
- *         for record in VALID_HEADERS:
- *             if record in new_header:
- *                 ttype = VALID_HEADER_TYPES[record]             # <<<<<<<<<<<<<<
- *                 data = new_header[record]
- *                 if type( data ) != type( ttype() ):
- */
-      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_XDECREF(__pyx_v_ttype);
-      __pyx_v_ttype = __pyx_t_6;
-      __pyx_t_6 = 0;
-
-      /* "pysam/csamtools.pyx":1489
- *             if record in new_header:
- *                 ttype = VALID_HEADER_TYPES[record]
- *                 data = new_header[record]             # <<<<<<<<<<<<<<
- *                 if type( data ) != type( ttype() ):
- *                     raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
- */
-      __pyx_t_6 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_XDECREF(__pyx_v_data);
-      __pyx_v_data = __pyx_t_6;
-      __pyx_t_6 = 0;
-
-      /* "pysam/csamtools.pyx":1490
- *                 ttype = VALID_HEADER_TYPES[record]
- *                 data = new_header[record]
- *                 if type( data ) != type( ttype() ):             # <<<<<<<<<<<<<<
- *                     raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
- *                 if type( data ) is dict:
- */
-      __pyx_t_6 = PyObject_Call(__pyx_v_ttype, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_data)), ((PyObject *)Py_TYPE(__pyx_t_6)), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      if (__pyx_t_5) {
-
-        /* "pysam/csamtools.pyx":1491
- *                 data = new_header[record]
- *                 if type( data ) != type( ttype() ):
- *                     raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )             # <<<<<<<<<<<<<<
- *                 if type( data ) is dict:
- *                     lines.append( self._buildLine( data, record ) )
- */
-        __pyx_t_1 = PyObject_Call(__pyx_v_ttype, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_INCREF(__pyx_v_record);
-        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_record);
-        __Pyx_GIVEREF(__pyx_v_record);
-        __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_data)));
-        PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)Py_TYPE(__pyx_v_data)));
-        __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_data)));
-        __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_1)));
-        PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)Py_TYPE(__pyx_t_1)));
-        __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_1)));
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_122), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-        __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 = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-        __pyx_t_1 = 0;
-        __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L6;
-      }
-      __pyx_L6:;
-
-      /* "pysam/csamtools.pyx":1492
- *                 if type( data ) != type( ttype() ):
- *                     raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
- *                 if type( data ) is dict:             # <<<<<<<<<<<<<<
- *                     lines.append( self._buildLine( data, record ) )
- *                 else:
- */
-      __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_data)) == ((PyObject *)((PyObject*)(&PyDict_Type))));
-      if (__pyx_t_5) {
-
-        /* "pysam/csamtools.pyx":1493
- *                     raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
- *                 if type( data ) is dict:
- *                     lines.append( self._buildLine( data, record ) )             # <<<<<<<<<<<<<<
- *                 else:
- *                     for fields in new_header[record]:
- */
-        __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_INCREF(__pyx_v_data);
-        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_data);
-        __Pyx_GIVEREF(__pyx_v_data);
-        __Pyx_INCREF(__pyx_v_record);
-        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_record);
-        __Pyx_GIVEREF(__pyx_v_record);
-        __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-        __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        goto __pyx_L7;
-      }
-      /*else*/ {
-
-        /* "pysam/csamtools.pyx":1495
- *                     lines.append( self._buildLine( data, record ) )
- *                 else:
- *                     for fields in new_header[record]:             # <<<<<<<<<<<<<<
- *                         lines.append( self._buildLine( fields, record ) )
- * 
- */
-        __pyx_t_7 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __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_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
-          __pyx_t_10 = NULL;
-        } else {
-          __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext;
-        }
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        for (;;) {
-          if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_6)) {
-            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
-            #if CYTHON_COMPILING_IN_CPYTHON
-            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #else
-            __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
-          } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_6)) {
-            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
-            #if CYTHON_COMPILING_IN_CPYTHON
-            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #else
-            __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
-          } else {
-            __pyx_t_7 = __pyx_t_10(__pyx_t_6);
-            if (unlikely(!__pyx_t_7)) {
-              if (PyErr_Occurred()) {
-                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              }
-              break;
-            }
-            __Pyx_GOTREF(__pyx_t_7);
-          }
-          __Pyx_XDECREF(__pyx_v_fields);
-          __pyx_v_fields = __pyx_t_7;
-          __pyx_t_7 = 0;
-
-          /* "pysam/csamtools.pyx":1496
- *                 else:
- *                     for fields in new_header[record]:
- *                         lines.append( self._buildLine( fields, record ) )             # <<<<<<<<<<<<<<
- * 
- *         # then: user tags (lower case), sorted alphabetically
- */
-          __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_INCREF(__pyx_v_fields);
-          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
-          __Pyx_GIVEREF(__pyx_v_fields);
-          __Pyx_INCREF(__pyx_v_record);
-          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record);
-          __Pyx_GIVEREF(__pyx_v_record);
-          __pyx_t_11 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_11);
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-          __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_11); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-        }
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      }
-      __pyx_L7:;
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
-  }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1499
- * 
- *         # then: user tags (lower case), sorted alphabetically
- *         for record, data in sorted(new_header.items()):             # <<<<<<<<<<<<<<
- *             if record in VALID_HEADERS: continue
- *             if type( data ) is dict:
- */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_new_header, __pyx_n_s__items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __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 = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
-  __Pyx_GIVEREF(__pyx_t_6);
-  __pyx_t_6 = 0;
-  __pyx_t_6 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
-    __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
-    __pyx_t_4 = NULL;
-  } else {
-    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
-  }
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  for (;;) {
-    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
-      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
-      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else {
-      __pyx_t_6 = __pyx_t_4(__pyx_t_2);
-      if (unlikely(!__pyx_t_6)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_6);
-    }
-    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
-      PyObject* sequence = __pyx_t_6;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      Py_ssize_t size = Py_SIZE(sequence);
-      #else
-      Py_ssize_t size = PySequence_Size(sequence);
-      #endif
-      if (unlikely(size != 2)) {
-        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #if CYTHON_COMPILING_IN_CPYTHON
-      if (likely(PyTuple_CheckExact(sequence))) {
-        __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
-        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
-      } else {
-        __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
-      }
-      __Pyx_INCREF(__pyx_t_11);
-      __Pyx_INCREF(__pyx_t_1);
-      #else
-      __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      #endif
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    } else
-    {
-      Py_ssize_t index = -1;
-      __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext;
-      index = 0; __pyx_t_11 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_11)) goto __pyx_L12_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_11);
-      index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_1);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_12 = NULL;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      goto __pyx_L13_unpacking_done;
-      __pyx_L12_unpacking_failed:;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_12 = NULL;
-      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L13_unpacking_done:;
-    }
-    __Pyx_XDECREF(__pyx_v_record);
-    __pyx_v_record = __pyx_t_11;
-    __pyx_t_11 = 0;
-    __Pyx_XDECREF(__pyx_v_data);
-    __pyx_v_data = __pyx_t_1;
-    __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":1500
- *         # then: user tags (lower case), sorted alphabetically
- *         for record, data in sorted(new_header.items()):
- *             if record in VALID_HEADERS: continue             # <<<<<<<<<<<<<<
- *             if type( data ) is dict:
- *                 lines.append( self._buildLine( data, record ) )
- */
-    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADERS); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    if (__pyx_t_5) {
-      goto __pyx_L10_continue;
-      goto __pyx_L14;
-    }
-    __pyx_L14:;
-
-    /* "pysam/csamtools.pyx":1501
- *         for record, data in sorted(new_header.items()):
- *             if record in VALID_HEADERS: continue
- *             if type( data ) is dict:             # <<<<<<<<<<<<<<
- *                 lines.append( self._buildLine( data, record ) )
- *             else:
- */
-    __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_data)) == ((PyObject *)((PyObject*)(&PyDict_Type))));
-    if (__pyx_t_5) {
-
-      /* "pysam/csamtools.pyx":1502
- *             if record in VALID_HEADERS: continue
- *             if type( data ) is dict:
- *                 lines.append( self._buildLine( data, record ) )             # <<<<<<<<<<<<<<
- *             else:
- *                 for fields in new_header[record]:
- */
-      __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __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 = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_INCREF(__pyx_v_data);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
-      __Pyx_GIVEREF(__pyx_v_data);
-      __Pyx_INCREF(__pyx_v_record);
-      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record);
-      __Pyx_GIVEREF(__pyx_v_record);
-      __pyx_t_11 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_11); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      goto __pyx_L15;
-    }
-    /*else*/ {
-
-      /* "pysam/csamtools.pyx":1504
- *                 lines.append( self._buildLine( data, record ) )
- *             else:
- *                 for fields in new_header[record]:             # <<<<<<<<<<<<<<
- *                     lines.append( self._buildLine( fields, record ) )
- * 
- */
-      __pyx_t_11 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      if (PyList_CheckExact(__pyx_t_11) || PyTuple_CheckExact(__pyx_t_11)) {
-        __pyx_t_1 = __pyx_t_11; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
-        __pyx_t_10 = NULL;
-      } else {
-        __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext;
-      }
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      for (;;) {
-        if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_1)) {
-          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_1)) {
-          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          __pyx_t_11 = __pyx_t_10(__pyx_t_1);
-          if (unlikely(!__pyx_t_11)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            }
-            break;
-          }
-          __Pyx_GOTREF(__pyx_t_11);
-        }
-        __Pyx_XDECREF(__pyx_v_fields);
-        __pyx_v_fields = __pyx_t_11;
-        __pyx_t_11 = 0;
-
-        /* "pysam/csamtools.pyx":1505
- *             else:
- *                 for fields in new_header[record]:
- *                     lines.append( self._buildLine( fields, record ) )             # <<<<<<<<<<<<<<
- * 
- *         text = "\n".join(lines) + "\n"
- */
-        __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_11);
-        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_INCREF(__pyx_v_fields);
-        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_fields);
-        __Pyx_GIVEREF(__pyx_v_fields);
-        __Pyx_INCREF(__pyx_v_record);
-        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_record);
-        __Pyx_GIVEREF(__pyx_v_record);
-        __pyx_t_7 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-        __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      }
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    }
-    __pyx_L15:;
-    __pyx_L10_continue:;
-  }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1507
- *                     lines.append( self._buildLine( fields, record ) )
- * 
- *         text = "\n".join(lines) + "\n"             # <<<<<<<<<<<<<<
- *         if dest.text != NULL: free( dest.text )
- *         dest.text = <char*>calloc( len(text), sizeof(char))
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __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 = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_v_lines));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_lines));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_lines));
-  __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_1 = PyNumber_Add(__pyx_t_7, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_v_text = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":1508
- * 
- *         text = "\n".join(lines) + "\n"
- *         if dest.text != NULL: free( dest.text )             # <<<<<<<<<<<<<<
- *         dest.text = <char*>calloc( len(text), sizeof(char))
- *         dest.l_text = len(text)
- */
-  __pyx_t_5 = (__pyx_v_dest->text != NULL);
-  if (__pyx_t_5) {
-    free(__pyx_v_dest->text);
-    goto __pyx_L18;
-  }
-  __pyx_L18:;
-
-  /* "pysam/csamtools.pyx":1509
- *         text = "\n".join(lines) + "\n"
- *         if dest.text != NULL: free( dest.text )
- *         dest.text = <char*>calloc( len(text), sizeof(char))             # <<<<<<<<<<<<<<
- *         dest.l_text = len(text)
- *         cdef bytes btext = text.encode('ascii')
- */
-  __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_dest->text = ((char *)calloc(__pyx_t_3, (sizeof(char))));
-
-  /* "pysam/csamtools.pyx":1510
- *         if dest.text != NULL: free( dest.text )
- *         dest.text = <char*>calloc( len(text), sizeof(char))
- *         dest.l_text = len(text)             # <<<<<<<<<<<<<<
- *         cdef bytes btext = text.encode('ascii')
- *         strncpy( dest.text, btext, dest.l_text )
- */
-  __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_dest->l_text = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":1511
- *         dest.text = <char*>calloc( len(text), sizeof(char))
- *         dest.l_text = len(text)
- *         cdef bytes btext = text.encode('ascii')             # <<<<<<<<<<<<<<
- *         strncpy( dest.text, btext, dest.l_text )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_text, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_123), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_btext = ((PyObject*)__pyx_t_7);
-  __pyx_t_7 = 0;
-
-  /* "pysam/csamtools.pyx":1512
- *         dest.l_text = len(text)
- *         cdef bytes btext = text.encode('ascii')
- *         strncpy( dest.text, btext, dest.l_text )             # <<<<<<<<<<<<<<
- * 
- *         cdef bytes bseqname
- */
-  __pyx_t_13 = PyBytes_AsString(((PyObject *)__pyx_v_btext)); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  strncpy(__pyx_v_dest->text, __pyx_t_13, __pyx_v_dest->l_text);
-
-  /* "pysam/csamtools.pyx":1516
- *         cdef bytes bseqname
- *         # collect targets
- *         if "SQ" in new_header:             # <<<<<<<<<<<<<<
- *             seqs = []
- *             for fields in new_header["SQ"]:
- */
-  __pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__SQ), __pyx_v_new_header, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":1517
- *         # collect targets
- *         if "SQ" in new_header:
- *             seqs = []             # <<<<<<<<<<<<<<
- *             for fields in new_header["SQ"]:
- *                 try:
- */
-    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_v_seqs = ((PyObject*)__pyx_t_7);
-    __pyx_t_7 = 0;
-
-    /* "pysam/csamtools.pyx":1518
- *         if "SQ" in new_header:
- *             seqs = []
- *             for fields in new_header["SQ"]:             # <<<<<<<<<<<<<<
- *                 try:
- *                     seqs.append( (fields["SN"], fields["LN"] ) )
- */
-    __pyx_t_7 = PyObject_GetItem(__pyx_v_new_header, ((PyObject *)__pyx_n_s__SQ)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __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_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
-      __pyx_t_4 = NULL;
-    } else {
-      __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
-    }
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    for (;;) {
-      if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_7 = __pyx_t_4(__pyx_t_1);
-        if (unlikely(!__pyx_t_7)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_7);
-      }
-      __Pyx_XDECREF(__pyx_v_fields);
-      __pyx_v_fields = __pyx_t_7;
-      __pyx_t_7 = 0;
-
-      /* "pysam/csamtools.pyx":1519
- *             seqs = []
- *             for fields in new_header["SQ"]:
- *                 try:             # <<<<<<<<<<<<<<
- *                     seqs.append( (fields["SN"], fields["LN"] ) )
- *                 except KeyError:
- */
-      {
-        __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
-        __Pyx_XGOTREF(__pyx_t_14);
-        __Pyx_XGOTREF(__pyx_t_15);
-        __Pyx_XGOTREF(__pyx_t_16);
-        /*try:*/ {
-
-          /* "pysam/csamtools.pyx":1520
- *             for fields in new_header["SQ"]:
- *                 try:
- *                     seqs.append( (fields["SN"], fields["LN"] ) )             # <<<<<<<<<<<<<<
- *                 except KeyError:
- *                     raise KeyError( "incomplete sequence information in '%s'" % str(fields))
- */
-          __pyx_t_7 = PyObject_GetItem(__pyx_v_fields, ((PyObject *)__pyx_n_s__SN)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, ((PyObject *)__pyx_n_s__LN)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
-          __Pyx_GIVEREF(__pyx_t_7);
-          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
-          __Pyx_GIVEREF(__pyx_t_2);
-          __pyx_t_7 = 0;
-          __pyx_t_2 = 0;
-          __pyx_t_8 = PyList_Append(__pyx_v_seqs, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
-          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-        }
-        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
-        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
-        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-        goto __pyx_L29_try_end;
-        __pyx_L22_error:;
-        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-        /* "pysam/csamtools.pyx":1521
- *                 try:
- *                     seqs.append( (fields["SN"], fields["LN"] ) )
- *                 except KeyError:             # <<<<<<<<<<<<<<
- *                     raise KeyError( "incomplete sequence information in '%s'" % str(fields))
- * 
- */
-        __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
-        if (__pyx_t_17) {
-          __Pyx_AddTraceback("pysam.csamtools.Samfile._buildHeader", __pyx_clineno, __pyx_lineno, __pyx_filename);
-          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_GOTREF(__pyx_t_7);
-
-          /* "pysam/csamtools.pyx":1522
- *                     seqs.append( (fields["SN"], fields["LN"] ) )
- *                 except KeyError:
- *                     raise KeyError( "incomplete sequence information in '%s'" % str(fields))             # <<<<<<<<<<<<<<
- * 
- *             dest.n_targets = len(seqs)
- */
-          __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
-          __Pyx_GOTREF(__pyx_t_11);
-          __Pyx_INCREF(__pyx_v_fields);
-          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_fields);
-          __Pyx_GIVEREF(__pyx_v_fields);
-          __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
-          __Pyx_GOTREF(__pyx_t_18);
-          __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
-          __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_124), __pyx_t_18); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_11));
-          __Pyx_DECREF(__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 = 1522; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
-          __Pyx_GOTREF(__pyx_t_18);
-          PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_t_11));
-          __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
-          __pyx_t_11 = 0;
-          __pyx_t_11 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
-          __Pyx_GOTREF(__pyx_t_11);
-          __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
-          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
-          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          goto __pyx_L23_exception_handled;
-        }
-        __pyx_L24_except_error:;
-        __Pyx_XGIVEREF(__pyx_t_14);
-        __Pyx_XGIVEREF(__pyx_t_15);
-        __Pyx_XGIVEREF(__pyx_t_16);
-        __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
-        goto __pyx_L1_error;
-        __pyx_L23_exception_handled:;
-        __Pyx_XGIVEREF(__pyx_t_14);
-        __Pyx_XGIVEREF(__pyx_t_15);
-        __Pyx_XGIVEREF(__pyx_t_16);
-        __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
-        __pyx_L29_try_end:;
-      }
-    }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":1524
- *                     raise KeyError( "incomplete sequence information in '%s'" % str(fields))
- * 
- *             dest.n_targets = len(seqs)             # <<<<<<<<<<<<<<
- *             dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )
- *             dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
- */
-    __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_seqs)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_dest->n_targets = __pyx_t_3;
-
-    /* "pysam/csamtools.pyx":1525
- * 
- *             dest.n_targets = len(seqs)
- *             dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )             # <<<<<<<<<<<<<<
- *             dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
- * 
- */
-    __pyx_v_dest->target_name = ((char **)calloc(__pyx_v_dest->n_targets, (sizeof(char *))));
-
-    /* "pysam/csamtools.pyx":1526
- *             dest.n_targets = len(seqs)
- *             dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )
- *             dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )             # <<<<<<<<<<<<<<
- * 
- *             for x from 0 <= x < dest.n_targets:
- */
-    __pyx_v_dest->target_len = ((uint32_t *)calloc(__pyx_v_dest->n_targets, (sizeof(uint32_t))));
-
-    /* "pysam/csamtools.pyx":1528
- *             dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
- * 
- *             for x from 0 <= x < dest.n_targets:             # <<<<<<<<<<<<<<
- *                 seqname, seqlen = seqs[x]
- *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
- */
-    __pyx_t_19 = __pyx_v_dest->n_targets;
-    for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_19; __pyx_v_x++) {
-
-      /* "pysam/csamtools.pyx":1529
- * 
- *             for x from 0 <= x < dest.n_targets:
- *                 seqname, seqlen = seqs[x]             # <<<<<<<<<<<<<<
- *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
- *                 bseqname = seqname.encode('ascii')
- */
-      __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_seqs), __pyx_v_x, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
-        PyObject* sequence = __pyx_t_1;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        Py_ssize_t size = Py_SIZE(sequence);
-        #else
-        Py_ssize_t size = PySequence_Size(sequence);
-        #endif
-        if (unlikely(size != 2)) {
-          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        #if CYTHON_COMPILING_IN_CPYTHON
-        if (likely(PyTuple_CheckExact(sequence))) {
-          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
-          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
-        } else {
-          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
-          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
-        }
-        __Pyx_INCREF(__pyx_t_7);
-        __Pyx_INCREF(__pyx_t_2);
-        #else
-        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        #endif
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      } else
-      {
-        Py_ssize_t index = -1;
-        __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
-        index = 0; __pyx_t_7 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L34_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_7);
-        index = 1; __pyx_t_2 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L34_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_2);
-        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_12 = NULL;
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        goto __pyx_L35_unpacking_done;
-        __pyx_L34_unpacking_failed:;
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __pyx_t_12 = NULL;
-        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_L35_unpacking_done:;
-      }
-      __Pyx_XDECREF(__pyx_v_seqname);
-      __pyx_v_seqname = __pyx_t_7;
-      __pyx_t_7 = 0;
-      __Pyx_XDECREF(__pyx_v_seqlen);
-      __pyx_v_seqlen = __pyx_t_2;
-      __pyx_t_2 = 0;
-
-      /* "pysam/csamtools.pyx":1530
- *             for x from 0 <= x < dest.n_targets:
- *                 seqname, seqlen = seqs[x]
- *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )             # <<<<<<<<<<<<<<
- *                 bseqname = seqname.encode('ascii')
- *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
- */
-      __pyx_t_3 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      (__pyx_v_dest->target_name[__pyx_v_x]) = ((char *)calloc((__pyx_t_3 + 1), (sizeof(char))));
-
-      /* "pysam/csamtools.pyx":1531
- *                 seqname, seqlen = seqs[x]
- *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
- *                 bseqname = seqname.encode('ascii')             # <<<<<<<<<<<<<<
- *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
- *                 dest.target_len[x] = seqlen
- */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_seqname, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __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 = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_XDECREF(((PyObject *)__pyx_v_bseqname));
-      __pyx_v_bseqname = ((PyObject*)__pyx_t_2);
-      __pyx_t_2 = 0;
-
-      /* "pysam/csamtools.pyx":1532
- *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
- *                 bseqname = seqname.encode('ascii')
- *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )             # <<<<<<<<<<<<<<
- *                 dest.target_len[x] = seqlen
- * 
- */
-      __pyx_t_13 = PyBytes_AsString(((PyObject *)__pyx_v_bseqname)); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_3 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      strncpy((__pyx_v_dest->target_name[__pyx_v_x]), __pyx_t_13, (__pyx_t_3 + 1));
-
-      /* "pysam/csamtools.pyx":1533
- *                 bseqname = seqname.encode('ascii')
- *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
- *                 dest.target_len[x] = seqlen             # <<<<<<<<<<<<<<
- * 
- *         return dest
- */
-      __pyx_t_20 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_seqlen); if (unlikely((__pyx_t_20 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      (__pyx_v_dest->target_len[__pyx_v_x]) = __pyx_t_20;
-    }
-    goto __pyx_L19;
-  }
-  __pyx_L19:;
-
-  /* "pysam/csamtools.pyx":1535
- *                 dest.target_len[x] = seqlen
- * 
- *         return dest             # <<<<<<<<<<<<<<
- * 
- *     ###############################################################
- */
-  __pyx_r = __pyx_v_dest;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_XDECREF(__pyx_t_18);
-  __Pyx_WriteUnraisable("pysam.csamtools.Samfile._buildHeader", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_lines);
-  __Pyx_XDECREF(__pyx_v_record);
-  __Pyx_XDECREF(__pyx_v_ttype);
-  __Pyx_XDECREF(__pyx_v_data);
-  __Pyx_XDECREF(__pyx_v_fields);
-  __Pyx_XDECREF(__pyx_v_text);
-  __Pyx_XDECREF(__pyx_v_btext);
-  __Pyx_XDECREF(__pyx_v_bseqname);
-  __Pyx_XDECREF(__pyx_v_seqs);
-  __Pyx_XDECREF(__pyx_v_seqname);
-  __Pyx_XDECREF(__pyx_v_seqlen);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_41__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_41__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_40__iter__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1545
- *     ## Possible solutions: deprecate or open new file handle
- *     ###############################################################
- *     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:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_40__iter__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-  __Pyx_TraceCall("__iter__", __pyx_f[0], 1545);
-
-  /* "pysam/csamtools.pyx":1546
- *     ###############################################################
- *     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")
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __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 = 1546; __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 = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_126), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1547
- *     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
- */
-  __pyx_t_4 = (!__pyx_v_self->isbam);
-  if (__pyx_t_4) {
-    __pyx_t_3 = (__pyx_v_self->samfile->header->n_targets == 0);
-    __pyx_t_5 = __pyx_t_3;
-  } else {
-    __pyx_t_5 = __pyx_t_4;
-  }
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":1548
- *         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
- * 
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_128), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1549
- *         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 ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1551
- *         return self
- * 
- *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
- *         return self.b
- * 
- */
-
-static bam1_t *__pyx_f_5pysam_9csamtools_7Samfile_getCurrent(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  bam1_t *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("getCurrent", 0);
-  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1551);
-
-  /* "pysam/csamtools.pyx":1552
- * 
- *     cdef bam1_t * getCurrent( self ):
- *         return self.b             # <<<<<<<<<<<<<<
- * 
- *     cdef int cnext(self):
- */
-  __pyx_r = __pyx_v_self->b;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1554
- *         return self.b
- * 
- *     cdef int cnext(self):             # <<<<<<<<<<<<<<
- *         '''
- *         cversion of iterator. Used by :class:`pysam.Samfile.IteratorColumn`.
- */
-
-static int __pyx_f_5pysam_9csamtools_7Samfile_cnext(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("cnext", 0);
-  __Pyx_TraceCall("cnext", __pyx_f[0], 1554);
-
-  /* "pysam/csamtools.pyx":1559
- *         '''
- *         cdef int ret
- *         return samread(self.samfile, self.b)             # <<<<<<<<<<<<<<
- * 
- *     def __next__(self):
- */
-  __pyx_r = samread(__pyx_v_self->samfile, __pyx_v_self->b);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_43__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_7Samfile_42__next__[] = "\n        python version of next().\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_7Samfile_42__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_7Samfile_43__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_42__next__(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1561
- *         return samread(self.samfile, self.b)
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """
- *         python version of next().
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_42__next__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self) {
-  int __pyx_v_ret;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__next__", 0);
-  __Pyx_TraceCall("__next__", __pyx_f[0], 1561);
-
-  /* "pysam/csamtools.pyx":1566
- *         """
- *         cdef int ret
- *         ret = samread(self.samfile, self.b)             # <<<<<<<<<<<<<<
- *         if (ret > 0):
- *             return makeAlignedRead( self.b )
- */
-  __pyx_v_ret = samread(__pyx_v_self->samfile, __pyx_v_self->b);
-
-  /* "pysam/csamtools.pyx":1567
- *         cdef int ret
- *         ret = samread(self.samfile, self.b)
- *         if (ret > 0):             # <<<<<<<<<<<<<<
- *             return makeAlignedRead( self.b )
- *         else:
- */
-  __pyx_t_1 = (__pyx_v_ret > 0);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":1568
- *         ret = samread(self.samfile, self.b)
- *         if (ret > 0):
- *             return makeAlignedRead( self.b )             # <<<<<<<<<<<<<<
- *         else:
- *             raise StopIteration
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1570
- *             return makeAlignedRead( self.b )
- *         else:
- *             raise StopIteration             # <<<<<<<<<<<<<<
- * 
- * ##-------------------------------------------------------------------
- */
-    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.Samfile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_17IteratorRowRegion_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_17IteratorRowRegion_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile = 0;
-  int __pyx_v_tid;
-  int __pyx_v_beg;
-  int __pyx_v_end;
-  int __pyx_v_reopen;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,&__pyx_n_s__tid,&__pyx_n_s__beg,&__pyx_n_s__end,&__pyx_n_s__reopen,0};
-    PyObject* values[5] = {0,0,0,0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samfile)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tid)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__beg)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  3:
-        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  4:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reopen);
-          if (value) { values[4] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
-    __pyx_v_tid = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_beg = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_beg == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_end = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    if (values[4]) {
-      __pyx_v_reopen = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-
-      /* "pysam/csamtools.pyx":1625
- *     """
- * 
- *     def __cinit__(self, Samfile samfile, int tid, int beg, int end, int reopen = True ):             # <<<<<<<<<<<<<<
- * 
- *         if not samfile._isOpen():
- */
-      __pyx_v_reopen = ((int)1);
-    }
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowRegion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_17IteratorRowRegion___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self), __pyx_v_samfile, __pyx_v_tid, __pyx_v_beg, __pyx_v_end, __pyx_v_reopen);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-static int __pyx_pf_5pysam_9csamtools_17IteratorRowRegion___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, int __pyx_v_tid, int __pyx_v_beg, int __pyx_v_end, int __pyx_v_reopen) {
-  PyObject *__pyx_v_mode = NULL;
-  PyObject *__pyx_v_store = NULL;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  const char* __pyx_t_5;
-  char *__pyx_t_6;
-  samfile_t *__pyx_t_7;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1625);
-
-  /* "pysam/csamtools.pyx":1627
- *     def __cinit__(self, Samfile samfile, int tid, int beg, int end, int reopen = True ):
- * 
- *         if not samfile._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __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 = 1627; __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 = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1628
- * 
- *         if not samfile._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         if not samfile._hasIndex():
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_129), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1630
- *             raise ValueError( "I/O operation on closed file" )
- * 
- *         if not samfile._hasIndex():             # <<<<<<<<<<<<<<
- *             raise ValueError( "no index available for iteration" )
- * 
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = (!__pyx_t_4);
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":1631
- * 
- *         if not samfile._hasIndex():
- *             raise ValueError( "no index available for iteration" )             # <<<<<<<<<<<<<<
- * 
- *         # makes sure that samfile stays alive as long as the
- */
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_131), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1635
- *         # makes sure that samfile stays alive as long as the
- *         # iterator is alive
- *         self.samfile = samfile             # <<<<<<<<<<<<<<
- * 
- *         if samfile.isbam: mode = b"rb"
- */
-  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
-  __Pyx_GOTREF(__pyx_v_self->samfile);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
-  __pyx_v_self->samfile = __pyx_v_samfile;
-
-  /* "pysam/csamtools.pyx":1637
- *         self.samfile = samfile
- * 
- *         if samfile.isbam: mode = b"rb"             # <<<<<<<<<<<<<<
- *         else: mode = b"r"
- * 
- */
-  if (__pyx_v_samfile->isbam) {
-    __Pyx_INCREF(((PyObject *)__pyx_n_b__rb));
-    __pyx_v_mode = __pyx_n_b__rb;
-    goto __pyx_L5;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1638
- * 
- *         if samfile.isbam: mode = b"rb"
- *         else: mode = b"r"             # <<<<<<<<<<<<<<
- * 
- *         # reopen the file - note that this makes the iterator
- */
-    __Pyx_INCREF(((PyObject *)__pyx_n_b__r));
-    __pyx_v_mode = __pyx_n_b__r;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":1642
- *         # reopen the file - note that this makes the iterator
- *         # slow and causes pileup to slow down significantly.
- *         if reopen:             # <<<<<<<<<<<<<<
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )
- */
-  if (__pyx_v_reopen) {
-
-    /* "pysam/csamtools.pyx":1643
- *         # slow and causes pileup to slow down significantly.
- *         if reopen:
- *             store = StderrStore()             # <<<<<<<<<<<<<<
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __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 = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_v_store = __pyx_t_2;
-    __pyx_t_2 = 0;
-
-    /* "pysam/csamtools.pyx":1644
- *         if reopen:
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )             # <<<<<<<<<<<<<<
- *             store.release()
- *             assert self.fp != NULL
- */
-    __pyx_t_5 = PyBytes_AsString(__pyx_v_samfile->_filename); if (unlikely((__pyx_t_5 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->fp = samopen(__pyx_t_5, __pyx_t_6, NULL);
-
-    /* "pysam/csamtools.pyx":1645
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()             # <<<<<<<<<<<<<<
- *             assert self.fp != NULL
- *             self.owns_samfile = True
- */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":1646
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()
- *             assert self.fp != NULL             # <<<<<<<<<<<<<<
- *             self.owns_samfile = True
- *         else:
- */
-    #ifndef CYTHON_WITHOUT_ASSERTIONS
-    if (unlikely(!(__pyx_v_self->fp != NULL))) {
-      PyErr_SetNone(PyExc_AssertionError);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #endif
-
-    /* "pysam/csamtools.pyx":1647
- *             store.release()
- *             assert self.fp != NULL
- *             self.owns_samfile = True             # <<<<<<<<<<<<<<
- *         else:
- *             self.fp = self.samfile.samfile
- */
-    __pyx_v_self->owns_samfile = 1;
-    goto __pyx_L6;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1649
- *             self.owns_samfile = True
- *         else:
- *             self.fp = self.samfile.samfile             # <<<<<<<<<<<<<<
- *             self.owns_samfile = False
- * 
- */
-    __pyx_t_7 = __pyx_v_self->samfile->samfile;
-    __pyx_v_self->fp = __pyx_t_7;
-
-    /* "pysam/csamtools.pyx":1650
- *         else:
- *             self.fp = self.samfile.samfile
- *             self.owns_samfile = False             # <<<<<<<<<<<<<<
- * 
- *         self.retval = 0
- */
-    __pyx_v_self->owns_samfile = 0;
-  }
-  __pyx_L6:;
-
-  /* "pysam/csamtools.pyx":1652
- *             self.owns_samfile = False
- * 
- *         self.retval = 0             # <<<<<<<<<<<<<<
- * 
- *         self.iter = bam_iter_query(self.samfile.index,
- */
-  __pyx_v_self->retval = 0;
-
-  /* "pysam/csamtools.pyx":1654
- *         self.retval = 0
- * 
- *         self.iter = bam_iter_query(self.samfile.index,             # <<<<<<<<<<<<<<
- *                                    tid,
- *                                    beg,
- */
-  __pyx_v_self->iter = bam_iter_query(__pyx_v_self->samfile->index, __pyx_v_tid, __pyx_v_beg, __pyx_v_end);
-
-  /* "pysam/csamtools.pyx":1658
- *                                    beg,
- *                                    end)
- *         self.b = bam_init1()             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __pyx_v_self->b = bam_init1();
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowRegion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_mode);
-  __Pyx_XDECREF(__pyx_v_store);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_17IteratorRowRegion_3__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_17IteratorRowRegion_3__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_17IteratorRowRegion_2__iter__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1660
- *         self.b = bam_init1()
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_17IteratorRowRegion_2__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-  __Pyx_TraceCall("__iter__", __pyx_f[0], 1660);
-
-  /* "pysam/csamtools.pyx":1661
- * 
- *     def __iter__(self):
- *         return self             # <<<<<<<<<<<<<<
- * 
- *     cdef bam1_t * getCurrent( self ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1663
- *         return self
- * 
- *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
- *         return self.b
- * 
- */
-
-static bam1_t *__pyx_f_5pysam_9csamtools_17IteratorRowRegion_getCurrent(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self) {
-  bam1_t *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("getCurrent", 0);
-  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1663);
-
-  /* "pysam/csamtools.pyx":1664
- * 
- *     cdef bam1_t * getCurrent( self ):
- *         return self.b             # <<<<<<<<<<<<<<
- * 
- *     cdef int cnext(self):
- */
-  __pyx_r = __pyx_v_self->b;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1666
- *         return self.b
- * 
- *     cdef int cnext(self):             # <<<<<<<<<<<<<<
- *         '''cversion of iterator. Used by IteratorColumn'''
- *         self.retval = bam_iter_read( self.fp.x.bam,
- */
-
-static int __pyx_f_5pysam_9csamtools_17IteratorRowRegion_cnext(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("cnext", 0);
-  __Pyx_TraceCall("cnext", __pyx_f[0], 1666);
-
-  /* "pysam/csamtools.pyx":1668
- *     cdef int cnext(self):
- *         '''cversion of iterator. Used by IteratorColumn'''
- *         self.retval = bam_iter_read( self.fp.x.bam,             # <<<<<<<<<<<<<<
- *                                      self.iter,
- *                                      self.b)
- */
-  __pyx_v_self->retval = bam_iter_read(__pyx_v_self->fp->x.bam, __pyx_v_self->iter, __pyx_v_self->b);
-
-  __pyx_r = 0;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_17IteratorRowRegion_5__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_17IteratorRowRegion_4__next__[] = "python version of next().\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_17IteratorRowRegion_4__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_17IteratorRowRegion_5__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_17IteratorRowRegion_4__next__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1672
- *                                      self.b)
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- *         """
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_17IteratorRowRegion_4__next__(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__next__", 0);
-  __Pyx_TraceCall("__next__", __pyx_f[0], 1672);
-
-  /* "pysam/csamtools.pyx":1675
- *         """python version of next().
- *         """
- *         self.cnext()             # <<<<<<<<<<<<<<
- *         if self.retval < 0: raise StopIteration
- *         return makeAlignedRead( self.b )
- */
-  ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self->__pyx_vtab)->cnext(__pyx_v_self);
-
-  /* "pysam/csamtools.pyx":1676
- *         """
- *         self.cnext()
- *         if self.retval < 0: raise StopIteration             # <<<<<<<<<<<<<<
- *         return makeAlignedRead( self.b )
- * 
- */
-  __pyx_t_1 = (__pyx_v_self->retval < 0);
-  if (__pyx_t_1) {
-    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1677
- *         self.cnext()
- *         if self.retval < 0: raise StopIteration
- *         return makeAlignedRead( self.b )             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowRegion.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_17IteratorRowRegion_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_17IteratorRowRegion_7__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_17IteratorRowRegion_6__dealloc__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":1679
- *         return makeAlignedRead( self.b )
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         bam_destroy1(self.b)
- *         bam_iter_destroy( self.iter )
- */
-
-static void __pyx_pf_5pysam_9csamtools_17IteratorRowRegion_6__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1679);
-
-  /* "pysam/csamtools.pyx":1680
- * 
- *     def __dealloc__(self):
- *         bam_destroy1(self.b)             # <<<<<<<<<<<<<<
- *         bam_iter_destroy( self.iter )
- *         if self.owns_samfile: samclose( self.fp )
- */
-  bam_destroy1(__pyx_v_self->b);
-
-  /* "pysam/csamtools.pyx":1681
- *     def __dealloc__(self):
- *         bam_destroy1(self.b)
- *         bam_iter_destroy( self.iter )             # <<<<<<<<<<<<<<
- *         if self.owns_samfile: samclose( self.fp )
- * 
- */
-  bam_iter_destroy(__pyx_v_self->iter);
-
-  /* "pysam/csamtools.pyx":1682
- *         bam_destroy1(self.b)
- *         bam_iter_destroy( self.iter )
- *         if self.owns_samfile: samclose( self.fp )             # <<<<<<<<<<<<<<
- * 
- * cdef class IteratorRowAll(IteratorRow):
- */
-  if (__pyx_v_self->owns_samfile) {
-    samclose(__pyx_v_self->fp);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_14IteratorRowAll_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_14IteratorRowAll_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile = 0;
-  int __pyx_v_reopen;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,&__pyx_n_s__reopen,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samfile)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reopen);
-          if (value) { values[1] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
-    if (values[1]) {
-      __pyx_v_reopen = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-
-      /* "pysam/csamtools.pyx":1700
- *     """
- * 
- *     def __cinit__(self, Samfile samfile, int reopen = True ):             # <<<<<<<<<<<<<<
- * 
- *         if not samfile._isOpen():
- */
-      __pyx_v_reopen = ((int)1);
-    }
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowAll.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorRowAll___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *)__pyx_v_self), __pyx_v_samfile, __pyx_v_reopen);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-static int __pyx_pf_5pysam_9csamtools_14IteratorRowAll___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, int __pyx_v_reopen) {
-  PyObject *__pyx_v_mode = NULL;
-  PyObject *__pyx_v_store = NULL;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  const char* __pyx_t_5;
-  char *__pyx_t_6;
-  samfile_t *__pyx_t_7;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1700);
-
-  /* "pysam/csamtools.pyx":1702
- *     def __cinit__(self, Samfile samfile, int reopen = True ):
- * 
- *         if not samfile._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; __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 = 1702; __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 = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1703
- * 
- *         if not samfile._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         if samfile.isbam: mode = b"rb"
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_132), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1705
- *             raise ValueError( "I/O operation on closed file" )
- * 
- *         if samfile.isbam: mode = b"rb"             # <<<<<<<<<<<<<<
- *         else: mode = b"r"
- * 
- */
-  if (__pyx_v_samfile->isbam) {
-    __Pyx_INCREF(((PyObject *)__pyx_n_b__rb));
-    __pyx_v_mode = __pyx_n_b__rb;
-    goto __pyx_L4;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1706
- * 
- *         if samfile.isbam: mode = b"rb"
- *         else: mode = b"r"             # <<<<<<<<<<<<<<
- * 
- *         # reopen the file to avoid iterator conflict
- */
-    __Pyx_INCREF(((PyObject *)__pyx_n_b__r));
-    __pyx_v_mode = __pyx_n_b__r;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1709
- * 
- *         # reopen the file to avoid iterator conflict
- *         if reopen:             # <<<<<<<<<<<<<<
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )
- */
-  if (__pyx_v_reopen) {
-
-    /* "pysam/csamtools.pyx":1710
- *         # reopen the file to avoid iterator conflict
- *         if reopen:
- *             store = StderrStore()             # <<<<<<<<<<<<<<
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()
- */
-    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_v_store = __pyx_t_1;
-    __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":1711
- *         if reopen:
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )             # <<<<<<<<<<<<<<
- *             store.release()
- *             assert self.fp != NULL
- */
-    __pyx_t_5 = PyBytes_AsString(__pyx_v_samfile->_filename); if (unlikely((__pyx_t_5 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->fp = samopen(__pyx_t_5, __pyx_t_6, NULL);
-
-    /* "pysam/csamtools.pyx":1712
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()             # <<<<<<<<<<<<<<
- *             assert self.fp != NULL
- *             self.owns_samfile = True
- */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __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 = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-    /* "pysam/csamtools.pyx":1713
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()
- *             assert self.fp != NULL             # <<<<<<<<<<<<<<
- *             self.owns_samfile = True
- *         else:
- */
-    #ifndef CYTHON_WITHOUT_ASSERTIONS
-    if (unlikely(!(__pyx_v_self->fp != NULL))) {
-      PyErr_SetNone(PyExc_AssertionError);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #endif
-
-    /* "pysam/csamtools.pyx":1714
- *             store.release()
- *             assert self.fp != NULL
- *             self.owns_samfile = True             # <<<<<<<<<<<<<<
- *         else:
- *             self.fp = samfile.samfile
- */
-    __pyx_v_self->owns_samfile = 1;
-    goto __pyx_L5;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1716
- *             self.owns_samfile = True
- *         else:
- *             self.fp = samfile.samfile             # <<<<<<<<<<<<<<
- *             self.owns_samfile = False
- * 
- */
-    __pyx_t_7 = __pyx_v_samfile->samfile;
-    __pyx_v_self->fp = __pyx_t_7;
-
-    /* "pysam/csamtools.pyx":1717
- *         else:
- *             self.fp = samfile.samfile
- *             self.owns_samfile = False             # <<<<<<<<<<<<<<
- * 
- *         # allocate memory for alignment
- */
-    __pyx_v_self->owns_samfile = 0;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":1720
- * 
- *         # allocate memory for alignment
- *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __pyx_v_self->b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowAll.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_mode);
-  __Pyx_XDECREF(__pyx_v_store);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorRowAll_3__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorRowAll_3__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorRowAll_2__iter__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1722
- *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorRowAll_2__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-  __Pyx_TraceCall("__iter__", __pyx_f[0], 1722);
-
-  /* "pysam/csamtools.pyx":1723
- * 
- *     def __iter__(self):
- *         return self             # <<<<<<<<<<<<<<
- * 
- *     cdef bam1_t * getCurrent( self ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1725
- *         return self
- * 
- *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
- *         return self.b
- * 
- */
-
-static bam1_t *__pyx_f_5pysam_9csamtools_14IteratorRowAll_getCurrent(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self) {
-  bam1_t *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("getCurrent", 0);
-  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1725);
-
-  /* "pysam/csamtools.pyx":1726
- * 
- *     cdef bam1_t * getCurrent( self ):
- *         return self.b             # <<<<<<<<<<<<<<
- * 
- *     cdef int cnext(self):
- */
-  __pyx_r = __pyx_v_self->b;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1728
- *         return self.b
- * 
- *     cdef int cnext(self):             # <<<<<<<<<<<<<<
- *         '''cversion of iterator. Used by IteratorColumn'''
- *         return samread(self.fp, self.b)
- */
-
-static int __pyx_f_5pysam_9csamtools_14IteratorRowAll_cnext(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("cnext", 0);
-  __Pyx_TraceCall("cnext", __pyx_f[0], 1728);
-
-  /* "pysam/csamtools.pyx":1730
- *     cdef int cnext(self):
- *         '''cversion of iterator. Used by IteratorColumn'''
- *         return samread(self.fp, self.b)             # <<<<<<<<<<<<<<
- * 
- *     def __next__(self):
- */
-  __pyx_r = samread(__pyx_v_self->fp, __pyx_v_self->b);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorRowAll_5__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_14IteratorRowAll_4__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_14IteratorRowAll_4__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorRowAll_5__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorRowAll_4__next__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1732
- *         return samread(self.fp, self.b)
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorRowAll_4__next__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self) {
-  int __pyx_v_ret;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__next__", 0);
-  __Pyx_TraceCall("__next__", __pyx_f[0], 1732);
-
-  /* "pysam/csamtools.pyx":1738
- *         """
- *         cdef int ret
- *         ret = samread(self.fp, self.b)             # <<<<<<<<<<<<<<
- *         if (ret > 0):
- *             return makeAlignedRead( self.b )
- */
-  __pyx_v_ret = samread(__pyx_v_self->fp, __pyx_v_self->b);
-
-  /* "pysam/csamtools.pyx":1739
- *         cdef int ret
- *         ret = samread(self.fp, self.b)
- *         if (ret > 0):             # <<<<<<<<<<<<<<
- *             return makeAlignedRead( self.b )
- *         else:
- */
-  __pyx_t_1 = (__pyx_v_ret > 0);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":1740
- *         ret = samread(self.fp, self.b)
- *         if (ret > 0):
- *             return makeAlignedRead( self.b )             # <<<<<<<<<<<<<<
- *         else:
- *             raise StopIteration
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1742
- *             return makeAlignedRead( self.b )
- *         else:
- *             raise StopIteration             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowAll.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_14IteratorRowAll_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_14IteratorRowAll_7__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_14IteratorRowAll_6__dealloc__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":1744
- *             raise StopIteration
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         bam_destroy1(self.b)
- *         if self.owns_samfile: samclose( self.fp )
- */
-
-static void __pyx_pf_5pysam_9csamtools_14IteratorRowAll_6__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1744);
-
-  /* "pysam/csamtools.pyx":1745
- * 
- *     def __dealloc__(self):
- *         bam_destroy1(self.b)             # <<<<<<<<<<<<<<
- *         if self.owns_samfile: samclose( self.fp )
- * 
- */
-  bam_destroy1(__pyx_v_self->b);
-
-  /* "pysam/csamtools.pyx":1746
- *     def __dealloc__(self):
- *         bam_destroy1(self.b)
- *         if self.owns_samfile: samclose( self.fp )             # <<<<<<<<<<<<<<
- * 
- * cdef class IteratorRowAllRefs(IteratorRow):
- */
-  if (__pyx_v_self->owns_samfile) {
-    samclose(__pyx_v_self->fp);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile = 0;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,0};
-    PyObject* values[1] = {0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samfile)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-    }
-    __pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowAllRefs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)__pyx_v_self), __pyx_v_samfile);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1756
- *     """
- * 
- *     def __cinit__(self, Samfile samfile):             # <<<<<<<<<<<<<<
- *         assert samfile._isOpen()
- *         if not samfile._hasIndex(): raise ValueError("no index available for fetch")
- */
-
-static int __pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1756);
-
-  /* "pysam/csamtools.pyx":1757
- * 
- *     def __cinit__(self, Samfile samfile):
- *         assert samfile._isOpen()             # <<<<<<<<<<<<<<
- *         if not samfile._hasIndex(): raise ValueError("no index available for fetch")
- *         self.samfile = samfile
- */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __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 = 1757; __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 = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (unlikely(!__pyx_t_3)) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
-
-  /* "pysam/csamtools.pyx":1758
- *     def __cinit__(self, Samfile samfile):
- *         assert samfile._isOpen()
- *         if not samfile._hasIndex(): raise ValueError("no index available for fetch")             # <<<<<<<<<<<<<<
- *         self.samfile = samfile
- *         self.tid = -1
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __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_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_133), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1759
- *         assert samfile._isOpen()
- *         if not samfile._hasIndex(): raise ValueError("no index available for fetch")
- *         self.samfile = samfile             # <<<<<<<<<<<<<<
- *         self.tid = -1
- * 
- */
-  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
-  __Pyx_GOTREF(__pyx_v_self->samfile);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
-  __pyx_v_self->samfile = __pyx_v_samfile;
-
-  /* "pysam/csamtools.pyx":1760
- *         if not samfile._hasIndex(): raise ValueError("no index available for fetch")
- *         self.samfile = samfile
- *         self.tid = -1             # <<<<<<<<<<<<<<
- * 
- *     def nextiter(self):
- */
-  __pyx_v_self->tid = -1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowAllRefs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_3nextiter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_18IteratorRowAllRefs_2nextiter[] = "IteratorRowAllRefs.nextiter(self)";
-static PyObject *__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_3nextiter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("nextiter (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_2nextiter(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1762
- *         self.tid = -1
- * 
- *     def nextiter(self):             # <<<<<<<<<<<<<<
- *         self.rowiter = IteratorRowRegion(self.samfile, self.tid, 0, 1<<29)
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_2nextiter(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("nextiter", 0);
-  __Pyx_TraceCall("nextiter", __pyx_f[0], 1762);
-
-  /* "pysam/csamtools.pyx":1763
- * 
- *     def nextiter(self):
- *         self.rowiter = IteratorRowRegion(self.samfile, self.tid, 0, 1<<29)             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->samfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->samfile));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_int_0);
-  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0);
-  __Pyx_GIVEREF(__pyx_int_0);
-  __Pyx_INCREF(__pyx_int_536870912);
-  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_536870912);
-  __Pyx_GIVEREF(__pyx_int_536870912);
-  __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_GIVEREF(__pyx_t_1);
-  __Pyx_GOTREF(__pyx_v_self->rowiter);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->rowiter));
-  __pyx_v_self->rowiter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowAllRefs.nextiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_5__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_5__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_4__iter__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1765
- *         self.rowiter = IteratorRowRegion(self.samfile, self.tid, 0, 1<<29)
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_4__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-  __Pyx_TraceCall("__iter__", __pyx_f[0], 1765);
-
-  /* "pysam/csamtools.pyx":1766
- * 
- *     def __iter__(self):
- *         return self             # <<<<<<<<<<<<<<
- * 
- *     def __next__(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_7__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_18IteratorRowAllRefs_6__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_18IteratorRowAllRefs_6__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_7__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_6__next__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1768
- *         return self
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs_6__next__(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__next__", 0);
-  __Pyx_TraceCall("__next__", __pyx_f[0], 1768);
-
-  /* "pysam/csamtools.pyx":1774
- *         """
- *         # Create an initial iterator
- *         if self.tid==-1:             # <<<<<<<<<<<<<<
- *             if not self.samfile.nreferences:
- *                 raise StopIteration
- */
-  __pyx_t_1 = (__pyx_v_self->tid == -1);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":1775
- *         # Create an initial iterator
- *         if self.tid==-1:
- *             if not self.samfile.nreferences:             # <<<<<<<<<<<<<<
- *                 raise StopIteration
- *             self.tid = 0
- */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self->samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_3 = (!__pyx_t_1);
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1776
- *         if self.tid==-1:
- *             if not self.samfile.nreferences:
- *                 raise StopIteration             # <<<<<<<<<<<<<<
- *             self.tid = 0
- *             self.nextiter()
- */
-      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L4;
-    }
-    __pyx_L4:;
-
-    /* "pysam/csamtools.pyx":1777
- *             if not self.samfile.nreferences:
- *                 raise StopIteration
- *             self.tid = 0             # <<<<<<<<<<<<<<
- *             self.nextiter()
- * 
- */
-    __pyx_v_self->tid = 0;
-
-    /* "pysam/csamtools.pyx":1778
- *                 raise StopIteration
- *             self.tid = 0
- *             self.nextiter()             # <<<<<<<<<<<<<<
- * 
- *         while 1:
- */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nextiter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __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_4); __pyx_t_4 = 0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1780
- *             self.nextiter()
- * 
- *         while 1:             # <<<<<<<<<<<<<<
- *             self.rowiter.cnext()
- * 
- */
-  while (1) {
-    if (!1) break;
-
-    /* "pysam/csamtools.pyx":1781
- * 
- *         while 1:
- *             self.rowiter.cnext()             # <<<<<<<<<<<<<<
- * 
- *             # If current iterator is not exhausted, return aligned read
- */
-    ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self->rowiter->__pyx_vtab)->cnext(__pyx_v_self->rowiter);
-
-    /* "pysam/csamtools.pyx":1784
- * 
- *             # If current iterator is not exhausted, return aligned read
- *             if self.rowiter.retval>0:             # <<<<<<<<<<<<<<
- *                 return makeAlignedRead(self.rowiter.b)
- * 
- */
-    __pyx_t_3 = (__pyx_v_self->rowiter->retval > 0);
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1785
- *             # If current iterator is not exhausted, return aligned read
- *             if self.rowiter.retval>0:
- *                 return makeAlignedRead(self.rowiter.b)             # <<<<<<<<<<<<<<
- * 
- *             self.tid += 1
- */
-      __Pyx_XDECREF(__pyx_r);
-      __pyx_t_4 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->rowiter->b); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_r = __pyx_t_4;
-      __pyx_t_4 = 0;
-      goto __pyx_L0;
-      goto __pyx_L7;
-    }
-    __pyx_L7:;
-
-    /* "pysam/csamtools.pyx":1787
- *                 return makeAlignedRead(self.rowiter.b)
- * 
- *             self.tid += 1             # <<<<<<<<<<<<<<
- * 
- *             # Otherwise, proceed to next reference or stop
- */
-    __pyx_v_self->tid = (__pyx_v_self->tid + 1);
-
-    /* "pysam/csamtools.pyx":1790
- * 
- *             # Otherwise, proceed to next reference or stop
- *             if self.tid<self.samfile.nreferences:             # <<<<<<<<<<<<<<
- *                 self.nextiter()
- *             else:
- */
-    __pyx_t_4 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self->samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1791
- *             # Otherwise, proceed to next reference or stop
- *             if self.tid<self.samfile.nreferences:
- *                 self.nextiter()             # <<<<<<<<<<<<<<
- *             else:
- *                 raise StopIteration
- */
-      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nextiter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __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_2); __pyx_t_2 = 0;
-      goto __pyx_L8;
-    }
-    /*else*/ {
-
-      /* "pysam/csamtools.pyx":1793
- *                 self.nextiter()
- *             else:
- *                 raise StopIteration             # <<<<<<<<<<<<<<
- * 
- * cdef class IteratorRowSelection(IteratorRow):
- */
-      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __pyx_L8:;
-  }
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowAllRefs.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_20IteratorRowSelection_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_20IteratorRowSelection_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile = 0;
-  PyObject *__pyx_v_positions = 0;
-  int __pyx_v_reopen;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,&__pyx_n_s__positions,&__pyx_n_s__reopen,0};
-    PyObject* values[3] = {0,0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samfile)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__positions)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reopen);
-          if (value) { values[2] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
-    __pyx_v_positions = values[1];
-    if (values[2]) {
-      __pyx_v_reopen = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-
-      /* "pysam/csamtools.pyx":1805
- *     """
- * 
- *     def __cinit__(self, Samfile samfile, positions, int reopen = True ):             # <<<<<<<<<<<<<<
- * 
- *         if not samfile._isOpen():
- */
-      __pyx_v_reopen = ((int)1);
-    }
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowSelection.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_20IteratorRowSelection___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)__pyx_v_self), __pyx_v_samfile, __pyx_v_positions, __pyx_v_reopen);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-static int __pyx_pf_5pysam_9csamtools_20IteratorRowSelection___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, PyObject *__pyx_v_positions, int __pyx_v_reopen) {
-  PyObject *__pyx_v_mode = NULL;
-  PyObject *__pyx_v_store = NULL;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  const char* __pyx_t_5;
-  char *__pyx_t_6;
-  samfile_t *__pyx_t_7;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1805);
-
-  /* "pysam/csamtools.pyx":1807
- *     def __cinit__(self, Samfile samfile, positions, int reopen = True ):
- * 
- *         if not samfile._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __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 = 1807; __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 = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":1808
- * 
- *         if not samfile._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         if not samfile._isOpen():
- */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_134), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1810
- *             raise ValueError( "I/O operation on closed file" )
- * 
- *         if not samfile._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
- * 
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = (!__pyx_t_4);
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":1811
- * 
- *         if not samfile._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         assert samfile.isbam, "can only use this iterator on bam files"
- */
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_135), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":1813
- *             raise ValueError( "I/O operation on closed file" )
- * 
- *         assert samfile.isbam, "can only use this iterator on bam files"             # <<<<<<<<<<<<<<
- *         mode = b"rb"
- * 
- */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  if (unlikely(!__pyx_v_samfile->isbam)) {
-    PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_136));
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
-
-  /* "pysam/csamtools.pyx":1814
- * 
- *         assert samfile.isbam, "can only use this iterator on bam files"
- *         mode = b"rb"             # <<<<<<<<<<<<<<
- * 
- *         # reopen the file to avoid iterator conflict
- */
-  __Pyx_INCREF(((PyObject *)__pyx_n_b__rb));
-  __pyx_v_mode = __pyx_n_b__rb;
-
-  /* "pysam/csamtools.pyx":1817
- * 
- *         # reopen the file to avoid iterator conflict
- *         if reopen:             # <<<<<<<<<<<<<<
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )
- */
-  if (__pyx_v_reopen) {
-
-    /* "pysam/csamtools.pyx":1818
- *         # reopen the file to avoid iterator conflict
- *         if reopen:
- *             store = StderrStore()             # <<<<<<<<<<<<<<
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __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 = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_v_store = __pyx_t_2;
-    __pyx_t_2 = 0;
-
-    /* "pysam/csamtools.pyx":1819
- *         if reopen:
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )             # <<<<<<<<<<<<<<
- *             store.release()
- *             assert self.fp != NULL
- */
-    __pyx_t_5 = PyBytes_AsString(__pyx_v_samfile->_filename); if (unlikely((__pyx_t_5 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->fp = samopen(__pyx_t_5, __pyx_t_6, NULL);
-
-    /* "pysam/csamtools.pyx":1820
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()             # <<<<<<<<<<<<<<
- *             assert self.fp != NULL
- *             self.owns_samfile = True
- */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":1821
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()
- *             assert self.fp != NULL             # <<<<<<<<<<<<<<
- *             self.owns_samfile = True
- *         else:
- */
-    #ifndef CYTHON_WITHOUT_ASSERTIONS
-    if (unlikely(!(__pyx_v_self->fp != NULL))) {
-      PyErr_SetNone(PyExc_AssertionError);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #endif
-
-    /* "pysam/csamtools.pyx":1822
- *             store.release()
- *             assert self.fp != NULL
- *             self.owns_samfile = True             # <<<<<<<<<<<<<<
- *         else:
- *             self.fp = samfile.samfile
- */
-    __pyx_v_self->owns_samfile = 1;
-    goto __pyx_L5;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1824
- *             self.owns_samfile = True
- *         else:
- *             self.fp = samfile.samfile             # <<<<<<<<<<<<<<
- *             self.owns_samfile = False
- * 
- */
-    __pyx_t_7 = __pyx_v_samfile->samfile;
-    __pyx_v_self->fp = __pyx_t_7;
-
-    /* "pysam/csamtools.pyx":1825
- *         else:
- *             self.fp = samfile.samfile
- *             self.owns_samfile = False             # <<<<<<<<<<<<<<
- * 
- *         # allocate memory for alignment
- */
-    __pyx_v_self->owns_samfile = 0;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":1828
- * 
- *         # allocate memory for alignment
- *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))             # <<<<<<<<<<<<<<
- * 
- *         self.positions = positions
- */
-  __pyx_v_self->b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
-
-  /* "pysam/csamtools.pyx":1830
- *         self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
- * 
- *         self.positions = positions             # <<<<<<<<<<<<<<
- *         self.current_pos = 0
- * 
- */
-  __Pyx_INCREF(__pyx_v_positions);
-  __Pyx_GIVEREF(__pyx_v_positions);
-  __Pyx_GOTREF(__pyx_v_self->positions);
-  __Pyx_DECREF(__pyx_v_self->positions);
-  __pyx_v_self->positions = __pyx_v_positions;
-
-  /* "pysam/csamtools.pyx":1831
- * 
- *         self.positions = positions
- *         self.current_pos = 0             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __pyx_v_self->current_pos = 0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowSelection.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_mode);
-  __Pyx_XDECREF(__pyx_v_store);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_20IteratorRowSelection_3__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_20IteratorRowSelection_3__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_20IteratorRowSelection_2__iter__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1833
- *         self.current_pos = 0
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_20IteratorRowSelection_2__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-  __Pyx_TraceCall("__iter__", __pyx_f[0], 1833);
-
-  /* "pysam/csamtools.pyx":1834
- * 
- *     def __iter__(self):
- *         return self             # <<<<<<<<<<<<<<
- * 
- *     cdef bam1_t * getCurrent( self ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1836
- *         return self
- * 
- *     cdef bam1_t * getCurrent( self ):             # <<<<<<<<<<<<<<
- *         return self.b
- * 
- */
-
-static bam1_t *__pyx_f_5pysam_9csamtools_20IteratorRowSelection_getCurrent(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self) {
-  bam1_t *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("getCurrent", 0);
-  __Pyx_TraceCall("getCurrent", __pyx_f[0], 1836);
-
-  /* "pysam/csamtools.pyx":1837
- * 
- *     cdef bam1_t * getCurrent( self ):
- *         return self.b             # <<<<<<<<<<<<<<
- * 
- *     cdef int cnext(self):
- */
-  __pyx_r = __pyx_v_self->b;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1839
- *         return self.b
- * 
- *     cdef int cnext(self):             # <<<<<<<<<<<<<<
- *         '''cversion of iterator'''
- * 
- */
-
-static int __pyx_f_5pysam_9csamtools_20IteratorRowSelection_cnext(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  Py_ssize_t __pyx_t_2;
-  int __pyx_t_3;
-  uint64_t __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("cnext", 0);
-  __Pyx_TraceCall("cnext", __pyx_f[0], 1839);
-
-  /* "pysam/csamtools.pyx":1843
- * 
- *         # end iteration if out of positions
- *         if self.current_pos >= len(self.positions): return -1             # <<<<<<<<<<<<<<
- * 
- *         bam_seek( self.fp.x.bam, self.positions[self.current_pos], 0 )
- */
-  __pyx_t_1 = __pyx_v_self->positions;
-  __Pyx_INCREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = (__pyx_v_self->current_pos >= __pyx_t_2);
-  if (__pyx_t_3) {
-    __pyx_r = -1;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1845
- *         if self.current_pos >= len(self.positions): return -1
- * 
- *         bam_seek( self.fp.x.bam, self.positions[self.current_pos], 0 )             # <<<<<<<<<<<<<<
- *         self.current_pos += 1
- *         return samread(self.fp, self.b)
- */
-  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->positions, __pyx_v_self->current_pos, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = __Pyx_PyInt_from_py_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  bam_seek(__pyx_v_self->fp->x.bam, __pyx_t_4, 0);
-
-  /* "pysam/csamtools.pyx":1846
- * 
- *         bam_seek( self.fp.x.bam, self.positions[self.current_pos], 0 )
- *         self.current_pos += 1             # <<<<<<<<<<<<<<
- *         return samread(self.fp, self.b)
- * 
- */
-  __pyx_v_self->current_pos = (__pyx_v_self->current_pos + 1);
-
-  /* "pysam/csamtools.pyx":1847
- *         bam_seek( self.fp.x.bam, self.positions[self.current_pos], 0 )
- *         self.current_pos += 1
- *         return samread(self.fp, self.b)             # <<<<<<<<<<<<<<
- * 
- *     def __next__(self):
- */
-  __pyx_r = samread(__pyx_v_self->fp, __pyx_v_self->b);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_WriteUnraisable("pysam.csamtools.IteratorRowSelection.cnext", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_20IteratorRowSelection_5__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_20IteratorRowSelection_4__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_20IteratorRowSelection_4__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_20IteratorRowSelection_5__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_20IteratorRowSelection_4__next__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1849
- *         return samread(self.fp, self.b)
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_20IteratorRowSelection_4__next__(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self) {
-  int __pyx_v_ret;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__next__", 0);
-  __Pyx_TraceCall("__next__", __pyx_f[0], 1849);
-
-  /* "pysam/csamtools.pyx":1855
- *         """
- * 
- *         cdef int ret = self.cnext()             # <<<<<<<<<<<<<<
- *         if (ret > 0):
- *             return makeAlignedRead( self.b )
- */
-  __pyx_v_ret = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection *)__pyx_v_self->__pyx_vtab)->cnext(__pyx_v_self);
-
-  /* "pysam/csamtools.pyx":1856
- * 
- *         cdef int ret = self.cnext()
- *         if (ret > 0):             # <<<<<<<<<<<<<<
- *             return makeAlignedRead( self.b )
- *         else:
- */
-  __pyx_t_1 = (__pyx_v_ret > 0);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":1857
- *         cdef int ret = self.cnext()
- *         if (ret > 0):
- *             return makeAlignedRead( self.b )             # <<<<<<<<<<<<<<
- *         else:
- *             raise StopIteration
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":1859
- *             return makeAlignedRead( self.b )
- *         else:
- *             raise StopIteration             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorRowSelection.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_20IteratorRowSelection_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_20IteratorRowSelection_7__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_20IteratorRowSelection_6__dealloc__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":1861
- *             raise StopIteration
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         bam_destroy1(self.b)
- *         if self.owns_samfile: samclose( self.fp )
- */
-
-static void __pyx_pf_5pysam_9csamtools_20IteratorRowSelection_6__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1861);
-
-  /* "pysam/csamtools.pyx":1862
- * 
- *     def __dealloc__(self):
- *         bam_destroy1(self.b)             # <<<<<<<<<<<<<<
- *         if self.owns_samfile: samclose( self.fp )
- * 
- */
-  bam_destroy1(__pyx_v_self->b);
-
-  /* "pysam/csamtools.pyx":1863
- *     def __dealloc__(self):
- *         bam_destroy1(self.b)
- *         if self.owns_samfile: samclose( self.fp )             # <<<<<<<<<<<<<<
- * 
- * ##-------------------------------------------------------------------
- */
-  if (__pyx_v_self->owns_samfile) {
-    samclose(__pyx_v_self->fp);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":1868
- * ##-------------------------------------------------------------------
- * ##-------------------------------------------------------------------
- * cdef int __advance_all( void * data, bam1_t * b ):             # <<<<<<<<<<<<<<
- *     '''advance without any read filtering.
- *     '''
- */
-
-static int __pyx_f_5pysam_9csamtools___advance_all(void *__pyx_v_data, bam1_t *__pyx_v_b) {
-  __pyx_t_5pysam_9csamtools___iterdata *__pyx_v_d;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__advance_all", 0);
-  __Pyx_TraceCall("__advance_all", __pyx_f[0], 1868);
-
-  /* "pysam/csamtools.pyx":1872
- *     '''
- *     cdef __iterdata * d
- *     d = <__iterdata*>data             # <<<<<<<<<<<<<<
- *     return bam_iter_read( d.samfile.x.bam, d.iter, b )
- * 
- */
-  __pyx_v_d = ((__pyx_t_5pysam_9csamtools___iterdata *)__pyx_v_data);
-
-  /* "pysam/csamtools.pyx":1873
- *     cdef __iterdata * d
- *     d = <__iterdata*>data
- *     return bam_iter_read( d.samfile.x.bam, d.iter, b )             # <<<<<<<<<<<<<<
- * 
- * cdef int __advance_snpcalls( void * data, bam1_t * b ):
- */
-  __pyx_r = bam_iter_read(__pyx_v_d->samfile->x.bam, __pyx_v_d->iter, __pyx_v_b);
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1875
- *     return bam_iter_read( d.samfile.x.bam, d.iter, b )
- * 
- * cdef int __advance_snpcalls( void * data, bam1_t * b ):             # <<<<<<<<<<<<<<
- *     '''advance using same filter and read processing as in
- *     the samtools pileup.
- */
-
-static int __pyx_f_5pysam_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__pyx_v_b) {
-  __pyx_t_5pysam_9csamtools___iterdata *__pyx_v_d;
-  int __pyx_v_ret;
-  int __pyx_v_skip;
-  int __pyx_v_q;
-  int __pyx_v_is_cns;
-  int __pyx_v_is_nobaq;
-  int __pyx_v_capQ_thres;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  int32_t __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  long __pyx_t_8;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__advance_snpcalls", 0);
-  __Pyx_TraceCall("__advance_snpcalls", __pyx_f[0], 1875);
-
-  /* "pysam/csamtools.pyx":1880
- *     '''
- *     cdef __iterdata * d
- *     d = <__iterdata*>data             # <<<<<<<<<<<<<<
- * 
- *     cdef int ret = bam_iter_read( d.samfile.x.bam, d.iter, b )
- */
-  __pyx_v_d = ((__pyx_t_5pysam_9csamtools___iterdata *)__pyx_v_data);
-
-  /* "pysam/csamtools.pyx":1882
- *     d = <__iterdata*>data
- * 
- *     cdef int ret = bam_iter_read( d.samfile.x.bam, d.iter, b )             # <<<<<<<<<<<<<<
- *     cdef int skip = 0
- *     cdef int q
- */
-  __pyx_v_ret = bam_iter_read(__pyx_v_d->samfile->x.bam, __pyx_v_d->iter, __pyx_v_b);
-
-  /* "pysam/csamtools.pyx":1883
- * 
- *     cdef int ret = bam_iter_read( d.samfile.x.bam, d.iter, b )
- *     cdef int skip = 0             # <<<<<<<<<<<<<<
- *     cdef int q
- *     cdef int is_cns = 1
- */
-  __pyx_v_skip = 0;
-
-  /* "pysam/csamtools.pyx":1885
- *     cdef int skip = 0
- *     cdef int q
- *     cdef int is_cns = 1             # <<<<<<<<<<<<<<
- *     cdef int is_nobaq = 0
- *     cdef int capQ_thres = 0
- */
-  __pyx_v_is_cns = 1;
-
-  /* "pysam/csamtools.pyx":1886
- *     cdef int q
- *     cdef int is_cns = 1
- *     cdef int is_nobaq = 0             # <<<<<<<<<<<<<<
- *     cdef int capQ_thres = 0
- * 
- */
-  __pyx_v_is_nobaq = 0;
-
-  /* "pysam/csamtools.pyx":1887
- *     cdef int is_cns = 1
- *     cdef int is_nobaq = 0
- *     cdef int capQ_thres = 0             # <<<<<<<<<<<<<<
- * 
- *     # reload sequence
- */
-  __pyx_v_capQ_thres = 0;
-
-  /* "pysam/csamtools.pyx":1890
- * 
- *     # reload sequence
- *     if d.fastafile != NULL and b.core.tid != d.tid:             # <<<<<<<<<<<<<<
- *         if d.seq != NULL: free(d.seq)
- *         d.tid = b.core.tid
- */
-  __pyx_t_1 = (__pyx_v_d->fastafile != NULL);
-  if (__pyx_t_1) {
-    __pyx_t_2 = (__pyx_v_b->core.tid != __pyx_v_d->tid);
-    __pyx_t_3 = __pyx_t_2;
-  } else {
-    __pyx_t_3 = __pyx_t_1;
-  }
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":1891
- *     # reload sequence
- *     if d.fastafile != NULL and b.core.tid != d.tid:
- *         if d.seq != NULL: free(d.seq)             # <<<<<<<<<<<<<<
- *         d.tid = b.core.tid
- *         d.seq = faidx_fetch_seq(d.fastafile,
- */
-    __pyx_t_3 = (__pyx_v_d->seq != NULL);
-    if (__pyx_t_3) {
-      free(__pyx_v_d->seq);
-      goto __pyx_L4;
-    }
-    __pyx_L4:;
-
-    /* "pysam/csamtools.pyx":1892
- *     if d.fastafile != NULL and b.core.tid != d.tid:
- *         if d.seq != NULL: free(d.seq)
- *         d.tid = b.core.tid             # <<<<<<<<<<<<<<
- *         d.seq = faidx_fetch_seq(d.fastafile,
- *                                 d.samfile.header.target_name[d.tid],
- */
-    __pyx_t_4 = __pyx_v_b->core.tid;
-    __pyx_v_d->tid = __pyx_t_4;
-
-    /* "pysam/csamtools.pyx":1893
- *         if d.seq != NULL: free(d.seq)
- *         d.tid = b.core.tid
- *         d.seq = faidx_fetch_seq(d.fastafile,             # <<<<<<<<<<<<<<
- *                                 d.samfile.header.target_name[d.tid],
- *                                 0, max_pos,
- */
-    __pyx_v_d->seq = faidx_fetch_seq(__pyx_v_d->fastafile, (__pyx_v_d->samfile->header->target_name[__pyx_v_d->tid]), 0, __pyx_v_5pysam_9csamtools_max_pos, (&__pyx_v_d->seq_len));
-
-    /* "pysam/csamtools.pyx":1897
- *                                 0, max_pos,
- *                                 &d.seq_len)
- *         if d.seq == NULL:             # <<<<<<<<<<<<<<
- *             raise ValueError( "reference sequence for '%s' (tid=%i) not found" % \
- *                                   (d.samfile.header.target_name[d.tid],
- */
-    __pyx_t_3 = (__pyx_v_d->seq == NULL);
-    if (__pyx_t_3) {
-
-      /* "pysam/csamtools.pyx":1899
- *         if d.seq == NULL:
- *             raise ValueError( "reference sequence for '%s' (tid=%i) not found" % \
- *                                   (d.samfile.header.target_name[d.tid],             # <<<<<<<<<<<<<<
- *                                    d.tid))
- * 
- */
-      __pyx_t_5 = PyBytes_FromString((__pyx_v_d->samfile->header->target_name[__pyx_v_d->tid])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-
-      /* "pysam/csamtools.pyx":1900
- *             raise ValueError( "reference sequence for '%s' (tid=%i) not found" % \
- *                                   (d.samfile.header.target_name[d.tid],
- *                                    d.tid))             # <<<<<<<<<<<<<<
- * 
- * 
- */
-      __pyx_t_6 = PyInt_FromLong(__pyx_v_d->tid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
-      __Pyx_GIVEREF(__pyx_t_6);
-      __pyx_t_5 = 0;
-      __pyx_t_6 = 0;
-      __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_137), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
-      __pyx_t_6 = 0;
-      __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":1903
- * 
- * 
- *     while ret >= 0:             # <<<<<<<<<<<<<<
- * 
- *         skip = 0
- */
-  while (1) {
-    __pyx_t_3 = (__pyx_v_ret >= 0);
-    if (!__pyx_t_3) break;
-
-    /* "pysam/csamtools.pyx":1905
- *     while ret >= 0:
- * 
- *         skip = 0             # <<<<<<<<<<<<<<
- * 
- *         # realign read - changes base qualities
- */
-    __pyx_v_skip = 0;
-
-    /* "pysam/csamtools.pyx":1908
- * 
- *         # realign read - changes base qualities
- *         if d.seq != NULL and is_cns and not is_nobaq: bam_prob_realn( b, d.seq )             # <<<<<<<<<<<<<<
- * 
- *         if d.seq != NULL and capQ_thres > 10:
- */
-    __pyx_t_3 = (__pyx_v_d->seq != NULL);
-    if (__pyx_t_3) {
-      if (__pyx_v_is_cns) {
-        __pyx_t_1 = (!__pyx_v_is_nobaq);
-        __pyx_t_2 = __pyx_t_1;
-      } else {
-        __pyx_t_2 = __pyx_v_is_cns;
-      }
-      __pyx_t_1 = __pyx_t_2;
-    } else {
-      __pyx_t_1 = __pyx_t_3;
-    }
-    if (__pyx_t_1) {
-      bam_prob_realn(__pyx_v_b, __pyx_v_d->seq);
-      goto __pyx_L8;
-    }
-    __pyx_L8:;
-
-    /* "pysam/csamtools.pyx":1910
- *         if d.seq != NULL and is_cns and not is_nobaq: bam_prob_realn( b, d.seq )
- * 
- *         if d.seq != NULL and capQ_thres > 10:             # <<<<<<<<<<<<<<
- *             q = bam_cap_mapQ(b, d.seq, capQ_thres)
- *             if q < 0: skip = 1
- */
-    __pyx_t_1 = (__pyx_v_d->seq != NULL);
-    if (__pyx_t_1) {
-      __pyx_t_3 = (__pyx_v_capQ_thres > 10);
-      __pyx_t_2 = __pyx_t_3;
-    } else {
-      __pyx_t_2 = __pyx_t_1;
-    }
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":1911
- * 
- *         if d.seq != NULL and capQ_thres > 10:
- *             q = bam_cap_mapQ(b, d.seq, capQ_thres)             # <<<<<<<<<<<<<<
- *             if q < 0: skip = 1
- *             elif b.core.qual > q: b.core.qual = q
- */
-      __pyx_v_q = bam_cap_mapQ(__pyx_v_b, __pyx_v_d->seq, __pyx_v_capQ_thres);
-
-      /* "pysam/csamtools.pyx":1912
- *         if d.seq != NULL and capQ_thres > 10:
- *             q = bam_cap_mapQ(b, d.seq, capQ_thres)
- *             if q < 0: skip = 1             # <<<<<<<<<<<<<<
- *             elif b.core.qual > q: b.core.qual = q
- *         if b.core.flag & BAM_FUNMAP: skip = 1
- */
-      __pyx_t_2 = (__pyx_v_q < 0);
-      if (__pyx_t_2) {
-        __pyx_v_skip = 1;
-        goto __pyx_L10;
-      }
-
-      /* "pysam/csamtools.pyx":1913
- *             q = bam_cap_mapQ(b, d.seq, capQ_thres)
- *             if q < 0: skip = 1
- *             elif b.core.qual > q: b.core.qual = q             # <<<<<<<<<<<<<<
- *         if b.core.flag & BAM_FUNMAP: skip = 1
- *         elif b.core.flag & 1 and not b.core.flag & 2: skip = 1
- */
-      __pyx_t_2 = (__pyx_v_b->core.qual > __pyx_v_q);
-      if (__pyx_t_2) {
-        __pyx_v_b->core.qual = __pyx_v_q;
-        goto __pyx_L10;
-      }
-      __pyx_L10:;
-      goto __pyx_L9;
-    }
-    __pyx_L9:;
-
-    /* "pysam/csamtools.pyx":1914
- *             if q < 0: skip = 1
- *             elif b.core.qual > q: b.core.qual = q
- *         if b.core.flag & BAM_FUNMAP: skip = 1             # <<<<<<<<<<<<<<
- *         elif b.core.flag & 1 and not b.core.flag & 2: skip = 1
- * 
- */
-    __pyx_t_8 = (__pyx_v_b->core.flag & 4);
-    if (__pyx_t_8) {
-      __pyx_v_skip = 1;
-      goto __pyx_L11;
-    }
-
-    /* "pysam/csamtools.pyx":1915
- *             elif b.core.qual > q: b.core.qual = q
- *         if b.core.flag & BAM_FUNMAP: skip = 1
- *         elif b.core.flag & 1 and not b.core.flag & 2: skip = 1             # <<<<<<<<<<<<<<
- * 
- *         if not skip: break
- */
-    if ((__pyx_v_b->core.flag & 1)) {
-      __pyx_t_2 = (!(__pyx_v_b->core.flag & 2));
-      __pyx_t_1 = __pyx_t_2;
-    } else {
-      __pyx_t_1 = (__pyx_v_b->core.flag & 1);
-    }
-    if (__pyx_t_1) {
-      __pyx_v_skip = 1;
-      goto __pyx_L11;
-    }
-    __pyx_L11:;
-
-    /* "pysam/csamtools.pyx":1917
- *         elif b.core.flag & 1 and not b.core.flag & 2: skip = 1
- * 
- *         if not skip: break             # <<<<<<<<<<<<<<
- *         # additional filters
- * 
- */
-    __pyx_t_1 = (!__pyx_v_skip);
-    if (__pyx_t_1) {
-      goto __pyx_L7_break;
-      goto __pyx_L12;
-    }
-    __pyx_L12:;
-
-    /* "pysam/csamtools.pyx":1920
- *         # additional filters
- * 
- *         ret = bam_iter_read( d.samfile.x.bam, d.iter, b )             # <<<<<<<<<<<<<<
- * 
- *     return ret
- */
-    __pyx_v_ret = bam_iter_read(__pyx_v_d->samfile->x.bam, __pyx_v_d->iter, __pyx_v_b);
-  }
-  __pyx_L7_break:;
-
-  /* "pysam/csamtools.pyx":1922
- *         ret = bam_iter_read( d.samfile.x.bam, d.iter, b )
- * 
- *     return ret             # <<<<<<<<<<<<<<
- * 
- * cdef class IteratorColumn:
- */
-  __pyx_r = __pyx_v_ret;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_WriteUnraisable("pysam.csamtools.__advance_snpcalls", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_14IteratorColumn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_14IteratorColumn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile = 0;
-  PyObject *__pyx_v_kwargs = 0;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,0};
-    PyObject* values[1] = {0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samfile)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-    }
-    __pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumn.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorColumn___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_samfile, __pyx_v_kwargs);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_kwargs);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1971
- *     '''
- * 
- *     def __cinit__( self, Samfile samfile, **kwargs ):             # <<<<<<<<<<<<<<
- *         self.samfile = samfile
- *         self.mask = kwargs.get("mask", BAM_DEF_MASK )
- */
-
-static int __pyx_pf_5pysam_9csamtools_14IteratorColumn___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, PyObject *__pyx_v_kwargs) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1971);
-
-  /* "pysam/csamtools.pyx":1972
- * 
- *     def __cinit__( self, Samfile samfile, **kwargs ):
- *         self.samfile = samfile             # <<<<<<<<<<<<<<
- *         self.mask = kwargs.get("mask", BAM_DEF_MASK )
- *         self.fastafile = kwargs.get( "fastafile", None )
- */
-  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
-  __Pyx_GOTREF(__pyx_v_self->samfile);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
-  __pyx_v_self->samfile = __pyx_v_samfile;
-
-  /* "pysam/csamtools.pyx":1973
- *     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 )
- */
-  __pyx_t_1 = PyInt_FromLong(BAM_DEF_MASK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__mask), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __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_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_self->mask = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":1974
- *         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 )
- */
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__fastafile), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5pysam_9csamtools_Fastafile))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GIVEREF(__pyx_t_2);
-  __Pyx_GOTREF(__pyx_v_self->fastafile);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->fastafile));
-  __pyx_v_self->fastafile = ((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_t_2);
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1975
- *         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
- */
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__stepper), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  __Pyx_GOTREF(__pyx_v_self->stepper);
-  __Pyx_DECREF(__pyx_v_self->stepper);
-  __pyx_v_self->stepper = __pyx_t_2;
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":1976
- *         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
- */
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__max_depth), __pyx_int_8000); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_self->max_depth = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":1977
- *         self.stepper = kwargs.get( "stepper", None )
- *         self.max_depth = kwargs.get( "max_depth", 8000 )
- *         self.iterdata.seq = NULL             # <<<<<<<<<<<<<<
- *         self.tid = 0
- *         self.pos = 0
- */
-  __pyx_v_self->iterdata.seq = NULL;
-
-  /* "pysam/csamtools.pyx":1978
- *         self.max_depth = kwargs.get( "max_depth", 8000 )
- *         self.iterdata.seq = NULL
- *         self.tid = 0             # <<<<<<<<<<<<<<
- *         self.pos = 0
- *         self.n_plp = 0
- */
-  __pyx_v_self->tid = 0;
-
-  /* "pysam/csamtools.pyx":1979
- *         self.iterdata.seq = NULL
- *         self.tid = 0
- *         self.pos = 0             # <<<<<<<<<<<<<<
- *         self.n_plp = 0
- *         self.plp = NULL
- */
-  __pyx_v_self->pos = 0;
-
-  /* "pysam/csamtools.pyx":1980
- *         self.tid = 0
- *         self.pos = 0
- *         self.n_plp = 0             # <<<<<<<<<<<<<<
- *         self.plp = NULL
- *         self.pileup_iter = <bam_plp_t>NULL
- */
-  __pyx_v_self->n_plp = 0;
-
-  /* "pysam/csamtools.pyx":1981
- *         self.pos = 0
- *         self.n_plp = 0
- *         self.plp = NULL             # <<<<<<<<<<<<<<
- *         self.pileup_iter = <bam_plp_t>NULL
- * 
- */
-  __pyx_v_self->plp = NULL;
-
-  /* "pysam/csamtools.pyx":1982
- *         self.n_plp = 0
- *         self.plp = NULL
- *         self.pileup_iter = <bam_plp_t>NULL             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __pyx_v_self->pileup_iter = NULL;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumn.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorColumn_3__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorColumn_3__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorColumn_2__iter__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1984
- *         self.pileup_iter = <bam_plp_t>NULL
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorColumn_2__iter__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-  __Pyx_TraceCall("__iter__", __pyx_f[0], 1984);
-
-  /* "pysam/csamtools.pyx":1985
- * 
- *     def __iter__(self):
- *         return self             # <<<<<<<<<<<<<<
- * 
- *     cdef int cnext(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1987
- *         return self
- * 
- *     cdef int cnext(self):             # <<<<<<<<<<<<<<
- *         '''perform next iteration.
- *         '''
- */
-
-static int __pyx_f_5pysam_9csamtools_14IteratorColumn_cnext(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("cnext", 0);
-  __Pyx_TraceCall("cnext", __pyx_f[0], 1987);
-
-  /* "pysam/csamtools.pyx":1990
- *         '''perform next iteration.
- *         '''
- *         self.plp = bam_plp_auto( self.pileup_iter,             # <<<<<<<<<<<<<<
- *                                  &self.tid,
- *                                  &self.pos,
- */
-  __pyx_v_self->plp = bam_plp_auto(__pyx_v_self->pileup_iter, (&__pyx_v_self->tid), (&__pyx_v_self->pos), (&__pyx_v_self->n_plp));
-
-  __pyx_r = 0;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":1995
- *                                  &self.n_plp )
- * 
- *     cdef char * getSequence( self ):             # <<<<<<<<<<<<<<
- *         '''return current reference sequence underlying the iterator.
- *         '''
- */
-
-static char *__pyx_f_5pysam_9csamtools_14IteratorColumn_getSequence(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self) {
-  char *__pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("getSequence", 0);
-  __Pyx_TraceCall("getSequence", __pyx_f[0], 1995);
-
-  /* "pysam/csamtools.pyx":1998
- *         '''return current reference sequence underlying the iterator.
- *         '''
- *         return self.iterdata.seq             # <<<<<<<<<<<<<<
- * 
- *     property seq_len:
- */
-  __pyx_r = __pyx_v_self->iterdata.seq;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorColumn_7seq_len_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorColumn_7seq_len_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorColumn_7seq_len___get__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2002
- *     property seq_len:
- *         '''current sequence length.'''
- *         def __get__(self): return self.iterdata.seq_len             # <<<<<<<<<<<<<<
- * 
- *     def addReference( self, Fastafile fastafile ):
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorColumn_7seq_len___get__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2002);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->iterdata.seq_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __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("pysam.csamtools.IteratorColumn.seq_len.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorColumn_5addReference(PyObject *__pyx_v_self, PyObject *__pyx_v_fastafile); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_14IteratorColumn_4addReference[] = "IteratorColumn.addReference(self, Fastafile fastafile)\n\n       add reference sequences in *fastafile* to iterator.";
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorColumn_5addReference(PyObject *__pyx_v_self, PyObject *__pyx_v_fastafile) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("addReference (wrapper)", 0);
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fastafile), __pyx_ptype_5pysam_9csamtools_Fastafile, 1, "fastafile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorColumn_4addReference(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), ((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_fastafile));
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2004
- *         def __get__(self): return self.iterdata.seq_len
- * 
- *     def addReference( self, Fastafile fastafile ):             # <<<<<<<<<<<<<<
- *        '''
- *        add reference sequences in *fastafile* to iterator.'''
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorColumn_4addReference(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_fastafile) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  faidx_t *__pyx_t_2;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("addReference", 0);
-  __Pyx_TraceCall("addReference", __pyx_f[0], 2004);
-
-  /* "pysam/csamtools.pyx":2007
- *        '''
- *        add reference sequences in *fastafile* to iterator.'''
- *        self.fastafile = fastafile             # <<<<<<<<<<<<<<
- *        if self.iterdata.seq != NULL: free(self.iterdata.seq)
- *        self.iterdata.tid = -1
- */
-  __Pyx_INCREF(((PyObject *)__pyx_v_fastafile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_fastafile));
-  __Pyx_GOTREF(__pyx_v_self->fastafile);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->fastafile));
-  __pyx_v_self->fastafile = __pyx_v_fastafile;
-
-  /* "pysam/csamtools.pyx":2008
- *        add reference sequences in *fastafile* to iterator.'''
- *        self.fastafile = fastafile
- *        if self.iterdata.seq != NULL: free(self.iterdata.seq)             # <<<<<<<<<<<<<<
- *        self.iterdata.tid = -1
- *        self.iterdata.fastafile = self.fastafile.fastafile
- */
-  __pyx_t_1 = (__pyx_v_self->iterdata.seq != NULL);
-  if (__pyx_t_1) {
-    free(__pyx_v_self->iterdata.seq);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2009
- *        self.fastafile = fastafile
- *        if self.iterdata.seq != NULL: free(self.iterdata.seq)
- *        self.iterdata.tid = -1             # <<<<<<<<<<<<<<
- *        self.iterdata.fastafile = self.fastafile.fastafile
- * 
- */
-  __pyx_v_self->iterdata.tid = -1;
-
-  /* "pysam/csamtools.pyx":2010
- *        if self.iterdata.seq != NULL: free(self.iterdata.seq)
- *        self.iterdata.tid = -1
- *        self.iterdata.fastafile = self.fastafile.fastafile             # <<<<<<<<<<<<<<
- * 
- *     def hasReference( self ):
- */
-  __pyx_t_2 = __pyx_v_self->fastafile->fastafile;
-  __pyx_v_self->iterdata.fastafile = __pyx_t_2;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorColumn_7hasReference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_14IteratorColumn_6hasReference[] = "IteratorColumn.hasReference(self)\n\n        return true if iterator is associated with a reference";
-static PyObject *__pyx_pw_5pysam_9csamtools_14IteratorColumn_7hasReference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("hasReference (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorColumn_6hasReference(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2012
- *        self.iterdata.fastafile = self.fastafile.fastafile
- * 
- *     def hasReference( self ):             # <<<<<<<<<<<<<<
- *         '''
- *         return true if iterator is associated with a reference'''
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_14IteratorColumn_6hasReference(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("hasReference", 0);
-  __Pyx_TraceCall("hasReference", __pyx_f[0], 2012);
-
-  /* "pysam/csamtools.pyx":2015
- *         '''
- *         return true if iterator is associated with a reference'''
- *         return self.fastafile             # <<<<<<<<<<<<<<
- * 
- *     cdef setMask( self, mask ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self->fastafile));
-  __pyx_r = ((PyObject *)__pyx_v_self->fastafile);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2017
- *         return self.fastafile
- * 
- *     cdef setMask( self, mask ):             # <<<<<<<<<<<<<<
- *         '''set masking flag in iterator.
- * 
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_14IteratorColumn_setMask(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self, PyObject *__pyx_v_mask) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("setMask", 0);
-  __Pyx_TraceCall("setMask", __pyx_f[0], 2017);
-
-  /* "pysam/csamtools.pyx":2022
- *         reads with bits set in *mask* will be skipped.
- *         '''
- *         self.mask = mask             # <<<<<<<<<<<<<<
- *         bam_plp_set_mask( self.pileup_iter, self.mask )
- * 
- */
-  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_mask); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->mask = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2023
- *         '''
- *         self.mask = mask
- *         bam_plp_set_mask( self.pileup_iter, self.mask )             # <<<<<<<<<<<<<<
- * 
- *     cdef setupIteratorData( self,
- */
-  bam_plp_set_mask(__pyx_v_self->pileup_iter, __pyx_v_self->mask);
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumn.setMask", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2025
- *         bam_plp_set_mask( self.pileup_iter, self.mask )
- * 
- *     cdef setupIteratorData( self,             # <<<<<<<<<<<<<<
- *                             int tid,
- *                             int start,
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_14IteratorColumn_setupIteratorData(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end, struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData *__pyx_optional_args) {
-  int __pyx_v_reopen = ((int)0);
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  samfile_t *__pyx_t_6;
-  bam_iter_t __pyx_t_7;
-  int __pyx_t_8;
-  faidx_t *__pyx_t_9;
-  int __pyx_t_10;
-  int __pyx_t_11;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("setupIteratorData", 0);
-  __Pyx_TraceCall("setupIteratorData", __pyx_f[0], 2025);
-  if (__pyx_optional_args) {
-    if (__pyx_optional_args->__pyx_n > 0) {
-      __pyx_v_reopen = __pyx_optional_args->reopen;
-    }
-  }
-
-  /* "pysam/csamtools.pyx":2032
- *         '''setup the iterator structure'''
- * 
- *         self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen )             # <<<<<<<<<<<<<<
- *         self.iterdata.samfile = self.samfile.samfile
- *         self.iterdata.iter = self.iter.iter
- */
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyInt_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
-  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->samfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->samfile));
-  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_4);
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_1 = 0;
-  __pyx_t_2 = 0;
-  __pyx_t_3 = 0;
-  __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-  __Pyx_GIVEREF(__pyx_t_4);
-  __Pyx_GOTREF(__pyx_v_self->iter);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->iter));
-  __pyx_v_self->iter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_t_4);
-  __pyx_t_4 = 0;
-
-  /* "pysam/csamtools.pyx":2033
- * 
- *         self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen )
- *         self.iterdata.samfile = self.samfile.samfile             # <<<<<<<<<<<<<<
- *         self.iterdata.iter = self.iter.iter
- *         self.iterdata.seq = NULL
- */
-  __pyx_t_6 = __pyx_v_self->samfile->samfile;
-  __pyx_v_self->iterdata.samfile = __pyx_t_6;
-
-  /* "pysam/csamtools.pyx":2034
- *         self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen )
- *         self.iterdata.samfile = self.samfile.samfile
- *         self.iterdata.iter = self.iter.iter             # <<<<<<<<<<<<<<
- *         self.iterdata.seq = NULL
- *         self.iterdata.tid = -1
- */
-  __pyx_t_7 = __pyx_v_self->iter->iter;
-  __pyx_v_self->iterdata.iter = __pyx_t_7;
-
-  /* "pysam/csamtools.pyx":2035
- *         self.iterdata.samfile = self.samfile.samfile
- *         self.iterdata.iter = self.iter.iter
- *         self.iterdata.seq = NULL             # <<<<<<<<<<<<<<
- *         self.iterdata.tid = -1
- * 
- */
-  __pyx_v_self->iterdata.seq = NULL;
-
-  /* "pysam/csamtools.pyx":2036
- *         self.iterdata.iter = self.iter.iter
- *         self.iterdata.seq = NULL
- *         self.iterdata.tid = -1             # <<<<<<<<<<<<<<
- * 
- *         if self.fastafile != None:
- */
-  __pyx_v_self->iterdata.tid = -1;
-
-  /* "pysam/csamtools.pyx":2038
- *         self.iterdata.tid = -1
- * 
- *         if self.fastafile != None:             # <<<<<<<<<<<<<<
- *             self.iterdata.fastafile = self.fastafile.fastafile
- *         else:
- */
-  __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_self->fastafile), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (__pyx_t_8) {
-
-    /* "pysam/csamtools.pyx":2039
- * 
- *         if self.fastafile != None:
- *             self.iterdata.fastafile = self.fastafile.fastafile             # <<<<<<<<<<<<<<
- *         else:
- *             self.iterdata.fastafile = NULL
- */
-    __pyx_t_9 = __pyx_v_self->fastafile->fastafile;
-    __pyx_v_self->iterdata.fastafile = __pyx_t_9;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":2041
- *             self.iterdata.fastafile = self.fastafile.fastafile
- *         else:
- *             self.iterdata.fastafile = NULL             # <<<<<<<<<<<<<<
- * 
- *         if self.stepper == None or self.stepper == "all":
- */
-    __pyx_v_self->iterdata.fastafile = NULL;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2043
- *             self.iterdata.fastafile = NULL
- * 
- *         if self.stepper == None or self.stepper == "all":             # <<<<<<<<<<<<<<
- *             self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata )
- *         elif self.stepper == "samtools":
- */
-  __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (!__pyx_t_8) {
-    __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, ((PyObject *)__pyx_n_s__all), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_11 = __pyx_t_10;
-  } else {
-    __pyx_t_11 = __pyx_t_8;
-  }
-  if (__pyx_t_11) {
-
-    /* "pysam/csamtools.pyx":2044
- * 
- *         if self.stepper == None or self.stepper == "all":
- *             self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata )             # <<<<<<<<<<<<<<
- *         elif self.stepper == "samtools":
- *             self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata )
- */
-    __pyx_v_self->pileup_iter = bam_plp_init((&__pyx_f_5pysam_9csamtools___advance_all), (&__pyx_v_self->iterdata));
-    goto __pyx_L4;
-  }
-
-  /* "pysam/csamtools.pyx":2045
- *         if self.stepper == None or self.stepper == "all":
- *             self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata )
- *         elif self.stepper == "samtools":             # <<<<<<<<<<<<<<
- *             self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata )
- *         else:
- */
-  __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, ((PyObject *)__pyx_n_s__samtools), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (__pyx_t_11) {
-
-    /* "pysam/csamtools.pyx":2046
- *             self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata )
- *         elif self.stepper == "samtools":
- *             self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata )             # <<<<<<<<<<<<<<
- *         else:
- *             raise ValueError( "unknown stepper option `%s` in IteratorColumn" % self.stepper)
- */
-    __pyx_v_self->pileup_iter = bam_plp_init((&__pyx_f_5pysam_9csamtools___advance_snpcalls), (&__pyx_v_self->iterdata));
-    goto __pyx_L4;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":2048
- *             self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata )
- *         else:
- *             raise ValueError( "unknown stepper option `%s` in IteratorColumn" % self.stepper)             # <<<<<<<<<<<<<<
- * 
- *         if self.max_depth:
- */
-    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_138), __pyx_v_self->stepper); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    PyTuple_SET_ITEM(__pyx_t_5, 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_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":2050
- *             raise ValueError( "unknown stepper option `%s` in IteratorColumn" % self.stepper)
- * 
- *         if self.max_depth:             # <<<<<<<<<<<<<<
- *             bam_plp_set_maxcnt( self.pileup_iter, self.max_depth )
- * 
- */
-  if (__pyx_v_self->max_depth) {
-
-    /* "pysam/csamtools.pyx":2051
- * 
- *         if self.max_depth:
- *             bam_plp_set_maxcnt( self.pileup_iter, self.max_depth )             # <<<<<<<<<<<<<<
- * 
- *         bam_plp_set_mask( self.pileup_iter, self.mask )
- */
-    bam_plp_set_maxcnt(__pyx_v_self->pileup_iter, __pyx_v_self->max_depth);
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":2053
- *             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 ):
- */
-  bam_plp_set_mask(__pyx_v_self->pileup_iter, __pyx_v_self->mask);
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumn.setupIteratorData", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2055
- *         bam_plp_set_mask( self.pileup_iter, self.mask )
- * 
- *     cdef reset( self, tid, start, end ):             # <<<<<<<<<<<<<<
- *         '''reset iterator position.
- * 
- */
-
-static PyObject *__pyx_f_5pysam_9csamtools_14IteratorColumn_reset(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self, PyObject *__pyx_v_tid, PyObject *__pyx_v_start, PyObject *__pyx_v_end) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  bam_iter_t __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("reset", 0);
-  __Pyx_TraceCall("reset", __pyx_f[0], 2055);
-
-  /* "pysam/csamtools.pyx":2061
- *         having to incur the full set-up costs.
- *         '''
- *         self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 )             # <<<<<<<<<<<<<<
- *         self.iterdata.iter = self.iter.iter
- * 
- */
-  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->samfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->samfile));
-  __Pyx_INCREF(__pyx_v_tid);
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tid);
-  __Pyx_GIVEREF(__pyx_v_tid);
-  __Pyx_INCREF(__pyx_v_start);
-  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_start);
-  __Pyx_GIVEREF(__pyx_v_start);
-  __Pyx_INCREF(__pyx_v_end);
-  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_end);
-  __Pyx_GIVEREF(__pyx_v_end);
-  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __Pyx_GOTREF(__pyx_v_self->iter);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->iter));
-  __pyx_v_self->iter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_t_3);
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":2062
- *         '''
- *         self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 )
- *         self.iterdata.iter = self.iter.iter             # <<<<<<<<<<<<<<
- * 
- *         # invalidate sequence if different tid
- */
-  __pyx_t_4 = __pyx_v_self->iter->iter;
-  __pyx_v_self->iterdata.iter = __pyx_t_4;
-
-  /* "pysam/csamtools.pyx":2065
- * 
- *         # invalidate sequence if different tid
- *         if self.tid != tid:             # <<<<<<<<<<<<<<
- *             if self.iterdata.seq != NULL: free( self.iterdata.seq )
- *             self.iterdata.seq = NULL
- */
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_tid, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":2066
- *         # invalidate sequence if different tid
- *         if self.tid != tid:
- *             if self.iterdata.seq != NULL: free( self.iterdata.seq )             # <<<<<<<<<<<<<<
- *             self.iterdata.seq = NULL
- *             self.iterdata.tid = -1
- */
-    __pyx_t_5 = (__pyx_v_self->iterdata.seq != NULL);
-    if (__pyx_t_5) {
-      free(__pyx_v_self->iterdata.seq);
-      goto __pyx_L4;
-    }
-    __pyx_L4:;
-
-    /* "pysam/csamtools.pyx":2067
- *         if self.tid != tid:
- *             if self.iterdata.seq != NULL: free( self.iterdata.seq )
- *             self.iterdata.seq = NULL             # <<<<<<<<<<<<<<
- *             self.iterdata.tid = -1
- * 
- */
-    __pyx_v_self->iterdata.seq = NULL;
-
-    /* "pysam/csamtools.pyx":2068
- *             if self.iterdata.seq != NULL: free( self.iterdata.seq )
- *             self.iterdata.seq = NULL
- *             self.iterdata.tid = -1             # <<<<<<<<<<<<<<
- * 
- *         # self.pileup_iter = bam_plp_init( &__advancepileup, &self.iterdata )
- */
-    __pyx_v_self->iterdata.tid = -1;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2071
- * 
- *         # self.pileup_iter = bam_plp_init( &__advancepileup, &self.iterdata )
- *         bam_plp_reset(self.pileup_iter)             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-  bam_plp_reset(__pyx_v_self->pileup_iter);
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumn.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_14IteratorColumn_9__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_14IteratorColumn_9__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_14IteratorColumn_8__dealloc__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":2073
- *         bam_plp_reset(self.pileup_iter)
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         # reset in order to avoid memory leak messages for iterators
- *         # that have not been fully consumed
- */
-
-static void __pyx_pf_5pysam_9csamtools_14IteratorColumn_8__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2073);
-
-  /* "pysam/csamtools.pyx":2076
- *         # reset in order to avoid memory leak messages for iterators
- *         # that have not been fully consumed
- *         if self.pileup_iter != <bam_plp_t>NULL:             # <<<<<<<<<<<<<<
- *             bam_plp_reset(self.pileup_iter)
- *             bam_plp_destroy(self.pileup_iter)
- */
-  __pyx_t_1 = (__pyx_v_self->pileup_iter != NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":2077
- *         # that have not been fully consumed
- *         if self.pileup_iter != <bam_plp_t>NULL:
- *             bam_plp_reset(self.pileup_iter)             # <<<<<<<<<<<<<<
- *             bam_plp_destroy(self.pileup_iter)
- *             self.pileup_iter = <bam_plp_t>NULL
- */
-    bam_plp_reset(__pyx_v_self->pileup_iter);
-
-    /* "pysam/csamtools.pyx":2078
- *         if self.pileup_iter != <bam_plp_t>NULL:
- *             bam_plp_reset(self.pileup_iter)
- *             bam_plp_destroy(self.pileup_iter)             # <<<<<<<<<<<<<<
- *             self.pileup_iter = <bam_plp_t>NULL
- *             self.plp = <const_bam_pileup1_t_ptr>NULL
- */
-    bam_plp_destroy(__pyx_v_self->pileup_iter);
-
-    /* "pysam/csamtools.pyx":2079
- *             bam_plp_reset(self.pileup_iter)
- *             bam_plp_destroy(self.pileup_iter)
- *             self.pileup_iter = <bam_plp_t>NULL             # <<<<<<<<<<<<<<
- *             self.plp = <const_bam_pileup1_t_ptr>NULL
- * 
- */
-    __pyx_v_self->pileup_iter = NULL;
-
-    /* "pysam/csamtools.pyx":2080
- *             bam_plp_destroy(self.pileup_iter)
- *             self.pileup_iter = <bam_plp_t>NULL
- *             self.plp = <const_bam_pileup1_t_ptr>NULL             # <<<<<<<<<<<<<<
- * 
- *         if self.iterdata.seq != NULL:
- */
-    __pyx_v_self->plp = ((const bam_pileup1_t *)NULL);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2082
- *             self.plp = <const_bam_pileup1_t_ptr>NULL
- * 
- *         if self.iterdata.seq != NULL:             # <<<<<<<<<<<<<<
- *             free(self.iterdata.seq)
- *             self.iterdata.seq = NULL
- */
-  __pyx_t_1 = (__pyx_v_self->iterdata.seq != NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":2083
- * 
- *         if self.iterdata.seq != NULL:
- *             free(self.iterdata.seq)             # <<<<<<<<<<<<<<
- *             self.iterdata.seq = NULL
- * 
- */
-    free(__pyx_v_self->iterdata.seq);
-
-    /* "pysam/csamtools.pyx":2084
- *         if self.iterdata.seq != NULL:
- *             free(self.iterdata.seq)
- *             self.iterdata.seq = NULL             # <<<<<<<<<<<<<<
- * 
- * cdef class IteratorColumnRegion(IteratorColumn):
- */
-    __pyx_v_self->iterdata.seq = NULL;
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_20IteratorColumnRegion_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_20IteratorColumnRegion_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile = 0;
-  int __pyx_v_tid;
-  int __pyx_v_start;
-  int __pyx_v_end;
-  int __pyx_v_truncate;
-  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,&__pyx_n_s__tid,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__truncate,0};
-    PyObject* values[5] = {0,0,0,0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samfile)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tid);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
-          if (value) { values[2] = value; kw_args--; }
-        }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
-          if (value) { values[3] = value; kw_args--; }
-        }
-        case  4:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__truncate);
-          if (value) { values[4] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
-    if (values[1]) {
-      __pyx_v_tid = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-      __pyx_v_tid = ((int)0);
-    }
-    if (values[2]) {
-      __pyx_v_start = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-      __pyx_v_start = ((int)0);
-    }
-    if (values[3]) {
-      __pyx_v_end = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-      __pyx_v_end = __pyx_k_139;
-    }
-    if (values[4]) {
-      __pyx_v_truncate = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_truncate == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-
-      /* "pysam/csamtools.pyx":2093
- *                   int start = 0,
- *                   int end = max_pos,
- *                   int truncate = False,             # <<<<<<<<<<<<<<
- *                   **kwargs ):
- * 
- */
-      __pyx_v_truncate = ((int)0);
-    }
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumnRegion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_20IteratorColumnRegion___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *)__pyx_v_self), __pyx_v_samfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end, __pyx_v_truncate, __pyx_v_kwargs);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_kwargs);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2089
- *     '''iterates over a region only.
- *     '''
- *     def __cinit__(self, Samfile samfile,             # <<<<<<<<<<<<<<
- *                   int tid = 0,
- *                   int start = 0,
- */
-
-static int __pyx_pf_5pysam_9csamtools_20IteratorColumnRegion___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end, int __pyx_v_truncate, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData __pyx_t_2;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 2089);
-
-  /* "pysam/csamtools.pyx":2097
- * 
- *         # initialize iterator
- *         self.setupIteratorData( tid, start, end, 1 )             # <<<<<<<<<<<<<<
- *         self.start = start
- *         self.end = end
- */
-  __pyx_t_2.__pyx_n = 1;
-  __pyx_t_2.reopen = 1;
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_tid, __pyx_v_start, __pyx_v_end, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":2098
- *         # initialize iterator
- *         self.setupIteratorData( tid, start, end, 1 )
- *         self.start = start             # <<<<<<<<<<<<<<
- *         self.end = end
- *         self.truncate = truncate
- */
-  __pyx_v_self->start = __pyx_v_start;
-
-  /* "pysam/csamtools.pyx":2099
- *         self.setupIteratorData( tid, start, end, 1 )
- *         self.start = start
- *         self.end = end             # <<<<<<<<<<<<<<
- *         self.truncate = truncate
- * 
- */
-  __pyx_v_self->end = __pyx_v_end;
-
-  /* "pysam/csamtools.pyx":2100
- *         self.start = start
- *         self.end = end
- *         self.truncate = truncate             # <<<<<<<<<<<<<<
- * 
- *     def __next__(self):
- */
-  __pyx_v_self->truncate = __pyx_v_truncate;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumnRegion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_20IteratorColumnRegion_3__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_20IteratorColumnRegion_2__next__[] = "python version of next().\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_20IteratorColumnRegion_2__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_20IteratorColumnRegion_3__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_20IteratorColumnRegion_2__next__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2102
- *         self.truncate = truncate
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- *         """
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_20IteratorColumnRegion_2__next__(struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__next__", 0);
-  __Pyx_TraceCall("__next__", __pyx_f[0], 2102);
-
-  /* "pysam/csamtools.pyx":2106
- *         """
- * 
- *         while 1:             # <<<<<<<<<<<<<<
- *             self.cnext()
- *             if self.n_plp < 0:
- */
-  while (1) {
-    if (!1) break;
-
-    /* "pysam/csamtools.pyx":2107
- * 
- *         while 1:
- *             self.cnext()             # <<<<<<<<<<<<<<
- *             if self.n_plp < 0:
- *                 raise ValueError("error during iteration" )
- */
-    ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.cnext(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self));
-
-    /* "pysam/csamtools.pyx":2108
- *         while 1:
- *             self.cnext()
- *             if self.n_plp < 0:             # <<<<<<<<<<<<<<
- *                 raise ValueError("error during iteration" )
- * 
- */
-    __pyx_t_1 = (__pyx_v_self->__pyx_base.n_plp < 0);
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":2109
- *             self.cnext()
- *             if self.n_plp < 0:
- *                 raise ValueError("error during iteration" )             # <<<<<<<<<<<<<<
- * 
- *             if self.plp == NULL:
- */
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_141), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
-
-    /* "pysam/csamtools.pyx":2111
- *                 raise ValueError("error during iteration" )
- * 
- *             if self.plp == NULL:             # <<<<<<<<<<<<<<
- *                 raise StopIteration
- * 
- */
-    __pyx_t_1 = (__pyx_v_self->__pyx_base.plp == NULL);
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":2112
- * 
- *             if self.plp == NULL:
- *                 raise StopIteration             # <<<<<<<<<<<<<<
- * 
- *             if self.truncate:
- */
-      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-
-    /* "pysam/csamtools.pyx":2114
- *                 raise StopIteration
- * 
- *             if self.truncate:             # <<<<<<<<<<<<<<
- *                 if self.start > self.pos: continue
- *                 if self.pos >= self.end: raise StopIteration
- */
-    if (__pyx_v_self->truncate) {
-
-      /* "pysam/csamtools.pyx":2115
- * 
- *             if self.truncate:
- *                 if self.start > self.pos: continue             # <<<<<<<<<<<<<<
- *                 if self.pos >= self.end: raise StopIteration
- * 
- */
-      __pyx_t_1 = (__pyx_v_self->start > __pyx_v_self->__pyx_base.pos);
-      if (__pyx_t_1) {
-        goto __pyx_L3_continue;
-        goto __pyx_L8;
-      }
-      __pyx_L8:;
-
-      /* "pysam/csamtools.pyx":2116
- *             if self.truncate:
- *                 if self.start > self.pos: continue
- *                 if self.pos >= self.end: raise StopIteration             # <<<<<<<<<<<<<<
- * 
- *             return makePileupProxy( &self.plp,
- */
-      __pyx_t_1 = (__pyx_v_self->__pyx_base.pos >= __pyx_v_self->end);
-      if (__pyx_t_1) {
-        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L9;
-      }
-      __pyx_L9:;
-      goto __pyx_L7;
-    }
-    __pyx_L7:;
-
-    /* "pysam/csamtools.pyx":2118
- *                 if self.pos >= self.end: raise StopIteration
- * 
- *             return makePileupProxy( &self.plp,             # <<<<<<<<<<<<<<
- *                                      self.tid,
- *                                      self.pos,
- */
-    __Pyx_XDECREF(__pyx_r);
-
-    /* "pysam/csamtools.pyx":2121
- *                                      self.tid,
- *                                      self.pos,
- *                                      self.n_plp )             # <<<<<<<<<<<<<<
- * 
- * cdef class IteratorColumnAllRefs(IteratorColumn):
- */
-    __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupProxy((&__pyx_v_self->__pyx_base.plp), __pyx_v_self->__pyx_base.tid, __pyx_v_self->__pyx_base.pos, __pyx_v_self->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
-    goto __pyx_L0;
-    __pyx_L3_continue:;
-  }
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumnRegion.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_21IteratorColumnAllRefs_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_21IteratorColumnAllRefs_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile = 0;
-  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,0};
-    PyObject* values[1] = {0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samfile)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-    }
-    __pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumnAllRefs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_21IteratorColumnAllRefs___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self), __pyx_v_samfile, __pyx_v_kwargs);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_kwargs);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2127
- *     """
- * 
- *     def __cinit__(self,             # <<<<<<<<<<<<<<
- *                   Samfile samfile,
- *                   **kwargs ):
- */
-
-static int __pyx_pf_5pysam_9csamtools_21IteratorColumnAllRefs___cinit__(struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-  __Pyx_TraceCall("__cinit__", __pyx_f[0], 2127);
-
-  /* "pysam/csamtools.pyx":2132
- * 
- *         # no iteration over empty files
- *         if not samfile.nreferences: raise StopIteration             # <<<<<<<<<<<<<<
- * 
- *         # initialize iterator
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __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 = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = (!__pyx_t_2);
-  if (__pyx_t_3) {
-    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2135
- * 
- *         # initialize iterator
- *         self.setupIteratorData( self.tid, 0, max_pos, 1 )             # <<<<<<<<<<<<<<
- * 
- *     def __next__(self):
- */
-  __pyx_t_4.__pyx_n = 1;
-  __pyx_t_4.reopen = 1;
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_self->__pyx_base.tid, 0, __pyx_v_5pysam_9csamtools_max_pos, &__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.IteratorColumnAllRefs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_21IteratorColumnAllRefs_3__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__[] = "python version of next().\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_21IteratorColumnAllRefs_3__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2137
- *         self.setupIteratorData( self.tid, 0, max_pos, 1 )
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- *         """
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__(struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData __pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__next__", 0);
-  __Pyx_TraceCall("__next__", __pyx_f[0], 2137);
-
-  /* "pysam/csamtools.pyx":2141
- *         """
- * 
- *         while 1:             # <<<<<<<<<<<<<<
- *             self.cnext()
- * 
- */
-  while (1) {
-    if (!1) break;
-
-    /* "pysam/csamtools.pyx":2142
- * 
- *         while 1:
- *             self.cnext()             # <<<<<<<<<<<<<<
- * 
- *             if self.n_plp < 0:
- */
-    ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.cnext(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self));
-
-    /* "pysam/csamtools.pyx":2144
- *             self.cnext()
- * 
- *             if self.n_plp < 0:             # <<<<<<<<<<<<<<
- *                 raise ValueError("error during iteration" )
- * 
- */
-    __pyx_t_1 = (__pyx_v_self->__pyx_base.n_plp < 0);
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":2145
- * 
- *             if self.n_plp < 0:
- *                 raise ValueError("error during iteration" )             # <<<<<<<<<<<<<<
- * 
- *             # return result, if within same reference
- */
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_142), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
-
-    /* "pysam/csamtools.pyx":2148
- * 
- *             # return result, if within same reference
- *             if self.plp != NULL:             # <<<<<<<<<<<<<<
- *                 return makePileupProxy( &self.plp,
- *                                          self.tid,
- */
-    __pyx_t_1 = (__pyx_v_self->__pyx_base.plp != NULL);
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":2149
- *             # return result, if within same reference
- *             if self.plp != NULL:
- *                 return makePileupProxy( &self.plp,             # <<<<<<<<<<<<<<
- *                                          self.tid,
- *                                          self.pos,
- */
-      __Pyx_XDECREF(__pyx_r);
-
-      /* "pysam/csamtools.pyx":2152
- *                                          self.tid,
- *                                          self.pos,
- *                                          self.n_plp )             # <<<<<<<<<<<<<<
- * 
- *             # otherwise, proceed to next reference or stop
- */
-      __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupProxy((&__pyx_v_self->__pyx_base.plp), __pyx_v_self->__pyx_base.tid, __pyx_v_self->__pyx_base.pos, __pyx_v_self->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_r = __pyx_t_2;
-      __pyx_t_2 = 0;
-      goto __pyx_L0;
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-
-    /* "pysam/csamtools.pyx":2155
- * 
- *             # otherwise, proceed to next reference or stop
- *             self.tid += 1             # <<<<<<<<<<<<<<
- *             if self.tid < self.samfile.nreferences:
- *                 self.setupIteratorData( self.tid, 0, max_pos, 0 )
- */
-    __pyx_v_self->__pyx_base.tid = (__pyx_v_self->__pyx_base.tid + 1);
-
-    /* "pysam/csamtools.pyx":2156
- *             # otherwise, proceed to next reference or stop
- *             self.tid += 1
- *             if self.tid < self.samfile.nreferences:             # <<<<<<<<<<<<<<
- *                 self.setupIteratorData( self.tid, 0, max_pos, 0 )
- *             else:
- */
-    __pyx_t_2 = PyInt_FromLong(__pyx_v_self->__pyx_base.tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self->__pyx_base.samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_1) {
-
-      /* "pysam/csamtools.pyx":2157
- *             self.tid += 1
- *             if self.tid < self.samfile.nreferences:
- *                 self.setupIteratorData( self.tid, 0, max_pos, 0 )             # <<<<<<<<<<<<<<
- *             else:
- *                 raise StopIteration
- */
-      __pyx_t_5.__pyx_n = 1;
-      __pyx_t_5.reopen = 0;
-      __pyx_t_4 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_self->__pyx_base.tid, 0, __pyx_v_5pysam_9csamtools_max_pos, &__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      goto __pyx_L7;
-    }
-    /*else*/ {
-
-      /* "pysam/csamtools.pyx":2159
- *                 self.setupIteratorData( self.tid, 0, max_pos, 0 )
- *             else:
- *                 raise StopIteration             # <<<<<<<<<<<<<<
- * 
- * ##-------------------------------------------------------------------
- */
-      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __pyx_L7:;
-  }
-
-  __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("pysam.csamtools.IteratorColumnAllRefs.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2164
- * ##-------------------------------------------------------------------
- * ##-------------------------------------------------------------------
- * cdef inline int32_t query_start(bam1_t *src) except -1:             # <<<<<<<<<<<<<<
- *     cdef uint32_t * cigar_p, op
- *     cdef uint32_t k
- */
-
-static CYTHON_INLINE int32_t __pyx_f_5pysam_9csamtools_query_start(bam1_t *__pyx_v_src) {
-  uint32_t *__pyx_v_cigar_p;
-  uint32_t __pyx_v_op;
-  uint32_t __pyx_v_k;
-  uint32_t __pyx_v_start_offset;
-  int32_t __pyx_r;
-  __Pyx_RefNannyDeclarations
-  uint32_t __pyx_t_1;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("query_start", 0);
-  __Pyx_TraceCall("query_start", __pyx_f[0], 2164);
-
-  /* "pysam/csamtools.pyx":2167
- *     cdef uint32_t * cigar_p, op
- *     cdef uint32_t k
- *     cdef uint32_t start_offset = 0             # <<<<<<<<<<<<<<
- * 
- *     if src.core.n_cigar:
- */
-  __pyx_v_start_offset = 0;
-
-  /* "pysam/csamtools.pyx":2169
- *     cdef uint32_t start_offset = 0
- * 
- *     if src.core.n_cigar:             # <<<<<<<<<<<<<<
- *         cigar_p = bam1_cigar(src);
- *         for k from 0 <= k < src.core.n_cigar:
- */
-  if (__pyx_v_src->core.n_cigar) {
-
-    /* "pysam/csamtools.pyx":2170
- * 
- *     if src.core.n_cigar:
- *         cigar_p = bam1_cigar(src);             # <<<<<<<<<<<<<<
- *         for k from 0 <= k < src.core.n_cigar:
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- */
-    __pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
-
-    /* "pysam/csamtools.pyx":2171
- *     if src.core.n_cigar:
- *         cigar_p = bam1_cigar(src);
- *         for k from 0 <= k < src.core.n_cigar:             # <<<<<<<<<<<<<<
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- *             if op==BAM_CHARD_CLIP:
- */
-    __pyx_t_1 = __pyx_v_src->core.n_cigar;
-    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_1; __pyx_v_k++) {
-
-      /* "pysam/csamtools.pyx":2172
- *         cigar_p = bam1_cigar(src);
- *         for k from 0 <= k < src.core.n_cigar:
- *             op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
- *             if op==BAM_CHARD_CLIP:
- *                 if start_offset!=0 and start_offset!=src.core.l_qseq:
- */
-      __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
-
-      /* "pysam/csamtools.pyx":2177
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- *                     return -1
- *             elif op==BAM_CSOFT_CLIP:             # <<<<<<<<<<<<<<
- *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
- *             else:
- */
-      switch (__pyx_v_op) {
-
-        /* "pysam/csamtools.pyx":2173
- *         for k from 0 <= k < src.core.n_cigar:
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- *             if op==BAM_CHARD_CLIP:             # <<<<<<<<<<<<<<
- *                 if start_offset!=0 and start_offset!=src.core.l_qseq:
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- */
-        case 5:
-
-        /* "pysam/csamtools.pyx":2174
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- *             if op==BAM_CHARD_CLIP:
- *                 if start_offset!=0 and start_offset!=src.core.l_qseq:             # <<<<<<<<<<<<<<
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- *                     return -1
- */
-        __pyx_t_2 = (__pyx_v_start_offset != 0);
-        if (__pyx_t_2) {
-          __pyx_t_3 = (__pyx_v_start_offset != __pyx_v_src->core.l_qseq);
-          __pyx_t_4 = __pyx_t_3;
-        } else {
-          __pyx_t_4 = __pyx_t_2;
-        }
-        if (__pyx_t_4) {
-
-          /* "pysam/csamtools.pyx":2175
- *             if op==BAM_CHARD_CLIP:
- *                 if start_offset!=0 and start_offset!=src.core.l_qseq:
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')             # <<<<<<<<<<<<<<
- *                     return -1
- *             elif op==BAM_CSOFT_CLIP:
- */
-          PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_143);
-
-          /* "pysam/csamtools.pyx":2176
- *                 if start_offset!=0 and start_offset!=src.core.l_qseq:
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- *                     return -1             # <<<<<<<<<<<<<<
- *             elif op==BAM_CSOFT_CLIP:
- *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
- */
-          __pyx_r = -1;
-          goto __pyx_L0;
-          goto __pyx_L6;
-        }
-        __pyx_L6:;
-        break;
-
-        /* "pysam/csamtools.pyx":2177
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- *                     return -1
- *             elif op==BAM_CSOFT_CLIP:             # <<<<<<<<<<<<<<
- *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
- *             else:
- */
-        case 4:
-
-        /* "pysam/csamtools.pyx":2178
- *                     return -1
- *             elif op==BAM_CSOFT_CLIP:
- *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
- *             else:
- *                 break
- */
-        __pyx_v_start_offset = (__pyx_v_start_offset + ((__pyx_v_cigar_p[__pyx_v_k]) >> 4));
-        break;
-        default:
-
-        /* "pysam/csamtools.pyx":2180
- *                 start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
- *             else:
- *                 break             # <<<<<<<<<<<<<<
- * 
- *     return start_offset
- */
-        goto __pyx_L5_break;
-        break;
-      }
-    }
-    __pyx_L5_break:;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2182
- *                 break
- * 
- *     return start_offset             # <<<<<<<<<<<<<<
- * 
- * ##-------------------------------------------------------------------
- */
-  __pyx_r = __pyx_v_start_offset;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2187
- * ##-------------------------------------------------------------------
- * ##-------------------------------------------------------------------
- * cdef inline int32_t query_end(bam1_t *src) except -1:             # <<<<<<<<<<<<<<
- *     cdef uint32_t * cigar_p, op
- *     cdef uint32_t k
- */
-
-static CYTHON_INLINE int32_t __pyx_f_5pysam_9csamtools_query_end(bam1_t *__pyx_v_src) {
-  uint32_t *__pyx_v_cigar_p;
-  uint32_t __pyx_v_op;
-  uint32_t __pyx_v_k;
-  uint32_t __pyx_v_end_offset;
-  int32_t __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("query_end", 0);
-  __Pyx_TraceCall("query_end", __pyx_f[0], 2187);
-
-  /* "pysam/csamtools.pyx":2190
- *     cdef uint32_t * cigar_p, op
- *     cdef uint32_t k
- *     cdef uint32_t end_offset = src.core.l_qseq             # <<<<<<<<<<<<<<
- * 
- *     if src.core.n_cigar>1:
- */
-  __pyx_t_1 = __pyx_v_src->core.l_qseq;
-  __pyx_v_end_offset = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2192
- *     cdef uint32_t end_offset = src.core.l_qseq
- * 
- *     if src.core.n_cigar>1:             # <<<<<<<<<<<<<<
- *         cigar_p = bam1_cigar(src);
- *         for k from src.core.n_cigar > k >= 1:
- */
-  __pyx_t_2 = (__pyx_v_src->core.n_cigar > 1);
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":2193
- * 
- *     if src.core.n_cigar>1:
- *         cigar_p = bam1_cigar(src);             # <<<<<<<<<<<<<<
- *         for k from src.core.n_cigar > k >= 1:
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- */
-    __pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
-
-    /* "pysam/csamtools.pyx":2194
- *     if src.core.n_cigar>1:
- *         cigar_p = bam1_cigar(src);
- *         for k from src.core.n_cigar > k >= 1:             # <<<<<<<<<<<<<<
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- *             if op==BAM_CHARD_CLIP:
- */
-    for (__pyx_v_k = __pyx_v_src->core.n_cigar-1; __pyx_v_k >= 1; __pyx_v_k--) {
-
-      /* "pysam/csamtools.pyx":2195
- *         cigar_p = bam1_cigar(src);
- *         for k from src.core.n_cigar > k >= 1:
- *             op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
- *             if op==BAM_CHARD_CLIP:
- *                 if end_offset!=0 and end_offset!=src.core.l_qseq:
- */
-      __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
-
-      /* "pysam/csamtools.pyx":2200
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- *                     return -1
- *             elif op==BAM_CSOFT_CLIP:             # <<<<<<<<<<<<<<
- *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
- *             else:
- */
-      switch (__pyx_v_op) {
-
-        /* "pysam/csamtools.pyx":2196
- *         for k from src.core.n_cigar > k >= 1:
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- *             if op==BAM_CHARD_CLIP:             # <<<<<<<<<<<<<<
- *                 if end_offset!=0 and end_offset!=src.core.l_qseq:
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- */
-        case 5:
-
-        /* "pysam/csamtools.pyx":2197
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- *             if op==BAM_CHARD_CLIP:
- *                 if end_offset!=0 and end_offset!=src.core.l_qseq:             # <<<<<<<<<<<<<<
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- *                     return -1
- */
-        __pyx_t_2 = (__pyx_v_end_offset != 0);
-        if (__pyx_t_2) {
-          __pyx_t_3 = (__pyx_v_end_offset != __pyx_v_src->core.l_qseq);
-          __pyx_t_4 = __pyx_t_3;
-        } else {
-          __pyx_t_4 = __pyx_t_2;
-        }
-        if (__pyx_t_4) {
-
-          /* "pysam/csamtools.pyx":2198
- *             if op==BAM_CHARD_CLIP:
- *                 if end_offset!=0 and end_offset!=src.core.l_qseq:
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')             # <<<<<<<<<<<<<<
- *                     return -1
- *             elif op==BAM_CSOFT_CLIP:
- */
-          PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_143);
-
-          /* "pysam/csamtools.pyx":2199
- *                 if end_offset!=0 and end_offset!=src.core.l_qseq:
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- *                     return -1             # <<<<<<<<<<<<<<
- *             elif op==BAM_CSOFT_CLIP:
- *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
- */
-          __pyx_r = -1;
-          goto __pyx_L0;
-          goto __pyx_L6;
-        }
-        __pyx_L6:;
-        break;
-
-        /* "pysam/csamtools.pyx":2200
- *                     PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
- *                     return -1
- *             elif op==BAM_CSOFT_CLIP:             # <<<<<<<<<<<<<<
- *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
- *             else:
- */
-        case 4:
-
-        /* "pysam/csamtools.pyx":2201
- *                     return -1
- *             elif op==BAM_CSOFT_CLIP:
- *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
- *             else:
- *                 break
- */
-        __pyx_v_end_offset = (__pyx_v_end_offset - ((__pyx_v_cigar_p[__pyx_v_k]) >> 4));
-        break;
-        default:
-
-        /* "pysam/csamtools.pyx":2203
- *                 end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
- *             else:
- *                 break             # <<<<<<<<<<<<<<
- * 
- *     if end_offset==0:
- */
-        goto __pyx_L5_break;
-        break;
-      }
-    }
-    __pyx_L5_break:;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2205
- *                 break
- * 
- *     if end_offset==0:             # <<<<<<<<<<<<<<
- *         end_offset = src.core.l_qseq
- * 
- */
-  __pyx_t_4 = (__pyx_v_end_offset == 0);
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":2206
- * 
- *     if end_offset==0:
- *         end_offset = src.core.l_qseq             # <<<<<<<<<<<<<<
- * 
- *     return end_offset
- */
-    __pyx_t_1 = __pyx_v_src->core.l_qseq;
-    __pyx_v_end_offset = __pyx_t_1;
-    goto __pyx_L7;
-  }
-  __pyx_L7:;
-
-  /* "pysam/csamtools.pyx":2208
- *         end_offset = src.core.l_qseq
- * 
- *     return end_offset             # <<<<<<<<<<<<<<
- * 
- * 
- */
-  __pyx_r = __pyx_v_end_offset;
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2211
- * 
- * 
- * cdef inline object get_seq_range(bam1_t *src, uint32_t start, uint32_t end):             # <<<<<<<<<<<<<<
- *     cdef uint8_t * p
- *     cdef uint32_t k
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5pysam_9csamtools_get_seq_range(bam1_t *__pyx_v_src, uint32_t __pyx_v_start, uint32_t __pyx_v_end) {
-  uint8_t *__pyx_v_p;
-  uint32_t __pyx_v_k;
-  char *__pyx_v_s;
-  PyObject *__pyx_v_seq = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  char *__pyx_t_3;
-  uint32_t __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("get_seq_range", 0);
-  __Pyx_TraceCall("get_seq_range", __pyx_f[0], 2211);
-
-  /* "pysam/csamtools.pyx":2216
- *     cdef char * s
- * 
- *     if not src.core.l_qseq:             # <<<<<<<<<<<<<<
- *         return None
- * 
- */
-  __pyx_t_1 = (!__pyx_v_src->core.l_qseq);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":2217
- * 
- *     if not src.core.l_qseq:
- *         return None             # <<<<<<<<<<<<<<
- * 
- *     seq = PyBytes_FromStringAndSize(NULL, end - start)
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2219
- *         return None
- * 
- *     seq = PyBytes_FromStringAndSize(NULL, end - start)             # <<<<<<<<<<<<<<
- *     s   = <char*>seq
- *     p   = bam1_seq(src)
- */
-  __pyx_t_2 = ((PyObject *)PyBytes_FromStringAndSize(NULL, (__pyx_v_end - __pyx_v_start))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_seq = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":2220
- * 
- *     seq = PyBytes_FromStringAndSize(NULL, end - start)
- *     s   = <char*>seq             # <<<<<<<<<<<<<<
- *     p   = bam1_seq(src)
- * 
- */
-  __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_seq)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_s = ((char *)__pyx_t_3);
-
-  /* "pysam/csamtools.pyx":2221
- *     seq = PyBytes_FromStringAndSize(NULL, end - start)
- *     s   = <char*>seq
- *     p   = bam1_seq(src)             # <<<<<<<<<<<<<<
- * 
- *     for k from start <= k < end:
- */
-  __pyx_v_p = bam1_seq(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2223
- *     p   = bam1_seq(src)
- * 
- *     for k from start <= k < end:             # <<<<<<<<<<<<<<
- *         # equivalent to bam_nt16_rev_table[bam1_seqi(s, i)] (see bam.c)
- *         # note: do not use string literal as it will be a python string
- */
-  __pyx_t_4 = __pyx_v_end;
-  for (__pyx_v_k = __pyx_v_start; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
-
-    /* "pysam/csamtools.pyx":2226
- *         # equivalent to bam_nt16_rev_table[bam1_seqi(s, i)] (see bam.c)
- *         # note: do not use string literal as it will be a python string
- *         s[k-start] = bam_nt16_rev_table[p[k/2] >> 4 * (1 - k%2) & 0xf]             # <<<<<<<<<<<<<<
- * 
- *     return seq
- */
-    (__pyx_v_s[(__pyx_v_k - __pyx_v_start)]) = (__pyx_v_5pysam_9csamtools_bam_nt16_rev_table[(((__pyx_v_p[__Pyx_div_long(__pyx_v_k, 2)]) >> (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2)))) & 0xf)]);
-  }
-
-  /* "pysam/csamtools.pyx":2228
- *         s[k-start] = bam_nt16_rev_table[p[k/2] >> 4 * (1 - k%2) & 0xf]
- * 
- *     return seq             # <<<<<<<<<<<<<<
- * 
- * 
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_seq));
-  __pyx_r = ((PyObject *)__pyx_v_seq);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.get_seq_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_seq);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2231
- * 
- * 
- * cdef inline object get_qual_range(bam1_t *src, uint32_t start, uint32_t end):             # <<<<<<<<<<<<<<
- *     cdef uint8_t * p
- *     cdef uint32_t k
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5pysam_9csamtools_get_qual_range(bam1_t *__pyx_v_src, uint32_t __pyx_v_start, uint32_t __pyx_v_end) {
-  uint8_t *__pyx_v_p;
-  uint32_t __pyx_v_k;
-  char *__pyx_v_q;
-  PyObject *__pyx_v_qual = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  char *__pyx_t_3;
-  uint32_t __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("get_qual_range", 0);
-  __Pyx_TraceCall("get_qual_range", __pyx_f[0], 2231);
-
-  /* "pysam/csamtools.pyx":2236
- *     cdef char * q
- * 
- *     p = bam1_qual(src)             # <<<<<<<<<<<<<<
- *     if p[0] == 0xff:
- *         return None
- */
-  __pyx_v_p = bam1_qual(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2237
- * 
- *     p = bam1_qual(src)
- *     if p[0] == 0xff:             # <<<<<<<<<<<<<<
- *         return None
- * 
- */
-  __pyx_t_1 = ((__pyx_v_p[0]) == 0xff);
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":2238
- *     p = bam1_qual(src)
- *     if p[0] == 0xff:
- *         return None             # <<<<<<<<<<<<<<
- * 
- *     qual = PyBytes_FromStringAndSize(NULL, end - start)
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2240
- *         return None
- * 
- *     qual = PyBytes_FromStringAndSize(NULL, end - start)             # <<<<<<<<<<<<<<
- *     q    = <char*>qual
- * 
- */
-  __pyx_t_2 = ((PyObject *)PyBytes_FromStringAndSize(NULL, (__pyx_v_end - __pyx_v_start))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_qual = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":2241
- * 
- *     qual = PyBytes_FromStringAndSize(NULL, end - start)
- *     q    = <char*>qual             # <<<<<<<<<<<<<<
- * 
- *     for k from start <= k < end:
- */
-  __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_qual)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_q = ((char *)__pyx_t_3);
-
-  /* "pysam/csamtools.pyx":2243
- *     q    = <char*>qual
- * 
- *     for k from start <= k < end:             # <<<<<<<<<<<<<<
- *         ## equivalent to t[i] + 33 (see bam.c)
- *         q[k-start] = p[k] + 33
- */
-  __pyx_t_4 = __pyx_v_end;
-  for (__pyx_v_k = __pyx_v_start; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
-
-    /* "pysam/csamtools.pyx":2245
- *     for k from start <= k < end:
- *         ## equivalent to t[i] + 33 (see bam.c)
- *         q[k-start] = p[k] + 33             # <<<<<<<<<<<<<<
- * 
- *     return qual
- */
-    (__pyx_v_q[(__pyx_v_k - __pyx_v_start)]) = ((__pyx_v_p[__pyx_v_k]) + 33);
-  }
-
-  /* "pysam/csamtools.pyx":2247
- *         q[k-start] = p[k] + 33
- * 
- *     return qual             # <<<<<<<<<<<<<<
- * 
- * cdef class AlignedRead:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_qual));
-  __pyx_r = ((PyObject *)__pyx_v_qual);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.get_qual_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_qual);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead___init__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2279
- * 
- *     # Now only called when instances are created from Python
- *     def __init__(self):             # <<<<<<<<<<<<<<
- *         # see bam_init1
- *         self._delegate = <bam1_t*>calloc( 1, sizeof( bam1_t) )
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead___init__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 2279);
-
-  /* "pysam/csamtools.pyx":2281
- *     def __init__(self):
- *         # see bam_init1
- *         self._delegate = <bam1_t*>calloc( 1, sizeof( bam1_t) )             # <<<<<<<<<<<<<<
- *         # allocate some memory
- *         # If size is 0, calloc does not return a pointer that can be passed to free()
- */
-  __pyx_v_self->_delegate = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
-
-  /* "pysam/csamtools.pyx":2285
- *         # If size is 0, calloc does not return a pointer that can be passed to free()
- *         # so allocate 40 bytes for a new read
- *         self._delegate.m_data = 40             # <<<<<<<<<<<<<<
- *         self._delegate.data = <uint8_t *>calloc( self._delegate.m_data, 1 )
- *         self._delegate.data_len = 0
- */
-  __pyx_v_self->_delegate->m_data = 40;
-
-  /* "pysam/csamtools.pyx":2286
- *         # so allocate 40 bytes for a new read
- *         self._delegate.m_data = 40
- *         self._delegate.data = <uint8_t *>calloc( self._delegate.m_data, 1 )             # <<<<<<<<<<<<<<
- *         self._delegate.data_len = 0
- * 
- */
-  __pyx_v_self->_delegate->data = ((uint8_t *)calloc(__pyx_v_self->_delegate->m_data, 1));
-
-  /* "pysam/csamtools.pyx":2287
- *         self._delegate.m_data = 40
- *         self._delegate.data = <uint8_t *>calloc( self._delegate.m_data, 1 )
- *         self._delegate.data_len = 0             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-  __pyx_v_self->_delegate->data_len = 0;
-
-  __pyx_r = 0;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_11AlignedRead_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_11AlignedRead_3__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_11AlignedRead_2__dealloc__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":2289
- *         self._delegate.data_len = 0
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         bam_destroy1(self._delegate)
- * 
- */
-
-static void __pyx_pf_5pysam_9csamtools_11AlignedRead_2__dealloc__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2289);
-
-  /* "pysam/csamtools.pyx":2290
- * 
- *     def __dealloc__(self):
- *         bam_destroy1(self._delegate)             # <<<<<<<<<<<<<<
- * 
- *     def __str__(self):
- */
-  bam_destroy1(__pyx_v_self->_delegate);
-
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5__str__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11AlignedRead_4__str__[] = "return string representation of alignment.\n\n        The representation is an approximate :term:`sam` format.\n\n        An aligned read might not be associated with a :term:`Samfile`.\n        As a result :term:`tid` is shown instead of the reference name.\n\n        Similarly, the tags field is returned in its parsed state.\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_11AlignedRead_4__str__;
-#endif
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5__str__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4__str__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2292
- *         bam_destroy1(self._delegate)
- * 
- *     def __str__(self):             # <<<<<<<<<<<<<<
- *         """return string representation of alignment.
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4__str__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_v_seq = NULL;
-  PyObject *__pyx_v_qual = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
-  PyObject *__pyx_t_12 = NULL;
-  PyObject *__pyx_t_13 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__str__", 0);
-  __Pyx_TraceCall("__str__", __pyx_f[0], 2292);
-
-  /* "pysam/csamtools.pyx":2304
- *         # sam-parsing is done in sam.c/bam_format1_core which
- *         # requires a valid header.
- *         if sys.version_info[0] < 3:             # <<<<<<<<<<<<<<
- *             seq = self.seq
- *             qual = self.qual
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2304; __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 = 2304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":2305
- *         # requires a valid header.
- *         if sys.version_info[0] < 3:
- *             seq = self.seq             # <<<<<<<<<<<<<<
- *             qual = self.qual
- *         else:
- */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_v_seq = __pyx_t_2;
-    __pyx_t_2 = 0;
-
-    /* "pysam/csamtools.pyx":2306
- *         if sys.version_info[0] < 3:
- *             seq = self.seq
- *             qual = self.qual             # <<<<<<<<<<<<<<
- *         else:
- *             seq = self.seq.decode('ascii')
- */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_v_qual = __pyx_t_2;
-    __pyx_t_2 = 0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":2308
- *             qual = self.qual
- *         else:
- *             seq = self.seq.decode('ascii')             # <<<<<<<<<<<<<<
- *             qual = self.qual.decode('ascii')
- *         return "\t".join(map(str, (self.qname,
- */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_144), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_v_seq = __pyx_t_2;
-    __pyx_t_2 = 0;
-
-    /* "pysam/csamtools.pyx":2309
- *         else:
- *             seq = self.seq.decode('ascii')
- *             qual = self.qual.decode('ascii')             # <<<<<<<<<<<<<<
- *         return "\t".join(map(str, (self.qname,
- *                                    self.flag,
- */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_145), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_v_qual = __pyx_t_2;
-    __pyx_t_2 = 0;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2310
- *             seq = self.seq.decode('ascii')
- *             qual = self.qual.decode('ascii')
- *         return "\t".join(map(str, (self.qname,             # <<<<<<<<<<<<<<
- *                                    self.flag,
- *                                    self.rname,
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-
-  /* "pysam/csamtools.pyx":2311
- *             qual = self.qual.decode('ascii')
- *         return "\t".join(map(str, (self.qname,
- *                                    self.flag,             # <<<<<<<<<<<<<<
- *                                    self.rname,
- *                                    self.pos,
- */
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-
-  /* "pysam/csamtools.pyx":2312
- *         return "\t".join(map(str, (self.qname,
- *                                    self.flag,
- *                                    self.rname,             # <<<<<<<<<<<<<<
- *                                    self.pos,
- *                                    self.mapq,
- */
-  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__rname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-
-  /* "pysam/csamtools.pyx":2313
- *                                    self.flag,
- *                                    self.rname,
- *                                    self.pos,             # <<<<<<<<<<<<<<
- *                                    self.mapq,
- *                                    self.cigar,
- */
-  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-
-  /* "pysam/csamtools.pyx":2314
- *                                    self.rname,
- *                                    self.pos,
- *                                    self.mapq,             # <<<<<<<<<<<<<<
- *                                    self.cigar,
- *                                    self.mrnm,
- */
-  __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mapq); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-
-  /* "pysam/csamtools.pyx":2315
- *                                    self.pos,
- *                                    self.mapq,
- *                                    self.cigar,             # <<<<<<<<<<<<<<
- *                                    self.mrnm,
- *                                    self.mpos,
- */
-  __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-
-  /* "pysam/csamtools.pyx":2316
- *                                    self.mapq,
- *                                    self.cigar,
- *                                    self.mrnm,             # <<<<<<<<<<<<<<
- *                                    self.mpos,
- *                                    self.rlen,
- */
-  __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mrnm); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-
-  /* "pysam/csamtools.pyx":2317
- *                                    self.cigar,
- *                                    self.mrnm,
- *                                    self.mpos,             # <<<<<<<<<<<<<<
- *                                    self.rlen,
- *                                    seq,
- */
-  __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mpos); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-
-  /* "pysam/csamtools.pyx":2318
- *                                    self.mrnm,
- *                                    self.mpos,
- *                                    self.rlen,             # <<<<<<<<<<<<<<
- *                                    seq,
- *                                    qual,
- */
-  __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__rlen); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_11);
-
-  /* "pysam/csamtools.pyx":2321
- *                                    seq,
- *                                    qual,
- *                                    self.tags )))             # <<<<<<<<<<<<<<
- * 
- *     def compare(self, AlignedRead other):
- */
-  __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tags); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_12);
-  __pyx_t_13 = PyTuple_New(12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__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_4);
-  __Pyx_GIVEREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_6);
-  __Pyx_GIVEREF(__pyx_t_6);
-  PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_t_7);
-  __Pyx_GIVEREF(__pyx_t_7);
-  PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_t_8);
-  __Pyx_GIVEREF(__pyx_t_8);
-  PyTuple_SET_ITEM(__pyx_t_13, 6, __pyx_t_9);
-  __Pyx_GIVEREF(__pyx_t_9);
-  PyTuple_SET_ITEM(__pyx_t_13, 7, __pyx_t_10);
-  __Pyx_GIVEREF(__pyx_t_10);
-  PyTuple_SET_ITEM(__pyx_t_13, 8, __pyx_t_11);
-  __Pyx_GIVEREF(__pyx_t_11);
-  __Pyx_INCREF(__pyx_v_seq);
-  PyTuple_SET_ITEM(__pyx_t_13, 9, __pyx_v_seq);
-  __Pyx_GIVEREF(__pyx_v_seq);
-  __Pyx_INCREF(__pyx_v_qual);
-  PyTuple_SET_ITEM(__pyx_t_13, 10, __pyx_v_qual);
-  __Pyx_GIVEREF(__pyx_v_qual);
-  PyTuple_SET_ITEM(__pyx_t_13, 11, __pyx_t_12);
-  __Pyx_GIVEREF(__pyx_t_12);
-  __pyx_t_1 = 0;
-  __pyx_t_4 = 0;
-  __pyx_t_5 = 0;
-  __pyx_t_6 = 0;
-  __pyx_t_7 = 0;
-  __pyx_t_8 = 0;
-  __pyx_t_9 = 0;
-  __pyx_t_10 = 0;
-  __pyx_t_11 = 0;
-  __pyx_t_12 = 0;
-  __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_12);
-  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_t_13));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
-  __pyx_t_13 = 0;
-  __pyx_t_13 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_13);
-  __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 = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_12);
-  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13);
-  __Pyx_GIVEREF(__pyx_t_13);
-  __pyx_t_13 = 0;
-  __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_13);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
-  __pyx_r = __pyx_t_13;
-  __pyx_t_13 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_XDECREF(__pyx_t_12);
-  __Pyx_XDECREF(__pyx_t_13);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_seq);
-  __Pyx_XDECREF(__pyx_v_qual);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_7compare(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11AlignedRead_6compare[] = "AlignedRead.compare(self, AlignedRead other)\nreturn -1,0,1, if contents in this are binary <,=,> to *other*";
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_7compare(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_6compare(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_other));
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2323
- *                                    self.tags )))
- * 
- *     def compare(self, AlignedRead other):             # <<<<<<<<<<<<<<
- *         '''return -1,0,1, if contents in this are binary <,=,> to *other*'''
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_6compare(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_other) {
-  int __pyx_v_retval;
-  bam1_t *__pyx_v_t;
-  bam1_t *__pyx_v_o;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("compare", 0);
-  __Pyx_TraceCall("compare", __pyx_f[0], 2323);
-
-  /* "pysam/csamtools.pyx":2329
- *         cdef bam1_t *t, *o
- * 
- *         t = self._delegate             # <<<<<<<<<<<<<<
- *         o = other._delegate
- * 
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_t = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2330
- * 
- *         t = self._delegate
- *         o = other._delegate             # <<<<<<<<<<<<<<
- * 
- *         # uncomment for debugging purposes
- */
-  __pyx_t_1 = __pyx_v_other->_delegate;
-  __pyx_v_o = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2342
- * 
- *         # Fast-path test for object identity
- *         if t==o:             # <<<<<<<<<<<<<<
- *             return 0
- * 
- */
-  __pyx_t_2 = (__pyx_v_t == __pyx_v_o);
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":2343
- *         # Fast-path test for object identity
- *         if t==o:
- *             return 0             # <<<<<<<<<<<<<<
- * 
- *         retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_int_0);
-    __pyx_r = __pyx_int_0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2345
- *             return 0
- * 
- *         retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))             # <<<<<<<<<<<<<<
- * 
- *         if retval: return retval
- */
-  __pyx_v_retval = memcmp((&__pyx_v_t->core), (&__pyx_v_o->core), (sizeof(bam1_core_t)));
-
-  /* "pysam/csamtools.pyx":2347
- *         retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))
- * 
- *         if retval: return retval             # <<<<<<<<<<<<<<
- *         retval = (t.data_len > o.data_len) - (t.data_len < o.data_len) # cmp(t.data_len, o.data_len)
- *         if retval: return retval
- */
-  if (__pyx_v_retval) {
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":2348
- * 
- *         if retval: return retval
- *         retval = (t.data_len > o.data_len) - (t.data_len < o.data_len) # cmp(t.data_len, o.data_len)             # <<<<<<<<<<<<<<
- *         if retval: return retval
- *         return memcmp(t.data, o.data, t.data_len)
- */
-  __pyx_v_retval = ((__pyx_v_t->data_len > __pyx_v_o->data_len) - (__pyx_v_t->data_len < __pyx_v_o->data_len));
-
-  /* "pysam/csamtools.pyx":2349
- *         if retval: return retval
- *         retval = (t.data_len > o.data_len) - (t.data_len < o.data_len) # cmp(t.data_len, o.data_len)
- *         if retval: return retval             # <<<<<<<<<<<<<<
- *         return memcmp(t.data, o.data, t.data_len)
- * 
- */
-  if (__pyx_v_retval) {
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":2350
- *         retval = (t.data_len > o.data_len) - (t.data_len < o.data_len) # cmp(t.data_len, o.data_len)
- *         if retval: return retval
- *         return memcmp(t.data, o.data, t.data_len)             # <<<<<<<<<<<<<<
- * 
- *     # Disabled so long as __cmp__ is a special method
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = PyInt_FromLong(memcmp(__pyx_v_t->data, __pyx_v_o->data, __pyx_v_t->data_len)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static Py_hash_t __pyx_pw_5pysam_9csamtools_11AlignedRead_9__hash__(PyObject *__pyx_v_self); /*proto*/
-static Py_hash_t __pyx_pw_5pysam_9csamtools_11AlignedRead_9__hash__(PyObject *__pyx_v_self) {
-  Py_hash_t __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_8__hash__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2353
- * 
- *     # Disabled so long as __cmp__ is a special method
- *     def __hash__(self):             # <<<<<<<<<<<<<<
- *         return _Py_HashPointer(<void *>self)
- * 
- */
-
-static Py_hash_t __pyx_pf_5pysam_9csamtools_11AlignedRead_8__hash__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  Py_hash_t __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__hash__", 0);
-  __Pyx_TraceCall("__hash__", __pyx_f[0], 2353);
-
-  /* "pysam/csamtools.pyx":2354
- *     # Disabled so long as __cmp__ is a special method
- *     def __hash__(self):
- *         return _Py_HashPointer(<void *>self)             # <<<<<<<<<<<<<<
- * 
- *     #######################################################################
- */
-  __pyx_r = _Py_HashPointer(((void *)__pyx_v_self));
-  goto __pyx_L0;
-
-  __pyx_r = 0;
-  __pyx_L0:;
-  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5qname_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5qname_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5qname___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2362
- *     property qname:
- *         """the query name (None if not present)"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             src = self._delegate
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5qname___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2362);
-
-  /* "pysam/csamtools.pyx":2364
- *         def __get__(self):
- *             cdef bam1_t * src
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             if src.core.l_qname == 0: return None
- *             return _charptr_to_str(<char *>bam1_qname( src ))
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2365
- *             cdef bam1_t * src
- *             src = self._delegate
- *             if src.core.l_qname == 0: return None             # <<<<<<<<<<<<<<
- *             return _charptr_to_str(<char *>bam1_qname( src ))
- * 
- */
-  __pyx_t_2 = (__pyx_v_src->core.l_qname == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2366
- *             src = self._delegate
- *             if src.core.l_qname == 0: return None
- *             return _charptr_to_str(<char *>bam1_qname( src ))             # <<<<<<<<<<<<<<
- * 
- *         def __set__(self, qname ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam1_qname(__pyx_v_src))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.qname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5qname_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qname); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5qname_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qname) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5qname_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_qname));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2368
- *             return _charptr_to_str(<char *>bam1_qname( src ))
- * 
- *         def __set__(self, qname ):             # <<<<<<<<<<<<<<
- *             if qname == None or len(qname) == 0: return
- *             qname = _force_bytes(qname)
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5qname_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qname) {
-  bam1_t *__pyx_v_src;
-  int __pyx_v_l;
-  char *__pyx_v_p;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  Py_ssize_t __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  bam1_t *__pyx_t_6;
-  char *__pyx_t_7;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2368);
-  __Pyx_INCREF(__pyx_v_qname);
-
-  /* "pysam/csamtools.pyx":2369
- * 
- *         def __set__(self, qname ):
- *             if qname == None or len(qname) == 0: return             # <<<<<<<<<<<<<<
- *             qname = _force_bytes(qname)
- *             cdef bam1_t * src
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_qname, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2369; __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 = 2369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!__pyx_t_2) {
-    __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = (__pyx_t_3 == 0);
-    __pyx_t_5 = __pyx_t_4;
-  } else {
-    __pyx_t_5 = __pyx_t_2;
-  }
-  if (__pyx_t_5) {
-    __pyx_r = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2370
- *         def __set__(self, qname ):
- *             if qname == None or len(qname) == 0: return
- *             qname = _force_bytes(qname)             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             cdef int l
- */
-  __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_qname)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_v_qname);
-  __pyx_v_qname = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":2375
- *             cdef char * p
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             p = bam1_qname( src )
- * 
- */
-  __pyx_t_6 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_6;
-
-  /* "pysam/csamtools.pyx":2376
- * 
- *             src = self._delegate
- *             p = bam1_qname( src )             # <<<<<<<<<<<<<<
- * 
- *             # the qname is \0 terminated
- */
-  __pyx_v_p = bam1_qname(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2379
- * 
- *             # the qname is \0 terminated
- *             l = len(qname) + 1             # <<<<<<<<<<<<<<
- *             pysam_bam_update( src,
- *                               src.core.l_qname,
- */
-  __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_l = (__pyx_t_3 + 1);
-
-  /* "pysam/csamtools.pyx":2383
- *                               src.core.l_qname,
- *                               l,
- *                               <uint8_t*>p )             # <<<<<<<<<<<<<<
- * 
- *             src.core.l_qname = l
- */
-  pysam_bam_update(__pyx_v_src, __pyx_v_src->core.l_qname, __pyx_v_l, ((uint8_t *)__pyx_v_p));
-
-  /* "pysam/csamtools.pyx":2385
- *                               <uint8_t*>p )
- * 
- *             src.core.l_qname = l             # <<<<<<<<<<<<<<
- * 
- *             # re-acquire pointer to location in memory
- */
-  __pyx_v_src->core.l_qname = __pyx_v_l;
-
-  /* "pysam/csamtools.pyx":2389
- *             # re-acquire pointer to location in memory
- *             # as it might have moved
- *             p = bam1_qname(src)             # <<<<<<<<<<<<<<
- * 
- *             strncpy( p, qname, l )
- */
-  __pyx_v_p = bam1_qname(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2391
- *             p = bam1_qname(src)
- * 
- *             strncpy( p, qname, l )             # <<<<<<<<<<<<<<
- * 
- *     property cigar:
- */
-  __pyx_t_7 = PyBytes_AsString(__pyx_v_qname); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  strncpy(__pyx_v_p, __pyx_t_7, __pyx_v_l);
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.qname.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_qname);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5cigar_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5cigar_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5cigar___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2426
- * 
- *         """
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef uint32_t * cigar_p
- *             cdef bam1_t * src
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5cigar___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  uint32_t *__pyx_v_cigar_p;
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_v_op = 0;
-  PyObject *__pyx_v_l = 0;
-  PyObject *__pyx_v_cigar = 0;
-  int __pyx_v_k;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  uint32_t __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2426);
-
-  /* "pysam/csamtools.pyx":2432
- *             cdef int k
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             if src.core.n_cigar == 0: return None
- * 
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2433
- * 
- *             src = self._delegate
- *             if src.core.n_cigar == 0: return None             # <<<<<<<<<<<<<<
- * 
- *             cigar = []
- */
-  __pyx_t_2 = (__pyx_v_src->core.n_cigar == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2435
- *             if src.core.n_cigar == 0: return None
- * 
- *             cigar = []             # <<<<<<<<<<<<<<
- *             cigar_p = bam1_cigar(src);
- *             for k from 0 <= k < src.core.n_cigar:
- */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_v_cigar = ((PyObject *)__pyx_t_3);
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":2436
- * 
- *             cigar = []
- *             cigar_p = bam1_cigar(src);             # <<<<<<<<<<<<<<
- *             for k from 0 <= k < src.core.n_cigar:
- *                 op = cigar_p[k] & BAM_CIGAR_MASK
- */
-  __pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2437
- *             cigar = []
- *             cigar_p = bam1_cigar(src);
- *             for k from 0 <= k < src.core.n_cigar:             # <<<<<<<<<<<<<<
- *                 op = cigar_p[k] & BAM_CIGAR_MASK
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
- */
-  __pyx_t_4 = __pyx_v_src->core.n_cigar;
-  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
-
-    /* "pysam/csamtools.pyx":2438
- *             cigar_p = bam1_cigar(src);
- *             for k from 0 <= k < src.core.n_cigar:
- *                 op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
- *                 cigar.append((op, l))
- */
-    __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) & 15)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_XDECREF(__pyx_v_op);
-    __pyx_v_op = __pyx_t_3;
-    __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":2439
- *             for k from 0 <= k < src.core.n_cigar:
- *                 op = cigar_p[k] & BAM_CIGAR_MASK
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
- *                 cigar.append((op, l))
- *             return cigar
- */
-    __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_XDECREF(__pyx_v_l);
-    __pyx_v_l = __pyx_t_3;
-    __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":2440
- *                 op = cigar_p[k] & BAM_CIGAR_MASK
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
- *                 cigar.append((op, l))             # <<<<<<<<<<<<<<
- *             return cigar
- * 
- */
-    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(__pyx_v_op);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_op);
-    __Pyx_GIVEREF(__pyx_v_op);
-    __Pyx_INCREF(__pyx_v_l);
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_l);
-    __Pyx_GIVEREF(__pyx_v_l);
-    __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_cigar, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  }
-
-  /* "pysam/csamtools.pyx":2441
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
- *                 cigar.append((op, l))
- *             return cigar             # <<<<<<<<<<<<<<
- * 
- *         def __set__(self, values ):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_cigar);
-  __pyx_r = __pyx_v_cigar;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.cigar.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_op);
-  __Pyx_XDECREF(__pyx_v_l);
-  __Pyx_XDECREF(__pyx_v_cigar);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5cigar_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5cigar_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5cigar_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_values));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2443
- *             return cigar
- * 
- *         def __set__(self, values ):             # <<<<<<<<<<<<<<
- *             if values == None or len(values) == 0: return
- *             cdef uint32_t * p
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5cigar_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_values) {
-  uint32_t *__pyx_v_p;
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_v_op = 0;
-  PyObject *__pyx_v_l = 0;
-  int __pyx_v_k;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  Py_ssize_t __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  bam1_t *__pyx_t_6;
-  PyObject *(*__pyx_t_7)(PyObject *);
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
-  PyObject *(*__pyx_t_12)(PyObject *);
-  uint32_t __pyx_t_13;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2443);
-
-  /* "pysam/csamtools.pyx":2444
- * 
- *         def __set__(self, values ):
- *             if values == None or len(values) == 0: return             # <<<<<<<<<<<<<<
- *             cdef uint32_t * p
- *             cdef bam1_t * src
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_values, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __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 = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!__pyx_t_2) {
-    __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = (__pyx_t_3 == 0);
-    __pyx_t_5 = __pyx_t_4;
-  } else {
-    __pyx_t_5 = __pyx_t_2;
-  }
-  if (__pyx_t_5) {
-    __pyx_r = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2450
- *             cdef int k
- * 
- *             k = 0             # <<<<<<<<<<<<<<
- * 
- *             src = self._delegate
- */
-  __pyx_v_k = 0;
-
-  /* "pysam/csamtools.pyx":2452
- *             k = 0
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- * 
- *             # get location of cigar string
- */
-  __pyx_t_6 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_6;
-
-  /* "pysam/csamtools.pyx":2455
- * 
- *             # get location of cigar string
- *             p = bam1_cigar(src)             # <<<<<<<<<<<<<<
- * 
- *             # create space for cigar data within src.data
- */
-  __pyx_v_p = bam1_cigar(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2460
- *             pysam_bam_update( src,
- *                               src.core.n_cigar * 4,
- *                               len(values) * 4,             # <<<<<<<<<<<<<<
- *                               <uint8_t*>p )
- * 
- */
-  __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":2461
- *                               src.core.n_cigar * 4,
- *                               len(values) * 4,
- *                               <uint8_t*>p )             # <<<<<<<<<<<<<<
- * 
- *             # length is number of cigar operations, not bytes
- */
-  pysam_bam_update(__pyx_v_src, (__pyx_v_src->core.n_cigar * 4), (__pyx_t_3 * 4), ((uint8_t *)__pyx_v_p));
-
-  /* "pysam/csamtools.pyx":2464
- * 
- *             # length is number of cigar operations, not bytes
- *             src.core.n_cigar = len(values)             # <<<<<<<<<<<<<<
- * 
- *             # re-acquire pointer to location in memory
- */
-  __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_src->core.n_cigar = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":2468
- *             # re-acquire pointer to location in memory
- *             # as it might have moved
- *             p = bam1_cigar(src)             # <<<<<<<<<<<<<<
- * 
- *             # insert cigar operations
- */
-  __pyx_v_p = bam1_cigar(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2471
- * 
- *             # insert cigar operations
- *             for op, l in values:             # <<<<<<<<<<<<<<
- *                 p[k] = l << BAM_CIGAR_SHIFT | op
- *                 k += 1
- */
-  if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
-    __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
-    __pyx_t_7 = NULL;
-  } else {
-    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
-  }
-  for (;;) {
-    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else {
-      __pyx_t_8 = __pyx_t_7(__pyx_t_1);
-      if (unlikely(!__pyx_t_8)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_8);
-    }
-    if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
-      PyObject* sequence = __pyx_t_8;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      Py_ssize_t size = Py_SIZE(sequence);
-      #else
-      Py_ssize_t size = PySequence_Size(sequence);
-      #endif
-      if (unlikely(size != 2)) {
-        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #if CYTHON_COMPILING_IN_CPYTHON
-      if (likely(PyTuple_CheckExact(sequence))) {
-        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
-        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
-      } else {
-        __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
-      }
-      __Pyx_INCREF(__pyx_t_9);
-      __Pyx_INCREF(__pyx_t_10);
-      #else
-      __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      #endif
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    } else
-    {
-      Py_ssize_t index = -1;
-      __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
-      index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_9);
-      index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_10);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_12 = NULL;
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      goto __pyx_L7_unpacking_done;
-      __pyx_L6_unpacking_failed:;
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __pyx_t_12 = NULL;
-      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L7_unpacking_done:;
-    }
-    __Pyx_XDECREF(__pyx_v_op);
-    __pyx_v_op = __pyx_t_9;
-    __pyx_t_9 = 0;
-    __Pyx_XDECREF(__pyx_v_l);
-    __pyx_v_l = __pyx_t_10;
-    __pyx_t_10 = 0;
-
-    /* "pysam/csamtools.pyx":2472
- *             # insert cigar operations
- *             for op, l in values:
- *                 p[k] = l << BAM_CIGAR_SHIFT | op             # <<<<<<<<<<<<<<
- *                 k += 1
- * 
- */
-    __pyx_t_8 = PyNumber_Lshift(__pyx_v_l, __pyx_int_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_10 = PyNumber_Or(__pyx_t_8, __pyx_v_op); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_13 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_10); if (unlikely((__pyx_t_13 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    (__pyx_v_p[__pyx_v_k]) = __pyx_t_13;
-
-    /* "pysam/csamtools.pyx":2473
- *             for op, l in values:
- *                 p[k] = l << BAM_CIGAR_SHIFT | op
- *                 k += 1             # <<<<<<<<<<<<<<
- * 
- *             ## setting the cigar string also updates the "bin" attribute
- */
-    __pyx_v_k = (__pyx_v_k + 1);
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":2476
- * 
- *             ## setting the cigar string also updates the "bin" attribute
- *             src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, p))             # <<<<<<<<<<<<<<
- * 
- *     property cigarstring:
- */
-  __pyx_v_src->core.bin = bam_reg2bin(__pyx_v_src->core.pos, bam_calend((&__pyx_v_src->core), __pyx_v_p));
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.cigar.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_op);
-  __Pyx_XDECREF(__pyx_v_l);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_11cigarstring_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_11cigarstring_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_11cigarstring___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2492
- *         Returns the empty string if not present.
- *         '''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             c = self.cigar
- *             if c == None: return ""
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_11cigarstring___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_v_c = NULL;
-  PyObject *__pyx_v_x = NULL;
-  PyObject *__pyx_v_y = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  Py_ssize_t __pyx_t_5;
-  PyObject *(*__pyx_t_6)(PyObject *);
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *(*__pyx_t_11)(PyObject *);
-  Py_ssize_t __pyx_t_12;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2492);
-
-  /* "pysam/csamtools.pyx":2493
- *         '''
- *         def __get__(self):
- *             c = self.cigar             # <<<<<<<<<<<<<<
- *             if c == None: return ""
- *             # reverse order
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_c = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":2494
- *         def __get__(self):
- *             c = self.cigar
- *             if c == None: return ""             # <<<<<<<<<<<<<<
- *             # reverse order
- *             else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_c, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2494; __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 = 2494; __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_20));
-    __pyx_r = ((PyObject *)__pyx_kp_s_20);
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":2496
- *             if c == None: return ""
- *             # reverse order
- *             else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])             # <<<<<<<<<<<<<<
- * 
- *         def __set__(self, cigar):
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_20), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    if (PyList_CheckExact(__pyx_v_c) || PyTuple_CheckExact(__pyx_v_c)) {
-      __pyx_t_4 = __pyx_v_c; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
-      __pyx_t_6 = NULL;
-    } else {
-      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_c); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
-    }
-    for (;;) {
-      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_7 = __pyx_t_6(__pyx_t_4);
-        if (unlikely(!__pyx_t_7)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_7);
-      }
-      if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
-        PyObject* sequence = __pyx_t_7;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        Py_ssize_t size = Py_SIZE(sequence);
-        #else
-        Py_ssize_t size = PySequence_Size(sequence);
-        #endif
-        if (unlikely(size != 2)) {
-          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        #if CYTHON_COMPILING_IN_CPYTHON
-        if (likely(PyTuple_CheckExact(sequence))) {
-          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
-          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
-        } else {
-          __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
-          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
-        }
-        __Pyx_INCREF(__pyx_t_8);
-        __Pyx_INCREF(__pyx_t_9);
-        #else
-        __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        #endif
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      } else
-      {
-        Py_ssize_t index = -1;
-        __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
-        index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_8);
-        index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_9);
-        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_11 = NULL;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        goto __pyx_L7_unpacking_done;
-        __pyx_L6_unpacking_failed:;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_t_11 = NULL;
-        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_L7_unpacking_done:;
-      }
-      __Pyx_XDECREF(__pyx_v_x);
-      __pyx_v_x = __pyx_t_8;
-      __pyx_t_8 = 0;
-      __Pyx_XDECREF(__pyx_v_y);
-      __pyx_v_y = __pyx_t_9;
-      __pyx_t_9 = 0;
-      __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_7 = PyInt_FromLong((__pyx_v_5pysam_9csamtools_CODE2CIGAR[__pyx_t_12])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __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 = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_INCREF(__pyx_v_y);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_y);
-      __Pyx_GIVEREF(__pyx_v_y);
-      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
-      __Pyx_GIVEREF(__pyx_t_7);
-      __pyx_t_7 = 0;
-      __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_146), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-      if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 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 = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_INCREF(((PyObject *)__pyx_t_3));
-    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __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_4)); __pyx_t_4 = 0;
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.cigarstring.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_c);
-  __Pyx_XDECREF(__pyx_v_x);
-  __Pyx_XDECREF(__pyx_v_y);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_11cigarstring_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cigar); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_11cigarstring_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cigar) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_11cigarstring_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_cigar));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2498
- *             else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
- * 
- *         def __set__(self, cigar):             # <<<<<<<<<<<<<<
- *             if cigar == None or len(cigar) == 0: self.cigar = []
- *             parts = CIGAR_REGEX.findall( cigar )
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_11cigarstring_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_cigar) {
-  PyObject *__pyx_v_parts = NULL;
-  PyObject *__pyx_v_x = NULL;
-  PyObject *__pyx_v_y = NULL;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  Py_ssize_t __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *(*__pyx_t_8)(PyObject *);
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
-  PyObject *(*__pyx_t_12)(PyObject *);
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2498);
-
-  /* "pysam/csamtools.pyx":2499
- * 
- *         def __set__(self, cigar):
- *             if cigar == None or len(cigar) == 0: self.cigar = []             # <<<<<<<<<<<<<<
- *             parts = CIGAR_REGEX.findall( cigar )
- *             # reverse order
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_cigar, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __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 = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!__pyx_t_2) {
-    __pyx_t_3 = PyObject_Length(__pyx_v_cigar); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = (__pyx_t_3 == 0);
-    __pyx_t_5 = __pyx_t_4;
-  } else {
-    __pyx_t_5 = __pyx_t_2;
-  }
-  if (__pyx_t_5) {
-    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2500
- *         def __set__(self, cigar):
- *             if cigar == None or len(cigar) == 0: self.cigar = []
- *             parts = CIGAR_REGEX.findall( cigar )             # <<<<<<<<<<<<<<
- *             # reverse order
- *             self.cigar = [ (CIGAR2CODE[ord(y)], int(x)) for x,y in parts ]
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__CIGAR_REGEX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__findall); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __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 = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_cigar);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cigar);
-  __Pyx_GIVEREF(__pyx_v_cigar);
-  __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_v_parts = __pyx_t_7;
-  __pyx_t_7 = 0;
-
-  /* "pysam/csamtools.pyx":2502
- *             parts = CIGAR_REGEX.findall( cigar )
- *             # reverse order
- *             self.cigar = [ (CIGAR2CODE[ord(y)], int(x)) for x,y in parts ]             # <<<<<<<<<<<<<<
- * 
- *     property seq:
- */
-  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  if (PyList_CheckExact(__pyx_v_parts) || PyTuple_CheckExact(__pyx_v_parts)) {
-    __pyx_t_1 = __pyx_v_parts; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
-    __pyx_t_8 = NULL;
-  } else {
-    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_parts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
-  }
-  for (;;) {
-    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else {
-      __pyx_t_6 = __pyx_t_8(__pyx_t_1);
-      if (unlikely(!__pyx_t_6)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_6);
-    }
-    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
-      PyObject* sequence = __pyx_t_6;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      Py_ssize_t size = Py_SIZE(sequence);
-      #else
-      Py_ssize_t size = PySequence_Size(sequence);
-      #endif
-      if (unlikely(size != 2)) {
-        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #if CYTHON_COMPILING_IN_CPYTHON
-      if (likely(PyTuple_CheckExact(sequence))) {
-        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
-        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
-      } else {
-        __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
-      }
-      __Pyx_INCREF(__pyx_t_9);
-      __Pyx_INCREF(__pyx_t_10);
-      #else
-      __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      #endif
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    } else
-    {
-      Py_ssize_t index = -1;
-      __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
-      index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_9);
-      index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_10);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_12 = NULL;
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      goto __pyx_L7_unpacking_done;
-      __pyx_L6_unpacking_failed:;
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __pyx_t_12 = NULL;
-      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L7_unpacking_done:;
-    }
-    __Pyx_XDECREF(__pyx_v_x);
-    __pyx_v_x = __pyx_t_9;
-    __pyx_t_9 = 0;
-    __Pyx_XDECREF(__pyx_v_y);
-    __pyx_v_y = __pyx_t_10;
-    __pyx_t_10 = 0;
-    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CIGAR2CODE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_INCREF(__pyx_v_y);
-    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_y);
-    __Pyx_GIVEREF(__pyx_v_y);
-    __pyx_t_9 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-    __pyx_t_10 = PyObject_GetItem(__pyx_t_6, __pyx_t_9); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __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 = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_INCREF(__pyx_v_x);
-    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_x);
-    __Pyx_GIVEREF(__pyx_v_x);
-    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
-    __Pyx_GIVEREF(__pyx_t_10);
-    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
-    __Pyx_GIVEREF(__pyx_t_6);
-    __pyx_t_10 = 0;
-    __pyx_t_6 = 0;
-    if (unlikely(__Pyx_PyList_Append(__pyx_t_7, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = ((PyObject *)__pyx_t_7);
-  __Pyx_INCREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-  if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.cigarstring.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_parts);
-  __Pyx_XDECREF(__pyx_v_x);
-  __Pyx_XDECREF(__pyx_v_y);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_3seq_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_3seq_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_3seq___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2521
- * 
- *         """
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             cdef char * s
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_3seq___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2521);
-
-  /* "pysam/csamtools.pyx":2524
- *             cdef bam1_t * src
- *             cdef char * s
- *             src = self._delegate             # <<<<<<<<<<<<<<
- * 
- *             if src.core.l_qseq == 0: return None
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2526
- *             src = self._delegate
- * 
- *             if src.core.l_qseq == 0: return None             # <<<<<<<<<<<<<<
- * 
- *             return get_seq_range(src, 0, src.core.l_qseq)
- */
-  __pyx_t_2 = (__pyx_v_src->core.l_qseq == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2528
- *             if src.core.l_qseq == 0: return None
- * 
- *             return get_seq_range(src, 0, src.core.l_qseq)             # <<<<<<<<<<<<<<
- * 
- *         def __set__(self,seq):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = __pyx_f_5pysam_9csamtools_get_seq_range(__pyx_v_src, 0, __pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.seq.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_3seq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_3seq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_3seq_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_seq));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2530
- *             return get_seq_range(src, 0, src.core.l_qseq)
- * 
- *         def __set__(self,seq):             # <<<<<<<<<<<<<<
- *             # samtools manages sequence and quality length memory together
- *             # if no quality information is present, the first byte says 0xff.
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_3seq_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_seq) {
-  bam1_t *__pyx_v_src;
-  uint8_t *__pyx_v_p;
-  char *__pyx_v_s;
-  int __pyx_v_l;
-  int __pyx_v_k;
-  int __pyx_v_nbytes_new;
-  int __pyx_v_nbytes_old;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  Py_ssize_t __pyx_t_3;
-  bam1_t *__pyx_t_4;
-  int __pyx_t_5;
-  char *__pyx_t_6;
-  long __pyx_t_7;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2530);
-  __Pyx_INCREF(__pyx_v_seq);
-
-  /* "pysam/csamtools.pyx":2538
- *             cdef int l, k, nbytes_new, nbytes_old
- * 
- *             if seq == None:             # <<<<<<<<<<<<<<
- *                 l = 0
- *             else:
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_seq, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; __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 = 2538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":2539
- * 
- *             if seq == None:
- *                 l = 0             # <<<<<<<<<<<<<<
- *             else:
- *                 l = len(seq)
- */
-    __pyx_v_l = 0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":2541
- *                 l = 0
- *             else:
- *                 l = len(seq)             # <<<<<<<<<<<<<<
- *                 seq = _force_bytes(seq)
- * 
- */
-    __pyx_t_3 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_l = __pyx_t_3;
-
-    /* "pysam/csamtools.pyx":2542
- *             else:
- *                 l = len(seq)
- *                 seq = _force_bytes(seq)             # <<<<<<<<<<<<<<
- * 
- *             src = self._delegate
- */
-    __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_seq)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_v_seq);
-    __pyx_v_seq = __pyx_t_1;
-    __pyx_t_1 = 0;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2544
- *                 seq = _force_bytes(seq)
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- * 
- *             # as the sequence is stored in half-bytes, the total length (sequence
- */
-  __pyx_t_4 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_4;
-
-  /* "pysam/csamtools.pyx":2548
- *             # as the sequence is stored in half-bytes, the total length (sequence
- *             # plus quality scores) is (l+1)/2 + l
- *             nbytes_new = (l+1)/2 + l             # <<<<<<<<<<<<<<
- *             nbytes_old = (src.core.l_qseq+1)/2 + src.core.l_qseq
- * 
- */
-  __pyx_v_nbytes_new = (__Pyx_div_long((__pyx_v_l + 1), 2) + __pyx_v_l);
-
-  /* "pysam/csamtools.pyx":2549
- *             # plus quality scores) is (l+1)/2 + l
- *             nbytes_new = (l+1)/2 + l
- *             nbytes_old = (src.core.l_qseq+1)/2 + src.core.l_qseq             # <<<<<<<<<<<<<<
- * 
- *             # acquire pointer to location in memory
- */
-  __pyx_v_nbytes_old = (__Pyx_div_long((__pyx_v_src->core.l_qseq + 1), 2) + __pyx_v_src->core.l_qseq);
-
-  /* "pysam/csamtools.pyx":2552
- * 
- *             # acquire pointer to location in memory
- *             p = bam1_seq( src )             # <<<<<<<<<<<<<<
- *             src.core.l_qseq = l
- * 
- */
-  __pyx_v_p = bam1_seq(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2553
- *             # acquire pointer to location in memory
- *             p = bam1_seq( src )
- *             src.core.l_qseq = l             # <<<<<<<<<<<<<<
- * 
- *             # change length of data field
- */
-  __pyx_v_src->core.l_qseq = __pyx_v_l;
-
-  /* "pysam/csamtools.pyx":2559
- *                               nbytes_old,
- *                               nbytes_new,
- *                               p)             # <<<<<<<<<<<<<<
- * 
- *             if l > 0:
- */
-  pysam_bam_update(__pyx_v_src, __pyx_v_nbytes_old, __pyx_v_nbytes_new, __pyx_v_p);
-
-  /* "pysam/csamtools.pyx":2561
- *                               p)
- * 
- *             if l > 0:             # <<<<<<<<<<<<<<
- *                 # re-acquire pointer to location in memory
- *                 # as it might have moved
- */
-  __pyx_t_2 = (__pyx_v_l > 0);
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":2564
- *                 # re-acquire pointer to location in memory
- *                 # as it might have moved
- *                 p = bam1_seq( src )             # <<<<<<<<<<<<<<
- *                 for k from 0 <= k < nbytes_new: p[k] = 0
- *                 # convert to C string
- */
-    __pyx_v_p = bam1_seq(__pyx_v_src);
-
-    /* "pysam/csamtools.pyx":2565
- *                 # as it might have moved
- *                 p = bam1_seq( src )
- *                 for k from 0 <= k < nbytes_new: p[k] = 0             # <<<<<<<<<<<<<<
- *                 # convert to C string
- *                 s = seq
- */
-    __pyx_t_5 = __pyx_v_nbytes_new;
-    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
-      (__pyx_v_p[__pyx_v_k]) = 0;
-    }
-
-    /* "pysam/csamtools.pyx":2567
- *                 for k from 0 <= k < nbytes_new: p[k] = 0
- *                 # convert to C string
- *                 s = seq             # <<<<<<<<<<<<<<
- *                 for k from 0 <= k < l:
- *                     p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2)
- */
-    __pyx_t_6 = PyBytes_AsString(__pyx_v_seq); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_s = __pyx_t_6;
-
-    /* "pysam/csamtools.pyx":2568
- *                 # convert to C string
- *                 s = seq
- *                 for k from 0 <= k < l:             # <<<<<<<<<<<<<<
- *                     p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2)
- * 
- */
-    __pyx_t_5 = __pyx_v_l;
-    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
-
-      /* "pysam/csamtools.pyx":2569
- *                 s = seq
- *                 for k from 0 <= k < l:
- *                     p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2)             # <<<<<<<<<<<<<<
- * 
- *                 # erase qualities
- */
-      __pyx_t_7 = __Pyx_div_long(__pyx_v_k, 2);
-      (__pyx_v_p[__pyx_t_7]) = ((__pyx_v_p[__pyx_t_7]) | (pysam_translate_sequence((__pyx_v_s[__pyx_v_k])) << (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2)))));
-    }
-
-    /* "pysam/csamtools.pyx":2572
- * 
- *                 # erase qualities
- *                 p = bam1_qual( src )             # <<<<<<<<<<<<<<
- *                 p[0] = 0xff
- * 
- */
-    __pyx_v_p = bam1_qual(__pyx_v_src);
-
-    /* "pysam/csamtools.pyx":2573
- *                 # erase qualities
- *                 p = bam1_qual( src )
- *                 p[0] = 0xff             # <<<<<<<<<<<<<<
- * 
- *     property qual:
- */
-    (__pyx_v_p[0]) = 0xff;
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.seq.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_seq);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4qual_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4qual_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4qual___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2590
- *         quality scores and the sequence are not the same.
- *         """
- *         def __get__(self):             # <<<<<<<<<<<<<<
- * 
- *             cdef bam1_t * src
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4qual___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2590);
-
-  /* "pysam/csamtools.pyx":2595
- *             cdef char * q
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- * 
- *             if src.core.l_qseq == 0: return None
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2597
- *             src = self._delegate
- * 
- *             if src.core.l_qseq == 0: return None             # <<<<<<<<<<<<<<
- * 
- *             return get_qual_range(src, 0, src.core.l_qseq)
- */
-  __pyx_t_2 = (__pyx_v_src->core.l_qseq == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2599
- *             if src.core.l_qseq == 0: return None
- * 
- *             return get_qual_range(src, 0, src.core.l_qseq)             # <<<<<<<<<<<<<<
- * 
- *         def __set__(self,qual):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = __pyx_f_5pysam_9csamtools_get_qual_range(__pyx_v_src, 0, __pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.qual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4qual_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4qual_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4qual_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_qual));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2601
- *             return get_qual_range(src, 0, src.core.l_qseq)
- * 
- *         def __set__(self,qual):             # <<<<<<<<<<<<<<
- *             # note that space is already allocated via the sequences
- *             cdef bam1_t * src
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4qual_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qual) {
-  bam1_t *__pyx_v_src;
-  uint8_t *__pyx_v_p;
-  char *__pyx_v_q;
-  int __pyx_v_k;
-  int __pyx_v_l;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  Py_ssize_t __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_t_6;
-  char *__pyx_t_7;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  int __pyx_t_10;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2601);
-  __Pyx_INCREF(__pyx_v_qual);
-
-  /* "pysam/csamtools.pyx":2608
- *             cdef int k
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             p = bam1_qual( src )
- *             if qual == None or len(qual) == 0:
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2609
- * 
- *             src = self._delegate
- *             p = bam1_qual( src )             # <<<<<<<<<<<<<<
- *             if qual == None or len(qual) == 0:
- *                 # if absent - set to 0xff
- */
-  __pyx_v_p = bam1_qual(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2610
- *             src = self._delegate
- *             p = bam1_qual( src )
- *             if qual == None or len(qual) == 0:             # <<<<<<<<<<<<<<
- *                 # if absent - set to 0xff
- *                 p[0] = 0xff
- */
-  __pyx_t_2 = PyObject_RichCompare(__pyx_v_qual, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (!__pyx_t_3) {
-    __pyx_t_4 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = (__pyx_t_4 == 0);
-    __pyx_t_6 = __pyx_t_5;
-  } else {
-    __pyx_t_6 = __pyx_t_3;
-  }
-  if (__pyx_t_6) {
-
-    /* "pysam/csamtools.pyx":2612
- *             if qual == None or len(qual) == 0:
- *                 # if absent - set to 0xff
- *                 p[0] = 0xff             # <<<<<<<<<<<<<<
- *                 return
- *             qual = _force_bytes(qual)
- */
-    (__pyx_v_p[0]) = 0xff;
-
-    /* "pysam/csamtools.pyx":2613
- *                 # if absent - set to 0xff
- *                 p[0] = 0xff
- *                 return             # <<<<<<<<<<<<<<
- *             qual = _force_bytes(qual)
- *             cdef int l
- */
-    __pyx_r = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2614
- *                 p[0] = 0xff
- *                 return
- *             qual = _force_bytes(qual)             # <<<<<<<<<<<<<<
- *             cdef int l
- *             # convert to C string
- */
-  __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_qual)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_v_qual);
-  __pyx_v_qual = __pyx_t_2;
-  __pyx_t_2 = 0;
-
-  /* "pysam/csamtools.pyx":2617
- *             cdef int l
- *             # convert to C string
- *             q = qual             # <<<<<<<<<<<<<<
- *             l = len(qual)
- *             if src.core.l_qseq != l:
- */
-  __pyx_t_7 = PyBytes_AsString(__pyx_v_qual); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_q = __pyx_t_7;
-
-  /* "pysam/csamtools.pyx":2618
- *             # convert to C string
- *             q = qual
- *             l = len(qual)             # <<<<<<<<<<<<<<
- *             if src.core.l_qseq != l:
- *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
- */
-  __pyx_t_4 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_l = __pyx_t_4;
-
-  /* "pysam/csamtools.pyx":2619
- *             q = qual
- *             l = len(qual)
- *             if src.core.l_qseq != l:             # <<<<<<<<<<<<<<
- *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
- *             assert src.core.l_qseq == l
- */
-  __pyx_t_6 = (__pyx_v_src->core.l_qseq != __pyx_v_l);
-  if (__pyx_t_6) {
-
-    /* "pysam/csamtools.pyx":2620
- *             l = len(qual)
- *             if src.core.l_qseq != l:
- *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))             # <<<<<<<<<<<<<<
- *             assert src.core.l_qseq == l
- *             for k from 0 <= k < l:
- */
-    __pyx_t_2 = PyInt_FromLong(__pyx_v_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_8 = __Pyx_PyInt_to_py_int32_t(__pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __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_8);
-    __Pyx_GIVEREF(__pyx_t_8);
-    __pyx_t_2 = 0;
-    __pyx_t_8 = 0;
-    __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_147), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-    __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 = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
-    __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":2621
- *             if src.core.l_qseq != l:
- *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
- *             assert src.core.l_qseq == l             # <<<<<<<<<<<<<<
- *             for k from 0 <= k < l:
- *                 p[k] = <uint8_t>q[k] - 33
- */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  if (unlikely(!(__pyx_v_src->core.l_qseq == __pyx_v_l))) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
-
-  /* "pysam/csamtools.pyx":2622
- *                 raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
- *             assert src.core.l_qseq == l
- *             for k from 0 <= k < l:             # <<<<<<<<<<<<<<
- *                 p[k] = <uint8_t>q[k] - 33
- * 
- */
-  __pyx_t_10 = __pyx_v_l;
-  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_10; __pyx_v_k++) {
-
-    /* "pysam/csamtools.pyx":2623
- *             assert src.core.l_qseq == l
- *             for k from 0 <= k < l:
- *                 p[k] = <uint8_t>q[k] - 33             # <<<<<<<<<<<<<<
- * 
- *     property query:
- */
-    (__pyx_v_p[__pyx_v_k]) = (((uint8_t)(__pyx_v_q[__pyx_v_k])) - 33);
-  }
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.qual.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_qual);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5query_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5query_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5query___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2640
- *         were not considered for alignment may have been retained."""
- * 
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             cdef uint32_t start, end
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5query___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  uint32_t __pyx_v_start;
-  uint32_t __pyx_v_end;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  int32_t __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2640);
-
-  /* "pysam/csamtools.pyx":2645
- *             cdef char * s
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- * 
- *             if src.core.l_qseq == 0: return None
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2647
- *             src = self._delegate
- * 
- *             if src.core.l_qseq == 0: return None             # <<<<<<<<<<<<<<
- * 
- *             start = query_start(src)
- */
-  __pyx_t_2 = (__pyx_v_src->core.l_qseq == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2649
- *             if src.core.l_qseq == 0: return None
- * 
- *             start = query_start(src)             # <<<<<<<<<<<<<<
- *             end   = query_end(src)
- * 
- */
-  __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_start = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":2650
- * 
- *             start = query_start(src)
- *             end   = query_end(src)             # <<<<<<<<<<<<<<
- * 
- *             return get_seq_range(src, start, end)
- */
-  __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_end = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":2652
- *             end   = query_end(src)
- * 
- *             return get_seq_range(src, start, end)             # <<<<<<<<<<<<<<
- * 
- *     property qqual:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_4 = __pyx_f_5pysam_9csamtools_get_seq_range(__pyx_v_src, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_r = __pyx_t_4;
-  __pyx_t_4 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.query.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5qqual_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5qqual_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5qqual___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2659
- * 
- *         In Python 3, this property is of type bytes."""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             cdef uint32_t start, end
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5qqual___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  uint32_t __pyx_v_start;
-  uint32_t __pyx_v_end;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  int32_t __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2659);
-
-  /* "pysam/csamtools.pyx":2663
- *             cdef uint32_t start, end
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- * 
- *             if src.core.l_qseq == 0: return None
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2665
- *             src = self._delegate
- * 
- *             if src.core.l_qseq == 0: return None             # <<<<<<<<<<<<<<
- * 
- *             start = query_start(src)
- */
-  __pyx_t_2 = (__pyx_v_src->core.l_qseq == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2667
- *             if src.core.l_qseq == 0: return None
- * 
- *             start = query_start(src)             # <<<<<<<<<<<<<<
- *             end   = query_end(src)
- * 
- */
-  __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_start = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":2668
- * 
- *             start = query_start(src)
- *             end   = query_end(src)             # <<<<<<<<<<<<<<
- * 
- *             return get_qual_range(src, start, end)
- */
-  __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_end = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":2670
- *             end   = query_end(src)
- * 
- *             return get_qual_range(src, start, end)             # <<<<<<<<<<<<<<
- * 
- *     property qstart:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_4 = __pyx_f_5pysam_9csamtools_get_qual_range(__pyx_v_src, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_r = __pyx_t_4;
-  __pyx_t_4 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.qqual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_6qstart_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_6qstart_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_6qstart___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2674
- *     property qstart:
- *         """start index of the aligned query portion of the sequence (0-based, inclusive)"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return query_start(self._delegate)
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_6qstart___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2674);
-
-  /* "pysam/csamtools.pyx":2675
- *         """start index of the aligned query portion of the sequence (0-based, inclusive)"""
- *         def __get__(self):
- *             return query_start(self._delegate)             # <<<<<<<<<<<<<<
- * 
- *     property qend:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_self->_delegate); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.qstart.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4qend_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4qend_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4qend___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2679
- *     property qend:
- *         """end index of the aligned query portion of the sequence (0-based, exclusive)"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return query_end(self._delegate)
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4qend___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2679);
-
-  /* "pysam/csamtools.pyx":2680
- *         """end index of the aligned query portion of the sequence (0-based, exclusive)"""
- *         def __get__(self):
- *             return query_end(self._delegate)             # <<<<<<<<<<<<<<
- * 
- *     property qlen:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_self->_delegate); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.qend.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4qlen_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4qlen_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4qlen___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2684
- *     property qlen:
- *         """Length of the aligned query sequence"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             src = self._delegate
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4qlen___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int32_t __pyx_t_2;
-  int32_t __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2684);
-
-  /* "pysam/csamtools.pyx":2686
- *         def __get__(self):
- *             cdef bam1_t * src
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             return query_end(src)-query_start(src)
- * 
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2687
- *             cdef bam1_t * src
- *             src = self._delegate
- *             return query_end(src)-query_start(src)             # <<<<<<<<<<<<<<
- * 
- *     property tags:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = PyInt_FromLong((__pyx_t_2 - __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_r = __pyx_t_4;
-  __pyx_t_4 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.qlen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4tags_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4tags_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4tags___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2704
- *         multiple times.
- *         """
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef char * ctag
- *             cdef bam1_t * src
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4tags___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  uint8_t *__pyx_v_s;
-  char __pyx_v_auxtag[3];
-  char __pyx_v_auxtype;
-  uint8_t __pyx_v_byte_size;
-  int32_t __pyx_v_nvalues;
-  PyObject *__pyx_v_result = NULL;
-  PyObject *__pyx_v_value = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  char __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_t_6;
-  PyObject *__pyx_t_7 = NULL;
-  Py_ssize_t __pyx_t_8;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
-  PyObject *(*__pyx_t_12)(PyObject *);
-  uint8_t __pyx_t_13;
-  int32_t __pyx_t_14;
-  int __pyx_t_15;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2704);
-
-  /* "pysam/csamtools.pyx":2713
- *             cdef int32_t nvalues
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             if src.l_aux == 0: return []
- *             s = bam1_aux( src )
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2714
- * 
- *             src = self._delegate
- *             if src.l_aux == 0: return []             # <<<<<<<<<<<<<<
- *             s = bam1_aux( src )
- *             result = []
- */
-  __pyx_t_2 = (__pyx_v_src->l_aux == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_r = ((PyObject *)__pyx_t_3);
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2715
- *             src = self._delegate
- *             if src.l_aux == 0: return []
- *             s = bam1_aux( src )             # <<<<<<<<<<<<<<
- *             result = []
- *             auxtag[2] = 0
- */
-  __pyx_v_s = bam1_aux(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":2716
- *             if src.l_aux == 0: return []
- *             s = bam1_aux( src )
- *             result = []             # <<<<<<<<<<<<<<
- *             auxtag[2] = 0
- *             while s < (src.data + src.data_len):
- */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_v_result = ((PyObject*)__pyx_t_3);
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":2717
- *             s = bam1_aux( src )
- *             result = []
- *             auxtag[2] = 0             # <<<<<<<<<<<<<<
- *             while s < (src.data + src.data_len):
- *                 # get tag
- */
-  (__pyx_v_auxtag[2]) = 0;
-
-  /* "pysam/csamtools.pyx":2718
- *             result = []
- *             auxtag[2] = 0
- *             while s < (src.data + src.data_len):             # <<<<<<<<<<<<<<
- *                 # get tag
- *                 auxtag[0] = s[0]
- */
-  while (1) {
-    __pyx_t_2 = (__pyx_v_s < (__pyx_v_src->data + __pyx_v_src->data_len));
-    if (!__pyx_t_2) break;
-
-    /* "pysam/csamtools.pyx":2720
- *             while s < (src.data + src.data_len):
- *                 # get tag
- *                 auxtag[0] = s[0]             # <<<<<<<<<<<<<<
- *                 auxtag[1] = s[1]
- *                 s += 2
- */
-    (__pyx_v_auxtag[0]) = (__pyx_v_s[0]);
-
-    /* "pysam/csamtools.pyx":2721
- *                 # get tag
- *                 auxtag[0] = s[0]
- *                 auxtag[1] = s[1]             # <<<<<<<<<<<<<<
- *                 s += 2
- *                 auxtype = s[0]
- */
-    (__pyx_v_auxtag[1]) = (__pyx_v_s[1]);
-
-    /* "pysam/csamtools.pyx":2722
- *                 auxtag[0] = s[0]
- *                 auxtag[1] = s[1]
- *                 s += 2             # <<<<<<<<<<<<<<
- *                 auxtype = s[0]
- *                 if auxtype in ('c', 'C'):
- */
-    __pyx_v_s = (__pyx_v_s + 2);
-
-    /* "pysam/csamtools.pyx":2723
- *                 auxtag[1] = s[1]
- *                 s += 2
- *                 auxtype = s[0]             # <<<<<<<<<<<<<<
- *                 if auxtype in ('c', 'C'):
- *                     value = <int>bam_aux2i(s)
- */
-    __pyx_v_auxtype = (__pyx_v_s[0]);
-
-    /* "pysam/csamtools.pyx":2724
- *                 s += 2
- *                 auxtype = s[0]
- *                 if auxtype in ('c', 'C'):             # <<<<<<<<<<<<<<
- *                     value = <int>bam_aux2i(s)
- *                     s += 1
- */
-    __pyx_t_4 = __pyx_v_auxtype;
-    __pyx_t_2 = ((int)(__pyx_t_4 == 'c'));
-    if (!__pyx_t_2) {
-      __pyx_t_5 = ((int)(__pyx_t_4 == 'C'));
-      __pyx_t_6 = __pyx_t_5;
-    } else {
-      __pyx_t_6 = __pyx_t_2;
-    }
-    __pyx_t_2 = __pyx_t_6;
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":2725
- *                 auxtype = s[0]
- *                 if auxtype in ('c', 'C'):
- *                     value = <int>bam_aux2i(s)             # <<<<<<<<<<<<<<
- *                     s += 1
- *                 elif auxtype in ('s', 'S'):
- */
-      __pyx_t_3 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_3;
-      __pyx_t_3 = 0;
-
-      /* "pysam/csamtools.pyx":2726
- *                 if auxtype in ('c', 'C'):
- *                     value = <int>bam_aux2i(s)
- *                     s += 1             # <<<<<<<<<<<<<<
- *                 elif auxtype in ('s', 'S'):
- *                     value = <int>bam_aux2i(s)
- */
-      __pyx_v_s = (__pyx_v_s + 1);
-      goto __pyx_L6;
-    }
-
-    /* "pysam/csamtools.pyx":2727
- *                     value = <int>bam_aux2i(s)
- *                     s += 1
- *                 elif auxtype in ('s', 'S'):             # <<<<<<<<<<<<<<
- *                     value = <int>bam_aux2i(s)
- *                     s += 2
- */
-    __pyx_t_4 = __pyx_v_auxtype;
-    __pyx_t_2 = ((int)(__pyx_t_4 == 's'));
-    if (!__pyx_t_2) {
-      __pyx_t_6 = ((int)(__pyx_t_4 == 'S'));
-      __pyx_t_5 = __pyx_t_6;
-    } else {
-      __pyx_t_5 = __pyx_t_2;
-    }
-    __pyx_t_2 = __pyx_t_5;
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":2728
- *                     s += 1
- *                 elif auxtype in ('s', 'S'):
- *                     value = <int>bam_aux2i(s)             # <<<<<<<<<<<<<<
- *                     s += 2
- *                 elif auxtype in ('i', 'I'):
- */
-      __pyx_t_3 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_3;
-      __pyx_t_3 = 0;
-
-      /* "pysam/csamtools.pyx":2729
- *                 elif auxtype in ('s', 'S'):
- *                     value = <int>bam_aux2i(s)
- *                     s += 2             # <<<<<<<<<<<<<<
- *                 elif auxtype in ('i', 'I'):
- *                     value = <int32_t>bam_aux2i(s)
- */
-      __pyx_v_s = (__pyx_v_s + 2);
-      goto __pyx_L6;
-    }
-
-    /* "pysam/csamtools.pyx":2730
- *                     value = <int>bam_aux2i(s)
- *                     s += 2
- *                 elif auxtype in ('i', 'I'):             # <<<<<<<<<<<<<<
- *                     value = <int32_t>bam_aux2i(s)
- *                     s += 4
- */
-    __pyx_t_4 = __pyx_v_auxtype;
-    __pyx_t_2 = ((int)(__pyx_t_4 == 'i'));
-    if (!__pyx_t_2) {
-      __pyx_t_5 = ((int)(__pyx_t_4 == 'I'));
-      __pyx_t_6 = __pyx_t_5;
-    } else {
-      __pyx_t_6 = __pyx_t_2;
-    }
-    __pyx_t_2 = __pyx_t_6;
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":2731
- *                     s += 2
- *                 elif auxtype in ('i', 'I'):
- *                     value = <int32_t>bam_aux2i(s)             # <<<<<<<<<<<<<<
- *                     s += 4
- *                 elif auxtype == 'f':
- */
-      __pyx_t_3 = __Pyx_PyInt_to_py_int32_t(((int32_t)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_3;
-      __pyx_t_3 = 0;
-
-      /* "pysam/csamtools.pyx":2732
- *                 elif auxtype in ('i', 'I'):
- *                     value = <int32_t>bam_aux2i(s)
- *                     s += 4             # <<<<<<<<<<<<<<
- *                 elif auxtype == 'f':
- *                     value = <float>bam_aux2f(s)
- */
-      __pyx_v_s = (__pyx_v_s + 4);
-      goto __pyx_L6;
-    }
-
-    /* "pysam/csamtools.pyx":2733
- *                     value = <int32_t>bam_aux2i(s)
- *                     s += 4
- *                 elif auxtype == 'f':             # <<<<<<<<<<<<<<
- *                     value = <float>bam_aux2f(s)
- *                     s += 4
- */
-    __pyx_t_2 = (__pyx_v_auxtype == 'f');
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":2734
- *                     s += 4
- *                 elif auxtype == 'f':
- *                     value = <float>bam_aux2f(s)             # <<<<<<<<<<<<<<
- *                     s += 4
- *                 elif auxtype == 'd':
- */
-      __pyx_t_3 = PyFloat_FromDouble(((float)bam_aux2f(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_3;
-      __pyx_t_3 = 0;
-
-      /* "pysam/csamtools.pyx":2735
- *                 elif auxtype == 'f':
- *                     value = <float>bam_aux2f(s)
- *                     s += 4             # <<<<<<<<<<<<<<
- *                 elif auxtype == 'd':
- *                     value = <double>bam_aux2d(s)
- */
-      __pyx_v_s = (__pyx_v_s + 4);
-      goto __pyx_L6;
-    }
-
-    /* "pysam/csamtools.pyx":2736
- *                     value = <float>bam_aux2f(s)
- *                     s += 4
- *                 elif auxtype == 'd':             # <<<<<<<<<<<<<<
- *                     value = <double>bam_aux2d(s)
- *                     s += 8
- */
-    __pyx_t_2 = (__pyx_v_auxtype == 'd');
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":2737
- *                     s += 4
- *                 elif auxtype == 'd':
- *                     value = <double>bam_aux2d(s)             # <<<<<<<<<<<<<<
- *                     s += 8
- *                 elif auxtype == 'A':
- */
-      __pyx_t_3 = PyFloat_FromDouble(((double)bam_aux2d(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_3;
-      __pyx_t_3 = 0;
-
-      /* "pysam/csamtools.pyx":2738
- *                 elif auxtype == 'd':
- *                     value = <double>bam_aux2d(s)
- *                     s += 8             # <<<<<<<<<<<<<<
- *                 elif auxtype == 'A':
- *                     value = "%c" % <char>bam_aux2A(s)
- */
-      __pyx_v_s = (__pyx_v_s + 8);
-      goto __pyx_L6;
-    }
-
-    /* "pysam/csamtools.pyx":2739
- *                     value = <double>bam_aux2d(s)
- *                     s += 8
- *                 elif auxtype == 'A':             # <<<<<<<<<<<<<<
- *                     value = "%c" % <char>bam_aux2A(s)
- *                     s += 1
- */
-    __pyx_t_2 = (__pyx_v_auxtype == 'A');
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":2740
- *                     s += 8
- *                 elif auxtype == 'A':
- *                     value = "%c" % <char>bam_aux2A(s)             # <<<<<<<<<<<<<<
- *                     s += 1
- *                 elif auxtype in ('Z', 'H'):
- */
-      __pyx_t_3 = PyInt_FromLong(((char)bam_aux2A(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_148), __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = ((PyObject *)__pyx_t_7);
-      __pyx_t_7 = 0;
-
-      /* "pysam/csamtools.pyx":2741
- *                 elif auxtype == 'A':
- *                     value = "%c" % <char>bam_aux2A(s)
- *                     s += 1             # <<<<<<<<<<<<<<
- *                 elif auxtype in ('Z', 'H'):
- *                     value = _charptr_to_str(<char*>bam_aux2Z(s))
- */
-      __pyx_v_s = (__pyx_v_s + 1);
-      goto __pyx_L6;
-    }
-
-    /* "pysam/csamtools.pyx":2742
- *                     value = "%c" % <char>bam_aux2A(s)
- *                     s += 1
- *                 elif auxtype in ('Z', 'H'):             # <<<<<<<<<<<<<<
- *                     value = _charptr_to_str(<char*>bam_aux2Z(s))
- *                     # +1 for NULL terminated string
- */
-    __pyx_t_4 = __pyx_v_auxtype;
-    __pyx_t_2 = ((int)(__pyx_t_4 == 'Z'));
-    if (!__pyx_t_2) {
-      __pyx_t_6 = ((int)(__pyx_t_4 == 'H'));
-      __pyx_t_5 = __pyx_t_6;
-    } else {
-      __pyx_t_5 = __pyx_t_2;
-    }
-    __pyx_t_2 = __pyx_t_5;
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":2743
- *                     s += 1
- *                 elif auxtype in ('Z', 'H'):
- *                     value = _charptr_to_str(<char*>bam_aux2Z(s))             # <<<<<<<<<<<<<<
- *                     # +1 for NULL terminated string
- *                     s += len(value) + 1
- */
-      __pyx_t_7 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam_aux2Z(__pyx_v_s))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_7;
-      __pyx_t_7 = 0;
-
-      /* "pysam/csamtools.pyx":2745
- *                     value = _charptr_to_str(<char*>bam_aux2Z(s))
- *                     # +1 for NULL terminated string
- *                     s += len(value) + 1             # <<<<<<<<<<<<<<
- *                 elif auxtype == 'B':
- *                     s += 1
- */
-      __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_s = (__pyx_v_s + (__pyx_t_8 + 1));
-      goto __pyx_L6;
-    }
-
-    /* "pysam/csamtools.pyx":2746
- *                     # +1 for NULL terminated string
- *                     s += len(value) + 1
- *                 elif auxtype == 'B':             # <<<<<<<<<<<<<<
- *                     s += 1
- *                     byte_size, nvalues, value = convertBinaryTagToList( s )
- */
-    __pyx_t_2 = (__pyx_v_auxtype == 'B');
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":2747
- *                     s += len(value) + 1
- *                 elif auxtype == 'B':
- *                     s += 1             # <<<<<<<<<<<<<<
- *                     byte_size, nvalues, value = convertBinaryTagToList( s )
- *                     # 5 for 1 char and 1 int
- */
-      __pyx_v_s = (__pyx_v_s + 1);
-
-      /* "pysam/csamtools.pyx":2748
- *                 elif auxtype == 'B':
- *                     s += 1
- *                     byte_size, nvalues, value = convertBinaryTagToList( s )             # <<<<<<<<<<<<<<
- *                     # 5 for 1 char and 1 int
- *                     s += 5 + ( nvalues * byte_size) - 1
- */
-      __pyx_t_7 = __pyx_f_5pysam_9csamtools_convertBinaryTagToList(__pyx_v_s); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
-        PyObject* sequence = __pyx_t_7;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        Py_ssize_t size = Py_SIZE(sequence);
-        #else
-        Py_ssize_t size = PySequence_Size(sequence);
-        #endif
-        if (unlikely(size != 3)) {
-          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
-          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        #if CYTHON_COMPILING_IN_CPYTHON
-        if (likely(PyTuple_CheckExact(sequence))) {
-          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
-          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
-          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 2); 
-        } else {
-          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
-          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
-          __pyx_t_10 = PyList_GET_ITEM(sequence, 2); 
-        }
-        __Pyx_INCREF(__pyx_t_3);
-        __Pyx_INCREF(__pyx_t_9);
-        __Pyx_INCREF(__pyx_t_10);
-        #else
-        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        #endif
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      } else
-      {
-        Py_ssize_t index = -1;
-        __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_11);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
-        index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_3);
-        index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_9);
-        index = 2; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L7_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_10);
-        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_12 = NULL;
-        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-        goto __pyx_L8_unpacking_done;
-        __pyx_L7_unpacking_failed:;
-        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-        __pyx_t_12 = NULL;
-        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_L8_unpacking_done:;
-      }
-      __pyx_t_13 = __Pyx_PyInt_from_py_uint8_t(__pyx_t_3); if (unlikely((__pyx_t_13 == (uint8_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_14 = __Pyx_PyInt_from_py_int32_t(__pyx_t_9); if (unlikely((__pyx_t_14 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_v_byte_size = __pyx_t_13;
-      __pyx_v_nvalues = __pyx_t_14;
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_10;
-      __pyx_t_10 = 0;
-
-      /* "pysam/csamtools.pyx":2750
- *                     byte_size, nvalues, value = convertBinaryTagToList( s )
- *                     # 5 for 1 char and 1 int
- *                     s += 5 + ( nvalues * byte_size) - 1             # <<<<<<<<<<<<<<
- * 
- *                 s += 1
- */
-      __pyx_v_s = (__pyx_v_s + ((5 + (__pyx_v_nvalues * __pyx_v_byte_size)) - 1));
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-
-    /* "pysam/csamtools.pyx":2752
- *                     s += 5 + ( nvalues * byte_size) - 1
- * 
- *                 s += 1             # <<<<<<<<<<<<<<
- * 
- *                 result.append( (_charptr_to_str(auxtag), value) )
- */
-    __pyx_v_s = (__pyx_v_s + 1);
-
-    /* "pysam/csamtools.pyx":2754
- *                 s += 1
- * 
- *                 result.append( (_charptr_to_str(auxtag), value) )             # <<<<<<<<<<<<<<
- * 
- *             return result
- */
-    __pyx_t_7 = __pyx_f_5pysam_9csamtools__charptr_to_str(__pyx_v_auxtag); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    if (unlikely(!__pyx_v_value)) { __Pyx_RaiseUnboundLocalError("value"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
-    __Pyx_GIVEREF(__pyx_t_7);
-    __Pyx_INCREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_value);
-    __Pyx_GIVEREF(__pyx_v_value);
-    __pyx_t_7 = 0;
-    __pyx_t_15 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_10)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-  }
-
-  /* "pysam/csamtools.pyx":2756
- *                 result.append( (_charptr_to_str(auxtag), value) )
- * 
- *             return result             # <<<<<<<<<<<<<<
- * 
- *         def __set__(self, tags):
- */
-  __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_3);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.tags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_result);
-  __Pyx_XDECREF(__pyx_v_value);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4tags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tags); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4tags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tags) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4tags_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_tags));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2758
- *             return result
- * 
- *         def __set__(self, tags):             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             cdef uint8_t * s
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4tags_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tags) {
-  bam1_t *__pyx_v_src;
-  uint8_t *__pyx_v_s;
-  char *__pyx_v_temp;
-  PyObject *__pyx_v_fmts = NULL;
-  PyObject *__pyx_v_args = NULL;
-  PyObject *__pyx_v_pytag = NULL;
-  PyObject *__pyx_v_value = NULL;
-  PyObject *__pyx_v_t = NULL;
-  PyObject *__pyx_v_pytype = NULL;
-  PyObject *__pyx_v_datafmt = NULL;
-  PyObject *__pyx_v_datatype = NULL;
-  PyObject *__pyx_v_mi = NULL;
-  PyObject *__pyx_v_ma = NULL;
-  PyObject *__pyx_v_absmax = NULL;
-  PyObject *__pyx_v_fmt = NULL;
-  PyObject *__pyx_v_total_size = NULL;
-  PyObject *__pyx_v_buffer = NULL;
-  PyObject *__pyx_v_p = NULL;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  Py_ssize_t __pyx_t_5;
-  PyObject *(*__pyx_t_6)(PyObject *);
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *(*__pyx_t_10)(PyObject *);
-  int __pyx_t_11;
-  int __pyx_t_12;
-  Py_ssize_t __pyx_t_13;
-  PyObject *__pyx_t_14 = NULL;
-  PyObject *__pyx_t_15 = NULL;
-  int __pyx_t_16;
-  size_t __pyx_t_17;
-  int __pyx_t_18;
-  char *__pyx_t_19;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2758);
-
-  /* "pysam/csamtools.pyx":2764
- *             cdef char * temp
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- * 
- *             fmts, args = ["<"], []
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2766
- *             src = self._delegate
- * 
- *             fmts, args = ["<"], []             # <<<<<<<<<<<<<<
- * 
- *             if tags != None:
- */
-  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_149));
-  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_149));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_149));
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_v_fmts = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
-  __pyx_v_args = ((PyObject*)__pyx_t_3);
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":2768
- *             fmts, args = ["<"], []
- * 
- *             if tags != None:             # <<<<<<<<<<<<<<
- * 
- *                 # map samtools code to python.struct code and byte size
- */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_tags, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":2771
- * 
- *                 # map samtools code to python.struct code and byte size
- *                 for pytag, value in tags:             # <<<<<<<<<<<<<<
- *                     if not type(pytag) is bytes:
- *                         pytag = pytag.encode('ascii')
- */
-    if (PyList_CheckExact(__pyx_v_tags) || PyTuple_CheckExact(__pyx_v_tags)) {
-      __pyx_t_3 = __pyx_v_tags; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
-      __pyx_t_6 = NULL;
-    } else {
-      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_tags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
-    }
-    for (;;) {
-      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
-        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
-        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_2 = __pyx_t_6(__pyx_t_3);
-        if (unlikely(!__pyx_t_2)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_2);
-      }
-      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
-        PyObject* sequence = __pyx_t_2;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        Py_ssize_t size = Py_SIZE(sequence);
-        #else
-        Py_ssize_t size = PySequence_Size(sequence);
-        #endif
-        if (unlikely(size != 2)) {
-          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        #if CYTHON_COMPILING_IN_CPYTHON
-        if (likely(PyTuple_CheckExact(sequence))) {
-          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
-          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
-        } else {
-          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
-          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
-        }
-        __Pyx_INCREF(__pyx_t_7);
-        __Pyx_INCREF(__pyx_t_8);
-        #else
-        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        #endif
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      } else
-      {
-        Py_ssize_t index = -1;
-        __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
-        index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_7);
-        index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_8);
-        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_10 = NULL;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        goto __pyx_L7_unpacking_done;
-        __pyx_L6_unpacking_failed:;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_10 = NULL;
-        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_L7_unpacking_done:;
-      }
-      __Pyx_XDECREF(__pyx_v_pytag);
-      __pyx_v_pytag = __pyx_t_7;
-      __pyx_t_7 = 0;
-      __Pyx_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_8;
-      __pyx_t_8 = 0;
-
-      /* "pysam/csamtools.pyx":2772
- *                 # map samtools code to python.struct code and byte size
- *                 for pytag, value in tags:
- *                     if not type(pytag) is bytes:             # <<<<<<<<<<<<<<
- *                         pytag = pytag.encode('ascii')
- *                     t = type(value)
- */
-      __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_pytag)) == ((PyObject *)((PyObject*)(&PyBytes_Type))));
-      __pyx_t_11 = (!__pyx_t_4);
-      if (__pyx_t_11) {
-
-        /* "pysam/csamtools.pyx":2773
- *                 for pytag, value in tags:
- *                     if not type(pytag) is bytes:
- *                         pytag = pytag.encode('ascii')             # <<<<<<<<<<<<<<
- *                     t = type(value)
- * 
- */
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytag, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_150), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_v_pytag);
-        __pyx_v_pytag = __pyx_t_8;
-        __pyx_t_8 = 0;
-        goto __pyx_L8;
-      }
-      __pyx_L8:;
-
-      /* "pysam/csamtools.pyx":2774
- *                     if not type(pytag) is bytes:
- *                         pytag = pytag.encode('ascii')
- *                     t = type(value)             # <<<<<<<<<<<<<<
- * 
- *                     if t is tuple or t is list:
- */
-      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
-      __Pyx_XDECREF(((PyObject *)__pyx_v_t));
-      __pyx_v_t = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_value)));
-
-      /* "pysam/csamtools.pyx":2776
- *                     t = type(value)
- * 
- *                     if t is tuple or t is list:             # <<<<<<<<<<<<<<
- *                         # binary tags - treat separately
- *                         pytype = 'B'
- */
-      __pyx_t_11 = (__pyx_v_t == ((PyObject*)(&PyTuple_Type)));
-      if (!__pyx_t_11) {
-        __pyx_t_4 = (__pyx_v_t == ((PyObject*)(&PyList_Type)));
-        __pyx_t_12 = __pyx_t_4;
-      } else {
-        __pyx_t_12 = __pyx_t_11;
-      }
-      if (__pyx_t_12) {
-
-        /* "pysam/csamtools.pyx":2778
- *                     if t is tuple or t is list:
- *                         # binary tags - treat separately
- *                         pytype = 'B'             # <<<<<<<<<<<<<<
- *                         # get data type - first value determines type
- *                         if type(value[0]) is float:
- */
-        __Pyx_INCREF(((PyObject *)__pyx_n_s__B));
-        __Pyx_XDECREF(__pyx_v_pytype);
-        __pyx_v_pytype = ((PyObject *)__pyx_n_s__B);
-
-        /* "pysam/csamtools.pyx":2780
- *                         pytype = 'B'
- *                         # get data type - first value determines type
- *                         if type(value[0]) is float:             # <<<<<<<<<<<<<<
- *                             datafmt, datatype = "f", "f"
- *                         else:
- */
-        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_value, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_12 = (((PyObject *)Py_TYPE(__pyx_t_8)) == ((PyObject *)((PyObject*)(&PyFloat_Type))));
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        if (__pyx_t_12) {
-
-          /* "pysam/csamtools.pyx":2781
- *                         # get data type - first value determines type
- *                         if type(value[0]) is float:
- *                             datafmt, datatype = "f", "f"             # <<<<<<<<<<<<<<
- *                         else:
- *                             mi, ma = min(value), max(value)
- */
-          __pyx_t_8 = ((PyObject *)__pyx_n_s__f);
-          __Pyx_INCREF(__pyx_t_8);
-          __pyx_t_2 = ((PyObject *)__pyx_n_s__f);
-          __Pyx_INCREF(__pyx_t_2);
-          __Pyx_XDECREF(__pyx_v_datafmt);
-          __pyx_v_datafmt = __pyx_t_8;
-          __pyx_t_8 = 0;
-          __Pyx_XDECREF(__pyx_v_datatype);
-          __pyx_v_datatype = __pyx_t_2;
-          __pyx_t_2 = 0;
-          goto __pyx_L10;
-        }
-        /*else*/ {
-
-          /* "pysam/csamtools.pyx":2783
- *                             datafmt, datatype = "f", "f"
- *                         else:
- *                             mi, ma = min(value), max(value)             # <<<<<<<<<<<<<<
- *                             absmax = max( abs(mi), abs(ma) )
- *                             # signed ints
- */
-          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_INCREF(__pyx_v_value);
-          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
-          __Pyx_GIVEREF(__pyx_v_value);
-          __pyx_t_8 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __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 = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_INCREF(__pyx_v_value);
-          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
-          __Pyx_GIVEREF(__pyx_v_value);
-          __pyx_t_7 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-          __Pyx_XDECREF(__pyx_v_mi);
-          __pyx_v_mi = __pyx_t_8;
-          __pyx_t_8 = 0;
-          __Pyx_XDECREF(__pyx_v_ma);
-          __pyx_v_ma = __pyx_t_7;
-          __pyx_t_7 = 0;
-
-          /* "pysam/csamtools.pyx":2784
- *                         else:
- *                             mi, ma = min(value), max(value)
- *                             absmax = max( abs(mi), abs(ma) )             # <<<<<<<<<<<<<<
- *                             # signed ints
- *                             if mi < 0:
- */
-          __pyx_t_7 = PyNumber_Absolute(__pyx_v_ma); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __pyx_t_8 = PyNumber_Absolute(__pyx_v_mi); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          if (__pyx_t_12) {
-            __Pyx_INCREF(__pyx_t_7);
-            __pyx_t_2 = __pyx_t_7;
-          } else {
-            __Pyx_INCREF(__pyx_t_8);
-            __pyx_t_2 = __pyx_t_8;
-          }
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          __pyx_t_7 = __pyx_t_2;
-          __Pyx_INCREF(__pyx_t_7);
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          __Pyx_XDECREF(__pyx_v_absmax);
-          __pyx_v_absmax = __pyx_t_7;
-          __pyx_t_7 = 0;
-
-          /* "pysam/csamtools.pyx":2786
- *                             absmax = max( abs(mi), abs(ma) )
- *                             # signed ints
- *                             if mi < 0:             # <<<<<<<<<<<<<<
- *                                 if mi >= -127: datafmt, datatype = "b", 'c'
- *                                 elif mi >= -32767: datafmt, datatype = "h", 's'
- */
-          __pyx_t_7 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          if (__pyx_t_12) {
-
-            /* "pysam/csamtools.pyx":2787
- *                             # signed ints
- *                             if mi < 0:
- *                                 if mi >= -127: datafmt, datatype = "b", 'c'             # <<<<<<<<<<<<<<
- *                                 elif mi >= -32767: datafmt, datatype = "h", 's'
- *                                 elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- */
-            __pyx_t_7 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-            if (__pyx_t_12) {
-              __pyx_t_7 = ((PyObject *)__pyx_n_s__b);
-              __Pyx_INCREF(__pyx_t_7);
-              __pyx_t_2 = ((PyObject *)__pyx_n_s__c);
-              __Pyx_INCREF(__pyx_t_2);
-              __Pyx_XDECREF(__pyx_v_datafmt);
-              __pyx_v_datafmt = __pyx_t_7;
-              __pyx_t_7 = 0;
-              __Pyx_XDECREF(__pyx_v_datatype);
-              __pyx_v_datatype = __pyx_t_2;
-              __pyx_t_2 = 0;
-              goto __pyx_L12;
-            }
-
-            /* "pysam/csamtools.pyx":2788
- *                             if mi < 0:
- *                                 if mi >= -127: datafmt, datatype = "b", 'c'
- *                                 elif mi >= -32767: datafmt, datatype = "h", 's'             # <<<<<<<<<<<<<<
- *                                 elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- *                                 else: datafmt, datatype = "i", 'i'
- */
-            __pyx_t_2 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-            if (__pyx_t_12) {
-              __pyx_t_2 = ((PyObject *)__pyx_n_s__h);
-              __Pyx_INCREF(__pyx_t_2);
-              __pyx_t_7 = ((PyObject *)__pyx_n_s__s);
-              __Pyx_INCREF(__pyx_t_7);
-              __Pyx_XDECREF(__pyx_v_datafmt);
-              __pyx_v_datafmt = __pyx_t_2;
-              __pyx_t_2 = 0;
-              __Pyx_XDECREF(__pyx_v_datatype);
-              __pyx_v_datatype = __pyx_t_7;
-              __pyx_t_7 = 0;
-              goto __pyx_L12;
-            }
-
-            /* "pysam/csamtools.pyx":2789
- *                                 if mi >= -127: datafmt, datatype = "b", 'c'
- *                                 elif mi >= -32767: datafmt, datatype = "h", 's'
- *                                 elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
- *                                 else: datafmt, datatype = "i", 'i'
- * 
- */
-            __pyx_t_7 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-            if (__pyx_t_12) {
-              __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_151), __pyx_v_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-              __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(__pyx_t_2);
-              PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_7));
-              __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
-              __pyx_t_7 = 0;
-              __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(__pyx_t_7);
-              __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-              __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              goto __pyx_L12;
-            }
-            /*else*/ {
-
-              /* "pysam/csamtools.pyx":2790
- *                                 elif mi >= -32767: datafmt, datatype = "h", 's'
- *                                 elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- *                                 else: datafmt, datatype = "i", 'i'             # <<<<<<<<<<<<<<
- * 
- *                             # unsigned ints
- */
-              __pyx_t_7 = ((PyObject *)__pyx_n_s__i);
-              __Pyx_INCREF(__pyx_t_7);
-              __pyx_t_2 = ((PyObject *)__pyx_n_s__i);
-              __Pyx_INCREF(__pyx_t_2);
-              __Pyx_XDECREF(__pyx_v_datafmt);
-              __pyx_v_datafmt = __pyx_t_7;
-              __pyx_t_7 = 0;
-              __Pyx_XDECREF(__pyx_v_datatype);
-              __pyx_v_datatype = __pyx_t_2;
-              __pyx_t_2 = 0;
-            }
-            __pyx_L12:;
-            goto __pyx_L11;
-          }
-          /*else*/ {
-
-            /* "pysam/csamtools.pyx":2794
- *                             # unsigned ints
- *                             else:
- *                                 if absmax <= 255: datafmt, datatype = "B", 'C'             # <<<<<<<<<<<<<<
- *                                 elif absmax <= 65535: datafmt, datatype = "H", 'S'
- *                                 elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- */
-            __pyx_t_2 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-            if (__pyx_t_12) {
-              __pyx_t_2 = ((PyObject *)__pyx_n_s__B);
-              __Pyx_INCREF(__pyx_t_2);
-              __pyx_t_7 = ((PyObject *)__pyx_n_s__C);
-              __Pyx_INCREF(__pyx_t_7);
-              __Pyx_XDECREF(__pyx_v_datafmt);
-              __pyx_v_datafmt = __pyx_t_2;
-              __pyx_t_2 = 0;
-              __Pyx_XDECREF(__pyx_v_datatype);
-              __pyx_v_datatype = __pyx_t_7;
-              __pyx_t_7 = 0;
-              goto __pyx_L13;
-            }
-
-            /* "pysam/csamtools.pyx":2795
- *                             else:
- *                                 if absmax <= 255: datafmt, datatype = "B", 'C'
- *                                 elif absmax <= 65535: datafmt, datatype = "H", 'S'             # <<<<<<<<<<<<<<
- *                                 elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- *                                 else: datafmt, datatype = "I", 'I'
- */
-            __pyx_t_7 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-            if (__pyx_t_12) {
-              __pyx_t_7 = ((PyObject *)__pyx_n_s__H);
-              __Pyx_INCREF(__pyx_t_7);
-              __pyx_t_2 = ((PyObject *)__pyx_n_s__S);
-              __Pyx_INCREF(__pyx_t_2);
-              __Pyx_XDECREF(__pyx_v_datafmt);
-              __pyx_v_datafmt = __pyx_t_7;
-              __pyx_t_7 = 0;
-              __Pyx_XDECREF(__pyx_v_datatype);
-              __pyx_v_datatype = __pyx_t_2;
-              __pyx_t_2 = 0;
-              goto __pyx_L13;
-            }
-
-            /* "pysam/csamtools.pyx":2796
- *                                 if absmax <= 255: datafmt, datatype = "B", 'C'
- *                                 elif absmax <= 65535: datafmt, datatype = "H", 'S'
- *                                 elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
- *                                 else: datafmt, datatype = "I", 'I'
- * 
- */
-            __pyx_t_2 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-            if (__pyx_t_12) {
-              __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_151), __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-              __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(__pyx_t_7);
-              PyTuple_SET_ITEM(__pyx_t_7, 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_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(__pyx_t_2);
-              __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-              __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              goto __pyx_L13;
-            }
-            /*else*/ {
-
-              /* "pysam/csamtools.pyx":2797
- *                                 elif absmax <= 65535: datafmt, datatype = "H", 'S'
- *                                 elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- *                                 else: datafmt, datatype = "I", 'I'             # <<<<<<<<<<<<<<
- * 
- *                         datafmt = "2sccI%i%s" % (len(value), datafmt)
- */
-              __pyx_t_2 = ((PyObject *)__pyx_n_s__I);
-              __Pyx_INCREF(__pyx_t_2);
-              __pyx_t_7 = ((PyObject *)__pyx_n_s__I);
-              __Pyx_INCREF(__pyx_t_7);
-              __Pyx_XDECREF(__pyx_v_datafmt);
-              __pyx_v_datafmt = __pyx_t_2;
-              __pyx_t_2 = 0;
-              __Pyx_XDECREF(__pyx_v_datatype);
-              __pyx_v_datatype = __pyx_t_7;
-              __pyx_t_7 = 0;
-            }
-            __pyx_L13:;
-          }
-          __pyx_L11:;
-        }
-        __pyx_L10:;
-
-        /* "pysam/csamtools.pyx":2799
- *                                 else: datafmt, datatype = "I", 'I'
- * 
- *                         datafmt = "2sccI%i%s" % (len(value), datafmt)             # <<<<<<<<<<<<<<
- *                         args.extend( [pytag[:2],
- *                                       pytype.encode('ascii'),
- */
-        __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __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 = 2799; __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_INCREF(__pyx_v_datafmt);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_datafmt);
-        __Pyx_GIVEREF(__pyx_v_datafmt);
-        __pyx_t_7 = 0;
-        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_152), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_v_datafmt);
-        __pyx_v_datafmt = ((PyObject *)__pyx_t_7);
-        __pyx_t_7 = 0;
-
-        /* "pysam/csamtools.pyx":2800
- * 
- *                         datafmt = "2sccI%i%s" % (len(value), datafmt)
- *                         args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
- *                                       pytype.encode('ascii'),
- *                                       datatype.encode('ascii'),
- */
-        __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_args), __pyx_n_s__extend); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-
-        /* "pysam/csamtools.pyx":2803
- *                                       pytype.encode('ascii'),
- *                                       datatype.encode('ascii'),
- *                                       len(value)] + list(value) )             # <<<<<<<<<<<<<<
- *                         fmts.append( datafmt )
- *                         continue
- */
-        __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_pytag, 0, 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-
-        /* "pysam/csamtools.pyx":2801
- *                         datafmt = "2sccI%i%s" % (len(value), datafmt)
- *                         args.extend( [pytag[:2],
- *                                       pytype.encode('ascii'),             # <<<<<<<<<<<<<<
- *                                       datatype.encode('ascii'),
- *                                       len(value)] + list(value) )
- */
-        __pyx_t_8 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_153), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-        /* "pysam/csamtools.pyx":2802
- *                         args.extend( [pytag[:2],
- *                                       pytype.encode('ascii'),
- *                                       datatype.encode('ascii'),             # <<<<<<<<<<<<<<
- *                                       len(value)] + list(value) )
- *                         fmts.append( datafmt )
- */
-        __pyx_t_8 = PyObject_GetAttr(__pyx_v_datatype, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_14 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_154), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_14);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-        /* "pysam/csamtools.pyx":2803
- *                                       pytype.encode('ascii'),
- *                                       datatype.encode('ascii'),
- *                                       len(value)] + list(value) )             # <<<<<<<<<<<<<<
- *                         fmts.append( datafmt )
- *                         continue
- */
-        __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_15 = PyList_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_15);
-        PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
-        PyList_SET_ITEM(__pyx_t_15, 1, __pyx_t_9);
-        __Pyx_GIVEREF(__pyx_t_9);
-        PyList_SET_ITEM(__pyx_t_15, 2, __pyx_t_14);
-        __Pyx_GIVEREF(__pyx_t_14);
-        PyList_SET_ITEM(__pyx_t_15, 3, __pyx_t_8);
-        __Pyx_GIVEREF(__pyx_t_8);
-        __pyx_t_2 = 0;
-        __pyx_t_9 = 0;
-        __pyx_t_14 = 0;
-        __pyx_t_8 = 0;
-        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_INCREF(__pyx_v_value);
-        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_value);
-        __Pyx_GIVEREF(__pyx_v_value);
-        __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_14);
-        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-        __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_t_15), __pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
-        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-        __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_14);
-        PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_t_8));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
-        __pyx_t_8 = 0;
-        __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-
-        /* "pysam/csamtools.pyx":2804
- *                                       datatype.encode('ascii'),
- *                                       len(value)] + list(value) )
- *                         fmts.append( datafmt )             # <<<<<<<<<<<<<<
- *                         continue
- * 
- */
-        __pyx_t_16 = PyList_Append(__pyx_v_fmts, __pyx_v_datafmt); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-        /* "pysam/csamtools.pyx":2805
- *                                       len(value)] + list(value) )
- *                         fmts.append( datafmt )
- *                         continue             # <<<<<<<<<<<<<<
- * 
- *                     if t is float:
- */
-        goto __pyx_L4_continue;
-        goto __pyx_L9;
-      }
-      __pyx_L9:;
-
-      /* "pysam/csamtools.pyx":2807
- *                         continue
- * 
- *                     if t is float:             # <<<<<<<<<<<<<<
- *                         fmt, pytype = "2scf", 'f'
- *                     elif t is int:
- */
-      __pyx_t_12 = (__pyx_v_t == ((PyObject*)(&PyFloat_Type)));
-      if (__pyx_t_12) {
-
-        /* "pysam/csamtools.pyx":2808
- * 
- *                     if t is float:
- *                         fmt, pytype = "2scf", 'f'             # <<<<<<<<<<<<<<
- *                     elif t is int:
- *                         # negative values
- */
-        __pyx_t_8 = ((PyObject *)__pyx_kp_s__2scf);
-        __Pyx_INCREF(__pyx_t_8);
-        __pyx_t_14 = ((PyObject *)__pyx_n_s__f);
-        __Pyx_INCREF(__pyx_t_14);
-        __Pyx_XDECREF(__pyx_v_fmt);
-        __pyx_v_fmt = __pyx_t_8;
-        __pyx_t_8 = 0;
-        __Pyx_XDECREF(__pyx_v_pytype);
-        __pyx_v_pytype = __pyx_t_14;
-        __pyx_t_14 = 0;
-        goto __pyx_L14;
-      }
-
-      /* "pysam/csamtools.pyx":2809
- *                     if t is float:
- *                         fmt, pytype = "2scf", 'f'
- *                     elif t is int:             # <<<<<<<<<<<<<<
- *                         # negative values
- *                         if value < 0:
- */
-      __pyx_t_12 = (__pyx_v_t == ((PyObject*)(&PyInt_Type)));
-      if (__pyx_t_12) {
-
-        /* "pysam/csamtools.pyx":2811
- *                     elif t is int:
- *                         # negative values
- *                         if value < 0:             # <<<<<<<<<<<<<<
- *                             if value >= -127: fmt, pytype = "2scb", 'c'
- *                             elif value >= -32767: fmt, pytype = "2sch", 's'
- */
-        __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-        if (__pyx_t_12) {
-
-          /* "pysam/csamtools.pyx":2812
- *                         # negative values
- *                         if value < 0:
- *                             if value >= -127: fmt, pytype = "2scb", 'c'             # <<<<<<<<<<<<<<
- *                             elif value >= -32767: fmt, pytype = "2sch", 's'
- *                             elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- */
-          __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-          if (__pyx_t_12) {
-            __pyx_t_14 = ((PyObject *)__pyx_kp_s__2scb);
-            __Pyx_INCREF(__pyx_t_14);
-            __pyx_t_8 = ((PyObject *)__pyx_n_s__c);
-            __Pyx_INCREF(__pyx_t_8);
-            __Pyx_XDECREF(__pyx_v_fmt);
-            __pyx_v_fmt = __pyx_t_14;
-            __pyx_t_14 = 0;
-            __Pyx_XDECREF(__pyx_v_pytype);
-            __pyx_v_pytype = __pyx_t_8;
-            __pyx_t_8 = 0;
-            goto __pyx_L16;
-          }
-
-          /* "pysam/csamtools.pyx":2813
- *                         if value < 0:
- *                             if value >= -127: fmt, pytype = "2scb", 'c'
- *                             elif value >= -32767: fmt, pytype = "2sch", 's'             # <<<<<<<<<<<<<<
- *                             elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- *                             else: fmt, pytype = "2sci", 'i'
- */
-          __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-          if (__pyx_t_12) {
-            __pyx_t_8 = ((PyObject *)__pyx_kp_s__2sch);
-            __Pyx_INCREF(__pyx_t_8);
-            __pyx_t_14 = ((PyObject *)__pyx_n_s__s);
-            __Pyx_INCREF(__pyx_t_14);
-            __Pyx_XDECREF(__pyx_v_fmt);
-            __pyx_v_fmt = __pyx_t_8;
-            __pyx_t_8 = 0;
-            __Pyx_XDECREF(__pyx_v_pytype);
-            __pyx_v_pytype = __pyx_t_14;
-            __pyx_t_14 = 0;
-            goto __pyx_L16;
-          }
-
-          /* "pysam/csamtools.pyx":2814
- *                             if value >= -127: fmt, pytype = "2scb", 'c'
- *                             elif value >= -32767: fmt, pytype = "2sch", 's'
- *                             elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
- *                             else: fmt, pytype = "2sci", 'i'
- *                         # positive values
- */
-          __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-          if (__pyx_t_12) {
-            __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_151), __pyx_v_value); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_GOTREF(((PyObject *)__pyx_t_14));
-            __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_GOTREF(__pyx_t_8);
-            PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_14));
-            __Pyx_GIVEREF(((PyObject *)__pyx_t_14));
-            __pyx_t_14 = 0;
-            __pyx_t_14 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_GOTREF(__pyx_t_14);
-            __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-            __Pyx_Raise(__pyx_t_14, 0, 0, 0);
-            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            goto __pyx_L16;
-          }
-          /*else*/ {
-
-            /* "pysam/csamtools.pyx":2815
- *                             elif value >= -32767: fmt, pytype = "2sch", 's'
- *                             elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- *                             else: fmt, pytype = "2sci", 'i'             # <<<<<<<<<<<<<<
- *                         # positive values
- *                         else:
- */
-            __pyx_t_14 = ((PyObject *)__pyx_kp_s__2sci);
-            __Pyx_INCREF(__pyx_t_14);
-            __pyx_t_8 = ((PyObject *)__pyx_n_s__i);
-            __Pyx_INCREF(__pyx_t_8);
-            __Pyx_XDECREF(__pyx_v_fmt);
-            __pyx_v_fmt = __pyx_t_14;
-            __pyx_t_14 = 0;
-            __Pyx_XDECREF(__pyx_v_pytype);
-            __pyx_v_pytype = __pyx_t_8;
-            __pyx_t_8 = 0;
-          }
-          __pyx_L16:;
-          goto __pyx_L15;
-        }
-        /*else*/ {
-
-          /* "pysam/csamtools.pyx":2818
- *                         # positive values
- *                         else:
- *                             if value <= 255: fmt, pytype = "2scB", 'C'             # <<<<<<<<<<<<<<
- *                             elif value <= 65535: fmt, pytype = "2scH", 'S'
- *                             elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- */
-          __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-          if (__pyx_t_12) {
-            __pyx_t_8 = ((PyObject *)__pyx_kp_s__2scB);
-            __Pyx_INCREF(__pyx_t_8);
-            __pyx_t_14 = ((PyObject *)__pyx_n_s__C);
-            __Pyx_INCREF(__pyx_t_14);
-            __Pyx_XDECREF(__pyx_v_fmt);
-            __pyx_v_fmt = __pyx_t_8;
-            __pyx_t_8 = 0;
-            __Pyx_XDECREF(__pyx_v_pytype);
-            __pyx_v_pytype = __pyx_t_14;
-            __pyx_t_14 = 0;
-            goto __pyx_L17;
-          }
-
-          /* "pysam/csamtools.pyx":2819
- *                         else:
- *                             if value <= 255: fmt, pytype = "2scB", 'C'
- *                             elif value <= 65535: fmt, pytype = "2scH", 'S'             # <<<<<<<<<<<<<<
- *                             elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- *                             else: fmt, pytype = "2scI", 'I'
- */
-          __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-          if (__pyx_t_12) {
-            __pyx_t_14 = ((PyObject *)__pyx_kp_s__2scH);
-            __Pyx_INCREF(__pyx_t_14);
-            __pyx_t_8 = ((PyObject *)__pyx_n_s__S);
-            __Pyx_INCREF(__pyx_t_8);
-            __Pyx_XDECREF(__pyx_v_fmt);
-            __pyx_v_fmt = __pyx_t_14;
-            __pyx_t_14 = 0;
-            __Pyx_XDECREF(__pyx_v_pytype);
-            __pyx_v_pytype = __pyx_t_8;
-            __pyx_t_8 = 0;
-            goto __pyx_L17;
-          }
-
-          /* "pysam/csamtools.pyx":2820
- *                             if value <= 255: fmt, pytype = "2scB", 'C'
- *                             elif value <= 65535: fmt, pytype = "2scH", 'S'
- *                             elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )             # <<<<<<<<<<<<<<
- *                             else: fmt, pytype = "2scI", 'I'
- *                     else:
- */
-          __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-          if (__pyx_t_12) {
-            __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_151), __pyx_v_value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-            __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_GOTREF(__pyx_t_14);
-            PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_t_8));
-            __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
-            __pyx_t_8 = 0;
-            __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_GOTREF(__pyx_t_8);
-            __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
-            __Pyx_Raise(__pyx_t_8, 0, 0, 0);
-            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            goto __pyx_L17;
-          }
-          /*else*/ {
-
-            /* "pysam/csamtools.pyx":2821
- *                             elif value <= 65535: fmt, pytype = "2scH", 'S'
- *                             elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
- *                             else: fmt, pytype = "2scI", 'I'             # <<<<<<<<<<<<<<
- *                     else:
- *                         # Note: hex strings (H) are not supported yet
- */
-            __pyx_t_8 = ((PyObject *)__pyx_kp_s__2scI);
-            __Pyx_INCREF(__pyx_t_8);
-            __pyx_t_14 = ((PyObject *)__pyx_n_s__I);
-            __Pyx_INCREF(__pyx_t_14);
-            __Pyx_XDECREF(__pyx_v_fmt);
-            __pyx_v_fmt = __pyx_t_8;
-            __pyx_t_8 = 0;
-            __Pyx_XDECREF(__pyx_v_pytype);
-            __pyx_v_pytype = __pyx_t_14;
-            __pyx_t_14 = 0;
-          }
-          __pyx_L17:;
-        }
-        __pyx_L15:;
-        goto __pyx_L14;
-      }
-      /*else*/ {
-
-        /* "pysam/csamtools.pyx":2824
- *                     else:
- *                         # Note: hex strings (H) are not supported yet
- *                         if t is not bytes:             # <<<<<<<<<<<<<<
- *                             value = value.encode('ascii')
- *                         if len(value) == 1:
- */
-        __pyx_t_12 = (__pyx_v_t != ((PyObject*)(&PyBytes_Type)));
-        if (__pyx_t_12) {
-
-          /* "pysam/csamtools.pyx":2825
- *                         # Note: hex strings (H) are not supported yet
- *                         if t is not bytes:
- *                             value = value.encode('ascii')             # <<<<<<<<<<<<<<
- *                         if len(value) == 1:
- *                             fmt, pytype = "2scc", 'A'
- */
-          __pyx_t_14 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__encode); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_14);
-          __pyx_t_8 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_k_tuple_155), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-          __Pyx_DECREF(__pyx_v_value);
-          __pyx_v_value = __pyx_t_8;
-          __pyx_t_8 = 0;
-          goto __pyx_L18;
-        }
-        __pyx_L18:;
-
-        /* "pysam/csamtools.pyx":2826
- *                         if t is not bytes:
- *                             value = value.encode('ascii')
- *                         if len(value) == 1:             # <<<<<<<<<<<<<<
- *                             fmt, pytype = "2scc", 'A'
- *                         else:
- */
-        __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_12 = (__pyx_t_13 == 1);
-        if (__pyx_t_12) {
-
-          /* "pysam/csamtools.pyx":2827
- *                             value = value.encode('ascii')
- *                         if len(value) == 1:
- *                             fmt, pytype = "2scc", 'A'             # <<<<<<<<<<<<<<
- *                         else:
- *                             fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
- */
-          __pyx_t_8 = ((PyObject *)__pyx_kp_s__2scc);
-          __Pyx_INCREF(__pyx_t_8);
-          __pyx_t_14 = ((PyObject *)__pyx_n_s__A);
-          __Pyx_INCREF(__pyx_t_14);
-          __Pyx_XDECREF(__pyx_v_fmt);
-          __pyx_v_fmt = __pyx_t_8;
-          __pyx_t_8 = 0;
-          __Pyx_XDECREF(__pyx_v_pytype);
-          __pyx_v_pytype = __pyx_t_14;
-          __pyx_t_14 = 0;
-          goto __pyx_L19;
-        }
-        /*else*/ {
-
-          /* "pysam/csamtools.pyx":2829
- *                             fmt, pytype = "2scc", 'A'
- *                         else:
- *                             fmt, pytype = "2sc%is" % (len(value)+1), 'Z'             # <<<<<<<<<<<<<<
- * 
- *                     args.extend( [pytag[:2],
- */
-          __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_14 = PyInt_FromSsize_t((__pyx_t_13 + 1)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_14);
-          __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_156), __pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-          __pyx_t_14 = ((PyObject *)__pyx_n_s__Z);
-          __Pyx_INCREF(__pyx_t_14);
-          __Pyx_XDECREF(__pyx_v_fmt);
-          __pyx_v_fmt = ((PyObject *)__pyx_t_8);
-          __pyx_t_8 = 0;
-          __Pyx_XDECREF(__pyx_v_pytype);
-          __pyx_v_pytype = __pyx_t_14;
-          __pyx_t_14 = 0;
-        }
-        __pyx_L19:;
-      }
-      __pyx_L14:;
-
-      /* "pysam/csamtools.pyx":2831
- *                             fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
- * 
- *                     args.extend( [pytag[:2],             # <<<<<<<<<<<<<<
- *                                   pytype.encode('ascii'),
- *                                   value ] )
- */
-      __pyx_t_14 = PyObject_GetAttr(((PyObject *)__pyx_v_args), __pyx_n_s__extend); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_14);
-      __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_pytag, 0, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-
-      /* "pysam/csamtools.pyx":2832
- * 
- *                     args.extend( [pytag[:2],
- *                                   pytype.encode('ascii'),             # <<<<<<<<<<<<<<
- *                                   value ] )
- * 
- */
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__encode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_15 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_157), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_15);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-      /* "pysam/csamtools.pyx":2833
- *                     args.extend( [pytag[:2],
- *                                   pytype.encode('ascii'),
- *                                   value ] )             # <<<<<<<<<<<<<<
- * 
- *                     fmts.append( fmt )
- */
-      __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
-      __Pyx_GIVEREF(__pyx_t_8);
-      PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_15);
-      __Pyx_GIVEREF(__pyx_t_15);
-      __Pyx_INCREF(__pyx_v_value);
-      PyList_SET_ITEM(__pyx_t_7, 2, __pyx_v_value);
-      __Pyx_GIVEREF(__pyx_v_value);
-      __pyx_t_8 = 0;
-      __pyx_t_15 = 0;
-      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_15);
-      PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_t_7));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
-      __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-      /* "pysam/csamtools.pyx":2835
- *                                   value ] )
- * 
- *                     fmts.append( fmt )             # <<<<<<<<<<<<<<
- * 
- *                 fmt = "".join(fmts)
- */
-      __pyx_t_16 = PyList_Append(__pyx_v_fmts, __pyx_v_fmt); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L4_continue:;
-    }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":2837
- *                     fmts.append( fmt )
- * 
- *                 fmt = "".join(fmts)             # <<<<<<<<<<<<<<
- *                 total_size = struct.calcsize(fmt)
- *                 buffer = ctypes.create_string_buffer(total_size)
- */
-    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_20), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_INCREF(((PyObject *)__pyx_v_fmts));
-    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_fmts));
-    __Pyx_GIVEREF(((PyObject *)__pyx_v_fmts));
-    __pyx_t_15 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-    __Pyx_XDECREF(__pyx_v_fmt);
-    __pyx_v_fmt = __pyx_t_15;
-    __pyx_t_15 = 0;
-
-    /* "pysam/csamtools.pyx":2838
- * 
- *                 fmt = "".join(fmts)
- *                 total_size = struct.calcsize(fmt)             # <<<<<<<<<<<<<<
- *                 buffer = ctypes.create_string_buffer(total_size)
- *                 struct.pack_into( fmt,
- */
-    __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__struct); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __pyx_t_7 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__calcsize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-    __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __Pyx_INCREF(__pyx_v_fmt);
-    PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_fmt);
-    __Pyx_GIVEREF(__pyx_v_fmt);
-    __pyx_t_3 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
-    __pyx_v_total_size = __pyx_t_3;
-    __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":2839
- *                 fmt = "".join(fmts)
- *                 total_size = struct.calcsize(fmt)
- *                 buffer = ctypes.create_string_buffer(total_size)             # <<<<<<<<<<<<<<
- *                 struct.pack_into( fmt,
- *                                   buffer,
- */
-    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_15 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s_158); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __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 = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(__pyx_v_total_size);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_total_size);
-    __Pyx_GIVEREF(__pyx_v_total_size);
-    __pyx_t_7 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __pyx_v_buffer = __pyx_t_7;
-    __pyx_t_7 = 0;
-
-    /* "pysam/csamtools.pyx":2840
- *                 total_size = struct.calcsize(fmt)
- *                 buffer = ctypes.create_string_buffer(total_size)
- *                 struct.pack_into( fmt,             # <<<<<<<<<<<<<<
- *                                   buffer,
- *                                   0,
- */
-    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__struct); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__pack_into); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-    /* "pysam/csamtools.pyx":2841
- *                 buffer = ctypes.create_string_buffer(total_size)
- *                 struct.pack_into( fmt,
- *                                   buffer,             # <<<<<<<<<<<<<<
- *                                   0,
- *                                   *args )
- */
-    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_INCREF(__pyx_v_fmt);
-    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_fmt);
-    __Pyx_GIVEREF(__pyx_v_fmt);
-    __Pyx_INCREF(__pyx_v_buffer);
-    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_buffer);
-    __Pyx_GIVEREF(__pyx_v_buffer);
-    __Pyx_INCREF(__pyx_int_0);
-    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_0);
-    __Pyx_GIVEREF(__pyx_int_0);
-
-    /* "pysam/csamtools.pyx":2843
- *                                   buffer,
- *                                   0,
- *                                   *args )             # <<<<<<<<<<<<<<
- * 
- *             # delete the old data and allocate new space.
- */
-    __pyx_t_15 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_15));
-    __pyx_t_14 = PyNumber_Add(((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_14));
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
-    __pyx_t_15 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
-    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2850
- *             pysam_bam_update( src,
- *                               src.l_aux,
- *                               total_size,             # <<<<<<<<<<<<<<
- *                               bam1_aux( src ) )
- * 
- */
-  if (unlikely(!__pyx_v_total_size)) { __Pyx_RaiseUnboundLocalError("total_size"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-  __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_total_size); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":2851
- *                               src.l_aux,
- *                               total_size,
- *                               bam1_aux( src ) )             # <<<<<<<<<<<<<<
- * 
- *             src.l_aux = total_size
- */
-  pysam_bam_update(__pyx_v_src, __pyx_v_src->l_aux, __pyx_t_17, bam1_aux(__pyx_v_src));
-
-  /* "pysam/csamtools.pyx":2853
- *                               bam1_aux( src ) )
- * 
- *             src.l_aux = total_size             # <<<<<<<<<<<<<<
- * 
- *             # copy data only if there is any
- */
-  __pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_v_total_size); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_src->l_aux = __pyx_t_18;
-
-  /* "pysam/csamtools.pyx":2856
- * 
- *             # copy data only if there is any
- *             if total_size != 0:             # <<<<<<<<<<<<<<
- * 
- *                 # get location of new data
- */
-  __pyx_t_15 = PyObject_RichCompare(__pyx_v_total_size, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-  if (__pyx_t_12) {
-
-    /* "pysam/csamtools.pyx":2859
- * 
- *                 # get location of new data
- *                 s = bam1_aux( src )             # <<<<<<<<<<<<<<
- * 
- *                 # check if there is direct path from buffer.raw to tmp
- */
-    __pyx_v_s = bam1_aux(__pyx_v_src);
-
-    /* "pysam/csamtools.pyx":2862
- * 
- *                 # check if there is direct path from buffer.raw to tmp
- *                 p = buffer.raw             # <<<<<<<<<<<<<<
- *                 # create handle to make sure buffer stays alive long
- *                 # enough for memcpy, see issue 129
- */
-    if (unlikely(!__pyx_v_buffer)) { __Pyx_RaiseUnboundLocalError("buffer"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-    __pyx_t_15 = PyObject_GetAttr(__pyx_v_buffer, __pyx_n_s__raw); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __pyx_v_p = __pyx_t_15;
-    __pyx_t_15 = 0;
-
-    /* "pysam/csamtools.pyx":2865
- *                 # create handle to make sure buffer stays alive long
- *                 # enough for memcpy, see issue 129
- *                 temp = p             # <<<<<<<<<<<<<<
- *                 memcpy( s, temp, total_size )
- * 
- */
-    __pyx_t_19 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_temp = __pyx_t_19;
-
-    /* "pysam/csamtools.pyx":2866
- *                 # enough for memcpy, see issue 129
- *                 temp = p
- *                 memcpy( s, temp, total_size )             # <<<<<<<<<<<<<<
- * 
- *     property flag:
- */
-    __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_total_size); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    memcpy(__pyx_v_s, __pyx_v_temp, __pyx_t_17);
-    goto __pyx_L20;
-  }
-  __pyx_L20:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_14);
-  __Pyx_XDECREF(__pyx_t_15);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.tags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_fmts);
-  __Pyx_XDECREF(__pyx_v_args);
-  __Pyx_XDECREF(__pyx_v_pytag);
-  __Pyx_XDECREF(__pyx_v_value);
-  __Pyx_XDECREF(__pyx_v_t);
-  __Pyx_XDECREF(__pyx_v_pytype);
-  __Pyx_XDECREF(__pyx_v_datafmt);
-  __Pyx_XDECREF(__pyx_v_datatype);
-  __Pyx_XDECREF(__pyx_v_mi);
-  __Pyx_XDECREF(__pyx_v_ma);
-  __Pyx_XDECREF(__pyx_v_absmax);
-  __Pyx_XDECREF(__pyx_v_fmt);
-  __Pyx_XDECREF(__pyx_v_total_size);
-  __Pyx_XDECREF(__pyx_v_buffer);
-  __Pyx_XDECREF(__pyx_v_p);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4flag_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4flag_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4flag___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2870
- *     property flag:
- *         """properties flag"""
- *         def __get__(self): return self._delegate.core.flag             # <<<<<<<<<<<<<<
- *         def __set__(self, flag): self._delegate.core.flag = flag
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4flag___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2870);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; __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("pysam.csamtools.AlignedRead.flag.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4flag_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flag); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4flag_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flag) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4flag_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_flag));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2871
- *         """properties flag"""
- *         def __get__(self): return self._delegate.core.flag
- *         def __set__(self, flag): self._delegate.core.flag = flag             # <<<<<<<<<<<<<<
- * 
- *     property rname:
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4flag_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_flag) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  uint32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2871);
-  __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_flag); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.flag = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.flag.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5rname_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5rname_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5rname___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2889
- * 
- *         """
- *         def __get__(self): return self._delegate.core.tid             # <<<<<<<<<<<<<<
- *         def __set__(self, tid): self._delegate.core.tid = tid
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5rname___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2889);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2889; __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("pysam.csamtools.AlignedRead.rname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5rname_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5rname_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5rname_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_tid));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2890
- *         """
- *         def __get__(self): return self._delegate.core.tid
- *         def __set__(self, tid): self._delegate.core.tid = tid             # <<<<<<<<<<<<<<
- * 
- *     property tid:
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5rname_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tid) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2890);
-  __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_tid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.tid = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.rname.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_3tid_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_3tid_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_3tid___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2903
- * 
- *         """
- *         def __get__(self): return self._delegate.core.tid             # <<<<<<<<<<<<<<
- *         def __set__(self, tid): self._delegate.core.tid = tid
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_3tid___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2903);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __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("pysam.csamtools.AlignedRead.tid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_3tid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_3tid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_3tid_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_tid));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2904
- *         """
- *         def __get__(self): return self._delegate.core.tid
- *         def __set__(self, tid): self._delegate.core.tid = tid             # <<<<<<<<<<<<<<
- * 
- *     property pos:
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_3tid_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tid) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2904);
-  __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_tid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.tid = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.tid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_3pos_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_3pos___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2908
- *     property pos:
- *         """0-based leftmost coordinate"""
- *         def __get__(self): return self._delegate.core.pos             # <<<<<<<<<<<<<<
- *         def __set__(self, pos):
- *             ## setting the cigar string also updates the "bin" attribute
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_3pos___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2908);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2908; __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("pysam.csamtools.AlignedRead.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_3pos_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_pos));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2909
- *         """0-based leftmost coordinate"""
- *         def __get__(self): return self._delegate.core.pos
- *         def __set__(self, pos):             # <<<<<<<<<<<<<<
- *             ## setting the cigar string also updates the "bin" attribute
- *             cdef bam1_t * src
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_3pos_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_pos) {
-  bam1_t *__pyx_v_src;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int32_t __pyx_t_2;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2909);
-
-  /* "pysam/csamtools.pyx":2912
- *             ## setting the cigar string also updates the "bin" attribute
- *             cdef bam1_t * src
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             if src.core.n_cigar:
- *                 src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, bam1_cigar(src)) )
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2913
- *             cdef bam1_t * src
- *             src = self._delegate
- *             if src.core.n_cigar:             # <<<<<<<<<<<<<<
- *                 src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, bam1_cigar(src)) )
- *             else:
- */
-  if (__pyx_v_src->core.n_cigar) {
-
-    /* "pysam/csamtools.pyx":2914
- *             src = self._delegate
- *             if src.core.n_cigar:
- *                 src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, bam1_cigar(src)) )             # <<<<<<<<<<<<<<
- *             else:
- *                 src.core.bin = bam_reg2bin( src.core.pos, src.core.pos + 1)
- */
-    __pyx_v_src->core.bin = bam_reg2bin(__pyx_v_src->core.pos, bam_calend((&__pyx_v_src->core), bam1_cigar(__pyx_v_src)));
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":2916
- *                 src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, bam1_cigar(src)) )
- *             else:
- *                 src.core.bin = bam_reg2bin( src.core.pos, src.core.pos + 1)             # <<<<<<<<<<<<<<
- *             self._delegate.core.pos = pos
- *     property bin:
- */
-    __pyx_v_src->core.bin = bam_reg2bin(__pyx_v_src->core.pos, (__pyx_v_src->core.pos + 1));
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2917
- *             else:
- *                 src.core.bin = bam_reg2bin( src.core.pos, src.core.pos + 1)
- *             self._delegate.core.pos = pos             # <<<<<<<<<<<<<<
- *     property bin:
- *         """properties bin"""
- */
-  __pyx_t_2 = __Pyx_PyInt_from_py_int32_t(__pyx_v_pos); if (unlikely((__pyx_t_2 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.pos = __pyx_t_2;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_3bin_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_3bin_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_3bin___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2920
- *     property bin:
- *         """properties bin"""
- *         def __get__(self): return self._delegate.core.bin             # <<<<<<<<<<<<<<
- *         def __set__(self, bin): self._delegate.core.bin = bin
- *     property rlen:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_3bin___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2920);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __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("pysam.csamtools.AlignedRead.bin.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_3bin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_bin); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_3bin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_bin) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_3bin_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_bin));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2921
- *         """properties bin"""
- *         def __get__(self): return self._delegate.core.bin
- *         def __set__(self, bin): self._delegate.core.bin = bin             # <<<<<<<<<<<<<<
- *     property rlen:
- *         '''length of the read (read only). Returns 0 if not given.'''
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_3bin_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_bin) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  uint32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2921);
-  __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_bin); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.bin = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.bin.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4rlen_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4rlen_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4rlen___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2924
- *     property rlen:
- *         '''length of the read (read only). Returns 0 if not given.'''
- *         def __get__(self): return self._delegate.core.l_qseq             # <<<<<<<<<<<<<<
- *     property aend:
- *         '''aligned reference position of the read on the reference genome.
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4rlen___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2924);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.l_qseq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __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("pysam.csamtools.AlignedRead.rlen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4aend_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4aend_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4aend___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2930
- *         aend points to one past the last aligned residue.
- *         Returns None if not available.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             src = self._delegate
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4aend___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_t_6;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2930);
-
-  /* "pysam/csamtools.pyx":2932
- *         def __get__(self):
- *             cdef bam1_t * src
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
- *                 return None
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2933
- *             cdef bam1_t * src
- *             src = self._delegate
- *             if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:             # <<<<<<<<<<<<<<
- *                 return None
- *             return bam_calend(&src.core, bam1_cigar(src))
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyNumber_And(__pyx_t_2, __pyx_int_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __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 = 2933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (!__pyx_t_4) {
-    __pyx_t_5 = (__pyx_v_src->core.n_cigar == 0);
-    __pyx_t_6 = __pyx_t_5;
-  } else {
-    __pyx_t_6 = __pyx_t_4;
-  }
-  if (__pyx_t_6) {
-
-    /* "pysam/csamtools.pyx":2934
- *             src = self._delegate
- *             if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
- *                 return None             # <<<<<<<<<<<<<<
- *             return bam_calend(&src.core, bam1_cigar(src))
- * 
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2935
- *             if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
- *                 return None
- *             return bam_calend(&src.core, bam1_cigar(src))             # <<<<<<<<<<<<<<
- * 
- *     property alen:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(bam_calend((&__pyx_v_src->core), bam1_cigar(__pyx_v_src))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.aend.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4alen_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4alen_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4alen___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2940
- *         '''aligned length of the read on the reference genome.  Returns None if
- *         not available.'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef bam1_t * src
- *             src = self._delegate
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4alen___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_t_6;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2940);
-
-  /* "pysam/csamtools.pyx":2942
- *         def __get__(self):
- *             cdef bam1_t * src
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
- *                 return None
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":2943
- *             cdef bam1_t * src
- *             src = self._delegate
- *             if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:             # <<<<<<<<<<<<<<
- *                 return None
- *             return bam_calend(&src.core,
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyNumber_And(__pyx_t_2, __pyx_int_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __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 = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (!__pyx_t_4) {
-    __pyx_t_5 = (__pyx_v_src->core.n_cigar == 0);
-    __pyx_t_6 = __pyx_t_5;
-  } else {
-    __pyx_t_6 = __pyx_t_4;
-  }
-  if (__pyx_t_6) {
-
-    /* "pysam/csamtools.pyx":2944
- *             src = self._delegate
- *             if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
- *                 return None             # <<<<<<<<<<<<<<
- *             return bam_calend(&src.core,
- *                                bam1_cigar(src)) - \
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(Py_None);
-    __pyx_r = Py_None;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":2945
- *             if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
- *                 return None
- *             return bam_calend(&src.core,             # <<<<<<<<<<<<<<
- *                                bam1_cigar(src)) - \
- *                                self._delegate.core.pos
- */
-  __Pyx_XDECREF(__pyx_r);
-
-  /* "pysam/csamtools.pyx":2947
- *             return bam_calend(&src.core,
- *                                bam1_cigar(src)) - \
- *                                self._delegate.core.pos             # <<<<<<<<<<<<<<
- * 
- *     property mapq:
- */
-  __pyx_t_3 = PyInt_FromLong((bam_calend((&__pyx_v_src->core), bam1_cigar(__pyx_v_src)) - __pyx_v_self->_delegate->core.pos)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.alen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4mapq_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4mapq_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4mapq___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2951
- *     property mapq:
- *         """mapping quality"""
- *         def __get__(self): return self._delegate.core.qual             # <<<<<<<<<<<<<<
- *         def __set__(self, qual): self._delegate.core.qual = qual
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4mapq___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2951);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.qual); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2951; __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("pysam.csamtools.AlignedRead.mapq.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4mapq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4mapq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4mapq_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_qual));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2952
- *         """mapping quality"""
- *         def __get__(self): return self._delegate.core.qual
- *         def __set__(self, qual): self._delegate.core.qual = qual             # <<<<<<<<<<<<<<
- * 
- *     property mrnm:
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4mapq_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_qual) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  uint32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2952);
-  __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_qual); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.qual = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.mapq.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4mrnm_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4mrnm_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4mrnm___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2958
- *         deprecated, use RNEXT instead.
- *         """
- *         def __get__(self): return self._delegate.core.mtid             # <<<<<<<<<<<<<<
- *         def __set__(self, mtid): self._delegate.core.mtid = mtid
- *     property rnext:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4mrnm___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2958);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mtid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __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("pysam.csamtools.AlignedRead.mrnm.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4mrnm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4mrnm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4mrnm_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_mtid));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2959
- *         """
- *         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 """
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4mrnm_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mtid) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2959);
-  __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mtid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.mtid = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.mrnm.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5rnext_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5rnext_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5rnext___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2962
- *     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:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5rnext___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2962);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mtid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __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("pysam.csamtools.AlignedRead.rnext.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5rnext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5rnext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5rnext_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_mtid));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2963
- *         """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
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5rnext_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mtid) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2963);
-  __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mtid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.mtid = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.rnext.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4mpos_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4mpos_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4mpos___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2967
- *         """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:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4mpos___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2967);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __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("pysam.csamtools.AlignedRead.mpos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4mpos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4mpos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4mpos_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_mpos));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2968
- *         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"""
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4mpos_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2968);
-  __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mpos); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.mpos = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.mpos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5pnext_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5pnext_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5pnext___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2971
- *     property pnext:
- *         """the position of the mate"""
- *         def __get__(self): return self._delegate.core.mpos             # <<<<<<<<<<<<<<
- *         def __set__(self, mpos): self._delegate.core.mpos = mpos
- *     #######################################################################
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5pnext___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2971);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2971; __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("pysam.csamtools.AlignedRead.pnext.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5pnext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5pnext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5pnext_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_mpos));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2972
- *         """the position of the mate"""
- *         def __get__(self): return self._delegate.core.mpos
- *         def __set__(self, mpos): self._delegate.core.mpos = mpos             # <<<<<<<<<<<<<<
- *     #######################################################################
- *     #######################################################################
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5pnext_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2972);
-  __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mpos); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.mpos = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.pnext.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5isize_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_5isize_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5isize___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2980
- *         """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:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5isize___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2980);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.isize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2980; __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("pysam.csamtools.AlignedRead.isize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5isize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_5isize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_5isize_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_isize));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2981
- *         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"""
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5isize_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_isize) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2981);
-  __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_isize); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.isize = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.isize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4tlen_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_4tlen_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4tlen___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2984
- *     property tlen:
- *         """the insert size"""
- *         def __get__(self): return self._delegate.core.isize             # <<<<<<<<<<<<<<
- *         def __set__(self, isize): self._delegate.core.isize = isize
- *     property is_paired:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_4tlen___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2984);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.isize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2984; __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("pysam.csamtools.AlignedRead.tlen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4tlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_4tlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_4tlen_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_isize));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2985
- *         """the insert size"""
- *         def __get__(self): return self._delegate.core.isize
- *         def __set__(self, isize): self._delegate.core.isize = isize             # <<<<<<<<<<<<<<
- *     property is_paired:
- *         """true if read is paired in sequencing"""
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_4tlen_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_isize) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int32_t __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2985);
-  __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_isize); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_delegate->core.isize = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.tlen.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_9is_paired_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_9is_paired_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_9is_paired___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2988
- *     property is_paired:
- *         """true if read is paired in sequencing"""
- *         def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FPAIRED
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_9is_paired___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2988);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->_delegate->core.flag & 1) != 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2988; __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("pysam.csamtools.AlignedRead.is_paired.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_9is_paired_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_9is_paired_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_9is_paired_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2989
- *         """true if read is paired in sequencing"""
- *         def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FPAIRED
- *             else: self._delegate.core.flag &= ~BAM_FPAIRED
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_9is_paired_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2989);
-
-  /* "pysam/csamtools.pyx":2990
- *         def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FPAIRED             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FPAIRED
- *     property is_proper_pair:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 1);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":2991
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FPAIRED
- *             else: self._delegate.core.flag &= ~BAM_FPAIRED             # <<<<<<<<<<<<<<
- *     property is_proper_pair:
- *         """true if read is mapped in a proper pair"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~1));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_paired.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_14is_proper_pair_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_14is_proper_pair_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_14is_proper_pair___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2994
- *     property is_proper_pair:
- *         """true if read is mapped in a proper pair"""
- *         def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FPROPER_PAIR
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_14is_proper_pair___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 2994);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_proper_pair.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_14is_proper_pair_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_14is_proper_pair_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_14is_proper_pair_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":2995
- *         """true if read is mapped in a proper pair"""
- *         def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FPROPER_PAIR
- *             else: self._delegate.core.flag &= ~BAM_FPROPER_PAIR
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_14is_proper_pair_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 2995);
-
-  /* "pysam/csamtools.pyx":2996
- *         def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FPROPER_PAIR             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FPROPER_PAIR
- *     property is_unmapped:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 2);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":2997
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FPROPER_PAIR
- *             else: self._delegate.core.flag &= ~BAM_FPROPER_PAIR             # <<<<<<<<<<<<<<
- *     property is_unmapped:
- *         """true if read itself is unmapped"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~2));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_proper_pair.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_11is_unmapped_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_11is_unmapped_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_11is_unmapped___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3000
- *     property is_unmapped:
- *         """true if read itself is unmapped"""
- *         def __get__(self): return (self.flag & BAM_FUNMAP) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FUNMAP
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_11is_unmapped___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3000);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_unmapped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_11is_unmapped_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_11is_unmapped_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_11is_unmapped_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3001
- *         """true if read itself is unmapped"""
- *         def __get__(self): return (self.flag & BAM_FUNMAP) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FUNMAP
- *             else: self._delegate.core.flag &= ~BAM_FUNMAP
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_11is_unmapped_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3001);
-
-  /* "pysam/csamtools.pyx":3002
- *         def __get__(self): return (self.flag & BAM_FUNMAP) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FUNMAP             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FUNMAP
- *     property mate_is_unmapped:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 4);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3003
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FUNMAP
- *             else: self._delegate.core.flag &= ~BAM_FUNMAP             # <<<<<<<<<<<<<<
- *     property mate_is_unmapped:
- *         """true if the mate is unmapped"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~4));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_unmapped.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3006
- *     property mate_is_unmapped:
- *         """true if the mate is unmapped"""
- *         def __get__(self): return (self.flag & BAM_FMUNMAP) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FMUNMAP
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3006);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.mate_is_unmapped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3007
- *         """true if the mate is unmapped"""
- *         def __get__(self): return (self.flag & BAM_FMUNMAP) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FMUNMAP
- *             else: self._delegate.core.flag &= ~BAM_FMUNMAP
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3007);
-
-  /* "pysam/csamtools.pyx":3008
- *         def __get__(self): return (self.flag & BAM_FMUNMAP) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FMUNMAP             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FMUNMAP
- *     property is_reverse:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 8);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3009
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FMUNMAP
- *             else: self._delegate.core.flag &= ~BAM_FMUNMAP             # <<<<<<<<<<<<<<
- *     property is_reverse:
- *         """true if read is mapped to reverse strand"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~8));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.mate_is_unmapped.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_10is_reverse_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_10is_reverse_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_10is_reverse___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3012
- *     property is_reverse:
- *         """true if read is mapped to reverse strand"""
- *         def __get__(self): return (self.flag & BAM_FREVERSE) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREVERSE
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_10is_reverse___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3012);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3012; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_reverse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_10is_reverse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_10is_reverse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_10is_reverse_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3013
- *         """true if read is mapped to reverse strand"""
- *         def __get__(self): return (self.flag & BAM_FREVERSE) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FREVERSE
- *             else: self._delegate.core.flag &= ~BAM_FREVERSE
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_10is_reverse_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3013);
-
-  /* "pysam/csamtools.pyx":3014
- *         def __get__(self): return (self.flag & BAM_FREVERSE) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREVERSE             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FREVERSE
- *     property mate_is_reverse:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 16);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3015
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREVERSE
- *             else: self._delegate.core.flag &= ~BAM_FREVERSE             # <<<<<<<<<<<<<<
- *     property mate_is_reverse:
- *         """true is read is mapped to reverse strand"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~16));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_reverse.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_15mate_is_reverse___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3018
- *     property mate_is_reverse:
- *         """true is read is mapped to reverse strand"""
- *         def __get__(self): return (self.flag & BAM_FMREVERSE) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FMREVERSE
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_15mate_is_reverse___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3018);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.mate_is_reverse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3019
- *         """true is read is mapped to reverse strand"""
- *         def __get__(self): return (self.flag & BAM_FMREVERSE) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FMREVERSE
- *             else: self._delegate.core.flag &= ~BAM_FMREVERSE
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3019);
-
-  /* "pysam/csamtools.pyx":3020
- *         def __get__(self): return (self.flag & BAM_FMREVERSE) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FMREVERSE             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FMREVERSE
- *     property is_read1:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 32);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3021
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FMREVERSE
- *             else: self._delegate.core.flag &= ~BAM_FMREVERSE             # <<<<<<<<<<<<<<
- *     property is_read1:
- *         """true if this is read1"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~32));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.mate_is_reverse.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read1_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read1_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read1___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3024
- *     property is_read1:
- *         """true if this is read1"""
- *         def __get__(self): return (self.flag & BAM_FREAD1) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREAD1
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read1___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3024);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_read1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read1_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3025
- *         """true if this is read1"""
- *         def __get__(self): return (self.flag & BAM_FREAD1) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FREAD1
- *             else: self._delegate.core.flag &= ~BAM_FREAD1
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read1_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3025);
-
-  /* "pysam/csamtools.pyx":3026
- *         def __get__(self): return (self.flag & BAM_FREAD1) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREAD1             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FREAD1
- *     property is_read2:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 64);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3027
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREAD1
- *             else: self._delegate.core.flag &= ~BAM_FREAD1             # <<<<<<<<<<<<<<
- *     property is_read2:
- *         """true if this is read2"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~64));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_read1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read2_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read2_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read2___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3030
- *     property is_read2:
- *         """true if this is read2"""
- *         def __get__(self): return (self.flag & BAM_FREAD2) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREAD2
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read2___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3030);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_128); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_read2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read2_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3031
- *         """true if this is read2"""
- *         def __get__(self): return (self.flag & BAM_FREAD2) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FREAD2
- *             else: self._delegate.core.flag &= ~BAM_FREAD2
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_8is_read2_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3031);
-
-  /* "pysam/csamtools.pyx":3032
- *         def __get__(self): return (self.flag & BAM_FREAD2) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREAD2             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FREAD2
- *     property is_secondary:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 128);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3033
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FREAD2
- *             else: self._delegate.core.flag &= ~BAM_FREAD2             # <<<<<<<<<<<<<<
- *     property is_secondary:
- *         """true if not primary alignment"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~128));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_read2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_12is_secondary_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_12is_secondary_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_secondary___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3036
- *     property is_secondary:
- *         """true if not primary alignment"""
- *         def __get__(self): return (self.flag & BAM_FSECONDARY) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FSECONDARY
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_12is_secondary___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3036);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_256); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3036; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_secondary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_12is_secondary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_12is_secondary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_secondary_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3037
- *         """true if not primary alignment"""
- *         def __get__(self): return (self.flag & BAM_FSECONDARY) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FSECONDARY
- *             else: self._delegate.core.flag &= ~BAM_FSECONDARY
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_secondary_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3037);
-
-  /* "pysam/csamtools.pyx":3038
- *         def __get__(self): return (self.flag & BAM_FSECONDARY) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FSECONDARY             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FSECONDARY
- *     property is_qcfail:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 256);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3039
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FSECONDARY
- *             else: self._delegate.core.flag &= ~BAM_FSECONDARY             # <<<<<<<<<<<<<<
- *     property is_qcfail:
- *         """true if QC failure"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~256));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_secondary.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_9is_qcfail_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_9is_qcfail_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_9is_qcfail___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3042
- *     property is_qcfail:
- *         """true if QC failure"""
- *         def __get__(self): return (self.flag & BAM_FQCFAIL) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FQCFAIL
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_9is_qcfail___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3042);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_512); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_qcfail.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_9is_qcfail_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_9is_qcfail_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_9is_qcfail_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3043
- *         """true if QC failure"""
- *         def __get__(self): return (self.flag & BAM_FQCFAIL) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FQCFAIL
- *             else: self._delegate.core.flag &= ~BAM_FQCFAIL
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_9is_qcfail_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3043);
-
-  /* "pysam/csamtools.pyx":3044
- *         def __get__(self): return (self.flag & BAM_FQCFAIL) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FQCFAIL             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FQCFAIL
- *     property is_duplicate:
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 512);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3045
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FQCFAIL
- *             else: self._delegate.core.flag &= ~BAM_FQCFAIL             # <<<<<<<<<<<<<<
- *     property is_duplicate:
- *         """true if optical or PCR duplicate"""
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~512));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_qcfail.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_12is_duplicate_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_12is_duplicate_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_duplicate___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3048
- *     property is_duplicate:
- *         """true if optical or PCR duplicate"""
- *         def __get__(self): return (self.flag & BAM_FDUP) != 0             # <<<<<<<<<<<<<<
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FDUP
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_12is_duplicate___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3048);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_1024); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __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_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_duplicate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_12is_duplicate_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11AlignedRead_12is_duplicate_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_duplicate_2__set__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_val));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3049
- *         """true if optical or PCR duplicate"""
- *         def __get__(self): return (self.flag & BAM_FDUP) != 0
- *         def __set__(self,val):             # <<<<<<<<<<<<<<
- *             if val: self._delegate.core.flag |= BAM_FDUP
- *             else: self._delegate.core.flag &= ~BAM_FDUP
- */
-
-static int __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_duplicate_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3049);
-
-  /* "pysam/csamtools.pyx":3050
- *         def __get__(self): return (self.flag & BAM_FDUP) != 0
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FDUP             # <<<<<<<<<<<<<<
- *             else: self._delegate.core.flag &= ~BAM_FDUP
- * 
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 1024);
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3051
- *         def __set__(self,val):
- *             if val: self._delegate.core.flag |= BAM_FDUP
- *             else: self._delegate.core.flag &= ~BAM_FDUP             # <<<<<<<<<<<<<<
- * 
- *     #######################################################################
- */
-    __pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~1024));
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.is_duplicate.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_9positions_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_9positions_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_9positions___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3059
- *     property positions:
- *         """a list of reference positions that this read aligns to."""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef uint32_t k, i, pos
- *             cdef int op
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_9positions___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  uint32_t __pyx_v_k;
-  uint32_t __pyx_v_i;
-  uint32_t __pyx_v_pos;
-  int __pyx_v_op;
-  uint32_t *__pyx_v_cigar_p;
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_v_result = NULL;
-  PyObject *__pyx_v_l = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  int32_t __pyx_t_4;
-  uint32_t __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
-  uint32_t __pyx_t_7;
-  int __pyx_t_8;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3059);
-
-  /* "pysam/csamtools.pyx":3065
- *             cdef bam1_t * src
- * 
- *             src = self._delegate             # <<<<<<<<<<<<<<
- *             if src.core.n_cigar == 0: return []
- * 
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":3066
- * 
- *             src = self._delegate
- *             if src.core.n_cigar == 0: return []             # <<<<<<<<<<<<<<
- * 
- *             result = []
- */
-  __pyx_t_2 = (__pyx_v_src->core.n_cigar == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_r = ((PyObject *)__pyx_t_3);
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":3068
- *             if src.core.n_cigar == 0: return []
- * 
- *             result = []             # <<<<<<<<<<<<<<
- *             pos = src.core.pos
- *             cigar_p = bam1_cigar(src)
- */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_v_result = ((PyObject*)__pyx_t_3);
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":3069
- * 
- *             result = []
- *             pos = src.core.pos             # <<<<<<<<<<<<<<
- *             cigar_p = bam1_cigar(src)
- * 
- */
-  __pyx_t_4 = __pyx_v_src->core.pos;
-  __pyx_v_pos = __pyx_t_4;
-
-  /* "pysam/csamtools.pyx":3070
- *             result = []
- *             pos = src.core.pos
- *             cigar_p = bam1_cigar(src)             # <<<<<<<<<<<<<<
- * 
- *             for k from 0 <= k < src.core.n_cigar:
- */
-  __pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":3072
- *             cigar_p = bam1_cigar(src)
- * 
- *             for k from 0 <= k < src.core.n_cigar:             # <<<<<<<<<<<<<<
- *                 op = cigar_p[k] & BAM_CIGAR_MASK
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
- */
-  __pyx_t_5 = __pyx_v_src->core.n_cigar;
-  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
-
-    /* "pysam/csamtools.pyx":3073
- * 
- *             for k from 0 <= k < src.core.n_cigar:
- *                 op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
- *                 if op == BAM_CMATCH:
- */
-    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
-
-    /* "pysam/csamtools.pyx":3074
- *             for k from 0 <= k < src.core.n_cigar:
- *                 op = cigar_p[k] & BAM_CIGAR_MASK
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
- *                 if op == BAM_CMATCH:
- *                     for i from pos <= i < pos + l:
- */
-    __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_XDECREF(__pyx_v_l);
-    __pyx_v_l = __pyx_t_3;
-    __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":3075
- *                 op = cigar_p[k] & BAM_CIGAR_MASK
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
- *                 if op == BAM_CMATCH:             # <<<<<<<<<<<<<<
- *                     for i from pos <= i < pos + l:
- *                         result.append( i )
- */
-    __pyx_t_2 = (__pyx_v_op == 0);
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":3076
- *                 l = cigar_p[k] >> BAM_CIGAR_SHIFT
- *                 if op == BAM_CMATCH:
- *                     for i from pos <= i < pos + l:             # <<<<<<<<<<<<<<
- *                         result.append( i )
- * 
- */
-      __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
-
-        /* "pysam/csamtools.pyx":3077
- *                 if op == BAM_CMATCH:
- *                     for i from pos <= i < pos + l:
- *                         result.append( i )             # <<<<<<<<<<<<<<
- * 
- *                 if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
- */
-        __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_8 = PyList_Append(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      }
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-
-    /* "pysam/csamtools.pyx":3079
- *                         result.append( i )
- * 
- *                 if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:             # <<<<<<<<<<<<<<
- *                     pos += l
- * 
- */
-    switch (__pyx_v_op) {
-      case 0:
-      case 2:
-      case 3:
-
-      /* "pysam/csamtools.pyx":3080
- * 
- *                 if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
- *                     pos += l             # <<<<<<<<<<<<<<
- * 
- *             return result
- */
-      __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_v_pos = __pyx_t_7;
-      break;
-    }
-  }
-
-  /* "pysam/csamtools.pyx":3082
- *                     pos += l
- * 
- *             return result             # <<<<<<<<<<<<<<
- * 
- *     property inferred_length:
- */
-  __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_3);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.positions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_result);
-  __Pyx_XDECREF(__pyx_v_l);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_15inferred_length_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_15inferred_length_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_15inferred_length___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3089
- *         Returns 0 if CIGAR string is not present.
- *         """
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *            cdef uint32_t k, qpos
- *            cdef int op
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_15inferred_length___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  uint32_t __pyx_v_k;
-  uint32_t __pyx_v_qpos;
-  int __pyx_v_op;
-  uint32_t *__pyx_v_cigar_p;
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  uint32_t __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3089);
-
-  /* "pysam/csamtools.pyx":3095
- *            cdef bam1_t * src
- * 
- *            src = self._delegate             # <<<<<<<<<<<<<<
- *            if src.core.n_cigar == 0: return 0
- * 
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":3096
- * 
- *            src = self._delegate
- *            if src.core.n_cigar == 0: return 0             # <<<<<<<<<<<<<<
- * 
- *            qpos = 0
- */
-  __pyx_t_2 = (__pyx_v_src->core.n_cigar == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_int_0);
-    __pyx_r = __pyx_int_0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":3098
- *            if src.core.n_cigar == 0: return 0
- * 
- *            qpos = 0             # <<<<<<<<<<<<<<
- *            cigar_p = bam1_cigar(src)
- * 
- */
-  __pyx_v_qpos = 0;
-
-  /* "pysam/csamtools.pyx":3099
- * 
- *            qpos = 0
- *            cigar_p = bam1_cigar(src)             # <<<<<<<<<<<<<<
- * 
- *            for k from 0 <= k < src.core.n_cigar:
- */
-  __pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":3101
- *            cigar_p = bam1_cigar(src)
- * 
- *            for k from 0 <= k < src.core.n_cigar:             # <<<<<<<<<<<<<<
- *                op = cigar_p[k] & BAM_CIGAR_MASK
- * 
- */
-  __pyx_t_3 = __pyx_v_src->core.n_cigar;
-  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {
-
-    /* "pysam/csamtools.pyx":3102
- * 
- *            for k from 0 <= k < src.core.n_cigar:
- *                op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
- * 
- *                if op == BAM_CMATCH or op == BAM_CINS or op == BAM_CSOFT_CLIP:
- */
-    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
-
-    /* "pysam/csamtools.pyx":3104
- *                op = cigar_p[k] & BAM_CIGAR_MASK
- * 
- *                if op == BAM_CMATCH or op == BAM_CINS or op == BAM_CSOFT_CLIP:             # <<<<<<<<<<<<<<
- *                    qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
- * 
- */
-    switch (__pyx_v_op) {
-      case 0:
-      case 1:
-      case 4:
-
-      /* "pysam/csamtools.pyx":3105
- * 
- *                if op == BAM_CMATCH or op == BAM_CINS or op == BAM_CSOFT_CLIP:
- *                    qpos += cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
- * 
- *            return qpos
- */
-      __pyx_v_qpos = (__pyx_v_qpos + ((__pyx_v_cigar_p[__pyx_v_k]) >> 4));
-      break;
-    }
-  }
-
-  /* "pysam/csamtools.pyx":3107
- *                    qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
- * 
- *            return qpos             # <<<<<<<<<<<<<<
- * 
- * 
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_4 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_r = __pyx_t_4;
-  __pyx_t_4 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.inferred_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_13aligned_pairs_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_13aligned_pairs_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_13aligned_pairs___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3115
- *        Unaligned position are marked by None.
- *        """
- *        def __get__(self):             # <<<<<<<<<<<<<<
- *            cdef uint32_t k, i, pos, qpos
- *            cdef int op
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_13aligned_pairs___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  uint32_t __pyx_v_k;
-  uint32_t __pyx_v_i;
-  uint32_t __pyx_v_pos;
-  uint32_t __pyx_v_qpos;
-  int __pyx_v_op;
-  uint32_t *__pyx_v_cigar_p;
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_v_result = NULL;
-  PyObject *__pyx_v_l = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  int32_t __pyx_t_4;
-  uint32_t __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
-  uint32_t __pyx_t_7;
-  PyObject *__pyx_t_8 = NULL;
-  int __pyx_t_9;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3115);
-
-  /* "pysam/csamtools.pyx":3121
- *            cdef bam1_t * src
- * 
- *            src = self._delegate             # <<<<<<<<<<<<<<
- *            if src.core.n_cigar == 0: return []
- * 
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":3122
- * 
- *            src = self._delegate
- *            if src.core.n_cigar == 0: return []             # <<<<<<<<<<<<<<
- * 
- *            result = []
- */
-  __pyx_t_2 = (__pyx_v_src->core.n_cigar == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_r = ((PyObject *)__pyx_t_3);
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":3124
- *            if src.core.n_cigar == 0: return []
- * 
- *            result = []             # <<<<<<<<<<<<<<
- *            pos = src.core.pos
- *            qpos = 0
- */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_v_result = ((PyObject*)__pyx_t_3);
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":3125
- * 
- *            result = []
- *            pos = src.core.pos             # <<<<<<<<<<<<<<
- *            qpos = 0
- *            cigar_p = bam1_cigar(src)
- */
-  __pyx_t_4 = __pyx_v_src->core.pos;
-  __pyx_v_pos = __pyx_t_4;
-
-  /* "pysam/csamtools.pyx":3126
- *            result = []
- *            pos = src.core.pos
- *            qpos = 0             # <<<<<<<<<<<<<<
- *            cigar_p = bam1_cigar(src)
- * 
- */
-  __pyx_v_qpos = 0;
-
-  /* "pysam/csamtools.pyx":3127
- *            pos = src.core.pos
- *            qpos = 0
- *            cigar_p = bam1_cigar(src)             # <<<<<<<<<<<<<<
- * 
- *            for k from 0 <= k < src.core.n_cigar:
- */
-  __pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":3129
- *            cigar_p = bam1_cigar(src)
- * 
- *            for k from 0 <= k < src.core.n_cigar:             # <<<<<<<<<<<<<<
- *                op = cigar_p[k] & BAM_CIGAR_MASK
- *                l = cigar_p[k] >> BAM_CIGAR_SHIFT
- */
-  __pyx_t_5 = __pyx_v_src->core.n_cigar;
-  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
-
-    /* "pysam/csamtools.pyx":3130
- * 
- *            for k from 0 <= k < src.core.n_cigar:
- *                op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
- *                l = cigar_p[k] >> BAM_CIGAR_SHIFT
- * 
- */
-    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
-
-    /* "pysam/csamtools.pyx":3131
- *            for k from 0 <= k < src.core.n_cigar:
- *                op = cigar_p[k] & BAM_CIGAR_MASK
- *                l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
- * 
- *                if op == BAM_CMATCH:
- */
-    __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_XDECREF(__pyx_v_l);
-    __pyx_v_l = __pyx_t_3;
-    __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":3144
- *                        qpos += 1
- * 
- *                elif op == BAM_CDEL or op == BAM_CREF_SKIP:             # <<<<<<<<<<<<<<
- *                    for i from pos <= i < pos + l:
- *                        result.append( (None, i) )
- */
-    switch (__pyx_v_op) {
-
-      /* "pysam/csamtools.pyx":3133
- *                l = cigar_p[k] >> BAM_CIGAR_SHIFT
- * 
- *                if op == BAM_CMATCH:             # <<<<<<<<<<<<<<
- *                    for i from pos <= i < pos + l:
- *                        result.append( (qpos, i) )
- */
-      case 0:
-
-      /* "pysam/csamtools.pyx":3134
- * 
- *                if op == BAM_CMATCH:
- *                    for i from pos <= i < pos + l:             # <<<<<<<<<<<<<<
- *                        result.append( (qpos, i) )
- *                        qpos += 1
- */
-      __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
-
-        /* "pysam/csamtools.pyx":3135
- *                if op == BAM_CMATCH:
- *                    for i from pos <= i < pos + l:
- *                        result.append( (qpos, i) )             # <<<<<<<<<<<<<<
- *                        qpos += 1
- *                    pos += l
- */
-        __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
-        __Pyx_GIVEREF(__pyx_t_6);
-        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
-        __Pyx_GIVEREF(__pyx_t_3);
-        __pyx_t_6 = 0;
-        __pyx_t_3 = 0;
-        __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-
-        /* "pysam/csamtools.pyx":3136
- *                    for i from pos <= i < pos + l:
- *                        result.append( (qpos, i) )
- *                        qpos += 1             # <<<<<<<<<<<<<<
- *                    pos += l
- * 
- */
-        __pyx_v_qpos = (__pyx_v_qpos + 1);
-      }
-
-      /* "pysam/csamtools.pyx":3137
- *                        result.append( (qpos, i) )
- *                        qpos += 1
- *                    pos += l             # <<<<<<<<<<<<<<
- * 
- *                elif op == BAM_CINS:
- */
-      __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_v_pos = __pyx_t_7;
-      break;
-
-      /* "pysam/csamtools.pyx":3139
- *                    pos += l
- * 
- *                elif op == BAM_CINS:             # <<<<<<<<<<<<<<
- *                    for i from pos <= i < pos + l:
- *                        result.append( (qpos, None) )
- */
-      case 1:
-
-      /* "pysam/csamtools.pyx":3140
- * 
- *                elif op == BAM_CINS:
- *                    for i from pos <= i < pos + l:             # <<<<<<<<<<<<<<
- *                        result.append( (qpos, None) )
- *                        qpos += 1
- */
-      __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
-
-        /* "pysam/csamtools.pyx":3141
- *                elif op == BAM_CINS:
- *                    for i from pos <= i < pos + l:
- *                        result.append( (qpos, None) )             # <<<<<<<<<<<<<<
- *                        qpos += 1
- * 
- */
-        __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
-        __Pyx_GIVEREF(__pyx_t_8);
-        __Pyx_INCREF(Py_None);
-        PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
-        __Pyx_GIVEREF(Py_None);
-        __pyx_t_8 = 0;
-        __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-
-        /* "pysam/csamtools.pyx":3142
- *                    for i from pos <= i < pos + l:
- *                        result.append( (qpos, None) )
- *                        qpos += 1             # <<<<<<<<<<<<<<
- * 
- *                elif op == BAM_CDEL or op == BAM_CREF_SKIP:
- */
-        __pyx_v_qpos = (__pyx_v_qpos + 1);
-      }
-      break;
-
-      /* "pysam/csamtools.pyx":3144
- *                        qpos += 1
- * 
- *                elif op == BAM_CDEL or op == BAM_CREF_SKIP:             # <<<<<<<<<<<<<<
- *                    for i from pos <= i < pos + l:
- *                        result.append( (None, i) )
- */
-      case 2:
-      case 3:
-
-      /* "pysam/csamtools.pyx":3145
- * 
- *                elif op == BAM_CDEL or op == BAM_CREF_SKIP:
- *                    for i from pos <= i < pos + l:             # <<<<<<<<<<<<<<
- *                        result.append( (None, i) )
- *                    pos += l
- */
-      __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
-
-        /* "pysam/csamtools.pyx":3146
- *                elif op == BAM_CDEL or op == BAM_CREF_SKIP:
- *                    for i from pos <= i < pos + l:
- *                        result.append( (None, i) )             # <<<<<<<<<<<<<<
- *                    pos += l
- * 
- */
-        __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_INCREF(Py_None);
-        PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
-        __Pyx_GIVEREF(Py_None);
-        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
-        __Pyx_GIVEREF(__pyx_t_8);
-        __pyx_t_8 = 0;
-        __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-      }
-
-      /* "pysam/csamtools.pyx":3147
- *                    for i from pos <= i < pos + l:
- *                        result.append( (None, i) )
- *                    pos += l             # <<<<<<<<<<<<<<
- * 
- *            return result
- */
-      __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_v_pos = __pyx_t_7;
-      break;
-    }
-  }
-
-  /* "pysam/csamtools.pyx":3149
- *                    pos += l
- * 
- *            return result             # <<<<<<<<<<<<<<
- * 
- *     #######################################################################
- */
-  __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_3);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.aligned_pairs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_result);
-  __Pyx_XDECREF(__pyx_v_l);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_11overlap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11AlignedRead_10overlap[] = "AlignedRead.overlap(self, uint32_t start, uint32_t end)\nreturn number of aligned bases of read overlapping the interval *start* and *end*\n        on the reference sequence.\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_11overlap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  uint32_t __pyx_v_start;
-  uint32_t __pyx_v_end;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("overlap (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__end,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("overlap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlap") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-    }
-    __pyx_v_start = __Pyx_PyInt_from_py_uint32_t(values[0]); if (unlikely((__pyx_v_start == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_end = __Pyx_PyInt_from_py_uint32_t(values[1]); if (unlikely((__pyx_v_end == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("overlap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.overlap", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_10overlap(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), __pyx_v_start, __pyx_v_end);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3155
- *     ##
- *     #######################################################################
- *     def overlap( self, uint32_t start, uint32_t end ):             # <<<<<<<<<<<<<<
- *         """return number of aligned bases of read overlapping the interval *start* and *end*
- *         on the reference sequence.
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_10overlap(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, uint32_t __pyx_v_start, uint32_t __pyx_v_end) {
-  uint32_t __pyx_v_k;
-  uint32_t __pyx_v_pos;
-  uint32_t __pyx_v_overlap;
-  int __pyx_v_op;
-  int __pyx_v_o;
-  uint32_t *__pyx_v_cigar_p;
-  bam1_t *__pyx_v_src;
-  PyObject *__pyx_v_l = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  bam1_t *__pyx_t_1;
-  int __pyx_t_2;
-  int32_t __pyx_t_3;
-  uint32_t __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  uint32_t __pyx_t_6;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  uint32_t __pyx_t_10;
-  uint32_t __pyx_t_11;
-  int __pyx_t_12;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("overlap", 0);
-  __Pyx_TraceCall("overlap", __pyx_f[0], 3155);
-
-  /* "pysam/csamtools.pyx":3164
- *         cdef bam1_t * src
- * 
- *         overlap = 0             # <<<<<<<<<<<<<<
- * 
- *         src = self._delegate
- */
-  __pyx_v_overlap = 0;
-
-  /* "pysam/csamtools.pyx":3166
- *         overlap = 0
- * 
- *         src = self._delegate             # <<<<<<<<<<<<<<
- *         if src.core.n_cigar == 0: return 0
- *         pos = src.core.pos
- */
-  __pyx_t_1 = __pyx_v_self->_delegate;
-  __pyx_v_src = __pyx_t_1;
-
-  /* "pysam/csamtools.pyx":3167
- * 
- *         src = self._delegate
- *         if src.core.n_cigar == 0: return 0             # <<<<<<<<<<<<<<
- *         pos = src.core.pos
- *         o = 0
- */
-  __pyx_t_2 = (__pyx_v_src->core.n_cigar == 0);
-  if (__pyx_t_2) {
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_int_0);
-    __pyx_r = __pyx_int_0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":3168
- *         src = self._delegate
- *         if src.core.n_cigar == 0: return 0
- *         pos = src.core.pos             # <<<<<<<<<<<<<<
- *         o = 0
- * 
- */
-  __pyx_t_3 = __pyx_v_src->core.pos;
-  __pyx_v_pos = __pyx_t_3;
-
-  /* "pysam/csamtools.pyx":3169
- *         if src.core.n_cigar == 0: return 0
- *         pos = src.core.pos
- *         o = 0             # <<<<<<<<<<<<<<
- * 
- *         cigar_p = bam1_cigar(src)
- */
-  __pyx_v_o = 0;
-
-  /* "pysam/csamtools.pyx":3171
- *         o = 0
- * 
- *         cigar_p = bam1_cigar(src)             # <<<<<<<<<<<<<<
- *         for k from 0 <= k < src.core.n_cigar:
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- */
-  __pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
-
-  /* "pysam/csamtools.pyx":3172
- * 
- *         cigar_p = bam1_cigar(src)
- *         for k from 0 <= k < src.core.n_cigar:             # <<<<<<<<<<<<<<
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- *             l = cigar_p[k] >> BAM_CIGAR_SHIFT
- */
-  __pyx_t_4 = __pyx_v_src->core.n_cigar;
-  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
-
-    /* "pysam/csamtools.pyx":3173
- *         cigar_p = bam1_cigar(src)
- *         for k from 0 <= k < src.core.n_cigar:
- *             op = cigar_p[k] & BAM_CIGAR_MASK             # <<<<<<<<<<<<<<
- *             l = cigar_p[k] >> BAM_CIGAR_SHIFT
- * 
- */
-    __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
-
-    /* "pysam/csamtools.pyx":3174
- *         for k from 0 <= k < src.core.n_cigar:
- *             op = cigar_p[k] & BAM_CIGAR_MASK
- *             l = cigar_p[k] >> BAM_CIGAR_SHIFT             # <<<<<<<<<<<<<<
- * 
- *             if op == BAM_CMATCH:
- */
-    __pyx_t_5 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_XDECREF(__pyx_v_l);
-    __pyx_v_l = __pyx_t_5;
-    __pyx_t_5 = 0;
-
-    /* "pysam/csamtools.pyx":3176
- *             l = cigar_p[k] >> BAM_CIGAR_SHIFT
- * 
- *             if op == BAM_CMATCH:             # <<<<<<<<<<<<<<
- *                 o = min( pos + l, end) - max( pos, start )
- *                 if o > 0: overlap += o
- */
-    __pyx_t_2 = (__pyx_v_op == 0);
-    if (__pyx_t_2) {
-
-      /* "pysam/csamtools.pyx":3177
- * 
- *             if op == BAM_CMATCH:
- *                 o = min( pos + l, end) - max( pos, start )             # <<<<<<<<<<<<<<
- *                 if o > 0: overlap += o
- * 
- */
-      __pyx_t_6 = __pyx_v_end;
-      __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v_l); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      if (__pyx_t_2) {
-        __pyx_t_9 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_5 = __pyx_t_9;
-        __pyx_t_9 = 0;
-      } else {
-        __Pyx_INCREF(__pyx_t_7);
-        __pyx_t_5 = __pyx_t_7;
-      }
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_6 = __pyx_v_start;
-      __pyx_t_10 = __pyx_v_pos;
-      if ((__pyx_t_6 > __pyx_t_10)) {
-        __pyx_t_11 = __pyx_t_6;
-      } else {
-        __pyx_t_11 = __pyx_t_10;
-      }
-      __pyx_t_7 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_9 = PyNumber_Subtract(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_v_o = __pyx_t_12;
-
-      /* "pysam/csamtools.pyx":3178
- *             if op == BAM_CMATCH:
- *                 o = min( pos + l, end) - max( pos, start )
- *                 if o > 0: overlap += o             # <<<<<<<<<<<<<<
- * 
- *             if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
- */
-      __pyx_t_2 = (__pyx_v_o > 0);
-      if (__pyx_t_2) {
-        __pyx_v_overlap = (__pyx_v_overlap + __pyx_v_o);
-        goto __pyx_L7;
-      }
-      __pyx_L7:;
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-
-    /* "pysam/csamtools.pyx":3180
- *                 if o > 0: overlap += o
- * 
- *             if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:             # <<<<<<<<<<<<<<
- *                 pos += l
- * 
- */
-    switch (__pyx_v_op) {
-      case 0:
-      case 2:
-      case 3:
-
-      /* "pysam/csamtools.pyx":3181
- * 
- *             if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
- *                 pos += l             # <<<<<<<<<<<<<<
- * 
- *         return overlap
- */
-      __pyx_t_9 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_v_l); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_11 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_7); if (unlikely((__pyx_t_11 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_v_pos = __pyx_t_11;
-      break;
-    }
-  }
-
-  /* "pysam/csamtools.pyx":3183
- *                 pos += l
- * 
- *         return overlap             # <<<<<<<<<<<<<<
- * 
- *     def opt(self, tag):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_7 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_overlap); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __pyx_r = __pyx_t_7;
-  __pyx_t_7 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.overlap", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_l);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_13opt(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11AlignedRead_12opt[] = "AlignedRead.opt(self, tag)\nretrieves optional data given a two-letter *tag*";
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_13opt(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("opt (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_12opt(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3185
- *         return overlap
- * 
- *     def opt(self, tag):             # <<<<<<<<<<<<<<
- *         """retrieves optional data given a two-letter *tag*"""
- *         #see bam_aux.c: bam_aux_get() and bam_aux2i() etc
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_12opt(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tag) {
-  uint8_t *__pyx_v_v;
-  CYTHON_UNUSED int __pyx_v_nvalues;
-  PyObject *__pyx_v_btag = NULL;
-  PyObject *__pyx_v_auxtype = NULL;
-  CYTHON_UNUSED PyObject *__pyx_v_bytesize = NULL;
-  PyObject *__pyx_v_values = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  char *__pyx_t_2;
-  int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_t_5;
-  int __pyx_t_6;
-  int __pyx_t_7;
-  int __pyx_t_8;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
-  PyObject *(*__pyx_t_12)(PyObject *);
-  int __pyx_t_13;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("opt", 0);
-  __Pyx_TraceCall("opt", __pyx_f[0], 3185);
-
-  /* "pysam/csamtools.pyx":3190
- *         cdef uint8_t * v
- *         cdef int nvalues
- *         btag = _force_bytes(tag)             # <<<<<<<<<<<<<<
- *         v = bam_aux_get(self._delegate, btag)
- *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )
- */
-  __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_tag)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_btag = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3191
- *         cdef int nvalues
- *         btag = _force_bytes(tag)
- *         v = bam_aux_get(self._delegate, btag)             # <<<<<<<<<<<<<<
- *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )
- *         auxtype = chr(v[0])
- */
-  __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_btag)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_v = bam_aux_get(__pyx_v_self->_delegate, __pyx_t_2);
-
-  /* "pysam/csamtools.pyx":3192
- *         btag = _force_bytes(tag)
- *         v = bam_aux_get(self._delegate, btag)
- *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )             # <<<<<<<<<<<<<<
- *         auxtype = chr(v[0])
- *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
- */
-  __pyx_t_3 = (__pyx_v_v == NULL);
-  if (__pyx_t_3) {
-    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_159), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __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 = 3192; __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_KeyError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":3193
- *         v = bam_aux_get(self._delegate, btag)
- *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )
- *         auxtype = chr(v[0])             # <<<<<<<<<<<<<<
- *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
- *             return <int>bam_aux2i(v)
- */
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t((__pyx_v_v[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __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 = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_builtin_chr, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-  __pyx_v_auxtype = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3194
- *         if v == NULL: raise KeyError( "tag '%s' not present" % tag )
- *         auxtype = chr(v[0])
- *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':             # <<<<<<<<<<<<<<
- *             return <int>bam_aux2i(v)
- *         elif auxtype == 'i' or auxtype == 'I':
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__c), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __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 = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!__pyx_t_3) {
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__C), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (!__pyx_t_5) {
-      __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__s), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      if (!__pyx_t_6) {
-        __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__S), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_8 = __pyx_t_7;
-      } else {
-        __pyx_t_8 = __pyx_t_6;
-      }
-      __pyx_t_6 = __pyx_t_8;
-    } else {
-      __pyx_t_6 = __pyx_t_5;
-    }
-    __pyx_t_5 = __pyx_t_6;
-  } else {
-    __pyx_t_5 = __pyx_t_3;
-  }
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":3195
- *         auxtype = chr(v[0])
- *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
- *             return <int>bam_aux2i(v)             # <<<<<<<<<<<<<<
- *         elif auxtype == 'i' or auxtype == 'I':
- *             return <int32_t>bam_aux2i(v)
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-
-  /* "pysam/csamtools.pyx":3196
- *         if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
- *             return <int>bam_aux2i(v)
- *         elif auxtype == 'i' or auxtype == 'I':             # <<<<<<<<<<<<<<
- *             return <int32_t>bam_aux2i(v)
- *         elif auxtype == 'f' or auxtype == 'F':
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__i), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!__pyx_t_5) {
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__I), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3196; __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 = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_6 = __pyx_t_3;
-  } else {
-    __pyx_t_6 = __pyx_t_5;
-  }
-  if (__pyx_t_6) {
-
-    /* "pysam/csamtools.pyx":3197
- *             return <int>bam_aux2i(v)
- *         elif auxtype == 'i' or auxtype == 'I':
- *             return <int32_t>bam_aux2i(v)             # <<<<<<<<<<<<<<
- *         elif auxtype == 'f' or auxtype == 'F':
- *             return <float>bam_aux2f(v)
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(((int32_t)bam_aux2i(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-
-  /* "pysam/csamtools.pyx":3198
- *         elif auxtype == 'i' or auxtype == 'I':
- *             return <int32_t>bam_aux2i(v)
- *         elif auxtype == 'f' or auxtype == 'F':             # <<<<<<<<<<<<<<
- *             return <float>bam_aux2f(v)
- *         elif auxtype == 'd' or auxtype == 'D':
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__f), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!__pyx_t_6) {
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__F), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = __pyx_t_5;
-  } else {
-    __pyx_t_3 = __pyx_t_6;
-  }
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":3199
- *             return <int32_t>bam_aux2i(v)
- *         elif auxtype == 'f' or auxtype == 'F':
- *             return <float>bam_aux2f(v)             # <<<<<<<<<<<<<<
- *         elif auxtype == 'd' or auxtype == 'D':
- *             return <double>bam_aux2d(v)
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyFloat_FromDouble(((float)bam_aux2f(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-
-  /* "pysam/csamtools.pyx":3200
- *         elif auxtype == 'f' or auxtype == 'F':
- *             return <float>bam_aux2f(v)
- *         elif auxtype == 'd' or auxtype == 'D':             # <<<<<<<<<<<<<<
- *             return <double>bam_aux2d(v)
- *         elif auxtype == 'A':
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__d), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __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 = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!__pyx_t_3) {
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__D), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_5 = __pyx_t_6;
-  } else {
-    __pyx_t_5 = __pyx_t_3;
-  }
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":3201
- *             return <float>bam_aux2f(v)
- *         elif auxtype == 'd' or auxtype == 'D':
- *             return <double>bam_aux2d(v)             # <<<<<<<<<<<<<<
- *         elif auxtype == 'A':
- *             # there might a more efficient way
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyFloat_FromDouble(((double)bam_aux2d(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-
-  /* "pysam/csamtools.pyx":3202
- *         elif auxtype == 'd' or auxtype == 'D':
- *             return <double>bam_aux2d(v)
- *         elif auxtype == 'A':             # <<<<<<<<<<<<<<
- *             # there might a more efficient way
- *             # to convert a char into a string
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__A), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":3205
- *             # there might a more efficient way
- *             # to convert a char into a string
- *             return '%c' % <char>bam_aux2A(v)             # <<<<<<<<<<<<<<
- *         elif auxtype == 'Z':
- *             return _charptr_to_str(<char*>bam_aux2Z(v))
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyInt_FromLong(((char)bam_aux2A(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_148), __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_r = ((PyObject *)__pyx_t_4);
-    __pyx_t_4 = 0;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-
-  /* "pysam/csamtools.pyx":3206
- *             # to convert a char into a string
- *             return '%c' % <char>bam_aux2A(v)
- *         elif auxtype == 'Z':             # <<<<<<<<<<<<<<
- *             return _charptr_to_str(<char*>bam_aux2Z(v))
- *         elif auxtype == 'B':
- */
-  __pyx_t_4 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__Z), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":3207
- *             return '%c' % <char>bam_aux2A(v)
- *         elif auxtype == 'Z':
- *             return _charptr_to_str(<char*>bam_aux2Z(v))             # <<<<<<<<<<<<<<
- *         elif auxtype == 'B':
- *             bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_4 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam_aux2Z(__pyx_v_v))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_r = __pyx_t_4;
-    __pyx_t_4 = 0;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-
-  /* "pysam/csamtools.pyx":3208
- *         elif auxtype == 'Z':
- *             return _charptr_to_str(<char*>bam_aux2Z(v))
- *         elif auxtype == 'B':             # <<<<<<<<<<<<<<
- *             bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
- *             return values
- */
-  __pyx_t_4 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__B), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":3209
- *             return _charptr_to_str(<char*>bam_aux2Z(v))
- *         elif auxtype == 'B':
- *             bytesize, nvalues, values = convertBinaryTagToList( v + 1 )             # <<<<<<<<<<<<<<
- *             return values
- *         else:
- */
-    __pyx_t_4 = __pyx_f_5pysam_9csamtools_convertBinaryTagToList((__pyx_v_v + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
-      PyObject* sequence = __pyx_t_4;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      Py_ssize_t size = Py_SIZE(sequence);
-      #else
-      Py_ssize_t size = PySequence_Size(sequence);
-      #endif
-      if (unlikely(size != 3)) {
-        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
-        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #if CYTHON_COMPILING_IN_CPYTHON
-      if (likely(PyTuple_CheckExact(sequence))) {
-        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
-        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
-        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 2); 
-      } else {
-        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
-        __pyx_t_10 = PyList_GET_ITEM(sequence, 2); 
-      }
-      __Pyx_INCREF(__pyx_t_1);
-      __Pyx_INCREF(__pyx_t_9);
-      __Pyx_INCREF(__pyx_t_10);
-      #else
-      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      #endif
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    } else
-    {
-      Py_ssize_t index = -1;
-      __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
-      index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_1);
-      index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L5_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_9);
-      index = 2; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L5_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_10);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_12 = NULL;
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      goto __pyx_L6_unpacking_done;
-      __pyx_L5_unpacking_failed:;
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __pyx_t_12 = NULL;
-      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L6_unpacking_done:;
-    }
-    __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_v_bytesize = __pyx_t_1;
-    __pyx_t_1 = 0;
-    __pyx_v_nvalues = __pyx_t_13;
-    __pyx_v_values = __pyx_t_10;
-    __pyx_t_10 = 0;
-
-    /* "pysam/csamtools.pyx":3210
- *         elif auxtype == 'B':
- *             bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
- *             return values             # <<<<<<<<<<<<<<
- *         else:
- *             raise ValueError("unknown auxilliary type '%s'" % auxtype)
- */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_v_values);
-    __pyx_r = __pyx_v_values;
-    goto __pyx_L0;
-    goto __pyx_L4;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3212
- *             return values
- *         else:
- *             raise ValueError("unknown auxilliary type '%s'" % auxtype)             # <<<<<<<<<<<<<<
- * 
- * 
- */
-    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_160), __pyx_v_auxtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    PyTuple_SET_ITEM(__pyx_t_10, 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_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L4:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.opt", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_btag);
-  __Pyx_XDECREF(__pyx_v_auxtype);
-  __Pyx_XDECREF(__pyx_v_bytesize);
-  __Pyx_XDECREF(__pyx_v_values);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_15fancy_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_11AlignedRead_14fancy_str[] = "AlignedRead.fancy_str(self)\nreturns list of fieldnames/values in pretty format for debugging\n        ";
-static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_15fancy_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("fancy_str (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_14fancy_str(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3215
- * 
- * 
- *     def fancy_str (self):             # <<<<<<<<<<<<<<
- *         """returns list of fieldnames/values in pretty format for debugging
- *         """
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_14fancy_str(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
-  PyObject *__pyx_v_ret_string = NULL;
-  PyObject *__pyx_v_field_names = NULL;
-  PyObject *__pyx_v_fields_names_in_order = NULL;
-  PyObject *__pyx_v_f = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  Py_ssize_t __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  int __pyx_t_10;
-  PyObject *(*__pyx_t_11)(PyObject *);
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("fancy_str", 0);
-  __Pyx_TraceCall("fancy_str", __pyx_f[0], 3215);
-
-  /* "pysam/csamtools.pyx":3218
- *         """returns list of fieldnames/values in pretty format for debugging
- *         """
- *         ret_string = []             # <<<<<<<<<<<<<<
- *         field_names = {
- *            "tid":           "Contig index",
- */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_ret_string = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3219
- *         """
- *         ret_string = []
- *         field_names = {             # <<<<<<<<<<<<<<
- *            "tid":           "Contig index",
- *            "pos":           "Mapped position on contig",
- */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__tid), ((PyObject *)__pyx_kp_s_161)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_kp_s_162)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mtid), ((PyObject *)__pyx_kp_s_163)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mpos), ((PyObject *)__pyx_kp_s_164)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__isize), ((PyObject *)__pyx_kp_s_165)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_kp_s_166)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_cigar), ((PyObject *)__pyx_kp_s_167)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cigar), ((PyObject *)__pyx_kp_s_168)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_kp_s_169)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bin), ((PyObject *)__pyx_kp_s_170)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qname), ((PyObject *)__pyx_kp_s_171)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qname), ((PyObject *)__pyx_kp_s_172)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qseq), ((PyObject *)__pyx_kp_s_173)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qseq), ((PyObject *)__pyx_kp_s_174)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bqual), ((PyObject *)__pyx_kp_s_175)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_aux), ((PyObject *)__pyx_kp_s_176)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__m_data), ((PyObject *)__pyx_kp_s_177)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__data_len), ((PyObject *)__pyx_kp_s_178)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_field_names = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3239
- *            "data_len":      "Current data length",
- *            }
- *         fields_names_in_order = ["tid", "pos", "mtid", "mpos", "isize", "flag",             # <<<<<<<<<<<<<<
- *                                  "n_cigar", "cigar", "qual", "bin", "l_qname", "qname",
- *                                  "l_qseq", "qseq", "bqual", "l_aux", "m_data", "data_len"]
- */
-  __pyx_t_1 = PyList_New(18); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__tid));
-  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__tid));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tid));
-  __Pyx_INCREF(((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__mtid));
-  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__mtid));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mtid));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__mpos));
-  PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__mpos));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mpos));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__isize));
-  PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_s__isize));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__isize));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__flag));
-  PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_s__flag));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flag));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__n_cigar));
-  PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_s__n_cigar));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n_cigar));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__cigar));
-  PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_s__cigar));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cigar));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__qual));
-  PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_s__qual));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__qual));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__bin));
-  PyList_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_n_s__bin));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bin));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__l_qname));
-  PyList_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_n_s__l_qname));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l_qname));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__qname));
-  PyList_SET_ITEM(__pyx_t_1, 11, ((PyObject *)__pyx_n_s__qname));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__qname));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__l_qseq));
-  PyList_SET_ITEM(__pyx_t_1, 12, ((PyObject *)__pyx_n_s__l_qseq));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l_qseq));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__qseq));
-  PyList_SET_ITEM(__pyx_t_1, 13, ((PyObject *)__pyx_n_s__qseq));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__qseq));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__bqual));
-  PyList_SET_ITEM(__pyx_t_1, 14, ((PyObject *)__pyx_n_s__bqual));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bqual));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__l_aux));
-  PyList_SET_ITEM(__pyx_t_1, 15, ((PyObject *)__pyx_n_s__l_aux));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l_aux));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__m_data));
-  PyList_SET_ITEM(__pyx_t_1, 16, ((PyObject *)__pyx_n_s__m_data));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m_data));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__data_len));
-  PyList_SET_ITEM(__pyx_t_1, 17, ((PyObject *)__pyx_n_s__data_len));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data_len));
-  __pyx_v_fields_names_in_order = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3243
- *                                  "l_qseq", "qseq", "bqual", "l_aux", "m_data", "data_len"]
- * 
- *         for f in fields_names_in_order:             # <<<<<<<<<<<<<<
- *             if not f in self.__dict__:
- *                 continue
- */
-  __pyx_t_1 = ((PyObject *)__pyx_v_fields_names_in_order); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
-  for (;;) {
-    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
-    #if CYTHON_COMPILING_IN_CPYTHON
-    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    #else
-    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    #endif
-    __Pyx_XDECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_3;
-    __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":3244
- * 
- *         for f in fields_names_in_order:
- *             if not f in self.__dict__:             # <<<<<<<<<<<<<<
- *                 continue
- *             ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f)))
- */
-    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____dict__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_5 = (!__pyx_t_4);
-    if (__pyx_t_5) {
-
-      /* "pysam/csamtools.pyx":3245
- *         for f in fields_names_in_order:
- *             if not f in self.__dict__:
- *                 continue             # <<<<<<<<<<<<<<
- *             ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f)))
- * 
- */
-      goto __pyx_L3_continue;
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
-
-    /* "pysam/csamtools.pyx":3246
- *             if not f in self.__dict__:
- *                 continue
- *             ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f)))             # <<<<<<<<<<<<<<
- * 
- *         for f in self.__dict__:
- */
-    __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_field_names), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_s_180), __pyx_v_f); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_7 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_181)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____getattribute__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __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 = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_INCREF(__pyx_v_f);
-    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f);
-    __Pyx_GIVEREF(__pyx_v_f);
-    __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
-    __Pyx_GIVEREF(__pyx_t_3);
-    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
-    __Pyx_GIVEREF(__pyx_t_7);
-    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_9);
-    __Pyx_GIVEREF(__pyx_t_9);
-    __pyx_t_3 = 0;
-    __pyx_t_7 = 0;
-    __pyx_t_9 = 0;
-    __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_179), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-    __pyx_t_10 = PyList_Append(__pyx_v_ret_string, ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-    __pyx_L3_continue:;
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3248
- *             ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f)))
- * 
- *         for f in self.__dict__:             # <<<<<<<<<<<<<<
- *             if not f in field_names:
- *                 ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f)))
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____dict__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __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_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_2 = 0;
-    __pyx_t_11 = NULL;
-  } else {
-    __pyx_t_2 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext;
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  for (;;) {
-    if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_9)) {
-      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_9)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_9)) {
-      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else {
-      __pyx_t_1 = __pyx_t_11(__pyx_t_9);
-      if (unlikely(!__pyx_t_1)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_1);
-    }
-    __Pyx_XDECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_1;
-    __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":3249
- * 
- *         for f in self.__dict__:
- *             if not f in field_names:             # <<<<<<<<<<<<<<
- *                 ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f)))
- *         return ret_string
- */
-    __pyx_t_5 = (__Pyx_PyDict_Contains(__pyx_v_f, ((PyObject *)__pyx_v_field_names), Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = (!__pyx_t_5);
-    if (__pyx_t_4) {
-
-      /* "pysam/csamtools.pyx":3250
- *         for f in self.__dict__:
- *             if not f in field_names:
- *                 ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f)))             # <<<<<<<<<<<<<<
- *         return ret_string
- * 
- */
-      __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____getattribute__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_INCREF(__pyx_v_f);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f);
-      __Pyx_GIVEREF(__pyx_v_f);
-      __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_INCREF(__pyx_v_f);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f);
-      __Pyx_GIVEREF(__pyx_v_f);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
-      PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_kp_s_20));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
-      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
-      __Pyx_GIVEREF(__pyx_t_7);
-      __pyx_t_7 = 0;
-      __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_179), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-      __pyx_t_10 = PyList_Append(__pyx_v_ret_string, ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      goto __pyx_L8;
-    }
-    __pyx_L8:;
-  }
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-
-  /* "pysam/csamtools.pyx":3251
- *             if not f in field_names:
- *                 ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f)))
- *         return ret_string             # <<<<<<<<<<<<<<
- * 
- * cdef class PileupProxy:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_ret_string));
-  __pyx_r = ((PyObject *)__pyx_v_ret_string);
-  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_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_AddTraceback("pysam.csamtools.AlignedRead.fancy_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_ret_string);
-  __Pyx_XDECREF(__pyx_v_field_names);
-  __Pyx_XDECREF(__pyx_v_fields_names_in_order);
-  __Pyx_XDECREF(__pyx_v_f);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11PileupProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11PileupProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11PileupProxy___init__(((struct __pyx_obj_5pysam_9csamtools_PileupProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3270
- *     will change.
- *     '''
- *     def __init__(self):             # <<<<<<<<<<<<<<
- *         raise TypeError("This class cannot be instantiated from Python")
- * 
- */
-
-static int __pyx_pf_5pysam_9csamtools_11PileupProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 3270);
-
-  /* "pysam/csamtools.pyx":3271
- *     '''
- *     def __init__(self):
- *         raise TypeError("This class cannot be instantiated from Python")             # <<<<<<<<<<<<<<
- * 
- *     def __str__(self):
- */
-  __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_183), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.PileupProxy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_3__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_3__str__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11PileupProxy_2__str__(((struct __pyx_obj_5pysam_9csamtools_PileupProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3273
- *         raise TypeError("This class cannot be instantiated from Python")
- * 
- *     def __str__(self):             # <<<<<<<<<<<<<<
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
- *             "\n" +\
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_2__str__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__str__", 0);
-  __Pyx_TraceCall("__str__", __pyx_f[0], 3273);
-
-  /* "pysam/csamtools.pyx":3274
- * 
- *     def __str__(self):
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\             # <<<<<<<<<<<<<<
- *             "\n" +\
- *             "\n".join( map(str, self.pileups) )
- */
-  __Pyx_XDECREF(__pyx_r);
-
-  /* "pysam/csamtools.pyx":3275
- *     def __str__(self):
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
- *             "\n" +\             # <<<<<<<<<<<<<<
- *             "\n".join( map(str, self.pileups) )
- * 
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-
-  /* "pysam/csamtools.pyx":3274
- * 
- *     def __str__(self):
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\             # <<<<<<<<<<<<<<
- *             "\n" +\
- *             "\n".join( map(str, self.pileups) )
- */
-  __pyx_t_2 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_self->pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __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);
-  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_2 = 0;
-  __pyx_t_3 = 0;
-  __pyx_t_4 = 0;
-  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_5));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-  __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-
-  /* "pysam/csamtools.pyx":3276
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
- *             "\n" +\
- *             "\n".join( map(str, self.pileups) )             # <<<<<<<<<<<<<<
- * 
- *     property tid:
- */
-  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pileups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __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 = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  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_builtin_map, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __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 = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __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_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __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_1); __pyx_t_1 = 0;
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("pysam.csamtools.PileupProxy.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_3tid_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_3tid_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11PileupProxy_3tid___get__(((struct __pyx_obj_5pysam_9csamtools_PileupProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3280
- *     property tid:
- *         '''the chromosome ID as is defined in the header'''
- *         def __get__(self): return self.tid             # <<<<<<<<<<<<<<
- * 
- *     property n:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_3tid___get__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3280);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3280; __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("pysam.csamtools.PileupProxy.tid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_1n_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_1n_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11PileupProxy_1n___get__(((struct __pyx_obj_5pysam_9csamtools_PileupProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3284
- *     property n:
- *         '''number of reads mapping to this column.'''
- *         def __get__(self): return self.n_pu             # <<<<<<<<<<<<<<
- *         def __set__(self, n): self.n_pu = n
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_1n___get__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3284);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->n_pu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __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("pysam.csamtools.PileupProxy.n.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_11PileupProxy_1n_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_11PileupProxy_1n_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11PileupProxy_1n_2__set__(((struct __pyx_obj_5pysam_9csamtools_PileupProxy *)__pyx_v_self), ((PyObject *)__pyx_v_n));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3285
- *         '''number of reads mapping to this column.'''
- *         def __get__(self): return self.n_pu
- *         def __set__(self, n): self.n_pu = n             # <<<<<<<<<<<<<<
- * 
- *     property pos:
- */
-
-static int __pyx_pf_5pysam_9csamtools_11PileupProxy_1n_2__set__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self, PyObject *__pyx_v_n) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__set__", 0);
-  __Pyx_TraceCall("__set__", __pyx_f[0], 3285);
-  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_n); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->n_pu = __pyx_t_1;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.csamtools.PileupProxy.n.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_3pos_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11PileupProxy_3pos___get__(((struct __pyx_obj_5pysam_9csamtools_PileupProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3288
- * 
- *     property pos:
- *         def __get__(self): return self.pos             # <<<<<<<<<<<<<<
- * 
- *     property pileups:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_3pos___get__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3288);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; __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("pysam.csamtools.PileupProxy.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_7pileups_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_11PileupProxy_7pileups_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_11PileupProxy_7pileups___get__(((struct __pyx_obj_5pysam_9csamtools_PileupProxy *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3292
- *     property pileups:
- *         '''list of reads (:class:`pysam.PileupRead`) aligned to this column'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef int x
- *             pileups = []
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_11PileupProxy_7pileups___get__(struct __pyx_obj_5pysam_9csamtools_PileupProxy *__pyx_v_self) {
-  int __pyx_v_x;
-  PyObject *__pyx_v_pileups = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_t_6;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3292);
-
-  /* "pysam/csamtools.pyx":3294
- *         def __get__(self):
- *             cdef int x
- *             pileups = []             # <<<<<<<<<<<<<<
- * 
- *             if self.plp == NULL or self.plp[0] == NULL:
- */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_pileups = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3296
- *             pileups = []
- * 
- *             if self.plp == NULL or self.plp[0] == NULL:             # <<<<<<<<<<<<<<
- *                 raise ValueError("PileupProxy accessed after iterator finished")
- * 
- */
-  __pyx_t_2 = (__pyx_v_self->plp == NULL);
-  if (!__pyx_t_2) {
-    __pyx_t_3 = ((__pyx_v_self->plp[0]) == NULL);
-    __pyx_t_4 = __pyx_t_3;
-  } else {
-    __pyx_t_4 = __pyx_t_2;
-  }
-  if (__pyx_t_4) {
-
-    /* "pysam/csamtools.pyx":3297
- * 
- *             if self.plp == NULL or self.plp[0] == NULL:
- *                 raise ValueError("PileupProxy accessed after iterator finished")             # <<<<<<<<<<<<<<
- * 
- *             # warning: there could be problems if self.n and self.buf are
- */
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_185), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":3301
- *             # warning: there could be problems if self.n and self.buf are
- *             # out of sync.
- *             for x from 0 <= x < self.n_pu:             # <<<<<<<<<<<<<<
- *                 pileups.append( makePileupRead( &(self.plp[0][x])) )
- *             return pileups
- */
-  __pyx_t_5 = __pyx_v_self->n_pu;
-  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
-
-    /* "pysam/csamtools.pyx":3302
- *             # out of sync.
- *             for x from 0 <= x < self.n_pu:
- *                 pileups.append( makePileupRead( &(self.plp[0][x])) )             # <<<<<<<<<<<<<<
- *             return pileups
- * 
- */
-    __pyx_t_1 = __pyx_f_5pysam_9csamtools_makePileupRead((&((__pyx_v_self->plp[0])[__pyx_v_x]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = PyList_Append(__pyx_v_pileups, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  }
-
-  /* "pysam/csamtools.pyx":3303
- *             for x from 0 <= x < self.n_pu:
- *                 pileups.append( makePileupRead( &(self.plp[0][x])) )
- *             return pileups             # <<<<<<<<<<<<<<
- * 
- * cdef class PileupRead:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_pileups));
-  __pyx_r = ((PyObject *)__pyx_v_pileups);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.PileupProxy.pileups.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_pileups);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_10PileupRead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_10PileupRead_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead___init__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3309
- *     '''
- * 
- *     def __init__(self):             # <<<<<<<<<<<<<<
- *         raise TypeError("This class cannot be instantiated from Python")
- * 
- */
-
-static int __pyx_pf_5pysam_9csamtools_10PileupRead___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 3309);
-
-  /* "pysam/csamtools.pyx":3310
- * 
- *     def __init__(self):
- *         raise TypeError("This class cannot be instantiated from Python")             # <<<<<<<<<<<<<<
- * 
- *     def __str__(self):
- */
-  __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_186), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.PileupRead.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_3__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_3__str__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead_2__str__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3312
- *         raise TypeError("This class cannot be instantiated from Python")
- * 
- *     def __str__(self):             # <<<<<<<<<<<<<<
- *         return "\t".join( map(str, (self.alignment, self.qpos, self.indel, self.level, self.is_del, self.is_head, self.is_tail ) ) )
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_2__str__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__str__", 0);
-  __Pyx_TraceCall("__str__", __pyx_f[0], 3312);
-
-  /* "pysam/csamtools.pyx":3313
- * 
- *     def __str__(self):
- *         return "\t".join( map(str, (self.alignment, self.qpos, self.indel, self.level, self.is_del, self.is_head, self.is_tail ) ) )             # <<<<<<<<<<<<<<
- * 
- *     property alignment:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qpos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__indel); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__level); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_del); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_head); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_tail); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_9 = PyTuple_New(7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __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_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_4);
-  __Pyx_GIVEREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_6);
-  __Pyx_GIVEREF(__pyx_t_6);
-  PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7);
-  __Pyx_GIVEREF(__pyx_t_7);
-  PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8);
-  __Pyx_GIVEREF(__pyx_t_8);
-  __pyx_t_2 = 0;
-  __pyx_t_3 = 0;
-  __pyx_t_4 = 0;
-  __pyx_t_5 = 0;
-  __pyx_t_6 = 0;
-  __pyx_t_7 = 0;
-  __pyx_t_8 = 0;
-  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __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))));
-  PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_t_9));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
-  __pyx_t_9 = 0;
-  __pyx_t_9 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
-  __Pyx_GIVEREF(__pyx_t_9);
-  __pyx_t_9 = 0;
-  __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-  __pyx_r = __pyx_t_9;
-  __pyx_t_9 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_AddTraceback("pysam.csamtools.PileupRead.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_9alignment_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_9alignment_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead_9alignment___get__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3317
- *     property alignment:
- *         """a :class:`pysam.AlignedRead` object of the aligned read"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._alignment
- *     property qpos:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_9alignment___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3317);
-
-  /* "pysam/csamtools.pyx":3318
- *         """a :class:`pysam.AlignedRead` object of the aligned read"""
- *         def __get__(self):
- *             return self._alignment             # <<<<<<<<<<<<<<
- *     property qpos:
- *         """position of the read base at the pileup site, 0-based"""
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self->_alignment));
-  __pyx_r = ((PyObject *)__pyx_v_self->_alignment);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_4qpos_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_4qpos_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead_4qpos___get__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3321
- *     property qpos:
- *         """position of the read base at the pileup site, 0-based"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._qpos
- *     property indel:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_4qpos___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3321);
-
-  /* "pysam/csamtools.pyx":3322
- *         """position of the read base at the pileup site, 0-based"""
- *         def __get__(self):
- *             return self._qpos             # <<<<<<<<<<<<<<
- *     property indel:
- *         """indel length; 0 for no indel, positive for ins and negative for del"""
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_qpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3322; __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("pysam.csamtools.PileupRead.qpos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_5indel_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_5indel_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead_5indel___get__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3325
- *     property indel:
- *         """indel length; 0 for no indel, positive for ins and negative for del"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._indel
- *     property is_del:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_5indel___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3325);
-
-  /* "pysam/csamtools.pyx":3326
- *         """indel length; 0 for no indel, positive for ins and negative for del"""
- *         def __get__(self):
- *             return self._indel             # <<<<<<<<<<<<<<
- *     property is_del:
- *         """1 iff the base on the padded read is a deletion"""
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __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("pysam.csamtools.PileupRead.indel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_6is_del_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_6is_del_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead_6is_del___get__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3329
- *     property is_del:
- *         """1 iff the base on the padded read is a deletion"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._is_del
- *     property is_head:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_6is_del___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3329);
-
-  /* "pysam/csamtools.pyx":3330
- *         """1 iff the base on the padded read is a deletion"""
- *         def __get__(self):
- *             return self._is_del             # <<<<<<<<<<<<<<
- *     property is_head:
- *         def __get__(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_del); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3330; __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("pysam.csamtools.PileupRead.is_del.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_7is_head_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_7is_head_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead_7is_head___get__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3332
- *             return self._is_del
- *     property is_head:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._is_head
- *     property is_tail:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_7is_head___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3332);
-
-  /* "pysam/csamtools.pyx":3333
- *     property is_head:
- *         def __get__(self):
- *             return self._is_head             # <<<<<<<<<<<<<<
- *     property is_tail:
- *         def __get__(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_head); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3333; __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("pysam.csamtools.PileupRead.is_head.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_7is_tail_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_7is_tail_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead_7is_tail___get__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3335
- *             return self._is_head
- *     property is_tail:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._is_tail
- *     property level:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_7is_tail___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3335);
-
-  /* "pysam/csamtools.pyx":3336
- *     property is_tail:
- *         def __get__(self):
- *             return self._is_tail             # <<<<<<<<<<<<<<
- *     property level:
- *         def __get__(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_tail); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __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("pysam.csamtools.PileupRead.is_tail.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_10PileupRead_5level_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_10PileupRead_5level___get__(((struct __pyx_obj_5pysam_9csamtools_PileupRead *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3338
- *             return self._is_tail
- *     property level:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._level
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_10PileupRead_5level___get__(struct __pyx_obj_5pysam_9csamtools_PileupRead *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3338);
-
-  /* "pysam/csamtools.pyx":3339
- *     property level:
- *         def __get__(self):
- *             return self._level             # <<<<<<<<<<<<<<
- * 
- * class Outs:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3339; __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("pysam.csamtools.PileupRead.level.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_4Outs___init__[] = "Outs.__init__(self, id=1)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs___init__)};
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_self = 0;
-  PyObject *__pyx_v_id = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__id,0};
-    PyObject* values[2] = {0,0};
-    values[1] = ((PyObject *)((PyObject *)__pyx_int_1));
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
-          if (value) { values[1] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_self = values[0];
-    __pyx_v_id = values[1];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Outs.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs___init__(__pyx_self, __pyx_v_self, __pyx_v_id);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3343
- * class Outs:
- *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
- *     def __init__(self, id = 1):             # <<<<<<<<<<<<<<
- *         self.streams = []
- *         self.id = id
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_id) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 3343);
-
-  /* "pysam/csamtools.pyx":3344
- *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
- *     def __init__(self, id = 1):
- *         self.streams = []             # <<<<<<<<<<<<<<
- *         self.id = id
- * 
- */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__streams, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3345
- *     def __init__(self, id = 1):
- *         self.streams = []
- *         self.id = id             # <<<<<<<<<<<<<<
- * 
- *     def setdevice(self, filename):
- */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__id, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.csamtools.Outs.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_3setdevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_4Outs_2setdevice[] = "Outs.setdevice(self, filename)\nopen an existing file, like \"/dev/null\"";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_3setdevice = {__Pyx_NAMESTR("setdevice"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_3setdevice, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs_2setdevice)};
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_3setdevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_self = 0;
-  PyObject *__pyx_v_filename = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("setdevice (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__filename,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("setdevice", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setdevice") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-    }
-    __pyx_v_self = values[0];
-    __pyx_v_filename = values[1];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setdevice", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Outs.setdevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs_2setdevice(__pyx_self, __pyx_v_self, __pyx_v_filename);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3347
- *         self.id = id
- * 
- *     def setdevice(self, filename):             # <<<<<<<<<<<<<<
- *         '''open an existing file, like "/dev/null"'''
- *         fd = os.open(filename, os.O_WRONLY)
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_2setdevice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
-  PyObject *__pyx_v_fd = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("setdevice", 0);
-  __Pyx_TraceCall("setdevice", __pyx_f[0], 3347);
-
-  /* "pysam/csamtools.pyx":3349
- *     def setdevice(self, filename):
- *         '''open an existing file, like "/dev/null"'''
- *         fd = os.open(filename, os.O_WRONLY)             # <<<<<<<<<<<<<<
- *         self.setfd(fd)
- * 
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_WRONLY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_filename);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
-  __Pyx_GIVEREF(__pyx_v_filename);
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_v_fd = __pyx_t_3;
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":3350
- *         '''open an existing file, like "/dev/null"'''
- *         fd = os.open(filename, os.O_WRONLY)
- *         self.setfd(fd)             # <<<<<<<<<<<<<<
- * 
- *     def setfile(self, filename):
- */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__setfd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __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 = 3350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_fd);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fd);
-  __Pyx_GIVEREF(__pyx_v_fd);
-  __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 = 3350; __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_1)); __pyx_t_1 = 0;
-  __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_AddTraceback("pysam.csamtools.Outs.setdevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_fd);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_5setfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_4Outs_4setfile[] = "Outs.setfile(self, filename)\nopen a new file.";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_5setfile = {__Pyx_NAMESTR("setfile"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_5setfile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs_4setfile)};
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_5setfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_self = 0;
-  PyObject *__pyx_v_filename = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("setfile (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__filename,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("setfile", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-    }
-    __pyx_v_self = values[0];
-    __pyx_v_filename = values[1];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setfile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Outs.setfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs_4setfile(__pyx_self, __pyx_v_self, __pyx_v_filename);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3352
- *         self.setfd(fd)
- * 
- *     def setfile(self, filename):             # <<<<<<<<<<<<<<
- *         '''open a new file.'''
- *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_4setfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
-  PyObject *__pyx_v_fd = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("setfile", 0);
-  __Pyx_TraceCall("setfile", __pyx_f[0], 3352);
-
-  /* "pysam/csamtools.pyx":3354
- *     def setfile(self, filename):
- *         '''open a new file.'''
- *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);             # <<<<<<<<<<<<<<
- *         self.setfd(fd)
- * 
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_WRONLY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_CREAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_INCREF(__pyx_v_filename);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
-  __Pyx_GIVEREF(__pyx_v_filename);
-  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_int_0660);
-  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_0660);
-  __Pyx_GIVEREF(__pyx_int_0660);
-  __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 = 3354; __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_v_fd = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3355
- *         '''open a new file.'''
- *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);
- *         self.setfd(fd)             # <<<<<<<<<<<<<<
- * 
- *     def setfd(self, fd):
- */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__setfd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __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 = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_INCREF(__pyx_v_fd);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fd);
-  __Pyx_GIVEREF(__pyx_v_fd);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __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_4)); __pyx_t_4 = 0;
-  __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_4);
-  __Pyx_AddTraceback("pysam.csamtools.Outs.setfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_fd);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_7setfd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_4Outs_6setfd[] = "Outs.setfd(self, fd)";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_7setfd = {__Pyx_NAMESTR("setfd"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_7setfd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs_6setfd)};
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_7setfd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_self = 0;
-  PyObject *__pyx_v_fd = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("setfd (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__fd,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fd)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("setfd", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-    }
-    __pyx_v_self = values[0];
-    __pyx_v_fd = values[1];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setfd", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.Outs.setfd", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs_6setfd(__pyx_self, __pyx_v_self, __pyx_v_fd);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3357
- *         self.setfd(fd)
- * 
- *     def setfd(self, fd):             # <<<<<<<<<<<<<<
- *         ofd = os.dup(self.id)      #  Save old stream on new unit.
- *         self.streams.append(ofd)
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_6setfd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fd) {
-  PyObject *__pyx_v_ofd = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("setfd", 0);
-  __Pyx_TraceCall("setfd", __pyx_f[0], 3357);
-
-  /* "pysam/csamtools.pyx":3358
- * 
- *     def setfd(self, fd):
- *         ofd = os.dup(self.id)      #  Save old stream on new unit.             # <<<<<<<<<<<<<<
- *         self.streams.append(ofd)
- *         sys.stdout.flush()          #  Buffered data goes to old stream.
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__dup); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __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__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __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 = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_v_ofd = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3359
- *     def setfd(self, fd):
- *         ofd = os.dup(self.id)      #  Save old stream on new unit.
- *         self.streams.append(ofd)             # <<<<<<<<<<<<<<
- *         sys.stdout.flush()          #  Buffered data goes to old stream.
- *         sys.stderr.flush()          #  Buffered data goes to old stream.
- */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_ofd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3359; __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_3); __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":3360
- *         ofd = os.dup(self.id)      #  Save old stream on new unit.
- *         self.streams.append(ofd)
- *         sys.stdout.flush()          #  Buffered data goes to old stream.             # <<<<<<<<<<<<<<
- *         sys.stderr.flush()          #  Buffered data goes to old stream.
- *         os.dup2(fd, self.id)        #  Open unit 1 on new stream.
- */
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stdout); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__flush); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3361
- *         self.streams.append(ofd)
- *         sys.stdout.flush()          #  Buffered data goes to old stream.
- *         sys.stderr.flush()          #  Buffered data goes to old stream.             # <<<<<<<<<<<<<<
- *         os.dup2(fd, self.id)        #  Open unit 1 on new stream.
- *         os.close(fd)                #  Close other unit (look out, caller.)
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__stderr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3361; __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_GetAttr(__pyx_t_3, __pyx_n_s__flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3361; __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 = 3361; __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_3); __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":3362
- *         sys.stdout.flush()          #  Buffered data goes to old stream.
- *         sys.stderr.flush()          #  Buffered data goes to old stream.
- *         os.dup2(fd, self.id)        #  Open unit 1 on new stream.             # <<<<<<<<<<<<<<
- *         os.close(fd)                #  Close other unit (look out, caller.)
- * 
- */
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__dup2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __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 = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_v_fd);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fd);
-  __Pyx_GIVEREF(__pyx_v_fd);
-  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":3363
- *         sys.stderr.flush()          #  Buffered data goes to old stream.
- *         os.dup2(fd, self.id)        #  Open unit 1 on new stream.
- *         os.close(fd)                #  Close other unit (look out, caller.)             # <<<<<<<<<<<<<<
- * 
- *     def restore(self):
- */
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3363; __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 = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(__pyx_v_fd);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fd);
-  __Pyx_GIVEREF(__pyx_v_fd);
-  __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 = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.Outs.setfd", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_ofd);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_9restore(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_4Outs_8restore[] = "Outs.restore(self)\nrestore previous output stream";
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_9restore = {__Pyx_NAMESTR("restore"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_9restore, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs_8restore)};
-static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_9restore(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("restore (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs_8restore(__pyx_self, ((PyObject *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3365
- *         os.close(fd)                #  Close other unit (look out, caller.)
- * 
- *     def restore(self):             # <<<<<<<<<<<<<<
- *         '''restore previous output stream'''
- *         if self.streams:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_8restore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("restore", 0);
-  __Pyx_TraceCall("restore", __pyx_f[0], 3365);
-
-  /* "pysam/csamtools.pyx":3367
- *     def restore(self):
- *         '''restore previous output stream'''
- *         if self.streams:             # <<<<<<<<<<<<<<
- *             # the following was not sufficient, hence flush both stderr and stdout
- *             # os.fsync( self.id )
- */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __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 = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":3370
- *             # the following was not sufficient, hence flush both stderr and stdout
- *             # os.fsync( self.id )
- *             sys.stdout.flush()             # <<<<<<<<<<<<<<
- *             sys.stderr.flush()
- *             os.dup2(self.streams[-1], self.id)
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__stdout); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __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_GetAttr(__pyx_t_3, __pyx_n_s__flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __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 = 3370; __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_3); __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":3371
- *             # os.fsync( self.id )
- *             sys.stdout.flush()
- *             sys.stderr.flush()             # <<<<<<<<<<<<<<
- *             os.dup2(self.streams[-1], self.id)
- *             os.close(self.streams[-1])
- */
-    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stderr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__flush); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":3372
- *             sys.stdout.flush()
- *             sys.stderr.flush()
- *             os.dup2(self.streams[-1], self.id)             # <<<<<<<<<<<<<<
- *             os.close(self.streams[-1])
- *             del self.streams[-1]
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__dup2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __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_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __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__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __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 = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
-    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_t_4 = 0;
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":3373
- *             sys.stderr.flush()
- *             os.dup2(self.streams[-1], self.id)
- *             os.close(self.streams[-1])             # <<<<<<<<<<<<<<
- *             del self.streams[-1]
- * 
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
-    __Pyx_GIVEREF(__pyx_t_3);
-    __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":3374
- *             os.dup2(self.streams[-1], self.id)
- *             os.close(self.streams[-1])
- *             del self.streams[-1]             # <<<<<<<<<<<<<<
- * 
- * def _samtools_dispatch( method,
- */
-    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    if (__Pyx_DelItemInt(__pyx_t_3, -1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("pysam.csamtools.Outs.restore", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_1_samtools_dispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_9csamtools__samtools_dispatch[] = "_samtools_dispatch(method, args=(), catch_stdout=True)\ncall ``method`` in samtools providing arguments in args.\n    \n    .. note:: \n       This method redirects stdout to capture it \n       from samtools. If for some reason stdout disappears\n       the reason might be in this method.\n\n    .. note::\n       The current implementation might only work on linux.\n\n    .. note::\n       This method captures stdout and st [...]
-static PyMethodDef __pyx_mdef_5pysam_9csamtools_1_samtools_dispatch = {__Pyx_NAMESTR("_samtools_dispatch"), (PyCFunction)__pyx_pw_5pysam_9csamtools_1_samtools_dispatch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools__samtools_dispatch)};
-static PyObject *__pyx_pw_5pysam_9csamtools_1_samtools_dispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_method = 0;
-  PyObject *__pyx_v_args = 0;
-  PyObject *__pyx_v_catch_stdout = 0;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_samtools_dispatch (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__method,&__pyx_n_s__args,&__pyx_n_s__catch_stdout,0};
-    PyObject* values[3] = {0,0,0};
-
-    /* "pysam/csamtools.pyx":3377
- * 
- * def _samtools_dispatch( method,
- *                         args = (),             # <<<<<<<<<<<<<<
- *                         catch_stdout = True ):
- *     '''call ``method`` in samtools providing arguments in args.
- */
-    values[1] = ((PyObject *)__pyx_empty_tuple);
-    values[2] = __pyx_k_187;
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__method)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__args);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__catch_stdout);
-          if (value) { values[2] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_samtools_dispatch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3376; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_method = values[0];
-    __pyx_v_args = values[1];
-    __pyx_v_catch_stdout = values[2];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_samtools_dispatch", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3376; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_9csamtools__samtools_dispatch(__pyx_self, __pyx_v_method, __pyx_v_args, __pyx_v_catch_stdout);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3376
- *             del self.streams[-1]
- * 
- * def _samtools_dispatch( method,             # <<<<<<<<<<<<<<
- *                         args = (),
- *                         catch_stdout = True ):
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools__samtools_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_method, PyObject *__pyx_v_args, PyObject *__pyx_v_catch_stdout) {
-  PyObject *__pyx_v_stderr_h = NULL;
-  PyObject *__pyx_v_stderr_f = NULL;
-  PyObject *__pyx_v_stdout_h = NULL;
-  PyObject *__pyx_v_stdout_f = NULL;
-  PyObject *__pyx_v_stdout_save = NULL;
-  char **__pyx_v_cargs;
-  int __pyx_v_i;
-  int __pyx_v_n;
-  int __pyx_v_retval;
-  PyObject *__pyx_v_inf = NULL;
-  PyObject *__pyx_v_out_stdout = NULL;
-  PyObject *__pyx_v_out_stderr = NULL;
-  PyObject *__pyx_v_a = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *(*__pyx_t_7)(PyObject *);
-  int __pyx_t_8;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
-  Py_ssize_t __pyx_t_12;
-  PyObject *(*__pyx_t_13)(PyObject *);
-  char *__pyx_t_14;
-  PyObject *__pyx_t_15 = NULL;
-  PyObject *__pyx_t_16 = NULL;
-  PyObject *__pyx_t_17 = NULL;
-  PyObject *__pyx_t_18 = NULL;
-  PyObject *__pyx_t_19 = NULL;
-  PyObject *__pyx_t_20 = NULL;
-  PyObject *__pyx_t_21 = NULL;
-  PyObject *__pyx_t_22 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("_samtools_dispatch", 0);
-  __Pyx_TraceCall("_samtools_dispatch", __pyx_f[0], 3376);
-  __Pyx_INCREF(__pyx_v_method);
-  __Pyx_INCREF(__pyx_v_args);
-  __Pyx_INCREF(__pyx_v_catch_stdout);
-
-  /* "pysam/csamtools.pyx":3402
- * 
- *     # some special cases
- *     if method == "index":             # <<<<<<<<<<<<<<
- *         if not os.path.exists( args[0] ):
- *             raise IOError( "No such file or directory: '%s'" % args[0] )
- */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_method, ((PyObject *)__pyx_n_s__index), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3402; __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 = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
-
-    /* "pysam/csamtools.pyx":3403
- *     # some special cases
- *     if method == "index":
- *         if not os.path.exists( args[0] ):             # <<<<<<<<<<<<<<
- *             raise IOError( "No such file or directory: '%s'" % args[0] )
- * 
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __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_GetAttr(__pyx_t_3, __pyx_n_s__exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
-    __Pyx_GIVEREF(__pyx_t_3);
-    __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __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_4)); __pyx_t_4 = 0;
-    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_5 = (!__pyx_t_2);
-    if (__pyx_t_5) {
-
-      /* "pysam/csamtools.pyx":3404
- *     if method == "index":
- *         if not os.path.exists( args[0] ):
- *             raise IOError( "No such file or directory: '%s'" % args[0] )             # <<<<<<<<<<<<<<
- * 
- *     # redirect stderr and stdout to file
- */
-      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_188), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __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 = 3404; __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_builtin_IOError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L4;
-    }
-    __pyx_L4:;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":3407
- * 
- *     # redirect stderr and stdout to file
- *     stderr_h, stderr_f = tempfile.mkstemp()             # <<<<<<<<<<<<<<
- *     pysam_set_stderr( stderr_h )
- * 
- */
-  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__tempfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__mkstemp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
-    PyObject* sequence = __pyx_t_4;
-    #if CYTHON_COMPILING_IN_CPYTHON
-    Py_ssize_t size = Py_SIZE(sequence);
-    #else
-    Py_ssize_t size = PySequence_Size(sequence);
-    #endif
-    if (unlikely(size != 2)) {
-      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely(PyTuple_CheckExact(sequence))) {
-      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
-      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
-    } else {
-      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
-      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
-    }
-    __Pyx_INCREF(__pyx_t_3);
-    __Pyx_INCREF(__pyx_t_1);
-    #else
-    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    #endif
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  } else
-  {
-    Py_ssize_t index = -1;
-    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
-    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
-    __Pyx_GOTREF(__pyx_t_3);
-    index = 1; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
-    __Pyx_GOTREF(__pyx_t_1);
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_7 = NULL;
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    goto __pyx_L6_unpacking_done;
-    __pyx_L5_unpacking_failed:;
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_7 = NULL;
-    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_L6_unpacking_done:;
-  }
-  __pyx_v_stderr_h = __pyx_t_3;
-  __pyx_t_3 = 0;
-  __pyx_v_stderr_f = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3408
- *     # redirect stderr and stdout to file
- *     stderr_h, stderr_f = tempfile.mkstemp()
- *     pysam_set_stderr( stderr_h )             # <<<<<<<<<<<<<<
- * 
- *     if catch_stdout:
- */
-  __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_stderr_h); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  pysam_set_stderr(__pyx_t_8);
-
-  /* "pysam/csamtools.pyx":3410
- *     pysam_set_stderr( stderr_h )
- * 
- *     if catch_stdout:             # <<<<<<<<<<<<<<
- *         stdout_h, stdout_f = tempfile.mkstemp()
- *         try:
- */
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":3411
- * 
- *     if catch_stdout:
- *         stdout_h, stdout_f = tempfile.mkstemp()             # <<<<<<<<<<<<<<
- *         try:
- *             stdout_save = Outs( sys.stdout.fileno() )
- */
-    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__tempfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__mkstemp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
-      PyObject* sequence = __pyx_t_4;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      Py_ssize_t size = Py_SIZE(sequence);
-      #else
-      Py_ssize_t size = PySequence_Size(sequence);
-      #endif
-      if (unlikely(size != 2)) {
-        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      #if CYTHON_COMPILING_IN_CPYTHON
-      if (likely(PyTuple_CheckExact(sequence))) {
-        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
-        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
-      } else {
-        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
-      }
-      __Pyx_INCREF(__pyx_t_1);
-      __Pyx_INCREF(__pyx_t_3);
-      #else
-      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      #endif
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    } else
-    {
-      Py_ssize_t index = -1;
-      __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
-      index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_1);
-      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_3);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_7 = NULL;
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      goto __pyx_L9_unpacking_done;
-      __pyx_L8_unpacking_failed:;
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_7 = NULL;
-      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L9_unpacking_done:;
-    }
-    __pyx_v_stdout_h = __pyx_t_1;
-    __pyx_t_1 = 0;
-    __pyx_v_stdout_f = __pyx_t_3;
-    __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":3412
- *     if catch_stdout:
- *         stdout_h, stdout_f = tempfile.mkstemp()
- *         try:             # <<<<<<<<<<<<<<
- *             stdout_save = Outs( sys.stdout.fileno() )
- *             stdout_save.setfd( stdout_h )
- */
-    {
-      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
-      __Pyx_XGOTREF(__pyx_t_9);
-      __Pyx_XGOTREF(__pyx_t_10);
-      __Pyx_XGOTREF(__pyx_t_11);
-      /*try:*/ {
-
-        /* "pysam/csamtools.pyx":3413
- *         stdout_h, stdout_f = tempfile.mkstemp()
- *         try:
- *             stdout_save = Outs( sys.stdout.fileno() )             # <<<<<<<<<<<<<<
- *             stdout_save.setfd( stdout_h )
- *         except AttributeError:
- */
-        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__Outs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stdout); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__fileno); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L10_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 = 3413; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
-        __Pyx_GIVEREF(__pyx_t_1);
-        __pyx_t_1 = 0;
-        __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-        __pyx_v_stdout_save = __pyx_t_1;
-        __pyx_t_1 = 0;
-
-        /* "pysam/csamtools.pyx":3414
- *         try:
- *             stdout_save = Outs( sys.stdout.fileno() )
- *             stdout_save.setfd( stdout_h )             # <<<<<<<<<<<<<<
- *         except AttributeError:
- *             # stdout has already been redirected
- */
-        __pyx_t_1 = PyObject_GetAttr(__pyx_v_stdout_save, __pyx_n_s__setfd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3414; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3414; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_INCREF(__pyx_v_stdout_h);
-        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stdout_h);
-        __Pyx_GIVEREF(__pyx_v_stdout_h);
-        __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 = 3414; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      }
-      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-      goto __pyx_L17_try_end;
-      __pyx_L10_error:;
-      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-      /* "pysam/csamtools.pyx":3415
- *             stdout_save = Outs( sys.stdout.fileno() )
- *             stdout_save.setfd( stdout_h )
- *         except AttributeError:             # <<<<<<<<<<<<<<
- *             # stdout has already been redirected
- *             catch_stdout = False
- */
-      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
-      if (__pyx_t_8) {
-        __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3415; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_GOTREF(__pyx_t_1);
-
-        /* "pysam/csamtools.pyx":3417
- *         except AttributeError:
- *             # stdout has already been redirected
- *             catch_stdout = False             # <<<<<<<<<<<<<<
- * 
- *         # patch for `samtools view`
- */
-        __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3417; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(__pyx_v_catch_stdout);
-        __pyx_v_catch_stdout = __pyx_t_6;
-        __pyx_t_6 = 0;
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        goto __pyx_L11_exception_handled;
-      }
-      __pyx_L12_except_error:;
-      __Pyx_XGIVEREF(__pyx_t_9);
-      __Pyx_XGIVEREF(__pyx_t_10);
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
-      goto __pyx_L1_error;
-      __pyx_L11_exception_handled:;
-      __Pyx_XGIVEREF(__pyx_t_9);
-      __Pyx_XGIVEREF(__pyx_t_10);
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
-      __pyx_L17_try_end:;
-    }
-
-    /* "pysam/csamtools.pyx":3422
- *         # samtools `view` closes stdout, from which I can not
- *         # recover. Thus redirect output to file with -o option.
- *         if method == "view":             # <<<<<<<<<<<<<<
- *             if "-o" in args: raise ValueError("option -o is forbidden in samtools view")
- *             args = ( "-o", stdout_f ) + args
- */
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_method, ((PyObject *)__pyx_n_s__view), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_5) {
-
-      /* "pysam/csamtools.pyx":3423
- *         # recover. Thus redirect output to file with -o option.
- *         if method == "view":
- *             if "-o" in args: raise ValueError("option -o is forbidden in samtools view")             # <<<<<<<<<<<<<<
- *             args = ( "-o", stdout_f ) + args
- * 
- */
-      __pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_189), __pyx_v_args, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_5) {
-        __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_191), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L21;
-      }
-      __pyx_L21:;
-
-      /* "pysam/csamtools.pyx":3424
- *         if method == "view":
- *             if "-o" in args: raise ValueError("option -o is forbidden in samtools view")
- *             args = ( "-o", stdout_f ) + args             # <<<<<<<<<<<<<<
- * 
- *     # do the function call to samtools
- */
-      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_189));
-      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_189));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_189));
-      __Pyx_INCREF(__pyx_v_stdout_f);
-      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_stdout_f);
-      __Pyx_GIVEREF(__pyx_v_stdout_f);
-      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_1), __pyx_v_args); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      __Pyx_DECREF(__pyx_v_args);
-      __pyx_v_args = __pyx_t_3;
-      __pyx_t_3 = 0;
-      goto __pyx_L20;
-    }
-    __pyx_L20:;
-    goto __pyx_L7;
-  }
-  __pyx_L7:;
-
-  /* "pysam/csamtools.pyx":3430
- *     cdef int i, n, retval
- * 
- *     n = len(args)             # <<<<<<<<<<<<<<
- *     method = _force_cmdline_bytes(method)
- *     args = [ _force_cmdline_bytes(a) for a in args ]
- */
-  __pyx_t_12 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_n = __pyx_t_12;
-
-  /* "pysam/csamtools.pyx":3431
- * 
- *     n = len(args)
- *     method = _force_cmdline_bytes(method)             # <<<<<<<<<<<<<<
- *     args = [ _force_cmdline_bytes(a) for a in args ]
- * 
- */
-  __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_cmdline_bytes(__pyx_v_method)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_v_method);
-  __pyx_v_method = __pyx_t_3;
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":3432
- *     n = len(args)
- *     method = _force_cmdline_bytes(method)
- *     args = [ _force_cmdline_bytes(a) for a in args ]             # <<<<<<<<<<<<<<
- * 
- *     # allocate two more for first (dummy) argument (contains command)
- */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  if (PyList_CheckExact(__pyx_v_args) || PyTuple_CheckExact(__pyx_v_args)) {
-    __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
-    __pyx_t_13 = NULL;
-  } else {
-    __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext;
-  }
-  for (;;) {
-    if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else {
-      __pyx_t_4 = __pyx_t_13(__pyx_t_1);
-      if (unlikely(!__pyx_t_4)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_4);
-    }
-    __Pyx_XDECREF(__pyx_v_a);
-    __pyx_v_a = __pyx_t_4;
-    __pyx_t_4 = 0;
-    __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_cmdline_bytes(__pyx_v_a)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = ((PyObject *)__pyx_t_3);
-  __Pyx_INCREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __Pyx_DECREF(__pyx_v_args);
-  __pyx_v_args = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":3435
- * 
- *     # allocate two more for first (dummy) argument (contains command)
- *     cargs = <char**>calloc( n+2, sizeof( char *) )             # <<<<<<<<<<<<<<
- *     cargs[0] = "samtools"
- *     cargs[1] = method
- */
-  __pyx_v_cargs = ((char **)calloc((__pyx_v_n + 2), (sizeof(char *))));
-
-  /* "pysam/csamtools.pyx":3436
- *     # allocate two more for first (dummy) argument (contains command)
- *     cargs = <char**>calloc( n+2, sizeof( char *) )
- *     cargs[0] = "samtools"             # <<<<<<<<<<<<<<
- *     cargs[1] = method
- *     for i from 0 <= i < n: cargs[i+2] = args[i]
- */
-  (__pyx_v_cargs[0]) = __pyx_k__samtools;
-
-  /* "pysam/csamtools.pyx":3437
- *     cargs = <char**>calloc( n+2, sizeof( char *) )
- *     cargs[0] = "samtools"
- *     cargs[1] = method             # <<<<<<<<<<<<<<
- *     for i from 0 <= i < n: cargs[i+2] = args[i]
- * 
- */
-  __pyx_t_14 = PyBytes_AsString(__pyx_v_method); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  (__pyx_v_cargs[1]) = __pyx_t_14;
-
-  /* "pysam/csamtools.pyx":3438
- *     cargs[0] = "samtools"
- *     cargs[1] = method
- *     for i from 0 <= i < n: cargs[i+2] = args[i]             # <<<<<<<<<<<<<<
- * 
- *     retval = pysam_dispatch(n+2, cargs)
- */
-  __pyx_t_8 = __pyx_v_n;
-  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {
-    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_args, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_14 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    (__pyx_v_cargs[(__pyx_v_i + 2)]) = __pyx_t_14;
-  }
-
-  /* "pysam/csamtools.pyx":3440
- *     for i from 0 <= i < n: cargs[i+2] = args[i]
- * 
- *     retval = pysam_dispatch(n+2, cargs)             # <<<<<<<<<<<<<<
- *     free( cargs )
- * 
- */
-  __pyx_v_retval = pysam_dispatch((__pyx_v_n + 2), __pyx_v_cargs);
-
-  /* "pysam/csamtools.pyx":3441
- * 
- *     retval = pysam_dispatch(n+2, cargs)
- *     free( cargs )             # <<<<<<<<<<<<<<
- * 
- *     # restore stdout/stderr. This will also flush, so
- */
-  free(__pyx_v_cargs);
-
-  /* "pysam/csamtools.pyx":3445
- *     # restore stdout/stderr. This will also flush, so
- *     # needs to be before reading back the file contents
- *     if catch_stdout:             # <<<<<<<<<<<<<<
- *         stdout_save.restore()
- *         try:
- */
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_5) {
-
-    /* "pysam/csamtools.pyx":3446
- *     # needs to be before reading back the file contents
- *     if catch_stdout:
- *         stdout_save.restore()             # <<<<<<<<<<<<<<
- *         try:
- *             with open( stdout_f, "r") as inf:
- */
-    if (unlikely(!__pyx_v_stdout_save)) { __Pyx_RaiseUnboundLocalError("stdout_save"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_stdout_save, __pyx_n_s__restore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3446; __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 = 3446; __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_3); __pyx_t_3 = 0;
-
-    /* "pysam/csamtools.pyx":3447
- *     if catch_stdout:
- *         stdout_save.restore()
- *         try:             # <<<<<<<<<<<<<<
- *             with open( stdout_f, "r") as inf:
- *                 out_stdout = inf.readlines()
- */
-    {
-      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
-      __Pyx_XGOTREF(__pyx_t_11);
-      __Pyx_XGOTREF(__pyx_t_10);
-      __Pyx_XGOTREF(__pyx_t_9);
-      /*try:*/ {
-
-        /* "pysam/csamtools.pyx":3448
- *         stdout_save.restore()
- *         try:
- *             with open( stdout_f, "r") as inf:             # <<<<<<<<<<<<<<
- *                 out_stdout = inf.readlines()
- *         except UnicodeDecodeError:
- */
-        /*with:*/ {
-          if (unlikely(!__pyx_v_stdout_f)) { __Pyx_RaiseUnboundLocalError("stdout_f"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L27_error;} }
-          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_INCREF(__pyx_v_stdout_f);
-          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stdout_f);
-          __Pyx_GIVEREF(__pyx_v_stdout_f);
-          __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
-          PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__r));
-          __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
-          __pyx_t_1 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-          __pyx_t_15 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
-          __Pyx_GOTREF(__pyx_t_15);
-          __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____enter__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L35_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 = 3448; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          /*try:*/ {
-            {
-              __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
-              __Pyx_XGOTREF(__pyx_t_16);
-              __Pyx_XGOTREF(__pyx_t_17);
-              __Pyx_XGOTREF(__pyx_t_18);
-              /*try:*/ {
-                __Pyx_INCREF(__pyx_t_4);
-                __pyx_v_inf = __pyx_t_4;
-                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-                /* "pysam/csamtools.pyx":3449
- *         try:
- *             with open( stdout_f, "r") as inf:
- *                 out_stdout = inf.readlines()             # <<<<<<<<<<<<<<
- *         except UnicodeDecodeError:
- *             with open( stdout_f, "rb") as inf:
- */
-                __pyx_t_4 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3449; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
-                __Pyx_GOTREF(__pyx_t_4);
-                __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 = 3449; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
-                __Pyx_GOTREF(__pyx_t_1);
-                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-                __pyx_v_out_stdout = __pyx_t_1;
-                __pyx_t_1 = 0;
-              }
-              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
-              goto __pyx_L48_try_end;
-              __pyx_L41_error:;
-              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-              /* "pysam/csamtools.pyx":3448
- *         stdout_save.restore()
- *         try:
- *             with open( stdout_f, "r") as inf:             # <<<<<<<<<<<<<<
- *                 out_stdout = inf.readlines()
- *         except UnicodeDecodeError:
- */
-              /*except:*/ {
-                __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-                if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
-                __Pyx_GOTREF(__pyx_t_1);
-                __Pyx_GOTREF(__pyx_t_4);
-                __Pyx_GOTREF(__pyx_t_3);
-                __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
-                __Pyx_GOTREF(__pyx_t_6);
-                __Pyx_INCREF(__pyx_t_1);
-                PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
-                __Pyx_GIVEREF(__pyx_t_1);
-                __Pyx_INCREF(__pyx_t_4);
-                PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
-                __Pyx_GIVEREF(__pyx_t_4);
-                __Pyx_INCREF(__pyx_t_3);
-                PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
-                __Pyx_GIVEREF(__pyx_t_3);
-                __pyx_t_19 = PyObject_Call(__pyx_t_15, __pyx_t_6, NULL);
-                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-                if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
-                __Pyx_GOTREF(__pyx_t_19);
-                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_19);
-                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
-                if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
-                __pyx_t_2 = (!__pyx_t_5);
-                if (__pyx_t_2) {
-                  __Pyx_GIVEREF(__pyx_t_1);
-                  __Pyx_GIVEREF(__pyx_t_4);
-                  __Pyx_GIVEREF(__pyx_t_3);
-                  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_4, __pyx_t_3);
-                  __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; 
-                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
-                  goto __pyx_L52;
-                }
-                __pyx_L52:;
-                __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-                goto __pyx_L42_exception_handled;
-              }
-              __pyx_L43_except_error:;
-              __Pyx_XGIVEREF(__pyx_t_16);
-              __Pyx_XGIVEREF(__pyx_t_17);
-              __Pyx_XGIVEREF(__pyx_t_18);
-              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
-              goto __pyx_L27_error;
-              __pyx_L42_exception_handled:;
-              __Pyx_XGIVEREF(__pyx_t_16);
-              __Pyx_XGIVEREF(__pyx_t_17);
-              __Pyx_XGIVEREF(__pyx_t_18);
-              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
-              __pyx_L48_try_end:;
-            }
-          }
-          /*finally:*/ {
-            if (__pyx_t_15) {
-              __pyx_t_18 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_192, NULL);
-              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-              if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
-              __Pyx_GOTREF(__pyx_t_18);
-              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_18);
-              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-              if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
-            }
-          }
-          goto __pyx_L53;
-          __pyx_L35_error:;
-          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-          goto __pyx_L27_error;
-          __pyx_L53:;
-        }
-      }
-      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-      goto __pyx_L34_try_end;
-      __pyx_L27_error:;
-      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __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;
-
-      /* "pysam/csamtools.pyx":3450
- *             with open( stdout_f, "r") as inf:
- *                 out_stdout = inf.readlines()
- *         except UnicodeDecodeError:             # <<<<<<<<<<<<<<
- *             with open( stdout_f, "rb") as inf:
- *                 # read binary output
- */
-      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
-      if (__pyx_t_8) {
-        __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3450; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_GOTREF(__pyx_t_1);
-
-        /* "pysam/csamtools.pyx":3451
- *                 out_stdout = inf.readlines()
- *         except UnicodeDecodeError:
- *             with open( stdout_f, "rb") as inf:             # <<<<<<<<<<<<<<
- *                 # read binary output
- *                 out_stdout = inf.read()
- */
-        /*with:*/ {
-          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_INCREF(__pyx_v_stdout_f);
-          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stdout_f);
-          __Pyx_GIVEREF(__pyx_v_stdout_f);
-          __Pyx_INCREF(((PyObject *)__pyx_n_s__rb));
-          PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__rb));
-          __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rb));
-          __pyx_t_20 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
-          __Pyx_GOTREF(__pyx_t_20);
-          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-          __pyx_t_15 = PyObject_GetAttr(__pyx_t_20, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
-          __Pyx_GOTREF(__pyx_t_15);
-          __pyx_t_6 = PyObject_GetAttr(__pyx_t_20, __pyx_n_s____enter__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __pyx_t_21 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-          __Pyx_GOTREF(__pyx_t_21);
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-          /*try:*/ {
-            {
-              __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
-              __Pyx_XGOTREF(__pyx_t_18);
-              __Pyx_XGOTREF(__pyx_t_17);
-              __Pyx_XGOTREF(__pyx_t_16);
-              /*try:*/ {
-                __Pyx_INCREF(__pyx_t_21);
-                __Pyx_XDECREF(__pyx_v_inf);
-                __pyx_v_inf = __pyx_t_21;
-                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
-
-                /* "pysam/csamtools.pyx":3453
- *             with open( stdout_f, "rb") as inf:
- *                 # read binary output
- *                 out_stdout = inf.read()             # <<<<<<<<<<<<<<
- *         os.remove( stdout_f )
- *     else:
- */
-                __pyx_t_21 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__read); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3453; __pyx_clineno = __LINE__; goto __pyx_L62_error;}
-                __Pyx_GOTREF(__pyx_t_21);
-                __pyx_t_20 = PyObject_Call(__pyx_t_21, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3453; __pyx_clineno = __LINE__; goto __pyx_L62_error;}
-                __Pyx_GOTREF(__pyx_t_20);
-                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
-                __Pyx_XDECREF(__pyx_v_out_stdout);
-                __pyx_v_out_stdout = __pyx_t_20;
-                __pyx_t_20 = 0;
-              }
-              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
-              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-              goto __pyx_L69_try_end;
-              __pyx_L62_error:;
-              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
-              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
-
-              /* "pysam/csamtools.pyx":3451
- *                 out_stdout = inf.readlines()
- *         except UnicodeDecodeError:
- *             with open( stdout_f, "rb") as inf:             # <<<<<<<<<<<<<<
- *                 # read binary output
- *                 out_stdout = inf.read()
- */
-              /*except:*/ {
-                __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-                if (__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
-                __Pyx_GOTREF(__pyx_t_20);
-                __Pyx_GOTREF(__pyx_t_21);
-                __Pyx_GOTREF(__pyx_t_6);
-                __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
-                __Pyx_GOTREF(__pyx_t_22);
-                __Pyx_INCREF(__pyx_t_20);
-                PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_20);
-                __Pyx_GIVEREF(__pyx_t_20);
-                __Pyx_INCREF(__pyx_t_21);
-                PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_21);
-                __Pyx_GIVEREF(__pyx_t_21);
-                __Pyx_INCREF(__pyx_t_6);
-                PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_6);
-                __Pyx_GIVEREF(__pyx_t_6);
-                __pyx_t_19 = PyObject_Call(__pyx_t_15, __pyx_t_22, NULL);
-                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-                if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
-                __Pyx_GOTREF(__pyx_t_19);
-                __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_19);
-                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
-                if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
-                __pyx_t_5 = (!__pyx_t_2);
-                if (__pyx_t_5) {
-                  __Pyx_GIVEREF(__pyx_t_20);
-                  __Pyx_GIVEREF(__pyx_t_21);
-                  __Pyx_GIVEREF(__pyx_t_6);
-                  __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_6);
-                  __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_6 = 0; 
-                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
-                  goto __pyx_L73;
-                }
-                __pyx_L73:;
-                __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
-                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
-                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-                goto __pyx_L63_exception_handled;
-              }
-              __pyx_L64_except_error:;
-              __Pyx_XGIVEREF(__pyx_t_18);
-              __Pyx_XGIVEREF(__pyx_t_17);
-              __Pyx_XGIVEREF(__pyx_t_16);
-              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
-              goto __pyx_L29_except_error;
-              __pyx_L63_exception_handled:;
-              __Pyx_XGIVEREF(__pyx_t_18);
-              __Pyx_XGIVEREF(__pyx_t_17);
-              __Pyx_XGIVEREF(__pyx_t_16);
-              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
-              __pyx_L69_try_end:;
-            }
-          }
-          /*finally:*/ {
-            if (__pyx_t_15) {
-              __pyx_t_16 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_193, NULL);
-              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-              if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
-              __Pyx_GOTREF(__pyx_t_16);
-              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16);
-              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
-              if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
-            }
-          }
-          goto __pyx_L74;
-          __pyx_L56_error:;
-          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-          goto __pyx_L29_except_error;
-          __pyx_L74:;
-        }
-        __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_L28_exception_handled;
-      }
-      __pyx_L29_except_error:;
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_XGIVEREF(__pyx_t_10);
-      __Pyx_XGIVEREF(__pyx_t_9);
-      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
-      goto __pyx_L1_error;
-      __pyx_L28_exception_handled:;
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_XGIVEREF(__pyx_t_10);
-      __Pyx_XGIVEREF(__pyx_t_9);
-      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
-      __pyx_L34_try_end:;
-    }
-
-    /* "pysam/csamtools.pyx":3454
- *                 # read binary output
- *                 out_stdout = inf.read()
- *         os.remove( stdout_f )             # <<<<<<<<<<<<<<
- *     else:
- *         out_stdout = []
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_v_stdout_f);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_stdout_f);
-    __Pyx_GIVEREF(__pyx_v_stdout_f);
-    __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 = 3454; __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;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    goto __pyx_L26;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":3456
- *         os.remove( stdout_f )
- *     else:
- *         out_stdout = []             # <<<<<<<<<<<<<<
- * 
- *     # get error messages
- */
-    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_v_out_stdout = ((PyObject *)__pyx_t_3);
-    __pyx_t_3 = 0;
-  }
-  __pyx_L26:;
-
-  /* "pysam/csamtools.pyx":3459
- * 
- *     # get error messages
- *     pysam_unset_stderr()             # <<<<<<<<<<<<<<
- *     try:
- *         with open( stderr_f, "r") as inf:
- */
-  pysam_unset_stderr();
-
-  /* "pysam/csamtools.pyx":3460
- *     # get error messages
- *     pysam_unset_stderr()
- *     try:             # <<<<<<<<<<<<<<
- *         with open( stderr_f, "r") as inf:
- *             out_stderr = inf.readlines()
- */
-  /*try:*/ {
-    {
-      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
-      __Pyx_XGOTREF(__pyx_t_9);
-      __Pyx_XGOTREF(__pyx_t_10);
-      __Pyx_XGOTREF(__pyx_t_11);
-      /*try:*/ {
-
-        /* "pysam/csamtools.pyx":3461
- *     pysam_unset_stderr()
- *     try:
- *         with open( stderr_f, "r") as inf:             # <<<<<<<<<<<<<<
- *             out_stderr = inf.readlines()
- *     except UnicodeDecodeError:
- */
-        /*with:*/ {
-          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_INCREF(__pyx_v_stderr_f);
-          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stderr_f);
-          __Pyx_GIVEREF(__pyx_v_stderr_f);
-          __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
-          PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__r));
-          __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
-          __pyx_t_1 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-          __pyx_t_15 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
-          __Pyx_GOTREF(__pyx_t_15);
-          __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____enter__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L86_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 = 3461; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          /*try:*/ {
-            {
-              __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
-              __Pyx_XGOTREF(__pyx_t_16);
-              __Pyx_XGOTREF(__pyx_t_17);
-              __Pyx_XGOTREF(__pyx_t_18);
-              /*try:*/ {
-                __Pyx_INCREF(__pyx_t_4);
-                __Pyx_XDECREF(__pyx_v_inf);
-                __pyx_v_inf = __pyx_t_4;
-                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-                /* "pysam/csamtools.pyx":3462
- *     try:
- *         with open( stderr_f, "r") as inf:
- *             out_stderr = inf.readlines()             # <<<<<<<<<<<<<<
- *     except UnicodeDecodeError:
- *         with open( stderr_f, "rb") as inf:
- */
-                __pyx_t_4 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3462; __pyx_clineno = __LINE__; goto __pyx_L92_error;}
-                __Pyx_GOTREF(__pyx_t_4);
-                __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 = 3462; __pyx_clineno = __LINE__; goto __pyx_L92_error;}
-                __Pyx_GOTREF(__pyx_t_1);
-                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-                __pyx_v_out_stderr = __pyx_t_1;
-                __pyx_t_1 = 0;
-              }
-              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
-              goto __pyx_L99_try_end;
-              __pyx_L92_error:;
-              __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
-              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
-              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
-              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-              /* "pysam/csamtools.pyx":3461
- *     pysam_unset_stderr()
- *     try:
- *         with open( stderr_f, "r") as inf:             # <<<<<<<<<<<<<<
- *             out_stderr = inf.readlines()
- *     except UnicodeDecodeError:
- */
-              /*except:*/ {
-                __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-                if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
-                __Pyx_GOTREF(__pyx_t_1);
-                __Pyx_GOTREF(__pyx_t_4);
-                __Pyx_GOTREF(__pyx_t_3);
-                __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
-                __Pyx_GOTREF(__pyx_t_6);
-                __Pyx_INCREF(__pyx_t_1);
-                PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
-                __Pyx_GIVEREF(__pyx_t_1);
-                __Pyx_INCREF(__pyx_t_4);
-                PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
-                __Pyx_GIVEREF(__pyx_t_4);
-                __Pyx_INCREF(__pyx_t_3);
-                PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
-                __Pyx_GIVEREF(__pyx_t_3);
-                __pyx_t_19 = PyObject_Call(__pyx_t_15, __pyx_t_6, NULL);
-                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-                if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
-                __Pyx_GOTREF(__pyx_t_19);
-                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_19);
-                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
-                if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
-                __pyx_t_2 = (!__pyx_t_5);
-                if (__pyx_t_2) {
-                  __Pyx_GIVEREF(__pyx_t_1);
-                  __Pyx_GIVEREF(__pyx_t_4);
-                  __Pyx_GIVEREF(__pyx_t_3);
-                  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_4, __pyx_t_3);
-                  __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; 
-                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
-                  goto __pyx_L103;
-                }
-                __pyx_L103:;
-                __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-                goto __pyx_L93_exception_handled;
-              }
-              __pyx_L94_except_error:;
-              __Pyx_XGIVEREF(__pyx_t_16);
-              __Pyx_XGIVEREF(__pyx_t_17);
-              __Pyx_XGIVEREF(__pyx_t_18);
-              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
-              goto __pyx_L78_error;
-              __pyx_L93_exception_handled:;
-              __Pyx_XGIVEREF(__pyx_t_16);
-              __Pyx_XGIVEREF(__pyx_t_17);
-              __Pyx_XGIVEREF(__pyx_t_18);
-              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
-              __pyx_L99_try_end:;
-            }
-          }
-          /*finally:*/ {
-            if (__pyx_t_15) {
-              __pyx_t_18 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_194, NULL);
-              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-              if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
-              __Pyx_GOTREF(__pyx_t_18);
-              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_18);
-              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
-              if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
-            }
-          }
-          goto __pyx_L104;
-          __pyx_L86_error:;
-          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-          goto __pyx_L78_error;
-          __pyx_L104:;
-        }
-      }
-      /*else:*/ {
-
-        /* "pysam/csamtools.pyx":3468
- *             out_stderr = inf.read()
- *     else:
- *         out_stderr = []             # <<<<<<<<<<<<<<
- *     finally:
- *         os.remove( stderr_f )
- */
-        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3468; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_XDECREF(__pyx_v_out_stderr);
-        __pyx_v_out_stderr = ((PyObject *)__pyx_t_3);
-        __pyx_t_3 = 0;
-      }
-      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-      goto __pyx_L85_try_end;
-      __pyx_L78_error:;
-      __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
-      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
-      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
-      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __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;
-
-      /* "pysam/csamtools.pyx":3463
- *         with open( stderr_f, "r") as inf:
- *             out_stderr = inf.readlines()
- *     except UnicodeDecodeError:             # <<<<<<<<<<<<<<
- *         with open( stderr_f, "rb") as inf:
- *             # read binary output
- */
-      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
-      if (__pyx_t_8) {
-        __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3463; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_GOTREF(__pyx_t_1);
-
-        /* "pysam/csamtools.pyx":3464
- *             out_stderr = inf.readlines()
- *     except UnicodeDecodeError:
- *         with open( stderr_f, "rb") as inf:             # <<<<<<<<<<<<<<
- *             # read binary output
- *             out_stderr = inf.read()
- */
-        /*with:*/ {
-          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_INCREF(__pyx_v_stderr_f);
-          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stderr_f);
-          __Pyx_GIVEREF(__pyx_v_stderr_f);
-          __Pyx_INCREF(((PyObject *)__pyx_n_s__rb));
-          PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__rb));
-          __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rb));
-          __pyx_t_21 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
-          __Pyx_GOTREF(__pyx_t_21);
-          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-          __pyx_t_15 = PyObject_GetAttr(__pyx_t_21, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
-          __Pyx_GOTREF(__pyx_t_15);
-          __pyx_t_6 = PyObject_GetAttr(__pyx_t_21, __pyx_n_s____enter__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L107_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __pyx_t_20 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L107_error;}
-          __Pyx_GOTREF(__pyx_t_20);
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-          __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
-          /*try:*/ {
-            {
-              __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
-              __Pyx_XGOTREF(__pyx_t_18);
-              __Pyx_XGOTREF(__pyx_t_17);
-              __Pyx_XGOTREF(__pyx_t_16);
-              /*try:*/ {
-                __Pyx_INCREF(__pyx_t_20);
-                __Pyx_XDECREF(__pyx_v_inf);
-                __pyx_v_inf = __pyx_t_20;
-                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-
-                /* "pysam/csamtools.pyx":3466
- *         with open( stderr_f, "rb") as inf:
- *             # read binary output
- *             out_stderr = inf.read()             # <<<<<<<<<<<<<<
- *     else:
- *         out_stderr = []
- */
-                __pyx_t_20 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__read); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
-                __Pyx_GOTREF(__pyx_t_20);
-                __pyx_t_21 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
-                __Pyx_GOTREF(__pyx_t_21);
-                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-                __Pyx_XDECREF(__pyx_v_out_stderr);
-                __pyx_v_out_stderr = __pyx_t_21;
-                __pyx_t_21 = 0;
-              }
-              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
-              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-              goto __pyx_L120_try_end;
-              __pyx_L113_error:;
-              __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
-              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
-              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
-
-              /* "pysam/csamtools.pyx":3464
- *             out_stderr = inf.readlines()
- *     except UnicodeDecodeError:
- *         with open( stderr_f, "rb") as inf:             # <<<<<<<<<<<<<<
- *             # read binary output
- *             out_stderr = inf.read()
- */
-              /*except:*/ {
-                __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-                if (__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
-                __Pyx_GOTREF(__pyx_t_21);
-                __Pyx_GOTREF(__pyx_t_20);
-                __Pyx_GOTREF(__pyx_t_6);
-                __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
-                __Pyx_GOTREF(__pyx_t_22);
-                __Pyx_INCREF(__pyx_t_21);
-                PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_21);
-                __Pyx_GIVEREF(__pyx_t_21);
-                __Pyx_INCREF(__pyx_t_20);
-                PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_20);
-                __Pyx_GIVEREF(__pyx_t_20);
-                __Pyx_INCREF(__pyx_t_6);
-                PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_6);
-                __Pyx_GIVEREF(__pyx_t_6);
-                __pyx_t_19 = PyObject_Call(__pyx_t_15, __pyx_t_22, NULL);
-                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-                if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
-                __Pyx_GOTREF(__pyx_t_19);
-                __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_19);
-                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
-                if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
-                __pyx_t_5 = (!__pyx_t_2);
-                if (__pyx_t_5) {
-                  __Pyx_GIVEREF(__pyx_t_21);
-                  __Pyx_GIVEREF(__pyx_t_20);
-                  __Pyx_GIVEREF(__pyx_t_6);
-                  __Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_6);
-                  __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_6 = 0; 
-                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
-                  goto __pyx_L124;
-                }
-                __pyx_L124:;
-                __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
-                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
-                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
-                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-                goto __pyx_L114_exception_handled;
-              }
-              __pyx_L115_except_error:;
-              __Pyx_XGIVEREF(__pyx_t_18);
-              __Pyx_XGIVEREF(__pyx_t_17);
-              __Pyx_XGIVEREF(__pyx_t_16);
-              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
-              goto __pyx_L80_except_error;
-              __pyx_L114_exception_handled:;
-              __Pyx_XGIVEREF(__pyx_t_18);
-              __Pyx_XGIVEREF(__pyx_t_17);
-              __Pyx_XGIVEREF(__pyx_t_16);
-              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
-              __pyx_L120_try_end:;
-            }
-          }
-          /*finally:*/ {
-            if (__pyx_t_15) {
-              __pyx_t_16 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_195, NULL);
-              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-              if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
-              __Pyx_GOTREF(__pyx_t_16);
-              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16);
-              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
-              if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
-            }
-          }
-          goto __pyx_L125;
-          __pyx_L107_error:;
-          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-          goto __pyx_L80_except_error;
-          __pyx_L125:;
-        }
-        __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_L79_exception_handled;
-      }
-      __pyx_L80_except_error:;
-      __Pyx_XGIVEREF(__pyx_t_9);
-      __Pyx_XGIVEREF(__pyx_t_10);
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
-      goto __pyx_L76;
-      __pyx_L79_exception_handled:;
-      __Pyx_XGIVEREF(__pyx_t_9);
-      __Pyx_XGIVEREF(__pyx_t_10);
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
-      __pyx_L85_try_end:;
-    }
-  }
-
-  /* "pysam/csamtools.pyx":3470
- *         out_stderr = []
- *     finally:
- *         os.remove( stderr_f )             # <<<<<<<<<<<<<<
- * 
- *     return retval, out_stderr, out_stdout
- */
-  /*finally:*/ {
-    int __pyx_why;
-    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
-    int __pyx_exc_lineno;
-    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
-    __pyx_why = 0; goto __pyx_L77;
-    __pyx_L76: {
-      __pyx_why = 4;
-      __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
-      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
-      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
-      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
-      __pyx_exc_lineno = __pyx_lineno;
-      goto __pyx_L77;
-    }
-    __pyx_L77:;
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3470; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3470; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3470; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_v_stderr_f);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_stderr_f);
-    __Pyx_GIVEREF(__pyx_v_stderr_f);
-    __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 = 3470; __pyx_clineno = __LINE__; goto __pyx_L126_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;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    goto __pyx_L127;
-    __pyx_L126_error:;
-    if (__pyx_why == 4) {
-      Py_XDECREF(__pyx_exc_type);
-      Py_XDECREF(__pyx_exc_value);
-      Py_XDECREF(__pyx_exc_tb);
-    }
-    goto __pyx_L1_error;
-    __pyx_L127:;
-    switch (__pyx_why) {
-      case 4: {
-        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
-        __pyx_lineno = __pyx_exc_lineno;
-        __pyx_exc_type = 0;
-        __pyx_exc_value = 0;
-        __pyx_exc_tb = 0;
-        goto __pyx_L1_error;
-      }
-    }
-  }
-
-  /* "pysam/csamtools.pyx":3472
- *         os.remove( stderr_f )
- * 
- *     return retval, out_stderr, out_stdout             # <<<<<<<<<<<<<<
- * 
- * cdef class SNPCall:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  if (unlikely(!__pyx_v_out_stderr)) { __Pyx_RaiseUnboundLocalError("out_stderr"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-  if (unlikely(!__pyx_v_out_stdout)) { __Pyx_RaiseUnboundLocalError("out_stdout"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3472; __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 = 3472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  __Pyx_INCREF(__pyx_v_out_stderr);
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_out_stderr);
-  __Pyx_GIVEREF(__pyx_v_out_stderr);
-  __Pyx_INCREF(__pyx_v_out_stdout);
-  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_out_stdout);
-  __Pyx_GIVEREF(__pyx_v_out_stdout);
-  __pyx_t_3 = 0;
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_20);
-  __Pyx_XDECREF(__pyx_t_21);
-  __Pyx_XDECREF(__pyx_t_22);
-  __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_stderr_h);
-  __Pyx_XDECREF(__pyx_v_stderr_f);
-  __Pyx_XDECREF(__pyx_v_stdout_h);
-  __Pyx_XDECREF(__pyx_v_stdout_f);
-  __Pyx_XDECREF(__pyx_v_stdout_save);
-  __Pyx_XDECREF(__pyx_v_inf);
-  __Pyx_XDECREF(__pyx_v_out_stdout);
-  __Pyx_XDECREF(__pyx_v_out_stderr);
-  __Pyx_XDECREF(__pyx_v_a);
-  __Pyx_XDECREF(__pyx_v_method);
-  __Pyx_XDECREF(__pyx_v_args);
-  __Pyx_XDECREF(__pyx_v_catch_stdout);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_3tid_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_3tid_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall_3tid___get__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3487
- *     property tid:
- *         '''the chromosome ID as is defined in the header'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._tid
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_3tid___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3487);
-
-  /* "pysam/csamtools.pyx":3488
- *         '''the chromosome ID as is defined in the header'''
- *         def __get__(self):
- *             return self._tid             # <<<<<<<<<<<<<<
- * 
- *     property pos:
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3488; __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("pysam.csamtools.SNPCall.tid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_3pos_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall_3pos___get__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3492
- *     property pos:
- *        '''nucleotide position of SNP.'''
- *        def __get__(self): return self._pos             # <<<<<<<<<<<<<<
- * 
- *     property reference_base:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_3pos___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3492);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3492; __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("pysam.csamtools.SNPCall.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_14reference_base_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_14reference_base_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall_14reference_base___get__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3496
- *     property reference_base:
- *        '''reference base at pos. ``N`` if no reference sequence supplied.'''
- *        def __get__(self): return from_string_and_size( &self._reference_base, 1 )             # <<<<<<<<<<<<<<
- * 
- *     property genotype:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_14reference_base___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3496);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __pyx_f_5pysam_9csamtools_from_string_and_size((&__pyx_v_self->_reference_base), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3496; __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("pysam.csamtools.SNPCall.reference_base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_8genotype_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_8genotype_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall_8genotype___get__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3500
- *     property genotype:
- *        '''the genotype called.'''
- *        def __get__(self): return from_string_and_size( &self._genotype, 1 )             # <<<<<<<<<<<<<<
- * 
- *     property consensus_quality:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_8genotype___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3500);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __pyx_f_5pysam_9csamtools_from_string_and_size((&__pyx_v_self->_genotype), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3500; __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("pysam.csamtools.SNPCall.genotype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_17consensus_quality_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_17consensus_quality_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall_17consensus_quality___get__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3504
- *     property consensus_quality:
- *        '''the genotype quality (Phred-scaled).'''
- *        def __get__(self): return self._consensus_quality             # <<<<<<<<<<<<<<
- * 
- *     property snp_quality:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_17consensus_quality___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3504);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_consensus_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3504; __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("pysam.csamtools.SNPCall.consensus_quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_11snp_quality_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_11snp_quality_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall_11snp_quality___get__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3508
- *     property snp_quality:
- *        '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
- *        def __get__(self): return self._snp_quality             # <<<<<<<<<<<<<<
- * 
- *     property mapping_quality:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_11snp_quality___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3508);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_snp_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3508; __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("pysam.csamtools.SNPCall.snp_quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_15mapping_quality_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_15mapping_quality_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall_15mapping_quality___get__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3512
- *     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:
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_15mapping_quality___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3512);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_rms_mapping_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3512; __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("pysam.csamtools.SNPCall.mapping_quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_8coverage_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_8coverage_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall_8coverage___get__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3516
- *     property coverage:
- *        '''coverage or read depth - the number of reads involved in the call.'''
- *        def __get__(self): return self._coverage             # <<<<<<<<<<<<<<
- * 
- *     def __str__(self):
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall_8coverage___get__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
-  __Pyx_TraceCall("__get__", __pyx_f[0], 3516);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_coverage); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3516; __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("pysam.csamtools.SNPCall.coverage.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_1__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_9csamtools_7SNPCall_1__str__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_7SNPCall___str__(((struct __pyx_obj_5pysam_9csamtools_SNPCall *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":3518
- *        def __get__(self): return self._coverage
- * 
- *     def __str__(self):             # <<<<<<<<<<<<<<
- * 
- *         return "\t".join( map(str, (
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_7SNPCall___str__(struct __pyx_obj_5pysam_9csamtools_SNPCall *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__str__", 0);
-  __Pyx_TraceCall("__str__", __pyx_f[0], 3518);
-
-  /* "pysam/csamtools.pyx":3520
- *     def __str__(self):
- * 
- *         return "\t".join( map(str, (             # <<<<<<<<<<<<<<
- *                     self.tid,
- *                     self.pos,
- */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-
-  /* "pysam/csamtools.pyx":3521
- * 
- *         return "\t".join( map(str, (
- *                     self.tid,             # <<<<<<<<<<<<<<
- *                     self.pos,
- *                     self.reference_base,
- */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-
-  /* "pysam/csamtools.pyx":3522
- *         return "\t".join( map(str, (
- *                     self.tid,
- *                     self.pos,             # <<<<<<<<<<<<<<
- *                     self.reference_base,
- *                     self.genotype,
- */
-  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-
-  /* "pysam/csamtools.pyx":3523
- *                     self.tid,
- *                     self.pos,
- *                     self.reference_base,             # <<<<<<<<<<<<<<
- *                     self.genotype,
- *                     self.consensus_quality,
- */
-  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__reference_base); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-
-  /* "pysam/csamtools.pyx":3524
- *                     self.pos,
- *                     self.reference_base,
- *                     self.genotype,             # <<<<<<<<<<<<<<
- *                     self.consensus_quality,
- *                     self.snp_quality,
- */
-  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__genotype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-
-  /* "pysam/csamtools.pyx":3525
- *                     self.reference_base,
- *                     self.genotype,
- *                     self.consensus_quality,             # <<<<<<<<<<<<<<
- *                     self.snp_quality,
- *                     self.mapping_quality,
- */
-  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__consensus_quality); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-
-  /* "pysam/csamtools.pyx":3526
- *                     self.genotype,
- *                     self.consensus_quality,
- *                     self.snp_quality,             # <<<<<<<<<<<<<<
- *                     self.mapping_quality,
- *                     self.coverage ) ) )
- */
-  __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__snp_quality); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-
-  /* "pysam/csamtools.pyx":3527
- *                     self.consensus_quality,
- *                     self.snp_quality,
- *                     self.mapping_quality,             # <<<<<<<<<<<<<<
- *                     self.coverage ) ) )
- * 
- */
-  __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mapping_quality); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-
-  /* "pysam/csamtools.pyx":3528
- *                     self.snp_quality,
- *                     self.mapping_quality,
- *                     self.coverage ) ) )             # <<<<<<<<<<<<<<
- * 
- * 
- */
-  __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coverage); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_10 = PyTuple_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_4);
-  __Pyx_GIVEREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_6);
-  __Pyx_GIVEREF(__pyx_t_6);
-  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_7);
-  __Pyx_GIVEREF(__pyx_t_7);
-  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_8);
-  __Pyx_GIVEREF(__pyx_t_8);
-  PyTuple_SET_ITEM(__pyx_t_10, 7, __pyx_t_9);
-  __Pyx_GIVEREF(__pyx_t_9);
-  __pyx_t_2 = 0;
-  __pyx_t_3 = 0;
-  __pyx_t_4 = 0;
-  __pyx_t_5 = 0;
-  __pyx_t_6 = 0;
-  __pyx_t_7 = 0;
-  __pyx_t_8 = 0;
-  __pyx_t_9 = 0;
-  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
-  PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_t_10));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
-  __pyx_t_10 = 0;
-  __pyx_t_10 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-  __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 = 3520; __pyx_clineno = __LINE__; goto __pyx_L1_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(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-  __pyx_r = __pyx_t_10;
-  __pyx_t_10 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_AddTraceback("pysam.csamtools.SNPCall.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static int __pyx_pw_5pysam_9csamtools_12IndexedReads_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_9csamtools_12IndexedReads_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile = 0;
-  int __pyx_v_reopen;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,&__pyx_n_s__reopen,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samfile)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reopen);
-          if (value) { values[1] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
-    if (values[1]) {
-      __pyx_v_reopen = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    } else {
-
-      /* "pysam/csamtools.pyx":4038
- *     """
- * 
- *     def __init__(self, Samfile samfile, int reopen = True ):             # <<<<<<<<<<<<<<
- *         self.samfile = samfile
- * 
- */
-      __pyx_v_reopen = ((int)1);
-    }
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.csamtools.IndexedReads.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_9csamtools_12IndexedReads___init__(((struct __pyx_obj_5pysam_9csamtools_IndexedReads *)__pyx_v_self), __pyx_v_samfile, __pyx_v_reopen);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-static int __pyx_pf_5pysam_9csamtools_12IndexedReads___init__(struct __pyx_obj_5pysam_9csamtools_IndexedReads *__pyx_v_self, struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_samfile, int __pyx_v_reopen) {
-  PyObject *__pyx_v_mode = NULL;
-  PyObject *__pyx_v_store = NULL;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  const char* __pyx_t_3;
-  char *__pyx_t_4;
-  samfile_t *__pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 4038);
-
-  /* "pysam/csamtools.pyx":4039
- * 
- *     def __init__(self, Samfile samfile, int reopen = True ):
- *         self.samfile = samfile             # <<<<<<<<<<<<<<
- * 
- *         if samfile.isbam: mode = b"rb"
- */
-  __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
-  __Pyx_GOTREF(__pyx_v_self->samfile);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
-  __pyx_v_self->samfile = __pyx_v_samfile;
-
-  /* "pysam/csamtools.pyx":4041
- *         self.samfile = samfile
- * 
- *         if samfile.isbam: mode = b"rb"             # <<<<<<<<<<<<<<
- *         else: mode = b"r"
- * 
- */
-  if (__pyx_v_samfile->isbam) {
-    __Pyx_INCREF(((PyObject *)__pyx_n_b__rb));
-    __pyx_v_mode = __pyx_n_b__rb;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":4042
- * 
- *         if samfile.isbam: mode = b"rb"
- *         else: mode = b"r"             # <<<<<<<<<<<<<<
- * 
- *         # reopen the file - note that this makes the iterator
- */
-    __Pyx_INCREF(((PyObject *)__pyx_n_b__r));
-    __pyx_v_mode = __pyx_n_b__r;
-  }
-  __pyx_L3:;
-
-  /* "pysam/csamtools.pyx":4046
- *         # reopen the file - note that this makes the iterator
- *         # slow and causes pileup to slow down significantly.
- *         if reopen:             # <<<<<<<<<<<<<<
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )
- */
-  if (__pyx_v_reopen) {
-
-    /* "pysam/csamtools.pyx":4047
- *         # slow and causes pileup to slow down significantly.
- *         if reopen:
- *             store = StderrStore()             # <<<<<<<<<<<<<<
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()
- */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4047; __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 = 4047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_v_store = __pyx_t_2;
-    __pyx_t_2 = 0;
-
-    /* "pysam/csamtools.pyx":4048
- *         if reopen:
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )             # <<<<<<<<<<<<<<
- *             store.release()
- *             assert self.fp != NULL
- */
-    __pyx_t_3 = PyBytes_AsString(__pyx_v_samfile->_filename); if (unlikely((__pyx_t_3 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->fp = samopen(__pyx_t_3, __pyx_t_4, NULL);
-
-    /* "pysam/csamtools.pyx":4049
- *             store = StderrStore()
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()             # <<<<<<<<<<<<<<
- *             assert self.fp != NULL
- *             self.owns_samfile = True
- */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "pysam/csamtools.pyx":4050
- *             self.fp = samopen( samfile._filename, mode, NULL )
- *             store.release()
- *             assert self.fp != NULL             # <<<<<<<<<<<<<<
- *             self.owns_samfile = True
- *         else:
- */
-    #ifndef CYTHON_WITHOUT_ASSERTIONS
-    if (unlikely(!(__pyx_v_self->fp != NULL))) {
-      PyErr_SetNone(PyExc_AssertionError);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #endif
-
-    /* "pysam/csamtools.pyx":4051
- *             store.release()
- *             assert self.fp != NULL
- *             self.owns_samfile = True             # <<<<<<<<<<<<<<
- *         else:
- *             self.fp = samfile.samfile
- */
-    __pyx_v_self->owns_samfile = 1;
-    goto __pyx_L4;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":4053
- *             self.owns_samfile = True
- *         else:
- *             self.fp = samfile.samfile             # <<<<<<<<<<<<<<
- *             self.owns_samfile = False
- * 
- */
-    __pyx_t_5 = __pyx_v_samfile->samfile;
-    __pyx_v_self->fp = __pyx_t_5;
-
-    /* "pysam/csamtools.pyx":4054
- *         else:
- *             self.fp = samfile.samfile
- *             self.owns_samfile = False             # <<<<<<<<<<<<<<
- * 
- *         assert samfile.isbam, "can only IndexReads on bam files"
- */
-    __pyx_v_self->owns_samfile = 0;
-  }
-  __pyx_L4:;
-
-  /* "pysam/csamtools.pyx":4056
- *             self.owns_samfile = False
- * 
- *         assert samfile.isbam, "can only IndexReads on bam files"             # <<<<<<<<<<<<<<
- * 
- *     def build( self ):
- */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  if (unlikely(!__pyx_v_samfile->isbam)) {
-    PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_196));
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.csamtools.IndexedReads.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_mode);
-  __Pyx_XDECREF(__pyx_v_store);
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_12IndexedReads_3build(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_12IndexedReads_2build[] = "IndexedReads.build(self)\nbuild index.";
-static PyObject *__pyx_pw_5pysam_9csamtools_12IndexedReads_3build(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("build (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_12IndexedReads_2build(((struct __pyx_obj_5pysam_9csamtools_IndexedReads *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":4058
- *         assert samfile.isbam, "can only IndexReads on bam files"
- * 
- *     def build( self ):             # <<<<<<<<<<<<<<
- *         '''build index.'''
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_12IndexedReads_2build(struct __pyx_obj_5pysam_9csamtools_IndexedReads *__pyx_v_self) {
-  int __pyx_v_ret;
-  bam1_t *__pyx_v_b;
-  uint64_t __pyx_v_pos;
-  PyObject *__pyx_v_qname = NULL;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("build", 0);
-  __Pyx_TraceCall("build", __pyx_f[0], 4058);
-
-  /* "pysam/csamtools.pyx":4061
- *         '''build index.'''
- * 
- *         self.index = collections.defaultdict( list )             # <<<<<<<<<<<<<<
- * 
- *         # this method will start indexing from the current file position
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4061; __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 = 4061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyList_Type))));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyList_Type))));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyList_Type))));
-  __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 = 4061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __Pyx_GOTREF(__pyx_v_self->index);
-  __Pyx_DECREF(__pyx_v_self->index);
-  __pyx_v_self->index = __pyx_t_3;
-  __pyx_t_3 = 0;
-
-  /* "pysam/csamtools.pyx":4065
- *         # this method will start indexing from the current file position
- *         # if you decide
- *         cdef int ret = 1             # <<<<<<<<<<<<<<
- *         cdef bam1_t * b = <bam1_t*> calloc(1, sizeof( bam1_t) )
- * 
- */
-  __pyx_v_ret = 1;
-
-  /* "pysam/csamtools.pyx":4066
- *         # if you decide
- *         cdef int ret = 1
- *         cdef bam1_t * b = <bam1_t*> calloc(1, sizeof( bam1_t) )             # <<<<<<<<<<<<<<
- * 
- *         cdef uint64_t pos
- */
-  __pyx_v_b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
-
-  /* "pysam/csamtools.pyx":4070
- *         cdef uint64_t pos
- * 
- *         while ret > 0:             # <<<<<<<<<<<<<<
- *             pos = bam_tell( self.fp.x.bam )
- *             ret = samread( self.fp, b)
- */
-  while (1) {
-    __pyx_t_4 = (__pyx_v_ret > 0);
-    if (!__pyx_t_4) break;
-
-    /* "pysam/csamtools.pyx":4071
- * 
- *         while ret > 0:
- *             pos = bam_tell( self.fp.x.bam )             # <<<<<<<<<<<<<<
- *             ret = samread( self.fp, b)
- *             if ret > 0:
- */
-    __pyx_v_pos = bam_tell(__pyx_v_self->fp->x.bam);
-
-    /* "pysam/csamtools.pyx":4072
- *         while ret > 0:
- *             pos = bam_tell( self.fp.x.bam )
- *             ret = samread( self.fp, b)             # <<<<<<<<<<<<<<
- *             if ret > 0:
- *                 qname = _charptr_to_str(bam1_qname( b ))
- */
-    __pyx_v_ret = samread(__pyx_v_self->fp, __pyx_v_b);
-
-    /* "pysam/csamtools.pyx":4073
- *             pos = bam_tell( self.fp.x.bam )
- *             ret = samread( self.fp, b)
- *             if ret > 0:             # <<<<<<<<<<<<<<
- *                 qname = _charptr_to_str(bam1_qname( b ))
- *                 self.index[qname].append( pos )
- */
-    __pyx_t_4 = (__pyx_v_ret > 0);
-    if (__pyx_t_4) {
-
-      /* "pysam/csamtools.pyx":4074
- *             ret = samread( self.fp, b)
- *             if ret > 0:
- *                 qname = _charptr_to_str(bam1_qname( b ))             # <<<<<<<<<<<<<<
- *                 self.index[qname].append( pos )
- * 
- */
-      __pyx_t_3 = __pyx_f_5pysam_9csamtools__charptr_to_str(bam1_qname(__pyx_v_b)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_XDECREF(__pyx_v_qname);
-      __pyx_v_qname = __pyx_t_3;
-      __pyx_t_3 = 0;
-
-      /* "pysam/csamtools.pyx":4075
- *             if ret > 0:
- *                 qname = _charptr_to_str(bam1_qname( b ))
- *                 self.index[qname].append( pos )             # <<<<<<<<<<<<<<
- * 
- *         bam_destroy1( b )
- */
-      __pyx_t_3 = PyObject_GetItem(__pyx_v_self->index, __pyx_v_qname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_1 = __Pyx_PyInt_to_py_uint64_t(__pyx_v_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4075; __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(__pyx_t_2); __pyx_t_2 = 0;
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
-  }
-
-  /* "pysam/csamtools.pyx":4077
- *                 self.index[qname].append( pos )
- * 
- *         bam_destroy1( b )             # <<<<<<<<<<<<<<
- * 
- *     def find( self, qname ):
- */
-  bam_destroy1(__pyx_v_b);
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("pysam.csamtools.IndexedReads.build", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_qname);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_9csamtools_12IndexedReads_5find(PyObject *__pyx_v_self, PyObject *__pyx_v_qname); /*proto*/
-static char __pyx_doc_5pysam_9csamtools_12IndexedReads_4find[] = "IndexedReads.find(self, qname)";
-static PyObject *__pyx_pw_5pysam_9csamtools_12IndexedReads_5find(PyObject *__pyx_v_self, PyObject *__pyx_v_qname) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("find (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_9csamtools_12IndexedReads_4find(((struct __pyx_obj_5pysam_9csamtools_IndexedReads *)__pyx_v_self), ((PyObject *)__pyx_v_qname));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/csamtools.pyx":4079
- *         bam_destroy1( b )
- * 
- *     def find( self, qname ):             # <<<<<<<<<<<<<<
- *         if qname in self.index:
- *             return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
- */
-
-static PyObject *__pyx_pf_5pysam_9csamtools_12IndexedReads_4find(struct __pyx_obj_5pysam_9csamtools_IndexedReads *__pyx_v_self, PyObject *__pyx_v_qname) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("find", 0);
-  __Pyx_TraceCall("find", __pyx_f[0], 4079);
-
-  /* "pysam/csamtools.pyx":4080
- * 
- *     def find( self, qname ):
- *         if qname in self.index:             # <<<<<<<<<<<<<<
- *             return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
- *         else:
- */
-  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_qname, __pyx_v_self->index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "pysam/csamtools.pyx":4081
- *     def find( self, qname ):
- *         if qname in self.index:
- *             return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )             # <<<<<<<<<<<<<<
- *         else:
- *             raise KeyError( "read %s not found" % qname )
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyObject_GetItem(__pyx_v_self->index, __pyx_v_qname); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4081; __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 = 4081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->samfile));
-    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->samfile));
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_t_2 = 0;
-    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowSelection)), ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __pyx_r = __pyx_t_4;
-    __pyx_t_4 = 0;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/csamtools.pyx":4083
- *             return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
- *         else:
- *             raise KeyError( "read %s not found" % qname )             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_197), __pyx_v_qname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__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_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.csamtools.IndexedReads.find", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static void __pyx_pw_5pysam_9csamtools_12IndexedReads_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_9csamtools_12IndexedReads_7__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_9csamtools_12IndexedReads_6__dealloc__(((struct __pyx_obj_5pysam_9csamtools_IndexedReads *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/csamtools.pyx":4085
- *             raise KeyError( "read %s not found" % qname )
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         if self.owns_samfile: samclose( self.fp )
- * 
- */
-
-static void __pyx_pf_5pysam_9csamtools_12IndexedReads_6__dealloc__(struct __pyx_obj_5pysam_9csamtools_IndexedReads *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 4085);
-
-  /* "pysam/csamtools.pyx":4086
- * 
- *     def __dealloc__(self):
- *         if self.owns_samfile: samclose( self.fp )             # <<<<<<<<<<<<<<
- * 
- * __all__ = ["Samfile",
- */
-  if (__pyx_v_self->owns_samfile) {
-    samclose(__pyx_v_self->fp);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __Pyx_TraceReturn(Py_None);
-  __Pyx_RefNannyFinishContext();
-}
-static struct __pyx_vtabstruct_5pysam_9csamtools_Fastafile __pyx_vtable_5pysam_9csamtools_Fastafile;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_Fastafile(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_Fastafile *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_Fastafile *)o);
-  p->__pyx_vtab = __pyx_vtabptr_5pysam_9csamtools_Fastafile;
-  p->_filename = Py_None; Py_INCREF(Py_None);
-  p->_references = Py_None; Py_INCREF(Py_None);
-  p->_lengths = Py_None; Py_INCREF(Py_None);
-  p->reference2length = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_9csamtools_9Fastafile_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_Fastafile(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_Fastafile *p = (struct __pyx_obj_5pysam_9csamtools_Fastafile *)o;
-  PyObject_GC_UnTrack(o);
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_9Fastafile_11__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  Py_CLEAR(p->_filename);
-  Py_CLEAR(p->_references);
-  Py_CLEAR(p->_lengths);
-  Py_CLEAR(p->reference2length);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_Fastafile(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_Fastafile *p = (struct __pyx_obj_5pysam_9csamtools_Fastafile *)o;
-  if (p->_filename) {
-    e = (*v)(p->_filename, a); if (e) return e;
-  }
-  if (p->_references) {
-    e = (*v)(p->_references, a); if (e) return e;
-  }
-  if (p->_lengths) {
-    e = (*v)(p->_lengths, a); if (e) return e;
-  }
-  if (p->reference2length) {
-    e = (*v)(p->reference2length, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_Fastafile(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_Fastafile *p = (struct __pyx_obj_5pysam_9csamtools_Fastafile *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->_filename);
-  p->_filename = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->_references);
-  p->_references = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->_lengths);
-  p->_lengths = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->reference2length);
-  p->reference2length = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-static PyObject *__pyx_sq_item_5pysam_9csamtools_Fastafile(PyObject *o, Py_ssize_t i) {
-  PyObject *r;
-  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
-  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
-  Py_DECREF(x);
-  return r;
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_9Fastafile_filename(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_9Fastafile_8filename_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_9Fastafile_references(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_9Fastafile_10references_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_9Fastafile_nreferences(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_9Fastafile_11nreferences_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_9Fastafile_lengths(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_9Fastafile_7lengths_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_Fastafile[] = {
-  {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastafile_3_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastafile_2_isOpen)},
-  {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastafile_7_open, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastafile_6_open)},
-  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastafile_9close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastafile_8close)},
-  {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastafile_13fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastafile_12fetch)},
-  {__Pyx_NAMESTR("getReferenceLength"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastafile_15getReferenceLength, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastafile_14getReferenceLength)},
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_Fastafile[] = {
-  {(char *)"filename", __pyx_getprop_5pysam_9csamtools_9Fastafile_filename, 0, __Pyx_DOCSTR(__pyx_k_198), 0},
-  {(char *)"references", __pyx_getprop_5pysam_9csamtools_9Fastafile_references, 0, __Pyx_DOCSTR(__pyx_k_199), 0},
-  {(char *)"nreferences", __pyx_getprop_5pysam_9csamtools_9Fastafile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_200), 0},
-  {(char *)"lengths", __pyx_getprop_5pysam_9csamtools_9Fastafile_lengths, 0, __Pyx_DOCSTR(__pyx_k_201), 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_Fastafile = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_Fastafile = {
-  __pyx_pw_5pysam_9csamtools_9Fastafile_5__len__, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  __pyx_sq_item_5pysam_9csamtools_Fastafile, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  __pyx_pw_5pysam_9csamtools_9Fastafile_19__contains__, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_Fastafile = {
-  __pyx_pw_5pysam_9csamtools_9Fastafile_5__len__, /*mp_length*/
-  __pyx_pw_5pysam_9csamtools_9Fastafile_17__getitem__, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_Fastafile = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_Fastafile = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.Fastafile"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_Fastafile), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_Fastafile, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_Fastafile, /*tp_as_number*/
-  &__pyx_tp_as_sequence_Fastafile, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_Fastafile, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_Fastafile, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("*(filename)*\n\n    A *FASTA* file. The file is automatically opened.\n\n    The file expects an indexed fasta file.\n\n    TODO:\n        add automatic indexing.\n        add function to get sequence names.\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools_Fastafile, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_Fastafile, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_Fastafile, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_Fastafile, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_Fastafile, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_FastqProxy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_FastqProxy(PyObject *o) {
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10FastqProxy_name(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10FastqProxy_4name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10FastqProxy_sequence(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10FastqProxy_8sequence_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10FastqProxy_comment(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10FastqProxy_7comment_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10FastqProxy_quality(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10FastqProxy_7quality_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_FastqProxy[] = {
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_FastqProxy[] = {
-  {(char *)"name", __pyx_getprop_5pysam_9csamtools_10FastqProxy_name, 0, 0, 0},
-  {(char *)"sequence", __pyx_getprop_5pysam_9csamtools_10FastqProxy_sequence, 0, 0, 0},
-  {(char *)"comment", __pyx_getprop_5pysam_9csamtools_10FastqProxy_comment, 0, 0, 0},
-  {(char *)"quality", __pyx_getprop_5pysam_9csamtools_10FastqProxy_quality, 0, 0, 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_FastqProxy = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_FastqProxy = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_FastqProxy = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_FastqProxy = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_FastqProxy = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.FastqProxy"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_FastqProxy), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_FastqProxy, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_FastqProxy, /*tp_as_number*/
-  &__pyx_tp_as_sequence_FastqProxy, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_FastqProxy, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_FastqProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("FastqProxy()"), /*tp_doc*/
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_FastqProxy, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_FastqProxy, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  __pyx_pw_5pysam_9csamtools_10FastqProxy_1__init__, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_FastqProxy, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_Fastqfile __pyx_vtable_5pysam_9csamtools_Fastqfile;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_Fastqfile(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_Fastqfile *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)o);
-  p->__pyx_vtab = __pyx_vtabptr_5pysam_9csamtools_Fastqfile;
-  p->_filename = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_9csamtools_9Fastqfile_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_Fastqfile(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_Fastqfile *p = (struct __pyx_obj_5pysam_9csamtools_Fastqfile *)o;
-  PyObject_GC_UnTrack(o);
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_9Fastqfile_9__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  Py_CLEAR(p->_filename);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_Fastqfile(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_Fastqfile *p = (struct __pyx_obj_5pysam_9csamtools_Fastqfile *)o;
-  if (p->_filename) {
-    e = (*v)(p->_filename, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_Fastqfile(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_Fastqfile *p = (struct __pyx_obj_5pysam_9csamtools_Fastqfile *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->_filename);
-  p->_filename = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_9Fastqfile_filename(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_9Fastqfile_8filename_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_Fastqfile[] = {
-  {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_3_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_2_isOpen)},
-  {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_5_open, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_4_open)},
-  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_7close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_6close)},
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_13__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_12__next__)},
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_Fastqfile[] = {
-  {(char *)"filename", __pyx_getprop_5pysam_9csamtools_9Fastqfile_filename, 0, __Pyx_DOCSTR(__pyx_k_198), 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_Fastqfile = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_Fastqfile = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_Fastqfile = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_Fastqfile = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_Fastqfile = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.Fastqfile"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_Fastqfile), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_Fastqfile, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_Fastqfile, /*tp_as_number*/
-  &__pyx_tp_as_sequence_Fastqfile, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_Fastqfile, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_Fastqfile, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("*(filename)*\n\n    A *FASTQ* file. The file is automatically opened.\n\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools_Fastqfile, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_Fastqfile, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_9csamtools_9Fastqfile_11__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_9csamtools_9Fastqfile_13__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_Fastqfile, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_Fastqfile, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_Fastqfile, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_AlignedRead(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_AlignedRead(PyObject *o) {
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_11AlignedRead_3__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_qname(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_5qname_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_qname(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_5qname_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_cigar(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_5cigar_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_cigar(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_5cigar_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_cigarstring(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_11cigarstring_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_cigarstring(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_11cigarstring_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_seq(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_3seq_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_seq(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_3seq_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_qual(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4qual_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_qual(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_4qual_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_query(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_5query_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_qqual(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_5qqual_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_qstart(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_6qstart_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_qend(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4qend_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_qlen(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4qlen_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_tags(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4tags_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_tags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_4tags_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_flag(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4flag_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_flag(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_4flag_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_rname(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_5rname_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_rname(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_5rname_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_tid(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_3tid_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_tid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_3tid_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_pos(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_3pos_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_3pos_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_bin(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_3bin_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_bin(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_3bin_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_rlen(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4rlen_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_aend(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4aend_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_alen(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4alen_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_mapq(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4mapq_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_mapq(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_4mapq_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_mrnm(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4mrnm_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_mrnm(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_4mrnm_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_rnext(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_5rnext_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_rnext(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_5rnext_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_mpos(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4mpos_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_mpos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_4mpos_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_pnext(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_5pnext_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_pnext(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_5pnext_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_isize(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_5isize_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_isize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_5isize_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_tlen(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_4tlen_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_tlen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_4tlen_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_paired(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_9is_paired_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_paired(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_9is_paired_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_proper_pair(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_14is_proper_pair_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_proper_pair(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_14is_proper_pair_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_unmapped(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_11is_unmapped_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_unmapped(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_11is_unmapped_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_mate_is_unmapped(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_mate_is_unmapped(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_16mate_is_unmapped_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_reverse(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_10is_reverse_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_reverse(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_10is_reverse_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_mate_is_reverse(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_mate_is_reverse(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_15mate_is_reverse_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_read1(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read1_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_read1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read1_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_read2(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read2_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_read2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_8is_read2_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_secondary(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_12is_secondary_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_secondary(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_12is_secondary_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_qcfail(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_9is_qcfail_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_qcfail(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_9is_qcfail_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_is_duplicate(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_12is_duplicate_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_duplicate(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11AlignedRead_12is_duplicate_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_positions(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_9positions_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_inferred_length(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_15inferred_length_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_aligned_pairs(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11AlignedRead_13aligned_pairs_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_AlignedRead[] = {
-  {__Pyx_NAMESTR("compare"), (PyCFunction)__pyx_pw_5pysam_9csamtools_11AlignedRead_7compare, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_11AlignedRead_6compare)},
-  {__Pyx_NAMESTR("overlap"), (PyCFunction)__pyx_pw_5pysam_9csamtools_11AlignedRead_11overlap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_11AlignedRead_10overlap)},
-  {__Pyx_NAMESTR("opt"), (PyCFunction)__pyx_pw_5pysam_9csamtools_11AlignedRead_13opt, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_11AlignedRead_12opt)},
-  {__Pyx_NAMESTR("fancy_str"), (PyCFunction)__pyx_pw_5pysam_9csamtools_11AlignedRead_15fancy_str, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_11AlignedRead_14fancy_str)},
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_AlignedRead[] = {
-  {(char *)"qname", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qname, __pyx_setprop_5pysam_9csamtools_11AlignedRead_qname, __Pyx_DOCSTR(__pyx_k_202), 0},
-  {(char *)"cigar", __pyx_getprop_5pysam_9csamtools_11AlignedRead_cigar, __pyx_setprop_5pysam_9csamtools_11AlignedRead_cigar, __Pyx_DOCSTR(__pyx_k_203), 0},
-  {(char *)"cigarstring", __pyx_getprop_5pysam_9csamtools_11AlignedRead_cigarstring, __pyx_setprop_5pysam_9csamtools_11AlignedRead_cigarstring, __Pyx_DOCSTR(__pyx_k_204), 0},
-  {(char *)"seq", __pyx_getprop_5pysam_9csamtools_11AlignedRead_seq, __pyx_setprop_5pysam_9csamtools_11AlignedRead_seq, __Pyx_DOCSTR(__pyx_k_205), 0},
-  {(char *)"qual", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qual, __pyx_setprop_5pysam_9csamtools_11AlignedRead_qual, __Pyx_DOCSTR(__pyx_k_206), 0},
-  {(char *)"query", __pyx_getprop_5pysam_9csamtools_11AlignedRead_query, 0, __Pyx_DOCSTR(__pyx_k_207), 0},
-  {(char *)"qqual", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qqual, 0, __Pyx_DOCSTR(__pyx_k_208), 0},
-  {(char *)"qstart", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qstart, 0, __Pyx_DOCSTR(__pyx_k_209), 0},
-  {(char *)"qend", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qend, 0, __Pyx_DOCSTR(__pyx_k_210), 0},
-  {(char *)"qlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qlen, 0, __Pyx_DOCSTR(__pyx_k_211), 0},
-  {(char *)"tags", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tags, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tags, __Pyx_DOCSTR(__pyx_k_212), 0},
-  {(char *)"flag", __pyx_getprop_5pysam_9csamtools_11AlignedRead_flag, __pyx_setprop_5pysam_9csamtools_11AlignedRead_flag, __Pyx_DOCSTR(__pyx_k_213), 0},
-  {(char *)"rname", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rname, __pyx_setprop_5pysam_9csamtools_11AlignedRead_rname, __Pyx_DOCSTR(__pyx_k_214), 0},
-  {(char *)"tid", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tid, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tid, __Pyx_DOCSTR(__pyx_k_215), 0},
-  {(char *)"pos", __pyx_getprop_5pysam_9csamtools_11AlignedRead_pos, __pyx_setprop_5pysam_9csamtools_11AlignedRead_pos, __Pyx_DOCSTR(__pyx_k_216), 0},
-  {(char *)"bin", __pyx_getprop_5pysam_9csamtools_11AlignedRead_bin, __pyx_setprop_5pysam_9csamtools_11AlignedRead_bin, __Pyx_DOCSTR(__pyx_k_217), 0},
-  {(char *)"rlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rlen, 0, __Pyx_DOCSTR(__pyx_k_218), 0},
-  {(char *)"aend", __pyx_getprop_5pysam_9csamtools_11AlignedRead_aend, 0, __Pyx_DOCSTR(__pyx_k_219), 0},
-  {(char *)"alen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_alen, 0, __Pyx_DOCSTR(__pyx_k_220), 0},
-  {(char *)"mapq", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mapq, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mapq, __Pyx_DOCSTR(__pyx_k_221), 0},
-  {(char *)"mrnm", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mrnm, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mrnm, __Pyx_DOCSTR(__pyx_k_222), 0},
-  {(char *)"rnext", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rnext, __pyx_setprop_5pysam_9csamtools_11AlignedRead_rnext, __Pyx_DOCSTR(__pyx_k_223), 0},
-  {(char *)"mpos", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mpos, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mpos, __Pyx_DOCSTR(__pyx_k_224), 0},
-  {(char *)"pnext", __pyx_getprop_5pysam_9csamtools_11AlignedRead_pnext, __pyx_setprop_5pysam_9csamtools_11AlignedRead_pnext, __Pyx_DOCSTR(__pyx_k_225), 0},
-  {(char *)"isize", __pyx_getprop_5pysam_9csamtools_11AlignedRead_isize, __pyx_setprop_5pysam_9csamtools_11AlignedRead_isize, __Pyx_DOCSTR(__pyx_k_226), 0},
-  {(char *)"tlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tlen, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tlen, __Pyx_DOCSTR(__pyx_k_227), 0},
-  {(char *)"is_paired", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_paired, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_paired, __Pyx_DOCSTR(__pyx_k_228), 0},
-  {(char *)"is_proper_pair", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_proper_pair, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_proper_pair, __Pyx_DOCSTR(__pyx_k_229), 0},
-  {(char *)"is_unmapped", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_unmapped, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_unmapped, __Pyx_DOCSTR(__pyx_k_230), 0},
-  {(char *)"mate_is_unmapped", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mate_is_unmapped, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mate_is_unmapped, __Pyx_DOCSTR(__pyx_k_231), 0},
-  {(char *)"is_reverse", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_reverse, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_reverse, __Pyx_DOCSTR(__pyx_k_232), 0},
-  {(char *)"mate_is_reverse", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mate_is_reverse, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mate_is_reverse, __Pyx_DOCSTR(__pyx_k_233), 0},
-  {(char *)"is_read1", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_read1, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_read1, __Pyx_DOCSTR(__pyx_k_234), 0},
-  {(char *)"is_read2", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_read2, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_read2, __Pyx_DOCSTR(__pyx_k_235), 0},
-  {(char *)"is_secondary", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_secondary, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_secondary, __Pyx_DOCSTR(__pyx_k_236), 0},
-  {(char *)"is_qcfail", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_qcfail, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_qcfail, __Pyx_DOCSTR(__pyx_k_237), 0},
-  {(char *)"is_duplicate", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_duplicate, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_duplicate, __Pyx_DOCSTR(__pyx_k_238), 0},
-  {(char *)"positions", __pyx_getprop_5pysam_9csamtools_11AlignedRead_positions, 0, __Pyx_DOCSTR(__pyx_k_239), 0},
-  {(char *)"inferred_length", __pyx_getprop_5pysam_9csamtools_11AlignedRead_inferred_length, 0, __Pyx_DOCSTR(__pyx_k_240), 0},
-  {(char *)"aligned_pairs", __pyx_getprop_5pysam_9csamtools_11AlignedRead_aligned_pairs, 0, __Pyx_DOCSTR(__pyx_k_241), 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_AlignedRead = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_AlignedRead = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_AlignedRead = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_AlignedRead = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_AlignedRead = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.AlignedRead"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_AlignedRead), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_AlignedRead, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_AlignedRead, /*tp_as_number*/
-  &__pyx_tp_as_sequence_AlignedRead, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_AlignedRead, /*tp_as_mapping*/
-  __pyx_pw_5pysam_9csamtools_11AlignedRead_9__hash__, /*tp_hash*/
-  0, /*tp_call*/
-  __pyx_pw_5pysam_9csamtools_11AlignedRead_5__str__, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_AlignedRead, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("AlignedRead()\n\n    Class representing an aligned read. see SAM format specification for\n    the meaning of fields (http://samtools.sourceforge.net/).\n\n    This class stores a handle to the samtools C-structure representing\n    an aligned read. Member read access is forwarded to the C-structure\n    and converted into python objects. This implementation should be fast,\n    as only the data needed is converted.\n\n    For write access, the C-structure is updated in-p [...]
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_AlignedRead, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_AlignedRead, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  __pyx_pw_5pysam_9csamtools_11AlignedRead_1__init__, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_AlignedRead, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_Samfile __pyx_vtable_5pysam_9csamtools_Samfile;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_Samfile(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)o);
-  p->__pyx_vtab = __pyx_vtabptr_5pysam_9csamtools_Samfile;
-  p->_filename = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_9csamtools_7Samfile_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_Samfile(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *p = (struct __pyx_obj_5pysam_9csamtools_Samfile *)o;
-  PyObject_GC_UnTrack(o);
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_7Samfile_31__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  Py_CLEAR(p->_filename);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_Samfile(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_Samfile *p = (struct __pyx_obj_5pysam_9csamtools_Samfile *)o;
-  if (p->_filename) {
-    e = (*v)(p->_filename, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_Samfile(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_Samfile *p = (struct __pyx_obj_5pysam_9csamtools_Samfile *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->_filename);
-  p->_filename = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7Samfile_filename(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7Samfile_8filename_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7Samfile_nreferences(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7Samfile_11nreferences_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7Samfile_references(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7Samfile_10references_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7Samfile_lengths(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7Samfile_7lengths_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7Samfile_mapped(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7Samfile_6mapped_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7Samfile_unmapped(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7Samfile_8unmapped_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7Samfile_text(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7Samfile_4text_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7Samfile_header(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7Samfile_6header_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_Samfile[] = {
-  {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_3_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_2_isOpen)},
-  {__Pyx_NAMESTR("_hasIndex"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_5_hasIndex, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_4_hasIndex)},
-  {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_7_open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_6_open)},
-  {__Pyx_NAMESTR("gettid"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_9gettid, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_8gettid)},
-  {__Pyx_NAMESTR("getrname"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_11getrname, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_10getrname)},
-  {__Pyx_NAMESTR("_parseRegion"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_13_parseRegion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_12_parseRegion)},
-  {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_15reset, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_14reset)},
-  {__Pyx_NAMESTR("seek"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_17seek, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_16seek)},
-  {__Pyx_NAMESTR("tell"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_19tell, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_18tell)},
-  {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_21fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_20fetch)},
-  {__Pyx_NAMESTR("mate"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_23mate, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_22mate)},
-  {__Pyx_NAMESTR("count"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_25count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_24count)},
-  {__Pyx_NAMESTR("pileup"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_27pileup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_26pileup)},
-  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_29close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_28close)},
-  {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_33write, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_32write)},
-  {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_35__enter__, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_34__enter__)},
-  {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_37__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_36__exit__)},
-  {__Pyx_NAMESTR("_buildLine"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_39_buildLine, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_38_buildLine)},
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_43__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_7Samfile_42__next__)},
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_Samfile[] = {
-  {(char *)"filename", __pyx_getprop_5pysam_9csamtools_7Samfile_filename, 0, __Pyx_DOCSTR(__pyx_k_198), 0},
-  {(char *)"nreferences", __pyx_getprop_5pysam_9csamtools_7Samfile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_200), 0},
-  {(char *)"references", __pyx_getprop_5pysam_9csamtools_7Samfile_references, 0, __Pyx_DOCSTR(__pyx_k_199), 0},
-  {(char *)"lengths", __pyx_getprop_5pysam_9csamtools_7Samfile_lengths, 0, __Pyx_DOCSTR(__pyx_k_242), 0},
-  {(char *)"mapped", __pyx_getprop_5pysam_9csamtools_7Samfile_mapped, 0, __Pyx_DOCSTR(__pyx_k_243), 0},
-  {(char *)"unmapped", __pyx_getprop_5pysam_9csamtools_7Samfile_unmapped, 0, __Pyx_DOCSTR(__pyx_k_244), 0},
-  {(char *)"text", __pyx_getprop_5pysam_9csamtools_7Samfile_text, 0, __Pyx_DOCSTR(__pyx_k_245), 0},
-  {(char *)"header", __pyx_getprop_5pysam_9csamtools_7Samfile_header, 0, __Pyx_DOCSTR(__pyx_k_246), 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_Samfile = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_Samfile = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_Samfile = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_Samfile = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_Samfile = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.Samfile"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_Samfile), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_Samfile, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_Samfile, /*tp_as_number*/
-  &__pyx_tp_as_sequence_Samfile, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_Samfile, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_Samfile, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("*(filename, mode=None, template = None, referencenames = None, referencelengths = None, text = NULL, header = None,\n         add_sq_text = False, check_header = True, check_sq = True )*\n\n    A :term:`SAM`/:term:`BAM` formatted file. The file is automatically opened.\n\n    *mode* should be ``r`` for reading or ``w`` for writing. The default is text mode (:term:`SAM`). For binary\n    (:term:`BAM`) I/O you should append ``b`` for compressed or ``u`` for uncompressed :te [...]
-  __pyx_tp_traverse_5pysam_9csamtools_Samfile, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_Samfile, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_9csamtools_7Samfile_41__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_9csamtools_7Samfile_43__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_Samfile, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_Samfile, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_Samfile, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_PileupProxy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_PileupProxy(PyObject *o) {
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11PileupProxy_tid(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11PileupProxy_3tid_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11PileupProxy_n(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11PileupProxy_1n_1__get__(o);
-}
-
-static int __pyx_setprop_5pysam_9csamtools_11PileupProxy_n(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-  if (v) {
-    return __pyx_pw_5pysam_9csamtools_11PileupProxy_1n_3__set__(o, v);
-  }
-  else {
-    PyErr_SetString(PyExc_NotImplementedError, "__del__");
-    return -1;
-  }
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11PileupProxy_pos(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11PileupProxy_3pos_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_11PileupProxy_pileups(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_11PileupProxy_7pileups_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_PileupProxy[] = {
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_PileupProxy[] = {
-  {(char *)"tid", __pyx_getprop_5pysam_9csamtools_11PileupProxy_tid, 0, __Pyx_DOCSTR(__pyx_k_247), 0},
-  {(char *)"n", __pyx_getprop_5pysam_9csamtools_11PileupProxy_n, __pyx_setprop_5pysam_9csamtools_11PileupProxy_n, __Pyx_DOCSTR(__pyx_k_248), 0},
-  {(char *)"pos", __pyx_getprop_5pysam_9csamtools_11PileupProxy_pos, 0, 0, 0},
-  {(char *)"pileups", __pyx_getprop_5pysam_9csamtools_11PileupProxy_pileups, 0, __Pyx_DOCSTR(__pyx_k_249), 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_PileupProxy = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_PileupProxy = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_PileupProxy = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_PileupProxy = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_PileupProxy = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.PileupProxy"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_PileupProxy), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_PileupProxy, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_PileupProxy, /*tp_as_number*/
-  &__pyx_tp_as_sequence_PileupProxy, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_PileupProxy, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  __pyx_pw_5pysam_9csamtools_11PileupProxy_3__str__, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_PileupProxy, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("PileupProxy()\nA pileup column. A pileup column contains\n    all the reads that map to a certain target base.\n\n    tid\n        chromosome ID as is defined in the header\n    pos\n        the target base coordinate (0-based)\n    n\n        number of reads mapping to this column\n    pileups\n        list of reads (:class:`pysam.PileupRead`) aligned to this column\n\n    This class is a proxy for results returned by the samtools pileup engine.\n    If the underlying en [...]
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_PileupProxy, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_PileupProxy, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  __pyx_pw_5pysam_9csamtools_11PileupProxy_1__init__, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_PileupProxy, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_PileupRead(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_PileupRead *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_PileupRead *)o);
-  p->_alignment = ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)Py_None); Py_INCREF(Py_None);
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_PileupRead(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_PileupRead *p = (struct __pyx_obj_5pysam_9csamtools_PileupRead *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->_alignment);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_PileupRead(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_PileupRead *p = (struct __pyx_obj_5pysam_9csamtools_PileupRead *)o;
-  if (p->_alignment) {
-    e = (*v)(((PyObject*)p->_alignment), a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_PileupRead(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_PileupRead *p = (struct __pyx_obj_5pysam_9csamtools_PileupRead *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->_alignment);
-  p->_alignment = ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10PileupRead_alignment(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10PileupRead_9alignment_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10PileupRead_qpos(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10PileupRead_4qpos_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10PileupRead_indel(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10PileupRead_5indel_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10PileupRead_is_del(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10PileupRead_6is_del_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10PileupRead_is_head(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10PileupRead_7is_head_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10PileupRead_is_tail(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10PileupRead_7is_tail_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_10PileupRead_level(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_10PileupRead_5level_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_PileupRead[] = {
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_PileupRead[] = {
-  {(char *)"alignment", __pyx_getprop_5pysam_9csamtools_10PileupRead_alignment, 0, __Pyx_DOCSTR(__pyx_k_250), 0},
-  {(char *)"qpos", __pyx_getprop_5pysam_9csamtools_10PileupRead_qpos, 0, __Pyx_DOCSTR(__pyx_k_251), 0},
-  {(char *)"indel", __pyx_getprop_5pysam_9csamtools_10PileupRead_indel, 0, __Pyx_DOCSTR(__pyx_k_252), 0},
-  {(char *)"is_del", __pyx_getprop_5pysam_9csamtools_10PileupRead_is_del, 0, __Pyx_DOCSTR(__pyx_k_253), 0},
-  {(char *)"is_head", __pyx_getprop_5pysam_9csamtools_10PileupRead_is_head, 0, 0, 0},
-  {(char *)"is_tail", __pyx_getprop_5pysam_9csamtools_10PileupRead_is_tail, 0, 0, 0},
-  {(char *)"level", __pyx_getprop_5pysam_9csamtools_10PileupRead_level, 0, 0, 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_PileupRead = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_PileupRead = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_PileupRead = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_PileupRead = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_PileupRead = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.PileupRead"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_PileupRead), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_PileupRead, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_PileupRead, /*tp_as_number*/
-  &__pyx_tp_as_sequence_PileupRead, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_PileupRead, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  __pyx_pw_5pysam_9csamtools_10PileupRead_3__str__, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_PileupRead, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("PileupRead()\nA read aligned to a column.\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools_PileupRead, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_PileupRead, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_PileupRead, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_PileupRead, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  __pyx_pw_5pysam_9csamtools_10PileupRead_1__init__, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_PileupRead, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IteratorRow(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_IteratorRow(PyObject *o) {
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IteratorRow[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IteratorRow = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IteratorRow = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IteratorRow = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IteratorRow = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IteratorRow = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IteratorRow"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IteratorRow), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRow, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IteratorRow, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IteratorRow, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IteratorRow, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IteratorRow, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("abstract base class for iterators over mapped reads.\n\n    Various iterators implement different behaviours for wrapping around\n    contig boundaries. Examples include:\n\n    :class:`pysam.IteratorRowRegion`\n        iterate within a single contig and a defined region.\n\n    :class:`pysam.IteratorRowAll`\n        iterate until EOF. This iterator will also include unmapped reads.\n\n    :class:`pysam.IteratorRowAllRefs`\n        iterate over all reads in all reference  [...]
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IteratorRow, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IteratorRow, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion __pyx_vtable_5pysam_9csamtools_IteratorRowRegion;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IteratorRowRegion(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *p;
-  PyObject *o = __pyx_tp_new_5pysam_9csamtools_IteratorRow(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)o);
-  p->__pyx_vtab = __pyx_vtabptr_5pysam_9csamtools_IteratorRowRegion;
-  p->samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_9csamtools_17IteratorRowRegion_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_IteratorRowRegion(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)o;
-  PyObject_GC_UnTrack(o);
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_17IteratorRowRegion_7__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  Py_CLEAR(p->samfile);
-  PyObject_GC_Track(o);
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRow(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_IteratorRowRegion(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)o;
-  e = ((likely(__pyx_ptype_5pysam_9csamtools_IteratorRow)) ? ((__pyx_ptype_5pysam_9csamtools_IteratorRow->tp_traverse) ? __pyx_ptype_5pysam_9csamtools_IteratorRow->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_9csamtools_IteratorRowRegion)); if (e) return e;
-  if (p->samfile) {
-    e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_IteratorRowRegion(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)o;
-  PyObject* tmp;
-  if (likely(__pyx_ptype_5pysam_9csamtools_IteratorRow)) { if (__pyx_ptype_5pysam_9csamtools_IteratorRow->tp_clear) __pyx_ptype_5pysam_9csamtools_IteratorRow->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_9csamtools_IteratorRowRegion);
-  tmp = ((PyObject*)p->samfile);
-  p->samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IteratorRowRegion[] = {
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_17IteratorRowRegion_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_17IteratorRowRegion_4__next__)},
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IteratorRowRegion = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IteratorRowRegion = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IteratorRowRegion = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IteratorRowRegion = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IteratorRowRegion = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IteratorRowRegion"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRowRegion, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IteratorRowRegion, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IteratorRowRegion, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IteratorRowRegion, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IteratorRowRegion, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("*(Samfile samfile, int tid, int beg, int end, int reopen = True )*\n\n    iterate over mapped reads in a region.\n\n    By default, the file is re-openend to avoid conflicts between\n    multiple iterators working on the same file. Set *reopen* = False\n    to not re-open *samfile*.\n\n    The samtools iterators assume that the file\n    position between iterations do not change.\n    As a consequence, no two iterators can work\n    on the same file. To permit this, each  [...]
-  __pyx_tp_traverse_5pysam_9csamtools_IteratorRowRegion, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_IteratorRowRegion, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_9csamtools_17IteratorRowRegion_3__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_9csamtools_17IteratorRowRegion_5__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IteratorRowRegion, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IteratorRowRegion, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll __pyx_vtable_5pysam_9csamtools_IteratorRowAll;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IteratorRowAll(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *p;
-  PyObject *o = __pyx_tp_new_5pysam_9csamtools_IteratorRow(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *)o);
-  p->__pyx_vtab = __pyx_vtabptr_5pysam_9csamtools_IteratorRowAll;
-  if (__pyx_pw_5pysam_9csamtools_14IteratorRowAll_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_IteratorRowAll(PyObject *o) {
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_14IteratorRowAll_7__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRow(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IteratorRowAll[] = {
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_14IteratorRowAll_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_14IteratorRowAll_4__next__)},
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IteratorRowAll = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IteratorRowAll = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IteratorRowAll = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IteratorRowAll = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IteratorRowAll = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IteratorRowAll"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRowAll, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IteratorRowAll, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IteratorRowAll, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IteratorRowAll, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IteratorRowAll, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("*(Samfile samfile, int reopen = True)*\n\n    iterate over all reads in *samfile*\n\n    By default, the file is re-openend to avoid conflicts between\n    multiple iterators working on the same file. Set *reopen* = False\n    to not re-open *samfile*.\n\n    .. note::\n        It is usually not necessary to create an object of this class\n        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n        \n\n    "), /*tp_doc*/
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_9csamtools_14IteratorRowAll_3__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_9csamtools_14IteratorRowAll_5__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IteratorRowAll, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IteratorRowAll, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IteratorRowAllRefs(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *p;
-  PyObject *o = __pyx_tp_new_5pysam_9csamtools_IteratorRow(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)o);
-  p->samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
-  p->rowiter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_IteratorRowAllRefs(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->samfile);
-  Py_CLEAR(p->rowiter);
-  PyObject_GC_Track(o);
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRow(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_IteratorRowAllRefs(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)o;
-  e = ((likely(__pyx_ptype_5pysam_9csamtools_IteratorRow)) ? ((__pyx_ptype_5pysam_9csamtools_IteratorRow->tp_traverse) ? __pyx_ptype_5pysam_9csamtools_IteratorRow->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_9csamtools_IteratorRowAllRefs)); if (e) return e;
-  if (p->samfile) {
-    e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
-  }
-  if (p->rowiter) {
-    e = (*v)(((PyObject*)p->rowiter), a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_IteratorRowAllRefs(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)o;
-  PyObject* tmp;
-  if (likely(__pyx_ptype_5pysam_9csamtools_IteratorRow)) { if (__pyx_ptype_5pysam_9csamtools_IteratorRow->tp_clear) __pyx_ptype_5pysam_9csamtools_IteratorRow->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_9csamtools_IteratorRowAllRefs);
-  tmp = ((PyObject*)p->samfile);
-  p->samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->rowiter);
-  p->rowiter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IteratorRowAllRefs[] = {
-  {__Pyx_NAMESTR("nextiter"), (PyCFunction)__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_3nextiter, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_18IteratorRowAllRefs_2nextiter)},
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_7__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_18IteratorRowAllRefs_6__next__)},
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IteratorRowAllRefs = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IteratorRowAllRefs = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IteratorRowAllRefs = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IteratorRowAllRefs = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IteratorRowAllRefs = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IteratorRowAllRefs"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRowAllRefs, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IteratorRowAllRefs, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IteratorRowAllRefs, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IteratorRowAllRefs, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IteratorRowAllRefs, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("iterates over all mapped reads by chaining iterators over each reference\n\n    .. note::\n        It is usually not necessary to create an object of this class\n        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools_IteratorRowAllRefs, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_IteratorRowAllRefs, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_5__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_9csamtools_18IteratorRowAllRefs_7__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IteratorRowAllRefs, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IteratorRowAllRefs, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection __pyx_vtable_5pysam_9csamtools_IteratorRowSelection;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IteratorRowSelection(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *p;
-  PyObject *o = __pyx_tp_new_5pysam_9csamtools_IteratorRow(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)o);
-  p->__pyx_vtab = __pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection;
-  p->positions = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_9csamtools_20IteratorRowSelection_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_IteratorRowSelection(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)o;
-  PyObject_GC_UnTrack(o);
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_20IteratorRowSelection_7__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  Py_CLEAR(p->positions);
-  PyObject_GC_Track(o);
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRow(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_IteratorRowSelection(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)o;
-  e = ((likely(__pyx_ptype_5pysam_9csamtools_IteratorRow)) ? ((__pyx_ptype_5pysam_9csamtools_IteratorRow->tp_traverse) ? __pyx_ptype_5pysam_9csamtools_IteratorRow->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_9csamtools_IteratorRowSelection)); if (e) return e;
-  if (p->positions) {
-    e = (*v)(p->positions, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_IteratorRowSelection(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *p = (struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)o;
-  PyObject* tmp;
-  if (likely(__pyx_ptype_5pysam_9csamtools_IteratorRow)) { if (__pyx_ptype_5pysam_9csamtools_IteratorRow->tp_clear) __pyx_ptype_5pysam_9csamtools_IteratorRow->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_9csamtools_IteratorRowSelection);
-  tmp = ((PyObject*)p->positions);
-  p->positions = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IteratorRowSelection[] = {
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_20IteratorRowSelection_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_20IteratorRowSelection_4__next__)},
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IteratorRowSelection = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IteratorRowSelection = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IteratorRowSelection = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IteratorRowSelection = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IteratorRowSelection = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IteratorRowSelection"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorRowSelection, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IteratorRowSelection, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IteratorRowSelection, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IteratorRowSelection, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IteratorRowSelection, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("*(Samfile samfile)*\n\n    iterate over reads in *samfile* at a given list of file positions.\n\n    .. note::\n        It is usually not necessary to create an object of this class\n        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools_IteratorRowSelection, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_IteratorRowSelection, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_9csamtools_20IteratorRowSelection_3__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_9csamtools_20IteratorRowSelection_5__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IteratorRowSelection, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IteratorRowSelection, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn __pyx_vtable_5pysam_9csamtools_IteratorColumn;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IteratorColumn(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorColumn *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)o);
-  p->__pyx_vtab = __pyx_vtabptr_5pysam_9csamtools_IteratorColumn;
-  p->iter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
-  p->samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
-  p->fastafile = ((struct __pyx_obj_5pysam_9csamtools_Fastafile *)Py_None); Py_INCREF(Py_None);
-  p->stepper = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_9csamtools_14IteratorColumn_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_IteratorColumn(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorColumn *p = (struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)o;
-  PyObject_GC_UnTrack(o);
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_14IteratorColumn_9__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  Py_CLEAR(p->iter);
-  Py_CLEAR(p->samfile);
-  Py_CLEAR(p->fastafile);
-  Py_CLEAR(p->stepper);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_IteratorColumn(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_IteratorColumn *p = (struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)o;
-  if (p->iter) {
-    e = (*v)(((PyObject*)p->iter), a); if (e) return e;
-  }
-  if (p->samfile) {
-    e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
-  }
-  if (p->fastafile) {
-    e = (*v)(((PyObject*)p->fastafile), a); if (e) return e;
-  }
-  if (p->stepper) {
-    e = (*v)(p->stepper, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_IteratorColumn(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorColumn *p = (struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->iter);
-  p->iter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->samfile);
-  p->samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->fastafile);
-  p->fastafile = ((struct __pyx_obj_5pysam_9csamtools_Fastafile *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->stepper);
-  p->stepper = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_14IteratorColumn_seq_len(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_14IteratorColumn_7seq_len_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IteratorColumn[] = {
-  {__Pyx_NAMESTR("addReference"), (PyCFunction)__pyx_pw_5pysam_9csamtools_14IteratorColumn_5addReference, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_14IteratorColumn_4addReference)},
-  {__Pyx_NAMESTR("hasReference"), (PyCFunction)__pyx_pw_5pysam_9csamtools_14IteratorColumn_7hasReference, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_14IteratorColumn_6hasReference)},
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_IteratorColumn[] = {
-  {(char *)"seq_len", __pyx_getprop_5pysam_9csamtools_14IteratorColumn_seq_len, 0, __Pyx_DOCSTR(__pyx_k_254), 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IteratorColumn = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IteratorColumn = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IteratorColumn = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IteratorColumn = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IteratorColumn = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IteratorColumn"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IteratorColumn), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorColumn, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IteratorColumn, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IteratorColumn, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IteratorColumn, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IteratorColumn, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("abstract base class for iterators over columns.\n\n    IteratorColumn objects wrap the pileup functionality of samtools.\n\n    For reasons of efficiency, the iterator points to the current\n    pileup buffer. The pileup buffer is updated at every iteration.\n    This might cause some unexpected behavious. For example,\n    consider the conversion to a list::\n\n       f = Samfile(\"file.bam\", \"rb\")\n       result = list( f.pileup() )\n\n    Here, ``result`` will conta [...]
-  __pyx_tp_traverse_5pysam_9csamtools_IteratorColumn, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_IteratorColumn, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_9csamtools_14IteratorColumn_3__iter__, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IteratorColumn, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_IteratorColumn, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IteratorColumn, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion __pyx_vtable_5pysam_9csamtools_IteratorColumnRegion;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IteratorColumnRegion(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *p;
-  PyObject *o = __pyx_tp_new_5pysam_9csamtools_IteratorColumn(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *)o);
-  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn*)__pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion;
-  if (__pyx_pw_5pysam_9csamtools_20IteratorColumnRegion_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IteratorColumnRegion[] = {
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_20IteratorColumnRegion_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_20IteratorColumnRegion_2__next__)},
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IteratorColumnRegion = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IteratorColumnRegion = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IteratorColumnRegion = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IteratorColumnRegion = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IteratorColumnRegion = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IteratorColumnRegion"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorColumn, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IteratorColumnRegion, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IteratorColumnRegion, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IteratorColumnRegion, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IteratorColumnRegion, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("iterates over a region only.\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools_IteratorColumn, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_IteratorColumn, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_9csamtools_14IteratorColumn_3__iter__, /*tp_iter*/
-  #else
-  0, /*tp_iter*/
-  #endif
-  __pyx_pw_5pysam_9csamtools_20IteratorColumnRegion_3__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IteratorColumnRegion, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IteratorColumnRegion, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs __pyx_vtable_5pysam_9csamtools_IteratorColumnAllRefs;
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IteratorColumnAllRefs(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *p;
-  PyObject *o = __pyx_tp_new_5pysam_9csamtools_IteratorColumn(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *)o);
-  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn*)__pyx_vtabptr_5pysam_9csamtools_IteratorColumnAllRefs;
-  if (__pyx_pw_5pysam_9csamtools_21IteratorColumnAllRefs_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
-  return o;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IteratorColumnAllRefs[] = {
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_21IteratorColumnAllRefs_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__)},
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IteratorColumnAllRefs = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IteratorColumnAllRefs = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IteratorColumnAllRefs = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IteratorColumnAllRefs = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IteratorColumnAllRefs = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IteratorColumnAllRefs"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IteratorColumn, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IteratorColumnAllRefs, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IteratorColumnAllRefs, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IteratorColumnAllRefs, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IteratorColumnAllRefs, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("iterates over all columns by chaining iterators over each reference\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools_IteratorColumn, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_IteratorColumn, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_9csamtools_14IteratorColumn_3__iter__, /*tp_iter*/
-  #else
-  0, /*tp_iter*/
-  #endif
-  __pyx_pw_5pysam_9csamtools_21IteratorColumnAllRefs_3__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IteratorColumnAllRefs, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IteratorColumnAllRefs, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_IndexedReads(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools_IndexedReads *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools_IndexedReads *)o);
-  p->samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
-  p->index = Py_None; Py_INCREF(Py_None);
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_IndexedReads(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IndexedReads *p = (struct __pyx_obj_5pysam_9csamtools_IndexedReads *)o;
-  PyObject_GC_UnTrack(o);
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_9csamtools_12IndexedReads_7__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  Py_CLEAR(p->samfile);
-  Py_CLEAR(p->index);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools_IndexedReads(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools_IndexedReads *p = (struct __pyx_obj_5pysam_9csamtools_IndexedReads *)o;
-  if (p->samfile) {
-    e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
-  }
-  if (p->index) {
-    e = (*v)(p->index, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools_IndexedReads(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools_IndexedReads *p = (struct __pyx_obj_5pysam_9csamtools_IndexedReads *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->samfile);
-  p->samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->index);
-  p->index = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_IndexedReads[] = {
-  {__Pyx_NAMESTR("build"), (PyCFunction)__pyx_pw_5pysam_9csamtools_12IndexedReads_3build, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_12IndexedReads_2build)},
-  {__Pyx_NAMESTR("find"), (PyCFunction)__pyx_pw_5pysam_9csamtools_12IndexedReads_5find, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_12IndexedReads_4find)},
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_IndexedReads = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_IndexedReads = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_IndexedReads = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_IndexedReads = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_IndexedReads = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.IndexedReads"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_IndexedReads), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_IndexedReads, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_IndexedReads, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IndexedReads, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IndexedReads, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IndexedReads, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("IndexedReads(Samfile samfile, int reopen=True)\nindex a bamfile by read.\n\n    The index is kept in memory.\n\n    By default, the file is re-openend to avoid conflicts if\n    multiple operators work on the same file. Set *reopen* = False\n    to not re-open *samfile*.\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools_IndexedReads, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools_IndexedReads, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_IndexedReads, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  __pyx_pw_5pysam_9csamtools_12IndexedReads_1__init__, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_IndexedReads, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools_SNPCall(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools_SNPCall(PyObject *o) {
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7SNPCall_tid(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7SNPCall_3tid_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7SNPCall_pos(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7SNPCall_3pos_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7SNPCall_reference_base(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7SNPCall_14reference_base_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7SNPCall_genotype(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7SNPCall_8genotype_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7SNPCall_consensus_quality(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7SNPCall_17consensus_quality_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7SNPCall_snp_quality(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7SNPCall_11snp_quality_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7SNPCall_mapping_quality(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7SNPCall_15mapping_quality_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_9csamtools_7SNPCall_coverage(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_9csamtools_7SNPCall_8coverage_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools_SNPCall[] = {
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_SNPCall[] = {
-  {(char *)"tid", __pyx_getprop_5pysam_9csamtools_7SNPCall_tid, 0, __Pyx_DOCSTR(__pyx_k_247), 0},
-  {(char *)"pos", __pyx_getprop_5pysam_9csamtools_7SNPCall_pos, 0, __Pyx_DOCSTR(__pyx_k_255), 0},
-  {(char *)"reference_base", __pyx_getprop_5pysam_9csamtools_7SNPCall_reference_base, 0, __Pyx_DOCSTR(__pyx_k_256), 0},
-  {(char *)"genotype", __pyx_getprop_5pysam_9csamtools_7SNPCall_genotype, 0, __Pyx_DOCSTR(__pyx_k_257), 0},
-  {(char *)"consensus_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_consensus_quality, 0, __Pyx_DOCSTR(__pyx_k_258), 0},
-  {(char *)"snp_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_snp_quality, 0, __Pyx_DOCSTR(__pyx_k_259), 0},
-  {(char *)"mapping_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_mapping_quality, 0, __Pyx_DOCSTR(__pyx_k_260), 0},
-  {(char *)"coverage", __pyx_getprop_5pysam_9csamtools_7SNPCall_coverage, 0, __Pyx_DOCSTR(__pyx_k_261), 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_SNPCall = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_SNPCall = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_SNPCall = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_SNPCall = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools_SNPCall = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.SNPCall"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools_SNPCall), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools_SNPCall, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_SNPCall, /*tp_as_number*/
-  &__pyx_tp_as_sequence_SNPCall, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_SNPCall, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  __pyx_pw_5pysam_9csamtools_7SNPCall_1__str__, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_SNPCall, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("the results of a SNP call."), /*tp_doc*/
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools_SNPCall, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_9csamtools_SNPCall, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools_SNPCall, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools___pyx_scope_struct__genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *)o);
-  p->__pyx_v_x = 0;
-  p->__pyx_v_y = 0;
-  p->__pyx_t_0 = 0;
-  p->__pyx_t_1 = 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct__genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->__pyx_v_x);
-  Py_CLEAR(p->__pyx_v_y);
-  Py_CLEAR(p->__pyx_t_0);
-  Py_CLEAR(p->__pyx_t_1);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *)o;
-  if (p->__pyx_v_x) {
-    e = (*v)(p->__pyx_v_x, a); if (e) return e;
-  }
-  if (p->__pyx_v_y) {
-    e = (*v)(p->__pyx_v_y, a); if (e) return e;
-  }
-  if (p->__pyx_t_0) {
-    e = (*v)(p->__pyx_t_0, a); if (e) return e;
-  }
-  if (p->__pyx_t_1) {
-    e = (*v)(p->__pyx_t_1, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct__genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->__pyx_v_x);
-  p->__pyx_v_x = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_v_y);
-  p->__pyx_v_y = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_t_0);
-  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_t_1);
-  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools___pyx_scope_struct__genexpr[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct__genexpr = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__genexpr = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct__genexpr = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct__genexpr = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools___pyx_scope_struct__genexpr = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.__pyx_scope_struct__genexpr"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct__genexpr, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number___pyx_scope_struct__genexpr, /*tp_as_number*/
-  &__pyx_tp_as_sequence___pyx_scope_struct__genexpr, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping___pyx_scope_struct__genexpr, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer___pyx_scope_struct__genexpr, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct__genexpr, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct__genexpr, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools___pyx_scope_struct__genexpr, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools___pyx_scope_struct__genexpr, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *)o);
-  p->__pyx_v_x = 0;
-  p->__pyx_v_y = 0;
-  p->__pyx_t_0 = 0;
-  p->__pyx_t_1 = 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct_1_genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->__pyx_v_x);
-  Py_CLEAR(p->__pyx_v_y);
-  Py_CLEAR(p->__pyx_t_0);
-  Py_CLEAR(p->__pyx_t_1);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *)o;
-  if (p->__pyx_v_x) {
-    e = (*v)(p->__pyx_v_x, a); if (e) return e;
-  }
-  if (p->__pyx_v_y) {
-    e = (*v)(p->__pyx_v_y, a); if (e) return e;
-  }
-  if (p->__pyx_t_0) {
-    e = (*v)(p->__pyx_t_0, a); if (e) return e;
-  }
-  if (p->__pyx_t_1) {
-    e = (*v)(p->__pyx_t_1, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct_1_genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->__pyx_v_x);
-  p->__pyx_v_x = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_v_y);
-  p->__pyx_v_y = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_t_0);
-  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_t_1);
-  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools___pyx_scope_struct_1_genexpr[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1_genexpr = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_1_genexpr = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_1_genexpr = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1_genexpr = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools___pyx_scope_struct_1_genexpr = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.__pyx_scope_struct_1_genexpr"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number___pyx_scope_struct_1_genexpr, /*tp_as_number*/
-  &__pyx_tp_as_sequence___pyx_scope_struct_1_genexpr, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping___pyx_scope_struct_1_genexpr, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer___pyx_scope_struct_1_genexpr, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct_1_genexpr, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct_1_genexpr, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools___pyx_scope_struct_1_genexpr, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools___pyx_scope_struct_1_genexpr, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools___pyx_scope_struct_2__open(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *)o);
-  p->__pyx_v_data = 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct_2__open(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->__pyx_v_data);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct_2__open(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *)o;
-  if (p->__pyx_v_data) {
-    e = (*v)(p->__pyx_v_data, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct_2__open(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->__pyx_v_data);
-  p->__pyx_v_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools___pyx_scope_struct_2__open[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_2__open = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_2__open = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_2__open = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_2__open = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_9csamtools___pyx_scope_struct_2__open = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.__pyx_scope_struct_2__open"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct_2__open, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number___pyx_scope_struct_2__open, /*tp_as_number*/
-  &__pyx_tp_as_sequence___pyx_scope_struct_2__open, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping___pyx_scope_struct_2__open, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer___pyx_scope_struct_2__open, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct_2__open, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct_2__open, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools___pyx_scope_struct_2__open, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools___pyx_scope_struct_2__open, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-
-static PyObject *__pyx_tp_new_5pysam_9csamtools___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *)o);
-  p->__pyx_outer_scope = 0;
-  p->__pyx_v_x = 0;
-  p->__pyx_t_0 = 0;
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct_3_genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->__pyx_outer_scope);
-  Py_CLEAR(p->__pyx_v_x);
-  Py_CLEAR(p->__pyx_t_0);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *)o;
-  if (p->__pyx_outer_scope) {
-    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
-  }
-  if (p->__pyx_v_x) {
-    e = (*v)(p->__pyx_v_x, a); if (e) return e;
-  }
-  if (p->__pyx_t_0) {
-    e = (*v)(p->__pyx_t_0, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct_3_genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->__pyx_outer_scope);
-  p->__pyx_outer_scope = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_v_x);
-  p->__pyx_v_x = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_t_0);
-  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_9csamtools___pyx_scope_struct_3_genexpr[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_3_genexpr = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_3_genexpr = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_3_genexpr = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_3_genexpr = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
+  /* "pysam/csamtools.pyx":46
+ *         '''open an existing file, like "/dev/null"'''
+ *         fd = os.open(filename, os.O_WRONLY)
+ *         self.setfd(fd)             # <<<<<<<<<<<<<<
+ * 
+ *     def setfile(self, filename):
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setfd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __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 = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_fd);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fd);
+  __Pyx_GIVEREF(__pyx_v_fd);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); 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(__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;
 
-static PyTypeObject __pyx_type_5pysam_9csamtools___pyx_scope_struct_3_genexpr = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.__pyx_scope_struct_3_genexpr"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct_3_genexpr, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number___pyx_scope_struct_3_genexpr, /*tp_as_number*/
-  &__pyx_tp_as_sequence___pyx_scope_struct_3_genexpr, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping___pyx_scope_struct_3_genexpr, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer___pyx_scope_struct_3_genexpr, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct_3_genexpr, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct_3_genexpr, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools___pyx_scope_struct_3_genexpr, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools___pyx_scope_struct_3_genexpr, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
+  /* "pysam/csamtools.pyx":43
+ *         self.id = id
+ * 
+ *     def setdevice(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an existing file, like "/dev/null"'''
+ *         fd = os.open(filename, os.O_WRONLY)
+ */
 
-static PyObject *__pyx_tp_new_5pysam_9csamtools___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *)o);
-  p->__pyx_outer_scope = 0;
-  p->__pyx_v_x = 0;
-  p->__pyx_t_0 = 0;
-  return o;
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamtools.Outs.setdevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_fd);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-static void __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct_4_genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->__pyx_outer_scope);
-  Py_CLEAR(p->__pyx_v_x);
-  Py_CLEAR(p->__pyx_t_0);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
-}
+/* "pysam/csamtools.pyx":48
+ *         self.setfd(fd)
+ * 
+ *     def setfile(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open a new file.'''
+ *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660)
+ */
 
-static int __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *)o;
-  if (p->__pyx_outer_scope) {
-    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
-  }
-  if (p->__pyx_v_x) {
-    e = (*v)(p->__pyx_v_x, a); if (e) return e;
-  }
-  if (p->__pyx_t_0) {
-    e = (*v)(p->__pyx_t_0, a); if (e) return e;
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_5setfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_4Outs_4setfile[] = "Outs.setfile(self, filename)\nopen a new file.";
+static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_5setfile = {__Pyx_NAMESTR("setfile"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_5setfile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs_4setfile)};
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_5setfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_filename = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("setfile (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("setfile", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_filename = values[1];
   }
-  return 0;
-}
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("setfile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamtools.Outs.setfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs_4setfile(__pyx_self, __pyx_v_self, __pyx_v_filename);
 
-static int __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct_4_genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->__pyx_outer_scope);
-  p->__pyx_outer_scope = ((struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_2__open *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_v_x);
-  p->__pyx_v_x = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_t_0);
-  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-static PyMethodDef __pyx_methods_5pysam_9csamtools___pyx_scope_struct_4_genexpr[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_4_genexpr = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_4setfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
+  PyObject *__pyx_v_fd = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("setfile", 0);
+  __Pyx_TraceCall("setfile", __pyx_f[0], 48);
 
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_4_genexpr = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
+  /* "pysam/csamtools.pyx":50
+ *     def setfile(self, filename):
+ *         '''open a new file.'''
+ *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660)             # <<<<<<<<<<<<<<
+ *         self.setfd(fd)
+ * 
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_O_WRONLY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_O_CREAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_v_filename);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
+  __Pyx_GIVEREF(__pyx_v_filename);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_int_432);
+  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_432);
+  __Pyx_GIVEREF(__pyx_int_432);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_fd = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_4_genexpr = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
+  /* "pysam/csamtools.pyx":51
+ *         '''open a new file.'''
+ *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660)
+ *         self.setfd(fd)             # <<<<<<<<<<<<<<
+ * 
+ *     def setfd(self, fd):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setfd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __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 = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_v_fd);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fd);
+  __Pyx_GIVEREF(__pyx_v_fd);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __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_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_4_genexpr = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
+  /* "pysam/csamtools.pyx":48
+ *         self.setfd(fd)
+ * 
+ *     def setfile(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open a new file.'''
+ *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660)
+ */
 
-static PyTypeObject __pyx_type_5pysam_9csamtools___pyx_scope_struct_4_genexpr = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.csamtools.__pyx_scope_struct_4_genexpr"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_9csamtools___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number___pyx_scope_struct_4_genexpr, /*tp_as_number*/
-  &__pyx_tp_as_sequence___pyx_scope_struct_4_genexpr, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping___pyx_scope_struct_4_genexpr, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer___pyx_scope_struct_4_genexpr, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
-  __pyx_tp_traverse_5pysam_9csamtools___pyx_scope_struct_4_genexpr, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_9csamtools___pyx_scope_struct_4_genexpr, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_9csamtools___pyx_scope_struct_4_genexpr, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  0, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_9csamtools___pyx_scope_struct_4_genexpr, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.csamtools.Outs.setfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_fd);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-static PyMethodDef __pyx_methods[] = {
-  {0, 0, 0, 0}
-};
+/* "pysam/csamtools.pyx":53
+ *         self.setfd(fd)
+ * 
+ *     def setfd(self, fd):             # <<<<<<<<<<<<<<
+ *         ofd = os.dup(self.id)      #  Save old stream on new unit.
+ *         self.streams.append(ofd)
+ */
 
-#if PY_MAJOR_VERSION >= 3
-static struct PyModuleDef __pyx_moduledef = {
-  #if PY_VERSION_HEX < 0x03020000
-    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
-  #else
-    PyModuleDef_HEAD_INIT,
-  #endif
-    __Pyx_NAMESTR("csamtools"),
-    0, /* m_doc */
-    -1, /* m_size */
-    __pyx_methods /* m_methods */,
-    NULL, /* m_reload */
-    NULL, /* m_traverse */
-    NULL, /* m_clear */
-    NULL /* m_free */
-};
-#endif
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_7setfd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_4Outs_6setfd[] = "Outs.setfd(self, fd)";
+static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_7setfd = {__Pyx_NAMESTR("setfd"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_7setfd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs_6setfd)};
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_7setfd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_fd = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("setfd (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fd,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("setfd", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_fd = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("setfd", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamtools.Outs.setfd", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs_6setfd(__pyx_self, __pyx_v_self, __pyx_v_fd);
 
-static __Pyx_StringTabEntry __pyx_string_tab[] = {
-  {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0},
-  {&__pyx_kp_b_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 0, 0},
-  {&__pyx_kp_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 0},
-  {&__pyx_kp_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 0},
-  {&__pyx_kp_s_109, __pyx_k_109, sizeof(__pyx_k_109), 0, 0, 1, 0},
-  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
-  {&__pyx_kp_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 0},
-  {&__pyx_kp_s_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 1, 0},
-  {&__pyx_kp_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 0},
-  {&__pyx_kp_s_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 1, 0},
-  {&__pyx_kp_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 0},
-  {&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0},
-  {&__pyx_kp_s_120, __pyx_k_120, sizeof(__pyx_k_120), 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_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 0},
-  {&__pyx_kp_s_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 1, 0},
-  {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 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_140, __pyx_k_140, sizeof(__pyx_k_140), 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_15, __pyx_k_15, sizeof(__pyx_k_15), 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_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 1, 0},
-  {&__pyx_n_s_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 0, 1, 1},
-  {&__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_kp_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 0},
-  {&__pyx_kp_s_164, __pyx_k_164, sizeof(__pyx_k_164), 0, 0, 1, 0},
-  {&__pyx_kp_s_165, __pyx_k_165, sizeof(__pyx_k_165), 0, 0, 1, 0},
-  {&__pyx_kp_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 0},
-  {&__pyx_kp_s_167, __pyx_k_167, sizeof(__pyx_k_167), 0, 0, 1, 0},
-  {&__pyx_kp_s_168, __pyx_k_168, sizeof(__pyx_k_168), 0, 0, 1, 0},
-  {&__pyx_kp_s_169, __pyx_k_169, sizeof(__pyx_k_169), 0, 0, 1, 0},
-  {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
-  {&__pyx_kp_s_170, __pyx_k_170, sizeof(__pyx_k_170), 0, 0, 1, 0},
-  {&__pyx_kp_s_171, __pyx_k_171, sizeof(__pyx_k_171), 0, 0, 1, 0},
-  {&__pyx_kp_s_172, __pyx_k_172, sizeof(__pyx_k_172), 0, 0, 1, 0},
-  {&__pyx_kp_s_173, __pyx_k_173, sizeof(__pyx_k_173), 0, 0, 1, 0},
-  {&__pyx_kp_s_174, __pyx_k_174, sizeof(__pyx_k_174), 0, 0, 1, 0},
-  {&__pyx_kp_s_175, __pyx_k_175, sizeof(__pyx_k_175), 0, 0, 1, 0},
-  {&__pyx_kp_s_176, __pyx_k_176, sizeof(__pyx_k_176), 0, 0, 1, 0},
-  {&__pyx_kp_s_177, __pyx_k_177, sizeof(__pyx_k_177), 0, 0, 1, 0},
-  {&__pyx_kp_s_178, __pyx_k_178, sizeof(__pyx_k_178), 0, 0, 1, 0},
-  {&__pyx_kp_s_179, __pyx_k_179, sizeof(__pyx_k_179), 0, 0, 1, 0},
-  {&__pyx_kp_s_180, __pyx_k_180, sizeof(__pyx_k_180), 0, 0, 1, 0},
-  {&__pyx_kp_s_181, __pyx_k_181, sizeof(__pyx_k_181), 0, 0, 1, 0},
-  {&__pyx_kp_s_182, __pyx_k_182, sizeof(__pyx_k_182), 0, 0, 1, 0},
-  {&__pyx_kp_s_184, __pyx_k_184, sizeof(__pyx_k_184), 0, 0, 1, 0},
-  {&__pyx_kp_s_188, __pyx_k_188, sizeof(__pyx_k_188), 0, 0, 1, 0},
-  {&__pyx_kp_s_189, __pyx_k_189, sizeof(__pyx_k_189), 0, 0, 1, 0},
-  {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
-  {&__pyx_kp_s_190, __pyx_k_190, sizeof(__pyx_k_190), 0, 0, 1, 0},
-  {&__pyx_kp_s_196, __pyx_k_196, sizeof(__pyx_k_196), 0, 0, 1, 0},
-  {&__pyx_kp_s_197, __pyx_k_197, sizeof(__pyx_k_197), 0, 0, 1, 0},
-  {&__pyx_kp_b_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 0, 0},
-  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
-  {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
-  {&__pyx_kp_s_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_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
-  {&__pyx_n_s_262, __pyx_k_262, sizeof(__pyx_k_262), 0, 0, 1, 1},
-  {&__pyx_kp_s_264, __pyx_k_264, sizeof(__pyx_k_264), 0, 0, 1, 0},
-  {&__pyx_kp_s_269, __pyx_k_269, sizeof(__pyx_k_269), 0, 0, 1, 0},
-  {&__pyx_n_s_270, __pyx_k_270, sizeof(__pyx_k_270), 0, 0, 1, 1},
-  {&__pyx_n_s_271, __pyx_k_271, sizeof(__pyx_k_271), 0, 0, 1, 1},
-  {&__pyx_kp_s_272, __pyx_k_272, sizeof(__pyx_k_272), 0, 0, 1, 0},
-  {&__pyx_n_s_275, __pyx_k_275, sizeof(__pyx_k_275), 0, 0, 1, 1},
-  {&__pyx_n_s_278, __pyx_k_278, sizeof(__pyx_k_278), 0, 0, 1, 1},
-  {&__pyx_n_s_281, __pyx_k_281, sizeof(__pyx_k_281), 0, 0, 1, 1},
-  {&__pyx_n_s_284, __pyx_k_284, sizeof(__pyx_k_284), 0, 0, 1, 1},
-  {&__pyx_kp_s_285, __pyx_k_285, sizeof(__pyx_k_285), 0, 0, 1, 0},
-  {&__pyx_n_s_288, __pyx_k_288, sizeof(__pyx_k_288), 0, 0, 1, 1},
-  {&__pyx_n_s_291, __pyx_k_291, sizeof(__pyx_k_291), 0, 0, 1, 1},
-  {&__pyx_n_s_294, __pyx_k_294, sizeof(__pyx_k_294), 0, 0, 1, 1},
-  {&__pyx_kp_s_295, __pyx_k_295, sizeof(__pyx_k_295), 0, 0, 1, 0},
-  {&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0, 0},
-  {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
-  {&__pyx_n_s_304, __pyx_k_304, sizeof(__pyx_k_304), 0, 0, 1, 1},
-  {&__pyx_n_s_307, __pyx_k_307, sizeof(__pyx_k_307), 0, 0, 1, 1},
-  {&__pyx_n_s_310, __pyx_k_310, sizeof(__pyx_k_310), 0, 0, 1, 1},
-  {&__pyx_n_s_313, __pyx_k_313, sizeof(__pyx_k_313), 0, 0, 1, 1},
-  {&__pyx_n_s_316, __pyx_k_316, sizeof(__pyx_k_316), 0, 0, 1, 1},
-  {&__pyx_kp_s_317, __pyx_k_317, sizeof(__pyx_k_317), 0, 0, 1, 0},
-  {&__pyx_kp_b_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 0, 0},
-  {&__pyx_kp_b_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 0, 0},
-  {&__pyx_kp_b_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 0, 0},
-  {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0},
-  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
-  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
-  {&__pyx_kp_s_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_b_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 0, 0},
-  {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
-  {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0},
-  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
-  {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0},
-  {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0},
-  {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0},
-  {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0},
-  {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0},
-  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
-  {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0},
-  {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
-  {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0},
-  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
-  {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0},
-  {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0},
-  {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 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_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0},
-  {&__pyx_kp_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 0},
-  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
-  {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0},
-  {&__pyx_kp_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 0},
-  {&__pyx_kp_s_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 1, 0},
-  {&__pyx_kp_s__2scB, __pyx_k__2scB, sizeof(__pyx_k__2scB), 0, 0, 1, 0},
-  {&__pyx_kp_s__2scH, __pyx_k__2scH, sizeof(__pyx_k__2scH), 0, 0, 1, 0},
-  {&__pyx_kp_s__2scI, __pyx_k__2scI, sizeof(__pyx_k__2scI), 0, 0, 1, 0},
-  {&__pyx_kp_s__2scb, __pyx_k__2scb, sizeof(__pyx_k__2scb), 0, 0, 1, 0},
-  {&__pyx_kp_s__2scc, __pyx_k__2scc, sizeof(__pyx_k__2scc), 0, 0, 1, 0},
-  {&__pyx_kp_s__2scf, __pyx_k__2scf, sizeof(__pyx_k__2scf), 0, 0, 1, 0},
-  {&__pyx_kp_s__2sch, __pyx_k__2sch, sizeof(__pyx_k__2sch), 0, 0, 1, 0},
-  {&__pyx_kp_s__2sci, __pyx_k__2sci, sizeof(__pyx_k__2sci), 0, 0, 1, 0},
-  {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1},
-  {&__pyx_n_s__AS, __pyx_k__AS, sizeof(__pyx_k__AS), 0, 0, 1, 1},
-  {&__pyx_n_s__AlignedRead, __pyx_k__AlignedRead, sizeof(__pyx_k__AlignedRead), 0, 0, 1, 1},
-  {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
-  {&__pyx_n_s__B, __pyx_k__B, sizeof(__pyx_k__B), 0, 0, 1, 1},
-  {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1},
-  {&__pyx_n_s__CIGAR2CODE, __pyx_k__CIGAR2CODE, sizeof(__pyx_k__CIGAR2CODE), 0, 0, 1, 1},
-  {&__pyx_n_s__CIGAR_REGEX, __pyx_k__CIGAR_REGEX, sizeof(__pyx_k__CIGAR_REGEX), 0, 0, 1, 1},
-  {&__pyx_n_s__CL, __pyx_k__CL, sizeof(__pyx_k__CL), 0, 0, 1, 1},
-  {&__pyx_n_s__CN, __pyx_k__CN, sizeof(__pyx_k__CN), 0, 0, 1, 1},
-  {&__pyx_n_s__CO, __pyx_k__CO, sizeof(__pyx_k__CO), 0, 0, 1, 1},
-  {&__pyx_n_s__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 1, 1},
-  {&__pyx_n_s__DS, __pyx_k__DS, sizeof(__pyx_k__DS), 0, 0, 1, 1},
-  {&__pyx_n_s__DT, __pyx_k__DT, sizeof(__pyx_k__DT), 0, 0, 1, 1},
-  {&__pyx_n_s__F, __pyx_k__F, sizeof(__pyx_k__F), 0, 0, 1, 1},
-  {&__pyx_n_s__FO, __pyx_k__FO, sizeof(__pyx_k__FO), 0, 0, 1, 1},
-  {&__pyx_n_s__Fastafile, __pyx_k__Fastafile, sizeof(__pyx_k__Fastafile), 0, 0, 1, 1},
-  {&__pyx_n_s__Fastqfile, __pyx_k__Fastqfile, sizeof(__pyx_k__Fastqfile), 0, 0, 1, 1},
-  {&__pyx_n_s__GO, __pyx_k__GO, sizeof(__pyx_k__GO), 0, 0, 1, 1},
-  {&__pyx_n_s__H, __pyx_k__H, sizeof(__pyx_k__H), 0, 0, 1, 1},
-  {&__pyx_n_s__HD, __pyx_k__HD, sizeof(__pyx_k__HD), 0, 0, 1, 1},
-  {&__pyx_n_s__I, __pyx_k__I, sizeof(__pyx_k__I), 0, 0, 1, 1},
-  {&__pyx_n_s__ID, __pyx_k__ID, sizeof(__pyx_k__ID), 0, 0, 1, 1},
-  {&__pyx_n_s__IOError, __pyx_k__IOError, sizeof(__pyx_k__IOError), 0, 0, 1, 1},
-  {&__pyx_n_s__IS_PYTHON3, __pyx_k__IS_PYTHON3, sizeof(__pyx_k__IS_PYTHON3), 0, 0, 1, 1},
-  {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
-  {&__pyx_n_s__IndexedReads, __pyx_k__IndexedReads, sizeof(__pyx_k__IndexedReads), 0, 0, 1, 1},
-  {&__pyx_n_s__IteratorColumn, __pyx_k__IteratorColumn, sizeof(__pyx_k__IteratorColumn), 0, 0, 1, 1},
-  {&__pyx_n_s__IteratorRow, __pyx_k__IteratorRow, sizeof(__pyx_k__IteratorRow), 0, 0, 1, 1},
-  {&__pyx_n_s__KS, __pyx_k__KS, sizeof(__pyx_k__KS), 0, 0, 1, 1},
-  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
-  {&__pyx_n_s__LB, __pyx_k__LB, sizeof(__pyx_k__LB), 0, 0, 1, 1},
-  {&__pyx_n_s__LN, __pyx_k__LN, sizeof(__pyx_k__LN), 0, 0, 1, 1},
-  {&__pyx_n_s__M5, __pyx_k__M5, sizeof(__pyx_k__M5), 0, 0, 1, 1},
-  {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1},
-  {&__pyx_n_s__OSError, __pyx_k__OSError, sizeof(__pyx_k__OSError), 0, 0, 1, 1},
-  {&__pyx_n_s__O_CREAT, __pyx_k__O_CREAT, sizeof(__pyx_k__O_CREAT), 0, 0, 1, 1},
-  {&__pyx_n_s__O_WRONLY, __pyx_k__O_WRONLY, sizeof(__pyx_k__O_WRONLY), 0, 0, 1, 1},
-  {&__pyx_n_s__Outs, __pyx_k__Outs, sizeof(__pyx_k__Outs), 0, 0, 1, 1},
-  {&__pyx_n_s__OverflowError, __pyx_k__OverflowError, sizeof(__pyx_k__OverflowError), 0, 0, 1, 1},
-  {&__pyx_n_s__PG, __pyx_k__PG, sizeof(__pyx_k__PG), 0, 0, 1, 1},
-  {&__pyx_n_s__PI, __pyx_k__PI, sizeof(__pyx_k__PI), 0, 0, 1, 1},
-  {&__pyx_n_s__PL, __pyx_k__PL, sizeof(__pyx_k__PL), 0, 0, 1, 1},
-  {&__pyx_n_s__PN, __pyx_k__PN, sizeof(__pyx_k__PN), 0, 0, 1, 1},
-  {&__pyx_n_s__PP, __pyx_k__PP, sizeof(__pyx_k__PP), 0, 0, 1, 1},
-  {&__pyx_n_s__PU, __pyx_k__PU, sizeof(__pyx_k__PU), 0, 0, 1, 1},
-  {&__pyx_n_s__PileupColumn, __pyx_k__PileupColumn, sizeof(__pyx_k__PileupColumn), 0, 0, 1, 1},
-  {&__pyx_n_s__PileupProxy, __pyx_k__PileupProxy, sizeof(__pyx_k__PileupProxy), 0, 0, 1, 1},
-  {&__pyx_n_s__PileupRead, __pyx_k__PileupRead, sizeof(__pyx_k__PileupRead), 0, 0, 1, 1},
-  {&__pyx_n_s__RG, __pyx_k__RG, sizeof(__pyx_k__RG), 0, 0, 1, 1},
-  {&__pyx_n_s__S, __pyx_k__S, sizeof(__pyx_k__S), 0, 0, 1, 1},
-  {&__pyx_n_s__SM, __pyx_k__SM, sizeof(__pyx_k__SM), 0, 0, 1, 1},
-  {&__pyx_n_s__SN, __pyx_k__SN, sizeof(__pyx_k__SN), 0, 0, 1, 1},
-  {&__pyx_n_s__SO, __pyx_k__SO, sizeof(__pyx_k__SO), 0, 0, 1, 1},
-  {&__pyx_n_s__SP, __pyx_k__SP, sizeof(__pyx_k__SP), 0, 0, 1, 1},
-  {&__pyx_n_s__SQ, __pyx_k__SQ, sizeof(__pyx_k__SQ), 0, 0, 1, 1},
-  {&__pyx_n_s__Samfile, __pyx_k__Samfile, sizeof(__pyx_k__Samfile), 0, 0, 1, 1},
-  {&__pyx_n_s__StderrStore, __pyx_k__StderrStore, sizeof(__pyx_k__StderrStore), 0, 0, 1, 1},
-  {&__pyx_n_s__StderrStoreWindows, __pyx_k__StderrStoreWindows, sizeof(__pyx_k__StderrStoreWindows), 0, 0, 1, 1},
-  {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
-  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
-  {&__pyx_n_s__UR, __pyx_k__UR, sizeof(__pyx_k__UR), 0, 0, 1, 1},
-  {&__pyx_n_s__UnicodeDecodeError, __pyx_k__UnicodeDecodeError, sizeof(__pyx_k__UnicodeDecodeError), 0, 0, 1, 1},
-  {&__pyx_n_s__VALID_HEADERS, __pyx_k__VALID_HEADERS, sizeof(__pyx_k__VALID_HEADERS), 0, 0, 1, 1},
-  {&__pyx_n_s__VALID_HEADER_FIELDS, __pyx_k__VALID_HEADER_FIELDS, sizeof(__pyx_k__VALID_HEADER_FIELDS), 0, 0, 1, 1},
-  {&__pyx_n_s__VALID_HEADER_ORDER, __pyx_k__VALID_HEADER_ORDER, sizeof(__pyx_k__VALID_HEADER_ORDER), 0, 0, 1, 1},
-  {&__pyx_n_s__VALID_HEADER_TYPES, __pyx_k__VALID_HEADER_TYPES, sizeof(__pyx_k__VALID_HEADER_TYPES), 0, 0, 1, 1},
-  {&__pyx_n_s__VN, __pyx_k__VN, sizeof(__pyx_k__VN), 0, 0, 1, 1},
-  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
-  {&__pyx_n_s__Windows, __pyx_k__Windows, sizeof(__pyx_k__Windows), 0, 0, 1, 1},
-  {&__pyx_n_s__Z, __pyx_k__Z, sizeof(__pyx_k__Z), 0, 0, 1, 1},
-  {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1},
-  {&__pyx_n_s____del__, __pyx_k____del__, sizeof(__pyx_k____del__), 0, 0, 1, 1},
-  {&__pyx_n_s____dict__, __pyx_k____dict__, sizeof(__pyx_k____dict__), 0, 0, 1, 1},
-  {&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1},
-  {&__pyx_n_s____exit__, __pyx_k____exit__, sizeof(__pyx_k____exit__), 0, 0, 1, 1},
-  {&__pyx_n_s____getattribute__, __pyx_k____getattribute__, sizeof(__pyx_k____getattribute__), 0, 0, 1, 1},
-  {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
-  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
-  {&__pyx_n_s____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___buildLine, __pyx_k___buildLine, sizeof(__pyx_k___buildLine), 0, 0, 1, 1},
-  {&__pyx_n_s___hasIndex, __pyx_k___hasIndex, sizeof(__pyx_k___hasIndex), 0, 0, 1, 1},
-  {&__pyx_n_s___isOpen, __pyx_k___isOpen, sizeof(__pyx_k___isOpen), 0, 0, 1, 1},
-  {&__pyx_n_s___open, __pyx_k___open, sizeof(__pyx_k___open), 0, 0, 1, 1},
-  {&__pyx_n_s___parseRegion, __pyx_k___parseRegion, sizeof(__pyx_k___parseRegion), 0, 0, 1, 1},
-  {&__pyx_n_s___samtools_dispatch, __pyx_k___samtools_dispatch, sizeof(__pyx_k___samtools_dispatch), 0, 0, 1, 1},
-  {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
-  {&__pyx_n_s__add_sq_text, __pyx_k__add_sq_text, sizeof(__pyx_k__add_sq_text), 0, 0, 1, 1},
-  {&__pyx_n_s__alignment, __pyx_k__alignment, sizeof(__pyx_k__alignment), 0, 0, 1, 1},
-  {&__pyx_n_s__all, __pyx_k__all, sizeof(__pyx_k__all), 0, 0, 1, 1},
-  {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1},
-  {&__pyx_n_s__ascii, __pyx_k__ascii, sizeof(__pyx_k__ascii), 0, 0, 1, 1},
-  {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1},
-  {&__pyx_n_s__beg, __pyx_k__beg, sizeof(__pyx_k__beg), 0, 0, 1, 1},
-  {&__pyx_n_s__bin, __pyx_k__bin, sizeof(__pyx_k__bin), 0, 0, 1, 1},
-  {&__pyx_n_s__bqual, __pyx_k__bqual, sizeof(__pyx_k__bqual), 0, 0, 1, 1},
-  {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
-  {&__pyx_n_s__calcsize, __pyx_k__calcsize, sizeof(__pyx_k__calcsize), 0, 0, 1, 1},
-  {&__pyx_n_s__callback, __pyx_k__callback, sizeof(__pyx_k__callback), 0, 0, 1, 1},
-  {&__pyx_n_s__cargs, __pyx_k__cargs, sizeof(__pyx_k__cargs), 0, 0, 1, 1},
-  {&__pyx_n_s__catch_stdout, __pyx_k__catch_stdout, sizeof(__pyx_k__catch_stdout), 0, 0, 1, 1},
-  {&__pyx_n_s__check_header, __pyx_k__check_header, sizeof(__pyx_k__check_header), 0, 0, 1, 1},
-  {&__pyx_n_s__check_sq, __pyx_k__check_sq, sizeof(__pyx_k__check_sq), 0, 0, 1, 1},
-  {&__pyx_n_s__chr, __pyx_k__chr, sizeof(__pyx_k__chr), 0, 0, 1, 1},
-  {&__pyx_n_s__cigar, __pyx_k__cigar, sizeof(__pyx_k__cigar), 0, 0, 1, 1},
-  {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1},
-  {&__pyx_n_s__collections, __pyx_k__collections, sizeof(__pyx_k__collections), 0, 0, 1, 1},
-  {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1},
-  {&__pyx_n_s__consensus_quality, __pyx_k__consensus_quality, sizeof(__pyx_k__consensus_quality), 0, 0, 1, 1},
-  {&__pyx_n_s__coverage, __pyx_k__coverage, sizeof(__pyx_k__coverage), 0, 0, 1, 1},
-  {&__pyx_n_s__ctypes, __pyx_k__ctypes, sizeof(__pyx_k__ctypes), 0, 0, 1, 1},
-  {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1},
-  {&__pyx_n_s__data_len, __pyx_k__data_len, sizeof(__pyx_k__data_len), 0, 0, 1, 1},
-  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
-  {&__pyx_n_s__defaultdict, __pyx_k__defaultdict, sizeof(__pyx_k__defaultdict), 0, 0, 1, 1},
-  {&__pyx_n_s__dup, __pyx_k__dup, sizeof(__pyx_k__dup), 0, 0, 1, 1},
-  {&__pyx_n_s__dup2, __pyx_k__dup2, sizeof(__pyx_k__dup2), 0, 0, 1, 1},
-  {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
-  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
-  {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
-  {&__pyx_n_s__exc_type, __pyx_k__exc_type, sizeof(__pyx_k__exc_type), 0, 0, 1, 1},
-  {&__pyx_n_s__exc_value, __pyx_k__exc_value, sizeof(__pyx_k__exc_value), 0, 0, 1, 1},
-  {&__pyx_n_s__exists, __pyx_k__exists, sizeof(__pyx_k__exists), 0, 0, 1, 1},
-  {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1},
-  {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
-  {&__pyx_n_s__fastafile, __pyx_k__fastafile, sizeof(__pyx_k__fastafile), 0, 0, 1, 1},
-  {&__pyx_n_s__fd, __pyx_k__fd, sizeof(__pyx_k__fd), 0, 0, 1, 1},
-  {&__pyx_n_s__fetch, __pyx_k__fetch, sizeof(__pyx_k__fetch), 0, 0, 1, 1},
-  {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
-  {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
-  {&__pyx_n_s__fileno, __pyx_k__fileno, sizeof(__pyx_k__fileno), 0, 0, 1, 1},
-  {&__pyx_n_s__findall, __pyx_k__findall, sizeof(__pyx_k__findall), 0, 0, 1, 1},
-  {&__pyx_n_s__flag, __pyx_k__flag, sizeof(__pyx_k__flag), 0, 0, 1, 1},
-  {&__pyx_n_s__flush, __pyx_k__flush, sizeof(__pyx_k__flush), 0, 0, 1, 1},
-  {&__pyx_n_s__genotype, __pyx_k__genotype, sizeof(__pyx_k__genotype), 0, 0, 1, 1},
-  {&__pyx_n_s__getdefaultencoding, __pyx_k__getdefaultencoding, sizeof(__pyx_k__getdefaultencoding), 0, 0, 1, 1},
-  {&__pyx_n_s__gettid, __pyx_k__gettid, sizeof(__pyx_k__gettid), 0, 0, 1, 1},
-  {&__pyx_n_s__h, __pyx_k__h, sizeof(__pyx_k__h), 0, 0, 1, 1},
-  {&__pyx_n_s__header, __pyx_k__header, sizeof(__pyx_k__header), 0, 0, 1, 1},
-  {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
-  {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
-  {&__pyx_n_s__indel, __pyx_k__indel, sizeof(__pyx_k__indel), 0, 0, 1, 1},
-  {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1},
-  {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1},
-  {&__pyx_n_s__is_del, __pyx_k__is_del, sizeof(__pyx_k__is_del), 0, 0, 1, 1},
-  {&__pyx_n_s__is_head, __pyx_k__is_head, sizeof(__pyx_k__is_head), 0, 0, 1, 1},
-  {&__pyx_n_s__is_tail, __pyx_k__is_tail, sizeof(__pyx_k__is_tail), 0, 0, 1, 1},
-  {&__pyx_n_s__isize, __pyx_k__isize, sizeof(__pyx_k__isize), 0, 0, 1, 1},
-  {&__pyx_n_s__islower, __pyx_k__islower, sizeof(__pyx_k__islower), 0, 0, 1, 1},
-  {&__pyx_n_s__isupper, __pyx_k__isupper, sizeof(__pyx_k__isupper), 0, 0, 1, 1},
-  {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
-  {&__pyx_n_s__itertools, __pyx_k__itertools, sizeof(__pyx_k__itertools), 0, 0, 1, 1},
-  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
-  {&__pyx_n_s__l_aux, __pyx_k__l_aux, sizeof(__pyx_k__l_aux), 0, 0, 1, 1},
-  {&__pyx_n_s__l_qname, __pyx_k__l_qname, sizeof(__pyx_k__l_qname), 0, 0, 1, 1},
-  {&__pyx_n_s__l_qseq, __pyx_k__l_qseq, sizeof(__pyx_k__l_qseq), 0, 0, 1, 1},
-  {&__pyx_n_s__lengths, __pyx_k__lengths, sizeof(__pyx_k__lengths), 0, 0, 1, 1},
-  {&__pyx_n_s__level, __pyx_k__level, sizeof(__pyx_k__level), 0, 0, 1, 1},
-  {&__pyx_n_s__m_data, __pyx_k__m_data, sizeof(__pyx_k__m_data), 0, 0, 1, 1},
-  {&__pyx_n_s__map, __pyx_k__map, sizeof(__pyx_k__map), 0, 0, 1, 1},
-  {&__pyx_n_s__mapping_quality, __pyx_k__mapping_quality, sizeof(__pyx_k__mapping_quality), 0, 0, 1, 1},
-  {&__pyx_n_s__mapq, __pyx_k__mapq, sizeof(__pyx_k__mapq), 0, 0, 1, 1},
-  {&__pyx_n_s__mask, __pyx_k__mask, sizeof(__pyx_k__mask), 0, 0, 1, 1},
-  {&__pyx_n_s__max, __pyx_k__max, sizeof(__pyx_k__max), 0, 0, 1, 1},
-  {&__pyx_n_s__max_depth, __pyx_k__max_depth, sizeof(__pyx_k__max_depth), 0, 0, 1, 1},
-  {&__pyx_n_s__method, __pyx_k__method, sizeof(__pyx_k__method), 0, 0, 1, 1},
-  {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1},
-  {&__pyx_n_s__mkstemp, __pyx_k__mkstemp, sizeof(__pyx_k__mkstemp), 0, 0, 1, 1},
-  {&__pyx_n_s__mode, __pyx_k__mode, sizeof(__pyx_k__mode), 0, 0, 1, 1},
-  {&__pyx_n_s__mpos, __pyx_k__mpos, sizeof(__pyx_k__mpos), 0, 0, 1, 1},
-  {&__pyx_n_s__mrnm, __pyx_k__mrnm, sizeof(__pyx_k__mrnm), 0, 0, 1, 1},
-  {&__pyx_n_s__mtid, __pyx_k__mtid, sizeof(__pyx_k__mtid), 0, 0, 1, 1},
-  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
-  {&__pyx_n_s__n_cigar, __pyx_k__n_cigar, sizeof(__pyx_k__n_cigar), 0, 0, 1, 1},
-  {&__pyx_n_s__nextiter, __pyx_k__nextiter, sizeof(__pyx_k__nextiter), 0, 0, 1, 1},
-  {&__pyx_n_s__nreferences, __pyx_k__nreferences, sizeof(__pyx_k__nreferences), 0, 0, 1, 1},
-  {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
-  {&__pyx_n_s__ofd, __pyx_k__ofd, sizeof(__pyx_k__ofd), 0, 0, 1, 1},
-  {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1},
-  {&__pyx_n_s__open, __pyx_k__open, sizeof(__pyx_k__open), 0, 0, 1, 1},
-  {&__pyx_n_s__ord, __pyx_k__ord, sizeof(__pyx_k__ord), 0, 0, 1, 1},
-  {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1},
-  {&__pyx_n_s__out_stderr, __pyx_k__out_stderr, sizeof(__pyx_k__out_stderr), 0, 0, 1, 1},
-  {&__pyx_n_s__out_stdout, __pyx_k__out_stdout, sizeof(__pyx_k__out_stdout), 0, 0, 1, 1},
-  {&__pyx_n_s__pack_into, __pyx_k__pack_into, sizeof(__pyx_k__pack_into), 0, 0, 1, 1},
-  {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1},
-  {&__pyx_n_s__pileups, __pyx_k__pileups, sizeof(__pyx_k__pileups), 0, 0, 1, 1},
-  {&__pyx_n_s__platform, __pyx_k__platform, sizeof(__pyx_k__platform), 0, 0, 1, 1},
-  {&__pyx_n_s__port, __pyx_k__port, sizeof(__pyx_k__port), 0, 0, 1, 1},
-  {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
-  {&__pyx_n_s__positions, __pyx_k__positions, sizeof(__pyx_k__positions), 0, 0, 1, 1},
-  {&__pyx_n_s__qname, __pyx_k__qname, sizeof(__pyx_k__qname), 0, 0, 1, 1},
-  {&__pyx_n_s__qpos, __pyx_k__qpos, sizeof(__pyx_k__qpos), 0, 0, 1, 1},
-  {&__pyx_n_s__qseq, __pyx_k__qseq, sizeof(__pyx_k__qseq), 0, 0, 1, 1},
-  {&__pyx_n_s__qual, __pyx_k__qual, sizeof(__pyx_k__qual), 0, 0, 1, 1},
-  {&__pyx_n_b__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 0, 1},
-  {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1},
-  {&__pyx_n_s__rU, __pyx_k__rU, sizeof(__pyx_k__rU), 0, 0, 1, 1},
-  {&__pyx_n_s__raw, __pyx_k__raw, sizeof(__pyx_k__raw), 0, 0, 1, 1},
-  {&__pyx_n_b__rb, __pyx_k__rb, sizeof(__pyx_k__rb), 0, 0, 0, 1},
-  {&__pyx_n_s__rb, __pyx_k__rb, sizeof(__pyx_k__rb), 0, 0, 1, 1},
-  {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1},
-  {&__pyx_n_s__read, __pyx_k__read, sizeof(__pyx_k__read), 0, 0, 1, 1},
-  {&__pyx_n_s__readAndRelease, __pyx_k__readAndRelease, sizeof(__pyx_k__readAndRelease), 0, 0, 1, 1},
-  {&__pyx_n_s__readlines, __pyx_k__readlines, sizeof(__pyx_k__readlines), 0, 0, 1, 1},
-  {&__pyx_n_s__record, __pyx_k__record, sizeof(__pyx_k__record), 0, 0, 1, 1},
-  {&__pyx_n_s__reference, __pyx_k__reference, sizeof(__pyx_k__reference), 0, 0, 1, 1},
-  {&__pyx_n_s__reference_base, __pyx_k__reference_base, sizeof(__pyx_k__reference_base), 0, 0, 1, 1},
-  {&__pyx_n_s__referencelengths, __pyx_k__referencelengths, sizeof(__pyx_k__referencelengths), 0, 0, 1, 1},
-  {&__pyx_n_s__referencenames, __pyx_k__referencenames, sizeof(__pyx_k__referencenames), 0, 0, 1, 1},
-  {&__pyx_n_s__references, __pyx_k__references, sizeof(__pyx_k__references), 0, 0, 1, 1},
-  {&__pyx_n_s__region, __pyx_k__region, sizeof(__pyx_k__region), 0, 0, 1, 1},
-  {&__pyx_n_s__release, __pyx_k__release, sizeof(__pyx_k__release), 0, 0, 1, 1},
-  {&__pyx_n_s__remove, __pyx_k__remove, sizeof(__pyx_k__remove), 0, 0, 1, 1},
-  {&__pyx_n_s__reopen, __pyx_k__reopen, sizeof(__pyx_k__reopen), 0, 0, 1, 1},
-  {&__pyx_n_s__restore, __pyx_k__restore, sizeof(__pyx_k__restore), 0, 0, 1, 1},
-  {&__pyx_n_s__retval, __pyx_k__retval, sizeof(__pyx_k__retval), 0, 0, 1, 1},
-  {&__pyx_n_s__rlen, __pyx_k__rlen, sizeof(__pyx_k__rlen), 0, 0, 1, 1},
-  {&__pyx_n_s__rname, __pyx_k__rname, sizeof(__pyx_k__rname), 0, 0, 1, 1},
-  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
-  {&__pyx_n_s__samfile, __pyx_k__samfile, sizeof(__pyx_k__samfile), 0, 0, 1, 1},
-  {&__pyx_n_s__samtools, __pyx_k__samtools, sizeof(__pyx_k__samtools), 0, 0, 1, 1},
-  {&__pyx_n_s__seek, __pyx_k__seek, sizeof(__pyx_k__seek), 0, 0, 1, 1},
-  {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
-  {&__pyx_n_s__seq, __pyx_k__seq, sizeof(__pyx_k__seq), 0, 0, 1, 1},
-  {&__pyx_n_s__setdevice, __pyx_k__setdevice, sizeof(__pyx_k__setdevice), 0, 0, 1, 1},
-  {&__pyx_n_s__setfd, __pyx_k__setfd, sizeof(__pyx_k__setfd), 0, 0, 1, 1},
-  {&__pyx_n_s__setfile, __pyx_k__setfile, sizeof(__pyx_k__setfile), 0, 0, 1, 1},
-  {&__pyx_n_s__snp_quality, __pyx_k__snp_quality, sizeof(__pyx_k__snp_quality), 0, 0, 1, 1},
-  {&__pyx_n_s__sorted, __pyx_k__sorted, sizeof(__pyx_k__sorted), 0, 0, 1, 1},
-  {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
-  {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
-  {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1},
-  {&__pyx_n_s__stderr, __pyx_k__stderr, sizeof(__pyx_k__stderr), 0, 0, 1, 1},
-  {&__pyx_n_s__stderr_f, __pyx_k__stderr_f, sizeof(__pyx_k__stderr_f), 0, 0, 1, 1},
-  {&__pyx_n_s__stderr_h, __pyx_k__stderr_h, sizeof(__pyx_k__stderr_h), 0, 0, 1, 1},
-  {&__pyx_n_s__stdout, __pyx_k__stdout, sizeof(__pyx_k__stdout), 0, 0, 1, 1},
-  {&__pyx_n_s__stdout_f, __pyx_k__stdout_f, sizeof(__pyx_k__stdout_f), 0, 0, 1, 1},
-  {&__pyx_n_s__stdout_h, __pyx_k__stdout_h, sizeof(__pyx_k__stdout_h), 0, 0, 1, 1},
-  {&__pyx_n_s__stdout_save, __pyx_k__stdout_save, sizeof(__pyx_k__stdout_save), 0, 0, 1, 1},
-  {&__pyx_n_s__stepper, __pyx_k__stepper, sizeof(__pyx_k__stepper), 0, 0, 1, 1},
-  {&__pyx_n_s__streams, __pyx_k__streams, sizeof(__pyx_k__streams), 0, 0, 1, 1},
-  {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1},
-  {&__pyx_n_s__struct, __pyx_k__struct, sizeof(__pyx_k__struct), 0, 0, 1, 1},
-  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
-  {&__pyx_n_s__system, __pyx_k__system, sizeof(__pyx_k__system), 0, 0, 1, 1},
-  {&__pyx_n_s__tags, __pyx_k__tags, sizeof(__pyx_k__tags), 0, 0, 1, 1},
-  {&__pyx_n_s__tempfile, __pyx_k__tempfile, sizeof(__pyx_k__tempfile), 0, 0, 1, 1},
-  {&__pyx_n_s__template, __pyx_k__template, sizeof(__pyx_k__template), 0, 0, 1, 1},
-  {&__pyx_n_s__text, __pyx_k__text, sizeof(__pyx_k__text), 0, 0, 1, 1},
-  {&__pyx_n_s__tid, __pyx_k__tid, sizeof(__pyx_k__tid), 0, 0, 1, 1},
-  {&__pyx_n_s__traceback, __pyx_k__traceback, sizeof(__pyx_k__traceback), 0, 0, 1, 1},
-  {&__pyx_n_s__truncate, __pyx_k__truncate, sizeof(__pyx_k__truncate), 0, 0, 1, 1},
-  {&__pyx_n_s__types, __pyx_k__types, sizeof(__pyx_k__types), 0, 0, 1, 1},
-  {&__pyx_n_s__until_eof, __pyx_k__until_eof, sizeof(__pyx_k__until_eof), 0, 0, 1, 1},
-  {&__pyx_n_s__version_info, __pyx_k__version_info, sizeof(__pyx_k__version_info), 0, 0, 1, 1},
-  {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1},
-  {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1},
-  {&__pyx_n_s__warn, __pyx_k__warn, sizeof(__pyx_k__warn), 0, 0, 1, 1},
-  {&__pyx_n_s__warnings, __pyx_k__warnings, sizeof(__pyx_k__warnings), 0, 0, 1, 1},
-  {&__pyx_n_s__wb, __pyx_k__wb, sizeof(__pyx_k__wb), 0, 0, 1, 1},
-  {&__pyx_n_s__wbu, __pyx_k__wbu, sizeof(__pyx_k__wbu), 0, 0, 1, 1},
-  {&__pyx_n_s__wh, __pyx_k__wh, sizeof(__pyx_k__wh), 0, 0, 1, 1},
-  {&__pyx_n_s__where, __pyx_k__where, sizeof(__pyx_k__where), 0, 0, 1, 1},
-  {&__pyx_n_s__write, __pyx_k__write, sizeof(__pyx_k__write), 0, 0, 1, 1},
-  {&__pyx_n_s__zip, __pyx_k__zip, sizeof(__pyx_k__zip), 0, 0, 1, 1},
-  {0, 0, 0, 0, 0, 0, 0}
-};
-static int __Pyx_InitCachedBuiltins(void) {
-  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __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 = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ord = __Pyx_GetName(__pyx_b, __pyx_n_s__ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_open = __Pyx_GetName(__pyx_b, __pyx_n_s__open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_zip = __Pyx_GetName(__pyx_b, __pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __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 = 498; __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 = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_OverflowError = __Pyx_GetName(__pyx_b, __pyx_n_s__OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_OSError = __Pyx_GetName(__pyx_b, __pyx_n_s__OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __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 = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_sorted = __Pyx_GetName(__pyx_b, __pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __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 = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_min = __Pyx_GetName(__pyx_b, __pyx_n_s__min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_max = __Pyx_GetName(__pyx_b, __pyx_n_s__max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_chr = __Pyx_GetName(__pyx_b, __pyx_n_s__chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_UnicodeDecodeError = __Pyx_GetName(__pyx_b, __pyx_n_s__UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  return 0;
-  __pyx_L1_error:;
-  return -1;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-static int __Pyx_InitCachedConstants(void) {
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_6setfd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fd) {
+  PyObject *__pyx_v_ofd = NULL;
+  PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
-
-  /* "pysam/csamtools.pyx":63
- *         return s
- *     elif PyUnicode_Check(s):
- *         return s.encode('ascii')             # <<<<<<<<<<<<<<
- *     else:
- *         raise TypeError, u"Argument must be string, bytes or unicode."
- */
-  __pyx_k_tuple_2 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_2);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("setfd", 0);
+  __Pyx_TraceCall("setfd", __pyx_f[0], 53);
 
-  /* "pysam/csamtools.pyx":83
- *         return s
- *     elif PyBytes_Check(s):
- *         return s.decode('ascii')             # <<<<<<<<<<<<<<
- *     else:
- *         # assume unicode
- */
-  __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_4);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
-
-  /* "pysam/csamtools.pyx":407
- *     def __len__(self):
- *         if self.fastafile == NULL:
- *             raise ValueError( "calling len() on closed file" )             # <<<<<<<<<<<<<<
+  /* "pysam/csamtools.pyx":54
  * 
- *         return faidx_fetch_nseq(self.fastafile)
- */
-  __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_8);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
-
-  /* "pysam/csamtools.pyx":427
- *         # read index
- *         if not os.path.exists( self._filename + b".fai" ):
- *             raise ValueError("could not locate index file")             # <<<<<<<<<<<<<<
- * 
- *         with open( self._filename + b".fai" ) as inf:
+ *     def setfd(self, fd):
+ *         ofd = os.dup(self.id)      #  Save old stream on new unit.             # <<<<<<<<<<<<<<
+ *         self.streams.append(ofd)
+ *         sys.stdout.flush()          #  Buffered data goes to old stream.
  */
-  __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_12);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dup); 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyTuple_New(1); 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);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __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_v_ofd = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":430
- * 
- *         with open( self._filename + b".fai" ) as inf:
- *             data = [ x.split("\t") for x in inf ]             # <<<<<<<<<<<<<<
- *             self._references = tuple(x[0] for x in data)
- *             self._lengths = tuple(int(x[1]) for x in data)
+  /* "pysam/csamtools.pyx":55
+ *     def setfd(self, fd):
+ *         ofd = os.dup(self.id)      #  Save old stream on new unit.
+ *         self.streams.append(ofd)             # <<<<<<<<<<<<<<
+ *         sys.stdout.flush()          #  Buffered data goes to old stream.
+ *         sys.stderr.flush()          #  Buffered data goes to old stream.
  */
-  __pyx_k_tuple_13 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_13);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_streams); 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_t_4 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_ofd); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":429
- *             raise ValueError("could not locate index file")
- * 
- *         with open( self._filename + b".fai" ) as inf:             # <<<<<<<<<<<<<<
- *             data = [ x.split("\t") for x in inf ]
- *             self._references = tuple(x[0] for x in data)
+  /* "pysam/csamtools.pyx":56
+ *         ofd = os.dup(self.id)      #  Save old stream on new unit.
+ *         self.streams.append(ofd)
+ *         sys.stdout.flush()          #  Buffered data goes to old stream.             # <<<<<<<<<<<<<<
+ *         sys.stderr.flush()          #  Buffered data goes to old stream.
+ *         os.dup2(fd, self.id)        #  Open unit 1 on new stream.
  */
-  __pyx_k_tuple_14 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_14);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __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_3); __pyx_t_3 = 0;
 
-  /* "pysam/csamtools.pyx":485
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         cdef int length
+  /* "pysam/csamtools.pyx":57
+ *         self.streams.append(ofd)
+ *         sys.stdout.flush()          #  Buffered data goes to old stream.
+ *         sys.stderr.flush()          #  Buffered data goes to old stream.             # <<<<<<<<<<<<<<
+ *         os.dup2(fd, self.id)        #  Open unit 1 on new stream.
+ *         os.close(fd)                #  Close other unit (look out, caller.)
  */
-  __pyx_k_tuple_16 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_16);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flush); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":491
+  /* "pysam/csamtools.pyx":58
+ *         sys.stdout.flush()          #  Buffered data goes to old stream.
+ *         sys.stderr.flush()          #  Buffered data goes to old stream.
+ *         os.dup2(fd, self.id)        #  Open unit 1 on new stream.             # <<<<<<<<<<<<<<
+ *         os.close(fd)                #  Close other unit (look out, caller.)
  * 
- *         if not region:
- *             if reference is None: raise ValueError( 'no sequence/region supplied.' )             # <<<<<<<<<<<<<<
- *             if start is None: start = 0
- *             if end is None: end = max_pos -1
  */
-  __pyx_k_tuple_18 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_17)); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_18);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));
-
-  /* "pysam/csamtools.pyx":510
- *             region = "%s:%i-%i" % (reference, start+1, end)
- *             if PY_MAJOR_VERSION >= 3:
- *                 region = region.encode('ascii')             # <<<<<<<<<<<<<<
- *             seq = fai_fetch( self.fastafile,
- *                              region,
- */
-  __pyx_k_tuple_24 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_24);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dup2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_v_fd);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fd);
+  __Pyx_GIVEREF(__pyx_v_fd);
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __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(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":626
- * 
- *     def __iter__(self):
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         return self
+  /* "pysam/csamtools.pyx":59
+ *         sys.stderr.flush()          #  Buffered data goes to old stream.
+ *         os.dup2(fd, self.id)        #  Open unit 1 on new stream.
+ *         os.close(fd)                #  Close other unit (look out, caller.)             # <<<<<<<<<<<<<<
  * 
+ *     def restore(self):
  */
-  __pyx_k_tuple_26 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_26);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_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 = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_fd);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fd);
+  __Pyx_GIVEREF(__pyx_v_fd);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/csamtools.pyx":797
- *         header_to_write = NULL
+  /* "pysam/csamtools.pyx":53
+ *         self.setfd(fd)
  * 
- *         cdef bytes bmode = mode.encode('ascii')             # <<<<<<<<<<<<<<
- *         self._filename = filename = _encodeFilename(filename)
- *         self.isstream = filename == b"-"
+ *     def setfd(self, fd):             # <<<<<<<<<<<<<<
+ *         ofd = os.dup(self.id)      #  Save old stream on new unit.
+ *         self.streams.append(ofd)
  */
-  __pyx_k_tuple_31 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_31);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
 
-  /* "pysam/csamtools.pyx":803
- *         self.isbam = len(mode) > 1 and mode[1] == 'b'
- * 
- *         self.isremote = filename.startswith(b"http:") or filename.startswith(b"ftp:")             # <<<<<<<<<<<<<<
- * 
- *         cdef char * ctext
- */
-  __pyx_k_tuple_34 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_b_33)); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_34);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));
-  __pyx_k_tuple_36 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_b_35)); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_36);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));
-
-  /* "pysam/csamtools.pyx":922
- *         returns -1 if reference is not known.
- *         '''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         reference = _force_bytes(reference)
- *         return pysam_reference2tid( self.samfile.header, reference )
- */
-  __pyx_k_tuple_47 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_47);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
-
-  /* "pysam/csamtools.pyx":929
- *         '''
- *         convert numerical :term:`tid` into :term:`reference` name.'''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         if not 0 <= tid < self.samfile.header.n_targets:
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
- */
-  __pyx_k_tuple_48 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_48);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));
-
-  /* "pysam/csamtools.pyx":937
- *         '''
- *         convert numerical :term:`tid` into :term:`reference` name.'''
- *         if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         if not 0 <= tid < self.samfile.header.n_targets:
- *             raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
- */
-  __pyx_k_tuple_50 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_50);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.csamtools.Outs.setfd", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_ofd);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "pysam/csamtools.pyx":987
- *             if len(parts) >= 3: rend = int(parts[2])
- * 
- *         if not reference: return 0, 0, 0, 0             # <<<<<<<<<<<<<<
+/* "pysam/csamtools.pyx":61
+ *         os.close(fd)                #  Close other unit (look out, caller.)
  * 
- *         rtid = self.gettid( reference )
+ *     def restore(self):             # <<<<<<<<<<<<<<
+ *         '''restore previous output stream'''
+ *         if self.streams:
  */
-  __pyx_k_tuple_52 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_52);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
 
-  /* "pysam/csamtools.pyx":1007
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         if not self.isbam:
- *             raise NotImplementedError("seek only available in bam files")
- */
-  __pyx_k_tuple_55 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_55);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));
-
-  /* "pysam/csamtools.pyx":1009
- *             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")
- */
-  __pyx_k_tuple_57 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_57);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));
-
-  /* "pysam/csamtools.pyx":1011
- *             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 )
- */
-  __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_58)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_59);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));
-
-  /* "pysam/csamtools.pyx":1020
- *         '''
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *         if not self.isbam:
- *             raise NotImplementedError("seek only available in bam files")
- */
-  __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_60);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60));
-
-  /* "pysam/csamtools.pyx":1022
- *             raise ValueError( "I/O operation on closed file" )
- *         if not self.isbam:
- *             raise NotImplementedError("seek only available in bam files")             # <<<<<<<<<<<<<<
- * 
- *         return bam_tell( self.samfile.x.bam )
- */
-  __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_61);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_9restore(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_4Outs_8restore[] = "Outs.restore(self)\nrestore previous output stream";
+static PyMethodDef __pyx_mdef_5pysam_9csamtools_4Outs_9restore = {__Pyx_NAMESTR("restore"), (PyCFunction)__pyx_pw_5pysam_9csamtools_4Outs_9restore, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_4Outs_8restore)};
+static PyObject *__pyx_pw_5pysam_9csamtools_4Outs_9restore(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("restore (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_9csamtools_4Outs_8restore(__pyx_self, ((PyObject *)__pyx_v_self));
 
-  /* "pysam/csamtools.pyx":1057
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_9csamtools_4Outs_8restore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("restore", 0);
+  __Pyx_TraceCall("restore", __pyx_f[0], 61);
+
+  /* "pysam/csamtools.pyx":63
+ *     def restore(self):
+ *         '''restore previous output stream'''
+ *         if self.streams:             # <<<<<<<<<<<<<<
+ *             # the following was not sufficient, hence flush both stderr and stdout
+ *             # os.fsync( self.id )
  */
-  __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_63);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
-
-  /* "pysam/csamtools.pyx":1066
- *         if self.isbam:
- *             if not until_eof and not self._hasIndex() and not self.isremote:
- *                 raise ValueError( "fetch called on bamfile without index" )             # <<<<<<<<<<<<<<
- * 
- *             if callback:
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_streams); 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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "pysam/csamtools.pyx":66
+ *             # the following was not sufficient, hence flush both stderr and stdout
+ *             # os.fsync( self.id )
+ *             sys.stdout.flush()             # <<<<<<<<<<<<<<
+ *             sys.stderr.flush()
+ *             os.dup2(self.streams[-1], self.id)
  */
-  __pyx_k_tuple_65 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_64)); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_65);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65));
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __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_3); __pyx_t_3 = 0;
 
-  /* "pysam/csamtools.pyx":1069
- * 
- *             if callback:
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )             # <<<<<<<<<<<<<<
- *                 if not self._hasIndex(): raise ValueError( "no index available for fetch" )
- *                 return bam_fetch(self.samfile.x.bam,
- */
-  __pyx_k_tuple_67 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_66)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_67);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));
-
-  /* "pysam/csamtools.pyx":1070
- *             if callback:
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
- *                 if not self._hasIndex(): raise ValueError( "no index available for fetch" )             # <<<<<<<<<<<<<<
- *                 return bam_fetch(self.samfile.x.bam,
- *                                  self.index,
- */
-  __pyx_k_tuple_69 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_68)); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_69);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69));
-
-  /* "pysam/csamtools.pyx":1090
- *         else:
- *             if has_coord:
- *                 raise ValueError ("fetching by region is not available for sam files" )             # <<<<<<<<<<<<<<
- * 
- *             if callback:
+    /* "pysam/csamtools.pyx":67
+ *             # os.fsync( self.id )
+ *             sys.stdout.flush()
+ *             sys.stderr.flush()             # <<<<<<<<<<<<<<
+ *             os.dup2(self.streams[-1], self.id)
+ *             os.close(self.streams[-1])
  */
-  __pyx_k_tuple_71 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_70)); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_71);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flush); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":1093
- * 
- *             if callback:
- *                 raise NotImplementedError( "callback not implemented yet" )             # <<<<<<<<<<<<<<
- * 
- *             if self.samfile.header == NULL:
+    /* "pysam/csamtools.pyx":68
+ *             sys.stdout.flush()
+ *             sys.stderr.flush()
+ *             os.dup2(self.streams[-1], self.id)             # <<<<<<<<<<<<<<
+ *             os.close(self.streams[-1])
+ *             del self.streams[-1]
  */
-  __pyx_k_tuple_73 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_72)); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_73);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73));
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dup2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_4 = 0;
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __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_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":1096
- * 
- *             if self.samfile.header == NULL:
- *                 raise ValueError( "fetch called for samfile without header")             # <<<<<<<<<<<<<<
- * 
- *             # check if targets are defined
- */
-  __pyx_k_tuple_75 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_74)); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_75);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));
-
-  /* "pysam/csamtools.pyx":1101
- *             # give warning, sam_read1 segfaults
- *             if self.samfile.header.n_targets == 0:
- *                 warnings.warn( "fetch called for samfile without header")             # <<<<<<<<<<<<<<
+    /* "pysam/csamtools.pyx":69
+ *             sys.stderr.flush()
+ *             os.dup2(self.streams[-1], self.id)
+ *             os.close(self.streams[-1])             # <<<<<<<<<<<<<<
+ *             del self.streams[-1]
  * 
- *             return IteratorRowAll( self, reopen=reopen )
  */
-  __pyx_k_tuple_76 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_74)); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_76);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/csamtools.pyx":1142
+    /* "pysam/csamtools.pyx":70
+ *             os.dup2(self.streams[-1], self.id)
+ *             os.close(self.streams[-1])
+ *             del self.streams[-1]             # <<<<<<<<<<<<<<
  * 
- *         if mate_data.mate == NULL:
- *             raise ValueError( "mate not found" )             # <<<<<<<<<<<<<<
  * 
- *         cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
  */
-  __pyx_k_tuple_80 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_79)); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_80);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_streams); 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);
+    if (__Pyx_DelItemInt(__pyx_t_3, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
 
-  /* "pysam/csamtools.pyx":1167
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         region, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
- */
-  __pyx_k_tuple_82 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_82);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));
-
-  /* "pysam/csamtools.pyx":1176
- *         if self.isbam:
- *             if not until_eof and not self._hasIndex() and not self.isremote:
- *                 raise ValueError( "fetch called on bamfile without index" )             # <<<<<<<<<<<<<<
+  /* "pysam/csamtools.pyx":61
+ *         os.close(fd)                #  Close other unit (look out, caller.)
  * 
- *             if not region:
+ *     def restore(self):             # <<<<<<<<<<<<<<
+ *         '''restore previous output stream'''
+ *         if self.streams:
  */
-  __pyx_k_tuple_83 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_64)); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_83);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));
 
-  /* "pysam/csamtools.pyx":1179
- * 
- *             if not region:
- *                 raise ValueError( "counting functionality requires a region/reference" )             # <<<<<<<<<<<<<<
- *             if not self._hasIndex(): raise ValueError( "no index available for fetch" )
- *             bam_fetch(self.samfile.x.bam,
- */
-  __pyx_k_tuple_85 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_84)); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_85);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));
-
-  /* "pysam/csamtools.pyx":1180
- *             if not region:
- *                 raise ValueError( "counting functionality requires a region/reference" )
- *             if not self._hasIndex(): raise ValueError( "no index available for fetch" )             # <<<<<<<<<<<<<<
- *             bam_fetch(self.samfile.x.bam,
- *                              self.index,
- */
-  __pyx_k_tuple_86 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_68)); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_86);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
-
-  /* "pysam/csamtools.pyx":1190
- *             return counter
- *         else:
- *             raise ValueError ("count for a region is not available for sam files" )             # <<<<<<<<<<<<<<
- * 
- *     def pileup( self,
- */
-  __pyx_k_tuple_88 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_87)); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_88);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.csamtools.Outs.restore", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "pysam/csamtools.pyx":1249
+/* "pysam/csamtools.pyx":73
  * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
  * 
- *         has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
+ * def _samtools_dispatch(method,             # <<<<<<<<<<<<<<
+ *                        args = (),
+ *                        catch_stdout = True):
  */
-  __pyx_k_tuple_89 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_89);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));
 
-  /* "pysam/csamtools.pyx":1254
- * 
- *         if self.isbam:
- *             if not self._hasIndex(): raise ValueError( "no index available for pileup" )             # <<<<<<<<<<<<<<
- * 
- *             if callback:
- */
-  __pyx_k_tuple_91 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_90)); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_91);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91));
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_1_samtools_dispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_9csamtools__samtools_dispatch[] = "_samtools_dispatch(method, args=(), catch_stdout=True)\ncall ``method`` in samtools providing arguments in args.\n    \n    .. note:: \n       This method redirects stdout to capture it \n       from samtools. If for some reason stdout disappears\n       the reason might be in this method.\n\n    .. note::\n       The current implementation might only work on linux.\n\n    .. note::\n       This method captures stdout and st [...]
+static PyMethodDef __pyx_mdef_5pysam_9csamtools_1_samtools_dispatch = {__Pyx_NAMESTR("_samtools_dispatch"), (PyCFunction)__pyx_pw_5pysam_9csamtools_1_samtools_dispatch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools__samtools_dispatch)};
+static PyObject *__pyx_pw_5pysam_9csamtools_1_samtools_dispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_method = 0;
+  PyObject *__pyx_v_args = 0;
+  PyObject *__pyx_v_catch_stdout = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_samtools_dispatch (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_method,&__pyx_n_s_args,&__pyx_n_s_catch_stdout,0};
+    PyObject* values[3] = {0,0,0};
 
-  /* "pysam/csamtools.pyx":1257
- * 
- *             if callback:
- *                 if not has_coord: raise ValueError( "callback functionality requires a region/reference" )             # <<<<<<<<<<<<<<
+    /* "pysam/csamtools.pyx":74
  * 
- *                 buf = bam_plbuf_init( <bam_pileup_f>pileup_callback, <void*>callback )
+ * def _samtools_dispatch(method,
+ *                        args = (),             # <<<<<<<<<<<<<<
+ *                        catch_stdout = True):
+ *     '''call ``method`` in samtools providing arguments in args.
  */
-  __pyx_k_tuple_92 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_66)); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_92);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92));
+    values[1] = ((PyObject *)__pyx_empty_tuple);
 
-  /* "pysam/csamtools.pyx":1278
- * 
- *         else:
- *             raise NotImplementedError( "pileup of samfiles not implemented yet" )             # <<<<<<<<<<<<<<
- * 
- *     def close( self ):
- */
-  __pyx_k_tuple_94 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_93)); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_94);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));
-
-  /* "pysam/csamtools.pyx":1326
- *         '''number of :term:`reference` sequences in the file.'''
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             return self.samfile.header.n_targets
- * 
- */
-  __pyx_k_tuple_95 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_95);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));
-
-  /* "pysam/csamtools.pyx":1332
- *         """tuple with the names of :term:`reference` sequences."""
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             t = []
- *             for x from 0 <= x < self.samfile.header.n_targets:
- */
-  __pyx_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_96);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));
-
-  /* "pysam/csamtools.pyx":1343
- *         """
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             t = []
- *             for x from 0 <= x < self.samfile.header.n_targets:
- */
-  __pyx_k_tuple_97 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_97);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));
-
-  /* "pysam/csamtools.pyx":1353
- *         """
- *         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" )
- *             if self.index == NULL:
- */
-  __pyx_k_tuple_98 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_98);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
-
-  /* "pysam/csamtools.pyx":1354
- *         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" )             # <<<<<<<<<<<<<<
- *             if self.index == NULL:
- *                 raise ValueError( "mapping information not recorded in index or index not available")
- */
-  __pyx_k_tuple_100 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_100);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));
-
-  /* "pysam/csamtools.pyx":1356
- *             if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" )
- *             if self.index == NULL:
- *                 raise ValueError( "mapping information not recorded in index or index not available")             # <<<<<<<<<<<<<<
- * 
- *             cdef int tid
- */
-  __pyx_k_tuple_102 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_101)); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_102);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102));
-
-  /* "pysam/csamtools.pyx":1368
- *         """
- *         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
- */
-  __pyx_k_tuple_103 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_103);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));
-
-  /* "pysam/csamtools.pyx":1369
- *         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
- */
-  __pyx_k_tuple_105 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_104)); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_105);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));
-
-  /* "pysam/csamtools.pyx":1381
- *         '''full contents of the :term:`sam file` header as a string.'''
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             return from_string_and_size(self.samfile.header.text, self.samfile.header.l_text)
- * 
- */
-  __pyx_k_tuple_106 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_106);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106));
-
-  /* "pysam/csamtools.pyx":1389
- *         '''
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *             result = {}
- */
-  __pyx_k_tuple_107 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_107);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));
-
-  /* "pysam/csamtools.pyx":1396
- *                 # convert to python string (note: call self.text to create 0-terminated string)
- *                 t = self.text
- *                 for line in t.split("\n"):             # <<<<<<<<<<<<<<
- *                     if not line.strip(): continue
- *                     assert line.startswith("@"), "header line without '@': '%s'" % line
- */
-  __pyx_k_tuple_108 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_108);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
-
-  /* "pysam/csamtools.pyx":1398
- *                 for line in t.split("\n"):
- *                     if not line.strip(): continue
- *                     assert line.startswith("@"), "header line without '@': '%s'" % line             # <<<<<<<<<<<<<<
- *                     fields = line[1:].split("\t")
- *                     record = fields[0]
- */
-  __pyx_k_tuple_110 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_109)); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_110);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
-
-  /* "pysam/csamtools.pyx":1399
- *                     if not line.strip(): continue
- *                     assert line.startswith("@"), "header line without '@': '%s'" % line
- *                     fields = line[1:].split("\t")             # <<<<<<<<<<<<<<
- *                     record = fields[0]
- *                     assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
- */
-  __pyx_k_tuple_112 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_112);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));
-
-  /* "pysam/csamtools.pyx":1412
- *                     for field in fields[1:]:
- *                         if ":" not in field:
- *                             raise ValueError("malformatted header: no ':' in field" )             # <<<<<<<<<<<<<<
- *                         key, value = field.split(":",1)
- *                         # uppercase keys must be valid
- */
-  __pyx_k_tuple_116 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_115)); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_116);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116));
-
-  /* "pysam/csamtools.pyx":1413
- *                         if ":" not in field:
- *                             raise ValueError("malformatted header: no ':' in field" )
- *                         key, value = field.split(":",1)             # <<<<<<<<<<<<<<
- *                         # uppercase keys must be valid
- *                         # lowercase are permitted for user fields
- */
-  __pyx_k_tuple_117 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_114), __pyx_int_1); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_117);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));
-
-  /* "pysam/csamtools.pyx":1511
- *         dest.text = <char*>calloc( len(text), sizeof(char))
- *         dest.l_text = len(text)
- *         cdef bytes btext = text.encode('ascii')             # <<<<<<<<<<<<<<
- *         strncpy( dest.text, btext, dest.l_text )
- * 
- */
-  __pyx_k_tuple_123 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_123);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123));
-
-  /* "pysam/csamtools.pyx":1531
- *                 seqname, seqlen = seqs[x]
- *                 dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
- *                 bseqname = seqname.encode('ascii')             # <<<<<<<<<<<<<<
- *                 strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
- *                 dest.target_len[x] = seqlen
- */
-  __pyx_k_tuple_125 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_125);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));
-
-  /* "pysam/csamtools.pyx":1546
- *     ###############################################################
- *     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")
- */
-  __pyx_k_tuple_126 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_126);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));
-
-  /* "pysam/csamtools.pyx":1548
- *         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
+    /* "pysam/csamtools.pyx":75
+ * def _samtools_dispatch(method,
+ *                        args = (),
+ *                        catch_stdout = True):             # <<<<<<<<<<<<<<
+ *     '''call ``method`` in samtools providing arguments in args.
  * 
  */
-  __pyx_k_tuple_128 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_127)); if (unlikely(!__pyx_k_tuple_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_128);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_128));
+    values[2] = ((PyObject *)Py_True);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_catch_stdout);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_samtools_dispatch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_method = values[0];
+    __pyx_v_args = values[1];
+    __pyx_v_catch_stdout = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_samtools_dispatch", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_9csamtools__samtools_dispatch(__pyx_self, __pyx_v_method, __pyx_v_args, __pyx_v_catch_stdout);
 
-  /* "pysam/csamtools.pyx":1628
+  /* "pysam/csamtools.pyx":73
  * 
- *         if not samfile._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
  * 
- *         if not samfile._hasIndex():
+ * def _samtools_dispatch(method,             # <<<<<<<<<<<<<<
+ *                        args = (),
+ *                        catch_stdout = True):
  */
-  __pyx_k_tuple_129 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_129);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129));
 
-  /* "pysam/csamtools.pyx":1631
- * 
- *         if not samfile._hasIndex():
- *             raise ValueError( "no index available for iteration" )             # <<<<<<<<<<<<<<
- * 
- *         # makes sure that samfile stays alive as long as the
- */
-  __pyx_k_tuple_131 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_130)); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_131);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131));
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "pysam/csamtools.pyx":1703
- * 
- *         if not samfile._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+static PyObject *__pyx_pf_5pysam_9csamtools__samtools_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_method, PyObject *__pyx_v_args, PyObject *__pyx_v_catch_stdout) {
+  PyObject *__pyx_v_stderr_h = NULL;
+  PyObject *__pyx_v_stderr_f = NULL;
+  PyObject *__pyx_v_stdout_h = NULL;
+  PyObject *__pyx_v_stdout_f = NULL;
+  PyObject *__pyx_v_stdout_save = NULL;
+  char **__pyx_v_cargs;
+  int __pyx_v_i;
+  int __pyx_v_n;
+  int __pyx_v_retval;
+  PyObject *__pyx_v_inf = NULL;
+  PyObject *__pyx_v_out_stdout = NULL;
+  PyObject *__pyx_v_out_stderr = NULL;
+  PyObject *__pyx_v_a = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *(*__pyx_t_7)(PyObject *);
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  Py_ssize_t __pyx_t_12;
+  PyObject *(*__pyx_t_13)(PyObject *);
+  char *__pyx_t_14;
+  PyObject *__pyx_t_15 = NULL;
+  PyObject *__pyx_t_16 = NULL;
+  PyObject *__pyx_t_17 = NULL;
+  PyObject *__pyx_t_18 = NULL;
+  PyObject *__pyx_t_19 = NULL;
+  PyObject *__pyx_t_20 = NULL;
+  PyObject *__pyx_t_21 = NULL;
+  PyObject *__pyx_t_22 = NULL;
+  int __pyx_t_23;
+  char const *__pyx_t_24;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_samtools_dispatch", 0);
+  __Pyx_TraceCall("_samtools_dispatch", __pyx_f[0], 73);
+  __Pyx_INCREF(__pyx_v_method);
+  __Pyx_INCREF(__pyx_v_args);
+  __Pyx_INCREF(__pyx_v_catch_stdout);
+
+  /* "pysam/csamtools.pyx":99
  * 
- *         if samfile.isbam: mode = b"rb"
- */
-  __pyx_k_tuple_132 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_132);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));
-
-  /* "pysam/csamtools.pyx":1758
- *     def __cinit__(self, Samfile samfile):
- *         assert samfile._isOpen()
- *         if not samfile._hasIndex(): raise ValueError("no index available for fetch")             # <<<<<<<<<<<<<<
- *         self.samfile = samfile
- *         self.tid = -1
+ *     # some special cases
+ *     if method == "index":             # <<<<<<<<<<<<<<
+ *         if not os.path.exists(args[0]):
+ *             raise IOError("No such file or directory: '%s'" % args[0])
  */
-  __pyx_k_tuple_133 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_68)); if (unlikely(!__pyx_k_tuple_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_133);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_133));
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-  /* "pysam/csamtools.pyx":1808
- * 
- *         if not samfile._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+    /* "pysam/csamtools.pyx":100
+ *     # some special cases
+ *     if method == "index":
+ *         if not os.path.exists(args[0]):             # <<<<<<<<<<<<<<
+ *             raise IOError("No such file or directory: '%s'" % args[0])
  * 
- *         if not samfile._isOpen():
  */
-  __pyx_k_tuple_134 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_134);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_134));
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __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_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_5 = ((!__pyx_t_1) != 0);
+    if (__pyx_t_5) {
 
-  /* "pysam/csamtools.pyx":1811
- * 
- *         if not samfile._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- * 
- *         assert samfile.isbam, "can only use this iterator on bam files"
- */
-  __pyx_k_tuple_135 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_135);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
-
-  /* "pysam/csamtools.pyx":2109
- *             self.cnext()
- *             if self.n_plp < 0:
- *                 raise ValueError("error during iteration" )             # <<<<<<<<<<<<<<
+      /* "pysam/csamtools.pyx":101
+ *     if method == "index":
+ *         if not os.path.exists(args[0]):
+ *             raise IOError("No such file or directory: '%s'" % args[0])             # <<<<<<<<<<<<<<
  * 
- *             if self.plp == NULL:
+ *     # redirect stderr and stdout to file
  */
-  __pyx_k_tuple_141 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_140)); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_141);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141));
+      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_No_such_file_or_directory_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __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 = 101; __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 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __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, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
 
-  /* "pysam/csamtools.pyx":2145
- * 
- *             if self.n_plp < 0:
- *                 raise ValueError("error during iteration" )             # <<<<<<<<<<<<<<
+  /* "pysam/csamtools.pyx":104
  * 
- *             # return result, if within same reference
- */
-  __pyx_k_tuple_142 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_140)); if (unlikely(!__pyx_k_tuple_142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_142);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_142));
-
-  /* "pysam/csamtools.pyx":2308
- *             qual = self.qual
- *         else:
- *             seq = self.seq.decode('ascii')             # <<<<<<<<<<<<<<
- *             qual = self.qual.decode('ascii')
- *         return "\t".join(map(str, (self.qname,
- */
-  __pyx_k_tuple_144 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_144);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_144));
-
-  /* "pysam/csamtools.pyx":2309
- *         else:
- *             seq = self.seq.decode('ascii')
- *             qual = self.qual.decode('ascii')             # <<<<<<<<<<<<<<
- *         return "\t".join(map(str, (self.qname,
- *                                    self.flag,
- */
-  __pyx_k_tuple_145 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_145);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_145));
-
-  /* "pysam/csamtools.pyx":2773
- *                 for pytag, value in tags:
- *                     if not type(pytag) is bytes:
- *                         pytag = pytag.encode('ascii')             # <<<<<<<<<<<<<<
- *                     t = type(value)
+ *     # redirect stderr and stdout to file
+ *     stderr_h, stderr_f = tempfile.mkstemp()             # <<<<<<<<<<<<<<
+ *     pysam_set_stderr(stderr_h)
  * 
  */
-  __pyx_k_tuple_150 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_150);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_150));
-
-  /* "pysam/csamtools.pyx":2801
- *                         datafmt = "2sccI%i%s" % (len(value), datafmt)
- *                         args.extend( [pytag[:2],
- *                                       pytype.encode('ascii'),             # <<<<<<<<<<<<<<
- *                                       datatype.encode('ascii'),
- *                                       len(value)] + list(value) )
- */
-  __pyx_k_tuple_153 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_153);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_153));
-
-  /* "pysam/csamtools.pyx":2802
- *                         args.extend( [pytag[:2],
- *                                       pytype.encode('ascii'),
- *                                       datatype.encode('ascii'),             # <<<<<<<<<<<<<<
- *                                       len(value)] + list(value) )
- *                         fmts.append( datafmt )
- */
-  __pyx_k_tuple_154 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_154);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_154));
-
-  /* "pysam/csamtools.pyx":2825
- *                         # Note: hex strings (H) are not supported yet
- *                         if t is not bytes:
- *                             value = value.encode('ascii')             # <<<<<<<<<<<<<<
- *                         if len(value) == 1:
- *                             fmt, pytype = "2scc", 'A'
- */
-  __pyx_k_tuple_155 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_155);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_155));
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tempfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_mkstemp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+    PyObject* sequence = __pyx_t_4;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    Py_ssize_t size = Py_SIZE(sequence);
+    #else
+    Py_ssize_t size = PySequence_Size(sequence);
+    #endif
+    if (unlikely(size != 2)) {
+      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
+    } else {
+      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
+    }
+    __Pyx_INCREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_t_2);
+    #else
+    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    #endif
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
+    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_3);
+    index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_2);
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = NULL;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    goto __pyx_L6_unpacking_done;
+    __pyx_L5_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_7 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L6_unpacking_done:;
+  }
+  __pyx_v_stderr_h = __pyx_t_3;
+  __pyx_t_3 = 0;
+  __pyx_v_stderr_f = __pyx_t_2;
+  __pyx_t_2 = 0;
 
-  /* "pysam/csamtools.pyx":2832
- * 
- *                     args.extend( [pytag[:2],
- *                                   pytype.encode('ascii'),             # <<<<<<<<<<<<<<
- *                                   value ] )
+  /* "pysam/csamtools.pyx":105
+ *     # redirect stderr and stdout to file
+ *     stderr_h, stderr_f = tempfile.mkstemp()
+ *     pysam_set_stderr(stderr_h)             # <<<<<<<<<<<<<<
  * 
+ *     if catch_stdout:
  */
-  __pyx_k_tuple_157 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_157);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_157));
-
-  /* "pysam/csamtools.pyx":3271
- *     '''
- *     def __init__(self):
- *         raise TypeError("This class cannot be instantiated from Python")             # <<<<<<<<<<<<<<
+  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_stderr_h); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  pysam_set_stderr(__pyx_t_8);
+
+  /* "pysam/csamtools.pyx":107
+ *     pysam_set_stderr(stderr_h)
  * 
- *     def __str__(self):
+ *     if catch_stdout:             # <<<<<<<<<<<<<<
+ *         stdout_h, stdout_f = tempfile.mkstemp()
+ *         try:
  */
-  __pyx_k_tuple_183 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_182)); if (unlikely(!__pyx_k_tuple_183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_183);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183));
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_5) {
 
-  /* "pysam/csamtools.pyx":3297
- * 
- *             if self.plp == NULL or self.plp[0] == NULL:
- *                 raise ValueError("PileupProxy accessed after iterator finished")             # <<<<<<<<<<<<<<
+    /* "pysam/csamtools.pyx":108
  * 
- *             # warning: there could be problems if self.n and self.buf are
+ *     if catch_stdout:
+ *         stdout_h, stdout_f = tempfile.mkstemp()             # <<<<<<<<<<<<<<
+ *         try:
+ *             stdout_save = Outs( sys.stdout.fileno() )
  */
-  __pyx_k_tuple_185 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_184)); if (unlikely(!__pyx_k_tuple_185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_185);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_185));
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tempfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_mkstemp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+      PyObject* sequence = __pyx_t_4;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      #else
+      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      #endif
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
+      index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_2);
+      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_3);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = NULL;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      goto __pyx_L9_unpacking_done;
+      __pyx_L8_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_7 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L9_unpacking_done:;
+    }
+    __pyx_v_stdout_h = __pyx_t_2;
+    __pyx_t_2 = 0;
+    __pyx_v_stdout_f = __pyx_t_3;
+    __pyx_t_3 = 0;
 
-  /* "pysam/csamtools.pyx":3310
- * 
- *     def __init__(self):
- *         raise TypeError("This class cannot be instantiated from Python")             # <<<<<<<<<<<<<<
- * 
- *     def __str__(self):
+    /* "pysam/csamtools.pyx":109
+ *     if catch_stdout:
+ *         stdout_h, stdout_f = tempfile.mkstemp()
+ *         try:             # <<<<<<<<<<<<<<
+ *             stdout_save = Outs( sys.stdout.fileno() )
+ *             stdout_save.setfd( stdout_h )
  */
-  __pyx_k_tuple_186 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_182)); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_186);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
+    {
+      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
+      __Pyx_XGOTREF(__pyx_t_9);
+      __Pyx_XGOTREF(__pyx_t_10);
+      __Pyx_XGOTREF(__pyx_t_11);
+      /*try:*/ {
 
-  /* "pysam/csamtools.pyx":3423
- *         # recover. Thus redirect output to file with -o option.
- *         if method == "view":
- *             if "-o" in args: raise ValueError("option -o is forbidden in samtools view")             # <<<<<<<<<<<<<<
- *             args = ( "-o", stdout_f ) + args
- * 
+        /* "pysam/csamtools.pyx":110
+ *         stdout_h, stdout_f = tempfile.mkstemp()
+ *         try:
+ *             stdout_save = Outs( sys.stdout.fileno() )             # <<<<<<<<<<<<<<
+ *             stdout_save.setfd( stdout_h )
+ *         except AttributeError:
  */
-  __pyx_k_tuple_191 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_190)); if (unlikely(!__pyx_k_tuple_191)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_191);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_191));
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Outs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stdout); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L10_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 = 110; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_v_stdout_save = __pyx_t_2;
+        __pyx_t_2 = 0;
 
-  /* "pysam/csamtools.pyx":3448
- *         stdout_save.restore()
+        /* "pysam/csamtools.pyx":111
  *         try:
- *             with open( stdout_f, "r") as inf:             # <<<<<<<<<<<<<<
- *                 out_stdout = inf.readlines()
- *         except UnicodeDecodeError:
+ *             stdout_save = Outs( sys.stdout.fileno() )
+ *             stdout_save.setfd( stdout_h )             # <<<<<<<<<<<<<<
+ *         except AttributeError:
+ *             # stdout has already been redirected
  */
-  __pyx_k_tuple_192 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_192);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stdout_save, __pyx_n_s_setfd); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_INCREF(__pyx_v_stdout_h);
+        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stdout_h);
+        __Pyx_GIVEREF(__pyx_v_stdout_h);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      goto __pyx_L17_try_end;
+      __pyx_L10_error:;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "pysam/csamtools.pyx":3451
- *                 out_stdout = inf.readlines()
- *         except UnicodeDecodeError:
- *             with open( stdout_f, "rb") as inf:             # <<<<<<<<<<<<<<
- *                 # read binary output
- *                 out_stdout = inf.read()
+      /* "pysam/csamtools.pyx":112
+ *             stdout_save = Outs( sys.stdout.fileno() )
+ *             stdout_save.setfd( stdout_h )
+ *         except AttributeError:             # <<<<<<<<<<<<<<
+ *             # stdout has already been redirected
+ *             catch_stdout = False
  */
-  __pyx_k_tuple_193 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_193);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_193));
+      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+      if (__pyx_t_8) {
+        __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_GOTREF(__pyx_t_2);
 
-  /* "pysam/csamtools.pyx":3461
- *     pysam_unset_stderr()
- *     try:
- *         with open( stderr_f, "r") as inf:             # <<<<<<<<<<<<<<
- *             out_stderr = inf.readlines()
- *     except UnicodeDecodeError:
+        /* "pysam/csamtools.pyx":114
+ *         except AttributeError:
+ *             # stdout has already been redirected
+ *             catch_stdout = False             # <<<<<<<<<<<<<<
+ * 
+ *         # patch for `samtools view`
  */
-  __pyx_k_tuple_194 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_194);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
+        __Pyx_INCREF(Py_False);
+        __Pyx_DECREF_SET(__pyx_v_catch_stdout, Py_False);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        goto __pyx_L11_exception_handled;
+      }
+      goto __pyx_L12_except_error;
+      __pyx_L12_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_9);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
+      goto __pyx_L1_error;
+      __pyx_L11_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_9);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
+      __pyx_L17_try_end:;
+    }
 
-  /* "pysam/csamtools.pyx":3464
- *             out_stderr = inf.readlines()
- *     except UnicodeDecodeError:
- *         with open( stderr_f, "rb") as inf:             # <<<<<<<<<<<<<<
- *             # read binary output
- *             out_stderr = inf.read()
- */
-  __pyx_k_tuple_195 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_195);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_195));
-
-  /* "pysam/csamtools.pyx":142
- * else:
- *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
- * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )             # <<<<<<<<<<<<<<
- * 
- * #####################################################################
- */
-  __pyx_k_tuple_265 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_264)); if (unlikely(!__pyx_k_tuple_265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_265);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_265));
-
-  /* "pysam/csamtools.pyx":266
- *         list of reads (:class:`pysam.PileupRead`) aligned to this column
- *     '''
- *     def __str__(self):             # <<<<<<<<<<<<<<
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
- *             "\n" + "\n".join( map(str, self.pileups) )
- */
-  __pyx_k_tuple_267 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_267);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_267));
-  __pyx_k_codeobj_268 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____str__, 266, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":314
- *     stderr is captured.
- *     '''
- *     def __init__(self):             # <<<<<<<<<<<<<<
- *         return
- *         self.stderr_h, self.stderr_f = tempfile.mkstemp()
+    /* "pysam/csamtools.pyx":119
+ *         # samtools `view` closes stdout, from which I can not
+ *         # recover. Thus redirect output to file with -o option.
+ *         if method == "view":             # <<<<<<<<<<<<<<
+ *             if "-o" in args:
+ *                 raise ValueError("option -o is forbidden in samtools view")
  */
-  __pyx_k_tuple_273 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_273);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_273));
-  __pyx_k_codeobj_274 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____init__, 314, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_view, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_5) {
 
-  /* "pysam/csamtools.pyx":320
- *         self.stderr_save.setfd( self.stderr_h )
- * 
- *     def readAndRelease( self ):             # <<<<<<<<<<<<<<
- *         return []
- *         self.stderr_save.restore()
+      /* "pysam/csamtools.pyx":120
+ *         # recover. Thus redirect output to file with -o option.
+ *         if method == "view":
+ *             if "-o" in args:             # <<<<<<<<<<<<<<
+ *                 raise ValueError("option -o is forbidden in samtools view")
+ *             args = ( "-o", stdout_f ) + args
  */
-  __pyx_k_tuple_276 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_276)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_276);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_276));
-  __pyx_k_codeobj_277 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__readAndRelease, 320, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_kp_s_o, __pyx_v_args, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = (__pyx_t_5 != 0);
+      if (__pyx_t_1) {
 
-  /* "pysam/csamtools.pyx":329
- *         return lines
+        /* "pysam/csamtools.pyx":121
+ *         if method == "view":
+ *             if "-o" in args:
+ *                 raise ValueError("option -o is forbidden in samtools view")             # <<<<<<<<<<<<<<
+ *             args = ( "-o", stdout_f ) + args
  * 
- *     def release(self):             # <<<<<<<<<<<<<<
- *         return
- *         self.stderr_save.restore()
  */
-  __pyx_k_tuple_279 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_279)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_279);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_279));
-  __pyx_k_codeobj_280 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__release, 329, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-  /* "pysam/csamtools.pyx":335
- *             os.remove( self.stderr_f )
- * 
- *     def __del__(self):             # <<<<<<<<<<<<<<
- *         self.release()
- * 
- */
-  __pyx_k_tuple_282 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_282)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_282);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_282));
-  __pyx_k_codeobj_283 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____del__, 335, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":340
- * class StderrStoreWindows():
- *     '''does nothing. stderr can't be redirected on windows'''
- *     def __init__(self): pass             # <<<<<<<<<<<<<<
- *     def readAndRelease(self): return []
- *     def release(self): pass
- */
-  __pyx_k_tuple_286 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_286)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_286);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_286));
-  __pyx_k_codeobj_287 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____init__, 340, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":341
- *     '''does nothing. stderr can't be redirected on windows'''
- *     def __init__(self): pass
- *     def readAndRelease(self): return []             # <<<<<<<<<<<<<<
- *     def release(self): pass
- * 
- */
-  __pyx_k_tuple_289 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_289)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_289);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_289));
-  __pyx_k_codeobj_290 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__readAndRelease, 341, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_290)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":342
- *     def __init__(self): pass
- *     def readAndRelease(self): return []
- *     def release(self): pass             # <<<<<<<<<<<<<<
+      /* "pysam/csamtools.pyx":122
+ *             if "-o" in args:
+ *                 raise ValueError("option -o is forbidden in samtools view")
+ *             args = ( "-o", stdout_f ) + args             # <<<<<<<<<<<<<<
  * 
- * if platform.system()=='Windows':
+ *     # do the function call to samtools
  */
-  __pyx_k_tuple_292 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_292)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_292);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_292));
-  __pyx_k_codeobj_293 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__release, 342, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_293)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_kp_s_o);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_o);
+      __Pyx_GIVEREF(__pyx_kp_s_o);
+      __Pyx_INCREF(__pyx_v_stdout_f);
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_stdout_f);
+      __Pyx_GIVEREF(__pyx_v_stdout_f);
+      __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_3);
+      __pyx_t_3 = 0;
+      goto __pyx_L20;
+    }
+    __pyx_L20:;
+    goto __pyx_L7;
+  }
+  __pyx_L7:;
 
-  /* "pysam/csamtools.pyx":360
- * 
- * # order of records within sam headers
- * VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO" )             # <<<<<<<<<<<<<<
+  /* "pysam/csamtools.pyx":128
+ *     cdef int i, n, retval
  * 
- * # type conversions within sam header records
+ *     n = len(args)             # <<<<<<<<<<<<<<
+ *     method = _forceCmdlineBytes(method)
+ *     args = [ _forceCmdlineBytes(a) for a in args ]
  */
-  __pyx_k_tuple_296 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_n_s__CO)); if (unlikely(!__pyx_k_tuple_296)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_296);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_296));
+  __pyx_t_12 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_n = __pyx_t_12;
 
-  /* "pysam/csamtools.pyx":370
- * 
- * # output order of fields within records
- * VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),             # <<<<<<<<<<<<<<
- *                        "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
- *                        "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
- */
-  __pyx_k_tuple_297 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__VN), ((PyObject *)__pyx_n_s__SO), ((PyObject *)__pyx_n_s__GO)); if (unlikely(!__pyx_k_tuple_297)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_297);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_297));
-
-  /* "pysam/csamtools.pyx":371
- * # output order of fields within records
- * VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
- *                        "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),             # <<<<<<<<<<<<<<
- *                        "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
- *                        "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
- */
-  __pyx_k_tuple_298 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__SN), ((PyObject *)__pyx_n_s__LN), ((PyObject *)__pyx_n_s__AS), ((PyObject *)__pyx_n_s__M5), ((PyObject *)__pyx_n_s__UR), ((PyObject *)__pyx_n_s__SP)); if (unlikely(!__pyx_k_tuple_298)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_298);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_298));
-
-  /* "pysam/csamtools.pyx":372
- * VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
- *                        "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
- *                        "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),             # <<<<<<<<<<<<<<
- *                        "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
- * 
- */
-  __pyx_k_tuple_299 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_n_s__SM), ((PyObject *)__pyx_n_s__LB), ((PyObject *)__pyx_n_s__DS), ((PyObject *)__pyx_n_s__PU), ((PyObject *)__pyx_n_s__PI), ((PyObject *)__pyx_n_s__CN), ((PyObject *)__pyx_n_s__DT), ((PyObject *)__pyx_n_s__PL), ((PyObject *)__pyx_n_s__FO), ((PyObject *)__pyx_n_s__KS), ((PyObject *)__pyx_n_s__PG)); if (unlikely(!__pyx_k_tuple_299)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LI [...]
-  __Pyx_GOTREF(__pyx_k_tuple_299);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_299));
-
-  /* "pysam/csamtools.pyx":373
- *                        "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
- *                        "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
- *                        "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }             # <<<<<<<<<<<<<<
+  /* "pysam/csamtools.pyx":129
  * 
+ *     n = len(args)
+ *     method = _forceCmdlineBytes(method)             # <<<<<<<<<<<<<<
+ *     args = [ _forceCmdlineBytes(a) for a in args ]
  * 
  */
-  __pyx_k_tuple_300 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__PN), ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_n_s__VN), ((PyObject *)__pyx_n_s__CL), ((PyObject *)__pyx_n_s__PP)); if (unlikely(!__pyx_k_tuple_300)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_300);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_300));
-
-  /* "pysam/csamtools.pyx":3343
- * class Outs:
- *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
- *     def __init__(self, id = 1):             # <<<<<<<<<<<<<<
- *         self.streams = []
- *         self.id = id
- */
-  __pyx_k_tuple_301 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_301)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_301);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_301));
-  __pyx_k_codeobj_302 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____init__, 3343, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_302)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_k_tuple_303 = PyTuple_Pack(1, ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_k_tuple_303)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_303);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_303));
-
-  /* "pysam/csamtools.pyx":3347
- *         self.id = id
- * 
- *     def setdevice(self, filename):             # <<<<<<<<<<<<<<
- *         '''open an existing file, like "/dev/null"'''
- *         fd = os.open(filename, os.O_WRONLY)
- */
-  __pyx_k_tuple_305 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__fd)); if (unlikely(!__pyx_k_tuple_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_305);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_305));
-  __pyx_k_codeobj_306 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__setdevice, 3347, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_306)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_f_5pysam_9csamtools__forceCmdlineBytes(__pyx_v_method); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF_SET(__pyx_v_method, __pyx_t_3);
+  __pyx_t_3 = 0;
 
-  /* "pysam/csamtools.pyx":3352
- *         self.setfd(fd)
+  /* "pysam/csamtools.pyx":130
+ *     n = len(args)
+ *     method = _forceCmdlineBytes(method)
+ *     args = [ _forceCmdlineBytes(a) for a in args ]             # <<<<<<<<<<<<<<
  * 
- *     def setfile(self, filename):             # <<<<<<<<<<<<<<
- *         '''open a new file.'''
- *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);
+ *     # allocate two more for first (dummy) argument (contains command)
  */
-  __pyx_k_tuple_308 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__fd)); if (unlikely(!__pyx_k_tuple_308)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_308);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_308));
-  __pyx_k_codeobj_309 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__setfile, 3352, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_309)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __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 = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyList_CheckExact(__pyx_v_args) || PyTuple_CheckExact(__pyx_v_args)) {
+    __pyx_t_2 = __pyx_v_args; __Pyx_INCREF(__pyx_t_2); __pyx_t_12 = 0;
+    __pyx_t_13 = NULL;
+  } else {
+    __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext;
+  }
+  for (;;) {
+    if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_4 = __pyx_t_13(__pyx_t_2);
+      if (unlikely(!__pyx_t_4)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __pyx_f_5pysam_9csamtools__forceCmdlineBytes(__pyx_v_a); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_3);
+  __pyx_t_3 = 0;
 
-  /* "pysam/csamtools.pyx":3357
- *         self.setfd(fd)
+  /* "pysam/csamtools.pyx":133
  * 
- *     def setfd(self, fd):             # <<<<<<<<<<<<<<
- *         ofd = os.dup(self.id)      #  Save old stream on new unit.
- *         self.streams.append(ofd)
+ *     # allocate two more for first (dummy) argument (contains command)
+ *     cargs = <char**>calloc( n+2, sizeof( char *) )             # <<<<<<<<<<<<<<
+ *     cargs[0] = "samtools"
+ *     cargs[1] = method
  */
-  __pyx_k_tuple_311 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__fd), ((PyObject *)__pyx_n_s__ofd)); if (unlikely(!__pyx_k_tuple_311)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_311);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_311));
-  __pyx_k_codeobj_312 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__setfd, 3357, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_312)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_cargs = ((char **)calloc((__pyx_v_n + 2), (sizeof(char *))));
 
-  /* "pysam/csamtools.pyx":3365
- *         os.close(fd)                #  Close other unit (look out, caller.)
- * 
- *     def restore(self):             # <<<<<<<<<<<<<<
- *         '''restore previous output stream'''
- *         if self.streams:
+  /* "pysam/csamtools.pyx":134
+ *     # allocate two more for first (dummy) argument (contains command)
+ *     cargs = <char**>calloc( n+2, sizeof( char *) )
+ *     cargs[0] = "samtools"             # <<<<<<<<<<<<<<
+ *     cargs[1] = method
+ *     for i from 0 <= i < n: cargs[i+2] = args[i]
  */
-  __pyx_k_tuple_314 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_314)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_314);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_314));
-  __pyx_k_codeobj_315 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__restore, 3365, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_315)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  (__pyx_v_cargs[0]) = __pyx_k_samtools;
 
-  /* "pysam/csamtools.pyx":3376
- *             del self.streams[-1]
+  /* "pysam/csamtools.pyx":135
+ *     cargs = <char**>calloc( n+2, sizeof( char *) )
+ *     cargs[0] = "samtools"
+ *     cargs[1] = method             # <<<<<<<<<<<<<<
+ *     for i from 0 <= i < n: cargs[i+2] = args[i]
  * 
- * def _samtools_dispatch( method,             # <<<<<<<<<<<<<<
- *                         args = (),
- *                         catch_stdout = True ):
  */
-  __pyx_k_tuple_318 = PyTuple_Pack(16, ((PyObject *)__pyx_n_s__method), ((PyObject *)__pyx_n_s__args), ((PyObject *)__pyx_n_s__catch_stdout), ((PyObject *)__pyx_n_s__stderr_h), ((PyObject *)__pyx_n_s__stderr_f), ((PyObject *)__pyx_n_s__stdout_h), ((PyObject *)__pyx_n_s__stdout_f), ((PyObject *)__pyx_n_s__stdout_save), ((PyObject *)__pyx_n_s__cargs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__retval), ((PyObject *)__pyx_n_s__inf), ((PyObject *)__pyx_n_ [...]
-  __Pyx_GOTREF(__pyx_k_tuple_318);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_318));
-  __pyx_k_codeobj_319 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s___samtools_dispatch, 3376, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_319)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_RefNannyFinishContext();
-  return 0;
-  __pyx_L1_error:;
-  __Pyx_RefNannyFinishContext();
-  return -1;
-}
-
-static int __Pyx_InitGlobals(void) {
-  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_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_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_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_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_512 = PyInt_FromLong(512); if (unlikely(!__pyx_int_512)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_neg_127 = PyInt_FromLong(-127); if (unlikely(!__pyx_int_neg_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_0660 = PyInt_FromLong(0660); if (unlikely(!__pyx_int_0660)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_1024 = PyInt_FromLong(1024); if (unlikely(!__pyx_int_1024)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_8000 = PyInt_FromLong(8000); if (unlikely(!__pyx_int_8000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_65535 = PyInt_FromLong(65535); if (unlikely(!__pyx_int_65535)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_neg_32767 = PyInt_FromLong(-32767); if (unlikely(!__pyx_int_neg_32767)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_536870912 = PyInt_FromLong(536870912); if (unlikely(!__pyx_int_536870912)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_neg_2147483648 = PyInt_FromLong(-2147483648); if (unlikely(!__pyx_int_neg_2147483648)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  return 0;
-  __pyx_L1_error:;
-  return -1;
-}
+  __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_v_method); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  (__pyx_v_cargs[1]) = __pyx_t_14;
 
-#if PY_MAJOR_VERSION < 3
-PyMODINIT_FUNC initcsamtools(void); /*proto*/
-PyMODINIT_FUNC initcsamtools(void)
-#else
-PyMODINIT_FUNC PyInit_csamtools(void); /*proto*/
-PyMODINIT_FUNC PyInit_csamtools(void)
-#endif
-{
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  __Pyx_RefNannyDeclarations
-  #if CYTHON_REFNANNY
-  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
-  if (!__Pyx_RefNanny) {
-      PyErr_Clear();
-      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
-      if (!__Pyx_RefNanny)
-          Py_FatalError("failed to import 'refnanny' module");
-  }
-  #endif
-  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_csamtools(void)", 0);
-  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #ifdef __Pyx_CyFunction_USED
-  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #endif
-  #ifdef __Pyx_FusedFunction_USED
-  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #endif
-  #ifdef __Pyx_Generator_USED
-  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #endif
-  /*--- Library function declarations ---*/
-  /*--- Threads initialization code ---*/
-  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
-  #ifdef WITH_THREAD /* Python build with threading support? */
-  PyEval_InitThreads();
-  #endif
-  #endif
-  /*--- Module creation code ---*/
-  #if PY_MAJOR_VERSION < 3
-  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("csamtools"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
-  #else
-  __pyx_m = PyModule_Create(&__pyx_moduledef);
-  #endif
-  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if PY_MAJOR_VERSION >= 3
-  {
-    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (!PyDict_GetItemString(modules, "pysam.csamtools")) {
-      if (unlikely(PyDict_SetItemString(modules, "pysam.csamtools", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-  }
-  #endif
-  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_PYPY
-  Py_INCREF(__pyx_b);
-  #endif
-  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  /*--- Initialize various global constants etc. ---*/
-  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_module_is_main_pysam__csamtools) {
-    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 ---*/
-  __pyx_v_5pysam_9csamtools__FILENAME_ENCODING = ((PyObject*)Py_None); Py_INCREF(Py_None);
-  /*--- Variable export code ---*/
-  /*--- Function export code ---*/
-  /*--- Type init code ---*/
-  __pyx_vtabptr_5pysam_9csamtools_Fastafile = &__pyx_vtable_5pysam_9csamtools_Fastafile;
-  __pyx_vtable_5pysam_9csamtools_Fastafile._fetch = (char *(*)(struct __pyx_obj_5pysam_9csamtools_Fastafile *, char *, int, int, int *))__pyx_f_5pysam_9csamtools_9Fastafile__fetch;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_Fastafile, "__contains__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_9Fastafile_18__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_9Fastafile_18__contains__.doc = __pyx_doc_5pysam_9csamtools_9Fastafile_18__contains__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_9Fastafile_18__contains__;
-    }
-  }
-  #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_Fastafile.tp_dict, __pyx_vtabptr_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "Fastafile", (PyObject *)&__pyx_type_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_Fastafile = &__pyx_type_5pysam_9csamtools_Fastafile;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_FastqProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "FastqProxy", (PyObject *)&__pyx_type_5pysam_9csamtools_FastqProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_FastqProxy = &__pyx_type_5pysam_9csamtools_FastqProxy;
-  __pyx_vtabptr_5pysam_9csamtools_Fastqfile = &__pyx_vtable_5pysam_9csamtools_Fastqfile;
-  __pyx_vtable_5pysam_9csamtools_Fastqfile.getCurrent = (kseq_t *(*)(struct __pyx_obj_5pysam_9csamtools_Fastqfile *))__pyx_f_5pysam_9csamtools_9Fastqfile_getCurrent;
-  __pyx_vtable_5pysam_9csamtools_Fastqfile.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_Fastqfile *))__pyx_f_5pysam_9csamtools_9Fastqfile_cnext;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_Fastqfile, "__next__"); 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_5pysam_9csamtools_9Fastqfile_12__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_9Fastqfile_12__next__.doc = __pyx_doc_5pysam_9csamtools_9Fastqfile_12__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_9Fastqfile_12__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_Fastqfile.tp_dict, __pyx_vtabptr_5pysam_9csamtools_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "Fastqfile", (PyObject *)&__pyx_type_5pysam_9csamtools_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_Fastqfile = &__pyx_type_5pysam_9csamtools_Fastqfile;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_AlignedRead, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_11AlignedRead_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_11AlignedRead_4__str__.doc = __pyx_doc_5pysam_9csamtools_11AlignedRead_4__str__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_11AlignedRead_4__str__;
-    }
-  }
-  #endif
-  if (__Pyx_SetAttrString(__pyx_m, "AlignedRead", (PyObject *)&__pyx_type_5pysam_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_AlignedRead = &__pyx_type_5pysam_9csamtools_AlignedRead;
-  __pyx_vtabptr_5pysam_9csamtools_Samfile = &__pyx_vtable_5pysam_9csamtools_Samfile;
-  __pyx_vtable_5pysam_9csamtools_Samfile._buildHeader = (bam_header_t *(*)(struct __pyx_obj_5pysam_9csamtools_Samfile *, PyObject *))__pyx_f_5pysam_9csamtools_7Samfile__buildHeader;
-  __pyx_vtable_5pysam_9csamtools_Samfile.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_9csamtools_Samfile *))__pyx_f_5pysam_9csamtools_7Samfile_getCurrent;
-  __pyx_vtable_5pysam_9csamtools_Samfile.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_Samfile *))__pyx_f_5pysam_9csamtools_7Samfile_cnext;
-  __pyx_vtable_5pysam_9csamtools_Samfile.write = (int (*)(struct __pyx_obj_5pysam_9csamtools_Samfile *, struct __pyx_obj_5pysam_9csamtools_AlignedRead *, int __pyx_skip_dispatch))__pyx_f_5pysam_9csamtools_7Samfile_write;
-  __pyx_vtable_5pysam_9csamtools_Samfile._getrname = (char *(*)(struct __pyx_obj_5pysam_9csamtools_Samfile *, int))__pyx_f_5pysam_9csamtools_7Samfile__getrname;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_Samfile, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_7Samfile_42__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_7Samfile_42__next__.doc = __pyx_doc_5pysam_9csamtools_7Samfile_42__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_7Samfile_42__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_Samfile.tp_dict, __pyx_vtabptr_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "Samfile", (PyObject *)&__pyx_type_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_Samfile = &__pyx_type_5pysam_9csamtools_Samfile;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "PileupProxy", (PyObject *)&__pyx_type_5pysam_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_PileupProxy = &__pyx_type_5pysam_9csamtools_PileupProxy;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "PileupRead", (PyObject *)&__pyx_type_5pysam_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_PileupRead = &__pyx_type_5pysam_9csamtools_PileupRead;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "IteratorRow", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IteratorRow = &__pyx_type_5pysam_9csamtools_IteratorRow;
-  __pyx_vtabptr_5pysam_9csamtools_IteratorRowRegion = &__pyx_vtable_5pysam_9csamtools_IteratorRowRegion;
-  __pyx_vtable_5pysam_9csamtools_IteratorRowRegion.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *))__pyx_f_5pysam_9csamtools_17IteratorRowRegion_getCurrent;
-  __pyx_vtable_5pysam_9csamtools_IteratorRowRegion.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *))__pyx_f_5pysam_9csamtools_17IteratorRowRegion_cnext;
-  __pyx_type_5pysam_9csamtools_IteratorRowRegion.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorRow;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_17IteratorRowRegion_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_17IteratorRowRegion_4__next__.doc = __pyx_doc_5pysam_9csamtools_17IteratorRowRegion_4__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_17IteratorRowRegion_4__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowRegion.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowRegion", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IteratorRowRegion = &__pyx_type_5pysam_9csamtools_IteratorRowRegion;
-  __pyx_vtabptr_5pysam_9csamtools_IteratorRowAll = &__pyx_vtable_5pysam_9csamtools_IteratorRowAll;
-  __pyx_vtable_5pysam_9csamtools_IteratorRowAll.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *))__pyx_f_5pysam_9csamtools_14IteratorRowAll_getCurrent;
-  __pyx_vtable_5pysam_9csamtools_IteratorRowAll.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *))__pyx_f_5pysam_9csamtools_14IteratorRowAll_cnext;
-  __pyx_type_5pysam_9csamtools_IteratorRowAll.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorRow;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAll, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_14IteratorRowAll_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_14IteratorRowAll_4__next__.doc = __pyx_doc_5pysam_9csamtools_14IteratorRowAll_4__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_14IteratorRowAll_4__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowAll.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAll", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IteratorRowAll = &__pyx_type_5pysam_9csamtools_IteratorRowAll;
-  __pyx_type_5pysam_9csamtools_IteratorRowAllRefs.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorRow;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_18IteratorRowAllRefs_6__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_18IteratorRowAllRefs_6__next__.doc = __pyx_doc_5pysam_9csamtools_18IteratorRowAllRefs_6__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_18IteratorRowAllRefs_6__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAllRefs", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IteratorRowAllRefs = &__pyx_type_5pysam_9csamtools_IteratorRowAllRefs;
-  __pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection = &__pyx_vtable_5pysam_9csamtools_IteratorRowSelection;
-  __pyx_vtable_5pysam_9csamtools_IteratorRowSelection.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *))__pyx_f_5pysam_9csamtools_20IteratorRowSelection_getCurrent;
-  __pyx_vtable_5pysam_9csamtools_IteratorRowSelection.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *))__pyx_f_5pysam_9csamtools_20IteratorRowSelection_cnext;
-  __pyx_type_5pysam_9csamtools_IteratorRowSelection.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorRow;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowSelection, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_20IteratorRowSelection_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_20IteratorRowSelection_4__next__.doc = __pyx_doc_5pysam_9csamtools_20IteratorRowSelection_4__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_20IteratorRowSelection_4__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowSelection.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "IteratorRowSelection", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IteratorRowSelection = &__pyx_type_5pysam_9csamtools_IteratorRowSelection;
-  __pyx_vtabptr_5pysam_9csamtools_IteratorColumn = &__pyx_vtable_5pysam_9csamtools_IteratorColumn;
-  __pyx_vtable_5pysam_9csamtools_IteratorColumn.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *))__pyx_f_5pysam_9csamtools_14IteratorColumn_cnext;
-  __pyx_vtable_5pysam_9csamtools_IteratorColumn.getSequence = (char *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *))__pyx_f_5pysam_9csamtools_14IteratorColumn_getSequence;
-  __pyx_vtable_5pysam_9csamtools_IteratorColumn.setMask = (PyObject *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *))__pyx_f_5pysam_9csamtools_14IteratorColumn_setMask;
-  __pyx_vtable_5pysam_9csamtools_IteratorColumn.setupIteratorData = (PyObject *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, int, int, int, struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData *__pyx_optional_args))__pyx_f_5pysam_9csamtools_14IteratorColumn_setupIteratorData;
-  __pyx_vtable_5pysam_9csamtools_IteratorColumn.reset = (PyObject *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *, PyObject *, PyObject *))__pyx_f_5pysam_9csamtools_14IteratorColumn_reset;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumn.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "IteratorColumn", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IteratorColumn = &__pyx_type_5pysam_9csamtools_IteratorColumn;
-  __pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion = &__pyx_vtable_5pysam_9csamtools_IteratorColumnRegion;
-  __pyx_vtable_5pysam_9csamtools_IteratorColumnRegion.__pyx_base = *__pyx_vtabptr_5pysam_9csamtools_IteratorColumn;
-  __pyx_type_5pysam_9csamtools_IteratorColumnRegion.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorColumn;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_20IteratorColumnRegion_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_20IteratorColumnRegion_2__next__.doc = __pyx_doc_5pysam_9csamtools_20IteratorColumnRegion_2__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_20IteratorColumnRegion_2__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumnRegion.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnRegion", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IteratorColumnRegion = &__pyx_type_5pysam_9csamtools_IteratorColumnRegion;
-  __pyx_vtabptr_5pysam_9csamtools_IteratorColumnAllRefs = &__pyx_vtable_5pysam_9csamtools_IteratorColumnAllRefs;
-  __pyx_vtable_5pysam_9csamtools_IteratorColumnAllRefs.__pyx_base = *__pyx_vtabptr_5pysam_9csamtools_IteratorColumn;
-  __pyx_type_5pysam_9csamtools_IteratorColumnAllRefs.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorColumn;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__.doc = __pyx_doc_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__;
-    }
+  /* "pysam/csamtools.pyx":136
+ *     cargs[0] = "samtools"
+ *     cargs[1] = method
+ *     for i from 0 <= i < n: cargs[i+2] = args[i]             # <<<<<<<<<<<<<<
+ * 
+ *     retval = pysam_dispatch(n+2, cargs)
+ */
+  __pyx_t_8 = __pyx_v_n;
+  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {
+    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    (__pyx_v_cargs[(__pyx_v_i + 2)]) = __pyx_t_14;
   }
-  #endif
-  if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnAllRefs", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IteratorColumnAllRefs = &__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IndexedReads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "IndexedReads", (PyObject *)&__pyx_type_5pysam_9csamtools_IndexedReads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_IndexedReads = &__pyx_type_5pysam_9csamtools_IndexedReads;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "SNPCall", (PyObject *)&__pyx_type_5pysam_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools_SNPCall = &__pyx_type_5pysam_9csamtools_SNPCall;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools___pyx_scope_struct__genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools___pyx_scope_struct__genexpr = &__pyx_type_5pysam_9csamtools___pyx_scope_struct__genexpr;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools___pyx_scope_struct_1_genexpr = &__pyx_type_5pysam_9csamtools___pyx_scope_struct_1_genexpr;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools___pyx_scope_struct_2__open) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools___pyx_scope_struct_2__open = &__pyx_type_5pysam_9csamtools___pyx_scope_struct_2__open;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools___pyx_scope_struct_3_genexpr = &__pyx_type_5pysam_9csamtools___pyx_scope_struct_3_genexpr;
-  if (PyType_Ready(&__pyx_type_5pysam_9csamtools___pyx_scope_struct_4_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_9csamtools___pyx_scope_struct_4_genexpr = &__pyx_type_5pysam_9csamtools___pyx_scope_struct_4_genexpr;
-  /*--- Type import code ---*/
-  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
-  #if CYTHON_COMPILING_IN_PYPY
-  sizeof(PyTypeObject),
-  #else
-  sizeof(PyHeapTypeObject),
-  #endif
-  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __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[2]; __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[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  /*--- Variable import code ---*/
-  /*--- Function import code ---*/
-  /*--- Execution code ---*/
 
-  /* "pysam/csamtools.pyx":4
- * # cython: profile=True
- * # adds doc-strings for sphinx
- * import tempfile             # <<<<<<<<<<<<<<
- * import os
- * import sys
+  /* "pysam/csamtools.pyx":138
+ *     for i from 0 <= i < n: cargs[i+2] = args[i]
+ * 
+ *     retval = pysam_dispatch(n+2, cargs)             # <<<<<<<<<<<<<<
+ *     free( cargs )
+ * 
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__tempfile), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tempfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_retval = pysam_dispatch((__pyx_v_n + 2), __pyx_v_cargs);
 
-  /* "pysam/csamtools.pyx":5
- * # adds doc-strings for sphinx
- * import tempfile
- * import os             # <<<<<<<<<<<<<<
- * import sys
- * import types
+  /* "pysam/csamtools.pyx":139
+ * 
+ *     retval = pysam_dispatch(n+2, cargs)
+ *     free( cargs )             # <<<<<<<<<<<<<<
+ * 
+ *     # restore stdout/stderr. This will also flush, so
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  free(__pyx_v_cargs);
 
-  /* "pysam/csamtools.pyx":6
- * import tempfile
- * import os
- * import sys             # <<<<<<<<<<<<<<
- * import types
- * import itertools
+  /* "pysam/csamtools.pyx":143
+ *     # restore stdout/stderr. This will also flush, so
+ *     # needs to be before reading back the file contents
+ *     if catch_stdout:             # <<<<<<<<<<<<<<
+ *         stdout_save.restore()
+ *         try:
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-  /* "pysam/csamtools.pyx":7
- * import os
- * import sys
- * import types             # <<<<<<<<<<<<<<
- * import itertools
- * import struct
+    /* "pysam/csamtools.pyx":144
+ *     # needs to be before reading back the file contents
+ *     if catch_stdout:
+ *         stdout_save.restore()             # <<<<<<<<<<<<<<
+ *         try:
+ *             with open( stdout_f, "r") as inf:
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__types), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (unlikely(!__pyx_v_stdout_save)) { __Pyx_RaiseUnboundLocalError("stdout_save"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stdout_save, __pyx_n_s_restore); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __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_2); __pyx_t_2 = 0;
 
-  /* "pysam/csamtools.pyx":8
- * import sys
- * import types
- * import itertools             # <<<<<<<<<<<<<<
- * import struct
- * import ctypes
+    /* "pysam/csamtools.pyx":145
+ *     if catch_stdout:
+ *         stdout_save.restore()
+ *         try:             # <<<<<<<<<<<<<<
+ *             with open( stdout_f, "r") as inf:
+ *                 out_stdout = inf.readlines()
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__itertools), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {
+      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
+      __Pyx_XGOTREF(__pyx_t_11);
+      __Pyx_XGOTREF(__pyx_t_10);
+      __Pyx_XGOTREF(__pyx_t_9);
+      /*try:*/ {
+
+        /* "pysam/csamtools.pyx":146
+ *         stdout_save.restore()
+ *         try:
+ *             with open( stdout_f, "r") as inf:             # <<<<<<<<<<<<<<
+ *                 out_stdout = inf.readlines()
+ *         except UnicodeDecodeError:
+ */
+        /*with:*/ {
+          if (unlikely(!__pyx_v_stdout_f)) { __Pyx_RaiseUnboundLocalError("stdout_f"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L27_error;} }
+          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_INCREF(__pyx_v_stdout_f);
+          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stdout_f);
+          __Pyx_GIVEREF(__pyx_v_stdout_f);
+          __Pyx_INCREF(__pyx_n_s_r);
+          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_r);
+          __Pyx_GIVEREF(__pyx_n_s_r);
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+          __Pyx_GOTREF(__pyx_t_15);
+          __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          /*try:*/ {
+            {
+              __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+              __Pyx_XGOTREF(__pyx_t_16);
+              __Pyx_XGOTREF(__pyx_t_17);
+              __Pyx_XGOTREF(__pyx_t_18);
+              /*try:*/ {
+                __Pyx_INCREF(__pyx_t_4);
+                __pyx_v_inf = __pyx_t_4;
+                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "pysam/csamtools.pyx":9
- * import types
- * import itertools
- * import struct             # <<<<<<<<<<<<<<
- * import ctypes
- * import collections
+                /* "pysam/csamtools.pyx":147
+ *         try:
+ *             with open( stdout_f, "r") as inf:
+ *                 out_stdout = inf.readlines()             # <<<<<<<<<<<<<<
+ *         except UnicodeDecodeError:
+ *             with open( stdout_f, "rb") as inf:
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__struct), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__struct, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inf, __pyx_n_s_readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
+                __Pyx_GOTREF(__pyx_t_4);
+                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
+                __Pyx_GOTREF(__pyx_t_3);
+                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+                __pyx_v_out_stdout = __pyx_t_3;
+                __pyx_t_3 = 0;
+              }
+              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+              goto __pyx_L48_try_end;
+              __pyx_L41_error:;
+              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+              /* "pysam/csamtools.pyx":146
+ *         stdout_save.restore()
+ *         try:
+ *             with open( stdout_f, "r") as inf:             # <<<<<<<<<<<<<<
+ *                 out_stdout = inf.readlines()
+ *         except UnicodeDecodeError:
+ */
+              /*except:*/ {
+                __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+                if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+                __Pyx_GOTREF(__pyx_t_3);
+                __Pyx_GOTREF(__pyx_t_4);
+                __Pyx_GOTREF(__pyx_t_2);
+                __pyx_t_6 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+                __Pyx_GOTREF(__pyx_t_6);
+                __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL);
+                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+                if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+                __Pyx_GOTREF(__pyx_t_19);
+                __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_19);
+                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+                if (__pyx_t_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+                __pyx_t_5 = ((!(__pyx_t_1 != 0)) != 0);
+                if (__pyx_t_5) {
+                  __Pyx_GIVEREF(__pyx_t_3);
+                  __Pyx_GIVEREF(__pyx_t_4);
+                  __Pyx_XGIVEREF(__pyx_t_2);
+                  __Pyx_ErrRestore(__pyx_t_3, __pyx_t_4, __pyx_t_2);
+                  __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; 
+                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+                }
+                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+                goto __pyx_L42_exception_handled;
+              }
+              __pyx_L43_except_error:;
+              __Pyx_XGIVEREF(__pyx_t_16);
+              __Pyx_XGIVEREF(__pyx_t_17);
+              __Pyx_XGIVEREF(__pyx_t_18);
+              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+              goto __pyx_L27_error;
+              __pyx_L42_exception_handled:;
+              __Pyx_XGIVEREF(__pyx_t_16);
+              __Pyx_XGIVEREF(__pyx_t_17);
+              __Pyx_XGIVEREF(__pyx_t_18);
+              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+              __pyx_L48_try_end:;
+            }
+          }
+          /*finally:*/ {
+            /*normal exit:*/{
+              if (__pyx_t_15) {
+                __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__3, NULL);
+                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+                if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+                __Pyx_GOTREF(__pyx_t_18);
+                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+              }
+              goto __pyx_L40;
+            }
+            __pyx_L40:;
+          }
+          goto __pyx_L53;
+          __pyx_L35_error:;
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+          goto __pyx_L27_error;
+          __pyx_L53:;
+        }
+      }
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      goto __pyx_L34_try_end;
+      __pyx_L27_error:;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "pysam/csamtools.pyx":148
+ *             with open( stdout_f, "r") as inf:
+ *                 out_stdout = inf.readlines()
+ *         except UnicodeDecodeError:             # <<<<<<<<<<<<<<
+ *             with open( stdout_f, "rb") as inf:
+ *                 # read binary output
+ */
+      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
+      if (__pyx_t_8) {
+        __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_3);
+
+        /* "pysam/csamtools.pyx":149
+ *                 out_stdout = inf.readlines()
+ *         except UnicodeDecodeError:
+ *             with open( stdout_f, "rb") as inf:             # <<<<<<<<<<<<<<
+ *                 # read binary output
+ *                 out_stdout = inf.read()
+ */
+        /*with:*/ {
+          if (unlikely(!__pyx_v_stdout_f)) { __Pyx_RaiseUnboundLocalError("stdout_f"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;} }
+          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_v_stdout_f);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stdout_f);
+          __Pyx_GIVEREF(__pyx_v_stdout_f);
+          __Pyx_INCREF(__pyx_n_s_rb);
+          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_rb);
+          __Pyx_GIVEREF(__pyx_n_s_rb);
+          __pyx_t_20 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+          __Pyx_GOTREF(__pyx_t_20);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_20, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+          __Pyx_GOTREF(__pyx_t_15);
+          __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_20, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+          __Pyx_GOTREF(__pyx_t_21);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+          /*try:*/ {
+            {
+              __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
+              __Pyx_XGOTREF(__pyx_t_18);
+              __Pyx_XGOTREF(__pyx_t_17);
+              __Pyx_XGOTREF(__pyx_t_16);
+              /*try:*/ {
+                __Pyx_INCREF(__pyx_t_21);
+                __Pyx_XDECREF_SET(__pyx_v_inf, __pyx_t_21);
+                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+
+                /* "pysam/csamtools.pyx":151
+ *             with open( stdout_f, "rb") as inf:
+ *                 # read binary output
+ *                 out_stdout = inf.read()             # <<<<<<<<<<<<<<
+ *         os.remove( stdout_f )
+ *     else:
+ */
+                __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_inf, __pyx_n_s_read); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L62_error;}
+                __Pyx_GOTREF(__pyx_t_21);
+                __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L62_error;}
+                __Pyx_GOTREF(__pyx_t_20);
+                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+                __Pyx_XDECREF_SET(__pyx_v_out_stdout, __pyx_t_20);
+                __pyx_t_20 = 0;
+              }
+              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+              goto __pyx_L69_try_end;
+              __pyx_L62_error:;
+              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
 
-  /* "pysam/csamtools.pyx":10
- * import itertools
- * import struct
- * import ctypes             # <<<<<<<<<<<<<<
- * import collections
- * import re
+              /* "pysam/csamtools.pyx":149
+ *                 out_stdout = inf.readlines()
+ *         except UnicodeDecodeError:
+ *             with open( stdout_f, "rb") as inf:             # <<<<<<<<<<<<<<
+ *                 # read binary output
+ *                 out_stdout = inf.read()
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+              /*except:*/ {
+                __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+                if (__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+                __Pyx_GOTREF(__pyx_t_20);
+                __Pyx_GOTREF(__pyx_t_21);
+                __Pyx_GOTREF(__pyx_t_6);
+                __pyx_t_22 = PyTuple_Pack(3, __pyx_t_20, __pyx_t_21, __pyx_t_6); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+                __Pyx_GOTREF(__pyx_t_22);
+                __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_22, NULL);
+                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+                if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+                __Pyx_GOTREF(__pyx_t_19);
+                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_19);
+                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+                if (__pyx_t_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+                __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0);
+                if (__pyx_t_1) {
+                  __Pyx_GIVEREF(__pyx_t_20);
+                  __Pyx_GIVEREF(__pyx_t_21);
+                  __Pyx_XGIVEREF(__pyx_t_6);
+                  __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_6);
+                  __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_6 = 0; 
+                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+                }
+                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+                goto __pyx_L63_exception_handled;
+              }
+              __pyx_L64_except_error:;
+              __Pyx_XGIVEREF(__pyx_t_18);
+              __Pyx_XGIVEREF(__pyx_t_17);
+              __Pyx_XGIVEREF(__pyx_t_16);
+              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+              goto __pyx_L29_except_error;
+              __pyx_L63_exception_handled:;
+              __Pyx_XGIVEREF(__pyx_t_18);
+              __Pyx_XGIVEREF(__pyx_t_17);
+              __Pyx_XGIVEREF(__pyx_t_16);
+              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+              __pyx_L69_try_end:;
+            }
+          }
+          /*finally:*/ {
+            /*normal exit:*/{
+              if (__pyx_t_15) {
+                __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__4, NULL);
+                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+                if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+                __Pyx_GOTREF(__pyx_t_16);
+                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+              }
+              goto __pyx_L61;
+            }
+            __pyx_L61:;
+          }
+          goto __pyx_L74;
+          __pyx_L56_error:;
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+          goto __pyx_L29_except_error;
+          __pyx_L74:;
+        }
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        goto __pyx_L28_exception_handled;
+      }
+      goto __pyx_L29_except_error;
+      __pyx_L29_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_9);
+      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
+      goto __pyx_L1_error;
+      __pyx_L28_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_9);
+      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
+      __pyx_L34_try_end:;
+    }
 
-  /* "pysam/csamtools.pyx":11
- * import struct
- * import ctypes
- * import collections             # <<<<<<<<<<<<<<
- * import re
- * import platform
+    /* "pysam/csamtools.pyx":152
+ *                 # read binary output
+ *                 out_stdout = inf.read()
+ *         os.remove( stdout_f )             # <<<<<<<<<<<<<<
+ *     else:
+ *         out_stdout = []
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__collections), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); 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_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_remove); 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_3); __pyx_t_3 = 0;
+    if (unlikely(!__pyx_v_stdout_f)) { __Pyx_RaiseUnboundLocalError("stdout_f"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __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_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_stdout_f);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stdout_f);
+    __Pyx_GIVEREF(__pyx_v_stdout_f);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    goto __pyx_L26;
+  }
+  /*else*/ {
 
-  /* "pysam/csamtools.pyx":12
- * import ctypes
- * import collections
- * import re             # <<<<<<<<<<<<<<
- * import platform
- * import warnings
+    /* "pysam/csamtools.pyx":154
+ *         os.remove( stdout_f )
+ *     else:
+ *         out_stdout = []             # <<<<<<<<<<<<<<
+ * 
+ *     # get error messages
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __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 = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_v_out_stdout = __pyx_t_2;
+    __pyx_t_2 = 0;
+  }
+  __pyx_L26:;
 
-  /* "pysam/csamtools.pyx":13
- * import collections
- * import re
- * import platform             # <<<<<<<<<<<<<<
- * import warnings
- * from cpython cimport PyErr_SetString, PyBytes_Check, PyUnicode_Check, PyBytes_FromStringAndSize
+  /* "pysam/csamtools.pyx":157
+ * 
+ *     # get error messages
+ *     pysam_unset_stderr()             # <<<<<<<<<<<<<<
+ *     try:
+ *         with open( stderr_f, "r") as inf:
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__platform), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__platform, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  pysam_unset_stderr();
 
-  /* "pysam/csamtools.pyx":14
- * import re
- * import platform
- * import warnings             # <<<<<<<<<<<<<<
- * from cpython cimport PyErr_SetString, PyBytes_Check, PyUnicode_Check, PyBytes_FromStringAndSize
- * from cpython.version cimport PY_MAJOR_VERSION
+  /* "pysam/csamtools.pyx":158
+ *     # get error messages
+ *     pysam_unset_stderr()
+ *     try:             # <<<<<<<<<<<<<<
+ *         with open( stderr_f, "r") as inf:
+ *             out_stderr = inf.readlines()
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__warnings), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__warnings, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  /*try:*/ {
+    {
+      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
+      __Pyx_XGOTREF(__pyx_t_9);
+      __Pyx_XGOTREF(__pyx_t_10);
+      __Pyx_XGOTREF(__pyx_t_11);
+      /*try:*/ {
 
-  /* "pysam/csamtools.pyx":23
- * ## Python 3 compatibility functions
- * ########################################################################
- * IS_PYTHON3 = PY_MAJOR_VERSION >= 3             # <<<<<<<<<<<<<<
- * cdef from_string_and_size(char* s, size_t length):
- *     if PY_MAJOR_VERSION < 3:
+        /* "pysam/csamtools.pyx":159
+ *     pysam_unset_stderr()
+ *     try:
+ *         with open( stderr_f, "r") as inf:             # <<<<<<<<<<<<<<
+ *             out_stderr = inf.readlines()
+ *     except UnicodeDecodeError:
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong((PY_MAJOR_VERSION >= 3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IS_PYTHON3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        /*with:*/ {
+          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_INCREF(__pyx_v_stderr_f);
+          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stderr_f);
+          __Pyx_GIVEREF(__pyx_v_stderr_f);
+          __Pyx_INCREF(__pyx_n_s_r);
+          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_r);
+          __Pyx_GIVEREF(__pyx_n_s_r);
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+          __Pyx_GOTREF(__pyx_t_15);
+          __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          /*try:*/ {
+            {
+              __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+              __Pyx_XGOTREF(__pyx_t_16);
+              __Pyx_XGOTREF(__pyx_t_17);
+              __Pyx_XGOTREF(__pyx_t_18);
+              /*try:*/ {
+                __Pyx_INCREF(__pyx_t_4);
+                __Pyx_XDECREF_SET(__pyx_v_inf, __pyx_t_4);
+                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "pysam/csamtools.pyx":32
- * # filename encoding (copied from lxml.etree.pyx)
- * cdef str _FILENAME_ENCODING
- * _FILENAME_ENCODING = sys.getfilesystemencoding()             # <<<<<<<<<<<<<<
- * if _FILENAME_ENCODING is None:
- *     _FILENAME_ENCODING = sys.getdefaultencoding()
+                /* "pysam/csamtools.pyx":160
+ *     try:
+ *         with open( stderr_f, "r") as inf:
+ *             out_stderr = inf.readlines()             # <<<<<<<<<<<<<<
+ *     except UnicodeDecodeError:
+ *         with open( stderr_f, "rb") as inf:
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_262); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __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 = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected str, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-  __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_v_5pysam_9csamtools__FILENAME_ENCODING = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
+                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inf, __pyx_n_s_readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L92_error;}
+                __Pyx_GOTREF(__pyx_t_4);
+                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L92_error;}
+                __Pyx_GOTREF(__pyx_t_3);
+                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+                __pyx_v_out_stderr = __pyx_t_3;
+                __pyx_t_3 = 0;
+              }
+              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+              goto __pyx_L99_try_end;
+              __pyx_L92_error:;
+              __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
+              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/csamtools.pyx":33
- * cdef str _FILENAME_ENCODING
- * _FILENAME_ENCODING = sys.getfilesystemencoding()
- * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
- *     _FILENAME_ENCODING = sys.getdefaultencoding()
- * if _FILENAME_ENCODING is None:
- */
-  __pyx_t_3 = (__pyx_v_5pysam_9csamtools__FILENAME_ENCODING == ((PyObject*)Py_None));
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":34
- * _FILENAME_ENCODING = sys.getfilesystemencoding()
- * if _FILENAME_ENCODING is None:
- *     _FILENAME_ENCODING = sys.getdefaultencoding()             # <<<<<<<<<<<<<<
- * if _FILENAME_ENCODING is None:
- *     _FILENAME_ENCODING = 'ascii'
+              /* "pysam/csamtools.pyx":159
+ *     pysam_unset_stderr()
+ *     try:
+ *         with open( stderr_f, "r") as inf:             # <<<<<<<<<<<<<<
+ *             out_stderr = inf.readlines()
+ *     except UnicodeDecodeError:
  */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__getdefaultencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __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 = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected str, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-    __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_v_5pysam_9csamtools__FILENAME_ENCODING = ((PyObject*)__pyx_t_1);
-    __pyx_t_1 = 0;
-    goto __pyx_L2;
-  }
-  __pyx_L2:;
+              /*except:*/ {
+                __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+                if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+                __Pyx_GOTREF(__pyx_t_3);
+                __Pyx_GOTREF(__pyx_t_4);
+                __Pyx_GOTREF(__pyx_t_2);
+                __pyx_t_6 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+                __Pyx_GOTREF(__pyx_t_6);
+                __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL);
+                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+                if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+                __Pyx_GOTREF(__pyx_t_19);
+                __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_19);
+                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+                if (__pyx_t_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+                __pyx_t_5 = ((!(__pyx_t_1 != 0)) != 0);
+                if (__pyx_t_5) {
+                  __Pyx_GIVEREF(__pyx_t_3);
+                  __Pyx_GIVEREF(__pyx_t_4);
+                  __Pyx_XGIVEREF(__pyx_t_2);
+                  __Pyx_ErrRestore(__pyx_t_3, __pyx_t_4, __pyx_t_2);
+                  __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; 
+                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+                }
+                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+                goto __pyx_L93_exception_handled;
+              }
+              __pyx_L94_except_error:;
+              __Pyx_XGIVEREF(__pyx_t_16);
+              __Pyx_XGIVEREF(__pyx_t_17);
+              __Pyx_XGIVEREF(__pyx_t_18);
+              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+              goto __pyx_L78_error;
+              __pyx_L93_exception_handled:;
+              __Pyx_XGIVEREF(__pyx_t_16);
+              __Pyx_XGIVEREF(__pyx_t_17);
+              __Pyx_XGIVEREF(__pyx_t_18);
+              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+              __pyx_L99_try_end:;
+            }
+          }
+          /*finally:*/ {
+            /*normal exit:*/{
+              if (__pyx_t_15) {
+                __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__5, NULL);
+                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+                if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+                __Pyx_GOTREF(__pyx_t_18);
+                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+              }
+              goto __pyx_L91;
+            }
+            __pyx_L91:;
+          }
+          goto __pyx_L104;
+          __pyx_L86_error:;
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+          goto __pyx_L78_error;
+          __pyx_L104:;
+        }
+      }
+      /*else:*/ {
 
-  /* "pysam/csamtools.pyx":35
- * if _FILENAME_ENCODING is None:
- *     _FILENAME_ENCODING = sys.getdefaultencoding()
- * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
- *     _FILENAME_ENCODING = 'ascii'
- * 
+        /* "pysam/csamtools.pyx":166
+ *             out_stderr = inf.read()
+ *     else:
+ *         out_stderr = []             # <<<<<<<<<<<<<<
+ *     finally:
+ *         os.remove( stderr_f )
  */
-  __pyx_t_3 = (__pyx_v_5pysam_9csamtools__FILENAME_ENCODING == ((PyObject*)Py_None));
-  if (__pyx_t_3) {
+        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_XDECREF_SET(__pyx_v_out_stderr, __pyx_t_2);
+        __pyx_t_2 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      goto __pyx_L85_try_end;
+      __pyx_L78_error:;
+      __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
+      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "pysam/csamtools.pyx":36
- *     _FILENAME_ENCODING = sys.getdefaultencoding()
- * if _FILENAME_ENCODING is None:
- *     _FILENAME_ENCODING = 'ascii'             # <<<<<<<<<<<<<<
- * 
- * #cdef char* _C_FILENAME_ENCODING
+      /* "pysam/csamtools.pyx":161
+ *         with open( stderr_f, "r") as inf:
+ *             out_stderr = inf.readlines()
+ *     except UnicodeDecodeError:             # <<<<<<<<<<<<<<
+ *         with open( stderr_f, "rb") as inf:
+ *             # read binary output
  */
-    __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
-    __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-    __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_9csamtools__FILENAME_ENCODING));
-    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
-    __pyx_v_5pysam_9csamtools__FILENAME_ENCODING = __pyx_n_s__ascii;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
+      if (__pyx_t_8) {
+        __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_3);
 
-  /* "pysam/csamtools.pyx":137
- * DEF BAM_CDIFF      = 8
- * 
- * cdef char* CODE2CIGAR= "MIDNSHP=X"             # <<<<<<<<<<<<<<
- * if IS_PYTHON3:
- *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
+        /* "pysam/csamtools.pyx":162
+ *             out_stderr = inf.readlines()
+ *     except UnicodeDecodeError:
+ *         with open( stderr_f, "rb") as inf:             # <<<<<<<<<<<<<<
+ *             # read binary output
+ *             out_stderr = inf.read()
  */
-  __pyx_v_5pysam_9csamtools_CODE2CIGAR = __pyx_k_263;
+        /*with:*/ {
+          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_v_stderr_f);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stderr_f);
+          __Pyx_GIVEREF(__pyx_v_stderr_f);
+          __Pyx_INCREF(__pyx_n_s_rb);
+          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_rb);
+          __Pyx_GIVEREF(__pyx_n_s_rb);
+          __pyx_t_21 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+          __Pyx_GOTREF(__pyx_t_21);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_21, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+          __Pyx_GOTREF(__pyx_t_15);
+          __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_21, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L107_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L107_error;}
+          __Pyx_GOTREF(__pyx_t_20);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+          /*try:*/ {
+            {
+              __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
+              __Pyx_XGOTREF(__pyx_t_18);
+              __Pyx_XGOTREF(__pyx_t_17);
+              __Pyx_XGOTREF(__pyx_t_16);
+              /*try:*/ {
+                __Pyx_INCREF(__pyx_t_20);
+                __Pyx_XDECREF_SET(__pyx_v_inf, __pyx_t_20);
+                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
 
-  /* "pysam/csamtools.pyx":138
- * 
- * cdef char* CODE2CIGAR= "MIDNSHP=X"
- * if IS_PYTHON3:             # <<<<<<<<<<<<<<
- *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
- * else:
+                /* "pysam/csamtools.pyx":164
+ *         with open( stderr_f, "rb") as inf:
+ *             # read binary output
+ *             out_stderr = inf.read()             # <<<<<<<<<<<<<<
+ *     else:
+ *         out_stderr = []
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__IS_PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __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 = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_3) {
-
-    /* "pysam/csamtools.pyx":139
- * cdef char* CODE2CIGAR= "MIDNSHP=X"
- * if IS_PYTHON3:
- *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
- * else:
- *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+                __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_inf, __pyx_n_s_read); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
+                __Pyx_GOTREF(__pyx_t_20);
+                __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
+                __Pyx_GOTREF(__pyx_t_21);
+                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+                __Pyx_XDECREF_SET(__pyx_v_out_stderr, __pyx_t_21);
+                __pyx_t_21 = 0;
+              }
+              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+              goto __pyx_L120_try_end;
+              __pyx_L113_error:;
+              __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
+              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+
+              /* "pysam/csamtools.pyx":162
+ *             out_stderr = inf.readlines()
+ *     except UnicodeDecodeError:
+ *         with open( stderr_f, "rb") as inf:             # <<<<<<<<<<<<<<
+ *             # read binary output
+ *             out_stderr = inf.read()
  */
-    __pyx_t_1 = __pyx_pf_5pysam_9csamtools_2genexpr(NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __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 = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__CIGAR2CODE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    goto __pyx_L4;
+              /*except:*/ {
+                __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+                if (__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+                __Pyx_GOTREF(__pyx_t_21);
+                __Pyx_GOTREF(__pyx_t_20);
+                __Pyx_GOTREF(__pyx_t_6);
+                __pyx_t_22 = PyTuple_Pack(3, __pyx_t_21, __pyx_t_20, __pyx_t_6); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+                __Pyx_GOTREF(__pyx_t_22);
+                __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_22, NULL);
+                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+                if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+                __Pyx_GOTREF(__pyx_t_19);
+                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_19);
+                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+                if (__pyx_t_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+                __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0);
+                if (__pyx_t_1) {
+                  __Pyx_GIVEREF(__pyx_t_21);
+                  __Pyx_GIVEREF(__pyx_t_20);
+                  __Pyx_XGIVEREF(__pyx_t_6);
+                  __Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_6);
+                  __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_6 = 0; 
+                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+                }
+                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+                goto __pyx_L114_exception_handled;
+              }
+              __pyx_L115_except_error:;
+              __Pyx_XGIVEREF(__pyx_t_18);
+              __Pyx_XGIVEREF(__pyx_t_17);
+              __Pyx_XGIVEREF(__pyx_t_16);
+              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+              goto __pyx_L80_except_error;
+              __pyx_L114_exception_handled:;
+              __Pyx_XGIVEREF(__pyx_t_18);
+              __Pyx_XGIVEREF(__pyx_t_17);
+              __Pyx_XGIVEREF(__pyx_t_16);
+              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+              __pyx_L120_try_end:;
+            }
+          }
+          /*finally:*/ {
+            /*normal exit:*/{
+              if (__pyx_t_15) {
+                __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__6, NULL);
+                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+                if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+                __Pyx_GOTREF(__pyx_t_16);
+                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+              }
+              goto __pyx_L112;
+            }
+            __pyx_L112:;
+          }
+          goto __pyx_L125;
+          __pyx_L107_error:;
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+          goto __pyx_L80_except_error;
+          __pyx_L125:;
+        }
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        goto __pyx_L79_exception_handled;
+      }
+      goto __pyx_L80_except_error;
+      __pyx_L80_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_9);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
+      goto __pyx_L76_error;
+      __pyx_L79_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_9);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
+      __pyx_L85_try_end:;
+    }
   }
-  /*else*/ {
 
-    /* "pysam/csamtools.pyx":141
- *     CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
- * else:
- *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )             # <<<<<<<<<<<<<<
- * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
+  /* "pysam/csamtools.pyx":168
+ *         out_stderr = []
+ *     finally:
+ *         os.remove( stderr_f )             # <<<<<<<<<<<<<<
  * 
+ *     return retval, out_stderr, out_stdout
  */
-    __pyx_t_1 = __pyx_pf_5pysam_9csamtools_5genexpr(NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __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 = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__CIGAR2CODE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  /*finally:*/ {
+    /*normal exit:*/{
+      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); 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_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __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 = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_stderr_f);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stderr_f);
+      __Pyx_GIVEREF(__pyx_v_stderr_f);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      goto __pyx_L77;
+    }
+    /*exception exit:*/{
+      __pyx_L76_error:;
+      __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
+      __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
+      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
+      __Pyx_XGOTREF(__pyx_t_11);
+      __Pyx_XGOTREF(__pyx_t_10);
+      __Pyx_XGOTREF(__pyx_t_9);
+      __Pyx_XGOTREF(__pyx_t_15);
+      __Pyx_XGOTREF(__pyx_t_16);
+      __Pyx_XGOTREF(__pyx_t_17);
+      __pyx_t_8 = __pyx_lineno; __pyx_t_23 = __pyx_clineno; __pyx_t_24 = __pyx_filename;
+      {
+        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L127_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L127_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 = 168; __pyx_clineno = __LINE__; goto __pyx_L127_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_INCREF(__pyx_v_stderr_f);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stderr_f);
+        __Pyx_GIVEREF(__pyx_v_stderr_f);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L127_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(__pyx_t_4); __pyx_t_4 = 0;
+      }
+      if (PY_MAJOR_VERSION >= 3) {
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_XGIVEREF(__pyx_t_16);
+        __Pyx_XGIVEREF(__pyx_t_17);
+        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+      }
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_9);
+      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
+      __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
+      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_23; __pyx_filename = __pyx_t_24;
+      goto __pyx_L1_error;
+      __pyx_L127_error:;
+      if (PY_MAJOR_VERSION >= 3) {
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_XGIVEREF(__pyx_t_16);
+        __Pyx_XGIVEREF(__pyx_t_17);
+        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+      }
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
+      goto __pyx_L1_error;
+    }
+    __pyx_L77:;
   }
-  __pyx_L4:;
 
-  /* "pysam/csamtools.pyx":142
- * else:
- *     CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
- * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )             # <<<<<<<<<<<<<<
+  /* "pysam/csamtools.pyx":170
+ *         os.remove( stderr_f )
  * 
- * #####################################################################
- */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_265), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __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__CIGAR_REGEX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":146
- * #####################################################################
- * ## set pysam stderr to /dev/null
- * pysam_unset_stderr()             # <<<<<<<<<<<<<<
+ *     return retval, out_stderr, out_stdout             # <<<<<<<<<<<<<<
  * 
- * #####################################################################
  */
-  pysam_unset_stderr();
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_retval); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (unlikely(!__pyx_v_out_stderr)) { __Pyx_RaiseUnboundLocalError("out_stderr"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  if (unlikely(!__pyx_v_out_stdout)) { __Pyx_RaiseUnboundLocalError("out_stdout"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_v_out_stderr);
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_out_stderr);
+  __Pyx_GIVEREF(__pyx_v_out_stderr);
+  __Pyx_INCREF(__pyx_v_out_stdout);
+  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_out_stdout);
+  __Pyx_GIVEREF(__pyx_v_out_stdout);
+  __pyx_t_4 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
 
-  /* "pysam/csamtools.pyx":150
- * #####################################################################
- * # hard-coded constants
- * cdef char * bam_nt16_rev_table = "=ACMGRSVTWYHKDBN"             # <<<<<<<<<<<<<<
- * cdef int max_pos = 2 << 29
+  /* "pysam/csamtools.pyx":73
  * 
- */
-  __pyx_v_5pysam_9csamtools_bam_nt16_rev_table = __pyx_k_266;
-
-  /* "pysam/csamtools.pyx":151
- * # hard-coded constants
- * cdef char * bam_nt16_rev_table = "=ACMGRSVTWYHKDBN"
- * cdef int max_pos = 2 << 29             # <<<<<<<<<<<<<<
  * 
- * #####################################################################
+ * def _samtools_dispatch(method,             # <<<<<<<<<<<<<<
+ *                        args = (),
+ *                        catch_stdout = True):
  */
-  __pyx_v_5pysam_9csamtools_max_pos = 1073741824;
 
-  /* "pysam/csamtools.pyx":253
- *     (<object>f)(a)
- * 
- * class PileupColumn(object):             # <<<<<<<<<<<<<<
- *     '''A pileup column. A pileup column contains
- *     all the reads that map to a certain target base.
- */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-
-  /* "pysam/csamtools.pyx":266
- *         list of reads (:class:`pysam.PileupRead`) aligned to this column
- *     '''
- *     def __str__(self):             # <<<<<<<<<<<<<<
- *         return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
- *             "\n" + "\n".join( map(str, self.pileups) )
- */
-  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_12PileupColumn_1__str__, 0, __pyx_n_s_270, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_268)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____str__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_20);
+  __Pyx_XDECREF(__pyx_t_21);
+  __Pyx_XDECREF(__pyx_t_22);
+  __Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_stderr_h);
+  __Pyx_XDECREF(__pyx_v_stderr_f);
+  __Pyx_XDECREF(__pyx_v_stdout_h);
+  __Pyx_XDECREF(__pyx_v_stdout_f);
+  __Pyx_XDECREF(__pyx_v_stdout_save);
+  __Pyx_XDECREF(__pyx_v_inf);
+  __Pyx_XDECREF(__pyx_v_out_stdout);
+  __Pyx_XDECREF(__pyx_v_out_stderr);
+  __Pyx_XDECREF(__pyx_v_a);
+  __Pyx_XDECREF(__pyx_v_method);
+  __Pyx_XDECREF(__pyx_v_args);
+  __Pyx_XDECREF(__pyx_v_catch_stdout);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "pysam/csamtools.pyx":253
- *     (<object>f)(a)
- * 
- * class PileupColumn(object):             # <<<<<<<<<<<<<<
- *     '''A pileup column. A pileup column contains
- *     all the reads that map to a certain target base.
- */
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_builtin_object);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
-  __Pyx_GIVEREF(__pyx_builtin_object);
-  if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_272)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__PileupColumn, __pyx_n_s__PileupColumn, __pyx_n_s_271); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PileupColumn, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+static PyMethodDef __pyx_methods[] = {
+  {0, 0, 0, 0}
+};
 
-  /* "pysam/csamtools.pyx":310
- *     return 0
- * 
- * class StderrStore():             # <<<<<<<<<<<<<<
- *     '''
- *     stderr is captured.
- */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-
-  /* "pysam/csamtools.pyx":314
- *     stderr is captured.
- *     '''
- *     def __init__(self):             # <<<<<<<<<<<<<<
- *         return
- *         self.stderr_h, self.stderr_f = tempfile.mkstemp()
- */
-  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_1__init__, 0, __pyx_n_s_275, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_274)); 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);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __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;
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef __pyx_moduledef = {
+  #if PY_VERSION_HEX < 0x03020000
+    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
+  #else
+    PyModuleDef_HEAD_INIT,
+  #endif
+    __Pyx_NAMESTR("csamtools"),
+    0, /* m_doc */
+    -1, /* m_size */
+    __pyx_methods /* m_methods */,
+    NULL, /* m_reload */
+    NULL, /* m_traverse */
+    NULL, /* m_clear */
+    NULL /* m_free */
+};
+#endif
 
-  /* "pysam/csamtools.pyx":320
- *         self.stderr_save.setfd( self.stderr_h )
- * 
- *     def readAndRelease( self ):             # <<<<<<<<<<<<<<
- *         return []
- *         self.stderr_save.restore()
- */
-  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_3readAndRelease, 0, __pyx_n_s_278, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_277)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__readAndRelease, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_kp_u_Argument_must_be_string_bytes_or, __pyx_k_Argument_must_be_string_bytes_or, sizeof(__pyx_k_Argument_must_be_string_bytes_or), 0, 1, 0, 0},
+  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
+  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
+  {&__pyx_n_s_IS_PYTHON3, __pyx_k_IS_PYTHON3, sizeof(__pyx_k_IS_PYTHON3), 0, 0, 1, 1},
+  {&__pyx_kp_s_No_such_file_or_directory_s, __pyx_k_No_such_file_or_directory_s, sizeof(__pyx_k_No_such_file_or_directory_s), 0, 0, 1, 0},
+  {&__pyx_n_s_O_CREAT, __pyx_k_O_CREAT, sizeof(__pyx_k_O_CREAT), 0, 0, 1, 1},
+  {&__pyx_n_s_O_WRONLY, __pyx_k_O_WRONLY, sizeof(__pyx_k_O_WRONLY), 0, 0, 1, 1},
+  {&__pyx_n_s_Outs, __pyx_k_Outs, sizeof(__pyx_k_Outs), 0, 0, 1, 1},
+  {&__pyx_n_s_Outs___init, __pyx_k_Outs___init, sizeof(__pyx_k_Outs___init), 0, 0, 1, 1},
+  {&__pyx_n_s_Outs_restore, __pyx_k_Outs_restore, sizeof(__pyx_k_Outs_restore), 0, 0, 1, 1},
+  {&__pyx_n_s_Outs_setdevice, __pyx_k_Outs_setdevice, sizeof(__pyx_k_Outs_setdevice), 0, 0, 1, 1},
+  {&__pyx_n_s_Outs_setfd, __pyx_k_Outs_setfd, sizeof(__pyx_k_Outs_setfd), 0, 0, 1, 1},
+  {&__pyx_n_s_Outs_setfile, __pyx_k_Outs_setfile, sizeof(__pyx_k_Outs_setfile), 0, 0, 1, 1},
+  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
+  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
+  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
+  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+  {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
+  {&__pyx_n_s_cargs, __pyx_k_cargs, sizeof(__pyx_k_cargs), 0, 0, 1, 1},
+  {&__pyx_n_s_catch_stdout, __pyx_k_catch_stdout, sizeof(__pyx_k_catch_stdout), 0, 0, 1, 1},
+  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+  {&__pyx_n_s_dup, __pyx_k_dup, sizeof(__pyx_k_dup), 0, 0, 1, 1},
+  {&__pyx_n_s_dup2, __pyx_k_dup2, sizeof(__pyx_k_dup2), 0, 0, 1, 1},
+  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
+  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
+  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
+  {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
+  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
+  {&__pyx_n_s_fileno, __pyx_k_fileno, sizeof(__pyx_k_fileno), 0, 0, 1, 1},
+  {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1},
+  {&__pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_k_home_andreas_devel_pysam_pysam, sizeof(__pyx_k_home_andreas_devel_pysam_pysam), 0, 0, 1, 0},
+  {&__pyx_kp_s_http_mail_python_org_pipermail_p, __pyx_k_http_mail_python_org_pipermail_p, sizeof(__pyx_k_http_mail_python_org_pipermail_p), 0, 0, 1, 0},
+  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
+  {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1},
+  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+  {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1},
+  {&__pyx_n_s_mkstemp, __pyx_k_mkstemp, sizeof(__pyx_k_mkstemp), 0, 0, 1, 1},
+  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
+  {&__pyx_kp_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 0},
+  {&__pyx_n_s_ofd, __pyx_k_ofd, sizeof(__pyx_k_ofd), 0, 0, 1, 1},
+  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
+  {&__pyx_kp_s_option_o_is_forbidden_in_samtool, __pyx_k_option_o_is_forbidden_in_samtool, sizeof(__pyx_k_option_o_is_forbidden_in_samtool), 0, 0, 1, 0},
+  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
+  {&__pyx_n_s_out_stderr, __pyx_k_out_stderr, sizeof(__pyx_k_out_stderr), 0, 0, 1, 1},
+  {&__pyx_n_s_out_stdout, __pyx_k_out_stdout, sizeof(__pyx_k_out_stdout), 0, 0, 1, 1},
+  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
+  {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
+  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+  {&__pyx_n_s_pysam_csamtools, __pyx_k_pysam_csamtools, sizeof(__pyx_k_pysam_csamtools), 0, 0, 1, 1},
+  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
+  {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1},
+  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
+  {&__pyx_n_s_readlines, __pyx_k_readlines, sizeof(__pyx_k_readlines), 0, 0, 1, 1},
+  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
+  {&__pyx_n_s_restore, __pyx_k_restore, sizeof(__pyx_k_restore), 0, 0, 1, 1},
+  {&__pyx_n_s_retval, __pyx_k_retval, sizeof(__pyx_k_retval), 0, 0, 1, 1},
+  {&__pyx_n_s_samtools_dispatch, __pyx_k_samtools_dispatch, sizeof(__pyx_k_samtools_dispatch), 0, 0, 1, 1},
+  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+  {&__pyx_n_s_setdevice, __pyx_k_setdevice, sizeof(__pyx_k_setdevice), 0, 0, 1, 1},
+  {&__pyx_n_s_setfd, __pyx_k_setfd, sizeof(__pyx_k_setfd), 0, 0, 1, 1},
+  {&__pyx_n_s_setfile, __pyx_k_setfile, sizeof(__pyx_k_setfile), 0, 0, 1, 1},
+  {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
+  {&__pyx_n_s_stderr_f, __pyx_k_stderr_f, sizeof(__pyx_k_stderr_f), 0, 0, 1, 1},
+  {&__pyx_n_s_stderr_h, __pyx_k_stderr_h, sizeof(__pyx_k_stderr_h), 0, 0, 1, 1},
+  {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
+  {&__pyx_n_s_stdout_f, __pyx_k_stdout_f, sizeof(__pyx_k_stdout_f), 0, 0, 1, 1},
+  {&__pyx_n_s_stdout_h, __pyx_k_stdout_h, sizeof(__pyx_k_stdout_h), 0, 0, 1, 1},
+  {&__pyx_n_s_stdout_save, __pyx_k_stdout_save, sizeof(__pyx_k_stdout_save), 0, 0, 1, 1},
+  {&__pyx_n_s_streams, __pyx_k_streams, sizeof(__pyx_k_streams), 0, 0, 1, 1},
+  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+  {&__pyx_n_s_tempfile, __pyx_k_tempfile, sizeof(__pyx_k_tempfile), 0, 0, 1, 1},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
 
-  /* "pysam/csamtools.pyx":329
- *         return lines
- * 
- *     def release(self):             # <<<<<<<<<<<<<<
- *         return
- *         self.stderr_save.restore()
- */
-  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_5release, 0, __pyx_n_s_281, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_280)); 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 (PyObject_SetItem(__pyx_t_1, __pyx_n_s__release, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
 
-  /* "pysam/csamtools.pyx":335
- *             os.remove( self.stderr_f )
- * 
- *     def __del__(self):             # <<<<<<<<<<<<<<
- *         self.release()
- * 
+  /* "pysam/csamtools.pyx":28
+ *         return s
+ *     elif PyUnicode_Check(s):
+ *         return s.encode('ascii')             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
  */
-  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_7__del__, 0, __pyx_n_s_284, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_283)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____del__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple_);
+  __Pyx_GIVEREF(__pyx_tuple_);
 
-  /* "pysam/csamtools.pyx":310
- *     return 0
+  /* "pysam/csamtools.pyx":121
+ *         if method == "view":
+ *             if "-o" in args:
+ *                 raise ValueError("option -o is forbidden in samtools view")             # <<<<<<<<<<<<<<
+ *             args = ( "-o", stdout_f ) + args
  * 
- * class StderrStore():             # <<<<<<<<<<<<<<
- *     '''
- *     stderr is captured.
  */
-  if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_285)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__StderrStore, __pyx_n_s__StderrStore, __pyx_n_s_271); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStore, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_option_o_is_forbidden_in_samtool); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__2);
+  __Pyx_GIVEREF(__pyx_tuple__2);
 
-  /* "pysam/csamtools.pyx":338
- *         self.release()
- * 
- * class StderrStoreWindows():             # <<<<<<<<<<<<<<
- *     '''does nothing. stderr can't be redirected on windows'''
- *     def __init__(self): pass
- */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-
-  /* "pysam/csamtools.pyx":340
- * class StderrStoreWindows():
- *     '''does nothing. stderr can't be redirected on windows'''
- *     def __init__(self): pass             # <<<<<<<<<<<<<<
- *     def readAndRelease(self): return []
- *     def release(self): pass
+  /* "pysam/csamtools.pyx":146
+ *         stdout_save.restore()
+ *         try:
+ *             with open( stdout_f, "r") as inf:             # <<<<<<<<<<<<<<
+ *                 out_stdout = inf.readlines()
+ *         except UnicodeDecodeError:
  */
-  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_1__init__, 0, __pyx_n_s_288, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_287)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_tuple__3 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__3);
+  __Pyx_GIVEREF(__pyx_tuple__3);
 
-  /* "pysam/csamtools.pyx":341
- *     '''does nothing. stderr can't be redirected on windows'''
- *     def __init__(self): pass
- *     def readAndRelease(self): return []             # <<<<<<<<<<<<<<
- *     def release(self): pass
- * 
+  /* "pysam/csamtools.pyx":149
+ *                 out_stdout = inf.readlines()
+ *         except UnicodeDecodeError:
+ *             with open( stdout_f, "rb") as inf:             # <<<<<<<<<<<<<<
+ *                 # read binary output
+ *                 out_stdout = inf.read()
  */
-  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_3readAndRelease, 0, __pyx_n_s_291, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_290)); 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);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__readAndRelease, __pyx_t_4) < 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_tuple__4 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__4);
+  __Pyx_GIVEREF(__pyx_tuple__4);
 
-  /* "pysam/csamtools.pyx":342
- *     def __init__(self): pass
- *     def readAndRelease(self): return []
- *     def release(self): pass             # <<<<<<<<<<<<<<
- * 
- * if platform.system()=='Windows':
+  /* "pysam/csamtools.pyx":159
+ *     pysam_unset_stderr()
+ *     try:
+ *         with open( stderr_f, "r") as inf:             # <<<<<<<<<<<<<<
+ *             out_stderr = inf.readlines()
+ *     except UnicodeDecodeError:
  */
-  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_5release, 0, __pyx_n_s_294, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_293)); 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);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__release, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_tuple__5 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__5);
+  __Pyx_GIVEREF(__pyx_tuple__5);
 
-  /* "pysam/csamtools.pyx":338
- *         self.release()
- * 
- * class StderrStoreWindows():             # <<<<<<<<<<<<<<
- *     '''does nothing. stderr can't be redirected on windows'''
- *     def __init__(self): pass
+  /* "pysam/csamtools.pyx":162
+ *             out_stderr = inf.readlines()
+ *     except UnicodeDecodeError:
+ *         with open( stderr_f, "rb") as inf:             # <<<<<<<<<<<<<<
+ *             # read binary output
+ *             out_stderr = inf.read()
  */
-  if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_295)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__StderrStoreWindows, __pyx_n_s__StderrStoreWindows, __pyx_n_s_271); 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);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStoreWindows, __pyx_t_4) < 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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_tuple__6 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__6);
+  __Pyx_GIVEREF(__pyx_tuple__6);
 
-  /* "pysam/csamtools.pyx":344
- *     def release(self): pass
- * 
- * if platform.system()=='Windows':             # <<<<<<<<<<<<<<
- *     del StderrStore
- *     StderrStore = StderrStoreWindows
+  /* "pysam/csamtools.pyx":39
+ * class Outs:
+ *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
+ *     def __init__(self, id = 1):             # <<<<<<<<<<<<<<
+ *         self.streams = []
+ *         self.id = id
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__system); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __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 = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Windows), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __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 = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (__pyx_t_3) {
+  __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_id); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__7);
+  __Pyx_GIVEREF(__pyx_tuple__7);
+  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_init, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__9 = PyTuple_Pack(1, ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__9);
+  __Pyx_GIVEREF(__pyx_tuple__9);
 
-    /* "pysam/csamtools.pyx":345
- * 
- * if platform.system()=='Windows':
- *     del StderrStore             # <<<<<<<<<<<<<<
- *     StderrStore = StderrStoreWindows
+  /* "pysam/csamtools.pyx":43
+ *         self.id = id
  * 
+ *     def setdevice(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open an existing file, like "/dev/null"'''
+ *         fd = os.open(filename, os.O_WRONLY)
  */
-    if (__Pyx_DelAttrString(__pyx_m, "StderrStore") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__10 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_fd); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__10);
+  __Pyx_GIVEREF(__pyx_tuple__10);
+  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setdevice, 43, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "pysam/csamtools.pyx":346
- * if platform.system()=='Windows':
- *     del StderrStore
- *     StderrStore = StderrStoreWindows             # <<<<<<<<<<<<<<
- * 
+  /* "pysam/csamtools.pyx":48
+ *         self.setfd(fd)
  * 
+ *     def setfile(self, filename):             # <<<<<<<<<<<<<<
+ *         '''open a new file.'''
+ *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660)
  */
-    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStoreWindows); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStore, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
-
-  /* "pysam/csamtools.pyx":353
- * ######################################################################
- * # valid types for sam headers
- * VALID_HEADER_TYPES = { "HD" : dict,             # <<<<<<<<<<<<<<
- *                        "SQ" : list,
- *                        "RG" : list,
- */
-  __pyx_t_4 = PyDict_New(); 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));
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)((PyObject*)(&PyDict_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":354
- * # valid types for sam headers
- * VALID_HEADER_TYPES = { "HD" : dict,
- *                        "SQ" : list,             # <<<<<<<<<<<<<<
- *                        "RG" : list,
- *                        "PG" : list,
- */
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":355
- * VALID_HEADER_TYPES = { "HD" : dict,
- *                        "SQ" : list,
- *                        "RG" : list,             # <<<<<<<<<<<<<<
- *                        "PG" : list,
- *                        "CO" : list }
- */
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__12 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_fd); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__12);
+  __Pyx_GIVEREF(__pyx_tuple__12);
+  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setfile, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/csamtools.pyx":356
- *                        "SQ" : list,
- *                        "RG" : list,
- *                        "PG" : list,             # <<<<<<<<<<<<<<
- *                        "CO" : list }
+  /* "pysam/csamtools.pyx":53
+ *         self.setfd(fd)
  * 
+ *     def setfd(self, fd):             # <<<<<<<<<<<<<<
+ *         ofd = os.dup(self.id)      #  Save old stream on new unit.
+ *         self.streams.append(ofd)
  */
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__14 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_fd, __pyx_n_s_ofd); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__14);
+  __Pyx_GIVEREF(__pyx_tuple__14);
+  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setfd, 53, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/csamtools.pyx":357
- *                        "RG" : list,
- *                        "PG" : list,
- *                        "CO" : list }             # <<<<<<<<<<<<<<
+  /* "pysam/csamtools.pyx":61
+ *         os.close(fd)                #  Close other unit (look out, caller.)
  * 
- * # order of records within sam headers
+ *     def restore(self):             # <<<<<<<<<<<<<<
+ *         '''restore previous output stream'''
+ *         if self.streams:
  */
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__CO), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__16);
+  __Pyx_GIVEREF(__pyx_tuple__16);
+  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_restore, 61, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/csamtools.pyx":360
+  /* "pysam/csamtools.pyx":73
  * 
- * # order of records within sam headers
- * VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO" )             # <<<<<<<<<<<<<<
  * 
- * # type conversions within sam header records
+ * def _samtools_dispatch(method,             # <<<<<<<<<<<<<<
+ *                        args = (),
+ *                        catch_stdout = True):
  */
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADERS, ((PyObject *)__pyx_k_tuple_296)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__18 = PyTuple_Pack(16, __pyx_n_s_method, __pyx_n_s_args, __pyx_n_s_catch_stdout, __pyx_n_s_stderr_h, __pyx_n_s_stderr_f, __pyx_n_s_stdout_h, __pyx_n_s_stdout_f, __pyx_n_s_stdout_save, __pyx_n_s_cargs, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_retval, __pyx_n_s_inf, __pyx_n_s_out_stdout, __pyx_n_s_out_stderr, __pyx_n_s_a); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__18);
+  __Pyx_GIVEREF(__pyx_tuple__18);
+  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_samtools_dispatch, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_RefNannyFinishContext();
+  return 0;
+  __pyx_L1_error:;
+  __Pyx_RefNannyFinishContext();
+  return -1;
+}
 
-  /* "pysam/csamtools.pyx":363
- * 
- * # type conversions within sam header records
- * VALID_HEADER_FIELDS = { "HD" : { "VN" : str, "SO" : str, "GO" : str },             # <<<<<<<<<<<<<<
- *                         "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str },
- *                         "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,
- */
-  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__GO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":364
- * # type conversions within sam header records
- * VALID_HEADER_FIELDS = { "HD" : { "VN" : str, "SO" : str, "GO" : str },
- *                         "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str },             # <<<<<<<<<<<<<<
- *                         "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,
- *                                  "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,},
- */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__LN), ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__AS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__M5), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__UR), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SP), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":365
- * VALID_HEADER_FIELDS = { "HD" : { "VN" : str, "SO" : str, "GO" : str },
- *                         "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str },
- *                         "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,             # <<<<<<<<<<<<<<
- *                                  "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,},
- *                         "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str, "PP" : str }, }
- */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SM), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__LB), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__DS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PU), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PI), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":366
- *                         "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str },
- *                         "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,
- *                                  "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,},             # <<<<<<<<<<<<<<
- *                         "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str, "PP" : str }, }
- * 
- */
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__CN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__DT), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PL), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__KS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PG), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-  /* "pysam/csamtools.pyx":367
- *                         "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,
- *                                  "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,},
- *                         "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str, "PP" : str }, }             # <<<<<<<<<<<<<<
- * 
- * # output order of fields within records
- */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__CL), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PP), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __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__VALID_HEADER_FIELDS, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-
-  /* "pysam/csamtools.pyx":370
- * 
- * # output order of fields within records
- * VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),             # <<<<<<<<<<<<<<
- *                        "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
- *                        "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
- */
-  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_k_tuple_297)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "pysam/csamtools.pyx":371
- * # output order of fields within records
- * VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
- *                        "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),             # <<<<<<<<<<<<<<
- *                        "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
- *                        "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
- */
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_k_tuple_298)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+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_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_432 = PyInt_FromLong(432); if (unlikely(!__pyx_int_432)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
 
-  /* "pysam/csamtools.pyx":372
- * VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
- *                        "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
- *                        "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),             # <<<<<<<<<<<<<<
- *                        "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
- * 
- */
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_k_tuple_299)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initcsamtools(void); /*proto*/
+PyMODINIT_FUNC initcsamtools(void)
+#else
+PyMODINIT_FUNC PyInit_csamtools(void); /*proto*/
+PyMODINIT_FUNC PyInit_csamtools(void)
+#endif
+{
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  #if CYTHON_REFNANNY
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
+      PyErr_Clear();
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
+  }
+  #endif
+  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_csamtools(void)", 0);
+  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #ifdef __Pyx_CyFunction_USED
+  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_FusedFunction_USED
+  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_Generator_USED
+  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  /*--- Library function declarations ---*/
+  /*--- Threads initialization code ---*/
+  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+  #ifdef WITH_THREAD /* Python build with threading support? */
+  PyEval_InitThreads();
+  #endif
+  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("csamtools"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
+  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if CYTHON_COMPILING_IN_PYPY
+  Py_INCREF(__pyx_b);
+  #endif
+  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  if (__pyx_module_is_main_pysam__csamtools) {
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "pysam.csamtools")) {
+      if (unlikely(PyDict_SetItemString(modules, "pysam.csamtools", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+  /*--- Builtin init code ---*/
+  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Constants init code ---*/
+  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Global init code ---*/
+  /*--- Variable export code ---*/
+  /*--- Function export code ---*/
+  /*--- Type init code ---*/
+  /*--- Type import code ---*/
+  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
+  #if CYTHON_COMPILING_IN_PYPY
+  sizeof(PyTypeObject),
+  #else
+  sizeof(PyHeapTypeObject),
+  #endif
+  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[2]; __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[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Variable import code ---*/
+  /*--- Function import code ---*/
+  /*--- Execution code ---*/
 
-  /* "pysam/csamtools.pyx":373
- *                        "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
- *                        "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
- *                        "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }             # <<<<<<<<<<<<<<
- * 
- * 
- */
-  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_k_tuple_300)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_ORDER, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-
-  /* "pysam/csamtools.pyx":758
- *                header = None,
- *                port = None,
- *                add_sq_text = True,             # <<<<<<<<<<<<<<
- *                check_header = True,
- *                check_sq = True,
+  /* "pysam/csamtools.pyx":4
+ * # cython: profile=True
+ * # adds doc-strings for sphinx
+ * import tempfile             # <<<<<<<<<<<<<<
+ * import os
+ * import sys
  */
-  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_k_27 = __pyx_t_4;
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_tempfile, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tempfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":759
- *                port = None,
- *                add_sq_text = True,
- *                check_header = True,             # <<<<<<<<<<<<<<
- *                check_sq = True,
- *               ):
+  /* "pysam/csamtools.pyx":5
+ * # adds doc-strings for sphinx
+ * import tempfile
+ * import os             # <<<<<<<<<<<<<<
+ * import sys
+ * import platform
  */
-  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_k_28 = __pyx_t_4;
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":760
- *                add_sq_text = True,
- *                check_header = True,
- *                check_sq = True,             # <<<<<<<<<<<<<<
- *               ):
- *         '''open a sam/bam file.
+  /* "pysam/csamtools.pyx":6
+ * import tempfile
+ * import os
+ * import sys             # <<<<<<<<<<<<<<
+ * import platform
+ * from cpython cimport PyBytes_Check, PyUnicode_Check
  */
-  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_k_29 = __pyx_t_4;
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":1032
- *                region = None,
- *                callback = None,
- *                until_eof = False ):             # <<<<<<<<<<<<<<
- *         '''
- *         fetch aligned reads in a :term:`region` using 0-based indexing. The region is specified by
+  /* "pysam/csamtools.pyx":7
+ * import os
+ * import sys
+ * import platform             # <<<<<<<<<<<<<<
+ * from cpython cimport PyBytes_Check, PyUnicode_Check
+ * from cpython.version cimport PY_MAJOR_VERSION
  */
-  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_k_62 = __pyx_t_4;
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_platform, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_platform, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":1153
- *                end = None,
- *                region = None,
- *                until_eof = False ):             # <<<<<<<<<<<<<<
- *         '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)*
+  /* "pysam/csamtools.pyx":16
+ * ## Python 3 compatibility functions
+ * ########################################################################
+ * IS_PYTHON3 = PY_MAJOR_VERSION >= 3             # <<<<<<<<<<<<<<
  * 
+ * cdef bytes _forceBytes(object s):
  */
-  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_k_81 = __pyx_t_4;
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_4 = 0;
-
-  /* "pysam/csamtools.pyx":2092
- *                   int tid = 0,
- *                   int start = 0,
- *                   int end = max_pos,             # <<<<<<<<<<<<<<
- *                   int truncate = False,
- *                   **kwargs ):
- */
-  __pyx_k_139 = __pyx_v_5pysam_9csamtools_max_pos;
+  __pyx_t_1 = __Pyx_PyBool_FromLong((PY_MAJOR_VERSION >= 3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IS_PYTHON3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/csamtools.pyx":3341
- *             return self._level
+  /* "pysam/csamtools.pyx":37
+ * 
  * 
  * class Outs:             # <<<<<<<<<<<<<<
  *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
  *     def __init__(self, id = 1):
  */
-  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Outs, __pyx_n_s_Outs, (PyObject *) NULL, __pyx_n_s_pysam_csamtools, __pyx_kp_s_http_mail_python_org_pipermail_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
 
-  /* "pysam/csamtools.pyx":3343
+  /* "pysam/csamtools.pyx":39
  * class Outs:
  *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
  *     def __init__(self, id = 1):             # <<<<<<<<<<<<<<
  *         self.streams = []
  *         self.id = id
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_1__init__, 0, __pyx_n_s_304, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_302)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_303));
-  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_1__init__, 0, __pyx_n_s_Outs___init, NULL, __pyx_n_s_pysam_csamtools, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__9);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/csamtools.pyx":3347
+  /* "pysam/csamtools.pyx":43
  *         self.id = id
  * 
  *     def setdevice(self, filename):             # <<<<<<<<<<<<<<
  *         '''open an existing file, like "/dev/null"'''
  *         fd = os.open(filename, os.O_WRONLY)
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_3setdevice, 0, __pyx_n_s_307, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_306)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setdevice, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_3setdevice, 0, __pyx_n_s_Outs_setdevice, NULL, __pyx_n_s_pysam_csamtools, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_setdevice, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/csamtools.pyx":3352
+  /* "pysam/csamtools.pyx":48
  *         self.setfd(fd)
  * 
  *     def setfile(self, filename):             # <<<<<<<<<<<<<<
  *         '''open a new file.'''
- *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);
+ *         fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660)
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_5setfile, 0, __pyx_n_s_310, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_309)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_5setfile, 0, __pyx_n_s_Outs_setfile, NULL, __pyx_n_s_pysam_csamtools, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_setfile, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/csamtools.pyx":3357
+  /* "pysam/csamtools.pyx":53
  *         self.setfd(fd)
  * 
  *     def setfd(self, fd):             # <<<<<<<<<<<<<<
  *         ofd = os.dup(self.id)      #  Save old stream on new unit.
  *         self.streams.append(ofd)
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_7setfd, 0, __pyx_n_s_313, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_312)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setfd, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_7setfd, 0, __pyx_n_s_Outs_setfd, NULL, __pyx_n_s_pysam_csamtools, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_setfd, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/csamtools.pyx":3365
+  /* "pysam/csamtools.pyx":61
  *         os.close(fd)                #  Close other unit (look out, caller.)
  * 
  *     def restore(self):             # <<<<<<<<<<<<<<
  *         '''restore previous output stream'''
  *         if self.streams:
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_9restore, 0, __pyx_n_s_316, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_315)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__restore, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_9restore, 0, __pyx_n_s_Outs_restore, NULL, __pyx_n_s_pysam_csamtools, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_restore, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/csamtools.pyx":3341
- *             return self._level
+  /* "pysam/csamtools.pyx":37
+ * 
  * 
  * class Outs:             # <<<<<<<<<<<<<<
  *     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
  *     def __init__(self, id = 1):
  */
-  if (PyDict_SetItemString(((PyObject *)__pyx_t_4), "__doc__", ((PyObject *)__pyx_kp_s_317)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4), __pyx_n_s__Outs, __pyx_n_s__Outs, __pyx_n_s_271); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Outs, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Outs, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Outs, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __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_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-
-  /* "pysam/csamtools.pyx":3378
- * def _samtools_dispatch( method,
- *                         args = (),
- *                         catch_stdout = True ):             # <<<<<<<<<<<<<<
- *     '''call ``method`` in samtools providing arguments in args.
- * 
- */
-  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_k_187 = __pyx_t_4;
-  __Pyx_GIVEREF(__pyx_t_4);
-  __pyx_t_4 = 0;
 
-  /* "pysam/csamtools.pyx":3376
- *             del self.streams[-1]
+  /* "pysam/csamtools.pyx":73
  * 
- * def _samtools_dispatch( method,             # <<<<<<<<<<<<<<
- *                         args = (),
- *                         catch_stdout = True ):
- */
-  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_1_samtools_dispatch, NULL, __pyx_n_s_271); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___samtools_dispatch, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-  /* "pysam/csamtools.pyx":4088
- *         if self.owns_samfile: samclose( self.fp )
  * 
- * __all__ = ["Samfile",             # <<<<<<<<<<<<<<
- *            "Fastafile",
- *            "Fastqfile",
+ * def _samtools_dispatch(method,             # <<<<<<<<<<<<<<
+ *                        args = (),
+ *                        catch_stdout = True):
  */
-  __pyx_t_4 = PyList_New(10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Samfile));
-  PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__Samfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Samfile));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Fastafile));
-  PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__Fastafile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Fastafile));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Fastqfile));
-  PyList_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_n_s__Fastqfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Fastqfile));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorRow));
-  PyList_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_n_s__IteratorRow));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorRow));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorColumn));
-  PyList_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_n_s__IteratorColumn));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorColumn));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__AlignedRead));
-  PyList_SET_ITEM(__pyx_t_4, 5, ((PyObject *)__pyx_n_s__AlignedRead));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__AlignedRead));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupColumn));
-  PyList_SET_ITEM(__pyx_t_4, 6, ((PyObject *)__pyx_n_s__PileupColumn));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupColumn));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupProxy));
-  PyList_SET_ITEM(__pyx_t_4, 7, ((PyObject *)__pyx_n_s__PileupProxy));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupProxy));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupRead));
-  PyList_SET_ITEM(__pyx_t_4, 8, ((PyObject *)__pyx_n_s__PileupRead));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupRead));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__IndexedReads));
-  PyList_SET_ITEM(__pyx_t_4, 9, ((PyObject *)__pyx_n_s__IndexedReads));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IndexedReads));
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_1_samtools_dispatch, NULL, __pyx_n_s_pysam_csamtools); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_samtools_dispatch, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   /* "pysam/csamtools.pyx":1
  * # cython: embedsignature=True             # <<<<<<<<<<<<<<
  * # cython: profile=True
  * # adds doc-strings for sphinx
  */
-  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+  __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(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __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;
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_4);
   if (__pyx_m) {
     __Pyx_AddTraceback("init pysam.csamtools", __pyx_clineno, __pyx_lineno, __pyx_filename);
     Py_DECREF(__pyx_m); __pyx_m = 0;
@@ -45735,17 +4577,15 @@ end:
 }
 #endif /* CYTHON_REFNANNY */
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
-    PyObject *result;
-    result = PyObject_GetAttr(dict, name);
-    if (!result) {
-        if (dict != __pyx_b) {
-            PyErr_Clear();
-            result = PyObject_GetAttr(__pyx_b, name);
-        }
-        if (!result) {
-            PyErr_SetObject(PyExc_NameError, name);
-        }
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
     }
     return result;
 }
@@ -45756,23 +4596,42 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                    const char *funcname,
                                    const char *srcfile,
                                    int firstlineno) {
+    int retval;
+    PyThreadState* tstate = PyThreadState_GET();
     if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
         if (*code == NULL) {
             *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
             if (*code == NULL) return 0;
         }
         *frame = PyFrame_New(
-            PyThreadState_GET(),            /*PyThreadState *tstate*/
-            *code,                          /*PyCodeObject *code*/
-            PyModule_GetDict(__pyx_m),      /*PyObject *globals*/
-            0                               /*PyObject *locals*/
+            tstate,                          /*PyThreadState *tstate*/
+            *code,                           /*PyCodeObject *code*/
+            __pyx_d,                  /*PyObject *globals*/
+            0                                /*PyObject *locals*/
         );
         if (*frame == NULL) return 0;
+        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
+            Py_INCREF(Py_None);
+            (*frame)->f_trace = Py_None;
+        }
+#if PY_VERSION_HEX < 0x030400B1
+    } else {
+        (*frame)->f_tstate = tstate;
+#endif
     }
-    else {
-        (*frame)->f_tstate = PyThreadState_GET();
-    }
-    return PyThreadState_GET()->c_profilefunc(PyThreadState_GET()->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
+    (*frame)->f_lineno = firstlineno;
+    tstate->use_tracing = 0;
+    #if CYTHON_TRACE
+    if (tstate->c_tracefunc)
+        tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL);
+    if (!tstate->c_profilefunc)
+        retval = 1;
+    else
+    #endif
+        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
+    tstate->use_tracing = (tstate->c_profilefunc ||
+                           (CYTHON_TRACE && tstate->c_tracefunc));
+    return tstate->use_tracing && retval;
 }
 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
     PyObject *py_srcfile = 0;
@@ -45794,16 +4653,16 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha
         0,                /*int nlocals,*/
         0,                /*int stacksize,*/
         0,                /*int flags,*/
-        __pyx_empty_bytes,  /*PyObject *code,*/
-        __pyx_empty_tuple,  /*PyObject *consts,*/
-        __pyx_empty_tuple,  /*PyObject *names,*/
-        __pyx_empty_tuple,  /*PyObject *varnames,*/
-        __pyx_empty_tuple,  /*PyObject *freevars,*/
-        __pyx_empty_tuple,  /*PyObject *cellvars,*/
+        __pyx_empty_bytes,     /*PyObject *code,*/
+        __pyx_empty_tuple,     /*PyObject *consts,*/
+        __pyx_empty_tuple,     /*PyObject *names,*/
+        __pyx_empty_tuple,     /*PyObject *varnames,*/
+        __pyx_empty_tuple,     /*PyObject *freevars,*/
+        __pyx_empty_tuple,     /*PyObject *cellvars,*/
         py_srcfile,       /*PyObject *filename,*/
         py_funcname,      /*PyObject *name,*/
         firstlineno,      /*int firstlineno,*/
-        __pyx_empty_bytes   /*PyObject *lnotab*/
+        __pyx_empty_bytes      /*PyObject *lnotab*/
     );
 bad:
     Py_XDECREF(py_srcfile);
@@ -45812,31 +4671,28 @@ bad:
 }
 #endif /* CYTHON_PROFILE */
 
-static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
-         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
-         const char* encoding, const char* errors,
-         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
-    Py_ssize_t length;
-    if (unlikely((start < 0) | (stop < 0))) {
-        length = strlen(cstring);
-        if (start < 0) {
-            start += length;
-            if (start < 0)
-                start = 0;
-        }
-        if (stop < 0)
-            stop += length;
-    }
-    length = stop - start;
-    if (unlikely(length <= 0))
-        return PyUnicode_FromUnicode(NULL, 0);
-    cstring += start;
-    if (decode_func) {
-        return decode_func(cstring, length, errors);
-    } else {
-        return PyUnicode_Decode(cstring, length, encoding, errors);
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+#endif
+    result = (*call)(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    Py_LeaveRecursiveCall();
+#endif
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
     }
+    return result;
 }
+#endif
 
 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 #if CYTHON_COMPILING_IN_CPYTHON
@@ -45907,24 +4763,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
         }
         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);
+        if (PyInstance_Check(type)) {
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
             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;
-            }
+        } 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);
@@ -45956,180 +4811,84 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
         value = type;
         type = (PyObject*) Py_TYPE(value);
     } else if (PyExceptionClass_Check(type)) {
-        PyObject *args;
-        if (!value)
-            args = PyTuple_New(0);
-        else if (PyTuple_Check(value)) {
-            Py_INCREF(value);
-            args = value;
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
         }
-        else
-            args = PyTuple_Pack(1, value);
-        if (!args)
-            goto bad;
-        owned_instance = PyEval_CallObject(type, args);
-        Py_DECREF(args);
-        if (!owned_instance)
-            goto bad;
-        value = owned_instance;
-        if (!PyExceptionInstance_Check(value)) {
-            PyErr_Format(PyExc_TypeError,
-                         "calling %R should have returned an instance of "
-                         "BaseException, not %R",
-                         type, Py_TYPE(value));
-            goto bad;
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
         }
     } else {
         PyErr_SetString(PyExc_TypeError,
             "raise: exception class must be a subclass of BaseException");
         goto bad;
     }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
     if (cause && cause != Py_None) {
+#endif
         PyObject *fixed_cause;
-        if (PyExceptionClass_Check(cause)) {
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
             fixed_cause = PyObject_CallObject(cause, NULL);
             if (fixed_cause == NULL)
                 goto bad;
-        }
-        else if (PyExceptionInstance_Check(cause)) {
+        } else if (PyExceptionInstance_Check(cause)) {
             fixed_cause = cause;
             Py_INCREF(fixed_cause);
-        }
-        else {
+        } else {
             PyErr_SetString(PyExc_TypeError,
                             "exception causes must derive from "
                             "BaseException");
-            goto bad;
-        }
-        PyException_SetCause(value, fixed_cause);
-    }
-    PyErr_SetObject(type, value);
-    if (tb) {
-        PyThreadState *tstate = PyThreadState_GET();
-        PyObject* tmp_tb = tstate->curexc_traceback;
-        if (tb != tmp_tb) {
-            Py_INCREF(tb);
-            tstate->curexc_traceback = tb;
-            Py_XDECREF(tmp_tb);
-        }
-    }
-bad:
-    Py_XDECREF(owned_instance);
-    return;
-}
-#endif
-
-static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
-    if (unlikely(!type)) {
-        PyErr_Format(PyExc_SystemError, "Missing type object");
-        return 0;
-    }
-    if (likely(PyObject_TypeCheck(obj, type)))
-        return 1;
-    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
-                 Py_TYPE(obj)->tp_name, type->tp_name);
-    return 0;
-}
-
-static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
-    PyObject *kwdict,
-    const char* function_name,
-    int kw_allowed)
-{
-    PyObject* key = 0;
-    Py_ssize_t pos = 0;
-#if CPYTHON_COMPILING_IN_PYPY
-    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
-        goto invalid_keyword;
-    return 1;
-#else
-    while (PyDict_Next(kwdict, &pos, &key, 0)) {
-        #if PY_MAJOR_VERSION < 3
-        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
-        #endif
-            if (unlikely(!PyUnicode_Check(key)))
-                goto invalid_keyword_type;
-    }
-    if ((!kw_allowed) && unlikely(key))
-        goto invalid_keyword;
-    return 1;
-invalid_keyword_type:
-    PyErr_Format(PyExc_TypeError,
-        "%s() keywords must be strings", function_name);
-    return 0;
-#endif
-invalid_keyword:
-    PyErr_Format(PyExc_TypeError,
-    #if PY_MAJOR_VERSION < 3
-        "%s() got an unexpected keyword argument '%s'",
-        function_name, PyString_AsString(key));
-    #else
-        "%s() got an unexpected keyword argument '%U'",
-        function_name, key);
-    #endif
-    return 0;
-}
-
-static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
-    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
-}
-
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
-    PyObject *local_type, *local_value, *local_tb;
-#if CYTHON_COMPILING_IN_CPYTHON
-    PyObject *tmp_type, *tmp_value, *tmp_tb;
-    PyThreadState *tstate = PyThreadState_GET();
-    local_type = tstate->curexc_type;
-    local_value = tstate->curexc_value;
-    local_tb = tstate->curexc_traceback;
-    tstate->curexc_type = 0;
-    tstate->curexc_value = 0;
-    tstate->curexc_traceback = 0;
-#else
-    PyErr_Fetch(&local_type, &local_value, &local_tb);
-#endif
-    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (unlikely(tstate->curexc_type))
-#else
-    if (unlikely(PyErr_Occurred()))
-#endif
-        goto bad;
-    #if PY_MAJOR_VERSION >= 3
-    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
-        goto bad;
-    #endif
-    Py_INCREF(local_type);
-    Py_INCREF(local_value);
-    Py_INCREF(local_tb);
-    *type = local_type;
-    *value = local_value;
-    *tb = local_tb;
-#if CYTHON_COMPILING_IN_CPYTHON
-    tmp_type = tstate->exc_type;
-    tmp_value = tstate->exc_value;
-    tmp_tb = tstate->exc_traceback;
-    tstate->exc_type = local_type;
-    tstate->exc_value = local_value;
-    tstate->exc_traceback = local_tb;
-    /* Make sure tstate is in a consistent state when we XDECREF
-       these objects (DECREF may run arbitrary code). */
-    Py_XDECREF(tmp_type);
-    Py_XDECREF(tmp_value);
-    Py_XDECREF(tmp_tb);
-#else
-    PyErr_SetExcInfo(local_type, local_value, local_tb);
-#endif
-    return 0;
+            goto bad;
+        }
+        PyException_SetCause(value, fixed_cause);
+    }
+    PyErr_SetObject(type, value);
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+    }
 bad:
-    *type = 0;
-    *value = 0;
-    *tb = 0;
-    Py_XDECREF(local_type);
-    Py_XDECREF(local_value);
-    Py_XDECREF(local_tb);
-    return -1;
+    Py_XDECREF(owned_instance);
+    return;
 }
+#endif
 
 static void __Pyx_RaiseDoubleKeywordsError(
     const char* func_name,
@@ -46230,12 +4989,12 @@ arg_passed_twice:
     goto bad;
 invalid_keyword_type:
     PyErr_Format(PyExc_TypeError,
-        "%s() keywords must be strings", function_name);
+        "%.200s() keywords must be strings", function_name);
     goto bad;
 invalid_keyword:
     PyErr_Format(PyExc_TypeError,
     #if PY_MAJOR_VERSION < 3
-        "%s() got an unexpected keyword argument '%s'",
+        "%.200s() got an unexpected keyword argument '%.200s'",
         function_name, PyString_AsString(key));
     #else
         "%s() got an unexpected keyword argument '%U'",
@@ -46265,31 +5024,273 @@ static void __Pyx_RaiseArgtupleInvalid(
         more_or_less = "exactly";
     }
     PyErr_Format(PyExc_TypeError,
-                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                  func_name, more_or_less, num_expected,
                  (num_expected == 1) ? "" : "s", num_found);
 }
 
-static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
-    const char *name, int exact)
-{
-    if (!type) {
-        PyErr_Format(PyExc_SystemError, "Missing type object");
-        return 0;
-    }
-    if (none_allowed && obj == Py_None) return 1;
-    else if (exact) {
-        if (Py_TYPE(obj) == type) return 1;
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (result) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
     }
-    else {
-        if (PyObject_TypeCheck(obj, type)) return 1;
+    return result;
+}
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+    if (likely(PyList_CheckExact(L))) {
+        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+    } else {
+        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+        if (unlikely(!retval))
+            return -1;
+        Py_DECREF(retval);
     }
-    PyErr_Format(PyExc_TypeError,
-        "Argument '%s' has incorrect type (expected %s, got %s)",
-        name, type->tp_name, Py_TYPE(obj)->tp_name);
     return 0;
 }
 
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        PyObject *r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        PyObject *r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+            PyObject *r = PyList_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    else if (PyTuple_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return NULL;
+                }
+            }
+            return m->sq_item(o, i);
+        }
+    }
+#else
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
+    }
+#endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
+    int r;
+    if (!j) return -1;
+    r = PyObject_DelItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                               CYTHON_UNUSED int is_list, int wraparound) {
+#if CYTHON_COMPILING_IN_PYPY
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_DelItem(o, i);
+    }
+#else
+    PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+    if (likely(m && m->sq_ass_item)) {
+        if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+            Py_ssize_t l = m->sq_length(o);
+            if (likely(l >= 0)) {
+                i += l;
+            } else {
+                if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                    PyErr_Clear();
+                else
+                    return -1;
+            }
+        }
+        return m->sq_ass_item(o, i, (PyObject *)NULL);
+    }
+#endif
+    return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
+}
+
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+    if (s1 == s2) {
+        return (equals == Py_EQ);
+    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
+        const char *ps1, *ps2;
+        Py_ssize_t length = PyBytes_GET_SIZE(s1);
+        if (length != PyBytes_GET_SIZE(s2))
+            return (equals == Py_NE);
+        ps1 = PyBytes_AS_STRING(s1);
+        ps2 = PyBytes_AS_STRING(s2);
+        if (ps1[0] != ps2[0]) {
+            return (equals == Py_NE);
+        } else if (length == 1) {
+            return (equals == Py_EQ);
+        } else {
+            int result = memcmp(ps1, ps2, (size_t)length);
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
+        return (equals == Py_NE);
+    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
+        return (equals == Py_NE);
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+#endif
+}
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+#if PY_MAJOR_VERSION < 3
+    PyObject* owned_ref = NULL;
+#endif
+    int s1_is_unicode, s2_is_unicode;
+    if (s1 == s2) {
+        goto return_eq;
+    }
+    s1_is_unicode = PyUnicode_CheckExact(s1);
+    s2_is_unicode = PyUnicode_CheckExact(s2);
+#if PY_MAJOR_VERSION < 3
+    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
+        owned_ref = PyUnicode_FromObject(s2);
+        if (unlikely(!owned_ref))
+            return -1;
+        s2 = owned_ref;
+        s2_is_unicode = 1;
+    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
+        owned_ref = PyUnicode_FromObject(s1);
+        if (unlikely(!owned_ref))
+            return -1;
+        s1 = owned_ref;
+        s1_is_unicode = 1;
+    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
+        return __Pyx_PyBytes_Equals(s1, s2, equals);
+    }
+#endif
+    if (s1_is_unicode & s2_is_unicode) {
+        Py_ssize_t length;
+        int kind;
+        void *data1, *data2;
+        #if CYTHON_PEP393_ENABLED
+        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
+            return -1;
+        #endif
+        length = __Pyx_PyUnicode_GET_LENGTH(s1);
+        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
+            goto return_ne;
+        }
+        kind = __Pyx_PyUnicode_KIND(s1);
+        if (kind != __Pyx_PyUnicode_KIND(s2)) {
+            goto return_ne;
+        }
+        data1 = __Pyx_PyUnicode_DATA(s1);
+        data2 = __Pyx_PyUnicode_DATA(s2);
+        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
+            goto return_ne;
+        } else if (length == 1) {
+            goto return_eq;
+        } else {
+            int result = memcmp(data1, data2, length * kind);
+            #if PY_MAJOR_VERSION < 3
+            Py_XDECREF(owned_ref);
+            #endif
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & s2_is_unicode) {
+        goto return_ne;
+    } else if ((s2 == Py_None) & s1_is_unicode) {
+        goto return_ne;
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+return_eq:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_EQ);
+return_ne:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_NE);
+#endif
+}
+
 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
     PyErr_Format(PyExc_ValueError,
                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
@@ -46297,7 +5298,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
 
 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
     PyErr_Format(PyExc_ValueError,
-                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
+                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                  index, (index == 1) ? "" : "s");
 }
 
@@ -46346,44 +5347,6 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
     return 0;
 }
 
-static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
-    long q = a / b;
-    long r = a - q*b;
-    q -= ((r != 0) & ((r ^ b) < 0));
-    return q;
-}
-
-static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
-    long r = a % b;
-    r += ((r != 0) & ((r ^ b) < 0)) * b;
-    return r;
-}
-
-static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
-    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
-}
-
-static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
-    PyTypeObject* type = Py_TYPE(obj);
-    while (type && type->tp_traverse != current_tp_traverse)
-        type = type->tp_base;
-    while (type && type->tp_traverse == current_tp_traverse)
-        type = type->tp_base;
-    if (type && type->tp_traverse)
-        return type->tp_traverse(obj, v, a);
-    return 0;
-}
-
-static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
-    PyTypeObject* type = Py_TYPE(obj);
-    while (type && type->tp_clear != current_tp_clear)
-        type = type->tp_base;
-    while (type && type->tp_clear == current_tp_clear)
-        type = type->tp_base;
-    if (type && type->tp_clear)
-        type->tp_clear(obj);
-}
-
 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
 #if CYTHON_COMPILING_IN_CPYTHON
     PyThreadState *tstate = PyThreadState_GET();
@@ -46415,130 +5378,122 @@ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb)
 #endif
 }
 
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
-    PyObject *empty_list = 0;
-    PyObject *module = 0;
-    PyObject *global_dict = 0;
-    PyObject *empty_dict = 0;
-    PyObject *list;
-    #if PY_VERSION_HEX < 0x03030000
-    PyObject *py_import = 0;
-    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
-    if (!py_import)
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    local_type = tstate->curexc_type;
+    local_value = tstate->curexc_value;
+    local_tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (unlikely(tstate->curexc_type))
+#else
+    if (unlikely(PyErr_Occurred()))
+#endif
         goto bad;
-    #endif
-    if (from_list)
-        list = from_list;
-    else {
-        empty_list = PyList_New(0);
-        if (!empty_list)
+    #if PY_MAJOR_VERSION >= 3
+    if (local_tb) {
+        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
             goto bad;
-        list = empty_list;
-    }
-    global_dict = PyModule_GetDict(__pyx_m);
-    if (!global_dict)
-        goto bad;
-    empty_dict = PyDict_New();
-    if (!empty_dict)
-        goto bad;
-    #if PY_VERSION_HEX >= 0x02050000
-    {
-        #if PY_MAJOR_VERSION >= 3
-        if (level == -1) {
-            if (strchr(__Pyx_MODULE_NAME, '.')) {
-                #if PY_VERSION_HEX < 0x03030000
-                PyObject *py_level = PyInt_FromLong(1);
-                if (!py_level)
-                    goto bad;
-                module = PyObject_CallFunctionObjArgs(py_import,
-                    name, global_dict, empty_dict, list, py_level, NULL);
-                Py_DECREF(py_level);
-                #else
-                module = PyImport_ImportModuleLevelObject(
-                    name, global_dict, empty_dict, list, 1);
-                #endif
-                if (!module) {
-                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
-                        goto bad;
-                    PyErr_Clear();
-                }
-            }
-            level = 0; /* try absolute import on failure */
-        }
-        #endif
-        if (!module) {
-            #if PY_VERSION_HEX < 0x03030000
-            PyObject *py_level = PyInt_FromLong(level);
-            if (!py_level)
-                goto bad;
-            module = PyObject_CallFunctionObjArgs(py_import,
-                name, global_dict, empty_dict, list, py_level, NULL);
-            Py_DECREF(py_level);
-            #else
-            module = PyImport_ImportModuleLevelObject(
-                name, global_dict, empty_dict, list, level);
-            #endif
-        }
-    }
-    #else
-    if (level>0) {
-        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
-        goto bad;
     }
-    module = PyObject_CallFunctionObjArgs(py_import,
-        name, global_dict, empty_dict, list, NULL);
     #endif
+    Py_XINCREF(local_tb);
+    Py_XINCREF(local_type);
+    Py_XINCREF(local_value);
+    *type = local_type;
+    *value = local_value;
+    *tb = local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = local_type;
+    tstate->exc_value = local_value;
+    tstate->exc_traceback = local_tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+    return 0;
 bad:
-    #if PY_VERSION_HEX < 0x03030000
-    Py_XDECREF(py_import);
-    #endif
-    Py_XDECREF(empty_list);
-    Py_XDECREF(empty_dict);
-    return module;
+    *type = 0;
+    *value = 0;
+    *tb = 0;
+    Py_XDECREF(local_type);
+    Py_XDECREF(local_value);
+    Py_XDECREF(local_tb);
+    return -1;
 }
 
-static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
-    PyObject *metaclass;
-#if PY_MAJOR_VERSION < 3
-    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
-        PyObject *base = PyTuple_GET_ITEM(bases, 0);
-        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
-        if (!metaclass) {
-            PyErr_Clear();
-            metaclass = (PyObject*) Py_TYPE(base);
-        }
-    } else {
-        metaclass = (PyObject *) &PyClass_Type;
-    }
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
+    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
+}
+
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = *type;
+    tstate->exc_value = *value;
+    tstate->exc_traceback = *tb;
 #else
-    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;
-    }
+    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+    PyErr_SetExcInfo(*type, *value, *tb);
 #endif
-    Py_INCREF(metaclass);
-    return metaclass;
+    *type = tmp_type;
+    *value = tmp_value;
+    *tb = tmp_tb;
 }
 
-static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
-                                   PyObject *qualname, PyObject *modname) {
-    PyObject *result;
-    PyObject *metaclass;
-    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
-        return NULL;
-    if (PyDict_SetItemString(dict, "__qualname__", qualname) < 0)
-        return NULL;
-    metaclass = PyDict_GetItemString(dict, "__metaclass__");
-    if (metaclass) {
-        Py_INCREF(metaclass);
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+    PyObject* fake_module;
+    PyTypeObject* cached_type = NULL;
+    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+    if (!fake_module) return NULL;
+    Py_INCREF(fake_module);
+    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+    if (cached_type) {
+        if (!PyType_Check((PyObject*)cached_type)) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s is not a type object",
+                type->tp_name);
+            goto bad;
+        }
+        if (cached_type->tp_basicsize != type->tp_basicsize) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s has the wrong size, try recompiling",
+                type->tp_name);
+            goto bad;
+        }
     } else {
-        metaclass = __Pyx_FindPy2Metaclass(bases);
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+        PyErr_Clear();
+        if (PyType_Ready(type) < 0) goto bad;
+        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+            goto bad;
+        Py_INCREF(type);
+        cached_type = type;
     }
-    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
-    Py_DECREF(metaclass);
-    return result;
+done:
+    Py_DECREF(fake_module);
+    return cached_type;
+bad:
+    Py_XDECREF(cached_type);
+    cached_type = NULL;
+    goto done;
 }
 
 static PyObject *
@@ -46673,11 +5628,10 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
     return 0;
 }
 static PyObject *
-__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
 {
-    PyObject* dict = PyModule_GetDict(__pyx_m);
-    Py_XINCREF(dict);
-    return dict;
+    Py_INCREF(op->func_globals);
+    return op->func_globals;
 }
 static PyObject *
 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
@@ -46692,23 +5646,104 @@ __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
     Py_INCREF(result);
     return result;
 }
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+    PyObject *res = op->defaults_getter((PyObject *) op);
+    if (unlikely(!res))
+        return -1;
+    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+    Py_INCREF(op->defaults_tuple);
+    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+    Py_INCREF(op->defaults_kwdict);
+    Py_DECREF(res);
+    return 0;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyTuple_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__defaults__ must be set to a tuple object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_tuple;
+    op->defaults_tuple = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
 static PyObject *
-__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
-{
-    if (op->defaults_tuple) {
-        Py_INCREF(op->defaults_tuple);
-        return op->defaults_tuple;
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_tuple;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_tuple;
+        } else {
+            result = Py_None;
+        }
     }
-    if (op->defaults_getter) {
-        PyObject *res = op->defaults_getter((PyObject *) op);
-        if (likely(res)) {
-            Py_INCREF(res);
-            op->defaults_tuple = res;
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__kwdefaults__ must be set to a dict object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_kwdict;
+    op->defaults_kwdict = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_kwdict;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_kwdict;
+        } else {
+            result = Py_None;
         }
-        return res;
     }
-    Py_INCREF(Py_None);
-    return Py_None;
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value || value == Py_None) {
+        value = NULL;
+    } else if (!PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__annotations__ must be set to a dict object");
+        return -1;
+    }
+    Py_XINCREF(value);
+    tmp = op->func_annotations;
+    op->func_annotations = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->func_annotations;
+    if (unlikely(!result)) {
+        result = PyDict_New();
+        if (unlikely(!result)) return NULL;
+        op->func_annotations = result;
+    }
+    Py_INCREF(result);
+    return result;
 }
 static PyGetSetDef __pyx_CyFunction_getsets[] = {
     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
@@ -46725,8 +5760,10 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = {
     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
-    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
-    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
+    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
     {0, 0, 0, 0, 0}
 };
 #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
@@ -46750,7 +5787,7 @@ static PyMethodDef __pyx_CyFunction_methods[] = {
     {0, 0, 0, 0}
 };
 static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
-                                      PyObject *closure, PyObject *module, PyObject* code) {
+                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
     __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
     if (op == NULL)
         return NULL;
@@ -46768,12 +5805,16 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f
     op->func_qualname = qualname;
     op->func_doc = NULL;
     op->func_classobj = NULL;
+    op->func_globals = globals;
+    Py_INCREF(op->func_globals);
     Py_XINCREF(code);
     op->func_code = code;
     op->defaults_pyobjects = 0;
     op->defaults = NULL;
     op->defaults_tuple = NULL;
+    op->defaults_kwdict = NULL;
     op->defaults_getter = NULL;
+    op->func_annotations = NULL;
     PyObject_GC_Track(op);
     return (PyObject *) op;
 }
@@ -46786,9 +5827,12 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
     Py_CLEAR(m->func_name);
     Py_CLEAR(m->func_qualname);
     Py_CLEAR(m->func_doc);
+    Py_CLEAR(m->func_globals);
     Py_CLEAR(m->func_code);
     Py_CLEAR(m->func_classobj);
     Py_CLEAR(m->defaults_tuple);
+    Py_CLEAR(m->defaults_kwdict);
+    Py_CLEAR(m->func_annotations);
     if (m->defaults) {
         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
         int i;
@@ -46815,9 +5859,11 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit,
     Py_VISIT(m->func_name);
     Py_VISIT(m->func_qualname);
     Py_VISIT(m->func_doc);
+    Py_VISIT(m->func_globals);
     Py_VISIT(m->func_code);
     Py_VISIT(m->func_classobj);
     Py_VISIT(m->defaults_tuple);
+    Py_VISIT(m->defaults_kwdict);
     if (m->defaults) {
         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
         int i;
@@ -46940,1413 +5986,514 @@ static PyTypeObject __pyx_CyFunctionType_type = {
     __pyx_CyFunction_members,           /*tp_members*/
     __pyx_CyFunction_getsets,           /*tp_getset*/
     0,                                  /*tp_base*/
-    0,                                  /*tp_dict*/
-    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
-    0,                                  /*tp_descr_set*/
-    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
-    0,                                  /*tp_init*/
-    0,                                  /*tp_alloc*/
-    0,                                  /*tp_new*/
-    0,                                  /*tp_free*/
-    0,                                  /*tp_is_gc*/
-    0,                                  /*tp_bases*/
-    0,                                  /*tp_mro*/
-    0,                                  /*tp_cache*/
-    0,                                  /*tp_subclasses*/
-    0,                                  /*tp_weaklist*/
-    0,                                  /*tp_del*/
-#if PY_VERSION_HEX >= 0x02060000
-    0,                                  /*tp_version_tag*/
-#endif
-};
-static int __Pyx_CyFunction_init(void) {
-#if !CYTHON_COMPILING_IN_PYPY
-    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
-#endif
-    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
-        return -1;
-    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
-    return 0;
-}
-static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
-    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-    m->defaults = PyMem_Malloc(size);
-    if (!m->defaults)
-        return PyErr_NoMemory();
-    memset(m->defaults, 0, sizeof(size));
-    m->defaults_pyobjects = pyobjects;
-    return m->defaults;
-}
-static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
-    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-    m->defaults_tuple = tuple;
-    Py_INCREF(tuple);
-}
-
-static CYTHON_INLINE uint64_t __Pyx_PyInt_from_py_uint64_t(PyObject* x) {
-    const uint64_t neg_one = (uint64_t)-1, const_zero = (uint64_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if (sizeof(uint64_t) == sizeof(char)) {
-        if (is_unsigned)
-            return (uint64_t)__Pyx_PyInt_AsUnsignedChar(x);
-        else
-            return (uint64_t)__Pyx_PyInt_AsSignedChar(x);
-    } else if (sizeof(uint64_t) == sizeof(short)) {
-        if (is_unsigned)
-            return (uint64_t)__Pyx_PyInt_AsUnsignedShort(x);
-        else
-            return (uint64_t)__Pyx_PyInt_AsSignedShort(x);
-    } else if (sizeof(uint64_t) == sizeof(int)) {
-        if (is_unsigned)
-            return (uint64_t)__Pyx_PyInt_AsUnsignedInt(x);
-        else
-            return (uint64_t)__Pyx_PyInt_AsSignedInt(x);
-    } else if (sizeof(uint64_t) == sizeof(long)) {
-        if (is_unsigned)
-            return (uint64_t)__Pyx_PyInt_AsUnsignedLong(x);
-        else
-            return (uint64_t)__Pyx_PyInt_AsSignedLong(x);
-    } else if (sizeof(uint64_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return (uint64_t)__Pyx_PyInt_AsUnsignedLongLong(x);
-        else
-            return (uint64_t)__Pyx_PyInt_AsSignedLongLong(x);
-    }  else {
-        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
-        PyErr_SetString(PyExc_RuntimeError,
-                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-        #else
-        uint64_t val;
-        PyObject *v = __Pyx_PyNumber_Int(x);
-        #if PY_VERSION_HEX < 0x03000000
-        if (likely(v) && !PyLong_Check(v)) {
-            PyObject *tmp = v;
-            v = PyNumber_Long(tmp);
-            Py_DECREF(tmp);
-        }
-        #endif
-        if (likely(v)) {
-            int one = 1; int is_little = (int)*(unsigned char *)&one;
-            unsigned char *bytes = (unsigned char *)&val;
-            int ret = _PyLong_AsByteArray((PyLongObject *)v,
-                                          bytes, sizeof(val),
-                                          is_little, !is_unsigned);
-            Py_DECREF(v);
-            if (likely(!ret))
-                return val;
-        }
-        #endif
-        return (uint64_t)-1;
-    }
-}
-
-static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject* x) {
-    const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if (sizeof(uint32_t) == sizeof(char)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedChar(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedChar(x);
-    } else if (sizeof(uint32_t) == sizeof(short)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedShort(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedShort(x);
-    } else if (sizeof(uint32_t) == sizeof(int)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedInt(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedInt(x);
-    } else if (sizeof(uint32_t) == sizeof(long)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedLong(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedLong(x);
-    } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return (uint32_t)__Pyx_PyInt_AsUnsignedLongLong(x);
-        else
-            return (uint32_t)__Pyx_PyInt_AsSignedLongLong(x);
-    }  else {
-        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
-        PyErr_SetString(PyExc_RuntimeError,
-                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-        #else
-        uint32_t val;
-        PyObject *v = __Pyx_PyNumber_Int(x);
-        #if PY_VERSION_HEX < 0x03000000
-        if (likely(v) && !PyLong_Check(v)) {
-            PyObject *tmp = v;
-            v = PyNumber_Long(tmp);
-            Py_DECREF(tmp);
-        }
-        #endif
-        if (likely(v)) {
-            int one = 1; int is_little = (int)*(unsigned char *)&one;
-            unsigned char *bytes = (unsigned char *)&val;
-            int ret = _PyLong_AsByteArray((PyLongObject *)v,
-                                          bytes, sizeof(val),
-                                          is_little, !is_unsigned);
-            Py_DECREF(v);
-            if (likely(!ret))
-                return val;
-        }
-        #endif
-        return (uint32_t)-1;
-    }
-}
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int8_t(int8_t val) {
-    const int8_t neg_one = (int8_t)-1, const_zero = (int8_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if ((sizeof(int8_t) == sizeof(char))  ||
-        (sizeof(int8_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(int8_t) == sizeof(int)) ||
-               (sizeof(int8_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(int8_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(int8_t),
-                                     little, !is_unsigned);
-    }
-}
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint8_t(uint8_t val) {
-    const uint8_t neg_one = (uint8_t)-1, const_zero = (uint8_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if ((sizeof(uint8_t) == sizeof(char))  ||
-        (sizeof(uint8_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(uint8_t) == sizeof(int)) ||
-               (sizeof(uint8_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(uint8_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(uint8_t),
-                                     little, !is_unsigned);
-    }
-}
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int16_t(int16_t val) {
-    const int16_t neg_one = (int16_t)-1, const_zero = (int16_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if ((sizeof(int16_t) == sizeof(char))  ||
-        (sizeof(int16_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(int16_t) == sizeof(int)) ||
-               (sizeof(int16_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(int16_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(int16_t),
-                                     little, !is_unsigned);
-    }
-}
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint16_t(uint16_t val) {
-    const uint16_t neg_one = (uint16_t)-1, const_zero = (uint16_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if ((sizeof(uint16_t) == sizeof(char))  ||
-        (sizeof(uint16_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(uint16_t) == sizeof(int)) ||
-               (sizeof(uint16_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(uint16_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
-                                     little, !is_unsigned);
-    }
-}
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int32_t(int32_t val) {
-    const int32_t neg_one = (int32_t)-1, const_zero = (int32_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if ((sizeof(int32_t) == sizeof(char))  ||
-        (sizeof(int32_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(int32_t) == sizeof(int)) ||
-               (sizeof(int32_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(int32_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
-                                     little, !is_unsigned);
-    }
-}
-
-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;
-    if ((sizeof(uint32_t) == sizeof(char))  ||
-        (sizeof(uint32_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(uint32_t) == sizeof(int)) ||
-               (sizeof(uint32_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
-                                     little, !is_unsigned);
-    }
-}
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int64_t(int64_t val) {
-    const int64_t neg_one = (int64_t)-1, const_zero = (int64_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if ((sizeof(int64_t) == sizeof(char))  ||
-        (sizeof(int64_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(int64_t) == sizeof(int)) ||
-               (sizeof(int64_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(int64_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
-                                     little, !is_unsigned);
-    }
-}
-
-static CYTHON_INLINE uint8_t __Pyx_PyInt_from_py_uint8_t(PyObject* x) {
-    const uint8_t neg_one = (uint8_t)-1, const_zero = (uint8_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if (sizeof(uint8_t) == sizeof(char)) {
-        if (is_unsigned)
-            return (uint8_t)__Pyx_PyInt_AsUnsignedChar(x);
-        else
-            return (uint8_t)__Pyx_PyInt_AsSignedChar(x);
-    } else if (sizeof(uint8_t) == sizeof(short)) {
-        if (is_unsigned)
-            return (uint8_t)__Pyx_PyInt_AsUnsignedShort(x);
-        else
-            return (uint8_t)__Pyx_PyInt_AsSignedShort(x);
-    } else if (sizeof(uint8_t) == sizeof(int)) {
-        if (is_unsigned)
-            return (uint8_t)__Pyx_PyInt_AsUnsignedInt(x);
-        else
-            return (uint8_t)__Pyx_PyInt_AsSignedInt(x);
-    } else if (sizeof(uint8_t) == sizeof(long)) {
-        if (is_unsigned)
-            return (uint8_t)__Pyx_PyInt_AsUnsignedLong(x);
-        else
-            return (uint8_t)__Pyx_PyInt_AsSignedLong(x);
-    } else if (sizeof(uint8_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return (uint8_t)__Pyx_PyInt_AsUnsignedLongLong(x);
-        else
-            return (uint8_t)__Pyx_PyInt_AsSignedLongLong(x);
-    }  else {
-        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
-        PyErr_SetString(PyExc_RuntimeError,
-                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-        #else
-        uint8_t val;
-        PyObject *v = __Pyx_PyNumber_Int(x);
-        #if PY_VERSION_HEX < 0x03000000
-        if (likely(v) && !PyLong_Check(v)) {
-            PyObject *tmp = v;
-            v = PyNumber_Long(tmp);
-            Py_DECREF(tmp);
-        }
-        #endif
-        if (likely(v)) {
-            int one = 1; int is_little = (int)*(unsigned char *)&one;
-            unsigned char *bytes = (unsigned char *)&val;
-            int ret = _PyLong_AsByteArray((PyLongObject *)v,
-                                          bytes, sizeof(val),
-                                          is_little, !is_unsigned);
-            Py_DECREF(v);
-            if (likely(!ret))
-                return val;
-        }
-        #endif
-        return (uint8_t)-1;
-    }
-}
-
-static CYTHON_INLINE int32_t __Pyx_PyInt_from_py_int32_t(PyObject* x) {
-    const int32_t neg_one = (int32_t)-1, const_zero = (int32_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if (sizeof(int32_t) == sizeof(char)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedChar(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedChar(x);
-    } else if (sizeof(int32_t) == sizeof(short)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedShort(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedShort(x);
-    } else if (sizeof(int32_t) == sizeof(int)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedInt(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedInt(x);
-    } else if (sizeof(int32_t) == sizeof(long)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedLong(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedLong(x);
-    } else if (sizeof(int32_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedLongLong(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedLongLong(x);
-    }  else {
-        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
-        PyErr_SetString(PyExc_RuntimeError,
-                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-        #else
-        int32_t val;
-        PyObject *v = __Pyx_PyNumber_Int(x);
-        #if PY_VERSION_HEX < 0x03000000
-        if (likely(v) && !PyLong_Check(v)) {
-            PyObject *tmp = v;
-            v = PyNumber_Long(tmp);
-            Py_DECREF(tmp);
-        }
-        #endif
-        if (likely(v)) {
-            int one = 1; int is_little = (int)*(unsigned char *)&one;
-            unsigned char *bytes = (unsigned char *)&val;
-            int ret = _PyLong_AsByteArray((PyLongObject *)v,
-                                          bytes, sizeof(val),
-                                          is_little, !is_unsigned);
-            Py_DECREF(v);
-            if (likely(!ret))
-                return val;
-        }
-        #endif
-        return (int32_t)-1;
-    }
-}
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint64_t(uint64_t val) {
-    const uint64_t neg_one = (uint64_t)-1, const_zero = (uint64_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if ((sizeof(uint64_t) == sizeof(char))  ||
-        (sizeof(uint64_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(uint64_t) == sizeof(int)) ||
-               (sizeof(uint64_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(uint64_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
-    } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
-                                     little, !is_unsigned);
-    }
-}
-
-static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
-    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned char" :
-                    "value too large to convert to unsigned char");
-            }
-            return (unsigned char)-1;
-        }
-        return (unsigned char)val;
-    }
-    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
-}
-
-static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
-    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned short" :
-                    "value too large to convert to unsigned short");
-            }
-            return (unsigned short)-1;
-        }
-        return (unsigned short)val;
-    }
-    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
-}
-
-static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
-    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned int" :
-                    "value too large to convert to unsigned int");
-            }
-            return (unsigned int)-1;
-        }
-        return (unsigned int)val;
+    0,                                  /*tp_dict*/
+    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
+    0,                                  /*tp_descr_set*/
+    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
+    0,                                  /*tp_init*/
+    0,                                  /*tp_alloc*/
+    0,                                  /*tp_new*/
+    0,                                  /*tp_free*/
+    0,                                  /*tp_is_gc*/
+    0,                                  /*tp_bases*/
+    0,                                  /*tp_mro*/
+    0,                                  /*tp_cache*/
+    0,                                  /*tp_subclasses*/
+    0,                                  /*tp_weaklist*/
+    0,                                  /*tp_del*/
+#if PY_VERSION_HEX >= 0x02060000
+    0,                                  /*tp_version_tag*/
+#endif
+#if PY_VERSION_HEX >= 0x030400a1
+    0,                                  /*tp_finalize*/
+#endif
+};
+static int __Pyx_CyFunction_init(void) {
+#if !CYTHON_COMPILING_IN_PYPY
+    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
+#endif
+    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+    if (__pyx_CyFunctionType == NULL) {
+        return -1;
     }
-    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
+    return 0;
 }
-
-static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
-    const char neg_one = (char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to char" :
-                    "value too large to convert to char");
-            }
-            return (char)-1;
-        }
-        return (char)val;
-    }
-    return (char)__Pyx_PyInt_AsLong(x);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults = PyMem_Malloc(size);
+    if (!m->defaults)
+        return PyErr_NoMemory();
+    memset(m->defaults, 0, size);
+    m->defaults_pyobjects = pyobjects;
+    return m->defaults;
 }
-
-static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
-    const short neg_one = (short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to short" :
-                    "value too large to convert to short");
-            }
-            return (short)-1;
-        }
-        return (short)val;
-    }
-    return (short)__Pyx_PyInt_AsLong(x);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults_tuple = tuple;
+    Py_INCREF(tuple);
 }
-
-static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
-    const int neg_one = (int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to int" :
-                    "value too large to convert to int");
-            }
-            return (int)-1;
-        }
-        return (int)val;
-    }
-    return (int)__Pyx_PyInt_AsLong(x);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults_kwdict = dict;
+    Py_INCREF(dict);
 }
-
-static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
-    const signed char neg_one = (signed char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed char" :
-                    "value too large to convert to signed char");
-            }
-            return (signed char)-1;
-        }
-        return (signed char)val;
-    }
-    return (signed char)__Pyx_PyInt_AsSignedLong(x);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->func_annotations = dict;
+    Py_INCREF(dict);
 }
 
-static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
-    const signed short neg_one = (signed short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed short" :
-                    "value too large to convert to signed short");
-            }
-            return (signed short)-1;
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+    for (i=0; i < nbases; i++) {
+        PyTypeObject *tmptype;
+        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+        tmptype = Py_TYPE(tmp);
+#if PY_MAJOR_VERSION < 3
+        if (tmptype == &PyClass_Type)
+            continue;
+#endif
+        if (!metaclass) {
+            metaclass = tmptype;
+            continue;
         }
-        return (signed short)val;
-    }
-    return (signed short)__Pyx_PyInt_AsSignedLong(x);
-}
-
-static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
-    const signed int neg_one = (signed int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed int" :
-                    "value too large to convert to signed int");
-            }
-            return (signed int)-1;
+        if (PyType_IsSubtype(metaclass, tmptype))
+            continue;
+        if (PyType_IsSubtype(tmptype, metaclass)) {
+            metaclass = tmptype;
+            continue;
         }
-        return (signed int)val;
+        PyErr_SetString(PyExc_TypeError,
+                        "metaclass conflict: "
+                        "the metaclass of a derived class "
+                        "must be a (non-strict) subclass "
+                        "of the metaclasses of all its bases");
+        return NULL;
     }
-    return (signed int)__Pyx_PyInt_AsSignedLong(x);
-}
-
-static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
-    const int neg_one = (int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to int" :
-                    "value too large to convert to int");
-            }
-            return (int)-1;
-        }
-        return (int)val;
+    if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+        metaclass = &PyClass_Type;
+#else
+        metaclass = &PyType_Type;
+#endif
     }
-    return (int)__Pyx_PyInt_AsLong(x);
+    Py_INCREF((PyObject*) metaclass);
+    return (PyObject*) metaclass;
 }
 
-static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
-    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned long");
-            return (unsigned long)-1;
-        }
-        return (unsigned long)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to unsigned long");
-                return (unsigned long)-1;
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+    PyObject *ns;
+    if (metaclass) {
+        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+        if (prep) {
+            PyObject *pargs = PyTuple_Pack(2, name, bases);
+            if (unlikely(!pargs)) {
+                Py_DECREF(prep);
+                return NULL;
             }
-            return (unsigned long)PyLong_AsUnsignedLong(x);
+            ns = PyObject_Call(prep, pargs, mkw);
+            Py_DECREF(prep);
+            Py_DECREF(pargs);
         } else {
-            return (unsigned long)PyLong_AsLong(x);
+            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+                return NULL;
+            PyErr_Clear();
+            ns = PyDict_New();
         }
     } else {
-        unsigned long val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (unsigned long)-1;
-        val = __Pyx_PyInt_AsUnsignedLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        ns = PyDict_New();
     }
+    if (unlikely(!ns))
+        return NULL;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+    return ns;
+bad:
+    Py_DECREF(ns);
+    return NULL;
 }
-
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
-    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned PY_LONG_LONG");
-            return (unsigned PY_LONG_LONG)-1;
-        }
-        return (unsigned PY_LONG_LONG)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to unsigned PY_LONG_LONG");
-                return (unsigned PY_LONG_LONG)-1;
-            }
-            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+                                      PyObject *dict, PyObject *mkw,
+                                      int calculate_metaclass, int allow_py2_metaclass) {
+    PyObject *result, *margs;
+    PyObject *owned_metaclass = NULL;
+    if (allow_py2_metaclass) {
+        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+        if (owned_metaclass) {
+            metaclass = owned_metaclass;
+        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+            PyErr_Clear();
         } else {
-            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
+            return NULL;
         }
+    }
+    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+        Py_XDECREF(owned_metaclass);
+        if (unlikely(!metaclass))
+            return NULL;
+        owned_metaclass = metaclass;
+    }
+    margs = PyTuple_Pack(3, name, bases, dict);
+    if (unlikely(!margs)) {
+        result = NULL;
     } else {
-        unsigned PY_LONG_LONG val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (unsigned PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        result = PyObject_Call(metaclass, margs, mkw);
+        Py_DECREF(margs);
     }
+    Py_XDECREF(owned_metaclass);
+    return result;
 }
 
-static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
-    const long neg_one = (long)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to long");
-            return (long)-1;
-        }
-        return (long)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to long");
-                return (long)-1;
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+    if (!py_import)
+        goto bad;
+    #endif
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    #if PY_VERSION_HEX >= 0x02050000
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                #if PY_VERSION_HEX < 0x03030000
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
             }
-            return (long)PyLong_AsUnsignedLong(x);
-        } else {
-            return (long)PyLong_AsLong(x);
+            level = 0; /* try absolute import on failure */
         }
-    } else {
-        long val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (long)-1;
-        val = __Pyx_PyInt_AsLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        #endif
+        if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
+        }
+    }
+    #else
+    if (level>0) {
+        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
+        goto bad;
     }
+    module = PyObject_CallFunctionObjArgs(py_import,
+        name, global_dict, empty_dict, list, NULL);
+    #endif
+bad:
+    #if PY_VERSION_HEX < 0x03030000
+    Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
+    Py_XDECREF(empty_dict);
+    return module;
 }
 
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
-    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to PY_LONG_LONG");
-            return (PY_LONG_LONG)-1;
-        }
-        return (PY_LONG_LONG)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to PY_LONG_LONG");
-                return (PY_LONG_LONG)-1;
-            }
-            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
-        } else {
-            return (PY_LONG_LONG)PyLong_AsLongLong(x);
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
     } else {
-        PY_LONG_LONG val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsLongLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
     }
 }
 
-static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
-    const signed long neg_one = (signed long)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed long");
-            return (signed long)-1;
-        }
-        return (signed long)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to signed long");
-                return (signed long)-1;
-            }
-            return (signed long)PyLong_AsUnsignedLong(x);
-        } else {
-            return (signed long)PyLong_AsLong(x);
-        }
-    } else {
-        signed long val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (signed long)-1;
-        val = __Pyx_PyInt_AsSignedLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
+    {                                                                     \
+        func_type value = func(x);                                        \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                PyErr_SetString(PyExc_OverflowError,                      \
+                    (is_unsigned && unlikely(value < zero)) ?             \
+                    "can't convert negative value to " #target_type :     \
+                    "value too large to convert to " #target_type);       \
+                return (target_type) -1;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
     }
-}
 
-static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
-    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed PY_LONG_LONG");
-            return (signed PY_LONG_LONG)-1;
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            return (int) val;
         }
-        return (signed PY_LONG_LONG)val;
     } else
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to signed PY_LONG_LONG");
-                return (signed PY_LONG_LONG)-1;
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
         } else {
-            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
-        }
-    } else {
-        signed PY_LONG_LONG val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (signed PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsSignedLongLong(tmp);
-        Py_DECREF(tmp);
-        return val;
-    }
-}
-
-static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
-    PyObject *tmp_type, *tmp_value, *tmp_tb;
-#if CYTHON_COMPILING_IN_CPYTHON
-    PyThreadState *tstate = PyThreadState_GET();
-    tmp_type = tstate->exc_type;
-    tmp_value = tstate->exc_value;
-    tmp_tb = tstate->exc_traceback;
-    tstate->exc_type = *type;
-    tstate->exc_value = *value;
-    tstate->exc_traceback = *tb;
-#else
-    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
-    PyErr_SetExcInfo(*type, *value, *tb);
-#endif
-    *type = tmp_type;
-    *value = tmp_value;
-    *tb = tmp_tb;
-}
-
-static PyObject *__Pyx_Generator_Next(PyObject *self);
-static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
-static PyObject *__Pyx_Generator_Close(PyObject *self);
-static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
-static PyTypeObject *__pyx_GeneratorType = 0;
-#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
-#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
-#if 1 || PY_VERSION_HEX < 0x030300B0
-static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
-    PyObject *et, *ev, *tb;
-    PyObject *value = NULL;
-    __Pyx_ErrFetch(&et, &ev, &tb);
-    if (!et) {
-        Py_XDECREF(tb);
-        Py_XDECREF(ev);
-        Py_INCREF(Py_None);
-        *pvalue = Py_None;
-        return 0;
-    }
-    if (unlikely(et != PyExc_StopIteration) &&
-            unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
-        __Pyx_ErrRestore(et, ev, tb);
-        return -1;
-    }
-    if (likely(et == PyExc_StopIteration)) {
-        if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
-            if (!ev) {
-                Py_INCREF(Py_None);
-                ev = Py_None;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
+                }
             }
-            Py_XDECREF(tb);
-            Py_DECREF(et);
-            *pvalue = ev;
-            return 0;
-        }
-    }
-    PyErr_NormalizeException(&et, &ev, &tb);
-    if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
-        __Pyx_ErrRestore(et, ev, tb);
-        return -1;
-    }
-    Py_XDECREF(tb);
-    Py_DECREF(et);
-#if PY_VERSION_HEX >= 0x030300A0
-    value = ((PyStopIterationObject *)ev)->value;
-    Py_INCREF(value);
-    Py_DECREF(ev);
-#else
-    {
-        PyObject* args = PyObject_GetAttrString(ev, "args");
-        Py_DECREF(ev);
-        if (likely(args)) {
-            value = PyObject_GetItem(args, 0);
-            Py_DECREF(args);
-        }
-        if (unlikely(!value)) {
-            __Pyx_ErrRestore(NULL, NULL, NULL);
-            Py_INCREF(Py_None);
-            value = Py_None;
-        }
-    }
-#endif
-    *pvalue = value;
-    return 0;
-}
+ #endif
 #endif
-static CYTHON_INLINE
-void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
-    PyObject *exc_type = self->exc_type;
-    PyObject *exc_value = self->exc_value;
-    PyObject *exc_traceback = self->exc_traceback;
-    self->exc_type = NULL;
-    self->exc_value = NULL;
-    self->exc_traceback = NULL;
-    Py_XDECREF(exc_type);
-    Py_XDECREF(exc_value);
-    Py_XDECREF(exc_traceback);
-}
-static CYTHON_INLINE
-int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
-    if (unlikely(gen->is_running)) {
-        PyErr_SetString(PyExc_ValueError,
-                        "generator already executing");
-        return 1;
-    }
-    return 0;
-}
-static CYTHON_INLINE
-PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
-    PyObject *retval;
-    assert(!self->is_running);
-    if (unlikely(self->resume_label == 0)) {
-        if (unlikely(value && value != Py_None)) {
-            PyErr_SetString(PyExc_TypeError,
-                            "can't send non-None value to a "
-                            "just-started generator");
-            return NULL;
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
+            }
         }
-    }
-    if (unlikely(self->resume_label == -1)) {
-        PyErr_SetNone(PyExc_StopIteration);
-        return NULL;
-    }
-    if (value) {
-#if CYTHON_COMPILING_IN_PYPY
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
 #else
-        /* Generators always return to their most recent caller, not
-         * necessarily their creator. */
-        if (self->exc_traceback) {
-            PyThreadState *tstate = PyThreadState_GET();
-            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
-            PyFrameObject *f = tb->tb_frame;
-            Py_XINCREF(tstate->frame);
-            assert(f->f_back == NULL);
-            f->f_back = tstate->frame;
-        }
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
 #endif
-        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
-                            &self->exc_traceback);
-    } else {
-        __Pyx_Generator_ExceptionClear(self);
-    }
-    self->is_running = 1;
-    retval = self->body((PyObject *) self, value);
-    self->is_running = 0;
-    if (retval) {
-        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
-                            &self->exc_traceback);
-#if CYTHON_COMPILING_IN_PYPY
-#else
-        /* Don't keep the reference to f_back any longer than necessary.  It
-         * may keep a chain of frames alive or it could create a reference
-         * cycle. */
-        if (self->exc_traceback) {
-            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
-            PyFrameObject *f = tb->tb_frame;
-            Py_CLEAR(f->f_back);
+            return (int) -1;
         }
-#endif
     } else {
-        __Pyx_Generator_ExceptionClear(self);
-    }
-    return retval;
-}
-static CYTHON_INLINE
-PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
-    PyObject *ret;
-    PyObject *val = NULL;
-    __Pyx_Generator_Undelegate(gen);
-    __Pyx_PyGen_FetchStopIterationValue(&val);
-    ret = __Pyx_Generator_SendEx(gen, val);
-    Py_XDECREF(val);
-    return ret;
-}
-static PyObject *__Pyx_Generator_Next(PyObject *self) {
-    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
-    PyObject *yf = gen->yieldfrom;
-    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
-        return NULL;
-    if (yf) {
-        PyObject *ret;
-        gen->is_running = 1;
-        ret = Py_TYPE(yf)->tp_iternext(yf);
-        gen->is_running = 0;
-        if (likely(ret)) {
-            return ret;
-        }
-        return __Pyx_Generator_FinishDelegation(gen);
+        int val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
+        Py_DECREF(tmp);
+        return val;
     }
-    return __Pyx_Generator_SendEx(gen, Py_None);
 }
-static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
-    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
-    PyObject *yf = gen->yieldfrom;
-    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
-        return NULL;
-    if (yf) {
-        PyObject *ret;
-        gen->is_running = 1;
-        if (__Pyx_Generator_CheckExact(yf)) {
-            ret = __Pyx_Generator_Send(yf, value);
-        } else {
-            if (value == Py_None)
-                ret = PyIter_Next(yf);
-            else
-                ret = PyObject_CallMethod(yf, (char*)"send", (char*)"O", value);
-        }
-        gen->is_running = 0;
-        if (likely(ret)) {
-            return ret;
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
-        return __Pyx_Generator_FinishDelegation(gen);
-    }
-    return __Pyx_Generator_SendEx(gen, value);
-}
-static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
-    PyObject *retval = NULL;
-    int err = 0;
-    if (__Pyx_Generator_CheckExact(yf)) {
-        retval = __Pyx_Generator_Close(yf);
-        if (!retval)
-            return -1;
     } else {
-        PyObject *meth;
-        gen->is_running = 1;
-        meth = PyObject_GetAttrString(yf, "close");
-        if (unlikely(!meth)) {
-            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
-                PyErr_WriteUnraisable(yf);
-            }
-            PyErr_Clear();
-        } else {
-            retval = PyObject_CallFunction(meth, NULL);
-            Py_DECREF(meth);
-            if (!retval)
-                err = -1;
+        if (sizeof(int) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
         }
-        gen->is_running = 0;
-    }
-    Py_XDECREF(retval);
-    return err;
-}
-static PyObject *__Pyx_Generator_Close(PyObject *self) {
-    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
-    PyObject *retval, *raised_exception;
-    PyObject *yf = gen->yieldfrom;
-    int err = 0;
-    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
-        return NULL;
-    if (yf) {
-        Py_INCREF(yf);
-        err = __Pyx_Generator_CloseIter(gen, yf);
-        __Pyx_Generator_Undelegate(gen);
-        Py_DECREF(yf);
-    }
-    if (err == 0)
-#if PY_VERSION_HEX < 0x02050000
-        PyErr_SetNone(PyExc_StopIteration);
-#else
-        PyErr_SetNone(PyExc_GeneratorExit);
-#endif
-    retval = __Pyx_Generator_SendEx(gen, NULL);
-    if (retval) {
-        Py_DECREF(retval);
-        PyErr_SetString(PyExc_RuntimeError,
-                        "generator ignored GeneratorExit");
-        return NULL;
     }
-    raised_exception = PyErr_Occurred();
-    if (!raised_exception
-        || raised_exception == PyExc_StopIteration
-#if PY_VERSION_HEX >= 0x02050000
-        || raised_exception == PyExc_GeneratorExit
-        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
-#endif
-        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
     {
-        if (raised_exception) PyErr_Clear();      /* ignore these errors */
-        Py_INCREF(Py_None);
-        return Py_None;
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int),
+                                     little, !is_unsigned);
     }
-    return NULL;
 }
-static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
-    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
-    PyObject *typ;
-    PyObject *tb = NULL;
-    PyObject *val = NULL;
-    PyObject *yf = gen->yieldfrom;
-    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
-        return NULL;
-    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
-        return NULL;
-    if (yf) {
-        PyObject *ret;
-        Py_INCREF(yf);
-#if PY_VERSION_HEX >= 0x02050000
-        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
-            int err = __Pyx_Generator_CloseIter(gen, yf);
-            Py_DECREF(yf);
-            __Pyx_Generator_Undelegate(gen);
-            if (err < 0)
-                return __Pyx_Generator_SendEx(gen, NULL);
-            goto throw_here;
-        }
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
 #endif
-        gen->is_running = 1;
-        if (__Pyx_Generator_CheckExact(yf)) {
-            ret = __Pyx_Generator_Throw(yf, args);
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
         } else {
-            PyObject *meth = PyObject_GetAttrString(yf, "throw");
-            if (unlikely(!meth)) {
-                Py_DECREF(yf);
-                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
-                    gen->is_running = 0;
-                    return NULL;
-                }
-                PyErr_Clear();
-                __Pyx_Generator_Undelegate(gen);
-                gen->is_running = 0;
-                goto throw_here;
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
             }
-            ret = PyObject_CallObject(meth, args);
-            Py_DECREF(meth);
-        }
-        gen->is_running = 0;
-        Py_DECREF(yf);
-        if (!ret) {
-            ret = __Pyx_Generator_FinishDelegation(gen);
+            return (long) val;
         }
-        return ret;
-    }
-throw_here:
-    __Pyx_Raise(typ, val, tb, NULL);
-    return __Pyx_Generator_SendEx(gen, NULL);
-}
-static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
-    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
-    Py_VISIT(gen->closure);
-    Py_VISIT(gen->classobj);
-    Py_VISIT(gen->yieldfrom);
-    Py_VISIT(gen->exc_type);
-    Py_VISIT(gen->exc_value);
-    Py_VISIT(gen->exc_traceback);
-    return 0;
-}
-static int __Pyx_Generator_clear(PyObject *self) {
-    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
-    Py_CLEAR(gen->closure);
-    Py_CLEAR(gen->classobj);
-    Py_CLEAR(gen->yieldfrom);
-    Py_CLEAR(gen->exc_type);
-    Py_CLEAR(gen->exc_value);
-    Py_CLEAR(gen->exc_traceback);
-    return 0;
-}
-static void __Pyx_Generator_dealloc(PyObject *self) {
-    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
-    PyObject_GC_UnTrack(gen);
-    if (gen->gi_weakreflist != NULL)
-        PyObject_ClearWeakRefs(self);
-    PyObject_GC_Track(self);
-    if (gen->resume_label > 0) {
-        Py_TYPE(gen)->tp_del(self);
-        if (self->ob_refcnt > 0)
-            return;                     /* resurrected.  :( */
-    }
-    PyObject_GC_UnTrack(self);
-    __Pyx_Generator_clear(self);
-    PyObject_GC_Del(gen);
-}
-static void __Pyx_Generator_del(PyObject *self) {
-    PyObject *res;
-    PyObject *error_type, *error_value, *error_traceback;
-    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
-    if (gen->resume_label <= 0)
-        return ;
-    assert(self->ob_refcnt == 0);
-    self->ob_refcnt = 1;
-    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
-    res = __Pyx_Generator_Close(self);
-    if (res == NULL)
-        PyErr_WriteUnraisable(self);
-    else
-        Py_DECREF(res);
-    __Pyx_ErrRestore(error_type, error_value, error_traceback);
-    /* Undo the temporary resurrection; can't use DECREF here, it would
-     * cause a recursive call.
-     */
-    assert(self->ob_refcnt > 0);
-    if (--self->ob_refcnt == 0)
-        return; /* this is the normal path out */
-    /* close() resurrected it!  Make it look like the original Py_DECREF
-     * never happened.
-     */
-    {
-        Py_ssize_t refcnt = self->ob_refcnt;
-        _Py_NewReference(self);
-        self->ob_refcnt = refcnt;
-    }
-#if CYTHON_COMPILING_FOR_CPYTHON
-    assert(PyType_IS_GC(self->ob_type) &&
-           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
-    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
-     * we need to undo that. */
-    _Py_DEC_REFTOTAL;
+    } else
 #endif
-    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
-     * chain, so no more to do there.
-     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
-     * _Py_NewReference bumped tp_allocs:  both of those need to be
-     * undone.
-     */
-#ifdef COUNT_ALLOCS
-    --Py_TYPE(self)->tp_frees;
-    --Py_TYPE(self)->tp_allocs;
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
 #endif
-}
-static PyMemberDef __pyx_Generator_memberlist[] = {
-    {(char *) "gi_running",
-#if PY_VERSION_HEX >= 0x02060000
-     T_BOOL,
-#else
-     T_BYTE,
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
 #endif
-     offsetof(__pyx_GeneratorObject, is_running),
-     READONLY,
-     NULL},
-    {0, 0, 0, 0, 0}
-};
-static PyMethodDef __pyx_Generator_methods[] = {
-    {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
-    {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
-    {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
-    {0, 0, 0, 0}
-};
-static PyTypeObject __pyx_GeneratorType_type = {
-    PyVarObject_HEAD_INIT(0, 0)
-    __Pyx_NAMESTR("generator"),         /*tp_name*/
-    sizeof(__pyx_GeneratorObject),      /*tp_basicsize*/
-    0,                                  /*tp_itemsize*/
-    (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/
-    0,                                  /*tp_print*/
-    0,                                  /*tp_getattr*/
-    0,                                  /*tp_setattr*/
-#if PY_MAJOR_VERSION < 3
-    0,                                  /*tp_compare*/
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
 #else
-    0,                                  /*reserved*/
-#endif
-    0,                                   /*tp_repr*/
-    0,                                  /*tp_as_number*/
-    0,                                  /*tp_as_sequence*/
-    0,                                  /*tp_as_mapping*/
-    0,                                  /*tp_hash*/
-    0,                                  /*tp_call*/
-    0,                                  /*tp_str*/
-    0,                                  /*tp_getattro*/
-    0,                                  /*tp_setattro*/
-    0,                                  /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
-    0,                                  /*tp_doc*/
-    (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
-    0,                                  /*tp_clear*/
-    0,                                  /*tp_richcompare*/
-    offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
-    0,                                  /*tp_iter*/
-    (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
-    __pyx_Generator_methods,            /*tp_methods*/
-    __pyx_Generator_memberlist,         /*tp_members*/
-    0,                                  /*tp_getset*/
-    0,                                  /*tp_base*/
-    0,                                  /*tp_dict*/
-    0,                                  /*tp_descr_get*/
-    0,                                  /*tp_descr_set*/
-    0,                                  /*tp_dictoffset*/
-    0,                                  /*tp_init*/
-    0,                                  /*tp_alloc*/
-    0,                                  /*tp_new*/
-    0,                                  /*tp_free*/
-    0,                                  /*tp_is_gc*/
-    0,                                  /*tp_bases*/
-    0,                                  /*tp_mro*/
-    0,                                  /*tp_cache*/
-    0,                                  /*tp_subclasses*/
-    0,                                  /*tp_weaklist*/
-    __Pyx_Generator_del,                /*tp_del*/
-#if PY_VERSION_HEX >= 0x02060000
-    0,                                  /*tp_version_tag*/
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
 #endif
-};
-static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
-                                                  PyObject *closure) {
-    __pyx_GeneratorObject *gen =
-        PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
-    if (gen == NULL)
-        return NULL;
-    gen->body = body;
-    gen->closure = closure;
-    Py_XINCREF(closure);
-    gen->is_running = 0;
-    gen->resume_label = 0;
-    gen->classobj = NULL;
-    gen->yieldfrom = NULL;
-    gen->exc_type = NULL;
-    gen->exc_value = NULL;
-    gen->exc_traceback = NULL;
-    gen->gi_weakreflist = NULL;
-    PyObject_GC_Track(gen);
-    return gen;
-}
-static int __pyx_Generator_init(void) {
-    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
-    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
-    if (PyType_Ready(&__pyx_GeneratorType_type)) {
-        return -1;
-    }
-    __pyx_GeneratorType = &__pyx_GeneratorType_type;
-    return 0;
-}
-
-static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
-                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
-    PyObject *old_exc, *old_val, *old_tb;
-    PyObject *ctx;
-    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
-    #if PY_MAJOR_VERSION < 3
-    ctx = PyString_FromString(name);
-    #else
-    ctx = PyUnicode_FromString(name);
-    #endif
-    __Pyx_ErrRestore(old_exc, old_val, old_tb);
-    if (!ctx) {
-        PyErr_WriteUnraisable(Py_None);
+            return (long) -1;
+        }
     } else {
-        PyErr_WriteUnraisable(ctx);
-        Py_DECREF(ctx);
+        long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
+        Py_DECREF(tmp);
+        return val;
     }
 }
 
@@ -48369,23 +6516,6 @@ static int __Pyx_check_binary_version(void) {
     return 0;
 }
 
-static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
-#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
-    PyObject *ob = PyCapsule_New(vtable, 0, 0);
-#else
-    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
-#endif
-    if (!ob)
-        goto bad;
-    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
-        goto bad;
-    Py_DECREF(ob);
-    return 0;
-bad:
-    Py_XDECREF(ob);
-    return -1;
-}
-
 #ifndef __PYX_HAVE_RT_ImportModule
 #define __PYX_HAVE_RT_ImportModule
 static PyObject *__Pyx_ImportModule(const char *name) {
@@ -48431,7 +6561,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
         goto bad;
     if (!PyType_Check(result)) {
         PyErr_Format(PyExc_TypeError,
-            "%s.%s is not a type object",
+            "%.200s.%.200s is not a type object",
             module_name, class_name);
         goto bad;
     }
@@ -48459,7 +6589,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
     }
     else if ((size_t)basicsize != size) {
         PyErr_Format(PyExc_ValueError,
-            "%s.%s has the wrong size, try recompiling",
+            "%.200s.%.200s has the wrong size, try recompiling",
             module_name, class_name);
         goto bad;
     }
@@ -48663,6 +6793,73 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
     return 0;
 }
 
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else /* PY_VERSION_HEX < 0x03030000 */
+        if (PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_DATA_SIZE(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+#endif /* PY_VERSION_HEX < 0x03030000 */
+    } else
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+#if !CYTHON_COMPILING_IN_PYPY
+#if PY_VERSION_HEX >= 0x02060000
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
    int is_true = x == Py_True;
    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
@@ -48672,14 +6869,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   PyNumberMethods *m;
   const char *name = NULL;
   PyObject *res = NULL;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (PyInt_Check(x) || PyLong_Check(x))
 #else
   if (PyLong_Check(x))
 #endif
     return Py_INCREF(x), x;
   m = Py_TYPE(x)->tp_as_number;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (m && m->nb_int) {
     name = "int";
     res = PyNumber_Int(x);
@@ -48695,13 +6892,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
 #endif
   if (res) {
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (!PyInt_Check(res) && !PyLong_Check(res)) {
 #else
     if (!PyLong_Check(res)) {
 #endif
       PyErr_Format(PyExc_TypeError,
-                   "__%s__ returned non-%s (type %.200s)",
+                   "__%.4s__ returned non-%.4s (type %.200s)",
                    name, name, Py_TYPE(res)->tp_name);
       Py_DECREF(res);
       return NULL;
@@ -48713,9 +6910,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
   return res;
 }
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   Py_ssize_t ival;
-  PyObject* x = PyNumber_Index(b);
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+  #if PY_VERSION_HEX < 0x02060000
+    return PyInt_AsSsize_t(b);
+  #else
+    return PyLong_AsSsize_t(b);
+  #endif
+  }
+  x = PyNumber_Index(b);
   if (!x) return -1;
   ival = PyInt_AsSsize_t(x);
   Py_DECREF(x);
@@ -48734,17 +6957,6 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
 #endif
 }
-static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
-   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
-   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
-       return (size_t)-1;
-   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
-       PyErr_SetString(PyExc_OverflowError,
-                       "value too large to convert to size_t");
-       return (size_t)-1;
-   }
-   return (size_t)val;
-}
 
 
 #endif /* Py_PYTHON_H */
diff --git a/pysam/csamtools.pxd b/pysam/csamtools.pxd
index ecd08ae..10c89ba 100644
--- a/pysam/csamtools.pxd
+++ b/pysam/csamtools.pxd
@@ -1,575 +1,19 @@
-cdef extern from "string.h":
-  ctypedef int size_t
-  void *memcpy(void *dst,void *src,size_t len)
-  void *memmove(void *dst,void *src,size_t len)
-  void *memset(void *b,int c,size_t len)
-
-cdef extern from "stdlib.h":
-  void free(void *)
-  void *malloc(size_t)
-  void *calloc(size_t,size_t)
-  void *realloc(void *,size_t)
-  int c_abs "abs" (int)
-  void qsort(void *base, size_t nmemb, size_t size,
-             int (*compar)(void *,void *))
-
-cdef extern from "math.h":
-   double sqrt(double x)
-
-cdef extern from "stdio.h":
-  ctypedef struct FILE:
-    pass
-  FILE *fopen(char *,char *)
-  FILE *freopen(char *path, char *mode, FILE *stream)
-  int fileno(FILE *stream)
-  int dup2(int oldfd, int newfd)
-  int fflush(FILE *stream)
-
-  FILE * stderr
-  FILE * stdout
-  int fclose(FILE *)
-  int sscanf(char *str,char *fmt,...)
-  int printf(char *fmt,...)
-  int sprintf(char *str,char *fmt,...)
-  int fprintf(FILE *ifile,char *fmt,...)
-  char *fgets(char *str,int size,FILE *ifile)
-
-cdef extern from "ctype.h":
-  int toupper(int c)
-  int tolower(int c)
-  
-cdef extern from "unistd.h":
-  char *ttyname(int fd)
-  int isatty(int fd)  
-
-cdef extern from "string.h":
-  int strcmp(char *s1, char *s2)
-  int strncmp(char *s1,char *s2,size_t len)
-  char *strcpy(char *dest,char *src)
-  char *strncpy(char *dest,char *src, size_t len)
-  char *strdup(char *)
-  char *strcat(char *,char *)
-  size_t strlen(char *s)
-  int memcmp( void * s1, void *s2, size_t len )
-
-cdef extern from "Python.h":
-   long _Py_HashPointer(void*)
-   FILE* PyFile_AsFile(object)
-
-cdef extern from "razf.h":
-  pass
-
-cdef extern from "stdint.h":
-  ctypedef int int8_t
-  ctypedef int int16_t
-  ctypedef int int32_t
-  ctypedef int int64_t
-  ctypedef int uint8_t
-  ctypedef int uint16_t
-  ctypedef int uint32_t
-  ctypedef int uint64_t
-
-cdef extern from "bam.h":
-
-  # constants
-  int BAM_DEF_MASK
-  # IF _IOLIB=2, bamFile = BGZF, see bgzf.h
-  # samtools uses KNETFILE, check how this works
-
-  ctypedef struct tamFile:
-      pass
-
-  ctypedef struct bamFile:
-      pass
-
-  ctypedef struct bam1_core_t:
-      int32_t tid 
-      int32_t pos
-      uint32_t bin
-      uint32_t qual
-      uint32_t l_qname
-      uint32_t flag
-      uint32_t n_cigar
-      int32_t l_qseq
-      int32_t mtid 
-      int32_t mpos 
-      int32_t isize
-
-  ctypedef struct bam1_t:
-    bam1_core_t core
-    int l_aux
-    int data_len
-    int m_data
-    uint8_t *data
-
-  ctypedef struct bam_pileup1_t:
-      bam1_t *b 
-      int32_t qpos 
-      int indel
-      int level
-      uint32_t is_del
-      uint32_t is_head
-      uint32_t is_tail
-
-  ctypedef int (*bam_pileup_f)(uint32_t tid, uint32_t pos, int n, bam_pileup1_t *pl, void *data)
-
-  ctypedef int (*bam_fetch_f)(bam1_t *b, void *data)
-
-  ctypedef struct bam_header_t:
-     int32_t n_targets
-     char **target_name
-     uint32_t *target_len
-     void *hash
-     void *rg2lib
-     int l_text
-     char *text
-
-  ctypedef struct bam_index_t:
-      int32_t n
-      uint64_t n_no_coor
-
-  ctypedef struct bam_plbuf_t:
-      pass
-
-  ctypedef struct pair64_t:
-      uint64_t u, v
-      
-  ctypedef struct bam_iter_t:
-      int from_first
-      int tid, beg, end, n_off, i, finished
-      uint64_t curr_off
-      pair64_t *off
-
-  # ctypedef __bam_iter_t * bam_iter_t
-
-  bam1_t * bam_init1()
-  void bam_destroy1(bam1_t *)
-
-  bamFile razf_dopen(int data_fd, char *mode)
-
-  int64_t bam_seek( bamFile fp, uint64_t voffset, int where)
-  int64_t bam_tell( bamFile fp )
-
-  # void bam_init_header_hash(bam_header_t *header)
-
-  ###############################################
-  # stand-ins for samtools macros
-  uint32_t * bam1_cigar( bam1_t * b)
-  char * bam1_qname( bam1_t * b)
-  uint8_t * bam1_seq( bam1_t * b)
-  uint8_t * bam1_qual( bam1_t * b)
-  uint8_t * bam1_aux( bam1_t * b)
-
-  ###############################################
-  # bam iterator interface
-  bam_iter_t bam_iter_query( bam_index_t *idx, int tid, int beg, int end)
-
-  int bam_iter_read(bamFile fp, bam_iter_t iter, bam1_t *b)
-
-  void bam_iter_destroy(bam_iter_t iter)
-
-  ###############################################
-
-  bam1_t * bam_dup1( bam1_t *src ) 
-  
-  bam1_t * bam_copy1(bam1_t *bdst, bam1_t *bsrc)
-  bam_index_t *bam_index_load(char *f )
-
-  void bam_index_destroy(bam_index_t *idx)
-
-  int bam_parse_region(bam_header_t *header, char *str, int *ref_id, int *begin, int *end)
-
-  ###############################################
-  bam_plbuf_t *bam_plbuf_init(bam_pileup_f func, void *data)
-
-  int bam_fetch(bamFile fp, bam_index_t *idx, int tid, int beg, int end, void *data, bam_fetch_f func)
-
-  int bam_plbuf_push(bam1_t *b, bam_plbuf_t *buf)
-
-  void bam_plbuf_destroy(bam_plbuf_t *buf)
-  ########################################
-  # pileup iterator interface
-  ctypedef struct bam_plp_t:
-      pass
-
-  ctypedef bam_pileup1_t * const_bam_pileup1_t_ptr "const bam_pileup1_t *"
-
-  ctypedef int (*bam_plp_auto_f)(void *data, bam1_t *b)
-
-  bam_plp_t bam_plp_init( bam_plp_auto_f func, void *data)
-  int bam_plp_push( bam_plp_t iter,  bam1_t *b)
-  bam_pileup1_t * bam_plp_next( bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
-  bam_pileup1_t * bam_plp_auto( bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
-  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)
-
-  ##################################################
-
-  int bam_read1( bamFile fp, bam1_t *b)
-  int bam_validate1( bam_header_t *header, bam1_t *b)
-  int bam_write1( bamFile fp, bam1_t *b)
-
-  bam_header_t *bam_header_init()
-
-  int bam_header_write( bamFile fp, bam_header_t *header)
-
-  bam_header_t *bam_header_read( bamFile fp )
-
-  void bam_header_destroy(bam_header_t *header)
-
-  bam1_t * bam_dup1( bam1_t *src ) 
-  
-  bam1_t * bam_copy1(bam1_t *bdst, bam1_t *bsrc)
-
-  uint8_t *bam_aux_get(bam1_t *b,  char tag[2])
-
-  int32_t bam_aux2i(uint8_t *s)
-  float bam_aux2f(uint8_t *s)
-  double bam_aux2d(uint8_t *s)
-  char bam_aux2A( uint8_t *s)
-  char *bam_aux2Z( uint8_t *s)
-  
-  int bam_reg2bin(uint32_t beg, uint32_t end)
-
-  uint32_t bam_calend(bam1_core_t *c, uint32_t *cigar)
-
-  int bam_aux_type2size( int )
-    
-
-cdef extern from *:
-    ctypedef char* const_char_ptr "const char*"
-
-cdef extern from "sam.h":
-
-  ctypedef struct samfile_t_un:
-    tamFile tamr
-    bamFile bam
-    FILE *tamw
-    
-  ctypedef struct samfile_t:
-     int type
-     samfile_t_un x
-     bam_header_t *header
-
-  samfile_t *samopen( const_char_ptr fn, char * mode, void *aux)
-
-  int sampileup( samfile_t *fp, int mask, bam_pileup_f func, void *data)
-
-  void samclose(samfile_t *fp)
-
-  int samread(samfile_t *fp, bam1_t *b)
-
-  int samwrite(samfile_t *fp, bam1_t *b)
-
-  int bam_prob_realn(bam1_t *b, char *ref)
-  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
-     
-#  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
-    
-#  void bam_maqindel_ret_destroy( bam_maqindel_ret_t * )
-
-#  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 )
-                                                               
-
-cdef extern from "faidx.h":
-
-   ctypedef struct faidx_t:
-      pass
-
-   int fai_build(char *fn)
-
-   void fai_destroy(faidx_t *fai)
-
-   faidx_t *fai_load(char *fn)
-
-   char *fai_fetch(faidx_t *fai, char *reg, int *len)
-
-   int faidx_fetch_nseq(faidx_t *fai)
-
-   char *faidx_fetch_seq(faidx_t *fai, char *c_name, 
-                         int p_beg_i, int p_end_i, int *len)
-
+from libc.stdlib cimport calloc, free
 
 cdef extern from "pysam_util.h":
-
-    int pysam_pileup_next(bam1_t *b, 
-                          bam_plbuf_t *buf, 
-                          bam_pileup1_t ** plp,
-                          int * tid,
-                          int * pos,
-                          int * n_plp )
-
-
-    int pysam_dispatch(int argc, char *argv[] )
-
-    # stand-in functions for samtools macros
-    void pysam_bam_destroy1( bam1_t * b) 
-
-    # add *nbytes* into the variable length data of *src* at *pos*
-    bam1_t * pysam_bam_update( bam1_t * b, 
-                               size_t nbytes_old,
-                               size_t nbytes_new,
-                               uint8_t * pos )
-
-    # translate char to unsigned char
-    unsigned char pysam_translate_sequence( char s )
-
-    unsigned char * bam_nt16_table
-
-    int pysam_reference2tid( bam_header_t *header, char * s )
-
-    void pysam_set_stderr( int fd )
+    int pysam_dispatch(int argc, char *argv[])
+    void pysam_set_stderr(int fd)
     void pysam_unset_stderr()
 
-    # 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 )
-
-    ctypedef struct gzFile:
-        pass  
-
-    ctypedef struct kstring_t:
-        size_t l
-        size_t m
-        char *s
-
-    ctypedef struct kseq_t:
-        kstring_t name
-        kstring_t comment
-        kstring_t seq
-        kstring_t qual
 
-    gzFile gzopen( char *, char * )
-    kseq_t * kseq_init( gzFile )
-    int kseq_read( kseq_t * )
-    void kseq_destroy( kseq_t * )
-    void gzclose( gzFile )
-
-####################################################################
-# Utility types
-
-ctypedef struct __iterdata:
-    samfile_t * samfile
-    bam_iter_t iter
-    faidx_t * fastafile
-    int tid
-    char * seq
-    int seq_len
-
-####################################################################
-#
-# Exposing pysam extension classes
-#
-# Note: need to declare all C fields and methods here
-#
-cdef class Fastafile:
-    cdef object _filename, _references, _lengths, reference2length
-    cdef faidx_t* fastafile
-    cdef char* _fetch(self, char* reference, int start, int end, int* length)
-
-cdef class FastqProxy:
-    cdef kseq_t * _delegate
-
-cdef class Fastqfile:
-    cdef object _filename
-    cdef gzFile fastqfile
-    cdef kseq_t * entry 
-
-    cdef kseq_t * getCurrent( self )
-    cdef int cnext(self)
-
-cdef class AlignedRead:
-
-    # object that this AlignedRead represents
-    cdef bam1_t * _delegate
-
-cdef class Samfile:
-    cdef object _filename
-    # pointer to samfile
-    cdef samfile_t * samfile
-    # pointer to index
-    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
-    cdef bam1_t * b
-    # 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)
-
-    # write an aligned read
-    cpdef int write( self, AlignedRead read )
-
-    cdef char * _getrname( self, int tid )
-
-cdef class PileupProxy:
-    cdef bam_pileup1_t ** plp
-    cdef int tid
-    cdef int pos
-    cdef int n_pu
-
-cdef class PileupRead:
-    cdef AlignedRead _alignment
-    cdef int32_t  _qpos
-    cdef int _indel
-    cdef int _level
-    cdef uint32_t _is_del
-    cdef uint32_t _is_head
-    cdef uint32_t _is_tail
-
-cdef class IteratorRow:
-    pass
-
-cdef class IteratorRowRegion(IteratorRow):
-    cdef bam_iter_t             iter # iterator state object
-    cdef bam1_t *               b
-    cdef int                    retval
-    cdef Samfile                samfile
-    cdef samfile_t              * fp
-    # true if samfile belongs to this object
-    cdef int owns_samfile
-
-    cdef bam1_t * getCurrent( self )
-
-    cdef int cnext(self)
-
-cdef class IteratorRowAll(IteratorRow):
-    cdef bam1_t * b
-    cdef samfile_t * fp
-    cdef int owns_samfile
-    cdef bam1_t * getCurrent( self )
-    cdef int cnext(self)
-
-cdef class IteratorRowAllRefs(IteratorRow):
-    cdef Samfile     samfile
-    cdef int         tid
-    cdef IteratorRowRegion rowiter
-
-cdef class IteratorRowSelection(IteratorRow):
-    cdef bam1_t * b
-    cdef int current_pos
-    cdef samfile_t * fp
-    cdef positions
-    # true if samfile belongs to this object
-    cdef int owns_samfile
-
-    cdef bam1_t * getCurrent( self )
-
-    cdef int cnext(self)
-
-cdef class IteratorColumn:
-
-    # result of the last plbuf_push
-    cdef IteratorRowRegion iter
-    cdef int tid
-    cdef int pos
-    cdef int n_plp
-    cdef int mask
-    cdef const_bam_pileup1_t_ptr plp
-    cdef bam_plp_t pileup_iter
-    cdef __iterdata iterdata
-    cdef Samfile samfile
-    cdef Fastafile fastafile
-    cdef stepper
-    cdef int max_depth
-
-    cdef int cnext(self)
-    cdef char * getSequence( self )
-    cdef setMask( self, mask )
-    cdef setupIteratorData( self,
-                            int tid,
-                            int start,
-                            int end,
-                            int reopen = ? )
-
-    cdef reset( self, tid, start, end )
-
-cdef class IteratorColumnRegion(IteratorColumn):
-    cdef int start
-    cdef int end
-    cdef int truncate
-
-cdef class IteratorColumnAllRefs(IteratorColumn):
-    pass
+cdef extern from "sam.h":
 
-cdef class IndexedReads:
-    cdef Samfile samfile
-    cdef samfile_t * fp
-    cdef index
-    # true if samfile belongs to this object
-    cdef int owns_samfile
+    ctypedef struct bam1_t
 
+    # functions not actually declared in sam.h, but available
+    # as extern
+    # 
+    # implemented in samtools/bam_md.c
+    int bam_prob_realn(bam1_t *b, char *ref)
+    int bam_cap_mapQ(bam1_t *b, char *ref, int thres)
 
diff --git a/pysam/csamtools.pyx b/pysam/csamtools.pyx
index 90033bd..789284f 100644
--- a/pysam/csamtools.pyx
+++ b/pysam/csamtools.pyx
@@ -4,15 +4,8 @@
 import tempfile
 import os
 import sys
-import types
-import itertools
-import struct
-import ctypes
-import collections
-import re
 import platform
-import warnings
-from cpython cimport PyErr_SetString, PyBytes_Check, PyUnicode_Check, PyBytes_FromStringAndSize
+from cpython cimport PyBytes_Check, PyUnicode_Check
 from cpython.version cimport PY_MAJOR_VERSION
 
 ########################################################################
@@ -21,3322 +14,25 @@ from cpython.version cimport PY_MAJOR_VERSION
 ## Python 3 compatibility functions
 ########################################################################
 IS_PYTHON3 = PY_MAJOR_VERSION >= 3
-cdef from_string_and_size(char* s, size_t length):
-    if PY_MAJOR_VERSION < 3:
-        return s[:length]
-    else:
-        return s[:length].decode("ascii")
-
-# filename encoding (copied from lxml.etree.pyx)
-cdef str _FILENAME_ENCODING
-_FILENAME_ENCODING = sys.getfilesystemencoding()
-if _FILENAME_ENCODING is None:
-    _FILENAME_ENCODING = sys.getdefaultencoding()
-if _FILENAME_ENCODING is None:
-    _FILENAME_ENCODING = 'ascii'
-
-#cdef char* _C_FILENAME_ENCODING
-#_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
-
-cdef bytes _encodeFilename(object filename):
-    """Make sure a filename is 8-bit encoded (or None)."""
-    if filename is None:
-        return None
-    elif PyBytes_Check(filename):
-        return filename
-    elif PyUnicode_Check(filename):
-        return filename.encode(_FILENAME_ENCODING)
-    else:
-        raise TypeError, u"Argument must be string or unicode."
-
-
-cdef bytes _force_bytes(object s):
-    u"""convert string or unicode object to bytes, assuming ascii encoding.
-    """
-    if PY_MAJOR_VERSION < 3:
-        return s
-    elif s is None:
-        return None
-    elif PyBytes_Check(s):
-        return s
-    elif PyUnicode_Check(s):
-        return s.encode('ascii')
-    else:
-        raise TypeError, u"Argument must be string, bytes or unicode."
-
-cdef inline bytes _force_cmdline_bytes(object s):
-    return _force_bytes(s)
-
-cdef _charptr_to_str(char* s):
-    if PY_MAJOR_VERSION < 3:
-        return s
-    else:
-        return s.decode("ascii")
-
-cdef _force_str(object s):
-    """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
-    if s is None:
-        return None
-    if PY_MAJOR_VERSION < 3:
-        return s
-    elif PyBytes_Check(s):
-        return s.decode('ascii')
-    else:
-        # assume unicode
-        return s
-########################################################################
-########################################################################
-########################################################################
-## Constants and global variables
-########################################################################
-# defines imported from samtools
-DEF SEEK_SET = 0
-DEF SEEK_CUR = 1
-DEF SEEK_END = 2
-
-## These are bits set in the flag.
-## have to put these definitions here, in csamtools.pxd they got ignored
-## @abstract the read is paired in sequencing, no matter whether it is mapped in a pair */
-DEF BAM_FPAIRED       =1
-## @abstract the read is mapped in a proper pair */
-DEF BAM_FPROPER_PAIR  =2
-## @abstract the read itself is unmapped; conflictive with BAM_FPROPER_PAIR */
-DEF BAM_FUNMAP        =4
-## @abstract the mate is unmapped */
-DEF BAM_FMUNMAP       =8
-## @abstract the read is mapped to the reverse strand */
-DEF BAM_FREVERSE      =16
-## @abstract the mate is mapped to the reverse strand */
-DEF BAM_FMREVERSE     =32
-## @abstract this is read1 */
-DEF BAM_FREAD1        =64
-## @abstract this is read2 */
-DEF BAM_FREAD2       =128
-## @abstract not primary alignment */
-DEF BAM_FSECONDARY   =256
-## @abstract QC failure */
-DEF BAM_FQCFAIL      =512
-## @abstract optical or PCR duplicate */
-DEF BAM_FDUP        =1024
-
-#####################################################################
-# CIGAR operations
-DEF BAM_CIGAR_SHIFT=4
-DEF BAM_CIGAR_MASK=((1 << BAM_CIGAR_SHIFT) - 1)
-
-DEF BAM_CMATCH     = 0
-DEF BAM_CINS       = 1
-DEF BAM_CDEL       = 2
-DEF BAM_CREF_SKIP  = 3
-DEF BAM_CSOFT_CLIP = 4
-DEF BAM_CHARD_CLIP = 5
-DEF BAM_CPAD       = 6
-DEF BAM_CEQUAL     = 7
-DEF BAM_CDIFF      = 8
-
-cdef char* CODE2CIGAR= "MIDNSHP=X"
-if IS_PYTHON3:
-    CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
-else:
-    CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
-CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
-
-#####################################################################
-## set pysam stderr to /dev/null
-pysam_unset_stderr()
-
-#####################################################################
-# hard-coded constants
-cdef char * bam_nt16_rev_table = "=ACMGRSVTWYHKDBN"
-cdef int max_pos = 2 << 29
-
-#####################################################################
-#####################################################################
-#####################################################################
-## private factory methods
-#####################################################################
-cdef class AlignedRead
-cdef makeAlignedRead(bam1_t * src):
-    '''enter src into AlignedRead.'''
-    cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
-    dest._delegate = bam_dup1(src)
-    return dest
-
-cdef class PileupProxy
-cdef makePileupProxy( bam_pileup1_t ** plp, int tid, int pos, int n ):
-     cdef PileupProxy dest = PileupProxy.__new__(PileupProxy)
-     dest.plp = plp
-     dest.tid = tid
-     dest.pos = pos
-     dest.n = n
-     return dest
-
-cdef class PileupRead
-cdef makePileupRead( bam_pileup1_t * src ):
-    '''fill a  PileupRead object from a bam_pileup1_t * object.'''
-    cdef PileupRead dest = PileupRead.__new__(PileupRead)
-    dest._alignment = makeAlignedRead( src.b )
-    dest._qpos = src.qpos
-    dest._indel = src.indel
-    dest._level = src.level
-    dest._is_del = src.is_del
-    dest._is_head = src.is_head
-    dest._is_tail = src.is_tail
-    return dest
-
-cdef class FastqProxy
-cdef makeFastqProxy( kseq_t * src):
-    '''enter src into AlignedRead.'''
-    cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
-    dest._delegate = src
-    return dest
-
-cdef convertBinaryTagToList( uint8_t * s ):
-    """return bytesize, number of values list of values in s."""
-    cdef char auxtype
-    cdef uint8_t byte_size
-    cdef int32_t nvalues
-
-    # get byte size
-    auxtype = s[0]
-    byte_size = bam_aux_type2size( auxtype )
-    s += 1
-    # get number of values in array
-    nvalues = (<int32_t*>s)[0]
-    s += 4
-    # get values
-    values = []
-    if auxtype == 'c':
-        for x from 0 <= x < nvalues:
-            values.append((<int8_t*>s)[0])
-            s += 1
-    elif auxtype == 'C':
-        for x from 0 <= x < nvalues:
-            values.append((<uint8_t*>s)[0])
-            s += 1
-    elif auxtype == 's':
-        for x from 0 <= x < nvalues:
-            values.append((<int16_t*>s)[0])
-            s += 2
-    elif auxtype == 'S':
-        for x from 0 <= x < nvalues:
-            values.append((<uint16_t*>s)[0])
-            s += 2
-    elif auxtype == 'i':
-        for x from 0 <= x < nvalues:
-            values.append((<int32_t*>s)[0])
-            s += 4
-    elif auxtype == 'I':
-        for x from 0 <= x < nvalues:
-            values.append((<uint32_t*>s)[0])
-            s += 4
-    elif auxtype == 'f':
-        for x from 0 <= x < nvalues:
-            values.append((<float*>s)[0])
-            s += 4
-
-    return byte_size, nvalues, values
-
-#####################################################################
-#####################################################################
-#####################################################################
-## Generic callbacks for inserting python callbacks.
-#####################################################################
-cdef int fetch_callback( bam1_t *alignment, void *f):
-    '''callback for bam_fetch.
-
-    calls function in *f* with a new :class:`AlignedRead` object as parameter.
-    '''
-    a = makeAlignedRead( alignment )
-    (<object>f)(a)
-
-class PileupColumn(object):
-    '''A pileup column. A pileup column contains
-    all the reads that map to a certain target base.
-
-    tid
-        chromosome ID as is defined in the header
-    pos
-        the target base coordinate (0-based)
-    n
-        number of reads mapping to this column
-    pileups
-        list of reads (:class:`pysam.PileupRead`) aligned to this column
-    '''
-    def __str__(self):
-        return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
-            "\n" + "\n".join( map(str, self.pileups) )
-
-cdef int pileup_callback( uint32_t tid, uint32_t pos, int n, bam_pileup1_t *pl, void *f):
-    '''callback for pileup.
-
-    calls function in *f* with a new :class:`Pileup` object as parameter.
-
-    tid
-        chromosome ID as is defined in the header
-    pos
-        start coordinate of the alignment, 0-based
-    n
-        number of elements in pl array
-    pl
-        array of alignments
-    data
-        user provided data
-    '''
-
-    p = PileupColumn()
-    p.tid = tid
-    p.pos = pos
-    p.n = n
-    pileups = []
-
-    cdef int x
-    for x from 0 <= x < n:
-        pileups.append( makePileupRead( &(pl[x]) ) )
-    p.pileups = pileups
-
-    (<object>f)(p)
-
-cdef int pileup_fetch_callback( bam1_t *b, void *data):
-    '''callback for bam_fetch.
-
-    Fetches reads and submits them to pileup.
-    '''
-    cdef bam_plbuf_t * buf
-    buf = <bam_plbuf_t*>data
-    bam_plbuf_push(b, buf)
-    return 0
-
-class StderrStore():
-    '''
-    stderr is captured.
-    '''
-    def __init__(self):
-        return
-        self.stderr_h, self.stderr_f = tempfile.mkstemp()
-        self.stderr_save = Outs( sys.stderr.fileno() )
-        self.stderr_save.setfd( self.stderr_h )
-
-    def readAndRelease( self ):
-        return []
-        self.stderr_save.restore()
-        lines = []
-        if os.path.exists(self.stderr_f):
-            lines = open( self.stderr_f, "r" ).readlines()
-            os.remove( self.stderr_f )
-        return lines
-
-    def release(self):
-        return
-        self.stderr_save.restore()
-        if os.path.exists(self.stderr_f):
-            os.remove( self.stderr_f )
-
-    def __del__(self):
-        self.release()
-
-class StderrStoreWindows():
-    '''does nothing. stderr can't be redirected on windows'''
-    def __init__(self): pass
-    def readAndRelease(self): return []
-    def release(self): pass
-
-if platform.system()=='Windows':
-    del StderrStore
-    StderrStore = StderrStoreWindows
-
-
-######################################################################
-######################################################################
-######################################################################
-# valid types for sam headers
-VALID_HEADER_TYPES = { "HD" : dict,
-                       "SQ" : list,
-                       "RG" : list,
-                       "PG" : list,
-                       "CO" : list }
-
-# order of records within sam headers
-VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO" )
-
-# type conversions within sam header records
-VALID_HEADER_FIELDS = { "HD" : { "VN" : str, "SO" : str, "GO" : str },
-                        "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str },
-                        "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str, 
-                                 "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,},
-                        "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str, "PP" : str }, }
-
-# output order of fields within records
-VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
-                       "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
-                       "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
-                       "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
-
-
-######################################################################
-######################################################################
-######################################################################
-## Public methods
-######################################################################
-cdef class Fastafile:
-    '''*(filename)*
-
-    A *FASTA* file. The file is automatically opened.
-
-    The file expects an indexed fasta file.
-
-    TODO:
-        add automatic indexing.
-        add function to get sequence names.
-    '''
-
-    def __cinit__(self, *args, **kwargs ):
-        self.fastafile = NULL
-        self._filename = None
-        self._references = None
-        self._lengths = None
-        self.reference2length = None
-        self._open( *args, **kwargs )
-
-    def _isOpen( self ):
-        '''return true if samfile has been opened.'''
-        return self.fastafile != NULL
-
-    def __len__(self):
-        if self.fastafile == NULL:
-            raise ValueError( "calling len() on closed file" )
-
-        return faidx_fetch_nseq(self.fastafile)
-
-    def _open(self, filename):
-        '''open an indexed fasta file.
-
-        This method expects an indexed fasta file.
-        '''
-
-        # close a previously opened file
-        if self.fastafile != NULL: self.close()
-        self._filename = _encodeFilename(filename)
-        self.fastafile = fai_load(self._filename)
-
-        if self.fastafile == NULL:
-            raise IOError("could not open file `%s`" % filename)
-
-        # read index
-        if not os.path.exists( self._filename + b".fai" ):
-            raise ValueError("could not locate index file")
-
-        with open( self._filename + b".fai" ) as inf:
-            data = [ x.split("\t") for x in inf ]
-            self._references = tuple(x[0] for x in data)
-            self._lengths = tuple(int(x[1]) for x in data)
-            self.reference2length = dict(zip(self._references, self._lengths))
-
-    def close( self ):
-        if self.fastafile != NULL:
-            fai_destroy( self.fastafile )
-            self.fastafile = NULL
-
-    def __dealloc__(self):
-        self.close()
-
-    property filename:
-        '''number of :term:`filename` associated with this object.'''
-        def __get__(self):
-            return self._filename
-
-    property references:
-        '''tuple with the names of :term:`reference` sequences.'''
-        def __get__(self):
-            return self._references
-
-    property nreferences:
-        '''number of :term:`reference` sequences in the file.'''
-        def __get__(self):
-            return len(self._references) if self.references else None
-
-    property lengths:
-        '''tuple with the lengths of :term:`reference` sequences.'''
-        def __get__(self):
-            return self._lengths
-
-    def fetch( self,
-               reference = None,
-               start = None,
-               end = None,
-               region = None):
-
-        '''*(reference = None, start = None, end = None, region = None)*
-
-        fetch :meth:`AlignedRead` objects in a :term:`region` using 0-based indexing.
-
-        The region is specified by :term:`reference`, *start* and *end*.
-
-        fetch returns an empty string if the region is out of range or addresses an unknown *reference*.
-
-        If *reference* is given and *start* is None, the sequence from the
-        first base is returned. Similarly, if *end* is None, the sequence
-        until the last base is returned.
-
-        Alternatively, a samtools :term:`region` string can be supplied.
-        '''
-
-        if not self._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        cdef int length
-        cdef char * seq
-
-        if not region:
-            if reference is None: raise ValueError( 'no sequence/region supplied.' )
-            if start is None: start = 0
-            if end is None: end = max_pos -1
-
-            if start > end: raise ValueError( 'invalid region: start (%i) > end (%i)' % (start, end) )
-            if start == end: return b""
-            # valid ranges are from 0 to 2^29-1
-            if not 0 <= start < max_pos: raise IndexError( 'start out of range (%i)' % start )
-            if not 0 <= end < max_pos: raise IndexError( 'end out of range (%i)' % end )
-            # note: faidx_fetch_seq has a bug such that out-of-range access
-            # always returns the last residue. Hence do not use faidx_fetch_seq,
-            # but use fai_fetch instead
-            # seq = faidx_fetch_seq(self.fastafile,
-            #                       reference,
-            #                       start,
-            #                       end-1,
-            #                       &length)
-            region = "%s:%i-%i" % (reference, start+1, end)
-            if PY_MAJOR_VERSION >= 3:
-                region = region.encode('ascii')
-            seq = fai_fetch( self.fastafile,
-                             region,
-                             &length )
-        else:
-            # samtools adds a '\0' at the end
-            seq = fai_fetch( self.fastafile, region, &length )
-
-        # copy to python
-        if seq == NULL:
-            return b""
-        else:
-            try:
-                py_seq = seq[:length]
-            finally:
-                free(seq)
-
-        return py_seq
-
-    cdef char * _fetch( self, char * reference, int start, int end, int * length ):
-        '''fetch sequence for reference, start and end'''
-
-        return faidx_fetch_seq(self.fastafile,
-                               reference,
-                               start,
-                               end-1,
-                               length )
-
-    def getReferenceLength( self, reference ):
-        '''return the length of reference.'''
-        return self.reference2length[reference]
-
-    def __getitem__(self, reference):
-        return self.fetch(reference)
-
-    def __contains__( self, reference ):
-        '''return true if reference in fasta file.'''
-        return reference in self.reference2length
-
-######################################################################
-######################################################################
-######################################################################
-## Fastq file
-######################################################################
-
-cdef class FastqProxy:
-    def __init__(self): pass
-
-    property name:
-        def __get__(self):
-            return self._delegate.name.s
-
-    property sequence:
-        def __get__(self):
-            return self._delegate.seq.s
-
-    property comment:
-        def __get__(self):
-            if self._delegate.comment.l:
-                return self._delegate.comment.s
-            else: return None
-
-    property quality:
-        def __get__(self):
-            if self._delegate.qual.l:
-                return self._delegate.qual.s
-            else: return None
-
-cdef class Fastqfile:
-    '''*(filename)*
-
-    A *FASTQ* file. The file is automatically opened.
-
-    '''
-    def __cinit__(self, *args, **kwargs ):
-        # self.fastqfile = <gzFile*>NULL
-        self._filename = None
-        self.entry = NULL
-        self._open( *args, **kwargs )
-
-    def _isOpen( self ):
-        '''return true if samfile has been opened.'''
-        return self.entry != NULL
-
-    def _open(self, filename):
-        '''open an indexed fasta file.
-
-        This method expects an indexed fasta file.
-        '''
-        self.close()
-
-        if not os.path.exists( filename ):
-            raise IOError( "No such file or directory: %s" % filename )
-
-        filename = _encodeFilename(filename)
-        self.fastqfile = gzopen( filename, "r" )
-        self.entry = kseq_init( self.fastqfile )
-        self._filename = filename
-
-    def close( self ):
-        '''close file.'''
-        if self.entry != NULL:
-            gzclose( self.fastqfile )
-            if self.entry:
-                kseq_destroy(self.entry)
-                self.entry = NULL
-
-    def __dealloc__(self):
-        self.close()
-
-    property filename:
-        '''number of :term:`filename` associated with this object.'''
-        def __get__(self):
-            return self._filename
-
-    def __iter__(self):
-        if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-        return self
-
-    cdef kseq_t * getCurrent( self ):
-        return self.entry
-
-    cdef int cnext(self):
-        '''C version of iterator
-        '''
-        return kseq_read(self.entry)
-
-    def __next__(self):
-        """
-        python version of next().
-        """
-        cdef int l
-        l = kseq_read( self.entry)
-        if (l > 0):
-            return makeFastqProxy( self.entry )
-        else:
-            raise StopIteration
-
-#------------------------------------------------------------------------
-#------------------------------------------------------------------------
-#------------------------------------------------------------------------
-cdef int count_callback( bam1_t *alignment, void *f):
-     '''callback for bam_fetch - count number of reads.
-     '''
-     cdef int* counter = (<int*>f)
-     counter[0] += 1;
-
-ctypedef struct MateData:
-     char * name
-     bam1_t * mate
-     uint32_t flag
-
-#------------------------------------------------------------------------
-#------------------------------------------------------------------------
-#------------------------------------------------------------------------
-cdef int mate_callback( bam1_t *alignment, void *f):
-     '''callback for bam_fetch = filter mate
-     '''
-     cdef MateData * d = (<MateData*>f)
-     # printf("mate = %p, name1 = %s, name2=%s\t%i\t%i\t%i\n",
-     #        d.mate, d.name, bam1_qname(alignment),
-     #        d.flag, alignment.core.flag, alignment.core.flag & d.flag)
-
-     if d.mate == NULL:
-         # could be sped up by comparing the lengths of query strings first
-         # using l_qname
-         #
-         # also, make sure that we get the other read by comparing
-         # the flags
-         if alignment.core.flag & d.flag != 0 and \
-                 strcmp( bam1_qname( alignment ), d.name ) == 0:
-             d.mate = bam_dup1( alignment )
-
-
-cdef class Samfile:
-    '''*(filename, mode=None, template = None, referencenames = None, referencelengths = None, text = NULL, header = None,
-         add_sq_text = False, check_header = True, check_sq = True )*
-
-    A :term:`SAM`/:term:`BAM` formatted file. The file is automatically opened.
-
-    *mode* should be ``r`` for reading or ``w`` for writing. The default is text mode (:term:`SAM`). For binary
-    (:term:`BAM`) I/O you should append ``b`` for compressed or ``u`` for uncompressed :term:`BAM` output.
-    Use ``h`` to output header information in text (:term:`TAM`)  mode.
-
-    If ``b`` is present, it must immediately follow ``r`` or ``w``.
-    Valid modes are ``r``, ``w``, ``wh``, ``rb``, ``wb`` and ``wbu``. For instance, to open
-    a :term:`BAM` formatted file for reading, type::
-
-        f = pysam.Samfile('ex1.bam','rb')
-
-    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.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.
-
-    For writing, the header of a :term:`SAM` file/:term:`BAM` file can be constituted from several
-    sources (see also the samtools format specification):
-
-        1. If *template* is given, the header is copied from a another *Samfile*
-           (*template* must be of type *Samfile*).
-
-        2. If *header* is given, the header is built from a multi-level dictionary. The first level
-           are the four types ('HD', 'SQ', ...). The second level are a list of lines, with each line
-           being a list of tag-value pairs. The header is constructed first from all the defined fields,
-           followed by user tags in alphabetical order.
-
-        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*. 
-
-    By default, if file a file is opened in mode 'r', it is checked for a valid header
-    (*check_header* = True) and a definition of chromosome names (*check_sq* = True). 
-    
-    '''
-
-    def __cinit__(self, *args, **kwargs ):
-        self.samfile = NULL
-        self._filename = None
-        self.isbam = False
-        self.isstream = False
-        self._open( *args, **kwargs )
-
-        # allocate memory for iterator
-        self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
-
-    def _isOpen( self ):
-        '''return true if samfile has been opened.'''
-        return self.samfile != NULL
-
-    def _hasIndex( self ):
-        '''return true if samfile has an existing (and opened) index.'''
-        return self.index != NULL
-
-    def _open( self,
-               filename,
-               mode = None,
-               Samfile template = None,
-               referencenames = None,
-               referencelengths = None,
-               text = None,
-               header = None,
-               port = None,
-               add_sq_text = True,
-               check_header = True,
-               check_sq = True,
-              ):
-        '''open a sam/bam file.
-
-        If _open is called on an existing bamfile, the current file will be
-        closed and a new file will be opened.
-        '''
-
-        # read mode autodetection
-        if mode is None:
-            try:
-                self._open(filename, 'rb', template=template,
-                           referencenames=referencenames,
-                           referencelengths=referencelengths,
-                           text=text, header=header, port=port,
-                           check_header=check_header,
-                           check_sq=check_sq)
-                return
-            except ValueError, msg:
-                pass
-
-            self._open(filename, 'r', template=template,
-                       referencenames=referencenames,
-                       referencelengths=referencelengths,
-                       text=text, header=header, port=port,
-                       check_header=check_header,
-                       check_sq=check_sq)
-            return
-
-        assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), "invalid file opening mode `%s`" % mode
-
-        # close a previously opened file
-        if self.samfile != NULL: self.close()
-
-        cdef bam_header_t * header_to_write
-        header_to_write = NULL
-
-        cdef bytes bmode = mode.encode('ascii')
-        self._filename = filename = _encodeFilename(filename)
-        self.isstream = filename == b"-"
-
-        self.isbam = len(mode) > 1 and mode[1] == 'b'
-
-        self.isremote = filename.startswith(b"http:") or filename.startswith(b"ftp:")
-
-        cdef char * ctext
-        ctext = NULL
-
-        if mode[0] == 'w':
-            # open file for writing
-
-            # header structure (used for writing)
-            if template:
-                # copy header from another file
-                header_to_write = template.samfile.header
-
-            elif header:
-                header_to_write = self._buildHeader( header )
-
-            else:
-                # build header from a target names and lengths
-                assert referencenames and referencelengths, "either supply options `template`, `header` or  both `referencenames` and `referencelengths` for writing"
-                assert len(referencenames) == len(referencelengths), "unequal names and lengths of reference sequences"
-
-                # allocate and fill header
-                referencenames = [ _force_bytes(ref) for ref in referencenames ]
-                header_to_write = bam_header_init()
-                header_to_write.n_targets = len(referencenames)
-                n = 0
-                for x in referencenames: n += len(x) + 1
-                header_to_write.target_name = <char**>calloc(n, sizeof(char*))
-                header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
-                for x from 0 <= x < header_to_write.n_targets:
-                    header_to_write.target_len[x] = referencelengths[x]
-                    name = referencenames[x]
-                    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.append( "@SQ\tSN:%s\tLN:%s\n" % \
-                                         (_force_str(referencenames[x]), 
-                                          referencelengths[x] ) )
-                    text = ''.join(text)
-
-                if text != None:
-                    # copy without \0
-                    text = _force_bytes(text)
-                    ctext = text
-                    header_to_write.l_text = strlen(ctext)
-                    header_to_write.text = <char*>calloc( strlen(ctext), sizeof(char) )
-                    memcpy( header_to_write.text, ctext, strlen(ctext) )
-
-                header_to_write.hash = NULL
-                header_to_write.rg2lib = NULL
-
-            # open file. Header gets written to file at the same time for bam files
-            # and sam files (in the latter case, the mode needs to be wh)
-            store = StderrStore()
-            self.samfile = samopen( filename, bmode, header_to_write )
-            store.release()
-
-            # bam_header_destroy takes care of cleaning up of all the members
-            if not template and header_to_write != NULL:
-                bam_header_destroy( header_to_write )
-
-        elif mode[0] == "r":
-            # open file for reading
-            if filename != b"-" and not self.isremote and not os.path.exists( filename ):
-                raise IOError( "file `%s` not found" % filename)
-
-            # try to detect errors
-            self.samfile = samopen( filename, bmode, NULL )
-            if self.samfile == NULL:
-                raise ValueError( "could not open file (mode='%s') - is it SAM/BAM format?" % mode)
-
-            # bam files require a valid header
-            if self.isbam:
-                if self.samfile.header == NULL:
-                    raise ValueError( "file does not have valid header (mode='%s') - is it BAM format?" % mode )
-            else:
-                # in sam files it is optional (samfile full of unmapped reads)
-                if check_header and self.samfile.header == NULL:
-                    raise ValueError( "file does not have valid header (mode='%s') - is it SAM format?" % mode )
-
-            # disabled for autodetection to work
-            # needs to be disabled so that reading from sam-files without headers works
-            if check_sq and 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 )
-
-        # check for index and open if present
-        if mode[0] == "r" and self.isbam:
-
-            if not self.isremote:
-                if not os.path.exists(filename + b".bai") \
-                        and not os.path.exists( filename[:-4] + b".bai"):
-                    self.index = NULL
-                else:
-                    # returns NULL if there is no index or index could not be opened
-                    self.index = bam_index_load(filename)
-                    if self.index == NULL:
-                        raise IOError("error while opening index `%s` " % filename )
-            else:
-                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`
-
-        returns -1 if reference is not known.
-        '''
-        if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-        reference = _force_bytes(reference)
-        return pysam_reference2tid( self.samfile.header, reference )
-
-    def getrname( self, tid ):
-        '''
-        convert numerical :term:`tid` into :term:`reference` name.'''
-        if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-        if not 0 <= tid < self.samfile.header.n_targets:
-            raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
-        return _charptr_to_str(self.samfile.header.target_name[tid])
-
-    cdef char * _getrname( self, int tid ): # TODO unused
-        '''
-        convert numerical :term:`tid` into :term:`reference` name.'''
-        if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-        if not 0 <= tid < self.samfile.header.n_targets:
-            raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
-        return self.samfile.header.target_name[tid]
-
-    def _parseRegion( self,
-                      reference = None,
-                      start = None,
-                      end = None,
-                      region = None ):
-        '''
-        parse region information.
-
-        raise ValueError for for invalid regions.
-
-        returns a tuple of flag, tid, start and end. Flag indicates
-        whether some coordinates were supplied.
-
-        Note that regions are 1-based, while start,end are python coordinates.
-        '''
-        # This method's main objective is to translate from a reference to a tid.
-        # For now, it calls bam_parse_region, which is clumsy. Might be worth
-        # implementing it all in pysam (makes use of khash).
-
-        cdef int rtid
-        cdef long long rstart
-        cdef long long rend
-
-        rtid = -1
-        rstart = 0
-        rend = max_pos
-        if start != None:
-            try:
-                rstart = start
-            except OverflowError:
-                raise ValueError( 'start out of range (%i)' % start )
-
-        if end != None:
-            try:
-                rend = end
-            except OverflowError:
-                raise ValueError( 'end out of range (%i)' % end )
-
-        if region:
-            region = _force_str(region)
-            parts = re.split( "[:-]", region )
-            reference = parts[0]
-            if len(parts) >= 2: rstart = int(parts[1]) - 1
-            if len(parts) >= 3: rend = int(parts[2])
-
-        if not reference: return 0, 0, 0, 0
-
-        rtid = self.gettid( reference )
-        if rtid < 0: raise ValueError( "invalid reference `%s`" % reference )
-        if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )
-        if not 0 <= rstart < max_pos: raise ValueError( 'start out of range (%i)' % rstart )
-        if not 0 <= rend <= max_pos: raise ValueError( 'end out of range (%i)' % rend )
-
-        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`.
-        '''
-
-        if not self._isOpen():
-            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 ):
-        '''
-        return current file position
-        '''
-        if not self._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-        if not self.isbam:
-            raise NotImplementedError("seek only available in bam files")
-
-        return bam_tell( self.samfile.x.bam )
-
-    def fetch( self,
-               reference = None,
-               start = None,
-               end = None,
-               region = None,
-               callback = None,
-               until_eof = False ):
-        '''
-        fetch aligned reads in a :term:`region` using 0-based indexing. The region is specified by
-        :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can
-        be supplied.
-
-        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. Using this option will also fetch unmapped reads.
-
-        If only *reference* is set, all reads aligned to *reference* will be fetched.
-
-        The method returns an iterator of type :class:`pysam.IteratorRow` unless
-        a *callback is provided. If *callback* is given, the callback will be executed
-        for each position within the :term:`region`. Note that callbacks currently work
-        only, if *region* or *reference* is given.
-
-        Note that a :term:`SAM` file does not allow random access. If *region* or *reference* are given,
-        an exception is raised.
-        '''
-        cdef int rtid, rstart, rend, has_coord
-
-        if not self._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        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" )
-
-            if callback:
-                if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
-                if not self._hasIndex(): raise ValueError( "no index available for fetch" )
-                return bam_fetch(self.samfile.x.bam,
-                                 self.index,
-                                 rtid,
-                                 rstart,
-                                 rend,
-                                 <void*>callback,
-                                 fetch_callback )
-            else:
-                if has_coord:
-                    return IteratorRowRegion( self, rtid, rstart, rend, 
-                                              reopen=reopen )
-                else:
-                    if until_eof:
-                        return IteratorRowAll( self, reopen=reopen )
-                    else:
-                        # AH: check - reason why no reopen for AllRefs?
-                        return IteratorRowAllRefs(self ) # , reopen=reopen )
-        else:
-            if has_coord:
-                raise ValueError ("fetching by region is not available for sam files" )
-
-            if callback:
-                raise NotImplementedError( "callback not implemented yet" )
-
-            if self.samfile.header == NULL:
-                raise ValueError( "fetch called for samfile without header")
-
-            # check if targets are defined
-            # give warning, sam_read1 segfaults
-            if self.samfile.header.n_targets == 0:
-                warnings.warn( "fetch called for samfile without header")
-                
-            return IteratorRowAll( self, reopen=reopen )
-
-    def mate( self,
-              AlignedRead read ):
-        '''return the mate of :class:`AlignedRead` *read*.
-
-        Throws a ValueError if read is unpaired or the mate
-        is unmapped.
-
-        .. note::
-            Calling this method will change the file position.
-            This might interfere with any iterators that have
-            not re-opened the file.
-
-        '''
-        cdef uint32_t flag = read._delegate.core.flag
-
-        if flag & BAM_FPAIRED == 0:
-            raise ValueError( "read %s: is unpaired" % (read.qname))
-        if flag & BAM_FMUNMAP != 0:
-            raise ValueError( "mate %s: is unmapped" % (read.qname))
-
-        cdef MateData mate_data
-
-        mate_data.name = <char *>bam1_qname(read._delegate)
-        mate_data.mate = NULL
-        # xor flags to get the other mate
-        cdef int x = BAM_FREAD1 + BAM_FREAD2
-        mate_data.flag = ( flag ^ x) & x
-
-        bam_fetch(self.samfile.x.bam,
-                  self.index,
-                  read._delegate.core.mtid,
-                  read._delegate.core.mpos,
-                  read._delegate.core.mpos + 1,
-                  <void*>&mate_data,
-                  mate_callback )
-
-        if mate_data.mate == NULL:
-            raise ValueError( "mate not found" )
-
-        cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
-        dest._delegate = mate_data.mate
-        return dest
-
-    def count( self,
-               reference = None,
-               start = None,
-               end = None,
-               region = None,
-               until_eof = False ):
-        '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)*
-
-        count  reads :term:`region` using 0-based indexing. The region is specified by
-        :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can be supplied.
-
-        Note that a :term:`TAM` file does not allow random access. If *region* or *reference* are given,
-        an exception is raised.
-        '''
-        cdef int rtid
-        cdef int rstart
-        cdef int rend
-
-        if not self._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        region, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
-
-        cdef int counter
-        counter = 0;
-
-        if self.isbam:
-            if not until_eof and not self._hasIndex() and not self.isremote:
-                raise ValueError( "fetch called on bamfile without index" )
-
-            if not region:
-                raise ValueError( "counting functionality requires a region/reference" )
-            if not self._hasIndex(): raise ValueError( "no index available for fetch" )
-            bam_fetch(self.samfile.x.bam,
-                             self.index,
-                             rtid,
-                             rstart,
-                             rend,
-                             <void*>&counter,
-                             count_callback )
-            return counter
-        else:
-            raise ValueError ("count for a region is not available for sam files" )
-
-    def pileup( self,
-                reference = None,
-                start = None,
-                end = None,
-                region = None,
-                callback = None,
-                **kwargs ):
-        '''
-        perform a :term:`pileup` within a :term:`region`. The region is specified by
-        :term:`reference`, *start* and *end* (using 0-based indexing).
-        Alternatively, a samtools *region* string can be supplied.
-
-        Without *reference* or *region* all reads will be used for the pileup. The reads will be returned
-        ordered by :term:`reference` sequence, which will not necessarily be the order within the file.
-
-        The method returns an iterator of type :class:`pysam.IteratorColumn` unless
-        a *callback is provided. If a *callback* is given, the callback will be executed
-        for each column within the :term:`region`.
-
-        Note that :term:`SAM` formatted files do not allow random access.
-        In these files, if a *region* or *reference* are given an exception is raised.
-
-        Optional *kwargs* to the iterator:
-
-        stepper
-           The stepper controlls how the iterator advances.
-           Possible options for the stepper are
-
-           ``all``
-              use all reads for pileup.
-           ``samtools``
-              same filter and read processing as in :term:`csamtools` pileup
-
-        fastafile
-           A :class:`FastaFile` object
-
-         mask
-           Skip all reads with bits set in mask if mask=True.
-
-         max_depth
-           Maximum read depth permitted. The default limit is *8000*.
-
-         truncate
-           By default, the samtools pileup engine outputs all reads overlapping a region (see note below).
-           If truncate is True and a region is given, only output columns in the exact region
-           specificied.
-
-        .. 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.
-
-        '''
-        cdef int rtid, rstart, rend, has_coord
-        cdef bam_plbuf_t *buf
-
-        if not self._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
-
-        if self.isbam:
-            if not self._hasIndex(): raise ValueError( "no index available for pileup" )
-
-            if callback:
-                if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
-
-                buf = bam_plbuf_init( <bam_pileup_f>pileup_callback, <void*>callback )
-                bam_fetch(self.samfile.x.bam,
-                          self.index, rtid, rstart, rend,
-                          buf, pileup_fetch_callback )
-
-                # finalize pileup
-                bam_plbuf_push( NULL, buf)
-                bam_plbuf_destroy(buf)
-            else:
-                if has_coord:
-                    return IteratorColumnRegion( self,
-                                                 tid = rtid,
-                                                 start = rstart,
-                                                 end = rend,
-                                                 **kwargs )
-                else:
-                    return IteratorColumnAllRefs(self, **kwargs )
-
-        else:
-            raise NotImplementedError( "pileup of samfiles not implemented yet" )
-
-    def close( self ):
-        '''
-        closes the :class:`pysam.Samfile`.'''
-        if self.samfile != NULL:
-            samclose( self.samfile )
-            bam_index_destroy(self.index);
-            self.samfile = NULL
-
-    def __dealloc__( self ):
-        # remember: dealloc cannot call other methods
-        # note: no doc string
-        # note: __del__ is not called.
-        self.close()
-        bam_destroy1(self.b)
-
-    cpdef int write( self, AlignedRead read ) except -1:
-        '''
-        write a single :class:`pysam.AlignedRead` to disk.
-
-        returns the number of bytes written.
-        '''
-        if not self._isOpen():
-            return 0
-
-        return samwrite( self.samfile, read._delegate )
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, exc_type, exc_value, traceback):
-        self.close()
-        return False
-
-    ###############################################################
-    ###############################################################
-    ###############################################################
-    ## properties
-    ###############################################################
-    property filename:
-        '''number of :term:`filename` associated with this object.'''
-        def __get__(self):
-            return self._filename
-
-    property nreferences:
-        '''number of :term:`reference` sequences in the file.'''
-        def __get__(self):
-            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-            return self.samfile.header.n_targets
-
-    property references:
-        """tuple with the names of :term:`reference` sequences."""
-        def __get__(self):
-            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-            t = []
-            for x from 0 <= x < self.samfile.header.n_targets:
-                t.append( _charptr_to_str(self.samfile.header.target_name[x]) )
-            return tuple(t)
-
-    property lengths:
-        """tuple of the lengths of the :term:`reference` sequences. The lengths are in the same order as
-        :attr:`pysam.Samfile.references`
-        """
-        def __get__(self):
-            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-            t = []
-            for x from 0 <= x < self.samfile.header.n_targets:
-                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" )
-            if self.index == NULL:
-                raise ValueError( "mapping information not recorded in index or index not available")
-
-            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):
-            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-            return from_string_and_size(self.samfile.header.text, self.samfile.header.l_text)
-
-    property header:
-        '''header information within the :term:`sam file`. The records and fields are returned as
-        a two-level dictionary.
-        '''
-        def __get__(self):
-            if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
-
-            result = {}
-            
-            if self.samfile.header.text != NULL:
-                # convert to python string (note: call self.text to create 0-terminated string)
-                t = self.text
-                for line in t.split("\n"):
-                    if not line.strip(): continue
-                    assert line.startswith("@"), "header line without '@': '%s'" % line
-                    fields = line[1:].split("\t")
-                    record = fields[0]
-                    assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
-
-                    # treat comments
-                    if record == "CO":
-                        if record not in result: result[record] = []
-                        result[record].append( "\t".join( fields[1:] ) )
-                        continue
-                    # the following is clumsy as generators do not work?
-                    x = {}
-                    for field in fields[1:]:
-                        if ":" not in field: 
-                            raise ValueError("malformatted header: no ':' in field" )
-                        key, value = field.split(":",1)
-                        # uppercase keys must be valid
-                        # lowercase are permitted for user fields
-                        if key in VALID_HEADER_FIELDS[record]:
-                            x[key] = VALID_HEADER_FIELDS[record][key](value)
-                        elif not key.isupper():
-                            x[key] = value
-                        else:
-                            raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )
-
-                    if VALID_HEADER_TYPES[record] == dict:
-                        if record in result:
-                            raise ValueError( "multiple '%s' lines are not permitted" % record )
-                        result[record] = x
-                    elif VALID_HEADER_TYPES[record] == list:
-                        if record not in result: result[record] = []
-                        result[record].append( x )
-
-                # if there are no SQ lines in the header, add the reference names
-                # from the information in the bam file.
-                # Background: c-samtools keeps the textual part of the header separate from
-                # the list of reference names and lengths. Thus, if a header contains only 
-                # SQ lines, the SQ information is not part of the textual header and thus
-                # are missing from the output. See issue 84.
-                if "SQ" not in result:
-                    sq = []
-                    for ref, length in zip( self.references, self.lengths ):
-                        sq.append( {'LN': length, 'SN': ref } )
-                    result["SQ"] = sq
-
-            return result
-
-    def _buildLine( self, fields, record ):
-        '''build a header line from *fields* dictionary for *record*'''
-
-        # TODO: add checking for field and sort order
-        line = ["@%s" % record ]
-        # comment
-        if record == "CO":
-            line.append( fields )
-        # user tags
-        elif record.islower():
-            for key in sorted(fields):
-                line.append( "%s:%s" % (key, str(fields[key])))
-        # defined tags
-        else:
-            # write fields of the specification
-            for key in VALID_HEADER_ORDER[record]:
-                if key in fields:
-                    line.append( "%s:%s" % (key, str(fields[key])))
-            # write user fields
-            for key in fields:
-                if not key.isupper():
-                    line.append( "%s:%s" % (key, str(fields[key])))
-
-        return "\t".join( line )
-
-    cdef bam_header_t * _buildHeader( self, new_header ):
-        '''return a new header built from a dictionary in *new_header*.
-
-        This method inserts the text field, target_name and target_len.
-        '''
-
-        lines = []
-
-        # check if hash exists
-
-        # create new header and copy old data
-        cdef bam_header_t * dest
-
-        dest = bam_header_init()
-
-        # first: defined tags
-        for record in VALID_HEADERS:
-            if record in new_header:
-                ttype = VALID_HEADER_TYPES[record]
-                data = new_header[record]
-                if type( data ) != type( ttype() ):
-                    raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
-                if type( data ) is dict:
-                    lines.append( self._buildLine( data, record ) )
-                else:
-                    for fields in new_header[record]:
-                        lines.append( self._buildLine( fields, record ) )
-
-        # then: user tags (lower case), sorted alphabetically
-        for record, data in sorted(new_header.items()):
-            if record in VALID_HEADERS: continue
-            if type( data ) is dict:
-                lines.append( self._buildLine( data, record ) )
-            else:
-                for fields in new_header[record]:
-                    lines.append( self._buildLine( fields, record ) )
-
-        text = "\n".join(lines) + "\n"
-        if dest.text != NULL: free( dest.text )
-        dest.text = <char*>calloc( len(text), sizeof(char))
-        dest.l_text = len(text)
-        cdef bytes btext = text.encode('ascii')
-        strncpy( dest.text, btext, dest.l_text )
-
-        cdef bytes bseqname
-        # collect targets
-        if "SQ" in new_header:
-            seqs = []
-            for fields in new_header["SQ"]:
-                try:
-                    seqs.append( (fields["SN"], fields["LN"] ) )
-                except KeyError:
-                    raise KeyError( "incomplete sequence information in '%s'" % str(fields))
-
-            dest.n_targets = len(seqs)
-            dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )
-            dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
-
-            for x from 0 <= x < dest.n_targets:
-                seqname, seqlen = seqs[x]
-                dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
-                bseqname = seqname.encode('ascii')
-                strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
-                dest.target_len[x] = seqlen
-
-        return dest
-
-    ###############################################################
-    ###############################################################
-    ###############################################################
-    ## file-object like iterator access
-    ## note: concurrent access will cause errors (see IteratorRow
-    ## and reopen)
-    ## Possible solutions: deprecate or open new file handle
-    ###############################################################
-    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 ):
-        return self.b
-
-    cdef int cnext(self):
-        '''
-        cversion of iterator. Used by :class:`pysam.Samfile.IteratorColumn`.
-        '''
-        cdef int ret
-        return samread(self.samfile, self.b)
-
-    def __next__(self):
-        """
-        python version of next().
-        """
-        cdef int ret
-        ret = samread(self.samfile, self.b)
-        if (ret > 0):
-            return makeAlignedRead( self.b )
-        else:
-            raise StopIteration
-
-##-------------------------------------------------------------------
-##-------------------------------------------------------------------
-##-------------------------------------------------------------------
-cdef class IteratorRow:
-    '''abstract base class for iterators over mapped reads.
-
-    Various iterators implement different behaviours for wrapping around
-    contig boundaries. Examples include:
-
-    :class:`pysam.IteratorRowRegion`
-        iterate within a single contig and a defined region.
-
-    :class:`pysam.IteratorRowAll`
-        iterate until EOF. This iterator will also include unmapped reads.
-
-    :class:`pysam.IteratorRowAllRefs`
-        iterate over all reads in all reference sequences.
-
-    The method :meth:`Samfile.fetch` returns an IteratorRow.
-
-    .. note::
-        It is usually not necessary to create an object of this class
-        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
-
-    '''
-    pass
-
-
-cdef class IteratorRowRegion(IteratorRow):
-    """*(Samfile samfile, int tid, int beg, int end, int reopen = True )*
-
-    iterate over mapped reads in a region.
-
-    By default, the file is re-openend to avoid conflicts between
-    multiple iterators working on the same file. Set *reopen* = False
-    to not re-open *samfile*.
-
-    The samtools iterators assume that the file
-    position between iterations do not change.
-    As a consequence, no two iterators can work
-    on the same file. To permit this, each iterator
-    creates its own file handle by re-opening the
-    file.
-
-    Note that the index will be shared between
-    samfile and the iterator.
-
-    .. note::
-        It is usually not necessary to create an object of this class
-        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
-
-    """
-
-    def __cinit__(self, Samfile samfile, int tid, int beg, int end, int reopen = True ):
-
-        if not samfile._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        if not samfile._hasIndex():
-            raise ValueError( "no index available for iteration" )
-
-        # makes sure that samfile stays alive as long as the
-        # iterator is alive
-        self.samfile = samfile
-
-        if samfile.isbam: mode = b"rb"
-        else: mode = b"r"
-
-        # reopen the file - note that this makes the iterator
-        # slow and causes pileup to slow down significantly.
-        if reopen:
-            store = StderrStore()
-            self.fp = samopen( samfile._filename, mode, NULL )
-            store.release()
-            assert self.fp != NULL
-            self.owns_samfile = True
-        else:
-            self.fp = self.samfile.samfile
-            self.owns_samfile = False
-
-        self.retval = 0
-
-        self.iter = bam_iter_query(self.samfile.index,
-                                   tid,
-                                   beg,
-                                   end)
-        self.b = bam_init1()
-
-    def __iter__(self):
-        return self
-
-    cdef bam1_t * getCurrent( self ):
-        return self.b
-
-    cdef int cnext(self):
-        '''cversion of iterator. Used by IteratorColumn'''
-        self.retval = bam_iter_read( self.fp.x.bam,
-                                     self.iter,
-                                     self.b)
-
-    def __next__(self):
-        """python version of next().
-        """
-        self.cnext()
-        if self.retval < 0: raise StopIteration
-        return makeAlignedRead( self.b )
-
-    def __dealloc__(self):
-        bam_destroy1(self.b)
-        bam_iter_destroy( self.iter )
-        if self.owns_samfile: samclose( self.fp )
-
-cdef class IteratorRowAll(IteratorRow):
-    """*(Samfile samfile, int reopen = True)*
-
-    iterate over all reads in *samfile*
-
-    By default, the file is re-openend to avoid conflicts between
-    multiple iterators working on the same file. Set *reopen* = False
-    to not re-open *samfile*.
-
-    .. note::
-        It is usually not necessary to create an object of this class
-        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
-        
-
-    """
-
-    def __cinit__(self, Samfile samfile, int reopen = True ):
-
-        if not samfile._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        if samfile.isbam: mode = b"rb"
-        else: mode = b"r"
-
-        # reopen the file to avoid iterator conflict
-        if reopen:
-            store = StderrStore()
-            self.fp = samopen( samfile._filename, mode, NULL )
-            store.release()
-            assert self.fp != NULL
-            self.owns_samfile = True
-        else:
-            self.fp = samfile.samfile
-            self.owns_samfile = False
-
-        # allocate memory for alignment
-        self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
-
-    def __iter__(self):
-        return self
-
-    cdef bam1_t * getCurrent( self ):
-        return self.b
-
-    cdef int cnext(self):
-        '''cversion of iterator. Used by IteratorColumn'''
-        return samread(self.fp, self.b)
-
-    def __next__(self):
-        """python version of next().
-
-        pyrex uses this non-standard name instead of next()
-        """
-        cdef int ret
-        ret = samread(self.fp, self.b)
-        if (ret > 0):
-            return makeAlignedRead( self.b )
-        else:
-            raise StopIteration
-
-    def __dealloc__(self):
-        bam_destroy1(self.b)
-        if self.owns_samfile: samclose( self.fp )
-
-cdef class IteratorRowAllRefs(IteratorRow):
-    """iterates over all mapped reads by chaining iterators over each reference
-
-    .. note::
-        It is usually not necessary to create an object of this class
-        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
-    """
-
-    def __cinit__(self, Samfile samfile):
-        assert samfile._isOpen()
-        if not samfile._hasIndex(): raise ValueError("no index available for fetch")
-        self.samfile = samfile
-        self.tid = -1
-
-    def nextiter(self):
-        self.rowiter = IteratorRowRegion(self.samfile, self.tid, 0, 1<<29)
-
-    def __iter__(self):
-        return self
-
-    def __next__(self):
-        """python version of next().
-
-        pyrex uses this non-standard name instead of next()
-        """
-        # Create an initial iterator
-        if self.tid==-1:
-            if not self.samfile.nreferences:
-                raise StopIteration
-            self.tid = 0
-            self.nextiter()
-
-        while 1:
-            self.rowiter.cnext()
-
-            # If current iterator is not exhausted, return aligned read
-            if self.rowiter.retval>0:
-                return makeAlignedRead(self.rowiter.b)
-
-            self.tid += 1
-
-            # Otherwise, proceed to next reference or stop
-            if self.tid<self.samfile.nreferences:
-                self.nextiter()
-            else:
-                raise StopIteration
-
-cdef class IteratorRowSelection(IteratorRow):
-    """*(Samfile samfile)*
-
-    iterate over reads in *samfile* at a given list of file positions.
-
-    .. note::
-        It is usually not necessary to create an object of this class
-        explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.
-    """
-
-    def __cinit__(self, Samfile samfile, positions, int reopen = True ):
-
-        if not samfile._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        if not samfile._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        assert samfile.isbam, "can only use this iterator on bam files"
-        mode = b"rb"
-
-        # reopen the file to avoid iterator conflict
-        if reopen:
-            store = StderrStore()
-            self.fp = samopen( samfile._filename, mode, NULL )
-            store.release()
-            assert self.fp != NULL
-            self.owns_samfile = True
-        else:
-            self.fp = samfile.samfile
-            self.owns_samfile = False
-
-        # allocate memory for alignment
-        self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
-
-        self.positions = positions
-        self.current_pos = 0
-
-    def __iter__(self):
-        return self
-
-    cdef bam1_t * getCurrent( self ):
-        return self.b
-
-    cdef int cnext(self):
-        '''cversion of iterator'''
-
-        # end iteration if out of positions
-        if self.current_pos >= len(self.positions): return -1
-
-        bam_seek( self.fp.x.bam, self.positions[self.current_pos], 0 )
-        self.current_pos += 1
-        return samread(self.fp, self.b)
-
-    def __next__(self):
-        """python version of next().
-
-        pyrex uses this non-standard name instead of next()
-        """
-
-        cdef int ret = self.cnext()
-        if (ret > 0):
-            return makeAlignedRead( self.b )
-        else:
-            raise StopIteration
-
-    def __dealloc__(self):
-        bam_destroy1(self.b)
-        if self.owns_samfile: samclose( self.fp )
-
-##-------------------------------------------------------------------
-##-------------------------------------------------------------------
-##-------------------------------------------------------------------
-cdef int __advance_all( void * data, bam1_t * b ):
-    '''advance without any read filtering.
-    '''
-    cdef __iterdata * d
-    d = <__iterdata*>data
-    return bam_iter_read( d.samfile.x.bam, d.iter, b )
-
-cdef int __advance_snpcalls( void * data, bam1_t * b ):
-    '''advance using same filter and read processing as in
-    the samtools pileup.
-    '''
-    cdef __iterdata * d
-    d = <__iterdata*>data
-
-    cdef int ret = bam_iter_read( d.samfile.x.bam, d.iter, b )
-    cdef int skip = 0
-    cdef int q
-    cdef int is_cns = 1
-    cdef int is_nobaq = 0
-    cdef int capQ_thres = 0
-
-    # reload sequence
-    if d.fastafile != NULL and b.core.tid != d.tid:
-        if d.seq != NULL: free(d.seq)
-        d.tid = b.core.tid
-        d.seq = faidx_fetch_seq(d.fastafile,
-                                d.samfile.header.target_name[d.tid],
-                                0, max_pos,
-                                &d.seq_len)
-        if d.seq == NULL:
-            raise ValueError( "reference sequence for '%s' (tid=%i) not found" % \
-                                  (d.samfile.header.target_name[d.tid],
-                                   d.tid))
-
-
-    while ret >= 0:
-
-        skip = 0
-
-        # realign read - changes base qualities
-        if d.seq != NULL and is_cns and not is_nobaq: bam_prob_realn( b, d.seq )
-
-        if d.seq != NULL and capQ_thres > 10:
-            q = bam_cap_mapQ(b, d.seq, capQ_thres)
-            if q < 0: skip = 1
-            elif b.core.qual > q: b.core.qual = q
-        if b.core.flag & BAM_FUNMAP: skip = 1
-        elif b.core.flag & 1 and not b.core.flag & 2: skip = 1
-
-        if not skip: break
-        # additional filters
-
-        ret = bam_iter_read( d.samfile.x.bam, d.iter, b )
-
-    return ret
-
-cdef class IteratorColumn:
-    '''abstract base class for iterators over columns.
-
-    IteratorColumn objects wrap the pileup functionality of samtools.
-
-    For reasons of efficiency, the iterator points to the current
-    pileup buffer. The pileup buffer is updated at every iteration.
-    This might cause some unexpected behavious. For example,
-    consider the conversion to a list::
-
-       f = Samfile("file.bam", "rb")
-       result = list( f.pileup() )
-
-    Here, ``result`` will contain ``n`` objects of type :class:`PileupProxy` for ``n`` columns,
-    but each object in ``result`` will contain the same information.
-
-    The desired behaviour can be achieved by list comprehension::
-
-       result = [ x.pileups() for x in f.pileup() ]
-
-    ``result`` will be a list of ``n`` lists of objects of type :class:`PileupRead`.
-
-    If the iterator is associated with a :class:`Fastafile` using the :meth:`addReference`
-    method, then the iterator will export the current sequence via the methods :meth:`getSequence`
-    and :meth:`seq_len`.
-
-    Optional kwargs to the iterator
-
-    stepper
-       The stepper controls how the iterator advances.
-       Possible options for the stepper are
-
-       all
-           use all reads for pileup.
-       samtools
-           same filter and read processing as in :term:`csamtools` pileup
-
-       The default is to use "all" if no stepper is given.
-
-    fastafile
-       A :class:`FastaFile` object
-    mask
-       Skip all reads with bits set in mask.
-    max_depth
-       maximum read depth. The default is 8000.
-    '''
-
-    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
-        self.n_plp = 0
-        self.plp = NULL
-        self.pileup_iter = <bam_plp_t>NULL
-
-    def __iter__(self):
-        return self
-
-    cdef int cnext(self):
-        '''perform next iteration.
-        '''
-        self.plp = bam_plp_auto( self.pileup_iter,
-                                 &self.tid,
-                                 &self.pos,
-                                 &self.n_plp )
-
-    cdef char * getSequence( self ):
-        '''return current reference sequence underlying the iterator.
-        '''
-        return self.iterdata.seq
-
-    property seq_len:
-        '''current sequence length.'''
-        def __get__(self): return self.iterdata.seq_len
-
-    def addReference( self, Fastafile fastafile ):
-       '''
-       add reference sequences in *fastafile* to iterator.'''
-       self.fastafile = fastafile
-       if self.iterdata.seq != NULL: free(self.iterdata.seq)
-       self.iterdata.tid = -1
-       self.iterdata.fastafile = self.fastafile.fastafile
-
-    def hasReference( self ):
-        '''
-        return true if iterator is associated with a reference'''
-        return self.fastafile
-
-    cdef setMask( self, mask ):
-        '''set masking flag in iterator.
-
-        reads with bits set in *mask* will be skipped.
-        '''
-        self.mask = mask
-        bam_plp_set_mask( self.pileup_iter, self.mask )
-
-    cdef setupIteratorData( self,
-                            int tid,
-                            int start,
-                            int end,
-                            int reopen = 0 ):
-        '''setup the iterator structure'''
-
-        self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen )
-        self.iterdata.samfile = self.samfile.samfile
-        self.iterdata.iter = self.iter.iter
-        self.iterdata.seq = NULL
-        self.iterdata.tid = -1
-
-        if self.fastafile != None:
-            self.iterdata.fastafile = self.fastafile.fastafile
-        else:
-            self.iterdata.fastafile = NULL
-
-        if self.stepper == None or self.stepper == "all":
-            self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata )
-        elif self.stepper == "samtools":
-            self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata )
-        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 ):
-        '''reset iterator position.
-
-        This permits using the iterator multiple times without
-        having to incur the full set-up costs.
-        '''
-        self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 )
-        self.iterdata.iter = self.iter.iter
-
-        # invalidate sequence if different tid
-        if self.tid != tid:
-            if self.iterdata.seq != NULL: free( self.iterdata.seq )
-            self.iterdata.seq = NULL
-            self.iterdata.tid = -1
-
-        # self.pileup_iter = bam_plp_init( &__advancepileup, &self.iterdata )
-        bam_plp_reset(self.pileup_iter)
-
-    def __dealloc__(self):
-        # reset in order to avoid memory leak messages for iterators 
-        # that have not been fully consumed
-        if self.pileup_iter != <bam_plp_t>NULL:
-            bam_plp_reset(self.pileup_iter)
-            bam_plp_destroy(self.pileup_iter)
-            self.pileup_iter = <bam_plp_t>NULL
-            self.plp = <const_bam_pileup1_t_ptr>NULL
-
-        if self.iterdata.seq != NULL:
-            free(self.iterdata.seq)
-            self.iterdata.seq = NULL
-
-cdef class IteratorColumnRegion(IteratorColumn):
-    '''iterates over a region only.
-    '''
-    def __cinit__(self, Samfile samfile,
-                  int tid = 0,
-                  int start = 0,
-                  int end = max_pos,
-                  int truncate = False,
-                  **kwargs ):
-
-        # initialize iterator
-        self.setupIteratorData( tid, start, end, 1 )
-        self.start = start
-        self.end = end
-        self.truncate = truncate
-
-    def __next__(self):
-        """python version of next().
-        """
-
-        while 1:
-            self.cnext()
-            if self.n_plp < 0:
-                raise ValueError("error during iteration" )
-
-            if self.plp == NULL:
-                raise StopIteration
-            
-            if self.truncate:
-                if self.start > self.pos: continue
-                if self.pos >= self.end: raise StopIteration
-
-            return makePileupProxy( &self.plp,
-                                     self.tid,
-                                     self.pos,
-                                     self.n_plp )
-
-cdef class IteratorColumnAllRefs(IteratorColumn):
-    """iterates over all columns by chaining iterators over each reference
-    """
-
-    def __cinit__(self,
-                  Samfile samfile,
-                  **kwargs ):
-
-        # no iteration over empty files
-        if not samfile.nreferences: raise StopIteration
-
-        # initialize iterator
-        self.setupIteratorData( self.tid, 0, max_pos, 1 )
-
-    def __next__(self):
-        """python version of next().
-        """
-
-        while 1:
-            self.cnext()
-
-            if self.n_plp < 0:
-                raise ValueError("error during iteration" )
-
-            # return result, if within same reference
-            if self.plp != NULL:
-                return makePileupProxy( &self.plp,
-                                         self.tid,
-                                         self.pos,
-                                         self.n_plp )
-
-            # otherwise, proceed to next reference or stop
-            self.tid += 1
-            if self.tid < self.samfile.nreferences:
-                self.setupIteratorData( self.tid, 0, max_pos, 0 )
-            else:
-                raise StopIteration
-
-##-------------------------------------------------------------------
-##-------------------------------------------------------------------
-##-------------------------------------------------------------------
-cdef inline int32_t query_start(bam1_t *src) except -1:
-    cdef uint32_t * cigar_p, op
-    cdef uint32_t k
-    cdef uint32_t start_offset = 0
-
-    if src.core.n_cigar:
-        cigar_p = bam1_cigar(src);
-        for k from 0 <= k < src.core.n_cigar:
-            op = cigar_p[k] & BAM_CIGAR_MASK
-            if op==BAM_CHARD_CLIP:
-                if start_offset!=0 and start_offset!=src.core.l_qseq:
-                    PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
-                    return -1
-            elif op==BAM_CSOFT_CLIP:
-                start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
-            else:
-                break
-
-    return start_offset
-
-##-------------------------------------------------------------------
-##-------------------------------------------------------------------
-##-------------------------------------------------------------------
-cdef inline int32_t query_end(bam1_t *src) except -1:
-    cdef uint32_t * cigar_p, op
-    cdef uint32_t k
-    cdef uint32_t end_offset = src.core.l_qseq
-
-    if src.core.n_cigar>1:
-        cigar_p = bam1_cigar(src);
-        for k from src.core.n_cigar > k >= 1:
-            op = cigar_p[k] & BAM_CIGAR_MASK
-            if op==BAM_CHARD_CLIP:
-                if end_offset!=0 and end_offset!=src.core.l_qseq:
-                    PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
-                    return -1
-            elif op==BAM_CSOFT_CLIP:
-                end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
-            else:
-                break
-
-    if end_offset==0:
-        end_offset = src.core.l_qseq
-
-    return end_offset
-
-
-cdef inline object get_seq_range(bam1_t *src, uint32_t start, uint32_t end):
-    cdef uint8_t * p
-    cdef uint32_t k
-    cdef char * s
-
-    if not src.core.l_qseq:
-        return None
-
-    seq = PyBytes_FromStringAndSize(NULL, end - start)
-    s   = <char*>seq
-    p   = bam1_seq(src)
-
-    for k from start <= k < end:
-        # equivalent to bam_nt16_rev_table[bam1_seqi(s, i)] (see bam.c)
-        # note: do not use string literal as it will be a python string
-        s[k-start] = bam_nt16_rev_table[p[k/2] >> 4 * (1 - k%2) & 0xf]
-
-    return seq
-
-
-cdef inline object get_qual_range(bam1_t *src, uint32_t start, uint32_t end):
-    cdef uint8_t * p
-    cdef uint32_t k
-    cdef char * q
-
-    p = bam1_qual(src)
-    if p[0] == 0xff:
-        return None
-
-    qual = PyBytes_FromStringAndSize(NULL, end - start)
-    q    = <char*>qual
-
-    for k from start <= k < end:
-        ## equivalent to t[i] + 33 (see bam.c)
-        q[k-start] = p[k] + 33
-
-    return qual
-
-cdef class AlignedRead:
-    '''
-    Class representing an aligned read. see SAM format specification for
-    the meaning of fields (http://samtools.sourceforge.net/).
-
-    This class stores a handle to the samtools C-structure representing
-    an aligned read. Member read access is forwarded to the C-structure
-    and converted into python objects. This implementation should be fast,
-    as only the data needed is converted.
-
-    For write access, the C-structure is updated in-place. This is
-    not the most efficient way to build BAM entries, as the variable
-    length data is concatenated and thus needs to resized if
-    a field is updated. Furthermore, the BAM entry might be
-    in an inconsistent state. The :meth:`~validate` method can
-    be used to check if an entry is consistent.
-
-    One issue to look out for is that the sequence should always
-    be set *before* the quality scores. Setting the sequence will
-    also erase any quality scores that were set previously.
-
-    In Python 3, the fields containing sequence and quality
-    (seq, query, qual and qqual) data are of type bytes. Other
-    string data, such as the qname field and strings in the
-    tags tuple, is represented as unicode strings. On assignment,
-    both bytes and unicode objects are allowed, but unicode strings
-    must contain only ASCII characters.
-    '''
-
-    # Now only called when instances are created from Python
-    def __init__(self):
-        # see bam_init1
-        self._delegate = <bam1_t*>calloc( 1, sizeof( bam1_t) )
-        # allocate some memory
-        # If size is 0, calloc does not return a pointer that can be passed to free()
-        # so allocate 40 bytes for a new read
-        self._delegate.m_data = 40
-        self._delegate.data = <uint8_t *>calloc( self._delegate.m_data, 1 )
-        self._delegate.data_len = 0
-
-    def __dealloc__(self):
-        bam_destroy1(self._delegate)
-
-    def __str__(self):
-        """return string representation of alignment.
-
-        The representation is an approximate :term:`sam` format.
-
-        An aligned read might not be associated with a :term:`Samfile`.
-        As a result :term:`tid` is shown instead of the reference name.
-
-        Similarly, the tags field is returned in its parsed state.
-        """
-        # sam-parsing is done in sam.c/bam_format1_core which
-        # requires a valid header.
-        if sys.version_info[0] < 3:
-            seq = self.seq
-            qual = self.qual
-        else:
-            seq = self.seq.decode('ascii')
-            qual = self.qual.decode('ascii')
-        return "\t".join(map(str, (self.qname,
-                                   self.flag,
-                                   self.rname,
-                                   self.pos,
-                                   self.mapq,
-                                   self.cigar,
-                                   self.mrnm,
-                                   self.mpos,
-                                   self.rlen,
-                                   seq,
-                                   qual,
-                                   self.tags )))
-
-    def compare(self, AlignedRead other):
-        '''return -1,0,1, if contents in this are binary <,=,> to *other*'''
-
-        cdef int retval, x
-        cdef bam1_t *t, *o
-
-        t = self._delegate
-        o = other._delegate
-
-        # uncomment for debugging purposes
-        # cdef unsigned char * oo, * tt
-        # tt = <unsigned char*>(&t.core)
-        # oo = <unsigned char*>(&o.core)
-        # for x from 0 <= x < sizeof( bam1_core_t): print x, tt[x], oo[x]
-        # tt = <unsigned char*>(t.data)
-        # oo = <unsigned char*>(o.data)
-        # for x from 0 <= x < max(t.data_len, o.data_len): print x, tt[x], oo[x], chr(tt[x]), chr(oo[x])
-
-        # Fast-path test for object identity
-        if t==o:
-            return 0
-
-        retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))
-
-        if retval: return retval
-        retval = (t.data_len > o.data_len) - (t.data_len < o.data_len) # cmp(t.data_len, o.data_len)
-        if retval: return retval
-        return memcmp(t.data, o.data, t.data_len)
-
-    # Disabled so long as __cmp__ is a special method
-    def __hash__(self):
-        return _Py_HashPointer(<void *>self)
-
-    #######################################################################
-    #######################################################################
-    ## Basic properties
-    #######################################################################
-    property qname:
-        """the query name (None if not present)"""
-        def __get__(self):
-            cdef bam1_t * src
-            src = self._delegate
-            if src.core.l_qname == 0: return None
-            return _charptr_to_str(<char *>bam1_qname( src ))
-
-        def __set__(self, qname ):
-            if qname == None or len(qname) == 0: return
-            qname = _force_bytes(qname)
-            cdef bam1_t * src
-            cdef int l
-            cdef char * p
-
-            src = self._delegate
-            p = bam1_qname( src )
-
-            # the qname is \0 terminated
-            l = len(qname) + 1
-            pysam_bam_update( src,
-                              src.core.l_qname,
-                              l,
-                              <uint8_t*>p )
-
-            src.core.l_qname = l
-
-            # re-acquire pointer to location in memory
-            # as it might have moved
-            p = bam1_qname(src)
-
-            strncpy( p, qname, l )
-
-    property cigar:
-        """the :term:`cigar` alignment (None if not present). The alignment
-        is returned as a list of tuples of (operation, length). 
-        The operations are:
-
-        +-----+--------------+-----+
-        |M    |BAM_CMATCH    |0    |
-        +-----+--------------+-----+
-        |I    |BAM_CINS      |1    |
-        +-----+--------------+-----+
-        |D    |BAM_CDEL      |2    |
-        +-----+--------------+-----+
-        |N    |BAM_CREF_SKIP |3    |
-        +-----+--------------+-----+
-        |S    |BAM_CSOFT_CLIP|4    |
-        +-----+--------------+-----+
-        |H    |BAM_CHARD_CLIP|5    |
-        +-----+--------------+-----+
-        |P    |BAM_CPAD      |6    |
-        +-----+--------------+-----+
-        |=    |BAM_CEQUAL    |7    |
-        +-----+--------------+-----+
-        |X    |BAM_CDIFF     |8    |
-        +-----+--------------+-----+
-
-        .. note::
-            The output is a list of (operation, length) tuples, such as
-            ``[ (0, 30) ]``.
-            This is different from the SAM specification and the
-            the :meth:`cigarstring` property, which uses a
-            (length,operation order, for example: ``30M``.
-
-        """
-        def __get__(self):
-            cdef uint32_t * cigar_p
-            cdef bam1_t * src
-            cdef op, l, cigar
-            cdef int k
-
-            src = self._delegate
-            if src.core.n_cigar == 0: return None
-
-            cigar = []
-            cigar_p = bam1_cigar(src);
-            for k from 0 <= k < src.core.n_cigar:
-                op = cigar_p[k] & BAM_CIGAR_MASK
-                l = cigar_p[k] >> BAM_CIGAR_SHIFT
-                cigar.append((op, l))
-            return cigar
-
-        def __set__(self, values ):
-            if values == None or len(values) == 0: return
-            cdef uint32_t * p
-            cdef bam1_t * src
-            cdef op, l
-            cdef int k
-
-            k = 0
-
-            src = self._delegate
-
-            # get location of cigar string
-            p = bam1_cigar(src)
-
-            # create space for cigar data within src.data
-            pysam_bam_update( src,
-                              src.core.n_cigar * 4,
-                              len(values) * 4,
-                              <uint8_t*>p )
-
-            # length is number of cigar operations, not bytes
-            src.core.n_cigar = len(values)
-
-            # re-acquire pointer to location in memory
-            # as it might have moved
-            p = bam1_cigar(src)
-
-            # insert cigar operations
-            for op, l in values:
-                p[k] = l << BAM_CIGAR_SHIFT | op
-                k += 1
-
-            ## setting the cigar string also updates the "bin" attribute
-            src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, p))
-
-    property cigarstring:
-        '''the :term:`cigar` alignment as a string.
-        
-        The cigar string is a string of alternating integers
-        and characters denoting the length and the type of
-        an operation.
-
-        .. note::
-            The order length,operation is specified in the
-            SAM format. It is different from the order of
-            the :meth:`cigar` property.
-
-        Returns the empty string if not present.
-        '''
-        def __get__(self):
-            c = self.cigar
-            if c == None: return ""
-            # reverse order
-            else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
-            
-        def __set__(self, cigar):
-            if cigar == None or len(cigar) == 0: self.cigar = []
-            parts = CIGAR_REGEX.findall( cigar )
-            # reverse order
-            self.cigar = [ (CIGAR2CODE[ord(y)], int(x)) for x,y in parts ]
-
-    property seq:
-        """read sequence bases, including :term:`soft clipped` bases 
-        (None if not present).
-
-        In Python 3, this property is of type bytes and assigning a
-        unicode string to it consisting of ASCII characters only will
-        work, but is inefficient.
-
-        Note that assigning to seq will invalidate any quality scores.
-        Thus, to in-place edit the sequence and quality scores, copies of
-        the quality scores need to be taken. Consider trimming for example::
-
-           q = read.qual
-           read.seq = read.seq[5:10]
-           read.qual = q[5:10]
-
-        """
-        def __get__(self):
-            cdef bam1_t * src
-            cdef char * s
-            src = self._delegate
-
-            if src.core.l_qseq == 0: return None
-
-            return get_seq_range(src, 0, src.core.l_qseq)
-
-        def __set__(self,seq):
-            # samtools manages sequence and quality length memory together
-            # if no quality information is present, the first byte says 0xff.
-            cdef bam1_t * src
-            cdef uint8_t * p
-            cdef char * s
-            cdef int l, k, nbytes_new, nbytes_old
-
-            if seq == None:
-                l = 0
-            else:
-                l = len(seq)                
-                seq = _force_bytes(seq)
-
-            src = self._delegate
-
-            # as the sequence is stored in half-bytes, the total length (sequence
-            # plus quality scores) is (l+1)/2 + l
-            nbytes_new = (l+1)/2 + l
-            nbytes_old = (src.core.l_qseq+1)/2 + src.core.l_qseq
-
-            # acquire pointer to location in memory
-            p = bam1_seq( src )
-            src.core.l_qseq = l
-
-            # change length of data field
-            pysam_bam_update( src,
-                              nbytes_old,
-                              nbytes_new,
-                              p)
-
-            if l > 0:
-                # re-acquire pointer to location in memory
-                # as it might have moved
-                p = bam1_seq( src )
-                for k from 0 <= k < nbytes_new: p[k] = 0
-                # convert to C string
-                s = seq
-                for k from 0 <= k < l:
-                    p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2)
-
-                # erase qualities
-                p = bam1_qual( src )
-                p[0] = 0xff
-
-    property qual:
-        """read sequence base qualities, including :term:`soft
-        clipped` bases (None if not present).
-
-        In Python 3, this property is of type bytes and assigning a
-        unicode string to it consisting of ASCII characters only will
-        work, but is inefficient.
-
-        Note that to set quality scores the sequence has to be set
-        previously as this will determine the permitted length of
-        the quality score array.
-
-        This method raises a ValueError if the length of the 
-        quality scores and the sequence are not the same.
-        """
-        def __get__(self):
-
-            cdef bam1_t * src
-            cdef char * q
-
-            src = self._delegate
-
-            if src.core.l_qseq == 0: return None
-
-            return get_qual_range(src, 0, src.core.l_qseq)
-
-        def __set__(self,qual):
-            # note that space is already allocated via the sequences
-            cdef bam1_t * src
-            cdef uint8_t * p
-            cdef char * q
-            cdef int k
-
-            src = self._delegate
-            p = bam1_qual( src )
-            if qual == None or len(qual) == 0:
-                # if absent - set to 0xff
-                p[0] = 0xff
-                return
-            qual = _force_bytes(qual)
-            cdef int l
-            # convert to C string
-            q = qual
-            l = len(qual)
-            if src.core.l_qseq != l:
-                raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
-            assert src.core.l_qseq == l
-            for k from 0 <= k < l:
-                p[k] = <uint8_t>q[k] - 33
-
-    property query:
-        """aligned portion of the read and excludes any flanking bases
-        that were :term:`soft clipped` (None if not present).
-
-        In Python 3, this property is of type bytes. Assigning a
-        unicode string to it consisting of ASCII characters only will
-        work, but is inefficient.
-
-        SAM/BAM files may included extra flanking bases sequences that were
-        not part of the alignment.  These bases may be the result of the
-        Smith-Waterman or other algorithms, which may not require alignments
-        that begin at the first residue or end at the last.  In addition,
-        extra sequencing adapters, multiplex identifiers, and low-quality bases that
-        were not considered for alignment may have been retained."""
-
-        def __get__(self):
-            cdef bam1_t * src
-            cdef uint32_t start, end
-            cdef char * s
-
-            src = self._delegate
-
-            if src.core.l_qseq == 0: return None
-
-            start = query_start(src)
-            end   = query_end(src)
-
-            return get_seq_range(src, start, end)
-
-    property qqual:
-        """aligned query sequence quality values (None if not
-        present). This property is read-only.
-
-        In Python 3, this property is of type bytes."""
-        def __get__(self):
-            cdef bam1_t * src
-            cdef uint32_t start, end
-
-            src = self._delegate
-
-            if src.core.l_qseq == 0: return None
-
-            start = query_start(src)
-            end   = query_end(src)
-
-            return get_qual_range(src, start, end)
-
-    property qstart:
-        """start index of the aligned query portion of the sequence (0-based, inclusive)"""
-        def __get__(self):
-            return query_start(self._delegate)
-
-    property qend:
-        """end index of the aligned query portion of the sequence (0-based, exclusive)"""
-        def __get__(self):
-            return query_end(self._delegate)
-
-    property qlen:
-        """Length of the aligned query sequence"""
-        def __get__(self):
-            cdef bam1_t * src
-            src = self._delegate
-            return query_end(src)-query_start(src)
-
-    property tags:
-        """the tags in the AUX field.
-
-        This property permits convenience access to
-        the tags. Changes it the returned list will
-        not update the tags automatically. Instead,
-        the following is required for adding a
-        new tag::
-
-            read.tags = read.tags + [("RG",0)]
 
+cdef bytes _forceBytes(object s):
+    u"""convert string or unicode object to bytes, assuming ascii encoding.
+    """
+    if PY_MAJOR_VERSION < 3:
+        return s
+    elif s is None:
+        return None
+    elif PyBytes_Check(s):
+        return s
+    elif PyUnicode_Check(s):
+        return s.encode('ascii')
+    else:
+        raise TypeError, u"Argument must be string, bytes or unicode."
 
-        This method will happily write the same tag
-        multiple times.
-        """
-        def __get__(self):
-            cdef char * ctag
-            cdef bam1_t * src
-            cdef uint8_t * s
-            cdef char auxtag[3]
-            cdef char auxtype
-            cdef uint8_t byte_size
-            cdef int32_t nvalues
-
-            src = self._delegate
-            if src.l_aux == 0: return []
-            s = bam1_aux( src )
-            result = []
-            auxtag[2] = 0
-            while s < (src.data + src.data_len):
-                # get tag
-                auxtag[0] = s[0]
-                auxtag[1] = s[1]
-                s += 2
-                auxtype = s[0]
-                if auxtype in ('c', 'C'):
-                    value = <int>bam_aux2i(s)
-                    s += 1
-                elif auxtype in ('s', 'S'):
-                    value = <int>bam_aux2i(s)
-                    s += 2
-                elif auxtype in ('i', 'I'):
-                    value = <int32_t>bam_aux2i(s)
-                    s += 4
-                elif auxtype == 'f':
-                    value = <float>bam_aux2f(s)
-                    s += 4
-                elif auxtype == 'd':
-                    value = <double>bam_aux2d(s)
-                    s += 8
-                elif auxtype == 'A':
-                    value = "%c" % <char>bam_aux2A(s)
-                    s += 1
-                elif auxtype in ('Z', 'H'):
-                    value = _charptr_to_str(<char*>bam_aux2Z(s))
-                    # +1 for NULL terminated string
-                    s += len(value) + 1
-                elif auxtype == 'B':
-                    s += 1
-                    byte_size, nvalues, value = convertBinaryTagToList( s )
-                    # 5 for 1 char and 1 int
-                    s += 5 + ( nvalues * byte_size) - 1
-
-                s += 1
-
-                result.append( (_charptr_to_str(auxtag), value) )
-
-            return result
-
-        def __set__(self, tags):
-            cdef bam1_t * src
-            cdef uint8_t * s
-            cdef uint8_t * new_data
-            cdef char * temp
-
-            src = self._delegate
-
-            fmts, args = ["<"], []
-            
-            if tags != None:
-
-                # map samtools code to python.struct code and byte size
-                for pytag, value in tags:
-                    if not type(pytag) is bytes:
-                        pytag = pytag.encode('ascii')
-                    t = type(value)
-
-                    if t is tuple or t is list:
-                        # binary tags - treat separately
-                        pytype = 'B'
-                        # get data type - first value determines type
-                        if type(value[0]) is float:
-                            datafmt, datatype = "f", "f"
-                        else:
-                            mi, ma = min(value), max(value)
-                            absmax = max( abs(mi), abs(ma) )
-                            # signed ints
-                            if mi < 0: 
-                                if mi >= -127: datafmt, datatype = "b", 'c'
-                                elif mi >= -32767: datafmt, datatype = "h", 's'
-                                elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
-                                else: datafmt, datatype = "i", 'i'
-
-                            # unsigned ints
-                            else:
-                                if absmax <= 255: datafmt, datatype = "B", 'C'
-                                elif absmax <= 65535: datafmt, datatype = "H", 'S'
-                                elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
-                                else: datafmt, datatype = "I", 'I'
-                                
-                        datafmt = "2sccI%i%s" % (len(value), datafmt)
-                        args.extend( [pytag[:2], 
-                                      pytype.encode('ascii'),
-                                      datatype.encode('ascii'),
-                                      len(value)] + list(value) )
-                        fmts.append( datafmt )
-                        continue
-
-                    if t is float:
-                        fmt, pytype = "2scf", 'f'
-                    elif t is int:
-                        # negative values
-                        if value < 0:
-                            if value >= -127: fmt, pytype = "2scb", 'c'
-                            elif value >= -32767: fmt, pytype = "2sch", 's'
-                            elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
-                            else: fmt, pytype = "2sci", 'i'
-                        # positive values
-                        else:
-                            if value <= 255: fmt, pytype = "2scB", 'C'
-                            elif value <= 65535: fmt, pytype = "2scH", 'S'
-                            elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
-                            else: fmt, pytype = "2scI", 'I'
-                    else:
-                        # Note: hex strings (H) are not supported yet
-                        if t is not bytes:
-                            value = value.encode('ascii')
-                        if len(value) == 1:
-                            fmt, pytype = "2scc", 'A'
-                        else:
-                            fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
-
-                    args.extend( [pytag[:2],
-                                  pytype.encode('ascii'),
-                                  value ] )
-                    
-                    fmts.append( fmt )
-
-                fmt = "".join(fmts)
-                total_size = struct.calcsize(fmt)
-                buffer = ctypes.create_string_buffer(total_size)
-                struct.pack_into( fmt,
-                                  buffer,
-                                  0, 
-                                  *args )
-
-            # delete the old data and allocate new space.
-            # If total_size == 0, the aux field will be
-            # empty
-            pysam_bam_update( src,
-                              src.l_aux,
-                              total_size,
-                              bam1_aux( src ) )
-
-            src.l_aux = total_size
-
-            # copy data only if there is any
-            if total_size != 0:
-                
-                # get location of new data
-                s = bam1_aux( src )
-
-                # check if there is direct path from buffer.raw to tmp
-                p = buffer.raw
-                # create handle to make sure buffer stays alive long 
-                # enough for memcpy, see issue 129
-                temp = p
-                memcpy( s, temp, total_size )
-
-    property flag:
-        """properties flag"""
-        def __get__(self): return self._delegate.core.flag
-        def __set__(self, flag): self._delegate.core.flag = flag
-
-    property rname:
-        """
-        :term:`target` ID
-
-        DEPRECATED from pysam-0.4 - use tid in the future.
-        The rname field caused a lot of confusion as it returns
-        the :term:`target` ID instead of the reference sequence
-        name.
-
-        .. note::
-
-            This field contains the index of the reference sequence
-            in the sequence dictionary. To obtain the name
-            of the reference sequence, use :meth:`pysam.Samfile.getrname()`
-
-        """
-        def __get__(self): return self._delegate.core.tid
-        def __set__(self, tid): self._delegate.core.tid = tid
-
-    property tid:
-        """
-        :term:`target` ID
-
-        .. note::
-
-            This field contains the index of the reference sequence
-            in the sequence dictionary. To obtain the name
-            of the reference sequence, use :meth:`pysam.Samfile.getrname()`
-
-        """
-        def __get__(self): return self._delegate.core.tid
-        def __set__(self, tid): self._delegate.core.tid = tid
-
-    property pos:
-        """0-based leftmost coordinate"""
-        def __get__(self): return self._delegate.core.pos
-        def __set__(self, pos):
-            ## setting the cigar string also updates the "bin" attribute
-            cdef bam1_t * src
-            src = self._delegate
-            if src.core.n_cigar:
-                src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, bam1_cigar(src)) )
-            else:
-                src.core.bin = bam_reg2bin( src.core.pos, src.core.pos + 1)
-            self._delegate.core.pos = pos
-    property bin:
-        """properties bin"""
-        def __get__(self): return self._delegate.core.bin
-        def __set__(self, bin): self._delegate.core.bin = bin
-    property rlen:
-        '''length of the read (read only). Returns 0 if not given.'''
-        def __get__(self): return self._delegate.core.l_qseq
-    property aend:
-        '''aligned reference position of the read on the reference genome.  
-        
-        aend points to one past the last aligned residue.
-        Returns None if not available.'''
-        def __get__(self):
-            cdef bam1_t * src
-            src = self._delegate
-            if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
-                return None
-            return bam_calend(&src.core, bam1_cigar(src))
-
-    property alen:
-        '''aligned length of the read on the reference genome.  Returns None if
-        not available.'''
-        def __get__(self):
-            cdef bam1_t * src
-            src = self._delegate
-            if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
-                return None
-            return bam_calend(&src.core,
-                               bam1_cigar(src)) - \
-                               self._delegate.core.pos
-
-    property mapq:
-        """mapping quality"""
-        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
-    #######################################################################
-    #######################################################################
-    ## Flags
-    #######################################################################
-    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
-    property is_paired:
-        """true if read is paired in sequencing"""
-        def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FPAIRED
-            else: self._delegate.core.flag &= ~BAM_FPAIRED
-    property is_proper_pair:
-        """true if read is mapped in a proper pair"""
-        def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FPROPER_PAIR
-            else: self._delegate.core.flag &= ~BAM_FPROPER_PAIR
-    property is_unmapped:
-        """true if read itself is unmapped"""
-        def __get__(self): return (self.flag & BAM_FUNMAP) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FUNMAP
-            else: self._delegate.core.flag &= ~BAM_FUNMAP
-    property mate_is_unmapped:
-        """true if the mate is unmapped"""
-        def __get__(self): return (self.flag & BAM_FMUNMAP) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FMUNMAP
-            else: self._delegate.core.flag &= ~BAM_FMUNMAP
-    property is_reverse:
-        """true if read is mapped to reverse strand"""
-        def __get__(self): return (self.flag & BAM_FREVERSE) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FREVERSE
-            else: self._delegate.core.flag &= ~BAM_FREVERSE
-    property mate_is_reverse:
-        """true is read is mapped to reverse strand"""
-        def __get__(self): return (self.flag & BAM_FMREVERSE) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FMREVERSE
-            else: self._delegate.core.flag &= ~BAM_FMREVERSE
-    property is_read1:
-        """true if this is read1"""
-        def __get__(self): return (self.flag & BAM_FREAD1) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FREAD1
-            else: self._delegate.core.flag &= ~BAM_FREAD1
-    property is_read2:
-        """true if this is read2"""
-        def __get__(self): return (self.flag & BAM_FREAD2) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FREAD2
-            else: self._delegate.core.flag &= ~BAM_FREAD2
-    property is_secondary:
-        """true if not primary alignment"""
-        def __get__(self): return (self.flag & BAM_FSECONDARY) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FSECONDARY
-            else: self._delegate.core.flag &= ~BAM_FSECONDARY
-    property is_qcfail:
-        """true if QC failure"""
-        def __get__(self): return (self.flag & BAM_FQCFAIL) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FQCFAIL
-            else: self._delegate.core.flag &= ~BAM_FQCFAIL
-    property is_duplicate:
-        """true if optical or PCR duplicate"""
-        def __get__(self): return (self.flag & BAM_FDUP) != 0
-        def __set__(self,val):
-            if val: self._delegate.core.flag |= BAM_FDUP
-            else: self._delegate.core.flag &= ~BAM_FDUP
-
-    #######################################################################
-    #######################################################################
-    ## Derived properties
-    #######################################################################
-    property positions:
-        """a list of reference positions that this read aligns to."""
-        def __get__(self):
-            cdef uint32_t k, i, pos
-            cdef int op
-            cdef uint32_t * cigar_p
-            cdef bam1_t * src
-
-            src = self._delegate
-            if src.core.n_cigar == 0: return []
-
-            result = []
-            pos = src.core.pos
-            cigar_p = bam1_cigar(src)
-
-            for k from 0 <= k < src.core.n_cigar:
-                op = cigar_p[k] & BAM_CIGAR_MASK
-                l = cigar_p[k] >> BAM_CIGAR_SHIFT
-                if op == BAM_CMATCH:
-                    for i from pos <= i < pos + l:
-                        result.append( i )
-
-                if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
-                    pos += l
-
-            return result
-
-    property inferred_length:
-        """inferred read length from CIGAR string.
-
-        Returns 0 if CIGAR string is not present.
-        """
-        def __get__(self):
-           cdef uint32_t k, qpos
-           cdef int op
-           cdef uint32_t * cigar_p
-           cdef bam1_t * src 
-
-           src = self._delegate
-           if src.core.n_cigar == 0: return 0
-
-           qpos = 0
-           cigar_p = bam1_cigar(src)
-
-           for k from 0 <= k < src.core.n_cigar:
-               op = cigar_p[k] & BAM_CIGAR_MASK
-
-               if op == BAM_CMATCH or op == BAM_CINS or op == BAM_CSOFT_CLIP:
-                   qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
-
-           return qpos
-            
-
-    property aligned_pairs:
-       """a list of aligned read and reference positions.
-
-       Unaligned position are marked by None.
-       """
-       def __get__(self):
-           cdef uint32_t k, i, pos, qpos
-           cdef int op
-           cdef uint32_t * cigar_p
-           cdef bam1_t * src 
-
-           src = self._delegate
-           if src.core.n_cigar == 0: return []
-
-           result = []
-           pos = src.core.pos
-           qpos = 0
-           cigar_p = bam1_cigar(src)
-
-           for k from 0 <= k < src.core.n_cigar:
-               op = cigar_p[k] & BAM_CIGAR_MASK
-               l = cigar_p[k] >> BAM_CIGAR_SHIFT
-
-               if op == BAM_CMATCH:
-                   for i from pos <= i < pos + l:
-                       result.append( (qpos, i) )
-                       qpos += 1
-                   pos += l
-
-               elif op == BAM_CINS:
-                   for i from pos <= i < pos + l:
-                       result.append( (qpos, None) )
-                       qpos += 1
-
-               elif op == BAM_CDEL or op == BAM_CREF_SKIP:
-                   for i from pos <= i < pos + l:
-                       result.append( (None, i) )
-                   pos += l
-                       
-           return result
-
-    #######################################################################
-    #######################################################################
-    ## 
-    #######################################################################
-    def overlap( self, uint32_t start, uint32_t 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
-        cdef uint32_t * cigar_p
-        cdef bam1_t * src
-
-        overlap = 0
-
-        src = self._delegate
-        if src.core.n_cigar == 0: return 0
-        pos = src.core.pos
-        o = 0
-
-        cigar_p = bam1_cigar(src)
-        for k from 0 <= k < src.core.n_cigar:
-            op = cigar_p[k] & BAM_CIGAR_MASK
-            l = cigar_p[k] >> BAM_CIGAR_SHIFT
-
-            if op == BAM_CMATCH:
-                o = min( pos + l, end) - max( pos, start )
-                if o > 0: overlap += o
-
-            if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
-                pos += l
-
-        return overlap
-
-    def opt(self, tag):
-        """retrieves optional data given a two-letter *tag*"""
-        #see bam_aux.c: bam_aux_get() and bam_aux2i() etc
-        cdef uint8_t * v
-        cdef int nvalues
-        btag = _force_bytes(tag)
-        v = bam_aux_get(self._delegate, btag)
-        if v == NULL: raise KeyError( "tag '%s' not present" % tag )
-        auxtype = chr(v[0])
-        if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
-            return <int>bam_aux2i(v)
-        elif auxtype == 'i' or auxtype == 'I':
-            return <int32_t>bam_aux2i(v)
-        elif auxtype == 'f' or auxtype == 'F':
-            return <float>bam_aux2f(v)
-        elif auxtype == 'd' or auxtype == 'D':
-            return <double>bam_aux2d(v)
-        elif auxtype == 'A':
-            # there might a more efficient way
-            # to convert a char into a string
-            return '%c' % <char>bam_aux2A(v)
-        elif auxtype == 'Z':
-            return _charptr_to_str(<char*>bam_aux2Z(v))
-        elif auxtype == 'B':
-            bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
-            return values
-        else:
-            raise ValueError("unknown auxilliary type '%s'" % auxtype)
-
-
-    def fancy_str (self):
-        """returns list of fieldnames/values in pretty format for debugging
-        """
-        ret_string = []
-        field_names = {
-           "tid":           "Contig index",
-           "pos":           "Mapped position on contig",
-           "mtid":          "Contig index for mate pair",
-           "mpos":          "Position of mate pair",
-           "isize":         "Insert size",
-           "flag":          "Binary flag",
-           "n_cigar":       "Count of cigar entries",
-           "cigar":         "Cigar entries",
-           "qual":          "Mapping quality",
-           "bin":           "Bam index bin number",
-           "l_qname":       "Length of query name",
-           "qname":         "Query name",
-           "l_qseq":        "Length of query sequence",
-           "qseq":          "Query sequence",
-           "bqual":         "Quality scores",
-           "l_aux":         "Length of auxilary data",
-           "m_data":        "Maximum data length",
-           "data_len":      "Current data length",
-           }
-        fields_names_in_order = ["tid", "pos", "mtid", "mpos", "isize", "flag",
-                                 "n_cigar", "cigar", "qual", "bin", "l_qname", "qname",
-                                 "l_qseq", "qseq", "bqual", "l_aux", "m_data", "data_len"]
-
-        for f in fields_names_in_order:
-            if not f in self.__dict__:
-                continue
-            ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f)))
-
-        for f in self.__dict__:
-            if not f in field_names:
-                ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f)))
-        return ret_string
-
-cdef class PileupProxy:
-    '''A pileup column. A pileup column contains
-    all the reads that map to a certain target base.
-
-    tid
-        chromosome ID as is defined in the header
-    pos
-        the target base coordinate (0-based)
-    n
-        number of reads mapping to this column
-    pileups
-        list of reads (:class:`pysam.PileupRead`) aligned to this column
-
-    This class is a proxy for results returned by the samtools pileup engine.
-    If the underlying engine iterator advances, the results of this column
-    will change.
-    '''
-    def __init__(self):
-        raise TypeError("This class cannot be instantiated from Python")
-
-    def __str__(self):
-        return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
-            "\n" +\
-            "\n".join( map(str, self.pileups) )
-
-    property tid:
-        '''the chromosome ID as is defined in the header'''
-        def __get__(self): return self.tid
-
-    property n:
-        '''number of reads mapping to this column.'''
-        def __get__(self): return self.n_pu
-        def __set__(self, n): self.n_pu = n
-
-    property pos:
-        def __get__(self): return self.pos
-
-    property pileups:
-        '''list of reads (:class:`pysam.PileupRead`) aligned to this column'''
-        def __get__(self):
-            cdef int x
-            pileups = []
-
-            if self.plp == NULL or self.plp[0] == NULL:
-                raise ValueError("PileupProxy accessed after iterator finished")
-
-            # warning: there could be problems if self.n and self.buf are
-            # out of sync.
-            for x from 0 <= x < self.n_pu:
-                pileups.append( makePileupRead( &(self.plp[0][x])) )
-            return pileups
-
-cdef class PileupRead:
-    '''A read aligned to a column.
-    '''
-
-    def __init__(self):
-        raise TypeError("This class cannot be instantiated from Python")
 
-    def __str__(self):
-        return "\t".join( map(str, (self.alignment, self.qpos, self.indel, self.level, self.is_del, self.is_head, self.is_tail ) ) )
+cdef inline bytes _forceCmdlineBytes(object s):
+    return _forceBytes(s)
 
-    property alignment:
-        """a :class:`pysam.AlignedRead` object of the aligned read"""
-        def __get__(self):
-            return self._alignment
-    property qpos:
-        """position of the read base at the pileup site, 0-based"""
-        def __get__(self):
-            return self._qpos
-    property indel:
-        """indel length; 0 for no indel, positive for ins and negative for del"""
-        def __get__(self):
-            return self._indel
-    property is_del:
-        """1 iff the base on the padded read is a deletion"""
-        def __get__(self):
-            return self._is_del
-    property is_head:
-        def __get__(self):
-            return self._is_head
-    property is_tail:
-        def __get__(self):
-            return self._is_tail
-    property level:
-        def __get__(self):
-            return self._level
 
 class Outs:
     '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
@@ -3351,7 +47,7 @@ class Outs:
 
     def setfile(self, filename):
         '''open a new file.'''
-        fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);
+        fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660)
         self.setfd(fd)
 
     def setfd(self, fd):
@@ -3373,9 +69,10 @@ class Outs:
             os.close(self.streams[-1])
             del self.streams[-1]
 
-def _samtools_dispatch( method,
-                        args = (),
-                        catch_stdout = True ):
+
+def _samtools_dispatch(method,
+                       args = (),
+                       catch_stdout = True):
     '''call ``method`` in samtools providing arguments in args.
     
     .. note:: 
@@ -3400,12 +97,12 @@ def _samtools_dispatch( method,
     
     # some special cases
     if method == "index":
-        if not os.path.exists( args[0] ):
-            raise IOError( "No such file or directory: '%s'" % args[0] )
+        if not os.path.exists(args[0]):
+            raise IOError("No such file or directory: '%s'" % args[0])
 
     # redirect stderr and stdout to file
     stderr_h, stderr_f = tempfile.mkstemp()
-    pysam_set_stderr( stderr_h )
+    pysam_set_stderr(stderr_h)
         
     if catch_stdout:
         stdout_h, stdout_f = tempfile.mkstemp()
@@ -3420,7 +117,8 @@ def _samtools_dispatch( method,
         # samtools `view` closes stdout, from which I can not
         # recover. Thus redirect output to file with -o option.
         if method == "view":
-            if "-o" in args: raise ValueError("option -o is forbidden in samtools view")
+            if "-o" in args:
+                raise ValueError("option -o is forbidden in samtools view")
             args = ( "-o", stdout_f ) + args
 
     # do the function call to samtools
@@ -3428,8 +126,8 @@ def _samtools_dispatch( method,
     cdef int i, n, retval
 
     n = len(args)
-    method = _force_cmdline_bytes(method)
-    args = [ _force_cmdline_bytes(a) for a in args ]
+    method = _forceCmdlineBytes(method)
+    args = [ _forceCmdlineBytes(a) for a in args ]
 
     # allocate two more for first (dummy) argument (contains command)
     cargs = <char**>calloc( n+2, sizeof( char *) )
@@ -3471,634 +169,3 @@ def _samtools_dispatch( method,
 
     return retval, out_stderr, out_stdout
 
-cdef class SNPCall:
-    '''the results of a SNP call.'''
-    cdef int _tid
-    cdef int _pos
-    cdef char _reference_base
-    cdef char _genotype
-    cdef int _consensus_quality
-    cdef int _snp_quality
-    cdef int _rms_mapping_quality
-    cdef int _coverage
-
-    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 reference_base:
-       '''reference base at pos. ``N`` if no reference sequence supplied.'''
-       def __get__(self): return from_string_and_size( &self._reference_base, 1 )
-
-    property genotype:
-       '''the genotype called.'''
-       def __get__(self): return from_string_and_size( &self._genotype, 1 )
-
-    property consensus_quality:
-       '''the genotype quality (Phred-scaled).'''
-       def __get__(self): return self._consensus_quality
-
-    property snp_quality:
-       '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
-       def __get__(self): return self._snp_quality
-
-    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
-
-    def __str__(self):
-
-        return "\t".join( map(str, (
-                    self.tid,
-                    self.pos,
-                    self.reference_base,
-                    self.genotype,
-                    self.consensus_quality,
-                    self.snp_quality,
-                    self.mapping_quality,
-                    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.
-
-#     """
-
-#     def __cinit__(self,
-#                   IteratorColumn iterator_column,
-#                   **kwargs ):
-
-#         assert self.iter.hasReference(), "IteratorSNPCalls requires an pileup iterator with reference sequence"
-
-#     def __iter__(self):
-#         return self
-
-#     def __next__(self):
-#         """python version of next().
-#         """
-
-#         # 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.plp == NULL:
-#            raise StopIteration
-
-#         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 SNPCaller( SNPCallerBase ):
-#     '''*(IteratorColumn iterator_column )*
-
-#     The samtools SNP caller.
-
-#     This object will call SNPs in *samfile* against the reference
-#     sequence in *fasta*.
-
-#     This caller is fast for calling few SNPs in selected regions.
-
-#     It is slow, if called over large genomic regions.
-#     '''
-
-
-#     def __cinit__(self,
-#                   IteratorColumn iterator_column,
-#                   **kwargs ):
-
-#         pass
-
-#     def call(self, reference, int pos ):
-#         """call a snp on chromosome *reference*
-#         and position *pos*.
-
-#         returns a :class:`SNPCall` object.
-#         """
-
-#         cdef int tid = self.iter.samfile.gettid( reference )
-
-#         self.iter.reset( tid, pos, pos + 1 )
-
-#         while 1:
-#             self.iter.cnext()
-
-#             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.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
-
-#     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 ):
-
-#         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 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
-
-#         call._rms_mapping_quality = <uint64_t>(sqrt(<double>rms_aux / self.iter.n_plp) + .499)
-
-#         return call
-
-# cdef class IndelCaller( IndelCallerBase ):
-#     '''*(IteratorColumn iterator_column )*
-
-#     The samtools SNP caller.
-
-#     This object will call SNPs in *samfile* against the reference
-#     sequence in *fasta*.
-
-#     This caller is fast for calling few SNPs in selected regions.
-
-#     It is slow, if called over large genomic regions.
-#     '''
-
-#     def __cinit__(self,
-#                   IteratorColumn iterator_column,
-#                   **kwargs ):
-
-#         pass
-
-#     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.
-#         """
-
-#         cdef int tid = self.iter.samfile.gettid( reference )
-
-#         self.iter.reset( tid, pos, pos + 1 )
-
-#         while 1:
-#             self.iter.cnext()
-
-#             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.pos == pos: break
-
-#         return self._call()
-
-# cdef class IteratorIndelCalls( IndelCallerBase ):
-#     """*(IteratorColumn iterator)*
-
-#     call indels 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 ):
-#         pass
-
-
-#     def __iter__(self):
-#         return self
-
-#     def __next__(self):
-#         """python version of next().
-#         """
-
-#         # 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.plp == NULL:
-#            raise StopIteration
-
-#         return self._call()
-
-
-
-cdef class IndexedReads:
-    """index a bamfile by read.
-
-    The index is kept in memory.
-
-    By default, the file is re-openend to avoid conflicts if
-    multiple operators work on the same file. Set *reopen* = False
-    to not re-open *samfile*.
-    """
-
-    def __init__(self, Samfile samfile, int reopen = True ):
-        self.samfile = samfile
-
-        if samfile.isbam: mode = b"rb"
-        else: mode = b"r"
-
-        # reopen the file - note that this makes the iterator
-        # slow and causes pileup to slow down significantly.
-        if reopen:
-            store = StderrStore()
-            self.fp = samopen( samfile._filename, mode, NULL )
-            store.release()
-            assert self.fp != NULL
-            self.owns_samfile = True
-        else:
-            self.fp = samfile.samfile
-            self.owns_samfile = False
-
-        assert samfile.isbam, "can only IndexReads on bam files"
-
-    def build( self ):
-        '''build index.'''
-
-        self.index = collections.defaultdict( list )
-
-        # this method will start indexing from the current file position
-        # if you decide
-        cdef int ret = 1
-        cdef bam1_t * b = <bam1_t*> calloc(1, sizeof( bam1_t) )
-
-        cdef uint64_t pos
-
-        while ret > 0:
-            pos = bam_tell( self.fp.x.bam )
-            ret = samread( self.fp, b)
-            if ret > 0:
-                qname = _charptr_to_str(bam1_qname( b ))
-                self.index[qname].append( pos )
-
-        bam_destroy1( b )
-
-    def find( self, qname ):
-        if qname in self.index:
-            return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
-        else:
-            raise KeyError( "read %s not found" % qname )
-
-    def __dealloc__(self):
-        if self.owns_samfile: samclose( self.fp )
-
-__all__ = ["Samfile",
-           "Fastafile",
-           "Fastqfile",
-           "IteratorRow",
-           "IteratorColumn",
-           "AlignedRead",
-           "PileupColumn",
-           "PileupProxy",
-           "PileupRead",
-           # "IteratorSNPCalls",
-           # "SNPCaller",
-           # "IndelCaller",
-           # "IteratorIndelCalls",
-           "IndexedReads" ]
-
-
-
diff --git a/pysam/ctabix.c b/pysam/ctabix.c
index 6231c76..9018781 100644
--- a/pysam/ctabix.c
+++ b/pysam/ctabix.c
@@ -1,12 +1,25 @@
-/* Generated by Cython 0.18 on Sat Nov 16 01:37:33 2013 */
+/* Generated by Cython 0.20.1 on Tue Jul 15 21:20:07 2014 */
 
 #define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
 #include "Python.h"
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
 #elif PY_VERSION_HEX < 0x02040000
     #error Cython requires Python 2.4+.
 #else
+#define CYTHON_ABI "0_20_1"
 #include <stddef.h> /* For offsetof */
 #ifndef offsetof
 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -41,6 +54,9 @@
 #define CYTHON_COMPILING_IN_PYPY 0
 #define CYTHON_COMPILING_IN_CPYTHON 1
 #endif
+#if CYTHON_COMPILING_IN_PYPY
+#define Py_OptimizeFlag 0
+#endif
 #if PY_VERSION_HEX < 0x02050000
   typedef int Py_ssize_t;
   #define PY_SSIZE_T_MAX INT_MAX
@@ -48,7 +64,7 @@
   #define PY_FORMAT_SIZE_T ""
   #define CYTHON_FORMAT_SSIZE_T ""
   #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
-  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
+  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
   #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                 (PyErr_Format(PyExc_TypeError, \
                                               "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
@@ -100,13 +116,15 @@
 #if PY_MAJOR_VERSION < 3
   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
-          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
 #else
   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
 #endif
-#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
+#if PY_VERSION_HEX < 0x02060000
   #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
 #endif
 #if PY_MAJOR_VERSION >= 3
@@ -116,19 +134,47 @@
 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
+#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
+  #define Py_TPFLAGS_IS_ABSTRACT 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
   #define CYTHON_PEP393_ENABLED 1
   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                               0 : _PyUnicode_Ready((PyObject *)(op)))
   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
 #else
   #define CYTHON_PEP393_ENABLED 0
   #define __Pyx_PyUnicode_READY(op)       (0)
   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
-  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
 #endif
 #if PY_MAJOR_VERSION >= 3
   #define PyBaseString_Type            PyUnicode_Type
@@ -155,6 +201,14 @@
   #define PyBytes_Concat               PyString_Concat
   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
 #endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
 #if PY_VERSION_HEX < 0x02060000
   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
@@ -178,11 +232,12 @@
   #define PyInt_AsSsize_t              PyLong_AsSsize_t
   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
 #endif
 #if PY_MAJOR_VERSION >= 3
   #define PyBoolObject                 PyLongObject
 #endif
-#if PY_VERSION_HEX < 0x03020000
+#if PY_VERSION_HEX < 0x030200A4
   typedef long Py_hash_t;
   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
@@ -227,6 +282,40 @@
   #define __Pyx_NAMESTR(n) (n)
   #define __Pyx_DOCSTR(n)  (n)
 #endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
 
 
 #if PY_MAJOR_VERSION >= 3
@@ -251,21 +340,23 @@
 #include <math.h>
 #define __PYX_HAVE__pysam__ctabix
 #define __PYX_HAVE_API__pysam__ctabix
+#include "stdint.h"
 #include "string.h"
 #include "stdlib.h"
 #include "stdio.h"
-#include "ctype.h"
-#include "sys/types.h"
-#include "sys/stat.h"
 #include "fcntl.h"
 #include "unistd.h"
-#include "stdint.h"
 #include "zlib.h"
-#include "bgzf.h"
-#include "tabix.h"
-#include "tabix_util.h"
-#include "pythread.h"
+#include "htslib/kstring.h"
+#include "htslib/hfile.h"
+#include "htslib/bgzf.h"
+#include "htslib/hts.h"
+#include "htslib/sam.h"
+#include "pysam_stream.h"
+#include "htslib/faidx.h"
+#include "htslib/tbx.h"
 #include "errno.h"
+#include "pythread.h"
 #ifdef _OPENMP
 #include <omp.h>
 #endif /* _OPENMP */
@@ -274,17 +365,6 @@
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
-    #define CYTHON_INLINE __inline__
-  #elif defined(_MSC_VER)
-    #define CYTHON_INLINE __inline
-  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-    #define CYTHON_INLINE inline
-  #else
-    #define CYTHON_INLINE
-  #endif
-#endif
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
@@ -298,23 +378,142 @@
 #   define CYTHON_UNUSED
 # endif
 #endif
-typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
-
-#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
-#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 #if CYTHON_COMPILING_IN_CPYTHON
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 #else
 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
 #endif
 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
 
 
 #ifdef __GNUC__
@@ -330,8 +529,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
   #define likely(x)   (x)
   #define unlikely(x) (x)
 #endif /* __GNUC__ */
-    
+
 static PyObject *__pyx_m;
+static PyObject *__pyx_d;
 static PyObject *__pyx_b;
 static PyObject *__pyx_empty_tuple;
 static PyObject *__pyx_empty_bytes;
@@ -343,67 +543,30 @@ static const char *__pyx_filename;
 
 static const char *__pyx_f[] = {
   "ctabix.pyx",
-  "TabProxies.pxd",
   "type.pxd",
   "bool.pxd",
   "complex.pxd",
+  "TabProxies.pxd",
 };
 
 /*--- Type declarations ---*/
-struct __pyx_obj_5pysam_6ctabix_TabixIterator;
-struct __pyx_obj_5pysam_6ctabix_Parser;
-struct __pyx_obj_5pysam_6ctabix_asGTF;
 struct __pyx_obj_5pysam_10TabProxies_TupleProxy;
 struct __pyx_obj_5pysam_10TabProxies_GTFProxy;
+struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy;
+struct __pyx_obj_5pysam_10TabProxies_BedProxy;
+struct __pyx_obj_5pysam_10TabProxies_VCFProxy;
 struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator;
-struct __pyx_obj_5pysam_6ctabix_asVCF;
 struct __pyx_obj_5pysam_6ctabix_Tabixfile;
+struct __pyx_obj_5pysam_6ctabix_Parser;
 struct __pyx_obj_5pysam_6ctabix_asTuple;
-struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed;
-struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy;
-struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator;
-struct __pyx_obj_5pysam_10TabProxies_BedProxy;
+struct __pyx_obj_5pysam_6ctabix_asGTF;
 struct __pyx_obj_5pysam_6ctabix_asBed;
-struct __pyx_obj_5pysam_10TabProxies_VCFProxy;
-
-/* "pysam/ctabix.pxd":224
- *     cdef Parser parser
- * 
- * cdef class TabixIterator:             # <<<<<<<<<<<<<<
- *     cdef ti_iter_t iterator
- *     cdef tabix_t * tabixfile
- */
-struct __pyx_obj_5pysam_6ctabix_TabixIterator {
-  PyObject_HEAD
-  ti_iter_t iterator;
-  tabix_t *tabixfile;
-};
-
-
-/* "pysam/ctabix.pxd":232
- *     cdef tabix_t * tabixfile
- * 
- * cdef class Parser:             # <<<<<<<<<<<<<<
- *      cdef parse( self, char * buffer, int len )
- * 
- */
-struct __pyx_obj_5pysam_6ctabix_Parser {
-  PyObject_HEAD
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser *__pyx_vtab;
-};
-
-
-/* "pysam/ctabix.pxd":239
- * 
- * 
- * cdef class asGTF(Parser):             # <<<<<<<<<<<<<<
- *      pass
- * 
- */
-struct __pyx_obj_5pysam_6ctabix_asGTF {
-  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
-};
-
+struct __pyx_obj_5pysam_6ctabix_asVCF;
+struct __pyx_obj_5pysam_6ctabix_TabixIterator;
+struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed;
+struct __pyx_obj_5pysam_6ctabix_GZIterator;
+struct __pyx_obj_5pysam_6ctabix_GZIteratorHead;
+struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed;
 
 /* "TabProxies.pxd":41
  *   ctypedef int uint64_t
@@ -439,18 +602,60 @@ struct __pyx_obj_5pysam_10TabProxies_GTFProxy {
 };
 
 
-/* "pysam/ctabix.pxd":201
- *     int ks_getuntil( kstream_t *, int, kstring_t *, int * )
+/* "TabProxies.pxd":69
+ *     cdef char * getAttributes( self )
+ * 
+ * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ *     pass
+ * 
+ */
+struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy {
+  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
+};
+
+
+/* "TabProxies.pxd":72
+ *     pass
+ * 
+ * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * 
+ *     cdef:
+ */
+struct __pyx_obj_5pysam_10TabProxies_BedProxy {
+  struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+  char *contig;
+  uint32_t start;
+  uint32_t end;
+  int bedfields;
+};
+
+
+/* "TabProxies.pxd":83
+ *     cdef update( self, char * buffer, size_t nbytes )
+ * 
+ * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * 
+ *     cdef:
+ */
+struct __pyx_obj_5pysam_10TabProxies_VCFProxy {
+  struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+  char *contig;
+  uint32_t pos;
+};
+
+
+/* "pysam/ctabix.pxd":19
+ *     kstream_t, kstring_t, gzFile, tbx_t
  * 
  * cdef class tabix_file_iterator:             # <<<<<<<<<<<<<<
  *     cdef gzFile fh
- *     cdef kstream_t * ks
+ *     cdef kstream_t * kstream
  */
 struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator {
   PyObject_HEAD
   struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *__pyx_vtab;
   gzFile fh;
-  kstream_t *ks;
+  kstream_t *kstream;
   kstring_t buffer;
   size_t size;
   struct __pyx_obj_5pysam_6ctabix_Parser *parser;
@@ -459,19 +664,7 @@ struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator {
 };
 
 
-/* "pysam/ctabix.pxd":245
- *      pass
- * 
- * cdef class asVCF(Parser):             # <<<<<<<<<<<<<<
- *      pass
- * 
- */
-struct __pyx_obj_5pysam_6ctabix_asVCF {
-  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
-};
-
-
-/* "pysam/ctabix.pxd":212
+/* "pysam/ctabix.pxd":30
  *     cdef __cnext__(self)
  * 
  * cdef class Tabixfile:             # <<<<<<<<<<<<<<
@@ -480,177 +673,145 @@ struct __pyx_obj_5pysam_6ctabix_asVCF {
  */
 struct __pyx_obj_5pysam_6ctabix_Tabixfile {
   PyObject_HEAD
-  tabix_t *tabixfile;
+  htsFile *tabixfile;
+  tbx_t *index;
   int isremote;
   char *_filename;
   struct __pyx_obj_5pysam_6ctabix_Parser *parser;
 };
 
 
-/* "pysam/ctabix.pxd":235
- *      cdef parse( self, char * buffer, int len )
+/* "pysam/ctabix.pxd":44
+ *     cdef Parser parser
  * 
- * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
- *      cdef parse( self, char * buffer, int len )
+ * cdef class Parser:             # <<<<<<<<<<<<<<
+ *     cdef parse(self, char * buffer, int len)
  * 
  */
-struct __pyx_obj_5pysam_6ctabix_asTuple {
-  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_obj_5pysam_6ctabix_Parser {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser *__pyx_vtab;
 };
 
 
-/* "pysam/ctabix.pxd":248
- *      pass
+/* "pysam/ctabix.pxd":47
+ *     cdef parse(self, char * buffer, int len)
+ * 
+ * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
+ *     cdef parse(self, char * buffer, int len)
  * 
- * cdef class TabixIteratorParsed:             # <<<<<<<<<<<<<<
- *     cdef ti_iter_t iterator
- *     cdef tabix_t * tabixfile
  */
-struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed {
-  PyObject_HEAD
-  ti_iter_t iterator;
-  tabix_t *tabixfile;
-  struct __pyx_obj_5pysam_6ctabix_Parser *parser;
+struct __pyx_obj_5pysam_6ctabix_asTuple {
+  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
 };
 
 
-/* "TabProxies.pxd":69
- *     cdef char * getAttributes( self )
+/* "pysam/ctabix.pxd":50
+ *     cdef parse(self, char * buffer, int len)
  * 
- * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class asGTF(Parser):             # <<<<<<<<<<<<<<
  *     pass
  * 
  */
-struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy {
-  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
+struct __pyx_obj_5pysam_6ctabix_asGTF {
+  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
 };
 
 
-/* "pysam/ctabix.pxd":228
- *     cdef tabix_t * tabixfile
+/* "pysam/ctabix.pxd":53
+ *     pass
+ * 
+ * cdef class asBed(Parser):             # <<<<<<<<<<<<<<
+ *     pass
  * 
- * cdef class TabixHeaderIterator:             # <<<<<<<<<<<<<<
- *     cdef ti_iter_t iterator
- *     cdef tabix_t * tabixfile
  */
-struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator {
-  PyObject_HEAD
-  ti_iter_t iterator;
-  tabix_t *tabixfile;
+struct __pyx_obj_5pysam_6ctabix_asBed {
+  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
 };
 
 
-/* "TabProxies.pxd":72
+/* "pysam/ctabix.pxd":56
  *     pass
  * 
- * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class asVCF(Parser):             # <<<<<<<<<<<<<<
+ *     pass
  * 
- *     cdef:
  */
-struct __pyx_obj_5pysam_10TabProxies_BedProxy {
-  struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
-  char *contig;
-  uint32_t start;
-  uint32_t end;
-  int bedfields;
+struct __pyx_obj_5pysam_6ctabix_asVCF {
+  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
 };
 
 
-/* "pysam/ctabix.pxd":242
- *      pass
- * 
- * cdef class asBed(Parser):             # <<<<<<<<<<<<<<
- *      pass
+/* "pysam/ctabix.pxd":59
+ *     pass
  * 
+ * cdef class TabixIterator:             # <<<<<<<<<<<<<<
+ *     cdef hts_itr_t * iterator
+ *     cdef Tabixfile tabixfile
  */
-struct __pyx_obj_5pysam_6ctabix_asBed {
-  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_obj_5pysam_6ctabix_TabixIterator {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator *__pyx_vtab;
+  hts_itr_t *iterator;
+  struct __pyx_obj_5pysam_6ctabix_Tabixfile *tabixfile;
+  kstring_t buffer;
 };
 
 
-/* "TabProxies.pxd":83
- *     cdef update( self, char * buffer, size_t nbytes )
+/* "pysam/ctabix.pxd":65
+ *     cdef int __cnext__(self)
  * 
- * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class TabixIteratorParsed(TabixIterator):             # <<<<<<<<<<<<<<
+ *     cdef Parser parser
  * 
- *     cdef:
  */
-struct __pyx_obj_5pysam_10TabProxies_VCFProxy {
-  struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
-  char *contig;
-  uint32_t pos;
+struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed {
+  struct __pyx_obj_5pysam_6ctabix_TabixIterator __pyx_base;
+  struct __pyx_obj_5pysam_6ctabix_Parser *parser;
 };
 
 
-
-/* "pysam/ctabix.pyx":392
- * #########################################################
- * #########################################################
- * cdef class Parser:             # <<<<<<<<<<<<<<
+/* "pysam/ctabix.pxd":68
+ *     cdef Parser parser
  * 
- *     cdef parse(self, char * buffer, int length):
+ * cdef class GZIterator:             # <<<<<<<<<<<<<<
+ *     cdef object _filename
+ *     cdef gzFile gzipfile
  */
-
-struct __pyx_vtabstruct_5pysam_6ctabix_Parser {
-  PyObject *(*parse)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int);
+struct __pyx_obj_5pysam_6ctabix_GZIterator {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator *__pyx_vtab;
+  PyObject *_filename;
+  gzFile gzipfile;
+  kstream_t *kstream;
+  kstring_t buffer;
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_Parser *__pyx_vtabptr_5pysam_6ctabix_Parser;
 
 
-/* "pysam/ctabix.pyx":400
- *         return self.parse( buffer, length )
+/* "pysam/ctabix.pxd":75
+ *     cdef int __cnext__(self)
  * 
- * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
- *     '''converts a :term:`tabix row` into a python tuple.
- * 
- */
-
-struct __pyx_vtabstruct_5pysam_6ctabix_asTuple {
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
-};
-static struct __pyx_vtabstruct_5pysam_6ctabix_asTuple *__pyx_vtabptr_5pysam_6ctabix_asTuple;
-
-
-/* "pysam/ctabix.pyx":450
- *         return r
+ * cdef class GZIteratorHead(GZIterator):             # <<<<<<<<<<<<<<
+ *     pass
  * 
- * cdef class asBed( Parser ):             # <<<<<<<<<<<<<<
- *     '''converts a :term:`tabix row` into a bed record
- *     with the following fields:
  */
-
-struct __pyx_vtabstruct_5pysam_6ctabix_asBed {
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_obj_5pysam_6ctabix_GZIteratorHead {
+  struct __pyx_obj_5pysam_6ctabix_GZIterator __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asBed *__pyx_vtabptr_5pysam_6ctabix_asBed;
 
 
-/* "pysam/ctabix.pyx":802
+/* "pysam/ctabix.pxd":78
+ *     pass
  * 
+ * cdef class GZIteratorParsed(GZIterator):             # <<<<<<<<<<<<<<
+ *     cdef Parser parser
  * 
- * cdef class tabix_file_iterator:             # <<<<<<<<<<<<<<
- *     '''iterate over a compressed or uncompressed ``infile``.
- *     '''
  */
-
-struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator {
-  PyObject *(*__pyx___cnext__)(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *);
+struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed {
+  struct __pyx_obj_5pysam_6ctabix_GZIterator __pyx_base;
+  struct __pyx_obj_5pysam_6ctabix_Parser *parser;
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *__pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator;
-
-
-/* "pysam/ctabix.pyx":490
- *         return r
- * 
- * cdef class asVCF( Parser ):             # <<<<<<<<<<<<<<
- *     '''converts a :term:`tabix row` into a VCF record with
- *     the following fields:
- */
 
-struct __pyx_vtabstruct_5pysam_6ctabix_asVCF {
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
-};
-static struct __pyx_vtabstruct_5pysam_6ctabix_asVCF *__pyx_vtabptr_5pysam_6ctabix_asVCF;
 
 
 /* "TabProxies.pxd":41
@@ -671,6 +832,21 @@ struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy {
 static struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *__pyx_vtabptr_5pysam_10TabProxies_TupleProxy;
 
 
+/* "TabProxies.pxd":60
+ *     cdef update( self, char * buffer, size_t nbytes )
+ * 
+ * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ * 
+ *     cdef:
+ */
+
+struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
+  char *(*getAttributes)(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *);
+};
+static struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *__pyx_vtabptr_5pysam_10TabProxies_GTFProxy;
+
+
 /* "TabProxies.pxd":69
  *     cdef char * getAttributes( self )
  * 
@@ -699,7 +875,63 @@ struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy {
 static struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy *__pyx_vtabptr_5pysam_10TabProxies_BedProxy;
 
 
-/* "pysam/ctabix.pyx":413
+/* "TabProxies.pxd":83
+ *     cdef update( self, char * buffer, size_t nbytes )
+ * 
+ * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * 
+ *     cdef:
+ */
+
+struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *__pyx_vtabptr_5pysam_10TabProxies_VCFProxy;
+
+
+/* "pysam/ctabix.pyx":829
+ * 
+ * 
+ * cdef class tabix_file_iterator:             # <<<<<<<<<<<<<<
+ *     '''iterate over a compressed or uncompressed ``infile``.
+ *     '''
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator {
+  PyObject *(*__pyx___cnext__)(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *);
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *__pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator;
+
+
+/* "pysam/ctabix.pyx":86
+ * 
+ * 
+ * cdef class Parser:             # <<<<<<<<<<<<<<
+ * 
+ *     cdef parse(self, char * buffer, int length):
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_Parser {
+  PyObject *(*parse)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int);
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_Parser *__pyx_vtabptr_5pysam_6ctabix_Parser;
+
+
+/* "pysam/ctabix.pyx":95
+ *         return self.parse(buffer, length)
+ * 
+ * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
+ *     '''converts a :term:`tabix row` into a python tuple.
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_asTuple {
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_asTuple *__pyx_vtabptr_5pysam_6ctabix_asTuple;
+
+
+/* "pysam/ctabix.pyx":108
  *         return r
  * 
  * cdef class asGTF(Parser):             # <<<<<<<<<<<<<<
@@ -713,33 +945,102 @@ struct __pyx_vtabstruct_5pysam_6ctabix_asGTF {
 static struct __pyx_vtabstruct_5pysam_6ctabix_asGTF *__pyx_vtabptr_5pysam_6ctabix_asGTF;
 
 
-/* "TabProxies.pxd":60
- *     cdef update( self, char * buffer, size_t nbytes )
+/* "pysam/ctabix.pyx":145
+ *         return r
  * 
- * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class asBed( Parser ):             # <<<<<<<<<<<<<<
+ *     '''converts a :term:`tabix row` into a bed record
+ *     with the following fields:
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_asBed {
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_asBed *__pyx_vtabptr_5pysam_6ctabix_asBed;
+
+
+/* "pysam/ctabix.pyx":185
+ *         return r
  * 
- *     cdef:
+ * cdef class asVCF( Parser ):             # <<<<<<<<<<<<<<
+ *     '''converts a :term:`tabix row` into a VCF record with
+ *     the following fields:
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
-  char *(*getAttributes)(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *);
+struct __pyx_vtabstruct_5pysam_6ctabix_asVCF {
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *__pyx_vtabptr_5pysam_10TabProxies_GTFProxy;
+static struct __pyx_vtabstruct_5pysam_6ctabix_asVCF *__pyx_vtabptr_5pysam_6ctabix_asVCF;
 
 
-/* "TabProxies.pxd":83
- *     cdef update( self, char * buffer, size_t nbytes )
+/* "pysam/ctabix.pyx":428
+ *             free(self._filename)
  * 
- * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class TabixIterator:             # <<<<<<<<<<<<<<
+ *     """iterates over rows in *tabixfile* in region
+ *     given by *tid*, *start* and *end*.
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator {
+  int (*__pyx___cnext__)(struct __pyx_obj_5pysam_6ctabix_TabixIterator *);
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator *__pyx_vtabptr_5pysam_6ctabix_TabixIterator;
+
+
+/* "pysam/ctabix.pyx":486
+ * 
+ * 
+ * cdef class TabixIteratorParsed(TabixIterator):             # <<<<<<<<<<<<<<
+ *     """iterates over mapped reads in a region.
  * 
- *     cdef:
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+struct __pyx_vtabstruct_5pysam_6ctabix_TabixIteratorParsed {
+  struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *__pyx_vtabptr_5pysam_10TabProxies_VCFProxy;
+static struct __pyx_vtabstruct_5pysam_6ctabix_TabixIteratorParsed *__pyx_vtabptr_5pysam_6ctabix_TabixIteratorParsed;
+
+
+/* "pysam/ctabix.pyx":510
+ * 
+ * 
+ * cdef class GZIterator:             # <<<<<<<<<<<<<<
+ *     def __init__(self, filename, int buffer_size=65536):
+ *         '''iterate line-by-line through gzip (or bgzip)
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator {
+  int (*__pyx___cnext__)(struct __pyx_obj_5pysam_6ctabix_GZIterator *);
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator *__pyx_vtabptr_5pysam_6ctabix_GZIterator;
+
+
+/* "pysam/ctabix.pyx":558
+ * 
+ * 
+ * cdef class GZIteratorHead(GZIterator):             # <<<<<<<<<<<<<<
+ *     '''iterate line-by-line through gzip (or bgzip)
+ *     compressed file returning comments at top of file.
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorHead {
+  struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorHead *__pyx_vtabptr_5pysam_6ctabix_GZIteratorHead;
+
+
+/* "pysam/ctabix.pyx":575
+ * 
+ * 
+ * cdef class GZIteratorParsed(GZIterator):             # <<<<<<<<<<<<<<
+ *     '''iterate line-by-line through gzip (or bgzip)
+ *     compressed file returning comments at top of file.
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorParsed {
+  struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorParsed *__pyx_vtabptr_5pysam_6ctabix_GZIteratorParsed;
 #ifndef CYTHON_REFNANNY
   #define CYTHON_REFNANNY 0
 #endif
@@ -791,15 +1092,39 @@ static struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *__pyx_vtabptr_5pysa
   #define __Pyx_XGOTREF(r)
   #define __Pyx_XGIVEREF(r)
 #endif /* CYTHON_REFNANNY */
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
 
-static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
-         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
-         const char* encoding, const char* errors,
-         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
 
 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*/
@@ -808,121 +1133,85 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
 
 #include <string.h>
 
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
+
 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
 
 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
     const char* function_name); /*proto*/
 
-static 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_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
 
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-    PyObject *r;
-    if (!j) return NULL;
-    r = PyObject_GetItem(o, j);
-    Py_DECREF(j);
-    return r;
-}
-#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-        PyObject *r = PyList_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
-    }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
+
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
 #else
-    return PySequence_GetItem(o, i);
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
 #endif
-}
-#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
+
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
+               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck);
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
+
 #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
-        PyObject *r = PyTuple_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
     }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-#else
-    return PySequence_GetItem(o, i);
-#endif
+    return PyList_Append(list, x);
 }
-#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (PyList_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-            PyObject *r = PyList_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    }
-    else if (PyTuple_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
-            PyObject *r = PyTuple_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    } else {  /* inlined PySequence_GetItem() */
-        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-        if (likely(m && m->sq_item)) {
-            if (unlikely(i < 0) && likely(m->sq_length)) {
-                Py_ssize_t l = m->sq_length(o);
-                if (unlikely(l < 0)) return NULL;
-                i += l;
-            }
-            return m->sq_item(o, i);
-        }
-    }
 #else
-    if (PySequence_Check(o)) {
-        return PySequence_GetItem(o, i);
-    }
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
 #endif
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-}
 
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
-
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-
-static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
-
-static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
-
-static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
-    const char *name, int exact); /*proto*/
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+    const char *name, int exact); /*proto*/
 
 #if PY_MAJOR_VERSION >= 3
 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
     PyObject *value;
     value = PyDict_GetItemWithError(d, key);
     if (unlikely(!value)) {
-        if (!PyErr_Occurred())
-            PyErr_SetObject(PyExc_KeyError, key);
+        if (!PyErr_Occurred()) {
+            PyObject* args = PyTuple_Pack(1, key);
+            if (likely(args))
+                PyErr_SetObject(PyExc_KeyError, args);
+            Py_XDECREF(args);
+        }
         return NULL;
     }
     Py_INCREF(value);
@@ -932,17 +1221,80 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
     #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
 #endif
 
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*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, int level); /*proto*/
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+#if PY_MAJOR_VERSION < 3
+#define __Pyx_PyString_Join __Pyx_PyBytes_Join
+#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
+#else
+#define __Pyx_PyString_Join PyUnicode_Join
+#define __Pyx_PyBaseString_Join PyUnicode_Join
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+    #if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyBytes_Join _PyString_Join
+    #else
+    #define __Pyx_PyBytes_Join _PyBytes_Join
+    #endif
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/
+#endif
+
+static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
+    PyObject *method, *result = NULL;
+    if (unlikely(!args)) return NULL;
+    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+    if (unlikely(!method)) goto bad;
+    result = __Pyx_PyObject_Call(method, args, NULL);
+    Py_DECREF(method);
+bad:
+    Py_DECREF(args);
+    return result;
+}
+#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
+#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
+#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
+#define __Pyx_PyObject_CallMethod0(obj, name) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))
+
+static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); /*proto*/
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
 
-static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
+
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_setattro))
+        return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_setattr))
+        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+    return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
 
-static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
-                                   PyObject *qualname, PyObject *modname); /*proto*/
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+
+static void* __Pyx_GetVtable(PyObject *dict); /*proto*/
+
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
 
 #define __Pyx_CyFunction_USED 1
 #include <structmember.h>
@@ -959,71 +1311,64 @@ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *na
     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
 typedef struct {
     PyCFunctionObject func;
-    int flags;
     PyObject *func_dict;
     PyObject *func_weakreflist;
     PyObject *func_name;
     PyObject *func_qualname;
     PyObject *func_doc;
+    PyObject *func_globals;
     PyObject *func_code;
     PyObject *func_closure;
     PyObject *func_classobj; /* No-args super() class cell */
     void *defaults;
     int defaults_pyobjects;
-    PyObject *defaults_tuple; /* Const defaults tuple */
+    int flags;
+    PyObject *defaults_tuple;   /* Const defaults tuple */
+    PyObject *defaults_kwdict;  /* Const kwonly defaults dict */
     PyObject *(*defaults_getter)(PyObject *);
+    PyObject *func_annotations; /* function annotations dict */
 } __pyx_CyFunctionObject;
 static PyTypeObject *__pyx_CyFunctionType = 0;
-#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \
-    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code)
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
+    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
 static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                       int flags, PyObject* qualname,
-                                      PyObject *self, PyObject *module,
+                                      PyObject *self,
+                                      PyObject *module, PyObject *globals,
                                       PyObject* code);
 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                          size_t size,
                                                          int pyobjects);
 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                             PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+                                                             PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+                                                              PyObject *dict);
 static int __Pyx_CyFunction_init(void);
 
-static CYTHON_INLINE int32_t __Pyx_PyInt_from_py_int32_t(PyObject *);
-
-static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
-
-static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
 
-static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+                                           PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/
 
-static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
-
-static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
-
-static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
-
-static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
-
-static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
-
-static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
-
-static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
-
-static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
 
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
 
-static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
 
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);
 
-static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
 
-static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
 
 static int __Pyx_check_binary_version(void);
 
-static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/
 
 #if !defined(__Pyx_PyIdentifier_FromString)
 #if PY_MAJOR_VERSION < 3
@@ -1037,8 +1382,6 @@ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
 
 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
 
-static void* __Pyx_GetVtable(PyObject *dict); /*proto*/
-
 typedef struct {
     int code_line;
     PyCodeObject* code_object;
@@ -1059,12 +1402,17 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 
 
-/* Module declarations from 'pysam.TabProxies' */
-static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_TupleProxy = 0;
-static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_GTFProxy = 0;
-static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy = 0;
-static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_BedProxy = 0;
-static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_VCFProxy = 0;
+/* Module declarations from 'libc.stdint' */
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libc.stdlib' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from 'pysam.chtslib' */
+
+/* Module declarations from 'libc.errno' */
 
 /* Module declarations from 'cpython.version' */
 
@@ -1080,10 +1428,6 @@ static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_VCFProxy = 0;
 
 /* Module declarations from 'cpython.list' */
 
-/* Module declarations from 'libc.string' */
-
-/* Module declarations from 'libc.stdio' */
-
 /* Module declarations from 'cpython.object' */
 
 /* Module declarations from 'cpython.sequence' */
@@ -1149,23 +1493,28 @@ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
 
 /* Module declarations from 'cpython' */
 
-/* Module declarations from 'libc.errno' */
-
-/* Module declarations from 'libc.stdint' */
+/* Module declarations from 'pysam.TabProxies' */
+static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_TupleProxy = 0;
+static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_GTFProxy = 0;
+static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy = 0;
+static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_BedProxy = 0;
+static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_VCFProxy = 0;
 
 /* Module declarations from 'pysam.ctabix' */
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_tabix_file_iterator = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_Tabixfile = 0;
-static PyTypeObject *__pyx_ptype_5pysam_6ctabix_TabixIterator = 0;
-static PyTypeObject *__pyx_ptype_5pysam_6ctabix_TabixHeaderIterator = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_Parser = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_asTuple = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_asGTF = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_asBed = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_asVCF = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6ctabix_TabixIterator = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_TabixIteratorParsed = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6ctabix_GZIterator = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6ctabix_GZIteratorHead = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6ctabix_GZIteratorParsed = 0;
 static PyObject *__pyx_v_5pysam_6ctabix__FILENAME_ENCODING = 0;
-static PyObject *__pyx_f_5pysam_6ctabix__my_encodeFilename(PyObject *); /*proto*/
+static PyObject *__pyx_f_5pysam_6ctabix__encodeFilename(PyObject *); /*proto*/
 static PyObject *__pyx_f_5pysam_6ctabix__force_bytes(PyObject *); /*proto*/
 static PyObject *__pyx_f_5pysam_6ctabix__charptr_to_str(char *); /*proto*/
 #define __Pyx_MODULE_NAME "pysam.ctabix"
@@ -1174,39 +1523,39 @@ int __pyx_module_is_main_pysam__ctabix = 0;
 /* Implementation of 'pysam.ctabix' */
 static PyObject *__pyx_builtin_TypeError;
 static PyObject *__pyx_builtin_NotImplementedError;
-static PyObject *__pyx_builtin_IOError;
-static PyObject *__pyx_builtin_KeyError;
 static PyObject *__pyx_builtin_ValueError;
-static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_IOError;
 static PyObject *__pyx_builtin_StopIteration;
 static PyObject *__pyx_builtin_OSError;
 static PyObject *__pyx_builtin_ord;
+static PyObject *__pyx_builtin_KeyError;
 static PyObject *__pyx_builtin_MemoryError;
-static int __pyx_pf_5pysam_6ctabix_9Tabixfile___cinit__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_parser, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_2_isOpen(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_4_open(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_6_parseRegion(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_8fetch(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_parser); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_6Parser___call__(struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_length); /* proto */
+static int __pyx_pf_5pysam_6ctabix_9Tabixfile___cinit__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_parser, PyObject *__pyx_v_index, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_2_open(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_index); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_4_isOpen(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_6fetch(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_parser); /* proto */
 static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_8filename___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_6header___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_7contigs___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_10close(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_6ctabix_9Tabixfile_12__dealloc__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_6ctabix_13TabixIterator___cinit__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self, struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator_2__iter__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator_4__next__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_6ctabix_13TabixIterator_6__dealloc__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self); /* proto */
-static int __pyx_pf_5pysam_6ctabix_19TabixHeaderIterator___cinit__(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *__pyx_v_self, struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_2__iter__(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_4__next__(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_6__dealloc__(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_6Parser___call__(struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_length); /* proto */
-static int __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed___cinit__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self, struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end, struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_2__iter__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_4__next__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self); /* proto */
-static void __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_6__dealloc__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_8close(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_6ctabix_9Tabixfile_10__dealloc__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator___iter__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator_2__next__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_6ctabix_13TabixIterator_4__dealloc__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_13EmptyIterator___iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_13EmptyIterator_2next(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed___init__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self, struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_2__next__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_6ctabix_10GZIterator___init__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self, PyObject *__pyx_v_filename, int __pyx_v_buffer_size); /* proto */
+static void __pyx_pf_5pysam_6ctabix_10GZIterator_2__dealloc__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_10GZIterator_4__iter__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_10GZIterator_6__next__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_14GZIteratorHead___next__(struct __pyx_obj_5pysam_6ctabix_GZIteratorHead *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_6ctabix_16GZIteratorParsed___init__(struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *__pyx_v_self, PyObject *__pyx_v_parser); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_16GZIteratorParsed_2__next__(struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename_in, PyObject *__pyx_v_filename_out, PyObject *__pyx_v_force); /* proto */
-static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_force, PyObject *__pyx_v_seq_col, PyObject *__pyx_v_start_col, PyObject *__pyx_v_end_col, PyObject *__pyx_v_preset, PyObject *__pyx_v_meta_char, PyObject *__pyx_v_zerobased); /* proto */
+static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_force, PyObject *__pyx_v_seq_col, PyObject *__pyx_v_start_col, PyObject *__pyx_v_end_col, PyObject *__pyx_v_preset, PyObject *__pyx_v_meta_char, PyObject *__pyx_v_zerobased, PyObject *__pyx_v_min_shift); /* proto */
 static int __pyx_pf_5pysam_6ctabix_19tabix_file_iterator___cinit__(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *__pyx_v_self, PyObject *__pyx_v_infile, struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser, int __pyx_v_buffer_size); /* proto */
 static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_2__iter__(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *__pyx_v_self); /* proto */
 static void __pyx_pf_5pysam_6ctabix_19tabix_file_iterator_4__dealloc__(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *__pyx_v_self); /* proto */
@@ -1217,432 +1566,387 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_2__iter__(CYTH
 static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_6next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5pysam_6ctabix_4tabix_iterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser); /* proto */
-static char __pyx_k_1[] = "Argument must be string or unicode.";
-static char __pyx_k_3[] = "Argument must be string, bytes or unicode.";
-static char __pyx_k_5[] = "invalid file opening mode `%s`";
-static char __pyx_k_6[] = ".tbi";
-static char __pyx_k_7[] = "http:";
-static char __pyx_k_9[] = "ftp:";
-static char __pyx_k_12[] = "writing to tabix files not implemented";
-static char __pyx_k_14[] = "file `%s` not found";
-static char __pyx_k_15[] = "index `%s` not found";
-static char __pyx_k_16[] = "could not open file `%s`";
-static char __pyx_k_17[] = "%s:%i-%i";
-static char __pyx_k_18[] = "invalid region: start (%i) > end (%i)";
-static char __pyx_k_19[] = "start out of range (%i)";
-static char __pyx_k_20[] = "end out of range (%i)";
-static char __pyx_k_21[] = "I/O operation on closed file";
-static char __pyx_k_24[] = "malformatted query or wrong sequence name.\n";
-static char __pyx_k_26[] = "can't open header.\n";
-static char __pyx_k_30[] = "Filename '%s' already exists, use *force* to overwrite";
-static char __pyx_k_31[] = "could not open '%s' for writing";
-static char __pyx_k_33[] = "could not open '%s' for reading";
-static char __pyx_k_35[] = "writing failed";
-static char __pyx_k_39[] = "#";
-static char __pyx_k_41[] = "No such file '%s'";
-static char __pyx_k_42[] = "neither preset nor seq_col,start_col and end_col given";
-static char __pyx_k_44[] = ".gz";
-static char __pyx_k_46[] = "Filename '%s.tbi' already exists, use *force* to overwrite";
-static char __pyx_k_48[] = "unknown preset '%s', valid presets are '%s'";
-static char __pyx_k_49[] = ",";
-static char __pyx_k_50[] = "error (%d): %s (%d: %s)";
-static char __pyx_k_51[] = "I/O operation on closed file.";
-static char __pyx_k_54[] = "%s";
-static char __pyx_k_57[] = "incomplete line at %s";
-static char __pyx_k_58[] = "tabix_generic_iterator";
-static char __pyx_k_59[] = "filename associated with this object.";
-static char __pyx_k_60[] = "the file header.\n          \n        .. note::\n            The header is returned as an iterator over lines without the\n            newline character.\n        ";
-static char __pyx_k_61[] = "chromosome names";
-static char __pyx_k_62[] = "getfilesystemencoding";
-static char __pyx_k_65[] = "/home/andreas/devel/pysam/pysam/ctabix.pyx";
-static char __pyx_k_66[] = "pysam.ctabix";
-static char __pyx_k_71[] = "tabix_generic_iterator.__init__";
-static char __pyx_k_74[] = "tabix_generic_iterator.__iter__";
-static char __pyx_k_77[] = "tabix_generic_iterator.__next__";
-static char __pyx_k_80[] = "tabix_generic_iterator.next";
-static char __pyx_k_81[] = "iterate over ``infile``.\n    \n    Permits the use of file-like objects for example from the gzip module.\n    ";
-static char __pyx_k__b[] = "b";
-static char __pyx_k__c[] = "c";
-static char __pyx_k__r[] = "r";
-static char __pyx_k__s[] = "s";
-static char __pyx_k__w[] = "w";
-static char __pyx_k__fn[] = "fn";
-static char __pyx_k__fp[] = "fp";
-static char __pyx_k__io[] = "io";
-static char __pyx_k__os[] = "os";
-static char __pyx_k__bed[] = "bed";
-static char __pyx_k__cpy[] = "cpy";
-static char __pyx_k__end[] = "end";
-static char __pyx_k__gff[] = "gff";
-static char __pyx_k__ord[] = "ord";
-static char __pyx_k__sam[] = "sam";
-static char __pyx_k__sys[] = "sys";
-static char __pyx_k__tid[] = "tid";
-static char __pyx_k__vcf[] = "vcf";
-static char __pyx_k__conf[] = "conf";
-static char __pyx_k__gzip[] = "gzip";
-static char __pyx_k__join[] = "join";
-static char __pyx_k__line[] = "line";
-static char __pyx_k__mode[] = "mode";
-static char __pyx_k__next[] = "next";
-static char __pyx_k__path[] = "path";
-static char __pyx_k__self[] = "self";
-static char __pyx_k___open[] = "_open";
-static char __pyx_k__asBed[] = "asBed";
-static char __pyx_k__asGTF[] = "asGTF";
-static char __pyx_k__asVCF[] = "asVCF";
-static char __pyx_k__ascii[] = "ascii";
-static char __pyx_k__close[] = "close";
-static char __pyx_k__force[] = "force";
-static char __pyx_k__start[] = "start";
-static char __pyx_k__types[] = "types";
-static char __pyx_k__buffer[] = "buffer";
-static char __pyx_k__closed[] = "closed";
-static char __pyx_k__ctypes[] = "ctypes";
-static char __pyx_k__decode[] = "decode";
-static char __pyx_k__encode[] = "encode";
-static char __pyx_k__exists[] = "exists";
-static char __pyx_k__fd_src[] = "fd_src";
-static char __pyx_k__infile[] = "infile";
-static char __pyx_k__length[] = "length";
-static char __pyx_k__nbytes[] = "nbytes";
-static char __pyx_k__parser[] = "parser";
-static char __pyx_k__pileup[] = "pileup";
-static char __pyx_k__preset[] = "preset";
-static char __pyx_k__psltbl[] = "psltbl";
-static char __pyx_k__region[] = "region";
-static char __pyx_k__struct[] = "struct";
-static char __pyx_k__unlink[] = "unlink";
-static char __pyx_k__IOError[] = "IOError";
-static char __pyx_k__OSError[] = "OSError";
-static char __pyx_k__PYTHON3[] = "PYTHON3";
-static char __pyx_k____all__[] = "__all__";
-static char __pyx_k___isOpen[] = "_isOpen";
-static char __pyx_k__asTuple[] = "asTuple";
-static char __pyx_k__end_col[] = "end_col";
-static char __pyx_k__seq_col[] = "seq_col";
-static char __pyx_k__KeyError[] = "KeyError";
-static char __pyx_k__O_RDONLY[] = "O_RDONLY";
-static char __pyx_k____init__[] = "__init__";
-static char __pyx_k____iter__[] = "__iter__";
-static char __pyx_k____main__[] = "__main__";
-static char __pyx_k____next__[] = "__next__";
-static char __pyx_k____test__[] = "__test__";
-static char __pyx_k__endswith[] = "endswith";
-static char __pyx_k__filename[] = "filename";
-static char __pyx_k__readline[] = "readline";
-static char __pyx_k__tempfile[] = "tempfile";
-static char __pyx_k__Tabixfile[] = "Tabixfile";
-static char __pyx_k__TypeError[] = "TypeError";
-static char __pyx_k__conf_data[] = "conf_data";
-static char __pyx_k__itertools[] = "itertools";
-static char __pyx_k__meta_char[] = "meta_char";
-static char __pyx_k__reference[] = "reference";
-static char __pyx_k__start_col[] = "start_col";
-static char __pyx_k__tabixfile[] = "tabixfile";
-static char __pyx_k__zerobased[] = "zerobased";
-static char __pyx_k__IndexError[] = "IndexError";
-static char __pyx_k__ValueError[] = "ValueError";
-static char __pyx_k__startswith[] = "startswith";
-static char __pyx_k__MemoryError[] = "MemoryError";
-static char __pyx_k__WINDOW_SIZE[] = "WINDOW_SIZE";
-static char __pyx_k__buffer_size[] = "buffer_size";
-static char __pyx_k__filename_in[] = "filename_in";
-static char __pyx_k__preset2conf[] = "preset2conf";
-static char __pyx_k__tabix_index[] = "tabix_index";
-static char __pyx_k___parseRegion[] = "_parseRegion";
-static char __pyx_k__filename_out[] = "filename_out";
-static char __pyx_k__StopIteration[] = "StopIteration";
-static char __pyx_k__tabix_compress[] = "tabix_compress";
-static char __pyx_k__tabix_iterator[] = "tabix_iterator";
-static char __pyx_k__getdefaultencoding[] = "getdefaultencoding";
-static char __pyx_k__NotImplementedError[] = "NotImplementedError";
-static char __pyx_k__tabix_file_iterator[] = "tabix_file_iterator";
-static PyObject *__pyx_kp_u_1;
-static PyObject *__pyx_kp_s_12;
-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_19;
-static PyObject *__pyx_kp_s_20;
-static PyObject *__pyx_kp_s_21;
-static PyObject *__pyx_kp_s_24;
-static PyObject *__pyx_kp_s_26;
-static PyObject *__pyx_kp_u_3;
-static PyObject *__pyx_kp_s_30;
-static PyObject *__pyx_kp_s_31;
-static PyObject *__pyx_kp_s_33;
-static PyObject *__pyx_kp_s_35;
-static PyObject *__pyx_kp_s_39;
-static PyObject *__pyx_kp_s_41;
-static PyObject *__pyx_kp_s_42;
-static PyObject *__pyx_kp_s_44;
-static PyObject *__pyx_kp_s_46;
-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_kp_s_54;
-static PyObject *__pyx_kp_s_57;
-static PyObject *__pyx_n_s_58;
-static PyObject *__pyx_kp_s_6;
-static PyObject *__pyx_n_s_62;
-static PyObject *__pyx_kp_s_65;
-static PyObject *__pyx_n_s_66;
-static PyObject *__pyx_kp_s_7;
-static PyObject *__pyx_n_s_71;
-static PyObject *__pyx_n_s_74;
-static PyObject *__pyx_n_s_77;
-static PyObject *__pyx_n_s_80;
-static PyObject *__pyx_kp_s_81;
-static PyObject *__pyx_kp_s_9;
-static PyObject *__pyx_n_s__IOError;
-static PyObject *__pyx_n_s__IndexError;
-static PyObject *__pyx_n_s__KeyError;
-static PyObject *__pyx_n_s__MemoryError;
-static PyObject *__pyx_n_s__NotImplementedError;
-static PyObject *__pyx_n_s__OSError;
-static PyObject *__pyx_n_s__O_RDONLY;
-static PyObject *__pyx_n_s__PYTHON3;
-static PyObject *__pyx_n_s__StopIteration;
-static PyObject *__pyx_n_s__Tabixfile;
-static PyObject *__pyx_n_s__TypeError;
-static PyObject *__pyx_n_s__ValueError;
-static PyObject *__pyx_n_s__WINDOW_SIZE;
-static PyObject *__pyx_n_s____all__;
-static PyObject *__pyx_n_s____init__;
-static PyObject *__pyx_n_s____iter__;
-static PyObject *__pyx_n_s____main__;
-static PyObject *__pyx_n_s____next__;
-static PyObject *__pyx_n_s____test__;
-static PyObject *__pyx_n_s___isOpen;
-static PyObject *__pyx_n_s___open;
-static PyObject *__pyx_n_s___parseRegion;
-static PyObject *__pyx_n_s__asBed;
-static PyObject *__pyx_n_s__asGTF;
-static PyObject *__pyx_n_s__asTuple;
-static PyObject *__pyx_n_s__asVCF;
-static PyObject *__pyx_n_s__ascii;
-static PyObject *__pyx_n_s__b;
-static PyObject *__pyx_n_s__bed;
-static PyObject *__pyx_n_s__buffer;
-static PyObject *__pyx_n_s__buffer_size;
-static PyObject *__pyx_n_s__c;
-static PyObject *__pyx_n_s__close;
-static PyObject *__pyx_n_s__closed;
-static PyObject *__pyx_n_s__conf;
-static PyObject *__pyx_n_s__conf_data;
-static PyObject *__pyx_n_s__cpy;
-static PyObject *__pyx_n_s__ctypes;
-static PyObject *__pyx_n_s__decode;
-static PyObject *__pyx_n_s__encode;
-static PyObject *__pyx_n_s__end;
-static PyObject *__pyx_n_s__end_col;
-static PyObject *__pyx_n_s__endswith;
-static PyObject *__pyx_n_s__exists;
-static PyObject *__pyx_n_s__fd_src;
-static PyObject *__pyx_n_s__filename;
-static PyObject *__pyx_n_s__filename_in;
-static PyObject *__pyx_n_s__filename_out;
-static PyObject *__pyx_n_s__fn;
-static PyObject *__pyx_n_s__force;
-static PyObject *__pyx_n_s__fp;
-static PyObject *__pyx_n_s__getdefaultencoding;
-static PyObject *__pyx_n_s__gff;
-static PyObject *__pyx_n_s__gzip;
-static PyObject *__pyx_n_s__infile;
-static PyObject *__pyx_n_s__io;
-static PyObject *__pyx_n_s__itertools;
-static PyObject *__pyx_n_s__join;
-static PyObject *__pyx_n_s__length;
-static PyObject *__pyx_n_s__line;
-static PyObject *__pyx_n_s__meta_char;
-static PyObject *__pyx_n_s__mode;
-static PyObject *__pyx_n_s__nbytes;
-static PyObject *__pyx_n_s__next;
-static PyObject *__pyx_n_s__ord;
-static PyObject *__pyx_n_s__os;
-static PyObject *__pyx_n_s__parser;
-static PyObject *__pyx_n_s__path;
-static PyObject *__pyx_n_s__pileup;
-static PyObject *__pyx_n_s__preset;
-static PyObject *__pyx_n_s__preset2conf;
-static PyObject *__pyx_n_s__psltbl;
-static PyObject *__pyx_n_s__r;
-static PyObject *__pyx_n_s__readline;
-static PyObject *__pyx_n_s__reference;
-static PyObject *__pyx_n_s__region;
-static PyObject *__pyx_n_s__s;
-static PyObject *__pyx_n_s__sam;
-static PyObject *__pyx_n_s__self;
-static PyObject *__pyx_n_s__seq_col;
-static PyObject *__pyx_n_s__start;
-static PyObject *__pyx_n_s__start_col;
-static PyObject *__pyx_n_s__startswith;
-static PyObject *__pyx_n_s__struct;
-static PyObject *__pyx_n_s__sys;
-static PyObject *__pyx_n_s__tabix_compress;
-static PyObject *__pyx_n_s__tabix_file_iterator;
-static PyObject *__pyx_n_s__tabix_index;
-static PyObject *__pyx_n_s__tabix_iterator;
-static PyObject *__pyx_n_s__tabixfile;
-static PyObject *__pyx_n_s__tempfile;
-static PyObject *__pyx_n_s__tid;
-static PyObject *__pyx_n_s__types;
-static PyObject *__pyx_n_s__unlink;
-static PyObject *__pyx_n_s__vcf;
-static PyObject *__pyx_n_s__w;
-static PyObject *__pyx_n_s__zerobased;
+static PyObject *__pyx_tp_new_5pysam_6ctabix_tabix_file_iterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_Tabixfile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_Parser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_asTuple(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_asGTF(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_asBed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_asVCF(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_TabixIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_TabixIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_GZIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_GZIteratorHead(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_6ctabix_GZIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_b[] = "b";
+static char __pyx_k_c[] = "c";
+static char __pyx_k_r[] = "r";
+static char __pyx_k_s[] = "%s";
+static char __pyx_k_w[] = "w";
+static char __pyx_k_fn[] = "fn";
+static char __pyx_k_fp[] = "fp";
+static char __pyx_k_gz[] = ".gz";
+static char __pyx_k_os[] = "os";
+static char __pyx_k__12[] = "#";
+static char __pyx_k__16[] = ",";
+static char __pyx_k_all[] = "__all__";
+static char __pyx_k_bed[] = "bed";
+static char __pyx_k_cpy[] = "cpy";
+static char __pyx_k_doc[] = "__doc__";
+static char __pyx_k_end[] = "end";
+static char __pyx_k_ftp[] = "ftp:";
+static char __pyx_k_gff[] = "gff";
+static char __pyx_k_ord[] = "ord";
+static char __pyx_k_s_2[] = "s";
+static char __pyx_k_s_i[] = "%s:%i";
+static char __pyx_k_sam[] = "sam";
+static char __pyx_k_sys[] = "sys";
+static char __pyx_k_tbi[] = ".tbi";
+static char __pyx_k_vcf[] = "vcf";
+static char __pyx_k_conf[] = "conf";
+static char __pyx_k_http[] = "http:";
+static char __pyx_k_init[] = "__init__";
+static char __pyx_k_iter[] = "__iter__";
+static char __pyx_k_join[] = "join";
+static char __pyx_k_keys[] = "keys";
+static char __pyx_k_line[] = "line";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_mode[] = "mode";
+static char __pyx_k_next[] = "__next__";
+static char __pyx_k_open[] = "_open";
+static char __pyx_k_path[] = "path";
+static char __pyx_k_self[] = "self";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_asBed[] = "asBed";
+static char __pyx_k_asGTF[] = "asGTF";
+static char __pyx_k_asVCF[] = "asVCF";
+static char __pyx_k_ascii[] = "ascii";
+static char __pyx_k_close[] = "close";
+static char __pyx_k_force[] = "force";
+static char __pyx_k_index[] = "index";
+static char __pyx_k_s_i_i[] = "%s:%i-%i";
+static char __pyx_k_start[] = "start";
+static char __pyx_k_buffer[] = "buffer";
+static char __pyx_k_closed[] = "closed";
+static char __pyx_k_decode[] = "decode";
+static char __pyx_k_encode[] = "encode";
+static char __pyx_k_exists[] = "exists";
+static char __pyx_k_fd_src[] = "fd_src";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_infile[] = "infile";
+static char __pyx_k_isOpen[] = "_isOpen";
+static char __pyx_k_length[] = "length";
+static char __pyx_k_module[] = "__module__";
+static char __pyx_k_nbytes[] = "nbytes";
+static char __pyx_k_next_2[] = "next";
+static char __pyx_k_parser[] = "parser";
+static char __pyx_k_pileup[] = "pileup";
+static char __pyx_k_preset[] = "preset";
+static char __pyx_k_psltbl[] = "psltbl";
+static char __pyx_k_region[] = "region";
+static char __pyx_k_unlink[] = "unlink";
+static char __pyx_k_IOError[] = "IOError";
+static char __pyx_k_OSError[] = "OSError";
+static char __pyx_k_PYTHON3[] = "PYTHON3";
+static char __pyx_k_asTuple[] = "asTuple";
+static char __pyx_k_end_col[] = "end_col";
+static char __pyx_k_prepare[] = "__prepare__";
+static char __pyx_k_seq_col[] = "seq_col";
+static char __pyx_k_KeyError[] = "KeyError";
+static char __pyx_k_O_RDONLY[] = "O_RDONLY";
+static char __pyx_k_endswith[] = "endswith";
+static char __pyx_k_filename[] = "filename";
+static char __pyx_k_qualname[] = "__qualname__";
+static char __pyx_k_readline[] = "readline";
+static char __pyx_k_Tabixfile[] = "Tabixfile";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_conf_data[] = "conf_data";
+static char __pyx_k_meta_char[] = "meta_char";
+static char __pyx_k_metaclass[] = "__metaclass__";
+static char __pyx_k_min_shift[] = "min_shift";
+static char __pyx_k_reference[] = "reference";
+static char __pyx_k_start_col[] = "start_col";
+static char __pyx_k_zerobased[] = "zerobased";
+static char __pyx_k_GZIterator[] = "GZIterator";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static char __pyx_k_startswith[] = "startswith";
+static char __pyx_k_MemoryError[] = "MemoryError";
+static char __pyx_k_WINDOW_SIZE[] = "WINDOW_SIZE";
+static char __pyx_k_buffer_size[] = "buffer_size";
+static char __pyx_k_filename_in[] = "filename_in";
+static char __pyx_k_preset2conf[] = "preset2conf";
+static char __pyx_k_tabix_index[] = "tabix_index";
+static char __pyx_k_filename_out[] = "filename_out";
+static char __pyx_k_pysam_ctabix[] = "pysam.ctabix";
+static char __pyx_k_EmptyIterator[] = "EmptyIterator";
+static char __pyx_k_StopIteration[] = "StopIteration";
+static char __pyx_k_error_d_s_d_s[] = "error (%d): %s (%d: %s)";
+static char __pyx_k_start_i_end_i[] = "start (%i) > end (%i)";
+static char __pyx_k_GZIteratorHead[] = "GZIteratorHead";
+static char __pyx_k_No_such_file_s[] = "No such file '%s'";
+static char __pyx_k_empty_iterator[] = "empty iterator";
+static char __pyx_k_invalid_mode_s[] = "invalid mode '%s'";
+static char __pyx_k_tabix_compress[] = "tabix_compress";
+static char __pyx_k_tabix_iterator[] = "tabix_iterator";
+static char __pyx_k_writing_failed[] = "writing failed";
+static char __pyx_k_chromosome_names[] = "chromosome names";
+static char __pyx_k_file_s_not_found[] = "file `%s` not found";
+static char __pyx_k_index_s_not_found[] = "index `%s` not found";
+static char __pyx_k_EmptyIterator_next[] = "EmptyIterator.next";
+static char __pyx_k_getdefaultencoding[] = "getdefaultencoding";
+static char __pyx_k_NotImplementedError[] = "NotImplementedError";
+static char __pyx_k_tabix_file_iterator[] = "tabix_file_iterator";
+static char __pyx_k_EmptyIterator___iter[] = "EmptyIterator.__iter__";
+static char __pyx_k_incomplete_line_at_s[] = "incomplete line at %s";
+static char __pyx_k_could_not_open_file_s[] = "could not open file `%s`";
+static char __pyx_k_getfilesystemencoding[] = "getfilesystemencoding";
+static char __pyx_k_tabix_generic_iterator[] = "tabix_generic_iterator";
+static char __pyx_k_writing_to_file_s_failed[] = "writing to file %s failed";
+static char __pyx_k_error_when_closing_file_s[] = "error when closing file %s";
+static char __pyx_k_could_not_open_index_for_s[] = "could not open index for `%s`";
+static char __pyx_k_No_such_file_or_directory_s[] = "No such file or directory: %s";
+static char __pyx_k_invalid_file_opening_mode_s[] = "invalid file opening mode `%s`";
+static char __pyx_k_tabix_generic_iterator_next[] = "tabix_generic_iterator.next";
+static char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on closed file";
+static char __pyx_k_could_not_open_s_for_reading[] = "could not open '%s' for reading";
+static char __pyx_k_could_not_open_s_for_writing[] = "could not open '%s' for writing";
+static char __pyx_k_tabix_generic_iterator___init[] = "tabix_generic_iterator.__init__";
+static char __pyx_k_tabix_generic_iterator___iter[] = "tabix_generic_iterator.__iter__";
+static char __pyx_k_tabix_generic_iterator___next[] = "tabix_generic_iterator.__next__";
+static char __pyx_k_I_O_operation_on_closed_file_2[] = "I/O operation on closed file.";
+static char __pyx_k_home_andreas_devel_pysam_pysam[] = "/home/andreas/devel/pysam/pysam/ctabix.pyx";
+static char __pyx_k_iterate_over_infile_Permits_the[] = "iterate over ``infile``.\n    \n    Permits the use of file-like objects for example from the gzip module.\n    ";
+static char __pyx_k_the_file_header_note_The_header[] = "the file header.\n          \n        .. note::\n            The header is returned as an iterator over lines without the\n            newline character.\n        ";
+static char __pyx_k_Argument_must_be_string_bytes_or[] = "Argument must be string, bytes or unicode.";
+static char __pyx_k_Argument_must_be_string_or_unico[] = "Argument must be string or unicode.";
+static char __pyx_k_Filename_s_already_exists_use_fo[] = "Filename '%s' already exists, use *force* to overwrite";
+static char __pyx_k_Filename_s_tbi_already_exists_us[] = "Filename '%s.tbi' already exists, use *force* to overwrite";
+static char __pyx_k_could_not_create_iterator_for_re[] = "could not create iterator for region '%s'";
+static char __pyx_k_filename_associated_with_this_ob[] = "filename associated with this object.";
+static char __pyx_k_neither_preset_nor_seq_col_start[] = "neither preset nor seq_col,start_col and end_col given";
+static char __pyx_k_parse_method_of_s_not_implemente[] = "parse method of %s not implemented";
+static char __pyx_k_unknown_preset_s_valid_presets_a[] = "unknown preset '%s', valid presets are '%s'";
+static char __pyx_k_writing_to_tabix_files_not_imple[] = "writing to tabix files not implemented";
+static PyObject *__pyx_kp_u_Argument_must_be_string_bytes_or;
+static PyObject *__pyx_kp_u_Argument_must_be_string_or_unico;
+static PyObject *__pyx_n_s_EmptyIterator;
+static PyObject *__pyx_n_s_EmptyIterator___iter;
+static PyObject *__pyx_n_s_EmptyIterator_next;
+static PyObject *__pyx_kp_s_Filename_s_already_exists_use_fo;
+static PyObject *__pyx_kp_s_Filename_s_tbi_already_exists_us;
+static PyObject *__pyx_n_s_GZIterator;
+static PyObject *__pyx_n_s_GZIteratorHead;
+static PyObject *__pyx_n_s_IOError;
+static PyObject *__pyx_kp_s_I_O_operation_on_closed_file;
+static PyObject *__pyx_kp_s_I_O_operation_on_closed_file_2;
+static PyObject *__pyx_n_s_KeyError;
+static PyObject *__pyx_n_s_MemoryError;
+static PyObject *__pyx_kp_s_No_such_file_or_directory_s;
+static PyObject *__pyx_kp_s_No_such_file_s;
+static PyObject *__pyx_n_s_NotImplementedError;
+static PyObject *__pyx_n_s_OSError;
+static PyObject *__pyx_n_s_O_RDONLY;
+static PyObject *__pyx_n_s_PYTHON3;
+static PyObject *__pyx_n_s_StopIteration;
+static PyObject *__pyx_n_s_Tabixfile;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_WINDOW_SIZE;
+static PyObject *__pyx_kp_s__12;
+static PyObject *__pyx_kp_s__16;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_asBed;
+static PyObject *__pyx_n_s_asGTF;
+static PyObject *__pyx_n_s_asTuple;
+static PyObject *__pyx_n_s_asVCF;
+static PyObject *__pyx_n_s_ascii;
+static PyObject *__pyx_n_s_b;
+static PyObject *__pyx_n_s_bed;
+static PyObject *__pyx_n_s_buffer;
+static PyObject *__pyx_n_s_buffer_size;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_closed;
+static PyObject *__pyx_n_s_conf;
+static PyObject *__pyx_n_s_conf_data;
+static PyObject *__pyx_kp_s_could_not_create_iterator_for_re;
+static PyObject *__pyx_kp_s_could_not_open_file_s;
+static PyObject *__pyx_kp_s_could_not_open_index_for_s;
+static PyObject *__pyx_kp_s_could_not_open_s_for_reading;
+static PyObject *__pyx_kp_s_could_not_open_s_for_writing;
+static PyObject *__pyx_n_s_cpy;
+static PyObject *__pyx_n_s_decode;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_kp_s_empty_iterator;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_end;
+static PyObject *__pyx_n_s_end_col;
+static PyObject *__pyx_n_s_endswith;
+static PyObject *__pyx_kp_s_error_d_s_d_s;
+static PyObject *__pyx_kp_s_error_when_closing_file_s;
+static PyObject *__pyx_n_s_exists;
+static PyObject *__pyx_n_s_fd_src;
+static PyObject *__pyx_kp_s_file_s_not_found;
+static PyObject *__pyx_n_s_filename;
+static PyObject *__pyx_n_s_filename_in;
+static PyObject *__pyx_n_s_filename_out;
+static PyObject *__pyx_n_s_fn;
+static PyObject *__pyx_n_s_force;
+static PyObject *__pyx_n_s_fp;
+static PyObject *__pyx_kp_s_ftp;
+static PyObject *__pyx_n_s_getdefaultencoding;
+static PyObject *__pyx_n_s_getfilesystemencoding;
+static PyObject *__pyx_n_s_gff;
+static PyObject *__pyx_kp_s_gz;
+static PyObject *__pyx_kp_s_home_andreas_devel_pysam_pysam;
+static PyObject *__pyx_kp_s_http;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_kp_s_incomplete_line_at_s;
+static PyObject *__pyx_n_s_index;
+static PyObject *__pyx_kp_s_index_s_not_found;
+static PyObject *__pyx_n_s_infile;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_kp_s_invalid_file_opening_mode_s;
+static PyObject *__pyx_kp_s_invalid_mode_s;
+static PyObject *__pyx_n_s_isOpen;
+static PyObject *__pyx_n_s_iter;
+static PyObject *__pyx_kp_s_iterate_over_infile_Permits_the;
+static PyObject *__pyx_n_s_join;
+static PyObject *__pyx_n_s_keys;
+static PyObject *__pyx_n_s_length;
+static PyObject *__pyx_n_s_line;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_meta_char;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_min_shift;
+static PyObject *__pyx_n_s_mode;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_nbytes;
+static PyObject *__pyx_kp_s_neither_preset_nor_seq_col_start;
+static PyObject *__pyx_n_s_next;
+static PyObject *__pyx_n_s_next_2;
+static PyObject *__pyx_n_s_open;
+static PyObject *__pyx_n_s_ord;
+static PyObject *__pyx_n_s_os;
+static PyObject *__pyx_kp_s_parse_method_of_s_not_implemente;
+static PyObject *__pyx_n_s_parser;
+static PyObject *__pyx_n_s_path;
+static PyObject *__pyx_n_s_pileup;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_preset;
+static PyObject *__pyx_n_s_preset2conf;
+static PyObject *__pyx_n_s_psltbl;
+static PyObject *__pyx_n_s_pysam_ctabix;
+static PyObject *__pyx_n_s_pyx_vtable;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_r;
+static PyObject *__pyx_n_s_readline;
+static PyObject *__pyx_n_s_reference;
+static PyObject *__pyx_n_s_region;
+static PyObject *__pyx_kp_s_s;
+static PyObject *__pyx_n_s_s_2;
+static PyObject *__pyx_kp_s_s_i;
+static PyObject *__pyx_kp_s_s_i_i;
+static PyObject *__pyx_n_s_sam;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_seq_col;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_n_s_start_col;
+static PyObject *__pyx_kp_s_start_i_end_i;
+static PyObject *__pyx_n_s_startswith;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_tabix_compress;
+static PyObject *__pyx_n_s_tabix_file_iterator;
+static PyObject *__pyx_n_s_tabix_generic_iterator;
+static PyObject *__pyx_n_s_tabix_generic_iterator___init;
+static PyObject *__pyx_n_s_tabix_generic_iterator___iter;
+static PyObject *__pyx_n_s_tabix_generic_iterator___next;
+static PyObject *__pyx_n_s_tabix_generic_iterator_next;
+static PyObject *__pyx_n_s_tabix_index;
+static PyObject *__pyx_n_s_tabix_iterator;
+static PyObject *__pyx_kp_s_tbi;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_kp_s_unknown_preset_s_valid_presets_a;
+static PyObject *__pyx_n_s_unlink;
+static PyObject *__pyx_n_s_vcf;
+static PyObject *__pyx_n_s_w;
+static PyObject *__pyx_kp_s_writing_failed;
+static PyObject *__pyx_kp_s_writing_to_file_s_failed;
+static PyObject *__pyx_kp_s_writing_to_tabix_files_not_imple;
+static PyObject *__pyx_n_s_zerobased;
 static PyObject *__pyx_int_0;
 static PyObject *__pyx_int_1;
 static PyObject *__pyx_int_2;
 static PyObject *__pyx_int_3;
 static PyObject *__pyx_int_4;
 static PyObject *__pyx_int_5;
-static PyObject *__pyx_int_neg_1;
 static PyObject *__pyx_int_15;
 static PyObject *__pyx_int_17;
 static PyObject *__pyx_int_18;
 static PyObject *__pyx_int_35;
 static PyObject *__pyx_int_64;
 static PyObject *__pyx_int_65536;
-static PyObject *__pyx_k_29;
-static PyObject *__pyx_k_38;
-static PyObject *__pyx_k_40;
-static PyObject *__pyx_k_tuple_2;
-static PyObject *__pyx_k_tuple_4;
-static PyObject *__pyx_k_tuple_8;
-static PyObject *__pyx_k_tuple_10;
-static PyObject *__pyx_k_tuple_11;
-static PyObject *__pyx_k_tuple_13;
-static PyObject *__pyx_k_tuple_22;
-static PyObject *__pyx_k_tuple_23;
-static PyObject *__pyx_k_tuple_25;
-static PyObject *__pyx_k_tuple_27;
-static PyObject *__pyx_k_tuple_28;
-static PyObject *__pyx_k_tuple_32;
-static PyObject *__pyx_k_tuple_34;
-static PyObject *__pyx_k_tuple_36;
-static PyObject *__pyx_k_tuple_37;
-static PyObject *__pyx_k_tuple_43;
-static PyObject *__pyx_k_tuple_45;
-static PyObject *__pyx_k_tuple_47;
-static PyObject *__pyx_k_tuple_52;
-static PyObject *__pyx_k_tuple_53;
-static PyObject *__pyx_k_tuple_55;
-static PyObject *__pyx_k_tuple_56;
-static PyObject *__pyx_k_tuple_63;
-static PyObject *__pyx_k_tuple_67;
-static PyObject *__pyx_k_tuple_69;
-static PyObject *__pyx_k_tuple_72;
-static PyObject *__pyx_k_tuple_75;
-static PyObject *__pyx_k_tuple_78;
-static PyObject *__pyx_k_tuple_82;
-static PyObject *__pyx_k_codeobj_64;
-static PyObject *__pyx_k_codeobj_68;
-static PyObject *__pyx_k_codeobj_70;
-static PyObject *__pyx_k_codeobj_73;
-static PyObject *__pyx_k_codeobj_76;
-static PyObject *__pyx_k_codeobj_79;
-static PyObject *__pyx_k_codeobj_83;
-
-/* "pysam/ctabix.pyx":24
- * from cpython.version cimport PY_MAJOR_VERSION
- * 
- * cdef from_string_and_size(char* s, size_t length):             # <<<<<<<<<<<<<<
- *     if PY_MAJOR_VERSION < 3:
- *         return s[:length]
- */
-
-static PyObject *__pyx_f_5pysam_6ctabix_from_string_and_size(char *__pyx_v_s, size_t __pyx_v_length) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("from_string_and_size", 0);
-
-  /* "pysam/ctabix.pyx":25
- * 
- * cdef from_string_and_size(char* s, size_t length):
- *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
- *         return s[:length]
- *     else:
- */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
-  if (__pyx_t_1) {
-
-    /* "pysam/ctabix.pyx":26
- * cdef from_string_and_size(char* s, size_t length):
- *     if PY_MAJOR_VERSION < 3:
- *         return s[:length]             # <<<<<<<<<<<<<<
- *     else:
- *         return s[:length].decode("ascii")
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_s + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __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_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/ctabix.pyx":28
- *         return s[:length]
- *     else:
- *         return s[:length].decode("ascii")             # <<<<<<<<<<<<<<
- * 
- * # filename encoding (copied from lxml.etree.pyx)
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_s, 0, __pyx_v_length, NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __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;
-  }
-  __pyx_L3:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.from_string_and_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/ctabix.pyx":41
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__21;
+static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__25;
+static PyObject *__pyx_tuple__27;
+static PyObject *__pyx_tuple__29;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_codeobj__22;
+static PyObject *__pyx_codeobj__24;
+static PyObject *__pyx_codeobj__26;
+static PyObject *__pyx_codeobj__28;
+static PyObject *__pyx_codeobj__30;
+static PyObject *__pyx_codeobj__32;
+static PyObject *__pyx_codeobj__34;
+static PyObject *__pyx_codeobj__36;
+static PyObject *__pyx_codeobj__38;
+
+/* "pysam/ctabix.pyx":38
  * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
  * 
- * cdef bytes _my_encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
  *     u"""Make sure a filename is 8-bit encoded (or None).
  *     """
  */
 
-static PyObject *__pyx_f_5pysam_6ctabix__my_encodeFilename(PyObject *__pyx_v_filename) {
+static PyObject *__pyx_f_5pysam_6ctabix__encodeFilename(PyObject *__pyx_v_filename) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_my_encodeFilename", 0);
+  __Pyx_RefNannySetupContext("_encodeFilename", 0);
 
-  /* "pysam/ctabix.pyx":44
+  /* "pysam/ctabix.pyx":41
  *     u"""Make sure a filename is 8-bit encoded (or None).
  *     """
  *     if filename is None:             # <<<<<<<<<<<<<<
@@ -1650,103 +1954,107 @@ static PyObject *__pyx_f_5pysam_6ctabix__my_encodeFilename(PyObject *__pyx_v_fil
  *     elif PyBytes_Check(filename):
  */
   __pyx_t_1 = (__pyx_v_filename == Py_None);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":45
+    /* "pysam/ctabix.pyx":42
  *     """
  *     if filename is None:
  *         return None             # <<<<<<<<<<<<<<
  *     elif PyBytes_Check(filename):
  *         return filename
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
+    __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(Py_None);
     __pyx_r = ((PyObject*)Py_None);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/ctabix.pyx":46
+  /* "pysam/ctabix.pyx":43
  *     if filename is None:
  *         return None
  *     elif PyBytes_Check(filename):             # <<<<<<<<<<<<<<
  *         return filename
  *     elif PyUnicode_Check(filename):
  */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_filename);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":47
+    /* "pysam/ctabix.pyx":44
  *         return None
  *     elif PyBytes_Check(filename):
  *         return filename             # <<<<<<<<<<<<<<
  *     elif PyUnicode_Check(filename):
  *         return filename.encode(_FILENAME_ENCODING)
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_INCREF(__pyx_v_filename);
     __pyx_r = ((PyObject*)__pyx_v_filename);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/ctabix.pyx":48
+  /* "pysam/ctabix.pyx":45
  *     elif PyBytes_Check(filename):
  *         return filename
  *     elif PyUnicode_Check(filename):             # <<<<<<<<<<<<<<
  *         return filename.encode(_FILENAME_ENCODING)
  *     else:
  */
-  __pyx_t_1 = PyUnicode_Check(__pyx_v_filename);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_filename) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":49
+    /* "pysam/ctabix.pyx":46
  *         return filename
  *     elif PyUnicode_Check(filename):
  *         return filename.encode(_FILENAME_ENCODING)             # <<<<<<<<<<<<<<
  *     else:
  *         raise TypeError, u"Argument must be string or unicode."
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
-    __Pyx_GIVEREF(((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
-    __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 = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __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_3)); __pyx_t_3 = 0;
-    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_r = ((PyObject*)__pyx_t_4);
-    __pyx_t_4 = 0;
+    __Pyx_INCREF(__pyx_v_5pysam_6ctabix__FILENAME_ENCODING);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_5pysam_6ctabix__FILENAME_ENCODING);
+    __Pyx_GIVEREF(__pyx_v_5pysam_6ctabix__FILENAME_ENCODING);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_5);
+    __pyx_t_5 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/ctabix.pyx":51
+    /* "pysam/ctabix.pyx":48
  *         return filename.encode(_FILENAME_ENCODING)
  *     else:
  *         raise TypeError, u"Argument must be string or unicode."             # <<<<<<<<<<<<<<
  * 
  * cdef bytes _force_bytes(object s):
  */
-    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_1), 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_or_unico, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":38
+ * #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
+ * 
+ * cdef bytes _encodeFilename(object filename):             # <<<<<<<<<<<<<<
+ *     u"""Make sure a filename is 8-bit encoded (or None).
+ *     """
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.ctabix._my_encodeFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pysam.ctabix._encodeFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -1754,7 +2062,7 @@ static PyObject *__pyx_f_5pysam_6ctabix__my_encodeFilename(PyObject *__pyx_v_fil
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":53
+/* "pysam/ctabix.pyx":50
  *         raise TypeError, u"Argument must be string or unicode."
  * 
  * cdef bytes _force_bytes(object s):             # <<<<<<<<<<<<<<
@@ -1766,39 +2074,39 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_bytes(PyObject *__pyx_v_s) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_force_bytes", 0);
 
-  /* "pysam/ctabix.pyx":56
+  /* "pysam/ctabix.pyx":53
  *     u"""convert string or unicode object to bytes, assuming ascii encoding.
  *     """
  *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
  *         return s
  *     elif s is None:
  */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/ctabix.pyx":57
+    /* "pysam/ctabix.pyx":54
  *     """
  *     if PY_MAJOR_VERSION < 3:
  *         return s             # <<<<<<<<<<<<<<
  *     elif s is None:
  *         return None
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_INCREF(__pyx_v_s);
     __pyx_r = ((PyObject*)__pyx_v_s);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/ctabix.pyx":58
+  /* "pysam/ctabix.pyx":55
  *     if PY_MAJOR_VERSION < 3:
  *         return s
  *     elif s is None:             # <<<<<<<<<<<<<<
@@ -1806,95 +2114,99 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_bytes(PyObject *__pyx_v_s) {
  *     elif PyBytes_Check(s):
  */
   __pyx_t_1 = (__pyx_v_s == Py_None);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":59
+    /* "pysam/ctabix.pyx":56
  *         return s
  *     elif s is None:
  *         return None             # <<<<<<<<<<<<<<
  *     elif PyBytes_Check(s):
  *         return s
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
+    __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(Py_None);
     __pyx_r = ((PyObject*)Py_None);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/ctabix.pyx":60
+  /* "pysam/ctabix.pyx":57
  *     elif s is None:
  *         return None
  *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
  *         return s
  *     elif PyUnicode_Check(s):
  */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_s);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":61
+    /* "pysam/ctabix.pyx":58
  *         return None
  *     elif PyBytes_Check(s):
  *         return s             # <<<<<<<<<<<<<<
  *     elif PyUnicode_Check(s):
  *         return s.encode('ascii')
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_INCREF(__pyx_v_s);
     __pyx_r = ((PyObject*)__pyx_v_s);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
 
-  /* "pysam/ctabix.pyx":62
+  /* "pysam/ctabix.pyx":59
  *     elif PyBytes_Check(s):
  *         return s
  *     elif PyUnicode_Check(s):             # <<<<<<<<<<<<<<
  *         return s.encode('ascii')
  *     else:
  */
-  __pyx_t_1 = PyUnicode_Check(__pyx_v_s);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyUnicode_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":63
+    /* "pysam/ctabix.pyx":60
  *         return s
  *     elif PyUnicode_Check(s):
  *         return s.encode('ascii')             # <<<<<<<<<<<<<<
  *     else:
  *         raise TypeError, u"Argument must be string, bytes or unicode."
  */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_r = ((PyObject*)__pyx_t_3);
-    __pyx_t_3 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_r = ((PyObject*)__pyx_t_4);
+    __pyx_t_4 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/ctabix.pyx":65
+    /* "pysam/ctabix.pyx":62
  *         return s.encode('ascii')
  *     else:
  *         raise TypeError, u"Argument must be string, bytes or unicode."             # <<<<<<<<<<<<<<
  * 
  * cdef inline bytes _force_cmdline_bytes(object s):
  */
-    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_3), 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_must_be_string_bytes_or, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":50
+ *         raise TypeError, u"Argument must be string or unicode."
+ * 
+ * cdef bytes _force_bytes(object s):             # <<<<<<<<<<<<<<
+ *     u"""convert string or unicode object to bytes, assuming ascii encoding.
+ *     """
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_AddTraceback("pysam.ctabix._force_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
   __pyx_L0:;
@@ -1903,7 +2215,7 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_bytes(PyObject *__pyx_v_s) {
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":67
+/* "pysam/ctabix.pyx":64
  *         raise TypeError, u"Argument must be string, bytes or unicode."
  * 
  * cdef inline bytes _force_cmdline_bytes(object s):             # <<<<<<<<<<<<<<
@@ -1920,22 +2232,29 @@ static CYTHON_INLINE PyObject *__pyx_f_5pysam_6ctabix__force_cmdline_bytes(PyObj
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_force_cmdline_bytes", 0);
 
-  /* "pysam/ctabix.pyx":68
+  /* "pysam/ctabix.pyx":65
  * 
  * cdef inline bytes _force_cmdline_bytes(object s):
  *     return _force_bytes(s)             # <<<<<<<<<<<<<<
  * 
  * cdef _charptr_to_str(char* s):
  */
-  __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_s)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":64
+ *         raise TypeError, u"Argument must be string, bytes or unicode."
+ * 
+ * cdef inline bytes _force_cmdline_bytes(object s):             # <<<<<<<<<<<<<<
+ *     return _force_bytes(s)
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.ctabix._force_cmdline_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -1946,7 +2265,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5pysam_6ctabix__force_cmdline_bytes(PyObj
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":70
+/* "pysam/ctabix.pyx":67
  *     return _force_bytes(s)
  * 
  * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
@@ -1964,17 +2283,17 @@ static PyObject *__pyx_f_5pysam_6ctabix__charptr_to_str(char *__pyx_v_s) {
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_charptr_to_str", 0);
 
-  /* "pysam/ctabix.pyx":71
+  /* "pysam/ctabix.pyx":68
  * 
  * cdef _charptr_to_str(char* s):
  *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
  *         return s
  *     else:
  */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
+  __pyx_t_1 = ((PY_MAJOR_VERSION < 3) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/ctabix.pyx":72
+    /* "pysam/ctabix.pyx":69
  * cdef _charptr_to_str(char* s):
  *     if PY_MAJOR_VERSION < 3:
  *         return s             # <<<<<<<<<<<<<<
@@ -1982,16 +2301,15 @@ static PyObject *__pyx_f_5pysam_6ctabix__charptr_to_str(char *__pyx_v_s) {
  *         return s.decode("ascii")
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/ctabix.pyx":74
+    /* "pysam/ctabix.pyx":71
  *         return s
  *     else:
  *         return s.decode("ascii")             # <<<<<<<<<<<<<<
@@ -1999,16 +2317,22 @@ static PyObject *__pyx_f_5pysam_6ctabix__charptr_to_str(char *__pyx_v_s) {
  * cdef _force_str(object s):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_s, 0, strlen(__pyx_v_s), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_s, 0, strlen(__pyx_v_s), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":67
+ *     return _force_bytes(s)
+ * 
+ * cdef _charptr_to_str(char* s):             # <<<<<<<<<<<<<<
+ *     if PY_MAJOR_VERSION < 3:
+ *         return s
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("pysam.ctabix._charptr_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -2019,7 +2343,7 @@ static PyObject *__pyx_f_5pysam_6ctabix__charptr_to_str(char *__pyx_v_s) {
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":76
+/* "pysam/ctabix.pyx":73
  *         return s.decode("ascii")
  * 
  * cdef _force_str(object s):             # <<<<<<<<<<<<<<
@@ -2031,14 +2355,15 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_str(PyObject *__pyx_v_s) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_force_str", 0);
 
-  /* "pysam/ctabix.pyx":78
+  /* "pysam/ctabix.pyx":75
  * cdef _force_str(object s):
  *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
  *     if s is None:             # <<<<<<<<<<<<<<
@@ -2046,9 +2371,10 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_str(PyObject *__pyx_v_s) {
  *     if PY_MAJOR_VERSION < 3:
  */
   __pyx_t_1 = (__pyx_v_s == Py_None);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":79
+    /* "pysam/ctabix.pyx":76
  *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
  *     if s is None:
  *         return None             # <<<<<<<<<<<<<<
@@ -2059,21 +2385,19 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_str(PyObject *__pyx_v_s) {
     __Pyx_INCREF(Py_None);
     __pyx_r = Py_None;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":80
+  /* "pysam/ctabix.pyx":77
  *     if s is None:
  *         return None
  *     if PY_MAJOR_VERSION < 3:             # <<<<<<<<<<<<<<
  *         return s
  *     elif PyBytes_Check(s):
  */
-  __pyx_t_1 = (PY_MAJOR_VERSION < 3);
-  if (__pyx_t_1) {
+  __pyx_t_2 = ((PY_MAJOR_VERSION < 3) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":81
+    /* "pysam/ctabix.pyx":78
  *         return None
  *     if PY_MAJOR_VERSION < 3:
  *         return s             # <<<<<<<<<<<<<<
@@ -2084,20 +2408,19 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_str(PyObject *__pyx_v_s) {
     __Pyx_INCREF(__pyx_v_s);
     __pyx_r = __pyx_v_s;
     goto __pyx_L0;
-    goto __pyx_L4;
   }
 
-  /* "pysam/ctabix.pyx":82
+  /* "pysam/ctabix.pyx":79
  *     if PY_MAJOR_VERSION < 3:
  *         return s
  *     elif PyBytes_Check(s):             # <<<<<<<<<<<<<<
  *         return s.decode('ascii')
  *     else:
  */
-  __pyx_t_1 = PyBytes_Check(__pyx_v_s);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (PyBytes_Check(__pyx_v_s) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":83
+    /* "pysam/ctabix.pyx":80
  *         return s
  *     elif PyBytes_Check(s):
  *         return s.decode('ascii')             # <<<<<<<<<<<<<<
@@ -2105,19 +2428,18 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_str(PyObject *__pyx_v_s) {
  *         # assume unicode
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); 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_2); __pyx_t_2 = 0;
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
     goto __pyx_L0;
-    goto __pyx_L4;
   }
   /*else*/ {
 
-    /* "pysam/ctabix.pyx":86
+    /* "pysam/ctabix.pyx":83
  *     else:
  *         # assume unicode
  *         return s             # <<<<<<<<<<<<<<
@@ -2129,13 +2451,19 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_str(PyObject *__pyx_v_s) {
     __pyx_r = __pyx_v_s;
     goto __pyx_L0;
   }
-  __pyx_L4:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":73
+ *         return s.decode("ascii")
+ * 
+ * cdef _force_str(object s):             # <<<<<<<<<<<<<<
+ *     """Return s converted to str type of current Python (bytes in Py2, unicode in Py3)"""
+ *     if s is None:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_AddTraceback("pysam.ctabix._force_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
   __pyx_L0:;
@@ -2144,262 +2472,103 @@ static PyObject *__pyx_f_5pysam_6ctabix__force_str(PyObject *__pyx_v_s) {
   return __pyx_r;
 }
 
-/* Python wrapper */
-static int __pyx_pw_5pysam_6ctabix_9Tabixfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_6ctabix_9Tabixfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_filename = 0;
-  PyObject *__pyx_v_mode = 0;
-  PyObject *__pyx_v_parser = 0;
-  PyObject *__pyx_v_args = 0;
-  PyObject *__pyx_v_kwargs = 0;
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
-  if (PyTuple_GET_SIZE(__pyx_args) > 3) {
-    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 3, PyTuple_GET_SIZE(__pyx_args));
-    if (unlikely(!__pyx_v_args)) {
-      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-      __Pyx_RefNannyFinishContext();
-      return -1;
-    }
-    __Pyx_GOTREF(__pyx_v_args);
-  } else {
-    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
-  }
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__mode,&__pyx_n_s__parser,0};
-    PyObject* values[3] = {0,0,0};
-    values[1] = ((PyObject *)__pyx_n_s__r);
-
-    /* "pysam/ctabix.pyx":101
- *     '''
- *     def __cinit__(self, filename, mode = 'r',
- *                   parser = None, *args, **kwargs ):             # <<<<<<<<<<<<<<
- *         self.tabixfile = NULL
- *         self.parser = parser
- */
-    values[2] = ((PyObject *)Py_None);
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        default:
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode);
-          if (value) { values[1] = value; kw_args--; }
-        }
-        case  2:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser);
-          if (value) { values[2] = value; kw_args--; }
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        const Py_ssize_t used_pos_args = (pos_args < 3) ? pos_args : 3;
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        default:
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        case  0:
-        goto __pyx_L5_argtuple_error;
-      }
-    }
-    __pyx_v_filename = values[0];
-    __pyx_v_mode = values[1];
-    __pyx_v_parser = values[2];
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
-  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return -1;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile___cinit__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_parser, __pyx_v_args, __pyx_v_kwargs);
-  __Pyx_XDECREF(__pyx_v_args);
-  __Pyx_XDECREF(__pyx_v_kwargs);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/ctabix.pyx":100
- *     parsed data (see for example :meth:`asTuple` and :meth:`asGTF`).
- *     '''
- *     def __cinit__(self, filename, mode = 'r',             # <<<<<<<<<<<<<<
- *                   parser = None, *args, **kwargs ):
- *         self.tabixfile = NULL
+/* "pysam/ctabix.pyx":88
+ * cdef class Parser:
+ * 
+ *     cdef parse(self, char * buffer, int length):             # <<<<<<<<<<<<<<
+ *         raise NotImplementedError(
+ *             'parse method of %s not implemented' % str(self))
  */
 
-static int __pyx_pf_5pysam_6ctabix_9Tabixfile___cinit__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_parser, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
-  int __pyx_r;
+static PyObject *__pyx_f_5pysam_6ctabix_6Parser_parse(struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_self, CYTHON_UNUSED char *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_length) {
+  PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-
-  /* "pysam/ctabix.pyx":102
- *     def __cinit__(self, filename, mode = 'r',
- *                   parser = None, *args, **kwargs ):
- *         self.tabixfile = NULL             # <<<<<<<<<<<<<<
- *         self.parser = parser
- *         self._open( filename, mode, *args, **kwargs )
- */
-  __pyx_v_self->tabixfile = NULL;
-
-  /* "pysam/ctabix.pyx":103
- *                   parser = None, *args, **kwargs ):
- *         self.tabixfile = NULL
- *         self.parser = parser             # <<<<<<<<<<<<<<
- *         self._open( filename, mode, *args, **kwargs )
- * 
- */
-  if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_5pysam_6ctabix_Parser))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_INCREF(__pyx_v_parser);
-  __Pyx_GIVEREF(__pyx_v_parser);
-  __Pyx_GOTREF(__pyx_v_self->parser);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->parser));
-  __pyx_v_self->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)__pyx_v_parser);
+  __Pyx_RefNannySetupContext("parse", 0);
 
-  /* "pysam/ctabix.pyx":104
- *         self.tabixfile = NULL
- *         self.parser = parser
- *         self._open( filename, mode, *args, **kwargs )             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":90
+ *     cdef parse(self, char * buffer, int length):
+ *         raise NotImplementedError(
+ *             'parse method of %s not implemented' % str(self))             # <<<<<<<<<<<<<<
  * 
- *     def _isOpen( self ):
+ *     def __call__(self, char * buffer, int length):
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_v_filename);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
-  __Pyx_GIVEREF(__pyx_v_filename);
-  __Pyx_INCREF(__pyx_v_mode);
-  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mode);
-  __Pyx_GIVEREF(__pyx_v_mode);
-  __pyx_t_3 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-  __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = ((PyObject *)__pyx_v_kwargs);
-  __Pyx_INCREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __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_4)); __pyx_t_4 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_parse_method_of_s_not_implemente, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_9Tabixfile_2_isOpen[] = "Tabixfile._isOpen(self)\nreturn true if samfile has been opened.";
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_2_isOpen(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/ctabix.pyx":106
- *         self._open( filename, mode, *args, **kwargs )
+  /* "pysam/ctabix.pyx":89
+ * 
+ *     cdef parse(self, char * buffer, int length):
+ *         raise NotImplementedError(             # <<<<<<<<<<<<<<
+ *             'parse method of %s not implemented' % str(self))
  * 
- *     def _isOpen( self ):             # <<<<<<<<<<<<<<
- *         '''return true if samfile has been opened.'''
- *         return self.tabixfile != NULL
  */
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_2_isOpen(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_isOpen", 0);
-
-  /* "pysam/ctabix.pyx":108
- *     def _isOpen( self ):
- *         '''return true if samfile has been opened.'''
- *         return self.tabixfile != NULL             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":88
+ * cdef class Parser:
  * 
- *     def _open( self,
+ *     cdef parse(self, char * buffer, int length):             # <<<<<<<<<<<<<<
+ *         raise NotImplementedError(
+ *             'parse method of %s not implemented' % str(self))
  */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->tabixfile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __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;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.ctabix.Parser.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":92
+ *             'parse method of %s not implemented' % str(self))
+ * 
+ *     def __call__(self, char * buffer, int length):             # <<<<<<<<<<<<<<
+ *         return self.parse(buffer, length)
+ * 
+ */
+
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_5_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_9Tabixfile_4_open[] = "Tabixfile._open(self, filename, mode='r')\nopen a :term:`tabix file` for reading.\n        ";
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_5_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_filename = 0;
-  PyObject *__pyx_v_mode = 0;
+static PyObject *__pyx_pw_5pysam_6ctabix_6Parser_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_5pysam_6ctabix_6Parser_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  char *__pyx_v_buffer;
+  int __pyx_v_length;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_open (wrapper)", 0);
+  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__mode,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,&__pyx_n_s_length,0};
     PyObject* values[2] = {0,0};
-    values[1] = ((PyObject *)__pyx_n_s__r);
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -2412,1090 +2581,646 @@ static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_5_open(PyObject *__pyx_v_sel
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buffer)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode);
-          if (value) { values[1] = value; kw_args--; }
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
     } else {
-      switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        break;
-        default: goto __pyx_L5_argtuple_error;
-      }
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
     }
-    __pyx_v_filename = values[0];
-    __pyx_v_mode = values[1];
+    __pyx_v_buffer = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_length = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_4_open(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_6Parser___call__(((struct __pyx_obj_5pysam_6ctabix_Parser *)__pyx_v_self), __pyx_v_buffer, __pyx_v_length);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":110
- *         return self.tabixfile != NULL
- * 
- *     def _open( self,             # <<<<<<<<<<<<<<
- *                filename,
- *                mode ='r',
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_4_open(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode) {
-  PyObject *__pyx_v_filename_index = NULL;
-  CYTHON_UNUSED PyObject *__pyx_v_bmode = 0;
+static PyObject *__pyx_pf_5pysam_6ctabix_6Parser___call__(struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_length) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  int __pyx_t_5;
-  char *__pyx_t_6;
-  int __pyx_t_7;
-  char *__pyx_t_8;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_open", 0);
-  __Pyx_INCREF(__pyx_v_filename);
+  __Pyx_RefNannySetupContext("__call__", 0);
 
-  /* "pysam/ctabix.pyx":117
- *         '''
+  /* "pysam/ctabix.pyx":93
  * 
- *         assert mode in ( "r",), "invalid file opening mode `%s`" % mode             # <<<<<<<<<<<<<<
+ *     def __call__(self, char * buffer, int length):
+ *         return self.parse(buffer, length)             # <<<<<<<<<<<<<<
  * 
- *         # close a previously opened file
+ * cdef class asTuple(Parser):
  */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  __Pyx_INCREF(__pyx_v_mode);
-  __pyx_t_1 = __pyx_v_mode;
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __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;
-  if (unlikely(!((int)__pyx_t_3))) {
-    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_v_mode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_1));
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_6ctabix_Parser *)__pyx_v_self->__pyx_vtab)->parse(__pyx_v_self, __pyx_v_buffer, __pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
 
-  /* "pysam/ctabix.pyx":120
+  /* "pysam/ctabix.pyx":92
+ *             'parse method of %s not implemented' % str(self))
  * 
- *         # close a previously opened file
- *         if self.tabixfile != NULL: self.close()             # <<<<<<<<<<<<<<
- *         self.tabixfile = NULL
+ *     def __call__(self, char * buffer, int length):             # <<<<<<<<<<<<<<
+ *         return self.parse(buffer, length)
  * 
  */
-  __pyx_t_3 = (__pyx_v_self->tabixfile != NULL);
-  if (__pyx_t_3) {
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __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 = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":121
- *         # close a previously opened file
- *         if self.tabixfile != NULL: self.close()
- *         self.tabixfile = NULL             # <<<<<<<<<<<<<<
- * 
- *         filename_index = filename + ".tbi"
- */
-  __pyx_v_self->tabixfile = NULL;
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.ctabix.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "pysam/ctabix.pyx":123
- *         self.tabixfile = NULL
- * 
- *         filename_index = filename + ".tbi"             # <<<<<<<<<<<<<<
- *         self.isremote = filename.startswith( "http:") or filename.startswith( "ftp:" )
- * 
+/* "pysam/ctabix.pyx":100
+ *     Access is by numeric index.
+ *     '''
+ *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
+ *         cdef TabProxies.TupleProxy r
+ *         r = TabProxies.TupleProxy()
  */
-  __pyx_t_2 = PyNumber_Add(__pyx_v_filename, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_filename_index = __pyx_t_2;
-  __pyx_t_2 = 0;
 
-  /* "pysam/ctabix.pyx":124
- * 
- *         filename_index = filename + ".tbi"
- *         self.isremote = filename.startswith( "http:") or filename.startswith( "ftp:" )             # <<<<<<<<<<<<<<
- * 
- *         # encode all the strings
+static PyObject *__pyx_f_5pysam_6ctabix_7asTuple_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_asTuple *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
+  struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_r = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("parse", 0);
+
+  /* "pysam/ctabix.pyx":102
+ *     cdef parse(self, char * buffer, int len):
+ *         cdef TabProxies.TupleProxy r
+ *         r = TabProxies.TupleProxy()             # <<<<<<<<<<<<<<
+ *         # need to copy - there were some
+ *         # persistence issues with "present"
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __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_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_3) {
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = __pyx_t_4;
-    __pyx_t_4 = 0;
-  } else {
-    __pyx_t_2 = __pyx_t_1;
-    __pyx_t_1 = 0;
-  }
-  __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_self->isremote = __pyx_t_5;
+  __pyx_v_r = ((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":127
+  /* "pysam/ctabix.pyx":105
+ *         # need to copy - there were some
+ *         # persistence issues with "present"
+ *         r.copy(buffer, len)             # <<<<<<<<<<<<<<
+ *         return r
  * 
- *         # encode all the strings
- *         filename = _my_encodeFilename(filename)             # <<<<<<<<<<<<<<
- *         filename_index = _my_encodeFilename(filename_index)
- *         cdef bytes bmode = mode.encode('ascii')
  */
-  __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_6ctabix__my_encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_v_filename);
-  __pyx_v_filename = __pyx_t_2;
-  __pyx_t_2 = 0;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *)__pyx_v_r->__pyx_vtab)->copy(__pyx_v_r, __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":128
- *         # encode all the strings
- *         filename = _my_encodeFilename(filename)
- *         filename_index = _my_encodeFilename(filename_index)             # <<<<<<<<<<<<<<
- *         cdef bytes bmode = mode.encode('ascii')
+  /* "pysam/ctabix.pyx":106
+ *         # persistence issues with "present"
+ *         r.copy(buffer, len)
+ *         return r             # <<<<<<<<<<<<<<
  * 
+ * cdef class asGTF(Parser):
  */
-  __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_6ctabix__my_encodeFilename(__pyx_v_filename_index)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_v_filename_index);
-  __pyx_v_filename_index = __pyx_t_2;
-  __pyx_t_2 = 0;
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_r));
+  __pyx_r = ((PyObject *)__pyx_v_r);
+  goto __pyx_L0;
 
-  /* "pysam/ctabix.pyx":129
- *         filename = _my_encodeFilename(filename)
- *         filename_index = _my_encodeFilename(filename_index)
- *         cdef bytes bmode = mode.encode('ascii')             # <<<<<<<<<<<<<<
- * 
- *         if self._filename != NULL: free(self._filename )
+  /* "pysam/ctabix.pyx":100
+ *     Access is by numeric index.
+ *     '''
+ *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
+ *         cdef TabProxies.TupleProxy r
+ *         r = TabProxies.TupleProxy()
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_mode, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_bmode = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":131
- *         cdef bytes bmode = mode.encode('ascii')
- * 
- *         if self._filename != NULL: free(self._filename )             # <<<<<<<<<<<<<<
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.ctabix.asTuple.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_r);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":139
  * 
- *         self._filename = strdup(filename)
+ *     '''
+ *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
+ *         cdef TabProxies.GTFProxy r
+ *         r = TabProxies.GTFProxy()
  */
-  __pyx_t_3 = (__pyx_v_self->_filename != NULL);
-  if (__pyx_t_3) {
-    free(__pyx_v_self->_filename);
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
 
-  /* "pysam/ctabix.pyx":133
- *         if self._filename != NULL: free(self._filename )
- * 
- *         self._filename = strdup(filename)             # <<<<<<<<<<<<<<
- * 
- *         if mode[0] == 'w':
+static PyObject *__pyx_f_5pysam_6ctabix_5asGTF_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_asGTF *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
+  struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_r = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("parse", 0);
+
+  /* "pysam/ctabix.pyx":141
+ *     cdef parse(self, char * buffer, int len):
+ *         cdef TabProxies.GTFProxy r
+ *         r = TabProxies.GTFProxy()             # <<<<<<<<<<<<<<
+ *         r.copy( buffer, len )
+ *         return r
  */
-  __pyx_t_6 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_filename = strdup(__pyx_t_6);
+  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_GTFProxy)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_r = ((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":135
- *         self._filename = strdup(filename)
+  /* "pysam/ctabix.pyx":142
+ *         cdef TabProxies.GTFProxy r
+ *         r = TabProxies.GTFProxy()
+ *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
+ *         return r
  * 
- *         if mode[0] == 'w':             # <<<<<<<<<<<<<<
- *             # open file for writing
- *             raise NotImplementedError("writing to tabix files not implemented" )
  */
-  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *)__pyx_v_r->__pyx_base.__pyx_vtab)->__pyx_base.copy(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __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 = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_3) {
 
-    /* "pysam/ctabix.pyx":137
- *         if mode[0] == 'w':
- *             # open file for writing
- *             raise NotImplementedError("writing to tabix files not implemented" )             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":143
+ *         r = TabProxies.GTFProxy()
+ *         r.copy( buffer, len )
+ *         return r             # <<<<<<<<<<<<<<
  * 
- *         elif mode[0] == "r":
+ * cdef class asBed( Parser ):
  */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_13), 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);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
-  }
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_r));
+  __pyx_r = ((PyObject *)__pyx_v_r);
+  goto __pyx_L0;
 
   /* "pysam/ctabix.pyx":139
- *             raise NotImplementedError("writing to tabix files not implemented" )
- * 
- *         elif mode[0] == "r":             # <<<<<<<<<<<<<<
- *             # open file for reading
  * 
+ *     '''
+ *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
+ *         cdef TabProxies.GTFProxy r
+ *         r = TabProxies.GTFProxy()
  */
-  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __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 = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_3) {
 
-    /* "pysam/ctabix.pyx":142
- *             # open file for reading
- * 
- *             if not self.isremote:             # <<<<<<<<<<<<<<
- *                 if not os.path.exists( filename ):
- *                     raise IOError( "file `%s` not found" % filename)
- */
-    __pyx_t_3 = (!__pyx_v_self->isremote);
-    if (__pyx_t_3) {
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.ctabix.asGTF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_r);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "pysam/ctabix.pyx":143
- * 
- *             if not self.isremote:
- *                 if not os.path.exists( filename ):             # <<<<<<<<<<<<<<
- *                     raise IOError( "file `%s` not found" % filename)
+/* "pysam/ctabix.pyx":179
  * 
+ *     '''
+ *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
+ *         cdef TabProxies.BedProxy r
+ *         r = TabProxies.BedProxy()
  */
-      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __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_2, __pyx_n_s__exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(__pyx_v_filename);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
-      __Pyx_GIVEREF(__pyx_v_filename);
-      __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 = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_7 = (!__pyx_t_3);
-      if (__pyx_t_7) {
 
-        /* "pysam/ctabix.pyx":144
- *             if not self.isremote:
- *                 if not os.path.exists( filename ):
- *                     raise IOError( "file `%s` not found" % filename)             # <<<<<<<<<<<<<<
- * 
- *                 if not os.path.exists( filename_index ):
- */
-        __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_v_filename); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__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_builtin_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L7;
-      }
-      __pyx_L7:;
+static PyObject *__pyx_f_5pysam_6ctabix_5asBed_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_asBed *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
+  struct __pyx_obj_5pysam_10TabProxies_BedProxy *__pyx_v_r = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("parse", 0);
 
-      /* "pysam/ctabix.pyx":146
- *                     raise IOError( "file `%s` not found" % filename)
- * 
- *                 if not os.path.exists( filename_index ):             # <<<<<<<<<<<<<<
- *                     raise IOError( "index `%s` not found" % filename_index)
- * 
- */
-      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__exists); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __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 = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(__pyx_v_filename_index);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename_index);
-      __Pyx_GIVEREF(__pyx_v_filename_index);
-      __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 = 146; __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_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_3 = (!__pyx_t_7);
-      if (__pyx_t_3) {
+  /* "pysam/ctabix.pyx":181
+ *     cdef parse(self, char * buffer, int len):
+ *         cdef TabProxies.BedProxy r
+ *         r = TabProxies.BedProxy()             # <<<<<<<<<<<<<<
+ *         r.copy( buffer, len )
+ *         return r
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_BedProxy)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_r = ((struct __pyx_obj_5pysam_10TabProxies_BedProxy *)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-        /* "pysam/ctabix.pyx":147
- * 
- *                 if not os.path.exists( filename_index ):
- *                     raise IOError( "index `%s` not found" % filename_index)             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":182
+ *         cdef TabProxies.BedProxy r
+ *         r = TabProxies.BedProxy()
+ *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
+ *         return r
  * 
- *             # open file and load index
  */
-        __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), __pyx_v_filename_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-        __pyx_t_1 = 0;
-        __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L8;
-      }
-      __pyx_L8:;
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy *)__pyx_v_r->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/ctabix.pyx":150
+  /* "pysam/ctabix.pyx":183
+ *         r = TabProxies.BedProxy()
+ *         r.copy( buffer, len )
+ *         return r             # <<<<<<<<<<<<<<
  * 
- *             # open file and load index
- *             self.tabixfile = ti_open( filename, filename_index )             # <<<<<<<<<<<<<<
+ * cdef class asVCF( Parser ):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_r));
+  __pyx_r = ((PyObject *)__pyx_v_r);
+  goto __pyx_L0;
+
+  /* "pysam/ctabix.pyx":179
  * 
- *         if self.tabixfile == NULL:
+ *     '''
+ *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
+ *         cdef TabProxies.BedProxy r
+ *         r = TabProxies.BedProxy()
  */
-    __pyx_t_6 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_8 = PyBytes_AsString(__pyx_v_filename_index); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_self->tabixfile = ti_open(__pyx_t_6, __pyx_t_8);
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
 
-  /* "pysam/ctabix.pyx":152
- *             self.tabixfile = ti_open( filename, filename_index )
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.ctabix.asBed.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_r);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":215
  * 
- *         if self.tabixfile == NULL:             # <<<<<<<<<<<<<<
- *             raise IOError("could not open file `%s`" % filename )
+ *     '''
+ *     cdef parse(self, char * buffer, int len ):             # <<<<<<<<<<<<<<
+ *         cdef TabProxies.VCFProxy r
+ *         r = TabProxies.VCFProxy()
+ */
+
+static PyObject *__pyx_f_5pysam_6ctabix_5asVCF_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_asVCF *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
+  struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_r = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("parse", 0);
+
+  /* "pysam/ctabix.pyx":217
+ *     cdef parse(self, char * buffer, int len ):
+ *         cdef TabProxies.VCFProxy r
+ *         r = TabProxies.VCFProxy()             # <<<<<<<<<<<<<<
+ *         r.copy(buffer, len)
+ *         return r
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_VCFProxy)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_r = ((struct __pyx_obj_5pysam_10TabProxies_VCFProxy *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/ctabix.pyx":218
+ *         cdef TabProxies.VCFProxy r
+ *         r = TabProxies.VCFProxy()
+ *         r.copy(buffer, len)             # <<<<<<<<<<<<<<
+ *         return r
  * 
  */
-  __pyx_t_3 = (__pyx_v_self->tabixfile == NULL);
-  if (__pyx_t_3) {
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *)__pyx_v_r->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/ctabix.pyx":153
+  /* "pysam/ctabix.pyx":219
+ *         r = TabProxies.VCFProxy()
+ *         r.copy(buffer, len)
+ *         return r             # <<<<<<<<<<<<<<
  * 
- *         if self.tabixfile == NULL:
- *             raise IOError("could not open file `%s`" % filename )             # <<<<<<<<<<<<<<
  * 
- *     def _parseRegion( self,
  */
-    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_v_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L9;
-  }
-  __pyx_L9:;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_r));
+  __pyx_r = ((PyObject *)__pyx_v_r);
   goto __pyx_L0;
+
+  /* "pysam/ctabix.pyx":215
+ * 
+ *     '''
+ *     cdef parse(self, char * buffer, int len ):             # <<<<<<<<<<<<<<
+ *         cdef TabProxies.VCFProxy r
+ *         r = TabProxies.VCFProxy()
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_AddTraceback("pysam.ctabix.asVCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_filename_index);
-  __Pyx_XDECREF(__pyx_v_bmode);
-  __Pyx_XDECREF(__pyx_v_filename);
+  __Pyx_XDECREF((PyObject *)__pyx_v_r);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":234
+ *     parsed data (see for example :meth:`asTuple` and :meth:`asGTF`).
+ *     '''
+ *     def __cinit__(self, filename, mode = 'r',             # <<<<<<<<<<<<<<
+ *                   parser=None,
+ *                   index=None,
+ */
+
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_7_parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_9Tabixfile_6_parseRegion[] = "Tabixfile._parseRegion(self, reference=None, start=None, end=None, region=None)\nparse region information.\n\n        raise ValueError for for invalid regions.\n\n        returns a tuple of region, tid, start and end. Region\n        is a valid samtools :term:`region` or None if the region\n        extends over the whole file.\n\n        Note that regions are 1-based, while start,end are python coordinates.\n        ";
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_7_parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_reference = 0;
-  PyObject *__pyx_v_start = 0;
-  PyObject *__pyx_v_end = 0;
-  PyObject *__pyx_v_region = 0;
-  PyObject *__pyx_r = 0;
+static int __pyx_pw_5pysam_6ctabix_9Tabixfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_6ctabix_9Tabixfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_filename = 0;
+  PyObject *__pyx_v_mode = 0;
+  PyObject *__pyx_v_parser = 0;
+  PyObject *__pyx_v_index = 0;
+  PyObject *__pyx_v_args = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_parseRegion (wrapper)", 0);
+  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  if (PyTuple_GET_SIZE(__pyx_args) > 4) {
+    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 4, PyTuple_GET_SIZE(__pyx_args));
+    if (unlikely(!__pyx_v_args)) {
+      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+      __Pyx_RefNannyFinishContext();
+      return -1;
+    }
+    __Pyx_GOTREF(__pyx_v_args);
+  } else {
+    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+  }
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_parser,&__pyx_n_s_index,0};
     PyObject* values[4] = {0,0,0,0};
+    values[1] = ((PyObject *)__pyx_n_s_r);
 
-    /* "pysam/ctabix.pyx":156
- * 
- *     def _parseRegion( self,
- *                       reference = None,             # <<<<<<<<<<<<<<
- *                       start = None,
- *                       end = None,
- */
-    values[0] = ((PyObject *)Py_None);
-
-    /* "pysam/ctabix.pyx":157
- *     def _parseRegion( self,
- *                       reference = None,
- *                       start = None,             # <<<<<<<<<<<<<<
- *                       end = None,
- *                       region = None ):
- */
-    values[1] = ((PyObject *)Py_None);
-
-    /* "pysam/ctabix.pyx":158
- *                       reference = None,
- *                       start = None,
- *                       end = None,             # <<<<<<<<<<<<<<
- *                       region = None ):
- *         '''parse region information.
+    /* "pysam/ctabix.pyx":235
+ *     '''
+ *     def __cinit__(self, filename, mode = 'r',
+ *                   parser=None,             # <<<<<<<<<<<<<<
+ *                   index=None,
+ *                   *args,
  */
     values[2] = ((PyObject *)Py_None);
 
-    /* "pysam/ctabix.pyx":159
- *                       start = None,
- *                       end = None,
- *                       region = None ):             # <<<<<<<<<<<<<<
- *         '''parse region information.
- * 
+    /* "pysam/ctabix.pyx":236
+ *     def __cinit__(self, filename, mode = 'r',
+ *                   parser=None,
+ *                   index=None,             # <<<<<<<<<<<<<<
+ *                   *args,
+ *                   **kwargs ):
  */
     values[3] = ((PyObject *)Py_None);
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
       switch (pos_args) {
+        default:
         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
         case  0: break;
-        default: goto __pyx_L5_argtuple_error;
       }
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
-          if (value) { values[0] = value; kw_args--; }
-        }
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
         case  1:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
           if (value) { values[1] = value; kw_args--; }
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser);
           if (value) { values[2] = value; kw_args--; }
         }
         case  3:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index);
           if (value) { values[3] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parseRegion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        const Py_ssize_t used_pos_args = (pos_args < 4) ? pos_args : 4;
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
+        default:
         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
+        break;
+        case  0:
+        goto __pyx_L5_argtuple_error;
       }
     }
-    __pyx_v_reference = values[0];
-    __pyx_v_start = values[1];
-    __pyx_v_end = values[2];
-    __pyx_v_region = values[3];
+    __pyx_v_filename = values[0];
+    __pyx_v_mode = values[1];
+    __pyx_v_parser = values[2];
+    __pyx_v_index = values[3];
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_parseRegion", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
-  return NULL;
+  return -1;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_6_parseRegion(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile___cinit__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_parser, __pyx_v_index, __pyx_v_args, __pyx_v_kwargs);
+
+  /* "pysam/ctabix.pyx":234
+ *     parsed data (see for example :meth:`asTuple` and :meth:`asGTF`).
+ *     '''
+ *     def __cinit__(self, filename, mode = 'r',             # <<<<<<<<<<<<<<
+ *                   parser=None,
+ *                   index=None,
+ */
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_args);
+  __Pyx_XDECREF(__pyx_v_kwargs);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":155
- *             raise IOError("could not open file `%s`" % filename )
- * 
- *     def _parseRegion( self,             # <<<<<<<<<<<<<<
- *                       reference = None,
- *                       start = None,
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_6_parseRegion(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region) {
-  int __pyx_v_rtid;
-  int __pyx_v_rstart;
-  int __pyx_v_rend;
-  int __pyx_v_max_pos;
-  PyObject *__pyx_r = NULL;
+static int __pyx_pf_5pysam_6ctabix_9Tabixfile___cinit__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_parser, PyObject *__pyx_v_index, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
+  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;
-  char *__pyx_t_7;
-  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_parseRegion", 0);
-  __Pyx_INCREF(__pyx_v_region);
-
-  /* "pysam/ctabix.pyx":170
- *         Note that regions are 1-based, while start,end are python coordinates.
- *         '''
- *         ti_lazy_index_load( self.tabixfile )             # <<<<<<<<<<<<<<
- * 
- *         cdef int rtid
- */
-  ti_lazy_index_load(__pyx_v_self->tabixfile);
+  __Pyx_RefNannySetupContext("__cinit__", 0);
 
-  /* "pysam/ctabix.pyx":176
- *         cdef int rend
- *         cdef int max_pos
- *         max_pos = 2 << 29             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":240
+ *                   **kwargs ):
  * 
- *         rtid = rstart = rend = 0
+ *         self.tabixfile = NULL             # <<<<<<<<<<<<<<
+ *         self.parser = parser
+ *         self._open( filename, mode, index, *args, **kwargs )
  */
-  __pyx_v_max_pos = 1073741824;
+  __pyx_v_self->tabixfile = NULL;
 
-  /* "pysam/ctabix.pyx":178
- *         max_pos = 2 << 29
+  /* "pysam/ctabix.pyx":241
  * 
- *         rtid = rstart = rend = 0             # <<<<<<<<<<<<<<
+ *         self.tabixfile = NULL
+ *         self.parser = parser             # <<<<<<<<<<<<<<
+ *         self._open( filename, mode, index, *args, **kwargs )
  * 
- *         # translate to a region
  */
-  __pyx_v_rtid = 0;
-  __pyx_v_rstart = 0;
-  __pyx_v_rend = 0;
+  if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_5pysam_6ctabix_Parser))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_v_parser;
+  __Pyx_INCREF(__pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->parser);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->parser));
+  __pyx_v_self->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":181
+  /* "pysam/ctabix.pyx":242
+ *         self.tabixfile = NULL
+ *         self.parser = parser
+ *         self._open( filename, mode, index, *args, **kwargs )             # <<<<<<<<<<<<<<
  * 
- *         # translate to a region
- *         if reference:             # <<<<<<<<<<<<<<
- *             if start != None and end != None:
- *                 region = "%s:%i-%i" % (reference, start+1, end)
+ *     def _open( self,
  */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_v_filename);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
+  __Pyx_GIVEREF(__pyx_v_filename);
+  __Pyx_INCREF(__pyx_v_mode);
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mode);
+  __Pyx_GIVEREF(__pyx_v_mode);
+  __Pyx_INCREF(__pyx_v_index);
+  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_index);
+  __Pyx_GIVEREF(__pyx_v_index);
+  __pyx_t_3 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __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_t_3 = __pyx_v_kwargs;
+  __Pyx_INCREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __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_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "pysam/ctabix.pyx":182
- *         # translate to a region
- *         if reference:
- *             if start != None and end != None:             # <<<<<<<<<<<<<<
- *                 region = "%s:%i-%i" % (reference, start+1, end)
- *             elif start == None and end != None:
- */
-    __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_1) {
-      __pyx_t_2 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_4 = __pyx_t_3;
-    } else {
-      __pyx_t_4 = __pyx_t_1;
-    }
-    if (__pyx_t_4) {
-
-      /* "pysam/ctabix.pyx":183
- *         if reference:
- *             if start != None and end != None:
- *                 region = "%s:%i-%i" % (reference, start+1, end)             # <<<<<<<<<<<<<<
- *             elif start == None and end != None:
- *                 region = "%s:%i-%i" % (reference, 1, end)
- */
-      __pyx_t_2 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_5 = PyTuple_New(3); 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_INCREF(__pyx_v_reference);
-      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_reference);
-      __Pyx_GIVEREF(__pyx_v_reference);
-      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __Pyx_INCREF(__pyx_v_end);
-      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_end);
-      __Pyx_GIVEREF(__pyx_v_end);
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-      __Pyx_DECREF(__pyx_v_region);
-      __pyx_v_region = ((PyObject *)__pyx_t_2);
-      __pyx_t_2 = 0;
-      goto __pyx_L4;
-    }
-
-    /* "pysam/ctabix.pyx":184
- *             if start != None and end != None:
- *                 region = "%s:%i-%i" % (reference, start+1, end)
- *             elif start == None and end != None:             # <<<<<<<<<<<<<<
- *                 region = "%s:%i-%i" % (reference, 1, end)
- *             elif end == None and start != None:
- */
-    __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __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 = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_4) {
-      __pyx_t_2 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_3 = __pyx_t_1;
-    } else {
-      __pyx_t_3 = __pyx_t_4;
-    }
-    if (__pyx_t_3) {
-
-      /* "pysam/ctabix.pyx":185
- *                 region = "%s:%i-%i" % (reference, start+1, end)
- *             elif start == None and end != None:
- *                 region = "%s:%i-%i" % (reference, 1, end)             # <<<<<<<<<<<<<<
- *             elif end == None and start != None:
- *                 region = "%s:%i-%i" % (reference, start+1, max_pos-1)
- */
-      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(__pyx_v_reference);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference);
-      __Pyx_GIVEREF(__pyx_v_reference);
-      __Pyx_INCREF(__pyx_int_1);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
-      __Pyx_GIVEREF(__pyx_int_1);
-      __Pyx_INCREF(__pyx_v_end);
-      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end);
-      __Pyx_GIVEREF(__pyx_v_end);
-      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_v_region);
-      __pyx_v_region = ((PyObject *)__pyx_t_5);
-      __pyx_t_5 = 0;
-      goto __pyx_L4;
-    }
-
-    /* "pysam/ctabix.pyx":186
- *             elif start == None and end != None:
- *                 region = "%s:%i-%i" % (reference, 1, end)
- *             elif end == None and start != None:             # <<<<<<<<<<<<<<
- *                 region = "%s:%i-%i" % (reference, start+1, max_pos-1)
- *             else:
- */
-    __pyx_t_5 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    if (__pyx_t_3) {
-      __pyx_t_5 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_1 = __pyx_t_4;
-    } else {
-      __pyx_t_1 = __pyx_t_3;
-    }
-    if (__pyx_t_1) {
-
-      /* "pysam/ctabix.pyx":187
- *                 region = "%s:%i-%i" % (reference, 1, end)
- *             elif end == None and start != None:
- *                 region = "%s:%i-%i" % (reference, start+1, max_pos-1)             # <<<<<<<<<<<<<<
- *             else:
- *                 region = reference
- */
-      __pyx_t_5 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_2 = PyInt_FromLong((__pyx_v_max_pos - 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __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 = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_INCREF(__pyx_v_reference);
-      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_reference);
-      __Pyx_GIVEREF(__pyx_v_reference);
-      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
-      __Pyx_GIVEREF(__pyx_t_5);
-      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __pyx_t_5 = 0;
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-      __Pyx_DECREF(__pyx_v_region);
-      __pyx_v_region = ((PyObject *)__pyx_t_2);
-      __pyx_t_2 = 0;
-      goto __pyx_L4;
-    }
-    /*else*/ {
-
-      /* "pysam/ctabix.pyx":189
- *                 region = "%s:%i-%i" % (reference, start+1, max_pos-1)
- *             else:
- *                 region = reference             # <<<<<<<<<<<<<<
- * 
- *         if region:
- */
-      __Pyx_INCREF(__pyx_v_reference);
-      __Pyx_DECREF(__pyx_v_region);
-      __pyx_v_region = __pyx_v_reference;
-    }
-    __pyx_L4:;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/ctabix.pyx":191
- *                 region = reference
- * 
- *         if region:             # <<<<<<<<<<<<<<
- *             region = _force_bytes(region)
- *             ti_parse_region( self.tabixfile.idx, region,
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "pysam/ctabix.pyx":192
- * 
- *         if region:
- *             region = _force_bytes(region)             # <<<<<<<<<<<<<<
- *             ti_parse_region( self.tabixfile.idx, region,
- *                              &rtid, &rstart, &rend)
- */
-    __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_region)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_v_region);
-    __pyx_v_region = __pyx_t_2;
-    __pyx_t_2 = 0;
-
-    /* "pysam/ctabix.pyx":193
- *         if region:
- *             region = _force_bytes(region)
- *             ti_parse_region( self.tabixfile.idx, region,             # <<<<<<<<<<<<<<
- *                              &rtid, &rstart, &rend)
- *             if rtid < 0: raise KeyError( reference )
- */
-    __pyx_t_7 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-    /* "pysam/ctabix.pyx":194
- *             region = _force_bytes(region)
- *             ti_parse_region( self.tabixfile.idx, region,
- *                              &rtid, &rstart, &rend)             # <<<<<<<<<<<<<<
- *             if rtid < 0: raise KeyError( reference )
- *             if rstart > rend: raise ValueError( 'invalid region: start (%i) > end (%i)' % (rstart, rend) )
- */
-    ti_parse_region(__pyx_v_self->tabixfile->idx, __pyx_t_7, (&__pyx_v_rtid), (&__pyx_v_rstart), (&__pyx_v_rend));
-
-    /* "pysam/ctabix.pyx":195
- *             ti_parse_region( self.tabixfile.idx, region,
- *                              &rtid, &rstart, &rend)
- *             if rtid < 0: raise KeyError( reference )             # <<<<<<<<<<<<<<
- *             if rstart > rend: raise ValueError( 'invalid region: start (%i) > end (%i)' % (rstart, rend) )
- *             if not 0 <= rstart < max_pos: raise IndexError( 'start out of range (%i)' % rstart )
- */
-    __pyx_t_1 = (__pyx_v_rtid < 0);
-    if (__pyx_t_1) {
-      __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_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(__pyx_v_reference);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference);
-      __Pyx_GIVEREF(__pyx_v_reference);
-      __pyx_t_6 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-
-    /* "pysam/ctabix.pyx":196
- *                              &rtid, &rstart, &rend)
- *             if rtid < 0: raise KeyError( reference )
- *             if rstart > rend: raise ValueError( 'invalid region: start (%i) > end (%i)' % (rstart, rend) )             # <<<<<<<<<<<<<<
- *             if not 0 <= rstart < max_pos: raise IndexError( 'start out of range (%i)' % rstart )
- *             if not 0 <= rend < max_pos: raise IndexError( 'end out of range (%i)' % rend )
- */
-    __pyx_t_1 = (__pyx_v_rstart > __pyx_v_rend);
-    if (__pyx_t_1) {
-      __pyx_t_6 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_2 = PyInt_FromLong(__pyx_v_rend); 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_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
-      __Pyx_GIVEREF(__pyx_t_6);
-      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __pyx_t_6 = 0;
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __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 = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      PyTuple_SET_ITEM(__pyx_t_5, 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_5), NULL); 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(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L7;
-    }
-    __pyx_L7:;
-
-    /* "pysam/ctabix.pyx":197
- *             if rtid < 0: raise KeyError( reference )
- *             if rstart > rend: raise ValueError( 'invalid region: start (%i) > end (%i)' % (rstart, rend) )
- *             if not 0 <= rstart < max_pos: raise IndexError( 'start out of range (%i)' % rstart )             # <<<<<<<<<<<<<<
- *             if not 0 <= rend < max_pos: raise IndexError( 'end out of range (%i)' % rend )
- * 
- */
-    __pyx_t_1 = (0 <= __pyx_v_rstart);
-    if (__pyx_t_1) {
-      __pyx_t_1 = (__pyx_v_rstart < __pyx_v_max_pos);
-    }
-    __pyx_t_3 = (!__pyx_t_1);
-    if (__pyx_t_3) {
-      __pyx_t_2 = PyInt_FromLong(__pyx_v_rstart); 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_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __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 = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-      __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L8;
-    }
-    __pyx_L8:;
-
-    /* "pysam/ctabix.pyx":198
- *             if rstart > rend: raise ValueError( 'invalid region: start (%i) > end (%i)' % (rstart, rend) )
- *             if not 0 <= rstart < max_pos: raise IndexError( 'start out of range (%i)' % rstart )
- *             if not 0 <= rend < max_pos: raise IndexError( 'end out of range (%i)' % rend )             # <<<<<<<<<<<<<<
- * 
- *         return region, rtid, rstart, rend
- */
-    __pyx_t_3 = (0 <= __pyx_v_rend);
-    if (__pyx_t_3) {
-      __pyx_t_3 = (__pyx_v_rend < __pyx_v_max_pos);
-    }
-    __pyx_t_1 = (!__pyx_t_3);
-    if (__pyx_t_1) {
-      __pyx_t_5 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_20), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __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 = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L9;
-    }
-    __pyx_L9:;
-    goto __pyx_L5;
-  }
-  __pyx_L5:;
-
-  /* "pysam/ctabix.pyx":200
- *             if not 0 <= rend < max_pos: raise IndexError( 'end out of range (%i)' % rend )
- * 
- *         return region, rtid, rstart, rend             # <<<<<<<<<<<<<<
- * 
- *     def fetch( self,
+  /* "pysam/ctabix.pyx":234
+ *     parsed data (see for example :meth:`asTuple` and :meth:`asGTF`).
+ *     '''
+ *     def __cinit__(self, filename, mode = 'r',             # <<<<<<<<<<<<<<
+ *                   parser=None,
+ *                   index=None,
  */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = PyInt_FromLong(__pyx_v_rtid); 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_5 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); 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);
-  __pyx_t_8 = PyTuple_New(4); 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_INCREF(__pyx_v_region);
-  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_region);
-  __Pyx_GIVEREF(__pyx_v_region);
-  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
-  __Pyx_GIVEREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_6);
-  __Pyx_GIVEREF(__pyx_t_6);
-  __pyx_t_2 = 0;
-  __pyx_t_5 = 0;
-  __pyx_t_6 = 0;
-  __pyx_r = ((PyObject *)__pyx_t_8);
-  __pyx_t_8 = 0;
-  goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  /* function exit code */
+  __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_region);
-  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":244
+ *         self._open( filename, mode, index, *args, **kwargs )
+ * 
+ *     def _open( self,             # <<<<<<<<<<<<<<
+ *                filename,
+ *                mode ='r',
+ */
+
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_9fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_9Tabixfile_8fetch[] = "Tabixfile.fetch(self, reference=None, start=None, end=None, region=None, parser=None)\n\n               \n        fetch one or more rows in a :term:`region` using 0-based indexing. The region is specified by\n        :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can be supplied.\n\n        Without *reference* or *region* all entries will be fetched. \n        \n        If only *reference*  [...]
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_9fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  PyObject *__pyx_v_reference = 0;
-  PyObject *__pyx_v_start = 0;
-  PyObject *__pyx_v_end = 0;
-  PyObject *__pyx_v_region = 0;
-  PyObject *__pyx_v_parser = 0;
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_3_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_9Tabixfile_2_open[] = "Tabixfile._open(self, filename, mode='r', index=None)\nopen a :term:`tabix file` for reading.\n        ";
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_3_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_filename = 0;
+  PyObject *__pyx_v_mode = 0;
+  PyObject *__pyx_v_index = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
+  __Pyx_RefNannySetupContext("_open (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,&__pyx_n_s__parser,0};
-    PyObject* values[5] = {0,0,0,0,0};
-
-    /* "pysam/ctabix.pyx":203
- * 
- *     def fetch( self,
- *                reference = None,             # <<<<<<<<<<<<<<
- *                start = None,
- *                end = None,
- */
-    values[0] = ((PyObject *)Py_None);
-
-    /* "pysam/ctabix.pyx":204
- *     def fetch( self,
- *                reference = None,
- *                start = None,             # <<<<<<<<<<<<<<
- *                end = None,
- *                region = None,
- */
-    values[1] = ((PyObject *)Py_None);
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_index,0};
+    PyObject* values[3] = {0,0,0};
+    values[1] = ((PyObject *)__pyx_n_s_r);
 
-    /* "pysam/ctabix.pyx":205
- *                reference = None,
- *                start = None,
- *                end = None,             # <<<<<<<<<<<<<<
- *                region = None,
- *                parser = None ):
+    /* "pysam/ctabix.pyx":247
+ *                filename,
+ *                mode ='r',
+ *                index = None,             # <<<<<<<<<<<<<<
+ *               ):
+ *         '''open a :term:`tabix file` for reading.
  */
     values[2] = ((PyObject *)Py_None);
-
-    /* "pysam/ctabix.pyx":206
- *                start = None,
- *                end = None,
- *                region = None,             # <<<<<<<<<<<<<<
- *                parser = None ):
- *         '''
- */
-    values[3] = ((PyObject *)Py_None);
-
-    /* "pysam/ctabix.pyx":207
- *                end = None,
- *                region = None,
- *                parser = None ):             # <<<<<<<<<<<<<<
- *         '''
- * 
- */
-    values[4] = ((PyObject *)Py_None);
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
       switch (pos_args) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
@@ -3505,592 +3230,1943 @@ static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_9fetch(PyObject *__pyx_v_sel
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
-          if (value) { values[0] = value; kw_args--; }
-        }
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
         case  1:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
           if (value) { values[1] = value; kw_args--; }
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index);
           if (value) { values[2] = value; kw_args--; }
         }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
-          if (value) { values[3] = value; kw_args--; }
-        }
-        case  4:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser);
-          if (value) { values[4] = value; kw_args--; }
-        }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
+        break;
         default: goto __pyx_L5_argtuple_error;
       }
     }
-    __pyx_v_reference = values[0];
-    __pyx_v_start = values[1];
-    __pyx_v_end = values[2];
-    __pyx_v_region = values[3];
-    __pyx_v_parser = values[4];
+    __pyx_v_filename = values[0];
+    __pyx_v_mode = values[1];
+    __pyx_v_index = values[2];
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_8fetch(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_parser);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_2_open(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_index);
 
-/* "pysam/ctabix.pyx":202
- *         return region, rtid, rstart, rend
+  /* "pysam/ctabix.pyx":244
+ *         self._open( filename, mode, index, *args, **kwargs )
  * 
- *     def fetch( self,             # <<<<<<<<<<<<<<
- *                reference = None,
- *                start = None,
+ *     def _open( self,             # <<<<<<<<<<<<<<
+ *                filename,
+ *                mode ='r',
  */
 
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_8fetch(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_parser) {
-  PyObject *__pyx_v_rtid = NULL;
-  PyObject *__pyx_v_rstart = NULL;
-  PyObject *__pyx_v_rend = NULL;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_2_open(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_index) {
+  PyObject *__pyx_v_filename_index = NULL;
+  CYTHON_UNUSED PyObject *__pyx_v_bmode = 0;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
-  PyObject *__pyx_t_7 = NULL;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *(*__pyx_t_9)(PyObject *);
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  char const *__pyx_t_6;
+  int __pyx_t_7;
+  char const *__pyx_t_8;
+  char *__pyx_t_9;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("fetch", 0);
-  __Pyx_INCREF(__pyx_v_region);
-  __Pyx_INCREF(__pyx_v_parser);
+  __Pyx_RefNannySetupContext("_open", 0);
+  __Pyx_INCREF(__pyx_v_filename);
 
-  /* "pysam/ctabix.pyx":219
- *         If *parser* is None, the default parser will be used for parsing.
+  /* "pysam/ctabix.pyx":252
  *         '''
- *         ti_lazy_index_load( self.tabixfile )             # <<<<<<<<<<<<<<
  * 
- *         if not self._isOpen():
+ *         assert mode in ( "r",), "invalid file opening mode `%s`" % mode             # <<<<<<<<<<<<<<
+ * 
+ *         if self.tabixfile != NULL:
  */
-  ti_lazy_index_load(__pyx_v_self->tabixfile);
+  #ifndef CYTHON_WITHOUT_ASSERTIONS
+  if (unlikely(!Py_OptimizeFlag)) {
+    __Pyx_INCREF(__pyx_v_mode);
+    __pyx_t_1 = __pyx_v_mode;
+    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_r, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (unlikely(!(__pyx_t_2 != 0))) {
+      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_invalid_file_opening_mode_s, __pyx_v_mode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyErr_SetObject(PyExc_AssertionError, __pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
 
-  /* "pysam/ctabix.pyx":221
- *         ti_lazy_index_load( self.tabixfile )
- * 
- *         if not self._isOpen():             # <<<<<<<<<<<<<<
- *             raise ValueError( "I/O operation on closed file" )
+  /* "pysam/ctabix.pyx":254
+ *         assert mode in ( "r",), "invalid file opening mode `%s`" % mode
  * 
+ *         if self.tabixfile != NULL:             # <<<<<<<<<<<<<<
+ *             self.close()
+ *         self.tabixfile = NULL
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __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 = 221; __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 = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
+  __pyx_t_2 = ((__pyx_v_self->tabixfile != NULL) != 0);
+  if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":222
- * 
- *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+    /* "pysam/ctabix.pyx":255
+ * 
+ *         if self.tabixfile != NULL:
+ *             self.close()             # <<<<<<<<<<<<<<
+ *         self.tabixfile = NULL
  * 
- *         # the following will raise errors for invalid regions
  */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __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_3); __pyx_t_3 = 0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":225
+  /* "pysam/ctabix.pyx":256
+ *         if self.tabixfile != NULL:
+ *             self.close()
+ *         self.tabixfile = NULL             # <<<<<<<<<<<<<<
+ * 
+ *         filename_index = index or (filename + ".tbi")
+ */
+  __pyx_v_self->tabixfile = NULL;
+
+  /* "pysam/ctabix.pyx":258
+ *         self.tabixfile = NULL
  * 
- *         # the following will raise errors for invalid regions
- *         region, rtid, rstart, rend = self._parseRegion( reference, start, end, region )             # <<<<<<<<<<<<<<
+ *         filename_index = index or (filename + ".tbi")             # <<<<<<<<<<<<<<
+ *         self.isremote = filename.startswith("http:") or filename.startswith("ftp:")
  * 
- *         # use default parser if no parser is specified
  */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_2) {
+    __pyx_t_3 = PyNumber_Add(__pyx_v_filename, __pyx_kp_s_tbi); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = __pyx_t_3;
+    __pyx_t_3 = 0;
+  } else {
+    __Pyx_INCREF(__pyx_v_index);
+    __pyx_t_1 = __pyx_v_index;
+  }
+  __pyx_v_filename_index = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "pysam/ctabix.pyx":259
+ * 
+ *         filename_index = index or (filename + ".tbi")
+ *         self.isremote = filename.startswith("http:") or filename.startswith("ftp:")             # <<<<<<<<<<<<<<
+ * 
+ *         # encode all the strings
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_v_reference);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
-  __Pyx_GIVEREF(__pyx_v_reference);
-  __Pyx_INCREF(__pyx_v_start);
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
-  __Pyx_GIVEREF(__pyx_v_start);
-  __Pyx_INCREF(__pyx_v_end);
-  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
-  __Pyx_GIVEREF(__pyx_v_end);
-  __Pyx_INCREF(__pyx_v_region);
-  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
-  __Pyx_GIVEREF(__pyx_v_region);
-  __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 = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
-    PyObject* sequence = __pyx_t_5;
-    #if CYTHON_COMPILING_IN_CPYTHON
-    Py_ssize_t size = Py_SIZE(sequence);
-    #else
-    Py_ssize_t size = PySequence_Size(sequence);
-    #endif
-    if (unlikely(size != 4)) {
-      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
-      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely(PyTuple_CheckExact(sequence))) {
-      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
-      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
-      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
-      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
-    } else {
-      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
-      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
-      __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
-      __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
-    }
-    __Pyx_INCREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_t_2);
-    __Pyx_INCREF(__pyx_t_6);
-    __Pyx_INCREF(__pyx_t_7);
-    #else
-    Py_ssize_t i;
-    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
-    for (i=0; i < 4; i++) {
-      PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(item);
-      *(temps[i]) = item;
-    }
-    #endif
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  } else
-  {
-    Py_ssize_t index = -1;
-    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
-    __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
-    for (index=0; index < 4; index++) {
-      PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
-      __Pyx_GOTREF(item);
-      *(temps[index]) = item;
-    }
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_9 = NULL;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    goto __pyx_L5_unpacking_done;
-    __pyx_L4_unpacking_failed:;
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_9 = NULL;
-    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_L5_unpacking_done:;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_2) {
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __pyx_t_4;
+    __pyx_t_4 = 0;
+  } else {
+    __pyx_t_1 = __pyx_t_3;
+    __pyx_t_3 = 0;
   }
-  __Pyx_DECREF(__pyx_v_region);
-  __pyx_v_region = __pyx_t_1;
+  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_self->isremote = __pyx_t_5;
+
+  /* "pysam/ctabix.pyx":262
+ * 
+ *         # encode all the strings
+ *         filename = _encodeFilename(filename)             # <<<<<<<<<<<<<<
+ *         filename_index = _encodeFilename(filename_index)
+ *         cdef bytes bmode = mode.encode('ascii')
+ */
+  __pyx_t_1 = __pyx_f_5pysam_6ctabix__encodeFilename(__pyx_v_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
   __pyx_t_1 = 0;
-  __pyx_v_rtid = __pyx_t_2;
-  __pyx_t_2 = 0;
-  __pyx_v_rstart = __pyx_t_6;
-  __pyx_t_6 = 0;
-  __pyx_v_rend = __pyx_t_7;
-  __pyx_t_7 = 0;
 
-  /* "pysam/ctabix.pyx":228
+  /* "pysam/ctabix.pyx":263
+ *         # encode all the strings
+ *         filename = _encodeFilename(filename)
+ *         filename_index = _encodeFilename(filename_index)             # <<<<<<<<<<<<<<
+ *         cdef bytes bmode = mode.encode('ascii')
  * 
- *         # use default parser if no parser is specified
- *         if parser == None: parser = self.parser             # <<<<<<<<<<<<<<
+ */
+  __pyx_t_1 = __pyx_f_5pysam_6ctabix__encodeFilename(__pyx_v_filename_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_filename_index, __pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/ctabix.pyx":264
+ *         filename = _encodeFilename(filename)
+ *         filename_index = _encodeFilename(filename_index)
+ *         cdef bytes bmode = mode.encode('ascii')             # <<<<<<<<<<<<<<
  * 
- *         if parser == None:
+ *         if self._filename != NULL: free(self._filename )
  */
-  __pyx_t_5 = PyObject_RichCompare(__pyx_v_parser, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  if (__pyx_t_4) {
-    __pyx_t_5 = ((PyObject *)__pyx_v_self->parser);
-    __Pyx_INCREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_v_parser);
-    __pyx_v_parser = __pyx_t_5;
-    __pyx_t_5 = 0;
-    goto __pyx_L6;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mode, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_bmode = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "pysam/ctabix.pyx":266
+ *         cdef bytes bmode = mode.encode('ascii')
+ * 
+ *         if self._filename != NULL: free(self._filename )             # <<<<<<<<<<<<<<
+ * 
+ *         self._filename = strdup(filename)
+ */
+  __pyx_t_2 = ((__pyx_v_self->_filename != NULL) != 0);
+  if (__pyx_t_2) {
+    free(__pyx_v_self->_filename);
+    goto __pyx_L4;
   }
-  __pyx_L6:;
+  __pyx_L4:;
 
-  /* "pysam/ctabix.pyx":230
- *         if parser == None: parser = self.parser
+  /* "pysam/ctabix.pyx":268
+ *         if self._filename != NULL: free(self._filename )
+ * 
+ *         self._filename = strdup(filename)             # <<<<<<<<<<<<<<
  * 
- *         if parser == None:             # <<<<<<<<<<<<<<
- *             if region:
- *                 return TabixIterator( self, rtid, rstart, rend )
+ *         if mode[0] == 'w':
  */
-  __pyx_t_5 = PyObject_RichCompare(__pyx_v_parser, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  if (__pyx_t_4) {
+  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_filename = strdup(__pyx_t_6);
 
-    /* "pysam/ctabix.pyx":231
+  /* "pysam/ctabix.pyx":270
+ *         self._filename = strdup(filename)
  * 
- *         if parser == None:
- *             if region:             # <<<<<<<<<<<<<<
- *                 return TabixIterator( self, rtid, rstart, rend )
- *             else:
+ *         if mode[0] == 'w':             # <<<<<<<<<<<<<<
+ *             # open file for writing
+ *             raise NotImplementedError("writing to tabix files not implemented" )
  */
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_4) {
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_2) {
 
-      /* "pysam/ctabix.pyx":232
- *         if parser == None:
- *             if region:
- *                 return TabixIterator( self, rtid, rstart, rend )             # <<<<<<<<<<<<<<
- *             else:
- *                 return TabixIterator( self, -1, 0, 0 )
+    /* "pysam/ctabix.pyx":272
+ *         if mode[0] == 'w':
+ *             # open file for writing
+ *             raise NotImplementedError("writing to tabix files not implemented" )             # <<<<<<<<<<<<<<
+ * 
+ *         if mode[0] != "r":
  */
-      __Pyx_XDECREF(__pyx_r);
-      __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_INCREF(((PyObject *)__pyx_v_self));
-      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self));
-      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-      __Pyx_INCREF(__pyx_v_rtid);
-      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_rtid);
-      __Pyx_GIVEREF(__pyx_v_rtid);
-      __Pyx_INCREF(__pyx_v_rstart);
-      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_rstart);
-      __Pyx_GIVEREF(__pyx_v_rstart);
-      __Pyx_INCREF(__pyx_v_rend);
-      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_rend);
-      __Pyx_GIVEREF(__pyx_v_rend);
-      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_TabixIterator)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-      __pyx_r = __pyx_t_7;
-      __pyx_t_7 = 0;
-      goto __pyx_L0;
-      goto __pyx_L8;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/ctabix.pyx":274
+ *             raise NotImplementedError("writing to tabix files not implemented" )
+ * 
+ *         if mode[0] != "r":             # <<<<<<<<<<<<<<
+ *             raise ValueError("invalid mode '%s'" % mode)
+ *             # open file for reading
+ */
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_r, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_2) {
+
+    /* "pysam/ctabix.pyx":275
+ * 
+ *         if mode[0] != "r":
+ *             raise ValueError("invalid mode '%s'" % mode)             # <<<<<<<<<<<<<<
+ *             # open file for reading
+ * 
+ */
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_invalid_mode_s, __pyx_v_mode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __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 = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/ctabix.pyx":278
+ *             # open file for reading
+ * 
+ *         if not self.isremote:             # <<<<<<<<<<<<<<
+ *             if not os.path.exists(filename):
+ *                 raise IOError("file `%s` not found" % filename)
+ */
+  __pyx_t_2 = ((!(__pyx_v_self->isremote != 0)) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/ctabix.pyx":279
+ * 
+ *         if not self.isremote:
+ *             if not os.path.exists(filename):             # <<<<<<<<<<<<<<
+ *                 raise IOError("file `%s` not found" % filename)
+ * 
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_filename);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
+    __Pyx_GIVEREF(__pyx_v_filename);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __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_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 = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_7 = ((!__pyx_t_2) != 0);
+    if (__pyx_t_7) {
+
+      /* "pysam/ctabix.pyx":280
+ *         if not self.isremote:
+ *             if not os.path.exists(filename):
+ *                 raise IOError("file `%s` not found" % filename)             # <<<<<<<<<<<<<<
+ * 
+ *             if not os.path.exists( filename_index ):
+ */
+      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_file_s_not_found, __pyx_v_filename); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __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 = 280; __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_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    /*else*/ {
 
-      /* "pysam/ctabix.pyx":234
- *                 return TabixIterator( self, rtid, rstart, rend )
- *             else:
- *                 return TabixIterator( self, -1, 0, 0 )             # <<<<<<<<<<<<<<
- *         else:
- *             if region:
+    /* "pysam/ctabix.pyx":282
+ *                 raise IOError("file `%s` not found" % filename)
+ * 
+ *             if not os.path.exists( filename_index ):             # <<<<<<<<<<<<<<
+ *                 raise IOError("index `%s` not found" % filename_index)
+ * 
  */
-      __Pyx_XDECREF(__pyx_r);
-      __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_INCREF(((PyObject *)__pyx_v_self));
-      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));
-      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-      __Pyx_INCREF(__pyx_int_neg_1);
-      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_neg_1);
-      __Pyx_GIVEREF(__pyx_int_neg_1);
-      __Pyx_INCREF(__pyx_int_0);
-      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_0);
-      __Pyx_GIVEREF(__pyx_int_0);
-      __Pyx_INCREF(__pyx_int_0);
-      PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_0);
-      __Pyx_GIVEREF(__pyx_int_0);
-      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_TabixIterator)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __pyx_r = __pyx_t_5;
-      __pyx_t_5 = 0;
-      goto __pyx_L0;
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exists); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_filename_index);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename_index);
+    __Pyx_GIVEREF(__pyx_v_filename_index);
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __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_1); __pyx_t_1 = 0;
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_2 = ((!__pyx_t_7) != 0);
+    if (__pyx_t_2) {
+
+      /* "pysam/ctabix.pyx":283
+ * 
+ *             if not os.path.exists( filename_index ):
+ *                 raise IOError("index `%s` not found" % filename_index)             # <<<<<<<<<<<<<<
+ * 
+ *         # open file
+ */
+      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_index_s_not_found, __pyx_v_filename_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __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 = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L8:;
     goto __pyx_L7;
   }
-  /*else*/ {
+  __pyx_L7:;
 
-    /* "pysam/ctabix.pyx":236
- *                 return TabixIterator( self, -1, 0, 0 )
- *         else:
- *             if region:             # <<<<<<<<<<<<<<
- *                 return TabixIteratorParsed( self, rtid, rstart,
- *                                             rend, parser )
+  /* "pysam/ctabix.pyx":286
+ * 
+ *         # open file
+ *         self.tabixfile = hts_open(filename, 'r')             # <<<<<<<<<<<<<<
+ *         if self.tabixfile == NULL:
+ *             raise IOError("could not open file `%s`" % filename)
+ */
+  __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->tabixfile = hts_open(__pyx_t_8, __pyx_k_r);
+
+  /* "pysam/ctabix.pyx":287
+ *         # open file
+ *         self.tabixfile = hts_open(filename, 'r')
+ *         if self.tabixfile == NULL:             # <<<<<<<<<<<<<<
+ *             raise IOError("could not open file `%s`" % filename)
+ * 
+ */
+  __pyx_t_2 = ((__pyx_v_self->tabixfile == NULL) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/ctabix.pyx":288
+ *         self.tabixfile = hts_open(filename, 'r')
+ *         if self.tabixfile == NULL:
+ *             raise IOError("could not open file `%s`" % filename)             # <<<<<<<<<<<<<<
+ * 
+ *         self.index = tbx_index_load(filename_index)
+ */
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_could_not_open_file_s, __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __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 = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/ctabix.pyx":290
+ *             raise IOError("could not open file `%s`" % filename)
+ * 
+ *         self.index = tbx_index_load(filename_index)             # <<<<<<<<<<<<<<
+ *         if self.index == NULL:
+ *             raise IOError("could not open index for `%s`" % filename)
+ */
+  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_filename_index); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->index = tbx_index_load(__pyx_t_9);
+
+  /* "pysam/ctabix.pyx":291
+ * 
+ *         self.index = tbx_index_load(filename_index)
+ *         if self.index == NULL:             # <<<<<<<<<<<<<<
+ *             raise IOError("could not open index for `%s`" % filename)
+ * 
+ */
+  __pyx_t_2 = ((__pyx_v_self->index == NULL) != 0);
+  if (__pyx_t_2) {
+
+    /* "pysam/ctabix.pyx":292
+ *         self.index = tbx_index_load(filename_index)
+ *         if self.index == NULL:
+ *             raise IOError("could not open index for `%s`" % filename)             # <<<<<<<<<<<<<<
+ * 
+ *     def _isOpen( self ):
+ */
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_could_not_open_index_for_s, __pyx_v_filename); 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_t_1 = PyTuple_New(1); 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);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, 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_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/ctabix.pyx":244
+ *         self._open( filename, mode, index, *args, **kwargs )
+ * 
+ *     def _open( self,             # <<<<<<<<<<<<<<
+ *                filename,
+ *                mode ='r',
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_filename_index);
+  __Pyx_XDECREF(__pyx_v_bmode);
+  __Pyx_XDECREF(__pyx_v_filename);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":294
+ *             raise IOError("could not open index for `%s`" % filename)
+ * 
+ *     def _isOpen( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if samfile has been opened.'''
+ *         return self.tabixfile != NULL
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_5_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_9Tabixfile_4_isOpen[] = "Tabixfile._isOpen(self)\nreturn true if samfile has been opened.";
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_5_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_4_isOpen(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_4_isOpen(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_isOpen", 0);
+
+  /* "pysam/ctabix.pyx":296
+ *     def _isOpen( self ):
+ *         '''return true if samfile has been opened.'''
+ *         return self.tabixfile != NULL             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->tabixfile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/ctabix.pyx":294
+ *             raise IOError("could not open index for `%s`" % filename)
+ * 
+ *     def _isOpen( self ):             # <<<<<<<<<<<<<<
+ *         '''return true if samfile has been opened.'''
+ *         return self.tabixfile != NULL
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":299
+ * 
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_7fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_9Tabixfile_6fetch[] = "Tabixfile.fetch(self, reference=None, start=None, end=None, region=None, parser=None)\nfetch one or more rows in a :term:`region` using 0-based\n        indexing. The region is specified by :term:`reference`,\n        *start* and *end*. Alternatively, a samtools :term:`region`\n        string can be supplied.\n\n        Without *reference* or *region* all entries will be fetched. \n        \n        If only *reference* is set, a [...]
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_7fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_reference = 0;
+  PyObject *__pyx_v_start = 0;
+  PyObject *__pyx_v_end = 0;
+  PyObject *__pyx_v_region = 0;
+  PyObject *__pyx_v_parser = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,&__pyx_n_s_parser,0};
+    PyObject* values[5] = {0,0,0,0,0};
+
+    /* "pysam/ctabix.pyx":300
+ * 
+ *     def fetch(self,
+ *               reference=None,             # <<<<<<<<<<<<<<
+ *               start=None,
+ *               end=None,
+ */
+    values[0] = ((PyObject *)Py_None);
+
+    /* "pysam/ctabix.pyx":301
+ *     def fetch(self,
+ *               reference=None,
+ *               start=None,             # <<<<<<<<<<<<<<
+ *               end=None,
+ *               region=None,
+ */
+    values[1] = ((PyObject *)Py_None);
+
+    /* "pysam/ctabix.pyx":302
+ *               reference=None,
+ *               start=None,
+ *               end=None,             # <<<<<<<<<<<<<<
+ *               region=None,
+ *               parser=None):
+ */
+    values[2] = ((PyObject *)Py_None);
+
+    /* "pysam/ctabix.pyx":303
+ *               start=None,
+ *               end=None,
+ *               region=None,             # <<<<<<<<<<<<<<
+ *               parser=None):
+ *         '''fetch one or more rows in a :term:`region` using 0-based
+ */
+    values[3] = ((PyObject *)Py_None);
+
+    /* "pysam/ctabix.pyx":304
+ *               end=None,
+ *               region=None,
+ *               parser=None):             # <<<<<<<<<<<<<<
+ *         '''fetch one or more rows in a :term:`region` using 0-based
+ *         indexing. The region is specified by :term:`reference`,
+ */
+    values[4] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference);
+          if (value) { values[0] = value; kw_args--; }
+        }
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser);
+          if (value) { values[4] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_reference = values[0];
+    __pyx_v_start = values[1];
+    __pyx_v_end = values[2];
+    __pyx_v_region = values[3];
+    __pyx_v_parser = values[4];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_6fetch(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_parser);
+
+  /* "pysam/ctabix.pyx":299
+ * 
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_6fetch(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_parser) {
+  hts_itr_t *__pyx_v_iter;
+  struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_a = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  char *__pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("fetch", 0);
+  __Pyx_INCREF(__pyx_v_start);
+  __Pyx_INCREF(__pyx_v_region);
+  __Pyx_INCREF(__pyx_v_parser);
+
+  /* "pysam/ctabix.pyx":318
+ *         parsing.
+ *         '''
+ *         if not self._isOpen():             # <<<<<<<<<<<<<<
+ *             raise ValueError("I/O operation on closed file")
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __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 = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/ctabix.pyx":319
+ *         '''
+ *         if not self._isOpen():
+ *             raise ValueError("I/O operation on closed file")             # <<<<<<<<<<<<<<
+ * 
+ *         # convert coordinates to region string
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, 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_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/ctabix.pyx":322
+ * 
+ *         # convert coordinates to region string
+ *         if reference:             # <<<<<<<<<<<<<<
+ *             if end is not None:
+ *                 if start is None:
+ */
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+
+    /* "pysam/ctabix.pyx":323
+ *         # convert coordinates to region string
+ *         if reference:
+ *             if end is not None:             # <<<<<<<<<<<<<<
+ *                 if start is None:
+ *                     start = 0
+ */
+    __pyx_t_4 = (__pyx_v_end != Py_None);
+    __pyx_t_3 = (__pyx_t_4 != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/ctabix.pyx":324
+ *         if reference:
+ *             if end is not None:
+ *                 if start is None:             # <<<<<<<<<<<<<<
+ *                     start = 0
+ *                 region = '%s:%i-%i' % (reference, start + 1, end)
+ */
+      __pyx_t_3 = (__pyx_v_start == Py_None);
+      __pyx_t_4 = (__pyx_t_3 != 0);
+      if (__pyx_t_4) {
+
+        /* "pysam/ctabix.pyx":325
+ *             if end is not None:
+ *                 if start is None:
+ *                     start = 0             # <<<<<<<<<<<<<<
+ *                 region = '%s:%i-%i' % (reference, start + 1, end)
+ *                 if start > end:
+ */
+        __Pyx_INCREF(__pyx_int_0);
+        __Pyx_DECREF_SET(__pyx_v_start, __pyx_int_0);
+        goto __pyx_L6;
+      }
+      __pyx_L6:;
+
+      /* "pysam/ctabix.pyx":326
+ *                 if start is None:
+ *                     start = 0
+ *                 region = '%s:%i-%i' % (reference, start + 1, end)             # <<<<<<<<<<<<<<
+ *                 if start > end:
+ *                     raise ValueError(
+ */
+      __pyx_t_2 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_v_reference);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
+      __Pyx_GIVEREF(__pyx_v_reference);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_end);
+      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
+      __Pyx_GIVEREF(__pyx_v_end);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_i_i, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "pysam/ctabix.pyx":327
+ *                     start = 0
+ *                 region = '%s:%i-%i' % (reference, start + 1, end)
+ *                 if start > end:             # <<<<<<<<<<<<<<
+ *                     raise ValueError(
+ *                         'start (%i) > end (%i)' % (start, end))
+ */
+      __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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 = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_4) {
+
+        /* "pysam/ctabix.pyx":329
+ *                 if start > end:
+ *                     raise ValueError(
+ *                         'start (%i) > end (%i)' % (start, end))             # <<<<<<<<<<<<<<
+ *             elif start is not None:
+ *                 region = '%s:%i' % (reference, start + 1)
+ */
+        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_INCREF(__pyx_v_start);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_start);
+        __Pyx_GIVEREF(__pyx_v_start);
+        __Pyx_INCREF(__pyx_v_end);
+        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_end);
+        __Pyx_GIVEREF(__pyx_v_end);
+        __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_start_i_end_i, __pyx_t_2); 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_2); __pyx_t_2 = 0;
+
+        /* "pysam/ctabix.pyx":328
+ *                 region = '%s:%i-%i' % (reference, start + 1, end)
+ *                 if start > end:
+ *                     raise ValueError(             # <<<<<<<<<<<<<<
+ *                         'start (%i) > end (%i)' % (start, end))
+ *             elif start is not None:
+ */
+        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L5;
+    }
+
+    /* "pysam/ctabix.pyx":330
+ *                     raise ValueError(
+ *                         'start (%i) > end (%i)' % (start, end))
+ *             elif start is not None:             # <<<<<<<<<<<<<<
+ *                 region = '%s:%i' % (reference, start + 1)
+ *             else:
+ */
+    __pyx_t_4 = (__pyx_v_start != Py_None);
+    __pyx_t_3 = (__pyx_t_4 != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/ctabix.pyx":331
+ *                         'start (%i) > end (%i)' % (start, end))
+ *             elif start is not None:
+ *                 region = '%s:%i' % (reference, start + 1)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 region = reference
+ */
+      __pyx_t_1 = PyNumber_Add(__pyx_v_start, __pyx_int_1); 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 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_reference);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference);
+      __Pyx_GIVEREF(__pyx_v_reference);
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_i, __pyx_t_2); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_1);
+      __pyx_t_1 = 0;
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "pysam/ctabix.pyx":333
+ *                 region = '%s:%i' % (reference, start + 1)
+ *             else:
+ *                 region = reference             # <<<<<<<<<<<<<<
+ * 
+ *         # get iterator
+ */
+      __Pyx_INCREF(__pyx_v_reference);
+      __Pyx_DECREF_SET(__pyx_v_region, __pyx_v_reference);
+    }
+    __pyx_L5:;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "pysam/ctabix.pyx":337
+ *         # get iterator
+ *         cdef hts_itr_t * iter
+ *         if region is None:             # <<<<<<<<<<<<<<
+ *             # without region or reference - iterate from start
+ *             iter = tbx_itr_queryi(self.index,
+ */
+  __pyx_t_3 = (__pyx_v_region == Py_None);
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/ctabix.pyx":339
+ *         if region is None:
+ *             # without region or reference - iterate from start
+ *             iter = tbx_itr_queryi(self.index,             # <<<<<<<<<<<<<<
+ *                                   HTS_IDX_START,
+ *                                   0,
+ */
+    __pyx_v_iter = tbx_itr_queryi(__pyx_v_self->index, HTS_IDX_START, 0, 0);
+    goto __pyx_L8;
+  }
+  /*else*/ {
+
+    /* "pysam/ctabix.pyx":345
+ *         else:
+ *             iter = tbx_itr_querys(self.index,
+ *                                   region)             # <<<<<<<<<<<<<<
+ * 
+ *         if iter == NULL:
+ */
+    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/ctabix.pyx":344
+ *                                   0)
+ *         else:
+ *             iter = tbx_itr_querys(self.index,             # <<<<<<<<<<<<<<
+ *                                   region)
+ * 
+ */
+    __pyx_v_iter = tbx_itr_querys(__pyx_v_self->index, __pyx_t_5);
+  }
+  __pyx_L8:;
+
+  /* "pysam/ctabix.pyx":347
+ *                                   region)
+ * 
+ *         if iter == NULL:             # <<<<<<<<<<<<<<
+ *             if region is None:
+ *                 # possible reason is that the file is empty -
+ */
+  __pyx_t_4 = ((__pyx_v_iter == NULL) != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/ctabix.pyx":348
+ * 
+ *         if iter == NULL:
+ *             if region is None:             # <<<<<<<<<<<<<<
+ *                 # possible reason is that the file is empty -
+ *                 # return an empty iterator
+ */
+    __pyx_t_4 = (__pyx_v_region == Py_None);
+    __pyx_t_3 = (__pyx_t_4 != 0);
+    if (__pyx_t_3) {
+
+      /* "pysam/ctabix.pyx":351
+ *                 # possible reason is that the file is empty -
+ *                 # return an empty iterator
+ *                 return EmptyIterator()             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise ValueError(
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_EmptyIterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __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;
+    }
+    /*else*/ {
+
+      /* "pysam/ctabix.pyx":354
+ *             else:
+ *                 raise ValueError(
+ *                     "could not create iterator for region '%s'" % region)             # <<<<<<<<<<<<<<
+ * 
+ *         # use default parser if no parser is specified
+ */
+      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_could_not_create_iterator_for_re, __pyx_v_region); 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);
+
+      /* "pysam/ctabix.pyx":353
+ *                 return EmptyIterator()
+ *             else:
+ *                 raise ValueError(             # <<<<<<<<<<<<<<
+ *                     "could not create iterator for region '%s'" % region)
+ * 
+ */
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); 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(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+
+  /* "pysam/ctabix.pyx":357
+ * 
+ *         # use default parser if no parser is specified
+ *         if parser is None:             # <<<<<<<<<<<<<<
+ *             parser = self.parser
+ * 
+ */
+  __pyx_t_3 = (__pyx_v_parser == Py_None);
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
+
+    /* "pysam/ctabix.pyx":358
+ *         # use default parser if no parser is specified
+ *         if parser is None:
+ *             parser = self.parser             # <<<<<<<<<<<<<<
+ * 
+ *         cdef TabixIterator a
+ */
+    __pyx_t_2 = ((PyObject *)__pyx_v_self->parser);
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_DECREF_SET(__pyx_v_parser, __pyx_t_2);
+    __pyx_t_2 = 0;
+    goto __pyx_L11;
+  }
+  __pyx_L11:;
+
+  /* "pysam/ctabix.pyx":361
+ * 
+ *         cdef TabixIterator a
+ *         if parser is None:             # <<<<<<<<<<<<<<
+ *             a = TabixIterator()
+ *         else:
+ */
+  __pyx_t_4 = (__pyx_v_parser == Py_None);
+  __pyx_t_3 = (__pyx_t_4 != 0);
+  if (__pyx_t_3) {
+
+    /* "pysam/ctabix.pyx":362
+ *         cdef TabixIterator a
+ *         if parser is None:
+ *             a = TabixIterator()             # <<<<<<<<<<<<<<
+ *         else:
+ *             a = TabixIteratorParsed(parser)
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_TabixIterator)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_v_a = ((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_t_2);
+    __pyx_t_2 = 0;
+    goto __pyx_L12;
+  }
+  /*else*/ {
+
+    /* "pysam/ctabix.pyx":364
+ *             a = TabixIterator()
+ *         else:
+ *             a = TabixIteratorParsed(parser)             # <<<<<<<<<<<<<<
+ * 
+ *         a.tabixfile = self
+ */
+    __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_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_parser);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_parser);
+    __Pyx_GIVEREF(__pyx_v_parser);
+    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_TabixIteratorParsed)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_a = ((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_t_1);
+    __pyx_t_1 = 0;
+  }
+  __pyx_L12:;
+
+  /* "pysam/ctabix.pyx":366
+ *             a = TabixIteratorParsed(parser)
+ * 
+ *         a.tabixfile = self             # <<<<<<<<<<<<<<
+ *         a.iterator = iter
+ * 
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_GOTREF(__pyx_v_a->tabixfile);
+  __Pyx_DECREF(((PyObject *)__pyx_v_a->tabixfile));
+  __pyx_v_a->tabixfile = __pyx_v_self;
+
+  /* "pysam/ctabix.pyx":367
+ * 
+ *         a.tabixfile = self
+ *         a.iterator = iter             # <<<<<<<<<<<<<<
+ * 
+ *         return a
+ */
+  __pyx_v_a->iterator = __pyx_v_iter;
+
+  /* "pysam/ctabix.pyx":369
+ *         a.iterator = iter
+ * 
+ *         return a             # <<<<<<<<<<<<<<
+ * 
+ *     ###############################################################
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_a));
+  __pyx_r = ((PyObject *)__pyx_v_a);
+  goto __pyx_L0;
+
+  /* "pysam/ctabix.pyx":299
+ * 
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference=None,
+ *               start=None,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_a);
+  __Pyx_XDECREF(__pyx_v_start);
+  __Pyx_XDECREF(__pyx_v_region);
+  __Pyx_XDECREF(__pyx_v_parser);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":378
+ *     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
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_8filename_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_8filename___get__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_8filename___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "pysam/ctabix.pyx":379
+ *         '''filename associated with this object.'''
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             return self._filename
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __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 = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/ctabix.pyx":380
+ *         def __get__(self):
+ *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ *             return self._filename             # <<<<<<<<<<<<<<
+ * 
+ *     property header:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/ctabix.pyx":378
+ *     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
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.filename.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":390
+ *         '''
+ * 
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return GZIteratorHead(self.filename)
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_6header_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_6header___get__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_6header___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "pysam/ctabix.pyx":391
+ * 
+ *         def __get__(self):
+ *             return GZIteratorHead(self.filename)             # <<<<<<<<<<<<<<
+ * 
+ *     property contigs:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_GZIteratorHead)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "pysam/ctabix.pyx":390
+ *         '''
+ * 
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return GZIteratorHead(self.filename)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":395
+ *     property contigs:
+ *         '''chromosome names'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef char ** sequences
+ *             cdef int nsequences
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_7contigs_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_7contigs_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_7contigs___get__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_7contigs___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+  char **__pyx_v_sequences;
+  int __pyx_v_nsequences;
+  int __pyx_v_x;
+  PyObject *__pyx_v_result = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "pysam/ctabix.pyx":399
+ *             cdef int nsequences
+ * 
+ *             sequences = tbx_seqnames(self.index, &nsequences)             # <<<<<<<<<<<<<<
+ *             cdef int x
+ *             result = []
+ */
+  __pyx_v_sequences = tbx_seqnames(__pyx_v_self->index, (&__pyx_v_nsequences));
+
+  /* "pysam/ctabix.pyx":401
+ *             sequences = tbx_seqnames(self.index, &nsequences)
+ *             cdef int x
+ *             result = []             # <<<<<<<<<<<<<<
+ *             for x from 0 <= x < nsequences:
+ *                 result.append(sequences[x])
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_result = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pysam/ctabix.pyx":402
+ *             cdef int x
+ *             result = []
+ *             for x from 0 <= x < nsequences:             # <<<<<<<<<<<<<<
+ *                 result.append(sequences[x])
+ * 
+ */
+  __pyx_t_2 = __pyx_v_nsequences;
+  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+
+    /* "pysam/ctabix.pyx":403
+ *             result = []
+ *             for x from 0 <= x < nsequences:
+ *                 result.append(sequences[x])             # <<<<<<<<<<<<<<
+ * 
+ *             # htslib instructions:
+ */
+    __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_sequences[__pyx_v_x])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "pysam/ctabix.pyx":407
+ *             # htslib instructions:
+ *             # only free container, not the sequences themselves
+ *             free(sequences)             # <<<<<<<<<<<<<<
+ * 
+ *             return result
+ */
+  free(__pyx_v_sequences);
+
+  /* "pysam/ctabix.pyx":409
+ *             free(sequences)
+ * 
+ *             return result             # <<<<<<<<<<<<<<
+ * 
+ *     def close(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __pyx_v_result;
+  goto __pyx_L0;
+
+  /* "pysam/ctabix.pyx":395
+ *     property contigs:
+ *         '''chromosome names'''
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             cdef char ** sequences
+ *             cdef int nsequences
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.contigs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_result);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":411
+ *             return result
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         closes the :class:`pysam.Tabixfile`.'''
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_9Tabixfile_8close[] = "Tabixfile.close(self)\n\n        closes the :class:`pysam.Tabixfile`.";
+static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_8close(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_8close(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("close", 0);
+
+  /* "pysam/ctabix.pyx":414
+ *         '''
+ *         closes the :class:`pysam.Tabixfile`.'''
+ *         if self.tabixfile != NULL:             # <<<<<<<<<<<<<<
+ *             hts_close(self.tabixfile)
+ *             self.tabixfile = NULL
+ */
+  __pyx_t_1 = ((__pyx_v_self->tabixfile != NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/ctabix.pyx":415
+ *         closes the :class:`pysam.Tabixfile`.'''
+ *         if self.tabixfile != NULL:
+ *             hts_close(self.tabixfile)             # <<<<<<<<<<<<<<
+ *             self.tabixfile = NULL
+ * 
+ */
+    hts_close(__pyx_v_self->tabixfile);
+
+    /* "pysam/ctabix.pyx":416
+ *         if self.tabixfile != NULL:
+ *             hts_close(self.tabixfile)
+ *             self.tabixfile = NULL             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__( self ):
+ */
+    __pyx_v_self->tabixfile = NULL;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/ctabix.pyx":411
+ *             return result
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         closes the :class:`pysam.Tabixfile`.'''
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":418
+ *             self.tabixfile = NULL
+ * 
+ *     def __dealloc__( self ):             # <<<<<<<<<<<<<<
+ *         # remember: dealloc cannot call other python methods
+ *         # note: no doc string
+ */
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_6ctabix_9Tabixfile_11__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_6ctabix_9Tabixfile_11__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_6ctabix_9Tabixfile_10__dealloc__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5pysam_6ctabix_9Tabixfile_10__dealloc__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+  /* "pysam/ctabix.pyx":422
+ *         # note: no doc string
+ *         # note: __del__ is not called.
+ *         if self.tabixfile != NULL:             # <<<<<<<<<<<<<<
+ *             hts_close(self.tabixfile)
+ *             self.tabixfile = NULL
+ */
+  __pyx_t_1 = ((__pyx_v_self->tabixfile != NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/ctabix.pyx":423
+ *         # note: __del__ is not called.
+ *         if self.tabixfile != NULL:
+ *             hts_close(self.tabixfile)             # <<<<<<<<<<<<<<
+ *             self.tabixfile = NULL
+ *         if self._filename != NULL:
+ */
+    hts_close(__pyx_v_self->tabixfile);
+
+    /* "pysam/ctabix.pyx":424
+ *         if self.tabixfile != NULL:
+ *             hts_close(self.tabixfile)
+ *             self.tabixfile = NULL             # <<<<<<<<<<<<<<
+ *         if self._filename != NULL:
+ *             free(self._filename)
+ */
+    __pyx_v_self->tabixfile = NULL;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pysam/ctabix.pyx":425
+ *             hts_close(self.tabixfile)
+ *             self.tabixfile = NULL
+ *         if self._filename != NULL:             # <<<<<<<<<<<<<<
+ *             free(self._filename)
+ * 
+ */
+  __pyx_t_1 = ((__pyx_v_self->_filename != NULL) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/ctabix.pyx":426
+ *             self.tabixfile = NULL
+ *         if self._filename != NULL:
+ *             free(self._filename)             # <<<<<<<<<<<<<<
+ * 
+ * cdef class TabixIterator:
+ */
+    free(__pyx_v_self->_filename);
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "pysam/ctabix.pyx":418
+ *             self.tabixfile = NULL
+ * 
+ *     def __dealloc__( self ):             # <<<<<<<<<<<<<<
+ *         # remember: dealloc cannot call other python methods
+ *         # note: no doc string
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/ctabix.pyx":433
+ *     """
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         self.buffer.s = NULL
+ *         self.buffer.l = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_13TabixIterator_1__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6ctabix_13TabixIterator_1__iter__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_13TabixIterator___iter__(((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator___iter__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__iter__", 0);
+
+  /* "pysam/ctabix.pyx":434
+ * 
+ *     def __iter__(self):
+ *         self.buffer.s = NULL             # <<<<<<<<<<<<<<
+ *         self.buffer.l = 0
+ *         self.buffer.m = 0
+ */
+  __pyx_v_self->buffer.s = NULL;
+
+  /* "pysam/ctabix.pyx":435
+ *     def __iter__(self):
+ *         self.buffer.s = NULL
+ *         self.buffer.l = 0             # <<<<<<<<<<<<<<
+ *         self.buffer.m = 0
+ * 
+ */
+  __pyx_v_self->buffer.l = 0;
+
+  /* "pysam/ctabix.pyx":436
+ *         self.buffer.s = NULL
+ *         self.buffer.l = 0
+ *         self.buffer.m = 0             # <<<<<<<<<<<<<<
+ * 
+ *         return self
+ */
+  __pyx_v_self->buffer.m = 0;
+
+  /* "pysam/ctabix.pyx":438
+ *         self.buffer.m = 0
+ * 
+ *         return self             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int __cnext__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "pysam/ctabix.pyx":433
+ *     """
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         self.buffer.s = NULL
+ *         self.buffer.l = 0
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pysam/ctabix.pyx":440
+ *         return self
+ * 
+ *     cdef int __cnext__(self):             # <<<<<<<<<<<<<<
+ *         '''return value needs to be freed by caller'''
+ * 
+ */
+
+static int __pyx_f_5pysam_6ctabix_13TabixIterator___cnext__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self) {
+  int __pyx_v_retval;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("__cnext__", 0);
+
+  /* "pysam/ctabix.pyx":444
+ * 
+ *         cdef int retval
+ *         while 1:             # <<<<<<<<<<<<<<
+ *             retval = tbx_itr_next(
+ *                 self.tabixfile.tabixfile,
+ */
+  while (1) {
+
+    /* "pysam/ctabix.pyx":445
+ *         cdef int retval
+ *         while 1:
+ *             retval = tbx_itr_next(             # <<<<<<<<<<<<<<
+ *                 self.tabixfile.tabixfile,
+ *                 self.tabixfile.index,
+ */
+    __pyx_v_retval = tbx_itr_next(__pyx_v_self->tabixfile->tabixfile, __pyx_v_self->tabixfile->index, __pyx_v_self->iterator, (&__pyx_v_self->buffer));
+
+    /* "pysam/ctabix.pyx":450
+ *                 self.iterator,
+ *                 &self.buffer)
+ *             if retval < 0:             # <<<<<<<<<<<<<<
+ *                 break
+ * 
  */
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_4) {
+    __pyx_t_1 = ((__pyx_v_retval < 0) != 0);
+    if (__pyx_t_1) {
 
-      /* "pysam/ctabix.pyx":237
- *         else:
- *             if region:
- *                 return TabixIteratorParsed( self, rtid, rstart,             # <<<<<<<<<<<<<<
- *                                             rend, parser )
- *             else:
+      /* "pysam/ctabix.pyx":451
+ *                 &self.buffer)
+ *             if retval < 0:
+ *                 break             # <<<<<<<<<<<<<<
+ * 
+ *             if self.buffer.s[0] != '#':
  */
-      __Pyx_XDECREF(__pyx_r);
-
-      /* "pysam/ctabix.pyx":238
- *             if region:
- *                 return TabixIteratorParsed( self, rtid, rstart,
- *                                             rend, parser )             # <<<<<<<<<<<<<<
- *             else:
- *                 return TabixIteratorParsed( self, -1, 0, 0, parser )
- */
-      __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_INCREF(((PyObject *)__pyx_v_self));
-      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self));
-      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-      __Pyx_INCREF(__pyx_v_rtid);
-      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_rtid);
-      __Pyx_GIVEREF(__pyx_v_rtid);
-      __Pyx_INCREF(__pyx_v_rstart);
-      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_rstart);
-      __Pyx_GIVEREF(__pyx_v_rstart);
-      __Pyx_INCREF(__pyx_v_rend);
-      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_rend);
-      __Pyx_GIVEREF(__pyx_v_rend);
-      __Pyx_INCREF(__pyx_v_parser);
-      PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_v_parser);
-      __Pyx_GIVEREF(__pyx_v_parser);
-      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_TabixIteratorParsed)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-      __pyx_r = __pyx_t_7;
-      __pyx_t_7 = 0;
-      goto __pyx_L0;
-      goto __pyx_L9;
+      goto __pyx_L4_break;
     }
-    /*else*/ {
 
-      /* "pysam/ctabix.pyx":240
- *                                             rend, parser )
- *             else:
- *                 return TabixIteratorParsed( self, -1, 0, 0, parser )             # <<<<<<<<<<<<<<
+    /* "pysam/ctabix.pyx":453
+ *                 break
+ * 
+ *             if self.buffer.s[0] != '#':             # <<<<<<<<<<<<<<
+ *                 break
  * 
- *     ###############################################################
  */
-      __Pyx_XDECREF(__pyx_r);
-      __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_INCREF(((PyObject *)__pyx_v_self));
-      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));
-      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-      __Pyx_INCREF(__pyx_int_neg_1);
-      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_neg_1);
-      __Pyx_GIVEREF(__pyx_int_neg_1);
-      __Pyx_INCREF(__pyx_int_0);
-      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_0);
-      __Pyx_GIVEREF(__pyx_int_0);
-      __Pyx_INCREF(__pyx_int_0);
-      PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_0);
-      __Pyx_GIVEREF(__pyx_int_0);
-      __Pyx_INCREF(__pyx_v_parser);
-      PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_parser);
-      __Pyx_GIVEREF(__pyx_v_parser);
-      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_TabixIteratorParsed)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __pyx_r = __pyx_t_5;
-      __pyx_t_5 = 0;
-      goto __pyx_L0;
+    __pyx_t_1 = (((__pyx_v_self->buffer.s[0]) != '#') != 0);
+    if (__pyx_t_1) {
+
+      /* "pysam/ctabix.pyx":454
+ * 
+ *             if self.buffer.s[0] != '#':
+ *                 break             # <<<<<<<<<<<<<<
+ * 
+ *         return retval
+ */
+      goto __pyx_L4_break;
     }
-    __pyx_L9:;
   }
-  __pyx_L7:;
+  __pyx_L4_break:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  /* "pysam/ctabix.pyx":456
+ *                 break
+ * 
+ *         return retval             # <<<<<<<<<<<<<<
+ * 
+ *     def __next__(self):
+ */
+  __pyx_r = __pyx_v_retval;
   goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+
+  /* "pysam/ctabix.pyx":440
+ *         return self
+ * 
+ *     cdef int __cnext__(self):             # <<<<<<<<<<<<<<
+ *         '''return value needs to be freed by caller'''
+ * 
+ */
+
+  /* function exit code */
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_rtid);
-  __Pyx_XDECREF(__pyx_v_rstart);
-  __Pyx_XDECREF(__pyx_v_rend);
-  __Pyx_XDECREF(__pyx_v_region);
-  __Pyx_XDECREF(__pyx_v_parser);
-  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":458
+ *         return retval
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_8filename_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_5pysam_6ctabix_13TabixIterator_3__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_13TabixIterator_2__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_13TabixIterator_2__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_6ctabix_13TabixIterator_3__next__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_8filename___get__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_13TabixIterator_2__next__(((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":249
- *     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
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_8filename___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator_2__next__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self) {
+  int __pyx_v_retval;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
   PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  int __pyx_t_4;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_RefNannySetupContext("__next__", 0);
 
-  /* "pysam/ctabix.pyx":250
- *         '''filename associated with this object.'''
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
- *             return self._filename
+  /* "pysam/ctabix.pyx":464
+ *         """
  * 
+ *         cdef int retval = self.__cnext__()             # <<<<<<<<<<<<<<
+ *         if retval < 0:
+ *             raise StopIteration
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __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 = 250; __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 = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+  __pyx_v_retval = ((struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self);
 
-  /* "pysam/ctabix.pyx":251
- *         def __get__(self):
- *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
- *             return self._filename             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":465
+ * 
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:             # <<<<<<<<<<<<<<
+ *             raise StopIteration
  * 
- *     property header:
  */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = PyBytes_FromString(__pyx_v_self->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __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;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.filename.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_6header_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_6header___get__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  __pyx_t_1 = ((__pyx_v_retval < 0) != 0);
+  if (__pyx_t_1) {
 
-/* "pysam/ctabix.pyx":261
- *         '''
- * 
- *         def __get__( self ):             # <<<<<<<<<<<<<<
- *             return TabixHeaderIterator( self )
+    /* "pysam/ctabix.pyx":466
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
  * 
+ *         return _charptr_to_str(self.buffer.s)
  */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_6header___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__get__", 0);
-
-  /* "pysam/ctabix.pyx":262
+  /* "pysam/ctabix.pyx":468
+ *             raise StopIteration
  * 
- *         def __get__( self ):
- *             return TabixHeaderIterator( self )             # <<<<<<<<<<<<<<
+ *         return _charptr_to_str(self.buffer.s)             # <<<<<<<<<<<<<<
  * 
- *     property contigs:
+ *     def __dealloc__(self):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_TabixHeaderIterator)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_f_5pysam_6ctabix__charptr_to_str(__pyx_v_self->buffer.s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":458
+ *         return retval
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.Tabixfile.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.TabixIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -4098,271 +5174,207 @@ static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_6header___get__(struct __pyx
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":470
+ *         return _charptr_to_str(self.buffer.s)
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         if <void*>self.iterator != NULL:
+ *             tbx_itr_destroy(self.iterator)
+ */
+
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_7contigs_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_7contigs_1__get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
+static void __pyx_pw_5pysam_6ctabix_13TabixIterator_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_6ctabix_13TabixIterator_5__dealloc__(PyObject *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_7contigs___get__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_5pysam_6ctabix_13TabixIterator_4__dealloc__(((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
-  return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":266
- *     property contigs:
- *         '''chromosome names'''
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             cdef char ** sequences
- *             cdef int nsequences
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_7contigs___get__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
-  char **__pyx_v_sequences;
-  int __pyx_v_nsequences;
-  int __pyx_v_x;
-  PyObject *__pyx_v_result = NULL;
-  PyObject *__pyx_r = NULL;
+static void __pyx_pf_5pysam_6ctabix_13TabixIterator_4__dealloc__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__get__", 0);
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
 
-  /* "pysam/ctabix.pyx":270
- *             cdef int nsequences
+  /* "pysam/ctabix.pyx":471
  * 
- *             ti_lazy_index_load( self.tabixfile )             # <<<<<<<<<<<<<<
- *             sequences = ti_seqname( self.tabixfile.idx, &nsequences )
- *             cdef int x
- */
-  ti_lazy_index_load(__pyx_v_self->tabixfile);
-
-  /* "pysam/ctabix.pyx":271
+ *     def __dealloc__(self):
+ *         if <void*>self.iterator != NULL:             # <<<<<<<<<<<<<<
+ *             tbx_itr_destroy(self.iterator)
  * 
- *             ti_lazy_index_load( self.tabixfile )
- *             sequences = ti_seqname( self.tabixfile.idx, &nsequences )             # <<<<<<<<<<<<<<
- *             cdef int x
- *             result = []
- */
-  __pyx_v_sequences = ti_seqname(__pyx_v_self->tabixfile->idx, (&__pyx_v_nsequences));
-
-  /* "pysam/ctabix.pyx":273
- *             sequences = ti_seqname( self.tabixfile.idx, &nsequences )
- *             cdef int x
- *             result = []             # <<<<<<<<<<<<<<
- *             for x from 0 <= x < nsequences:
- *                 result.append( sequences[x] )
- */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_result = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "pysam/ctabix.pyx":274
- *             cdef int x
- *             result = []
- *             for x from 0 <= x < nsequences:             # <<<<<<<<<<<<<<
- *                 result.append( sequences[x] )
- *             return result
  */
-  __pyx_t_2 = __pyx_v_nsequences;
-  for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
+  __pyx_t_1 = ((((void *)__pyx_v_self->iterator) != NULL) != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/ctabix.pyx":275
- *             result = []
- *             for x from 0 <= x < nsequences:
- *                 result.append( sequences[x] )             # <<<<<<<<<<<<<<
- *             return result
+    /* "pysam/ctabix.pyx":472
+ *     def __dealloc__(self):
+ *         if <void*>self.iterator != NULL:
+ *             tbx_itr_destroy(self.iterator)             # <<<<<<<<<<<<<<
+ * 
  * 
  */
-    __pyx_t_1 = PyBytes_FromString((__pyx_v_sequences[__pyx_v_x])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_t_3 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    tbx_itr_destroy(__pyx_v_self->iterator);
+    goto __pyx_L3;
   }
+  __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":276
- *             for x from 0 <= x < nsequences:
- *                 result.append( sequences[x] )
- *             return result             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":470
+ *         return _charptr_to_str(self.buffer.s)
  * 
- *     def close( self ):
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         if <void*>self.iterator != NULL:
+ *             tbx_itr_destroy(self.iterator)
  */
-  __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_AddTraceback("pysam.ctabix.Tabixfile.contigs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_result);
-  __Pyx_XGIVEREF(__pyx_r);
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
-  return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":478
+ *     '''empty iterator'''
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_11close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_9Tabixfile_10close[] = "Tabixfile.close(self)\n\n        closes the :class:`pysam.Tabixfile`.";
-static PyObject *__pyx_pw_5pysam_6ctabix_9Tabixfile_11close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_5pysam_6ctabix_13EmptyIterator_1__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_13EmptyIterator___iter__[] = "EmptyIterator.__iter__(self)";
+static PyMethodDef __pyx_mdef_5pysam_6ctabix_13EmptyIterator_1__iter__ = {__Pyx_NAMESTR("__iter__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_13EmptyIterator_1__iter__, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_13EmptyIterator___iter__)};
+static PyObject *__pyx_pw_5pysam_6ctabix_13EmptyIterator_1__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("close (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_9Tabixfile_10close(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_13EmptyIterator___iter__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":278
- *             return result
- * 
- *     def close( self ):             # <<<<<<<<<<<<<<
- *         '''
- *         closes the :class:`pysam.Tabixfile`.'''
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_9Tabixfile_10close(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+static PyObject *__pyx_pf_5pysam_6ctabix_13EmptyIterator___iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_RefNannySetupContext("close", 0);
-
-  /* "pysam/ctabix.pyx":281
- *         '''
- *         closes the :class:`pysam.Tabixfile`.'''
- *         if self.tabixfile != NULL:             # <<<<<<<<<<<<<<
- *             ti_close( self.tabixfile )
- *             self.tabixfile = NULL
- */
-  __pyx_t_1 = (__pyx_v_self->tabixfile != NULL);
-  if (__pyx_t_1) {
+  __Pyx_RefNannySetupContext("__iter__", 0);
 
-    /* "pysam/ctabix.pyx":282
- *         closes the :class:`pysam.Tabixfile`.'''
- *         if self.tabixfile != NULL:
- *             ti_close( self.tabixfile )             # <<<<<<<<<<<<<<
- *             self.tabixfile = NULL
+  /* "pysam/ctabix.pyx":479
+ * 
+ *     def __iter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ * 
  * 
  */
-    ti_close(__pyx_v_self->tabixfile);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self);
+  __pyx_r = __pyx_v_self;
+  goto __pyx_L0;
 
-    /* "pysam/ctabix.pyx":283
- *         if self.tabixfile != NULL:
- *             ti_close( self.tabixfile )
- *             self.tabixfile = NULL             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":478
+ *     '''empty iterator'''
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
  * 
- *     def __dealloc__( self ):
  */
-    __pyx_v_self->tabixfile = NULL;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  /* function exit code */
+  __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* Python wrapper */
-static void __pyx_pw_5pysam_6ctabix_9Tabixfile_13__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_6ctabix_9Tabixfile_13__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_6ctabix_9Tabixfile_12__dealloc__(((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/ctabix.pyx":285
- *             self.tabixfile = NULL
+/* "pysam/ctabix.pyx":482
+ * 
+ * 
+ *     def next(self):             # <<<<<<<<<<<<<<
+ *         raise StopIteration()
  * 
- *     def __dealloc__( self ):             # <<<<<<<<<<<<<<
- *         # remember: dealloc cannot call other python methods
- *         # note: no doc string
  */
 
-static void __pyx_pf_5pysam_6ctabix_9Tabixfile_12__dealloc__(struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_self) {
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_13EmptyIterator_3next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_13EmptyIterator_2next[] = "EmptyIterator.next(self)";
+static PyMethodDef __pyx_mdef_5pysam_6ctabix_13EmptyIterator_3next = {__Pyx_NAMESTR("next"), (PyCFunction)__pyx_pw_5pysam_6ctabix_13EmptyIterator_3next, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_13EmptyIterator_2next)};
+static PyObject *__pyx_pw_5pysam_6ctabix_13EmptyIterator_3next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_RefNannySetupContext("next (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_13EmptyIterator_2next(__pyx_self, ((PyObject *)__pyx_v_self));
 
-  /* "pysam/ctabix.pyx":289
- *         # note: no doc string
- *         # note: __del__ is not called.
- *         if self.tabixfile != NULL:             # <<<<<<<<<<<<<<
- *             ti_close( self.tabixfile )
- *             self.tabixfile = NULL
- */
-  __pyx_t_1 = (__pyx_v_self->tabixfile != NULL);
-  if (__pyx_t_1) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "pysam/ctabix.pyx":290
- *         # note: __del__ is not called.
- *         if self.tabixfile != NULL:
- *             ti_close( self.tabixfile )             # <<<<<<<<<<<<<<
- *             self.tabixfile = NULL
- *         if self._filename != NULL: free( self._filename )
- */
-    ti_close(__pyx_v_self->tabixfile);
+static PyObject *__pyx_pf_5pysam_6ctabix_13EmptyIterator_2next(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("next", 0);
 
-    /* "pysam/ctabix.pyx":291
- *         if self.tabixfile != NULL:
- *             ti_close( self.tabixfile )
- *             self.tabixfile = NULL             # <<<<<<<<<<<<<<
- *         if self._filename != NULL: free( self._filename )
+  /* "pysam/ctabix.pyx":483
+ * 
+ *     def next(self):
+ *         raise StopIteration()             # <<<<<<<<<<<<<<
+ * 
  * 
  */
-    __pyx_v_self->tabixfile = NULL;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_StopIteration, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":292
- *             ti_close( self.tabixfile )
- *             self.tabixfile = NULL
- *         if self._filename != NULL: free( self._filename )             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":482
+ * 
+ * 
+ *     def next(self):             # <<<<<<<<<<<<<<
+ *         raise StopIteration()
  * 
- * cdef class TabixIterator:
  */
-  __pyx_t_1 = (__pyx_v_self->_filename != NULL);
-  if (__pyx_t_1) {
-    free(__pyx_v_self->_filename);
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
 
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pysam.ctabix.EmptyIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":492
+ *     """
+ * 
+ *     def __init__(self,             # <<<<<<<<<<<<<<
+ *                  Parser parser):
+ * 
+ */
+
 /* Python wrapper */
-static int __pyx_pw_5pysam_6ctabix_13TabixIterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_6ctabix_13TabixIterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile = 0;
-  int __pyx_v_tid;
-  int __pyx_v_start;
-  int __pyx_v_end;
+static int __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tabixfile,&__pyx_n_s__tid,&__pyx_n_s__start,&__pyx_n_s__end,0};
-    PyObject* values[4] = {0,0,0,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parser,0};
+    PyObject* values[1] = {0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
       switch (pos_args) {
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
         case  0: break;
         default: goto __pyx_L5_argtuple_error;
@@ -4370,50 +5382,31 @@ static int __pyx_pw_5pysam_6ctabix_13TabixIterator_1__cinit__(PyObject *__pyx_v_
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tabixfile)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tid)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  3:
-        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
       goto __pyx_L5_argtuple_error;
     } else {
       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
     }
-    __pyx_v_tabixfile = ((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)values[0]);
-    __pyx_v_tid = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_start = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_end = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)values[0]);
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.ctabix.TabixIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.TabixIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return -1;
   __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tabixfile), __pyx_ptype_5pysam_6ctabix_Tabixfile, 1, "tabixfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_6ctabix_13TabixIterator___cinit__(((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_v_self), __pyx_v_tabixfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end);
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_5pysam_6ctabix_Parser, 1, "parser", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed___init__(((struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)__pyx_v_self), __pyx_v_parser);
+
+  /* function exit code */
   goto __pyx_L0;
   __pyx_L1_error:;
   __pyx_r = -1;
@@ -4422,207 +5415,99 @@ static int __pyx_pw_5pysam_6ctabix_13TabixIterator_1__cinit__(PyObject *__pyx_v_
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":299
- *     """
- * 
- *     def __cinit__(self, Tabixfile tabixfile,             # <<<<<<<<<<<<<<
- *                   int tid, int start, int end ):
- * 
- */
-
-static int __pyx_pf_5pysam_6ctabix_13TabixIterator___cinit__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self, struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end) {
+static int __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed___init__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self, struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  tabix_t *__pyx_t_4;
+  PyObject *__pyx_t_3 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_RefNannySetupContext("__init__", 0);
 
-  /* "pysam/ctabix.pyx":302
- *                   int tid, int start, int end ):
+  /* "pysam/ctabix.pyx":495
+ *                  Parser parser):
  * 
- *         assert tabixfile._isOpen()             # <<<<<<<<<<<<<<
+ *         TabixIterator.__init__(self)             # <<<<<<<<<<<<<<
+ *         self.parser = parser
  * 
- *         # makes sure that samfile stays alive as long as the
  */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_tabixfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_TabixIterator)), __pyx_n_s_init); 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_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __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 = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __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 = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (unlikely(!__pyx_t_3)) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
-
-  /* "pysam/ctabix.pyx":306
- *         # makes sure that samfile stays alive as long as the
- *         # iterator is alive.
- *         self.tabixfile = tabixfile.tabixfile             # <<<<<<<<<<<<<<
- * 
- *         if tid < 0:
- */
-  __pyx_t_4 = __pyx_v_tabixfile->tabixfile;
-  __pyx_v_self->tabixfile = __pyx_t_4;
-
-  /* "pysam/ctabix.pyx":308
- *         self.tabixfile = tabixfile.tabixfile
- * 
- *         if tid < 0:             # <<<<<<<<<<<<<<
- *             # seek to start of file to ensure iteration is over
- *             # all entries.
- */
-  __pyx_t_3 = (__pyx_v_tid < 0);
-  if (__pyx_t_3) {
-
-    /* "pysam/ctabix.pyx":311
- *             # seek to start of file to ensure iteration is over
- *             # all entries.
- *             bgzf_seek( self.tabixfile.fp, 0, 0)             # <<<<<<<<<<<<<<
- *             self.iterator = ti_iter_first()
- *         else:
- */
-    bgzf_seek(__pyx_v_self->tabixfile->fp, 0, 0);
-
-    /* "pysam/ctabix.pyx":312
- *             # all entries.
- *             bgzf_seek( self.tabixfile.fp, 0, 0)
- *             self.iterator = ti_iter_first()             # <<<<<<<<<<<<<<
- *         else:
- *             self.iterator = ti_queryi(self.tabixfile, tid, start, end)
- */
-    __pyx_v_self->iterator = ti_iter_first();
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "pysam/ctabix.pyx":314
- *             self.iterator = ti_iter_first()
- *         else:
- *             self.iterator = ti_queryi(self.tabixfile, tid, start, end)             # <<<<<<<<<<<<<<
- * 
- *         if <void*>self.iterator == NULL:
- */
-    __pyx_v_self->iterator = ti_queryi(__pyx_v_self->tabixfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end);
-  }
-  __pyx_L3:;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/ctabix.pyx":316
- *             self.iterator = ti_queryi(self.tabixfile, tid, start, end)
+  /* "pysam/ctabix.pyx":496
  * 
- *         if <void*>self.iterator == NULL:             # <<<<<<<<<<<<<<
- *             raise ValueError("malformatted query or wrong sequence name.\n")
+ *         TabixIterator.__init__(self)
+ *         self.parser = parser             # <<<<<<<<<<<<<<
  * 
+ *     def __next__(self):
  */
-  __pyx_t_3 = (((void *)__pyx_v_self->iterator) == NULL);
-  if (__pyx_t_3) {
+  __Pyx_INCREF(((PyObject *)__pyx_v_parser));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_parser));
+  __Pyx_GOTREF(__pyx_v_self->parser);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->parser));
+  __pyx_v_self->parser = __pyx_v_parser;
 
-    /* "pysam/ctabix.pyx":317
+  /* "pysam/ctabix.pyx":492
+ *     """
  * 
- *         if <void*>self.iterator == NULL:
- *             raise ValueError("malformatted query or wrong sequence name.\n")             # <<<<<<<<<<<<<<
+ *     def __init__(self,             # <<<<<<<<<<<<<<
+ *                  Parser parser):
  * 
- *     def __iter__(self):
  */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_25), 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_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.TabixIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.ctabix.TabixIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = -1;
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_13TabixIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_6ctabix_13TabixIterator_3__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_13TabixIterator_2__iter__(((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/ctabix.pyx":319
- *             raise ValueError("malformatted query or wrong sequence name.\n")
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator_2__iter__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-
-  /* "pysam/ctabix.pyx":320
+/* "pysam/ctabix.pyx":498
+ *         self.parser = parser
  * 
- *     def __iter__(self):
- *         return self             # <<<<<<<<<<<<<<
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
  * 
- *     def __next__(self):
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
 
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_13TabixIterator_5__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_13TabixIterator_4__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
+static PyObject *__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_3__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_19TabixIteratorParsed_2__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
 #if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_13TabixIterator_4__next__;
+struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_19TabixIteratorParsed_2__next__;
 #endif
-static PyObject *__pyx_pw_5pysam_6ctabix_13TabixIterator_5__next__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_3__next__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_13TabixIterator_4__next__(((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_v_self));
+  __pyx_r = __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_2__next__(((struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":322
- *         return self
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator_4__next__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self) {
-  char *__pyx_v_s;
-  int __pyx_v_len;
-  PyObject *__pyx_v_retval = NULL;
+static PyObject *__pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_2__next__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self) {
+  int __pyx_v_retval;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
@@ -4632,154 +5517,100 @@ static PyObject *__pyx_pf_5pysam_6ctabix_13TabixIterator_4__next__(struct __pyx_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__next__", 0);
 
-  /* "pysam/ctabix.pyx":334
- *         # as ti_index_t is incomplete type.
- *         # simply use '#' for now.
- *         while 1:             # <<<<<<<<<<<<<<
- *             s = ti_read(self.tabixfile, self.iterator, &len)
- *             if s == NULL: raise StopIteration
- */
-  while (1) {
-    if (!1) break;
-
-    /* "pysam/ctabix.pyx":335
- *         # simply use '#' for now.
- *         while 1:
- *             s = ti_read(self.tabixfile, self.iterator, &len)             # <<<<<<<<<<<<<<
- *             if s == NULL: raise StopIteration
- *             if s[0] != '#': break
+  /* "pysam/ctabix.pyx":504
+ *         """
+ * 
+ *         cdef int retval = self.__cnext__()             # <<<<<<<<<<<<<<
+ *         if retval < 0:
+ *             raise StopIteration
  */
-    __pyx_v_s = ti_read(__pyx_v_self->tabixfile, __pyx_v_self->iterator, (&__pyx_v_len));
+  __pyx_v_retval = ((struct __pyx_vtabstruct_5pysam_6ctabix_TabixIteratorParsed *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.__pyx___cnext__(((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_v_self));
 
-    /* "pysam/ctabix.pyx":336
- *         while 1:
- *             s = ti_read(self.tabixfile, self.iterator, &len)
- *             if s == NULL: raise StopIteration             # <<<<<<<<<<<<<<
- *             if s[0] != '#': break
+  /* "pysam/ctabix.pyx":505
  * 
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:             # <<<<<<<<<<<<<<
+ *             raise StopIteration
+ *         return self.parser.parse(self.buffer.s, self.buffer.l)
  */
-    __pyx_t_1 = (__pyx_v_s == NULL);
-    if (__pyx_t_1) {
-      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
+  __pyx_t_1 = ((__pyx_v_retval < 0) != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/ctabix.pyx":337
- *             s = ti_read(self.tabixfile, self.iterator, &len)
- *             if s == NULL: raise StopIteration
- *             if s[0] != '#': break             # <<<<<<<<<<<<<<
+    /* "pysam/ctabix.pyx":506
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ *         return self.parser.parse(self.buffer.s, self.buffer.l)
  * 
- *         retval = _charptr_to_str( s )
  */
-    __pyx_t_1 = ((__pyx_v_s[0]) != '#');
-    if (__pyx_t_1) {
-      goto __pyx_L4_break;
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L4_break:;
 
-  /* "pysam/ctabix.pyx":339
- *             if s[0] != '#': break
+  /* "pysam/ctabix.pyx":507
+ *         if retval < 0:
+ *             raise StopIteration
+ *         return self.parser.parse(self.buffer.s, self.buffer.l)             # <<<<<<<<<<<<<<
  * 
- *         retval = _charptr_to_str( s )             # <<<<<<<<<<<<<<
- *         return retval
  * 
  */
-  __pyx_t_2 = __pyx_f_5pysam_6ctabix__charptr_to_str(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_6ctabix_Parser *)__pyx_v_self->parser->__pyx_vtab)->parse(__pyx_v_self->parser, __pyx_v_self->__pyx_base.buffer.s, __pyx_v_self->__pyx_base.buffer.l); 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_v_retval = __pyx_t_2;
+  __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
+  goto __pyx_L0;
 
-  /* "pysam/ctabix.pyx":340
+  /* "pysam/ctabix.pyx":498
+ *         self.parser = parser
  * 
- *         retval = _charptr_to_str( s )
- *         return retval             # <<<<<<<<<<<<<<
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
  * 
- *     def __dealloc__(self):
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_retval);
-  __pyx_r = __pyx_v_retval;
-  goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.TabixIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.TabixIteratorParsed.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_retval);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* Python wrapper */
-static void __pyx_pw_5pysam_6ctabix_13TabixIterator_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_6ctabix_13TabixIterator_7__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_6ctabix_13TabixIterator_6__dealloc__(((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/ctabix.pyx":342
- *         return retval
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         if <void*>self.iterator != NULL:
- *             ti_iter_destroy(self.iterator)
- */
-
-static void __pyx_pf_5pysam_6ctabix_13TabixIterator_6__dealloc__(struct __pyx_obj_5pysam_6ctabix_TabixIterator *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-
-  /* "pysam/ctabix.pyx":343
- * 
- *     def __dealloc__(self):
- *         if <void*>self.iterator != NULL:             # <<<<<<<<<<<<<<
- *             ti_iter_destroy(self.iterator)
- * 
- */
-  __pyx_t_1 = (((void *)__pyx_v_self->iterator) != NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/ctabix.pyx":344
- *     def __dealloc__(self):
- *         if <void*>self.iterator != NULL:
- *             ti_iter_destroy(self.iterator)             # <<<<<<<<<<<<<<
+/* "pysam/ctabix.pyx":511
  * 
- * cdef class TabixHeaderIterator:
+ * cdef class GZIterator:
+ *     def __init__(self, filename, int buffer_size=65536):             # <<<<<<<<<<<<<<
+ *         '''iterate line-by-line through gzip (or bgzip)
+ *         compressed file.
  */
-    ti_iter_destroy(__pyx_v_self->iterator);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __Pyx_RefNannyFinishContext();
-}
 
 /* Python wrapper */
-static int __pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile = 0;
+static int __pyx_pw_5pysam_6ctabix_10GZIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_10GZIterator___init__[] = "iterate line-by-line through gzip (or bgzip)\n        compressed file.\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_10GZIterator___init__;
+#endif
+static int __pyx_pw_5pysam_6ctabix_10GZIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_filename = 0;
+  int __pyx_v_buffer_size;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tabixfile,0};
-    PyObject* values[1] = {0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_buffer_size,0};
+    PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
       switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
         case  0: break;
         default: goto __pyx_L5_argtuple_error;
@@ -4787,747 +5618,690 @@ static int __pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_1__cinit__(PyObject *__
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tabixfile)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buffer_size);
+          if (value) { values[1] = value; kw_args--; }
+        }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
-      goto __pyx_L5_argtuple_error;
     } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 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);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_filename = values[0];
+    if (values[1]) {
+      __pyx_v_buffer_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_buffer_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_buffer_size = ((int)65536);
     }
-    __pyx_v_tabixfile = ((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)values[0]);
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.ctabix.TabixHeaderIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.GZIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return -1;
   __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tabixfile), __pyx_ptype_5pysam_6ctabix_Tabixfile, 1, "tabixfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_6ctabix_19TabixHeaderIterator___cinit__(((struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *)__pyx_v_self), __pyx_v_tabixfile);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
+  __pyx_r = __pyx_pf_5pysam_6ctabix_10GZIterator___init__(((struct __pyx_obj_5pysam_6ctabix_GZIterator *)__pyx_v_self), __pyx_v_filename, __pyx_v_buffer_size);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":350
- *     """
- * 
- *     def __cinit__(self, Tabixfile tabixfile ):             # <<<<<<<<<<<<<<
- * 
- *         assert tabixfile._isOpen()
- */
-
-static int __pyx_pf_5pysam_6ctabix_19TabixHeaderIterator___cinit__(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *__pyx_v_self, struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile) {
+static int __pyx_pf_5pysam_6ctabix_10GZIterator___init__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self, PyObject *__pyx_v_filename, int __pyx_v_buffer_size) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  tabix_t *__pyx_t_4;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  char *__pyx_t_6;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_INCREF(__pyx_v_filename);
 
-  /* "pysam/ctabix.pyx":352
- *     def __cinit__(self, Tabixfile tabixfile ):
- * 
- *         assert tabixfile._isOpen()             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":515
+ *         compressed file.
+ *         '''
+ *         if not os.path.exists(filename):             # <<<<<<<<<<<<<<
+ *             raise IOError("No such file or directory: %s" % filename)
  * 
- *         # makes sure that samfile stays alive as long as the
  */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_tabixfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); 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_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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (unlikely(!__pyx_t_3)) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
+  __pyx_t_2 = PyTuple_New(1); 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_INCREF(__pyx_v_filename);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
+  __Pyx_GIVEREF(__pyx_v_filename);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __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_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_5 = ((!__pyx_t_4) != 0);
+  if (__pyx_t_5) {
 
-  /* "pysam/ctabix.pyx":356
- *         # makes sure that samfile stays alive as long as the
- *         # iterator is alive.
- *         self.tabixfile = tabixfile.tabixfile             # <<<<<<<<<<<<<<
+    /* "pysam/ctabix.pyx":516
+ *         '''
+ *         if not os.path.exists(filename):
+ *             raise IOError("No such file or directory: %s" % filename)             # <<<<<<<<<<<<<<
  * 
- *         self.iterator = ti_query(self.tabixfile, NULL, 0, 0)
+ *         filename = _encodeFilename(filename)
  */
-  __pyx_t_4 = __pyx_v_tabixfile->tabixfile;
-  __pyx_v_self->tabixfile = __pyx_t_4;
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_No_such_file_or_directory_s, __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __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 = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* "pysam/ctabix.pyx":358
- *         self.tabixfile = tabixfile.tabixfile
+  /* "pysam/ctabix.pyx":518
+ *             raise IOError("No such file or directory: %s" % filename)
  * 
- *         self.iterator = ti_query(self.tabixfile, NULL, 0, 0)             # <<<<<<<<<<<<<<
- * 
- *         if <void*>self.iterator == NULL:
+ *         filename = _encodeFilename(filename)             # <<<<<<<<<<<<<<
+ *         self.gzipfile = gzopen(filename, "r")
+ *         self._filename = filename
  */
-  __pyx_v_self->iterator = ti_query(__pyx_v_self->tabixfile, NULL, 0, 0);
+  __pyx_t_3 = __pyx_f_5pysam_6ctabix__encodeFilename(__pyx_v_filename); 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_SET(__pyx_v_filename, __pyx_t_3);
+  __pyx_t_3 = 0;
 
-  /* "pysam/ctabix.pyx":360
- *         self.iterator = ti_query(self.tabixfile, NULL, 0, 0)
- * 
- *         if <void*>self.iterator == NULL:             # <<<<<<<<<<<<<<
- *             raise ValueError("can't open header.\n")
+  /* "pysam/ctabix.pyx":519
  * 
+ *         filename = _encodeFilename(filename)
+ *         self.gzipfile = gzopen(filename, "r")             # <<<<<<<<<<<<<<
+ *         self._filename = filename
+ *         self.kstream = ks_init(self.gzipfile)
  */
-  __pyx_t_3 = (((void *)__pyx_v_self->iterator) == NULL);
-  if (__pyx_t_3) {
+  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->gzipfile = gzopen(__pyx_t_6, __pyx_k_r);
 
-    /* "pysam/ctabix.pyx":361
- * 
- *         if <void*>self.iterator == NULL:
- *             raise ValueError("can't open header.\n")             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":520
+ *         filename = _encodeFilename(filename)
+ *         self.gzipfile = gzopen(filename, "r")
+ *         self._filename = filename             # <<<<<<<<<<<<<<
+ *         self.kstream = ks_init(self.gzipfile)
  * 
- *     def __iter__(self):
  */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_27), NULL); 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_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __pyx_r = 0;
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.TabixHeaderIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_3__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_2__iter__(((struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  __Pyx_INCREF(__pyx_v_filename);
+  __Pyx_GIVEREF(__pyx_v_filename);
+  __Pyx_GOTREF(__pyx_v_self->_filename);
+  __Pyx_DECREF(__pyx_v_self->_filename);
+  __pyx_v_self->_filename = __pyx_v_filename;
 
-/* "pysam/ctabix.pyx":363
- *             raise ValueError("can't open header.\n")
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
+  /* "pysam/ctabix.pyx":521
+ *         self.gzipfile = gzopen(filename, "r")
+ *         self._filename = filename
+ *         self.kstream = ks_init(self.gzipfile)             # <<<<<<<<<<<<<<
  * 
+ *         self.buffer.l = 0
  */
+  __pyx_v_self->kstream = ks_init(__pyx_v_self->gzipfile);
 
-static PyObject *__pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_2__iter__(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-
-  /* "pysam/ctabix.pyx":364
- * 
- *     def __iter__(self):
- *         return self             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":523
+ *         self.kstream = ks_init(self.gzipfile)
  * 
- *     def __next__(self):
+ *         self.buffer.l = 0             # <<<<<<<<<<<<<<
+ *         self.buffer.m = 0
+ *         self.buffer.s = <char*>malloc(buffer_size)
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_5__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_19TabixHeaderIterator_4__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_19TabixHeaderIterator_4__next__;
-#endif
-static PyObject *__pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_5__next__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_4__next__(((struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  __pyx_v_self->buffer.l = 0;
 
-/* "pysam/ctabix.pyx":366
- *         return self
+  /* "pysam/ctabix.pyx":524
  * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
+ *         self.buffer.l = 0
+ *         self.buffer.m = 0             # <<<<<<<<<<<<<<
+ *         self.buffer.s = <char*>malloc(buffer_size)
  * 
  */
+  __pyx_v_self->buffer.m = 0;
 
-static PyObject *__pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_4__next__(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *__pyx_v_self) {
-  char *__pyx_v_s;
-  int __pyx_v_len;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__next__", 0);
-
-  /* "pysam/ctabix.pyx":377
- *         # Getting the metachar is a pain as ti_index_t is incomplete type.
- *         # simply use '#' for now.
- *         s = ti_read(self.tabixfile, self.iterator, &len)             # <<<<<<<<<<<<<<
- *         if s == NULL: raise StopIteration
- *         # stop at first non-header line
- */
-  __pyx_v_s = ti_read(__pyx_v_self->tabixfile, __pyx_v_self->iterator, (&__pyx_v_len));
-
-  /* "pysam/ctabix.pyx":378
- *         # simply use '#' for now.
- *         s = ti_read(self.tabixfile, self.iterator, &len)
- *         if s == NULL: raise StopIteration             # <<<<<<<<<<<<<<
- *         # stop at first non-header line
- *         if s[0] != '#': raise StopIteration
- */
-  __pyx_t_1 = (__pyx_v_s == NULL);
-  if (__pyx_t_1) {
-    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "pysam/ctabix.pyx":380
- *         if s == NULL: raise StopIteration
- *         # stop at first non-header line
- *         if s[0] != '#': raise StopIteration             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":525
+ *         self.buffer.l = 0
+ *         self.buffer.m = 0
+ *         self.buffer.s = <char*>malloc(buffer_size)             # <<<<<<<<<<<<<<
  * 
- *         return s
+ *     def __dealloc__(self):
  */
-  __pyx_t_1 = ((__pyx_v_s[0]) != '#');
-  if (__pyx_t_1) {
-    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
+  __pyx_v_self->buffer.s = ((char *)malloc(__pyx_v_buffer_size));
 
-  /* "pysam/ctabix.pyx":382
- *         if s[0] != '#': raise StopIteration
- * 
- *         return s             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":511
  * 
- *     def __dealloc__(self):
+ * cdef class GZIterator:
+ *     def __init__(self, filename, int buffer_size=65536):             # <<<<<<<<<<<<<<
+ *         '''iterate line-by-line through gzip (or bgzip)
+ *         compressed file.
  */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __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;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  /* function exit code */
+  __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.TabixHeaderIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pysam.ctabix.GZIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_XDECREF(__pyx_v_filename);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":527
+ *         self.buffer.s = <char*>malloc(buffer_size)
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         '''close file.'''
+ *         if self.gzipfile != NULL:
+ */
+
 /* Python wrapper */
-static void __pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_7__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_5pysam_6ctabix_10GZIterator_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_6ctabix_10GZIterator_3__dealloc__(PyObject *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_6__dealloc__(((struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *)__pyx_v_self));
+  __pyx_pf_5pysam_6ctabix_10GZIterator_2__dealloc__(((struct __pyx_obj_5pysam_6ctabix_GZIterator *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
 }
 
-/* "pysam/ctabix.pyx":384
- *         return s
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         if <void*>self.iterator != NULL:
- *             ti_iter_destroy(self.iterator)
- */
-
-static void __pyx_pf_5pysam_6ctabix_19TabixHeaderIterator_6__dealloc__(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator *__pyx_v_self) {
+static void __pyx_pf_5pysam_6ctabix_10GZIterator_2__dealloc__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
   __Pyx_RefNannySetupContext("__dealloc__", 0);
 
-  /* "pysam/ctabix.pyx":385
- * 
+  /* "pysam/ctabix.pyx":529
  *     def __dealloc__(self):
- *         if <void*>self.iterator != NULL:             # <<<<<<<<<<<<<<
- *             ti_iter_destroy(self.iterator)
- * 
+ *         '''close file.'''
+ *         if self.gzipfile != NULL:             # <<<<<<<<<<<<<<
+ *             gzclose(self.gzipfile)
+ *             self.gzipfile = NULL
  */
-  __pyx_t_1 = (((void *)__pyx_v_self->iterator) != NULL);
+  __pyx_t_1 = ((__pyx_v_self->gzipfile != NULL) != 0);
   if (__pyx_t_1) {
 
-    /* "pysam/ctabix.pyx":386
- *     def __dealloc__(self):
- *         if <void*>self.iterator != NULL:
- *             ti_iter_destroy(self.iterator)             # <<<<<<<<<<<<<<
- * 
+    /* "pysam/ctabix.pyx":530
+ *         '''close file.'''
+ *         if self.gzipfile != NULL:
+ *             gzclose(self.gzipfile)             # <<<<<<<<<<<<<<
+ *             self.gzipfile = NULL
+ *         free(self.buffer.s)
+ */
+    gzclose(__pyx_v_self->gzipfile);
+
+    /* "pysam/ctabix.pyx":531
+ *         if self.gzipfile != NULL:
+ *             gzclose(self.gzipfile)
+ *             self.gzipfile = NULL             # <<<<<<<<<<<<<<
+ *         free(self.buffer.s)
  * 
  */
-    ti_iter_destroy(__pyx_v_self->iterator);
+    __pyx_v_self->gzipfile = NULL;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/ctabix.pyx":394
- * cdef class Parser:
- * 
- *     cdef parse(self, char * buffer, int length):             # <<<<<<<<<<<<<<
- *         raise NotImplementedError
+  /* "pysam/ctabix.pyx":532
+ *             gzclose(self.gzipfile)
+ *             self.gzipfile = NULL
+ *         free(self.buffer.s)             # <<<<<<<<<<<<<<
  * 
+ *     def __iter__(self):
  */
+  free(__pyx_v_self->buffer.s);
 
-static PyObject *__pyx_f_5pysam_6ctabix_6Parser_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_self, CYTHON_UNUSED char *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_length) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("parse", 0);
-
-  /* "pysam/ctabix.pyx":395
- * 
- *     cdef parse(self, char * buffer, int length):
- *         raise NotImplementedError             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":527
+ *         self.buffer.s = <char*>malloc(buffer_size)
  * 
- *     def __call__(self, char * buffer, int length):
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         '''close file.'''
+ *         if self.gzipfile != NULL:
  */
-  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.ctabix.Parser.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
-  return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":534
+ *         free(self.buffer.s)
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_6Parser_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_5pysam_6ctabix_6Parser_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  char *__pyx_v_buffer;
-  int __pyx_v_length;
+static PyObject *__pyx_pw_5pysam_6ctabix_10GZIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_6ctabix_10GZIterator_5__iter__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__buffer,&__pyx_n_s__length,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buffer)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__length)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-    }
-    __pyx_v_buffer = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_length = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.ctabix.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_6ctabix_6Parser___call__(((struct __pyx_obj_5pysam_6ctabix_Parser *)__pyx_v_self), __pyx_v_buffer, __pyx_v_length);
+  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_10GZIterator_4__iter__(((struct __pyx_obj_5pysam_6ctabix_GZIterator *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":397
- *         raise NotImplementedError
- * 
- *     def __call__(self, char * buffer, int length):             # <<<<<<<<<<<<<<
- *         return self.parse( buffer, length )
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_6Parser___call__(struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_length) {
+static PyObject *__pyx_pf_5pysam_6ctabix_10GZIterator_4__iter__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__call__", 0);
+  __Pyx_RefNannySetupContext("__iter__", 0);
 
-  /* "pysam/ctabix.pyx":398
+  /* "pysam/ctabix.pyx":535
  * 
- *     def __call__(self, char * buffer, int length):
- *         return self.parse( buffer, length )             # <<<<<<<<<<<<<<
+ *     def __iter__(self):
+ *         return self             # <<<<<<<<<<<<<<
  * 
- * cdef class asTuple(Parser):
+ *     cdef int __cnext__(self):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_6ctabix_Parser *)__pyx_v_self->__pyx_vtab)->parse(__pyx_v_self, __pyx_v_buffer, __pyx_v_length); 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_r = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.ctabix.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  /* "pysam/ctabix.pyx":534
+ *         free(self.buffer.s)
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":405
- *     Access is by numeric index.
- *     '''
- *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
- *         cdef TabProxies.TupleProxy r
- *         r = TabProxies.TupleProxy()
+/* "pysam/ctabix.pyx":537
+ *         return self
+ * 
+ *     cdef int __cnext__(self):             # <<<<<<<<<<<<<<
+ *         cdef int dret = 0
+ *         cdef int retval = 0
  */
 
-static PyObject *__pyx_f_5pysam_6ctabix_7asTuple_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_asTuple *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
-  struct __pyx_obj_5pysam_10TabProxies_TupleProxy *__pyx_v_r = 0;
-  PyObject *__pyx_r = NULL;
+static int __pyx_f_5pysam_6ctabix_10GZIterator___cnext__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self) {
+  int __pyx_v_dret;
+  int __pyx_v_retval;
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("parse", 0);
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("__cnext__", 0);
 
-  /* "pysam/ctabix.pyx":407
- *     cdef parse(self, char * buffer, int len):
- *         cdef TabProxies.TupleProxy r
- *         r = TabProxies.TupleProxy()             # <<<<<<<<<<<<<<
- *         # need to copy - there were some
- *         # persistence issues with "present"
+  /* "pysam/ctabix.pyx":538
+ * 
+ *     cdef int __cnext__(self):
+ *         cdef int dret = 0             # <<<<<<<<<<<<<<
+ *         cdef int retval = 0
+ *         while 1:
  */
-  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_TupleProxy)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_r = ((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __pyx_v_dret = 0;
 
-  /* "pysam/ctabix.pyx":410
- *         # need to copy - there were some
- *         # persistence issues with "present"
- *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
- *         return r
- * 
+  /* "pysam/ctabix.pyx":539
+ *     cdef int __cnext__(self):
+ *         cdef int dret = 0
+ *         cdef int retval = 0             # <<<<<<<<<<<<<<
+ *         while 1:
+ *             retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *)__pyx_v_r->__pyx_vtab)->copy(__pyx_v_r, __pyx_v_buffer, __pyx_v_len); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_retval = 0;
 
-  /* "pysam/ctabix.pyx":411
- *         # persistence issues with "present"
- *         r.copy( buffer, len )
- *         return r             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":540
+ *         cdef int dret = 0
+ *         cdef int retval = 0
+ *         while 1:             # <<<<<<<<<<<<<<
+ *             retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)
  * 
- * cdef class asGTF(Parser):
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_r));
-  __pyx_r = ((PyObject *)__pyx_v_r);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.ctabix.asTuple.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_r);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  while (1) {
 
-/* "pysam/ctabix.pyx":444
+    /* "pysam/ctabix.pyx":541
+ *         cdef int retval = 0
+ *         while 1:
+ *             retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)             # <<<<<<<<<<<<<<
  * 
- *     '''
- *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
- *         cdef TabProxies.GTFProxy r
- *         r = TabProxies.GTFProxy()
+ *             if retval < 0:
  */
+    __pyx_v_retval = ks_getuntil(__pyx_v_self->kstream, '\n', (&__pyx_v_self->buffer), (&__pyx_v_dret));
 
-static PyObject *__pyx_f_5pysam_6ctabix_5asGTF_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_asGTF *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
-  struct __pyx_obj_5pysam_10TabProxies_GTFProxy *__pyx_v_r = 0;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("parse", 0);
+    /* "pysam/ctabix.pyx":543
+ *             retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)
+ * 
+ *             if retval < 0:             # <<<<<<<<<<<<<<
+ *                 break
+ * 
+ */
+    __pyx_t_1 = ((__pyx_v_retval < 0) != 0);
+    if (__pyx_t_1) {
 
-  /* "pysam/ctabix.pyx":446
- *     cdef parse(self, char * buffer, int len):
- *         cdef TabProxies.GTFProxy r
- *         r = TabProxies.GTFProxy()             # <<<<<<<<<<<<<<
- *         r.copy( buffer, len )
- *         return r
+      /* "pysam/ctabix.pyx":544
+ * 
+ *             if retval < 0:
+ *                 break             # <<<<<<<<<<<<<<
+ * 
+ *             return dret
  */
-  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_GTFProxy)), ((PyObject *)__pyx_empty_tuple), NULL); 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_v_r = ((struct __pyx_obj_5pysam_10TabProxies_GTFProxy *)__pyx_t_1);
-  __pyx_t_1 = 0;
+      goto __pyx_L4_break;
+    }
 
-  /* "pysam/ctabix.pyx":447
- *         cdef TabProxies.GTFProxy r
- *         r = TabProxies.GTFProxy()
- *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
- *         return r
+    /* "pysam/ctabix.pyx":546
+ *                 break
+ * 
+ *             return dret             # <<<<<<<<<<<<<<
+ *         return -1
  * 
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *)__pyx_v_r->__pyx_base.__pyx_vtab)->__pyx_base.copy(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_v_dret;
+    goto __pyx_L0;
+  }
+  __pyx_L4_break:;
 
-  /* "pysam/ctabix.pyx":448
- *         r = TabProxies.GTFProxy()
- *         r.copy( buffer, len )
- *         return r             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":547
  * 
- * cdef class asBed( Parser ):
+ *             return dret
+ *         return -1             # <<<<<<<<<<<<<<
+ * 
+ *     def __next__(self):
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_r));
-  __pyx_r = ((PyObject *)__pyx_v_r);
+  __pyx_r = -1;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.ctabix.asGTF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
+  /* "pysam/ctabix.pyx":537
+ *         return self
+ * 
+ *     cdef int __cnext__(self):             # <<<<<<<<<<<<<<
+ *         cdef int dret = 0
+ *         cdef int retval = 0
+ */
+
+  /* function exit code */
   __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_r);
-  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":484
+/* "pysam/ctabix.pyx":549
+ *         return -1
  * 
- *     '''
- *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
- *         cdef TabProxies.BedProxy r
- *         r = TabProxies.BedProxy()
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
  */
 
-static PyObject *__pyx_f_5pysam_6ctabix_5asBed_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_asBed *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
-  struct __pyx_obj_5pysam_10TabProxies_BedProxy *__pyx_v_r = 0;
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_10GZIterator_7__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_10GZIterator_6__next__[] = "python version of next().\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_10GZIterator_6__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_6ctabix_10GZIterator_7__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_10GZIterator_6__next__(((struct __pyx_obj_5pysam_6ctabix_GZIterator *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_10GZIterator_6__next__(struct __pyx_obj_5pysam_6ctabix_GZIterator *__pyx_v_self) {
+  int __pyx_v_retval;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("parse", 0);
+  __Pyx_RefNannySetupContext("__next__", 0);
 
-  /* "pysam/ctabix.pyx":486
- *     cdef parse(self, char * buffer, int len):
- *         cdef TabProxies.BedProxy r
- *         r = TabProxies.BedProxy()             # <<<<<<<<<<<<<<
- *         r.copy( buffer, len )
- *         return r
+  /* "pysam/ctabix.pyx":552
+ *         """python version of next().
+ *         """
+ *         cdef int retval = self.__cnext__()             # <<<<<<<<<<<<<<
+ *         if retval < 0:
+ *             raise StopIteration
  */
-  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_BedProxy)), ((PyObject *)__pyx_empty_tuple), NULL); 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_v_r = ((struct __pyx_obj_5pysam_10TabProxies_BedProxy *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __pyx_v_retval = ((struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self);
 
-  /* "pysam/ctabix.pyx":487
- *         cdef TabProxies.BedProxy r
- *         r = TabProxies.BedProxy()
- *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
- *         return r
+  /* "pysam/ctabix.pyx":553
+ *         """
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:             # <<<<<<<<<<<<<<
+ *             raise StopIteration
+ *         return self.buffer.s
+ */
+  __pyx_t_1 = ((__pyx_v_retval < 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/ctabix.pyx":554
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ *         return self.buffer.s
  * 
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy *)__pyx_v_r->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* "pysam/ctabix.pyx":488
- *         r = TabProxies.BedProxy()
- *         r.copy( buffer, len )
- *         return r             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":555
+ *         if retval < 0:
+ *             raise StopIteration
+ *         return self.buffer.s             # <<<<<<<<<<<<<<
+ * 
  * 
- * cdef class asVCF( Parser ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_r));
-  __pyx_r = ((PyObject *)__pyx_v_r);
+  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->buffer.s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":549
+ *         return -1
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.ctabix.asBed.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.ctabix.GZIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_r);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":520
- * 
+/* "pysam/ctabix.pyx":563
  *     '''
- *     cdef parse(self, char * buffer, int len ):             # <<<<<<<<<<<<<<
- *         cdef TabProxies.VCFProxy r
- *         r = TabProxies.VCFProxy()
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
  */
 
-static PyObject *__pyx_f_5pysam_6ctabix_5asVCF_parse(CYTHON_UNUSED struct __pyx_obj_5pysam_6ctabix_asVCF *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
-  struct __pyx_obj_5pysam_10TabProxies_VCFProxy *__pyx_v_r = 0;
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_6ctabix_14GZIteratorHead_1__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_14GZIteratorHead___next__[] = "python version of next().\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_14GZIteratorHead___next__;
+#endif
+static PyObject *__pyx_pw_5pysam_6ctabix_14GZIteratorHead_1__next__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_14GZIteratorHead___next__(((struct __pyx_obj_5pysam_6ctabix_GZIteratorHead *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_14GZIteratorHead___next__(struct __pyx_obj_5pysam_6ctabix_GZIteratorHead *__pyx_v_self) {
+  int __pyx_v_retval;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("parse", 0);
+  __Pyx_RefNannySetupContext("__next__", 0);
 
-  /* "pysam/ctabix.pyx":522
- *     cdef parse(self, char * buffer, int len ):
- *         cdef TabProxies.VCFProxy r
- *         r = TabProxies.VCFProxy()             # <<<<<<<<<<<<<<
- *         r.copy( buffer, len )
- *         return r
+  /* "pysam/ctabix.pyx":566
+ *         """python version of next().
+ *         """
+ *         cdef int retval = self.__cnext__()             # <<<<<<<<<<<<<<
+ *         if retval < 0:
+ *             raise StopIteration
  */
-  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_10TabProxies_VCFProxy)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_r = ((struct __pyx_obj_5pysam_10TabProxies_VCFProxy *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __pyx_v_retval = ((struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorHead *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.__pyx___cnext__(((struct __pyx_obj_5pysam_6ctabix_GZIterator *)__pyx_v_self));
 
-  /* "pysam/ctabix.pyx":523
- *         cdef TabProxies.VCFProxy r
- *         r = TabProxies.VCFProxy()
- *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
- *         return r
+  /* "pysam/ctabix.pyx":567
+ *         """
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:             # <<<<<<<<<<<<<<
+ *             raise StopIteration
+ *         if self.buffer.s[0] == '#':
+ */
+  __pyx_t_1 = ((__pyx_v_retval < 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/ctabix.pyx":568
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ *         if self.buffer.s[0] == '#':
+ *             return self.buffer.s
+ */
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/ctabix.pyx":569
+ *         if retval < 0:
+ *             raise StopIteration
+ *         if self.buffer.s[0] == '#':             # <<<<<<<<<<<<<<
+ *             return self.buffer.s
+ *         else:
+ */
+  __pyx_t_1 = (((__pyx_v_self->__pyx_base.buffer.s[0]) == '#') != 0);
+  if (__pyx_t_1) {
+
+    /* "pysam/ctabix.pyx":570
+ *             raise StopIteration
+ *         if self.buffer.s[0] == '#':
+ *             return self.buffer.s             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise StopIteration
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.buffer.s); 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_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "pysam/ctabix.pyx":572
+ *             return self.buffer.s
+ *         else:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
+ * 
  * 
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *)__pyx_v_r->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* "pysam/ctabix.pyx":524
- *         r = TabProxies.VCFProxy()
- *         r.copy( buffer, len )
- *         return r             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":563
+ *     '''
  * 
- * #########################################################
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_r));
-  __pyx_r = ((PyObject *)__pyx_v_r);
-  goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.ctabix.asVCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pysam.ctabix.GZIteratorHead.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF((PyObject *)__pyx_v_r);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":580
+ *     '''
+ * 
+ *     def __init__(self, parser):             # <<<<<<<<<<<<<<
+ *         self.parser = parser
+ * 
+ */
+
 /* Python wrapper */
-static int __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile = 0;
-  int __pyx_v_tid;
-  int __pyx_v_start;
-  int __pyx_v_end;
-  struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser = 0;
+static int __pyx_pw_5pysam_6ctabix_16GZIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_6ctabix_16GZIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_parser = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tabixfile,&__pyx_n_s__tid,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__parser,0};
-    PyObject* values[5] = {0,0,0,0,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parser,0};
+    PyObject* values[1] = {0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
       switch (pos_args) {
-        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
         case  0: break;
         default: goto __pyx_L5_argtuple_error;
@@ -5535,279 +6309,106 @@ static int __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_1__cinit__(PyObject *__
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tabixfile)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tid)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  3:
-        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  4:
-        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
       goto __pyx_L5_argtuple_error;
     } else {
       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
     }
-    __pyx_v_tabixfile = ((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)values[0]);
-    __pyx_v_tid = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_start = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_end = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)values[4]);
+    __pyx_v_parser = values[0];
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.ctabix.TabixIteratorParsed.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.GZIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return -1;
   __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tabixfile), __pyx_ptype_5pysam_6ctabix_Tabixfile, 1, "tabixfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_5pysam_6ctabix_Parser, 1, "parser", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed___cinit__(((struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)__pyx_v_self), __pyx_v_tabixfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end, __pyx_v_parser);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = -1;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/ctabix.pyx":535
- *     """
- * 
- *     def __cinit__(self,             # <<<<<<<<<<<<<<
- *                   Tabixfile tabixfile,
- *                   int tid,
- */
-
-static int __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed___cinit__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self, struct __pyx_obj_5pysam_6ctabix_Tabixfile *__pyx_v_tabixfile, int __pyx_v_tid, int __pyx_v_start, int __pyx_v_end, struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser) {
-  int __pyx_r;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
-  tabix_t *__pyx_t_4;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__cinit__", 0);
-
-  /* "pysam/ctabix.pyx":542
- *                   Parser parser ):
- * 
- *         assert tabixfile._isOpen()             # <<<<<<<<<<<<<<
- *         self.parser = parser
- * 
- */
-  #ifndef CYTHON_WITHOUT_ASSERTIONS
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_tabixfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __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 = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (unlikely(!__pyx_t_3)) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  #endif
-
-  /* "pysam/ctabix.pyx":543
- * 
- *         assert tabixfile._isOpen()
- *         self.parser = parser             # <<<<<<<<<<<<<<
- * 
- *         # makes sure that samfile stays alive as long as the
- */
-  __Pyx_INCREF(((PyObject *)__pyx_v_parser));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_parser));
-  __Pyx_GOTREF(__pyx_v_self->parser);
-  __Pyx_DECREF(((PyObject *)__pyx_v_self->parser));
-  __pyx_v_self->parser = __pyx_v_parser;
-
-  /* "pysam/ctabix.pyx":547
- *         # makes sure that samfile stays alive as long as the
- *         # iterator is alive.
- *         self.tabixfile = tabixfile.tabixfile             # <<<<<<<<<<<<<<
- * 
- *         if tid < 0:
- */
-  __pyx_t_4 = __pyx_v_tabixfile->tabixfile;
-  __pyx_v_self->tabixfile = __pyx_t_4;
-
-  /* "pysam/ctabix.pyx":549
- *         self.tabixfile = tabixfile.tabixfile
- * 
- *         if tid < 0:             # <<<<<<<<<<<<<<
- *             # seek to start of file to ensure iteration is over
- *             # all entries.
- */
-  __pyx_t_3 = (__pyx_v_tid < 0);
-  if (__pyx_t_3) {
-
-    /* "pysam/ctabix.pyx":552
- *             # seek to start of file to ensure iteration is over
- *             # all entries.
- *             bgzf_seek( self.tabixfile.fp, 0, 0)             # <<<<<<<<<<<<<<
- *             self.iterator = ti_iter_first()
- *         else:
- */
-    bgzf_seek(__pyx_v_self->tabixfile->fp, 0, 0);
+  __pyx_r = __pyx_pf_5pysam_6ctabix_16GZIteratorParsed___init__(((struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *)__pyx_v_self), __pyx_v_parser);
 
-    /* "pysam/ctabix.pyx":553
- *             # all entries.
- *             bgzf_seek( self.tabixfile.fp, 0, 0)
- *             self.iterator = ti_iter_first()             # <<<<<<<<<<<<<<
- *         else:
- *             self.iterator = ti_queryi(self.tabixfile, tid, start, end)
- */
-    __pyx_v_self->iterator = ti_iter_first();
-    goto __pyx_L3;
-  }
-  /*else*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "pysam/ctabix.pyx":555
- *             self.iterator = ti_iter_first()
- *         else:
- *             self.iterator = ti_queryi(self.tabixfile, tid, start, end)             # <<<<<<<<<<<<<<
- * 
- *         if <void*>self.iterator == NULL:
- */
-    __pyx_v_self->iterator = ti_queryi(__pyx_v_self->tabixfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end);
-  }
-  __pyx_L3:;
+static int __pyx_pf_5pysam_6ctabix_16GZIteratorParsed___init__(struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *__pyx_v_self, PyObject *__pyx_v_parser) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
 
-  /* "pysam/ctabix.pyx":557
- *             self.iterator = ti_queryi(self.tabixfile, tid, start, end)
+  /* "pysam/ctabix.pyx":581
  * 
- *         if <void*>self.iterator == NULL:             # <<<<<<<<<<<<<<
- *             raise ValueError("malformatted query or wrong sequence name.\n")
+ *     def __init__(self, parser):
+ *         self.parser = parser             # <<<<<<<<<<<<<<
  * 
+ *     def __next__(self):
  */
-  __pyx_t_3 = (((void *)__pyx_v_self->iterator) == NULL);
-  if (__pyx_t_3) {
+  if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_5pysam_6ctabix_Parser))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_v_parser;
+  __Pyx_INCREF(__pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->parser);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->parser));
+  __pyx_v_self->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-    /* "pysam/ctabix.pyx":558
+  /* "pysam/ctabix.pyx":580
+ *     '''
  * 
- *         if <void*>self.iterator == NULL:
- *             raise ValueError("malformatted query or wrong sequence name.\n")             # <<<<<<<<<<<<<<
+ *     def __init__(self, parser):             # <<<<<<<<<<<<<<
+ *         self.parser = parser
  * 
- *     def __iter__(self):
  */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
 
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.TabixIteratorParsed.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.GZIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = -1;
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_3__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_3__iter__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_2__iter__(((struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "pysam/ctabix.pyx":560
- *             raise ValueError("malformatted query or wrong sequence name.\n")
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_2__iter__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__iter__", 0);
-
-  /* "pysam/ctabix.pyx":561
- * 
- *     def __iter__(self):
- *         return self             # <<<<<<<<<<<<<<
+/* "pysam/ctabix.pyx":583
+ *         self.parser = parser
  * 
- *     def __next__(self):
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
 
 /* Python wrapper */
-static PyObject *__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_5__next__(PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_19TabixIteratorParsed_4__next__[] = "python version of next().\n\n        pyrex uses this non-standard name instead of next()\n        ";
+static PyObject *__pyx_pw_5pysam_6ctabix_16GZIteratorParsed_3__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_6ctabix_16GZIteratorParsed_2__next__[] = "python version of next().\n        ";
 #if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_19TabixIteratorParsed_4__next__;
+struct wrapperbase __pyx_wrapperbase_5pysam_6ctabix_16GZIteratorParsed_2__next__;
 #endif
-static PyObject *__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_5__next__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_5pysam_6ctabix_16GZIteratorParsed_3__next__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_4__next__(((struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)__pyx_v_self));
+  __pyx_r = __pyx_pf_5pysam_6ctabix_16GZIteratorParsed_2__next__(((struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":563
- *         return self
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         """python version of next().
- * 
- */
-
-static PyObject *__pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_4__next__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self) {
-  char *__pyx_v_s;
-  int __pyx_v_len;
+static PyObject *__pyx_pf_5pysam_6ctabix_16GZIteratorParsed_2__next__(struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *__pyx_v_self) {
+  int __pyx_v_retval;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
@@ -5817,75 +6418,70 @@ static PyObject *__pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_4__next__(struct
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__next__", 0);
 
-  /* "pysam/ctabix.pyx":571
- *         cdef char * s
- *         cdef int len
- *         while 1:             # <<<<<<<<<<<<<<
- *             s = ti_read(self.tabixfile, self.iterator, &len)
- *             if s == NULL: raise StopIteration
- */
-  while (1) {
-    if (!1) break;
-
-    /* "pysam/ctabix.pyx":572
- *         cdef int len
- *         while 1:
- *             s = ti_read(self.tabixfile, self.iterator, &len)             # <<<<<<<<<<<<<<
- *             if s == NULL: raise StopIteration
- *             if s[0] != '#': break
+  /* "pysam/ctabix.pyx":586
+ *         """python version of next().
+ *         """
+ *         cdef int retval = self.__cnext__()             # <<<<<<<<<<<<<<
+ *         if retval < 0:
+ *             raise StopIteration
  */
-    __pyx_v_s = ti_read(__pyx_v_self->tabixfile, __pyx_v_self->iterator, (&__pyx_v_len));
+  __pyx_v_retval = ((struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorParsed *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.__pyx___cnext__(((struct __pyx_obj_5pysam_6ctabix_GZIterator *)__pyx_v_self));
 
-    /* "pysam/ctabix.pyx":573
- *         while 1:
- *             s = ti_read(self.tabixfile, self.iterator, &len)
- *             if s == NULL: raise StopIteration             # <<<<<<<<<<<<<<
- *             if s[0] != '#': break
+  /* "pysam/ctabix.pyx":587
+ *         """
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:             # <<<<<<<<<<<<<<
+ *             raise StopIteration
  * 
  */
-    __pyx_t_1 = (__pyx_v_s == NULL);
-    if (__pyx_t_1) {
-      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
+  __pyx_t_1 = ((__pyx_v_retval < 0) != 0);
+  if (__pyx_t_1) {
 
-    /* "pysam/ctabix.pyx":574
- *             s = ti_read(self.tabixfile, self.iterator, &len)
- *             if s == NULL: raise StopIteration
- *             if s[0] != '#': break             # <<<<<<<<<<<<<<
+    /* "pysam/ctabix.pyx":588
+ *         cdef int retval = self.__cnext__()
+ *         if retval < 0:
+ *             raise StopIteration             # <<<<<<<<<<<<<<
  * 
- *         return self.parser.parse(s, len)
+ *         return self.parser.parse(self.buffer.s,
  */
-    __pyx_t_1 = ((__pyx_v_s[0]) != '#');
-    if (__pyx_t_1) {
-      goto __pyx_L4_break;
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
+    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L4_break:;
 
-  /* "pysam/ctabix.pyx":576
- *             if s[0] != '#': break
+  /* "pysam/ctabix.pyx":590
+ *             raise StopIteration
  * 
- *         return self.parser.parse(s, len)             # <<<<<<<<<<<<<<
+ *         return self.parser.parse(self.buffer.s,             # <<<<<<<<<<<<<<
+ *                                  self.buffer.l)
  * 
- *     def __dealloc__(self):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_6ctabix_Parser *)__pyx_v_self->parser->__pyx_vtab)->parse(__pyx_v_self->parser, __pyx_v_s, __pyx_v_len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/ctabix.pyx":591
+ * 
+ *         return self.parser.parse(self.buffer.s,
+ *                                  self.buffer.l)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_6ctabix_Parser *)__pyx_v_self->parser->__pyx_vtab)->parse(__pyx_v_self->parser, __pyx_v_self->__pyx_base.buffer.s, __pyx_v_self->__pyx_base.buffer.l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":583
+ *         self.parser = parser
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         """python version of next().
+ *         """
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.ctabix.TabixIteratorParsed.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("pysam.ctabix.GZIteratorParsed.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -5893,68 +6489,40 @@ static PyObject *__pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_4__next__(struct
   return __pyx_r;
 }
 
-/* Python wrapper */
-static void __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_7__dealloc__(PyObject *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_6__dealloc__(((struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)__pyx_v_self));
-  __Pyx_RefNannyFinishContext();
-}
-
-/* "pysam/ctabix.pyx":578
- *         return self.parser.parse(s, len)
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         if <void*>self.iterator != NULL:
- *             ti_iter_destroy(self.iterator)
- */
-
-static void __pyx_pf_5pysam_6ctabix_19TabixIteratorParsed_6__dealloc__(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *__pyx_v_self) {
-  __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
-
-  /* "pysam/ctabix.pyx":579
- * 
- *     def __dealloc__(self):
- *         if <void*>self.iterator != NULL:             # <<<<<<<<<<<<<<
- *             ti_iter_destroy(self.iterator)
+/* "pysam/ctabix.pyx":594
  * 
- */
-  __pyx_t_1 = (((void *)__pyx_v_self->iterator) != NULL);
-  if (__pyx_t_1) {
-
-    /* "pysam/ctabix.pyx":580
- *     def __dealloc__(self):
- *         if <void*>self.iterator != NULL:
- *             ti_iter_destroy(self.iterator)             # <<<<<<<<<<<<<<
  * 
- * def tabix_compress( filename_in,
+ * def tabix_compress(filename_in,             # <<<<<<<<<<<<<<
+ *                    filename_out,
+ *                    force=False):
  */
-    ti_iter_destroy(__pyx_v_self->iterator);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  __Pyx_RefNannyFinishContext();
-}
 
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_1tabix_compress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_tabix_compress[] = "tabix_compress(filename_in, filename_out, force=False)\n\n    compress *filename_in* writing the output to *filename_out*.\n    \n    Raise an IOError if *filename_out* already exists, unless *force* is set.\n    ";
+static char __pyx_doc_5pysam_6ctabix_tabix_compress[] = "tabix_compress(filename_in, filename_out, force=False)\ncompress *filename_in* writing the output to *filename_out*.\n    \n    Raise an IOError if *filename_out* already exists, unless *force*\n    is set.\n    ";
 static PyMethodDef __pyx_mdef_5pysam_6ctabix_1tabix_compress = {__Pyx_NAMESTR("tabix_compress"), (PyCFunction)__pyx_pw_5pysam_6ctabix_1tabix_compress, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_tabix_compress)};
 static PyObject *__pyx_pw_5pysam_6ctabix_1tabix_compress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_filename_in = 0;
   PyObject *__pyx_v_filename_out = 0;
   PyObject *__pyx_v_force = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("tabix_compress (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename_in,&__pyx_n_s__filename_out,&__pyx_n_s__force,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename_in,&__pyx_n_s_filename_out,&__pyx_n_s_force,0};
     PyObject* values[3] = {0,0,0};
-    values[2] = __pyx_k_29;
+
+    /* "pysam/ctabix.pyx":596
+ * def tabix_compress(filename_in,
+ *                    filename_out,
+ *                    force=False):             # <<<<<<<<<<<<<<
+ *     '''compress *filename_in* writing the output to *filename_out*.
+ * 
+ */
+    values[2] = ((PyObject *)Py_False);
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -5968,21 +6536,21 @@ static PyObject *__pyx_pw_5pysam_6ctabix_1tabix_compress(PyObject *__pyx_self, P
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename_in)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename_in)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename_out)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename_out)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__force);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
           if (value) { values[2] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tabix_compress") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tabix_compress") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -5999,25 +6567,27 @@ static PyObject *__pyx_pw_5pysam_6ctabix_1tabix_compress(PyObject *__pyx_self, P
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.ctabix.tabix_compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_6ctabix_tabix_compress(__pyx_self, __pyx_v_filename_in, __pyx_v_filename_out, __pyx_v_force);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
 
-/* "pysam/ctabix.pyx":582
- *             ti_iter_destroy(self.iterator)
+  /* "pysam/ctabix.pyx":594
  * 
- * def tabix_compress( filename_in,             # <<<<<<<<<<<<<<
- *                     filename_out,
- *                     force = False ):
+ * 
+ * def tabix_compress(filename_in,             # <<<<<<<<<<<<<<
+ *                    filename_out,
+ *                    force=False):
  */
 
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
 static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename_in, PyObject *__pyx_v_filename_out, PyObject *__pyx_v_force) {
   int __pyx_v_WINDOW_SIZE;
   int __pyx_v_c;
@@ -6036,40 +6606,41 @@ static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *
   PyObject *__pyx_t_5 = NULL;
   int __pyx_t_6;
   int __pyx_t_7;
-  char *__pyx_t_8;
+  char const *__pyx_t_8;
+  char *__pyx_t_9;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("tabix_compress", 0);
 
-  /* "pysam/ctabix.pyx":591
+  /* "pysam/ctabix.pyx":603
  *     '''
  * 
  *     if not force and os.path.exists(filename_out ):             # <<<<<<<<<<<<<<
- *         raise IOError( "Filename '%s' already exists, use *force* to overwrite" % filename_out)
- * 
+ *         raise IOError(
+ *             "Filename '%s' already exists, use *force* to overwrite" % filename_out)
  */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_t_2 = (!__pyx_t_1);
   if (__pyx_t_2) {
-    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); 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_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __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_4, __pyx_n_s__exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); 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_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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_INCREF(__pyx_v_filename_out);
     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename_out);
     __Pyx_GIVEREF(__pyx_v_filename_out);
-    __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __pyx_t_6 = __pyx_t_1;
   } else {
@@ -6077,47 +6648,53 @@ static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *
   }
   if (__pyx_t_6) {
 
-    /* "pysam/ctabix.pyx":592
- * 
+    /* "pysam/ctabix.pyx":605
  *     if not force and os.path.exists(filename_out ):
- *         raise IOError( "Filename '%s' already exists, use *force* to overwrite" % filename_out)             # <<<<<<<<<<<<<<
+ *         raise IOError(
+ *             "Filename '%s' already exists, use *force* to overwrite" % filename_out)             # <<<<<<<<<<<<<<
  * 
  *     cdef int WINDOW_SIZE
  */
-    __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), __pyx_v_filename_out); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __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 = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Filename_s_already_exists_use_fo, __pyx_v_filename_out); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+
+    /* "pysam/ctabix.pyx":604
+ * 
+ *     if not force and os.path.exists(filename_out ):
+ *         raise IOError(             # <<<<<<<<<<<<<<
+ *             "Filename '%s' already exists, use *force* to overwrite" % filename_out)
+ * 
+ */
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
+    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_builtin_IOError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":601
+  /* "pysam/ctabix.pyx":614
  * 
  *     cdef int O_RDONLY
  *     O_RDONLY = os.O_RDONLY             # <<<<<<<<<<<<<<
  * 
  *     WINDOW_SIZE = 64 * 1024
  */
-  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__O_RDONLY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_O_RDONLY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __pyx_v_O_RDONLY = __pyx_t_7;
 
-  /* "pysam/ctabix.pyx":603
+  /* "pysam/ctabix.pyx":616
  *     O_RDONLY = os.O_RDONLY
  * 
  *     WINDOW_SIZE = 64 * 1024             # <<<<<<<<<<<<<<
@@ -6126,105 +6703,100 @@ static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *
  */
   __pyx_v_WINDOW_SIZE = 65536;
 
-  /* "pysam/ctabix.pyx":605
+  /* "pysam/ctabix.pyx":618
  *     WINDOW_SIZE = 64 * 1024
  * 
  *     fn = _force_bytes(filename_out)             # <<<<<<<<<<<<<<
  *     fp = bgzf_open( fn, "w")
  *     if fp == NULL:
  */
-  __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_filename_out)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_filename_out); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __pyx_v_fn = ((PyObject*)__pyx_t_4);
   __pyx_t_4 = 0;
 
-  /* "pysam/ctabix.pyx":606
+  /* "pysam/ctabix.pyx":619
  * 
  *     fn = _force_bytes(filename_out)
  *     fp = bgzf_open( fn, "w")             # <<<<<<<<<<<<<<
  *     if fp == NULL:
- *         raise IOError( "could not open '%s' for writing" )
+ *         raise IOError("could not open '%s' for writing")
  */
-  __pyx_t_8 = PyBytes_AsString(((PyObject *)__pyx_v_fn)); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_fp = bgzf_open(__pyx_t_8, __pyx_k__w);
+  __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_fn); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_fp = bgzf_open(__pyx_t_8, __pyx_k_w);
 
-  /* "pysam/ctabix.pyx":607
+  /* "pysam/ctabix.pyx":620
  *     fn = _force_bytes(filename_out)
  *     fp = bgzf_open( fn, "w")
  *     if fp == NULL:             # <<<<<<<<<<<<<<
- *         raise IOError( "could not open '%s' for writing" )
+ *         raise IOError("could not open '%s' for writing")
  * 
  */
-  __pyx_t_6 = (__pyx_v_fp == NULL);
+  __pyx_t_6 = ((__pyx_v_fp == NULL) != 0);
   if (__pyx_t_6) {
 
-    /* "pysam/ctabix.pyx":608
+    /* "pysam/ctabix.pyx":621
  *     fp = bgzf_open( fn, "w")
  *     if fp == NULL:
- *         raise IOError( "could not open '%s' for writing" )             # <<<<<<<<<<<<<<
+ *         raise IOError("could not open '%s' for writing")             # <<<<<<<<<<<<<<
  * 
  *     fn = _force_bytes(filename_in)
  */
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L4:;
 
-  /* "pysam/ctabix.pyx":610
- *         raise IOError( "could not open '%s' for writing" )
+  /* "pysam/ctabix.pyx":623
+ *         raise IOError("could not open '%s' for writing")
  * 
  *     fn = _force_bytes(filename_in)             # <<<<<<<<<<<<<<
  *     fd_src = open(fn, O_RDONLY)
  *     if fd_src == 0:
  */
-  __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_filename_in)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_filename_in); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(((PyObject *)__pyx_v_fn));
-  __pyx_v_fn = ((PyObject*)__pyx_t_4);
+  __Pyx_DECREF_SET(__pyx_v_fn, ((PyObject*)__pyx_t_4));
   __pyx_t_4 = 0;
 
-  /* "pysam/ctabix.pyx":611
+  /* "pysam/ctabix.pyx":624
  * 
  *     fn = _force_bytes(filename_in)
  *     fd_src = open(fn, O_RDONLY)             # <<<<<<<<<<<<<<
  *     if fd_src == 0:
- *         raise IOError( "could not open '%s' for reading" )
+ *         raise IOError("could not open '%s' for reading")
  */
-  __pyx_t_8 = PyBytes_AsString(((PyObject *)__pyx_v_fn)); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_fd_src = open(__pyx_t_8, __pyx_v_O_RDONLY);
+  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_fn); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_fd_src = open(__pyx_t_9, __pyx_v_O_RDONLY);
 
-  /* "pysam/ctabix.pyx":612
+  /* "pysam/ctabix.pyx":625
  *     fn = _force_bytes(filename_in)
  *     fd_src = open(fn, O_RDONLY)
  *     if fd_src == 0:             # <<<<<<<<<<<<<<
- *         raise IOError( "could not open '%s' for reading" )
+ *         raise IOError("could not open '%s' for reading")
  * 
  */
-  __pyx_t_6 = (__pyx_v_fd_src == 0);
+  __pyx_t_6 = ((__pyx_v_fd_src == 0) != 0);
   if (__pyx_t_6) {
 
-    /* "pysam/ctabix.pyx":613
+    /* "pysam/ctabix.pyx":626
  *     fd_src = open(fn, O_RDONLY)
  *     if fd_src == 0:
- *         raise IOError( "could not open '%s' for reading" )             # <<<<<<<<<<<<<<
+ *         raise IOError("could not open '%s' for reading")             # <<<<<<<<<<<<<<
  * 
  *     buffer = malloc(WINDOW_SIZE)
  */
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__10, NULL); 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_Raise(__pyx_t_4, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L5:;
 
-  /* "pysam/ctabix.pyx":615
- *         raise IOError( "could not open '%s' for reading" )
+  /* "pysam/ctabix.pyx":628
+ *         raise IOError("could not open '%s' for reading")
  * 
  *     buffer = malloc(WINDOW_SIZE)             # <<<<<<<<<<<<<<
  *     c = 1
@@ -6232,7 +6804,7 @@ static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *
  */
   __pyx_v_buffer = malloc(__pyx_v_WINDOW_SIZE);
 
-  /* "pysam/ctabix.pyx":616
+  /* "pysam/ctabix.pyx":629
  * 
  *     buffer = malloc(WINDOW_SIZE)
  *     c = 1             # <<<<<<<<<<<<<<
@@ -6241,7 +6813,7 @@ static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *
  */
   __pyx_v_c = 1;
 
-  /* "pysam/ctabix.pyx":618
+  /* "pysam/ctabix.pyx":631
  *     c = 1
  * 
  *     while c > 0:             # <<<<<<<<<<<<<<
@@ -6249,10 +6821,10 @@ static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *
  *         r = bgzf_write(fp, buffer, c)
  */
   while (1) {
-    __pyx_t_6 = (__pyx_v_c > 0);
+    __pyx_t_6 = ((__pyx_v_c > 0) != 0);
     if (!__pyx_t_6) break;
 
-    /* "pysam/ctabix.pyx":619
+    /* "pysam/ctabix.pyx":632
  * 
  *     while c > 0:
  *         c = read(fd_src, buffer, WINDOW_SIZE)             # <<<<<<<<<<<<<<
@@ -6261,87 +6833,149 @@ static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *
  */
     __pyx_v_c = read(__pyx_v_fd_src, __pyx_v_buffer, __pyx_v_WINDOW_SIZE);
 
-    /* "pysam/ctabix.pyx":620
+    /* "pysam/ctabix.pyx":633
  *     while c > 0:
  *         c = read(fd_src, buffer, WINDOW_SIZE)
  *         r = bgzf_write(fp, buffer, c)             # <<<<<<<<<<<<<<
  *         if r < 0:
- *             free( buffer )
+ *             free(buffer)
  */
     __pyx_v_r = bgzf_write(__pyx_v_fp, __pyx_v_buffer, __pyx_v_c);
 
-    /* "pysam/ctabix.pyx":621
+    /* "pysam/ctabix.pyx":634
  *         c = read(fd_src, buffer, WINDOW_SIZE)
  *         r = bgzf_write(fp, buffer, c)
  *         if r < 0:             # <<<<<<<<<<<<<<
- *             free( buffer )
+ *             free(buffer)
  *             raise OSError("writing failed")
  */
-    __pyx_t_6 = (__pyx_v_r < 0);
+    __pyx_t_6 = ((__pyx_v_r < 0) != 0);
     if (__pyx_t_6) {
 
-      /* "pysam/ctabix.pyx":622
+      /* "pysam/ctabix.pyx":635
  *         r = bgzf_write(fp, buffer, c)
  *         if r < 0:
- *             free( buffer )             # <<<<<<<<<<<<<<
+ *             free(buffer)             # <<<<<<<<<<<<<<
  *             raise OSError("writing failed")
  * 
  */
       free(__pyx_v_buffer);
 
-      /* "pysam/ctabix.pyx":623
+      /* "pysam/ctabix.pyx":636
  *         if r < 0:
- *             free( buffer )
+ *             free(buffer)
  *             raise OSError("writing failed")             # <<<<<<<<<<<<<<
  * 
- *     free( buffer )
+ *     free(buffer)
  */
-      __pyx_t_4 = PyObject_Call(__pyx_builtin_OSError, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
       __Pyx_Raise(__pyx_t_4, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L8;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L8:;
   }
 
-  /* "pysam/ctabix.pyx":625
+  /* "pysam/ctabix.pyx":638
  *             raise OSError("writing failed")
  * 
- *     free( buffer )             # <<<<<<<<<<<<<<
+ *     free(buffer)             # <<<<<<<<<<<<<<
  *     r = bgzf_close(fp)
- *     if r < 0: raise OSError("writing failed")
+ *     if r < 0:
  */
   free(__pyx_v_buffer);
 
-  /* "pysam/ctabix.pyx":626
+  /* "pysam/ctabix.pyx":639
  * 
- *     free( buffer )
+ *     free(buffer)
  *     r = bgzf_close(fp)             # <<<<<<<<<<<<<<
- *     if r < 0: raise OSError("writing failed")
- * 
+ *     if r < 0:
+ *         raise OSError("writing to file %s failed" % filename_out)
  */
   __pyx_v_r = bgzf_close(__pyx_v_fp);
 
-  /* "pysam/ctabix.pyx":627
- *     free( buffer )
+  /* "pysam/ctabix.pyx":640
+ *     free(buffer)
  *     r = bgzf_close(fp)
- *     if r < 0: raise OSError("writing failed")             # <<<<<<<<<<<<<<
+ *     if r < 0:             # <<<<<<<<<<<<<<
+ *         raise OSError("writing to file %s failed" % filename_out)
+ * 
+ */
+  __pyx_t_6 = ((__pyx_v_r < 0) != 0);
+  if (__pyx_t_6) {
+
+    /* "pysam/ctabix.pyx":641
+ *     r = bgzf_close(fp)
+ *     if r < 0:
+ *         raise OSError("writing to file %s failed" % filename_out)             # <<<<<<<<<<<<<<
+ * 
+ *     r = close(fd_src)
+ */
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_writing_to_file_s_failed, __pyx_v_filename_out); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "pysam/ctabix.pyx":643
+ *         raise OSError("writing to file %s failed" % filename_out)
+ * 
+ *     r = close(fd_src)             # <<<<<<<<<<<<<<
+ *     if r < 0:
+ *         raise OSError("error when closing file %s" % filename_in)
+ */
+  __pyx_v_r = close(__pyx_v_fd_src);
+
+  /* "pysam/ctabix.pyx":644
+ * 
+ *     r = close(fd_src)
+ *     if r < 0:             # <<<<<<<<<<<<<<
+ *         raise OSError("error when closing file %s" % filename_in)
  * 
- * def tabix_index( filename,
  */
-  __pyx_t_6 = (__pyx_v_r < 0);
+  __pyx_t_6 = ((__pyx_v_r < 0) != 0);
   if (__pyx_t_6) {
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_OSError, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/ctabix.pyx":645
+ *     r = close(fd_src)
+ *     if r < 0:
+ *         raise OSError("error when closing file %s" % filename_in)             # <<<<<<<<<<<<<<
+ * 
+ * def tabix_index( filename,
+ */
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_when_closing_file_s, __pyx_v_filename_in); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L9;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L9:;
 
+  /* "pysam/ctabix.pyx":594
+ * 
+ * 
+ * def tabix_compress(filename_in,             # <<<<<<<<<<<<<<
+ *                    filename_out,
+ *                    force=False):
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -6357,9 +6991,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_tabix_compress(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":647
+ *         raise OSError("error when closing file %s" % filename_in)
+ * 
+ * def tabix_index( filename,             # <<<<<<<<<<<<<<
+ *                  force = False,
+ *                  seq_col = None,
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_6ctabix_2tabix_index[] = "tabix_index(filename, force=False, seq_col=None, start_col=None, end_col=None, preset=None, meta_char='#', zerobased=False)\n\n    index tab-separated *filename* using tabix.\n\n    An existing index will not be overwritten unless\n    *force* is set.\n\n    The index will be built from coordinates\n    in columns *seq_col*, *start_col* and *end_col*.\n\n    The contents of *filename* have to be sorted by \n    contig and position -  [...]
+static char __pyx_doc_5pysam_6ctabix_2tabix_index[] = "tabix_index(filename, force=False, seq_col=None, start_col=None, end_col=None, preset=None, meta_char='#', zerobased=False, min_shift=-1)\nindex tab-separated *filename* using tabix.\n\n    An existing index will not be overwritten unless\n    *force* is set.\n\n    The index will be built from coordinates\n    in columns *seq_col*, *start_col* and *end_col*.\n\n    The contents of *filename* have to be sorted by \n    contig and pos [...]
 static PyMethodDef __pyx_mdef_5pysam_6ctabix_3tabix_index = {__Pyx_NAMESTR("tabix_index"), (PyCFunction)__pyx_pw_5pysam_6ctabix_3tabix_index, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_2tabix_index)};
 static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_filename = 0;
@@ -6370,15 +7012,27 @@ static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyOb
   PyObject *__pyx_v_preset = 0;
   PyObject *__pyx_v_meta_char = 0;
   PyObject *__pyx_v_zerobased = 0;
+  PyObject *__pyx_v_min_shift = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("tabix_index (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__force,&__pyx_n_s__seq_col,&__pyx_n_s__start_col,&__pyx_n_s__end_col,&__pyx_n_s__preset,&__pyx_n_s__meta_char,&__pyx_n_s__zerobased,0};
-    PyObject* values[8] = {0,0,0,0,0,0,0,0};
-    values[1] = __pyx_k_38;
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_force,&__pyx_n_s_seq_col,&__pyx_n_s_start_col,&__pyx_n_s_end_col,&__pyx_n_s_preset,&__pyx_n_s_meta_char,&__pyx_n_s_zerobased,&__pyx_n_s_min_shift,0};
+    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
 
-    /* "pysam/ctabix.pyx":631
+    /* "pysam/ctabix.pyx":648
+ * 
+ * def tabix_index( filename,
+ *                  force = False,             # <<<<<<<<<<<<<<
+ *                  seq_col = None,
+ *                  start_col = None,
+ */
+    values[1] = ((PyObject *)Py_False);
+
+    /* "pysam/ctabix.pyx":649
  * def tabix_index( filename,
  *                  force = False,
  *                  seq_col = None,             # <<<<<<<<<<<<<<
@@ -6387,7 +7041,7 @@ static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyOb
  */
     values[2] = ((PyObject *)Py_None);
 
-    /* "pysam/ctabix.pyx":632
+    /* "pysam/ctabix.pyx":650
  *                  force = False,
  *                  seq_col = None,
  *                  start_col = None,             # <<<<<<<<<<<<<<
@@ -6396,7 +7050,7 @@ static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyOb
  */
     values[3] = ((PyObject *)Py_None);
 
-    /* "pysam/ctabix.pyx":633
+    /* "pysam/ctabix.pyx":651
  *                  seq_col = None,
  *                  start_col = None,
  *                  end_col = None,             # <<<<<<<<<<<<<<
@@ -6405,7 +7059,7 @@ static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyOb
  */
     values[4] = ((PyObject *)Py_None);
 
-    /* "pysam/ctabix.pyx":634
+    /* "pysam/ctabix.pyx":652
  *                  start_col = None,
  *                  end_col = None,
  *                  preset = None,             # <<<<<<<<<<<<<<
@@ -6413,12 +7067,22 @@ static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyOb
  *                  zerobased = False,
  */
     values[5] = ((PyObject *)Py_None);
-    values[6] = ((PyObject *)__pyx_kp_s_39);
-    values[7] = __pyx_k_40;
+    values[6] = ((PyObject *)__pyx_kp_s__12);
+
+    /* "pysam/ctabix.pyx":654
+ *                  preset = None,
+ *                  meta_char = "#",
+ *                  zerobased = False,             # <<<<<<<<<<<<<<
+ *                  min_shift = -1,
+ *                 ):
+ */
+    values[7] = ((PyObject *)Py_False);
+    values[8] = ((PyObject *)__pyx_int_neg_1);
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
       switch (pos_args) {
+        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
@@ -6433,49 +7097,55 @@ static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyOb
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__force);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
           if (value) { values[1] = value; kw_args--; }
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__seq_col);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_seq_col);
           if (value) { values[2] = value; kw_args--; }
         }
         case  3:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start_col);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start_col);
           if (value) { values[3] = value; kw_args--; }
         }
         case  4:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end_col);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end_col);
           if (value) { values[4] = value; kw_args--; }
         }
         case  5:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__preset);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_preset);
           if (value) { values[5] = value; kw_args--; }
         }
         case  6:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__meta_char);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_meta_char);
           if (value) { values[6] = value; kw_args--; }
         }
         case  7:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__zerobased);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zerobased);
           if (value) { values[7] = value; kw_args--; }
         }
+        case  8:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_shift);
+          if (value) { values[8] = value; kw_args--; }
+        }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tabix_index") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tabix_index") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
@@ -6496,32 +7166,35 @@ static PyObject *__pyx_pw_5pysam_6ctabix_3tabix_index(PyObject *__pyx_self, PyOb
     __pyx_v_preset = values[5];
     __pyx_v_meta_char = values[6];
     __pyx_v_zerobased = values[7];
+    __pyx_v_min_shift = values[8];
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("tabix_index", 0, 1, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("tabix_index", 0, 1, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.ctabix.tabix_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_6ctabix_2tabix_index(__pyx_self, __pyx_v_filename, __pyx_v_force, __pyx_v_seq_col, __pyx_v_start_col, __pyx_v_end_col, __pyx_v_preset, __pyx_v_meta_char, __pyx_v_zerobased);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  __pyx_r = __pyx_pf_5pysam_6ctabix_2tabix_index(__pyx_self, __pyx_v_filename, __pyx_v_force, __pyx_v_seq_col, __pyx_v_start_col, __pyx_v_end_col, __pyx_v_preset, __pyx_v_meta_char, __pyx_v_zerobased, __pyx_v_min_shift);
 
-/* "pysam/ctabix.pyx":629
- *     if r < 0: raise OSError("writing failed")
+  /* "pysam/ctabix.pyx":647
+ *         raise OSError("error when closing file %s" % filename_in)
  * 
  * def tabix_index( filename,             # <<<<<<<<<<<<<<
  *                  force = False,
  *                  seq_col = None,
  */
 
-static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_force, PyObject *__pyx_v_seq_col, PyObject *__pyx_v_start_col, PyObject *__pyx_v_end_col, PyObject *__pyx_v_preset, PyObject *__pyx_v_meta_char, PyObject *__pyx_v_zerobased) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_force, PyObject *__pyx_v_seq_col, PyObject *__pyx_v_start_col, PyObject *__pyx_v_end_col, PyObject *__pyx_v_preset, PyObject *__pyx_v_meta_char, PyObject *__pyx_v_zerobased, PyObject *__pyx_v_min_shift) {
   PyObject *__pyx_v_preset2conf = NULL;
   PyObject *__pyx_v_conf_data = NULL;
-  ti_conf_t __pyx_v_conf;
+  tbx_conf_t __pyx_v_conf;
   PyObject *__pyx_v_fn = NULL;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -6557,72 +7230,78 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __Pyx_INCREF(__pyx_v_end_col);
   __Pyx_INCREF(__pyx_v_preset);
 
-  /* "pysam/ctabix.pyx":671
+  /* "pysam/ctabix.pyx":694
  *     '''
  * 
- *     if not os.path.exists(filename): raise IOError("No such file '%s'" % filename)             # <<<<<<<<<<<<<<
+ *     if not os.path.exists(filename):             # <<<<<<<<<<<<<<
+ *         raise IOError("No such file '%s'" % filename)
  * 
- *     if preset == None and (seq_col == None or start_col == None or end_col == None):
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __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 = 671; __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 = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_filename);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
   __Pyx_GIVEREF(__pyx_v_filename);
-  __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 = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __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 = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_5 = (!__pyx_t_4);
+  __pyx_t_5 = ((!__pyx_t_4) != 0);
   if (__pyx_t_5) {
-    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_41), __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/ctabix.pyx":695
+ * 
+ *     if not os.path.exists(filename):
+ *         raise IOError("No such file '%s'" % filename)             # <<<<<<<<<<<<<<
+ * 
+ *     if preset == None and (seq_col == None or start_col == None or end_col == None):
+ */
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_No_such_file_s, __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __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 = 695; __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));
+    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_builtin_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":673
- *     if not os.path.exists(filename): raise IOError("No such file '%s'" % filename)
+  /* "pysam/ctabix.pyx":697
+ *         raise IOError("No such file '%s'" % filename)
  * 
  *     if preset == None and (seq_col == None or start_col == None or end_col == None):             # <<<<<<<<<<<<<<
  *         raise ValueError("neither preset nor seq_col,start_col and end_col given" )
  * 
  */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_preset, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_preset, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_5) {
-    __pyx_t_3 = PyObject_RichCompare(__pyx_v_seq_col, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_seq_col, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (!__pyx_t_4) {
-      __pyx_t_3 = PyObject_RichCompare(__pyx_v_start_col, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __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 = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_start_col, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __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 = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       if (!__pyx_t_6) {
-        __pyx_t_3 = PyObject_RichCompare(__pyx_v_end_col, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __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 = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyObject_RichCompare(__pyx_v_end_col, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __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 = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         __pyx_t_8 = __pyx_t_7;
       } else {
@@ -6638,51 +7317,49 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   }
   if (__pyx_t_4) {
 
-    /* "pysam/ctabix.pyx":674
+    /* "pysam/ctabix.pyx":698
  * 
  *     if preset == None and (seq_col == None or start_col == None or end_col == None):
  *         raise ValueError("neither preset nor seq_col,start_col and end_col given" )             # <<<<<<<<<<<<<<
  * 
  *     if not filename.endswith(".gz"):
  */
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L4:;
 
-  /* "pysam/ctabix.pyx":676
+  /* "pysam/ctabix.pyx":700
  *         raise ValueError("neither preset nor seq_col,start_col and end_col given" )
  * 
  *     if not filename.endswith(".gz"):             # <<<<<<<<<<<<<<
  *         tabix_compress( filename, filename + ".gz", force = force )
  *         os.unlink( filename )
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__endswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __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 = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_5 = (!__pyx_t_4);
+  __pyx_t_5 = ((!__pyx_t_4) != 0);
   if (__pyx_t_5) {
 
-    /* "pysam/ctabix.pyx":677
+    /* "pysam/ctabix.pyx":701
  * 
  *     if not filename.endswith(".gz"):
  *         tabix_compress( filename, filename + ".gz", force = force )             # <<<<<<<<<<<<<<
  *         os.unlink( filename )
  *         filename += ".gz"
  */
-    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__tabix_compress); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_tabix_compress); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyNumber_Add(__pyx_v_filename, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyNumber_Add(__pyx_v_filename, __pyx_kp_s_gz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __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 = 677; __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 = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_v_filename);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
@@ -6690,85 +7367,84 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
     __Pyx_GIVEREF(__pyx_t_3);
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__force), __pyx_v_force) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_force, __pyx_v_force) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-    /* "pysam/ctabix.pyx":678
+    /* "pysam/ctabix.pyx":702
  *     if not filename.endswith(".gz"):
  *         tabix_compress( filename, filename + ".gz", force = force )
  *         os.unlink( filename )             # <<<<<<<<<<<<<<
  *         filename += ".gz"
  * 
  */
-    __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__unlink); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_unlink); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __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 = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
     __Pyx_INCREF(__pyx_v_filename);
     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_filename);
     __Pyx_GIVEREF(__pyx_v_filename);
-    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/ctabix.pyx":679
+    /* "pysam/ctabix.pyx":703
  *         tabix_compress( filename, filename + ".gz", force = force )
  *         os.unlink( filename )
  *         filename += ".gz"             # <<<<<<<<<<<<<<
  * 
  *     if not force and os.path.exists(filename + ".tbi" ):
  */
-    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_filename, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_filename, __pyx_kp_s_gz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_v_filename);
-    __pyx_v_filename = __pyx_t_1;
+    __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
     __pyx_t_1 = 0;
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "pysam/ctabix.pyx":681
+  /* "pysam/ctabix.pyx":705
  *         filename += ".gz"
  * 
  *     if not force and os.path.exists(filename + ".tbi" ):             # <<<<<<<<<<<<<<
  *         raise IOError( "Filename '%s.tbi' already exists, use *force* to overwrite" )
  * 
  */
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_t_4 = (!__pyx_t_5);
   if (__pyx_t_4) {
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __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_Add(__pyx_v_filename, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyNumber_Add(__pyx_v_filename, __pyx_kp_s_tbi); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     __pyx_t_6 = __pyx_t_5;
   } else {
@@ -6776,40 +7452,38 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   }
   if (__pyx_t_6) {
 
-    /* "pysam/ctabix.pyx":682
+    /* "pysam/ctabix.pyx":706
  * 
  *     if not force and os.path.exists(filename + ".tbi" ):
  *         raise IOError( "Filename '%s.tbi' already exists, use *force* to overwrite" )             # <<<<<<<<<<<<<<
  * 
- *     # columns (1-based)
+ *     # columns (1-based):
  */
-    __pyx_t_9 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
     __Pyx_Raise(__pyx_t_9, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L6;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L6:;
 
-  /* "pysam/ctabix.pyx":687
- *     # preset-code, contig, start, end, metachar for commends, lines to ignore at beginning
+  /* "pysam/ctabix.pyx":712
+ *     #     comments, lines to ignore at beginning
  *     # 0 is a missing column
  *     preset2conf = {             # <<<<<<<<<<<<<<
  *         'gff' : ( 0, 1, 4, 5, ord('#'), 0 ),
  *         'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ),
  */
-  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
+  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
 
-  /* "pysam/ctabix.pyx":688
+  /* "pysam/ctabix.pyx":713
  *     # 0 is a missing column
  *     preset2conf = {
  *         'gff' : ( 0, 1, 4, 5, ord('#'), 0 ),             # <<<<<<<<<<<<<<
  *         'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ),
  *         'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ),
  */
-  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
@@ -6829,17 +7503,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_int_0);
   __Pyx_GIVEREF(__pyx_int_0);
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__gff), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_gff, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/ctabix.pyx":689
+  /* "pysam/ctabix.pyx":714
  *     preset2conf = {
  *         'gff' : ( 0, 1, 4, 5, ord('#'), 0 ),
  *         'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ),             # <<<<<<<<<<<<<<
  *         'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ),
  *         'sam' : ( 1, 3, 4, 0, ord('@'), 0 ),
  */
-  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_65536);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_65536);
@@ -6859,17 +7533,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_int_0);
   __Pyx_GIVEREF(__pyx_int_0);
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__bed), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_bed, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/ctabix.pyx":690
+  /* "pysam/ctabix.pyx":715
  *         'gff' : ( 0, 1, 4, 5, ord('#'), 0 ),
  *         'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ),
  *         'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ),             # <<<<<<<<<<<<<<
  *         'sam' : ( 1, 3, 4, 0, ord('@'), 0 ),
  *         'vcf' : ( 2, 1, 2, 0, ord('#'), 0 ),
  */
-  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_65536);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_65536);
@@ -6889,17 +7563,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_int_0);
   __Pyx_GIVEREF(__pyx_int_0);
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__psltbl), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_psltbl, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/ctabix.pyx":691
+  /* "pysam/ctabix.pyx":716
  *         'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ),
  *         'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ),
  *         'sam' : ( 1, 3, 4, 0, ord('@'), 0 ),             # <<<<<<<<<<<<<<
  *         'vcf' : ( 2, 1, 2, 0, ord('#'), 0 ),
  *         'pileup': (3, 1, 2, 0, ord('#'), 0 ),
  */
-  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
@@ -6919,17 +7593,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_int_0);
   __Pyx_GIVEREF(__pyx_int_0);
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__sam), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_sam, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/ctabix.pyx":692
+  /* "pysam/ctabix.pyx":717
  *         'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ),
  *         'sam' : ( 1, 3, 4, 0, ord('@'), 0 ),
  *         'vcf' : ( 2, 1, 2, 0, ord('#'), 0 ),             # <<<<<<<<<<<<<<
  *         'pileup': (3, 1, 2, 0, ord('#'), 0 ),
  *         }
  */
-  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_2);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_2);
@@ -6949,17 +7623,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_int_0);
   __Pyx_GIVEREF(__pyx_int_0);
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__vcf), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_vcf, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/ctabix.pyx":693
+  /* "pysam/ctabix.pyx":718
  *         'sam' : ( 1, 3, 4, 0, ord('@'), 0 ),
  *         'vcf' : ( 2, 1, 2, 0, ord('#'), 0 ),
  *         'pileup': (3, 1, 2, 0, ord('#'), 0 ),             # <<<<<<<<<<<<<<
  *         }
  * 
  */
-  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_3);
@@ -6979,22 +7653,22 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __Pyx_INCREF(__pyx_int_0);
   PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_int_0);
   __Pyx_GIVEREF(__pyx_int_0);
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__pileup), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pileup, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __pyx_v_preset2conf = ((PyObject*)__pyx_t_9);
   __pyx_t_9 = 0;
 
-  /* "pysam/ctabix.pyx":696
+  /* "pysam/ctabix.pyx":721
  *         }
  * 
  *     if preset:             # <<<<<<<<<<<<<<
  *         try:
  *             conf_data = preset2conf[preset]
  */
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_preset); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_preset); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_6) {
 
-    /* "pysam/ctabix.pyx":697
+    /* "pysam/ctabix.pyx":722
  * 
  *     if preset:
  *         try:             # <<<<<<<<<<<<<<
@@ -7008,14 +7682,14 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
       __Pyx_XGOTREF(__pyx_t_12);
       /*try:*/ {
 
-        /* "pysam/ctabix.pyx":698
+        /* "pysam/ctabix.pyx":723
  *     if preset:
  *         try:
  *             conf_data = preset2conf[preset]             # <<<<<<<<<<<<<<
  *         except KeyError:
- *             raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() )))
+ *             raise KeyError(
  */
-        __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_preset2conf), __pyx_v_preset); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+        __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_preset2conf, __pyx_v_preset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L8_error;};
         __Pyx_GOTREF(__pyx_t_9);
         __pyx_v_conf_data = __pyx_t_9;
         __pyx_t_9 = 0;
@@ -7030,68 +7704,77 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-      /* "pysam/ctabix.pyx":699
+      /* "pysam/ctabix.pyx":724
  *         try:
  *             conf_data = preset2conf[preset]
  *         except KeyError:             # <<<<<<<<<<<<<<
- *             raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() )))
- *     else:
+ *             raise KeyError(
+ *                 "unknown preset '%s', valid presets are '%s'" %
  */
       __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
       if (__pyx_t_13) {
         __Pyx_AddTraceback("pysam.ctabix.tabix_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
         __Pyx_GOTREF(__pyx_t_9);
         __Pyx_GOTREF(__pyx_t_3);
         __Pyx_GOTREF(__pyx_t_1);
 
-        /* "pysam/ctabix.pyx":700
- *             conf_data = preset2conf[preset]
- *         except KeyError:
- *             raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() )))             # <<<<<<<<<<<<<<
+        /* "pysam/ctabix.pyx":727
+ *             raise KeyError(
+ *                 "unknown preset '%s', valid presets are '%s'" %
+ *                 (preset, ",".join(preset2conf.keys())))             # <<<<<<<<<<<<<<
  *     else:
- *         if end_col == None: end_col = -1
+ *         if end_col == None:
  */
-        __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_49), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_preset2conf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_14 = PyDict_Keys(__pyx_v_preset2conf); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-        __Pyx_GOTREF(__pyx_t_14);
-        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-        __Pyx_GOTREF(__pyx_t_15);
-        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
-        __Pyx_GIVEREF(__pyx_t_14);
-        __pyx_t_14 = 0;
-        __pyx_t_14 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        __pyx_t_14 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_t_2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
         __Pyx_GOTREF(__pyx_t_14);
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
-        __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-        __Pyx_GOTREF(__pyx_t_15);
+        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __Pyx_INCREF(__pyx_v_preset);
-        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_preset);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_preset);
         __Pyx_GIVEREF(__pyx_v_preset);
-        PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_14);
+        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
         __Pyx_GIVEREF(__pyx_t_14);
         __pyx_t_14 = 0;
-        __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_14));
-        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
-        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-        __Pyx_GOTREF(__pyx_t_15);
-        PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_t_14));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_14));
+
+        /* "pysam/ctabix.pyx":726
+ *         except KeyError:
+ *             raise KeyError(
+ *                 "unknown preset '%s', valid presets are '%s'" %             # <<<<<<<<<<<<<<
+ *                 (preset, ",".join(preset2conf.keys())))
+ *     else:
+ */
+        __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_unknown_preset_s_valid_presets_a, __pyx_t_2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+        /* "pysam/ctabix.pyx":725
+ *             conf_data = preset2conf[preset]
+ *         except KeyError:
+ *             raise KeyError(             # <<<<<<<<<<<<<<
+ *                 "unknown preset '%s', valid presets are '%s'" %
+ *                 (preset, ",".join(preset2conf.keys())))
+ */
+        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14);
+        __Pyx_GIVEREF(__pyx_t_14);
         __pyx_t_14 = 0;
-        __pyx_t_14 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
         __Pyx_GOTREF(__pyx_t_14);
-        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         __Pyx_Raise(__pyx_t_14, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
         __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;
         goto __pyx_L9_exception_handled;
       }
+      goto __pyx_L10_except_error;
       __pyx_L10_except_error:;
       __Pyx_XGIVEREF(__pyx_t_10);
       __Pyx_XGIVEREF(__pyx_t_11);
@@ -7109,75 +7792,88 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   }
   /*else*/ {
 
-    /* "pysam/ctabix.pyx":702
- *             raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() )))
+    /* "pysam/ctabix.pyx":729
+ *                 (preset, ",".join(preset2conf.keys())))
  *     else:
- *         if end_col == None: end_col = -1             # <<<<<<<<<<<<<<
+ *         if end_col == None:             # <<<<<<<<<<<<<<
+ *             end_col = -1
  *         preset = 0
- * 
  */
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_end_col, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_RichCompare(__pyx_v_end_col, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     if (__pyx_t_6) {
+
+      /* "pysam/ctabix.pyx":730
+ *     else:
+ *         if end_col == None:
+ *             end_col = -1             # <<<<<<<<<<<<<<
+ *         preset = 0
+ * 
+ */
       __Pyx_INCREF(__pyx_int_neg_1);
-      __Pyx_DECREF(__pyx_v_end_col);
-      __pyx_v_end_col = __pyx_int_neg_1;
+      __Pyx_DECREF_SET(__pyx_v_end_col, __pyx_int_neg_1);
       goto __pyx_L18;
     }
     __pyx_L18:;
 
-    /* "pysam/ctabix.pyx":703
- *     else:
- *         if end_col == None: end_col = -1
+    /* "pysam/ctabix.pyx":731
+ *         if end_col == None:
+ *             end_col = -1
  *         preset = 0             # <<<<<<<<<<<<<<
  * 
- *         # note that tabix internally works with 0-based coordinates and open/closed intervals.
+ *         # note that tabix internally works with 0-based coordinates
  */
     __Pyx_INCREF(__pyx_int_0);
-    __Pyx_DECREF(__pyx_v_preset);
-    __pyx_v_preset = __pyx_int_0;
+    __Pyx_DECREF_SET(__pyx_v_preset, __pyx_int_0);
 
-    /* "pysam/ctabix.pyx":710
- *         # -1 is subtracted from the start coordinate. To avoid doing this, set
- *         # the TI_FLAG_UCSC=0x10000 flag:
- *         if zerobased: preset = preset | 0x10000             # <<<<<<<<<<<<<<
+    /* "pysam/ctabix.pyx":739
+ *         # subtracted from the start coordinate. To avoid doing this,
+ *         # set the TI_FLAG_UCSC=0x10000 flag:
+ *         if zerobased:             # <<<<<<<<<<<<<<
+ *             preset = preset | 0x10000
  * 
- *         conf_data = (preset, seq_col+1, start_col+1, end_col+1, ord(meta_char), 0)
  */
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_zerobased); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_zerobased); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_6) {
-      __pyx_t_1 = PyNumber_Or(__pyx_v_preset, __pyx_int_65536); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+      /* "pysam/ctabix.pyx":740
+ *         # set the TI_FLAG_UCSC=0x10000 flag:
+ *         if zerobased:
+ *             preset = preset | 0x10000             # <<<<<<<<<<<<<<
+ * 
+ *         conf_data = (preset, seq_col+1, start_col+1, end_col+1, ord(meta_char), 0)
+ */
+      __pyx_t_1 = PyNumber_Or(__pyx_v_preset, __pyx_int_65536); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_v_preset);
-      __pyx_v_preset = __pyx_t_1;
+      __Pyx_DECREF_SET(__pyx_v_preset, __pyx_t_1);
       __pyx_t_1 = 0;
       goto __pyx_L19;
     }
     __pyx_L19:;
 
-    /* "pysam/ctabix.pyx":712
- *         if zerobased: preset = preset | 0x10000
+    /* "pysam/ctabix.pyx":742
+ *             preset = preset | 0x10000
  * 
  *         conf_data = (preset, seq_col+1, start_col+1, end_col+1, ord(meta_char), 0)             # <<<<<<<<<<<<<<
  * 
- *     cdef ti_conf_t conf
+ *     cdef tbx_conf_t conf
  */
-    __pyx_t_1 = PyNumber_Add(__pyx_v_seq_col, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_Add(__pyx_v_seq_col, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = PyNumber_Add(__pyx_v_start_col, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyNumber_Add(__pyx_v_start_col, __pyx_int_1); 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_9 = PyNumber_Add(__pyx_v_end_col, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyNumber_Add(__pyx_v_end_col, __pyx_int_1); 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);
-    __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_14);
     __Pyx_INCREF(__pyx_v_meta_char);
     PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_meta_char);
     __Pyx_GIVEREF(__pyx_v_meta_char);
-    __pyx_t_15 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
-    __pyx_t_14 = PyTuple_New(6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_14, NULL); 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);
+    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    __pyx_t_14 = PyTuple_New(6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_14);
     __Pyx_INCREF(__pyx_v_preset);
     PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_preset);
@@ -7188,26 +7884,26 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
     __Pyx_GIVEREF(__pyx_t_3);
     PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_9);
     __Pyx_GIVEREF(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_15);
-    __Pyx_GIVEREF(__pyx_t_15);
+    PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_int_0);
     PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_int_0);
     __Pyx_GIVEREF(__pyx_int_0);
     __pyx_t_1 = 0;
     __pyx_t_3 = 0;
     __pyx_t_9 = 0;
-    __pyx_t_15 = 0;
-    __pyx_v_conf_data = ((PyObject *)__pyx_t_14);
+    __pyx_t_2 = 0;
+    __pyx_v_conf_data = __pyx_t_14;
     __pyx_t_14 = 0;
   }
   __pyx_L7:;
 
-  /* "pysam/ctabix.pyx":715
+  /* "pysam/ctabix.pyx":745
  * 
- *     cdef ti_conf_t conf
+ *     cdef tbx_conf_t conf
  *     conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data             # <<<<<<<<<<<<<<
  * 
- *     fn = _my_encodeFilename( filename )
+ * 
  */
   if ((likely(PyTuple_CheckExact(__pyx_v_conf_data))) || (PyList_CheckExact(__pyx_v_conf_data))) {
     PyObject* sequence = __pyx_v_conf_data;
@@ -7219,44 +7915,45 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
     if (unlikely(size != 6)) {
       if (size > 6) __Pyx_RaiseTooManyValuesError(6);
       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     #if CYTHON_COMPILING_IN_CPYTHON
     if (likely(PyTuple_CheckExact(sequence))) {
       __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); 
-      __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); 
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
       __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); 
       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 3); 
       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 4); 
-      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 5); 
+      __pyx_t_15 = PyTuple_GET_ITEM(sequence, 5); 
     } else {
       __pyx_t_14 = PyList_GET_ITEM(sequence, 0); 
-      __pyx_t_15 = PyList_GET_ITEM(sequence, 1); 
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
       __pyx_t_9 = PyList_GET_ITEM(sequence, 2); 
       __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
       __pyx_t_1 = PyList_GET_ITEM(sequence, 4); 
-      __pyx_t_2 = PyList_GET_ITEM(sequence, 5); 
+      __pyx_t_15 = PyList_GET_ITEM(sequence, 5); 
     }
     __Pyx_INCREF(__pyx_t_14);
-    __Pyx_INCREF(__pyx_t_15);
+    __Pyx_INCREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_t_9);
     __Pyx_INCREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_15);
     #else
-    Py_ssize_t i;
-    PyObject** temps[6] = {&__pyx_t_14,&__pyx_t_15,&__pyx_t_9,&__pyx_t_3,&__pyx_t_1,&__pyx_t_2};
-    for (i=0; i < 6; i++) {
-      PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(item);
-      *(temps[i]) = item;
+    {
+      Py_ssize_t i;
+      PyObject** temps[6] = {&__pyx_t_14,&__pyx_t_2,&__pyx_t_9,&__pyx_t_3,&__pyx_t_1,&__pyx_t_15};
+      for (i=0; i < 6; i++) {
+        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(item);
+        *(temps[i]) = item;
+      }
     }
     #endif
-  } else
-  {
+  } else {
     Py_ssize_t index = -1;
-    PyObject** temps[6] = {&__pyx_t_14,&__pyx_t_15,&__pyx_t_9,&__pyx_t_3,&__pyx_t_1,&__pyx_t_2};
-    __pyx_t_16 = PyObject_GetIter(__pyx_v_conf_data); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject** temps[6] = {&__pyx_t_14,&__pyx_t_2,&__pyx_t_9,&__pyx_t_3,&__pyx_t_1,&__pyx_t_15};
+    __pyx_t_16 = PyObject_GetIter(__pyx_v_conf_data); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_16);
     __pyx_t_17 = Py_TYPE(__pyx_t_16)->tp_iternext;
     for (index=0; index < 6; index++) {
@@ -7264,7 +7961,7 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
       __Pyx_GOTREF(item);
       *(temps[index]) = item;
     }
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_16), 6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_16), 6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_17 = NULL;
     __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
     goto __pyx_L21_unpacking_done;
@@ -7272,21 +7969,21 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
     __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
     __pyx_t_17 = NULL;
     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_L21_unpacking_done:;
   }
-  __pyx_t_18 = __Pyx_PyInt_from_py_int32_t(__pyx_t_14); if (unlikely((__pyx_t_18 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_18 = __Pyx_PyInt_As_int32_t(__pyx_t_14); if (unlikely((__pyx_t_18 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-  __pyx_t_19 = __Pyx_PyInt_from_py_int32_t(__pyx_t_15); if (unlikely((__pyx_t_19 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-  __pyx_t_20 = __Pyx_PyInt_from_py_int32_t(__pyx_t_9); if (unlikely((__pyx_t_20 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_19 = __Pyx_PyInt_As_int32_t(__pyx_t_2); if (unlikely((__pyx_t_19 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_20 = __Pyx_PyInt_As_int32_t(__pyx_t_9); if (unlikely((__pyx_t_20 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __pyx_t_21 = __Pyx_PyInt_from_py_int32_t(__pyx_t_3); if (unlikely((__pyx_t_21 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_21 = __Pyx_PyInt_As_int32_t(__pyx_t_3); if (unlikely((__pyx_t_21 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_22 = __Pyx_PyInt_from_py_int32_t(__pyx_t_1); if (unlikely((__pyx_t_22 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_22 = __Pyx_PyInt_As_int32_t(__pyx_t_1); if (unlikely((__pyx_t_22 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_23 = __Pyx_PyInt_from_py_int32_t(__pyx_t_2); if (unlikely((__pyx_t_23 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_23 = __Pyx_PyInt_As_int32_t(__pyx_t_15); if (unlikely((__pyx_t_23 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
   __pyx_v_conf.preset = __pyx_t_18;
   __pyx_v_conf.sc = __pyx_t_19;
   __pyx_v_conf.bc = __pyx_t_20;
@@ -7294,30 +7991,31 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __pyx_v_conf.meta_char = __pyx_t_22;
   __pyx_v_conf.line_skip = __pyx_t_23;
 
-  /* "pysam/ctabix.pyx":717
- *     conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
+  /* "pysam/ctabix.pyx":748
+ * 
  * 
- *     fn = _my_encodeFilename( filename )             # <<<<<<<<<<<<<<
- *     ti_index_build( fn, &conf)
+ *     fn = _encodeFilename(filename)             # <<<<<<<<<<<<<<
+ *     tbx_index_build(fn, min_shift, &conf)
  * 
  */
-  __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_6ctabix__my_encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_fn = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
+  __pyx_t_15 = __pyx_f_5pysam_6ctabix__encodeFilename(__pyx_v_filename); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_15);
+  __pyx_v_fn = ((PyObject*)__pyx_t_15);
+  __pyx_t_15 = 0;
 
-  /* "pysam/ctabix.pyx":718
+  /* "pysam/ctabix.pyx":749
  * 
- *     fn = _my_encodeFilename( filename )
- *     ti_index_build( fn, &conf)             # <<<<<<<<<<<<<<
+ *     fn = _encodeFilename(filename)
+ *     tbx_index_build(fn, min_shift, &conf)             # <<<<<<<<<<<<<<
  * 
  *     return filename
  */
-  __pyx_t_24 = PyBytes_AsString(((PyObject *)__pyx_v_fn)); if (unlikely((!__pyx_t_24) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  ti_index_build(__pyx_t_24, (&__pyx_v_conf));
+  __pyx_t_24 = __Pyx_PyObject_AsString(__pyx_v_fn); if (unlikely((!__pyx_t_24) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_min_shift); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  tbx_index_build(__pyx_t_24, __pyx_t_13, (&__pyx_v_conf));
 
-  /* "pysam/ctabix.pyx":720
- *     ti_index_build( fn, &conf)
+  /* "pysam/ctabix.pyx":751
+ *     tbx_index_build(fn, min_shift, &conf)
  * 
  *     return filename             # <<<<<<<<<<<<<<
  * 
@@ -7328,8 +8026,15 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   __pyx_r = __pyx_v_filename;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":647
+ *         raise OSError("error when closing file %s" % filename_in)
+ * 
+ * def tabix_index( filename,             # <<<<<<<<<<<<<<
+ *                  force = False,
+ *                  seq_col = None,
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -7352,17 +8057,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_2tabix_index(CYTHON_UNUSED PyObject *__
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":796
+/* "pysam/ctabix.pyx":823
  * ## Iterators for parsing through unindexed files.
  * #########################################################
  * cdef buildGzipError(void *gzfp):             # <<<<<<<<<<<<<<
  *     cdef int errnum = 0
- *     cdef const char *s = gzerror(gzfp, &errnum)
+ *     cdef char *s = gzerror(gzfp, &errnum)
  */
 
 static PyObject *__pyx_f_5pysam_6ctabix_buildGzipError(void *__pyx_v_gzfp) {
   int __pyx_v_errnum;
-  char const *__pyx_v_s;
+  char *__pyx_v_s;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
@@ -7375,63 +8080,70 @@ static PyObject *__pyx_f_5pysam_6ctabix_buildGzipError(void *__pyx_v_gzfp) {
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("buildGzipError", 0);
 
-  /* "pysam/ctabix.pyx":797
+  /* "pysam/ctabix.pyx":824
  * #########################################################
  * cdef buildGzipError(void *gzfp):
  *     cdef int errnum = 0             # <<<<<<<<<<<<<<
- *     cdef const char *s = gzerror(gzfp, &errnum)
+ *     cdef char *s = gzerror(gzfp, &errnum)
  *     return "error (%d): %s (%d: %s)" % (errno, strerror(errno), errnum, s)
  */
   __pyx_v_errnum = 0;
 
-  /* "pysam/ctabix.pyx":798
+  /* "pysam/ctabix.pyx":825
  * cdef buildGzipError(void *gzfp):
  *     cdef int errnum = 0
- *     cdef const char *s = gzerror(gzfp, &errnum)             # <<<<<<<<<<<<<<
+ *     cdef char *s = gzerror(gzfp, &errnum)             # <<<<<<<<<<<<<<
  *     return "error (%d): %s (%d: %s)" % (errno, strerror(errno), errnum, s)
  * 
  */
   __pyx_v_s = gzerror(__pyx_v_gzfp, (&__pyx_v_errnum));
 
-  /* "pysam/ctabix.pyx":799
+  /* "pysam/ctabix.pyx":826
  *     cdef int errnum = 0
- *     cdef const char *s = gzerror(gzfp, &errnum)
+ *     cdef char *s = gzerror(gzfp, &errnum)
  *     return "error (%d): %s (%d: %s)" % (errno, strerror(errno), errnum, s)             # <<<<<<<<<<<<<<
  * 
  * 
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(errno); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_errnum); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_errnum); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __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 = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_t_2));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
   PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
-  PyTuple_SET_ITEM(__pyx_t_5, 3, ((PyObject *)__pyx_t_4));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
   __pyx_t_1 = 0;
   __pyx_t_2 = 0;
   __pyx_t_3 = 0;
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_50), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-  __pyx_r = ((PyObject *)__pyx_t_4);
+  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_d_s_d_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_r = __pyx_t_4;
   __pyx_t_4 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":823
+ * ## Iterators for parsing through unindexed files.
+ * #########################################################
+ * cdef buildGzipError(void *gzfp):             # <<<<<<<<<<<<<<
+ *     cdef int errnum = 0
+ *     cdef char *s = gzerror(gzfp, &errnum)
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -7446,17 +8158,28 @@ static PyObject *__pyx_f_5pysam_6ctabix_buildGzipError(void *__pyx_v_gzfp) {
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":833
+ *     '''
+ * 
+ *     def __cinit__(self,             # <<<<<<<<<<<<<<
+ *                   infile,
+ *                   Parser parser,
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_6ctabix_19tabix_file_iterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_pw_5pysam_6ctabix_19tabix_file_iterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_infile = 0;
   struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser = 0;
   int __pyx_v_buffer_size;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__infile,&__pyx_n_s__parser,&__pyx_n_s__buffer_size,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_infile,&__pyx_n_s_parser,&__pyx_n_s_buffer_size,0};
     PyObject* values[3] = {0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -7471,21 +8194,21 @@ static int __pyx_pw_5pysam_6ctabix_19tabix_file_iterator_1__cinit__(PyObject *__
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__infile)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_infile)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buffer_size);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buffer_size);
           if (value) { values[2] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -7499,21 +8222,23 @@ static int __pyx_pw_5pysam_6ctabix_19tabix_file_iterator_1__cinit__(PyObject *__
     __pyx_v_infile = values[0];
     __pyx_v_parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)values[1]);
     if (values[2]) {
-      __pyx_v_buffer_size = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_buffer_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_v_buffer_size = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_buffer_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     } else {
       __pyx_v_buffer_size = ((int)65536);
     }
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.ctabix.tabix_file_iterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return -1;
   __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_5pysam_6ctabix_Parser, 1, "parser", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_5pysam_6ctabix_Parser, 1, "parser", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = __pyx_pf_5pysam_6ctabix_19tabix_file_iterator___cinit__(((struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self), __pyx_v_infile, __pyx_v_parser, __pyx_v_buffer_size);
+
+  /* function exit code */
   goto __pyx_L0;
   __pyx_L1_error:;
   __pyx_r = -1;
@@ -7522,14 +8247,6 @@ static int __pyx_pw_5pysam_6ctabix_19tabix_file_iterator_1__cinit__(PyObject *__
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":806
- *     '''
- * 
- *     def __cinit__(self,             # <<<<<<<<<<<<<<
- *                   infile,
- *                   Parser parser,
- */
-
 static int __pyx_pf_5pysam_6ctabix_19tabix_file_iterator___cinit__(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *__pyx_v_self, PyObject *__pyx_v_infile, struct __pyx_obj_5pysam_6ctabix_Parser *__pyx_v_parser, int __pyx_v_buffer_size) {
   int __pyx_v_fd;
   int __pyx_r;
@@ -7543,41 +8260,39 @@ static int __pyx_pf_5pysam_6ctabix_19tabix_file_iterator___cinit__(struct __pyx_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__cinit__", 0);
 
-  /* "pysam/ctabix.pyx":811
- *                   int buffer_size = 65536 ):
+  /* "pysam/ctabix.pyx":838
+ *                   int buffer_size=65536):
  * 
  *         if infile.closed:             # <<<<<<<<<<<<<<
  *             raise ValueError( "I/O operation on closed file." )
  * 
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_infile, __pyx_n_s__closed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_infile, __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":812
+    /* "pysam/ctabix.pyx":839
  * 
  *         if infile.closed:
  *             raise ValueError( "I/O operation on closed file." )             # <<<<<<<<<<<<<<
  * 
  *         self.infile = infile
  */
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":814
+  /* "pysam/ctabix.pyx":841
  *             raise ValueError( "I/O operation on closed file." )
  * 
  *         self.infile = infile             # <<<<<<<<<<<<<<
  * 
- *         cdef int fd = PyObject_AsFileDescriptor( infile )
+ *         cdef int fd = PyObject_AsFileDescriptor(infile)
  */
   __Pyx_INCREF(__pyx_v_infile);
   __Pyx_GIVEREF(__pyx_v_infile);
@@ -7585,99 +8300,103 @@ static int __pyx_pf_5pysam_6ctabix_19tabix_file_iterator___cinit__(struct __pyx_
   __Pyx_DECREF(__pyx_v_self->infile);
   __pyx_v_self->infile = __pyx_v_infile;
 
-  /* "pysam/ctabix.pyx":816
+  /* "pysam/ctabix.pyx":843
  *         self.infile = infile
  * 
- *         cdef int fd = PyObject_AsFileDescriptor( infile )             # <<<<<<<<<<<<<<
- *         if fd == -1: raise ValueError( "I/O operation on closed file." )
- * 
+ *         cdef int fd = PyObject_AsFileDescriptor(infile)             # <<<<<<<<<<<<<<
+ *         if fd == -1:
+ *             raise ValueError("I/O operation on closed file.")
  */
-  __pyx_t_3 = PyObject_AsFileDescriptor(__pyx_v_infile); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_AsFileDescriptor(__pyx_v_infile); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_fd = __pyx_t_3;
 
-  /* "pysam/ctabix.pyx":817
+  /* "pysam/ctabix.pyx":844
  * 
- *         cdef int fd = PyObject_AsFileDescriptor( infile )
- *         if fd == -1: raise ValueError( "I/O operation on closed file." )             # <<<<<<<<<<<<<<
+ *         cdef int fd = PyObject_AsFileDescriptor(infile)
+ *         if fd == -1:             # <<<<<<<<<<<<<<
+ *             raise ValueError("I/O operation on closed file.")
  * 
- *         # From the manual:
  */
-  __pyx_t_2 = (__pyx_v_fd == -1);
+  __pyx_t_2 = ((__pyx_v_fd == -1) != 0);
   if (__pyx_t_2) {
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/ctabix.pyx":845
+ *         cdef int fd = PyObject_AsFileDescriptor(infile)
+ *         if fd == -1:
+ *             raise ValueError("I/O operation on closed file.")             # <<<<<<<<<<<<<<
+ * 
+ *         # From the manual:
+ */
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L4;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L4:;
 
-  /* "pysam/ctabix.pyx":824
+  /* "pysam/ctabix.pyx":852
  *         # When reading, this will be detected automatically by looking
  *         # for the magic two-byte gzip header.
- *         self.fh = gzdopen( fd, 'r')             # <<<<<<<<<<<<<<
+ *         self.fh = gzdopen(fd, 'r')             # <<<<<<<<<<<<<<
  * 
  *         if self.fh == NULL:
  */
-  __pyx_v_self->fh = gzdopen(__pyx_v_fd, __pyx_k__r);
+  __pyx_v_self->fh = gzdopen(__pyx_v_fd, __pyx_k_r);
 
-  /* "pysam/ctabix.pyx":826
- *         self.fh = gzdopen( fd, 'r')
+  /* "pysam/ctabix.pyx":854
+ *         self.fh = gzdopen(fd, 'r')
  * 
  *         if self.fh == NULL:             # <<<<<<<<<<<<<<
  *             raise IOError('%s' % strerror(errno))
  * 
  */
-  __pyx_t_2 = (__pyx_v_self->fh == NULL);
+  __pyx_t_2 = ((__pyx_v_self->fh == NULL) != 0);
   if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":827
+    /* "pysam/ctabix.pyx":855
  * 
  *         if self.fh == NULL:
  *             raise IOError('%s' % strerror(errno))             # <<<<<<<<<<<<<<
  * 
- *         self.ks = ks_init( self.fh)
+ *         self.kstream = ks_init(self.fh)
  */
-    __pyx_t_1 = PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_54), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__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 = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_1); 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_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 = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
     __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); 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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L5;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L5:;
 
-  /* "pysam/ctabix.pyx":829
+  /* "pysam/ctabix.pyx":857
  *             raise IOError('%s' % strerror(errno))
  * 
- *         self.ks = ks_init( self.fh)             # <<<<<<<<<<<<<<
+ *         self.kstream = ks_init(self.fh)             # <<<<<<<<<<<<<<
  * 
- *         self.buffer.s = <char*>malloc( buffer_size )
+ *         self.buffer.s = <char*>malloc(buffer_size)
  */
-  __pyx_v_self->ks = ks_init(__pyx_v_self->fh);
+  __pyx_v_self->kstream = ks_init(__pyx_v_self->fh);
 
-  /* "pysam/ctabix.pyx":831
- *         self.ks = ks_init( self.fh)
+  /* "pysam/ctabix.pyx":859
+ *         self.kstream = ks_init(self.fh)
  * 
- *         self.buffer.s = <char*>malloc( buffer_size )             # <<<<<<<<<<<<<<
+ *         self.buffer.s = <char*>malloc(buffer_size)             # <<<<<<<<<<<<<<
  *         #if self.buffer == NULL:
  *         #    raise MemoryError( "tabix_file_iterator: could not allocate %i bytes" % buffer_size)
  */
   __pyx_v_self->buffer.s = ((char *)malloc(__pyx_v_buffer_size));
 
-  /* "pysam/ctabix.pyx":835
+  /* "pysam/ctabix.pyx":863
  *         #    raise MemoryError( "tabix_file_iterator: could not allocate %i bytes" % buffer_size)
  *         #self.size = buffer_size
  *         self.parser = parser             # <<<<<<<<<<<<<<
@@ -7690,6 +8409,15 @@ static int __pyx_pf_5pysam_6ctabix_19tabix_file_iterator___cinit__(struct __pyx_
   __Pyx_DECREF(((PyObject *)__pyx_v_self->parser));
   __pyx_v_self->parser = __pyx_v_parser;
 
+  /* "pysam/ctabix.pyx":833
+ *     '''
+ * 
+ *     def __cinit__(self,             # <<<<<<<<<<<<<<
+ *                   infile,
+ *                   Parser parser,
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -7702,6 +8430,14 @@ static int __pyx_pf_5pysam_6ctabix_19tabix_file_iterator___cinit__(struct __pyx_
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":865
+ *         self.parser = parser
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_3__iter__(PyObject *__pyx_v_self) {
@@ -7709,24 +8445,18 @@ static PyObject *__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_3__iter__(PyObjec
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_6ctabix_19tabix_file_iterator_2__iter__(((struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":837
- *         self.parser = parser
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_2__iter__(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__iter__", 0);
 
-  /* "pysam/ctabix.pyx":838
+  /* "pysam/ctabix.pyx":866
  * 
  *     def __iter__(self):
  *         return self             # <<<<<<<<<<<<<<
@@ -7738,14 +8468,22 @@ static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_2__iter__(struct
   __pyx_r = ((PyObject *)__pyx_v_self);
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  /* "pysam/ctabix.pyx":865
+ *         self.parser = parser
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":840
+/* "pysam/ctabix.pyx":868
  *         return self
  * 
  *     cdef __cnext__(self):             # <<<<<<<<<<<<<<
@@ -7770,7 +8508,7 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__cnext__", 0);
 
-  /* "pysam/ctabix.pyx":843
+  /* "pysam/ctabix.pyx":871
  * 
  *         cdef char * b
  *         cdef int dret = 0             # <<<<<<<<<<<<<<
@@ -7779,7 +8517,7 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
  */
   __pyx_v_dret = 0;
 
-  /* "pysam/ctabix.pyx":844
+  /* "pysam/ctabix.pyx":872
  *         cdef char * b
  *         cdef int dret = 0
  *         cdef int retval = 0             # <<<<<<<<<<<<<<
@@ -7788,36 +8526,35 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
  */
   __pyx_v_retval = 0;
 
-  /* "pysam/ctabix.pyx":845
+  /* "pysam/ctabix.pyx":873
  *         cdef int dret = 0
  *         cdef int retval = 0
  *         while 1:             # <<<<<<<<<<<<<<
  * 
- *             retval = ks_getuntil(self.ks, '\n', &self.buffer, &dret)
+ *             retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)
  */
   while (1) {
-    if (!1) break;
 
-    /* "pysam/ctabix.pyx":847
+    /* "pysam/ctabix.pyx":875
  *         while 1:
  * 
- *             retval = ks_getuntil(self.ks, '\n', &self.buffer, &dret)             # <<<<<<<<<<<<<<
+ *             retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)             # <<<<<<<<<<<<<<
  * 
  *             if retval < 0:
  */
-    __pyx_v_retval = ks_getuntil(__pyx_v_self->ks, '\n', (&__pyx_v_self->buffer), (&__pyx_v_dret));
+    __pyx_v_retval = ks_getuntil(__pyx_v_self->kstream, '\n', (&__pyx_v_self->buffer), (&__pyx_v_dret));
 
-    /* "pysam/ctabix.pyx":849
- *             retval = ks_getuntil(self.ks, '\n', &self.buffer, &dret)
+    /* "pysam/ctabix.pyx":877
+ *             retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)
  * 
  *             if retval < 0:             # <<<<<<<<<<<<<<
  *                 break
  *                 #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
  */
-    __pyx_t_1 = (__pyx_v_retval < 0);
+    __pyx_t_1 = ((__pyx_v_retval < 0) != 0);
     if (__pyx_t_1) {
 
-      /* "pysam/ctabix.pyx":850
+      /* "pysam/ctabix.pyx":878
  * 
  *             if retval < 0:
  *                 break             # <<<<<<<<<<<<<<
@@ -7825,11 +8562,9 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
  * 
  */
       goto __pyx_L4_break;
-      goto __pyx_L5;
     }
-    __pyx_L5:;
 
-    /* "pysam/ctabix.pyx":853
+    /* "pysam/ctabix.pyx":881
  *                 #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
  * 
  *             b = self.buffer.s             # <<<<<<<<<<<<<<
@@ -7839,32 +8574,30 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
     __pyx_t_2 = __pyx_v_self->buffer.s;
     __pyx_v_b = __pyx_t_2;
 
-    /* "pysam/ctabix.pyx":856
+    /* "pysam/ctabix.pyx":884
  * 
  *             # skip comments
  *             if (b[0] == '#'): continue             # <<<<<<<<<<<<<<
  * 
  *             # skip empty lines
  */
-    __pyx_t_1 = ((__pyx_v_b[0]) == '#');
+    __pyx_t_1 = (((__pyx_v_b[0]) == '#') != 0);
     if (__pyx_t_1) {
       goto __pyx_L3_continue;
-      goto __pyx_L6;
     }
-    __pyx_L6:;
 
-    /* "pysam/ctabix.pyx":859
+    /* "pysam/ctabix.pyx":887
  * 
  *             # skip empty lines
  *             if b[0] == '\0' or b[0] == '\n' or b[0] == '\r': continue             # <<<<<<<<<<<<<<
  * 
  *             # gzgets terminates at \n, no need to test
  */
-    __pyx_t_1 = ((__pyx_v_b[0]) == '\x00');
+    __pyx_t_1 = (((__pyx_v_b[0]) == '\x00') != 0);
     if (!__pyx_t_1) {
-      __pyx_t_3 = ((__pyx_v_b[0]) == '\n');
+      __pyx_t_3 = (((__pyx_v_b[0]) == '\n') != 0);
       if (!__pyx_t_3) {
-        __pyx_t_4 = ((__pyx_v_b[0]) == '\r');
+        __pyx_t_4 = (((__pyx_v_b[0]) == '\r') != 0);
         __pyx_t_5 = __pyx_t_4;
       } else {
         __pyx_t_5 = __pyx_t_3;
@@ -7875,11 +8608,9 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
     }
     if (__pyx_t_3) {
       goto __pyx_L3_continue;
-      goto __pyx_L7;
     }
-    __pyx_L7:;
 
-    /* "pysam/ctabix.pyx":864
+    /* "pysam/ctabix.pyx":892
  * 
  *             # parser creates a copy
  *             return self.parser.parse( b, self.buffer.l )             # <<<<<<<<<<<<<<
@@ -7887,7 +8618,7 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
  *         raise StopIteration
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_6 = ((struct __pyx_vtabstruct_5pysam_6ctabix_Parser *)__pyx_v_self->parser->__pyx_vtab)->parse(__pyx_v_self->parser, __pyx_v_b, __pyx_v_self->buffer.l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = ((struct __pyx_vtabstruct_5pysam_6ctabix_Parser *)__pyx_v_self->parser->__pyx_vtab)->parse(__pyx_v_self->parser, __pyx_v_b, __pyx_v_self->buffer.l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __pyx_r = __pyx_t_6;
     __pyx_t_6 = 0;
@@ -7896,7 +8627,7 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
   }
   __pyx_L4_break:;
 
-  /* "pysam/ctabix.pyx":866
+  /* "pysam/ctabix.pyx":894
  *             return self.parser.parse( b, self.buffer.l )
  * 
  *         raise StopIteration             # <<<<<<<<<<<<<<
@@ -7904,10 +8635,17 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
  *     def __dealloc__(self):
  */
   __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":868
+ *         return self
+ * 
+ *     cdef __cnext__(self):             # <<<<<<<<<<<<<<
+ * 
+ *         cdef char * b
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_6);
   __Pyx_AddTraceback("pysam.ctabix.tabix_file_iterator.__cnext__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -7918,28 +8656,30 @@ static PyObject *__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__(struct _
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":896
+ *         raise StopIteration
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         free(self.buffer.s)
+ * 
+ */
+
 /* Python wrapper */
 static void __pyx_pw_5pysam_6ctabix_19tabix_file_iterator_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
 static void __pyx_pw_5pysam_6ctabix_19tabix_file_iterator_5__dealloc__(PyObject *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
   __pyx_pf_5pysam_6ctabix_19tabix_file_iterator_4__dealloc__(((struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
 }
 
-/* "pysam/ctabix.pyx":868
- *         raise StopIteration
- * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         free(self.buffer.s)
- * 
- */
-
 static void __pyx_pf_5pysam_6ctabix_19tabix_file_iterator_4__dealloc__(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__dealloc__", 0);
 
-  /* "pysam/ctabix.pyx":869
+  /* "pysam/ctabix.pyx":897
  * 
  *     def __dealloc__(self):
  *         free(self.buffer.s)             # <<<<<<<<<<<<<<
@@ -7948,9 +8688,26 @@ static void __pyx_pf_5pysam_6ctabix_19tabix_file_iterator_4__dealloc__(struct __
  */
   free(__pyx_v_self->buffer.s);
 
+  /* "pysam/ctabix.pyx":896
+ *         raise StopIteration
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         free(self.buffer.s)
+ * 
+ */
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
 }
 
+/* "pysam/ctabix.pyx":899
+ *         free(self.buffer.s)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         return self.__cnext__()
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_7__next__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_7__next__(PyObject *__pyx_v_self) {
@@ -7958,18 +8715,12 @@ static PyObject *__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_7__next__(PyObjec
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_6ctabix_19tabix_file_iterator_6__next__(((struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":871
- *         free(self.buffer.s)
- * 
- *     def __next__(self):             # <<<<<<<<<<<<<<
- *         return self.__cnext__()
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_6__next__(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -7979,7 +8730,7 @@ static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_6__next__(struct
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__next__", 0);
 
-  /* "pysam/ctabix.pyx":872
+  /* "pysam/ctabix.pyx":900
  * 
  *     def __next__(self):
  *         return self.__cnext__()             # <<<<<<<<<<<<<<
@@ -7987,14 +8738,21 @@ static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_6__next__(struct
  *     def next(self):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":899
+ *         free(self.buffer.s)
+ * 
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ *         return self.__cnext__()
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.ctabix.tabix_file_iterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -8005,6 +8763,14 @@ static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_6__next__(struct
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":902
+ *         return self.__cnext__()
+ * 
+ *     def next(self):             # <<<<<<<<<<<<<<
+ *         return self.__cnext__()
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_9next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
 static char __pyx_doc_5pysam_6ctabix_19tabix_file_iterator_8next[] = "tabix_file_iterator.next(self)";
@@ -8013,18 +8779,12 @@ static PyObject *__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_9next(PyObject *_
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("next (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_6ctabix_19tabix_file_iterator_8next(((struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":874
- *         return self.__cnext__()
- * 
- *     def next(self):             # <<<<<<<<<<<<<<
- *         return self.__cnext__()
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_8next(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -8034,22 +8794,29 @@ static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_8next(struct __py
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("next", 0);
 
-  /* "pysam/ctabix.pyx":875
+  /* "pysam/ctabix.pyx":903
  * 
  *     def next(self):
  *         return self.__cnext__()             # <<<<<<<<<<<<<<
  * 
- * class tabix_generic_iterator:
+ * 
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __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;
+  /* "pysam/ctabix.pyx":902
+ *         return self.__cnext__()
+ * 
+ *     def next(self):             # <<<<<<<<<<<<<<
+ *         return self.__cnext__()
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.ctabix.tabix_file_iterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -8060,6 +8827,14 @@ static PyObject *__pyx_pf_5pysam_6ctabix_19tabix_file_iterator_8next(struct __py
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":911
+ *     Permits the use of file-like objects for example from the gzip module.
+ *     '''
+ *     def __init__(self, infile, parser ):             # <<<<<<<<<<<<<<
+ * 
+ *         self.infile = infile
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_6ctabix_22tabix_generic_iterator___init__[] = "tabix_generic_iterator.__init__(self, infile, parser)";
@@ -8068,11 +8843,14 @@ static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_1__init__(PyOb
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_infile = 0;
   PyObject *__pyx_v_parser = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__infile,&__pyx_n_s__parser,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_infile,&__pyx_n_s_parser,0};
     PyObject* values[3] = {0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -8087,21 +8865,21 @@ static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_1__init__(PyOb
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__infile)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_infile)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
       goto __pyx_L5_argtuple_error;
@@ -8116,25 +8894,19 @@ static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_1__init__(PyOb
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.ctabix.tabix_generic_iterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_6ctabix_22tabix_generic_iterator___init__(__pyx_self, __pyx_v_self, __pyx_v_infile, __pyx_v_parser);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":882
- *     Permits the use of file-like objects for example from the gzip module.
- *     '''
- *     def __init__(self, infile, parser ):             # <<<<<<<<<<<<<<
- * 
- *         self.infile = infile
- */
-
 static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -8146,48 +8918,63 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator___init__(CYTHO
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__init__", 0);
 
-  /* "pysam/ctabix.pyx":884
+  /* "pysam/ctabix.pyx":913
  *     def __init__(self, infile, parser ):
  * 
  *         self.infile = infile             # <<<<<<<<<<<<<<
- *         if self.infile.closed: raise ValueError( "I/O operation on closed file." )
- *         self.parser = parser
+ *         if self.infile.closed:
+ *             raise ValueError("I/O operation on closed file.")
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__infile, __pyx_v_infile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_infile, __pyx_v_infile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":885
+  /* "pysam/ctabix.pyx":914
  * 
  *         self.infile = infile
- *         if self.infile.closed: raise ValueError( "I/O operation on closed file." )             # <<<<<<<<<<<<<<
+ *         if self.infile.closed:             # <<<<<<<<<<<<<<
+ *             raise ValueError("I/O operation on closed file.")
  *         self.parser = parser
- * 
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__infile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_infile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__closed); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_closed); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "pysam/ctabix.pyx":915
+ *         self.infile = infile
+ *         if self.infile.closed:
+ *             raise ValueError("I/O operation on closed file.")             # <<<<<<<<<<<<<<
+ *         self.parser = parser
+ * 
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":886
- *         self.infile = infile
- *         if self.infile.closed: raise ValueError( "I/O operation on closed file." )
+  /* "pysam/ctabix.pyx":916
+ *         if self.infile.closed:
+ *             raise ValueError("I/O operation on closed file.")
  *         self.parser = parser             # <<<<<<<<<<<<<<
  * 
  *     def __iter__(self):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__parser, __pyx_v_parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parser, __pyx_v_parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/ctabix.pyx":911
+ *     Permits the use of file-like objects for example from the gzip module.
+ *     '''
+ *     def __init__(self, infile, parser ):             # <<<<<<<<<<<<<<
+ * 
+ *         self.infile = infile
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -8201,6 +8988,14 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator___init__(CYTHO
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":918
+ *         self.parser = parser
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_3__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_6ctabix_22tabix_generic_iterator_2__iter__[] = "tabix_generic_iterator.__iter__(self)";
@@ -8210,24 +9005,18 @@ static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_3__iter__(PyOb
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_2__iter__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":888
- *         self.parser = parser
- * 
- *     def __iter__(self):             # <<<<<<<<<<<<<<
- *         return self
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__iter__", 0);
 
-  /* "pysam/ctabix.pyx":889
+  /* "pysam/ctabix.pyx":919
  * 
  *     def __iter__(self):
  *         return self             # <<<<<<<<<<<<<<
@@ -8239,13 +9028,29 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_2__iter__(CYTH
   __pyx_r = __pyx_v_self;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  /* "pysam/ctabix.pyx":918
+ *         self.parser = parser
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":922
+ * 
+ *     # cython version - required for python 3
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ * 
+ *         cdef char * b
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_5__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_6ctabix_22tabix_generic_iterator_4__next__[] = "tabix_generic_iterator.__next__(self)";
@@ -8255,18 +9060,12 @@ static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_5__next__(PyOb
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":892
- * 
- *     # cython version - required for python 3
- *     def __next__(self):             # <<<<<<<<<<<<<<
- * 
- *         cdef char * b, * cpy
- */
-
 static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   char *__pyx_v_b;
   char *__pyx_v_cpy;
@@ -8290,31 +9089,29 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__next__", 0);
 
-  /* "pysam/ctabix.pyx":899
+  /* "pysam/ctabix.pyx":930
  *         # note that GzipFile.close() does not close the file
  *         # reading is still possible.
  *         if self.infile.closed: raise ValueError( "I/O operation on closed file." )             # <<<<<<<<<<<<<<
  * 
  *         while 1:
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__infile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_infile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__closed); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_closed); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_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 = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_56), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":901
+  /* "pysam/ctabix.pyx":932
  *         if self.infile.closed: raise ValueError( "I/O operation on closed file." )
  * 
  *         while 1:             # <<<<<<<<<<<<<<
@@ -8322,76 +9119,71 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
  *             line = self.infile.readline()
  */
   while (1) {
-    if (!1) break;
 
-    /* "pysam/ctabix.pyx":903
+    /* "pysam/ctabix.pyx":934
  *         while 1:
  * 
  *             line = self.infile.readline()             # <<<<<<<<<<<<<<
  *             if not line: break
  * 
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__infile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_infile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__readline); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_readline); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_XDECREF(__pyx_v_line);
-    __pyx_v_line = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
     __pyx_t_2 = 0;
 
-    /* "pysam/ctabix.pyx":904
+    /* "pysam/ctabix.pyx":935
  * 
  *             line = self.infile.readline()
  *             if not line: break             # <<<<<<<<<<<<<<
  * 
  *             s = _force_bytes( line )
  */
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_line); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = (!__pyx_t_3);
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_line); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = ((!__pyx_t_3) != 0);
     if (__pyx_t_4) {
       goto __pyx_L5_break;
-      goto __pyx_L6;
     }
-    __pyx_L6:;
 
-    /* "pysam/ctabix.pyx":906
+    /* "pysam/ctabix.pyx":937
  *             if not line: break
  * 
  *             s = _force_bytes( line )             # <<<<<<<<<<<<<<
  *             b = s
  *             nbytes = len( line )
  */
-    __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_line)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __pyx_f_5pysam_6ctabix__force_bytes(__pyx_v_line); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_XDECREF(((PyObject *)__pyx_v_s));
-    __pyx_v_s = ((PyObject*)__pyx_t_2);
+    __Pyx_XDECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_2));
     __pyx_t_2 = 0;
 
-    /* "pysam/ctabix.pyx":907
+    /* "pysam/ctabix.pyx":938
  * 
  *             s = _force_bytes( line )
  *             b = s             # <<<<<<<<<<<<<<
  *             nbytes = len( line )
  *             assert b[nbytes] == '\0'
  */
-    __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_s)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_s); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_b = __pyx_t_5;
 
-    /* "pysam/ctabix.pyx":908
+    /* "pysam/ctabix.pyx":939
  *             s = _force_bytes( line )
  *             b = s
  *             nbytes = len( line )             # <<<<<<<<<<<<<<
  *             assert b[nbytes] == '\0'
  * 
  */
-    __pyx_t_6 = PyObject_Length(__pyx_v_line); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_Length(__pyx_v_line); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_nbytes = __pyx_t_6;
 
-    /* "pysam/ctabix.pyx":909
+    /* "pysam/ctabix.pyx":940
  *             b = s
  *             nbytes = len( line )
  *             assert b[nbytes] == '\0'             # <<<<<<<<<<<<<<
@@ -8399,38 +9191,38 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
  *             # skip comments
  */
     #ifndef CYTHON_WITHOUT_ASSERTIONS
-    if (unlikely(!((__pyx_v_b[__pyx_v_nbytes]) == '\x00'))) {
-      PyErr_SetNone(PyExc_AssertionError);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(!Py_OptimizeFlag)) {
+      if (unlikely(!(((__pyx_v_b[__pyx_v_nbytes]) == '\x00') != 0))) {
+        PyErr_SetNone(PyExc_AssertionError);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
     }
     #endif
 
-    /* "pysam/ctabix.pyx":912
+    /* "pysam/ctabix.pyx":943
  * 
  *             # skip comments
  *             if (b[0] == '#'): continue             # <<<<<<<<<<<<<<
  * 
  *             # skip empty lines
  */
-    __pyx_t_4 = ((__pyx_v_b[0]) == '#');
+    __pyx_t_4 = (((__pyx_v_b[0]) == '#') != 0);
     if (__pyx_t_4) {
       goto __pyx_L4_continue;
-      goto __pyx_L7;
     }
-    __pyx_L7:;
 
-    /* "pysam/ctabix.pyx":915
+    /* "pysam/ctabix.pyx":946
  * 
  *             # skip empty lines
  *             if b[0] == '\0' or b[0] == '\n' or b[0] == '\r': continue             # <<<<<<<<<<<<<<
  * 
  *             # make sure that entry is complete
  */
-    __pyx_t_4 = ((__pyx_v_b[0]) == '\x00');
+    __pyx_t_4 = (((__pyx_v_b[0]) == '\x00') != 0);
     if (!__pyx_t_4) {
-      __pyx_t_3 = ((__pyx_v_b[0]) == '\n');
+      __pyx_t_3 = (((__pyx_v_b[0]) == '\n') != 0);
       if (!__pyx_t_3) {
-        __pyx_t_7 = ((__pyx_v_b[0]) == '\r');
+        __pyx_t_7 = (((__pyx_v_b[0]) == '\r') != 0);
         __pyx_t_8 = __pyx_t_7;
       } else {
         __pyx_t_8 = __pyx_t_3;
@@ -8441,51 +9233,47 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
     }
     if (__pyx_t_3) {
       goto __pyx_L4_continue;
-      goto __pyx_L8;
     }
-    __pyx_L8:;
 
-    /* "pysam/ctabix.pyx":918
+    /* "pysam/ctabix.pyx":949
  * 
  *             # make sure that entry is complete
  *             if b[nbytes-1] != '\n' and b[nbytes-1] != '\r':             # <<<<<<<<<<<<<<
  *                 raise ValueError( "incomplete line at %s" % line )
  * 
  */
-    __pyx_t_3 = ((__pyx_v_b[(__pyx_v_nbytes - 1)]) != '\n');
+    __pyx_t_3 = (((__pyx_v_b[(__pyx_v_nbytes - 1)]) != '\n') != 0);
     if (__pyx_t_3) {
-      __pyx_t_4 = ((__pyx_v_b[(__pyx_v_nbytes - 1)]) != '\r');
+      __pyx_t_4 = (((__pyx_v_b[(__pyx_v_nbytes - 1)]) != '\r') != 0);
       __pyx_t_8 = __pyx_t_4;
     } else {
       __pyx_t_8 = __pyx_t_3;
     }
     if (__pyx_t_8) {
 
-      /* "pysam/ctabix.pyx":919
+      /* "pysam/ctabix.pyx":950
  *             # make sure that entry is complete
  *             if b[nbytes-1] != '\n' and b[nbytes-1] != '\r':
  *                 raise ValueError( "incomplete line at %s" % line )             # <<<<<<<<<<<<<<
  * 
  *             # create a copy
  */
-      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_57), __pyx_v_line); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_incomplete_line_at_s, __pyx_v_line); 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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      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_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L9;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L9:;
 
-    /* "pysam/ctabix.pyx":922
+    /* "pysam/ctabix.pyx":953
  * 
  *             # create a copy
  *             cpy = <char*>malloc(nbytes+1)             # <<<<<<<<<<<<<<
@@ -8494,21 +9282,19 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
  */
     __pyx_v_cpy = ((char *)malloc((__pyx_v_nbytes + 1)));
 
-    /* "pysam/ctabix.pyx":923
+    /* "pysam/ctabix.pyx":954
  *             # create a copy
  *             cpy = <char*>malloc(nbytes+1)
  *             if cpy == NULL: raise MemoryError()             # <<<<<<<<<<<<<<
  *             memcpy( cpy, b, nbytes+1)
  * 
  */
-    __pyx_t_8 = (__pyx_v_cpy == NULL);
+    __pyx_t_8 = ((__pyx_v_cpy == NULL) != 0);
     if (__pyx_t_8) {
-      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L10;
+      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L10:;
 
-    /* "pysam/ctabix.pyx":924
+    /* "pysam/ctabix.pyx":955
  *             cpy = <char*>malloc(nbytes+1)
  *             if cpy == NULL: raise MemoryError()
  *             memcpy( cpy, b, nbytes+1)             # <<<<<<<<<<<<<<
@@ -8517,7 +9303,7 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
  */
     memcpy(__pyx_v_cpy, __pyx_v_b, (__pyx_v_nbytes + 1));
 
-    /* "pysam/ctabix.pyx":926
+    /* "pysam/ctabix.pyx":957
  *             memcpy( cpy, b, nbytes+1)
  * 
  *             return self.parser(cpy, nbytes)             # <<<<<<<<<<<<<<
@@ -8525,24 +9311,24 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
  *         raise StopIteration
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyBytes_FromString(__pyx_v_cpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_v_nbytes); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_cpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_v_nbytes); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __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 = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_1));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
     PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
     __Pyx_GIVEREF(__pyx_t_9);
     __pyx_t_1 = 0;
     __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     __pyx_r = __pyx_t_9;
     __pyx_t_9 = 0;
     goto __pyx_L0;
@@ -8550,7 +9336,7 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
   }
   __pyx_L5_break:;
 
-  /* "pysam/ctabix.pyx":928
+  /* "pysam/ctabix.pyx":959
  *             return self.parser(cpy, nbytes)
  * 
  *         raise StopIteration             # <<<<<<<<<<<<<<
@@ -8558,10 +9344,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
  *     # python version - required for python 2.7
  */
   __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":922
+ * 
+ *     # cython version - required for python 3
+ *     def __next__(self):             # <<<<<<<<<<<<<<
+ * 
+ *         cdef char * b
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -8577,6 +9370,14 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_4__next__(CYTH
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":962
+ * 
+ *     # python version - required for python 2.7
+ *     def next(self):             # <<<<<<<<<<<<<<
+ *         return self.__next__()
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_7next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_6ctabix_22tabix_generic_iterator_6next[] = "tabix_generic_iterator.next(self)";
@@ -8586,18 +9387,12 @@ static PyObject *__pyx_pw_5pysam_6ctabix_22tabix_generic_iterator_7next(PyObject
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("next (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_6next(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":931
- * 
- *     # python version - required for python 2.7
- *     def next(self):             # <<<<<<<<<<<<<<
- *         return self.__next__()
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_6next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -8608,7 +9403,7 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_6next(CYTHON_U
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("next", 0);
 
-  /* "pysam/ctabix.pyx":932
+  /* "pysam/ctabix.pyx":963
  *     # python version - required for python 2.7
  *     def next(self):
  *         return self.__next__()             # <<<<<<<<<<<<<<
@@ -8616,17 +9411,24 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_6next(CYTHON_U
  * def tabix_iterator( infile, parser ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____next__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __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 = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":962
+ * 
+ *     # python version - required for python 2.7
+ *     def next(self):             # <<<<<<<<<<<<<<
+ *         return self.__next__()
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -8638,6 +9440,14 @@ static PyObject *__pyx_pf_5pysam_6ctabix_22tabix_generic_iterator_6next(CYTHON_U
   return __pyx_r;
 }
 
+/* "pysam/ctabix.pyx":965
+ *         return self.__next__()
+ * 
+ * def tabix_iterator( infile, parser ):             # <<<<<<<<<<<<<<
+ *     """return an iterator over all entries in a file."""
+ *     if PYTHON3:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_6ctabix_5tabix_iterator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_6ctabix_4tabix_iterator[] = "tabix_iterator(infile, parser)\nreturn an iterator over all entries in a file.";
@@ -8645,11 +9455,14 @@ static PyMethodDef __pyx_mdef_5pysam_6ctabix_5tabix_iterator = {__Pyx_NAMESTR("t
 static PyObject *__pyx_pw_5pysam_6ctabix_5tabix_iterator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_infile = 0;
   PyObject *__pyx_v_parser = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("tabix_iterator (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__infile,&__pyx_n_s__parser,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_infile,&__pyx_n_s_parser,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -8663,16 +9476,16 @@ static PyObject *__pyx_pw_5pysam_6ctabix_5tabix_iterator(PyObject *__pyx_self, P
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__infile)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_infile)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("tabix_iterator", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("tabix_iterator", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tabix_iterator") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tabix_iterator") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -8685,25 +9498,19 @@ static PyObject *__pyx_pw_5pysam_6ctabix_5tabix_iterator(PyObject *__pyx_self, P
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("tabix_iterator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("tabix_iterator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.ctabix.tabix_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_6ctabix_4tabix_iterator(__pyx_self, __pyx_v_infile, __pyx_v_parser);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/ctabix.pyx":934
- *         return self.__next__()
- * 
- * def tabix_iterator( infile, parser ):             # <<<<<<<<<<<<<<
- *     """return an iterator over all entries in a file."""
- *     if PYTHON3:
- */
-
 static PyObject *__pyx_pf_5pysam_6ctabix_4tabix_iterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -8716,20 +9523,20 @@ static PyObject *__pyx_pf_5pysam_6ctabix_4tabix_iterator(CYTHON_UNUSED PyObject
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("tabix_iterator", 0);
 
-  /* "pysam/ctabix.pyx":936
+  /* "pysam/ctabix.pyx":967
  * def tabix_iterator( infile, parser ):
  *     """return an iterator over all entries in a file."""
  *     if PYTHON3:             # <<<<<<<<<<<<<<
  *         return tabix_generic_iterator( infile, parser )
  *     else:
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __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 = 936; __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 = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
 
-    /* "pysam/ctabix.pyx":937
+    /* "pysam/ctabix.pyx":968
  *     """return an iterator over all entries in a file."""
  *     if PYTHON3:
  *         return tabix_generic_iterator( infile, parser )             # <<<<<<<<<<<<<<
@@ -8737,9 +9544,9 @@ static PyObject *__pyx_pf_5pysam_6ctabix_4tabix_iterator(CYTHON_UNUSED PyObject
  *         return tabix_file_iterator( infile, parser )
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_58); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tabix_generic_iterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __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 = 937; __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 = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_v_infile);
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_infile);
@@ -8747,18 +9554,17 @@ static PyObject *__pyx_pf_5pysam_6ctabix_4tabix_iterator(CYTHON_UNUSED PyObject
     __Pyx_INCREF(__pyx_v_parser);
     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser);
     __Pyx_GIVEREF(__pyx_v_parser);
-    __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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __pyx_r = __pyx_t_4;
     __pyx_t_4 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "pysam/ctabix.pyx":939
+    /* "pysam/ctabix.pyx":970
  *         return tabix_generic_iterator( infile, parser )
  *     else:
  *         return tabix_file_iterator( infile, parser )             # <<<<<<<<<<<<<<
@@ -8766,7 +9572,7 @@ static PyObject *__pyx_pf_5pysam_6ctabix_4tabix_iterator(CYTHON_UNUSED PyObject
  *     # file objects can use C stdio
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_INCREF(__pyx_v_infile);
     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_infile);
@@ -8774,17 +9580,23 @@ static PyObject *__pyx_pf_5pysam_6ctabix_4tabix_iterator(CYTHON_UNUSED PyObject
     __Pyx_INCREF(__pyx_v_parser);
     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_parser);
     __Pyx_GIVEREF(__pyx_v_parser);
-    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_tabix_file_iterator)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_6ctabix_tabix_file_iterator)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __pyx_r = __pyx_t_3;
     __pyx_t_3 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/ctabix.pyx":965
+ *         return self.__next__()
+ * 
+ * def tabix_iterator( infile, parser ):             # <<<<<<<<<<<<<<
+ *     """return an iterator over all entries in a file."""
+ *     if PYTHON3:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_3);
@@ -8800,13 +9612,18 @@ static struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator __pyx_vtable_5
 
 static PyObject *__pyx_tp_new_5pysam_6ctabix_tabix_file_iterator(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)o);
   p->__pyx_vtab = __pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator;
   p->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)Py_None); Py_INCREF(Py_None);
   p->infile = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_1__cinit__(o, a, k) < 0) {
+  if (unlikely(__pyx_pw_5pysam_6ctabix_19tabix_file_iterator_1__cinit__(o, a, k) < 0)) {
     Py_DECREF(o); o = 0;
   }
   return o;
@@ -8814,19 +9631,22 @@ static PyObject *__pyx_tp_new_5pysam_6ctabix_tabix_file_iterator(PyTypeObject *t
 
 static void __pyx_tp_dealloc_5pysam_6ctabix_tabix_file_iterator(PyObject *o) {
   struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
   PyObject_GC_UnTrack(o);
   {
     PyObject *etype, *eval, *etb;
     PyErr_Fetch(&etype, &eval, &etb);
     ++Py_REFCNT(o);
     __pyx_pw_5pysam_6ctabix_19tabix_file_iterator_5__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
     --Py_REFCNT(o);
     PyErr_Restore(etype, eval, etb);
   }
   Py_CLEAR(p->parser);
   Py_CLEAR(p->infile);
-  PyObject_GC_Track(o);
   (*Py_TYPE(o)->tp_free)(o);
 }
 
@@ -8843,8 +9663,8 @@ static int __pyx_tp_traverse_5pysam_6ctabix_tabix_file_iterator(PyObject *o, vis
 }
 
 static int __pyx_tp_clear_5pysam_6ctabix_tabix_file_iterator(PyObject *o) {
-  struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)o;
   PyObject* tmp;
+  struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *)o;
   tmp = ((PyObject*)p->parser);
   p->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)Py_None); Py_INCREF(Py_None);
   Py_XDECREF(tmp);
@@ -8860,104 +9680,6 @@ static PyMethodDef __pyx_methods_5pysam_6ctabix_tabix_file_iterator[] = {
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_tabix_file_iterator = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_tabix_file_iterator = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_tabix_file_iterator = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_tabix_file_iterator = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
 static PyTypeObject __pyx_type_5pysam_6ctabix_tabix_file_iterator = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("pysam.ctabix.tabix_file_iterator"), /*tp_name*/
@@ -8973,16 +9695,16 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_tabix_file_iterator = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_tabix_file_iterator, /*tp_as_number*/
-  &__pyx_tp_as_sequence_tabix_file_iterator, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_tabix_file_iterator, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_tabix_file_iterator, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   __Pyx_DOCSTR("iterate over a compressed or uncompressed ``infile``.\n    "), /*tp_doc*/
   __pyx_tp_traverse_5pysam_6ctabix_tabix_file_iterator, /*tp_traverse*/
   __pyx_tp_clear_5pysam_6ctabix_tabix_file_iterator, /*tp_clear*/
@@ -9012,15 +9734,23 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_tabix_file_iterator = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 
 static PyObject *__pyx_tp_new_5pysam_6ctabix_Tabixfile(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5pysam_6ctabix_Tabixfile *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)o);
   p->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)Py_None); Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_6ctabix_9Tabixfile_1__cinit__(o, a, k) < 0) {
+  if (unlikely(__pyx_pw_5pysam_6ctabix_9Tabixfile_1__cinit__(o, a, k) < 0)) {
     Py_DECREF(o); o = 0;
   }
   return o;
@@ -9028,18 +9758,21 @@ static PyObject *__pyx_tp_new_5pysam_6ctabix_Tabixfile(PyTypeObject *t, PyObject
 
 static void __pyx_tp_dealloc_5pysam_6ctabix_Tabixfile(PyObject *o) {
   struct __pyx_obj_5pysam_6ctabix_Tabixfile *p = (struct __pyx_obj_5pysam_6ctabix_Tabixfile *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
   PyObject_GC_UnTrack(o);
   {
     PyObject *etype, *eval, *etb;
     PyErr_Fetch(&etype, &eval, &etb);
     ++Py_REFCNT(o);
-    __pyx_pw_5pysam_6ctabix_9Tabixfile_13__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+    __pyx_pw_5pysam_6ctabix_9Tabixfile_11__dealloc__(o);
     --Py_REFCNT(o);
     PyErr_Restore(etype, eval, etb);
   }
   Py_CLEAR(p->parser);
-  PyObject_GC_Track(o);
   (*Py_TYPE(o)->tp_free)(o);
 }
 
@@ -9053,8 +9786,8 @@ static int __pyx_tp_traverse_5pysam_6ctabix_Tabixfile(PyObject *o, visitproc v,
 }
 
 static int __pyx_tp_clear_5pysam_6ctabix_Tabixfile(PyObject *o) {
-  struct __pyx_obj_5pysam_6ctabix_Tabixfile *p = (struct __pyx_obj_5pysam_6ctabix_Tabixfile *)o;
   PyObject* tmp;
+  struct __pyx_obj_5pysam_6ctabix_Tabixfile *p = (struct __pyx_obj_5pysam_6ctabix_Tabixfile *)o;
   tmp = ((PyObject*)p->parser);
   p->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)Py_None); Py_INCREF(Py_None);
   Py_XDECREF(tmp);
@@ -9066,125 +9799,26 @@ static PyObject *__pyx_getprop_5pysam_6ctabix_9Tabixfile_filename(PyObject *o, C
 }
 
 static PyObject *__pyx_getprop_5pysam_6ctabix_9Tabixfile_header(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_6ctabix_9Tabixfile_6header_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_6ctabix_9Tabixfile_contigs(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_6ctabix_9Tabixfile_7contigs_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_6ctabix_Tabixfile[] = {
-  {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_3_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_2_isOpen)},
-  {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_5_open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_4_open)},
-  {__Pyx_NAMESTR("_parseRegion"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_7_parseRegion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_6_parseRegion)},
-  {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_9fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_8fetch)},
-  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_11close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_10close)},
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_6ctabix_Tabixfile[] = {
-  {(char *)"filename", __pyx_getprop_5pysam_6ctabix_9Tabixfile_filename, 0, __Pyx_DOCSTR(__pyx_k_59), 0},
-  {(char *)"header", __pyx_getprop_5pysam_6ctabix_9Tabixfile_header, 0, __Pyx_DOCSTR(__pyx_k_60), 0},
-  {(char *)"contigs", __pyx_getprop_5pysam_6ctabix_9Tabixfile_contigs, 0, __Pyx_DOCSTR(__pyx_k_61), 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_Tabixfile = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
+  return __pyx_pw_5pysam_6ctabix_9Tabixfile_6header_1__get__(o);
+}
 
-static PySequenceMethods __pyx_tp_as_sequence_Tabixfile = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
+static PyObject *__pyx_getprop_5pysam_6ctabix_9Tabixfile_contigs(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_6ctabix_9Tabixfile_7contigs_1__get__(o);
+}
 
-static PyMappingMethods __pyx_tp_as_mapping_Tabixfile = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
+static PyMethodDef __pyx_methods_5pysam_6ctabix_Tabixfile[] = {
+  {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_3_open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_2_open)},
+  {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_5_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_4_isOpen)},
+  {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_7fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_6fetch)},
+  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_6ctabix_9Tabixfile_9close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_9Tabixfile_8close)},
+  {0, 0, 0, 0}
 };
 
-static PyBufferProcs __pyx_tp_as_buffer_Tabixfile = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
+static struct PyGetSetDef __pyx_getsets_5pysam_6ctabix_Tabixfile[] = {
+  {(char *)"filename", __pyx_getprop_5pysam_6ctabix_9Tabixfile_filename, 0, __Pyx_DOCSTR(__pyx_k_filename_associated_with_this_ob), 0},
+  {(char *)"header", __pyx_getprop_5pysam_6ctabix_9Tabixfile_header, 0, __Pyx_DOCSTR(__pyx_k_the_file_header_note_The_header), 0},
+  {(char *)"contigs", __pyx_getprop_5pysam_6ctabix_9Tabixfile_contigs, 0, __Pyx_DOCSTR(__pyx_k_chromosome_names), 0},
+  {0, 0, 0, 0, 0}
 };
 
 static PyTypeObject __pyx_type_5pysam_6ctabix_Tabixfile = {
@@ -9202,17 +9836,17 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_Tabixfile = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_Tabixfile, /*tp_as_number*/
-  &__pyx_tp_as_sequence_Tabixfile, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_Tabixfile, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_Tabixfile, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("*(filename, mode='r', parser = None)*\n\n    opens a :term:`tabix file` for reading. A missing\n    index (*filename* + \".tbi\") will raise an exception.\n\n    *parser* sets the default parser for this tabix file. If *parser*\n    is None, the results are returned as an unparsed string.\n    Otherwise, *parser* is assumed to be a functor that will return\n    parsed data (see for example :meth:`asTuple` and :meth:`asGTF`).\n    "), /*tp_doc*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("*(filename, mode='r', parser = None)*\n\n    opens a :term:`tabix file` for reading. A missing\n    index (*filename* + \".tbi\") will raise an exception. *index*\n    specifies an alternative name of the index.\n\n    *parser* sets the default parser for this tabix file. If *parser*\n    is None, the results are returned as an unparsed string.\n    Otherwise, *parser* is assumed to be a functor that will return\n    parsed data (see for example :meth:`asTuple` and :meth: [...]
   __pyx_tp_traverse_5pysam_6ctabix_Tabixfile, /*tp_traverse*/
   __pyx_tp_clear_5pysam_6ctabix_Tabixfile, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -9241,139 +9875,45 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_Tabixfile = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
+static struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_vtable_5pysam_6ctabix_Parser;
 
-static PyObject *__pyx_tp_new_5pysam_6ctabix_TabixIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  if (__pyx_pw_5pysam_6ctabix_13TabixIterator_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
+static PyObject *__pyx_tp_new_5pysam_6ctabix_Parser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_Parser *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_Parser *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_6ctabix_Parser;
   return o;
 }
 
-static void __pyx_tp_dealloc_5pysam_6ctabix_TabixIterator(PyObject *o) {
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_6ctabix_13TabixIterator_7__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
+static void __pyx_tp_dealloc_5pysam_6ctabix_Parser(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
   }
+  #endif
   (*Py_TYPE(o)->tp_free)(o);
 }
 
-static PyMethodDef __pyx_methods_5pysam_6ctabix_TabixIterator[] = {
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_13TabixIterator_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_13TabixIterator_4__next__)},
+static PyMethodDef __pyx_methods_5pysam_6ctabix_Parser[] = {
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_TabixIterator = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_TabixIterator = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_TabixIterator = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_TabixIterator = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIterator = {
+static PyTypeObject __pyx_type_5pysam_6ctabix_Parser = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.ctabix.TabixIterator"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_6ctabix_TabixIterator), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.ctabix.Parser"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_Parser), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_6ctabix_TabixIterator, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_6ctabix_Parser, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -9383,24 +9923,24 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIterator = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_TabixIterator, /*tp_as_number*/
-  &__pyx_tp_as_sequence_TabixIterator, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_TabixIterator, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
-  0, /*tp_call*/
+  __pyx_pw_5pysam_6ctabix_6Parser_1__call__, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_TabixIterator, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("iterates over rows in *tabixfile* in region\n    given by *tid*, *start* and *end*.\n    "), /*tp_doc*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  0, /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_6ctabix_13TabixIterator_3__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_6ctabix_13TabixIterator_5__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_6ctabix_TabixIterator, /*tp_methods*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_5pysam_6ctabix_Parser, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -9410,7 +9950,7 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIterator = {
   0, /*tp_dictoffset*/
   0, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_6ctabix_TabixIterator, /*tp_new*/
+  __pyx_tp_new_5pysam_6ctabix_Parser, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -9422,139 +9962,27 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIterator = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
+static struct __pyx_vtabstruct_5pysam_6ctabix_asTuple __pyx_vtable_5pysam_6ctabix_asTuple;
 
-static PyObject *__pyx_tp_new_5pysam_6ctabix_TabixHeaderIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  if (__pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
+static PyObject *__pyx_tp_new_5pysam_6ctabix_asTuple(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_asTuple *p;
+  PyObject *o = __pyx_tp_new_5pysam_6ctabix_Parser(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_asTuple *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_6ctabix_asTuple;
   return o;
 }
 
-static void __pyx_tp_dealloc_5pysam_6ctabix_TabixHeaderIterator(PyObject *o) {
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_7__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
-  }
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_6ctabix_TabixHeaderIterator[] = {
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_19TabixHeaderIterator_4__next__)},
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_TabixHeaderIterator = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_TabixHeaderIterator = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_TabixHeaderIterator = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_TabixHeaderIterator = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_6ctabix_TabixHeaderIterator = {
+static PyTypeObject __pyx_type_5pysam_6ctabix_asTuple = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.ctabix.TabixHeaderIterator"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.ctabix.asTuple"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_asTuple), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_6ctabix_TabixHeaderIterator, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_6ctabix_Parser, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -9564,24 +9992,28 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixHeaderIterator = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_TabixHeaderIterator, /*tp_as_number*/
-  &__pyx_tp_as_sequence_TabixHeaderIterator, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_TabixHeaderIterator, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_5pysam_6ctabix_6Parser_1__call__, /*tp_call*/
+  #else
   0, /*tp_call*/
+  #endif
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_TabixHeaderIterator, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("return header lines.\n    "), /*tp_doc*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  __Pyx_DOCSTR("converts a :term:`tabix row` into a python tuple.\n\n    Access is by numeric index.\n    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_3__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_6ctabix_19TabixHeaderIterator_5__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_6ctabix_TabixHeaderIterator, /*tp_methods*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  0, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -9591,7 +10023,7 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixHeaderIterator = {
   0, /*tp_dictoffset*/
   0, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_6ctabix_TabixHeaderIterator, /*tp_new*/
+  __pyx_tp_new_5pysam_6ctabix_asTuple, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -9603,128 +10035,98 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixHeaderIterator = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_vtable_5pysam_6ctabix_Parser;
+static struct __pyx_vtabstruct_5pysam_6ctabix_asGTF __pyx_vtable_5pysam_6ctabix_asGTF;
 
-static PyObject *__pyx_tp_new_5pysam_6ctabix_Parser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_6ctabix_Parser *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_6ctabix_Parser *)o);
-  p->__pyx_vtab = __pyx_vtabptr_5pysam_6ctabix_Parser;
+static PyObject *__pyx_tp_new_5pysam_6ctabix_asGTF(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_asGTF *p;
+  PyObject *o = __pyx_tp_new_5pysam_6ctabix_Parser(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_asGTF *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_6ctabix_asGTF;
   return o;
 }
 
-static void __pyx_tp_dealloc_5pysam_6ctabix_Parser(PyObject *o) {
-  (*Py_TYPE(o)->tp_free)(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_6ctabix_Parser[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_Parser = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
+static PyTypeObject __pyx_type_5pysam_6ctabix_asGTF = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.ctabix.asGTF"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_asGTF), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_6ctabix_Parser, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
   #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
+  0, /*tp_compare*/
   #else
   0, /*reserved*/
   #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_Parser = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_Parser = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_Parser = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_5pysam_6ctabix_6Parser_1__call__, /*tp_call*/
+  #else
+  0, /*tp_call*/
   #endif
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  __Pyx_DOCSTR("converts a :term:`tabix row` into a GTF record with the following \n    fields:\n\n    contig\n       contig\n    feature\n       feature\n    source\n       source\n    start\n       genomic start coordinate (0-based)\n    end\n       genomic end coordinate plus one (0-based)\n    score\n       feature score\n    strand\n       strand\n    frame\n       frame\n    attributes\n       attribute string.\n\n    GTF formatted entries also defined the attributes:\n\n    gene_i [...]
+  0, /*tp_traverse*/
+  0, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  0, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_6ctabix_asGTF, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
   #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
+  0, /*tp_version_tag*/
   #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
   #endif
 };
+static struct __pyx_vtabstruct_5pysam_6ctabix_asBed __pyx_vtable_5pysam_6ctabix_asBed;
+
+static PyObject *__pyx_tp_new_5pysam_6ctabix_asBed(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_asBed *p;
+  PyObject *o = __pyx_tp_new_5pysam_6ctabix_Parser(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_asBed *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_6ctabix_asBed;
+  return o;
+}
 
-static PyTypeObject __pyx_type_5pysam_6ctabix_Parser = {
+static PyTypeObject __pyx_type_5pysam_6ctabix_asBed = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.ctabix.Parser"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_6ctabix_Parser), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.ctabix.asBed"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_asBed), /*tp_basicsize*/
   0, /*tp_itemsize*/
   __pyx_tp_dealloc_5pysam_6ctabix_Parser, /*tp_dealloc*/
   0, /*tp_print*/
@@ -9736,24 +10138,28 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_Parser = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_Parser, /*tp_as_number*/
-  &__pyx_tp_as_sequence_Parser, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_Parser, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
+  #if CYTHON_COMPILING_IN_PYPY
   __pyx_pw_5pysam_6ctabix_6Parser_1__call__, /*tp_call*/
+  #else
+  0, /*tp_call*/
+  #endif
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_Parser, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  0, /*tp_doc*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  __Pyx_DOCSTR("converts a :term:`tabix row` into a bed record\n    with the following fields:\n\n    contig\n       contig\n    start\n       genomic start coordinate (zero-based)\n    end\n       genomic end coordinate plus one (zero-based)\n    name\n       name of feature.\n    score\n       score of feature\n    strand\n       strand of feature\n    thickStart\n       thickStart\n    thickEnd\n       thickEnd\n    itemRGB\n       itemRGB\n    blockCount\n       number of bocks\n     [...]
   0, /*tp_traverse*/
   0, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_5pysam_6ctabix_Parser, /*tp_methods*/
+  0, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -9763,7 +10169,7 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_Parser = {
   0, /*tp_dictoffset*/
   0, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_6ctabix_Parser, /*tp_new*/
+  __pyx_tp_new_5pysam_6ctabix_asBed, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -9775,124 +10181,25 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_Parser = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asTuple __pyx_vtable_5pysam_6ctabix_asTuple;
+static struct __pyx_vtabstruct_5pysam_6ctabix_asVCF __pyx_vtable_5pysam_6ctabix_asVCF;
 
-static PyObject *__pyx_tp_new_5pysam_6ctabix_asTuple(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_6ctabix_asTuple *p;
+static PyObject *__pyx_tp_new_5pysam_6ctabix_asVCF(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_asVCF *p;
   PyObject *o = __pyx_tp_new_5pysam_6ctabix_Parser(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_6ctabix_asTuple *)o);
-  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_6ctabix_asTuple;
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_asVCF *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_6ctabix_asVCF;
   return o;
 }
 
-static PyMethodDef __pyx_methods_5pysam_6ctabix_asTuple[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_asTuple = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_asTuple = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_asTuple = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_asTuple = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_6ctabix_asTuple = {
+static PyTypeObject __pyx_type_5pysam_6ctabix_asVCF = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.ctabix.asTuple"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_6ctabix_asTuple), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.ctabix.asVCF"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_asVCF), /*tp_basicsize*/
   0, /*tp_itemsize*/
   __pyx_tp_dealloc_5pysam_6ctabix_Parser, /*tp_dealloc*/
   0, /*tp_print*/
@@ -9904,9 +10211,9 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asTuple = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_asTuple, /*tp_as_number*/
-  &__pyx_tp_as_sequence_asTuple, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_asTuple, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   #if CYTHON_COMPILING_IN_PYPY
   __pyx_pw_5pysam_6ctabix_6Parser_1__call__, /*tp_call*/
@@ -9916,16 +10223,16 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asTuple = {
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_asTuple, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("converts a :term:`tabix row` into a python tuple.\n\n    Access is by numeric index.\n    "), /*tp_doc*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  __Pyx_DOCSTR("converts a :term:`tabix row` into a VCF record with\n    the following fields:\n    \n    contig\n       contig\n    pos\n       chromosomal position, zero-based\n    id \n       id\n    ref\n       reference\n    alt\n       alt\n    qual\n       qual\n    filter\n       filter\n    info\n       info\n    format\n       format specifier.\n\n    Access to genotypes is via index::\n\n        contig = vcf.contig\n        first_sample_genotype = vcf[0]\n        second_sample [...]
   0, /*tp_traverse*/
   0, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_5pysam_6ctabix_asTuple, /*tp_methods*/
+  0, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -9935,7 +10242,7 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asTuple = {
   0, /*tp_dictoffset*/
   0, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_6ctabix_asTuple, /*tp_new*/
+  __pyx_tp_new_5pysam_6ctabix_asVCF, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -9947,126 +10254,76 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asTuple = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asGTF __pyx_vtable_5pysam_6ctabix_asGTF;
+static struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator __pyx_vtable_5pysam_6ctabix_TabixIterator;
 
-static PyObject *__pyx_tp_new_5pysam_6ctabix_asGTF(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_6ctabix_asGTF *p;
-  PyObject *o = __pyx_tp_new_5pysam_6ctabix_Parser(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_6ctabix_asGTF *)o);
-  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_6ctabix_asGTF;
+static PyObject *__pyx_tp_new_5pysam_6ctabix_TabixIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_TabixIterator *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_TabixIterator *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_6ctabix_TabixIterator;
+  p->tabixfile = ((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)Py_None); Py_INCREF(Py_None);
   return o;
 }
 
-static PyMethodDef __pyx_methods_5pysam_6ctabix_asGTF[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_asGTF = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
+static void __pyx_tp_dealloc_5pysam_6ctabix_TabixIterator(PyObject *o) {
+  struct __pyx_obj_5pysam_6ctabix_TabixIterator *p = (struct __pyx_obj_5pysam_6ctabix_TabixIterator *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
   #endif
-};
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_6ctabix_13TabixIterator_5__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->tabixfile);
+  (*Py_TYPE(o)->tp_free)(o);
+}
 
-static PySequenceMethods __pyx_tp_as_sequence_asGTF = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
+static int __pyx_tp_traverse_5pysam_6ctabix_TabixIterator(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_6ctabix_TabixIterator *p = (struct __pyx_obj_5pysam_6ctabix_TabixIterator *)o;
+  if (p->tabixfile) {
+    e = (*v)(((PyObject*)p->tabixfile), a); if (e) return e;
+  }
+  return 0;
+}
 
-static PyMappingMethods __pyx_tp_as_mapping_asGTF = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
+static int __pyx_tp_clear_5pysam_6ctabix_TabixIterator(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_6ctabix_TabixIterator *p = (struct __pyx_obj_5pysam_6ctabix_TabixIterator *)o;
+  tmp = ((PyObject*)p->tabixfile);
+  p->tabixfile = ((struct __pyx_obj_5pysam_6ctabix_Tabixfile *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
 
-static PyBufferProcs __pyx_tp_as_buffer_asGTF = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
+static PyMethodDef __pyx_methods_5pysam_6ctabix_TabixIterator[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_13TabixIterator_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_13TabixIterator_2__next__)},
+  {0, 0, 0, 0}
 };
 
-static PyTypeObject __pyx_type_5pysam_6ctabix_asGTF = {
+static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIterator = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.ctabix.asGTF"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_6ctabix_asGTF), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.ctabix.TabixIterator"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_TabixIterator), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_6ctabix_Parser, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_6ctabix_TabixIterator, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -10076,28 +10333,24 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asGTF = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_asGTF, /*tp_as_number*/
-  &__pyx_tp_as_sequence_asGTF, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_asGTF, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_6ctabix_6Parser_1__call__, /*tp_call*/
-  #else
   0, /*tp_call*/
-  #endif
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_asGTF, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("converts a :term:`tabix row` into a GTF record with the following \n    fields:\n\n    contig\n       contig\n    feature\n       feature\n    source\n       source\n    start\n       genomic start coordinate (0-based)\n    end\n       genomic end coordinate plus one (0-based)\n    score\n       feature score\n    strand\n       strand\n    frame\n       frame\n    attributes\n       attribute string.\n\n    GTF formatted entries also defined the attributes:\n\n    gene_i [...]
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("iterates over rows in *tabixfile* in region\n    given by *tid*, *start* and *end*.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6ctabix_TabixIterator, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6ctabix_TabixIterator, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_6ctabix_asGTF, /*tp_methods*/
+  __pyx_pw_5pysam_6ctabix_13TabixIterator_1__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_6ctabix_13TabixIterator_3__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_6ctabix_TabixIterator, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -10107,7 +10360,7 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asGTF = {
   0, /*tp_dictoffset*/
   0, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_6ctabix_asGTF, /*tp_new*/
+  __pyx_tp_new_5pysam_6ctabix_TabixIterator, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -10119,126 +10372,188 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asGTF = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asBed __pyx_vtable_5pysam_6ctabix_asBed;
+static struct __pyx_vtabstruct_5pysam_6ctabix_TabixIteratorParsed __pyx_vtable_5pysam_6ctabix_TabixIteratorParsed;
 
-static PyObject *__pyx_tp_new_5pysam_6ctabix_asBed(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_6ctabix_asBed *p;
-  PyObject *o = __pyx_tp_new_5pysam_6ctabix_Parser(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_6ctabix_asBed *)o);
-  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_6ctabix_asBed;
+static PyObject *__pyx_tp_new_5pysam_6ctabix_TabixIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *p;
+  PyObject *o = __pyx_tp_new_5pysam_6ctabix_TabixIterator(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator*)__pyx_vtabptr_5pysam_6ctabix_TabixIteratorParsed;
+  p->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)Py_None); Py_INCREF(Py_None);
   return o;
 }
 
-static PyMethodDef __pyx_methods_5pysam_6ctabix_asBed[] = {
+static void __pyx_tp_dealloc_5pysam_6ctabix_TabixIteratorParsed(PyObject *o) {
+  struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->parser);
+  PyObject_GC_Track(o);
+  __pyx_tp_dealloc_5pysam_6ctabix_TabixIterator(o);
+}
+
+static int __pyx_tp_traverse_5pysam_6ctabix_TabixIteratorParsed(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)o;
+  e = __pyx_tp_traverse_5pysam_6ctabix_TabixIterator(o, v, a); if (e) return e;
+  if (p->parser) {
+    e = (*v)(((PyObject*)p->parser), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_6ctabix_TabixIteratorParsed(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)o;
+  __pyx_tp_clear_5pysam_6ctabix_TabixIterator(o);
+  tmp = ((PyObject*)p->parser);
+  p->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyMethodDef __pyx_methods_5pysam_6ctabix_TabixIteratorParsed[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_19TabixIteratorParsed_2__next__)},
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_asBed = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
+static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIteratorParsed = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pysam.ctabix.TabixIteratorParsed"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_5pysam_6ctabix_TabixIteratorParsed, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
   #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
+  0, /*tp_compare*/
   #else
   0, /*reserved*/
   #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
+  0, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("TabixIteratorParsed(Parser parser)\niterates over mapped reads in a region.\n\n    Returns parsed data.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6ctabix_TabixIteratorParsed, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6ctabix_TabixIteratorParsed, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_5pysam_6ctabix_13TabixIterator_1__iter__, /*tp_iter*/
+  #else
+  0, /*tp_iter*/
   #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
+  __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_3__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_6ctabix_TabixIteratorParsed, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_5pysam_6ctabix_TabixIteratorParsed, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
   #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
   #endif
 };
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator __pyx_vtable_5pysam_6ctabix_GZIterator;
 
-static PySequenceMethods __pyx_tp_as_sequence_asBed = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_asBed = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
+static PyObject *__pyx_tp_new_5pysam_6ctabix_GZIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_GZIterator *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_GZIterator *)o);
+  p->__pyx_vtab = __pyx_vtabptr_5pysam_6ctabix_GZIterator;
+  p->_filename = Py_None; Py_INCREF(Py_None);
+  return o;
+}
 
-static PyBufferProcs __pyx_tp_as_buffer_asBed = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
+static void __pyx_tp_dealloc_5pysam_6ctabix_GZIterator(PyObject *o) {
+  struct __pyx_obj_5pysam_6ctabix_GZIterator *p = (struct __pyx_obj_5pysam_6ctabix_GZIterator *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
   #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_5pysam_6ctabix_10GZIterator_3__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->_filename);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_5pysam_6ctabix_GZIterator(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_5pysam_6ctabix_GZIterator *p = (struct __pyx_obj_5pysam_6ctabix_GZIterator *)o;
+  if (p->_filename) {
+    e = (*v)(p->_filename, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_5pysam_6ctabix_GZIterator(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_6ctabix_GZIterator *p = (struct __pyx_obj_5pysam_6ctabix_GZIterator *)o;
+  tmp = ((PyObject*)p->_filename);
+  p->_filename = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyMethodDef __pyx_methods_5pysam_6ctabix_GZIterator[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_10GZIterator_7__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_10GZIterator_6__next__)},
+  {0, 0, 0, 0}
 };
 
-static PyTypeObject __pyx_type_5pysam_6ctabix_asBed = {
+static PyTypeObject __pyx_type_5pysam_6ctabix_GZIterator = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.ctabix.asBed"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_6ctabix_asBed), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.ctabix.GZIterator"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_GZIterator), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_6ctabix_Parser, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_6ctabix_GZIterator, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -10248,28 +10563,24 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asBed = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_asBed, /*tp_as_number*/
-  &__pyx_tp_as_sequence_asBed, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_asBed, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_6ctabix_6Parser_1__call__, /*tp_call*/
-  #else
   0, /*tp_call*/
-  #endif
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_asBed, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("converts a :term:`tabix row` into a bed record\n    with the following fields:\n\n    contig\n       contig\n    start\n       genomic start coordinate (zero-based)\n    end\n       genomic end coordinate plus one (zero-based)\n    name\n       name of feature.\n    score\n       score of feature\n    strand\n       strand of feature\n    thickStart\n       thickStart\n    thickEnd\n       thickEnd\n    itemRGB\n       itemRGB\n    blockCount\n       number of bocks\n     [...]
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("GZIterator(filename, int buffer_size=65536)"), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6ctabix_GZIterator, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6ctabix_GZIterator, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_6ctabix_asBed, /*tp_methods*/
+  __pyx_pw_5pysam_6ctabix_10GZIterator_5__iter__, /*tp_iter*/
+  __pyx_pw_5pysam_6ctabix_10GZIterator_7__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_6ctabix_GZIterator, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -10277,9 +10588,9 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asBed = {
   0, /*tp_descr_get*/
   0, /*tp_descr_set*/
   0, /*tp_dictoffset*/
-  0, /*tp_init*/
+  __pyx_pw_5pysam_6ctabix_10GZIterator_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_6ctabix_asBed, /*tp_new*/
+  __pyx_tp_new_5pysam_6ctabix_GZIterator, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -10291,126 +10602,32 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asBed = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asVCF __pyx_vtable_5pysam_6ctabix_asVCF;
-
-static PyObject *__pyx_tp_new_5pysam_6ctabix_asVCF(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_6ctabix_asVCF *p;
-  PyObject *o = __pyx_tp_new_5pysam_6ctabix_Parser(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_6ctabix_asVCF *)o);
-  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_6ctabix_asVCF;
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorHead __pyx_vtable_5pysam_6ctabix_GZIteratorHead;
+
+static PyObject *__pyx_tp_new_5pysam_6ctabix_GZIteratorHead(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_GZIteratorHead *p;
+  PyObject *o = __pyx_tp_new_5pysam_6ctabix_GZIterator(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_GZIteratorHead *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator*)__pyx_vtabptr_5pysam_6ctabix_GZIteratorHead;
   return o;
 }
 
-static PyMethodDef __pyx_methods_5pysam_6ctabix_asVCF[] = {
+static PyMethodDef __pyx_methods_5pysam_6ctabix_GZIteratorHead[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_14GZIteratorHead_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_14GZIteratorHead___next__)},
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_asVCF = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_asVCF = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_asVCF = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_asVCF = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_6ctabix_asVCF = {
+static PyTypeObject __pyx_type_5pysam_6ctabix_GZIteratorHead = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.ctabix.asVCF"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_6ctabix_asVCF), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.ctabix.GZIteratorHead"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_GZIteratorHead), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_6ctabix_Parser, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_6ctabix_GZIterator, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -10420,28 +10637,28 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asVCF = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_asVCF, /*tp_as_number*/
-  &__pyx_tp_as_sequence_asVCF, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_asVCF, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
-  #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_5pysam_6ctabix_6Parser_1__call__, /*tp_call*/
-  #else
   0, /*tp_call*/
-  #endif
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_asVCF, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-  __Pyx_DOCSTR("converts a :term:`tabix row` into a VCF record with\n    the following fields:\n    \n    contig\n       contig\n    pos\n       chromosomal position, zero-based\n    id \n       id\n    ref\n       reference\n    alt\n       alt\n    qual\n       qual\n    filter\n       filter\n    info\n       info\n    format\n       format specifier.\n\n    Access to genotypes is via index::\n\n        contig = vcf.contig\n        first_sample_genotype = vcf[0]\n        second_sample [...]
-  0, /*tp_traverse*/
-  0, /*tp_clear*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("iterate line-by-line through gzip (or bgzip)\n    compressed file returning comments at top of file.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6ctabix_GZIterator, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6ctabix_GZIterator, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_5pysam_6ctabix_10GZIterator_5__iter__, /*tp_iter*/
+  #else
   0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_6ctabix_asVCF, /*tp_methods*/
+  #endif
+  __pyx_pw_5pysam_6ctabix_14GZIteratorHead_1__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_6ctabix_GZIteratorHead, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -10449,9 +10666,13 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asVCF = {
   0, /*tp_descr_get*/
   0, /*tp_descr_set*/
   0, /*tp_dictoffset*/
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_5pysam_6ctabix_10GZIterator_1__init__, /*tp_init*/
+  #else
   0, /*tp_init*/
+  #endif
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_6ctabix_asVCF, /*tp_new*/
+  __pyx_tp_new_5pysam_6ctabix_GZIteratorHead, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -10463,164 +10684,66 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_asVCF = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
-
-static PyObject *__pyx_tp_new_5pysam_6ctabix_TabixIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)o);
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorParsed __pyx_vtable_5pysam_6ctabix_GZIteratorParsed;
+
+static PyObject *__pyx_tp_new_5pysam_6ctabix_GZIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *p;
+  PyObject *o = __pyx_tp_new_5pysam_6ctabix_GZIterator(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator*)__pyx_vtabptr_5pysam_6ctabix_GZIteratorParsed;
   p->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)Py_None); Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_1__cinit__(o, a, k) < 0) {
-    Py_DECREF(o); o = 0;
-  }
   return o;
 }
 
-static void __pyx_tp_dealloc_5pysam_6ctabix_TabixIteratorParsed(PyObject *o) {
-  struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)o;
-  PyObject_GC_UnTrack(o);
-  {
-    PyObject *etype, *eval, *etb;
-    PyErr_Fetch(&etype, &eval, &etb);
-    ++Py_REFCNT(o);
-    __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_7__dealloc__(o);
-    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-    --Py_REFCNT(o);
-    PyErr_Restore(etype, eval, etb);
+static void __pyx_tp_dealloc_5pysam_6ctabix_GZIteratorParsed(PyObject *o) {
+  struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
   }
+  #endif
+  PyObject_GC_UnTrack(o);
   Py_CLEAR(p->parser);
   PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
+  __pyx_tp_dealloc_5pysam_6ctabix_GZIterator(o);
 }
 
-static int __pyx_tp_traverse_5pysam_6ctabix_TabixIteratorParsed(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_5pysam_6ctabix_GZIteratorParsed(PyObject *o, visitproc v, void *a) {
   int e;
-  struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)o;
+  struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *)o;
+  e = __pyx_tp_traverse_5pysam_6ctabix_GZIterator(o, v, a); if (e) return e;
   if (p->parser) {
     e = (*v)(((PyObject*)p->parser), a); if (e) return e;
   }
   return 0;
 }
 
-static int __pyx_tp_clear_5pysam_6ctabix_TabixIteratorParsed(PyObject *o) {
-  struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed *)o;
+static int __pyx_tp_clear_5pysam_6ctabix_GZIteratorParsed(PyObject *o) {
   PyObject* tmp;
+  struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed *)o;
+  __pyx_tp_clear_5pysam_6ctabix_GZIterator(o);
   tmp = ((PyObject*)p->parser);
   p->parser = ((struct __pyx_obj_5pysam_6ctabix_Parser *)Py_None); Py_INCREF(Py_None);
   Py_XDECREF(tmp);
   return 0;
 }
 
-static PyMethodDef __pyx_methods_5pysam_6ctabix_TabixIteratorParsed[] = {
-  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_19TabixIteratorParsed_4__next__)},
+static PyMethodDef __pyx_methods_5pysam_6ctabix_GZIteratorParsed[] = {
+  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_6ctabix_16GZIteratorParsed_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_6ctabix_16GZIteratorParsed_2__next__)},
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_TabixIteratorParsed = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_TabixIteratorParsed = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_TabixIteratorParsed = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_TabixIteratorParsed = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIteratorParsed = {
+static PyTypeObject __pyx_type_5pysam_6ctabix_GZIteratorParsed = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.ctabix.TabixIteratorParsed"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.ctabix.GZIteratorParsed"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_6ctabix_TabixIteratorParsed, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_6ctabix_GZIteratorParsed, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -10630,24 +10753,28 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIteratorParsed = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_TabixIteratorParsed, /*tp_as_number*/
-  &__pyx_tp_as_sequence_TabixIteratorParsed, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_TabixIteratorParsed, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_TabixIteratorParsed, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  __Pyx_DOCSTR("iterates over mapped reads in a region.\n\n    Returns parsed data.\n    "), /*tp_doc*/
-  __pyx_tp_traverse_5pysam_6ctabix_TabixIteratorParsed, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_6ctabix_TabixIteratorParsed, /*tp_clear*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("GZIteratorParsed(parser)\niterate line-by-line through gzip (or bgzip)\n    compressed file returning comments at top of file.\n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_6ctabix_GZIteratorParsed, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_6ctabix_GZIteratorParsed, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
-  __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_3__iter__, /*tp_iter*/
-  __pyx_pw_5pysam_6ctabix_19TabixIteratorParsed_5__next__, /*tp_iternext*/
-  __pyx_methods_5pysam_6ctabix_TabixIteratorParsed, /*tp_methods*/
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_5pysam_6ctabix_10GZIterator_5__iter__, /*tp_iter*/
+  #else
+  0, /*tp_iter*/
+  #endif
+  __pyx_pw_5pysam_6ctabix_16GZIteratorParsed_3__next__, /*tp_iternext*/
+  __pyx_methods_5pysam_6ctabix_GZIteratorParsed, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -10655,9 +10782,9 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIteratorParsed = {
   0, /*tp_descr_get*/
   0, /*tp_descr_set*/
   0, /*tp_dictoffset*/
-  0, /*tp_init*/
+  __pyx_pw_5pysam_6ctabix_16GZIteratorParsed_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_6ctabix_TabixIteratorParsed, /*tp_new*/
+  __pyx_tp_new_5pysam_6ctabix_GZIteratorParsed, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -10669,6 +10796,9 @@ static PyTypeObject __pyx_type_5pysam_6ctabix_TabixIteratorParsed = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 
 static PyMethodDef __pyx_methods[] = {
@@ -10694,157 +10824,165 @@ static struct PyModuleDef __pyx_moduledef = {
 #endif
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
-  {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0},
-  {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 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_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
-  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
-  {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
-  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
-  {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0},
-  {&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 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_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
-  {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0},
-  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 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_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0},
-  {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
-  {&__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_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 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_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
-  {&__pyx_n_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 1},
-  {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0},
-  {&__pyx_n_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 1},
-  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
-  {&__pyx_n_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 1},
-  {&__pyx_n_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 1},
-  {&__pyx_n_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 1},
-  {&__pyx_n_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 1},
-  {&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0},
-  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
-  {&__pyx_n_s__IOError, __pyx_k__IOError, sizeof(__pyx_k__IOError), 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__MemoryError, __pyx_k__MemoryError, sizeof(__pyx_k__MemoryError), 0, 0, 1, 1},
-  {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1},
-  {&__pyx_n_s__OSError, __pyx_k__OSError, sizeof(__pyx_k__OSError), 0, 0, 1, 1},
-  {&__pyx_n_s__O_RDONLY, __pyx_k__O_RDONLY, sizeof(__pyx_k__O_RDONLY), 0, 0, 1, 1},
-  {&__pyx_n_s__PYTHON3, __pyx_k__PYTHON3, sizeof(__pyx_k__PYTHON3), 0, 0, 1, 1},
-  {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
-  {&__pyx_n_s__Tabixfile, __pyx_k__Tabixfile, sizeof(__pyx_k__Tabixfile), 0, 0, 1, 1},
-  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
-  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
-  {&__pyx_n_s__WINDOW_SIZE, __pyx_k__WINDOW_SIZE, sizeof(__pyx_k__WINDOW_SIZE), 0, 0, 1, 1},
-  {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1},
-  {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
-  {&__pyx_n_s____iter__, __pyx_k____iter__, sizeof(__pyx_k____iter__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
-  {&__pyx_n_s___isOpen, __pyx_k___isOpen, sizeof(__pyx_k___isOpen), 0, 0, 1, 1},
-  {&__pyx_n_s___open, __pyx_k___open, sizeof(__pyx_k___open), 0, 0, 1, 1},
-  {&__pyx_n_s___parseRegion, __pyx_k___parseRegion, sizeof(__pyx_k___parseRegion), 0, 0, 1, 1},
-  {&__pyx_n_s__asBed, __pyx_k__asBed, sizeof(__pyx_k__asBed), 0, 0, 1, 1},
-  {&__pyx_n_s__asGTF, __pyx_k__asGTF, sizeof(__pyx_k__asGTF), 0, 0, 1, 1},
-  {&__pyx_n_s__asTuple, __pyx_k__asTuple, sizeof(__pyx_k__asTuple), 0, 0, 1, 1},
-  {&__pyx_n_s__asVCF, __pyx_k__asVCF, sizeof(__pyx_k__asVCF), 0, 0, 1, 1},
-  {&__pyx_n_s__ascii, __pyx_k__ascii, sizeof(__pyx_k__ascii), 0, 0, 1, 1},
-  {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1},
-  {&__pyx_n_s__bed, __pyx_k__bed, sizeof(__pyx_k__bed), 0, 0, 1, 1},
-  {&__pyx_n_s__buffer, __pyx_k__buffer, sizeof(__pyx_k__buffer), 0, 0, 1, 1},
-  {&__pyx_n_s__buffer_size, __pyx_k__buffer_size, sizeof(__pyx_k__buffer_size), 0, 0, 1, 1},
-  {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
-  {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1},
-  {&__pyx_n_s__closed, __pyx_k__closed, sizeof(__pyx_k__closed), 0, 0, 1, 1},
-  {&__pyx_n_s__conf, __pyx_k__conf, sizeof(__pyx_k__conf), 0, 0, 1, 1},
-  {&__pyx_n_s__conf_data, __pyx_k__conf_data, sizeof(__pyx_k__conf_data), 0, 0, 1, 1},
-  {&__pyx_n_s__cpy, __pyx_k__cpy, sizeof(__pyx_k__cpy), 0, 0, 1, 1},
-  {&__pyx_n_s__ctypes, __pyx_k__ctypes, sizeof(__pyx_k__ctypes), 0, 0, 1, 1},
-  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
-  {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
-  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
-  {&__pyx_n_s__end_col, __pyx_k__end_col, sizeof(__pyx_k__end_col), 0, 0, 1, 1},
-  {&__pyx_n_s__endswith, __pyx_k__endswith, sizeof(__pyx_k__endswith), 0, 0, 1, 1},
-  {&__pyx_n_s__exists, __pyx_k__exists, sizeof(__pyx_k__exists), 0, 0, 1, 1},
-  {&__pyx_n_s__fd_src, __pyx_k__fd_src, sizeof(__pyx_k__fd_src), 0, 0, 1, 1},
-  {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
-  {&__pyx_n_s__filename_in, __pyx_k__filename_in, sizeof(__pyx_k__filename_in), 0, 0, 1, 1},
-  {&__pyx_n_s__filename_out, __pyx_k__filename_out, sizeof(__pyx_k__filename_out), 0, 0, 1, 1},
-  {&__pyx_n_s__fn, __pyx_k__fn, sizeof(__pyx_k__fn), 0, 0, 1, 1},
-  {&__pyx_n_s__force, __pyx_k__force, sizeof(__pyx_k__force), 0, 0, 1, 1},
-  {&__pyx_n_s__fp, __pyx_k__fp, sizeof(__pyx_k__fp), 0, 0, 1, 1},
-  {&__pyx_n_s__getdefaultencoding, __pyx_k__getdefaultencoding, sizeof(__pyx_k__getdefaultencoding), 0, 0, 1, 1},
-  {&__pyx_n_s__gff, __pyx_k__gff, sizeof(__pyx_k__gff), 0, 0, 1, 1},
-  {&__pyx_n_s__gzip, __pyx_k__gzip, sizeof(__pyx_k__gzip), 0, 0, 1, 1},
-  {&__pyx_n_s__infile, __pyx_k__infile, sizeof(__pyx_k__infile), 0, 0, 1, 1},
-  {&__pyx_n_s__io, __pyx_k__io, sizeof(__pyx_k__io), 0, 0, 1, 1},
-  {&__pyx_n_s__itertools, __pyx_k__itertools, sizeof(__pyx_k__itertools), 0, 0, 1, 1},
-  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
-  {&__pyx_n_s__length, __pyx_k__length, sizeof(__pyx_k__length), 0, 0, 1, 1},
-  {&__pyx_n_s__line, __pyx_k__line, sizeof(__pyx_k__line), 0, 0, 1, 1},
-  {&__pyx_n_s__meta_char, __pyx_k__meta_char, sizeof(__pyx_k__meta_char), 0, 0, 1, 1},
-  {&__pyx_n_s__mode, __pyx_k__mode, sizeof(__pyx_k__mode), 0, 0, 1, 1},
-  {&__pyx_n_s__nbytes, __pyx_k__nbytes, sizeof(__pyx_k__nbytes), 0, 0, 1, 1},
-  {&__pyx_n_s__next, __pyx_k__next, sizeof(__pyx_k__next), 0, 0, 1, 1},
-  {&__pyx_n_s__ord, __pyx_k__ord, sizeof(__pyx_k__ord), 0, 0, 1, 1},
-  {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1},
-  {&__pyx_n_s__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1},
-  {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1},
-  {&__pyx_n_s__pileup, __pyx_k__pileup, sizeof(__pyx_k__pileup), 0, 0, 1, 1},
-  {&__pyx_n_s__preset, __pyx_k__preset, sizeof(__pyx_k__preset), 0, 0, 1, 1},
-  {&__pyx_n_s__preset2conf, __pyx_k__preset2conf, sizeof(__pyx_k__preset2conf), 0, 0, 1, 1},
-  {&__pyx_n_s__psltbl, __pyx_k__psltbl, sizeof(__pyx_k__psltbl), 0, 0, 1, 1},
-  {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1},
-  {&__pyx_n_s__readline, __pyx_k__readline, sizeof(__pyx_k__readline), 0, 0, 1, 1},
-  {&__pyx_n_s__reference, __pyx_k__reference, sizeof(__pyx_k__reference), 0, 0, 1, 1},
-  {&__pyx_n_s__region, __pyx_k__region, sizeof(__pyx_k__region), 0, 0, 1, 1},
-  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
-  {&__pyx_n_s__sam, __pyx_k__sam, sizeof(__pyx_k__sam), 0, 0, 1, 1},
-  {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
-  {&__pyx_n_s__seq_col, __pyx_k__seq_col, sizeof(__pyx_k__seq_col), 0, 0, 1, 1},
-  {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
-  {&__pyx_n_s__start_col, __pyx_k__start_col, sizeof(__pyx_k__start_col), 0, 0, 1, 1},
-  {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1},
-  {&__pyx_n_s__struct, __pyx_k__struct, sizeof(__pyx_k__struct), 0, 0, 1, 1},
-  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
-  {&__pyx_n_s__tabix_compress, __pyx_k__tabix_compress, sizeof(__pyx_k__tabix_compress), 0, 0, 1, 1},
-  {&__pyx_n_s__tabix_file_iterator, __pyx_k__tabix_file_iterator, sizeof(__pyx_k__tabix_file_iterator), 0, 0, 1, 1},
-  {&__pyx_n_s__tabix_index, __pyx_k__tabix_index, sizeof(__pyx_k__tabix_index), 0, 0, 1, 1},
-  {&__pyx_n_s__tabix_iterator, __pyx_k__tabix_iterator, sizeof(__pyx_k__tabix_iterator), 0, 0, 1, 1},
-  {&__pyx_n_s__tabixfile, __pyx_k__tabixfile, sizeof(__pyx_k__tabixfile), 0, 0, 1, 1},
-  {&__pyx_n_s__tempfile, __pyx_k__tempfile, sizeof(__pyx_k__tempfile), 0, 0, 1, 1},
-  {&__pyx_n_s__tid, __pyx_k__tid, sizeof(__pyx_k__tid), 0, 0, 1, 1},
-  {&__pyx_n_s__types, __pyx_k__types, sizeof(__pyx_k__types), 0, 0, 1, 1},
-  {&__pyx_n_s__unlink, __pyx_k__unlink, sizeof(__pyx_k__unlink), 0, 0, 1, 1},
-  {&__pyx_n_s__vcf, __pyx_k__vcf, sizeof(__pyx_k__vcf), 0, 0, 1, 1},
-  {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1},
-  {&__pyx_n_s__zerobased, __pyx_k__zerobased, sizeof(__pyx_k__zerobased), 0, 0, 1, 1},
+  {&__pyx_kp_u_Argument_must_be_string_bytes_or, __pyx_k_Argument_must_be_string_bytes_or, sizeof(__pyx_k_Argument_must_be_string_bytes_or), 0, 1, 0, 0},
+  {&__pyx_kp_u_Argument_must_be_string_or_unico, __pyx_k_Argument_must_be_string_or_unico, sizeof(__pyx_k_Argument_must_be_string_or_unico), 0, 1, 0, 0},
+  {&__pyx_n_s_EmptyIterator, __pyx_k_EmptyIterator, sizeof(__pyx_k_EmptyIterator), 0, 0, 1, 1},
+  {&__pyx_n_s_EmptyIterator___iter, __pyx_k_EmptyIterator___iter, sizeof(__pyx_k_EmptyIterator___iter), 0, 0, 1, 1},
+  {&__pyx_n_s_EmptyIterator_next, __pyx_k_EmptyIterator_next, sizeof(__pyx_k_EmptyIterator_next), 0, 0, 1, 1},
+  {&__pyx_kp_s_Filename_s_already_exists_use_fo, __pyx_k_Filename_s_already_exists_use_fo, sizeof(__pyx_k_Filename_s_already_exists_use_fo), 0, 0, 1, 0},
+  {&__pyx_kp_s_Filename_s_tbi_already_exists_us, __pyx_k_Filename_s_tbi_already_exists_us, sizeof(__pyx_k_Filename_s_tbi_already_exists_us), 0, 0, 1, 0},
+  {&__pyx_n_s_GZIterator, __pyx_k_GZIterator, sizeof(__pyx_k_GZIterator), 0, 0, 1, 1},
+  {&__pyx_n_s_GZIteratorHead, __pyx_k_GZIteratorHead, sizeof(__pyx_k_GZIteratorHead), 0, 0, 1, 1},
+  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
+  {&__pyx_kp_s_I_O_operation_on_closed_file, __pyx_k_I_O_operation_on_closed_file, sizeof(__pyx_k_I_O_operation_on_closed_file), 0, 0, 1, 0},
+  {&__pyx_kp_s_I_O_operation_on_closed_file_2, __pyx_k_I_O_operation_on_closed_file_2, sizeof(__pyx_k_I_O_operation_on_closed_file_2), 0, 0, 1, 0},
+  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
+  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
+  {&__pyx_kp_s_No_such_file_or_directory_s, __pyx_k_No_such_file_or_directory_s, sizeof(__pyx_k_No_such_file_or_directory_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_No_such_file_s, __pyx_k_No_such_file_s, sizeof(__pyx_k_No_such_file_s), 0, 0, 1, 0},
+  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
+  {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
+  {&__pyx_n_s_O_RDONLY, __pyx_k_O_RDONLY, sizeof(__pyx_k_O_RDONLY), 0, 0, 1, 1},
+  {&__pyx_n_s_PYTHON3, __pyx_k_PYTHON3, sizeof(__pyx_k_PYTHON3), 0, 0, 1, 1},
+  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
+  {&__pyx_n_s_Tabixfile, __pyx_k_Tabixfile, sizeof(__pyx_k_Tabixfile), 0, 0, 1, 1},
+  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+  {&__pyx_n_s_WINDOW_SIZE, __pyx_k_WINDOW_SIZE, sizeof(__pyx_k_WINDOW_SIZE), 0, 0, 1, 1},
+  {&__pyx_kp_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 0},
+  {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0},
+  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+  {&__pyx_n_s_asBed, __pyx_k_asBed, sizeof(__pyx_k_asBed), 0, 0, 1, 1},
+  {&__pyx_n_s_asGTF, __pyx_k_asGTF, sizeof(__pyx_k_asGTF), 0, 0, 1, 1},
+  {&__pyx_n_s_asTuple, __pyx_k_asTuple, sizeof(__pyx_k_asTuple), 0, 0, 1, 1},
+  {&__pyx_n_s_asVCF, __pyx_k_asVCF, sizeof(__pyx_k_asVCF), 0, 0, 1, 1},
+  {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
+  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
+  {&__pyx_n_s_bed, __pyx_k_bed, sizeof(__pyx_k_bed), 0, 0, 1, 1},
+  {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
+  {&__pyx_n_s_buffer_size, __pyx_k_buffer_size, sizeof(__pyx_k_buffer_size), 0, 0, 1, 1},
+  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
+  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+  {&__pyx_n_s_closed, __pyx_k_closed, sizeof(__pyx_k_closed), 0, 0, 1, 1},
+  {&__pyx_n_s_conf, __pyx_k_conf, sizeof(__pyx_k_conf), 0, 0, 1, 1},
+  {&__pyx_n_s_conf_data, __pyx_k_conf_data, sizeof(__pyx_k_conf_data), 0, 0, 1, 1},
+  {&__pyx_kp_s_could_not_create_iterator_for_re, __pyx_k_could_not_create_iterator_for_re, sizeof(__pyx_k_could_not_create_iterator_for_re), 0, 0, 1, 0},
+  {&__pyx_kp_s_could_not_open_file_s, __pyx_k_could_not_open_file_s, sizeof(__pyx_k_could_not_open_file_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_could_not_open_index_for_s, __pyx_k_could_not_open_index_for_s, sizeof(__pyx_k_could_not_open_index_for_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_could_not_open_s_for_reading, __pyx_k_could_not_open_s_for_reading, sizeof(__pyx_k_could_not_open_s_for_reading), 0, 0, 1, 0},
+  {&__pyx_kp_s_could_not_open_s_for_writing, __pyx_k_could_not_open_s_for_writing, sizeof(__pyx_k_could_not_open_s_for_writing), 0, 0, 1, 0},
+  {&__pyx_n_s_cpy, __pyx_k_cpy, sizeof(__pyx_k_cpy), 0, 0, 1, 1},
+  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
+  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+  {&__pyx_kp_s_empty_iterator, __pyx_k_empty_iterator, sizeof(__pyx_k_empty_iterator), 0, 0, 1, 0},
+  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
+  {&__pyx_n_s_end_col, __pyx_k_end_col, sizeof(__pyx_k_end_col), 0, 0, 1, 1},
+  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
+  {&__pyx_kp_s_error_d_s_d_s, __pyx_k_error_d_s_d_s, sizeof(__pyx_k_error_d_s_d_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_error_when_closing_file_s, __pyx_k_error_when_closing_file_s, sizeof(__pyx_k_error_when_closing_file_s), 0, 0, 1, 0},
+  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
+  {&__pyx_n_s_fd_src, __pyx_k_fd_src, sizeof(__pyx_k_fd_src), 0, 0, 1, 1},
+  {&__pyx_kp_s_file_s_not_found, __pyx_k_file_s_not_found, sizeof(__pyx_k_file_s_not_found), 0, 0, 1, 0},
+  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
+  {&__pyx_n_s_filename_in, __pyx_k_filename_in, sizeof(__pyx_k_filename_in), 0, 0, 1, 1},
+  {&__pyx_n_s_filename_out, __pyx_k_filename_out, sizeof(__pyx_k_filename_out), 0, 0, 1, 1},
+  {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
+  {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1},
+  {&__pyx_n_s_fp, __pyx_k_fp, sizeof(__pyx_k_fp), 0, 0, 1, 1},
+  {&__pyx_kp_s_ftp, __pyx_k_ftp, sizeof(__pyx_k_ftp), 0, 0, 1, 0},
+  {&__pyx_n_s_getdefaultencoding, __pyx_k_getdefaultencoding, sizeof(__pyx_k_getdefaultencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_getfilesystemencoding, __pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 0, 1, 1},
+  {&__pyx_n_s_gff, __pyx_k_gff, sizeof(__pyx_k_gff), 0, 0, 1, 1},
+  {&__pyx_kp_s_gz, __pyx_k_gz, sizeof(__pyx_k_gz), 0, 0, 1, 0},
+  {&__pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_k_home_andreas_devel_pysam_pysam, sizeof(__pyx_k_home_andreas_devel_pysam_pysam), 0, 0, 1, 0},
+  {&__pyx_kp_s_http, __pyx_k_http, sizeof(__pyx_k_http), 0, 0, 1, 0},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_kp_s_incomplete_line_at_s, __pyx_k_incomplete_line_at_s, sizeof(__pyx_k_incomplete_line_at_s), 0, 0, 1, 0},
+  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
+  {&__pyx_kp_s_index_s_not_found, __pyx_k_index_s_not_found, sizeof(__pyx_k_index_s_not_found), 0, 0, 1, 0},
+  {&__pyx_n_s_infile, __pyx_k_infile, sizeof(__pyx_k_infile), 0, 0, 1, 1},
+  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+  {&__pyx_kp_s_invalid_file_opening_mode_s, __pyx_k_invalid_file_opening_mode_s, sizeof(__pyx_k_invalid_file_opening_mode_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_invalid_mode_s, __pyx_k_invalid_mode_s, sizeof(__pyx_k_invalid_mode_s), 0, 0, 1, 0},
+  {&__pyx_n_s_isOpen, __pyx_k_isOpen, sizeof(__pyx_k_isOpen), 0, 0, 1, 1},
+  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
+  {&__pyx_kp_s_iterate_over_infile_Permits_the, __pyx_k_iterate_over_infile_Permits_the, sizeof(__pyx_k_iterate_over_infile_Permits_the), 0, 0, 1, 0},
+  {&__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_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
+  {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_n_s_meta_char, __pyx_k_meta_char, sizeof(__pyx_k_meta_char), 0, 0, 1, 1},
+  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+  {&__pyx_n_s_min_shift, __pyx_k_min_shift, sizeof(__pyx_k_min_shift), 0, 0, 1, 1},
+  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
+  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+  {&__pyx_n_s_nbytes, __pyx_k_nbytes, sizeof(__pyx_k_nbytes), 0, 0, 1, 1},
+  {&__pyx_kp_s_neither_preset_nor_seq_col_start, __pyx_k_neither_preset_nor_seq_col_start, sizeof(__pyx_k_neither_preset_nor_seq_col_start), 0, 0, 1, 0},
+  {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
+  {&__pyx_n_s_next_2, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1},
+  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
+  {&__pyx_n_s_ord, __pyx_k_ord, sizeof(__pyx_k_ord), 0, 0, 1, 1},
+  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
+  {&__pyx_kp_s_parse_method_of_s_not_implemente, __pyx_k_parse_method_of_s_not_implemente, sizeof(__pyx_k_parse_method_of_s_not_implemente), 0, 0, 1, 0},
+  {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
+  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
+  {&__pyx_n_s_pileup, __pyx_k_pileup, sizeof(__pyx_k_pileup), 0, 0, 1, 1},
+  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+  {&__pyx_n_s_preset, __pyx_k_preset, sizeof(__pyx_k_preset), 0, 0, 1, 1},
+  {&__pyx_n_s_preset2conf, __pyx_k_preset2conf, sizeof(__pyx_k_preset2conf), 0, 0, 1, 1},
+  {&__pyx_n_s_psltbl, __pyx_k_psltbl, sizeof(__pyx_k_psltbl), 0, 0, 1, 1},
+  {&__pyx_n_s_pysam_ctabix, __pyx_k_pysam_ctabix, sizeof(__pyx_k_pysam_ctabix), 0, 0, 1, 1},
+  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
+  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
+  {&__pyx_n_s_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 0, 0, 1, 1},
+  {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1},
+  {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1},
+  {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
+  {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_s_i, __pyx_k_s_i, sizeof(__pyx_k_s_i), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_i_i, __pyx_k_s_i_i, sizeof(__pyx_k_s_i_i), 0, 0, 1, 0},
+  {&__pyx_n_s_sam, __pyx_k_sam, sizeof(__pyx_k_sam), 0, 0, 1, 1},
+  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+  {&__pyx_n_s_seq_col, __pyx_k_seq_col, sizeof(__pyx_k_seq_col), 0, 0, 1, 1},
+  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
+  {&__pyx_n_s_start_col, __pyx_k_start_col, sizeof(__pyx_k_start_col), 0, 0, 1, 1},
+  {&__pyx_kp_s_start_i_end_i, __pyx_k_start_i_end_i, sizeof(__pyx_k_start_i_end_i), 0, 0, 1, 0},
+  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
+  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_compress, __pyx_k_tabix_compress, sizeof(__pyx_k_tabix_compress), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_file_iterator, __pyx_k_tabix_file_iterator, sizeof(__pyx_k_tabix_file_iterator), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_generic_iterator, __pyx_k_tabix_generic_iterator, sizeof(__pyx_k_tabix_generic_iterator), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_generic_iterator___init, __pyx_k_tabix_generic_iterator___init, sizeof(__pyx_k_tabix_generic_iterator___init), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_generic_iterator___iter, __pyx_k_tabix_generic_iterator___iter, sizeof(__pyx_k_tabix_generic_iterator___iter), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_generic_iterator___next, __pyx_k_tabix_generic_iterator___next, sizeof(__pyx_k_tabix_generic_iterator___next), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_generic_iterator_next, __pyx_k_tabix_generic_iterator_next, sizeof(__pyx_k_tabix_generic_iterator_next), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_index, __pyx_k_tabix_index, sizeof(__pyx_k_tabix_index), 0, 0, 1, 1},
+  {&__pyx_n_s_tabix_iterator, __pyx_k_tabix_iterator, sizeof(__pyx_k_tabix_iterator), 0, 0, 1, 1},
+  {&__pyx_kp_s_tbi, __pyx_k_tbi, sizeof(__pyx_k_tbi), 0, 0, 1, 0},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_kp_s_unknown_preset_s_valid_presets_a, __pyx_k_unknown_preset_s_valid_presets_a, sizeof(__pyx_k_unknown_preset_s_valid_presets_a), 0, 0, 1, 0},
+  {&__pyx_n_s_unlink, __pyx_k_unlink, sizeof(__pyx_k_unlink), 0, 0, 1, 1},
+  {&__pyx_n_s_vcf, __pyx_k_vcf, sizeof(__pyx_k_vcf), 0, 0, 1, 1},
+  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
+  {&__pyx_kp_s_writing_failed, __pyx_k_writing_failed, sizeof(__pyx_k_writing_failed), 0, 0, 1, 0},
+  {&__pyx_kp_s_writing_to_file_s_failed, __pyx_k_writing_to_file_s_failed, sizeof(__pyx_k_writing_to_file_s_failed), 0, 0, 1, 0},
+  {&__pyx_kp_s_writing_to_tabix_files_not_imple, __pyx_k_writing_to_tabix_files_not_imple, sizeof(__pyx_k_writing_to_tabix_files_not_imple), 0, 0, 1, 0},
+  {&__pyx_n_s_zerobased, __pyx_k_zerobased, sizeof(__pyx_k_zerobased), 0, 0, 1, 1},
   {0, 0, 0, 0, 0, 0, 0}
 };
 static int __Pyx_InitCachedBuiltins(void) {
-  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __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 = 197; __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 = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_OSError = __Pyx_GetName(__pyx_b, __pyx_n_s__OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ord = __Pyx_GetName(__pyx_b, __pyx_n_s__ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_MemoryError = __Pyx_GetName(__pyx_b, __pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ord = __Pyx_GetBuiltinName(__pyx_n_s_ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -10854,323 +10992,303 @@ static int __Pyx_InitCachedConstants(void) {
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
 
-  /* "pysam/ctabix.pyx":63
+  /* "pysam/ctabix.pyx":60
  *         return s
  *     elif PyUnicode_Check(s):
  *         return s.encode('ascii')             # <<<<<<<<<<<<<<
  *     else:
  *         raise TypeError, u"Argument must be string, bytes or unicode."
  */
-  __pyx_k_tuple_2 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_2);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
+  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple_);
+  __Pyx_GIVEREF(__pyx_tuple_);
 
-  /* "pysam/ctabix.pyx":83
+  /* "pysam/ctabix.pyx":80
  *         return s
  *     elif PyBytes_Check(s):
  *         return s.decode('ascii')             # <<<<<<<<<<<<<<
  *     else:
  *         # assume unicode
  */
-  __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_4);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
+  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__2);
+  __Pyx_GIVEREF(__pyx_tuple__2);
 
-  /* "pysam/ctabix.pyx":124
+  /* "pysam/ctabix.pyx":259
  * 
- *         filename_index = filename + ".tbi"
- *         self.isremote = filename.startswith( "http:") or filename.startswith( "ftp:" )             # <<<<<<<<<<<<<<
+ *         filename_index = index or (filename + ".tbi")
+ *         self.isremote = filename.startswith("http:") or filename.startswith("ftp:")             # <<<<<<<<<<<<<<
  * 
  *         # encode all the strings
  */
-  __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_8);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
-  __pyx_k_tuple_10 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_9)); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_10);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
+  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_http); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__3);
+  __Pyx_GIVEREF(__pyx_tuple__3);
+  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_ftp); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__4);
+  __Pyx_GIVEREF(__pyx_tuple__4);
 
-  /* "pysam/ctabix.pyx":129
- *         filename = _my_encodeFilename(filename)
- *         filename_index = _my_encodeFilename(filename_index)
+  /* "pysam/ctabix.pyx":264
+ *         filename = _encodeFilename(filename)
+ *         filename_index = _encodeFilename(filename_index)
  *         cdef bytes bmode = mode.encode('ascii')             # <<<<<<<<<<<<<<
  * 
  *         if self._filename != NULL: free(self._filename )
  */
-  __pyx_k_tuple_11 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_11);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
+  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__5);
+  __Pyx_GIVEREF(__pyx_tuple__5);
 
-  /* "pysam/ctabix.pyx":137
+  /* "pysam/ctabix.pyx":272
  *         if mode[0] == 'w':
  *             # open file for writing
  *             raise NotImplementedError("writing to tabix files not implemented" )             # <<<<<<<<<<<<<<
  * 
- *         elif mode[0] == "r":
+ *         if mode[0] != "r":
  */
-  __pyx_k_tuple_13 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_12)); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_13);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
+  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_writing_to_tabix_files_not_imple); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__6);
+  __Pyx_GIVEREF(__pyx_tuple__6);
 
-  /* "pysam/ctabix.pyx":222
- * 
+  /* "pysam/ctabix.pyx":319
+ *         '''
  *         if not self._isOpen():
- *             raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
+ *             raise ValueError("I/O operation on closed file")             # <<<<<<<<<<<<<<
  * 
- *         # the following will raise errors for invalid regions
+ *         # convert coordinates to region string
  */
-  __pyx_k_tuple_22 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_21)); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_22);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));
+  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__7);
+  __Pyx_GIVEREF(__pyx_tuple__7);
 
-  /* "pysam/ctabix.pyx":250
+  /* "pysam/ctabix.pyx":379
  *         '''filename associated with this object.'''
  *         def __get__(self):
  *             if not self._isOpen(): raise ValueError( "I/O operation on closed file" )             # <<<<<<<<<<<<<<
  *             return self._filename
  * 
  */
-  __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_21)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_23);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
-
-  /* "pysam/ctabix.pyx":317
- * 
- *         if <void*>self.iterator == NULL:
- *             raise ValueError("malformatted query or wrong sequence name.\n")             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_25);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
-
-  /* "pysam/ctabix.pyx":361
- * 
- *         if <void*>self.iterator == NULL:
- *             raise ValueError("can't open header.\n")             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __pyx_k_tuple_27 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_26)); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_27);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
-
-  /* "pysam/ctabix.pyx":558
- * 
- *         if <void*>self.iterator == NULL:
- *             raise ValueError("malformatted query or wrong sequence name.\n")             # <<<<<<<<<<<<<<
- * 
- *     def __iter__(self):
- */
-  __pyx_k_tuple_28 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_28);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
+  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__8);
+  __Pyx_GIVEREF(__pyx_tuple__8);
 
-  /* "pysam/ctabix.pyx":608
+  /* "pysam/ctabix.pyx":621
  *     fp = bgzf_open( fn, "w")
  *     if fp == NULL:
- *         raise IOError( "could not open '%s' for writing" )             # <<<<<<<<<<<<<<
+ *         raise IOError("could not open '%s' for writing")             # <<<<<<<<<<<<<<
  * 
  *     fn = _force_bytes(filename_in)
  */
-  __pyx_k_tuple_32 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_32);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
+  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_could_not_open_s_for_writing); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__9);
+  __Pyx_GIVEREF(__pyx_tuple__9);
 
-  /* "pysam/ctabix.pyx":613
+  /* "pysam/ctabix.pyx":626
  *     fd_src = open(fn, O_RDONLY)
  *     if fd_src == 0:
- *         raise IOError( "could not open '%s' for reading" )             # <<<<<<<<<<<<<<
+ *         raise IOError("could not open '%s' for reading")             # <<<<<<<<<<<<<<
  * 
  *     buffer = malloc(WINDOW_SIZE)
  */
-  __pyx_k_tuple_34 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_33)); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_34);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));
+  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_could_not_open_s_for_reading); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__10);
+  __Pyx_GIVEREF(__pyx_tuple__10);
 
-  /* "pysam/ctabix.pyx":623
+  /* "pysam/ctabix.pyx":636
  *         if r < 0:
- *             free( buffer )
+ *             free(buffer)
  *             raise OSError("writing failed")             # <<<<<<<<<<<<<<
  * 
- *     free( buffer )
- */
-  __pyx_k_tuple_36 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_35)); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_36);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));
-
-  /* "pysam/ctabix.pyx":627
- *     free( buffer )
- *     r = bgzf_close(fp)
- *     if r < 0: raise OSError("writing failed")             # <<<<<<<<<<<<<<
- * 
- * def tabix_index( filename,
+ *     free(buffer)
  */
-  __pyx_k_tuple_37 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_35)); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_37);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));
+  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_writing_failed); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__11);
+  __Pyx_GIVEREF(__pyx_tuple__11);
 
-  /* "pysam/ctabix.pyx":674
+  /* "pysam/ctabix.pyx":698
  * 
  *     if preset == None and (seq_col == None or start_col == None or end_col == None):
  *         raise ValueError("neither preset nor seq_col,start_col and end_col given" )             # <<<<<<<<<<<<<<
  * 
  *     if not filename.endswith(".gz"):
  */
-  __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_42)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_43);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));
+  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_neither_preset_nor_seq_col_start); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__13);
+  __Pyx_GIVEREF(__pyx_tuple__13);
 
-  /* "pysam/ctabix.pyx":676
+  /* "pysam/ctabix.pyx":700
  *         raise ValueError("neither preset nor seq_col,start_col and end_col given" )
  * 
  *     if not filename.endswith(".gz"):             # <<<<<<<<<<<<<<
  *         tabix_compress( filename, filename + ".gz", force = force )
  *         os.unlink( filename )
  */
-  __pyx_k_tuple_45 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_45);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));
+  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_gz); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__14);
+  __Pyx_GIVEREF(__pyx_tuple__14);
 
-  /* "pysam/ctabix.pyx":682
+  /* "pysam/ctabix.pyx":706
  * 
  *     if not force and os.path.exists(filename + ".tbi" ):
  *         raise IOError( "Filename '%s.tbi' already exists, use *force* to overwrite" )             # <<<<<<<<<<<<<<
  * 
- *     # columns (1-based)
+ *     # columns (1-based):
  */
-  __pyx_k_tuple_47 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_46)); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_47);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
+  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Filename_s_tbi_already_exists_us); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__15);
+  __Pyx_GIVEREF(__pyx_tuple__15);
 
-  /* "pysam/ctabix.pyx":812
+  /* "pysam/ctabix.pyx":839
  * 
  *         if infile.closed:
  *             raise ValueError( "I/O operation on closed file." )             # <<<<<<<<<<<<<<
  * 
  *         self.infile = infile
  */
-  __pyx_k_tuple_52 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_52);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
+  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file_2); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__17);
+  __Pyx_GIVEREF(__pyx_tuple__17);
 
-  /* "pysam/ctabix.pyx":817
- * 
- *         cdef int fd = PyObject_AsFileDescriptor( infile )
- *         if fd == -1: raise ValueError( "I/O operation on closed file." )             # <<<<<<<<<<<<<<
+  /* "pysam/ctabix.pyx":845
+ *         cdef int fd = PyObject_AsFileDescriptor(infile)
+ *         if fd == -1:
+ *             raise ValueError("I/O operation on closed file.")             # <<<<<<<<<<<<<<
  * 
  *         # From the manual:
  */
-  __pyx_k_tuple_53 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_53);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));
+  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file_2); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__18);
+  __Pyx_GIVEREF(__pyx_tuple__18);
 
-  /* "pysam/ctabix.pyx":885
- * 
+  /* "pysam/ctabix.pyx":915
  *         self.infile = infile
- *         if self.infile.closed: raise ValueError( "I/O operation on closed file." )             # <<<<<<<<<<<<<<
+ *         if self.infile.closed:
+ *             raise ValueError("I/O operation on closed file.")             # <<<<<<<<<<<<<<
  *         self.parser = parser
  * 
  */
-  __pyx_k_tuple_55 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_55);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));
+  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file_2); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__19);
+  __Pyx_GIVEREF(__pyx_tuple__19);
 
-  /* "pysam/ctabix.pyx":899
+  /* "pysam/ctabix.pyx":930
  *         # note that GzipFile.close() does not close the file
  *         # reading is still possible.
  *         if self.infile.closed: raise ValueError( "I/O operation on closed file." )             # <<<<<<<<<<<<<<
  * 
  *         while 1:
  */
-  __pyx_k_tuple_56 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_56);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56));
+  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_file_2); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__20);
+  __Pyx_GIVEREF(__pyx_tuple__20);
+
+  /* "pysam/ctabix.pyx":478
+ *     '''empty iterator'''
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ * 
+ */
+  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__21);
+  __Pyx_GIVEREF(__pyx_tuple__21);
+  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_iter, 478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":582
- *             ti_iter_destroy(self.iterator)
+  /* "pysam/ctabix.pyx":482
+ * 
+ * 
+ *     def next(self):             # <<<<<<<<<<<<<<
+ *         raise StopIteration()
  * 
- * def tabix_compress( filename_in,             # <<<<<<<<<<<<<<
- *                     filename_out,
- *                     force = False ):
  */
-  __pyx_k_tuple_63 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__filename_in), ((PyObject *)__pyx_n_s__filename_out), ((PyObject *)__pyx_n_s__force), ((PyObject *)__pyx_n_s__WINDOW_SIZE), ((PyObject *)__pyx_n_s__c), ((PyObject *)__pyx_n_s__r), ((PyObject *)__pyx_n_s__buffer), ((PyObject *)__pyx_n_s__fp), ((PyObject *)__pyx_n_s__fd_src), ((PyObject *)__pyx_n_s__O_RDONLY), ((PyObject *)__pyx_n_s__fn)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_cl [...]
-  __Pyx_GOTREF(__pyx_k_tuple_63);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
-  __pyx_k_codeobj_64 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s__tabix_compress, 582, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__23);
+  __Pyx_GIVEREF(__pyx_tuple__23);
+  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_next_2, 482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":629
- *     if r < 0: raise OSError("writing failed")
+  /* "pysam/ctabix.pyx":594
+ * 
+ * 
+ * def tabix_compress(filename_in,             # <<<<<<<<<<<<<<
+ *                    filename_out,
+ *                    force=False):
+ */
+  __pyx_tuple__25 = PyTuple_Pack(11, __pyx_n_s_filename_in, __pyx_n_s_filename_out, __pyx_n_s_force, __pyx_n_s_WINDOW_SIZE, __pyx_n_s_c, __pyx_n_s_r, __pyx_n_s_buffer, __pyx_n_s_fp, __pyx_n_s_fd_src, __pyx_n_s_O_RDONLY, __pyx_n_s_fn); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__25);
+  __Pyx_GIVEREF(__pyx_tuple__25);
+  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_tabix_compress, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/ctabix.pyx":647
+ *         raise OSError("error when closing file %s" % filename_in)
  * 
  * def tabix_index( filename,             # <<<<<<<<<<<<<<
  *                  force = False,
  *                  seq_col = None,
  */
-  __pyx_k_tuple_67 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__force), ((PyObject *)__pyx_n_s__seq_col), ((PyObject *)__pyx_n_s__start_col), ((PyObject *)__pyx_n_s__end_col), ((PyObject *)__pyx_n_s__preset), ((PyObject *)__pyx_n_s__meta_char), ((PyObject *)__pyx_n_s__zerobased), ((PyObject *)__pyx_n_s__preset2conf), ((PyObject *)__pyx_n_s__conf_data), ((PyObject *)__pyx_n_s__conf), ((PyObject *)__pyx_n_s__fn)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_fil [...]
-  __Pyx_GOTREF(__pyx_k_tuple_67);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));
-  __pyx_k_codeobj_68 = (PyObject*)__Pyx_PyCode_New(8, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s__tabix_index, 629, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__27 = PyTuple_Pack(13, __pyx_n_s_filename, __pyx_n_s_force, __pyx_n_s_seq_col, __pyx_n_s_start_col, __pyx_n_s_end_col, __pyx_n_s_preset, __pyx_n_s_meta_char, __pyx_n_s_zerobased, __pyx_n_s_min_shift, __pyx_n_s_preset2conf, __pyx_n_s_conf_data, __pyx_n_s_conf, __pyx_n_s_fn); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__27);
+  __Pyx_GIVEREF(__pyx_tuple__27);
+  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(9, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_tabix_index, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":882
+  /* "pysam/ctabix.pyx":911
  *     Permits the use of file-like objects for example from the gzip module.
  *     '''
  *     def __init__(self, infile, parser ):             # <<<<<<<<<<<<<<
  * 
  *         self.infile = infile
  */
-  __pyx_k_tuple_69 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__infile), ((PyObject *)__pyx_n_s__parser)); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_69);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69));
-  __pyx_k_codeobj_70 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s____init__, 882, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__29 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_infile, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__29);
+  __Pyx_GIVEREF(__pyx_tuple__29);
+  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_init, 911, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":888
+  /* "pysam/ctabix.pyx":918
  *         self.parser = parser
  * 
  *     def __iter__(self):             # <<<<<<<<<<<<<<
  *         return self
  * 
  */
-  __pyx_k_tuple_72 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_72);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));
-  __pyx_k_codeobj_73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s____iter__, 888, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__31);
+  __Pyx_GIVEREF(__pyx_tuple__31);
+  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_iter, 918, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":892
+  /* "pysam/ctabix.pyx":922
  * 
  *     # cython version - required for python 3
  *     def __next__(self):             # <<<<<<<<<<<<<<
  * 
- *         cdef char * b, * cpy
+ *         cdef char * b
  */
-  __pyx_k_tuple_75 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__cpy), ((PyObject *)__pyx_n_s__nbytes), ((PyObject *)__pyx_n_s__line), ((PyObject *)__pyx_n_s__s)); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_75);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));
-  __pyx_k_codeobj_76 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s____next__, 892, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__33 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_b, __pyx_n_s_cpy, __pyx_n_s_nbytes, __pyx_n_s_line, __pyx_n_s_s_2); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__33);
+  __Pyx_GIVEREF(__pyx_tuple__33);
+  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_next, 922, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":931
+  /* "pysam/ctabix.pyx":962
  * 
  *     # python version - required for python 2.7
  *     def next(self):             # <<<<<<<<<<<<<<
  *         return self.__next__()
  * 
  */
-  __pyx_k_tuple_78 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_78);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));
-  __pyx_k_codeobj_79 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s__next, 931, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__35);
+  __Pyx_GIVEREF(__pyx_tuple__35);
+  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_next_2, 962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/ctabix.pyx":934
+  /* "pysam/ctabix.pyx":965
  *         return self.__next__()
  * 
  * def tabix_iterator( infile, parser ):             # <<<<<<<<<<<<<<
  *     """return an iterator over all entries in a file."""
  *     if PYTHON3:
  */
-  __pyx_k_tuple_82 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__infile), ((PyObject *)__pyx_n_s__parser)); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_82);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));
-  __pyx_k_codeobj_83 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s__tabix_iterator, 934, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_infile, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__37);
+  __Pyx_GIVEREF(__pyx_tuple__37);
+  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_tabix_iterator, 965, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_RefNannyFinishContext();
   return 0;
   __pyx_L1_error:;
@@ -11180,19 +11298,19 @@ static int __Pyx_InitCachedConstants(void) {
 
 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_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_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_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_35 = PyInt_FromLong(35); if (unlikely(!__pyx_int_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_65536 = PyInt_FromLong(65536); if (unlikely(!__pyx_int_65536)) {__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_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_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_35 = PyInt_FromLong(35); if (unlikely(!__pyx_int_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_65536 = PyInt_FromLong(65536L); if (unlikely(!__pyx_int_65536)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -11209,6 +11327,10 @@ PyMODINIT_FUNC PyInit_ctabix(void)
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   int __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   __Pyx_RefNannyDeclarations
   #if CYTHON_REFNANNY
   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
@@ -11239,21 +11361,15 @@ PyMODINIT_FUNC PyInit_ctabix(void)
   PyEval_InitThreads();
   #endif
   #endif
-  /*--- Module creation code ---*/
-  #if PY_MAJOR_VERSION < 3
-  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("ctabix"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
-  #else
-  __pyx_m = PyModule_Create(&__pyx_moduledef);
-  #endif
-  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if PY_MAJOR_VERSION >= 3
-  {
-    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (!PyDict_GetItemString(modules, "pysam.ctabix")) {
-      if (unlikely(PyDict_SetItemString(modules, "pysam.ctabix", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-  }
-  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("ctabix"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #if CYTHON_COMPILING_IN_PYPY
   Py_INCREF(__pyx_b);
@@ -11261,9 +11377,20 @@ PyMODINIT_FUNC PyInit_ctabix(void)
   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   /*--- Initialize various global constants etc. ---*/
   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
   if (__pyx_module_is_main_pysam__ctabix) {
-    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "pysam.ctabix")) {
+      if (unlikely(PyDict_SetItemString(modules, "pysam.ctabix", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
   /*--- Builtin init code ---*/
   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Constants init code ---*/
@@ -11272,204 +11399,242 @@ PyMODINIT_FUNC PyInit_ctabix(void)
   __pyx_v_5pysam_6ctabix__FILENAME_ENCODING = ((PyObject*)Py_None); Py_INCREF(Py_None);
   /*--- Variable export code ---*/
   /*--- Function export code ---*/
+  if (__Pyx_ExportFunction("_force_str", (void (*)(void))__pyx_f_5pysam_6ctabix__force_str, "PyObject *(PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Type init code ---*/
   __pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator = &__pyx_vtable_5pysam_6ctabix_tabix_file_iterator;
   __pyx_vtable_5pysam_6ctabix_tabix_file_iterator.__pyx___cnext__ = (PyObject *(*)(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *))__pyx_f_5pysam_6ctabix_19tabix_file_iterator___cnext__;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_tabix_file_iterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_tabix_file_iterator.tp_dict, __pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "tabix_file_iterator", (PyObject *)&__pyx_type_5pysam_6ctabix_tabix_file_iterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_tabix_file_iterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_tabix_file_iterator.tp_print = 0;
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_tabix_file_iterator.tp_dict, __pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "tabix_file_iterator", (PyObject *)&__pyx_type_5pysam_6ctabix_tabix_file_iterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_6ctabix_tabix_file_iterator = &__pyx_type_5pysam_6ctabix_tabix_file_iterator;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_Tabixfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "Tabixfile", (PyObject *)&__pyx_type_5pysam_6ctabix_Tabixfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_Tabixfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_Tabixfile.tp_print = 0;
+  if (__Pyx_SetAttrString(__pyx_m, "Tabixfile", (PyObject *)&__pyx_type_5pysam_6ctabix_Tabixfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_6ctabix_Tabixfile = &__pyx_type_5pysam_6ctabix_Tabixfile;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_TabixIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_TabixIterator, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_6ctabix_13TabixIterator_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_6ctabix_13TabixIterator_4__next__.doc = __pyx_doc_5pysam_6ctabix_13TabixIterator_4__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_13TabixIterator_4__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetAttrString(__pyx_m, "TabixIterator", (PyObject *)&__pyx_type_5pysam_6ctabix_TabixIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_TabixIterator = &__pyx_type_5pysam_6ctabix_TabixIterator;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_TabixHeaderIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if CYTHON_COMPILING_IN_CPYTHON
-  {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_TabixHeaderIterator, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_6ctabix_19TabixHeaderIterator_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_6ctabix_19TabixHeaderIterator_4__next__.doc = __pyx_doc_5pysam_6ctabix_19TabixHeaderIterator_4__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_19TabixHeaderIterator_4__next__;
-    }
-  }
-  #endif
-  if (__Pyx_SetAttrString(__pyx_m, "TabixHeaderIterator", (PyObject *)&__pyx_type_5pysam_6ctabix_TabixHeaderIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_TabixHeaderIterator = &__pyx_type_5pysam_6ctabix_TabixHeaderIterator;
   __pyx_vtabptr_5pysam_6ctabix_Parser = &__pyx_vtable_5pysam_6ctabix_Parser;
   __pyx_vtable_5pysam_6ctabix_Parser.parse = (PyObject *(*)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int))__pyx_f_5pysam_6ctabix_6Parser_parse;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_Parser.tp_dict, __pyx_vtabptr_5pysam_6ctabix_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "Parser", (PyObject *)&__pyx_type_5pysam_6ctabix_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_Parser.tp_print = 0;
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_Parser.tp_dict, __pyx_vtabptr_5pysam_6ctabix_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "Parser", (PyObject *)&__pyx_type_5pysam_6ctabix_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_6ctabix_Parser = &__pyx_type_5pysam_6ctabix_Parser;
   __pyx_vtabptr_5pysam_6ctabix_asTuple = &__pyx_vtable_5pysam_6ctabix_asTuple;
   __pyx_vtable_5pysam_6ctabix_asTuple.__pyx_base = *__pyx_vtabptr_5pysam_6ctabix_Parser;
   __pyx_vtable_5pysam_6ctabix_asTuple.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int))__pyx_f_5pysam_6ctabix_7asTuple_parse;
   __pyx_type_5pysam_6ctabix_asTuple.tp_base = __pyx_ptype_5pysam_6ctabix_Parser;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_asTuple) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_asTuple.tp_dict, __pyx_vtabptr_5pysam_6ctabix_asTuple) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "asTuple", (PyObject *)&__pyx_type_5pysam_6ctabix_asTuple) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_asTuple) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_asTuple.tp_print = 0;
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_asTuple.tp_dict, __pyx_vtabptr_5pysam_6ctabix_asTuple) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "asTuple", (PyObject *)&__pyx_type_5pysam_6ctabix_asTuple) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_6ctabix_asTuple = &__pyx_type_5pysam_6ctabix_asTuple;
   __pyx_vtabptr_5pysam_6ctabix_asGTF = &__pyx_vtable_5pysam_6ctabix_asGTF;
   __pyx_vtable_5pysam_6ctabix_asGTF.__pyx_base = *__pyx_vtabptr_5pysam_6ctabix_Parser;
   __pyx_vtable_5pysam_6ctabix_asGTF.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int))__pyx_f_5pysam_6ctabix_5asGTF_parse;
   __pyx_type_5pysam_6ctabix_asGTF.tp_base = __pyx_ptype_5pysam_6ctabix_Parser;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_asGTF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_asGTF.tp_dict, __pyx_vtabptr_5pysam_6ctabix_asGTF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "asGTF", (PyObject *)&__pyx_type_5pysam_6ctabix_asGTF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_asGTF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_asGTF.tp_print = 0;
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_asGTF.tp_dict, __pyx_vtabptr_5pysam_6ctabix_asGTF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "asGTF", (PyObject *)&__pyx_type_5pysam_6ctabix_asGTF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_6ctabix_asGTF = &__pyx_type_5pysam_6ctabix_asGTF;
   __pyx_vtabptr_5pysam_6ctabix_asBed = &__pyx_vtable_5pysam_6ctabix_asBed;
   __pyx_vtable_5pysam_6ctabix_asBed.__pyx_base = *__pyx_vtabptr_5pysam_6ctabix_Parser;
   __pyx_vtable_5pysam_6ctabix_asBed.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int))__pyx_f_5pysam_6ctabix_5asBed_parse;
   __pyx_type_5pysam_6ctabix_asBed.tp_base = __pyx_ptype_5pysam_6ctabix_Parser;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_asBed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_asBed.tp_dict, __pyx_vtabptr_5pysam_6ctabix_asBed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "asBed", (PyObject *)&__pyx_type_5pysam_6ctabix_asBed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_asBed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_asBed.tp_print = 0;
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_asBed.tp_dict, __pyx_vtabptr_5pysam_6ctabix_asBed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "asBed", (PyObject *)&__pyx_type_5pysam_6ctabix_asBed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_6ctabix_asBed = &__pyx_type_5pysam_6ctabix_asBed;
   __pyx_vtabptr_5pysam_6ctabix_asVCF = &__pyx_vtable_5pysam_6ctabix_asVCF;
   __pyx_vtable_5pysam_6ctabix_asVCF.__pyx_base = *__pyx_vtabptr_5pysam_6ctabix_Parser;
   __pyx_vtable_5pysam_6ctabix_asVCF.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int))__pyx_f_5pysam_6ctabix_5asVCF_parse;
   __pyx_type_5pysam_6ctabix_asVCF.tp_base = __pyx_ptype_5pysam_6ctabix_Parser;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_asVCF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_asVCF.tp_dict, __pyx_vtabptr_5pysam_6ctabix_asVCF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "asVCF", (PyObject *)&__pyx_type_5pysam_6ctabix_asVCF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_asVCF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_asVCF.tp_print = 0;
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_asVCF.tp_dict, __pyx_vtabptr_5pysam_6ctabix_asVCF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "asVCF", (PyObject *)&__pyx_type_5pysam_6ctabix_asVCF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_6ctabix_asVCF = &__pyx_type_5pysam_6ctabix_asVCF;
-  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_TabixIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_TabixIterator = &__pyx_vtable_5pysam_6ctabix_TabixIterator;
+  __pyx_vtable_5pysam_6ctabix_TabixIterator.__pyx___cnext__ = (int (*)(struct __pyx_obj_5pysam_6ctabix_TabixIterator *))__pyx_f_5pysam_6ctabix_13TabixIterator___cnext__;
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_TabixIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_TabixIterator.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_TabixIterator, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_6ctabix_13TabixIterator_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_6ctabix_13TabixIterator_2__next__.doc = __pyx_doc_5pysam_6ctabix_13TabixIterator_2__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_13TabixIterator_2__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_TabixIterator.tp_dict, __pyx_vtabptr_5pysam_6ctabix_TabixIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "TabixIterator", (PyObject *)&__pyx_type_5pysam_6ctabix_TabixIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_TabixIterator = &__pyx_type_5pysam_6ctabix_TabixIterator;
+  __pyx_vtabptr_5pysam_6ctabix_TabixIteratorParsed = &__pyx_vtable_5pysam_6ctabix_TabixIteratorParsed;
+  __pyx_vtable_5pysam_6ctabix_TabixIteratorParsed.__pyx_base = *__pyx_vtabptr_5pysam_6ctabix_TabixIterator;
+  __pyx_type_5pysam_6ctabix_TabixIteratorParsed.tp_base = __pyx_ptype_5pysam_6ctabix_TabixIterator;
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_TabixIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_TabixIteratorParsed.tp_print = 0;
   #if CYTHON_COMPILING_IN_CPYTHON
   {
-    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_TabixIteratorParsed, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_TabixIteratorParsed, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
-      __pyx_wrapperbase_5pysam_6ctabix_19TabixIteratorParsed_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
-      __pyx_wrapperbase_5pysam_6ctabix_19TabixIteratorParsed_4__next__.doc = __pyx_doc_5pysam_6ctabix_19TabixIteratorParsed_4__next__;
-      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_19TabixIteratorParsed_4__next__;
+      __pyx_wrapperbase_5pysam_6ctabix_19TabixIteratorParsed_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_6ctabix_19TabixIteratorParsed_2__next__.doc = __pyx_doc_5pysam_6ctabix_19TabixIteratorParsed_2__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_19TabixIteratorParsed_2__next__;
     }
   }
   #endif
-  if (__Pyx_SetAttrString(__pyx_m, "TabixIteratorParsed", (PyObject *)&__pyx_type_5pysam_6ctabix_TabixIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_TabixIteratorParsed.tp_dict, __pyx_vtabptr_5pysam_6ctabix_TabixIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "TabixIteratorParsed", (PyObject *)&__pyx_type_5pysam_6ctabix_TabixIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_6ctabix_TabixIteratorParsed = &__pyx_type_5pysam_6ctabix_TabixIteratorParsed;
+  __pyx_vtabptr_5pysam_6ctabix_GZIterator = &__pyx_vtable_5pysam_6ctabix_GZIterator;
+  __pyx_vtable_5pysam_6ctabix_GZIterator.__pyx___cnext__ = (int (*)(struct __pyx_obj_5pysam_6ctabix_GZIterator *))__pyx_f_5pysam_6ctabix_10GZIterator___cnext__;
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_GZIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_GZIterator.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_GZIterator, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_6ctabix_10GZIterator___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_6ctabix_10GZIterator___init__.doc = __pyx_doc_5pysam_6ctabix_10GZIterator___init__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_10GZIterator___init__;
+    }
+  }
+  #endif
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_GZIterator, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_6ctabix_10GZIterator_6__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_6ctabix_10GZIterator_6__next__.doc = __pyx_doc_5pysam_6ctabix_10GZIterator_6__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_10GZIterator_6__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_GZIterator.tp_dict, __pyx_vtabptr_5pysam_6ctabix_GZIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "GZIterator", (PyObject *)&__pyx_type_5pysam_6ctabix_GZIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_GZIterator = &__pyx_type_5pysam_6ctabix_GZIterator;
+  __pyx_vtabptr_5pysam_6ctabix_GZIteratorHead = &__pyx_vtable_5pysam_6ctabix_GZIteratorHead;
+  __pyx_vtable_5pysam_6ctabix_GZIteratorHead.__pyx_base = *__pyx_vtabptr_5pysam_6ctabix_GZIterator;
+  __pyx_type_5pysam_6ctabix_GZIteratorHead.tp_base = __pyx_ptype_5pysam_6ctabix_GZIterator;
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_GZIteratorHead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_GZIteratorHead.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_GZIteratorHead, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_6ctabix_14GZIteratorHead___next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_6ctabix_14GZIteratorHead___next__.doc = __pyx_doc_5pysam_6ctabix_14GZIteratorHead___next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_14GZIteratorHead___next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_GZIteratorHead.tp_dict, __pyx_vtabptr_5pysam_6ctabix_GZIteratorHead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "GZIteratorHead", (PyObject *)&__pyx_type_5pysam_6ctabix_GZIteratorHead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_GZIteratorHead = &__pyx_type_5pysam_6ctabix_GZIteratorHead;
+  __pyx_vtabptr_5pysam_6ctabix_GZIteratorParsed = &__pyx_vtable_5pysam_6ctabix_GZIteratorParsed;
+  __pyx_vtable_5pysam_6ctabix_GZIteratorParsed.__pyx_base = *__pyx_vtabptr_5pysam_6ctabix_GZIterator;
+  __pyx_type_5pysam_6ctabix_GZIteratorParsed.tp_base = __pyx_ptype_5pysam_6ctabix_GZIterator;
+  if (PyType_Ready(&__pyx_type_5pysam_6ctabix_GZIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_6ctabix_GZIteratorParsed.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_6ctabix_GZIteratorParsed, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_5pysam_6ctabix_16GZIteratorParsed_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_5pysam_6ctabix_16GZIteratorParsed_2__next__.doc = __pyx_doc_5pysam_6ctabix_16GZIteratorParsed_2__next__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_6ctabix_16GZIteratorParsed_2__next__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_5pysam_6ctabix_GZIteratorParsed.tp_dict, __pyx_vtabptr_5pysam_6ctabix_GZIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "GZIteratorParsed", (PyObject *)&__pyx_type_5pysam_6ctabix_GZIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_GZIteratorParsed = &__pyx_type_5pysam_6ctabix_GZIteratorParsed;
   /*--- Type import code ---*/
-  __pyx_ptype_5pysam_10TabProxies_TupleProxy = __Pyx_ImportType("pysam.TabProxies", "TupleProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_TupleProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_10TabProxies_TupleProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_TupleProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_10TabProxies_GTFProxy = __Pyx_ImportType("pysam.TabProxies", "GTFProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_GTFProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_10TabProxies_GTFProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_GTFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_10TabProxies_NamedTupleProxy = __Pyx_ImportType("pysam.TabProxies", "NamedTupleProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_10TabProxies_BedProxy = __Pyx_ImportType("pysam.TabProxies", "BedProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_BedProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_10TabProxies_BedProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_BedProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_10TabProxies_VCFProxy = __Pyx_ImportType("pysam.TabProxies", "VCFProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_VCFProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_10TabProxies_VCFProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_VCFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
   #if CYTHON_COMPILING_IN_PYPY
   sizeof(PyTypeObject),
   #else
   sizeof(PyHeapTypeObject),
   #endif
-  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __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[3]; __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[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[2]; __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[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_10TabProxies_TupleProxy = __Pyx_ImportType("pysam.TabProxies", "TupleProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_TupleProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_10TabProxies_TupleProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_TupleProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_10TabProxies_GTFProxy = __Pyx_ImportType("pysam.TabProxies", "GTFProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_GTFProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_10TabProxies_GTFProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_GTFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_10TabProxies_NamedTupleProxy = __Pyx_ImportType("pysam.TabProxies", "NamedTupleProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_10TabProxies_BedProxy = __Pyx_ImportType("pysam.TabProxies", "BedProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_BedProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_10TabProxies_BedProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_BedProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_10TabProxies_VCFProxy = __Pyx_ImportType("pysam.TabProxies", "VCFProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_VCFProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_10TabProxies_VCFProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_VCFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Variable import code ---*/
   /*--- Function import code ---*/
   /*--- Execution code ---*/
 
-  /* "pysam/ctabix.pyx":6
- * # Helper functions for python 3 compatibility - taken
- * # from csamtools.pyx
- * import tempfile, os, sys, types, itertools, struct, ctypes, gzip             # <<<<<<<<<<<<<<
- * import io
- * cimport TabProxies
+  /* "pysam/ctabix.pyx":3
+ * # cython: embedsignature=True
+ * # adds doc-strings for sphinx
+ * import os             # <<<<<<<<<<<<<<
+ * import sys
+ * 
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__tempfile), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tempfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__types), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__itertools), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__struct), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__struct, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__gzip), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__gzip, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":7
- * # from csamtools.pyx
- * import tempfile, os, sys, types, itertools, struct, ctypes, gzip
- * import io             # <<<<<<<<<<<<<<
- * cimport TabProxies
+  /* "pysam/ctabix.pyx":4
+ * # adds doc-strings for sphinx
+ * import os
+ * import sys             # <<<<<<<<<<<<<<
  * 
+ * from libc.stdio cimport printf, fprintf, stderr
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__io), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__io, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":19
- * from libc.stdint cimport int64_t
+  /* "pysam/ctabix.pyx":25
+ *     gzopen, gzclose, gzerror, gzdopen
  * 
  * PYTHON3 = PY_MAJOR_VERSION >= 3             # <<<<<<<<<<<<<<
  * 
- * # from cpython cimport PyString_FromStringAndSize, PyString_AS_STRING
+ * # filename encoding (copied from lxml.etree.pyx)
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong((PY_MAJOR_VERSION >= 3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong((PY_MAJOR_VERSION >= 3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PYTHON3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYTHON3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":32
+  /* "pysam/ctabix.pyx":29
  * # filename encoding (copied from lxml.etree.pyx)
  * cdef str _FILENAME_ENCODING
  * _FILENAME_ENCODING = sys.getfilesystemencoding()             # <<<<<<<<<<<<<<
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = sys.getdefaultencoding()
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_62); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __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 = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected str, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
-  __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
+  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XGOTREF(__pyx_v_5pysam_6ctabix__FILENAME_ENCODING);
+  __Pyx_DECREF_SET(__pyx_v_5pysam_6ctabix__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
   __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_v_5pysam_6ctabix__FILENAME_ENCODING = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":33
+  /* "pysam/ctabix.pyx":30
  * cdef str _FILENAME_ENCODING
  * _FILENAME_ENCODING = sys.getfilesystemencoding()
  * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
@@ -11477,257 +11642,270 @@ PyMODINIT_FUNC PyInit_ctabix(void)
  * if _FILENAME_ENCODING is None:
  */
   __pyx_t_3 = (__pyx_v_5pysam_6ctabix__FILENAME_ENCODING == ((PyObject*)Py_None));
-  if (__pyx_t_3) {
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
 
-    /* "pysam/ctabix.pyx":34
+    /* "pysam/ctabix.pyx":31
  * _FILENAME_ENCODING = sys.getfilesystemencoding()
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = sys.getdefaultencoding()             # <<<<<<<<<<<<<<
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = 'ascii'
  */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__getdefaultencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getdefaultencoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __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 = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected str, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
-    __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
+    if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XGOTREF(__pyx_v_5pysam_6ctabix__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_6ctabix__FILENAME_ENCODING, ((PyObject*)__pyx_t_1));
     __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_v_5pysam_6ctabix__FILENAME_ENCODING = ((PyObject*)__pyx_t_1);
     __pyx_t_1 = 0;
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "pysam/ctabix.pyx":35
+  /* "pysam/ctabix.pyx":32
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = sys.getdefaultencoding()
  * if _FILENAME_ENCODING is None:             # <<<<<<<<<<<<<<
  *     _FILENAME_ENCODING = 'ascii'
  * 
  */
-  __pyx_t_3 = (__pyx_v_5pysam_6ctabix__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_4 = (__pyx_v_5pysam_6ctabix__FILENAME_ENCODING == ((PyObject*)Py_None));
+  __pyx_t_3 = (__pyx_t_4 != 0);
   if (__pyx_t_3) {
 
-    /* "pysam/ctabix.pyx":36
+    /* "pysam/ctabix.pyx":33
  *     _FILENAME_ENCODING = sys.getdefaultencoding()
  * if _FILENAME_ENCODING is None:
  *     _FILENAME_ENCODING = 'ascii'             # <<<<<<<<<<<<<<
  * 
  * #cdef char* _C_FILENAME_ENCODING
  */
-    __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
-    __Pyx_XGOTREF(((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
-    __Pyx_DECREF(((PyObject *)__pyx_v_5pysam_6ctabix__FILENAME_ENCODING));
-    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
-    __pyx_v_5pysam_6ctabix__FILENAME_ENCODING = __pyx_n_s__ascii;
+    __Pyx_INCREF(__pyx_n_s_ascii);
+    __Pyx_XGOTREF(__pyx_v_5pysam_6ctabix__FILENAME_ENCODING);
+    __Pyx_DECREF_SET(__pyx_v_5pysam_6ctabix__FILENAME_ENCODING, __pyx_n_s_ascii);
+    __Pyx_GIVEREF(__pyx_n_s_ascii);
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/ctabix.pyx":584
- * def tabix_compress( filename_in,
- *                     filename_out,
- *                     force = False ):             # <<<<<<<<<<<<<<
- *     '''
- *     compress *filename_in* writing the output to *filename_out*.
+  /* "pysam/ctabix.pyx":475
+ * 
+ * 
+ * class EmptyIterator:             # <<<<<<<<<<<<<<
+ *     '''empty iterator'''
+ * 
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EmptyIterator, __pyx_n_s_EmptyIterator, (PyObject *) NULL, __pyx_n_s_pysam_ctabix, __pyx_kp_s_empty_iterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_k_29 = __pyx_t_1;
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":582
- *             ti_iter_destroy(self.iterator)
+  /* "pysam/ctabix.pyx":478
+ *     '''empty iterator'''
+ * 
+ *     def __iter__(self):             # <<<<<<<<<<<<<<
+ *         return self
  * 
- * def tabix_compress( filename_in,             # <<<<<<<<<<<<<<
- *                     filename_out,
- *                     force = False ):
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_1tabix_compress, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tabix_compress, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_13EmptyIterator_1__iter__, 0, __pyx_n_s_EmptyIterator___iter, NULL, __pyx_n_s_pysam_ctabix, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_iter, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/ctabix.pyx":630
+  /* "pysam/ctabix.pyx":482
+ * 
+ * 
+ *     def next(self):             # <<<<<<<<<<<<<<
+ *         raise StopIteration()
  * 
- * def tabix_index( filename,
- *                  force = False,             # <<<<<<<<<<<<<<
- *                  seq_col = None,
- *                  start_col = None,
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_k_38 = __pyx_t_1;
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_13EmptyIterator_3next, 0, __pyx_n_s_EmptyIterator_next, NULL, __pyx_n_s_pysam_ctabix, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__24)); 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);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/ctabix.pyx":636
- *                  preset = None,
- *                  meta_char = "#",
- *                  zerobased = False,             # <<<<<<<<<<<<<<
- *                 ):
- *     '''
+  /* "pysam/ctabix.pyx":475
+ * 
+ * 
+ * class EmptyIterator:             # <<<<<<<<<<<<<<
+ *     '''empty iterator'''
+ * 
+ */
+  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EmptyIterator, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EmptyIterator, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __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;
+
+  /* "pysam/ctabix.pyx":594
+ * 
+ * 
+ * def tabix_compress(filename_in,             # <<<<<<<<<<<<<<
+ *                    filename_out,
+ *                    force=False):
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_1tabix_compress, NULL, __pyx_n_s_pysam_ctabix); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_k_40 = __pyx_t_1;
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_compress, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":629
- *     if r < 0: raise OSError("writing failed")
+  /* "pysam/ctabix.pyx":647
+ *         raise OSError("error when closing file %s" % filename_in)
  * 
  * def tabix_index( filename,             # <<<<<<<<<<<<<<
  *                  force = False,
  *                  seq_col = None,
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_3tabix_index, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_3tabix_index, NULL, __pyx_n_s_pysam_ctabix); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tabix_index, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_index, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":877
- *         return self.__cnext__()
+  /* "pysam/ctabix.pyx":906
+ * 
  * 
  * class tabix_generic_iterator:             # <<<<<<<<<<<<<<
  *     '''iterate over ``infile``.
  * 
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_tabix_generic_iterator, __pyx_n_s_tabix_generic_iterator, (PyObject *) NULL, __pyx_n_s_pysam_ctabix, __pyx_kp_s_iterate_over_infile_Permits_the); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
 
-  /* "pysam/ctabix.pyx":882
+  /* "pysam/ctabix.pyx":911
  *     Permits the use of file-like objects for example from the gzip module.
  *     '''
  *     def __init__(self, infile, parser ):             # <<<<<<<<<<<<<<
  * 
  *         self.infile = infile
  */
-  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_22tabix_generic_iterator_1__init__, 0, __pyx_n_s_71, NULL, __pyx_n_s_66, ((PyObject *)__pyx_k_codeobj_70)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_22tabix_generic_iterator_1__init__, 0, __pyx_n_s_tabix_generic_iterator___init, NULL, __pyx_n_s_pysam_ctabix, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/ctabix.pyx":888
+  /* "pysam/ctabix.pyx":918
  *         self.parser = parser
  * 
  *     def __iter__(self):             # <<<<<<<<<<<<<<
  *         return self
  * 
  */
-  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_22tabix_generic_iterator_3__iter__, 0, __pyx_n_s_74, NULL, __pyx_n_s_66, ((PyObject *)__pyx_k_codeobj_73)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_22tabix_generic_iterator_3__iter__, 0, __pyx_n_s_tabix_generic_iterator___iter, NULL, __pyx_n_s_pysam_ctabix, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____iter__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_iter, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/ctabix.pyx":892
+  /* "pysam/ctabix.pyx":922
  * 
  *     # cython version - required for python 3
  *     def __next__(self):             # <<<<<<<<<<<<<<
  * 
- *         cdef char * b, * cpy
+ *         cdef char * b
  */
-  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_22tabix_generic_iterator_5__next__, 0, __pyx_n_s_77, NULL, __pyx_n_s_66, ((PyObject *)__pyx_k_codeobj_76)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_22tabix_generic_iterator_5__next__, 0, __pyx_n_s_tabix_generic_iterator___next, NULL, __pyx_n_s_pysam_ctabix, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____next__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/ctabix.pyx":931
+  /* "pysam/ctabix.pyx":962
  * 
  *     # python version - required for python 2.7
  *     def next(self):             # <<<<<<<<<<<<<<
  *         return self.__next__()
  * 
  */
-  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_22tabix_generic_iterator_7next, 0, __pyx_n_s_80, NULL, __pyx_n_s_66, ((PyObject *)__pyx_k_codeobj_79)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_22tabix_generic_iterator_7next, 0, __pyx_n_s_tabix_generic_iterator_next, NULL, __pyx_n_s_pysam_ctabix, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__next, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/ctabix.pyx":877
- *         return self.__cnext__()
+  /* "pysam/ctabix.pyx":906
+ * 
  * 
  * class tabix_generic_iterator:             # <<<<<<<<<<<<<<
  *     '''iterate over ``infile``.
  * 
  */
-  if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_81)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s_58, __pyx_n_s_58, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_tabix_generic_iterator, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_58, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_generic_iterator, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":934
+  /* "pysam/ctabix.pyx":965
  *         return self.__next__()
  * 
  * def tabix_iterator( infile, parser ):             # <<<<<<<<<<<<<<
  *     """return an iterator over all entries in a file."""
  *     if PYTHON3:
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_5tabix_iterator, NULL, __pyx_n_s_66); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_6ctabix_5tabix_iterator, NULL, __pyx_n_s_pysam_ctabix); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tabix_iterator, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_iterator, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/ctabix.pyx":954
+  /* "pysam/ctabix.pyx":985
  * #            return tabix_generic_iterator( infile, parser )
  * 
- * __all__ = ["tabix_index",             # <<<<<<<<<<<<<<
- *            "tabix_compress",
- *            "Tabixfile",
+ * __all__ = [             # <<<<<<<<<<<<<<
+ *     "tabix_index",
+ *     "tabix_compress",
  */
-  __pyx_t_1 = PyList_New(10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__tabix_index));
-  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__tabix_index));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tabix_index));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__tabix_compress));
-  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__tabix_compress));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tabix_compress));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Tabixfile));
-  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__Tabixfile));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Tabixfile));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__asTuple));
-  PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__asTuple));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__asTuple));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__asGTF));
-  PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_s__asGTF));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__asGTF));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__asVCF));
-  PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_s__asVCF));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__asVCF));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__asBed));
-  PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_s__asBed));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__asBed));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__tabix_iterator));
-  PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_s__tabix_iterator));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tabix_iterator));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s_58));
-  PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_s_58));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s_58));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__tabix_file_iterator));
-  PyList_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_n_s__tabix_file_iterator));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tabix_file_iterator));
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_INCREF(__pyx_n_s_tabix_index);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tabix_index);
+  __Pyx_GIVEREF(__pyx_n_s_tabix_index);
+  __Pyx_INCREF(__pyx_n_s_tabix_compress);
+  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_tabix_compress);
+  __Pyx_GIVEREF(__pyx_n_s_tabix_compress);
+  __Pyx_INCREF(__pyx_n_s_Tabixfile);
+  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_Tabixfile);
+  __Pyx_GIVEREF(__pyx_n_s_Tabixfile);
+  __Pyx_INCREF(__pyx_n_s_asTuple);
+  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_asTuple);
+  __Pyx_GIVEREF(__pyx_n_s_asTuple);
+  __Pyx_INCREF(__pyx_n_s_asGTF);
+  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_asGTF);
+  __Pyx_GIVEREF(__pyx_n_s_asGTF);
+  __Pyx_INCREF(__pyx_n_s_asVCF);
+  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_asVCF);
+  __Pyx_GIVEREF(__pyx_n_s_asVCF);
+  __Pyx_INCREF(__pyx_n_s_asBed);
+  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_asBed);
+  __Pyx_GIVEREF(__pyx_n_s_asBed);
+  __Pyx_INCREF(__pyx_n_s_GZIterator);
+  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_GZIterator);
+  __Pyx_GIVEREF(__pyx_n_s_GZIterator);
+  __Pyx_INCREF(__pyx_n_s_GZIteratorHead);
+  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_GZIteratorHead);
+  __Pyx_GIVEREF(__pyx_n_s_GZIteratorHead);
+  __Pyx_INCREF(__pyx_n_s_tabix_iterator);
+  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_s_tabix_iterator);
+  __Pyx_GIVEREF(__pyx_n_s_tabix_iterator);
+  __Pyx_INCREF(__pyx_n_s_tabix_generic_iterator);
+  PyList_SET_ITEM(__pyx_t_1, 10, __pyx_n_s_tabix_generic_iterator);
+  __Pyx_GIVEREF(__pyx_n_s_tabix_generic_iterator);
+  __Pyx_INCREF(__pyx_n_s_tabix_file_iterator);
+  PyList_SET_ITEM(__pyx_t_1, 11, __pyx_n_s_tabix_file_iterator);
+  __Pyx_GIVEREF(__pyx_n_s_tabix_file_iterator);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   /* "pysam/ctabix.pyx":1
  * # cython: embedsignature=True             # <<<<<<<<<<<<<<
  * # adds doc-strings for sphinx
- * 
+ * import os
  */
   __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));
-  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;
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __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;
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
@@ -11764,46 +11942,41 @@ end:
 }
 #endif /* CYTHON_REFNANNY */
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
-    PyObject *result;
-    result = PyObject_GetAttr(dict, name);
-    if (!result) {
-        if (dict != __pyx_b) {
-            PyErr_Clear();
-            result = PyObject_GetAttr(__pyx_b, name);
-        }
-        if (!result) {
-            PyErr_SetObject(PyExc_NameError, name);
-        }
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
     }
     return result;
 }
 
-static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
-         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
-         const char* encoding, const char* errors,
-         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
-    Py_ssize_t length;
-    if (unlikely((start < 0) | (stop < 0))) {
-        length = strlen(cstring);
-        if (start < 0) {
-            start += length;
-            if (start < 0)
-                start = 0;
-        }
-        if (stop < 0)
-            stop += length;
-    }
-    length = stop - start;
-    if (unlikely(length <= 0))
-        return PyUnicode_FromUnicode(NULL, 0);
-    cstring += start;
-    if (decode_func) {
-        return decode_func(cstring, length, errors);
-    } else {
-        return PyUnicode_Decode(cstring, length, encoding, errors);
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+#endif
+    result = (*call)(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    Py_LeaveRecursiveCall();
+#endif
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
     }
+    return result;
 }
+#endif
 
 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 #if CYTHON_COMPILING_IN_CPYTHON
@@ -11874,24 +12047,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
         }
         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);
+        if (PyInstance_Check(type)) {
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
             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;
-            }
+        } 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);
@@ -11923,46 +12095,62 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
         value = type;
         type = (PyObject*) Py_TYPE(value);
     } else if (PyExceptionClass_Check(type)) {
-        PyObject *args;
-        if (!value)
-            args = PyTuple_New(0);
-        else if (PyTuple_Check(value)) {
-            Py_INCREF(value);
-            args = value;
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
         }
-        else
-            args = PyTuple_Pack(1, value);
-        if (!args)
-            goto bad;
-        owned_instance = PyEval_CallObject(type, args);
-        Py_DECREF(args);
-        if (!owned_instance)
-            goto bad;
-        value = owned_instance;
-        if (!PyExceptionInstance_Check(value)) {
-            PyErr_Format(PyExc_TypeError,
-                         "calling %R should have returned an instance of "
-                         "BaseException, not %R",
-                         type, Py_TYPE(value));
-            goto bad;
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
         }
     } else {
         PyErr_SetString(PyExc_TypeError,
             "raise: exception class must be a subclass of BaseException");
         goto bad;
     }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
     if (cause && cause != Py_None) {
+#endif
         PyObject *fixed_cause;
-        if (PyExceptionClass_Check(cause)) {
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
             fixed_cause = PyObject_CallObject(cause, NULL);
             if (fixed_cause == NULL)
                 goto bad;
-        }
-        else if (PyExceptionInstance_Check(cause)) {
+        } else if (PyExceptionInstance_Check(cause)) {
             fixed_cause = cause;
             Py_INCREF(fixed_cause);
-        }
-        else {
+        } else {
             PyErr_SetString(PyExc_TypeError,
                             "exception causes must derive from "
                             "BaseException");
@@ -11984,7 +12172,58 @@ bad:
     Py_XDECREF(owned_instance);
     return;
 }
-#endif
+#endif
+
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
+    Py_ssize_t length;
+    if (unlikely((start < 0) | (stop < 0))) {
+        length = strlen(cstring);
+        if (start < 0) {
+            start += length;
+            if (start < 0)
+                start = 0;
+        }
+        if (stop < 0)
+            stop += length;
+    }
+    length = stop - start;
+    if (unlikely(length <= 0))
+        return PyUnicode_FromUnicode(NULL, 0);
+    cstring += start;
+    if (decode_func) {
+        return decode_func(cstring, length, errors);
+    } else {
+        return PyUnicode_Decode(cstring, length, encoding, errors);
+    }
+}
+
+static void __Pyx_RaiseArgtupleInvalid(
+    const char* func_name,
+    int exact,
+    Py_ssize_t num_min,
+    Py_ssize_t num_max,
+    Py_ssize_t num_found)
+{
+    Py_ssize_t num_expected;
+    const char *more_or_less;
+    if (num_found < num_min) {
+        num_expected = num_min;
+        more_or_less = "at least";
+    } else {
+        num_expected = num_max;
+        more_or_less = "at most";
+    }
+    if (exact) {
+        more_or_less = "exactly";
+    }
+    PyErr_Format(PyExc_TypeError,
+                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 func_name, more_or_less, num_expected,
+                 (num_expected == 1) ? "" : "s", num_found);
+}
 
 static void __Pyx_RaiseDoubleKeywordsError(
     const char* func_name,
@@ -12085,12 +12324,12 @@ arg_passed_twice:
     goto bad;
 invalid_keyword_type:
     PyErr_Format(PyExc_TypeError,
-        "%s() keywords must be strings", function_name);
+        "%.200s() keywords must be strings", function_name);
     goto bad;
 invalid_keyword:
     PyErr_Format(PyExc_TypeError,
     #if PY_MAJOR_VERSION < 3
-        "%s() got an unexpected keyword argument '%s'",
+        "%.200s() got an unexpected keyword argument '%.200s'",
         function_name, PyString_AsString(key));
     #else
         "%s() got an unexpected keyword argument '%U'",
@@ -12100,34 +12339,9 @@ bad:
     return -1;
 }
 
-static void __Pyx_RaiseArgtupleInvalid(
-    const char* func_name,
-    int exact,
-    Py_ssize_t num_min,
-    Py_ssize_t num_max,
-    Py_ssize_t num_found)
-{
-    Py_ssize_t num_expected;
-    const char *more_or_less;
-    if (num_found < num_min) {
-        num_expected = num_min;
-        more_or_less = "at least";
-    } else {
-        num_expected = num_max;
-        more_or_less = "at most";
-    }
-    if (exact) {
-        more_or_less = "exactly";
-    }
-    PyErr_Format(PyExc_TypeError,
-                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
-                 func_name, more_or_less, num_expected,
-                 (num_expected == 1) ? "" : "s", num_found);
-}
-
 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
     if (unlikely(!type)) {
-        PyErr_Format(PyExc_SystemError, "Missing type object");
+        PyErr_SetString(PyExc_SystemError, "Missing type object");
         return 0;
     }
     if (likely(PyObject_TypeCheck(obj, type)))
@@ -12137,82 +12351,280 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
     return 0;
 }
 
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
-    PyErr_Format(PyExc_ValueError,
-                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+    if (s1 == s2) {
+        return (equals == Py_EQ);
+    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
+        const char *ps1, *ps2;
+        Py_ssize_t length = PyBytes_GET_SIZE(s1);
+        if (length != PyBytes_GET_SIZE(s2))
+            return (equals == Py_NE);
+        ps1 = PyBytes_AS_STRING(s1);
+        ps2 = PyBytes_AS_STRING(s2);
+        if (ps1[0] != ps2[0]) {
+            return (equals == Py_NE);
+        } else if (length == 1) {
+            return (equals == Py_EQ);
+        } else {
+            int result = memcmp(ps1, ps2, (size_t)length);
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
+        return (equals == Py_NE);
+    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
+        return (equals == Py_NE);
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+#endif
 }
 
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
-    PyErr_Format(PyExc_ValueError,
-                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
-                 index, (index == 1) ? "" : "s");
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+#if PY_MAJOR_VERSION < 3
+    PyObject* owned_ref = NULL;
+#endif
+    int s1_is_unicode, s2_is_unicode;
+    if (s1 == s2) {
+        goto return_eq;
+    }
+    s1_is_unicode = PyUnicode_CheckExact(s1);
+    s2_is_unicode = PyUnicode_CheckExact(s2);
+#if PY_MAJOR_VERSION < 3
+    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
+        owned_ref = PyUnicode_FromObject(s2);
+        if (unlikely(!owned_ref))
+            return -1;
+        s2 = owned_ref;
+        s2_is_unicode = 1;
+    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
+        owned_ref = PyUnicode_FromObject(s1);
+        if (unlikely(!owned_ref))
+            return -1;
+        s1 = owned_ref;
+        s1_is_unicode = 1;
+    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
+        return __Pyx_PyBytes_Equals(s1, s2, equals);
+    }
+#endif
+    if (s1_is_unicode & s2_is_unicode) {
+        Py_ssize_t length;
+        int kind;
+        void *data1, *data2;
+        #if CYTHON_PEP393_ENABLED
+        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
+            return -1;
+        #endif
+        length = __Pyx_PyUnicode_GET_LENGTH(s1);
+        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
+            goto return_ne;
+        }
+        kind = __Pyx_PyUnicode_KIND(s1);
+        if (kind != __Pyx_PyUnicode_KIND(s2)) {
+            goto return_ne;
+        }
+        data1 = __Pyx_PyUnicode_DATA(s1);
+        data2 = __Pyx_PyUnicode_DATA(s2);
+        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
+            goto return_ne;
+        } else if (length == 1) {
+            goto return_eq;
+        } else {
+            int result = memcmp(data1, data2, length * kind);
+            #if PY_MAJOR_VERSION < 3
+            Py_XDECREF(owned_ref);
+            #endif
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & s2_is_unicode) {
+        goto return_ne;
+    } else if ((s2 == Py_None) & s1_is_unicode) {
+        goto return_ne;
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+return_eq:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_EQ);
+return_ne:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_NE);
+#endif
 }
 
-static CYTHON_INLINE int __Pyx_IterFinish(void) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
 #if CYTHON_COMPILING_IN_CPYTHON
-    PyThreadState *tstate = PyThreadState_GET();
-    PyObject* exc_type = tstate->curexc_type;
-    if (unlikely(exc_type)) {
-        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
-            PyObject *exc_value, *exc_tb;
-            exc_value = tstate->curexc_value;
-            exc_tb = tstate->curexc_traceback;
-            tstate->curexc_type = 0;
-            tstate->curexc_value = 0;
-            tstate->curexc_traceback = 0;
-            Py_DECREF(exc_type);
-            Py_XDECREF(exc_value);
-            Py_XDECREF(exc_tb);
-            return 0;
-        } else {
-            return -1;
-        }
+    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        PyObject *r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
     }
-    return 0;
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
 #else
-    if (unlikely(PyErr_Occurred())) {
-        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
-            PyErr_Clear();
-            return 0;
-        } else {
-            return -1;
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        PyObject *r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+            PyObject *r = PyList_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
         }
     }
-    return 0;
+    else if (PyTuple_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return NULL;
+                }
+            }
+            return m->sq_item(o, i);
+        }
+    }
+#else
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
+    }
 #endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
 }
 
-static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
-    if (unlikely(retval)) {
-        Py_DECREF(retval);
-        __Pyx_RaiseTooManyValuesError(expected);
-        return -1;
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (result) {
+        Py_INCREF(result);
     } else {
-        return __Pyx_IterFinish();
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
     }
-    return 0;
+    return result;
 }
 
-static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
+    PyErr_Format(PyExc_TypeError,
+        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
+        name, type->tp_name, Py_TYPE(obj)->tp_name);
+}
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
     const char *name, int exact)
 {
-    if (!type) {
-        PyErr_Format(PyExc_SystemError, "Missing type object");
+    if (unlikely(!type)) {
+        PyErr_SetString(PyExc_SystemError, "Missing type object");
         return 0;
     }
     if (none_allowed && obj == Py_None) return 1;
     else if (exact) {
-        if (Py_TYPE(obj) == type) return 1;
+        if (likely(Py_TYPE(obj) == type)) return 1;
+        #if PY_MAJOR_VERSION == 2
+        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
+        #endif
     }
     else {
-        if (PyObject_TypeCheck(obj, type)) return 1;
+        if (likely(PyObject_TypeCheck(obj, type))) return 1;
     }
-    PyErr_Format(PyExc_TypeError,
-        "Argument '%s' has incorrect type (expected %s, got %s)",
-        name, type->tp_name, Py_TYPE(obj)->tp_name);
+    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
     return 0;
 }
 
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->exc_type;
+    *value = tstate->exc_value;
+    *tb = tstate->exc_traceback;
+    Py_XINCREF(*type);
+    Py_XINCREF(*value);
+    Py_XINCREF(*tb);
+#else
+    PyErr_GetExcInfo(type, value, tb);
+#endif
+}
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = type;
+    tstate->exc_value = value;
+    tstate->exc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(type, value, tb);
+#endif
+}
+
 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
     PyObject *local_type, *local_value, *local_tb;
 #if CYTHON_COMPILING_IN_CPYTHON
@@ -12235,12 +12647,14 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
 #endif
         goto bad;
     #if PY_MAJOR_VERSION >= 3
-    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
-        goto bad;
+    if (local_tb) {
+        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+            goto bad;
+    }
     #endif
-    Py_INCREF(local_type);
-    Py_INCREF(local_value);
-    Py_INCREF(local_tb);
+    Py_XINCREF(local_tb);
+    Py_XINCREF(local_type);
+    Py_XINCREF(local_value);
     *type = local_type;
     *value = local_value;
     *tb = local_tb;
@@ -12251,8 +12665,6 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
     tstate->exc_type = local_type;
     tstate->exc_value = local_value;
     tstate->exc_traceback = local_tb;
-    /* Make sure tstate is in a consistent state when we XDECREF
-       these objects (DECREF may run arbitrary code). */
     Py_XDECREF(tmp_type);
     Py_XDECREF(tmp_value);
     Py_XDECREF(tmp_tb);
@@ -12270,161 +12682,147 @@ bad:
     return -1;
 }
 
-static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    PyThreadState *tstate = PyThreadState_GET();
-    *type = tstate->exc_type;
-    *value = tstate->exc_value;
-    *tb = tstate->exc_traceback;
-    Py_XINCREF(*type);
-    Py_XINCREF(*value);
-    Py_XINCREF(*tb);
-#else
-    PyErr_GetExcInfo(type, value, tb);
+#if !CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
+    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL)
+}
 #endif
+
+static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
+    if (PY_MAJOR_VERSION >= 3)
+        return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, __pyx_n_s_keys, d);
+    else
+        return PyDict_Keys(d);
 }
-static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+    PyErr_Format(PyExc_ValueError,
+                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+    PyErr_Format(PyExc_ValueError,
+                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+                 index, (index == 1) ? "" : "s");
+}
+
+static CYTHON_INLINE int __Pyx_IterFinish(void) {
 #if CYTHON_COMPILING_IN_CPYTHON
-    PyObject *tmp_type, *tmp_value, *tmp_tb;
     PyThreadState *tstate = PyThreadState_GET();
-    tmp_type = tstate->exc_type;
-    tmp_value = tstate->exc_value;
-    tmp_tb = tstate->exc_traceback;
-    tstate->exc_type = type;
-    tstate->exc_value = value;
-    tstate->exc_traceback = tb;
-    Py_XDECREF(tmp_type);
-    Py_XDECREF(tmp_value);
-    Py_XDECREF(tmp_tb);
+    PyObject* exc_type = tstate->curexc_type;
+    if (unlikely(exc_type)) {
+        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
+            PyObject *exc_value, *exc_tb;
+            exc_value = tstate->curexc_value;
+            exc_tb = tstate->curexc_traceback;
+            tstate->curexc_type = 0;
+            tstate->curexc_value = 0;
+            tstate->curexc_traceback = 0;
+            Py_DECREF(exc_type);
+            Py_XDECREF(exc_value);
+            Py_XDECREF(exc_tb);
+            return 0;
+        } else {
+            return -1;
+        }
+    }
+    return 0;
 #else
-    PyErr_SetExcInfo(type, value, tb);
+    if (unlikely(PyErr_Occurred())) {
+        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+            PyErr_Clear();
+            return 0;
+        } else {
+            return -1;
+        }
+    }
+    return 0;
 #endif
 }
 
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
-    PyObject *empty_list = 0;
-    PyObject *module = 0;
-    PyObject *global_dict = 0;
-    PyObject *empty_dict = 0;
-    PyObject *list;
-    #if PY_VERSION_HEX < 0x03030000
-    PyObject *py_import = 0;
-    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
-    if (!py_import)
-        goto bad;
-    #endif
-    if (from_list)
-        list = from_list;
-    else {
-        empty_list = PyList_New(0);
-        if (!empty_list)
-            goto bad;
-        list = empty_list;
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+    if (unlikely(retval)) {
+        Py_DECREF(retval);
+        __Pyx_RaiseTooManyValuesError(expected);
+        return -1;
+    } else {
+        return __Pyx_IterFinish();
     }
-    global_dict = PyModule_GetDict(__pyx_m);
-    if (!global_dict)
-        goto bad;
-    empty_dict = PyDict_New();
-    if (!empty_dict)
+    return 0;
+}
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    PyObject *ob = PyCapsule_New(vtable, 0, 0);
+#else
+    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+#endif
+    if (!ob)
         goto bad;
-    #if PY_VERSION_HEX >= 0x02050000
-    {
-        #if PY_MAJOR_VERSION >= 3
-        if (level == -1) {
-            if (strchr(__Pyx_MODULE_NAME, '.')) {
-                #if PY_VERSION_HEX < 0x03030000
-                PyObject *py_level = PyInt_FromLong(1);
-                if (!py_level)
-                    goto bad;
-                module = PyObject_CallFunctionObjArgs(py_import,
-                    name, global_dict, empty_dict, list, py_level, NULL);
-                Py_DECREF(py_level);
-                #else
-                module = PyImport_ImportModuleLevelObject(
-                    name, global_dict, empty_dict, list, 1);
-                #endif
-                if (!module) {
-                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
-                        goto bad;
-                    PyErr_Clear();
-                }
-            }
-            level = 0; /* try absolute import on failure */
-        }
-        #endif
-        if (!module) {
-            #if PY_VERSION_HEX < 0x03030000
-            PyObject *py_level = PyInt_FromLong(level);
-            if (!py_level)
-                goto bad;
-            module = PyObject_CallFunctionObjArgs(py_import,
-                name, global_dict, empty_dict, list, py_level, NULL);
-            Py_DECREF(py_level);
-            #else
-            module = PyImport_ImportModuleLevelObject(
-                name, global_dict, empty_dict, list, level);
-            #endif
-        }
-    }
-    #else
-    if (level>0) {
-        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
+    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
         goto bad;
-    }
-    module = PyObject_CallFunctionObjArgs(py_import,
-        name, global_dict, empty_dict, list, NULL);
-    #endif
+    Py_DECREF(ob);
+    return 0;
 bad:
-    #if PY_VERSION_HEX < 0x03030000
-    Py_XDECREF(py_import);
-    #endif
-    Py_XDECREF(empty_list);
-    Py_XDECREF(empty_dict);
-    return module;
+    Py_XDECREF(ob);
+    return -1;
 }
 
-static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
-    PyObject *metaclass;
-#if PY_MAJOR_VERSION < 3
-    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
-        PyObject *base = PyTuple_GET_ITEM(bases, 0);
-        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
-        if (!metaclass) {
-            PyErr_Clear();
-            metaclass = (PyObject*) Py_TYPE(base);
-        }
-    } else {
-        metaclass = (PyObject *) &PyClass_Type;
-    }
+static void* __Pyx_GetVtable(PyObject *dict) {
+    void* ptr;
+    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
+    if (!ob)
+        goto bad;
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    ptr = PyCapsule_GetPointer(ob, 0);
 #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;
-    }
+    ptr = PyCObject_AsVoidPtr(ob);
 #endif
-    Py_INCREF(metaclass);
-    return metaclass;
+    if (!ptr && !PyErr_Occurred())
+        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
+    Py_DECREF(ob);
+    return ptr;
+bad:
+    Py_XDECREF(ob);
+    return NULL;
 }
 
-static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
-                                   PyObject *qualname, PyObject *modname) {
-    PyObject *result;
-    PyObject *metaclass;
-    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
-        return NULL;
-    if (PyDict_SetItemString(dict, "__qualname__", qualname) < 0)
-        return NULL;
-    metaclass = PyDict_GetItemString(dict, "__metaclass__");
-    if (metaclass) {
-        Py_INCREF(metaclass);
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+    PyObject* fake_module;
+    PyTypeObject* cached_type = NULL;
+    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+    if (!fake_module) return NULL;
+    Py_INCREF(fake_module);
+    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+    if (cached_type) {
+        if (!PyType_Check((PyObject*)cached_type)) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s is not a type object",
+                type->tp_name);
+            goto bad;
+        }
+        if (cached_type->tp_basicsize != type->tp_basicsize) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s has the wrong size, try recompiling",
+                type->tp_name);
+            goto bad;
+        }
     } else {
-        metaclass = __Pyx_FindPy2Metaclass(bases);
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+        PyErr_Clear();
+        if (PyType_Ready(type) < 0) goto bad;
+        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+            goto bad;
+        Py_INCREF(type);
+        cached_type = type;
     }
-    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
-    Py_DECREF(metaclass);
-    return result;
+done:
+    Py_DECREF(fake_module);
+    return cached_type;
+bad:
+    Py_XDECREF(cached_type);
+    cached_type = NULL;
+    goto done;
 }
 
 static PyObject *
@@ -12559,11 +12957,10 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
     return 0;
 }
 static PyObject *
-__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
 {
-    PyObject* dict = PyModule_GetDict(__pyx_m);
-    Py_XINCREF(dict);
-    return dict;
+    Py_INCREF(op->func_globals);
+    return op->func_globals;
 }
 static PyObject *
 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
@@ -12578,23 +12975,104 @@ __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
     Py_INCREF(result);
     return result;
 }
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+    PyObject *res = op->defaults_getter((PyObject *) op);
+    if (unlikely(!res))
+        return -1;
+    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+    Py_INCREF(op->defaults_tuple);
+    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+    Py_INCREF(op->defaults_kwdict);
+    Py_DECREF(res);
+    return 0;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyTuple_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__defaults__ must be set to a tuple object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_tuple;
+    op->defaults_tuple = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
 static PyObject *
-__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
-{
-    if (op->defaults_tuple) {
-        Py_INCREF(op->defaults_tuple);
-        return op->defaults_tuple;
-    }
-    if (op->defaults_getter) {
-        PyObject *res = op->defaults_getter((PyObject *) op);
-        if (likely(res)) {
-            Py_INCREF(res);
-            op->defaults_tuple = res;
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_tuple;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_tuple;
+        } else {
+            result = Py_None;
         }
-        return res;
     }
-    Py_INCREF(Py_None);
-    return Py_None;
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__kwdefaults__ must be set to a dict object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_kwdict;
+    op->defaults_kwdict = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_kwdict;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_kwdict;
+        } else {
+            result = Py_None;
+        }
+    }
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value || value == Py_None) {
+        value = NULL;
+    } else if (!PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__annotations__ must be set to a dict object");
+        return -1;
+    }
+    Py_XINCREF(value);
+    tmp = op->func_annotations;
+    op->func_annotations = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->func_annotations;
+    if (unlikely(!result)) {
+        result = PyDict_New();
+        if (unlikely(!result)) return NULL;
+        op->func_annotations = result;
+    }
+    Py_INCREF(result);
+    return result;
 }
 static PyGetSetDef __pyx_CyFunction_getsets[] = {
     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
@@ -12611,8 +13089,10 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = {
     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
-    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
-    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
+    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
     {0, 0, 0, 0, 0}
 };
 #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
@@ -12636,7 +13116,7 @@ static PyMethodDef __pyx_CyFunction_methods[] = {
     {0, 0, 0, 0}
 };
 static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
-                                      PyObject *closure, PyObject *module, PyObject* code) {
+                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
     __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
     if (op == NULL)
         return NULL;
@@ -12654,12 +13134,16 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f
     op->func_qualname = qualname;
     op->func_doc = NULL;
     op->func_classobj = NULL;
+    op->func_globals = globals;
+    Py_INCREF(op->func_globals);
     Py_XINCREF(code);
     op->func_code = code;
     op->defaults_pyobjects = 0;
     op->defaults = NULL;
     op->defaults_tuple = NULL;
+    op->defaults_kwdict = NULL;
     op->defaults_getter = NULL;
+    op->func_annotations = NULL;
     PyObject_GC_Track(op);
     return (PyObject *) op;
 }
@@ -12672,9 +13156,12 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
     Py_CLEAR(m->func_name);
     Py_CLEAR(m->func_qualname);
     Py_CLEAR(m->func_doc);
+    Py_CLEAR(m->func_globals);
     Py_CLEAR(m->func_code);
     Py_CLEAR(m->func_classobj);
     Py_CLEAR(m->defaults_tuple);
+    Py_CLEAR(m->defaults_kwdict);
+    Py_CLEAR(m->func_annotations);
     if (m->defaults) {
         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
         int i;
@@ -12701,9 +13188,11 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit,
     Py_VISIT(m->func_name);
     Py_VISIT(m->func_qualname);
     Py_VISIT(m->func_doc);
+    Py_VISIT(m->func_globals);
     Py_VISIT(m->func_code);
     Py_VISIT(m->func_classobj);
     Py_VISIT(m->defaults_tuple);
+    Py_VISIT(m->defaults_kwdict);
     if (m->defaults) {
         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
         int i;
@@ -12844,14 +13333,18 @@ static PyTypeObject __pyx_CyFunctionType_type = {
 #if PY_VERSION_HEX >= 0x02060000
     0,                                  /*tp_version_tag*/
 #endif
+#if PY_VERSION_HEX >= 0x030400a1
+    0,                                  /*tp_finalize*/
+#endif
 };
 static int __Pyx_CyFunction_init(void) {
 #if !CYTHON_COMPILING_IN_PYPY
     __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
 #endif
-    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
+    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+    if (__pyx_CyFunctionType == NULL) {
         return -1;
-    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
+    }
     return 0;
 }
 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
@@ -12859,7 +13352,7 @@ static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t
     m->defaults = PyMem_Malloc(size);
     if (!m->defaults)
         return PyErr_NoMemory();
-    memset(m->defaults, 0, sizeof(size));
+    memset(m->defaults, 0, size);
     m->defaults_pyobjects = pyobjects;
     return m->defaults;
 }
@@ -12868,459 +13361,566 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyOb
     m->defaults_tuple = tuple;
     Py_INCREF(tuple);
 }
-
-static CYTHON_INLINE int32_t __Pyx_PyInt_from_py_int32_t(PyObject* x) {
-    const int32_t neg_one = (int32_t)-1, const_zero = (int32_t)0;
-    const int is_unsigned = const_zero < neg_one;
-    if (sizeof(int32_t) == sizeof(char)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedChar(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedChar(x);
-    } else if (sizeof(int32_t) == sizeof(short)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedShort(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedShort(x);
-    } else if (sizeof(int32_t) == sizeof(int)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedInt(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedInt(x);
-    } else if (sizeof(int32_t) == sizeof(long)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedLong(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedLong(x);
-    } else if (sizeof(int32_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return (int32_t)__Pyx_PyInt_AsUnsignedLongLong(x);
-        else
-            return (int32_t)__Pyx_PyInt_AsSignedLongLong(x);
-    }  else {
-        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
-        PyErr_SetString(PyExc_RuntimeError,
-                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-        #else
-        int32_t val;
-        PyObject *v = __Pyx_PyNumber_Int(x);
-        #if PY_VERSION_HEX < 0x03000000
-        if (likely(v) && !PyLong_Check(v)) {
-            PyObject *tmp = v;
-            v = PyNumber_Long(tmp);
-            Py_DECREF(tmp);
-        }
-        #endif
-        if (likely(v)) {
-            int one = 1; int is_little = (int)*(unsigned char *)&one;
-            unsigned char *bytes = (unsigned char *)&val;
-            int ret = _PyLong_AsByteArray((PyLongObject *)v,
-                                          bytes, sizeof(val),
-                                          is_little, !is_unsigned);
-            Py_DECREF(v);
-            if (likely(!ret))
-                return val;
-        }
-        #endif
-        return (int32_t)-1;
-    }
-}
-
-static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
-    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned char" :
-                    "value too large to convert to unsigned char");
-            }
-            return (unsigned char)-1;
-        }
-        return (unsigned char)val;
-    }
-    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
-}
-
-static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
-    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned short" :
-                    "value too large to convert to unsigned short");
-            }
-            return (unsigned short)-1;
-        }
-        return (unsigned short)val;
-    }
-    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
-}
-
-static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
-    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned int" :
-                    "value too large to convert to unsigned int");
-            }
-            return (unsigned int)-1;
-        }
-        return (unsigned int)val;
-    }
-    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults_kwdict = dict;
+    Py_INCREF(dict);
 }
-
-static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
-    const char neg_one = (char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to char" :
-                    "value too large to convert to char");
-            }
-            return (char)-1;
-        }
-        return (char)val;
-    }
-    return (char)__Pyx_PyInt_AsLong(x);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->func_annotations = dict;
+    Py_INCREF(dict);
 }
 
-static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
-    const short neg_one = (short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to short" :
-                    "value too large to convert to short");
-            }
-            return (short)-1;
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+    for (i=0; i < nbases; i++) {
+        PyTypeObject *tmptype;
+        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+        tmptype = Py_TYPE(tmp);
+#if PY_MAJOR_VERSION < 3
+        if (tmptype == &PyClass_Type)
+            continue;
+#endif
+        if (!metaclass) {
+            metaclass = tmptype;
+            continue;
         }
-        return (short)val;
-    }
-    return (short)__Pyx_PyInt_AsLong(x);
-}
-
-static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
-    const int neg_one = (int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to int" :
-                    "value too large to convert to int");
-            }
-            return (int)-1;
+        if (PyType_IsSubtype(metaclass, tmptype))
+            continue;
+        if (PyType_IsSubtype(tmptype, metaclass)) {
+            metaclass = tmptype;
+            continue;
         }
-        return (int)val;
+        PyErr_SetString(PyExc_TypeError,
+                        "metaclass conflict: "
+                        "the metaclass of a derived class "
+                        "must be a (non-strict) subclass "
+                        "of the metaclasses of all its bases");
+        return NULL;
     }
-    return (int)__Pyx_PyInt_AsLong(x);
-}
-
-static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
-    const signed char neg_one = (signed char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed char" :
-                    "value too large to convert to signed char");
-            }
-            return (signed char)-1;
-        }
-        return (signed char)val;
+    if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+        metaclass = &PyClass_Type;
+#else
+        metaclass = &PyType_Type;
+#endif
     }
-    return (signed char)__Pyx_PyInt_AsSignedLong(x);
+    Py_INCREF((PyObject*) metaclass);
+    return (PyObject*) metaclass;
 }
 
-static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
-    const signed short neg_one = (signed short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed short" :
-                    "value too large to convert to signed short");
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+    PyObject *ns;
+    if (metaclass) {
+        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+        if (prep) {
+            PyObject *pargs = PyTuple_Pack(2, name, bases);
+            if (unlikely(!pargs)) {
+                Py_DECREF(prep);
+                return NULL;
             }
-            return (signed short)-1;
+            ns = PyObject_Call(prep, pargs, mkw);
+            Py_DECREF(prep);
+            Py_DECREF(pargs);
+        } else {
+            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+                return NULL;
+            PyErr_Clear();
+            ns = PyDict_New();
         }
-        return (signed short)val;
+    } else {
+        ns = PyDict_New();
     }
-    return (signed short)__Pyx_PyInt_AsSignedLong(x);
+    if (unlikely(!ns))
+        return NULL;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+    return ns;
+bad:
+    Py_DECREF(ns);
+    return NULL;
 }
-
-static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
-    const signed int neg_one = (signed int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed int" :
-                    "value too large to convert to signed int");
-            }
-            return (signed int)-1;
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+                                      PyObject *dict, PyObject *mkw,
+                                      int calculate_metaclass, int allow_py2_metaclass) {
+    PyObject *result, *margs;
+    PyObject *owned_metaclass = NULL;
+    if (allow_py2_metaclass) {
+        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+        if (owned_metaclass) {
+            metaclass = owned_metaclass;
+        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+            PyErr_Clear();
+        } else {
+            return NULL;
         }
-        return (signed int)val;
     }
-    return (signed int)__Pyx_PyInt_AsSignedLong(x);
+    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+        Py_XDECREF(owned_metaclass);
+        if (unlikely(!metaclass))
+            return NULL;
+        owned_metaclass = metaclass;
+    }
+    margs = PyTuple_Pack(3, name, bases, dict);
+    if (unlikely(!margs)) {
+        result = NULL;
+    } else {
+        result = PyObject_Call(metaclass, margs, mkw);
+        Py_DECREF(margs);
+    }
+    Py_XDECREF(owned_metaclass);
+    return result;
 }
 
-static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
-    const int neg_one = (int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to int" :
-                    "value too large to convert to int");
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+    if (!py_import)
+        goto bad;
+    #endif
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    #if PY_VERSION_HEX >= 0x02050000
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                #if PY_VERSION_HEX < 0x03030000
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
             }
-            return (int)-1;
+            level = 0; /* try absolute import on failure */
+        }
+        #endif
+        if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
         }
-        return (int)val;
     }
-    return (int)__Pyx_PyInt_AsLong(x);
+    #else
+    if (level>0) {
+        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
+        goto bad;
+    }
+    module = PyObject_CallFunctionObjArgs(py_import,
+        name, global_dict, empty_dict, list, NULL);
+    #endif
+bad:
+    #if PY_VERSION_HEX < 0x03030000
+    Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
+    Py_XDECREF(empty_dict);
+    return module;
 }
 
-static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
-    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
+    {                                                                     \
+        func_type value = func(x);                                        \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                PyErr_SetString(PyExc_OverflowError,                      \
+                    (is_unsigned && unlikely(value < zero)) ?             \
+                    "can't convert negative value to " #target_type :     \
+                    "value too large to convert to " #target_type);       \
+                return (target_type) -1;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
+    }
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned long");
-            return (unsigned long)-1;
-        }
-        return (unsigned long)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to unsigned long");
-                return (unsigned long)-1;
+                                "can't convert negative value to int");
+                return (int) -1;
             }
-            return (unsigned long)PyLong_AsUnsignedLong(x);
-        } else {
-            return (unsigned long)PyLong_AsLong(x);
-        }
-    } else {
-        unsigned long val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (unsigned long)-1;
-        val = __Pyx_PyInt_AsUnsignedLong(tmp);
-        Py_DECREF(tmp);
-        return val;
-    }
-}
-
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
-    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned PY_LONG_LONG");
-            return (unsigned PY_LONG_LONG)-1;
+            return (int) val;
         }
-        return (unsigned PY_LONG_LONG)val;
     } else
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to unsigned PY_LONG_LONG");
-                return (unsigned PY_LONG_LONG)-1;
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
         } else {
-            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int) -1;
         }
     } else {
-        unsigned PY_LONG_LONG val;
+        int val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (unsigned PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
         Py_DECREF(tmp);
         return val;
     }
 }
 
-static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
-    const long neg_one = (long)-1, const_zero = 0;
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to long");
-            return (long)-1;
-        }
-        return (long)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to long");
-                return (long)-1;
-            }
-            return (long)PyLong_AsUnsignedLong(x);
-        } else {
-            return (long)PyLong_AsLong(x);
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
     } else {
-        long val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (long)-1;
-        val = __Pyx_PyInt_AsLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
     }
 }
 
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
-    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
+    const int32_t neg_one = (int32_t) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to PY_LONG_LONG");
-            return (PY_LONG_LONG)-1;
+        if (sizeof(int32_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to int32_t");
+                return (int32_t) -1;
+            }
+            return (int32_t) val;
         }
-        return (PY_LONG_LONG)val;
     } else
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int32_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int32_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to PY_LONG_LONG");
-                return (PY_LONG_LONG)-1;
+                                "can't convert negative value to int32_t");
+                return (int32_t) -1;
+            }
+            if (sizeof(int32_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int32_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int32_t, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
         } else {
-            return (PY_LONG_LONG)PyLong_AsLongLong(x);
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int32_t)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int32_t) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int32_t) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(int32_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int32_t, long, PyLong_AsLong)
+            } else if (sizeof(int32_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int32_t, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int32_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int32_t) -1;
         }
     } else {
-        PY_LONG_LONG val;
+        int32_t val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsLongLong(tmp);
+        if (!tmp) return (int32_t) -1;
+        val = __Pyx_PyInt_As_int32_t(tmp);
         Py_DECREF(tmp);
         return val;
     }
 }
 
-static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
-    const signed long neg_one = (signed long)-1, const_zero = 0;
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+    const int neg_one = (int) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed long");
-            return (signed long)-1;
-        }
-        return (signed long)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to signed long");
-                return (signed long)-1;
-            }
-            return (signed long)PyLong_AsUnsignedLong(x);
-        } else {
-            return (signed long)PyLong_AsLong(x);
+    if (is_unsigned) {
+        if (sizeof(int) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
     } else {
-        signed long val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (signed long)-1;
-        val = __Pyx_PyInt_AsSignedLong(tmp);
-        Py_DECREF(tmp);
-        return val;
+        if (sizeof(int) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int),
+                                     little, !is_unsigned);
     }
 }
 
-static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
-    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed PY_LONG_LONG");
-            return (signed PY_LONG_LONG)-1;
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            return (long) val;
         }
-        return (signed PY_LONG_LONG)val;
     } else
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to signed PY_LONG_LONG");
-                return (signed PY_LONG_LONG)-1;
+                                "can't convert negative value to long");
+                return (long) -1;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
         } else {
-            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (long) -1;
         }
     } else {
-        signed PY_LONG_LONG val;
+        long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (signed PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsSignedLongLong(tmp);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
         Py_DECREF(tmp);
         return val;
     }
@@ -13345,20 +13945,39 @@ static int __Pyx_check_binary_version(void) {
     return 0;
 }
 
-static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
+    PyObject *d = 0;
+    PyObject *cobj = 0;
+    union {
+        void (*fp)(void);
+        void *p;
+    } tmp;
+    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
+    if (!d) {
+        PyErr_Clear();
+        d = PyDict_New();
+        if (!d)
+            goto bad;
+        Py_INCREF(d);
+        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
+            goto bad;
+    }
+    tmp.fp = f;
 #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
-    PyObject *ob = PyCapsule_New(vtable, 0, 0);
+    cobj = PyCapsule_New(tmp.p, sig, 0);
 #else
-    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
 #endif
-    if (!ob)
+    if (!cobj)
         goto bad;
-    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
+    if (PyDict_SetItemString(d, name, cobj) < 0)
         goto bad;
-    Py_DECREF(ob);
+    Py_DECREF(cobj);
+    Py_DECREF(d);
     return 0;
 bad:
-    Py_XDECREF(ob);
+    Py_XDECREF(cobj);
+    Py_XDECREF(d);
     return -1;
 }
 
@@ -13407,7 +14026,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
         goto bad;
     if (!PyType_Check(result)) {
         PyErr_Format(PyExc_TypeError,
-            "%s.%s is not a type object",
+            "%.200s.%.200s is not a type object",
             module_name, class_name);
         goto bad;
     }
@@ -13435,7 +14054,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
     }
     else if ((size_t)basicsize != size) {
         PyErr_Format(PyExc_ValueError,
-            "%s.%s has the wrong size, try recompiling",
+            "%.200s.%.200s has the wrong size, try recompiling",
             module_name, class_name);
         goto bad;
     }
@@ -13447,25 +14066,6 @@ bad:
 }
 #endif
 
-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)
-    ptr = PyCapsule_GetPointer(ob, 0);
-#else
-    ptr = PyCObject_AsVoidPtr(ob);
-#endif
-    if (!ptr && !PyErr_Occurred())
-        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
-    Py_DECREF(ob);
-    return ptr;
-bad:
-    Py_XDECREF(ob);
-    return NULL;
-}
-
 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
     int start = 0, mid = 0, end = count - 1;
     if (end >= 0 && code_line > entries[end].code_line) {
@@ -13658,6 +14258,73 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
     return 0;
 }
 
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else /* PY_VERSION_HEX < 0x03030000 */
+        if (PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_DATA_SIZE(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+#endif /* PY_VERSION_HEX < 0x03030000 */
+    } else
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+#if !CYTHON_COMPILING_IN_PYPY
+#if PY_VERSION_HEX >= 0x02060000
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
    int is_true = x == Py_True;
    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
@@ -13667,14 +14334,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   PyNumberMethods *m;
   const char *name = NULL;
   PyObject *res = NULL;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (PyInt_Check(x) || PyLong_Check(x))
 #else
   if (PyLong_Check(x))
 #endif
     return Py_INCREF(x), x;
   m = Py_TYPE(x)->tp_as_number;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (m && m->nb_int) {
     name = "int";
     res = PyNumber_Int(x);
@@ -13690,13 +14357,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
 #endif
   if (res) {
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (!PyInt_Check(res) && !PyLong_Check(res)) {
 #else
     if (!PyLong_Check(res)) {
 #endif
       PyErr_Format(PyExc_TypeError,
-                   "__%s__ returned non-%s (type %.200s)",
+                   "__%.4s__ returned non-%.4s (type %.200s)",
                    name, name, Py_TYPE(res)->tp_name);
       Py_DECREF(res);
       return NULL;
@@ -13708,9 +14375,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
   return res;
 }
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   Py_ssize_t ival;
-  PyObject* x = PyNumber_Index(b);
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+  #if PY_VERSION_HEX < 0x02060000
+    return PyInt_AsSsize_t(b);
+  #else
+    return PyLong_AsSsize_t(b);
+  #endif
+  }
+  x = PyNumber_Index(b);
   if (!x) return -1;
   ival = PyInt_AsSsize_t(x);
   Py_DECREF(x);
@@ -13729,17 +14422,6 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
 #endif
 }
-static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
-   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
-   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
-       return (size_t)-1;
-   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
-       PyErr_SetString(PyExc_OverflowError,
-                       "value too large to convert to size_t");
-       return (size_t)-1;
-   }
-   return (size_t)val;
-}
 
 
 #endif /* Py_PYTHON_H */
diff --git a/pysam/ctabix.pxd b/pysam/ctabix.pxd
index 1631f43..2b186d4 100644
--- a/pysam/ctabix.pxd
+++ b/pysam/ctabix.pxd
@@ -1,206 +1,24 @@
+from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
+from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
+from libc.stdlib cimport malloc, calloc, realloc, free
+from libc.string cimport memcpy, memcmp, strncpy, strlen, strdup
+from libc.stdio cimport FILE, printf
 
-cdef extern from "string.h":
-  ctypedef int size_t
-  void *memcpy(void *dst,void *src,size_t len)
-  void *memmove(void *dst,void *src,size_t len)
-  void *memset(void *b,int c,size_t len)
-  char *strtok_r(char *str, char *delim, char **saveptr)
-  char *strncpy(char *dest, char *src, size_t n)
-  void *memchr(void *s, int c, size_t n)
-
-cdef extern from "stdlib.h":
-  void free(void *)
-  void *malloc(size_t)
-  void *calloc(size_t,size_t)
-  void *realloc(void *,size_t)
-  void qsort(void *base, size_t nmemb, size_t size,
-             int (*compar)(void *,void *))
-  int c_abs "abs" (int)
-  int atoi( char *nptr)
-  long atol( char *nptr)
-  double atof( char *nptr)
-
-cdef extern from "stdio.h":
-  ctypedef struct FILE:
-    pass
-  FILE *fopen(char *,char *)
-  FILE *freopen(char *path, char *mode, FILE *stream)
-  int fileno(FILE *stream)
-  int dup2(int oldfd, int newfd)
-  int fflush(FILE *stream)
-
-  FILE * stderr
-  FILE * stdout
-  int fclose(FILE *)
-  int sscanf(char *str,char *fmt,...)
-  int printf(char *str,char *fmt,...)
-  int sprintf(char *str,char *fmt,...)
-  int fprintf(FILE *ifile,char *fmt,...)
-  char *fgets(char *str,int size,FILE *ifile)
-
-cdef extern from "ctype.h":
-  int toupper(int c)
-  int tolower(int c)
-
-cdef extern from "sys/types.h":
-  pass
-
-cdef extern from "sys/stat.h":
-  pass
-
+# Note: this replaces python "open"!
 cdef extern from "fcntl.h":
-  int open(char *pathname, int flags)
-  
-cdef extern from "unistd.h":
-  ctypedef int ssize_t
-  char *ttyname(int fd)
-  int isatty(int fd)  
-  ssize_t read(int fd, void *buf, size_t count)
-
-cdef extern from "string.h":
-  int strcmp(char *s1, char *s2)
-  int strncmp(char *s1,char *s2,size_t len)
-  char *strcpy(char *dest,char *src)
-  char *strncpy(char *dest,char *src, size_t len)
-  char *strdup(char *)
-  char *strcat(char *,char *)
-  size_t strlen(char *s)
-  int memcmp( void * s1, void *s2, size_t len )
-
-cdef extern from "stdint.h":
-  ctypedef int int64_t
-  ctypedef int int32_t
-  ctypedef int uint32_t
-  ctypedef int uint8_t
-  ctypedef int uint64_t
-
-cdef extern from "zlib.h":
-  ctypedef void * gzFile
-  ctypedef int64_t z_off_t
-
-  int gzclose(gzFile fp)
-  int gzread(gzFile fp, void *buf, unsigned int n)
-  char *gzerror(gzFile fp, int *errnum)
-
-  gzFile gzopen( char *path, char *mode)
-  gzFile gzdopen (int fd, char *mode)
-  char * gzgets(gzFile file, char *buf, int len)
-  int gzeof( gzFile file )
-
-cdef extern from "Python.h":
-    ctypedef struct FILE
-    char *fgets(char *str, int size, FILE *ifile)
-    int feof(FILE *stream)
-    size_t strlen(char *s)
-    size_t getline(char **lineptr, size_t *n, FILE *stream)
-    char *strstr(char *, char *)
-    char *strchr(char *string, int c)
-    int fileno(FILE *stream)
-    FILE *fdopen(int fd, char *mode)
-
-cdef extern from "bgzf.h":
-
-  ctypedef struct BGZF:
-    pass
-
-  int64_t bgzf_seek(BGZF* fp, int64_t pos, int where)
-
-  BGZF * bgzf_open(char * path, char * mode)
-
-  int bgzf_write(BGZF * fp, void* data, int length)
-
-  int bgzf_close(BGZF* fp)
-
-# tabix support
-cdef extern from "tabix.h":
-
-  ctypedef struct ti_conf_t:
-    int32_t preset
-    int32_t sc, bc, ec
-    int32_t meta_char, line_skip
-
-  ctypedef struct ti_index_t:
-     pass
-      
-  ctypedef struct tabix_t: 
-    BGZF *fp
-    ti_index_t *idx
-    char *fn
-    char *fnidx
-
-  ctypedef struct ti_iter_t:
-    pass
-
-  tabix_t *ti_open(char *fn, char *fnidx)
-
-  int ti_lazy_index_load(tabix_t *t)
-
-  void ti_close(tabix_t *t)
-
-  ti_iter_t ti_query(tabix_t *t, char *name, int beg, int end)
-  ti_iter_t ti_queryi(tabix_t *t, int tid, int beg, int end)
-  ti_iter_t ti_querys(tabix_t *t, char *reg)
-  char * ti_read(tabix_t *t, ti_iter_t iter, int *len)
-
-  # Get the list of sequence names. Each "char*" pointer points to a
-  #	internal member of the index, so DO NOT modify the returned
-  #	 pointer; otherwise the index will be corrupted. The returned
-  #	pointer should be freed by a single free() call by the routine
-  #	calling this function. The number of sequences is returned at *n
-  char **ti_seqname(ti_index_t *idx, int *n)
-  
-  # Destroy the iterator
-  void ti_iter_destroy(ti_iter_t iter)
-
-  # Build the index for file <fn>. File <fn>.tbi will be generated
-  # and overwrite the file of the same name. Return -1 on failure. */
-  int ti_index_build(char *fn, ti_conf_t *conf)
-
-  #/* Load the index from file <fn>.tbi. If <fn> is a URL and the index
-  #   * file is not in the working directory, <fn>.tbi will be
-  #   * downloaded. Return NULL on failure. */
-  ti_index_t *ti_index_load( char *fn)
-
-  ti_index_t *ti_index_load_local(char *fnidx)
-
-  #/* Destroy the index */
-  void ti_index_destroy(ti_index_t *idx)
-
-  #/* Parse a region like: chr2, chr2:100, chr2:100-200. Return -1 on failure. */
-  int ti_parse_region( ti_index_t *idx,  char *str, int *tid, int *begin, int *end)
-
-  int ti_get_tid( ti_index_t *idx,  char *name)
-
-  #  /* Get the iterator pointing to the first record at the current file
-  #   * position. If the file is just openned, the iterator points to the
-  #   * first record in the file. */
-  ti_iter_t ti_iter_first()
+    int open(char *pathname, int flags)
 
-  #  /* Get the iterator pointing to the first record in region tid:beg-end */
-  ti_iter_t ti_iter_query( ti_index_t *idx, int tid, int beg, int end)
+cdef extern from "unistd.h" nogil:
+    ctypedef int ssize_t
+    ssize_t read(int fd, void *buf, size_t count)
+    int close(int fd)
 
-  #  /* Get the data line pointed by the iterator and iterate to the next record. */
-  # char *ti_iter_read(BGZF *fp, ti_iter_t iter, int *len)
-
-cdef extern from "tabix_util.h":
-
-    ctypedef struct kstring_t:
-        size_t l
-        size_t m
-        char * s
-
-    ctypedef struct kstream_t:
-        pass
-
-    kstream_t * ks_init( gzFile )
-
-    int ks_read( kstream_t * )
-    void ks_destroy( kstream_t * )
-    int ks_getuntil( kstream_t *, int, kstring_t *, int * ) 
+from chtslib cimport hts_idx_t, hts_itr_t, htsFile, \
+    kstream_t, kstring_t, gzFile, tbx_t
 
 cdef class tabix_file_iterator:
     cdef gzFile fh
-    cdef kstream_t * ks
+    cdef kstream_t * kstream
     cdef kstring_t buffer
     cdef size_t size
     cdef Parser parser
@@ -212,8 +30,10 @@ cdef class tabix_file_iterator:
 cdef class Tabixfile:
 
     # pointer to tabixfile
-    cdef tabix_t * tabixfile
-     
+    cdef htsFile * tabixfile
+    # pointer to index structure
+    cdef tbx_t * index
+
     # flag indicating whether file is remote
     cdef int isremote
 
@@ -221,31 +41,41 @@ cdef class Tabixfile:
 
     cdef Parser parser
     
-cdef class TabixIterator:
-    cdef ti_iter_t iterator
-    cdef tabix_t * tabixfile
-
-cdef class TabixHeaderIterator:
-    cdef ti_iter_t iterator
-    cdef tabix_t * tabixfile
-
 cdef class Parser:
-     cdef parse( self, char * buffer, int len )
+    cdef parse(self, char * buffer, int len)
 
 cdef class asTuple(Parser):
-     cdef parse( self, char * buffer, int len )
-
+    cdef parse(self, char * buffer, int len)
 
 cdef class asGTF(Parser):
-     pass
+    pass
 
 cdef class asBed(Parser):
-     pass
+    pass
 
 cdef class asVCF(Parser):
-     pass
+    pass
+
+cdef class TabixIterator:
+    cdef hts_itr_t * iterator
+    cdef Tabixfile tabixfile
+    cdef kstring_t buffer
+    cdef int __cnext__(self)
 
-cdef class TabixIteratorParsed:
-    cdef ti_iter_t iterator
-    cdef tabix_t * tabixfile
+cdef class TabixIteratorParsed(TabixIterator):
     cdef Parser parser
+
+cdef class GZIterator:
+    cdef object _filename
+    cdef gzFile gzipfile
+    cdef kstream_t * kstream
+    cdef kstring_t buffer
+    cdef int __cnext__(self)
+
+cdef class GZIteratorHead(GZIterator):
+    pass
+
+cdef class GZIteratorParsed(GZIterator):
+    cdef Parser parser
+
+cdef _force_str(object s)
diff --git a/pysam/ctabix.pyx b/pysam/ctabix.pyx
index c9cf419..37cca5e 100644
--- a/pysam/ctabix.pyx
+++ b/pysam/ctabix.pyx
@@ -1,31 +1,28 @@
 # cython: embedsignature=True
 # adds doc-strings for sphinx
+import os
+import sys
 
-# Helper functions for python 3 compatibility - taken
-# from csamtools.pyx
-import tempfile, os, sys, types, itertools, struct, ctypes, gzip
-import io
-cimport TabProxies
+from libc.stdio cimport printf, fprintf, stderr
+from libc.string cimport strerror
+from libc.errno cimport errno
 
 from cpython cimport PyErr_SetString, PyBytes_Check, \
     PyUnicode_Check, PyBytes_FromStringAndSize, \
     PyObject_AsFileDescriptor
 
-from libc.stdio cimport printf, fprintf, stderr
-from libc.string cimport strerror
-from libc.errno cimport errno
-from libc.stdint cimport int64_t
+from cpython.version cimport PY_MAJOR_VERSION
 
-PYTHON3 = PY_MAJOR_VERSION >= 3
+cimport TabProxies
 
-# from cpython cimport PyString_FromStringAndSize, PyString_AS_STRING
-from cpython.version cimport PY_MAJOR_VERSION
+from chtslib cimport htsFile, hts_open, hts_close, HTS_IDX_START,\
+    BGZF, bgzf_open, bgzf_close, bgzf_write, \
+    ks_init, gzFile, ks_getuntil, kstring_t, \
+    tbx_index_build, tbx_index_load, tbx_itr_queryi, tbx_itr_querys, \
+    tbx_conf_t, tbx_seqnames, tbx_itr_next, tbx_itr_destroy, \
+    gzopen, gzclose, gzerror, gzdopen
 
-cdef from_string_and_size(char* s, size_t length):
-    if PY_MAJOR_VERSION < 3:
-        return s[:length]
-    else:
-        return s[:length].decode("ascii")
+PYTHON3 = PY_MAJOR_VERSION >= 3
 
 # filename encoding (copied from lxml.etree.pyx)
 cdef str _FILENAME_ENCODING
@@ -38,7 +35,7 @@ if _FILENAME_ENCODING is None:
 #cdef char* _C_FILENAME_ENCODING
 #_C_FILENAME_ENCODING = <char*>_FILENAME_ENCODING
 
-cdef bytes _my_encodeFilename(object filename):
+cdef bytes _encodeFilename(object filename):
     u"""Make sure a filename is 8-bit encoded (or None).
     """
     if filename is None:
@@ -86,316 +83,14 @@ cdef _force_str(object s):
         return s
 
 
-cdef class Tabixfile:
-    '''*(filename, mode='r', parser = None)*
-
-    opens a :term:`tabix file` for reading. A missing
-    index (*filename* + ".tbi") will raise an exception.
-
-    *parser* sets the default parser for this tabix file. If *parser*
-    is None, the results are returned as an unparsed string.
-    Otherwise, *parser* is assumed to be a functor that will return
-    parsed data (see for example :meth:`asTuple` and :meth:`asGTF`).
-    '''
-    def __cinit__(self, filename, mode = 'r', 
-                  parser = None, *args, **kwargs ):
-        self.tabixfile = NULL
-        self.parser = parser
-        self._open( filename, mode, *args, **kwargs )
-
-    def _isOpen( self ):
-        '''return true if samfile has been opened.'''
-        return self.tabixfile != NULL
-
-    def _open( self, 
-               filename,
-               mode ='r',
-              ):
-        '''open a :term:`tabix file` for reading.
-        '''
-
-        assert mode in ( "r",), "invalid file opening mode `%s`" % mode
-
-        # close a previously opened file
-        if self.tabixfile != NULL: self.close()
-        self.tabixfile = NULL
-
-        filename_index = filename + ".tbi"
-        self.isremote = filename.startswith( "http:") or filename.startswith( "ftp:" )
-
-        # encode all the strings
-        filename = _my_encodeFilename(filename)
-        filename_index = _my_encodeFilename(filename_index)
-        cdef bytes bmode = mode.encode('ascii')
-
-        if self._filename != NULL: free(self._filename )
-
-        self._filename = strdup(filename)
-
-        if mode[0] == 'w':
-            # open file for writing
-            raise NotImplementedError("writing to tabix files not implemented" )
-
-        elif mode[0] == "r":
-            # open file for reading
-            
-            if not self.isremote:
-                if not os.path.exists( filename ):
-                    raise IOError( "file `%s` not found" % 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( filename, filename_index )
-
-        if self.tabixfile == NULL:
-            raise IOError("could not open file `%s`" % filename )
-
-    def _parseRegion( self, 
-                      reference = None, 
-                      start = None, 
-                      end = None, 
-                      region = None ):
-        '''parse region information.
-
-        raise ValueError for for invalid regions.
-
-        returns a tuple of region, tid, start and end. Region
-        is a valid samtools :term:`region` or None if the region
-        extends over the whole file.
-
-        Note that regions are 1-based, while start,end are python coordinates.
-        '''
-        ti_lazy_index_load( self.tabixfile )
-
-        cdef int rtid
-        cdef int rstart
-        cdef int rend
-        cdef int max_pos
-        max_pos = 2 << 29
-
-        rtid = rstart = rend = 0
-
-        # translate to a region
-        if reference:
-            if start != None and end != None:
-                region = "%s:%i-%i" % (reference, start+1, end)
-            elif start == None and end != None:
-                region = "%s:%i-%i" % (reference, 1, end)
-            elif end == None and start != None:
-                region = "%s:%i-%i" % (reference, start+1, max_pos-1)
-            else:
-                region = reference
-
-        if region:
-            region = _force_bytes(region)
-            ti_parse_region( self.tabixfile.idx, region, 
-                             &rtid, &rstart, &rend)        
-            if rtid < 0: raise KeyError( reference )
-            if rstart > rend: raise ValueError( 'invalid region: start (%i) > end (%i)' % (rstart, rend) )
-            if not 0 <= rstart < max_pos: raise IndexError( 'start out of range (%i)' % rstart )
-            if not 0 <= rend < max_pos: raise IndexError( 'end out of range (%i)' % rend )
-
-        return region, rtid, rstart, rend
-
-    def fetch( self, 
-               reference = None,
-               start = None, 
-               end = None, 
-               region = None,
-               parser = None ):
-        '''
-               
-        fetch one or more rows in a :term:`region` using 0-based indexing. The region is specified by
-        :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can be supplied.
-
-        Without *reference* or *region* all entries will be fetched. 
-        
-        If only *reference* is set, all reads matching on *reference* will be fetched.
-
-        If *parser* is None, the default parser will be used for parsing.
-        '''
-        ti_lazy_index_load( self.tabixfile )
-
-        if not self._isOpen():
-            raise ValueError( "I/O operation on closed file" )
-
-        # the following will raise errors for invalid regions
-        region, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
-
-        # use default parser if no parser is specified
-        if parser == None: parser = self.parser
-
-        if parser == None: 
-            if region:
-                return TabixIterator( self, rtid, rstart, rend )
-            else:
-                return TabixIterator( self, -1, 0, 0 )
-        else:
-            if region:
-                return TabixIteratorParsed( self, rtid, rstart, 
-                                            rend, parser )
-            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 TabixHeaderIterator( self )
-
-    property contigs:
-        '''chromosome names'''
-        def __get__(self):
-            cdef char ** sequences
-            cdef int nsequences
-           
-            ti_lazy_index_load( self.tabixfile )
-            sequences = ti_seqname( self.tabixfile.idx, &nsequences ) 
-            cdef int x
-            result = []
-            for x from 0 <= x < nsequences:
-                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*.
-    """
-    
-    def __cinit__(self, Tabixfile tabixfile, 
-                  int tid, int start, int end ):
-        
-        assert tabixfile._isOpen()
-        
-        # makes sure that samfile stays alive as long as the
-        # iterator is alive.
-        self.tabixfile = tabixfile.tabixfile
-
-        if tid < 0:
-            # seek to start of file to ensure iteration is over
-            # all entries.
-            bgzf_seek( self.tabixfile.fp, 0, 0)
-            self.iterator = ti_iter_first()
-        else:
-            self.iterator = ti_queryi(self.tabixfile, tid, start, end) 
-
-        if <void*>self.iterator == NULL:
-            raise ValueError("malformatted query or wrong sequence name.\n")
-
-    def __iter__(self):
-        return self 
-
-    def __next__(self): 
-        """python version of next().
-
-        pyrex uses this non-standard name instead of next()
-        """
-    
-        cdef char * s
-        cdef int len
-        # metachar filtering does not work within tabix 
-        # though it should. Getting the metachar is a pain
-        # as ti_index_t is incomplete type.
-        # simply use '#' for now.
-        while 1:
-            s = ti_read(self.tabixfile, self.iterator, &len)
-            if s == NULL: raise StopIteration
-            if s[0] != '#': break
-
-        retval = _charptr_to_str( s )
-        return retval
-
-    def __dealloc__(self):
-        if <void*>self.iterator != NULL:
-            ti_iter_destroy(self.iterator)
-
-cdef class TabixHeaderIterator:
-    """return header lines.
-    """
-    
-    def __cinit__(self, Tabixfile tabixfile ):
-        
-        assert tabixfile._isOpen()
-        
-        # makes sure that samfile stays alive as long as the
-        # iterator is alive.
-        self.tabixfile = tabixfile.tabixfile
-
-        self.iterator = ti_query(self.tabixfile, NULL, 0, 0) 
-
-        if <void*>self.iterator == NULL:
-            raise ValueError("can't open header.\n")
-
-    def __iter__(self):
-        return self 
-
-    def __next__(self): 
-        """python version of next().
-
-        pyrex uses this non-standard name instead of next()
-        """
-    
-        cdef char * s
-        cdef int len
-
-        # Getting the metachar is a pain as ti_index_t is incomplete type.
-        # simply use '#' for now.
-        s = ti_read(self.tabixfile, self.iterator, &len)
-        if s == NULL: raise StopIteration
-        # stop at first non-header line
-        if s[0] != '#': raise StopIteration
-
-        return s
-
-    def __dealloc__(self):
-        if <void*>self.iterator != NULL:
-            ti_iter_destroy(self.iterator)
-
-
-#########################################################
-#########################################################
-#########################################################
 cdef class Parser:
 
     cdef parse(self, char * buffer, int length):
-        raise NotImplementedError
+        raise NotImplementedError(
+            'parse method of %s not implemented' % str(self))
 
     def __call__(self, char * buffer, int length):
-        return self.parse( buffer, length )
+        return self.parse(buffer, length)
 
 cdef class asTuple(Parser):
     '''converts a :term:`tabix row` into a python tuple.
@@ -407,7 +102,7 @@ cdef class asTuple(Parser):
         r = TabProxies.TupleProxy()
         # need to copy - there were some
         # persistence issues with "present"
-        r.copy( buffer, len )
+        r.copy(buffer, len)
         return r
 
 cdef class asGTF(Parser):
@@ -520,76 +215,394 @@ cdef class asVCF( Parser ):
     cdef parse(self, char * buffer, int len ):
         cdef TabProxies.VCFProxy r
         r = TabProxies.VCFProxy()
-        r.copy( buffer, len )
+        r.copy(buffer, len)
         return r
-    
-#########################################################
-#########################################################
-#########################################################
-cdef class TabixIteratorParsed:
-    """iterates over mapped reads in a region.
 
-    Returns parsed data.
-    """
 
-    def __cinit__(self, 
-                  Tabixfile tabixfile, 
-                  int tid, 
-                  int start, 
-                  int end,
-                  Parser parser ):
+cdef class Tabixfile:
+    '''*(filename, mode='r', parser = None)*
+
+    opens a :term:`tabix file` for reading. A missing
+    index (*filename* + ".tbi") will raise an exception. *index*
+    specifies an alternative name of the index.
 
-        assert tabixfile._isOpen()
+    *parser* sets the default parser for this tabix file. If *parser*
+    is None, the results are returned as an unparsed string.
+    Otherwise, *parser* is assumed to be a functor that will return
+    parsed data (see for example :meth:`asTuple` and :meth:`asGTF`).
+    '''
+    def __cinit__(self, filename, mode = 'r',
+                  parser=None,
+                  index=None,
+                  *args,
+                  **kwargs ):
+
+        self.tabixfile = NULL
         self.parser = parser
+        self._open( filename, mode, index, *args, **kwargs )
+
+    def _open( self, 
+               filename,
+               mode ='r',
+               index = None,
+              ):
+        '''open a :term:`tabix file` for reading.
+        '''
+
+        assert mode in ( "r",), "invalid file opening mode `%s`" % mode
+
+        if self.tabixfile != NULL:
+            self.close()
+        self.tabixfile = NULL
+
+        filename_index = index or (filename + ".tbi")
+        self.isremote = filename.startswith("http:") or filename.startswith("ftp:")
+
+        # encode all the strings
+        filename = _encodeFilename(filename)
+        filename_index = _encodeFilename(filename_index)
+        cdef bytes bmode = mode.encode('ascii')
+
+        if self._filename != NULL: free(self._filename )
+
+        self._filename = strdup(filename)
 
-        # makes sure that samfile stays alive as long as the
-        # iterator is alive.
-        self.tabixfile = tabixfile.tabixfile
+        if mode[0] == 'w':
+            # open file for writing
+            raise NotImplementedError("writing to tabix files not implemented" )
+
+        if mode[0] != "r":
+            raise ValueError("invalid mode '%s'" % mode)
+            # open file for reading
+            
+        if not self.isremote:
+            if not os.path.exists(filename):
+                raise IOError("file `%s` not found" % filename)
+
+            if not os.path.exists( filename_index ):
+                raise IOError("index `%s` not found" % filename_index)
 
-        if tid < 0:
-            # seek to start of file to ensure iteration is over
-            # all entries.
-            bgzf_seek( self.tabixfile.fp, 0, 0)
-            self.iterator = ti_iter_first()
+        # open file
+        self.tabixfile = hts_open(filename, 'r')
+        if self.tabixfile == NULL:
+            raise IOError("could not open file `%s`" % filename)
+        
+        self.index = tbx_index_load(filename_index)
+        if self.index == NULL:
+            raise IOError("could not open index for `%s`" % filename)
+
+    def _isOpen( self ):
+        '''return true if samfile has been opened.'''
+        return self.tabixfile != NULL
+
+
+    def fetch(self, 
+              reference=None,
+              start=None, 
+              end=None, 
+              region=None,
+              parser=None):
+        '''fetch one or more rows in a :term:`region` using 0-based
+        indexing. The region is specified by :term:`reference`,
+        *start* and *end*. Alternatively, a samtools :term:`region`
+        string can be supplied.
+
+        Without *reference* or *region* all entries will be fetched. 
+        
+        If only *reference* is set, all reads matching on *reference*
+        will be fetched.
+
+        If *parser* is None, the default parser will be used for
+        parsing.
+        '''
+        if not self._isOpen():
+            raise ValueError("I/O operation on closed file")
+
+        # convert coordinates to region string
+        if reference:
+            if end is not None:
+                if start is None:
+                    start = 0
+                region = '%s:%i-%i' % (reference, start + 1, end)
+                if start > end:
+                    raise ValueError(
+                        'start (%i) > end (%i)' % (start, end))
+            elif start is not None:
+                region = '%s:%i' % (reference, start + 1)
+            else:
+                region = reference
+
+        # get iterator
+        cdef hts_itr_t * iter
+        if region is None:
+            # without region or reference - iterate from start
+            iter = tbx_itr_queryi(self.index,
+                                  HTS_IDX_START,
+                                  0,
+                                  0)
         else:
-            self.iterator = ti_queryi(self.tabixfile, tid, start, end) 
+            iter = tbx_itr_querys(self.index,
+                                  region)
+
+        if iter == NULL:
+            if region is None:
+                # possible reason is that the file is empty -
+                # return an empty iterator
+                return EmptyIterator()
+            else:
+                raise ValueError(
+                    "could not create iterator for region '%s'" % region)
+            
+        # use default parser if no parser is specified
+        if parser is None:
+            parser = self.parser
 
-        if <void*>self.iterator == NULL:
-            raise ValueError("malformatted query or wrong sequence name.\n")
+        cdef TabixIterator a
+        if parser is None: 
+            a = TabixIterator()
+        else:
+            a = TabixIteratorParsed(parser)
+
+        a.tabixfile = self
+        a.iterator = iter
+        
+        return a
+
+    ###############################################################
+    ###############################################################
+    ###############################################################
+    ## 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 GZIteratorHead(self.filename)
+
+    property contigs:
+        '''chromosome names'''
+        def __get__(self):
+            cdef char ** sequences
+            cdef int nsequences
+            
+            sequences = tbx_seqnames(self.index, &nsequences) 
+            cdef int x
+            result = []
+            for x from 0 <= x < nsequences:
+                result.append(sequences[x])
+            
+            # htslib instructions:
+            # only free container, not the sequences themselves
+            free(sequences)
+
+            return result
+            
+    def close(self):
+        '''
+        closes the :class:`pysam.Tabixfile`.'''
+        if self.tabixfile != NULL:
+            hts_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:
+            hts_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*.
+    """
+    
     def __iter__(self):
+        self.buffer.s = NULL
+        self.buffer.l = 0
+        self.buffer.m = 0
+
         return self 
 
+    cdef int __cnext__(self):
+        '''return value needs to be freed by caller'''
+
+        cdef int retval
+        while 1:
+            retval = tbx_itr_next(
+                self.tabixfile.tabixfile,
+                self.tabixfile.index,
+                self.iterator,
+                &self.buffer)
+            if retval < 0:
+                break
+
+            if self.buffer.s[0] != '#':
+                break
+
+        return retval
+
     def __next__(self): 
         """python version of next().
 
         pyrex uses this non-standard name instead of next()
         """
-    
-        cdef char * s
-        cdef int len
-        while 1:
-            s = ti_read(self.tabixfile, self.iterator, &len)
-            if s == NULL: raise StopIteration
-            if s[0] != '#': break
-            
-        return self.parser.parse(s, len)
+        
+        cdef int retval = self.__cnext__()
+        if retval < 0:
+            raise StopIteration
+
+        return _charptr_to_str(self.buffer.s)
 
     def __dealloc__(self):
         if <void*>self.iterator != NULL:
-            ti_iter_destroy(self.iterator)
+            tbx_itr_destroy(self.iterator)
+
+
+class EmptyIterator:
+    '''empty iterator'''
+
+    def __iter__(self):
+        return self
+
+
+    def next(self):
+        raise StopIteration()
+
+
+cdef class TabixIteratorParsed(TabixIterator):
+    """iterates over mapped reads in a region.
+
+    Returns parsed data.
+    """
+
+    def __init__(self, 
+                 Parser parser):
         
-def tabix_compress( filename_in, 
-                    filename_out,
-                    force = False ):
+        TabixIterator.__init__(self)
+        self.parser = parser
+
+    def __next__(self): 
+        """python version of next().
+
+        pyrex uses this non-standard name instead of next()
+        """
+        
+        cdef int retval = self.__cnext__()
+        if retval < 0:
+            raise StopIteration
+        return self.parser.parse(self.buffer.s, self.buffer.l)
+
+
+cdef class GZIterator:
+    def __init__(self, filename, int buffer_size=65536):
+        '''iterate line-by-line through gzip (or bgzip)
+        compressed file.
+        '''
+        if not os.path.exists(filename):
+            raise IOError("No such file or directory: %s" % filename)
+
+        filename = _encodeFilename(filename)
+        self.gzipfile = gzopen(filename, "r")
+        self._filename = filename
+        self.kstream = ks_init(self.gzipfile)
+
+        self.buffer.l = 0
+        self.buffer.m = 0
+        self.buffer.s = <char*>malloc(buffer_size)
+
+    def __dealloc__(self):
+        '''close file.'''
+        if self.gzipfile != NULL:
+            gzclose(self.gzipfile)
+            self.gzipfile = NULL
+        free(self.buffer.s)
+
+    def __iter__(self):
+        return self
+
+    cdef int __cnext__(self):
+        cdef int dret = 0
+        cdef int retval = 0
+        while 1:
+            retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)
+            
+            if retval < 0: 
+                break
+
+            return dret
+        return -1
+
+    def __next__(self):
+        """python version of next().
+        """
+        cdef int retval = self.__cnext__()
+        if retval < 0:
+            raise StopIteration
+        return self.buffer.s
+
+
+cdef class GZIteratorHead(GZIterator):
+    '''iterate line-by-line through gzip (or bgzip)
+    compressed file returning comments at top of file.
     '''
-    compress *filename_in* writing the output to *filename_out*.
+
+    def __next__(self):
+        """python version of next().
+        """
+        cdef int retval = self.__cnext__()
+        if retval < 0:
+            raise StopIteration
+        if self.buffer.s[0] == '#':
+            return self.buffer.s
+        else:
+            raise StopIteration
+
+
+cdef class GZIteratorParsed(GZIterator):
+    '''iterate line-by-line through gzip (or bgzip)
+    compressed file returning comments at top of file.
+    '''
+
+    def __init__(self, parser):
+        self.parser = parser
+
+    def __next__(self):
+        """python version of next().
+        """
+        cdef int retval = self.__cnext__()
+        if retval < 0:
+            raise StopIteration
+
+        return self.parser.parse(self.buffer.s,
+                                 self.buffer.l)
+
+
+def tabix_compress(filename_in, 
+                   filename_out,
+                   force=False):
+    '''compress *filename_in* writing the output to *filename_out*.
     
-    Raise an IOError if *filename_out* already exists, unless *force* is set.
+    Raise an IOError if *filename_out* already exists, unless *force*
+    is set.
     '''
 
     if not force and os.path.exists(filename_out ):
-        raise IOError( "Filename '%s' already exists, use *force* to overwrite" % filename_out)
+        raise IOError(
+            "Filename '%s' already exists, use *force* to overwrite" % filename_out)
 
     cdef int WINDOW_SIZE
     cdef int c, r
@@ -605,12 +618,12 @@ def tabix_compress( filename_in,
     fn = _force_bytes(filename_out)
     fp = bgzf_open( fn, "w")
     if fp == NULL:
-        raise IOError( "could not open '%s' for writing" )
+        raise IOError("could not open '%s' for writing")
 
     fn = _force_bytes(filename_in)
     fd_src = open(fn, O_RDONLY)
     if fd_src == 0:
-        raise IOError( "could not open '%s' for reading" )
+        raise IOError("could not open '%s' for reading")
 
     buffer = malloc(WINDOW_SIZE)
     c = 1
@@ -619,12 +632,17 @@ def tabix_compress( filename_in,
         c = read(fd_src, buffer, WINDOW_SIZE)
         r = bgzf_write(fp, buffer, c)
         if r < 0:
-            free( buffer )
+            free(buffer)
             raise OSError("writing failed")
         
-    free( buffer )
+    free(buffer)
     r = bgzf_close(fp)
-    if r < 0: raise OSError("writing failed")
+    if r < 0:
+        raise OSError("writing to file %s failed" % filename_out)
+
+    r = close(fd_src)
+    if r < 0:
+        raise OSError("error when closing file %s" % filename_in)
 
 def tabix_index( filename, 
                  force = False,
@@ -634,9 +652,9 @@ def tabix_index( filename,
                  preset = None,
                  meta_char = "#",
                  zerobased = False,
+                 min_shift = -1,
                 ):
-    '''
-    index tab-separated *filename* using tabix.
+    '''index tab-separated *filename* using tabix.
 
     An existing index will not be overwritten unless
     *force* is set.
@@ -665,10 +683,16 @@ def tabix_index( filename,
     If *filename* ends in *gz*, the file is assumed to be already
     compressed with bgzf.
 
+    *min-shift* sets the minimal interval size to 1<<INT; 0 for the
+    old tabix index. The default of -1 is changed inside htslib to 
+    the old tabix default of 0.
+
     returns the filename of the compressed data
+
     '''
     
-    if not os.path.exists(filename): raise IOError("No such file '%s'" % filename)
+    if not os.path.exists(filename):
+        raise IOError("No such file '%s'" % filename)
 
     if preset == None and (seq_col == None or start_col == None or end_col == None):
         raise ValueError("neither preset nor seq_col,start_col and end_col given" )
@@ -681,8 +705,9 @@ def tabix_index( filename,
     if not force and os.path.exists(filename + ".tbi" ):
         raise IOError( "Filename '%s.tbi' already exists, use *force* to overwrite" )
 
-    # columns (1-based)
-    # preset-code, contig, start, end, metachar for commends, lines to ignore at beginning
+    # columns (1-based):
+    #   preset-code, contig, start, end, metachar for
+    #     comments, lines to ignore at beginning
     # 0 is a missing column
     preset2conf = {
         'gff' : ( 0, 1, 4, 5, ord('#'), 0 ),
@@ -697,33 +722,35 @@ def tabix_index( filename,
         try:
             conf_data = preset2conf[preset]
         except KeyError:
-            raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() )))
+            raise KeyError(
+                "unknown preset '%s', valid presets are '%s'" %
+                (preset, ",".join(preset2conf.keys())))
     else:
-        if end_col == None: end_col = -1
+        if end_col == None:
+            end_col = -1
         preset = 0
 
-        # note that tabix internally works with 0-based coordinates and open/closed intervals.
-        # When using a preset, conversion is automatically taken care of.
-        # Otherwise, the coordinates are assumed to be 1-based closed intervals and 
-        # -1 is subtracted from the start coordinate. To avoid doing this, set
-        # the TI_FLAG_UCSC=0x10000 flag:
-        if zerobased: preset = preset | 0x10000
+        # note that tabix internally works with 0-based coordinates
+        # and open/closed intervals.  When using a preset, conversion
+        # is automatically taken care of.  Otherwise, the coordinates
+        # are assumed to be 1-based closed intervals and -1 is
+        # subtracted from the start coordinate. To avoid doing this,
+        # set the TI_FLAG_UCSC=0x10000 flag:
+        if zerobased:
+            preset = preset | 0x10000
 
         conf_data = (preset, seq_col+1, start_col+1, end_col+1, ord(meta_char), 0)
                 
-    cdef ti_conf_t conf
+    cdef tbx_conf_t conf
     conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
 
-    fn = _my_encodeFilename( filename )
-    ti_index_build( fn, &conf)
+
+    fn = _encodeFilename(filename)
+    tbx_index_build(fn, min_shift, &conf)
     
     return filename
 
 # #########################################################
-# #########################################################
-# #########################################################
-# ## Iterators for parsing through unindexed files.
-# #########################################################
 # cdef class tabix_file_iterator_old:
 #     '''iterate over ``infile``.
 
@@ -795,7 +822,7 @@ def tabix_index( filename,
 #########################################################
 cdef buildGzipError(void *gzfp):
     cdef int errnum = 0
-    cdef const char *s = gzerror(gzfp, &errnum)
+    cdef char *s = gzerror(gzfp, &errnum)
     return "error (%d): %s (%d: %s)" % (errno, strerror(errno), errnum, s)
 
 
@@ -806,29 +833,30 @@ cdef class tabix_file_iterator:
     def __cinit__(self, 
                   infile, 
                   Parser parser,
-                  int buffer_size = 65536 ):
+                  int buffer_size=65536):
 
         if infile.closed:
             raise ValueError( "I/O operation on closed file." )
 
         self.infile = infile
 
-        cdef int fd = PyObject_AsFileDescriptor( infile )
-        if fd == -1: raise ValueError( "I/O operation on closed file." )
+        cdef int fd = PyObject_AsFileDescriptor(infile)
+        if fd == -1:
+            raise ValueError("I/O operation on closed file.")
 
         # From the manual:
         # gzopen can be used to read a file which is not in gzip format; 
         # in this case gzread will directly read from the file without decompression. 
         # When reading, this will be detected automatically by looking 
         # for the magic two-byte gzip header. 
-        self.fh = gzdopen( fd, 'r')
+        self.fh = gzdopen(fd, 'r')
 
         if self.fh == NULL: 
             raise IOError('%s' % strerror(errno))
 
-        self.ks = ks_init( self.fh) 
+        self.kstream = ks_init(self.fh) 
         
-        self.buffer.s = <char*>malloc( buffer_size )
+        self.buffer.s = <char*>malloc(buffer_size)
         #if self.buffer == NULL:
         #    raise MemoryError( "tabix_file_iterator: could not allocate %i bytes" % buffer_size)
         #self.size = buffer_size
@@ -844,7 +872,7 @@ cdef class tabix_file_iterator:
         cdef int retval = 0
         while 1:
             
-            retval = ks_getuntil(self.ks, '\n', &self.buffer, &dret)
+            retval = ks_getuntil(self.kstream, '\n', &self.buffer, &dret)
             
             if retval < 0: 
                 break
@@ -874,6 +902,7 @@ cdef class tabix_file_iterator:
     def next(self):
         return self.__cnext__()
     
+
 class tabix_generic_iterator:
     '''iterate over ``infile``.
     
@@ -882,7 +911,8 @@ class tabix_generic_iterator:
     def __init__(self, infile, parser ):
 
         self.infile = infile
-        if self.infile.closed: raise ValueError( "I/O operation on closed file." )
+        if self.infile.closed:
+            raise ValueError("I/O operation on closed file.")
         self.parser = parser
 
     def __iter__(self):
@@ -891,7 +921,8 @@ class tabix_generic_iterator:
     # cython version - required for python 3
     def __next__(self):
         
-        cdef char * b, * cpy
+        cdef char * b
+        cdef char * cpy
         cdef size_t nbytes
 
         # note that GzipFile.close() does not close the file
@@ -951,14 +982,17 @@ def tabix_iterator( infile, parser ):
 #        else:
 #            return tabix_generic_iterator( infile, parser )
     
-__all__ = ["tabix_index", 
-           "tabix_compress",
-           "Tabixfile", 
-           "asTuple",
-           "asGTF",
-           "asVCF",
-           "asBed",
-           "tabix_iterator", 
-           "tabix_generic_iterator", 
-           "tabix_file_iterator", 
-           ]
+__all__ = [
+    "tabix_index", 
+    "tabix_compress",
+    "Tabixfile",
+    "asTuple",
+    "asGTF",
+    "asVCF",
+    "asBed",
+    "GZIterator",
+    "GZIteratorHead",
+    "tabix_iterator", 
+    "tabix_generic_iterator", 
+    "tabix_file_iterator", 
+]
diff --git a/pysam/cvcf.c b/pysam/cvcf.c
index dcb83b4..291da31 100644
--- a/pysam/cvcf.c
+++ b/pysam/cvcf.c
@@ -1,12 +1,25 @@
-/* Generated by Cython 0.18 on Sat Nov 16 01:37:33 2013 */
+/* Generated by Cython 0.20.1 on Sun Jun 22 20:32:41 2014 */
 
 #define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
 #include "Python.h"
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
 #elif PY_VERSION_HEX < 0x02040000
     #error Cython requires Python 2.4+.
 #else
+#define CYTHON_ABI "0_20_1"
 #include <stddef.h> /* For offsetof */
 #ifndef offsetof
 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -41,6 +54,9 @@
 #define CYTHON_COMPILING_IN_PYPY 0
 #define CYTHON_COMPILING_IN_CPYTHON 1
 #endif
+#if CYTHON_COMPILING_IN_PYPY
+#define Py_OptimizeFlag 0
+#endif
 #if PY_VERSION_HEX < 0x02050000
   typedef int Py_ssize_t;
   #define PY_SSIZE_T_MAX INT_MAX
@@ -48,7 +64,7 @@
   #define PY_FORMAT_SIZE_T ""
   #define CYTHON_FORMAT_SSIZE_T ""
   #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
-  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
+  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
   #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                 (PyErr_Format(PyExc_TypeError, \
                                               "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
@@ -100,13 +116,15 @@
 #if PY_MAJOR_VERSION < 3
   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
-          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
 #else
   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
 #endif
-#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
+#if PY_VERSION_HEX < 0x02060000
   #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
 #endif
 #if PY_MAJOR_VERSION >= 3
@@ -116,19 +134,47 @@
 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
+#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
+  #define Py_TPFLAGS_IS_ABSTRACT 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
   #define CYTHON_PEP393_ENABLED 1
   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                               0 : _PyUnicode_Ready((PyObject *)(op)))
   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
 #else
   #define CYTHON_PEP393_ENABLED 0
   #define __Pyx_PyUnicode_READY(op)       (0)
   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
-  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
 #endif
 #if PY_MAJOR_VERSION >= 3
   #define PyBaseString_Type            PyUnicode_Type
@@ -155,6 +201,14 @@
   #define PyBytes_Concat               PyString_Concat
   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
 #endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
 #if PY_VERSION_HEX < 0x02060000
   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
@@ -178,11 +232,12 @@
   #define PyInt_AsSsize_t              PyLong_AsSsize_t
   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
 #endif
 #if PY_MAJOR_VERSION >= 3
   #define PyBoolObject                 PyLongObject
 #endif
-#if PY_VERSION_HEX < 0x03020000
+#if PY_VERSION_HEX < 0x030200A4
   typedef long Py_hash_t;
   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
@@ -227,6 +282,40 @@
   #define __Pyx_NAMESTR(n) (n)
   #define __Pyx_DOCSTR(n)  (n)
 #endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
 
 
 #if PY_MAJOR_VERSION >= 3
@@ -255,15 +344,17 @@
 #include "string.h"
 #include "stdint.h"
 #include "stdio.h"
-#include "ctype.h"
-#include "sys/types.h"
-#include "sys/stat.h"
 #include "fcntl.h"
 #include "unistd.h"
 #include "zlib.h"
-#include "bgzf.h"
-#include "tabix.h"
-#include "tabix_util.h"
+#include "htslib/kstring.h"
+#include "htslib/hfile.h"
+#include "htslib/bgzf.h"
+#include "htslib/hts.h"
+#include "htslib/sam.h"
+#include "pysam_stream.h"
+#include "htslib/faidx.h"
+#include "htslib/tbx.h"
 #ifdef _OPENMP
 #include <omp.h>
 #endif /* _OPENMP */
@@ -272,17 +363,6 @@
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
-    #define CYTHON_INLINE __inline__
-  #elif defined(_MSC_VER)
-    #define CYTHON_INLINE __inline
-  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-    #define CYTHON_INLINE inline
-  #else
-    #define CYTHON_INLINE
-  #endif
-#endif
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
@@ -296,23 +376,142 @@
 #   define CYTHON_UNUSED
 # endif
 #endif
-typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
-
-#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
-#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 #if CYTHON_COMPILING_IN_CPYTHON
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 #else
 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
 #endif
 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
 
 
 #ifdef __GNUC__
@@ -328,8 +527,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
   #define likely(x)   (x)
   #define unlikely(x) (x)
 #endif /* __GNUC__ */
-    
+
 static PyObject *__pyx_m;
+static PyObject *__pyx_d;
 static PyObject *__pyx_b;
 static PyObject *__pyx_empty_tuple;
 static PyObject *__pyx_empty_bytes;
@@ -346,125 +546,94 @@ static const char *__pyx_f[] = {
 };
 
 /*--- Type declarations ---*/
-struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse;
+struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator;
+struct __pyx_obj_5pysam_6ctabix_Tabixfile;
 struct __pyx_obj_5pysam_6ctabix_Parser;
-struct __pyx_obj_5pysam_10TabProxies_TupleProxy;
-struct __pyx_obj_5pysam_4cvcf_VCFRecord;
-struct __pyx_obj_5pysam_6ctabix_asGTF;
-struct __pyx_obj_5pysam_10TabProxies_GTFProxy;
 struct __pyx_obj_5pysam_6ctabix_asTuple;
+struct __pyx_obj_5pysam_6ctabix_asGTF;
 struct __pyx_obj_5pysam_6ctabix_asBed;
-struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator;
-struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data;
-struct __pyx_obj_5pysam_4cvcf_asVCFRecord;
-struct __pyx_obj_5pysam_6ctabix_Tabixfile;
-struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy;
-struct __pyx_obj_5pysam_10TabProxies_BedProxy;
-struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed;
-struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr;
 struct __pyx_obj_5pysam_6ctabix_asVCF;
 struct __pyx_obj_5pysam_6ctabix_TabixIterator;
-struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator;
+struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed;
+struct __pyx_obj_5pysam_6ctabix_GZIterator;
+struct __pyx_obj_5pysam_6ctabix_GZIteratorHead;
+struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed;
+struct __pyx_obj_5pysam_10TabProxies_TupleProxy;
+struct __pyx_obj_5pysam_10TabProxies_GTFProxy;
+struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy;
+struct __pyx_obj_5pysam_10TabProxies_BedProxy;
 struct __pyx_obj_5pysam_10TabProxies_VCFProxy;
-struct __pyx_defaults;
-typedef struct __pyx_defaults __pyx_defaults;
-struct __pyx_defaults1;
-typedef struct __pyx_defaults1 __pyx_defaults1;
-struct __pyx_defaults2;
-typedef struct __pyx_defaults2 __pyx_defaults2;
-struct __pyx_defaults3;
-typedef struct __pyx_defaults3 __pyx_defaults3;
-struct __pyx_defaults4;
-typedef struct __pyx_defaults4 __pyx_defaults4;
-struct __pyx_defaults {
-  PyObject *__pyx_arg_leftalign;
-};
-struct __pyx_defaults1 {
-  PyObject *__pyx_arg_filter;
-};
-struct __pyx_defaults2 {
-  PyObject *__pyx_arg_filter;
-};
-struct __pyx_defaults3 {
-  PyObject *__pyx_arg_key;
-  PyObject *__pyx_arg_value;
-};
-struct __pyx_defaults4 {
-  PyObject *__pyx_arg_lineparse;
-};
+struct __pyx_obj_5pysam_4cvcf_VCFRecord;
+struct __pyx_obj_5pysam_4cvcf_asVCFRecord;
+struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse;
 
-/* "pysam/cvcf.pyx":902
- *         return line
+/* "ctabix.pxd":18
+ *     kstream_t, kstring_t, gzFile, tbx_t
  * 
- *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
- *         # deal with files with header only
- *         if line.startswith("##"): return
+ * cdef class tabix_file_iterator:             # <<<<<<<<<<<<<<
+ *     cdef gzFile fh
+ *     cdef kstream_t * kstream
  */
-struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse {
+struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator {
   PyObject_HEAD
-  PyObject *__pyx_v_d;
-  PyObject *__pyx_v_line;
-  PyObject *__pyx_v_self;
-  PyObject *__pyx_v_stream;
-  Py_ssize_t __pyx_t_0;
-  PyObject *__pyx_t_1;
-  PyObject *(*__pyx_t_2)(PyObject *);
+  struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *__pyx_vtab;
+  gzFile fh;
+  kstream_t *kstream;
+  kstring_t buffer;
+  size_t size;
+  struct __pyx_obj_5pysam_6ctabix_Parser *parser;
+  int fd;
+  PyObject *infile;
 };
 
 
-/* "ctabix.pxd":232
- *     cdef tabix_t * tabixfile
+/* "ctabix.pxd":29
+ *     cdef __cnext__(self)
  * 
- * cdef class Parser:             # <<<<<<<<<<<<<<
- *      cdef parse( self, char * buffer, int len )
+ * cdef class Tabixfile:             # <<<<<<<<<<<<<<
  * 
+ *     # pointer to tabixfile
  */
-struct __pyx_obj_5pysam_6ctabix_Parser {
+struct __pyx_obj_5pysam_6ctabix_Tabixfile {
   PyObject_HEAD
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser *__pyx_vtab;
+  htsFile *tabixfile;
+  tbx_t *index;
+  int isremote;
+  char *_filename;
+  struct __pyx_obj_5pysam_6ctabix_Parser *parser;
 };
 
 
-/* "TabProxies.pxd":41
- *   ctypedef int uint64_t
+/* "ctabix.pxd":43
+ *     cdef Parser parser
  * 
- * cdef class TupleProxy:             # <<<<<<<<<<<<<<
+ * cdef class Parser:             # <<<<<<<<<<<<<<
+ *     cdef parse(self, char * buffer, int len)
  * 
- *     cdef:
  */
-struct __pyx_obj_5pysam_10TabProxies_TupleProxy {
+struct __pyx_obj_5pysam_6ctabix_Parser {
   PyObject_HEAD
-  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *__pyx_vtab;
-  char *data;
-  char **fields;
-  int nfields;
-  int index;
-  int nbytes;
-  int offset;
-  int is_modified;
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser *__pyx_vtab;
 };
 
 
-/* "pysam/cvcf.pyx":95
- * ###########################################################################################################
+/* "ctabix.pxd":46
+ *     cdef parse(self, char * buffer, int len)
  * 
- * cdef class VCFRecord( TabProxies.TupleProxy):             # <<<<<<<<<<<<<<
- *     '''vcf record.
+ * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
+ *     cdef parse(self, char * buffer, int len)
  * 
  */
-struct __pyx_obj_5pysam_4cvcf_VCFRecord {
-  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
-  PyObject *vcf;
-  char *contig;
-  uint32_t pos;
+struct __pyx_obj_5pysam_6ctabix_asTuple {
+  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
 };
 
 
-/* "ctabix.pxd":239
- * 
+/* "ctabix.pxd":49
+ *     cdef parse(self, char * buffer, int len)
  * 
  * cdef class asGTF(Parser):             # <<<<<<<<<<<<<<
- *      pass
+ *     pass
  * 
  */
 struct __pyx_obj_5pysam_6ctabix_asGTF {
@@ -472,127 +641,156 @@ struct __pyx_obj_5pysam_6ctabix_asGTF {
 };
 
 
-/* "TabProxies.pxd":60
- *     cdef update( self, char * buffer, size_t nbytes )
+/* "ctabix.pxd":52
+ *     pass
  * 
- * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class asBed(Parser):             # <<<<<<<<<<<<<<
+ *     pass
  * 
- *     cdef:
  */
-struct __pyx_obj_5pysam_10TabProxies_GTFProxy {
-  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
-  char *_attributes;
-  int hasOwnAttributes;
+struct __pyx_obj_5pysam_6ctabix_asBed {
+  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
 };
 
 
-/* "ctabix.pxd":235
- *      cdef parse( self, char * buffer, int len )
+/* "ctabix.pxd":55
+ *     pass
  * 
- * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
- *      cdef parse( self, char * buffer, int len )
+ * cdef class asVCF(Parser):             # <<<<<<<<<<<<<<
+ *     pass
  * 
  */
-struct __pyx_obj_5pysam_6ctabix_asTuple {
+struct __pyx_obj_5pysam_6ctabix_asVCF {
   struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
 };
 
 
-/* "ctabix.pxd":242
- *      pass
- * 
- * cdef class asBed(Parser):             # <<<<<<<<<<<<<<
- *      pass
+/* "ctabix.pxd":58
+ *     pass
  * 
+ * cdef class TabixIterator:             # <<<<<<<<<<<<<<
+ *     cdef hts_itr_t * iterator
+ *     cdef Tabixfile tabixfile
  */
-struct __pyx_obj_5pysam_6ctabix_asBed {
-  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_obj_5pysam_6ctabix_TabixIterator {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator *__pyx_vtab;
+  hts_itr_t *iterator;
+  struct __pyx_obj_5pysam_6ctabix_Tabixfile *tabixfile;
+  kstring_t buffer;
 };
 
 
-/* "ctabix.pxd":201
- *     int ks_getuntil( kstream_t *, int, kstring_t *, int * )
+/* "ctabix.pxd":64
+ *     cdef int __cnext__(self)
+ * 
+ * cdef class TabixIteratorParsed(TabixIterator):             # <<<<<<<<<<<<<<
+ *     cdef Parser parser
  * 
- * cdef class tabix_file_iterator:             # <<<<<<<<<<<<<<
- *     cdef gzFile fh
- *     cdef kstream_t * ks
  */
-struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator {
-  PyObject_HEAD
-  struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *__pyx_vtab;
-  gzFile fh;
-  kstream_t *ks;
-  kstring_t buffer;
-  size_t size;
+struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed {
+  struct __pyx_obj_5pysam_6ctabix_TabixIterator __pyx_base;
   struct __pyx_obj_5pysam_6ctabix_Parser *parser;
-  int fd;
-  PyObject *infile;
 };
 
 
-/* "pysam/cvcf.pyx":650
- *         return False
+/* "ctabix.pxd":67
+ *     cdef Parser parser
  * 
- *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
- *         cols = line.split('\t')
- *         if len(cols) != len(self._samples)+9:
+ * cdef class GZIterator:             # <<<<<<<<<<<<<<
+ *     cdef object _filename
+ *     cdef gzFile gzipfile
  */
-struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data {
+struct __pyx_obj_5pysam_6ctabix_GZIterator {
   PyObject_HEAD
-  PyObject *__pyx_v_alt;
+  struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator *__pyx_vtab;
+  PyObject *_filename;
+  gzFile gzipfile;
+  kstream_t *kstream;
+  kstring_t buffer;
 };
 
 
-/* "pysam/cvcf.pyx":229
+/* "ctabix.pxd":74
+ *     cdef int __cnext__(self)
  * 
+ * cdef class GZIteratorHead(GZIterator):             # <<<<<<<<<<<<<<
+ *     pass
  * 
- * cdef class asVCFRecord( ctabix.Parser ):             # <<<<<<<<<<<<<<
- *     '''converts a :term:`tabix row` into a VCF record.'''
- *     cdef vcffile
  */
-struct __pyx_obj_5pysam_4cvcf_asVCFRecord {
-  struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
-  PyObject *vcffile;
+struct __pyx_obj_5pysam_6ctabix_GZIteratorHead {
+  struct __pyx_obj_5pysam_6ctabix_GZIterator __pyx_base;
 };
 
 
-/* "ctabix.pxd":212
- *     cdef __cnext__(self)
+/* "ctabix.pxd":77
+ *     pass
  * 
- * cdef class Tabixfile:             # <<<<<<<<<<<<<<
+ * cdef class GZIteratorParsed(GZIterator):             # <<<<<<<<<<<<<<
+ *     cdef Parser parser
  * 
- *     # pointer to tabixfile
  */
-struct __pyx_obj_5pysam_6ctabix_Tabixfile {
-  PyObject_HEAD
-  tabix_t *tabixfile;
-  int isremote;
-  char *_filename;
+struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed {
+  struct __pyx_obj_5pysam_6ctabix_GZIterator __pyx_base;
   struct __pyx_obj_5pysam_6ctabix_Parser *parser;
 };
 
 
-/* "TabProxies.pxd":69
- *     cdef char * getAttributes( self )
+/* "TabProxies.pxd":41
+ *   ctypedef int uint64_t
  * 
- * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
- *     pass
+ * cdef class TupleProxy:             # <<<<<<<<<<<<<<
  * 
+ *     cdef:
  */
-struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy {
-  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
+struct __pyx_obj_5pysam_10TabProxies_TupleProxy {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *__pyx_vtab;
+  char *data;
+  char **fields;
+  int nfields;
+  int index;
+  int nbytes;
+  int offset;
+  int is_modified;
 };
 
 
-/* "TabProxies.pxd":72
- *     pass
+/* "TabProxies.pxd":60
+ *     cdef update( self, char * buffer, size_t nbytes )
  * 
- * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
  * 
  *     cdef:
  */
-struct __pyx_obj_5pysam_10TabProxies_BedProxy {
-  struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+struct __pyx_obj_5pysam_10TabProxies_GTFProxy {
+  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
+  char *_attributes;
+  int hasOwnAttributes;
+};
+
+
+/* "TabProxies.pxd":69
+ *     cdef char * getAttributes( self )
+ * 
+ * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ *     pass
+ * 
+ */
+struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy {
+  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
+};
+
+
+/* "TabProxies.pxd":72
+ *     pass
+ * 
+ * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * 
+ *     cdef:
+ */
+struct __pyx_obj_5pysam_10TabProxies_BedProxy {
+  struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
   char *contig;
   uint32_t start;
   uint32_t end;
@@ -600,280 +798,325 @@ struct __pyx_obj_5pysam_10TabProxies_BedProxy {
 };
 
 
-/* "ctabix.pxd":248
- *      pass
+/* "TabProxies.pxd":83
+ *     cdef update( self, char * buffer, size_t nbytes )
+ * 
+ * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
  * 
- * cdef class TabixIteratorParsed:             # <<<<<<<<<<<<<<
- *     cdef ti_iter_t iterator
- *     cdef tabix_t * tabixfile
+ *     cdef:
  */
-struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed {
-  PyObject_HEAD
-  ti_iter_t iterator;
-  tabix_t *tabixfile;
-  struct __pyx_obj_5pysam_6ctabix_Parser *parser;
+struct __pyx_obj_5pysam_10TabProxies_VCFProxy {
+  struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+  char *contig;
+  uint32_t pos;
 };
 
 
-/* "pysam/cvcf.pyx":793
- *         if alt:
- *             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]
+/* "pysam/cvcf.pyx":95
+ * ###########################################################################################################
+ * 
+ * cdef class VCFRecord( TabProxies.TupleProxy):             # <<<<<<<<<<<<<<
+ *     '''vcf record.
+ * 
  */
-struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr {
-  PyObject_HEAD
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *__pyx_outer_scope;
-  PyObject *__pyx_v_allele;
-  PyObject *__pyx_t_0;
-  Py_ssize_t __pyx_t_1;
-  PyObject *(*__pyx_t_2)(PyObject *);
+struct __pyx_obj_5pysam_4cvcf_VCFRecord {
+  struct __pyx_obj_5pysam_10TabProxies_TupleProxy __pyx_base;
+  PyObject *vcf;
+  char *contig;
+  uint32_t pos;
 };
 
 
-/* "ctabix.pxd":245
- *      pass
+/* "pysam/cvcf.pyx":229
  * 
- * cdef class asVCF(Parser):             # <<<<<<<<<<<<<<
- *      pass
  * 
+ * cdef class asVCFRecord(ctabix.Parser):             # <<<<<<<<<<<<<<
+ *     '''converts a :term:`tabix row` into a VCF record.'''
+ *     cdef vcffile
  */
-struct __pyx_obj_5pysam_6ctabix_asVCF {
+struct __pyx_obj_5pysam_4cvcf_asVCFRecord {
   struct __pyx_obj_5pysam_6ctabix_Parser __pyx_base;
+  PyObject *vcffile;
 };
 
 
-/* "ctabix.pxd":224
- *     cdef Parser parser
+/* "pysam/cvcf.pyx":906
+ *         return line
  * 
- * cdef class TabixIterator:             # <<<<<<<<<<<<<<
- *     cdef ti_iter_t iterator
- *     cdef tabix_t * tabixfile
+ *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
+ *         # deal with files with header only
+ *         if line.startswith("##"): return
  */
-struct __pyx_obj_5pysam_6ctabix_TabixIterator {
+struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse {
   PyObject_HEAD
-  ti_iter_t iterator;
-  tabix_t *tabixfile;
+  PyObject *__pyx_v_d;
+  PyObject *__pyx_v_line;
+  PyObject *__pyx_v_self;
+  PyObject *__pyx_v_stream;
+  Py_ssize_t __pyx_t_0;
+  PyObject *__pyx_t_1;
+  PyObject *(*__pyx_t_2)(PyObject *);
 };
 
 
-/* "ctabix.pxd":228
- *     cdef tabix_t * tabixfile
+
+/* "ctabix.pxd":18
+ *     kstream_t, kstring_t, gzFile, tbx_t
  * 
- * cdef class TabixHeaderIterator:             # <<<<<<<<<<<<<<
- *     cdef ti_iter_t iterator
- *     cdef tabix_t * tabixfile
+ * cdef class tabix_file_iterator:             # <<<<<<<<<<<<<<
+ *     cdef gzFile fh
+ *     cdef kstream_t * kstream
  */
-struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator {
-  PyObject_HEAD
-  ti_iter_t iterator;
-  tabix_t *tabixfile;
+
+struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator {
+  PyObject *(*__pyx___cnext__)(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *);
 };
+static struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *__pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator;
 
 
-/* "TabProxies.pxd":83
- *     cdef update( self, char * buffer, size_t nbytes )
+/* "ctabix.pxd":43
+ *     cdef Parser parser
  * 
- * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class Parser:             # <<<<<<<<<<<<<<
+ *     cdef parse(self, char * buffer, int len)
  * 
- *     cdef:
  */
-struct __pyx_obj_5pysam_10TabProxies_VCFProxy {
-  struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
-  char *contig;
-  uint32_t pos;
-};
 
+struct __pyx_vtabstruct_5pysam_6ctabix_Parser {
+  PyObject *(*parse)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int);
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_Parser *__pyx_vtabptr_5pysam_6ctabix_Parser;
 
 
-/* "TabProxies.pxd":41
- *   ctypedef int uint64_t
+/* "ctabix.pxd":46
+ *     cdef parse(self, char * buffer, int len)
  * 
- * cdef class TupleProxy:             # <<<<<<<<<<<<<<
+ * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
+ *     cdef parse(self, char * buffer, int len)
  * 
- *     cdef:
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy {
-  int (*getMaxFields)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, size_t);
-  PyObject *(*take)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t);
-  PyObject *(*present)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t);
-  PyObject *(*copy)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t);
-  PyObject *(*update)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t);
+struct __pyx_vtabstruct_5pysam_6ctabix_asTuple {
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *__pyx_vtabptr_5pysam_10TabProxies_TupleProxy;
+static struct __pyx_vtabstruct_5pysam_6ctabix_asTuple *__pyx_vtabptr_5pysam_6ctabix_asTuple;
 
 
-/* "pysam/cvcf.pyx":95
- * ###########################################################################################################
+/* "ctabix.pxd":49
+ *     cdef parse(self, char * buffer, int len)
  * 
- * cdef class VCFRecord( TabProxies.TupleProxy):             # <<<<<<<<<<<<<<
- *     '''vcf record.
+ * cdef class asGTF(Parser):             # <<<<<<<<<<<<<<
+ *     pass
  * 
  */
 
-struct __pyx_vtabstruct_5pysam_4cvcf_VCFRecord {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
+struct __pyx_vtabstruct_5pysam_6ctabix_asGTF {
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_4cvcf_VCFRecord *__pyx_vtabptr_5pysam_4cvcf_VCFRecord;
+static struct __pyx_vtabstruct_5pysam_6ctabix_asGTF *__pyx_vtabptr_5pysam_6ctabix_asGTF;
 
 
-/* "TabProxies.pxd":69
- *     cdef char * getAttributes( self )
+/* "ctabix.pxd":52
+ *     pass
  * 
- * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class asBed(Parser):             # <<<<<<<<<<<<<<
  *     pass
  * 
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
+struct __pyx_vtabstruct_5pysam_6ctabix_asBed {
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy *__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy;
+static struct __pyx_vtabstruct_5pysam_6ctabix_asBed *__pyx_vtabptr_5pysam_6ctabix_asBed;
 
 
-/* "TabProxies.pxd":83
- *     cdef update( self, char * buffer, size_t nbytes )
+/* "ctabix.pxd":55
+ *     pass
  * 
- * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class asVCF(Parser):             # <<<<<<<<<<<<<<
+ *     pass
  * 
- *     cdef:
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+struct __pyx_vtabstruct_5pysam_6ctabix_asVCF {
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *__pyx_vtabptr_5pysam_10TabProxies_VCFProxy;
+static struct __pyx_vtabstruct_5pysam_6ctabix_asVCF *__pyx_vtabptr_5pysam_6ctabix_asVCF;
 
 
-/* "ctabix.pxd":232
- *     cdef tabix_t * tabixfile
- * 
- * cdef class Parser:             # <<<<<<<<<<<<<<
- *      cdef parse( self, char * buffer, int len )
+/* "ctabix.pxd":58
+ *     pass
  * 
+ * cdef class TabixIterator:             # <<<<<<<<<<<<<<
+ *     cdef hts_itr_t * iterator
+ *     cdef Tabixfile tabixfile
  */
 
-struct __pyx_vtabstruct_5pysam_6ctabix_Parser {
-  PyObject *(*parse)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int);
+struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator {
+  int (*__pyx___cnext__)(struct __pyx_obj_5pysam_6ctabix_TabixIterator *);
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_Parser *__pyx_vtabptr_5pysam_6ctabix_Parser;
+static struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator *__pyx_vtabptr_5pysam_6ctabix_TabixIterator;
 
 
-/* "ctabix.pxd":242
- *      pass
+/* "ctabix.pxd":64
+ *     cdef int __cnext__(self)
  * 
- * cdef class asBed(Parser):             # <<<<<<<<<<<<<<
- *      pass
+ * cdef class TabixIteratorParsed(TabixIterator):             # <<<<<<<<<<<<<<
+ *     cdef Parser parser
  * 
  */
 
-struct __pyx_vtabstruct_5pysam_6ctabix_asBed {
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_vtabstruct_5pysam_6ctabix_TabixIteratorParsed {
+  struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asBed *__pyx_vtabptr_5pysam_6ctabix_asBed;
+static struct __pyx_vtabstruct_5pysam_6ctabix_TabixIteratorParsed *__pyx_vtabptr_5pysam_6ctabix_TabixIteratorParsed;
 
 
-/* "ctabix.pxd":201
- *     int ks_getuntil( kstream_t *, int, kstring_t *, int * )
+/* "ctabix.pxd":67
+ *     cdef Parser parser
  * 
- * cdef class tabix_file_iterator:             # <<<<<<<<<<<<<<
- *     cdef gzFile fh
- *     cdef kstream_t * ks
+ * cdef class GZIterator:             # <<<<<<<<<<<<<<
+ *     cdef object _filename
+ *     cdef gzFile gzipfile
  */
 
-struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator {
-  PyObject *(*__pyx___cnext__)(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator *);
+struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator {
+  int (*__pyx___cnext__)(struct __pyx_obj_5pysam_6ctabix_GZIterator *);
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator *__pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator;
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator *__pyx_vtabptr_5pysam_6ctabix_GZIterator;
 
 
-/* "ctabix.pxd":245
- *      pass
+/* "ctabix.pxd":74
+ *     cdef int __cnext__(self)
  * 
- * cdef class asVCF(Parser):             # <<<<<<<<<<<<<<
- *      pass
+ * cdef class GZIteratorHead(GZIterator):             # <<<<<<<<<<<<<<
+ *     pass
  * 
  */
 
-struct __pyx_vtabstruct_5pysam_6ctabix_asVCF {
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorHead {
+  struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asVCF *__pyx_vtabptr_5pysam_6ctabix_asVCF;
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorHead *__pyx_vtabptr_5pysam_6ctabix_GZIteratorHead;
 
 
-/* "TabProxies.pxd":72
+/* "ctabix.pxd":77
  *     pass
  * 
- * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class GZIteratorParsed(GZIterator):             # <<<<<<<<<<<<<<
+ *     cdef Parser parser
+ * 
+ */
+
+struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorParsed {
+  struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorParsed *__pyx_vtabptr_5pysam_6ctabix_GZIteratorParsed;
+
+
+/* "TabProxies.pxd":41
+ *   ctypedef int uint64_t
+ * 
+ * cdef class TupleProxy:             # <<<<<<<<<<<<<<
  * 
  *     cdef:
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
+struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy {
+  int (*getMaxFields)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, size_t);
+  PyObject *(*take)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t);
+  PyObject *(*present)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t);
+  PyObject *(*copy)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t);
+  PyObject *(*update)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t);
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy *__pyx_vtabptr_5pysam_10TabProxies_BedProxy;
+static struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy *__pyx_vtabptr_5pysam_10TabProxies_TupleProxy;
 
 
-/* "pysam/cvcf.pyx":229
+/* "TabProxies.pxd":60
+ *     cdef update( self, char * buffer, size_t nbytes )
  * 
+ * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
  * 
- * cdef class asVCFRecord( ctabix.Parser ):             # <<<<<<<<<<<<<<
- *     '''converts a :term:`tabix row` into a VCF record.'''
- *     cdef vcffile
+ *     cdef:
  */
 
-struct __pyx_vtabstruct_5pysam_4cvcf_asVCFRecord {
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
+  char *(*getAttributes)(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *);
 };
-static struct __pyx_vtabstruct_5pysam_4cvcf_asVCFRecord *__pyx_vtabptr_5pysam_4cvcf_asVCFRecord;
+static struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *__pyx_vtabptr_5pysam_10TabProxies_GTFProxy;
 
 
-/* "ctabix.pxd":239
+/* "TabProxies.pxd":69
+ *     cdef char * getAttributes( self )
  * 
+ * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ *     pass
  * 
- * cdef class asGTF(Parser):             # <<<<<<<<<<<<<<
- *      pass
+ */
+
+struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy *__pyx_vtabptr_5pysam_10TabProxies_NamedTupleProxy;
+
+
+/* "TabProxies.pxd":72
+ *     pass
  * 
+ * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
+ * 
+ *     cdef:
  */
 
-struct __pyx_vtabstruct_5pysam_6ctabix_asGTF {
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asGTF *__pyx_vtabptr_5pysam_6ctabix_asGTF;
+static struct __pyx_vtabstruct_5pysam_10TabProxies_BedProxy *__pyx_vtabptr_5pysam_10TabProxies_BedProxy;
 
 
-/* "TabProxies.pxd":60
+/* "TabProxies.pxd":83
  *     cdef update( self, char * buffer, size_t nbytes )
  * 
- * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
+ * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
  * 
  *     cdef:
  */
 
-struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy {
-  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
-  char *(*getAttributes)(struct __pyx_obj_5pysam_10TabProxies_GTFProxy *);
+struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_NamedTupleProxy __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy *__pyx_vtabptr_5pysam_10TabProxies_GTFProxy;
+static struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy *__pyx_vtabptr_5pysam_10TabProxies_VCFProxy;
 
 
-/* "ctabix.pxd":235
- *      cdef parse( self, char * buffer, int len )
+/* "pysam/cvcf.pyx":95
+ * ###########################################################################################################
  * 
- * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
- *      cdef parse( self, char * buffer, int len )
+ * cdef class VCFRecord( TabProxies.TupleProxy):             # <<<<<<<<<<<<<<
+ *     '''vcf record.
  * 
  */
 
-struct __pyx_vtabstruct_5pysam_6ctabix_asTuple {
-  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+struct __pyx_vtabstruct_5pysam_4cvcf_VCFRecord {
+  struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy __pyx_base;
 };
-static struct __pyx_vtabstruct_5pysam_6ctabix_asTuple *__pyx_vtabptr_5pysam_6ctabix_asTuple;
-#ifndef CYTHON_REFNANNY
-  #define CYTHON_REFNANNY 0
+static struct __pyx_vtabstruct_5pysam_4cvcf_VCFRecord *__pyx_vtabptr_5pysam_4cvcf_VCFRecord;
+
+
+/* "pysam/cvcf.pyx":229
+ * 
+ * 
+ * cdef class asVCFRecord(ctabix.Parser):             # <<<<<<<<<<<<<<
+ *     '''converts a :term:`tabix row` into a VCF record.'''
+ *     cdef vcffile
+ */
+
+struct __pyx_vtabstruct_5pysam_4cvcf_asVCFRecord {
+  struct __pyx_vtabstruct_5pysam_6ctabix_Parser __pyx_base;
+};
+static struct __pyx_vtabstruct_5pysam_4cvcf_asVCFRecord *__pyx_vtabptr_5pysam_4cvcf_asVCFRecord;
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
 #endif
 #if CYTHON_REFNANNY
   typedef struct {
@@ -923,10 +1166,33 @@ static struct __pyx_vtabstruct_5pysam_6ctabix_asTuple *__pyx_vtabptr_5pysam_6cta
   #define __Pyx_XGOTREF(r)
   #define __Pyx_XGIVEREF(r)
 #endif /* CYTHON_REFNANNY */
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
 
 static 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*/
@@ -937,98 +1203,72 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
     const char* function_name); /*proto*/
 
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-    PyObject *r;
-    if (!j) return NULL;
-    r = PyObject_GetItem(o, j);
-    Py_DECREF(j);
-    return r;
-}
-#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
+
 #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-        PyObject *r = PyList_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
-    }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
 #else
-    return PySequence_GetItem(o, i);
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
 #endif
-}
-#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
+
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
+               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck);
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+
 #if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
-        PyObject *r = PyTuple_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
     }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-#else
-    return PySequence_GetItem(o, i);
-#endif
+    return PyList_Append(list, x);
 }
-#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (PyList_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-            PyObject *r = PyList_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    }
-    else if (PyTuple_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
-            PyObject *r = PyTuple_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    } else {  /* inlined PySequence_GetItem() */
-        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-        if (likely(m && m->sq_item)) {
-            if (unlikely(i < 0) && likely(m->sq_length)) {
-                Py_ssize_t l = m->sq_length(o);
-                if (unlikely(l < 0)) return NULL;
-                i += l;
-            }
-            return m->sq_item(o, i);
-        }
-    }
 #else
-    if (PySequence_Check(o)) {
-        return PySequence_GetItem(o, i);
-    }
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
 #endif
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-}
 
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+#include <string.h>
 
-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 CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
 
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
+
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
+#else
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
+#endif
 
 static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
 #if CYTHON_COMPILING_IN_PYPY
@@ -1044,13 +1284,34 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
 
 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
 
+#if PY_MAJOR_VERSION < 3
+#define __Pyx_PyString_Join __Pyx_PyBytes_Join
+#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
+#else
+#define __Pyx_PyString_Join PyUnicode_Join
+#define __Pyx_PyBaseString_Join PyUnicode_Join
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+    #if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyBytes_Join _PyString_Join
+    #else
+    #define __Pyx_PyBytes_Join _PyBytes_Join
+    #endif
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/
+#endif
+
 #if PY_MAJOR_VERSION >= 3
 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
     PyObject *value;
     value = PyDict_GetItemWithError(d, key);
     if (unlikely(!value)) {
-        if (!PyErr_Occurred())
-            PyErr_SetObject(PyExc_KeyError, key);
+        if (!PyErr_Occurred()) {
+            PyObject* args = PyTuple_Pack(1, key);
+            if (likely(args))
+                PyErr_SetObject(PyExc_KeyError, args);
+            Py_XDECREF(args);
+        }
         return NULL;
     }
     Py_INCREF(value);
@@ -1060,6 +1321,28 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
     #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
 #endif
 
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+        int has_cstart, int has_cstop, int wraparound);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_setattro))
+        return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_setattr))
+        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+    return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
 static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
     int result = PySequence_Contains(seq, item);
     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
@@ -1079,7 +1362,7 @@ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, i
 }
 
 #if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
     PyListObject* L = (PyListObject*) list;
     Py_ssize_t len = Py_SIZE(list);
     if (likely(L->allocated > len)) {
@@ -1091,25 +1374,40 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
     return PyList_Append(list, x);
 }
 #else
-#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
 #endif
 
 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */
 
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
-    if (likely(PyList_CheckExact(L))) {
-        if (unlikely(PyList_Append(L, x) < 0)) return NULL;
-        Py_INCREF(Py_None);
-        return Py_None; /* this is just to have an accurate signature */
-    } else {
-        PyObject *r, *m;
-        m = __Pyx_GetAttrString(L, "append");
-        if (!m) return NULL;
-        r = PyObject_CallFunctionObjArgs(m, x, NULL);
-        Py_DECREF(m);
-        return r;
-    }
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
+static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
+#else
+#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
+#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
+#endif
+
+static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
+    PyObject *method, *result = NULL;
+    if (unlikely(!args)) return NULL;
+    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+    if (unlikely(!method)) goto bad;
+    result = __Pyx_PyObject_Call(method, args, NULL);
+    Py_DECREF(method);
+bad:
+    Py_DECREF(args);
+    return result;
 }
+#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
+#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
+#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
+#define __Pyx_PyObject_CallMethod0(obj, name) \
+    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/
 
 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
 
@@ -1123,51 +1421,28 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict,
 static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                               PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
 
-#define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_SetItemInt_Fast(o, i, v) : \
-                                                    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
-static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
-    int r;
-    if (!j) return -1;
-    r = PyObject_SetItem(o, j, v);
-    Py_DECREF(j);
-    return r;
-}
-static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (PyList_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-            PyObject* old = PyList_GET_ITEM(o, n);
-            Py_INCREF(v);
-            PyList_SET_ITEM(o, n, v);
-            Py_DECREF(old);
-            return 1;
-        }
-    } else {  /* inlined PySequence_SetItem() */
-        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-        if (likely(m && m->sq_ass_item)) {
-            if (unlikely(i < 0) && likely(m->sq_length)) {
-                Py_ssize_t l = m->sq_length(o);
-                if (unlikely(l < 0)) return -1;
-                i += l;
-            }
-            return m->sq_ass_item(o, i, v);
-        }
-    }
-#else
-#if CYTHON_COMPILING_IN_PYPY
-    if (PySequence_Check(o) && !PyDict_Check(o)) {
-#else
-    if (PySequence_Check(o)) {
-#endif
-        return PySequence_SetItem(o, i, v);
-    }
-#endif
-    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
-}
+#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
+               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
+static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
+                                               int is_list, int wraparound, int boundscheck);
+
+static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
+
+static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
+
+static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
+
+static void* __Pyx_GetVtable(PyObject *dict); /*proto*/
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/
 
-static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
 
 #if PY_VERSION_HEX < 0x02050000
 #ifndef PyAnySet_CheckExact
@@ -1183,42 +1458,26 @@ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
 #define PySet_Contains(anyset, key) \
     PySequence_Contains((anyset), (key))
 #define PySet_Pop(set) \
-    PyObject_CallMethod(set, (char *)"pop", NULL)
+    PyObject_CallMethod((set), (char*)"pop", NULL)
 static CYTHON_INLINE int PySet_Clear(PyObject *set) {
-    PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
+    PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL);
     if (!ret) return -1;
     Py_DECREF(ret); return 0;
 }
 static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
-    PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
+    PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key);
     if (!ret) return -1;
     Py_DECREF(ret); return 0;
 }
 static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
-    PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
+    PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key);
     if (!ret) return -1;
     Py_DECREF(ret); return 0;
 }
 #endif /* PyAnySet_CheckExact (<= Py2.4) */
 #endif /* < Py2.5  */
 
-static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
-
-static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
-
-static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
-
-static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
-
-static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);
-
-static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/
-
-static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
-                                   PyObject *qualname, PyObject *modname); /*proto*/
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
 
 #define __Pyx_CyFunction_USED 1
 #include <structmember.h>
@@ -1235,67 +1494,56 @@ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *na
     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
 typedef struct {
     PyCFunctionObject func;
-    int flags;
     PyObject *func_dict;
     PyObject *func_weakreflist;
     PyObject *func_name;
     PyObject *func_qualname;
     PyObject *func_doc;
+    PyObject *func_globals;
     PyObject *func_code;
     PyObject *func_closure;
     PyObject *func_classobj; /* No-args super() class cell */
     void *defaults;
     int defaults_pyobjects;
-    PyObject *defaults_tuple; /* Const defaults tuple */
+    int flags;
+    PyObject *defaults_tuple;   /* Const defaults tuple */
+    PyObject *defaults_kwdict;  /* Const kwonly defaults dict */
     PyObject *(*defaults_getter)(PyObject *);
+    PyObject *func_annotations; /* function annotations dict */
 } __pyx_CyFunctionObject;
 static PyTypeObject *__pyx_CyFunctionType = 0;
-#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \
-    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code)
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
+    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
 static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                       int flags, PyObject* qualname,
-                                      PyObject *self, PyObject *module,
+                                      PyObject *self,
+                                      PyObject *module, PyObject *globals,
                                       PyObject* code);
 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                          size_t size,
                                                          int pyobjects);
 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                             PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+                                                             PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+                                                              PyObject *dict);
 static int __Pyx_CyFunction_init(void);
 
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t);
-
-static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+                                           PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/
 
-static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
-
-static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
-
-static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
-
-static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
-
-static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
-
-static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
-
-static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
-
-static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
-
-static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
-
-static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
-
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
 
-static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
 
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);
 
-static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
 
-static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
 
 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
@@ -1314,7 +1562,7 @@ typedef struct {
     PyObject *classobj;
     PyObject *yieldfrom;
     int resume_label;
-    char is_running;  // using T_BOOL for property below requires char value
+    char is_running;
 } __pyx_GeneratorObject;
 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                   PyObject *closure);
@@ -1340,9 +1588,7 @@ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
 
 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
 
-static void* __Pyx_GetVtable(PyObject *dict); /*proto*/
-
-static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/
 
 typedef struct {
     int code_line;
@@ -1364,17 +1610,30 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 
 
+/* Module declarations from 'libc.stdint' */
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libc.stdlib' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from 'pysam.chtslib' */
+
 /* Module declarations from 'pysam.ctabix' */
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_tabix_file_iterator = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_Tabixfile = 0;
-static PyTypeObject *__pyx_ptype_5pysam_6ctabix_TabixIterator = 0;
-static PyTypeObject *__pyx_ptype_5pysam_6ctabix_TabixHeaderIterator = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_Parser = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_asTuple = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_asGTF = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_asBed = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_asVCF = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6ctabix_TabixIterator = 0;
 static PyTypeObject *__pyx_ptype_5pysam_6ctabix_TabixIteratorParsed = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6ctabix_GZIterator = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6ctabix_GZIteratorHead = 0;
+static PyTypeObject *__pyx_ptype_5pysam_6ctabix_GZIteratorParsed = 0;
+static PyObject *(*__pyx_f_5pysam_6ctabix__force_str)(PyObject *); /*proto*/
 
 /* Module declarations from 'pysam.TabProxies' */
 static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_TupleProxy = 0;
@@ -1386,9 +1645,7 @@ static PyTypeObject *__pyx_ptype_5pysam_10TabProxies_VCFProxy = 0;
 /* Module declarations from 'pysam.cvcf' */
 static PyTypeObject *__pyx_ptype_5pysam_4cvcf_VCFRecord = 0;
 static PyTypeObject *__pyx_ptype_5pysam_4cvcf_asVCFRecord = 0;
-static PyTypeObject *__pyx_ptype_5pysam_4cvcf___pyx_scope_struct__parse_data = 0;
-static PyTypeObject *__pyx_ptype_5pysam_4cvcf___pyx_scope_struct_1_genexpr = 0;
-static PyTypeObject *__pyx_ptype_5pysam_4cvcf___pyx_scope_struct_2__parse = 0;
+static PyTypeObject *__pyx_ptype_5pysam_4cvcf___pyx_scope_struct___parse = 0;
 #define __Pyx_MODULE_NAME "pysam.cvcf"
 int __pyx_module_is_main_pysam__cvcf = 0;
 
@@ -1421,17 +1678,12 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6format___get__(struct __pyx_o
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_7samples___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
 static int __pyx_pf_5pysam_4cvcf_11asVCFRecord___init__(struct __pyx_obj_5pysam_4cvcf_asVCFRecord *__pyx_v_self, PyObject *__pyx_v_vcffile); /* proto */
-static PyObject *__pyx_pf_5pysam_4cvcf_11asVCFRecord_2__call__(struct __pyx_obj_5pysam_4cvcf_asVCFRecord *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len); /* proto */
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_85__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v__copy, PyObject *__pyx_v_reference, PyObject *__pyx_v_regions, PyObject *__pyx_v_lines, PyObject *__pyx_v_leftalign); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt); /* proto */
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_87__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_format, PyObject *__pyx_v_filter); /* proto */
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_89__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt, PyObject *__pyx_v_filter); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_alt); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_key, PyObject *__pyx_v_data, PyObject *__pyx_v_line); /* proto */
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_91__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_format, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_separator); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_14enter_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line); /* proto */
@@ -1442,8 +1694,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_26convertGTback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_GTdata); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_line); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_pos); /* proto */
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_93__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10parse_data_genexpr(PyObject *__pyx_self); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_lineparse); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_34write_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_data); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
@@ -1470,879 +1720,901 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObje
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_79connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_81fetch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_83validate(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_record); /* proto */
-static char __pyx_k_1[] = "";
-static char __pyx_k_2[] = ",";
-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_24[] = " in line %s: '%s'\n%s %s: %s\n";
-static char __pyx_k_25[] = "<";
-static char __pyx_k_27[] = "V40_MISSING_ANGLE_BRACKETS";
-static char __pyx_k_28[] = ">";
-static char __pyx_k_32[] = "\"";
-static char __pyx_k_36[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS";
-static char __pyx_k_37[] = "BADLY_FORMATTED_FORMAT_STRING";
-static char __pyx_k_38[] = "ID=";
-static char __pyx_k_39[] = "Number=";
-static char __pyx_k_40[] = "Type=";
-static char __pyx_k_41[] = "Description=";
-static char __pyx_k_50[] = "FORMAT_MISSING_QUOTES";
-static char __pyx_k_53[] = "#alleles";
-static char __pyx_k_54[] = "#nonref_alleles";
-static char __pyx_k_55[] = "#genotypes";
-static char __pyx_k_56[] = "#phased_genotypes";
-static char __pyx_k_57[] = "ZERO_FOR_NON_FLAG_FIELD";
-static char __pyx_k_58[] = "Unknown number type encountered: %s";
-static char __pyx_k_59[] = "%s=%s";
-static char __pyx_k_60[] = "(Undefined tag)";
-static char __pyx_k_61[] = "(output)";
-static char __pyx_k_64[] = "Read depth at this position for this sample";
-static char __pyx_k_65[] = "Sample Genotype Filter";
-static char __pyx_k_66[] = "Genotype likelihoods";
-static char __pyx_k_67[] = "Genotype Quality";
-static char __pyx_k_68[] = "Phred-scaled genotype likelihoods";
-static char __pyx_k_69[] = "Genotype posterior probabilities";
-static char __pyx_k_70[] = "Conditional genotype quality";
-static char __pyx_k_71[] = "Haplotype Quality";
-static char __pyx_k_72[] = "Phase set";
-static char __pyx_k_73[] = "Phasing quality";
-static char __pyx_k_74[] = "Expected alternate allel counts";
-static char __pyx_k_75[] = "RMS mapping quality";
-static char __pyx_k_76[] = "##";
-static char __pyx_k_79[] = "VCFv3.3";
-static char __pyx_k_80[] = "VCFv4.0";
-static char __pyx_k_81[] = "VCFv4.1";
-static char __pyx_k_82[] = "UNKNOWN_FORMAT_STRING";
-static char __pyx_k_83[] = "##fileformat=VCFv%s.%s\n";
-static char __pyx_k_84[] = "##%s=%s\n";
-static char __pyx_k_85[] = "#";
-static char __pyx_k_88[] = "\t";
-static char __pyx_k_90[] = "HEADING_NOT_SEPARATED_BY_TABS";
-static char __pyx_k_91[] = "(%sth entry not found)";
-static char __pyx_k_92[] = "(found %s, expected %s)";
-static char __pyx_k_93[] = "BADLY_FORMATTED_HEADING";
-static char __pyx_k_94[] = "\n";
-static char __pyx_k_95[] = "|";
-static char __pyx_k_96[] = "ERROR_FLAG_HAS_VALUE";
-static char __pyx_k__0[] = "0";
-static char __pyx_k__A[] = "A";
-static char __pyx_k__D[] = "D";
-static char __pyx_k__G[] = "G";
-static char __pyx_k__I[] = "I";
-static char __pyx_k__N[] = "N";
-static char __pyx_k__a[] = "a";
-static char __pyx_k__c[] = "c";
-static char __pyx_k__d[] = "d";
-static char __pyx_k__f[] = "f";
-static char __pyx_k__i[] = "i";
-static char __pyx_k__k[] = "k";
-static char __pyx_k__l[] = "l";
-static char __pyx_k__n[] = "n";
-static char __pyx_k__r[] = "r";
-static char __pyx_k__s[] = "s";
-static char __pyx_k__t[] = "t";
-static char __pyx_k__v[] = "v";
-static char __pyx_k__x[] = "x";
-static char __pyx_k__y[] = "y";
-static char __pyx_k_100[] = "ERROR_FORMAT_NOT_INTEGER";
-static char __pyx_k_101[] = "ERROR_FORMAT_NOT_CHAR";
-static char __pyx_k_102[] = "ERROR_FORMAT_NOT_NUMERICAL";
-static char __pyx_k_104[] = "BAD_NUMBER_OF_COLUMNS";
-static char __pyx_k_105[] = "expected %s for %s samples (%s), got %s";
-static char __pyx_k_106[] = "(reference is %s, VCF says %s)";
-static char __pyx_k_114[] = "V33_UNMATCHED_DELETION";
-static char __pyx_k_115[] = "(deletion is %s, reference is %s)";
-static char __pyx_k_116[] = "MISSING_INDEL_ALLELE_REF_BASE";
-static char __pyx_k_118[] = "Required key %s not found in data";
-static char __pyx_k_121[] = "enter_default_format";
-static char __pyx_k_123[] = "Can only handle v3.3 and v4.0 VCF files";
-static char __pyx_k_125[] = "Invalid error string: %s";
-static char __pyx_k_126[] = "needs to be checked";
-static char __pyx_k_128[] = "[|/\\\\]";
-static char __pyx_k_130[] = "^[ACGTN]+$";
-static char __pyx_k_134[] = "/home/andreas/devel/pysam/pysam/cvcf.pyx";
-static char __pyx_k_135[] = "pysam.cvcf";
-static char __pyx_k_138[] = "id numbertype number type description missingvalue";
-static char __pyx_k_140[] = "UNKNOWN_FORMAT_STRING:Unknown file format identifier";
-static char __pyx_k_141[] = "BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string";
-static char __pyx_k_142[] = "BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s";
-static char __pyx_k_143[] = "BAD_NUMBER_OF_COLUMNS:Wrong number of columns found (%s)";
-static char __pyx_k_144[] = "POS_NOT_NUMERICAL:Position column is not numerical";
-static char __pyx_k_145[] = "UNKNOWN_CHAR_IN_REF:Unknown character in reference field";
-static char __pyx_k_146[] = "V33_BAD_REF:Reference should be single-character in v3.3 VCF";
-static char __pyx_k_147[] = "V33_BAD_ALLELE:Cannot interpret allele for v3.3 VCF";
-static char __pyx_k_148[] = "POS_NOT_POSITIVE:Position field must be >0";
-static char __pyx_k_149[] = "QUAL_NOT_NUMERICAL:Quality field must be numerical, or '.'";
-static char __pyx_k_150[] = "ERROR_INFO_STRING:Error while parsing info field";
-static char __pyx_k_151[] = "ERROR_UNKNOWN_KEY:Unknown key (%s) found in formatted field (info; format; or filter)";
-static char __pyx_k_152[] = "ERROR_FORMAT_NOT_NUMERICAL:Expected integer or float in formatted field; got %s";
-static char __pyx_k_153[] = "ERROR_FORMAT_NOT_CHAR:Eexpected character in formatted field; got string";
-static char __pyx_k_154[] = "FILTER_NOT_DEFINED:Identifier (%s) in filter found which was not defined in header";
-static char __pyx_k_155[] = "FORMAT_NOT_DEFINED:Identifier (%s) in format found which was not defined in header";
-static char __pyx_k_156[] = "BAD_NUMBER_OF_VALUES:Found too many of values in sample column (%s)";
-static char __pyx_k_157[] = "BAD_NUMBER_OF_PARAMETERS:Found unexpected number of parameters (%s)";
-static char __pyx_k_158[] = "BAD_GENOTYPE:Cannot parse genotype (%s)";
-static char __pyx_k_159[] = "V40_BAD_ALLELE:Bad allele found for v4.0 VCF (%s)";
-static char __pyx_k_160[] = "MISSING_REF:Reference allele missing";
-static char __pyx_k_161[] = "V33_UNMATCHED_DELETION:Deleted sequence does not match reference (%s)";
-static char __pyx_k_162[] = "V40_MISSING_ANGLE_BRACKETS:Format definition is not deliminted by angular brackets";
-static char __pyx_k_163[] = "FORMAT_MISSING_QUOTES:Description field in format definition is not surrounded by quotes";
-static char __pyx_k_164[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS:Fields in v4.0 VCF format definition must have named fields";
-static char __pyx_k_165[] = "HEADING_NOT_SEPARATED_BY_TABS:Heading line appears separated by spaces, not tabs";
-static char __pyx_k_166[] = "WRONG_REF:Wrong reference %s";
-static char __pyx_k_167[] = "ERROR_TRAILING_DATA:Numerical field ('%s') has semicolon-separated trailing data";
-static char __pyx_k_168[] = "BAD_CHR_TAG:Error calculating chr tag for %s";
-static char __pyx_k_169[] = "ZERO_LENGTH_ALLELE:Found zero-length allele";
-static char __pyx_k_170[] = "MISSING_INDEL_ALLELE_REF_BASE:Indel alleles must begin with single reference base";
-static char __pyx_k_171[] = "ZERO_FOR_NON_FLAG_FIELD: number set to 0, but type is not 'FLAG'";
-static char __pyx_k_172[] = "ERROR_FORMAT_NOT_INTEGER:Expected integer in formatted field; got %s";
-static char __pyx_k_173[] = "ERROR_FLAG_HAS_VALUE:Flag fields should not have a value";
-static char __pyx_k_176[] = "VCF.__init__";
-static char __pyx_k_180[] = "VCF.error";
-static char __pyx_k_183[] = "VCF.parse_format";
-static char __pyx_k_186[] = "VCF.format_format";
-static char __pyx_k_189[] = "VCF.get_expected";
-static char __pyx_k_192[] = "VCF._add_definition";
-static char __pyx_k_195[] = "VCF.format_formatdata";
-static char __pyx_k_198[] = "VCF.enter_default_format";
-static char __pyx_k_201[] = "VCF.parse_header";
-static char __pyx_k_204[] = "VCF.write_header";
-static char __pyx_k_207[] = "VCF.parse_heading";
-static char __pyx_k_210[] = "VCF.write_heading";
-static char __pyx_k_213[] = "VCF.convertGT";
-static char __pyx_k_216[] = "VCF.convertGTback";
-static char __pyx_k_219[] = "VCF.parse_formatdata";
-static char __pyx_k_222[] = "VCF.inregion";
-static char __pyx_k_225[] = "VCF.parse_data";
-static char __pyx_k_228[] = "VCF.write_data";
-static char __pyx_k_231[] = "VCF._parse_header";
-static char __pyx_k_234[] = "VCF._parse";
-static char __pyx_k_237[] = "VCF.getsamples";
-static char __pyx_k_240[] = "VCF.setsamples";
-static char __pyx_k_243[] = "VCF.getheader";
-static char __pyx_k_246[] = "VCF.setheader";
-static char __pyx_k_249[] = "VCF.getinfo";
-static char __pyx_k_252[] = "VCF.setinfo";
-static char __pyx_k_255[] = "VCF.getformat";
-static char __pyx_k_258[] = "VCF.setformat";
-static char __pyx_k_261[] = "VCF.getfilter";
-static char __pyx_k_264[] = "VCF.setfilter";
-static char __pyx_k_267[] = "VCF.setversion";
-static char __pyx_k_270[] = "VCF.setregions";
-static char __pyx_k_273[] = "VCF.setreference";
-static char __pyx_k_276[] = "VCF.ignoreerror";
-static char __pyx_k_279[] = "VCF.warnerror";
-static char __pyx_k_282[] = "VCF.parse";
-static char __pyx_k_285[] = "VCF.write";
-static char __pyx_k_288[] = "VCF.writeheader";
-static char __pyx_k_291[] = "VCF.compare_calls";
-static char __pyx_k_294[] = "VCF.connect";
-static char __pyx_k_298[] = "VCF.fetch";
-static char __pyx_k_301[] = "VCF.validate";
-static char __pyx_k__DP[] = "DP";
-static char __pyx_k__EC[] = "EC";
-static char __pyx_k__FT[] = "FT";
-static char __pyx_k__GL[] = "GL";
-static char __pyx_k__GP[] = "GP";
-static char __pyx_k__GQ[] = "GQ";
-static char __pyx_k__GT[] = "GT";
-static char __pyx_k__HQ[] = "HQ";
-static char __pyx_k__ID[] = "ID";
-static char __pyx_k__MQ[] = "MQ";
-static char __pyx_k__PL[] = "PL";
-static char __pyx_k__PQ[] = "PQ";
-static char __pyx_k__PS[] = "PS";
-static char __pyx_k__fa[] = "fa";
-static char __pyx_k__id[] = "id";
-static char __pyx_k__na[] = "na";
-static char __pyx_k__re[] = "re";
-static char __pyx_k__ALT[] = "ALT";
-static char __pyx_k__GLE[] = "GLE";
-static char __pyx_k__POS[] = "POS";
-static char __pyx_k__REF[] = "REF";
-static char __pyx_k__VCF[] = "VCF";
-static char __pyx_k__add[] = "add";
-static char __pyx_k__alt[] = "alt";
-static char __pyx_k__end[] = "end";
-static char __pyx_k__err[] = "err";
-static char __pyx_k__fmt[] = "fmt";
-static char __pyx_k__get[] = "get";
-static char __pyx_k__gts[] = "gts";
-static char __pyx_k__idx[] = "idx";
-static char __pyx_k__key[] = "key";
-static char __pyx_k__len[] = "len";
-static char __pyx_k__map[] = "map";
-static char __pyx_k__min[] = "min";
-static char __pyx_k__nmb[] = "nmb";
-static char __pyx_k__opt[] = "opt";
-static char __pyx_k__pos[] = "pos";
-static char __pyx_k__ref[] = "ref";
-static char __pyx_k__sys[] = "sys";
-static char __pyx_k__var[] = "var";
-static char __pyx_k__vcf[] = "vcf";
-static char __pyx_k__zip[] = "zip";
-static char __pyx_k__Flag[] = "Flag";
-static char __pyx_k__INFO[] = "INFO";
-static char __pyx_k__PASS[] = "PASS";
-static char __pyx_k__QUAL[] = "QUAL";
-static char __pyx_k__Type[] = "Type";
-static char __pyx_k__addn[] = "addn";
-static char __pyx_k__alt1[] = "alt1";
-static char __pyx_k__alt2[] = "alt2";
-static char __pyx_k__cols[] = "cols";
-static char __pyx_k__copy[] = "copy";
-static char __pyx_k__data[] = "data";
-static char __pyx_k__dict[] = "dict";
-static char __pyx_k__elts[] = "elts";
-static char __pyx_k__find[] = "find";
-static char __pyx_k__info[] = "info";
-static char __pyx_k__join[] = "join";
-static char __pyx_k__keys[] = "keys";
-static char __pyx_k__last[] = "last";
-static char __pyx_k__left[] = "left";
-static char __pyx_k__line[] = "line";
-static char __pyx_k__pos1[] = "pos1";
-static char __pyx_k__pos2[] = "pos2";
-static char __pyx_k__qual[] = "qual";
-static char __pyx_k__ref1[] = "ref1";
-static char __pyx_k__ref2[] = "ref2";
-static char __pyx_k__rest[] = "rest";
-static char __pyx_k__self[] = "self";
-static char __pyx_k__type[] = "type";
-static char __pyx_k__ACGTN[] = "ACGTN";
-static char __pyx_k__CHROM[] = "CHROM";
-static char __pyx_k__Error[] = "Error";
-static char __pyx_k__Float[] = "Float";
-static char __pyx_k___copy[] = "_copy";
-static char __pyx_k___info[] = "_info";
-static char __pyx_k___line[] = "_line";
-static char __pyx_k__addns[] = "addns";
-static char __pyx_k__blurp[] = "blurp";
-static char __pyx_k__chrom[] = "chrom";
-static char __pyx_k__descr[] = "descr";
-static char __pyx_k__error[] = "error";
-static char __pyx_k__faref[] = "faref";
-static char __pyx_k__fetch[] = "fetch";
-static char __pyx_k__first[] = "first";
-static char __pyx_k__ielts[] = "ielts";
-static char __pyx_k__label[] = "label";
-static char __pyx_k__lines[] = "lines";
-static char __pyx_k__match[] = "match";
-static char __pyx_k__parse[] = "parse";
-static char __pyx_k__pysam[] = "pysam";
-static char __pyx_k__range[] = "range";
-static char __pyx_k__sdata[] = "sdata";
-static char __pyx_k__split[] = "split";
-static char __pyx_k__start[] = "start";
-static char __pyx_k__strip[] = "strip";
-static char __pyx_k__upper[] = "upper";
-static char __pyx_k__value[] = "value";
-static char __pyx_k__write[] = "write";
-static char __pyx_k__FILTER[] = "FILTER";
-static char __pyx_k__FORMAT[] = "FORMAT";
-static char __pyx_k__GTdata[] = "GTdata";
-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__allele[] = "allele";
-static char __pyx_k__bisect[] = "bisect";
-static char __pyx_k__buffer[] = "buffer";
-static char __pyx_k__filter[] = "filter";
-static char __pyx_k__format[] = "format";
-static char __pyx_k__header[] = "header";
-static char __pyx_k__number[] = "number";
-static char __pyx_k__object[] = "object";
-static char __pyx_k__output[] = "output";
-static char __pyx_k__parser[] = "parser";
-static char __pyx_k__record[] = "record";
-static char __pyx_k__region[] = "region";
-static char __pyx_k__result[] = "result";
-static char __pyx_k__sample[] = "sample";
-static char __pyx_k__stream[] = "stream";
-static char __pyx_k__string[] = "string";
-static char __pyx_k__values[] = "values";
-static char __pyx_k__Integer[] = "Integer";
-static char __pyx_k__Warning[] = "Warning";
-static char __pyx_k____all__[] = "__all__";
-static char __pyx_k___errors[] = "_errors";
-static char __pyx_k___filter[] = "_filter";
-static char __pyx_k___format[] = "_format";
-static char __pyx_k___header[] = "_header";
-static char __pyx_k___lineno[] = "_lineno";
-static char __pyx_k__compile[] = "compile";
-static char __pyx_k__connect[] = "connect";
-static char __pyx_k__errwarn[] = "errwarn";
-static char __pyx_k__genexpr[] = "genexpr";
-static char __pyx_k__getinfo[] = "getinfo";
-static char __pyx_k__longest[] = "longest";
-static char __pyx_k__missing[] = "missing";
-static char __pyx_k__movable[] = "movable";
-static char __pyx_k__newalts[] = "newalts";
-static char __pyx_k__regions[] = "regions";
-static char __pyx_k__replace[] = "replace";
-static char __pyx_k__samples[] = "samples";
-static char __pyx_k__setinfo[] = "setinfo";
-static char __pyx_k__vcffile[] = "vcffile";
-static char __pyx_k__version[] = "version";
-static char __pyx_k__GTstring[] = "GTstring";
-static char __pyx_k__Genotype[] = "Genotype";
-static char __pyx_k__KeyError[] = "KeyError";
-static char __pyx_k____dict__[] = "__dict__";
-static char __pyx_k____init__[] = "__init__";
-static char __pyx_k____main__[] = "__main__";
-static char __pyx_k____test__[] = "__test__";
-static char __pyx_k___regions[] = "_regions";
-static char __pyx_k___samples[] = "_samples";
-static char __pyx_k___version[] = "_version";
-static char __pyx_k__deepcopy[] = "deepcopy";
-static char __pyx_k__endswith[] = "endswith";
-static char __pyx_k__expected[] = "expected";
-static char __pyx_k__filename[] = "filename";
-static char __pyx_k__gtsRegEx[] = "gtsRegEx";
-static char __pyx_k__headings[] = "headings";
-static char __pyx_k__inregion[] = "inregion";
-static char __pyx_k__operator[] = "operator";
-static char __pyx_k__required[] = "required";
-static char __pyx_k__sequence[] = "sequence";
-static char __pyx_k__shortest[] = "shortest";
-static char __pyx_k__validate[] = "validate";
-static char __pyx_k__Character[] = "Character";
-static char __pyx_k__NT_NUMBER[] = "NT_NUMBER";
-static char __pyx_k__Tabixfile[] = "Tabixfile";
-static char __pyx_k__VCFRecord[] = "VCFRecord";
-static char __pyx_k__WRONG_REF[] = "WRONG_REF";
-static char __pyx_k___required[] = "_required";
-static char __pyx_k__convertGT[] = "convertGT";
-static char __pyx_k__enumerate[] = "enumerate";
-static char __pyx_k__getfilter[] = "getfilter";
-static char __pyx_k__getformat[] = "getformat";
-static char __pyx_k__getheader[] = "getheader";
-static char __pyx_k__last_line[] = "last_line";
-static char __pyx_k__leftalign[] = "leftalign";
-static char __pyx_k__lineparse[] = "lineparse";
-static char __pyx_k__reference[] = "reference";
-static char __pyx_k__separator[] = "separator";
-static char __pyx_k__setfilter[] = "setfilter";
-static char __pyx_k__setformat[] = "setformat";
-static char __pyx_k__setheader[] = "setheader";
-static char __pyx_k__tabixfile[] = "tabixfile";
-static char __pyx_k__warnerror[] = "warnerror";
-static char __pyx_k__NT_ALLELES[] = "NT_ALLELES";
-static char __pyx_k__NT_UNKNOWN[] = "NT_UNKNOWN";
-static char __pyx_k__ValueError[] = "ValueError";
-static char __pyx_k___leftalign[] = "_leftalign";
-static char __pyx_k___reference[] = "_reference";
-static char __pyx_k__errorlabel[] = "errorlabel";
-static char __pyx_k__fileformat[] = "fileformat";
-static char __pyx_k__formatdict[] = "formatdict";
-static char __pyx_k__getsamples[] = "getsamples";
-static char __pyx_k__itemgetter[] = "itemgetter";
-static char __pyx_k__itervalues[] = "itervalues";
-static char __pyx_k__namedtuple[] = "namedtuple";
-static char __pyx_k__numbertype[] = "numbertype";
-static char __pyx_k__parse_data[] = "parse_data";
-static char __pyx_k__setregions[] = "setregions";
-static char __pyx_k__setsamples[] = "setsamples";
-static char __pyx_k__setversion[] = "setversion";
-static char __pyx_k__startswith[] = "startswith";
-static char __pyx_k__write_data[] = "write_data";
-static char __pyx_k__Description[] = "Description";
-static char __pyx_k__MISSING_REF[] = "MISSING_REF";
-static char __pyx_k__V33_BAD_REF[] = "V33_BAD_REF";
-static char __pyx_k__alleleRegEx[] = "alleleRegEx";
-static char __pyx_k__collections[] = "collections";
-static char __pyx_k__defaultdict[] = "defaultdict";
-static char __pyx_k__description[] = "description";
-static char __pyx_k__errorstring[] = "errorstring";
-static char __pyx_k__ignoreerror[] = "ignoreerror";
-static char __pyx_k__writeheader[] = "writeheader";
-static char __pyx_k__BAD_GENOTYPE[] = "BAD_GENOTYPE";
-static char __pyx_k__NT_GENOTYPES[] = "NT_GENOTYPES";
-static char __pyx_k___warn_errors[] = "_warn_errors";
-static char __pyx_k__get_expected[] = "get_expected";
-static char __pyx_k__get_sequence[] = "get_sequence";
-static char __pyx_k__missingvalue[] = "missingvalue";
-static char __pyx_k__parse_format[] = "parse_format";
-static char __pyx_k__parse_header[] = "parse_header";
-static char __pyx_k__setreference[] = "setreference";
-static char __pyx_k__write_header[] = "write_header";
-static char __pyx_k__NT_NR_ALLELES[] = "NT_NR_ALLELES";
-static char __pyx_k__StopIteration[] = "StopIteration";
-static char __pyx_k___parse_header[] = "_parse_header";
-static char __pyx_k__compare_calls[] = "compare_calls";
-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";
-static char __pyx_k___sample2column[] = "_sample2column";
-static char __pyx_k__have_deletions[] = "have_deletions";
-static char __pyx_k___add_definition[] = "_add_definition";
-static char __pyx_k___ignored_errors[] = "_ignored_errors";
-static char __pyx_k__faref_leftflank[] = "faref_leftflank";
-static char __pyx_k__POS_NOT_POSITIVE[] = "POS_NOT_POSITIVE";
-static char __pyx_k__parse_formatdata[] = "parse_formatdata";
-static char __pyx_k__ERROR_INFO_STRING[] = "ERROR_INFO_STRING";
-static char __pyx_k__ERROR_UNKNOWN_KEY[] = "ERROR_UNKNOWN_KEY";
-static char __pyx_k__POS_NOT_NUMERICAL[] = "POS_NOT_NUMERICAL";
-static char __pyx_k__format_formatdata[] = "format_formatdata";
-static char __pyx_k__FILTER_NOT_DEFINED[] = "FILTER_NOT_DEFINED";
-static char __pyx_k__FORMAT_NOT_DEFINED[] = "FORMAT_NOT_DEFINED";
-static char __pyx_k__QUAL_NOT_NUMERICAL[] = "QUAL_NOT_NUMERICAL";
-static char __pyx_k__ZERO_LENGTH_ALLELE[] = "ZERO_LENGTH_ALLELE";
-static char __pyx_k__ERROR_TRAILING_DATA[] = "ERROR_TRAILING_DATA";
-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_n_s_100;
-static PyObject *__pyx_n_s_101;
-static PyObject *__pyx_n_s_102;
-static PyObject *__pyx_n_s_104;
-static PyObject *__pyx_kp_s_105;
-static PyObject *__pyx_kp_s_106;
-static PyObject *__pyx_kp_s_11;
-static PyObject *__pyx_n_s_114;
-static PyObject *__pyx_kp_s_115;
-static PyObject *__pyx_n_s_116;
-static PyObject *__pyx_kp_s_118;
-static PyObject *__pyx_n_s_121;
-static PyObject *__pyx_kp_s_123;
-static PyObject *__pyx_kp_s_125;
-static PyObject *__pyx_kp_s_126;
-static PyObject *__pyx_kp_s_128;
-static PyObject *__pyx_kp_s_130;
-static PyObject *__pyx_kp_s_134;
-static PyObject *__pyx_n_s_135;
-static PyObject *__pyx_kp_s_138;
-static PyObject *__pyx_kp_s_14;
-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_kp_s_163;
-static PyObject *__pyx_kp_s_164;
-static PyObject *__pyx_kp_s_165;
-static PyObject *__pyx_kp_s_166;
-static PyObject *__pyx_kp_s_167;
-static PyObject *__pyx_kp_s_168;
-static PyObject *__pyx_kp_s_169;
-static PyObject *__pyx_kp_s_170;
-static PyObject *__pyx_kp_s_171;
-static PyObject *__pyx_kp_s_172;
-static PyObject *__pyx_kp_s_173;
-static PyObject *__pyx_n_s_176;
-static PyObject *__pyx_n_s_18;
-static PyObject *__pyx_n_s_180;
-static PyObject *__pyx_n_s_183;
-static PyObject *__pyx_n_s_186;
-static PyObject *__pyx_n_s_189;
-static PyObject *__pyx_kp_s_19;
-static PyObject *__pyx_n_s_192;
-static PyObject *__pyx_n_s_195;
-static PyObject *__pyx_n_s_198;
-static PyObject *__pyx_kp_s_2;
-static PyObject *__pyx_n_s_20;
-static PyObject *__pyx_n_s_201;
-static PyObject *__pyx_n_s_204;
-static PyObject *__pyx_n_s_207;
-static PyObject *__pyx_kp_s_21;
-static PyObject *__pyx_n_s_210;
-static PyObject *__pyx_n_s_213;
-static PyObject *__pyx_n_s_216;
-static PyObject *__pyx_n_s_219;
-static PyObject *__pyx_n_s_222;
-static PyObject *__pyx_n_s_225;
-static PyObject *__pyx_n_s_228;
-static PyObject *__pyx_n_s_231;
-static PyObject *__pyx_n_s_234;
-static PyObject *__pyx_n_s_237;
-static PyObject *__pyx_kp_s_24;
-static PyObject *__pyx_n_s_240;
-static PyObject *__pyx_n_s_243;
-static PyObject *__pyx_n_s_246;
-static PyObject *__pyx_n_s_249;
-static PyObject *__pyx_kp_s_25;
-static PyObject *__pyx_n_s_252;
-static PyObject *__pyx_n_s_255;
-static PyObject *__pyx_n_s_258;
-static PyObject *__pyx_n_s_261;
-static PyObject *__pyx_n_s_264;
-static PyObject *__pyx_n_s_267;
-static PyObject *__pyx_n_s_27;
-static PyObject *__pyx_n_s_270;
-static PyObject *__pyx_n_s_273;
-static PyObject *__pyx_n_s_276;
-static PyObject *__pyx_n_s_279;
-static PyObject *__pyx_kp_s_28;
-static PyObject *__pyx_n_s_282;
-static PyObject *__pyx_n_s_285;
-static PyObject *__pyx_n_s_288;
-static PyObject *__pyx_n_s_291;
-static PyObject *__pyx_n_s_294;
-static PyObject *__pyx_n_s_298;
-static PyObject *__pyx_n_s_301;
-static PyObject *__pyx_kp_s_32;
-static PyObject *__pyx_n_s_36;
-static PyObject *__pyx_n_s_37;
-static PyObject *__pyx_kp_s_38;
-static PyObject *__pyx_kp_s_39;
-static PyObject *__pyx_kp_s_4;
-static PyObject *__pyx_kp_s_40;
-static PyObject *__pyx_kp_s_41;
-static PyObject *__pyx_n_s_50;
-static PyObject *__pyx_kp_s_53;
-static PyObject *__pyx_kp_s_54;
-static PyObject *__pyx_kp_s_55;
-static PyObject *__pyx_kp_s_56;
-static PyObject *__pyx_n_s_57;
-static PyObject *__pyx_kp_s_58;
-static PyObject *__pyx_kp_s_59;
-static PyObject *__pyx_kp_s_6;
-static PyObject *__pyx_kp_s_60;
-static PyObject *__pyx_kp_s_61;
-static PyObject *__pyx_kp_s_64;
-static PyObject *__pyx_kp_s_65;
-static PyObject *__pyx_kp_s_66;
-static PyObject *__pyx_kp_s_67;
-static PyObject *__pyx_kp_s_68;
-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_79;
-static PyObject *__pyx_kp_s_8;
-static PyObject *__pyx_kp_s_80;
-static PyObject *__pyx_kp_s_81;
-static PyObject *__pyx_n_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_88;
-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_n_s_93;
-static PyObject *__pyx_kp_s_94;
-static PyObject *__pyx_kp_s_95;
-static PyObject *__pyx_n_s_96;
-static PyObject *__pyx_kp_b__0;
-static PyObject *__pyx_kp_s__0;
-static PyObject *__pyx_n_s__A;
-static PyObject *__pyx_n_s__ACGTN;
-static PyObject *__pyx_n_s__ALT;
-static PyObject *__pyx_n_s__BAD_GENOTYPE;
-static PyObject *__pyx_n_s__CHROM;
-static PyObject *__pyx_n_s__Character;
-static PyObject *__pyx_n_s__D;
-static PyObject *__pyx_n_s__DP;
-static PyObject *__pyx_n_s__Description;
-static PyObject *__pyx_n_s__EC;
-static PyObject *__pyx_n_s__ERROR_INFO_STRING;
-static PyObject *__pyx_n_s__ERROR_TRAILING_DATA;
-static PyObject *__pyx_n_s__ERROR_UNKNOWN_KEY;
-static PyObject *__pyx_n_s__Error;
-static PyObject *__pyx_n_s__FILTER;
-static PyObject *__pyx_n_s__FILTER_NOT_DEFINED;
-static PyObject *__pyx_n_s__FORMAT;
-static PyObject *__pyx_n_s__FORMAT_NOT_DEFINED;
-static PyObject *__pyx_n_s__FT;
-static PyObject *__pyx_n_s__Flag;
-static PyObject *__pyx_n_s__Float;
-static PyObject *__pyx_n_s__G;
-static PyObject *__pyx_n_s__GL;
-static PyObject *__pyx_n_s__GLE;
-static PyObject *__pyx_n_s__GP;
-static PyObject *__pyx_n_s__GQ;
-static PyObject *__pyx_n_s__GT;
-static PyObject *__pyx_n_s__GTdata;
-static PyObject *__pyx_n_s__GTstring;
-static PyObject *__pyx_n_s__Genotype;
-static PyObject *__pyx_n_s__HQ;
-static PyObject *__pyx_n_s__I;
-static PyObject *__pyx_n_s__ID;
-static PyObject *__pyx_n_s__INFO;
-static PyObject *__pyx_n_s__Integer;
-static PyObject *__pyx_n_s__KeyError;
-static PyObject *__pyx_n_s__MISSING_REF;
-static PyObject *__pyx_n_s__MQ;
-static PyObject *__pyx_n_s__N;
-static PyObject *__pyx_n_s__NT_ALLELES;
-static PyObject *__pyx_n_s__NT_GENOTYPES;
-static PyObject *__pyx_n_s__NT_NR_ALLELES;
-static PyObject *__pyx_n_s__NT_NUMBER;
-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__PL;
-static PyObject *__pyx_n_s__POS;
-static PyObject *__pyx_n_s__POS_NOT_NUMERICAL;
-static PyObject *__pyx_n_s__POS_NOT_POSITIVE;
-static PyObject *__pyx_n_s__PQ;
-static PyObject *__pyx_n_s__PS;
-static PyObject *__pyx_n_s__QUAL;
-static PyObject *__pyx_n_s__QUAL_NOT_NUMERICAL;
-static PyObject *__pyx_n_s__REF;
-static PyObject *__pyx_n_s__StopIteration;
-static PyObject *__pyx_n_s__String;
-static PyObject *__pyx_n_s__Tabixfile;
-static PyObject *__pyx_n_s__Type;
-static PyObject *__pyx_n_s__UNKNOWN_CHAR_IN_REF;
-static PyObject *__pyx_n_s__V33_BAD_ALLELE;
-static PyObject *__pyx_n_s__V33_BAD_REF;
-static PyObject *__pyx_n_s__V40_BAD_ALLELE;
-static PyObject *__pyx_n_s__VCF;
-static PyObject *__pyx_n_s__VCFRecord;
-static PyObject *__pyx_n_s__ValueError;
-static PyObject *__pyx_n_s__WRONG_REF;
-static PyObject *__pyx_n_s__Warning;
-static PyObject *__pyx_n_s__ZERO_LENGTH_ALLELE;
-static PyObject *__pyx_n_s____all__;
-static PyObject *__pyx_n_s____dict__;
-static PyObject *__pyx_n_s____init__;
-static PyObject *__pyx_n_s____main__;
-static PyObject *__pyx_n_s____test__;
-static PyObject *__pyx_n_s___add_definition;
-static PyObject *__pyx_n_s___copy;
-static PyObject *__pyx_n_s___errors;
-static PyObject *__pyx_n_s___filter;
-static PyObject *__pyx_n_s___format;
-static PyObject *__pyx_n_s___header;
-static PyObject *__pyx_n_s___ignored_errors;
-static PyObject *__pyx_n_s___info;
-static PyObject *__pyx_n_s___leftalign;
-static PyObject *__pyx_n_s___line;
-static PyObject *__pyx_n_s___lineno;
-static PyObject *__pyx_n_s___lines;
-static PyObject *__pyx_n_s___parse;
-static PyObject *__pyx_n_s___parse_header;
-static PyObject *__pyx_n_s___reference;
-static PyObject *__pyx_n_s___regions;
-static PyObject *__pyx_n_s___required;
-static PyObject *__pyx_n_s___sample2column;
-static PyObject *__pyx_n_s___samples;
-static PyObject *__pyx_n_s___version;
-static PyObject *__pyx_n_s___warn_errors;
-static PyObject *__pyx_n_s__a;
-static PyObject *__pyx_n_s__add;
-static PyObject *__pyx_n_s__addn;
-static PyObject *__pyx_n_s__addns;
-static PyObject *__pyx_n_s__allele;
-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__bisect;
-static PyObject *__pyx_n_s__blurp;
-static PyObject *__pyx_n_s__buffer;
-static PyObject *__pyx_n_s__c;
-static PyObject *__pyx_n_s__chrom;
-static PyObject *__pyx_n_s__collections;
-static PyObject *__pyx_n_s__cols;
-static PyObject *__pyx_n_s__compare_calls;
-static PyObject *__pyx_n_s__compile;
-static PyObject *__pyx_n_s__connect;
-static PyObject *__pyx_n_s__convertGT;
-static PyObject *__pyx_n_s__convertGTback;
-static PyObject *__pyx_n_s__copy;
-static PyObject *__pyx_n_s__d;
-static PyObject *__pyx_n_s__data;
-static PyObject *__pyx_n_s__datagenerator;
-static PyObject *__pyx_n_s__deepcopy;
-static PyObject *__pyx_n_s__defaultdict;
-static PyObject *__pyx_n_s__descr;
-static PyObject *__pyx_n_s__description;
-static PyObject *__pyx_n_s__dict;
-static PyObject *__pyx_n_s__elts;
-static PyObject *__pyx_n_s__end;
-static PyObject *__pyx_n_s__endswith;
-static PyObject *__pyx_n_s__enumerate;
-static PyObject *__pyx_n_s__err;
-static PyObject *__pyx_n_s__error;
-static PyObject *__pyx_n_s__errorlabel;
-static PyObject *__pyx_n_s__errorstring;
-static PyObject *__pyx_n_s__errwarn;
-static PyObject *__pyx_n_s__expected;
-static PyObject *__pyx_n_s__f;
-static PyObject *__pyx_n_s__fa;
-static PyObject *__pyx_n_s__faref;
-static PyObject *__pyx_n_s__faref_leftflank;
-static PyObject *__pyx_n_s__fetch;
-static PyObject *__pyx_n_s__fileformat;
-static PyObject *__pyx_n_s__filename;
-static PyObject *__pyx_n_s__filter;
-static PyObject *__pyx_n_s__find;
-static PyObject *__pyx_n_s__first;
-static PyObject *__pyx_n_s__fmt;
-static PyObject *__pyx_n_s__format;
-static PyObject *__pyx_n_s__format_format;
-static PyObject *__pyx_n_s__format_formatdata;
-static PyObject *__pyx_n_s__formatdict;
-static PyObject *__pyx_n_s__genexpr;
-static PyObject *__pyx_n_s__get;
-static PyObject *__pyx_n_s__get_expected;
-static PyObject *__pyx_n_s__get_sequence;
-static PyObject *__pyx_n_s__getfilter;
-static PyObject *__pyx_n_s__getformat;
-static PyObject *__pyx_n_s__getheader;
-static PyObject *__pyx_n_s__getinfo;
-static PyObject *__pyx_n_s__getsamples;
-static PyObject *__pyx_n_s__gts;
-static PyObject *__pyx_n_s__gtsRegEx;
-static PyObject *__pyx_n_s__have_deletions;
-static PyObject *__pyx_n_s__header;
-static PyObject *__pyx_n_s__headings;
-static PyObject *__pyx_n_s__i;
-static PyObject *__pyx_n_s__id;
-static PyObject *__pyx_n_s__idx;
-static PyObject *__pyx_n_s__ielts;
-static PyObject *__pyx_n_s__ignoreerror;
-static PyObject *__pyx_n_s__info;
-static PyObject *__pyx_n_s__inregion;
-static PyObject *__pyx_n_s__itemgetter;
-static PyObject *__pyx_n_s__itervalues;
-static PyObject *__pyx_n_s__join;
-static PyObject *__pyx_n_s__k;
-static PyObject *__pyx_n_s__key;
-static PyObject *__pyx_n_s__keys;
-static PyObject *__pyx_n_s__l;
-static PyObject *__pyx_n_s__label;
-static PyObject *__pyx_n_s__last;
-static PyObject *__pyx_n_s__last_line;
-static PyObject *__pyx_n_s__left;
-static PyObject *__pyx_n_s__leftalign;
-static PyObject *__pyx_n_s__len;
-static PyObject *__pyx_n_s__line;
-static PyObject *__pyx_n_s__lineparse;
-static PyObject *__pyx_n_s__lines;
-static PyObject *__pyx_n_s__longest;
-static PyObject *__pyx_n_s__map;
-static PyObject *__pyx_n_s__match;
-static PyObject *__pyx_n_s__min;
-static PyObject *__pyx_n_s__missing;
-static PyObject *__pyx_n_s__missingvalue;
-static PyObject *__pyx_n_s__movable;
-static PyObject *__pyx_n_s__n;
-static PyObject *__pyx_n_s__na;
-static PyObject *__pyx_n_s__namedtuple;
-static PyObject *__pyx_n_s__newalts;
-static PyObject *__pyx_n_s__nmb;
-static PyObject *__pyx_n_s__number;
-static PyObject *__pyx_n_s__numbertype;
-static PyObject *__pyx_n_s__object;
-static PyObject *__pyx_n_s__operator;
-static PyObject *__pyx_n_s__opt;
-static PyObject *__pyx_n_s__output;
-static PyObject *__pyx_n_s__parse;
-static PyObject *__pyx_n_s__parse_data;
-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;
-static PyObject *__pyx_n_s__pos2;
-static PyObject *__pyx_n_s__pysam;
-static PyObject *__pyx_n_s__qual;
-static PyObject *__pyx_n_s__r;
-static PyObject *__pyx_n_s__range;
-static PyObject *__pyx_n_s__re;
-static PyObject *__pyx_n_s__record;
-static PyObject *__pyx_n_s__ref;
-static PyObject *__pyx_n_s__ref1;
-static PyObject *__pyx_n_s__ref2;
-static PyObject *__pyx_n_s__reference;
-static PyObject *__pyx_n_s__region;
-static PyObject *__pyx_n_s__regions;
-static PyObject *__pyx_n_s__replace;
-static PyObject *__pyx_n_s__required;
-static PyObject *__pyx_n_s__rest;
-static PyObject *__pyx_n_s__result;
-static PyObject *__pyx_n_s__s;
-static PyObject *__pyx_n_s__sample;
-static PyObject *__pyx_n_s__samples;
-static PyObject *__pyx_n_s__sdata;
-static PyObject *__pyx_n_s__self;
-static PyObject *__pyx_n_s__separator;
-static PyObject *__pyx_n_s__sequence;
-static PyObject *__pyx_n_s__setfilter;
-static PyObject *__pyx_n_s__setformat;
-static PyObject *__pyx_n_s__setheader;
-static PyObject *__pyx_n_s__setinfo;
-static PyObject *__pyx_n_s__setreference;
-static PyObject *__pyx_n_s__setregions;
-static PyObject *__pyx_n_s__setsamples;
-static PyObject *__pyx_n_s__setversion;
-static PyObject *__pyx_n_s__shortest;
-static PyObject *__pyx_n_s__split;
-static PyObject *__pyx_n_s__start;
-static PyObject *__pyx_n_s__startswith;
-static PyObject *__pyx_n_s__stream;
-static PyObject *__pyx_n_s__string;
-static PyObject *__pyx_n_s__strip;
-static PyObject *__pyx_n_s__sys;
-static PyObject *__pyx_n_s__t;
-static PyObject *__pyx_n_s__tabixfile;
-static PyObject *__pyx_n_s__type;
-static PyObject *__pyx_n_s__upper;
-static PyObject *__pyx_n_s__v;
-static PyObject *__pyx_n_s__validate;
-static PyObject *__pyx_n_s__value;
-static PyObject *__pyx_n_s__values;
-static PyObject *__pyx_n_s__var;
-static PyObject *__pyx_n_s__vcf;
-static PyObject *__pyx_n_s__vcffile;
-static PyObject *__pyx_n_s__version;
-static PyObject *__pyx_n_s__warnerror;
-static PyObject *__pyx_n_s__write;
-static PyObject *__pyx_n_s__write_data;
-static PyObject *__pyx_n_s__write_header;
-static PyObject *__pyx_n_s__write_heading;
-static PyObject *__pyx_n_s__writeheader;
-static PyObject *__pyx_n_s__x;
-static PyObject *__pyx_n_s__y;
-static PyObject *__pyx_n_s__zip;
+static PyObject *__pyx_tp_new_5pysam_4cvcf_VCFRecord(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_4cvcf_asVCFRecord(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pysam_4cvcf___pyx_scope_struct___parse(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_[] = "";
+static char __pyx_k_0[] = "0";
+static char __pyx_k_A[] = "A";
+static char __pyx_k_D[] = "D";
+static char __pyx_k_G[] = "G";
+static char __pyx_k_I[] = "I";
+static char __pyx_k_N[] = "N";
+static char __pyx_k_a[] = "a";
+static char __pyx_k_c[] = "c";
+static char __pyx_k_d[] = "d";
+static char __pyx_k_f[] = "f";
+static char __pyx_k_i[] = "i";
+static char __pyx_k_k[] = "k";
+static char __pyx_k_l[] = "l";
+static char __pyx_k_n[] = "n";
+static char __pyx_k_r[] = "r";
+static char __pyx_k_s[] = "s";
+static char __pyx_k_t[] = "t";
+static char __pyx_k_v[] = "v";
+static char __pyx_k_x[] = "x";
+static char __pyx_k_y[] = "y";
+static char __pyx_k_DP[] = "DP";
+static char __pyx_k_EC[] = "EC";
+static char __pyx_k_FT[] = "FT";
+static char __pyx_k_GL[] = "GL";
+static char __pyx_k_GP[] = "GP";
+static char __pyx_k_GQ[] = "GQ";
+static char __pyx_k_GT[] = "GT";
+static char __pyx_k_HQ[] = "HQ";
+static char __pyx_k_ID[] = "ID=";
+static char __pyx_k_MQ[] = "MQ";
+static char __pyx_k_PL[] = "PL";
+static char __pyx_k_PQ[] = "PQ";
+static char __pyx_k_PS[] = "PS";
+static char __pyx_k__2[] = ",";
+static char __pyx_k__4[] = ":";
+static char __pyx_k__6[] = "-";
+static char __pyx_k__8[] = ".";
+static char __pyx_k_fa[] = "fa";
+static char __pyx_k_id[] = "id";
+static char __pyx_k_na[] = "na";
+static char __pyx_k_re[] = "re";
+static char __pyx_k_ALT[] = "ALT";
+static char __pyx_k_GLE[] = "GLE";
+static char __pyx_k_POS[] = "POS";
+static char __pyx_k_REF[] = "REF";
+static char __pyx_k_VCF[] = "VCF";
+static char __pyx_k__10[] = ";";
+static char __pyx_k__13[] = "=";
+static char __pyx_k__21[] = "<";
+static char __pyx_k__23[] = ">";
+static char __pyx_k__29[] = "\"";
+static char __pyx_k__46[] = "##";
+static char __pyx_k__51[] = "#";
+static char __pyx_k__55[] = "\t";
+static char __pyx_k__60[] = "\n";
+static char __pyx_k__61[] = "|";
+static char __pyx_k__91[] = "[|/\\\\]";
+static char __pyx_k_add[] = "add";
+static char __pyx_k_all[] = "__all__";
+static char __pyx_k_alt[] = "alt";
+static char __pyx_k_doc[] = "__doc__";
+static char __pyx_k_end[] = "end";
+static char __pyx_k_err[] = "err";
+static char __pyx_k_fmt[] = "fmt";
+static char __pyx_k_get[] = "get";
+static char __pyx_k_gts[] = "gts";
+static char __pyx_k_idx[] = "idx";
+static char __pyx_k_key[] = "key";
+static char __pyx_k_map[] = "map";
+static char __pyx_k_min[] = "min";
+static char __pyx_k_nmb[] = "nmb";
+static char __pyx_k_opt[] = "opt";
+static char __pyx_k_pos[] = "pos";
+static char __pyx_k_ref[] = "ref";
+static char __pyx_k_s_s[] = "%s=%s";
+static char __pyx_k_sys[] = "sys";
+static char __pyx_k_var[] = "var";
+static char __pyx_k_vcf[] = "vcf";
+static char __pyx_k_zip[] = "zip";
+static char __pyx_k_Flag[] = "Flag";
+static char __pyx_k_ID_2[] = "ID";
+static char __pyx_k_INFO[] = "INFO";
+static char __pyx_k_PASS[] = "PASS";
+static char __pyx_k_QUAL[] = "QUAL";
+static char __pyx_k_Type[] = "Type=";
+static char __pyx_k_addn[] = "addn";
+static char __pyx_k_alt1[] = "alt1";
+static char __pyx_k_alt2[] = "alt2";
+static char __pyx_k_args[] = "args";
+static char __pyx_k_cols[] = "cols";
+static char __pyx_k_copy[] = "_copy";
+static char __pyx_k_data[] = "data";
+static char __pyx_k_dict[] = "__dict__";
+static char __pyx_k_elts[] = "elts";
+static char __pyx_k_find[] = "find";
+static char __pyx_k_info[] = "_info";
+static char __pyx_k_init[] = "__init__";
+static char __pyx_k_join[] = "join";
+static char __pyx_k_keys[] = "keys";
+static char __pyx_k_last[] = "last";
+static char __pyx_k_left[] = "left";
+static char __pyx_k_line[] = "line";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_pos1[] = "pos1";
+static char __pyx_k_pos2[] = "pos2";
+static char __pyx_k_qual[] = "qual";
+static char __pyx_k_ref1[] = "ref1";
+static char __pyx_k_ref2[] = "ref2";
+static char __pyx_k_rest[] = "rest";
+static char __pyx_k_self[] = "self";
+static char __pyx_k_send[] = "send";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_type[] = "type";
+static char __pyx_k_ACGTN[] = "ACGTN";
+static char __pyx_k_CHROM[] = "CHROM";
+static char __pyx_k_Error[] = "Error";
+static char __pyx_k_Float[] = "Float";
+static char __pyx_k_addns[] = "addns";
+static char __pyx_k_blurp[] = "blurp";
+static char __pyx_k_chrom[] = "chrom";
+static char __pyx_k_close[] = "close";
+static char __pyx_k_descr[] = "descr";
+static char __pyx_k_error[] = "error";
+static char __pyx_k_faref[] = "faref";
+static char __pyx_k_fetch[] = "fetch";
+static char __pyx_k_first[] = "first";
+static char __pyx_k_ielts[] = "ielts";
+static char __pyx_k_label[] = "label";
+static char __pyx_k_lines[] = "lines";
+static char __pyx_k_match[] = "match";
+static char __pyx_k_parse[] = "_parse";
+static char __pyx_k_pysam[] = "pysam";
+static char __pyx_k_range[] = "range";
+static char __pyx_k_s_s_2[] = "##%s=%s\n";
+static char __pyx_k_sdata[] = "sdata";
+static char __pyx_k_split[] = "split";
+static char __pyx_k_start[] = "start";
+static char __pyx_k_strip[] = "strip";
+static char __pyx_k_throw[] = "throw";
+static char __pyx_k_upper[] = "upper";
+static char __pyx_k_value[] = "value";
+static char __pyx_k_write[] = "write";
+static char __pyx_k_FILTER[] = "FILTER";
+static char __pyx_k_FORMAT[] = "FORMAT";
+static char __pyx_k_GTdata[] = "GTdata";
+static char __pyx_k_Number[] = "Number=";
+static char __pyx_k_String[] = "String";
+static char __pyx_k_Type_2[] = "Type";
+static char __pyx_k_allele[] = "allele";
+static char __pyx_k_append[] = "append";
+static char __pyx_k_bisect[] = "bisect";
+static char __pyx_k_copy_2[] = "copy";
+static char __pyx_k_dict_2[] = "dict";
+static char __pyx_k_errors[] = "_errors";
+static char __pyx_k_filter[] = "_filter";
+static char __pyx_k_format[] = "format";
+static char __pyx_k_header[] = "_header";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_info_2[] = "info";
+static char __pyx_k_line_2[] = "_line";
+static char __pyx_k_lineno[] = "_lineno";
+static char __pyx_k_module[] = "__module__";
+static char __pyx_k_number[] = "number";
+static char __pyx_k_object[] = "object";
+static char __pyx_k_output[] = "(output)";
+static char __pyx_k_parser[] = "parser";
+static char __pyx_k_record[] = "record";
+static char __pyx_k_region[] = "region";
+static char __pyx_k_result[] = "result";
+static char __pyx_k_sample[] = "sample";
+static char __pyx_k_stream[] = "stream";
+static char __pyx_k_string[] = "string";
+static char __pyx_k_values[] = "values";
+static char __pyx_k_ACGTN_2[] = "^[ACGTN]+$";
+static char __pyx_k_Integer[] = "Integer";
+static char __pyx_k_VCFv3_3[] = "VCFv3.3";
+static char __pyx_k_VCFv4_0[] = "VCFv4.0";
+static char __pyx_k_VCFv4_1[] = "VCFv4.1";
+static char __pyx_k_Warning[] = "Warning";
+static char __pyx_k_alleles[] = "#alleles";
+static char __pyx_k_compile[] = "compile";
+static char __pyx_k_connect[] = "connect";
+static char __pyx_k_errwarn[] = "errwarn";
+static char __pyx_k_getinfo[] = "getinfo";
+static char __pyx_k_lines_2[] = "_lines";
+static char __pyx_k_longest[] = "longest";
+static char __pyx_k_missing[] = "missing";
+static char __pyx_k_movable[] = "movable";
+static char __pyx_k_newalts[] = "newalts";
+static char __pyx_k_parse_2[] = "parse";
+static char __pyx_k_prepare[] = "__prepare__";
+static char __pyx_k_regions[] = "regions";
+static char __pyx_k_replace[] = "replace";
+static char __pyx_k_samples[] = "_samples";
+static char __pyx_k_setinfo[] = "setinfo";
+static char __pyx_k_vcffile[] = "vcffile";
+static char __pyx_k_version[] = "_version";
+static char __pyx_k_GTstring[] = "GTstring";
+static char __pyx_k_Genotype[] = "Genotype";
+static char __pyx_k_KeyError[] = "KeyError";
+static char __pyx_k_Number_2[] = "Number";
+static char __pyx_k_deepcopy[] = "deepcopy";
+static char __pyx_k_endswith[] = "endswith";
+static char __pyx_k_expected[] = "expected";
+static char __pyx_k_filename[] = "filename";
+static char __pyx_k_filter_2[] = "filter";
+static char __pyx_k_format_2[] = "_format";
+static char __pyx_k_gtsRegEx[] = "gtsRegEx";
+static char __pyx_k_header_2[] = "header";
+static char __pyx_k_headings[] = "headings";
+static char __pyx_k_inregion[] = "inregion";
+static char __pyx_k_operator[] = "operator";
+static char __pyx_k_output_2[] = "output";
+static char __pyx_k_qualname[] = "__qualname__";
+static char __pyx_k_required[] = "_required";
+static char __pyx_k_sequence[] = "sequence";
+static char __pyx_k_shortest[] = "shortest";
+static char __pyx_k_validate[] = "validate";
+static char __pyx_k_Character[] = "Character";
+static char __pyx_k_NT_NUMBER[] = "NT_NUMBER";
+static char __pyx_k_Phase_set[] = "Phase set";
+static char __pyx_k_Tabixfile[] = "Tabixfile";
+static char __pyx_k_VCFRecord[] = "VCFRecord";
+static char __pyx_k_VCF_error[] = "VCF.error";
+static char __pyx_k_VCF_fetch[] = "VCF.fetch";
+static char __pyx_k_VCF_parse[] = "VCF.parse";
+static char __pyx_k_VCF_write[] = "VCF.write";
+static char __pyx_k_WRONG_REF[] = "WRONG_REF";
+static char __pyx_k_convertGT[] = "convertGT";
+static char __pyx_k_enumerate[] = "enumerate";
+static char __pyx_k_genotypes[] = "#genotypes";
+static char __pyx_k_getfilter[] = "getfilter";
+static char __pyx_k_getformat[] = "getformat";
+static char __pyx_k_getheader[] = "getheader";
+static char __pyx_k_last_line[] = "last_line";
+static char __pyx_k_leftalign[] = "leftalign";
+static char __pyx_k_lineparse[] = "lineparse";
+static char __pyx_k_metaclass[] = "__metaclass__";
+static char __pyx_k_reference[] = "reference";
+static char __pyx_k_regions_2[] = "_regions";
+static char __pyx_k_samples_2[] = "samples";
+static char __pyx_k_separator[] = "separator";
+static char __pyx_k_setfilter[] = "setfilter";
+static char __pyx_k_setformat[] = "setformat";
+static char __pyx_k_setheader[] = "setheader";
+static char __pyx_k_tabixfile[] = "tabixfile";
+static char __pyx_k_version_2[] = "version";
+static char __pyx_k_warnerror[] = "warnerror";
+static char __pyx_k_NT_ALLELES[] = "NT_ALLELES";
+static char __pyx_k_NT_UNKNOWN[] = "NT_UNKNOWN";
+static char __pyx_k_VCF___init[] = "VCF.__init__";
+static char __pyx_k_VCF__parse[] = "VCF._parse";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_errorlabel[] = "errorlabel";
+static char __pyx_k_fileformat[] = "fileformat";
+static char __pyx_k_formatdict[] = "formatdict";
+static char __pyx_k_getsamples[] = "getsamples";
+static char __pyx_k_itemgetter[] = "itemgetter";
+static char __pyx_k_itervalues[] = "itervalues";
+static char __pyx_k_namedtuple[] = "namedtuple";
+static char __pyx_k_numbertype[] = "numbertype";
+static char __pyx_k_parse_data[] = "parse_data";
+static char __pyx_k_pysam_cvcf[] = "pysam.cvcf";
+static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static char __pyx_k_required_2[] = "required";
+static char __pyx_k_setregions[] = "setregions";
+static char __pyx_k_setsamples[] = "setsamples";
+static char __pyx_k_setversion[] = "setversion";
+static char __pyx_k_startswith[] = "startswith";
+static char __pyx_k_write_data[] = "write_data";
+static char __pyx_k_Description[] = "Description=";
+static char __pyx_k_MISSING_REF[] = "MISSING_REF";
+static char __pyx_k_V33_BAD_REF[] = "V33_BAD_REF";
+static char __pyx_k_VCF_connect[] = "VCF.connect";
+static char __pyx_k_VCF_getinfo[] = "VCF.getinfo";
+static char __pyx_k_VCF_setinfo[] = "VCF.setinfo";
+static char __pyx_k_alleleRegEx[] = "alleleRegEx";
+static char __pyx_k_collections[] = "collections";
+static char __pyx_k_defaultdict[] = "defaultdict";
+static char __pyx_k_description[] = "description";
+static char __pyx_k_errorstring[] = "errorstring";
+static char __pyx_k_ignoreerror[] = "ignoreerror";
+static char __pyx_k_leftalign_2[] = "_leftalign";
+static char __pyx_k_reference_2[] = "_reference";
+static char __pyx_k_warn_errors[] = "_warn_errors";
+static char __pyx_k_writeheader[] = "writeheader";
+static char __pyx_k_BAD_GENOTYPE[] = "BAD_GENOTYPE";
+static char __pyx_k_NT_GENOTYPES[] = "NT_GENOTYPES";
+static char __pyx_k_VCF_inregion[] = "VCF.inregion";
+static char __pyx_k_VCF_validate[] = "VCF.validate";
+static char __pyx_k_get_expected[] = "get_expected";
+static char __pyx_k_get_sequence[] = "get_sequence";
+static char __pyx_k_missingvalue[] = "missingvalue";
+static char __pyx_k_parse_format[] = "parse_format";
+static char __pyx_k_parse_header[] = "parse_header";
+static char __pyx_k_setreference[] = "setreference";
+static char __pyx_k_write_header[] = "write_header";
+static char __pyx_k_Description_2[] = "Description";
+static char __pyx_k_NT_NR_ALLELES[] = "NT_NR_ALLELES";
+static char __pyx_k_StopIteration[] = "StopIteration";
+static char __pyx_k_Undefined_tag[] = "(Undefined tag)";
+static char __pyx_k_VCF_convertGT[] = "VCF.convertGT";
+static char __pyx_k_VCF_getfilter[] = "VCF.getfilter";
+static char __pyx_k_VCF_getformat[] = "VCF.getformat";
+static char __pyx_k_VCF_getheader[] = "VCF.getheader";
+static char __pyx_k_VCF_setfilter[] = "VCF.setfilter";
+static char __pyx_k_VCF_setformat[] = "VCF.setformat";
+static char __pyx_k_VCF_setheader[] = "VCF.setheader";
+static char __pyx_k_VCF_warnerror[] = "VCF.warnerror";
+static char __pyx_k_compare_calls[] = "compare_calls";
+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_sample2column[] = "_sample2column";
+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";
+static char __pyx_k_VCF_getsamples[] = "VCF.getsamples";
+static char __pyx_k_VCF_parse_data[] = "VCF.parse_data";
+static char __pyx_k_VCF_setregions[] = "VCF.setregions";
+static char __pyx_k_VCF_setsamples[] = "VCF.setsamples";
+static char __pyx_k_VCF_setversion[] = "VCF.setversion";
+static char __pyx_k_VCF_write_data[] = "VCF.write_data";
+static char __pyx_k_add_definition[] = "_add_definition";
+static char __pyx_k_have_deletions[] = "have_deletions";
+static char __pyx_k_ignored_errors[] = "_ignored_errors";
+static char __pyx_k_nonref_alleles[] = "#nonref_alleles";
+static char __pyx_k_parse_header_2[] = "_parse_header";
+static char __pyx_k_Phasing_quality[] = "Phasing quality";
+static char __pyx_k_VCF_ignoreerror[] = "VCF.ignoreerror";
+static char __pyx_k_VCF_writeheader[] = "VCF.writeheader";
+static char __pyx_k_faref_leftflank[] = "faref_leftflank";
+static char __pyx_k_Genotype_Quality[] = "Genotype Quality";
+static char __pyx_k_POS_NOT_POSITIVE[] = "POS_NOT_POSITIVE";
+static char __pyx_k_VCF_get_expected[] = "VCF.get_expected";
+static char __pyx_k_VCF_parse_format[] = "VCF.parse_format";
+static char __pyx_k_VCF_parse_header[] = "VCF.parse_header";
+static char __pyx_k_VCF_setreference[] = "VCF.setreference";
+static char __pyx_k_VCF_write_header[] = "VCF.write_header";
+static char __pyx_k_parse_formatdata[] = "parse_formatdata";
+static char __pyx_k_phased_genotypes[] = "#phased_genotypes";
+static char __pyx_k_ERROR_INFO_STRING[] = "ERROR_INFO_STRING";
+static char __pyx_k_ERROR_UNKNOWN_KEY[] = "ERROR_UNKNOWN_KEY";
+static char __pyx_k_Haplotype_Quality[] = "Haplotype Quality";
+static char __pyx_k_POS_NOT_NUMERICAL[] = "POS_NOT_NUMERICAL";
+static char __pyx_k_VCF__parse_header[] = "VCF._parse_header";
+static char __pyx_k_VCF_compare_calls[] = "VCF.compare_calls";
+static char __pyx_k_VCF_convertGTback[] = "VCF.convertGTback";
+static char __pyx_k_VCF_format_format[] = "VCF.format_format";
+static char __pyx_k_VCF_parse_heading[] = "VCF.parse_heading";
+static char __pyx_k_VCF_write_heading[] = "VCF.write_heading";
+static char __pyx_k_format_formatdata[] = "format_formatdata";
+static char __pyx_k_in_line_s_s_s_s_s[] = " in line %s: '%s'\n%s %s: %s\n";
+static char __pyx_k_FILTER_NOT_DEFINED[] = "FILTER_NOT_DEFINED";
+static char __pyx_k_FORMAT_NOT_DEFINED[] = "FORMAT_NOT_DEFINED";
+static char __pyx_k_QUAL_NOT_NUMERICAL[] = "QUAL_NOT_NUMERICAL";
+static char __pyx_k_ZERO_LENGTH_ALLELE[] = "ZERO_LENGTH_ALLELE";
+static char __pyx_k_found_s_expected_s[] = "(found %s, expected %s)";
+static char __pyx_k_ERROR_TRAILING_DATA[] = "ERROR_TRAILING_DATA";
+static char __pyx_k_NT_PHASED_GENOTYPES[] = "NT_PHASED_GENOTYPES";
+static char __pyx_k_NotImplementedError[] = "NotImplementedError";
+static char __pyx_k_RMS_mapping_quality[] = "RMS mapping quality";
+static char __pyx_k_UNKNOWN_CHAR_IN_REF[] = "UNKNOWN_CHAR_IN_REF";
+static char __pyx_k_VCF__add_definition[] = "VCF._add_definition";
+static char __pyx_k_fileformat_VCFv_s_s[] = "##fileformat=VCFv%s.%s\n";
+static char __pyx_k_needs_to_be_checked[] = "needs to be checked";
+static char __pyx_k_sth_entry_not_found[] = "(%sth entry not found)";
+static char __pyx_k_BAD_NUMBER_OF_VALUES[] = "BAD_NUMBER_OF_VALUES";
+static char __pyx_k_ERROR_FLAG_HAS_VALUE[] = "ERROR_FLAG_HAS_VALUE";
+static char __pyx_k_Genotype_likelihoods[] = "Genotype likelihoods";
+static char __pyx_k_VCF_parse_formatdata[] = "VCF.parse_formatdata";
+static char __pyx_k_enter_default_format[] = "enter_default_format";
+static char __pyx_k_BAD_NUMBER_OF_COLUMNS[] = "BAD_NUMBER_OF_COLUMNS";
+static char __pyx_k_ERROR_FORMAT_NOT_CHAR[] = "ERROR_FORMAT_NOT_CHAR";
+static char __pyx_k_FORMAT_MISSING_QUOTES[] = "FORMAT_MISSING_QUOTES";
+static char __pyx_k_UNKNOWN_FORMAT_STRING[] = "UNKNOWN_FORMAT_STRING";
+static char __pyx_k_VCF_format_formatdata[] = "VCF.format_formatdata";
+static char __pyx_k_Invalid_error_string_s[] = "Invalid error string: %s";
+static char __pyx_k_Sample_Genotype_Filter[] = "Sample Genotype Filter";
+static char __pyx_k_V33_UNMATCHED_DELETION[] = "V33_UNMATCHED_DELETION";
+static char __pyx_k_BADLY_FORMATTED_HEADING[] = "BADLY_FORMATTED_HEADING";
+static char __pyx_k_ZERO_FOR_NON_FLAG_FIELD[] = "ZERO_FOR_NON_FLAG_FIELD";
+static char __pyx_k_BAD_NUMBER_OF_PARAMETERS[] = "BAD_NUMBER_OF_PARAMETERS";
+static char __pyx_k_ERROR_FORMAT_NOT_INTEGER[] = "ERROR_FORMAT_NOT_INTEGER";
+static char __pyx_k_VCF_enter_default_format[] = "VCF.enter_default_format";
+static char __pyx_k_reference_is_s_VCF_says_s[] = "(reference is %s, VCF says %s)";
+static char __pyx_k_ERROR_FORMAT_NOT_NUMERICAL[] = "ERROR_FORMAT_NOT_NUMERICAL";
+static char __pyx_k_V40_MISSING_ANGLE_BRACKETS[] = "V40_MISSING_ANGLE_BRACKETS";
+static char __pyx_k_WRONG_REF_Wrong_reference_s[] = "WRONG_REF:Wrong reference %s";
+static char __pyx_k_Conditional_genotype_quality[] = "Conditional genotype quality";
+static char __pyx_k_deletion_is_s_reference_is_s[] = "(deletion is %s, reference is %s)";
+static char __pyx_k_BADLY_FORMATTED_FORMAT_STRING[] = "BADLY_FORMATTED_FORMAT_STRING";
+static char __pyx_k_HEADING_NOT_SEPARATED_BY_TABS[] = "HEADING_NOT_SEPARATED_BY_TABS";
+static char __pyx_k_MISSING_INDEL_ALLELE_REF_BASE[] = "MISSING_INDEL_ALLELE_REF_BASE";
+static char __pyx_k_home_andreas_devel_pysam_pysam[] = "/home/andreas/devel/pysam/pysam/cvcf.pyx";
+static char __pyx_k_BADLY_FORMATTED_HEADING_Did_not[] = "BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s";
+static char __pyx_k_ERROR_FORMAT_NOT_CHAR_Eexpected[] = "ERROR_FORMAT_NOT_CHAR:Eexpected character in formatted field; got string";
+static char __pyx_k_ERROR_UNKNOWN_KEY_Unknown_key_s[] = "ERROR_UNKNOWN_KEY:Unknown key (%s) found in formatted field (info; format; or filter)";
+static char __pyx_k_Expected_alternate_allel_counts[] = "Expected alternate allel counts";
+static char __pyx_k_FILTER_NOT_DEFINED_Identifier_s[] = "FILTER_NOT_DEFINED:Identifier (%s) in filter found which was not defined in header";
+static char __pyx_k_FORMAT_NOT_DEFINED_Identifier_s[] = "FORMAT_NOT_DEFINED:Identifier (%s) in format found which was not defined in header";
+static char __pyx_k_POS_NOT_POSITIVE_Position_field[] = "POS_NOT_POSITIVE:Position field must be >0";
+static char __pyx_k_Read_depth_at_this_position_for[] = "Read depth at this position for this sample";
+static char __pyx_k_Unknown_number_type_encountered[] = "Unknown number type encountered: %s";
+static char __pyx_k_V33_BAD_ALLELE_Cannot_interpret[] = "V33_BAD_ALLELE:Cannot interpret allele for v3.3 VCF";
+static char __pyx_k_V33_BAD_REF_Reference_should_be[] = "V33_BAD_REF:Reference should be single-character in v3.3 VCF";
+static char __pyx_k_V40_BAD_ALLELE_Bad_allele_found[] = "V40_BAD_ALLELE:Bad allele found for v4.0 VCF (%s)";
+static char __pyx_k_found_s_values_in_element_s_exp[] = "(found %s values in element %s; expected %s)";
+static char __pyx_k_BADLY_FORMATTED_FORMAT_STRING_Fo[] = "BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string";
+static char __pyx_k_BAD_CHR_TAG_Error_calculating_ch[] = "BAD_CHR_TAG:Error calculating chr tag for %s";
+static char __pyx_k_BAD_GENOTYPE_Cannot_parse_genoty[] = "BAD_GENOTYPE:Cannot parse genotype (%s)";
+static char __pyx_k_BAD_NUMBER_OF_COLUMNS_Wrong_numb[] = "BAD_NUMBER_OF_COLUMNS:Wrong number of columns found (%s)";
+static char __pyx_k_BAD_NUMBER_OF_PARAMETERS_Found_u[] = "BAD_NUMBER_OF_PARAMETERS:Found unexpected number of parameters (%s)";
+static char __pyx_k_BAD_NUMBER_OF_VALUES_Found_too_m[] = "BAD_NUMBER_OF_VALUES:Found too many of values in sample column (%s)";
+static char __pyx_k_Can_only_handle_v3_3_and_v4_0_VC[] = "Can only handle v3.3 and v4.0 VCF files";
+static char __pyx_k_Don_t_understand_region_string_s[] = "Don't understand region string '%s'";
+static char __pyx_k_ERROR_FLAG_HAS_VALUE_Flag_fields[] = "ERROR_FLAG_HAS_VALUE:Flag fields should not have a value";
+static char __pyx_k_ERROR_FORMAT_NOT_INTEGER_Expecte[] = "ERROR_FORMAT_NOT_INTEGER:Expected integer in formatted field; got %s";
+static char __pyx_k_ERROR_FORMAT_NOT_NUMERICAL_Expec[] = "ERROR_FORMAT_NOT_NUMERICAL:Expected integer or float in formatted field; got %s";
+static char __pyx_k_ERROR_INFO_STRING_Error_while_pa[] = "ERROR_INFO_STRING:Error while parsing info field";
+static char __pyx_k_ERROR_TRAILING_DATA_Numerical_fi[] = "ERROR_TRAILING_DATA:Numerical field ('%s') has semicolon-separated trailing data";
+static char __pyx_k_FORMAT_MISSING_QUOTES_Descriptio[] = "FORMAT_MISSING_QUOTES:Description field in format definition is not surrounded by quotes";
+static char __pyx_k_Genotype_posterior_probabilities[] = "Genotype posterior probabilities";
+static char __pyx_k_HEADING_NOT_SEPARATED_BY_TABS_He[] = "HEADING_NOT_SEPARATED_BY_TABS:Heading line appears separated by spaces, not tabs";
+static char __pyx_k_MISSING_INDEL_ALLELE_REF_BASE_In[] = "MISSING_INDEL_ALLELE_REF_BASE:Indel alleles must begin with single reference base";
+static char __pyx_k_MISSING_REF_Reference_allele_mis[] = "MISSING_REF:Reference allele missing";
+static char __pyx_k_POS_NOT_NUMERICAL_Position_colum[] = "POS_NOT_NUMERICAL:Position column is not numerical";
+static char __pyx_k_Phred_scaled_genotype_likelihood[] = "Phred-scaled genotype likelihoods";
+static char __pyx_k_QUAL_NOT_NUMERICAL_Quality_field[] = "QUAL_NOT_NUMERICAL:Quality field must be numerical, or '.'";
+static char __pyx_k_Required_key_s_not_found_in_data[] = "Required key %s not found in data";
+static char __pyx_k_UNKNOWN_CHAR_IN_REF_Unknown_char[] = "UNKNOWN_CHAR_IN_REF:Unknown character in reference field";
+static char __pyx_k_UNKNOWN_FORMAT_STRING_Unknown_fi[] = "UNKNOWN_FORMAT_STRING:Unknown file format identifier";
+static char __pyx_k_V33_UNMATCHED_DELETION_Deleted_s[] = "V33_UNMATCHED_DELETION:Deleted sequence does not match reference (%s)";
+static char __pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS";
+static char __pyx_k_V40_MISSING_ANGLE_BRACKETS_Forma[] = "V40_MISSING_ANGLE_BRACKETS:Format definition is not deliminted by angular brackets";
+static char __pyx_k_ZERO_FOR_NON_FLAG_FIELD_number_s[] = "ZERO_FOR_NON_FLAG_FIELD: number set to 0, but type is not 'FLAG'";
+static char __pyx_k_ZERO_LENGTH_ALLELE_Found_zero_le[] = "ZERO_LENGTH_ALLELE:Found zero-length allele";
+static char __pyx_k_expected_s_for_s_samples_s_got_s[] = "expected %s for %s samples (%s), got %s";
+static char __pyx_k_id_numbertype_number_type_descri[] = "id numbertype number type description missingvalue";
+static char __pyx_k_id_s_expected_s_parameters_got_s[] = "id=%s, expected %s parameters, got %s";
+static char __pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS:Fields in v4.0 VCF format definition must have named fields";
+static PyObject *__pyx_kp_s_;
+static PyObject *__pyx_kp_b_0;
+static PyObject *__pyx_kp_s_0;
+static PyObject *__pyx_n_s_A;
+static PyObject *__pyx_n_s_ACGTN;
+static PyObject *__pyx_kp_s_ACGTN_2;
+static PyObject *__pyx_n_s_ALT;
+static PyObject *__pyx_n_s_BADLY_FORMATTED_FORMAT_STRING;
+static PyObject *__pyx_kp_s_BADLY_FORMATTED_FORMAT_STRING_Fo;
+static PyObject *__pyx_n_s_BADLY_FORMATTED_HEADING;
+static PyObject *__pyx_kp_s_BADLY_FORMATTED_HEADING_Did_not;
+static PyObject *__pyx_kp_s_BAD_CHR_TAG_Error_calculating_ch;
+static PyObject *__pyx_n_s_BAD_GENOTYPE;
+static PyObject *__pyx_kp_s_BAD_GENOTYPE_Cannot_parse_genoty;
+static PyObject *__pyx_n_s_BAD_NUMBER_OF_COLUMNS;
+static PyObject *__pyx_kp_s_BAD_NUMBER_OF_COLUMNS_Wrong_numb;
+static PyObject *__pyx_n_s_BAD_NUMBER_OF_PARAMETERS;
+static PyObject *__pyx_kp_s_BAD_NUMBER_OF_PARAMETERS_Found_u;
+static PyObject *__pyx_n_s_BAD_NUMBER_OF_VALUES;
+static PyObject *__pyx_kp_s_BAD_NUMBER_OF_VALUES_Found_too_m;
+static PyObject *__pyx_n_s_CHROM;
+static PyObject *__pyx_kp_s_Can_only_handle_v3_3_and_v4_0_VC;
+static PyObject *__pyx_n_s_Character;
+static PyObject *__pyx_kp_s_Conditional_genotype_quality;
+static PyObject *__pyx_n_s_D;
+static PyObject *__pyx_n_s_DP;
+static PyObject *__pyx_kp_s_Description;
+static PyObject *__pyx_n_s_Description_2;
+static PyObject *__pyx_kp_s_Don_t_understand_region_string_s;
+static PyObject *__pyx_n_s_EC;
+static PyObject *__pyx_n_s_ERROR_FLAG_HAS_VALUE;
+static PyObject *__pyx_kp_s_ERROR_FLAG_HAS_VALUE_Flag_fields;
+static PyObject *__pyx_n_s_ERROR_FORMAT_NOT_CHAR;
+static PyObject *__pyx_kp_s_ERROR_FORMAT_NOT_CHAR_Eexpected;
+static PyObject *__pyx_n_s_ERROR_FORMAT_NOT_INTEGER;
+static PyObject *__pyx_kp_s_ERROR_FORMAT_NOT_INTEGER_Expecte;
+static PyObject *__pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL;
+static PyObject *__pyx_kp_s_ERROR_FORMAT_NOT_NUMERICAL_Expec;
+static PyObject *__pyx_n_s_ERROR_INFO_STRING;
+static PyObject *__pyx_kp_s_ERROR_INFO_STRING_Error_while_pa;
+static PyObject *__pyx_n_s_ERROR_TRAILING_DATA;
+static PyObject *__pyx_kp_s_ERROR_TRAILING_DATA_Numerical_fi;
+static PyObject *__pyx_n_s_ERROR_UNKNOWN_KEY;
+static PyObject *__pyx_kp_s_ERROR_UNKNOWN_KEY_Unknown_key_s;
+static PyObject *__pyx_n_s_Error;
+static PyObject *__pyx_kp_s_Expected_alternate_allel_counts;
+static PyObject *__pyx_n_s_FILTER;
+static PyObject *__pyx_n_s_FILTER_NOT_DEFINED;
+static PyObject *__pyx_kp_s_FILTER_NOT_DEFINED_Identifier_s;
+static PyObject *__pyx_n_s_FORMAT;
+static PyObject *__pyx_n_s_FORMAT_MISSING_QUOTES;
+static PyObject *__pyx_kp_s_FORMAT_MISSING_QUOTES_Descriptio;
+static PyObject *__pyx_n_s_FORMAT_NOT_DEFINED;
+static PyObject *__pyx_kp_s_FORMAT_NOT_DEFINED_Identifier_s;
+static PyObject *__pyx_n_s_FT;
+static PyObject *__pyx_n_s_Flag;
+static PyObject *__pyx_n_s_Float;
+static PyObject *__pyx_n_s_G;
+static PyObject *__pyx_n_s_GL;
+static PyObject *__pyx_n_s_GLE;
+static PyObject *__pyx_n_s_GP;
+static PyObject *__pyx_n_s_GQ;
+static PyObject *__pyx_n_s_GT;
+static PyObject *__pyx_n_s_GTdata;
+static PyObject *__pyx_n_s_GTstring;
+static PyObject *__pyx_n_s_Genotype;
+static PyObject *__pyx_kp_s_Genotype_Quality;
+static PyObject *__pyx_kp_s_Genotype_likelihoods;
+static PyObject *__pyx_kp_s_Genotype_posterior_probabilities;
+static PyObject *__pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS;
+static PyObject *__pyx_kp_s_HEADING_NOT_SEPARATED_BY_TABS_He;
+static PyObject *__pyx_n_s_HQ;
+static PyObject *__pyx_kp_s_Haplotype_Quality;
+static PyObject *__pyx_n_s_I;
+static PyObject *__pyx_kp_s_ID;
+static PyObject *__pyx_n_s_ID_2;
+static PyObject *__pyx_n_s_INFO;
+static PyObject *__pyx_n_s_Integer;
+static PyObject *__pyx_kp_s_Invalid_error_string_s;
+static PyObject *__pyx_n_s_KeyError;
+static PyObject *__pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE;
+static PyObject *__pyx_kp_s_MISSING_INDEL_ALLELE_REF_BASE_In;
+static PyObject *__pyx_n_s_MISSING_REF;
+static PyObject *__pyx_kp_s_MISSING_REF_Reference_allele_mis;
+static PyObject *__pyx_n_s_MQ;
+static PyObject *__pyx_n_s_N;
+static PyObject *__pyx_n_s_NT_ALLELES;
+static PyObject *__pyx_n_s_NT_GENOTYPES;
+static PyObject *__pyx_n_s_NT_NR_ALLELES;
+static PyObject *__pyx_n_s_NT_NUMBER;
+static PyObject *__pyx_n_s_NT_PHASED_GENOTYPES;
+static PyObject *__pyx_n_s_NT_UNKNOWN;
+static PyObject *__pyx_n_s_NotImplementedError;
+static PyObject *__pyx_kp_s_Number;
+static PyObject *__pyx_n_s_Number_2;
+static PyObject *__pyx_n_b_PASS;
+static PyObject *__pyx_n_s_PASS;
+static PyObject *__pyx_n_s_PL;
+static PyObject *__pyx_n_s_POS;
+static PyObject *__pyx_n_s_POS_NOT_NUMERICAL;
+static PyObject *__pyx_kp_s_POS_NOT_NUMERICAL_Position_colum;
+static PyObject *__pyx_n_s_POS_NOT_POSITIVE;
+static PyObject *__pyx_kp_s_POS_NOT_POSITIVE_Position_field;
+static PyObject *__pyx_n_s_PQ;
+static PyObject *__pyx_n_s_PS;
+static PyObject *__pyx_kp_s_Phase_set;
+static PyObject *__pyx_kp_s_Phasing_quality;
+static PyObject *__pyx_kp_s_Phred_scaled_genotype_likelihood;
+static PyObject *__pyx_n_s_QUAL;
+static PyObject *__pyx_n_s_QUAL_NOT_NUMERICAL;
+static PyObject *__pyx_kp_s_QUAL_NOT_NUMERICAL_Quality_field;
+static PyObject *__pyx_n_s_REF;
+static PyObject *__pyx_kp_s_RMS_mapping_quality;
+static PyObject *__pyx_kp_s_Read_depth_at_this_position_for;
+static PyObject *__pyx_kp_s_Required_key_s_not_found_in_data;
+static PyObject *__pyx_kp_s_Sample_Genotype_Filter;
+static PyObject *__pyx_n_s_StopIteration;
+static PyObject *__pyx_n_s_String;
+static PyObject *__pyx_n_s_Tabixfile;
+static PyObject *__pyx_kp_s_Type;
+static PyObject *__pyx_n_s_Type_2;
+static PyObject *__pyx_n_s_UNKNOWN_CHAR_IN_REF;
+static PyObject *__pyx_kp_s_UNKNOWN_CHAR_IN_REF_Unknown_char;
+static PyObject *__pyx_n_s_UNKNOWN_FORMAT_STRING;
+static PyObject *__pyx_kp_s_UNKNOWN_FORMAT_STRING_Unknown_fi;
+static PyObject *__pyx_kp_s_Undefined_tag;
+static PyObject *__pyx_kp_s_Unknown_number_type_encountered;
+static PyObject *__pyx_n_s_V33_BAD_ALLELE;
+static PyObject *__pyx_kp_s_V33_BAD_ALLELE_Cannot_interpret;
+static PyObject *__pyx_n_s_V33_BAD_REF;
+static PyObject *__pyx_kp_s_V33_BAD_REF_Reference_should_be;
+static PyObject *__pyx_n_s_V33_UNMATCHED_DELETION;
+static PyObject *__pyx_kp_s_V33_UNMATCHED_DELETION_Deleted_s;
+static PyObject *__pyx_n_s_V40_BAD_ALLELE;
+static PyObject *__pyx_kp_s_V40_BAD_ALLELE_Bad_allele_found;
+static PyObject *__pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD;
+static PyObject *__pyx_kp_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2;
+static PyObject *__pyx_n_s_V40_MISSING_ANGLE_BRACKETS;
+static PyObject *__pyx_kp_s_V40_MISSING_ANGLE_BRACKETS_Forma;
+static PyObject *__pyx_n_s_VCF;
+static PyObject *__pyx_n_s_VCFRecord;
+static PyObject *__pyx_n_s_VCF___init;
+static PyObject *__pyx_n_s_VCF__add_definition;
+static PyObject *__pyx_n_s_VCF__parse;
+static PyObject *__pyx_n_s_VCF__parse_header;
+static PyObject *__pyx_n_s_VCF_compare_calls;
+static PyObject *__pyx_n_s_VCF_connect;
+static PyObject *__pyx_n_s_VCF_convertGT;
+static PyObject *__pyx_n_s_VCF_convertGTback;
+static PyObject *__pyx_n_s_VCF_enter_default_format;
+static PyObject *__pyx_n_s_VCF_error;
+static PyObject *__pyx_n_s_VCF_fetch;
+static PyObject *__pyx_n_s_VCF_format_format;
+static PyObject *__pyx_n_s_VCF_format_formatdata;
+static PyObject *__pyx_n_s_VCF_get_expected;
+static PyObject *__pyx_n_s_VCF_getfilter;
+static PyObject *__pyx_n_s_VCF_getformat;
+static PyObject *__pyx_n_s_VCF_getheader;
+static PyObject *__pyx_n_s_VCF_getinfo;
+static PyObject *__pyx_n_s_VCF_getsamples;
+static PyObject *__pyx_n_s_VCF_ignoreerror;
+static PyObject *__pyx_n_s_VCF_inregion;
+static PyObject *__pyx_n_s_VCF_parse;
+static PyObject *__pyx_n_s_VCF_parse_data;
+static PyObject *__pyx_n_s_VCF_parse_format;
+static PyObject *__pyx_n_s_VCF_parse_formatdata;
+static PyObject *__pyx_n_s_VCF_parse_header;
+static PyObject *__pyx_n_s_VCF_parse_heading;
+static PyObject *__pyx_n_s_VCF_setfilter;
+static PyObject *__pyx_n_s_VCF_setformat;
+static PyObject *__pyx_n_s_VCF_setheader;
+static PyObject *__pyx_n_s_VCF_setinfo;
+static PyObject *__pyx_n_s_VCF_setreference;
+static PyObject *__pyx_n_s_VCF_setregions;
+static PyObject *__pyx_n_s_VCF_setsamples;
+static PyObject *__pyx_n_s_VCF_setversion;
+static PyObject *__pyx_n_s_VCF_validate;
+static PyObject *__pyx_n_s_VCF_warnerror;
+static PyObject *__pyx_n_s_VCF_write;
+static PyObject *__pyx_n_s_VCF_write_data;
+static PyObject *__pyx_n_s_VCF_write_header;
+static PyObject *__pyx_n_s_VCF_write_heading;
+static PyObject *__pyx_n_s_VCF_writeheader;
+static PyObject *__pyx_kp_s_VCFv3_3;
+static PyObject *__pyx_kp_s_VCFv4_0;
+static PyObject *__pyx_kp_s_VCFv4_1;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_WRONG_REF;
+static PyObject *__pyx_kp_s_WRONG_REF_Wrong_reference_s;
+static PyObject *__pyx_n_s_Warning;
+static PyObject *__pyx_n_s_ZERO_FOR_NON_FLAG_FIELD;
+static PyObject *__pyx_kp_s_ZERO_FOR_NON_FLAG_FIELD_number_s;
+static PyObject *__pyx_n_s_ZERO_LENGTH_ALLELE;
+static PyObject *__pyx_kp_s_ZERO_LENGTH_ALLELE_Found_zero_le;
+static PyObject *__pyx_kp_s__10;
+static PyObject *__pyx_kp_s__13;
+static PyObject *__pyx_kp_s__2;
+static PyObject *__pyx_kp_s__21;
+static PyObject *__pyx_kp_s__23;
+static PyObject *__pyx_kp_s__29;
+static PyObject *__pyx_kp_s__4;
+static PyObject *__pyx_kp_s__46;
+static PyObject *__pyx_kp_s__51;
+static PyObject *__pyx_kp_s__55;
+static PyObject *__pyx_kp_s__6;
+static PyObject *__pyx_kp_s__60;
+static PyObject *__pyx_kp_s__61;
+static PyObject *__pyx_kp_b__8;
+static PyObject *__pyx_kp_s__8;
+static PyObject *__pyx_kp_s__91;
+static PyObject *__pyx_n_s_a;
+static PyObject *__pyx_n_s_add;
+static PyObject *__pyx_n_s_add_definition;
+static PyObject *__pyx_n_s_addn;
+static PyObject *__pyx_n_s_addns;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_allele;
+static PyObject *__pyx_n_s_alleleRegEx;
+static PyObject *__pyx_kp_s_alleles;
+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_args;
+static PyObject *__pyx_n_s_bisect;
+static PyObject *__pyx_n_s_blurp;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_n_s_chrom;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_collections;
+static PyObject *__pyx_n_s_cols;
+static PyObject *__pyx_n_s_compare_calls;
+static PyObject *__pyx_n_s_compile;
+static PyObject *__pyx_n_s_connect;
+static PyObject *__pyx_n_s_convertGT;
+static PyObject *__pyx_n_s_convertGTback;
+static PyObject *__pyx_n_s_copy;
+static PyObject *__pyx_n_s_copy_2;
+static PyObject *__pyx_n_s_d;
+static PyObject *__pyx_n_s_data;
+static PyObject *__pyx_n_s_datagenerator;
+static PyObject *__pyx_n_s_deepcopy;
+static PyObject *__pyx_n_s_defaultdict;
+static PyObject *__pyx_kp_s_deletion_is_s_reference_is_s;
+static PyObject *__pyx_n_s_descr;
+static PyObject *__pyx_n_s_description;
+static PyObject *__pyx_n_s_dict;
+static PyObject *__pyx_n_s_dict_2;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_elts;
+static PyObject *__pyx_n_s_end;
+static PyObject *__pyx_n_s_endswith;
+static PyObject *__pyx_n_s_enter_default_format;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_n_s_err;
+static PyObject *__pyx_n_s_error;
+static PyObject *__pyx_n_s_errorlabel;
+static PyObject *__pyx_n_s_errors;
+static PyObject *__pyx_n_s_errorstring;
+static PyObject *__pyx_n_s_errwarn;
+static PyObject *__pyx_n_s_expected;
+static PyObject *__pyx_kp_s_expected_s_for_s_samples_s_got_s;
+static PyObject *__pyx_n_s_f;
+static PyObject *__pyx_n_s_fa;
+static PyObject *__pyx_n_s_faref;
+static PyObject *__pyx_n_s_faref_leftflank;
+static PyObject *__pyx_n_s_fetch;
+static PyObject *__pyx_n_s_fileformat;
+static PyObject *__pyx_kp_s_fileformat_VCFv_s_s;
+static PyObject *__pyx_n_s_filename;
+static PyObject *__pyx_n_s_filter;
+static PyObject *__pyx_n_s_filter_2;
+static PyObject *__pyx_n_s_find;
+static PyObject *__pyx_n_s_first;
+static PyObject *__pyx_n_s_fmt;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_n_s_format_2;
+static PyObject *__pyx_n_s_format_format;
+static PyObject *__pyx_n_s_format_formatdata;
+static PyObject *__pyx_n_s_formatdict;
+static PyObject *__pyx_kp_s_found_s_expected_s;
+static PyObject *__pyx_kp_s_found_s_values_in_element_s_exp;
+static PyObject *__pyx_kp_s_genotypes;
+static PyObject *__pyx_n_s_get;
+static PyObject *__pyx_n_s_get_expected;
+static PyObject *__pyx_n_s_get_sequence;
+static PyObject *__pyx_n_s_getfilter;
+static PyObject *__pyx_n_s_getformat;
+static PyObject *__pyx_n_s_getheader;
+static PyObject *__pyx_n_s_getinfo;
+static PyObject *__pyx_n_s_getsamples;
+static PyObject *__pyx_n_s_gts;
+static PyObject *__pyx_n_s_gtsRegEx;
+static PyObject *__pyx_n_s_have_deletions;
+static PyObject *__pyx_n_s_header;
+static PyObject *__pyx_n_s_header_2;
+static PyObject *__pyx_n_s_headings;
+static PyObject *__pyx_kp_s_home_andreas_devel_pysam_pysam;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_kp_s_id_numbertype_number_type_descri;
+static PyObject *__pyx_kp_s_id_s_expected_s_parameters_got_s;
+static PyObject *__pyx_n_s_idx;
+static PyObject *__pyx_n_s_ielts;
+static PyObject *__pyx_n_s_ignored_errors;
+static PyObject *__pyx_n_s_ignoreerror;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_kp_s_in_line_s_s_s_s_s;
+static PyObject *__pyx_n_s_info;
+static PyObject *__pyx_n_s_info_2;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_n_s_inregion;
+static PyObject *__pyx_n_s_itemgetter;
+static PyObject *__pyx_n_s_itervalues;
+static PyObject *__pyx_n_s_join;
+static PyObject *__pyx_n_s_k;
+static PyObject *__pyx_n_s_key;
+static PyObject *__pyx_n_s_keys;
+static PyObject *__pyx_n_s_l;
+static PyObject *__pyx_n_s_label;
+static PyObject *__pyx_n_s_last;
+static PyObject *__pyx_n_s_last_line;
+static PyObject *__pyx_n_s_left;
+static PyObject *__pyx_n_s_leftalign;
+static PyObject *__pyx_n_s_leftalign_2;
+static PyObject *__pyx_n_s_line;
+static PyObject *__pyx_n_s_line_2;
+static PyObject *__pyx_n_s_lineno;
+static PyObject *__pyx_n_s_lineparse;
+static PyObject *__pyx_n_s_lines;
+static PyObject *__pyx_n_s_lines_2;
+static PyObject *__pyx_n_s_longest;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_map;
+static PyObject *__pyx_n_s_match;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_min;
+static PyObject *__pyx_n_s_missing;
+static PyObject *__pyx_n_s_missingvalue;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_movable;
+static PyObject *__pyx_n_s_n;
+static PyObject *__pyx_n_s_na;
+static PyObject *__pyx_n_s_namedtuple;
+static PyObject *__pyx_kp_s_needs_to_be_checked;
+static PyObject *__pyx_n_s_newalts;
+static PyObject *__pyx_n_s_nmb;
+static PyObject *__pyx_kp_s_nonref_alleles;
+static PyObject *__pyx_n_s_number;
+static PyObject *__pyx_n_s_numbertype;
+static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_operator;
+static PyObject *__pyx_n_s_opt;
+static PyObject *__pyx_kp_s_output;
+static PyObject *__pyx_n_s_output_2;
+static PyObject *__pyx_n_s_parse;
+static PyObject *__pyx_n_s_parse_2;
+static PyObject *__pyx_n_s_parse_data;
+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_header_2;
+static PyObject *__pyx_n_s_parse_heading;
+static PyObject *__pyx_n_s_parse_regions;
+static PyObject *__pyx_n_s_parser;
+static PyObject *__pyx_kp_s_phased_genotypes;
+static PyObject *__pyx_n_s_pos;
+static PyObject *__pyx_n_s_pos1;
+static PyObject *__pyx_n_s_pos2;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_pysam;
+static PyObject *__pyx_n_s_pysam_cvcf;
+static PyObject *__pyx_n_s_pyx_vtable;
+static PyObject *__pyx_n_s_qual;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_r;
+static PyObject *__pyx_n_s_range;
+static PyObject *__pyx_n_s_re;
+static PyObject *__pyx_n_s_record;
+static PyObject *__pyx_n_s_ref;
+static PyObject *__pyx_n_s_ref1;
+static PyObject *__pyx_n_s_ref2;
+static PyObject *__pyx_n_s_reference;
+static PyObject *__pyx_n_s_reference_2;
+static PyObject *__pyx_kp_s_reference_is_s_VCF_says_s;
+static PyObject *__pyx_n_s_region;
+static PyObject *__pyx_n_s_regions;
+static PyObject *__pyx_n_s_regions_2;
+static PyObject *__pyx_n_s_replace;
+static PyObject *__pyx_n_s_required;
+static PyObject *__pyx_n_s_required_2;
+static PyObject *__pyx_n_s_rest;
+static PyObject *__pyx_n_s_result;
+static PyObject *__pyx_n_s_s;
+static PyObject *__pyx_kp_s_s_s;
+static PyObject *__pyx_kp_s_s_s_2;
+static PyObject *__pyx_n_s_sample;
+static PyObject *__pyx_n_s_sample2column;
+static PyObject *__pyx_n_s_samples;
+static PyObject *__pyx_n_s_samples_2;
+static PyObject *__pyx_n_s_sdata;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_send;
+static PyObject *__pyx_n_s_separator;
+static PyObject *__pyx_n_s_sequence;
+static PyObject *__pyx_n_s_setfilter;
+static PyObject *__pyx_n_s_setformat;
+static PyObject *__pyx_n_s_setheader;
+static PyObject *__pyx_n_s_setinfo;
+static PyObject *__pyx_n_s_setreference;
+static PyObject *__pyx_n_s_setregions;
+static PyObject *__pyx_n_s_setsamples;
+static PyObject *__pyx_n_s_setversion;
+static PyObject *__pyx_n_s_shortest;
+static PyObject *__pyx_n_s_split;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_n_s_startswith;
+static PyObject *__pyx_kp_s_sth_entry_not_found;
+static PyObject *__pyx_n_s_stream;
+static PyObject *__pyx_n_s_string;
+static PyObject *__pyx_n_s_strip;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_t;
+static PyObject *__pyx_n_s_tabixfile;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_throw;
+static PyObject *__pyx_n_s_type;
+static PyObject *__pyx_n_s_upper;
+static PyObject *__pyx_n_s_v;
+static PyObject *__pyx_n_s_validate;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_values;
+static PyObject *__pyx_n_s_var;
+static PyObject *__pyx_n_s_vcf;
+static PyObject *__pyx_n_s_vcffile;
+static PyObject *__pyx_n_s_version;
+static PyObject *__pyx_n_s_version_2;
+static PyObject *__pyx_n_s_warn_errors;
+static PyObject *__pyx_n_s_warnerror;
+static PyObject *__pyx_n_s_write;
+static PyObject *__pyx_n_s_write_data;
+static PyObject *__pyx_n_s_write_header;
+static PyObject *__pyx_n_s_write_heading;
+static PyObject *__pyx_n_s_writeheader;
+static PyObject *__pyx_n_s_x;
+static PyObject *__pyx_n_s_y;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_float_0_0;
 static PyObject *__pyx_int_0;
 static PyObject *__pyx_int_1;
 static PyObject *__pyx_int_2;
@@ -2353,7 +2625,6 @@ static PyObject *__pyx_int_6;
 static PyObject *__pyx_int_7;
 static PyObject *__pyx_int_8;
 static PyObject *__pyx_int_9;
-static PyObject *__pyx_int_neg_1;
 static PyObject *__pyx_int_10;
 static PyObject *__pyx_int_11;
 static PyObject *__pyx_int_12;
@@ -2381,151 +2652,188 @@ static PyObject *__pyx_int_33;
 static PyObject *__pyx_int_40;
 static PyObject *__pyx_int_100;
 static PyObject *__pyx_int_3000000000;
-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_22;
-static PyObject *__pyx_k_tuple_23;
-static PyObject *__pyx_k_tuple_26;
-static PyObject *__pyx_k_tuple_29;
-static PyObject *__pyx_k_tuple_30;
-static PyObject *__pyx_k_tuple_31;
-static PyObject *__pyx_k_tuple_33;
-static PyObject *__pyx_k_tuple_34;
-static PyObject *__pyx_k_tuple_35;
-static PyObject *__pyx_k_tuple_42;
-static PyObject *__pyx_k_tuple_43;
-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_51;
-static PyObject *__pyx_k_tuple_52;
-static PyObject *__pyx_k_tuple_62;
-static PyObject *__pyx_k_tuple_63;
-static PyObject *__pyx_k_tuple_77;
-static PyObject *__pyx_k_tuple_78;
-static PyObject *__pyx_k_tuple_86;
-static PyObject *__pyx_k_tuple_87;
-static PyObject *__pyx_k_tuple_89;
-static PyObject *__pyx_k_tuple_97;
-static PyObject *__pyx_k_tuple_98;
-static PyObject *__pyx_k_tuple_99;
-static PyObject *__pyx_k_tuple_103;
-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_111;
-static PyObject *__pyx_k_tuple_112;
-static PyObject *__pyx_k_tuple_113;
-static PyObject *__pyx_k_tuple_117;
-static PyObject *__pyx_k_tuple_119;
-static PyObject *__pyx_k_tuple_120;
-static PyObject *__pyx_k_tuple_122;
-static PyObject *__pyx_k_tuple_124;
-static PyObject *__pyx_k_tuple_127;
-static PyObject *__pyx_k_tuple_129;
-static PyObject *__pyx_k_tuple_131;
-static PyObject *__pyx_k_tuple_132;
-static PyObject *__pyx_k_tuple_136;
-static PyObject *__pyx_k_tuple_139;
-static PyObject *__pyx_k_tuple_174;
-static PyObject *__pyx_k_tuple_177;
-static PyObject *__pyx_k_tuple_179;
-static PyObject *__pyx_k_tuple_181;
-static PyObject *__pyx_k_tuple_184;
-static PyObject *__pyx_k_tuple_187;
-static PyObject *__pyx_k_tuple_190;
-static PyObject *__pyx_k_tuple_193;
-static PyObject *__pyx_k_tuple_196;
-static PyObject *__pyx_k_tuple_199;
-static PyObject *__pyx_k_tuple_202;
-static PyObject *__pyx_k_tuple_205;
-static PyObject *__pyx_k_tuple_208;
-static PyObject *__pyx_k_tuple_211;
-static PyObject *__pyx_k_tuple_214;
-static PyObject *__pyx_k_tuple_217;
-static PyObject *__pyx_k_tuple_220;
-static PyObject *__pyx_k_tuple_223;
-static PyObject *__pyx_k_tuple_226;
-static PyObject *__pyx_k_tuple_229;
-static PyObject *__pyx_k_tuple_232;
-static PyObject *__pyx_k_tuple_235;
-static PyObject *__pyx_k_tuple_238;
-static PyObject *__pyx_k_tuple_241;
-static PyObject *__pyx_k_tuple_244;
-static PyObject *__pyx_k_tuple_247;
-static PyObject *__pyx_k_tuple_250;
-static PyObject *__pyx_k_tuple_253;
-static PyObject *__pyx_k_tuple_256;
-static PyObject *__pyx_k_tuple_259;
-static PyObject *__pyx_k_tuple_262;
-static PyObject *__pyx_k_tuple_265;
-static PyObject *__pyx_k_tuple_268;
-static PyObject *__pyx_k_tuple_271;
-static PyObject *__pyx_k_tuple_274;
-static PyObject *__pyx_k_tuple_277;
-static PyObject *__pyx_k_tuple_280;
-static PyObject *__pyx_k_tuple_283;
-static PyObject *__pyx_k_tuple_286;
-static PyObject *__pyx_k_tuple_289;
-static PyObject *__pyx_k_tuple_292;
-static PyObject *__pyx_k_tuple_295;
-static PyObject *__pyx_k_tuple_297;
-static PyObject *__pyx_k_tuple_299;
-static PyObject *__pyx_k_codeobj_133;
-static PyObject *__pyx_k_codeobj_137;
-static PyObject *__pyx_k_codeobj_175;
-static PyObject *__pyx_k_codeobj_178;
-static PyObject *__pyx_k_codeobj_182;
-static PyObject *__pyx_k_codeobj_185;
-static PyObject *__pyx_k_codeobj_188;
-static PyObject *__pyx_k_codeobj_191;
-static PyObject *__pyx_k_codeobj_194;
-static PyObject *__pyx_k_codeobj_197;
-static PyObject *__pyx_k_codeobj_200;
-static PyObject *__pyx_k_codeobj_203;
-static PyObject *__pyx_k_codeobj_206;
-static PyObject *__pyx_k_codeobj_209;
-static PyObject *__pyx_k_codeobj_212;
-static PyObject *__pyx_k_codeobj_215;
-static PyObject *__pyx_k_codeobj_218;
-static PyObject *__pyx_k_codeobj_221;
-static PyObject *__pyx_k_codeobj_224;
-static PyObject *__pyx_k_codeobj_227;
-static PyObject *__pyx_k_codeobj_230;
-static PyObject *__pyx_k_codeobj_233;
-static PyObject *__pyx_k_codeobj_236;
-static PyObject *__pyx_k_codeobj_239;
-static PyObject *__pyx_k_codeobj_242;
-static PyObject *__pyx_k_codeobj_245;
-static PyObject *__pyx_k_codeobj_248;
-static PyObject *__pyx_k_codeobj_251;
-static PyObject *__pyx_k_codeobj_254;
-static PyObject *__pyx_k_codeobj_257;
-static PyObject *__pyx_k_codeobj_260;
-static PyObject *__pyx_k_codeobj_263;
-static PyObject *__pyx_k_codeobj_266;
-static PyObject *__pyx_k_codeobj_269;
-static PyObject *__pyx_k_codeobj_272;
-static PyObject *__pyx_k_codeobj_275;
-static PyObject *__pyx_k_codeobj_278;
-static PyObject *__pyx_k_codeobj_281;
-static PyObject *__pyx_k_codeobj_284;
-static PyObject *__pyx_k_codeobj_287;
-static PyObject *__pyx_k_codeobj_290;
-static PyObject *__pyx_k_codeobj_293;
-static PyObject *__pyx_k_codeobj_296;
-static PyObject *__pyx_k_codeobj_300;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_slice__18;
+static PyObject *__pyx_slice__19;
+static PyObject *__pyx_slice__25;
+static PyObject *__pyx_slice__27;
+static PyObject *__pyx_slice__42;
+static PyObject *__pyx_slice__48;
+static PyObject *__pyx_slice__50;
+static PyObject *__pyx_slice__54;
+static PyObject *__pyx_slice__57;
+static PyObject *__pyx_slice__58;
+static PyObject *__pyx_slice__59;
+static PyObject *__pyx_slice__71;
+static PyObject *__pyx_slice__73;
+static PyObject *__pyx_slice__74;
+static PyObject *__pyx_slice__76;
+static PyObject *__pyx_slice__77;
+static PyObject *__pyx_slice__78;
+static PyObject *__pyx_slice__79;
+static PyObject *__pyx_slice__80;
+static PyObject *__pyx_slice__86;
+static PyObject *__pyx_slice__87;
+static PyObject *__pyx_slice__88;
+static PyObject *__pyx_slice__89;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__30;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__34;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_tuple__38;
+static PyObject *__pyx_tuple__39;
+static PyObject *__pyx_tuple__40;
+static PyObject *__pyx_tuple__41;
+static PyObject *__pyx_tuple__43;
+static PyObject *__pyx_tuple__44;
+static PyObject *__pyx_tuple__45;
+static PyObject *__pyx_tuple__47;
+static PyObject *__pyx_tuple__49;
+static PyObject *__pyx_tuple__52;
+static PyObject *__pyx_tuple__53;
+static PyObject *__pyx_tuple__56;
+static PyObject *__pyx_tuple__62;
+static PyObject *__pyx_tuple__63;
+static PyObject *__pyx_tuple__64;
+static PyObject *__pyx_tuple__65;
+static PyObject *__pyx_tuple__66;
+static PyObject *__pyx_tuple__67;
+static PyObject *__pyx_tuple__68;
+static PyObject *__pyx_tuple__69;
+static PyObject *__pyx_tuple__70;
+static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__75;
+static PyObject *__pyx_tuple__81;
+static PyObject *__pyx_tuple__82;
+static PyObject *__pyx_tuple__83;
+static PyObject *__pyx_tuple__84;
+static PyObject *__pyx_tuple__85;
+static PyObject *__pyx_tuple__90;
+static PyObject *__pyx_tuple__92;
+static PyObject *__pyx_tuple__93;
+static PyObject *__pyx_tuple__94;
+static PyObject *__pyx_tuple__96;
+static PyObject *__pyx_tuple__98;
+static PyObject *__pyx_tuple__99;
+static PyObject *__pyx_tuple__101;
+static PyObject *__pyx_tuple__102;
+static PyObject *__pyx_tuple__104;
+static PyObject *__pyx_tuple__105;
+static PyObject *__pyx_tuple__107;
+static PyObject *__pyx_tuple__108;
+static PyObject *__pyx_tuple__110;
+static PyObject *__pyx_tuple__111;
+static PyObject *__pyx_tuple__113;
+static PyObject *__pyx_tuple__115;
+static PyObject *__pyx_tuple__117;
+static PyObject *__pyx_tuple__118;
+static PyObject *__pyx_tuple__120;
+static PyObject *__pyx_tuple__122;
+static PyObject *__pyx_tuple__124;
+static PyObject *__pyx_tuple__126;
+static PyObject *__pyx_tuple__128;
+static PyObject *__pyx_tuple__130;
+static PyObject *__pyx_tuple__132;
+static PyObject *__pyx_tuple__134;
+static PyObject *__pyx_tuple__136;
+static PyObject *__pyx_tuple__138;
+static PyObject *__pyx_tuple__139;
+static PyObject *__pyx_tuple__141;
+static PyObject *__pyx_tuple__143;
+static PyObject *__pyx_tuple__145;
+static PyObject *__pyx_tuple__147;
+static PyObject *__pyx_tuple__149;
+static PyObject *__pyx_tuple__151;
+static PyObject *__pyx_tuple__153;
+static PyObject *__pyx_tuple__155;
+static PyObject *__pyx_tuple__157;
+static PyObject *__pyx_tuple__159;
+static PyObject *__pyx_tuple__161;
+static PyObject *__pyx_tuple__163;
+static PyObject *__pyx_tuple__165;
+static PyObject *__pyx_tuple__167;
+static PyObject *__pyx_tuple__169;
+static PyObject *__pyx_tuple__171;
+static PyObject *__pyx_tuple__173;
+static PyObject *__pyx_tuple__175;
+static PyObject *__pyx_tuple__177;
+static PyObject *__pyx_tuple__179;
+static PyObject *__pyx_tuple__181;
+static PyObject *__pyx_tuple__183;
+static PyObject *__pyx_tuple__185;
+static PyObject *__pyx_tuple__187;
+static PyObject *__pyx_tuple__188;
+static PyObject *__pyx_codeobj__95;
+static PyObject *__pyx_codeobj__97;
+static PyObject *__pyx_codeobj__100;
+static PyObject *__pyx_codeobj__103;
+static PyObject *__pyx_codeobj__106;
+static PyObject *__pyx_codeobj__109;
+static PyObject *__pyx_codeobj__112;
+static PyObject *__pyx_codeobj__114;
+static PyObject *__pyx_codeobj__116;
+static PyObject *__pyx_codeobj__119;
+static PyObject *__pyx_codeobj__121;
+static PyObject *__pyx_codeobj__123;
+static PyObject *__pyx_codeobj__125;
+static PyObject *__pyx_codeobj__127;
+static PyObject *__pyx_codeobj__129;
+static PyObject *__pyx_codeobj__131;
+static PyObject *__pyx_codeobj__133;
+static PyObject *__pyx_codeobj__135;
+static PyObject *__pyx_codeobj__137;
+static PyObject *__pyx_codeobj__140;
+static PyObject *__pyx_codeobj__142;
+static PyObject *__pyx_codeobj__144;
+static PyObject *__pyx_codeobj__146;
+static PyObject *__pyx_codeobj__148;
+static PyObject *__pyx_codeobj__150;
+static PyObject *__pyx_codeobj__152;
+static PyObject *__pyx_codeobj__154;
+static PyObject *__pyx_codeobj__156;
+static PyObject *__pyx_codeobj__158;
+static PyObject *__pyx_codeobj__160;
+static PyObject *__pyx_codeobj__162;
+static PyObject *__pyx_codeobj__164;
+static PyObject *__pyx_codeobj__166;
+static PyObject *__pyx_codeobj__168;
+static PyObject *__pyx_codeobj__170;
+static PyObject *__pyx_codeobj__172;
+static PyObject *__pyx_codeobj__174;
+static PyObject *__pyx_codeobj__176;
+static PyObject *__pyx_codeobj__178;
+static PyObject *__pyx_codeobj__180;
+static PyObject *__pyx_codeobj__182;
+static PyObject *__pyx_codeobj__184;
+static PyObject *__pyx_codeobj__186;
+static PyObject *__pyx_codeobj__189;
+
+/* "pysam/cvcf.pyx":59
+ * 
+ * # Utility function.  Uses 0-based coordinates
+ * def get_sequence(chrom, start, end, fa):             # <<<<<<<<<<<<<<
+ *     # obtain sequence from .fa file, without truncation
+ *     if end<=start: return ""
+ */
 
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_1get_sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
@@ -2535,11 +2843,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_1get_sequence(PyObject *__pyx_self, PyObj
   PyObject *__pyx_v_start = 0;
   PyObject *__pyx_v_end = 0;
   PyObject *__pyx_v_fa = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("get_sequence (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__chrom,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__fa,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_chrom,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_fa,0};
     PyObject* values[4] = {0,0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -2555,20 +2866,20 @@ static PyObject *__pyx_pw_5pysam_4cvcf_1get_sequence(PyObject *__pyx_self, PyObj
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__chrom)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chrom)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
         else {
           __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
         else {
           __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
-        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fa)) != 0)) kw_args--;
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fa)) != 0)) kw_args--;
         else {
           __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
@@ -2598,18 +2909,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_1get_sequence(PyObject *__pyx_self, PyObj
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_get_sequence(__pyx_self, __pyx_v_chrom, __pyx_v_start, __pyx_v_end, __pyx_v_fa);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":59
- * 
- * # Utility function.  Uses 0-based coordinates
- * def get_sequence(chrom, start, end, fa):             # <<<<<<<<<<<<<<
- *     # obtain sequence from .fa file, without truncation
- *     if end<=start: return ""
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_fa) {
   PyObject *__pyx_v_sequence = NULL;
   PyObject *__pyx_r = NULL;
@@ -2638,12 +2943,10 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
     __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-    __pyx_r = ((PyObject *)__pyx_kp_s_1);
+    __Pyx_INCREF(__pyx_kp_s_);
+    __pyx_r = __pyx_kp_s_;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
   /* "pysam/cvcf.pyx":62
  *     # obtain sequence from .fa file, without truncation
@@ -2653,20 +2956,18 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
  *     sequence = fa.fetch(chrom, start, end).upper()
  */
   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fa); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = (!__pyx_t_2);
+  __pyx_t_3 = ((!__pyx_t_2) != 0);
   if (__pyx_t_3) {
     __Pyx_XDECREF(__pyx_r);
     __pyx_t_1 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+    __pyx_t_4 = PyNumber_Multiply(__pyx_n_s_N, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_r = ((PyObject *)__pyx_t_4);
+    __pyx_r = __pyx_t_4;
     __pyx_t_4 = 0;
     goto __pyx_L0;
-    goto __pyx_L4;
   }
-  __pyx_L4:;
 
   /* "pysam/cvcf.pyx":63
  *     if end<=start: return ""
@@ -2682,10 +2983,10 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
     __Pyx_XDECREF(__pyx_r);
     __pyx_t_4 = PyNumber_Negative(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    __pyx_t_1 = PyNumber_Multiply(__pyx_n_s_N, __pyx_t_4); 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_4); __pyx_t_4 = 0;
-    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __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 = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
@@ -2701,26 +3002,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
     __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, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); 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_4); __pyx_t_4 = 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 = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_upper); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); 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_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_1), __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_6); 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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __pyx_r = __pyx_t_5;
     __pyx_t_5 = 0;
     goto __pyx_L0;
-    goto __pyx_L5;
   }
-  __pyx_L5:;
 
   /* "pysam/cvcf.pyx":64
  *     if not fa: return "N"*(end-start)
@@ -2729,7 +3028,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
  *     if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence))
  *     return sequence
  */
-  __pyx_t_5 = PyObject_GetAttr(__pyx_v_fa, __pyx_n_s__fetch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fa, __pyx_n_s_fetch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
@@ -2742,14 +3041,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
   __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, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __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_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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_upper); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   __pyx_v_sequence = __pyx_t_1;
@@ -2782,14 +3081,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+    __pyx_t_6 = PyNumber_Multiply(__pyx_n_s_N, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sequence, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sequence, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-    __Pyx_DECREF(__pyx_v_sequence);
-    __pyx_v_sequence = __pyx_t_1;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF_SET(__pyx_v_sequence, __pyx_t_1);
     __pyx_t_1 = 0;
     goto __pyx_L6;
   }
@@ -2807,15 +3105,22 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
   __pyx_r = __pyx_v_sequence;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_AddTraceback("pysam.cvcf.get_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  /* "pysam/cvcf.pyx":59
+ * 
+ * # Utility function.  Uses 0-based coordinates
+ * def get_sequence(chrom, start, end, fa):             # <<<<<<<<<<<<<<
+ *     # obtain sequence from .fa file, without truncation
+ *     if end<=start: return ""
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("pysam.cvcf.get_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XDECREF(__pyx_v_sequence);
   __Pyx_XGIVEREF(__pyx_r);
@@ -2823,6 +3128,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__py
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":69
+ * 
+ * # Utility function.  Parses a region string
+ * def parse_regions( string ):             # <<<<<<<<<<<<<<
+ *     result = []
+ *     for r in string.split(','):
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3parse_regions(PyObject *__pyx_self, PyObject *__pyx_v_string); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3parse_regions = {__Pyx_NAMESTR("parse_regions"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3parse_regions, METH_O, __Pyx_DOCSTR(0)};
@@ -2831,18 +3144,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3parse_regions(PyObject *__pyx_self, PyOb
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("parse_regions (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_2parse_regions(__pyx_self, ((PyObject *)__pyx_v_string));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":69
- * 
- * # Utility function.  Parses a region string
- * def parse_regions( string ):             # <<<<<<<<<<<<<<
- *     result = []
- *     for r in string.split(','):
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string) {
   PyObject *__pyx_v_result = NULL;
   PyObject *__pyx_v_r = NULL;
@@ -2891,9 +3198,9 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *         elts = r.split(':')
  *         chrom, start, end = elts[0], 0, 3000000000
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_string, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_split); 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_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
@@ -2923,16 +3230,16 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
     } else {
       __pyx_t_2 = __pyx_t_4(__pyx_t_1);
       if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_2);
     }
-    __Pyx_XDECREF(__pyx_v_r);
-    __pyx_v_r = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_2);
     __pyx_t_2 = 0;
 
     /* "pysam/cvcf.pyx":72
@@ -2942,13 +3249,12 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *         chrom, start, end = elts[0], 0, 3000000000
  *         if len(elts)==1: pass
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_r, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_XDECREF(__pyx_v_elts);
-    __pyx_v_elts = __pyx_t_5;
+    __Pyx_XDECREF_SET(__pyx_v_elts, __pyx_t_5);
     __pyx_t_5 = 0;
 
     /* "pysam/cvcf.pyx":73
@@ -2958,20 +3264,17 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *         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 = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_2 = __pyx_int_0;
     __Pyx_INCREF(__pyx_t_2);
     __pyx_t_6 = __pyx_int_3000000000;
     __Pyx_INCREF(__pyx_t_6);
-    __Pyx_XDECREF(__pyx_v_chrom);
-    __pyx_v_chrom = __pyx_t_5;
+    __Pyx_XDECREF_SET(__pyx_v_chrom, __pyx_t_5);
     __pyx_t_5 = 0;
-    __Pyx_XDECREF(__pyx_v_start);
-    __pyx_v_start = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_start, __pyx_t_2);
     __pyx_t_2 = 0;
-    __Pyx_XDECREF(__pyx_v_end);
-    __pyx_v_end = __pyx_t_6;
+    __Pyx_XDECREF_SET(__pyx_v_end, __pyx_t_6);
     __pyx_t_6 = 0;
 
     /* "pysam/cvcf.pyx":74
@@ -2982,7 +3285,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *             if len(elts[1])>0:
  */
     __pyx_t_7 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_8 = (__pyx_t_7 == 1);
+    __pyx_t_8 = ((__pyx_t_7 == 1) != 0);
     if (__pyx_t_8) {
       goto __pyx_L5;
     }
@@ -2995,7 +3298,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *                 ielts = elts[1].split('-')
  */
     __pyx_t_7 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_8 = (__pyx_t_7 == 2);
+    __pyx_t_8 = ((__pyx_t_7 == 2) != 0);
     if (__pyx_t_8) {
 
       /* "pysam/cvcf.pyx":76
@@ -3005,11 +3308,11 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *                 ielts = elts[1].split('-')
  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
  */
-      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_6);
       __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_8 = (__pyx_t_7 > 0);
+      __pyx_t_8 = ((__pyx_t_7 > 0) != 0);
       if (__pyx_t_8) {
 
         /* "pysam/cvcf.pyx":77
@@ -3019,16 +3322,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])
  */
-        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_6);
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_XDECREF(__pyx_v_ielts);
-        __pyx_v_ielts = __pyx_t_6;
+        __Pyx_XDECREF_SET(__pyx_v_ielts, __pyx_t_6);
         __pyx_t_6 = 0;
 
         /* "pysam/cvcf.pyx":78
@@ -3039,18 +3341,18 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *                 except: raise ValueError("Don't understand region string '%s'" % r)
  */
         __pyx_t_7 = PyObject_Length(__pyx_v_ielts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_8 = (__pyx_t_7 != 2);
+        __pyx_t_8 = ((__pyx_t_7 != 2) != 0);
         if (__pyx_t_8) {
-          __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_v_r); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+          __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Don_t_understand_region_string_s, __pyx_v_r); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
           __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_2);
-          PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6));
-          __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
+          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
+          __Pyx_GIVEREF(__pyx_t_6);
           __pyx_t_6 = 0;
-          __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
           goto __pyx_L7;
         }
@@ -3069,44 +3371,32 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
           __Pyx_XGOTREF(__pyx_t_10);
           __Pyx_XGOTREF(__pyx_t_11);
           /*try:*/ {
-            __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ielts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-            __Pyx_GOTREF(__pyx_t_6);
-            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-            __Pyx_GOTREF(__pyx_t_2);
-            PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
-            __Pyx_GIVEREF(__pyx_t_6);
-            __pyx_t_6 = 0;
-            __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+            __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ielts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;};
             __Pyx_GOTREF(__pyx_t_6);
-            __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-            __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+            __pyx_t_2 = PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
             __Pyx_GOTREF(__pyx_t_2);
             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-            __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ielts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+            __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
             __Pyx_GOTREF(__pyx_t_6);
-            __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ielts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;};
+            __Pyx_GOTREF(__pyx_t_2);
+            __pyx_t_5 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
             __Pyx_GOTREF(__pyx_t_5);
-            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
-            __Pyx_GIVEREF(__pyx_t_6);
-            __pyx_t_6 = 0;
-            __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-            __Pyx_GOTREF(__pyx_t_6);
-            __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-            __Pyx_DECREF(__pyx_v_start);
-            __pyx_v_start = __pyx_t_2;
-            __pyx_t_2 = 0;
-            __Pyx_DECREF(__pyx_v_end);
-            __pyx_v_end = __pyx_t_6;
+            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_6);
             __pyx_t_6 = 0;
+            __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_5);
+            __pyx_t_5 = 0;
           }
           __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
           __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
           goto __pyx_L15_try_end;
           __pyx_L8_error:;
-          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
           __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
           /* "pysam/cvcf.pyx":80
  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
@@ -3117,26 +3407,26 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  */
           /*except:*/ {
             __Pyx_AddTraceback("pysam.cvcf.parse_regions", __pyx_clineno, __pyx_lineno, __pyx_filename);
-            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+            if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+            __Pyx_GOTREF(__pyx_t_5);
             __Pyx_GOTREF(__pyx_t_6);
             __Pyx_GOTREF(__pyx_t_2);
-            __Pyx_GOTREF(__pyx_t_5);
-            __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_v_r); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-            __Pyx_GOTREF(((PyObject *)__pyx_t_12));
+            __pyx_t_12 = __Pyx_PyString_Format(__pyx_kp_s_Don_t_understand_region_string_s, __pyx_v_r); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+            __Pyx_GOTREF(__pyx_t_12);
             __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
             __Pyx_GOTREF(__pyx_t_13);
-            PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_t_12));
-            __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
+            PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12);
+            __Pyx_GIVEREF(__pyx_t_12);
             __pyx_t_12 = 0;
-            __pyx_t_12 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
             __Pyx_GOTREF(__pyx_t_12);
-            __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
+            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
             __Pyx_Raise(__pyx_t_12, 0, 0, 0);
             __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
             {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
             __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
             goto __pyx_L9_exception_handled;
           }
           __pyx_L10_except_error:;
@@ -3166,18 +3456,18 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *         result.append( (chrom,start,end) )
  *     return result
  */
-      __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 = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Don_t_understand_region_string_s, __pyx_v_r); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
-      __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     __pyx_L5:;
@@ -3189,19 +3479,19 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  *     return result
  * 
  */
-    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_v_chrom);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
     __Pyx_GIVEREF(__pyx_v_chrom);
     __Pyx_INCREF(__pyx_v_start);
-    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_start);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_start);
     __Pyx_GIVEREF(__pyx_v_start);
     __Pyx_INCREF(__pyx_v_end);
-    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_end);
+    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end);
     __Pyx_GIVEREF(__pyx_v_end);
-    __pyx_t_14 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __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;
 
@@ -3213,12 +3503,19 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
  * 
  */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_result));
-  __pyx_r = ((PyObject *)__pyx_v_result);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __pyx_v_result;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":69
+ * 
+ * # Utility function.  Parses a region string
+ * def parse_regions( string ):             # <<<<<<<<<<<<<<
+ *     result = []
+ *     for r in string.split(','):
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -3241,15 +3538,26 @@ static PyObject *__pyx_pf_5pysam_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":105
+ *     cdef uint32_t pos
+ * 
+ *     def __init__(self, vcf):             # <<<<<<<<<<<<<<
+ *         self.vcf = vcf
+ *         # if len(data) != len(self.vcf._samples):
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_4cvcf_9VCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_pw_5pysam_4cvcf_9VCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_vcf = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vcf,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vcf,0};
     PyObject* values[1] = {0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -3262,7 +3570,7 @@ static int __pyx_pw_5pysam_4cvcf_9VCFRecord_1__init__(PyObject *__pyx_v_self, Py
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vcf)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vcf)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
       }
       if (unlikely(kw_args > 0)) {
@@ -3284,18 +3592,12 @@ static int __pyx_pw_5pysam_4cvcf_9VCFRecord_1__init__(PyObject *__pyx_v_self, Py
   return -1;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord___init__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self), __pyx_v_vcf);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":105
- *     cdef uint32_t pos
- * 
- *     def __init__(self, vcf):             # <<<<<<<<<<<<<<
- *         self.vcf = vcf
- *         # if len(data) != len(self.vcf._samples):
- */
-
 static int __pyx_pf_5pysam_4cvcf_9VCFRecord___init__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -3314,20 +3616,40 @@ static int __pyx_pf_5pysam_4cvcf_9VCFRecord___init__(struct __pyx_obj_5pysam_4cv
   __Pyx_DECREF(__pyx_v_self->vcf);
   __pyx_v_self->vcf = __pyx_v_vcf;
 
+  /* "pysam/cvcf.pyx":105
+ *     cdef uint32_t pos
+ * 
+ *     def __init__(self, vcf):             # <<<<<<<<<<<<<<
+ *         self.vcf = vcf
+ *         # if len(data) != len(self.vcf._samples):
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":116
+ *         #                     len(data)))
+ * 
+ *     def __cinit__(self, vcf):             # <<<<<<<<<<<<<<
+ *         # start indexed access at genotypes
+ *         self.offset = 9
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_4cvcf_9VCFRecord_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_pw_5pysam_4cvcf_9VCFRecord_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_vcf = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vcf,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vcf,0};
     PyObject* values[1] = {0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -3340,7 +3662,7 @@ static int __pyx_pw_5pysam_4cvcf_9VCFRecord_3__cinit__(PyObject *__pyx_v_self, P
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vcf)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vcf)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
       }
       if (unlikely(kw_args > 0)) {
@@ -3362,25 +3684,19 @@ static int __pyx_pw_5pysam_4cvcf_9VCFRecord_3__cinit__(PyObject *__pyx_v_self, P
   return -1;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_2__cinit__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self), __pyx_v_vcf);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":116
- *         #                     len(data)))
- * 
- *     def __cinit__(self, vcf ):             # <<<<<<<<<<<<<<
- *         # start indexed access at genotypes
- *         self.offset = 9
- */
-
 static int __pyx_pf_5pysam_4cvcf_9VCFRecord_2__cinit__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__cinit__", 0);
 
   /* "pysam/cvcf.pyx":118
- *     def __cinit__(self, vcf ):
+ *     def __cinit__(self, vcf):
  *         # start indexed access at genotypes
  *         self.offset = 9             # <<<<<<<<<<<<<<
  * 
@@ -3393,7 +3709,7 @@ static int __pyx_pf_5pysam_4cvcf_9VCFRecord_2__cinit__(struct __pyx_obj_5pysam_4
  * 
  *         self.vcf = vcf             # <<<<<<<<<<<<<<
  * 
- *     def error(self,line,error,opt=None):
+ *     def error(self, line, error, opt=None):
  */
   __Pyx_INCREF(__pyx_v_vcf);
   __Pyx_GIVEREF(__pyx_v_vcf);
@@ -3401,11 +3717,28 @@ static int __pyx_pf_5pysam_4cvcf_9VCFRecord_2__cinit__(struct __pyx_obj_5pysam_4
   __Pyx_DECREF(__pyx_v_self->vcf);
   __pyx_v_self->vcf = __pyx_v_vcf;
 
+  /* "pysam/cvcf.pyx":116
+ *         #                     len(data)))
+ * 
+ *     def __cinit__(self, vcf):             # <<<<<<<<<<<<<<
+ *         # start indexed access at genotypes
+ *         self.offset = 9
+ */
+
+  /* function exit code */
   __pyx_r = 0;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":122
+ *         self.vcf = vcf
+ * 
+ *     def error(self, line, error, opt=None):             # <<<<<<<<<<<<<<
+ *         '''raise error.'''
+ *         # pass to vcf file for error handling
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_5error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_9VCFRecord_4error[] = "raise error.";
@@ -3413,20 +3746,15 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_5error(PyObject *__pyx_v_self,
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_error = 0;
   PyObject *__pyx_v_opt = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("error (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__line,&__pyx_n_s__error,&__pyx_n_s__opt,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line,&__pyx_n_s_error,&__pyx_n_s_opt,0};
     PyObject* values[3] = {0,0,0};
-
-    /* "pysam/cvcf.pyx":122
- *         self.vcf = vcf
- * 
- *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
- *         '''raise error.'''
- *         # pass to vcf file for error handling
- */
     values[2] = ((PyObject *)Py_None);
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -3441,16 +3769,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_5error(PyObject *__pyx_v_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__error)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--;
         else {
           __Pyx_RaiseArgtupleInvalid("error", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__opt);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opt);
           if (value) { values[2] = value; kw_args--; }
         }
       }
@@ -3479,6 +3807,8 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_5error(PyObject *__pyx_v_self,
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_4error(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self), __pyx_v_line, __pyx_v_error, __pyx_v_opt);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
@@ -3499,10 +3829,10 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4error(struct __pyx_obj_5pysam
  *         # pass to vcf file for error handling
  *         return self.vcf.error( line, error, opt )             # <<<<<<<<<<<<<<
  * 
- *     cdef update( self, char * buffer, size_t nbytes ):
+ *     cdef update(self, char * buffer, size_t nbytes):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
@@ -3515,16 +3845,23 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4error(struct __pyx_obj_5pysam
   __Pyx_INCREF(__pyx_v_opt);
   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_opt);
   __Pyx_GIVEREF(__pyx_v_opt);
-  __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 = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_r = __pyx_t_3;
   __pyx_t_3 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":122
+ *         self.vcf = vcf
+ * 
+ *     def error(self, line, error, opt=None):             # <<<<<<<<<<<<<<
+ *         '''raise error.'''
+ *         # pass to vcf file for error handling
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -3540,7 +3877,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4error(struct __pyx_obj_5pysam
 /* "pysam/cvcf.pyx":127
  *         return self.vcf.error( line, error, opt )
  * 
- *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
+ *     cdef update(self, char * buffer, size_t nbytes):             # <<<<<<<<<<<<<<
  *         '''update internal data.
  * 
  */
@@ -3557,7 +3894,7 @@ static PyObject *__pyx_f_5pysam_4cvcf_9VCFRecord_update(struct __pyx_obj_5pysam_
   /* "pysam/cvcf.pyx":132
  *         nbytes does not include the terminal '\0'.
  *         '''
- *         TabProxies.TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
+ *         TabProxies.TupleProxy.update(self, buffer, nbytes)             # <<<<<<<<<<<<<<
  * 
  *         self.contig = self.fields[0]
  */
@@ -3566,23 +3903,32 @@ static PyObject *__pyx_f_5pysam_4cvcf_9VCFRecord_update(struct __pyx_obj_5pysam_
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   /* "pysam/cvcf.pyx":134
- *         TabProxies.TupleProxy.update( self, buffer, nbytes )
+ *         TabProxies.TupleProxy.update(self, buffer, nbytes)
  * 
  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
  *         # vcf counts from 1 - correct here
- *         self.pos = atoi( self.fields[1] ) - 1
+ *         self.pos = atoi(self.fields[1]) - 1
  */
   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.fields[0]);
 
   /* "pysam/cvcf.pyx":136
  *         self.contig = self.fields[0]
  *         # vcf counts from 1 - correct here
- *         self.pos = atoi( self.fields[1] ) - 1             # <<<<<<<<<<<<<<
+ *         self.pos = atoi(self.fields[1]) - 1             # <<<<<<<<<<<<<<
  * 
  *     def __len__(self):
  */
   __pyx_v_self->pos = (atoi((__pyx_v_self->__pyx_base.fields[1])) - 1);
 
+  /* "pysam/cvcf.pyx":127
+ *         return self.vcf.error( line, error, opt )
+ * 
+ *     cdef update(self, char * buffer, size_t nbytes):             # <<<<<<<<<<<<<<
+ *         '''update internal data.
+ * 
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -3595,6 +3941,14 @@ static PyObject *__pyx_f_5pysam_4cvcf_9VCFRecord_update(struct __pyx_obj_5pysam_
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":138
+ *         self.pos = atoi(self.fields[1]) - 1
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return max(0, self.nfields - 9)
+ * 
+ */
+
 /* Python wrapper */
 static Py_ssize_t __pyx_pw_5pysam_4cvcf_9VCFRecord_7__len__(PyObject *__pyx_v_self); /*proto*/
 static Py_ssize_t __pyx_pw_5pysam_4cvcf_9VCFRecord_7__len__(PyObject *__pyx_v_self) {
@@ -3602,18 +3956,12 @@ static Py_ssize_t __pyx_pw_5pysam_4cvcf_9VCFRecord_7__len__(PyObject *__pyx_v_se
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_6__len__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":138
- *         self.pos = atoi( self.fields[1] ) - 1
- * 
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         return max(0, self.nfields - 9)
- * 
- */
-
 static Py_ssize_t __pyx_pf_5pysam_4cvcf_9VCFRecord_6__len__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   Py_ssize_t __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -3631,7 +3979,7 @@ static Py_ssize_t __pyx_pf_5pysam_4cvcf_9VCFRecord_6__len__(struct __pyx_obj_5py
  */
   __pyx_t_1 = (__pyx_v_self->__pyx_base.nfields - 9);
   __pyx_t_2 = 0;
-  if ((__pyx_t_1 > __pyx_t_2)) {
+  if (((__pyx_t_1 > __pyx_t_2) != 0)) {
     __pyx_t_3 = __pyx_t_1;
   } else {
     __pyx_t_3 = __pyx_t_2;
@@ -3639,12 +3987,28 @@ static Py_ssize_t __pyx_pf_5pysam_4cvcf_9VCFRecord_6__len__(struct __pyx_obj_5py
   __pyx_r = __pyx_t_3;
   goto __pyx_L0;
 
-  __pyx_r = 0;
+  /* "pysam/cvcf.pyx":138
+ *         self.pos = atoi(self.fields[1]) - 1
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return max(0, self.nfields - 9)
+ * 
+ */
+
+  /* function exit code */
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":142
+ * 
+ *     property contig:
+ *         def __get__(self): return self.contig             # <<<<<<<<<<<<<<
+ * 
+ *     property pos:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6contig_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6contig_1__get__(PyObject *__pyx_v_self) {
@@ -3652,18 +4016,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6contig_1__get__(PyObject *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_6contig___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":142
- * 
- *     property contig:
- *         def __get__(self): return self.contig             # <<<<<<<<<<<<<<
- * 
- *     property pos:
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6contig___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -3673,14 +4031,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6contig___get__(struct __pyx_o
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString(__pyx_v_self->contig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_r = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->contig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __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;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCFRecord.contig.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -3691,6 +4048,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6contig___get__(struct __pyx_o
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":145
+ * 
+ *     property pos:
+ *         def __get__(self): return self.pos             # <<<<<<<<<<<<<<
+ * 
+ *     property id:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3pos_1__get__(PyObject *__pyx_v_self) {
@@ -3698,18 +4063,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3pos_1__get__(PyObject *__pyx_
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_3pos___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":145
- * 
- *     property pos:
- *         def __get__(self): return self.pos             # <<<<<<<<<<<<<<
- * 
- *     property id:
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3pos___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -3719,14 +4078,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3pos___get__(struct __pyx_obj_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __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;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCFRecord.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -3737,6 +4095,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3pos___get__(struct __pyx_obj_
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":148
+ * 
+ *     property id:
+ *         def __get__(self): return self.fields[2]             # <<<<<<<<<<<<<<
+ * 
+ *     property ref:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_2id_1__get__(PyObject *__pyx_v_self) {
@@ -3744,18 +4110,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_2id_1__get__(PyObject *__pyx_v
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_2id___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":148
- * 
- *     property id:
- *         def __get__(self): return self.fields[2]             # <<<<<<<<<<<<<<
- * 
- *     property ref:
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_2id___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -3765,14 +4125,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_2id___get__(struct __pyx_obj_5
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[2])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_r = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[2])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCFRecord.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -3783,6 +4142,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_2id___get__(struct __pyx_obj_5
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":151
+ * 
+ *     property ref:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self.fields[3]
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3ref_1__get__(PyObject *__pyx_v_self) {
@@ -3790,18 +4157,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3ref_1__get__(PyObject *__pyx_
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_3ref___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":151
- * 
- *     property ref:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self.fields[3]
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3ref___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -3819,14 +4180,21 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3ref___get__(struct __pyx_obj_
  *     property alt:
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[3])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_r = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[3])); 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_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":151
+ * 
+ *     property ref:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self.fields[3]
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCFRecord.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -3837,6 +4205,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3ref___get__(struct __pyx_obj_
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":155
+ * 
+ *     property alt:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             # convert v3.3 to v4.0 alleles below
+ *             alt = self.fields[4]
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3alt_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3alt_1__get__(PyObject *__pyx_v_self) {
@@ -3844,18 +4220,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_3alt_1__get__(PyObject *__pyx_
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_3alt___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":155
- * 
- *     property alt:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             # convert v3.3 to v4.0 alleles below
- *             alt = self.fields[4]
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3alt___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   PyObject *__pyx_v_alt = NULL;
   PyObject *__pyx_r = NULL;
@@ -3875,9 +4245,9 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3alt___get__(struct __pyx_obj_
  *             if alt == ".": alt = []
  *             else: alt = alt.upper().split(',')
  */
-  __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[4])); 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));
-  __pyx_v_alt = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[4])); 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_v_alt = __pyx_t_1;
   __pyx_t_1 = 0;
 
   /* "pysam/cvcf.pyx":158
@@ -3887,14 +4257,11 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3alt___get__(struct __pyx_obj_
  *             else: alt = alt.upper().split(',')
  *             return alt
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __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 = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_alt, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_2) {
     __pyx_t_1 = PyList_New(0); 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_DECREF(__pyx_v_alt);
-    __pyx_v_alt = ((PyObject *)__pyx_t_1);
+    __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_1);
     __pyx_t_1 = 0;
     goto __pyx_L3;
   }
@@ -3907,19 +4274,18 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3alt___get__(struct __pyx_obj_
  *             return alt
  * 
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_alt, __pyx_n_s__upper); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_alt, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __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 = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __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_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, 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_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_v_alt);
-    __pyx_v_alt = __pyx_t_3;
+    __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_3);
     __pyx_t_3 = 0;
   }
   __pyx_L3:;
@@ -3936,8 +4302,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3alt___get__(struct __pyx_obj_
   __pyx_r = __pyx_v_alt;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":155
+ * 
+ *     property alt:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             # convert v3.3 to v4.0 alleles below
+ *             alt = self.fields[4]
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_3);
@@ -3950,6 +4323,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_3alt___get__(struct __pyx_obj_
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":163
+ * 
+ *     property qual:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             qual = self.fields[5]
+ *             if qual == b".": qual = -1
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_4qual_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_4qual_1__get__(PyObject *__pyx_v_self) {
@@ -3957,18 +4338,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_4qual_1__get__(PyObject *__pyx
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":163
- * 
- *     property qual:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             qual = self.fields[5]
- *             if qual == b".": qual = -1
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   PyObject *__pyx_v_qual = NULL;
   PyObject *__pyx_r = NULL;
@@ -3997,9 +4372,9 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj
  *             if qual == b".": qual = -1
  *             else:
  */
-  __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[5])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_v_qual = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[5])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_qual = __pyx_t_1;
   __pyx_t_1 = 0;
 
   /* "pysam/cvcf.pyx":165
@@ -4009,13 +4384,10 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj
  *             else:
  *                 try:    qual = float(qual)
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_qual, ((PyObject *)__pyx_kp_b_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __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 = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_v_qual, __pyx_kp_b__8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_2) {
     __Pyx_INCREF(__pyx_int_neg_1);
-    __Pyx_DECREF(__pyx_v_qual);
-    __pyx_v_qual = __pyx_int_neg_1;
+    __Pyx_DECREF_SET(__pyx_v_qual, __pyx_int_neg_1);
     goto __pyx_L3;
   }
   /*else*/ {
@@ -4036,8 +4408,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj
         __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_v_qual); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
         __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
         __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_v_qual);
-        __pyx_v_qual = __pyx_t_1;
+        __Pyx_DECREF_SET(__pyx_v_qual, __pyx_t_1);
         __pyx_t_1 = 0;
       }
       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -4060,17 +4431,17 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj
         __Pyx_GOTREF(__pyx_t_1);
         __Pyx_GOTREF(__pyx_t_7);
         __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
         __Pyx_GOTREF(__pyx_t_9);
         __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __Pyx_INCREF(((PyObject *)__pyx_v_self));
         PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_self));
         __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-        __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
         __Pyx_GOTREF(__pyx_t_11);
-        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
         __Pyx_GOTREF(__pyx_t_12);
@@ -4080,10 +4451,10 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj
         __Pyx_GIVEREF(__pyx_t_10);
         __pyx_t_11 = 0;
         __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
@@ -4118,8 +4489,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj
   __pyx_r = __pyx_v_qual;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":163
+ * 
+ *     property qual:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             qual = self.fields[5]
+ *             if qual == b".": qual = -1
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_7);
@@ -4137,6 +4515,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":172
+ * 
+ *     property filter:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             f = self.fields[6]
+ *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6filter_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6filter_1__get__(PyObject *__pyx_v_self) {
@@ -4144,28 +4530,22 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6filter_1__get__(PyObject *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_6filter___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":172
- * 
- *     property filter:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             f = self.fields[6]
- *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6filter___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   char *__pyx_v_f;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   int __pyx_t_3;
   int __pyx_t_4;
   int __pyx_t_5;
-  int __pyx_t_6;
+  PyObject *__pyx_t_6 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
@@ -4187,42 +4567,35 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6filter___get__(struct __pyx_o
  *             else: return f.split(';')
  * 
  */
-  __pyx_t_1 = PyBytes_FromString(__pyx_v_f); 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_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __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 = 175; __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); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __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 = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_kp_b__8, Py_EQ)); 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_1); __pyx_t_1 = 0;
+  if (!__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_b_PASS, Py_EQ)); 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_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 = 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__0), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __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 = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_6 = __pyx_t_5;
+    if (!__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_kp_b_0, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_5 = __pyx_t_4;
     } else {
-      __pyx_t_6 = __pyx_t_4;
+      __pyx_t_5 = __pyx_t_3;
     }
-    __pyx_t_4 = __pyx_t_6;
+    __pyx_t_3 = __pyx_t_5;
   } else {
-    __pyx_t_4 = __pyx_t_3;
+    __pyx_t_3 = __pyx_t_2;
   }
-  if (__pyx_t_4) {
+  if (__pyx_t_3) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyList_New(0); 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_r = ((PyObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
   /*else*/ {
 
@@ -4234,25 +4607,31 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6filter___get__(struct __pyx_o
  *     property info:
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_f); 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_t_1 = __Pyx_PyBytes_FromString(__pyx_v_f); 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(((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 = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__11, NULL); 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_6); __pyx_t_6 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
     goto __pyx_L0;
   }
-  __pyx_L3:;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":172
+ * 
+ *     property filter:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             f = self.fields[6]
+ *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_6);
   __Pyx_AddTraceback("pysam.cvcf.VCFRecord.filter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -4261,6 +4640,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6filter___get__(struct __pyx_o
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":179
+ * 
+ *     property info:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             col = self.fields[7]
+ *             # dictionary of keys, and list of values
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_4info_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_4info_1__get__(PyObject *__pyx_v_self) {
@@ -4268,18 +4655,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_4info_1__get__(PyObject *__pyx
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":179
- * 
- *     property info:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             col = self.fields[7]
- *             # dictionary of keys, and list of values
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   char *__pyx_v_col;
   PyObject *__pyx_v_info = NULL;
@@ -4289,8 +4670,8 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  int __pyx_t_3;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
   Py_ssize_t __pyx_t_4;
   PyObject *(*__pyx_t_5)(PyObject *);
   PyObject *__pyx_t_6 = NULL;
@@ -4320,7 +4701,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *                 for blurp in col.split(';'):
  */
   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_info = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
 
@@ -4331,13 +4712,11 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *                 for blurp in col.split(';'):
  *                     elts = blurp.split('=')
  */
-  __pyx_t_1 = PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __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); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_3) {
+  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_kp_b__8, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
 
     /* "pysam/cvcf.pyx":184
  *             info = {}
@@ -4346,52 +4725,52 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *                     elts = blurp.split('=')
  *                     if len(elts) == 1: v = None
  */
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __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 = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __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_13), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __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_2) || PyTuple_CheckExact(__pyx_t_2)) {
-      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
+      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
       __pyx_t_5 = NULL;
     } else {
-      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
+      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
     }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     for (;;) {
-      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_2 = __pyx_t_5(__pyx_t_1);
-        if (unlikely(!__pyx_t_2)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+        __pyx_t_1 = __pyx_t_5(__pyx_t_3);
+        if (unlikely(!__pyx_t_1)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_1);
       }
-      __Pyx_XDECREF(__pyx_v_blurp);
-      __pyx_v_blurp = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_blurp, __pyx_t_1);
+      __pyx_t_1 = 0;
 
       /* "pysam/cvcf.pyx":185
  *             if col != b".":
@@ -4400,13 +4779,12 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *                     if len(elts) == 1: v = None
  *                     elif len(elts) == 2: v = elts[1]
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_blurp, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_blurp, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_XDECREF(__pyx_v_elts);
-      __pyx_v_elts = __pyx_t_6;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_elts, __pyx_t_6);
       __pyx_t_6 = 0;
 
       /* "pysam/cvcf.pyx":186
@@ -4417,11 +4795,10 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *                     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 = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_3 = (__pyx_t_7 == 1);
-      if (__pyx_t_3) {
+      __pyx_t_2 = ((__pyx_t_7 == 1) != 0);
+      if (__pyx_t_2) {
         __Pyx_INCREF(Py_None);
-        __Pyx_XDECREF(__pyx_v_v);
-        __pyx_v_v = Py_None;
+        __Pyx_XDECREF_SET(__pyx_v_v, Py_None);
         goto __pyx_L6;
       }
 
@@ -4433,12 +4810,11 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *                     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 = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_3 = (__pyx_t_7 == 2);
-      if (__pyx_t_3) {
-        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = ((__pyx_t_7 == 2) != 0);
+      if (__pyx_t_2) {
+        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_XDECREF(__pyx_v_v);
-        __pyx_v_v = __pyx_t_6;
+        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
         __pyx_t_6 = 0;
         goto __pyx_L6;
       }
@@ -4451,31 +4827,31 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))
  *             return info
  */
-        __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __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 = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_INCREF(((PyObject *)__pyx_v_self));
-        PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
         __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-        __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ERROR_INFO_STRING); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
         PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
         __Pyx_GIVEREF(__pyx_t_8);
-        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
         __pyx_t_8 = 0;
-        __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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_1); __pyx_t_1 = 0;
       }
       __pyx_L6:;
 
@@ -4486,21 +4862,21 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *             return info
  * 
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_parse_formatdata); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_9);
       if (unlikely(!__pyx_v_v)) { __Pyx_RaiseUnboundLocalError("v"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-      __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __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 = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_8);
       __Pyx_INCREF(((PyObject *)__pyx_v_self));
       PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_self));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-      __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
       __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_8);
       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
@@ -4515,17 +4891,17 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
       __pyx_t_9 = 0;
       __pyx_t_6 = 0;
       __pyx_t_10 = 0;
-      __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __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_8)); __pyx_t_8 = 0;
-      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_8);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_info), __pyx_t_8, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(PyDict_SetItem(__pyx_v_info, __pyx_t_8, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __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;
     }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     goto __pyx_L3;
   }
   __pyx_L3:;
@@ -4538,15 +4914,22 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
  *     property format:
  */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_info));
-  __pyx_r = ((PyObject *)__pyx_v_info);
+  __Pyx_INCREF(__pyx_v_info);
+  __pyx_r = __pyx_v_info;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":179
+ * 
+ *     property info:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             col = self.fields[7]
+ *             # dictionary of keys, and list of values
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_6);
   __Pyx_XDECREF(__pyx_t_8);
   __Pyx_XDECREF(__pyx_t_9);
@@ -4563,6 +4946,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":193
+ * 
+ *     property format:
+ *          def __get__(self):             # <<<<<<<<<<<<<<
+ *              return self.fields[8].split(':')
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6format_1__get__(PyObject *__pyx_v_self) {
@@ -4570,18 +4961,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_6format_1__get__(PyObject *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_6format___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":193
- * 
- *     property format:
- *          def __get__(self):             # <<<<<<<<<<<<<<
- *              return self.fields[8].split(':')
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6format___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -4600,20 +4985,27 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6format___get__(struct __pyx_o
  *     property samples:
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[8])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_t_1), __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[8])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":193
+ * 
+ *     property format:
+ *          def __get__(self):             # <<<<<<<<<<<<<<
+ *              return self.fields[8].split(':')
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -4625,6 +5017,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_6format___get__(struct __pyx_o
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":197
+ * 
+ *     property samples:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self.vcf._samples
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_7samples_1__get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_7samples_1__get__(PyObject *__pyx_v_self) {
@@ -4632,18 +5032,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_7samples_1__get__(PyObject *__
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_7samples___get__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":197
- * 
- *     property samples:
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self.vcf._samples
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_7samples___get__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -4661,14 +5055,21 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_7samples___get__(struct __pyx_
  *     def __getitem__(self, key):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __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;
+  /* "pysam/cvcf.pyx":197
+ * 
+ *     property samples:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self.vcf._samples
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCFRecord.samples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -4679,6 +5080,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_7samples___get__(struct __pyx_
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":200
+ *             return self.vcf._samples
+ * 
+ *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
+ * 
+ *         # parse sample columns
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
 static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
@@ -4686,24 +5095,18 @@ static PyObject *__pyx_pw_5pysam_4cvcf_9VCFRecord_9__getitem__(PyObject *__pyx_v
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_v_self), ((PyObject *)__pyx_v_key));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":200
- *             return self.vcf._samples
- * 
- *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
- * 
- *         # parse sample columns
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_v_values = NULL;
   PyObject *__pyx_v_alt = NULL;
   PyObject *__pyx_v_format = NULL;
   PyObject *__pyx_v_result = NULL;
-  PyObject *__pyx_v_idx = NULL;
+  Py_ssize_t __pyx_v_idx;
   PyObject *__pyx_v_expected = NULL;
   PyObject *__pyx_v_value = NULL;
   PyObject *__pyx_r = NULL;
@@ -4717,10 +5120,9 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
   PyObject *__pyx_t_7 = NULL;
   PyObject *__pyx_t_8 = NULL;
   PyObject *__pyx_t_9 = NULL;
-  PyObject *(*__pyx_t_10)(PyObject *);
+  Py_ssize_t __pyx_t_10;
   int __pyx_t_11;
   int __pyx_t_12;
-  PyObject *__pyx_t_13 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
@@ -4733,19 +5135,19 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *         alt = self.alt
  *         format = self.format
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___sample2column); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_sample2column); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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 = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[__pyx_t_3])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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 = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[__pyx_t_3])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_values = __pyx_t_2;
@@ -4758,7 +5160,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *         format = self.format
  * 
  */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_v_alt = __pyx_t_2;
   __pyx_t_2 = 0;
@@ -4770,7 +5172,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  * 
  *         if len(values) > len(format):
  */
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __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_v_format = __pyx_t_2;
   __pyx_t_2 = 0;
@@ -4784,7 +5186,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  */
   __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = (__pyx_t_3 > __pyx_t_4);
+  __pyx_t_5 = ((__pyx_t_3 > __pyx_t_4) != 0);
   if (__pyx_t_5) {
 
     /* "pysam/cvcf.pyx":208
@@ -4794,19 +5196,19 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *                            (len(values),key,len(format)))
  * 
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); 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_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     __pyx_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 = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __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(((PyObject *)__pyx_v_self), __pyx_n_s_18); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BAD_NUMBER_OF_VALUES); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
 
     /* "pysam/cvcf.pyx":209
@@ -4833,24 +5235,32 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
     __Pyx_GIVEREF(__pyx_t_8);
     __pyx_t_7 = 0;
     __pyx_t_8 = 0;
-    __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 = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+
+    /* "pysam/cvcf.pyx":208
+ * 
+ *         if len(values) > len(format):
+ *             self.vcf.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\             # <<<<<<<<<<<<<<
+ *                            (len(values),key,len(format)))
+ * 
+ */
+    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_found_s_values_in_element_s_exp, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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));
+    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8);
+    __Pyx_GIVEREF(__pyx_t_8);
     __pyx_t_1 = 0;
     __pyx_t_6 = 0;
     __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
     goto __pyx_L3;
   }
@@ -4864,7 +5274,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *             expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)
  */
   __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_8));
+  __Pyx_GOTREF(__pyx_t_8);
   __pyx_v_result = ((PyObject*)__pyx_t_8);
   __pyx_t_8 = 0;
 
@@ -4876,54 +5286,8 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *             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 = 212; __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 = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
-  __Pyx_GIVEREF(__pyx_t_8);
-  __pyx_t_8 = 0;
-  __pyx_t_8 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-  if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
-    __pyx_t_9 = __pyx_t_8; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = 0;
-    __pyx_t_10 = NULL;
-  } else {
-    __pyx_t_4 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_8); 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_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
-  }
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  for (;;) {
-    if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_9)) {
-      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_9)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_8 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_8 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_9)) {
-      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_8 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else {
-      __pyx_t_8 = __pyx_t_10(__pyx_t_9);
-      if (unlikely(!__pyx_t_8)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_8);
-    }
-    __Pyx_XDECREF(__pyx_v_idx);
-    __pyx_v_idx = __pyx_t_8;
-    __pyx_t_8 = 0;
+  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_4; __pyx_t_3+=1) {
+    __pyx_v_idx = __pyx_t_3;
 
     /* "pysam/cvcf.pyx":213
  *         result = {}
@@ -4932,30 +5296,29 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *             if idx < len(values): value = values[idx]
  *             else:
  */
-    __pyx_t_8 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__get_expected); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_get_expected); 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);
-    __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_format_2); 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_t_6 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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(__pyx_t_6);
-    __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);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
-    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
-    __Pyx_GIVEREF(__pyx_t_6);
     __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_2 = 0;
-    __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, 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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_XDECREF(__pyx_v_expected);
-    __pyx_v_expected = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_expected, __pyx_t_2);
+    __pyx_t_2 = 0;
 
     /* "pysam/cvcf.pyx":214
  *         for idx in range(len(format)):
@@ -4964,19 +5327,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *             else:
  *                 if expected == -1: value = "."
  */
-    __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__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_1 = PyObject_RichCompare(__pyx_v_idx, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_10 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = ((__pyx_v_idx < __pyx_t_10) != 0);
     if (__pyx_t_5) {
-      __pyx_t_1 = PyObject_GetItem(__pyx_v_values, __pyx_v_idx); 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_XDECREF(__pyx_v_value);
-      __pyx_v_value = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2);
+      __pyx_t_2 = 0;
       goto __pyx_L6;
     }
     /*else*/ {
@@ -4988,13 +5345,12 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *                 else: value = ",".join(["."]*expected)
  * 
  */
-      __pyx_t_1 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_2 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __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 = 216; __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_XDECREF(__pyx_v_value);
-        __pyx_v_value = ((PyObject *)__pyx_kp_s_9);
+        __Pyx_INCREF(__pyx_kp_s__8);
+        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_kp_s__8);
         goto __pyx_L7;
       }
       /*else*/ {
@@ -5006,29 +5362,20 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  * 
  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))
  */
-        __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 = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__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));
-        { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_6, __pyx_v_expected); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_INCREF(__pyx_kp_s__8);
+        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__8);
+        __Pyx_GIVEREF(__pyx_kp_s__8);
+        { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_expected); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_temp);
-          __Pyx_DECREF(__pyx_t_6);
-          __pyx_t_6 = __pyx_temp;
+          __Pyx_DECREF(__pyx_t_2);
+          __pyx_t_2 = __pyx_temp;
         }
-        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_6));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
-        __pyx_t_6 = 0;
-        __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-        __Pyx_XDECREF(__pyx_v_value);
-        __pyx_v_value = __pyx_t_6;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
         __pyx_t_6 = 0;
       }
       __pyx_L7:;
@@ -5042,45 +5389,45 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *             if expected != -1 and len(result[format[idx]]) != expected:
  *                 self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
  */
-    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_parse_formatdata); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_8 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_format_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.data); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyBytes_FromString(__pyx_v_self->__pyx_base.data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_2));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
-    __pyx_t_2 = 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 = 219; __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 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
-    __Pyx_GIVEREF(__pyx_t_8);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __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 = 219; __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_INCREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_t_8 = 0;
-    __pyx_t_1 = 0;
+    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_8);
+    __Pyx_GIVEREF(__pyx_t_8);
+    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_8 = 0;
+    __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-    __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_1, __pyx_t_9) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __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;
 
     /* "pysam/cvcf.pyx":220
  * 
@@ -5089,23 +5436,23 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *                 self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))
  */
-    __pyx_t_2 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __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 = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_9 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __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 = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     if (__pyx_t_5) {
-      __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_2); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_3 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, __pyx_v_expected, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_9); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __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_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __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 = 220; __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); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 220; __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_5;
@@ -5119,19 +5466,19 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *                                "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]]))
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyBytes_FromString(__pyx_v_self->__pyx_base.data); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
-      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
-      __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-      __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_20); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BAD_NUMBER_OF_PARAMETERS); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
 
       /* "pysam/cvcf.pyx":222
@@ -5141,43 +5488,51 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *                 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_1 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__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_8 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_8); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_13);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_8);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
-      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __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 = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
       __Pyx_INCREF(__pyx_v_expected);
-      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_expected);
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_expected);
       __Pyx_GIVEREF(__pyx_v_expected);
-      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_13);
-      __Pyx_GIVEREF(__pyx_t_13);
-      __pyx_t_1 = 0;
-      __pyx_t_13 = 0;
-      __pyx_t_13 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
-      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
       __Pyx_GIVEREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
-      __Pyx_GIVEREF(__pyx_t_6);
-      PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_13));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
+      __pyx_t_8 = 0;
       __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_id_s_expected_s_parameters_got_s, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "pysam/cvcf.pyx":221
+ *             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.vcf.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]]))
+ */
+      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __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_6);
+      __Pyx_GIVEREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      __pyx_t_1 = 0;
       __pyx_t_6 = 0;
-      __pyx_t_13 = 0;
-      __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_13);
+      __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __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_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
       /* "pysam/cvcf.pyx":223
  *                 self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
@@ -5186,62 +5541,62 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  *                 result[format[idx]] = result[format[idx]][:expected]
  * 
  */
-      __pyx_t_13 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_13);
-      __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_13); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-      __pyx_t_3 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_13 = PyObject_RichCompare(__pyx_t_8, __pyx_v_expected, Py_LT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __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 = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_v_expected, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       if (__pyx_t_12) {
-        __pyx_t_13 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_13);
-        __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_13); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_2); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_9); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_6, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_9);
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __pyx_t_6 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __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 = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __pyx_t_3 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_6 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __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 = 223; __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 = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_6 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
-        { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
+        __Pyx_GIVEREF(__pyx_t_9);
+        { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_temp);
-          __Pyx_DECREF(__pyx_t_7);
-          __pyx_t_7 = __pyx_temp;
+          __Pyx_DECREF(__pyx_t_1);
+          __pyx_t_1 = __pyx_temp;
         }
-        __pyx_t_2 = 0;
+        __pyx_t_9 = 0;
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_8, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __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_7)); __pyx_t_7 = 0;
-        if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_13, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __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;
+        if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_7, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
         goto __pyx_L9;
       }
       __pyx_L9:;
@@ -5253,25 +5608,23 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  * 
  *         return result
  */
-      __pyx_t_13 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_13);
-      __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_13); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-      __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_expected); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_13 = __Pyx_PySequence_GetSlice(__pyx_t_6, 0, __pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_13);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, 0, NULL, &__pyx_v_expected, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_6 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_6);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_6, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_6, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       goto __pyx_L8;
     }
     __pyx_L8:;
   }
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
   /* "pysam/cvcf.pyx":226
  *                 result[format[idx]] = result[format[idx]][:expected]
@@ -5281,20 +5634,26 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
  * 
  */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_result));
-  __pyx_r = ((PyObject *)__pyx_v_result);
+  __Pyx_INCREF(__pyx_v_result);
+  __pyx_r = __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_2);
+  /* "pysam/cvcf.pyx":200
+ *             return self.vcf._samples
+ * 
+ *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
+ * 
+ *         # parse sample columns
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_6);
   __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_8);
   __Pyx_XDECREF(__pyx_t_9);
-  __Pyx_XDECREF(__pyx_t_13);
   __Pyx_AddTraceback("pysam.cvcf.VCFRecord.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -5302,7 +5661,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
   __Pyx_XDECREF(__pyx_v_alt);
   __Pyx_XDECREF(__pyx_v_format);
   __Pyx_XDECREF(__pyx_v_result);
-  __Pyx_XDECREF(__pyx_v_idx);
   __Pyx_XDECREF(__pyx_v_expected);
   __Pyx_XDECREF(__pyx_v_value);
   __Pyx_XGIVEREF(__pyx_r);
@@ -5310,15 +5668,26 @@ static PyObject *__pyx_pf_5pysam_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":232
+ *     '''converts a :term:`tabix row` into a VCF record.'''
+ *     cdef vcffile
+ *     def __init__(self, vcffile):             # <<<<<<<<<<<<<<
+ *         self.vcffile = vcffile
+ * 
+ */
+
 /* Python wrapper */
 static int __pyx_pw_5pysam_4cvcf_11asVCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_pw_5pysam_4cvcf_11asVCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_vcffile = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vcffile,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vcffile,0};
     PyObject* values[1] = {0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -5331,7 +5700,7 @@ static int __pyx_pw_5pysam_4cvcf_11asVCFRecord_1__init__(PyObject *__pyx_v_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vcffile)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vcffile)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
       }
       if (unlikely(kw_args > 0)) {
@@ -5353,18 +5722,12 @@ static int __pyx_pw_5pysam_4cvcf_11asVCFRecord_1__init__(PyObject *__pyx_v_self,
   return -1;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_11asVCFRecord___init__(((struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)__pyx_v_self), __pyx_v_vcffile);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":232
- *     '''converts a :term:`tabix row` into a VCF record.'''
- *     cdef vcffile
- *     def __init__(self, vcffile ):             # <<<<<<<<<<<<<<
- *         self.vcffile = vcffile
- *     def __call__(self, char * buffer, int len ):
- */
-
 static int __pyx_pf_5pysam_4cvcf_11asVCFRecord___init__(struct __pyx_obj_5pysam_4cvcf_asVCFRecord *__pyx_v_self, PyObject *__pyx_v_vcffile) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
@@ -5372,10 +5735,10 @@ static int __pyx_pf_5pysam_4cvcf_11asVCFRecord___init__(struct __pyx_obj_5pysam_
 
   /* "pysam/cvcf.pyx":233
  *     cdef vcffile
- *     def __init__(self, vcffile ):
+ *     def __init__(self, vcffile):
  *         self.vcffile = vcffile             # <<<<<<<<<<<<<<
- *     def __call__(self, char * buffer, int len ):
- *         cdef VCFRecord r
+ * 
+ *     cdef parse(self, char * buffer, int len):
  */
   __Pyx_INCREF(__pyx_v_vcffile);
   __Pyx_GIVEREF(__pyx_v_vcffile);
@@ -5383,76 +5746,29 @@ static int __pyx_pf_5pysam_4cvcf_11asVCFRecord___init__(struct __pyx_obj_5pysam_
   __Pyx_DECREF(__pyx_v_self->vcffile);
   __pyx_v_self->vcffile = __pyx_v_vcffile;
 
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "pysam/cvcf.pyx":232
+ *     '''converts a :term:`tabix row` into a VCF record.'''
+ *     cdef vcffile
+ *     def __init__(self, vcffile):             # <<<<<<<<<<<<<<
+ *         self.vcffile = vcffile
+ * 
+ */
 
-/* Python wrapper */
-static PyObject *__pyx_pw_5pysam_4cvcf_11asVCFRecord_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_5pysam_4cvcf_11asVCFRecord_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-  char *__pyx_v_buffer;
-  int __pyx_v_len;
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
-  {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__buffer,&__pyx_n_s__len,0};
-    PyObject* values[2] = {0,0};
-    if (unlikely(__pyx_kwds)) {
-      Py_ssize_t kw_args;
-      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-      switch (pos_args) {
-        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-        case  0: break;
-        default: goto __pyx_L5_argtuple_error;
-      }
-      kw_args = PyDict_Size(__pyx_kwds);
-      switch (pos_args) {
-        case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buffer)) != 0)) kw_args--;
-        else goto __pyx_L5_argtuple_error;
-        case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__len)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-      }
-      if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-      goto __pyx_L5_argtuple_error;
-    } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-    }
-    __pyx_v_buffer = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_len = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_len == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  }
-  goto __pyx_L4_argument_unpacking_done;
-  __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-  __pyx_L3_error:;
-  __Pyx_AddTraceback("pysam.cvcf.asVCFRecord.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-  __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5pysam_4cvcf_11asVCFRecord_2__call__(((struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)__pyx_v_self), __pyx_v_buffer, __pyx_v_len);
+  /* function exit code */
+  __pyx_r = 0;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":234
- *     def __init__(self, vcffile ):
+/* "pysam/cvcf.pyx":235
  *         self.vcffile = vcffile
- *     def __call__(self, char * buffer, int len ):             # <<<<<<<<<<<<<<
+ * 
+ *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
  *         cdef VCFRecord r
- *         r = VCFRecord( self.vcffile )
+ *         r = VCFRecord(self.vcffile)
  */
 
-static PyObject *__pyx_pf_5pysam_4cvcf_11asVCFRecord_2__call__(struct __pyx_obj_5pysam_4cvcf_asVCFRecord *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
+static PyObject *__pyx_f_5pysam_4cvcf_11asVCFRecord_parse(struct __pyx_obj_5pysam_4cvcf_asVCFRecord *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
   struct __pyx_obj_5pysam_4cvcf_VCFRecord *__pyx_v_r = 0;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -5461,40 +5777,40 @@ static PyObject *__pyx_pf_5pysam_4cvcf_11asVCFRecord_2__call__(struct __pyx_obj_
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__call__", 0);
+  __Pyx_RefNannySetupContext("parse", 0);
 
-  /* "pysam/cvcf.pyx":236
- *     def __call__(self, char * buffer, int len ):
+  /* "pysam/cvcf.pyx":237
+ *     cdef parse(self, char * buffer, int len):
  *         cdef VCFRecord r
- *         r = VCFRecord( self.vcffile )             # <<<<<<<<<<<<<<
- *         r.copy( buffer, len )
+ *         r = VCFRecord(self.vcffile)             # <<<<<<<<<<<<<<
+ *         r.copy(buffer, len)
  *         return r
  */
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_INCREF(__pyx_v_self->vcffile);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->vcffile);
   __Pyx_GIVEREF(__pyx_v_self->vcffile);
-  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_4cvcf_VCFRecord)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_4cvcf_VCFRecord)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_r = ((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":237
+  /* "pysam/cvcf.pyx":238
  *         cdef VCFRecord r
- *         r = VCFRecord( self.vcffile )
- *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
+ *         r = VCFRecord(self.vcffile)
+ *         r.copy(buffer, len)             # <<<<<<<<<<<<<<
  *         return r
  * 
  */
-  __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_4cvcf_VCFRecord *)__pyx_v_r->__pyx_base.__pyx_vtab)->__pyx_base.copy(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_4cvcf_VCFRecord *)__pyx_v_r->__pyx_base.__pyx_vtab)->__pyx_base.copy(((struct __pyx_obj_5pysam_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":238
- *         r = VCFRecord( self.vcffile )
- *         r.copy( buffer, len )
+  /* "pysam/cvcf.pyx":239
+ *         r = VCFRecord(self.vcffile)
+ *         r.copy(buffer, len)
  *         return r             # <<<<<<<<<<<<<<
  * 
  * class VCF(object):
@@ -5504,13 +5820,20 @@ static PyObject *__pyx_pf_5pysam_4cvcf_11asVCFRecord_2__call__(struct __pyx_obj_
   __pyx_r = ((PyObject *)__pyx_v_r);
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":235
+ *         self.vcffile = vcffile
+ * 
+ *     cdef parse(self, char * buffer, int len):             # <<<<<<<<<<<<<<
+ *         cdef VCFRecord r
+ *         r = VCFRecord(self.vcffile)
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("pysam.cvcf.asVCFRecord.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_AddTraceback("pysam.cvcf.asVCFRecord.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
   __pyx_L0:;
   __Pyx_XDECREF((PyObject *)__pyx_v_r);
   __Pyx_XGIVEREF(__pyx_r);
@@ -5518,7 +5841,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_11asVCFRecord_2__call__(struct __pyx_obj_
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":317
+/* "pysam/cvcf.pyx":318
  *     _lines = None
  * 
  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):             # <<<<<<<<<<<<<<
@@ -5526,48 +5849,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_11asVCFRecord_2__call__(struct __pyx_obj_
  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
  */
 
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_85__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__defaults__", 0);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((PyObject *)Py_None));
-  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_None));
-  __Pyx_GIVEREF(((PyObject *)Py_None));
-  __Pyx_INCREF(((PyObject *)Py_None));
-  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
-  __Pyx_GIVEREF(((PyObject *)Py_None));
-  __Pyx_INCREF(((PyObject *)Py_None));
-  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));
-  __Pyx_GIVEREF(((PyObject *)Py_None));
-  __Pyx_INCREF(((PyObject *)Py_None));
-  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
-  __Pyx_GIVEREF(((PyObject *)Py_None));
-  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_leftalign);
-  PyTuple_SET_ITEM(__pyx_t_1, 4, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_leftalign);
-  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_leftalign);
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -5578,18 +5859,20 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_1__init__(PyObject *__pyx_self, PyOb
   PyObject *__pyx_v_regions = 0;
   PyObject *__pyx_v_lines = 0;
   PyObject *__pyx_v_leftalign = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s___copy,&__pyx_n_s__reference,&__pyx_n_s__regions,&__pyx_n_s__lines,&__pyx_n_s__leftalign,0};
+    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};
     PyObject* values[6] = {0,0,0,0,0,0};
-    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
     values[1] = ((PyObject *)((PyObject *)Py_None));
     values[2] = ((PyObject *)((PyObject *)Py_None));
     values[3] = ((PyObject *)((PyObject *)Py_None));
     values[4] = ((PyObject *)((PyObject *)Py_None));
-    values[5] = __pyx_dynamic_args->__pyx_arg_leftalign;
+    values[5] = ((PyObject *)((PyObject *)Py_False));
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -5606,36 +5889,36 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_1__init__(PyObject *__pyx_self, PyOb
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s___copy);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_copy);
           if (value) { values[1] = value; kw_args--; }
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference);
           if (value) { values[2] = value; kw_args--; }
         }
         case  3:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__regions);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_regions);
           if (value) { values[3] = value; kw_args--; }
         }
         case  4:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lines);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lines);
           if (value) { values[4] = value; kw_args--; }
         }
         case  5:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__leftalign);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_leftalign);
           if (value) { values[5] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -5658,13 +5941,15 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_1__init__(PyObject *__pyx_self, PyOb
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF___init__(__pyx_self, __pyx_v_self, __pyx_v__copy, __pyx_v_reference, __pyx_v_regions, __pyx_v_lines, __pyx_v_leftalign);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
@@ -5685,26 +5970,26 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF___init__(CYTHON_UNUSED PyObject *__p
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__init__", 0);
 
-  /* "pysam/cvcf.pyx":319
+  /* "pysam/cvcf.pyx":320
  *     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_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
     __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
     __pyx_t_4 = NULL;
   } else {
-    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
   }
@@ -5713,353 +5998,362 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF___init__(CYTHON_UNUSED PyObject *__p
     if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
       if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
       if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_1 = __pyx_t_4(__pyx_t_2);
       if (unlikely(!__pyx_t_1)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_1);
     }
-    __Pyx_XDECREF(__pyx_v_id);
-    __pyx_v_id = __pyx_t_1;
+    __Pyx_XDECREF_SET(__pyx_v_id, __pyx_t_1);
     __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____dict__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_id); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_id); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __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_1, __pyx_t_5, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_5, __pyx_v_id) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __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;
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":320
+  /* "pysam/cvcf.pyx":321
  *         # 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[:]
  */
-  __pyx_t_2 = PyObject_RichCompare(__pyx_v__copy, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_RichCompare(__pyx_v__copy, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_7) {
 
-    /* "pysam/cvcf.pyx":321
+    /* "pysam/cvcf.pyx":322
  *         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
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___leftalign); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_leftalign_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___leftalign, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_leftalign_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":322
+    /* "pysam/cvcf.pyx":323
  *         if _copy != None:
  *             self._leftalign = _copy._leftalign
  *             self._header = _copy._header[:]             # <<<<<<<<<<<<<<
  *             self._version = _copy._version
  *             self._info = copy.deepcopy(_copy._info)
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___header); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_header); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_t_2, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__18, 0, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___header, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":323
+    /* "pysam/cvcf.pyx":324
  *             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 = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __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 = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":324
+    /* "pysam/cvcf.pyx":325
  *             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 = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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 = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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___info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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 = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
     __Pyx_GIVEREF(__pyx_t_5);
     __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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 (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___info, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_info, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":325
+    /* "pysam/cvcf.pyx":326
  *             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 = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __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_GetAttr(__pyx_v__copy, __pyx_n_s___filter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_filter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __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 = 325; __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 = 326; __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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __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_2)); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___filter, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filter, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":326
+    /* "pysam/cvcf.pyx":327
  *             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 = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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 = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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___format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_format_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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 = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
     __Pyx_GIVEREF(__pyx_t_5);
     __pyx_t_5 = 0;
-    __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 = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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 (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___format, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_format_2, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":327
+    /* "pysam/cvcf.pyx":328
  *             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 = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_samples); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_t_5, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_samples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":328
+    /* "pysam/cvcf.pyx":329
  *             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)
  */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy_2); 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_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); 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_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___sample2column); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_sample2column); 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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __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 = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___sample2column, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sample2column, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":329
+    /* "pysam/cvcf.pyx":330
  *             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
  */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __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__copy, __pyx_n_s___ignored_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_ignored_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __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 = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     __pyx_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 = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___ignored_errors, __pyx_t_1) < 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;
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ignored_errors, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":330
+    /* "pysam/cvcf.pyx":331
  *             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
  */
-    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy_2); 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_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __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 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __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 = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___warn_errors, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_warn_errors, __pyx_t_1) < 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;
 
-    /* "pysam/cvcf.pyx":331
+    /* "pysam/cvcf.pyx":332
  *             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
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___reference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_reference_2); 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);
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___reference, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reference_2, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":332
+    /* "pysam/cvcf.pyx":333
  *             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
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___regions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_regions_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___regions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_regions_2, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "pysam/cvcf.pyx":333
+  /* "pysam/cvcf.pyx":334
  *             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 = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_7) {
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___reference, __pyx_v_reference) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reference_2, __pyx_v_reference) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "pysam/cvcf.pyx":334
+  /* "pysam/cvcf.pyx":335
  *             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 = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_regions); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_7) {
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___regions, __pyx_v_regions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_regions_2, __pyx_v_regions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "pysam/cvcf.pyx":335
+  /* "pysam/cvcf.pyx":336
  *         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 = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_leftalign); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_7) {
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___leftalign, __pyx_v_leftalign) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_leftalign_2, __pyx_v_leftalign) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L8;
   }
   __pyx_L8:;
 
-  /* "pysam/cvcf.pyx":336
+  /* "pysam/cvcf.pyx":337
  *         if regions: self._regions = regions
  *         if leftalign: self._leftalign = leftalign
  *         self._lines = lines             # <<<<<<<<<<<<<<
  * 
  *     def error(self,line,error,opt=None):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lines, __pyx_v_lines) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lines_2, __pyx_v_lines) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":318
+ *     _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
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -6076,6 +6370,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF___init__(CYTHON_UNUSED PyObject *__p
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":339
+ *         self._lines = lines
+ * 
+ *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
+ *         if error in self._ignored_errors: return
+ *         errorlabel, errorstring = self._errors[error].split(':')
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_3error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_3error = {__Pyx_NAMESTR("error"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_3error, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -6084,20 +6386,15 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_3error(PyObject *__pyx_self, PyObjec
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_error = 0;
   PyObject *__pyx_v_opt = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("error (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,&__pyx_n_s__error,&__pyx_n_s__opt,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,&__pyx_n_s_error,&__pyx_n_s_opt,0};
     PyObject* values[4] = {0,0,0,0};
-
-    /* "pysam/cvcf.pyx":338
- *         self._lines = lines
- * 
- *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
- *         if error in self._ignored_errors: return
- *         errorlabel, errorstring = self._errors[error].split(':')
- */
     values[3] = ((PyObject *)((PyObject *)Py_None));
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -6113,26 +6410,26 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_3error(PyObject *__pyx_self, PyObjec
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__error)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__opt);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opt);
           if (value) { values[3] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "error") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "error") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -6151,13 +6448,15 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_3error(PyObject *__pyx_self, PyObjec
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.error", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_2error(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_error, __pyx_v_opt);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
@@ -6170,54 +6469,54 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_3;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
-  PyObject *(*__pyx_t_6)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *(*__pyx_t_7)(PyObject *);
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("error", 0);
 
-  /* "pysam/cvcf.pyx":339
+  /* "pysam/cvcf.pyx":340
  * 
  *     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
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___ignored_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ignored_errors); 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 = (__Pyx_PySequence_Contains(__pyx_v_error, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_error, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":340
+  /* "pysam/cvcf.pyx":341
  *     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_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errors); 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_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_error); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_error); if (unlikely(__pyx_t_4 == NULL)) {__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_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, 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;
-  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
-    PyObject* sequence = __pyx_t_3;
+  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+    PyObject* sequence = __pyx_t_4;
     #if CYTHON_COMPILING_IN_CPYTHON
     Py_ssize_t size = Py_SIZE(sequence);
     #else
@@ -6226,176 +6525,179 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx
     if (unlikely(size != 2)) {
       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     #if CYTHON_COMPILING_IN_CPYTHON
     if (likely(PyTuple_CheckExact(sequence))) {
       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
-      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
+      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
     } else {
       __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
-      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
+      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
     }
     __Pyx_INCREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_5);
     #else
-    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PySequence_ITEM(sequence, 0); 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_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PySequence_ITEM(sequence, 1); 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);
     #endif
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  } else
-  {
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
     Py_ssize_t index = -1;
-    __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
-    index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
+    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
+    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
     __Pyx_GOTREF(__pyx_t_1);
-    index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
-    __Pyx_GOTREF(__pyx_t_4);
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = NULL;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_5);
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = NULL;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     goto __pyx_L5_unpacking_done;
     __pyx_L4_unpacking_failed:;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_6 = NULL;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_7 = NULL;
     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_L5_unpacking_done:;
   }
   __pyx_v_errorlabel = __pyx_t_1;
   __pyx_t_1 = 0;
-  __pyx_v_errorstring = __pyx_t_4;
-  __pyx_t_4 = 0;
+  __pyx_v_errorstring = __pyx_t_5;
+  __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":341
+  /* "pysam/cvcf.pyx":342
  *         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]
  *         errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring)
  */
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opt); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_2) {
-    __pyx_t_3 = PyNumber_Remainder(__pyx_v_errorstring, __pyx_v_opt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_v_errorstring);
-    __pyx_v_errorstring = __pyx_t_3;
-    __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_opt); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+    __pyx_t_4 = PyNumber_Remainder(__pyx_v_errorstring, __pyx_v_opt); 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_DECREF_SET(__pyx_v_errorstring, __pyx_t_4);
+    __pyx_t_4 = 0;
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "pysam/cvcf.pyx":342
+  /* "pysam/cvcf.pyx":343
  *         errorlabel, errorstring = self._errors[error].split(':')
  *         if opt: errorstring = errorstring % opt
  *         errwarn = ["Error","Warning"][error in self._warn_errors]             # <<<<<<<<<<<<<<
  *         errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring)
  *         if error in self._warn_errors: return
  */
-  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((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_3, 1, ((PyObject *)__pyx_n_s__Warning));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Warning));
-  __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 = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_error, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_n_s_Error);
+  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_Error);
+  __Pyx_GIVEREF(__pyx_n_s_Error);
+  __Pyx_INCREF(__pyx_n_s_Warning);
+  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_Warning);
+  __Pyx_GIVEREF(__pyx_n_s_Warning);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_warn_errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_error, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_t_4, __pyx_t_3, int, 1, __Pyx_PyBool_FromLong, 1, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __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_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 = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_v_errwarn = __pyx_t_4;
-  __pyx_t_4 = 0;
+  __pyx_v_errwarn = __pyx_t_5;
+  __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":343
+  /* "pysam/cvcf.pyx":344
  *         if opt: errorstring = errorstring % opt
  *         errwarn = ["Error","Warning"][error in self._warn_errors]
  *         errorstring += " in 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___lineno); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lineno); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __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 = 343; __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);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
   __Pyx_INCREF(__pyx_v_line);
-  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_line);
+  PyTuple_SET_ITEM(__pyx_t_4, 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_4, 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_4, 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_4, 4, __pyx_v_errorstring);
   __Pyx_GIVEREF(__pyx_v_errorstring);
+  __pyx_t_5 = 0;
+  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_in_line_s_s_s_s_s, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_errorstring, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF_SET(__pyx_v_errorstring, __pyx_t_4);
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_24), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_errorstring, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-  __Pyx_DECREF(__pyx_v_errorstring);
-  __pyx_v_errorstring = __pyx_t_3;
-  __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":344
+  /* "pysam/cvcf.pyx":345
  *         errwarn = ["Error","Warning"][error in self._warn_errors]
  *         errorstring += " in 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_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_error, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_2) {
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_warn_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_error, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_2 = (__pyx_t_3 != 0);
+  if (__pyx_t_2) {
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
-    goto __pyx_L7;
   }
-  __pyx_L7:;
 
-  /* "pysam/cvcf.pyx":345
+  /* "pysam/cvcf.pyx":346
  *         errorstring += " in 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_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_INCREF(__pyx_v_errorstring);
-  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_errorstring);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_errorstring);
   __Pyx_GIVEREF(__pyx_v_errorstring);
-  __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 = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":339
+ *         self._lines = lines
+ * 
+ *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
+ *         if error in self._ignored_errors: return
+ *         errorlabel, errorstring = self._errors[error].split(':')
+ */
+
+  /* function exit code */
   __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("pysam.cvcf.VCF.error", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -6407,7 +6709,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":347
+/* "pysam/cvcf.pyx":348
  *         raise ValueError(errorstring)
  * 
  *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
@@ -6415,36 +6717,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx
  *             if not format.startswith('<'):
  */
 
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_87__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__defaults__", 0);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_filter);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_filter);
-  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_filter);
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_5parse_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_5parse_format = {__Pyx_NAMESTR("parse_format"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_5parse_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -6453,14 +6725,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_5parse_format(PyObject *__pyx_self,
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_format = 0;
   PyObject *__pyx_v_filter = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("parse_format (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,&__pyx_n_s__format,&__pyx_n_s__filter,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,&__pyx_n_s_format,&__pyx_n_s_filter_2,0};
     PyObject* values[4] = {0,0,0,0};
-    __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
-    values[3] = __pyx_dynamic_args->__pyx_arg_filter;
+    values[3] = ((PyObject *)((PyObject *)Py_False));
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -6475,26 +6749,26 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_5parse_format(PyObject *__pyx_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filter);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filter_2);
           if (value) { values[3] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -6513,13 +6787,15 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_5parse_format(PyObject *__pyx_self,
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_4parse_format(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_format, __pyx_v_filter);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
@@ -6540,9 +6816,9 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
   int __pyx_t_4;
   PyObject *__pyx_t_5 = NULL;
   Py_ssize_t __pyx_t_6;
-  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_7;
   int __pyx_t_8;
-  int __pyx_t_9;
+  PyObject *__pyx_t_9 = NULL;
   PyObject *__pyx_t_10 = NULL;
   PyObject *__pyx_t_11 = NULL;
   PyObject *__pyx_t_12 = NULL;
@@ -6555,50 +6831,50 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
   __Pyx_RefNannySetupContext("parse_format", 0);
   __Pyx_INCREF(__pyx_v_format);
 
-  /* "pysam/cvcf.pyx":348
+  /* "pysam/cvcf.pyx":349
  * 
  *     def parse_format(self,line,format,filter=False):
  *         if self._version == 40:             # <<<<<<<<<<<<<<
  *             if not format.startswith('<'):
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); 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_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_40, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_40, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __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 = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
 
-    /* "pysam/cvcf.pyx":349
+    /* "pysam/cvcf.pyx":350
  *     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_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_startswith); 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_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, 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_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 = 349; __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 = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_4 = (!__pyx_t_3);
+    __pyx_t_4 = ((!__pyx_t_3) != 0);
     if (__pyx_t_4) {
 
-      /* "pysam/cvcf.pyx":350
+      /* "pysam/cvcf.pyx":351
  *         if self._version == 40:
  *             if not format.startswith('<'):
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)             # <<<<<<<<<<<<<<
  *                 format = "<"+format
  *             if not format.endswith('>'):
  */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_27); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V40_MISSING_ANGLE_BRACKETS); 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_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyTuple_New(2); 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_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
@@ -6606,57 +6882,56 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
       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 = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __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_5); __pyx_t_5 = 0;
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-      /* "pysam/cvcf.pyx":351
+      /* "pysam/cvcf.pyx":352
  *             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_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_25), __pyx_v_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyNumber_Add(__pyx_kp_s__21, __pyx_v_format); 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_v_format);
-      __pyx_v_format = __pyx_t_2;
+      __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_2);
       __pyx_t_2 = 0;
       goto __pyx_L4;
     }
     __pyx_L4:;
 
-    /* "pysam/cvcf.pyx":352
+    /* "pysam/cvcf.pyx":353
  *                 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_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__endswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_3 = (!__pyx_t_4);
+    __pyx_t_3 = ((!__pyx_t_4) != 0);
     if (__pyx_t_3) {
 
-      /* "pysam/cvcf.pyx":353
+      /* "pysam/cvcf.pyx":354
  *                 format = "<"+format
  *             if not format.endswith('>'):
  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)             # <<<<<<<<<<<<<<
  *                 format += ">"
  *             format = format[1:-1]
  */
-      __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_27); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V40_MISSING_ANGLE_BRACKETS); 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_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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 = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
@@ -6664,61 +6939,59 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
       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_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-      /* "pysam/cvcf.pyx":354
+      /* "pysam/cvcf.pyx":355
  *             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_28)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_format, __pyx_kp_s__23); 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_v_format);
-      __pyx_v_format = __pyx_t_2;
+      __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_2);
       __pyx_t_2 = 0;
       goto __pyx_L5;
     }
     __pyx_L5:;
 
-    /* "pysam/cvcf.pyx":355
+    /* "pysam/cvcf.pyx":356
  *                 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 = __Pyx_PySequence_GetSlice(__pyx_v_format, 1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_format, 1, -1, NULL, NULL, &__pyx_slice__25, 1, 1, 1); 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_DECREF(__pyx_v_format);
-    __pyx_v_format = __pyx_t_2;
+    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_2);
     __pyx_t_2 = 0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":356
+  /* "pysam/cvcf.pyx":357
  *                 format += ">"
  *             format = format[1:-1]
  *         data = {'id':None,'number':None,'type':None,'descr':None}             # <<<<<<<<<<<<<<
  *         idx = 0
  *         while len(format.strip())>0:
  */
-  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__id), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__number), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__type), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__descr), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyDict_New(); 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);
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_id, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_number, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_type, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_descr, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_data = ((PyObject*)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":357
+  /* "pysam/cvcf.pyx":358
  *             format = format[1:-1]
  *         data = {'id':None,'number':None,'type':None,'descr':None}
  *         idx = 0             # <<<<<<<<<<<<<<
@@ -6728,7 +7001,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
   __Pyx_INCREF(__pyx_int_0);
   __pyx_v_idx = __pyx_int_0;
 
-  /* "pysam/cvcf.pyx":358
+  /* "pysam/cvcf.pyx":359
  *         data = {'id':None,'number':None,'type':None,'descr':None}
  *         idx = 0
  *         while len(format.strip())>0:             # <<<<<<<<<<<<<<
@@ -6736,138 +7009,127 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
  *             first, rest = elts[0], ','.join(elts[1:])
  */
   while (1) {
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = (__pyx_t_6 > 0);
+    __pyx_t_3 = ((__pyx_t_6 > 0) != 0);
     if (!__pyx_t_3) break;
 
-    /* "pysam/cvcf.pyx":359
+    /* "pysam/cvcf.pyx":360
  *         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_t_1 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __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 = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __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_2, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_XDECREF(__pyx_v_elts);
-    __pyx_v_elts = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_elts, __pyx_t_2);
     __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":360
+    /* "pysam/cvcf.pyx":361
  *         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_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_2);
-    __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 = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_elts, 1, 0, NULL, NULL, &__pyx_slice__27, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __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 = 360; __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 = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__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 = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_1); 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_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-    __Pyx_XDECREF(__pyx_v_first);
-    __pyx_v_first = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_first, __pyx_t_2);
     __pyx_t_2 = 0;
-    __Pyx_XDECREF(__pyx_v_rest);
-    __pyx_v_rest = __pyx_t_5;
+    __Pyx_XDECREF_SET(__pyx_v_rest, ((PyObject*)__pyx_t_5));
     __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":361
+    /* "pysam/cvcf.pyx":362
  *             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_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (!__pyx_t_3) {
-      __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __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); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __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 = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __pyx_t_9 = __pyx_t_8;
+        __pyx_t_8 = __pyx_t_7;
       } else {
-        __pyx_t_9 = __pyx_t_4;
+        __pyx_t_8 = __pyx_t_4;
       }
-      __pyx_t_4 = __pyx_t_9;
+      __pyx_t_4 = __pyx_t_8;
     } else {
       __pyx_t_4 = __pyx_t_3;
     }
     if (__pyx_t_4) {
 
-      /* "pysam/cvcf.pyx":362
+      /* "pysam/cvcf.pyx":363
  *             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_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __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); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_int_40, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __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 = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       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 = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_36); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __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 = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyTuple_New(2); 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_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
@@ -6875,220 +7137,218 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
         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 = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __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_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
         goto __pyx_L9;
       }
       __pyx_L9:;
 
-      /* "pysam/cvcf.pyx":363
+      /* "pysam/cvcf.pyx":364
  *             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_5 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); 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_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); 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_t_7 = PyTuple_New(2); 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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
+        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_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         goto __pyx_L10;
       }
       __pyx_L10:;
 
-      /* "pysam/cvcf.pyx":364
+      /* "pysam/cvcf.pyx":365
  *                 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_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __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 = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
-      PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_38));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_39));
-      PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_39));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
-      PyList_SET_ITEM(__pyx_t_2, 2, ((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, 3, ((PyObject *)__pyx_kp_s_41));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
-      __pyx_t_7 = PyObject_GetItem(((PyObject *)__pyx_t_2), __pyx_v_idx); if (!__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(((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 = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_INCREF(__pyx_kp_s_ID);
+      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_ID);
+      __Pyx_GIVEREF(__pyx_kp_s_ID);
+      __Pyx_INCREF(__pyx_kp_s_Number);
+      PyList_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_Number);
+      __Pyx_GIVEREF(__pyx_kp_s_Number);
+      __Pyx_INCREF(__pyx_kp_s_Type);
+      PyList_SET_ITEM(__pyx_t_2, 2, __pyx_kp_s_Type);
+      __Pyx_GIVEREF(__pyx_kp_s_Type);
+      __Pyx_INCREF(__pyx_kp_s_Description);
+      PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_s_Description);
+      __Pyx_GIVEREF(__pyx_kp_s_Description);
+      __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_idx); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __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, __pyx_v_first); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __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_first);
-      __pyx_v_first = __pyx_t_2;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_2);
       __pyx_t_2 = 0;
       goto __pyx_L8;
     }
     __pyx_L8:;
 
-    /* "pysam/cvcf.pyx":365
+    /* "pysam/cvcf.pyx":366
  *                 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_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); 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 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     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 = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __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 = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
       __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 = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      if (unlikely(PyDict_SetItem(__pyx_v_data, __pyx_n_s_id, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L11;
     }
 
-    /* "pysam/cvcf.pyx":366
+    /* "pysam/cvcf.pyx":367
  *                 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_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); 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_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __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 = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      if (unlikely(PyDict_SetItem(__pyx_v_data, __pyx_n_s_number, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       goto __pyx_L11;
     }
 
-    /* "pysam/cvcf.pyx":367
+    /* "pysam/cvcf.pyx":368
  *             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_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     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 = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __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 = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
       __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 = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      if (unlikely(PyDict_SetItem(__pyx_v_data, __pyx_n_s_type, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L11;
     }
 
-    /* "pysam/cvcf.pyx":368
+    /* "pysam/cvcf.pyx":369
  *             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_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     if (__pyx_t_4) {
 
-      /* "pysam/cvcf.pyx":369
+      /* "pysam/cvcf.pyx":370
  *             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_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_split); 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_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_v_elts);
-      __pyx_v_elts = __pyx_t_7;
-      __pyx_t_7 = 0;
+      __Pyx_DECREF_SET(__pyx_v_elts, __pyx_t_1);
+      __pyx_t_1 = 0;
 
-      /* "pysam/cvcf.pyx":370
+      /* "pysam/cvcf.pyx":371
  *             elif first.startswith('Description='):
  *                 elts = format.split('"')
  *                 if len(elts)<3:             # <<<<<<<<<<<<<<
  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
  *                     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 = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_4 = (__pyx_t_6 < 3);
+      __pyx_t_6 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = ((__pyx_t_6 < 3) != 0);
       if (__pyx_t_4) {
 
-        /* "pysam/cvcf.pyx":371
+        /* "pysam/cvcf.pyx":372
  *                 elts = format.split('"')
  *                 if len(elts)<3:
  *                     self.error(line,self.FORMAT_MISSING_QUOTES)             # <<<<<<<<<<<<<<
  *                     elts = first.split('=') + [rest]
  *                 data['descr'] = elts[1]
  */
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__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_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_50); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FORMAT_MISSING_QUOTES); 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_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = PyTuple_New(2); 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_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
@@ -7096,96 +7356,89 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
         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 = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __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_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-        /* "pysam/cvcf.pyx":372
+        /* "pysam/cvcf.pyx":373
  *                 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_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __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 = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_2);
         __Pyx_INCREF(__pyx_v_rest);
         PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_rest);
         __Pyx_GIVEREF(__pyx_v_rest);
-        __pyx_t_7 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_t_2)); 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_1 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __Pyx_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_7;
-        __pyx_t_7 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF_SET(__pyx_v_elts, __pyx_t_1);
+        __pyx_t_1 = 0;
         goto __pyx_L12;
       }
       __pyx_L12:;
 
-      /* "pysam/cvcf.pyx":373
+      /* "pysam/cvcf.pyx":374
  *                     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_7 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __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 = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      if (unlikely(PyDict_SetItem(__pyx_v_data, __pyx_n_s_descr, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "pysam/cvcf.pyx":374
+      /* "pysam/cvcf.pyx":375
  *                     elts = first.split('=') + [rest]
  *                 data['descr'] = elts[1]
  *                 rest = '"'.join(elts[2:])             # <<<<<<<<<<<<<<
  *                 if rest.startswith(','): rest = rest[1:]
  *             else:
  */
-      __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_32), __pyx_n_s__join); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __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 = 374; __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 = 374; __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_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_elts, 2, 0, NULL, NULL, &__pyx_slice__42, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__29, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __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_2;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF_SET(__pyx_v_rest, ((PyObject*)__pyx_t_2));
       __pyx_t_2 = 0;
 
-      /* "pysam/cvcf.pyx":375
+      /* "pysam/cvcf.pyx":376
  *                 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_2 = PyObject_GetAttr(__pyx_v_rest, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rest, __pyx_n_s_startswith); if (unlikely(!__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_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__43, 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_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 = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __Pyx_DECREF(__pyx_v_rest);
-        __pyx_v_rest = __pyx_t_5;
-        __pyx_t_5 = 0;
+        if (unlikely(__pyx_v_rest == Py_None)) {
+          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_rest, 1, PY_SSIZE_T_MAX); 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_SET(__pyx_v_rest, ((PyObject*)__pyx_t_1));
+        __pyx_t_1 = 0;
         goto __pyx_L13;
       }
       __pyx_L13:;
@@ -7193,34 +7446,34 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
     }
     /*else*/ {
 
-      /* "pysam/cvcf.pyx":377
+      /* "pysam/cvcf.pyx":378
  *                 if rest.startswith(','): rest = rest[1:]
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
  *             format = rest
  *             idx += 1
  */
-      __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __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 = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __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(__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_2);
+      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_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __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_7)); __pyx_t_7 = 0;
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     }
     __pyx_L11:;
 
-    /* "pysam/cvcf.pyx":378
+    /* "pysam/cvcf.pyx":379
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *             format = rest             # <<<<<<<<<<<<<<
@@ -7228,153 +7481,151 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings
  */
     __Pyx_INCREF(__pyx_v_rest);
-    __Pyx_DECREF(__pyx_v_format);
-    __pyx_v_format = __pyx_v_rest;
+    __Pyx_DECREF_SET(__pyx_v_format, __pyx_v_rest);
 
-    /* "pysam/cvcf.pyx":379
+    /* "pysam/cvcf.pyx":380
  *                 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)
  */
-    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_idx, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_idx, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_v_idx);
-    __pyx_v_idx = __pyx_t_2;
+    __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_2);
     __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":380
+    /* "pysam/cvcf.pyx":381
  *             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 'descr' not in data:
  */
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_4) {
-      __pyx_t_2 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_9 = __pyx_t_3;
+      __pyx_t_8 = __pyx_t_3;
     } else {
-      __pyx_t_9 = __pyx_t_4;
+      __pyx_t_8 = __pyx_t_4;
     }
-    if (__pyx_t_9) {
+    if (__pyx_t_8) {
       __Pyx_INCREF(__pyx_int_3);
-      __Pyx_DECREF(__pyx_v_idx);
-      __pyx_v_idx = __pyx_int_3;
+      __Pyx_DECREF_SET(__pyx_v_idx, __pyx_int_3);
       goto __pyx_L14;
     }
     __pyx_L14:;
   }
 
-  /* "pysam/cvcf.pyx":381
+  /* "pysam/cvcf.pyx":382
  *             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 'descr' not in data:
  *             # missing description
  */
-  __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 = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_id); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __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 = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = (!__pyx_t_9);
+  __pyx_t_4 = ((!__pyx_t_8) != 0);
   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 = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); 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_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    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, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __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_5)); __pyx_t_5 = 0;
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     goto __pyx_L15;
   }
   __pyx_L15:;
 
-  /* "pysam/cvcf.pyx":382
+  /* "pysam/cvcf.pyx":383
  *             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 'descr' not in data:             # <<<<<<<<<<<<<<
  *             # missing description
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  */
-  __pyx_t_4 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__descr), ((PyObject *)__pyx_v_data), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_4) {
+  __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_n_s_descr, __pyx_v_data, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = (__pyx_t_4 != 0);
+  if (__pyx_t_8) {
 
-    /* "pysam/cvcf.pyx":384
+    /* "pysam/cvcf.pyx":385
  *         if 'descr' not in data:
  *             # missing description
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
  *             data['descr'] = ""
  *         if not data['type'] and not data['number']:
  */
-    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __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 = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __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 = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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_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 = 384; __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;
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __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;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":385
+    /* "pysam/cvcf.pyx":386
  *             # missing description
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *             data['descr'] = ""             # <<<<<<<<<<<<<<
  *         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_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(PyDict_SetItem(__pyx_v_data, __pyx_n_s_descr, __pyx_kp_s_) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L16;
   }
   __pyx_L16:;
 
-  /* "pysam/cvcf.pyx":386
+  /* "pysam/cvcf.pyx":387
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *             data['descr'] = ""
  *         if not data['type'] and not data['number']:             # <<<<<<<<<<<<<<
  *             # fine, ##filter format
  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')
  */
-  __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 = 386; __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 = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_9 = (!__pyx_t_4);
-  if (__pyx_t_9) {
-    __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 = 386; __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 = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_3 = (!__pyx_t_4);
-    __pyx_t_4 = __pyx_t_3;
+  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_type); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = ((!__pyx_t_8) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_3 = ((!__pyx_t_8) != 0);
+    __pyx_t_8 = __pyx_t_3;
   } else {
-    __pyx_t_4 = __pyx_t_9;
+    __pyx_t_8 = __pyx_t_4;
   }
-  if (__pyx_t_4) {
+  if (__pyx_t_8) {
 
-    /* "pysam/cvcf.pyx":388
+    /* "pysam/cvcf.pyx":389
  *         if not data['type'] and not data['number']:
  *             # fine, ##filter format
  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')             # <<<<<<<<<<<<<<
@@ -7382,195 +7633,179 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __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 = 388; __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 = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __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 = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __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 = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_id); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_descr); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
     PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
-    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7);
-    __Pyx_GIVEREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
     __Pyx_INCREF(__pyx_int_0);
     PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_int_0);
     __Pyx_GIVEREF(__pyx_int_0);
-    __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag));
-    PyTuple_SET_ITEM(__pyx_t_10, 3, ((PyObject *)__pyx_n_s__Flag));
-    __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_9));
-    PyTuple_SET_ITEM(__pyx_t_10, 5, ((PyObject *)__pyx_kp_s_9));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+    __Pyx_INCREF(__pyx_n_s_Flag);
+    PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_n_s_Flag);
+    __Pyx_GIVEREF(__pyx_n_s_Flag);
+    PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __Pyx_INCREF(__pyx_kp_s__8);
+    PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_kp_s__8);
+    __Pyx_GIVEREF(__pyx_kp_s__8);
     __pyx_t_2 = 0;
-    __pyx_t_7 = 0;
-    __pyx_t_1 = 0;
-    __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 = 388; __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_10)); __pyx_t_10 = 0;
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_5 = 0;
+    __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __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_10); __pyx_t_10 = 0;
+    __pyx_r = __pyx_t_9;
+    __pyx_t_9 = 0;
     goto __pyx_L0;
-    goto __pyx_L17;
   }
-  __pyx_L17:;
 
-  /* "pysam/cvcf.pyx":389
+  /* "pysam/cvcf.pyx":390
  *             # 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
  */
-  __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Integer), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __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 = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  if (!((int)__pyx_t_4)) {
-    __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Float), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __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 = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_3 = ((int)__pyx_t_9);
+  __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_type); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_Integer, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_8) {
+    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_Float, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __pyx_t_4;
   } else {
-    __pyx_t_3 = ((int)__pyx_t_4);
+    __pyx_t_3 = __pyx_t_8;
   }
-  if (!__pyx_t_3) {
-    __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Character), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __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 = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_9 = ((int)__pyx_t_4);
+  if (__pyx_t_3) {
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_Character, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __pyx_t_8;
   } else {
-    __pyx_t_9 = __pyx_t_3;
+    __pyx_t_4 = __pyx_t_3;
   }
-  if (!__pyx_t_9) {
-    __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__String), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_4 = ((int)__pyx_t_3);
+  if (__pyx_t_4) {
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_String, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __pyx_t_3;
   } else {
-    __pyx_t_4 = __pyx_t_9;
+    __pyx_t_8 = __pyx_t_4;
   }
-  if (!__pyx_t_4) {
-    __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Flag), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __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 = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_3 = ((int)__pyx_t_9);
-  } else {
+  if (__pyx_t_8) {
+    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_Flag, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_3 = __pyx_t_4;
+  } else {
+    __pyx_t_3 = __pyx_t_8;
   }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_4 = (!__pyx_t_3);
-  if (__pyx_t_4) {
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_t_8 = (__pyx_t_3 != 0);
+  if (__pyx_t_8) {
 
-    /* "pysam/cvcf.pyx":390
+    /* "pysam/cvcf.pyx":391
  *             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
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __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 = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_5, 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_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __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_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     goto __pyx_L18;
   }
   __pyx_L18:;
 
-  /* "pysam/cvcf.pyx":392
+  /* "pysam/cvcf.pyx":393
  *             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)
  */
-  __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 = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_type); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_5 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__Integer), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  if (!((int)__pyx_t_4)) {
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__Float), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_9 = ((int)__pyx_t_3);
+  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_Integer, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_8) {
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_Float, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __pyx_t_3;
   } else {
-    __pyx_t_9 = ((int)__pyx_t_4);
+    __pyx_t_4 = __pyx_t_8;
   }
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __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 = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = (__pyx_t_4 != 0);
+  if (__pyx_t_8) {
+    if (unlikely(PyDict_SetItem(__pyx_v_data, __pyx_n_s_missing, Py_None) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L19;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":393
+    /* "pysam/cvcf.pyx":394
  *         # 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_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(PyDict_SetItem(__pyx_v_data, __pyx_n_s_missing, __pyx_kp_s__8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_L19:;
 
-  /* "pysam/cvcf.pyx":394
+  /* "pysam/cvcf.pyx":395
  *         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'])
  */
-  __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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = ((!__pyx_t_8) != 0);
+  if (__pyx_t_4) {
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__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_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     goto __pyx_L20;
   }
   __pyx_L20:;
 
-  /* "pysam/cvcf.pyx":395
+  /* "pysam/cvcf.pyx":396
  *         else:                                   data['missing'] = '.'
  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         try:             # <<<<<<<<<<<<<<
@@ -7584,37 +7819,32 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
     __Pyx_XGOTREF(__pyx_t_13);
     /*try:*/ {
 
-      /* "pysam/cvcf.pyx":396
+      /* "pysam/cvcf.pyx":397
  *         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_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
+      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L21_error;};
       __Pyx_GOTREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
-      __Pyx_GIVEREF(__pyx_t_5);
-      __pyx_t_5 = 0;
-      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-      __pyx_v_n = __pyx_t_5;
-      __pyx_t_5 = 0;
+      __pyx_t_9 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_n = __pyx_t_9;
+      __pyx_t_9 = 0;
 
-      /* "pysam/cvcf.pyx":397
+      /* "pysam/cvcf.pyx":398
  *         try:
  *             n = int(data['number'])
  *             t = self.NT_NUMBER             # <<<<<<<<<<<<<<
  *         except ValueError:
  *             n = -1
  */
-      __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 = 397; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_v_t = __pyx_t_5;
-      __pyx_t_5 = 0;
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_v_t = __pyx_t_9;
+      __pyx_t_9 = 0;
     }
     __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
@@ -7622,12 +7852,12 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
     goto __pyx_L28_try_end;
     __pyx_L21_error:;
     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-    /* "pysam/cvcf.pyx":398
+    /* "pysam/cvcf.pyx":399
  *             n = int(data['number'])
  *             t = self.NT_NUMBER
  *         except ValueError:             # <<<<<<<<<<<<<<
@@ -7637,12 +7867,12 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
     __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
     if (__pyx_t_14) {
       __Pyx_AddTraceback("pysam.cvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
-      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_GOTREF(__pyx_t_9);
       __Pyx_GOTREF(__pyx_t_1);
       __Pyx_GOTREF(__pyx_t_10);
 
-      /* "pysam/cvcf.pyx":399
+      /* "pysam/cvcf.pyx":400
  *             t = self.NT_NUMBER
  *         except ValueError:
  *             n = -1             # <<<<<<<<<<<<<<
@@ -7650,198 +7880,173 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES
  */
       __Pyx_INCREF(__pyx_int_neg_1);
-      __Pyx_XDECREF(__pyx_v_n);
-      __pyx_v_n = __pyx_int_neg_1;
+      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_int_neg_1);
 
-      /* "pysam/cvcf.pyx":400
+      /* "pysam/cvcf.pyx":401
  *         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
  */
-      __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __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 = 400; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_9) {
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_XDECREF(__pyx_v_t);
-        __pyx_v_t = __pyx_t_2;
-        __pyx_t_2 = 0;
+      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5);
+        __pyx_t_5 = 0;
         goto __pyx_L31;
       }
 
-      /* "pysam/cvcf.pyx":401
+      /* "pysam/cvcf.pyx":402
  *             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
  */
-      __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 = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_53), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __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 = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_9) {
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_XDECREF(__pyx_v_t);
-        __pyx_v_t = __pyx_t_7;
-        __pyx_t_7 = 0;
+      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s_alleles, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5);
+        __pyx_t_5 = 0;
         goto __pyx_L31;
       }
 
-      /* "pysam/cvcf.pyx":402
+      /* "pysam/cvcf.pyx":403
  *             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
  */
-      __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_54), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __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 = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_9) {
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NR_ALLELES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_XDECREF(__pyx_v_t);
-        __pyx_v_t = __pyx_t_2;
-        __pyx_t_2 = 0;
+      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s_nonref_alleles, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NR_ALLELES); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5);
+        __pyx_t_5 = 0;
         goto __pyx_L31;
       }
 
-      /* "pysam/cvcf.pyx":403
+      /* "pysam/cvcf.pyx":404
  *             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
  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
  */
-      __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 = 403; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_55), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __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 = 403; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_9) {
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_XDECREF(__pyx_v_t);
-        __pyx_v_t = __pyx_t_7;
-        __pyx_t_7 = 0;
+      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s_genotypes, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5);
+        __pyx_t_5 = 0;
         goto __pyx_L31;
       }
 
-      /* "pysam/cvcf.pyx":404
+      /* "pysam/cvcf.pyx":405
  *             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             # <<<<<<<<<<<<<<
  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
  *             # abbreviations added in VCF version v4.1
  */
-      __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_56), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_9) {
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_XDECREF(__pyx_v_t);
-        __pyx_v_t = __pyx_t_2;
-        __pyx_t_2 = 0;
+      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s_phased_genotypes, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5);
+        __pyx_t_5 = 0;
         goto __pyx_L31;
       }
 
-      /* "pysam/cvcf.pyx":405
+      /* "pysam/cvcf.pyx":406
  *             elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES
  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES             # <<<<<<<<<<<<<<
  *             # abbreviations added in VCF version v4.1
  *             elif data['number'] == 'A': t = self.NT_ALLELES
  */
-      __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 = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_56), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __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 = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_9) {
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_XDECREF(__pyx_v_t);
-        __pyx_v_t = __pyx_t_7;
-        __pyx_t_7 = 0;
+      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s_phased_genotypes, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5);
+        __pyx_t_5 = 0;
         goto __pyx_L31;
       }
 
-      /* "pysam/cvcf.pyx":407
+      /* "pysam/cvcf.pyx":408
  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
  *             # abbreviations added in VCF version v4.1
  *             elif data['number'] == 'A': t = self.NT_ALLELES             # <<<<<<<<<<<<<<
  *             elif data['number'] == 'G': t = self.NT_GENOTYPES
  *             else:
  */
-      __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 = 407; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_n_s__A), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __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 = 407; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_9) {
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_XDECREF(__pyx_v_t);
-        __pyx_v_t = __pyx_t_2;
-        __pyx_t_2 = 0;
+      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_A, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5);
+        __pyx_t_5 = 0;
         goto __pyx_L31;
       }
 
-      /* "pysam/cvcf.pyx":408
+      /* "pysam/cvcf.pyx":409
  *             # abbreviations added in VCF version v4.1
  *             elif data['number'] == 'A': t = self.NT_ALLELES
  *             elif data['number'] == 'G': t = self.NT_GENOTYPES             # <<<<<<<<<<<<<<
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  */
-      __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 = 408; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__G), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __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 = 408; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_9) {
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_XDECREF(__pyx_v_t);
-        __pyx_v_t = __pyx_t_7;
-        __pyx_t_7 = 0;
+      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_number); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_G, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5);
+        __pyx_t_5 = 0;
         goto __pyx_L31;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":410
+        /* "pysam/cvcf.pyx":411
  *             elif data['number'] == 'G': t = self.NT_GENOTYPES
  *             else:
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
  *         # if number is 0 - type must be Flag
  *         if n == 0 and data['type'] != 'Flag':
  */
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
         __Pyx_GOTREF(__pyx_t_15);
         __Pyx_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_line);
@@ -7849,18 +8054,19 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
         PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_2);
         __Pyx_GIVEREF(__pyx_t_2);
         __pyx_t_2 = 0;
-        __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 = 410; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       }
       __pyx_L31:;
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       goto __pyx_L22_exception_handled;
     }
+    goto __pyx_L23_except_error;
     __pyx_L23_except_error:;
     __Pyx_XGIVEREF(__pyx_t_11);
     __Pyx_XGIVEREF(__pyx_t_12);
@@ -7875,67 +8081,65 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
     __pyx_L28_try_end:;
   }
 
-  /* "pysam/cvcf.pyx":412
+  /* "pysam/cvcf.pyx":413
  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
  *         # if number is 0 - type must be Flag
  *         if n == 0 and data['type'] != 'Flag':             # <<<<<<<<<<<<<<
  *             self.error( line, self.ZERO_FOR_NON_FLAG_FIELD)
  *             # force type 'Flag' if no number
  */
-  __pyx_t_10 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __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 = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  if (__pyx_t_9) {
-    __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 = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+    __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_type); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__Flag), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_Flag, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = __pyx_t_4;
+    __pyx_t_3 = __pyx_t_8;
   } else {
-    __pyx_t_3 = __pyx_t_9;
+    __pyx_t_3 = __pyx_t_4;
   }
   if (__pyx_t_3) {
 
-    /* "pysam/cvcf.pyx":413
+    /* "pysam/cvcf.pyx":414
  *         # if number is 0 - type must be Flag
  *         if n == 0 and data['type'] != 'Flag':
  *             self.error( line, self.ZERO_FOR_NON_FLAG_FIELD)             # <<<<<<<<<<<<<<
  *             # force type 'Flag' if no number
  *             data['type'] = 'Flag'
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); 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_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_57); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ZERO_FOR_NON_FLAG_FIELD); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    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, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __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_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":415
+    /* "pysam/cvcf.pyx":416
  *             self.error( line, self.ZERO_FOR_NON_FLAG_FIELD)
  *             # force type 'Flag' if no number
  *             data['type'] = 'Flag'             # <<<<<<<<<<<<<<
  * 
  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])
  */
-    if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type), ((PyObject *)__pyx_n_s__Flag)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(PyDict_SetItem(__pyx_v_data, __pyx_n_s_type, __pyx_n_s_Flag) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L32;
   }
   __pyx_L32:;
 
-  /* "pysam/cvcf.pyx":417
+  /* "pysam/cvcf.pyx":418
  *             data['type'] = 'Flag'
  * 
  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])             # <<<<<<<<<<<<<<
@@ -7943,52 +8147,59 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
  *     def format_format( self, fmt, filter=False ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); 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);
-  __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  if (unlikely(!__pyx_v_t)) { __Pyx_RaiseUnboundLocalError("t"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-  __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); 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);
-  __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_id); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_9);
+  if (unlikely(!__pyx_v_t)) { __Pyx_RaiseUnboundLocalError("t"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_type); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_descr); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_15 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__missing)); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_15 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_s_missing); if (unlikely(__pyx_t_15 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_15);
-  __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
+  __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
   __Pyx_INCREF(__pyx_v_t);
-  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_t);
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_t);
   __Pyx_GIVEREF(__pyx_v_t);
   __Pyx_INCREF(__pyx_v_n);
-  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_n);
+  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_n);
   __Pyx_GIVEREF(__pyx_v_n);
-  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_10);
+  __Pyx_GIVEREF(__pyx_t_10);
+  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_15);
+  PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_15);
   __Pyx_GIVEREF(__pyx_t_15);
-  __pyx_t_5 = 0;
-  __pyx_t_1 = 0;
+  __pyx_t_9 = 0;
+  __pyx_t_10 = 0;
   __pyx_t_2 = 0;
   __pyx_t_15 = 0;
-  __pyx_t_15 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_15);
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   __pyx_r = __pyx_t_15;
   __pyx_t_15 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":348
+ *         raise ValueError(errorstring)
+ * 
+ *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
+ *         if self._version == 40:
+ *             if not format.startswith('<'):
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_9);
   __Pyx_XDECREF(__pyx_t_10);
   __Pyx_XDECREF(__pyx_t_15);
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -8007,7 +8218,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":419
+/* "pysam/cvcf.pyx":420
  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])
  * 
  *     def format_format( self, fmt, filter=False ):             # <<<<<<<<<<<<<<
@@ -8015,36 +8226,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject
  *         if fmt.number != None and not filter:
  */
 
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_89__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__defaults__", 0);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_filter);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_filter);
-  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_filter);
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_7format_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_7format_format = {__Pyx_NAMESTR("format_format"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_7format_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -8052,14 +8233,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_7format_format(PyObject *__pyx_self,
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_fmt = 0;
   PyObject *__pyx_v_filter = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("format_format (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__fmt,&__pyx_n_s__filter,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fmt,&__pyx_n_s_filter_2,0};
     PyObject* values[3] = {0,0,0};
-    __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
-    values[2] = __pyx_dynamic_args->__pyx_arg_filter;
+    values[2] = ((PyObject *)((PyObject *)Py_False));
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -8073,21 +8256,21 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_7format_format(PyObject *__pyx_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fmt)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("format_format", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("format_format", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filter);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filter_2);
           if (value) { values[2] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "format_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "format_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -8104,13 +8287,15 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_7format_format(PyObject *__pyx_self,
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("format_format", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("format_format", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.format_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_6format_format(__pyx_self, __pyx_v_self, __pyx_v_fmt, __pyx_v_filter);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
@@ -8134,53 +8319,52 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObjec
   PyObject *__pyx_t_9 = NULL;
   PyObject *__pyx_t_10 = NULL;
   PyObject *__pyx_t_11 = NULL;
-  PyObject *__pyx_t_12 = NULL;
-  PyObject *(*__pyx_t_13)(PyObject *);
+  PyObject *(*__pyx_t_12)(PyObject *);
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("format_format", 0);
 
-  /* "pysam/cvcf.pyx":420
+  /* "pysam/cvcf.pyx":421
  * 
  *     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 = "."
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __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 = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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));
+  __Pyx_INCREF(__pyx_n_s_ID_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ID_2);
+  __Pyx_GIVEREF(__pyx_n_s_ID_2);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
   __Pyx_GIVEREF(__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 = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
   __pyx_v_values = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":421
+  /* "pysam/cvcf.pyx":422
  *     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)
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__number); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_number); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __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 = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_5 = (!__pyx_t_4);
     __pyx_t_4 = __pyx_t_5;
   } else {
@@ -8188,278 +8372,276 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObjec
   }
   if (__pyx_t_4) {
 
-    /* "pysam/cvcf.pyx":422
+    /* "pysam/cvcf.pyx":423
  *         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"
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     if (__pyx_t_4) {
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_9);
+      __Pyx_INCREF(__pyx_kp_s__8);
+      __pyx_v_nmb = __pyx_kp_s__8;
       goto __pyx_L4;
     }
 
-    /* "pysam/cvcf.pyx":423
+    /* "pysam/cvcf.pyx":424
  *         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"
  */
-    __pyx_t_6 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __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 = 424; __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_fmt, __pyx_n_s__number); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __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 = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __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))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __pyx_v_nmb = __pyx_t_2;
       __pyx_t_2 = 0;
       goto __pyx_L4;
     }
 
-    /* "pysam/cvcf.pyx":424
+    /* "pysam/cvcf.pyx":425
  *             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"
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __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_53));
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_53);
+      __Pyx_INCREF(__pyx_kp_s_alleles);
+      __pyx_v_nmb = __pyx_kp_s_alleles;
       goto __pyx_L4;
     }
 
-    /* "pysam/cvcf.pyx":425
+    /* "pysam/cvcf.pyx":426
  *             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"
  */
-    __pyx_t_6 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NR_ALLELES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NR_ALLELES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __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 = 426; __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_54));
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_54);
+      __Pyx_INCREF(__pyx_kp_s_nonref_alleles);
+      __pyx_v_nmb = __pyx_kp_s_nonref_alleles;
       goto __pyx_L4;
     }
 
-    /* "pysam/cvcf.pyx":426
+    /* "pysam/cvcf.pyx":427
  *             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:
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); 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);
-    __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __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_55));
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_55);
+      __Pyx_INCREF(__pyx_kp_s_genotypes);
+      __pyx_v_nmb = __pyx_kp_s_genotypes;
       goto __pyx_L4;
     }
 
-    /* "pysam/cvcf.pyx":427
+    /* "pysam/cvcf.pyx":428
  *             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)
  */
-    __pyx_t_6 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __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 = 428; __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_56));
-      __pyx_v_nmb = ((PyObject *)__pyx_kp_s_56);
+      __Pyx_INCREF(__pyx_kp_s_phased_genotypes);
+      __pyx_v_nmb = __pyx_kp_s_phased_genotypes;
       goto __pyx_L4;
     }
     /*else*/ {
 
-      /* "pysam/cvcf.pyx":429
+      /* "pysam/cvcf.pyx":430
  *             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) )
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_58), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_number_type_encountered, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __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 = 429; __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 = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
       __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_Raise(__pyx_t_1, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     __pyx_L4:;
 
-    /* "pysam/cvcf.pyx":430
+    /* "pysam/cvcf.pyx":431
  *             else:
  *                 raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)
  *             values.append( ('Number',nmb) )             # <<<<<<<<<<<<<<
  *             values.append( ('Type', fmt.type) )
  *         values.append( ('Description', '"' + fmt.description + '"') )
  */
-    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __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 = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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_n_s_Number_2);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Number_2);
+    __Pyx_GIVEREF(__pyx_n_s_Number_2);
     __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(__pyx_v_values, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":431
+    /* "pysam/cvcf.pyx":432
  *                 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:
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __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 = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__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));
+    __Pyx_INCREF(__pyx_n_s_Type_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Type_2);
+    __Pyx_GIVEREF(__pyx_n_s_Type_2);
     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     __pyx_t_1 = 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 = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":432
+  /* "pysam/cvcf.pyx":433
  *             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])
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__description); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_description); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_kp_s_32), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyNumber_Add(__pyx_kp_s__29, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __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_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__29); 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_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 = 432; __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 = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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));
+  __Pyx_INCREF(__pyx_n_s_Description_2);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Description_2);
+  __Pyx_GIVEREF(__pyx_n_s_Description_2);
   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 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 = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":433
+  /* "pysam/cvcf.pyx":434
  *             values.append( ('Type', fmt.type) )
  *         values.append( ('Description', '"' + fmt.description + '"') )
  *         if self._version == 33:             # <<<<<<<<<<<<<<
  *             format = ",".join([v for k,v in values])
  *         else:
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_33, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_33, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __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 = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_4) {
 
-    /* "pysam/cvcf.pyx":434
+    /* "pysam/cvcf.pyx":435
  *         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] )) + ">"
  */
-    __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 = 434; __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 = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = ((PyObject *)__pyx_v_values); __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
+    __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
     for (;;) {
-      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
+      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-      if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
-        PyObject* sequence = __pyx_t_9;
+      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
+        PyObject* sequence = __pyx_t_6;
         #if CYTHON_COMPILING_IN_CPYTHON
         Py_ssize_t size = Py_SIZE(sequence);
         #else
@@ -8468,93 +8650,81 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObjec
         if (unlikely(size != 2)) {
           if (size > 2) __Pyx_RaiseTooManyValuesError(2);
           else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         #if CYTHON_COMPILING_IN_CPYTHON
         if (likely(PyTuple_CheckExact(sequence))) {
-          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
-          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
+          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
+          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
         } else {
-          __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
-          __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
+          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
+          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
         }
+        __Pyx_INCREF(__pyx_t_9);
         __Pyx_INCREF(__pyx_t_10);
-        __Pyx_INCREF(__pyx_t_11);
         #else
-        __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_11);
         #endif
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      } else
-      {
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      } else {
         Py_ssize_t index = -1;
-        __pyx_t_12 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_12);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
-        index = 0; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L8_unpacking_failed;
-        __Pyx_GOTREF(__pyx_t_10);
-        index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L8_unpacking_failed;
+        __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_11);
-        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_13 = NULL;
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
+        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_9);
+        index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L8_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_10);
+        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = NULL;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
         goto __pyx_L9_unpacking_done;
         __pyx_L8_unpacking_failed:;
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-        __pyx_t_13 = NULL;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __pyx_t_12 = NULL;
         if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __pyx_L9_unpacking_done:;
       }
-      __Pyx_XDECREF(__pyx_v_k);
-      __pyx_v_k = __pyx_t_10;
+      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_9);
+      __pyx_t_9 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_10);
       __pyx_t_10 = 0;
-      __Pyx_XDECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_11;
-      __pyx_t_11 = 0;
-      if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __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 = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __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_6)); __pyx_t_6 = 0;
-    __pyx_v_format = __pyx_t_1;
+    __pyx_v_format = ((PyObject*)__pyx_t_1);
     __pyx_t_1 = 0;
     goto __pyx_L5;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":436
+    /* "pysam/cvcf.pyx":437
  *             format = ",".join([v for k,v in values])
  *         else:
  *             format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">"             # <<<<<<<<<<<<<<
  *         return format
  * 
  */
-    __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 = 436; __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 = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_2 = ((PyObject *)__pyx_v_values); __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
+    __pyx_t_2 = __pyx_v_values; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
     for (;;) {
       if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-      if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
-        PyObject* sequence = __pyx_t_9;
+      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
+        PyObject* sequence = __pyx_t_6;
         #if CYTHON_COMPILING_IN_CPYTHON
         Py_ssize_t size = Py_SIZE(sequence);
         #else
@@ -8563,90 +8733,80 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObjec
         if (unlikely(size != 2)) {
           if (size > 2) __Pyx_RaiseTooManyValuesError(2);
           else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         #if CYTHON_COMPILING_IN_CPYTHON
         if (likely(PyTuple_CheckExact(sequence))) {
-          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
-          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
+          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
+          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
         } else {
-          __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
-          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
+          __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
+          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
         }
-        __Pyx_INCREF(__pyx_t_11);
         __Pyx_INCREF(__pyx_t_10);
+        __Pyx_INCREF(__pyx_t_9);
         #else
-        __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_11);
-        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
         #endif
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      } else
-      {
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      } else {
         Py_ssize_t index = -1;
-        __pyx_t_12 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_12);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
-        index = 0; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L12_unpacking_failed;
+        __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_11);
-        index = 1; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L12_unpacking_failed;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
+        index = 0; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L12_unpacking_failed;
         __Pyx_GOTREF(__pyx_t_10);
-        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_13 = NULL;
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L12_unpacking_failed;
+        __Pyx_GOTREF(__pyx_t_9);
+        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_12 = NULL;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
         goto __pyx_L13_unpacking_done;
         __pyx_L12_unpacking_failed:;
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-        __pyx_t_13 = NULL;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __pyx_t_12 = NULL;
         if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __pyx_L13_unpacking_done:;
       }
-      __Pyx_XDECREF(__pyx_v_k);
-      __pyx_v_k = __pyx_t_11;
-      __pyx_t_11 = 0;
-      __Pyx_XDECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_10;
+      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_10);
       __pyx_t_10 = 0;
-      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_9);
+      __pyx_t_9 = 0;
+      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
       __Pyx_INCREF(__pyx_v_k);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_k);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_k);
       __Pyx_GIVEREF(__pyx_v_k);
       __Pyx_INCREF(__pyx_v_v);
-      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_v);
+      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
-      __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
-      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-      if (unlikely(__Pyx_PyList_Append(__pyx_t_6, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+      __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __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 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_1); 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_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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_25), __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __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_28)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = PyNumber_Add(__pyx_kp_s__21, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_v_format = __pyx_t_6;
-    __pyx_t_6 = 0;
+    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__23); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_format = ((PyObject*)__pyx_t_2);
+    __pyx_t_2 = 0;
   }
   __pyx_L5:;
 
-  /* "pysam/cvcf.pyx":437
+  /* "pysam/cvcf.pyx":438
  *         else:
  *             format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">"
  *         return format             # <<<<<<<<<<<<<<
@@ -8658,8 +8818,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObjec
   __pyx_r = __pyx_v_format;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":420
+ *         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:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -8667,7 +8834,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObjec
   __Pyx_XDECREF(__pyx_t_9);
   __Pyx_XDECREF(__pyx_t_10);
   __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_XDECREF(__pyx_t_12);
   __Pyx_AddTraceback("pysam.cvcf.VCF.format_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -8681,6 +8847,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObjec
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":440
+ *         return format
+ * 
+ *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
+ *         fmt = formatdict[format]
+ *         if fmt.numbertype == self.NT_UNKNOWN: return -1
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_9get_expected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_9get_expected = {__Pyx_NAMESTR("get_expected"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_9get_expected, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -8689,11 +8863,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_9get_expected(PyObject *__pyx_self,
   PyObject *__pyx_v_format = 0;
   PyObject *__pyx_v_formatdict = 0;
   PyObject *__pyx_v_alt = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("get_expected (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format,&__pyx_n_s__formatdict,&__pyx_n_s__alt,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_format,&__pyx_n_s_formatdict,&__pyx_n_s_alt,0};
     PyObject* values[4] = {0,0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -8709,26 +8886,26 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_9get_expected(PyObject *__pyx_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__formatdict)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_formatdict)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
-        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alt)) != 0)) kw_args--;
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alt)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_expected") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_expected") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
       goto __pyx_L5_argtuple_error;
@@ -8745,25 +8922,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_9get_expected(PyObject *__pyx_self,
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.get_expected", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_8get_expected(__pyx_self, __pyx_v_self, __pyx_v_format, __pyx_v_formatdict, __pyx_v_alt);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":439
- *         return format
- * 
- *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
- *         fmt = formatdict[format]
- *         if fmt.numbertype == self.NT_UNKNOWN: return -1
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_alt) {
   PyObject *__pyx_v_fmt = NULL;
   PyObject *__pyx_r = NULL;
@@ -8779,185 +8950,173 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("get_expected", 0);
 
-  /* "pysam/cvcf.pyx":440
+  /* "pysam/cvcf.pyx":441
  * 
  *     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
  */
-  __pyx_t_1 = PyObject_GetItem(__pyx_v_formatdict, __pyx_v_format); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetItem(__pyx_v_formatdict, __pyx_v_format); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_fmt = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":441
+  /* "pysam/cvcf.pyx":442
  *     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
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); 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_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_4) {
     __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(__pyx_int_neg_1);
     __pyx_r = __pyx_int_neg_1;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":442
+  /* "pysam/cvcf.pyx":443
  *         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)
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __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 = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_4) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__number); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_number); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_r = __pyx_t_1;
     __pyx_t_1 = 0;
     goto __pyx_L0;
-    goto __pyx_L4;
   }
-  __pyx_L4:;
 
-  /* "pysam/cvcf.pyx":443
+  /* "pysam/cvcf.pyx":444
  *         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
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 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;
   if (__pyx_t_4) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_5 + 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_5 + 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __pyx_r = __pyx_t_3;
     __pyx_t_3 = 0;
     goto __pyx_L0;
-    goto __pyx_L5;
   }
-  __pyx_L5:;
 
-  /* "pysam/cvcf.pyx":444
+  /* "pysam/cvcf.pyx":445
  *         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)
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NR_ALLELES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NR_ALLELES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_4) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_r = __pyx_t_1;
     __pyx_t_1 = 0;
     goto __pyx_L0;
-    goto __pyx_L6;
   }
-  __pyx_L6:;
 
-  /* "pysam/cvcf.pyx":445
+  /* "pysam/cvcf.pyx":446
  *         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
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); 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_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_4) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(((__pyx_t_5 + 1) * (__pyx_t_6 + 2)), 2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(((__pyx_t_5 + 1) * (__pyx_t_6 + 2)), 2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __pyx_r = __pyx_t_3;
     __pyx_t_3 = 0;
     goto __pyx_L0;
-    goto __pyx_L7;
   }
-  __pyx_L7:;
 
-  /* "pysam/cvcf.pyx":446
+  /* "pysam/cvcf.pyx":447
  *         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
  * 
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_PHASED_GENOTYPES); 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_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_4) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_6 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = PyInt_FromSsize_t(((__pyx_t_6 + 1) * (__pyx_t_5 + 1))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyInt_FromSsize_t(((__pyx_t_6 + 1) * (__pyx_t_5 + 1))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_r = __pyx_t_1;
     __pyx_t_1 = 0;
     goto __pyx_L0;
-    goto __pyx_L8;
   }
-  __pyx_L8:;
 
-  /* "pysam/cvcf.pyx":447
+  /* "pysam/cvcf.pyx":448
  *         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             # <<<<<<<<<<<<<<
@@ -8969,8 +9128,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject
   __pyx_r = __pyx_int_0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":440
+ *         return format
+ * 
+ *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
+ *         fmt = formatdict[format]
+ *         if fmt.numbertype == self.NT_UNKNOWN: return -1
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -8984,6 +9150,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":451
+ * 
+ * 
+ *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
+ *         if key in formatdict: return
+ *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_11_add_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_11_add_definition = {__Pyx_NAMESTR("_add_definition"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_11_add_definition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -8993,11 +9167,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_11_add_definition(PyObject *__pyx_se
   PyObject *__pyx_v_key = 0;
   PyObject *__pyx_v_data = 0;
   PyObject *__pyx_v_line = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_add_definition (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__formatdict,&__pyx_n_s__key,&__pyx_n_s__data,&__pyx_n_s__line,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_formatdict,&__pyx_n_s_key,&__pyx_n_s_data,&__pyx_n_s_line,0};
     PyObject* values[5] = {0,0,0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -9014,31 +9191,31 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_11_add_definition(PyObject *__pyx_se
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__formatdict)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_formatdict)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
-        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  4:
-        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_add_definition") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_add_definition") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
       goto __pyx_L5_argtuple_error;
@@ -9057,133 +9234,127 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_11_add_definition(PyObject *__pyx_se
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF._add_definition", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_10_add_definition(__pyx_self, __pyx_v_self, __pyx_v_formatdict, __pyx_v_key, __pyx_v_data, __pyx_v_line);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":450
- * 
- * 
- *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
- *         if key in formatdict: return
- *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_key, PyObject *__pyx_v_data, PyObject *__pyx_v_line) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_add_definition", 0);
   __Pyx_INCREF(__pyx_v_data);
 
-  /* "pysam/cvcf.pyx":451
+  /* "pysam/cvcf.pyx":452
  * 
  *     def _add_definition(self, formatdict, key, data, line ):
  *         if key in formatdict: return             # <<<<<<<<<<<<<<
  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
  *         if data == None:
  */
-  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_formatdict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_formatdict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":452
+  /* "pysam/cvcf.pyx":453
  *     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)",".")
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_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 = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __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 = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_UNKNOWN_KEY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__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_3);
-  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
   __Pyx_INCREF(__pyx_v_key);
-  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_key);
+  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_key);
   __Pyx_GIVEREF(__pyx_v_key);
-  __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+  __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __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(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "pysam/cvcf.pyx":453
+  /* "pysam/cvcf.pyx":454
  *         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
  */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_data, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_1) {
+  __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (__pyx_t_2) {
 
-    /* "pysam/cvcf.pyx":454
+    /* "pysam/cvcf.pyx":455
  *         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
  */
-    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); 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_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __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 = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_v_key);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
     __Pyx_INCREF(__pyx_int_0);
-    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0);
+    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0);
     __Pyx_GIVEREF(__pyx_int_0);
-    __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_60));
-    PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_60));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
-    __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, ((PyObject *)__pyx_t_2), NULL); 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_3); __pyx_t_3 = 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 = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_n_s_Flag);
+    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_Flag);
+    __Pyx_GIVEREF(__pyx_n_s_Flag);
+    __Pyx_INCREF(__pyx_kp_s_Undefined_tag);
+    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_s_Undefined_tag);
+    __Pyx_GIVEREF(__pyx_kp_s_Undefined_tag);
+    __Pyx_INCREF(__pyx_kp_s__8);
+    PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_kp_s__8);
+    __Pyx_GIVEREF(__pyx_kp_s__8);
+    __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (unlikely(PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":455
+    /* "pysam/cvcf.pyx":456
  *         if data == None:
  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")
  *             return             # <<<<<<<<<<<<<<
@@ -9193,93 +9364,87 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyOb
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
-    goto __pyx_L4;
   }
-  __pyx_L4:;
 
-  /* "pysam/cvcf.pyx":456
+  /* "pysam/cvcf.pyx":457
  *             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)
  */
-  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, ((PyObject *)__pyx_t_4), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_1) {
-    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-    PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_1));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-    __Pyx_DECREF(__pyx_v_data);
-    __pyx_v_data = ((PyObject *)__pyx_t_2);
-    __pyx_t_2 = 0;
+  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_data, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_2) {
+    __pyx_t_3 = PyList_New(1); 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_INCREF(__pyx_kp_s_);
+    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_);
+    __Pyx_GIVEREF(__pyx_kp_s_);
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3);
+    __pyx_t_3 = 0;
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "pysam/cvcf.pyx":457
+  /* "pysam/cvcf.pyx":458
  *             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
  */
-  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_data, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_4 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_2)), ((PyObject *)Py_TYPE(__pyx_t_4)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_3)), ((PyObject *)Py_TYPE(__pyx_float_0_0)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_1) {
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (__pyx_t_2) {
 
-    /* "pysam/cvcf.pyx":458
+    /* "pysam/cvcf.pyx":459
  *         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):
  */
-    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_v_key);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_int_neg_1);
-    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_neg_1);
+    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_neg_1);
     __Pyx_GIVEREF(__pyx_int_neg_1);
-    __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_60));
-    PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_60));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
+    __Pyx_INCREF(__pyx_n_s_Float);
+    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_Float);
+    __Pyx_GIVEREF(__pyx_n_s_Float);
+    __Pyx_INCREF(__pyx_kp_s_Undefined_tag);
+    PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_s_Undefined_tag);
+    __Pyx_GIVEREF(__pyx_kp_s_Undefined_tag);
     __Pyx_INCREF(Py_None);
-    PyTuple_SET_ITEM(__pyx_t_2, 5, Py_None);
+    PyTuple_SET_ITEM(__pyx_t_4, 5, Py_None);
     __Pyx_GIVEREF(Py_None);
-    __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 = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_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 = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __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;
+    if (unlikely(PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "pysam/cvcf.pyx":459
+    /* "pysam/cvcf.pyx":460
  *         if type(data[0]) == type(0.0):
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)
  *             return             # <<<<<<<<<<<<<<
@@ -9289,64 +9454,62 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyOb
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
-    goto __pyx_L6;
   }
-  __pyx_L6:;
 
-  /* "pysam/cvcf.pyx":460
+  /* "pysam/cvcf.pyx":461
  *             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
  */
-  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_4)), ((PyObject *)Py_TYPE(__pyx_int_0)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_3)), ((PyObject *)Py_TYPE(__pyx_int_0)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_1) {
+  if (__pyx_t_2) {
 
-    /* "pysam/cvcf.pyx":461
+    /* "pysam/cvcf.pyx":462
  *             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)",".")
  */
-    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); 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_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = PyTuple_New(6); 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_INCREF(__pyx_v_key);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_int_neg_1);
-    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_neg_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_neg_1);
     __Pyx_GIVEREF(__pyx_int_neg_1);
-    __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_60));
-    PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_kp_s_60));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
+    __Pyx_INCREF(__pyx_n_s_Integer);
+    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_n_s_Integer);
+    __Pyx_GIVEREF(__pyx_n_s_Integer);
+    __Pyx_INCREF(__pyx_kp_s_Undefined_tag);
+    PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_s_Undefined_tag);
+    __Pyx_GIVEREF(__pyx_kp_s_Undefined_tag);
     __Pyx_INCREF(Py_None);
-    PyTuple_SET_ITEM(__pyx_t_3, 5, Py_None);
+    PyTuple_SET_ITEM(__pyx_t_5, 5, Py_None);
     __Pyx_GIVEREF(Py_None);
-    __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 = 461; __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_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 = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __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_5); __pyx_t_5 = 0;
+    if (unlikely(PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "pysam/cvcf.pyx":462
+    /* "pysam/cvcf.pyx":463
  *         if type(data[0]) == type(0):
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
  *             return             # <<<<<<<<<<<<<<
@@ -9356,54 +9519,61 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyOb
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
-    goto __pyx_L7;
   }
-  __pyx_L7:;
 
-  /* "pysam/cvcf.pyx":463
+  /* "pysam/cvcf.pyx":464
  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
  *             return
  *         formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".")             # <<<<<<<<<<<<<<
  * 
  * 
  */
-  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __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 = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __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 = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_INCREF(__pyx_v_key);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key);
   __Pyx_GIVEREF(__pyx_v_key);
-  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
   __Pyx_INCREF(__pyx_int_neg_1);
-  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
-  __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_60));
-  PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_60));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
-  __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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __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_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 = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_n_s_String);
+  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_String);
+  __Pyx_GIVEREF(__pyx_n_s_String);
+  __Pyx_INCREF(__pyx_kp_s_Undefined_tag);
+  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_s_Undefined_tag);
+  __Pyx_GIVEREF(__pyx_kp_s_Undefined_tag);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
+  __pyx_t_5 = 0;
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (unlikely(PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "pysam/cvcf.pyx":451
+ * 
+ * 
+ *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
+ *         if key in formatdict: return
+ *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
   __Pyx_AddTraceback("pysam.cvcf.VCF._add_definition", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -9413,7 +9583,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyOb
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":467
+/* "pysam/cvcf.pyx":468
  * 
  *     # todo: trim trailing missing values
  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):             # <<<<<<<<<<<<<<
@@ -9421,42 +9591,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyOb
  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
  */
 
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_91__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__defaults__", 0);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_key);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_key);
-  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_key);
-  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_value);
-  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_value);
-  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_value);
-  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_kp_s_4)));
-  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_kp_s_4)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_kp_s_4)));
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_13format_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_13format_formatdata = {__Pyx_NAMESTR("format_formatdata"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_13format_formatdata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -9467,16 +9601,18 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_13format_formatdata(PyObject *__pyx_
   PyObject *__pyx_v_key = 0;
   PyObject *__pyx_v_value = 0;
   PyObject *__pyx_v_separator = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("format_formatdata (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__data,&__pyx_n_s__format,&__pyx_n_s__key,&__pyx_n_s__value,&__pyx_n_s__separator,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,&__pyx_n_s_format,&__pyx_n_s_key,&__pyx_n_s_value,&__pyx_n_s_separator,0};
     PyObject* values[6] = {0,0,0,0,0,0};
-    __pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self);
-    values[3] = __pyx_dynamic_args->__pyx_arg_key;
-    values[4] = __pyx_dynamic_args->__pyx_arg_value;
-    values[5] = ((PyObject *)((PyObject*)__pyx_kp_s_4));
+    values[3] = ((PyObject *)((PyObject *)Py_True));
+    values[4] = ((PyObject *)((PyObject *)Py_True));
+    values[5] = ((PyObject *)((PyObject*)__pyx_kp_s__4));
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -9493,36 +9629,36 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_13format_formatdata(PyObject *__pyx_
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key);
           if (value) { values[3] = value; kw_args--; }
         }
         case  4:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value);
           if (value) { values[4] = value; kw_args--; }
         }
         case  5:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__separator);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_separator);
           if (value) { values[5] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "format_formatdata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "format_formatdata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -9545,13 +9681,15 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_13format_formatdata(PyObject *__pyx_
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.format_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_format, __pyx_v_key, __pyx_v_value, __pyx_v_separator);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
@@ -9577,8 +9715,8 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
   PyObject *(*__pyx_t_9)(PyObject *);
   PyObject *__pyx_t_10 = NULL;
   int __pyx_t_11;
-  PyObject *(*__pyx_t_12)(PyObject *);
-  int __pyx_t_13;
+  int __pyx_t_12;
+  PyObject *(*__pyx_t_13)(PyObject *);
   int __pyx_t_14;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
@@ -9586,50 +9724,50 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
   __Pyx_RefNannySetupContext("format_formatdata", 0);
   __Pyx_INCREF(__pyx_v_data);
 
-  /* "pysam/cvcf.pyx":468
+  /* "pysam/cvcf.pyx":469
  *     # 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 = {}
  */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __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 = 469; __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 = 468; __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 = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_v_output = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
   __pyx_v_sdata = ((PyObject*)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":469
+  /* "pysam/cvcf.pyx":470
  *     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] = []
  */
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __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 = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_data)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_t_2))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__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 = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_data)), ((PyObject *)Py_TYPE(__pyx_t_2)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_3) {
 
-    /* "pysam/cvcf.pyx":470
+    /* "pysam/cvcf.pyx":471
  *         output, sdata = [], []
  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
  *             d = {}             # <<<<<<<<<<<<<<
  *             for k in data: d[k] = []
  *             data = d
  */
-    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __pyx_v_d = ((PyObject*)__pyx_t_1);
     __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":471
+    /* "pysam/cvcf.pyx":472
  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
  *             d = {}
  *             for k in data: d[k] = []             # <<<<<<<<<<<<<<
@@ -9640,7 +9778,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
       __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
       __pyx_t_5 = NULL;
     } else {
-      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
       __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
     }
@@ -9648,53 +9786,52 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
       if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
         __pyx_t_2 = __pyx_t_5(__pyx_t_1);
         if (unlikely(!__pyx_t_2)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
         __Pyx_GOTREF(__pyx_t_2);
       }
-      __Pyx_XDECREF(__pyx_v_k);
-      __pyx_v_k = __pyx_t_2;
+      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
       __pyx_t_2 = 0;
-      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __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 = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_d), __pyx_v_k, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_k, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __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;
 
-    /* "pysam/cvcf.pyx":472
+    /* "pysam/cvcf.pyx":473
  *             d = {}
  *             for k in data: d[k] = []
  *             data = d             # <<<<<<<<<<<<<<
  *         # convert missing values; and silently add definitions if required
  *         for k in data:
  */
-    __Pyx_INCREF(((PyObject *)__pyx_v_d));
-    __Pyx_DECREF(__pyx_v_data);
-    __pyx_v_data = ((PyObject *)__pyx_v_d);
+    __Pyx_INCREF(__pyx_v_d);
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_v_d);
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":474
+  /* "pysam/cvcf.pyx":475
  *             data = d
  *         # convert missing values; and silently add definitions if required
  *         for k in data:             # <<<<<<<<<<<<<<
@@ -9705,7 +9842,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
     __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
   }
@@ -9713,44 +9850,44 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_2 = __pyx_t_5(__pyx_t_1);
       if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_2);
     }
-    __Pyx_XDECREF(__pyx_v_k);
-    __pyx_v_k = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
     __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":475
+    /* "pysam/cvcf.pyx":476
  *         # 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] = "."
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___add_definition); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_definition); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_6 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
     __Pyx_INCREF(__pyx_v_format);
     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_format);
@@ -9760,17 +9897,17 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
     __Pyx_GIVEREF(__pyx_v_k);
     PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
     __Pyx_GIVEREF(__pyx_t_6);
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_61));
-    PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_kp_s_61));
-    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_61));
+    __Pyx_INCREF(__pyx_kp_s_output);
+    PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_kp_s_output);
+    __Pyx_GIVEREF(__pyx_kp_s_output);
     __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-    /* "pysam/cvcf.pyx":476
+    /* "pysam/cvcf.pyx":477
  *         for k in data:
  *             self._add_definition( format, k, data[k], "(output)" )
  *             for idx,v in enumerate(data[k]):             # <<<<<<<<<<<<<<
@@ -9779,13 +9916,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
  */
     __Pyx_INCREF(__pyx_int_0);
     __pyx_t_6 = __pyx_int_0;
-    __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __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_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
       __pyx_t_9 = NULL;
     } else {
-      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext;
     }
@@ -9794,60 +9931,59 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
       if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_2)) {
         if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_2)) {
         if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
         __pyx_t_7 = __pyx_t_9(__pyx_t_2);
         if (unlikely(!__pyx_t_7)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
         __Pyx_GOTREF(__pyx_t_7);
       }
-      __Pyx_XDECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_7;
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
       __pyx_t_7 = 0;
       __Pyx_INCREF(__pyx_t_6);
-      __Pyx_XDECREF(__pyx_v_idx);
-      __pyx_v_idx = __pyx_t_6;
-      __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_6);
+      __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_6);
       __pyx_t_6 = __pyx_t_7;
       __pyx_t_7 = 0;
 
-      /* "pysam/cvcf.pyx":477
+      /* "pysam/cvcf.pyx":478
  *             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:
  */
-      __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_k); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_k); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_10 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_missingvalue); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       if (__pyx_t_3) {
-        __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_7);
-        if (PyObject_SetItem(__pyx_t_7, __pyx_v_idx, ((PyObject *)__pyx_kp_s_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_idx, __pyx_kp_s__8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
         goto __pyx_L10;
       }
@@ -9858,7 +9994,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":479
+  /* "pysam/cvcf.pyx":480
  *                 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:             # <<<<<<<<<<<<<<
@@ -9869,7 +10005,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
     __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); 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);
     __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
   }
@@ -9877,46 +10013,44 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_6 = __pyx_t_5(__pyx_t_1);
       if (unlikely(!__pyx_t_6)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_6);
     }
-    __Pyx_XDECREF(__pyx_v_k);
-    __pyx_v_k = __pyx_t_6;
+    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
     __pyx_t_6 = 0;
 
-    /* "pysam/cvcf.pyx":480
+    /* "pysam/cvcf.pyx":481
  *         # 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:
  */
-    __pyx_t_6 = PyObject_RichCompare(__pyx_v_k, ((PyObject *)__pyx_n_s__GT), Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_k, __pyx_n_s_GT, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     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 = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_k);
       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k);
@@ -9924,45 +10058,46 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
       PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
       __Pyx_GIVEREF(__pyx_t_6);
       __pyx_t_6 = 0;
-      __pyx_t_11 = PyList_Append(__pyx_v_sdata, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sdata, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       goto __pyx_L13;
     }
     __pyx_L13:;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":481
+  /* "pysam/cvcf.pyx":482
  *         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
  */
-  __pyx_t_11 = PyList_Sort(((PyObject *)__pyx_v_sdata)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = PyList_Sort(__pyx_v_sdata); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":482
+  /* "pysam/cvcf.pyx":483
  *             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:
  */
-  __pyx_t_3 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__GT), __pyx_v_data, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_3) {
+  __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_n_s_GT, __pyx_v_data, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = (__pyx_t_3 != 0);
+  if (__pyx_t_12) {
 
-    /* "pysam/cvcf.pyx":483
+    /* "pysam/cvcf.pyx":484
  *         sdata.sort()
  *         if 'GT' in data:
  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata             # <<<<<<<<<<<<<<
  *         for k,v in sdata:
  *             if v == []: v = None
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__convertGTback); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_convertGTback); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__GT)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_GT); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
@@ -9970,46 +10105,45 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
     __Pyx_GIVEREF(__pyx_t_2);
     __pyx_t_1 = 0;
     __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_INCREF(((PyObject *)__pyx_n_s__GT));
-    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__GT));
-    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GT));
+    __Pyx_INCREF(__pyx_n_s_GT);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_GT);
+    __Pyx_GIVEREF(__pyx_n_s_GT);
     PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
     __Pyx_GIVEREF(__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 = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
+    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
     __pyx_t_6 = 0;
-    __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_sdata)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_v_sdata));
-    __pyx_v_sdata = ((PyObject*)__pyx_t_6);
+    __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_v_sdata); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF_SET(__pyx_v_sdata, ((PyObject*)__pyx_t_6));
     __pyx_t_6 = 0;
     goto __pyx_L14;
   }
   __pyx_L14:;
 
-  /* "pysam/cvcf.pyx":484
+  /* "pysam/cvcf.pyx":485
  *         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:
  */
-  __pyx_t_6 = ((PyObject *)__pyx_v_sdata); __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
+  __pyx_t_6 = __pyx_v_sdata; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
   for (;;) {
     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
     #if CYTHON_COMPILING_IN_CPYTHON
-    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     #else
-    __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     #endif
     if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
       PyObject* sequence = __pyx_t_2;
@@ -10021,7 +10155,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
       if (unlikely(size != 2)) {
         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       #if CYTHON_COMPILING_IN_CPYTHON
       if (likely(PyTuple_CheckExact(sequence))) {
@@ -10034,206 +10168,186 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
       __Pyx_INCREF(__pyx_t_1);
       __Pyx_INCREF(__pyx_t_7);
       #else
-      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       #endif
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    } else
-    {
+    } else {
       Py_ssize_t index = -1;
-      __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext;
-      index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L17_unpacking_failed;
+      __pyx_t_13 = Py_TYPE(__pyx_t_10)->tp_iternext;
+      index = 0; __pyx_t_1 = __pyx_t_13(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L17_unpacking_failed;
       __Pyx_GOTREF(__pyx_t_1);
-      index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed;
+      index = 1; __pyx_t_7 = __pyx_t_13(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed;
       __Pyx_GOTREF(__pyx_t_7);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_12 = NULL;
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_13 = NULL;
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       goto __pyx_L18_unpacking_done;
       __pyx_L17_unpacking_failed:;
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __pyx_t_12 = NULL;
+      __pyx_t_13 = NULL;
       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_L18_unpacking_done:;
     }
-    __Pyx_XDECREF(__pyx_v_k);
-    __pyx_v_k = __pyx_t_1;
+    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1);
     __pyx_t_1 = 0;
-    __Pyx_XDECREF(__pyx_v_v);
-    __pyx_v_v = __pyx_t_7;
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
     __pyx_t_7 = 0;
 
-    /* "pysam/cvcf.pyx":485
+    /* "pysam/cvcf.pyx":486
  *             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)) )
  */
-    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __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 = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_t_2), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__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 = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    if (__pyx_t_3) {
+    if (__pyx_t_12) {
       __Pyx_INCREF(Py_None);
-      __Pyx_DECREF(__pyx_v_v);
-      __pyx_v_v = Py_None;
+      __Pyx_DECREF_SET(__pyx_v_v, Py_None);
       goto __pyx_L19;
     }
     __pyx_L19:;
 
-    /* "pysam/cvcf.pyx":486
+    /* "pysam/cvcf.pyx":487
  *         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 )
  */
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_3) {
-      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_14 = __pyx_t_13;
-    } else {
+    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_12) {
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_t_14 = __pyx_t_3;
+    } else {
+      __pyx_t_14 = __pyx_t_12;
     }
     if (__pyx_t_14) {
 
-      /* "pysam/cvcf.pyx":487
+      /* "pysam/cvcf.pyx":488
  *             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)
  */
-      __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       if (__pyx_t_14) {
-        __pyx_t_7 = PyNumber_Add(__pyx_v_k, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyNumber_Add(__pyx_v_k, __pyx_kp_s__13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_7);
-        __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 = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __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 = 487; __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))));
+        PyTuple_SET_ITEM(__pyx_t_2, 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);
+        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_v);
         __Pyx_GIVEREF(__pyx_v_v);
-        __pyx_t_10 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __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 = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
-        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
-        __Pyx_GIVEREF(__pyx_t_10);
-        __pyx_t_10 = 0;
-        __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 = 487; __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_1)); __pyx_t_1 = 0;
-        __pyx_t_1 = PyNumber_Add(__pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __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_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __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_10); __pyx_t_10 = 0;
-        __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_output, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         goto __pyx_L21;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":488
+        /* "pysam/cvcf.pyx":489
  *             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:
  */
-        __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       __pyx_L21:;
       goto __pyx_L20;
     }
 
-    /* "pysam/cvcf.pyx":489
+    /* "pysam/cvcf.pyx":490
  *                 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)) )
  */
-    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_14) {
-      __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L20;
     }
 
-    /* "pysam/cvcf.pyx":490
+    /* "pysam/cvcf.pyx":491
  *                 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
  */
-    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_14) {
 
-      /* "pysam/cvcf.pyx":491
+      /* "pysam/cvcf.pyx":492
  *             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
  */
-      __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       if (__pyx_t_14) {
-        __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 = 491; __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 = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
         __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-        PyTuple_SET_ITEM(__pyx_t_10, 0, ((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_10, 1, __pyx_v_v);
+        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_v);
         __Pyx_GIVEREF(__pyx_v_v);
-        __pyx_t_7 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(((PyObject *)__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 = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, 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 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_2); 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_2); __pyx_t_2 = 0;
+        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_output, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-        __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_t_7); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
         goto __pyx_L22;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":492
+        /* "pysam/cvcf.pyx":493
  *             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:
  */
-        __pyx_t_11 = PyList_Append(__pyx_v_output, ((PyObject *)__pyx_kp_s_9)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_output, __pyx_kp_s__8); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       __pyx_L22:;
       goto __pyx_L20;
@@ -10242,7 +10356,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
   }
   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-  /* "pysam/cvcf.pyx":494
+  /* "pysam/cvcf.pyx":495
  *                 else: output.append( "." )                    # should not happen
  *         # snip off trailing missing data
  *         while len(output) > 1:             # <<<<<<<<<<<<<<
@@ -10250,74 +10364,62 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
  *             if len(last)>0: break
  */
   while (1) {
-    if (unlikely(((PyObject *)__pyx_v_output) == Py_None)) {
-      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __pyx_t_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_output)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_14 = (__pyx_t_4 > 1);
+    __pyx_t_4 = PyList_GET_SIZE(__pyx_v_output); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_14 = ((__pyx_t_4 > 1) != 0);
     if (!__pyx_t_14) break;
 
-    /* "pysam/cvcf.pyx":495
+    /* "pysam/cvcf.pyx":496
  *         # snip off trailing missing data
  *         while len(output) > 1:
  *             last = output[-1].replace(',','').replace('.','')             # <<<<<<<<<<<<<<
  *             if len(last)>0: break
  *             output = output[:-1]
  */
-    if (unlikely(((PyObject *)__pyx_v_output) == Py_None)) {
-      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_output), -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_output, -1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_62), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_XDECREF(__pyx_v_last);
-    __pyx_v_last = __pyx_t_6;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_last, __pyx_t_6);
     __pyx_t_6 = 0;
 
-    /* "pysam/cvcf.pyx":496
+    /* "pysam/cvcf.pyx":497
  *         while len(output) > 1:
  *             last = output[-1].replace(',','').replace('.','')
  *             if len(last)>0: break             # <<<<<<<<<<<<<<
  *             output = output[:-1]
  *         return separator.join(output)
  */
-    __pyx_t_4 = PyObject_Length(__pyx_v_last); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_14 = (__pyx_t_4 > 0);
+    __pyx_t_4 = PyObject_Length(__pyx_v_last); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_14 = ((__pyx_t_4 > 0) != 0);
     if (__pyx_t_14) {
       goto __pyx_L24_break;
-      goto __pyx_L25;
     }
-    __pyx_L25:;
 
-    /* "pysam/cvcf.pyx":497
+    /* "pysam/cvcf.pyx":498
  *             last = output[-1].replace(',','').replace('.','')
  *             if len(last)>0: break
  *             output = output[:-1]             # <<<<<<<<<<<<<<
  *         return separator.join(output)
  * 
  */
-    __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_output), 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
-    __Pyx_DECREF(((PyObject *)__pyx_v_output));
-    __pyx_v_output = ((PyObject*)__pyx_t_6);
+    __pyx_t_6 = __Pyx_PyList_GetSlice(__pyx_v_output, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF_SET(__pyx_v_output, ((PyObject*)__pyx_t_6));
     __pyx_t_6 = 0;
   }
   __pyx_L24_break:;
 
-  /* "pysam/cvcf.pyx":498
+  /* "pysam/cvcf.pyx":499
  *             if len(last)>0: break
  *             output = output[:-1]
  *         return separator.join(output)             # <<<<<<<<<<<<<<
@@ -10325,23 +10427,30 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
  * 
  */
   __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 = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_separator, __pyx_n_s_join); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __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 = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_INCREF(((PyObject *)__pyx_v_output));
-  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_output));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
-  __pyx_t_10 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_t_1 = PyTuple_New(1); 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_INCREF(__pyx_v_output);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_output);
+  __Pyx_GIVEREF(__pyx_v_output);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-  __pyx_r = __pyx_t_10;
-  __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":468
+ * 
+ *     # 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
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -10364,6 +10473,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED Py
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":502
+ * 
+ * 
+ *     def enter_default_format(self):             # <<<<<<<<<<<<<<
+ *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
+ *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_15enter_default_format(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_15enter_default_format = {__Pyx_NAMESTR("enter_default_format"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_15enter_default_format, METH_O, __Pyx_DOCSTR(0)};
@@ -10372,18 +10489,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_15enter_default_format(PyObject *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("enter_default_format (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_14enter_default_format(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":501
- * 
- * 
- *     def enter_default_format(self):             # <<<<<<<<<<<<<<
- *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
- *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_14enter_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_v_f = NULL;
   PyObject *__pyx_r = NULL;
@@ -10406,515 +10517,524 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_14enter_default_format(CYTHON_UNUSED
   PyObject *__pyx_t_16 = NULL;
   Py_ssize_t __pyx_t_17;
   int __pyx_t_18;
+  int __pyx_t_19;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("enter_default_format", 0);
 
-  /* "pysam/cvcf.pyx":502
+  /* "pysam/cvcf.pyx":503
  * 
  *     def enter_default_format(self):
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),             # <<<<<<<<<<<<<<
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); 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_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); 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 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(6); 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_INCREF(((PyObject *)__pyx_n_s__GT));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__GT));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GT));
+  __Pyx_INCREF(__pyx_n_s_GT);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_GT);
+  __Pyx_GIVEREF(__pyx_n_s_GT);
   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__String));
-  PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__String));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Genotype));
-  PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_n_s__Genotype));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Genotype));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-  PyTuple_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_kp_s_9));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_INCREF(__pyx_n_s_String);
+  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_String);
+  __Pyx_GIVEREF(__pyx_n_s_String);
+  __Pyx_INCREF(__pyx_n_s_Genotype);
+  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_Genotype);
+  __Pyx_GIVEREF(__pyx_n_s_Genotype);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":503
+  /* "pysam/cvcf.pyx":504
  *     def enter_default_format(self):
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),             # <<<<<<<<<<<<<<
  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
  */
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); 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_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyTuple_New(6); 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_INCREF(((PyObject *)__pyx_n_s__DP));
-  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__DP));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DP));
+  __Pyx_INCREF(__pyx_n_s_DP);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_DP);
+  __Pyx_GIVEREF(__pyx_n_s_DP);
   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_64));
-  PyTuple_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_kp_s_64));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_64));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_Read_depth_at_this_position_for);
+  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_s_Read_depth_at_this_position_for);
+  __Pyx_GIVEREF(__pyx_kp_s_Read_depth_at_this_position_for);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "pysam/cvcf.pyx":504
+  /* "pysam/cvcf.pyx":505
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),             # <<<<<<<<<<<<<<
  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
  */
-  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_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_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); 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_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__FT));
-  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__FT));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FT));
+  __Pyx_INCREF(__pyx_n_s_FT);
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_FT);
+  __Pyx_GIVEREF(__pyx_n_s_FT);
   PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__String));
-  PyTuple_SET_ITEM(__pyx_t_5, 3, ((PyObject *)__pyx_n_s__String));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_65));
-  PyTuple_SET_ITEM(__pyx_t_5, 4, ((PyObject *)__pyx_kp_s_65));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_65));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-  PyTuple_SET_ITEM(__pyx_t_5, 5, ((PyObject *)__pyx_kp_s_9));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_INCREF(__pyx_n_s_String);
+  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_n_s_String);
+  __Pyx_GIVEREF(__pyx_n_s_String);
+  __Pyx_INCREF(__pyx_kp_s_Sample_Genotype_Filter);
+  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_s_Sample_Genotype_Filter);
+  __Pyx_GIVEREF(__pyx_kp_s_Sample_Genotype_Filter);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, 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_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":505
+  /* "pysam/cvcf.pyx":506
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),             # <<<<<<<<<<<<<<
  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
  */
-  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __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 = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __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 = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__GL));
-  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__GL));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GL));
+  __Pyx_INCREF(__pyx_n_s_GL);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_GL);
+  __Pyx_GIVEREF(__pyx_n_s_GL);
   PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
   __Pyx_GIVEREF(__pyx_t_4);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Float));
-  PyTuple_SET_ITEM(__pyx_t_6, 3, ((PyObject *)__pyx_n_s__Float));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_66));
-  PyTuple_SET_ITEM(__pyx_t_6, 4, ((PyObject *)__pyx_kp_s_66));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-  PyTuple_SET_ITEM(__pyx_t_6, 5, ((PyObject *)__pyx_kp_s_9));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_INCREF(__pyx_n_s_Float);
+  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_Float);
+  __Pyx_GIVEREF(__pyx_n_s_Float);
+  __Pyx_INCREF(__pyx_kp_s_Genotype_likelihoods);
+  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_s_Genotype_likelihoods);
+  __Pyx_GIVEREF(__pyx_kp_s_Genotype_likelihoods);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
   __pyx_t_4 = 0;
-  __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 = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-  /* "pysam/cvcf.pyx":506
+  /* "pysam/cvcf.pyx":507
  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),             # <<<<<<<<<<<<<<
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),
  */
-  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
-  __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 = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); 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_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__GLE));
-  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__GLE));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GLE));
+  __Pyx_INCREF(__pyx_n_s_GLE);
+  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_GLE);
+  __Pyx_GIVEREF(__pyx_n_s_GLE);
   PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
   __Pyx_GIVEREF(__pyx_t_5);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Float));
-  PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_n_s__Float));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_66));
-  PyTuple_SET_ITEM(__pyx_t_7, 4, ((PyObject *)__pyx_kp_s_66));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-  PyTuple_SET_ITEM(__pyx_t_7, 5, ((PyObject *)__pyx_kp_s_9));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_INCREF(__pyx_n_s_Float);
+  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_Float);
+  __Pyx_GIVEREF(__pyx_n_s_Float);
+  __Pyx_INCREF(__pyx_kp_s_Genotype_likelihoods);
+  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_kp_s_Genotype_likelihoods);
+  __Pyx_GIVEREF(__pyx_kp_s_Genotype_likelihoods);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
   __pyx_t_5 = 0;
-  __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 = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); 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_6); __pyx_t_6 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "pysam/cvcf.pyx":507
+  /* "pysam/cvcf.pyx":508
  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),             # <<<<<<<<<<<<<<
  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),
  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),
  */
-  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_8);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__GQ));
-  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_n_s__GQ));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GQ));
+  __Pyx_INCREF(__pyx_n_s_GQ);
+  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_GQ);
+  __Pyx_GIVEREF(__pyx_n_s_GQ);
   PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
   __Pyx_GIVEREF(__pyx_t_6);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_8, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_67));
-  PyTuple_SET_ITEM(__pyx_t_8, 4, ((PyObject *)__pyx_kp_s_67));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_67));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_Genotype_Quality);
+  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_s_Genotype_Quality);
+  __Pyx_GIVEREF(__pyx_kp_s_Genotype_Quality);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_6 = 0;
-  __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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __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_8)); __pyx_t_8 = 0;
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-  /* "pysam/cvcf.pyx":508
+  /* "pysam/cvcf.pyx":509
  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),             # <<<<<<<<<<<<<<
  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),
  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),
  */
-  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__PL));
-  PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_n_s__PL));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PL));
+  __Pyx_INCREF(__pyx_n_s_PL);
+  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_PL);
+  __Pyx_GIVEREF(__pyx_n_s_PL);
   PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
   __Pyx_GIVEREF(__pyx_t_7);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_9, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_68));
-  PyTuple_SET_ITEM(__pyx_t_9, 4, ((PyObject *)__pyx_kp_s_68));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_68));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-  PyTuple_SET_ITEM(__pyx_t_9, 5, ((PyObject *)__pyx_kp_s_9));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_Phred_scaled_genotype_likelihood);
+  PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_kp_s_Phred_scaled_genotype_likelihood);
+  __Pyx_GIVEREF(__pyx_kp_s_Phred_scaled_genotype_likelihood);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
   __pyx_t_7 = 0;
-  __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-  /* "pysam/cvcf.pyx":509
+  /* "pysam/cvcf.pyx":510
  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),
  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),             # <<<<<<<<<<<<<<
  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),
  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
  */
-  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__GP));
-  PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_n_s__GP));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GP));
+  __Pyx_INCREF(__pyx_n_s_GP);
+  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_n_s_GP);
+  __Pyx_GIVEREF(__pyx_n_s_GP);
   PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
   __Pyx_GIVEREF(__pyx_t_8);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Float));
-  PyTuple_SET_ITEM(__pyx_t_10, 3, ((PyObject *)__pyx_n_s__Float));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_69));
-  PyTuple_SET_ITEM(__pyx_t_10, 4, ((PyObject *)__pyx_kp_s_69));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_69));
-  __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_INCREF(__pyx_n_s_Float);
+  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_n_s_Float);
+  __Pyx_GIVEREF(__pyx_n_s_Float);
+  __Pyx_INCREF(__pyx_kp_s_Genotype_posterior_probabilities);
+  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_kp_s_Genotype_posterior_probabilities);
+  __Pyx_GIVEREF(__pyx_kp_s_Genotype_posterior_probabilities);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
   __pyx_t_8 = 0;
-  __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_8);
   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-  /* "pysam/cvcf.pyx":510
+  /* "pysam/cvcf.pyx":511
  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),
  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),
  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),             # <<<<<<<<<<<<<<
  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),
  */
-  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__GQ));
-  PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_n_s__GQ));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GQ));
+  __Pyx_INCREF(__pyx_n_s_GQ);
+  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_GQ);
+  __Pyx_GIVEREF(__pyx_n_s_GQ);
   PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9);
   __Pyx_GIVEREF(__pyx_t_9);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_11, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_70));
-  PyTuple_SET_ITEM(__pyx_t_11, 4, ((PyObject *)__pyx_kp_s_70));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_70));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-  PyTuple_SET_ITEM(__pyx_t_11, 5, ((PyObject *)__pyx_kp_s_9));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_Conditional_genotype_quality);
+  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_kp_s_Conditional_genotype_quality);
+  __Pyx_GIVEREF(__pyx_kp_s_Conditional_genotype_quality);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
   __pyx_t_9 = 0;
-  __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __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_11)); __pyx_t_11 = 0;
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
-  /* "pysam/cvcf.pyx":511
+  /* "pysam/cvcf.pyx":512
  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),
  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),
  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid             # <<<<<<<<<<<<<<
  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),
  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),
  */
-  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
-  __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_12 = PyTuple_New(6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = PyTuple_New(6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__HQ));
-  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_n_s__HQ));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HQ));
+  __Pyx_INCREF(__pyx_n_s_HQ);
+  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_n_s_HQ);
+  __Pyx_GIVEREF(__pyx_n_s_HQ);
   PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
   __Pyx_GIVEREF(__pyx_t_10);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_12, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_71));
-  PyTuple_SET_ITEM(__pyx_t_12, 4, ((PyObject *)__pyx_kp_s_71));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_71));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_Haplotype_Quality);
+  PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_kp_s_Haplotype_Quality);
+  __Pyx_GIVEREF(__pyx_kp_s_Haplotype_Quality);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_12, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_10 = 0;
-  __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-  /* "pysam/cvcf.pyx":512
+  /* "pysam/cvcf.pyx":513
  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),
  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),             # <<<<<<<<<<<<<<
  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),
  *                   FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1),
  */
-  __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
-  __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
-  __pyx_t_13 = PyTuple_New(6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_13 = PyTuple_New(6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_13);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__PS));
-  PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_n_s__PS));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PS));
+  __Pyx_INCREF(__pyx_n_s_PS);
+  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_PS);
+  __Pyx_GIVEREF(__pyx_n_s_PS);
   PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11);
   __Pyx_GIVEREF(__pyx_t_11);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_13, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_72));
-  PyTuple_SET_ITEM(__pyx_t_13, 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_13, 5, ((PyObject *)__pyx_kp_s_9));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_Phase_set);
+  PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_kp_s_Phase_set);
+  __Pyx_GIVEREF(__pyx_kp_s_Phase_set);
+  __Pyx_INCREF(__pyx_kp_s__8);
+  PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_kp_s__8);
+  __Pyx_GIVEREF(__pyx_kp_s__8);
   __pyx_t_11 = 0;
-  __pyx_t_11 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
   __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
-  /* "pysam/cvcf.pyx":513
+  /* "pysam/cvcf.pyx":514
  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),
  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),             # <<<<<<<<<<<<<<
  *                   FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1),
  *                   FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1),
  */
-  __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_13);
-  __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
-  __pyx_t_14 = PyTuple_New(6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_14 = PyTuple_New(6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_14);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__PQ));
-  PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_n_s__PQ));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PQ));
+  __Pyx_INCREF(__pyx_n_s_PQ);
+  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_n_s_PQ);
+  __Pyx_GIVEREF(__pyx_n_s_PQ);
   PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_12);
   __Pyx_GIVEREF(__pyx_t_12);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_14, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_73));
-  PyTuple_SET_ITEM(__pyx_t_14, 4, ((PyObject *)__pyx_kp_s_73));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_Phasing_quality);
+  PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_kp_s_Phasing_quality);
+  __Pyx_GIVEREF(__pyx_kp_s_Phasing_quality);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_12 = 0;
-  __pyx_t_12 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
+  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
-  /* "pysam/cvcf.pyx":514
+  /* "pysam/cvcf.pyx":515
  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),
  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),
  *                   FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1),             # <<<<<<<<<<<<<<
  *                   FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1),
  *                   ]:
  */
-  __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_14);
-  __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_13);
-  __pyx_t_15 = PyTuple_New(6); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_15 = PyTuple_New(6); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_15);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__EC));
-  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_n_s__EC));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EC));
+  __Pyx_INCREF(__pyx_n_s_EC);
+  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_s_EC);
+  __Pyx_GIVEREF(__pyx_n_s_EC);
   PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_13);
   __Pyx_GIVEREF(__pyx_t_13);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_15, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_74));
-  PyTuple_SET_ITEM(__pyx_t_15, 4, ((PyObject *)__pyx_kp_s_74));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_74));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_Expected_alternate_allel_counts);
+  PyTuple_SET_ITEM(__pyx_t_15, 4, __pyx_kp_s_Expected_alternate_allel_counts);
+  __Pyx_GIVEREF(__pyx_kp_s_Expected_alternate_allel_counts);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_15, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_13 = 0;
-  __pyx_t_13 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_15, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_13);
   __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
+  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
 
-  /* "pysam/cvcf.pyx":515
+  /* "pysam/cvcf.pyx":516
  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),
  *                   FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1),
  *                   FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1),             # <<<<<<<<<<<<<<
  *                   ]:
  *             if f.id not in self._format:
  */
-  __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_FORMAT); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_15);
-  __pyx_t_14 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_14);
-  __pyx_t_16 = PyTuple_New(6); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_16 = PyTuple_New(6); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_16);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__MQ));
-  PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_n_s__MQ));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MQ));
+  __Pyx_INCREF(__pyx_n_s_MQ);
+  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_n_s_MQ);
+  __Pyx_GIVEREF(__pyx_n_s_MQ);
   PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_14);
   __Pyx_GIVEREF(__pyx_t_14);
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
-  PyTuple_SET_ITEM(__pyx_t_16, 3, ((PyObject *)__pyx_n_s__Integer));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_75));
-  PyTuple_SET_ITEM(__pyx_t_16, 4, ((PyObject *)__pyx_kp_s_75));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_75));
+  __Pyx_INCREF(__pyx_n_s_Integer);
+  PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_n_s_Integer);
+  __Pyx_GIVEREF(__pyx_n_s_Integer);
+  __Pyx_INCREF(__pyx_kp_s_RMS_mapping_quality);
+  PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_kp_s_RMS_mapping_quality);
+  __Pyx_GIVEREF(__pyx_kp_s_RMS_mapping_quality);
   __Pyx_INCREF(__pyx_int_neg_1);
   PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_14 = 0;
-  __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_14);
   __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
-  __pyx_t_16 = PyTuple_New(14); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+
+  /* "pysam/cvcf.pyx":503
+ * 
+ *     def enter_default_format(self):
+ *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),             # <<<<<<<<<<<<<<
+ *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
+ *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
+ */
+  __pyx_t_16 = PyTuple_New(14); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_16);
   PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
@@ -10958,55 +11078,47 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_14enter_default_format(CYTHON_UNUSED
   __pyx_t_12 = 0;
   __pyx_t_13 = 0;
   __pyx_t_14 = 0;
-  __pyx_t_14 = ((PyObject *)__pyx_t_16); __Pyx_INCREF(__pyx_t_14); __pyx_t_17 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
+  __pyx_t_14 = __pyx_t_16; __Pyx_INCREF(__pyx_t_14); __pyx_t_17 = 0;
+  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   for (;;) {
-
-    /* "pysam/cvcf.pyx":502
- * 
- *     def enter_default_format(self):
- *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),             # <<<<<<<<<<<<<<
- *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
- *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
- */
-    if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
+    if (__pyx_t_17 >= 14) break;
     #if CYTHON_COMPILING_IN_CPYTHON
-    __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_17); __Pyx_INCREF(__pyx_t_16); __pyx_t_17++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_17); __Pyx_INCREF(__pyx_t_16); __pyx_t_17++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     #else
-    __pyx_t_16 = PySequence_ITEM(__pyx_t_14, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_16 = PySequence_ITEM(__pyx_t_14, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     #endif
-    __Pyx_XDECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_16;
+    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_16);
     __pyx_t_16 = 0;
 
-    /* "pysam/cvcf.pyx":517
+    /* "pysam/cvcf.pyx":518
  *                   FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1),
  *                   ]:
  *             if f.id not in self._format:             # <<<<<<<<<<<<<<
  *                 self._format[f.id] = f
  * 
  */
-    __pyx_t_16 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_16);
-    __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_13);
-    __pyx_t_18 = (__Pyx_PySequence_Contains(__pyx_t_16, __pyx_t_13, Py_NE)); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_18 = (__Pyx_PySequence_Contains(__pyx_t_16, __pyx_t_13, Py_NE)); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-    if (__pyx_t_18) {
+    __pyx_t_19 = (__pyx_t_18 != 0);
+    if (__pyx_t_19) {
 
-      /* "pysam/cvcf.pyx":518
+      /* "pysam/cvcf.pyx":519
  *                   ]:
  *             if f.id not in self._format:
  *                 self._format[f.id] = f             # <<<<<<<<<<<<<<
  * 
  *     def parse_header( self, line ):
  */
-      __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_13);
-      __pyx_t_16 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_16);
-      if (PyObject_SetItem(__pyx_t_13, __pyx_t_16, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(PyObject_SetItem(__pyx_t_13, __pyx_t_16, __pyx_v_f) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
       goto __pyx_L5;
@@ -11015,6 +11127,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_14enter_default_format(CYTHON_UNUSED
   }
   __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
+  /* "pysam/cvcf.pyx":502
+ * 
+ * 
+ *     def enter_default_format(self):             # <<<<<<<<<<<<<<
+ *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
+ *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -11043,17 +11164,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_14enter_default_format(CYTHON_UNUSED
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":521
+ *                 self._format[f.id] = f
+ * 
+ *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
+ *         assert line.startswith('##')
+ *         elts = line[2:].split('=')
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_17parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_17parse_header = {__Pyx_NAMESTR("parse_header"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_17parse_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_17parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("parse_header (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -11067,16 +11199,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_17parse_header(PyObject *__pyx_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -11089,25 +11221,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_17parse_header(PyObject *__pyx_self,
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("parse_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("parse_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_16parse_header(__pyx_self, __pyx_v_self, __pyx_v_line);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":520
- *                 self._format[f.id] = f
- * 
- *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
- *         assert line.startswith('##')
- *         elts = line[2:].split('=')
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line) {
   PyObject *__pyx_v_elts = NULL;
   PyObject *__pyx_v_key = NULL;
@@ -11120,12 +11246,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObjec
   int __pyx_t_3;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_6;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("parse_header", 0);
 
-  /* "pysam/cvcf.pyx":521
+  /* "pysam/cvcf.pyx":522
  * 
  *     def parse_header( self, line ):
  *         assert line.startswith('##')             # <<<<<<<<<<<<<<
@@ -11133,270 +11260,252 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObjec
  *         key = elts[0].strip()
  */
   #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 = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __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 = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (unlikely(!__pyx_t_3)) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!Py_OptimizeFlag)) {
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__47, NULL); 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_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 = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (unlikely(!__pyx_t_3)) {
+      PyErr_SetNone(PyExc_AssertionError);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
   }
   #endif
 
-  /* "pysam/cvcf.pyx":522
+  /* "pysam/cvcf.pyx":523
  *     def parse_header( self, line ):
  *         assert line.startswith('##')
  *         elts = line[2:].split('=')             # <<<<<<<<<<<<<<
  *         key = elts[0].strip()
  *         value = '='.join(elts[1:]).strip()
  */
-  __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 = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_line, 2, 0, NULL, NULL, &__pyx_slice__48, 1, 0, 1); 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_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_78), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__49, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_elts = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":523
+  /* "pysam/cvcf.pyx":524
  *         assert line.startswith('##')
  *         elts = line[2:].split('=')
  *         key = elts[0].strip()             # <<<<<<<<<<<<<<
  *         value = '='.join(elts[1:]).strip()
  *         if key == "fileformat":
  */
-  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __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 = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_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 = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_key = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":524
+  /* "pysam/cvcf.pyx":525
  *         elts = line[2:].split('=')
  *         key = elts[0].strip()
  *         value = '='.join(elts[1:]).strip()             # <<<<<<<<<<<<<<
  *         if key == "fileformat":
  *             if value == "VCFv3.3":
  */
-  __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 = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_elts, 1, 0, NULL, NULL, &__pyx_slice__50, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __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 = 524; __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 = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
-  __Pyx_GIVEREF(__pyx_t_1);
-  __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__13, __pyx_t_2); 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);
   __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 = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __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_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_v_value = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":525
+  /* "pysam/cvcf.pyx":526
  *         key = elts[0].strip()
  *         value = '='.join(elts[1:]).strip()
  *         if key == "fileformat":             # <<<<<<<<<<<<<<
  *             if value == "VCFv3.3":
  *                 self._version = 33
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__fileformat), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __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 = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_fileformat, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_3) {
 
-    /* "pysam/cvcf.pyx":526
+    /* "pysam/cvcf.pyx":527
  *         value = '='.join(elts[1:]).strip()
  *         if key == "fileformat":
  *             if value == "VCFv3.3":             # <<<<<<<<<<<<<<
  *                 self._version = 33
  *             elif value == "VCFv4.0":
  */
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_79), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __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 = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_value, __pyx_kp_s_VCFv3_3, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_3) {
 
-      /* "pysam/cvcf.pyx":527
+      /* "pysam/cvcf.pyx":528
  *         if key == "fileformat":
  *             if value == "VCFv3.3":
  *                 self._version = 33             # <<<<<<<<<<<<<<
  *             elif value == "VCFv4.0":
  *                 self._version = 40
  */
-      if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_int_33) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_int_33) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L4;
     }
 
-    /* "pysam/cvcf.pyx":528
+    /* "pysam/cvcf.pyx":529
  *             if value == "VCFv3.3":
  *                 self._version = 33
  *             elif value == "VCFv4.0":             # <<<<<<<<<<<<<<
  *                 self._version = 40
  *             elif value == "VCFv4.1":
  */
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_80), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __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 = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_value, __pyx_kp_s_VCFv4_0, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_3) {
 
-      /* "pysam/cvcf.pyx":529
+      /* "pysam/cvcf.pyx":530
  *                 self._version = 33
  *             elif value == "VCFv4.0":
  *                 self._version = 40             # <<<<<<<<<<<<<<
  *             elif value == "VCFv4.1":
  *                 # AH - for testing
  */
-      if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L4;
     }
 
-    /* "pysam/cvcf.pyx":530
+    /* "pysam/cvcf.pyx":531
  *             elif value == "VCFv4.0":
  *                 self._version = 40
  *             elif value == "VCFv4.1":             # <<<<<<<<<<<<<<
  *                 # AH - for testing
  *                 self._version = 40
  */
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_81), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __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 = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_value, __pyx_kp_s_VCFv4_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_3) {
 
-      /* "pysam/cvcf.pyx":532
+      /* "pysam/cvcf.pyx":533
  *             elif value == "VCFv4.1":
  *                 # AH - for testing
  *                 self._version = 40             # <<<<<<<<<<<<<<
  *             else:
  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)
  */
-      if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L4;
     }
     /*else*/ {
 
-      /* "pysam/cvcf.pyx":534
+      /* "pysam/cvcf.pyx":535
  *                 self._version = 40
  *             else:
  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)             # <<<<<<<<<<<<<<
  *         elif key == "INFO":
  *             f = self.parse_format(line, value)
  */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_82); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __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 = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_UNKNOWN_FORMAT_STRING); 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_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_4, 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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     }
     __pyx_L4:;
     goto __pyx_L3;
   }
 
-  /* "pysam/cvcf.pyx":535
+  /* "pysam/cvcf.pyx":536
  *             else:
  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)
  *         elif key == "INFO":             # <<<<<<<<<<<<<<
  *             f = self.parse_format(line, value)
  *             self._info[ f.id ] = f
  */
-  __pyx_t_4 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__INFO), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); 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_4); __pyx_t_4 = 0;
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_INFO, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_3) {
 
-    /* "pysam/cvcf.pyx":536
+    /* "pysam/cvcf.pyx":537
  *                 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_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __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 = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_format); 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_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
     __Pyx_INCREF(__pyx_v_value);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __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 = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
     __pyx_v_f = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":537
+    /* "pysam/cvcf.pyx":538
  *         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_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); 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);
-    if (PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_4, __pyx_v_f) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     goto __pyx_L3;
   }
 
-  /* "pysam/cvcf.pyx":538
+  /* "pysam/cvcf.pyx":539
  *             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_2 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_FILTER, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_3) {
 
-    /* "pysam/cvcf.pyx":539
+    /* "pysam/cvcf.pyx":540
  *             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_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __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 = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = PyTuple_New(2); 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_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
@@ -11404,59 +11513,54 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObjec
     __Pyx_INCREF(__pyx_v_value);
     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __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 = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__filter), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_filter_2, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __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_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_v_f = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":540
+    /* "pysam/cvcf.pyx":541
  *         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)
  */
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __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 = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_2, __pyx_v_f) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     goto __pyx_L3;
   }
 
-  /* "pysam/cvcf.pyx":541
+  /* "pysam/cvcf.pyx":542
  *             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_4 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__FORMAT), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_FORMAT, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_3) {
 
-    /* "pysam/cvcf.pyx":542
+    /* "pysam/cvcf.pyx":543
  *             self._filter[ f.id ] = f
  *         elif key == "FORMAT":
  *             f = self.parse_format(line, value)             # <<<<<<<<<<<<<<
  *             self._format[ f.id ] = f
  *         else:
  */
-    __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 = 542; __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 = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __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 = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
@@ -11464,41 +11568,41 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObjec
     __Pyx_INCREF(__pyx_v_value);
     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __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 = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __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_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __pyx_v_f = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":543
+    /* "pysam/cvcf.pyx":544
  *         elif key == "FORMAT":
  *             f = self.parse_format(line, value)
  *             self._format[ f.id ] = f             # <<<<<<<<<<<<<<
  *         else:
  *             # keep other keys in the header field
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    if (PyObject_SetItem(__pyx_t_1, __pyx_t_5, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_5, __pyx_v_f) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __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_L3;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":546
+    /* "pysam/cvcf.pyx":547
  *         else:
  *             # keep other keys in the header field
  *             self._header.append( (key,value) )             # <<<<<<<<<<<<<<
  * 
  * 
  */
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___header); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __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 = 546; __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 = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_v_key);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
@@ -11506,14 +11610,21 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObjec
     __Pyx_INCREF(__pyx_v_value);
     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
     __Pyx_GIVEREF(__pyx_v_value);
-    __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 = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
   __pyx_L3:;
 
+  /* "pysam/cvcf.pyx":521
+ *                 self._format[f.id] = f
+ * 
+ *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
+ *         assert line.startswith('##')
+ *         elts = line[2:].split('=')
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -11533,17 +11644,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObjec
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":550
+ * 
+ * 
+ *     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))
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_19write_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_19write_header = {__Pyx_NAMESTR("write_header"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_19write_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_19write_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("write_header (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -11557,16 +11679,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_19write_header(PyObject *__pyx_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("write_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("write_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -11579,25 +11701,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_19write_header(PyObject *__pyx_self,
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("write_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("write_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.write_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_18write_header(__pyx_self, __pyx_v_self, __pyx_v_stream);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":549
- * 
- * 
- *     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))
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
   PyObject *__pyx_v_key = NULL;
   PyObject *__pyx_v_value = NULL;
@@ -11625,26 +11741,26 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("write_header", 0);
 
-  /* "pysam/cvcf.pyx":550
+  /* "pysam/cvcf.pyx":551
  * 
  *     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")]:
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); 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_3 = PyNumber_FloorDivide(__pyx_t_2, __pyx_int_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_2, __pyx_int_10); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); 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_4 = PyNumber_Remainder(__pyx_t_2, __pyx_int_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyNumber_Remainder(__pyx_t_2, __pyx_int_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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 = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
@@ -11652,34 +11768,34 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
   __Pyx_GIVEREF(__pyx_t_4);
   __pyx_t_3 = 0;
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_83), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-  __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 = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_fileformat_VCFv_s_s, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __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 = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+  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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "pysam/cvcf.pyx":551
+  /* "pysam/cvcf.pyx":552
  *     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"))))
  */
-  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___header); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
     __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
     __pyx_t_6 = NULL;
   } else {
-    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
   }
@@ -11688,23 +11804,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
     if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
       if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
       if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_4 = __pyx_t_6(__pyx_t_2);
       if (unlikely(!__pyx_t_4)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
@@ -11720,7 +11837,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
       if (unlikely(size != 2)) {
         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       #if CYTHON_COMPILING_IN_CPYTHON
       if (likely(PyTuple_CheckExact(sequence))) {
@@ -11733,16 +11850,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
       __Pyx_INCREF(__pyx_t_1);
       __Pyx_INCREF(__pyx_t_3);
       #else
-      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       #endif
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    } else
-    {
+    } else {
       Py_ssize_t index = -1;
-      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
@@ -11750,7 +11866,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
       __Pyx_GOTREF(__pyx_t_1);
       index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
       __Pyx_GOTREF(__pyx_t_3);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_t_8 = NULL;
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       goto __pyx_L6_unpacking_done;
@@ -11758,18 +11874,16 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_8 = NULL;
       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_L6_unpacking_done:;
     }
-    __Pyx_XDECREF(__pyx_v_key);
-    __pyx_v_key = __pyx_t_1;
+    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
     __pyx_t_1 = 0;
-    __Pyx_XDECREF(__pyx_v_value);
-    __pyx_v_value = __pyx_t_3;
+    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
     __pyx_t_3 = 0;
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __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 = 551; __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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_v_key);
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
@@ -11777,80 +11891,80 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
     __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_84), ((PyObject *)__pyx_t_3)); 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_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 = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+    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_4, ((PyObject *)__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_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __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;
 
-  /* "pysam/cvcf.pyx":552
+  /* "pysam/cvcf.pyx":553
  *         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"))))
  * 
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __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 = 552; __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 = 553; __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_INCREF(((PyObject *)__pyx_n_s__INFO));
-  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__INFO));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__INFO));
+  __Pyx_INCREF(__pyx_n_s_INFO);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_INFO);
+  __Pyx_GIVEREF(__pyx_n_s_INFO);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __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 = 552; __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 = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__FILTER));
-  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__FILTER));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FILTER));
+  __Pyx_INCREF(__pyx_n_s_FILTER);
+  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_FILTER);
+  __Pyx_GIVEREF(__pyx_n_s_FILTER);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyTuple_New(2); 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);
   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__FORMAT));
-  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__FORMAT));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORMAT));
+  __Pyx_INCREF(__pyx_n_s_FORMAT);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_FORMAT);
+  __Pyx_GIVEREF(__pyx_n_s_FORMAT);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
-  PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_4));
-  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
   __pyx_t_1 = 0;
   __pyx_t_3 = 0;
   __pyx_t_4 = 0;
-  __pyx_t_4 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   for (;;) {
-    if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+    if (__pyx_t_5 >= 3) break;
     #if CYTHON_COMPILING_IN_CPYTHON
-    __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     #else
-    __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     #endif
-    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+    if (likely(__pyx_t_2 != Py_None)) {
       PyObject* sequence = __pyx_t_2;
       #if CYTHON_COMPILING_IN_CPYTHON
       Py_ssize_t size = Py_SIZE(sequence);
@@ -11860,55 +11974,29 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
       if (unlikely(size != 2)) {
         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       #if CYTHON_COMPILING_IN_CPYTHON
-      if (likely(PyTuple_CheckExact(sequence))) {
-        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
-        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
-      } else {
-        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
-      }
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
       __Pyx_INCREF(__pyx_t_3);
       __Pyx_INCREF(__pyx_t_1);
       #else
-      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PySequence_ITEM(sequence, 0); 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_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(sequence, 1); 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);
       #endif
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    } else
-    {
-      Py_ssize_t index = -1;
-      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
-      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_3);
-      index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_1);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_8 = NULL;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      goto __pyx_L10_unpacking_done;
-      __pyx_L9_unpacking_failed:;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_8 = NULL;
-      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L10_unpacking_done:;
+    } else {
+      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_XDECREF(__pyx_v_var);
-    __pyx_v_var = __pyx_t_3;
+    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3);
     __pyx_t_3 = 0;
-    __Pyx_XDECREF(__pyx_v_label);
-    __pyx_v_label = __pyx_t_1;
+    __Pyx_XDECREF_SET(__pyx_v_label, __pyx_t_1);
     __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":553
+    /* "pysam/cvcf.pyx":554
  *         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"))))             # <<<<<<<<<<<<<<
@@ -11918,9 +12006,9 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
     __pyx_t_9 = 0;
     if (unlikely(__pyx_v_var == Py_None)) {
       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "itervalues");
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_var, 0, ((PyObject *)__pyx_n_s__itervalues), (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_var, 0, __pyx_n_s_itervalues, (&__pyx_t_10), (&__pyx_t_11)); 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_XDECREF(__pyx_t_2);
     __pyx_t_2 = __pyx_t_1;
@@ -11928,31 +12016,30 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
     while (1) {
       __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_10, &__pyx_t_9, NULL, &__pyx_t_1, NULL, __pyx_t_11);
       if (unlikely(__pyx_t_12 == 0)) break;
-      if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_XDECREF(__pyx_v_f);
-      __pyx_v_f = __pyx_t_1;
+      __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1);
       __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __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 = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_format); 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);
-      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_INCREF(__pyx_v_f);
       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_f);
       __Pyx_GIVEREF(__pyx_v_f);
-      __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
-      __pyx_t_14 = PyObject_RichCompare(__pyx_v_label, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__filter), __pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_13);
+      __pyx_t_14 = PyObject_RichCompare(__pyx_v_label, __pyx_n_s_FILTER, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_filter_2, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-      __pyx_t_14 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_14);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
-      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_13);
       __Pyx_INCREF(__pyx_v_label);
       PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_label);
@@ -11960,24 +12047,33 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
       PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_14);
       __Pyx_GIVEREF(__pyx_t_14);
       __pyx_t_14 = 0;
-      __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_84), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_14));
-      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
-      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_13);
-      PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_t_14));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_14));
+      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
+      __Pyx_GIVEREF(__pyx_t_14);
       __pyx_t_14 = 0;
-      __pyx_t_14 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_14);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
+      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
     }
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   }
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
+  /* "pysam/cvcf.pyx":550
+ * 
+ * 
+ *     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))
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -12001,17 +12097,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObjec
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":557
+ * 
+ * 
+ *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
+ *         assert line.startswith('#')
+ *         assert not line.startswith('##')
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_21parse_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_21parse_heading = {__Pyx_NAMESTR("parse_heading"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_21parse_heading, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_21parse_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("parse_heading (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -12025,16 +12132,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_21parse_heading(PyObject *__pyx_self
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_heading", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_heading", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_heading") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_heading") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -12047,25 +12154,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_21parse_heading(PyObject *__pyx_self
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("parse_heading", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("parse_heading", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse_heading", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(__pyx_self, __pyx_v_self, __pyx_v_line);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":556
- * 
- * 
- *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
- *         assert line.startswith('#')
- *         assert not line.startswith('##')
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line) {
   PyObject *__pyx_v_headings = NULL;
   PyObject *__pyx_v_i = NULL;
@@ -12085,13 +12186,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
   PyObject *(*__pyx_t_8)(PyObject *);
   Py_ssize_t __pyx_t_9;
   PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
+  int __pyx_t_11;
+  PyObject *__pyx_t_12 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("parse_heading", 0);
 
-  /* "pysam/cvcf.pyx":557
+  /* "pysam/cvcf.pyx":558
  * 
  *     def parse_heading( self, line ):
  *         assert line.startswith('#')             # <<<<<<<<<<<<<<
@@ -12099,20 +12201,22 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
  *         headings = line[1:].split('\t')
  */
   #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 = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __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 = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (unlikely(!__pyx_t_3)) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!Py_OptimizeFlag)) {
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __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 = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (unlikely(!__pyx_t_3)) {
+      PyErr_SetNone(PyExc_AssertionError);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
   }
   #endif
 
-  /* "pysam/cvcf.pyx":558
+  /* "pysam/cvcf.pyx":559
  *     def parse_heading( self, line ):
  *         assert line.startswith('#')
  *         assert not line.startswith('##')             # <<<<<<<<<<<<<<
@@ -12120,76 +12224,78 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
  *         # test for 8, as FORMAT field might be missing
  */
   #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 = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __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_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (unlikely(!(!__pyx_t_3))) {
-    PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!Py_OptimizeFlag)) {
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __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_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (unlikely(!((!__pyx_t_3) != 0))) {
+      PyErr_SetNone(PyExc_AssertionError);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
   }
   #endif
 
-  /* "pysam/cvcf.pyx":559
+  /* "pysam/cvcf.pyx":560
  *         assert line.startswith('#')
  *         assert not line.startswith('##')
  *         headings = line[1:].split('\t')             # <<<<<<<<<<<<<<
  *         # test for 8, as FORMAT field might be missing
  *         if len(headings)==1 and len(line[1:].split()) >= 8:
  */
-  __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 = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_line, 1, 0, NULL, NULL, &__pyx_slice__54, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_v_headings = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":561
+  /* "pysam/cvcf.pyx":562
  *         headings = line[1:].split('\t')
  *         # test for 8, as FORMAT field might be missing
  *         if len(headings)==1 and len(line[1:].split()) >= 8:             # <<<<<<<<<<<<<<
  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
  *             headings = line[1:].split()
  */
-  __pyx_t_4 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = (__pyx_t_4 == 1);
+  __pyx_t_4 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = ((__pyx_t_4 == 1) != 0);
   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 = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_line, 1, 0, NULL, NULL, &__pyx_slice__57, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __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 = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __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 = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __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 = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_5 = (__pyx_t_4 >= 8);
+    __pyx_t_5 = ((__pyx_t_4 >= 8) != 0);
     __pyx_t_6 = __pyx_t_5;
   } else {
     __pyx_t_6 = __pyx_t_3;
   }
   if (__pyx_t_6) {
 
-    /* "pysam/cvcf.pyx":562
+    /* "pysam/cvcf.pyx":563
  *         # test for 8, as FORMAT field might be missing
  *         if len(headings)==1 and len(line[1:].split()) >= 8:
  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)             # <<<<<<<<<<<<<<
  *             headings = line[1:].split()
  * 
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_90); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __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 = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
@@ -12197,35 +12303,34 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
     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 = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __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_7); __pyx_t_7 = 0;
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":563
+    /* "pysam/cvcf.pyx":564
  *         if len(headings)==1 and len(line[1:].split()) >= 8:
  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
  *             headings = line[1:].split()             # <<<<<<<<<<<<<<
  * 
  *         for i,s in enumerate(self._required):
  */
-    __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 = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_line, 1, 0, NULL, NULL, &__pyx_slice__58, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __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 = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __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_2;
+    __Pyx_DECREF_SET(__pyx_v_headings, __pyx_t_2);
     __pyx_t_2 = 0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":565
+  /* "pysam/cvcf.pyx":566
  *             headings = line[1:].split()
  * 
  *         for i,s in enumerate(self._required):             # <<<<<<<<<<<<<<
@@ -12234,13 +12339,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
  */
   __Pyx_INCREF(__pyx_int_0);
   __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 = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_required); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __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_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
     __pyx_t_8 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
   }
@@ -12249,60 +12354,59 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
     if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_1)) {
       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_1)) {
       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_7 = __pyx_t_8(__pyx_t_1);
       if (unlikely(!__pyx_t_7)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_7);
     }
-    __Pyx_XDECREF(__pyx_v_s);
-    __pyx_v_s = __pyx_t_7;
+    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_7);
     __pyx_t_7 = 0;
     __Pyx_INCREF(__pyx_t_2);
-    __Pyx_XDECREF(__pyx_v_i);
-    __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 = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF_SET(__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 = 566; __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;
 
-    /* "pysam/cvcf.pyx":567
+    /* "pysam/cvcf.pyx":568
  *         for i,s in enumerate(self._required):
  * 
  *             if len(headings)<=i or headings[i] != s:             # <<<<<<<<<<<<<<
  * 
  *                 if len(headings) <= i:
  */
-    __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     if (!__pyx_t_6) {
-      __pyx_t_10 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_10, __pyx_v_s, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_10, __pyx_v_s, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_5 = __pyx_t_3;
     } else {
@@ -12310,51 +12414,50 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
     }
     if (__pyx_t_5) {
 
-      /* "pysam/cvcf.pyx":569
+      /* "pysam/cvcf.pyx":570
  *             if len(headings)<=i or headings[i] != s:
  * 
  *                 if len(headings) <= i:             # <<<<<<<<<<<<<<
  *                     err = "(%sth entry not found)" % (i+1)
  *                 else:
  */
-      __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __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 = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       if (__pyx_t_5) {
 
-        /* "pysam/cvcf.pyx":570
+        /* "pysam/cvcf.pyx":571
  * 
  *                 if len(headings) <= i:
  *                     err = "(%sth entry not found)" % (i+1)             # <<<<<<<<<<<<<<
  *                 else:
  *                     err = "(found %s, expected %s)" % (headings[i],s)
  */
-        __pyx_t_10 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_91), __pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+        __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_sth_entry_not_found, __pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_XDECREF(__pyx_v_err);
-        __pyx_v_err = ((PyObject *)__pyx_t_7);
+        __Pyx_XDECREF_SET(__pyx_v_err, ((PyObject*)__pyx_t_7));
         __pyx_t_7 = 0;
         goto __pyx_L7;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":572
+        /* "pysam/cvcf.pyx":573
  *                     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_7 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
         __Pyx_GIVEREF(__pyx_t_7);
@@ -12362,66 +12465,63 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
         PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_s);
         __Pyx_GIVEREF(__pyx_v_s);
         __pyx_t_7 = 0;
-        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_92), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-        __Pyx_XDECREF(__pyx_v_err);
-        __pyx_v_err = ((PyObject *)__pyx_t_7);
+        __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_found_s_expected_s, __pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_err, ((PyObject*)__pyx_t_7));
         __pyx_t_7 = 0;
       }
       __pyx_L7:;
 
-      /* "pysam/cvcf.pyx":576
+      /* "pysam/cvcf.pyx":577
  *                 #self.error(line,self.BADLY_FORMATTED_HEADING,err)
  *                 # allow FORMAT column to be absent
  *                 if len(headings) == 8:             # <<<<<<<<<<<<<<
  *                     headings.append("FORMAT")
  *                 else:
  */
-      __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_5 = (__pyx_t_9 == 8);
+      __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = ((__pyx_t_9 == 8) != 0);
       if (__pyx_t_5) {
 
-        /* "pysam/cvcf.pyx":577
+        /* "pysam/cvcf.pyx":578
  *                 # allow FORMAT column to be absent
  *                 if len(headings) == 8:
  *                     headings.append("FORMAT")             # <<<<<<<<<<<<<<
  *                 else:
  *                     self.error(line,self.BADLY_FORMATTED_HEADING,err)
  */
-        __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 = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_headings, __pyx_n_s_FORMAT); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L8;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":579
+        /* "pysam/cvcf.pyx":580
  *                     headings.append("FORMAT")
  *                 else:
  *                     self.error(line,self.BADLY_FORMATTED_HEADING,err)             # <<<<<<<<<<<<<<
  * 
  *         self._samples = headings[9:]
  */
-        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_93); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_HEADING); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10);
+        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
         __Pyx_GIVEREF(__pyx_t_10);
         __Pyx_INCREF(__pyx_v_err);
-        PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_err);
+        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_err);
         __Pyx_GIVEREF(__pyx_v_err);
         __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       }
       __pyx_L8:;
@@ -12432,80 +12532,79 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":581
+  /* "pysam/cvcf.pyx":582
  *                     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_2 = __Pyx_PySequence_GetSlice(__pyx_v_headings, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_headings, 9, 0, NULL, NULL, &__pyx_slice__59, 1, 0, 1); 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);
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_samples, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":582
+  /* "pysam/cvcf.pyx":583
  * 
  *         self._samples = headings[9:]
  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )             # <<<<<<<<<<<<<<
  * 
  *     def write_heading( self, stream ):
  */
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __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 = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_int_0);
   __pyx_t_1 = __pyx_int_0;
-  __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
   if (PyList_CheckExact(__pyx_t_10) || PyTuple_CheckExact(__pyx_t_10)) {
-    __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+    __pyx_t_12 = __pyx_t_10; __Pyx_INCREF(__pyx_t_12); __pyx_t_4 = 0;
     __pyx_t_8 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext;
+    __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
+    __pyx_t_8 = Py_TYPE(__pyx_t_12)->tp_iternext;
   }
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   for (;;) {
-    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_11)) {
-      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
+    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_12)) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PySequence_ITEM(__pyx_t_12, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_11)) {
-      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
+    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_12)) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PySequence_ITEM(__pyx_t_12, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
-      __pyx_t_10 = __pyx_t_8(__pyx_t_11);
+      __pyx_t_10 = __pyx_t_8(__pyx_t_12);
       if (unlikely(!__pyx_t_10)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_10);
     }
-    __Pyx_XDECREF(__pyx_v_y);
-    __pyx_v_y = __pyx_t_10;
+    __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_10);
     __pyx_t_10 = 0;
     __Pyx_INCREF(__pyx_t_1);
-    __Pyx_XDECREF(__pyx_v_x);
-    __pyx_v_x = __pyx_t_1;
-    __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1);
+    __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
     __Pyx_DECREF(__pyx_t_1);
     __pyx_t_1 = __pyx_t_10;
     __pyx_t_10 = 0;
-    __pyx_t_10 = PyNumber_Add(__pyx_v_x, __pyx_int_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyNumber_Add(__pyx_v_x, __pyx_int_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
     __Pyx_INCREF(__pyx_v_y);
     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_y);
@@ -12513,23 +12612,31 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
     PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_10);
     __Pyx_GIVEREF(__pyx_t_10);
     __pyx_t_10 = 0;
-    if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   }
-  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); 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_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 = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); 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_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 = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sample2column, __pyx_t_2) < 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;
 
+  /* "pysam/cvcf.pyx":557
+ * 
+ * 
+ *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
+ *         assert line.startswith('#')
+ *         assert not line.startswith('##')
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -12537,7 +12644,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_XDECREF(__pyx_t_12);
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse_heading", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -12552,17 +12659,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObje
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":585
+ *         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")
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_23write_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_23write_heading = {__Pyx_NAMESTR("write_heading"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_23write_heading, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_23write_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("write_heading (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -12576,16 +12694,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_23write_heading(PyObject *__pyx_self
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("write_heading", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("write_heading", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_heading") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_heading") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -12598,25 +12716,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_23write_heading(PyObject *__pyx_self
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("write_heading", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("write_heading", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.write_heading", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_22write_heading(__pyx_self, __pyx_v_self, __pyx_v_stream);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":584
- *         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")
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_22write_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -12624,57 +12736,57 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_22write_heading(CYTHON_UNUSED PyObje
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("write_heading", 0);
 
-  /* "pysam/cvcf.pyx":585
+  /* "pysam/cvcf.pyx":586
  * 
  *     def write_heading( self, stream ):
  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")             # <<<<<<<<<<<<<<
  * 
  *     def convertGT(self, GTstring):
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_88), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_required); 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_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___required); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); 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_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __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_t_3 = __Pyx_PyString_Join(__pyx_kp_s__55, __pyx_t_4); 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_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 = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-  __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_kp_s_85), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyNumber_Add(__pyx_kp_s__51, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __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_94)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__60); 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_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 = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
-  __Pyx_GIVEREF(__pyx_t_5);
-  __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 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;
+
+  /* "pysam/cvcf.pyx":585
+ *         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")
+ * 
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -12682,7 +12794,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_22write_heading(CYTHON_UNUSED PyObje
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
   __Pyx_AddTraceback("pysam.cvcf.VCF.write_heading", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -12691,17 +12802,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_22write_heading(CYTHON_UNUSED PyObje
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":588
+ *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
+ * 
+ *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
+ *         if GTstring == ".": return ["."]
+ *         try:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_25convertGT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_25convertGT = {__Pyx_NAMESTR("convertGT"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_25convertGT, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_25convertGT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_GTstring = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("convertGT (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__GTstring,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_GTstring,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -12715,16 +12837,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_25convertGT(PyObject *__pyx_self, Py
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__GTstring)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_GTstring)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("convertGT", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("convertGT", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convertGT") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convertGT") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -12737,31 +12859,25 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_25convertGT(PyObject *__pyx_self, Py
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("convertGT", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("convertGT", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.convertGT", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_24convertGT(__pyx_self, __pyx_v_self, __pyx_v_GTstring);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":587
- *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
- * 
- *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
- *         if GTstring == ".": return ["."]
- *         try:
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_GTstring) {
   PyObject *__pyx_v_gts = NULL;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
@@ -12781,31 +12897,27 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("convertGT", 0);
 
-  /* "pysam/cvcf.pyx":588
+  /* "pysam/cvcf.pyx":589
  * 
  *     def convertGT(self, GTstring):
  *         if GTstring == ".": return ["."]             # <<<<<<<<<<<<<<
  *         try:
  *             gts = gtsRegEx.split(GTstring)
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_GTstring, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __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 = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_GTstring, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __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;
+    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_kp_s__8);
+    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__8);
+    __Pyx_GIVEREF(__pyx_kp_s__8);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":589
+  /* "pysam/cvcf.pyx":590
  *     def convertGT(self, GTstring):
  *         if GTstring == ".": return ["."]
  *         try:             # <<<<<<<<<<<<<<
@@ -12819,141 +12931,126 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
     __Pyx_XGOTREF(__pyx_t_5);
     /*try:*/ {
 
-      /* "pysam/cvcf.pyx":590
+      /* "pysam/cvcf.pyx":591
  *         if GTstring == ".": return ["."]
  *         try:
  *             gts = gtsRegEx.split(GTstring)             # <<<<<<<<<<<<<<
  *             if len(gts) == 1: return [int(gts[0])]
  *             if len(gts) != 2: raise ValueError()
  */
-      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__gtsRegEx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gtsRegEx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_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 = 590; __pyx_clineno = __LINE__; goto __pyx_L4_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 = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_GTstring);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_GTstring);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_GTstring);
       __Pyx_GIVEREF(__pyx_v_GTstring);
-      __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_v_gts = __pyx_t_7;
       __pyx_t_7 = 0;
 
-      /* "pysam/cvcf.pyx":591
+      /* "pysam/cvcf.pyx":592
  *         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]]
  */
-      __pyx_t_8 = PyObject_Length(__pyx_v_gts); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __pyx_t_2 = (__pyx_t_8 == 1);
-      if (__pyx_t_2) {
+      __pyx_t_8 = PyObject_Length(__pyx_v_gts); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __pyx_t_1 = ((__pyx_t_8 == 1) != 0);
+      if (__pyx_t_1) {
         __Pyx_XDECREF(__pyx_r);
-        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __pyx_t_2 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __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 = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
         __Pyx_GOTREF(__pyx_t_7);
-        __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
+        PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_r = __pyx_t_7;
         __pyx_t_7 = 0;
-        __pyx_r = ((PyObject *)__pyx_t_1);
-        __pyx_t_1 = 0;
         goto __pyx_L8_try_return;
-        goto __pyx_L12;
       }
-      __pyx_L12:;
 
-      /* "pysam/cvcf.pyx":592
+      /* "pysam/cvcf.pyx":593
  *             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])]
  */
-      __pyx_t_8 = PyObject_Length(__pyx_v_gts); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __pyx_t_2 = (__pyx_t_8 != 2);
-      if (__pyx_t_2) {
-        __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        goto __pyx_L13;
+      __pyx_t_8 = PyObject_Length(__pyx_v_gts); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __pyx_t_1 = ((__pyx_t_8 != 2) != 0);
+      if (__pyx_t_1) {
+        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
       }
-      __pyx_L13:;
 
-      /* "pysam/cvcf.pyx":593
+      /* "pysam/cvcf.pyx":594
  *             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:
  */
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      if (__pyx_t_2) {
-        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      if (__pyx_t_1) {
+        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __pyx_t_10 = __pyx_t_9;
       } else {
-        __pyx_t_10 = __pyx_t_2;
+        __pyx_t_10 = __pyx_t_1;
       }
       if (__pyx_t_10) {
         __Pyx_XDECREF(__pyx_r);
-        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_8 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_11 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_GTstring, __pyx_t_8, (-__pyx_t_11)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_8 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_11 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_GTstring, __pyx_t_8, (-__pyx_t_11), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
         __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
         __Pyx_GOTREF(__pyx_t_12);
-        PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_1);
-        __Pyx_GIVEREF(__pyx_t_1);
-        PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_7);
+        PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_7);
         __Pyx_GIVEREF(__pyx_t_7);
+        PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
         PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_6);
         __Pyx_GIVEREF(__pyx_t_6);
-        __pyx_t_1 = 0;
         __pyx_t_7 = 0;
+        __pyx_t_2 = 0;
         __pyx_t_6 = 0;
-        __pyx_r = ((PyObject *)__pyx_t_12);
+        __pyx_r = __pyx_t_12;
         __pyx_t_12 = 0;
         goto __pyx_L8_try_return;
-        goto __pyx_L14;
       }
-      __pyx_L14:;
 
-      /* "pysam/cvcf.pyx":594
+      /* "pysam/cvcf.pyx":595
  *             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])]             # <<<<<<<<<<<<<<
@@ -12961,68 +13058,52 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
  *             self.error(self._line,self.BAD_GENOTYPE,GTstring)
  */
       __Pyx_XDECREF(__pyx_r);
-      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
       __Pyx_GOTREF(__pyx_t_12);
-      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __pyx_t_6 = PyNumber_Int(__pyx_t_12); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
       __Pyx_GOTREF(__pyx_t_6);
-      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12);
-      __Pyx_GIVEREF(__pyx_t_12);
-      __pyx_t_12 = 0;
-      __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
       __Pyx_GOTREF(__pyx_t_12);
-      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_11 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_GTstring, __pyx_t_11, (-__pyx_t_8)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
-      __Pyx_GIVEREF(__pyx_t_7);
-      __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __pyx_t_11 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
+      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_8 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_GTstring, __pyx_t_11, (-__pyx_t_8), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __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 = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_12);
-      __Pyx_GIVEREF(__pyx_t_12);
-      PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
       __Pyx_GIVEREF(__pyx_t_6);
-      PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
+      PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_12);
+      __Pyx_GIVEREF(__pyx_t_12);
+      PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
       __Pyx_GIVEREF(__pyx_t_7);
-      __pyx_t_12 = 0;
       __pyx_t_6 = 0;
+      __pyx_t_12 = 0;
       __pyx_t_7 = 0;
-      __pyx_r = ((PyObject *)__pyx_t_1);
-      __pyx_t_1 = 0;
+      __pyx_r = __pyx_t_2;
+      __pyx_t_2 = 0;
       goto __pyx_L8_try_return;
     }
     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
     goto __pyx_L11_try_end;
-    __pyx_L8_try_return:;
-    __Pyx_XGIVEREF(__pyx_t_3);
-    __Pyx_XGIVEREF(__pyx_t_4);
-    __Pyx_XGIVEREF(__pyx_t_5);
-    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
-    goto __pyx_L0;
     __pyx_L4_error:;
-    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
     __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;
 
-    /* "pysam/cvcf.pyx":595
+    /* "pysam/cvcf.pyx":596
  *             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:             # <<<<<<<<<<<<<<
@@ -13032,25 +13113,25 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
     __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
     if (__pyx_t_13) {
       __Pyx_AddTraceback("pysam.cvcf.VCF.convertGT", __pyx_clineno, __pyx_lineno, __pyx_filename);
-      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_GOTREF(__pyx_t_12);
 
-      /* "pysam/cvcf.pyx":596
+      /* "pysam/cvcf.pyx":597
  *             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 [".","|","."]
  * 
  */
-      __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-      __Pyx_GOTREF(__pyx_t_12);
-      __pyx_t_14 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___line); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_line_2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
       __Pyx_GOTREF(__pyx_t_14);
-      __pyx_t_15 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__BAD_GENOTYPE); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BAD_GENOTYPE); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
       __Pyx_GOTREF(__pyx_t_15);
-      __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
       __Pyx_GOTREF(__pyx_t_16);
       PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14);
       __Pyx_GIVEREF(__pyx_t_14);
@@ -13061,13 +13142,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
       __Pyx_GIVEREF(__pyx_v_GTstring);
       __pyx_t_14 = 0;
       __pyx_t_15 = 0;
-      __pyx_t_15 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
       __Pyx_GOTREF(__pyx_t_15);
-      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
 
-      /* "pysam/cvcf.pyx":597
+      /* "pysam/cvcf.pyx":598
  *         except ValueError:
  *             self.error(self._line,self.BAD_GENOTYPE,GTstring)
  *             return [".","|","."]             # <<<<<<<<<<<<<<
@@ -13075,34 +13156,41 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
  *     def convertGTback(self, GTdata):
  */
       __Pyx_XDECREF(__pyx_r);
-      __pyx_t_15 = PyList_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __pyx_t_15 = PyList_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
       __Pyx_GOTREF(__pyx_t_15);
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-      PyList_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_kp_s_9));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_95));
-      PyList_SET_ITEM(__pyx_t_15, 1, ((PyObject *)__pyx_kp_s_95));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_95));
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-      PyList_SET_ITEM(__pyx_t_15, 2, ((PyObject *)__pyx_kp_s_9));
-      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
-      __pyx_r = ((PyObject *)__pyx_t_15);
+      __Pyx_INCREF(__pyx_kp_s__8);
+      PyList_SET_ITEM(__pyx_t_15, 0, __pyx_kp_s__8);
+      __Pyx_GIVEREF(__pyx_kp_s__8);
+      __Pyx_INCREF(__pyx_kp_s__61);
+      PyList_SET_ITEM(__pyx_t_15, 1, __pyx_kp_s__61);
+      __Pyx_GIVEREF(__pyx_kp_s__61);
+      __Pyx_INCREF(__pyx_kp_s__8);
+      PyList_SET_ITEM(__pyx_t_15, 2, __pyx_kp_s__8);
+      __Pyx_GIVEREF(__pyx_kp_s__8);
+      __pyx_r = __pyx_t_15;
       __pyx_t_15 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       goto __pyx_L7_except_return;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
       goto __pyx_L5_exception_handled;
     }
+    goto __pyx_L6_except_error;
     __pyx_L6_except_error:;
     __Pyx_XGIVEREF(__pyx_t_3);
     __Pyx_XGIVEREF(__pyx_t_4);
     __Pyx_XGIVEREF(__pyx_t_5);
     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
     goto __pyx_L1_error;
+    __pyx_L8_try_return:;
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+    goto __pyx_L0;
     __pyx_L7_except_return:;
     __Pyx_XGIVEREF(__pyx_t_3);
     __Pyx_XGIVEREF(__pyx_t_4);
@@ -13117,10 +13205,17 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
     __pyx_L11_try_end:;
   }
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":588
+ *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
+ * 
+ *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
+ *         if GTstring == ".": return ["."]
+ *         try:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_6);
   __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_12);
@@ -13136,17 +13231,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":600
+ *             return [".","|","."]
+ * 
+ *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
+ *         return ''.join(map(str,GTdata))
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_27convertGTback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_27convertGTback = {__Pyx_NAMESTR("convertGTback"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_27convertGTback, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_27convertGTback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   CYTHON_UNUSED PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_GTdata = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("convertGTback (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__GTdata,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_GTdata,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -13160,16 +13266,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_27convertGTback(PyObject *__pyx_self
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__GTdata)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_GTdata)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("convertGTback", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("convertGTback", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convertGTback") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convertGTback") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -13182,37 +13288,30 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_27convertGTback(PyObject *__pyx_self
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("convertGTback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("convertGTback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.convertGTback", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_26convertGTback(__pyx_self, __pyx_v_self, __pyx_v_GTdata);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":599
- *             return [".","|","."]
- * 
- *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
- *         return ''.join(map(str,GTdata))
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_26convertGTback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_GTdata) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("convertGTback", 0);
 
-  /* "pysam/cvcf.pyx":600
+  /* "pysam/cvcf.pyx":601
  * 
  *     def convertGTback(self, GTdata):
  *         return ''.join(map(str,GTdata))             # <<<<<<<<<<<<<<
@@ -13220,38 +13319,36 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_26convertGTback(CYTHON_UNUSED PyObje
  *     def parse_formatdata( self, key, value, formatdict, line ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __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 = 600; __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 = 601; __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 = 600; __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))));
+  PyTuple_SET_ITEM(__pyx_t_1, 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);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_GTdata);
   __Pyx_GIVEREF(__pyx_v_GTdata);
-  __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 = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__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 = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); 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);
-  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, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":600
+ *             return [".","|","."]
+ * 
+ *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
+ *         return ''.join(map(str,GTdata))
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_AddTraceback("pysam.cvcf.VCF.convertGTback", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -13260,6 +13357,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_26convertGTback(CYTHON_UNUSED PyObje
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":603
+ *         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)
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_29parse_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_29parse_formatdata = {__Pyx_NAMESTR("parse_formatdata"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_29parse_formatdata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -13269,11 +13374,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_29parse_formatdata(PyObject *__pyx_s
   PyObject *__pyx_v_value = 0;
   PyObject *__pyx_v_formatdict = 0;
   PyObject *__pyx_v_line = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("parse_formatdata (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__key,&__pyx_n_s__value,&__pyx_n_s__formatdict,&__pyx_n_s__line,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,&__pyx_n_s_value,&__pyx_n_s_formatdict,&__pyx_n_s_line,0};
     PyObject* values[5] = {0,0,0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -13290,31 +13398,31 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_29parse_formatdata(PyObject *__pyx_s
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
-        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__formatdict)) != 0)) kw_args--;
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_formatdict)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  4:
-        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_formatdata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_formatdata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
       goto __pyx_L5_argtuple_error;
@@ -13333,25 +13441,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_29parse_formatdata(PyObject *__pyx_s
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_value, __pyx_v_formatdict, __pyx_v_line);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":602
- *         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)
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_line) {
   PyObject *__pyx_v_f = NULL;
   PyObject *__pyx_v_values = NULL;
@@ -13383,16 +13485,16 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("parse_formatdata", 0);
 
-  /* "pysam/cvcf.pyx":604
+  /* "pysam/cvcf.pyx":605
  *     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 )
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_formatdict, __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_formatdict, __pyx_n_s_get); 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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_key);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
@@ -13400,35 +13502,35 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
   __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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_v_f = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":605
+  /* "pysam/cvcf.pyx":606
  *         # 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]
  */
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_f, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_f, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_4) {
 
-    /* "pysam/cvcf.pyx":606
+    /* "pysam/cvcf.pyx":607
  *         f = formatdict.get(key,None)
  *         if f == None:
  *             self._add_definition(formatdict, key, value, line )             # <<<<<<<<<<<<<<
  *             f = formatdict[key]
  *         if f.type == "Flag":
  */
-    __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 = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_definition); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __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 = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_v_formatdict);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_formatdict);
@@ -13442,44 +13544,41 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
     __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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":607
+    /* "pysam/cvcf.pyx":608
  *         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)
  */
-    __pyx_t_1 = PyObject_GetItem(__pyx_v_formatdict, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetItem(__pyx_v_formatdict, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_1;
+    __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1);
     __pyx_t_1 = 0;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":608
+  /* "pysam/cvcf.pyx":609
  *             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 []
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Flag), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_Flag, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_4) {
 
-    /* "pysam/cvcf.pyx":609
+    /* "pysam/cvcf.pyx":610
  *             f = formatdict[key]
  *         if f.type == "Flag":
  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)             # <<<<<<<<<<<<<<
@@ -13487,29 +13586,30 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
  *         values = value.split(',')
  */
     __pyx_t_4 = (__pyx_v_value != Py_None);
-    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 = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_96); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = (__pyx_t_4 != 0);
+    if (__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __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 = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_FLAG_HAS_VALUE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __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 = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __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_t_2); __pyx_t_2 = 0;
       goto __pyx_L5;
     }
     __pyx_L5:;
 
-    /* "pysam/cvcf.pyx":610
+    /* "pysam/cvcf.pyx":611
  *         if f.type == "Flag":
  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
  *             return []             # <<<<<<<<<<<<<<
@@ -13517,148 +13617,140 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
  *         # deal with trailing data in some early VCF files
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = ((PyObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
+    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L4;
   }
-  __pyx_L4:;
 
-  /* "pysam/cvcf.pyx":611
+  /* "pysam/cvcf.pyx":612
  *             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_t_1 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__62, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_v_values = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":613
+  /* "pysam/cvcf.pyx":614
  *         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_3 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__Float), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (!((int)__pyx_t_4)) {
-    __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__Integer), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_6 = ((int)__pyx_t_5);
+  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_Float, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_5) {
+    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_Integer, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __pyx_t_4;
   } else {
-    __pyx_t_6 = ((int)__pyx_t_4);
+    __pyx_t_6 = __pyx_t_5;
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_4 = __pyx_t_6;
-  if (__pyx_t_4) {
-    __pyx_t_7 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __pyx_t_6;
+  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 = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_6 = (__pyx_t_7 > 0);
     if (__pyx_t_6) {
-      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_find); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __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_1, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __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); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_8 = __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 = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_8 = __pyx_t_4;
     } else {
       __pyx_t_8 = __pyx_t_6;
     }
     __pyx_t_6 = __pyx_t_8;
   } else {
-    __pyx_t_6 = __pyx_t_4;
+    __pyx_t_6 = __pyx_t_5;
   }
   if (__pyx_t_6) {
 
-    /* "pysam/cvcf.pyx":614
+    /* "pysam/cvcf.pyx":615
  *         # 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_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __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 = 614; __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 = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __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 = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_TRAILING_DATA); 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_t_1 = __Pyx_GetItemInt(__pyx_v_values, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __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);
     __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_9, 2, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
     __pyx_t_3 = 0;
-    __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 = 614; __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_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); 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);
     __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;
 
-    /* "pysam/cvcf.pyx":615
+    /* "pysam/cvcf.pyx":616
  *         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_2 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __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 = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_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_k_tuple_99), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__64, NULL); 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(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __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_9, sizeof(long), PyInt_FromLong) < 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;
+    if (unlikely(__Pyx_SetItemInt(__pyx_v_values, -1, __pyx_t_9, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "pysam/cvcf.pyx":616
+  /* "pysam/cvcf.pyx":617
  *             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_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __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); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_Integer, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_6) {
 
-    /* "pysam/cvcf.pyx":617
+    /* "pysam/cvcf.pyx":618
  *             values[-1] = values[-1].split(';')[0]
  *         if f.type == "Integer":
  *             for idx,v in enumerate(values):             # <<<<<<<<<<<<<<
@@ -13666,54 +13758,53 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
  *                     if v == ".": values[idx] = f.missingvalue
  */
     __Pyx_INCREF(__pyx_int_0);
-    __pyx_t_2 = __pyx_int_0;
+    __pyx_t_9 = __pyx_int_0;
     if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
-      __pyx_t_9 = __pyx_v_values; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
+      __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
       __pyx_t_10 = NULL;
     } else {
-      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
+      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext;
     }
     for (;;) {
-      if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_9)) {
-        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
+      if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_9)) {
-        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+      } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_1 = __pyx_t_10(__pyx_t_9);
-        if (unlikely(!__pyx_t_1)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __pyx_t_10(__pyx_t_1);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_2);
       }
-      __Pyx_XDECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_1;
-      __pyx_t_1 = 0;
-      __Pyx_INCREF(__pyx_t_2);
-      __Pyx_XDECREF(__pyx_v_idx);
-      __pyx_v_idx = __pyx_t_2;
-      __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_2);
-      __pyx_t_2 = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2);
+      __pyx_t_2 = 0;
+      __Pyx_INCREF(__pyx_t_9);
+      __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_9);
+      __pyx_t_2 = PyNumber_Add(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_9);
+      __pyx_t_9 = __pyx_t_2;
+      __pyx_t_2 = 0;
 
-      /* "pysam/cvcf.pyx":618
+      /* "pysam/cvcf.pyx":619
  *         if f.type == "Integer":
  *             for idx,v in enumerate(values):
  *                 try:             # <<<<<<<<<<<<<<
@@ -13727,42 +13818,34 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
         __Pyx_XGOTREF(__pyx_t_13);
         /*try:*/ {
 
-          /* "pysam/cvcf.pyx":619
+          /* "pysam/cvcf.pyx":620
  *             for idx,v in enumerate(values):
  *                 try:
  *                     if v == ".": values[idx] = f.missingvalue             # <<<<<<<<<<<<<<
  *                     else:        values[idx] = int(v)
  *                 except:
  */
-          __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_v, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
           if (__pyx_t_6) {
-            __pyx_t_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L10_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 = 619; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_missingvalue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_2);
+            if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
             goto __pyx_L18;
           }
           /*else*/ {
 
-            /* "pysam/cvcf.pyx":620
+            /* "pysam/cvcf.pyx":621
  *                 try:
  *                     if v == ".": values[idx] = f.missingvalue
  *                     else:        values[idx] = int(v)             # <<<<<<<<<<<<<<
  *                 except:
  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))
  */
-            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_GOTREF(__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*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L10_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 = 620; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
-            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            __pyx_t_2 = PyNumber_Int(__pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_2);
+            if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
           }
           __pyx_L18:;
         }
@@ -13771,10 +13854,10 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
         __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
         goto __pyx_L17_try_end;
         __pyx_L10_error:;
-        __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;
 
-        /* "pysam/cvcf.pyx":621
+        /* "pysam/cvcf.pyx":622
  *                     if v == ".": values[idx] = f.missingvalue
  *                     else:        values[idx] = int(v)
  *                 except:             # <<<<<<<<<<<<<<
@@ -13783,31 +13866,31 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
  */
         /*except:*/ {
           __Pyx_AddTraceback("pysam.cvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
-          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_GOTREF(__pyx_t_2);
           __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_GOTREF(__pyx_t_1);
           __Pyx_GOTREF(__pyx_t_14);
 
-          /* "pysam/cvcf.pyx":622
+          /* "pysam/cvcf.pyx":623
  *                     else:        values[idx] = int(v)
  *                 except:
  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))             # <<<<<<<<<<<<<<
  *                     return [0] * len(values)
  *             return values
  */
-          __pyx_t_15 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
           __Pyx_GOTREF(__pyx_t_15);
-          __pyx_t_16 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_100); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_FORMAT_NOT_INTEGER); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
           __Pyx_GOTREF(__pyx_t_16);
-          __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
           __Pyx_GOTREF(__pyx_t_17);
           __Pyx_INCREF(__pyx_v_values);
           PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_values);
           __Pyx_GIVEREF(__pyx_v_values);
-          __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_18 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
           __Pyx_GOTREF(__pyx_t_18);
-          __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
-          __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+          __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
           __Pyx_GOTREF(__pyx_t_17);
           __Pyx_INCREF(__pyx_v_key);
           PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_key);
@@ -13815,27 +13898,27 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
           PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18);
           __Pyx_GIVEREF(__pyx_t_18);
           __pyx_t_18 = 0;
-          __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), ((PyObject *)__pyx_t_17)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-          __Pyx_GOTREF(((PyObject *)__pyx_t_18));
-          __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
-          __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_18 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_17); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_GOTREF(__pyx_t_18);
+          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+          __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
           __Pyx_GOTREF(__pyx_t_17);
           __Pyx_INCREF(__pyx_v_line);
           PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_line);
           __Pyx_GIVEREF(__pyx_v_line);
           PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_16);
           __Pyx_GIVEREF(__pyx_t_16);
-          PyTuple_SET_ITEM(__pyx_t_17, 2, ((PyObject *)__pyx_t_18));
-          __Pyx_GIVEREF(((PyObject *)__pyx_t_18));
+          PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_18);
+          __Pyx_GIVEREF(__pyx_t_18);
           __pyx_t_16 = 0;
           __pyx_t_18 = 0;
-          __pyx_t_18 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
           __Pyx_GOTREF(__pyx_t_18);
           __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-          __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
+          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
           __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
 
-          /* "pysam/cvcf.pyx":623
+          /* "pysam/cvcf.pyx":624
  *                 except:
  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))
  *                     return [0] * len(values)             # <<<<<<<<<<<<<<
@@ -13843,8 +13926,8 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
  *         elif f.type == "String":
  */
           __Pyx_XDECREF(__pyx_r);
-          __pyx_t_19 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-          __pyx_t_18 = PyList_New(1 * ((__pyx_t_19<0) ? 0:__pyx_t_19)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_19 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __pyx_t_18 = PyList_New(1 * ((__pyx_t_19<0) ? 0:__pyx_t_19)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
           __Pyx_GOTREF(__pyx_t_18);
           { Py_ssize_t __pyx_temp;
             for (__pyx_temp=0; __pyx_temp < __pyx_t_19; __pyx_temp++) {
@@ -13853,7 +13936,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
               __Pyx_GIVEREF(__pyx_int_0);
             }
           }
-          __pyx_r = ((PyObject *)__pyx_t_18);
+          __pyx_r = __pyx_t_18;
           __pyx_t_18 = 0;
           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -13861,8 +13944,8 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
           goto __pyx_L13_except_return;
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
           __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
           goto __pyx_L11_exception_handled;
         }
@@ -13886,10 +13969,10 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
         __pyx_L17_try_end:;
       }
     }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":624
+    /* "pysam/cvcf.pyx":625
  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))
  *                     return [0] * len(values)
  *             return values             # <<<<<<<<<<<<<<
@@ -13900,76 +13983,70 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
     __Pyx_INCREF(__pyx_v_values);
     __pyx_r = __pyx_v_values;
     goto __pyx_L0;
-    goto __pyx_L7;
   }
 
-  /* "pysam/cvcf.pyx":625
+  /* "pysam/cvcf.pyx":626
  *                     return [0] * len(values)
  *             return values
  *         elif f.type == "String":             # <<<<<<<<<<<<<<
  *             self._line = line
  *             if f.id == "GT": values = list(map( self.convertGT, values ))
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__String), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __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 = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_String, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   if (__pyx_t_6) {
 
-    /* "pysam/cvcf.pyx":626
+    /* "pysam/cvcf.pyx":627
  *             return values
  *         elif f.type == "String":
  *             self._line = line             # <<<<<<<<<<<<<<
  *             if f.id == "GT": values = list(map( self.convertGT, values ))
  *             return values
  */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___line, __pyx_v_line) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_line_2, __pyx_v_line) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "pysam/cvcf.pyx":627
+    /* "pysam/cvcf.pyx":628
  *         elif f.type == "String":
  *             self._line = line
  *             if f.id == "GT": values = list(map( self.convertGT, values ))             # <<<<<<<<<<<<<<
  *             return values
  *         elif f.type == "Character":
  */
-    __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __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); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_GT, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     if (__pyx_t_6) {
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__convertGT); 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_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_convertGT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __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_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
       __Pyx_INCREF(__pyx_v_values);
-      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_values);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_values);
       __Pyx_GIVEREF(__pyx_v_values);
-      __pyx_t_2 = 0;
-      __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 = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __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 = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __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_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_9), NULL); 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(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-      __Pyx_DECREF(__pyx_v_values);
-      __pyx_v_values = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
+      __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_9);
+      __pyx_t_9 = 0;
       goto __pyx_L21;
     }
     __pyx_L21:;
 
-    /* "pysam/cvcf.pyx":628
+    /* "pysam/cvcf.pyx":629
  *             self._line = line
  *             if f.id == "GT": values = list(map( self.convertGT, values ))
  *             return values             # <<<<<<<<<<<<<<
@@ -13980,25 +14057,22 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
     __Pyx_INCREF(__pyx_v_values);
     __pyx_r = __pyx_v_values;
     goto __pyx_L0;
-    goto __pyx_L7;
   }
 
-  /* "pysam/cvcf.pyx":629
+  /* "pysam/cvcf.pyx":630
  *             if f.id == "GT": values = list(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)
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); 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);
-  __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__Character), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __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 = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_Character, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   if (__pyx_t_6) {
 
-    /* "pysam/cvcf.pyx":630
+    /* "pysam/cvcf.pyx":631
  *             return values
  *         elif f.type == "Character":
  *             for v in values:             # <<<<<<<<<<<<<<
@@ -14009,7 +14083,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
       __pyx_t_9 = __pyx_v_values; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
       __pyx_t_10 = NULL;
     } else {
-      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_values); 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 = Py_TYPE(__pyx_t_9)->tp_iternext;
     }
@@ -14017,58 +14091,58 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
       if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_9)) {
         if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_9)) {
         if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_2 = __pyx_t_10(__pyx_t_9);
-        if (unlikely(!__pyx_t_2)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __pyx_t_10(__pyx_t_9);
+        if (unlikely(!__pyx_t_1)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_1);
       }
-      __Pyx_XDECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+      __pyx_t_1 = 0;
 
-      /* "pysam/cvcf.pyx":631
+      /* "pysam/cvcf.pyx":632
  *         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":
  */
-      __pyx_t_19 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_6 = (__pyx_t_19 != 1);
+      __pyx_t_19 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = ((__pyx_t_19 != 1) != 0);
       if (__pyx_t_6) {
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_14 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_101); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_14);
-        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_FORMAT_NOT_CHAR); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_14);
+        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_14);
         __Pyx_GIVEREF(__pyx_t_14);
         __pyx_t_14 = 0;
-        __pyx_t_14 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_14);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
         goto __pyx_L24;
       }
@@ -14076,7 +14150,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
     }
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-    /* "pysam/cvcf.pyx":632
+    /* "pysam/cvcf.pyx":633
  *             for v in values:
  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)
  *             return values             # <<<<<<<<<<<<<<
@@ -14087,25 +14161,22 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
     __Pyx_INCREF(__pyx_v_values);
     __pyx_r = __pyx_v_values;
     goto __pyx_L0;
-    goto __pyx_L7;
   }
 
-  /* "pysam/cvcf.pyx":633
+  /* "pysam/cvcf.pyx":634
  *                 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_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_14 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_n_s__Float), Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_Float, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
   if (__pyx_t_6) {
 
-    /* "pysam/cvcf.pyx":634
+    /* "pysam/cvcf.pyx":635
  *             return values
  *         elif f.type == "Float":
  *             for idx,v in enumerate(values):             # <<<<<<<<<<<<<<
@@ -14113,76 +14184,73 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
  *             try: return list(map(float,values))
  */
     __Pyx_INCREF(__pyx_int_0);
-    __pyx_t_14 = __pyx_int_0;
+    __pyx_t_9 = __pyx_int_0;
     if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
-      __pyx_t_9 = __pyx_v_values; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
+      __pyx_t_14 = __pyx_v_values; __Pyx_INCREF(__pyx_t_14); __pyx_t_7 = 0;
       __pyx_t_10 = NULL;
     } else {
-      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
+      __pyx_t_7 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      __pyx_t_10 = Py_TYPE(__pyx_t_14)->tp_iternext;
     }
     for (;;) {
-      if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_9)) {
-        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
+      if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_14)) {
+        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_14)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_9)) {
-        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+      } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_14)) {
+        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_1 = __pyx_t_10(__pyx_t_9);
-        if (unlikely(!__pyx_t_1)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = __pyx_t_10(__pyx_t_14);
+        if (unlikely(!__pyx_t_3)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_3);
       }
-      __Pyx_XDECREF(__pyx_v_v);
-      __pyx_v_v = __pyx_t_1;
-      __pyx_t_1 = 0;
-      __Pyx_INCREF(__pyx_t_14);
-      __Pyx_XDECREF(__pyx_v_idx);
-      __pyx_v_idx = __pyx_t_14;
-      __pyx_t_1 = PyNumber_Add(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_14);
-      __pyx_t_14 = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3);
+      __pyx_t_3 = 0;
+      __Pyx_INCREF(__pyx_t_9);
+      __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_9);
+      __pyx_t_3 = PyNumber_Add(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_9);
+      __pyx_t_9 = __pyx_t_3;
+      __pyx_t_3 = 0;
 
-      /* "pysam/cvcf.pyx":635
+      /* "pysam/cvcf.pyx":636
  *         elif f.type == "Float":
  *             for idx,v in enumerate(values):
  *                 if v == ".": values[idx] = f.missingvalue             # <<<<<<<<<<<<<<
  *             try: return list(map(float,values))
  *             except:
  */
-      __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_v, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       if (__pyx_t_6) {
-        __pyx_t_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __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 = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_missingvalue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         goto __pyx_L27;
       }
       __pyx_L27:;
     }
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
-    /* "pysam/cvcf.pyx":636
+    /* "pysam/cvcf.pyx":637
  *             for idx,v in enumerate(values):
  *                 if v == ".": values[idx] = f.missingvalue
  *             try: return list(map(float,values))             # <<<<<<<<<<<<<<
@@ -14196,51 +14264,45 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
       __Pyx_XGOTREF(__pyx_t_11);
       /*try:*/ {
         __Pyx_XDECREF(__pyx_r);
-        __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
-        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
+        __Pyx_GOTREF(__pyx_t_9);
         __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
-        PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)((PyObject*)(&PyFloat_Type))));
+        PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)((PyObject*)(&PyFloat_Type))));
         __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
         __Pyx_INCREF(__pyx_v_values);
-        PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_values);
+        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_values);
         __Pyx_GIVEREF(__pyx_v_values);
-        __pyx_t_9 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
-        __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
+        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_9, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
         __Pyx_GOTREF(__pyx_t_14);
-        PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9);
-        __Pyx_GIVEREF(__pyx_t_9);
-        __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
+        __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 = 637; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
-        __pyx_r = __pyx_t_9;
-        __pyx_t_9 = 0;
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14);
+        __Pyx_GIVEREF(__pyx_t_14);
+        __pyx_t_14 = 0;
+        __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_r = __pyx_t_14;
+        __pyx_t_14 = 0;
         goto __pyx_L32_try_return;
       }
       __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
       __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
       goto __pyx_L35_try_end;
-      __pyx_L32_try_return:;
-      __Pyx_XGIVEREF(__pyx_t_13);
-      __Pyx_XGIVEREF(__pyx_t_12);
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
-      goto __pyx_L0;
       __pyx_L28_error:;
       __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
       __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
 
-      /* "pysam/cvcf.pyx":637
+      /* "pysam/cvcf.pyx":638
  *                 if v == ".": values[idx] = f.missingvalue
  *             try: return list(map(float,values))
  *             except:             # <<<<<<<<<<<<<<
@@ -14249,31 +14311,31 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
  */
       /*except:*/ {
         __Pyx_AddTraceback("pysam.cvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_14, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_9, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_14);
-        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(__pyx_t_3);
 
-        /* "pysam/cvcf.pyx":638
+        /* "pysam/cvcf.pyx":639
  *             try: return list(map(float,values))
  *             except:
  *                 self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values)))             # <<<<<<<<<<<<<<
  *                 return [0.0] * len(values)
  *         else:
  */
-        __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_L30_except_error;}
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_102); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_18);
         __Pyx_INCREF(__pyx_v_values);
         PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_values);
         __Pyx_GIVEREF(__pyx_v_values);
-        __pyx_t_17 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __pyx_t_17 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_17);
-        __Pyx_DECREF(((PyObject *)__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 = 638; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __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 = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_18);
         __Pyx_INCREF(__pyx_v_key);
         PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_key);
@@ -14281,27 +14343,27 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
         PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_17);
         __Pyx_GIVEREF(__pyx_t_17);
         __pyx_t_17 = 0;
-        __pyx_t_17 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_17));
-        __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 = 638; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __pyx_t_17 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_18); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __Pyx_GOTREF(__pyx_t_17);
+        __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 = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__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_3);
-        __Pyx_GIVEREF(__pyx_t_3);
-        PyTuple_SET_ITEM(__pyx_t_18, 2, ((PyObject *)__pyx_t_17));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_17));
-        __pyx_t_3 = 0;
+        PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_17);
+        __Pyx_GIVEREF(__pyx_t_17);
+        __pyx_t_2 = 0;
         __pyx_t_17 = 0;
-        __pyx_t_17 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_17);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
         __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
 
-        /* "pysam/cvcf.pyx":639
+        /* "pysam/cvcf.pyx":640
  *             except:
  *                 self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values)))
  *                 return [0.0] * len(values)             # <<<<<<<<<<<<<<
@@ -14309,28 +14371,25 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
  *             # can't happen
  */
         __Pyx_XDECREF(__pyx_r);
-        __pyx_t_17 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __pyx_t_7 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __pyx_t_17 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_17);
-        __pyx_t_7 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
-        __pyx_t_18 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
-        __Pyx_GOTREF(__pyx_t_18);
         { Py_ssize_t __pyx_temp;
           for (__pyx_temp=0; __pyx_temp < __pyx_t_7; __pyx_temp++) {
-            __Pyx_INCREF(__pyx_t_17);
-            PyList_SET_ITEM(__pyx_t_18, __pyx_temp, __pyx_t_17);
-            __Pyx_GIVEREF(__pyx_t_17);
+            __Pyx_INCREF(__pyx_float_0_0);
+            PyList_SET_ITEM(__pyx_t_17, __pyx_temp, __pyx_float_0_0);
+            __Pyx_GIVEREF(__pyx_float_0_0);
           }
         }
-        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
-        __pyx_r = ((PyObject *)__pyx_t_18);
-        __pyx_t_18 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_r = __pyx_t_17;
+        __pyx_t_17 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
         __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
         goto __pyx_L31_except_return;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
         __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
         goto __pyx_L29_exception_handled;
       }
       __pyx_L30_except_error:;
@@ -14339,6 +14398,12 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
       __Pyx_XGIVEREF(__pyx_t_11);
       __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
       goto __pyx_L1_error;
+      __pyx_L32_try_return:;
+      __Pyx_XGIVEREF(__pyx_t_13);
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
+      goto __pyx_L0;
       __pyx_L31_except_return:;
       __Pyx_XGIVEREF(__pyx_t_13);
       __Pyx_XGIVEREF(__pyx_t_12);
@@ -14352,37 +14417,44 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
       __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
       __pyx_L35_try_end:;
     }
-    goto __pyx_L7;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":642
+    /* "pysam/cvcf.pyx":643
  *         else:
  *             # can't happen
  *             self.error(line,self.ERROR_INFO_STRING)             # <<<<<<<<<<<<<<
  * 
  *     def inregion(self, chrom, pos):
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_14 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_14);
-    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_INFO_STRING); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_14);
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_14);
-    __Pyx_GIVEREF(__pyx_t_14);
-    __pyx_t_14 = 0;
-    __pyx_t_14 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_14);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+    PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __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_14); __pyx_t_14 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   }
-  __pyx_L7:;
 
+  /* "pysam/cvcf.pyx":603
+ *         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)
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -14407,6 +14479,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyO
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":645
+ *             self.error(line,self.ERROR_INFO_STRING)
+ * 
+ *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
+ *         if not self._regions: return True
+ *         for r in self._regions:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_31inregion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_31inregion = {__Pyx_NAMESTR("inregion"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_31inregion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -14414,11 +14494,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_31inregion(PyObject *__pyx_self, PyO
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_chrom = 0;
   PyObject *__pyx_v_pos = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("inregion (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__chrom,&__pyx_n_s__pos,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_chrom,&__pyx_n_s_pos,0};
     PyObject* values[3] = {0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -14433,21 +14516,21 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_31inregion(PyObject *__pyx_self, PyO
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__chrom)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chrom)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inregion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inregion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
       goto __pyx_L5_argtuple_error;
@@ -14462,25 +14545,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_31inregion(PyObject *__pyx_self, PyO
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.inregion", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_30inregion(__pyx_self, __pyx_v_self, __pyx_v_chrom, __pyx_v_pos);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":644
- *             self.error(line,self.ERROR_INFO_STRING)
- * 
- *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
- *         if not self._regions: return True
- *         for r in self._regions:
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_pos) {
   PyObject *__pyx_v_r = NULL;
   PyObject *__pyx_r = NULL;
@@ -14499,43 +14576,39 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("inregion", 0);
 
-  /* "pysam/cvcf.pyx":645
+  /* "pysam/cvcf.pyx":646
  * 
  *     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
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___regions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_regions_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __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 = 645; __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 = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = (!__pyx_t_2);
+  __pyx_t_3 = ((!__pyx_t_2) != 0);
   if (__pyx_t_3) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __Pyx_INCREF(Py_True);
+    __pyx_r = Py_True;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":646
+  /* "pysam/cvcf.pyx":647
  *     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
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___regions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_regions_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __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_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
     __pyx_t_6 = NULL;
   } else {
-    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
   }
@@ -14544,58 +14617,58 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *_
     if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
       if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
       if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_1 = __pyx_t_6(__pyx_t_4);
       if (unlikely(!__pyx_t_1)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_1);
     }
-    __Pyx_XDECREF(__pyx_v_r);
-    __pyx_v_r = __pyx_t_1;
+    __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1);
     __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":647
+    /* "pysam/cvcf.pyx":648
  *         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
  * 
  */
-    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_r, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_r, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_v_chrom, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_v_chrom, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     if (__pyx_t_3) {
-      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_r, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_r, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_v_pos, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_v_pos, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
         __Pyx_DECREF(__pyx_t_1);
-        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_r, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_r, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
       }
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __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 = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __pyx_t_9 = __pyx_t_2;
     } else {
@@ -14603,19 +14676,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *_
     }
     if (__pyx_t_9) {
       __Pyx_XDECREF(__pyx_r);
-      __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_r = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __Pyx_INCREF(Py_True);
+      __pyx_r = Py_True;
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       goto __pyx_L0;
-      goto __pyx_L6;
     }
-    __pyx_L6:;
   }
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "pysam/cvcf.pyx":648
+  /* "pysam/cvcf.pyx":649
  *         for r in self._regions:
  *             if r[0] == chrom and r[1] <= pos < r[2]: return True
  *         return False             # <<<<<<<<<<<<<<
@@ -14623,14 +14692,19 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *_
  *     def parse_data( self, line, lineparse=False ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_r = __pyx_t_4;
-  __pyx_t_4 = 0;
+  __Pyx_INCREF(Py_False);
+  __pyx_r = Py_False;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":645
+ *             self.error(line,self.ERROR_INFO_STRING)
+ * 
+ *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
+ *         if not self._regions: return True
+ *         for r in self._regions:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_4);
@@ -14645,7 +14719,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *_
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":650
+/* "pysam/cvcf.pyx":651
  *         return False
  * 
  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
@@ -14653,36 +14727,6 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *_
  *         if len(cols) != len(self._samples)+9:
  */
 
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_93__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__defaults__", 0);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lineparse);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lineparse);
-  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lineparse);
-  __pyx_r = ((PyObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("pysam.cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_33parse_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_33parse_data = {__Pyx_NAMESTR("parse_data"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_33parse_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -14690,14 +14734,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_33parse_data(PyObject *__pyx_self, P
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_lineparse = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("parse_data (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,&__pyx_n_s__lineparse,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,&__pyx_n_s_lineparse,0};
     PyObject* values[3] = {0,0,0};
-    __pyx_defaults4 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self);
-    values[2] = __pyx_dynamic_args->__pyx_arg_lineparse;
+    values[2] = ((PyObject *)((PyObject *)Py_False));
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -14711,21 +14757,21 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_33parse_data(PyObject *__pyx_self, P
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse_data", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse_data", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lineparse);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lineparse);
           if (value) { values[2] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_data") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_data") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -14742,175 +14788,20 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_33parse_data(PyObject *__pyx_self, P
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("parse_data", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("parse_data", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_32parse_data(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_lineparse);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_10parse_data_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-
-/* "pysam/cvcf.pyx":793
- *         if alt:
- *             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]
- */
-
-static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_10parse_data_genexpr(PyObject *__pyx_self) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("genexpr", 0);
-  __pyx_cur_scope = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *)__pyx_ptype_5pysam_4cvcf___pyx_scope_struct_1_genexpr->tp_new(__pyx_ptype_5pysam_4cvcf___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
-  if (unlikely(!__pyx_cur_scope)) {
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __Pyx_GOTREF(__pyx_cur_scope);
-  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *) __pyx_self;
-  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
-  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
-  {
-    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_4cvcf_3VCF_10parse_data_2generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_cur_scope);
-    __Pyx_RefNannyFinishContext();
-    return (PyObject *) gen;
-  }
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_AddTraceback("pysam.cvcf.VCF.parse_data.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
-  __Pyx_XGIVEREF(__pyx_r);
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_10parse_data_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
-{
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
-  PyObject *__pyx_r = NULL;
-  PyObject *__pyx_t_1 = NULL;
-  Py_ssize_t __pyx_t_2;
-  PyObject *(*__pyx_t_3)(PyObject *);
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = NULL;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("None", 0);
-  switch (__pyx_generator->resume_label) {
-    case 0: goto __pyx_L3_first_run;
-    case 1: goto __pyx_L6_resume_from_yield;
-    default: /* CPython raises the right error here */
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __pyx_L3_first_run:;
-  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt)) { __Pyx_RaiseClosureNameError("alt"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt)) {
-    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
-    __pyx_t_3 = NULL;
-  } else {
-    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
-  }
-  for (;;) {
-    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
-      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
-      #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      #endif
-    } else {
-      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
-      if (unlikely(!__pyx_t_4)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_4);
-    }
-    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_allele);
-    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_allele);
-    __Pyx_GIVEREF(__pyx_t_4);
-    __pyx_cur_scope->__pyx_v_allele = __pyx_t_4;
-    __pyx_t_4 = 0;
-    __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_allele, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__upper); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_r = __pyx_t_4;
-    __pyx_t_4 = 0;
-    __Pyx_XGIVEREF(__pyx_t_1);
-    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
-    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
-    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
-    __Pyx_XGIVEREF(__pyx_r);
-    __Pyx_RefNannyFinishContext();
-    /* return from generator, yielding value */
-    __pyx_generator->resume_label = 1;
-    return __pyx_r;
-    __pyx_L6_resume_from_yield:;
-    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
-    __pyx_cur_scope->__pyx_t_0 = 0;
-    __Pyx_XGOTREF(__pyx_t_1);
-    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
-    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
-    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  PyErr_SetNone(PyExc_StopIteration);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_generator->resume_label = -1;
-  __Pyx_Generator_clear((PyObject*)__pyx_generator);
-  __Pyx_RefNannyFinishContext();
-  return NULL;
-}
-
-/* "pysam/cvcf.pyx":650
- *         return False
- * 
- *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
- *         cols = line.split('\t')
- *         if len(cols) != len(self._samples)+9:
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_lineparse) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *__pyx_cur_scope;
   PyObject *__pyx_v_cols = NULL;
   PyObject *__pyx_v_chrom = NULL;
   PyObject *__pyx_v_pos = NULL;
@@ -14920,6 +14811,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
   PyObject *__pyx_v_left = NULL;
   PyObject *__pyx_v_faref_leftflank = NULL;
   PyObject *__pyx_v_faref = NULL;
+  PyObject *__pyx_v_alt = NULL;
   double __pyx_v_qual;
   PyObject *__pyx_v_filter = NULL;
   PyObject *__pyx_v_info = NULL;
@@ -14945,7 +14837,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
   PyObject *__pyx_v_sample = NULL;
   PyObject *__pyx_v_dict = NULL;
   PyObject *__pyx_v_values = NULL;
-  PyObject *__pyx_v_idx = NULL;
+  Py_ssize_t __pyx_v_idx;
   PyObject *__pyx_v_expected = NULL;
   PyObject *__pyx_v_value = NULL;
   PyObject *__pyx_v_d = NULL;
@@ -14957,7 +14849,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
   Py_ssize_t __pyx_t_3;
   Py_ssize_t __pyx_t_4;
   int __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_6;
   PyObject *__pyx_t_7 = NULL;
   PyObject *__pyx_t_8 = NULL;
   PyObject *__pyx_t_9 = NULL;
@@ -14965,182 +14857,182 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
   PyObject *__pyx_t_11 = NULL;
   PyObject *__pyx_t_12 = NULL;
   PyObject *__pyx_t_13 = NULL;
-  int __pyx_t_14;
-  PyObject *(*__pyx_t_15)(PyObject *);
-  long __pyx_t_16;
-  double __pyx_t_17;
-  int __pyx_t_18;
+  PyObject *__pyx_t_14 = NULL;
+  int __pyx_t_15;
+  PyObject *(*__pyx_t_16)(PyObject *);
+  long __pyx_t_17;
+  double __pyx_t_18;
   int __pyx_t_19;
   int __pyx_t_20;
-  Py_ssize_t __pyx_t_21;
-  PyObject *__pyx_t_22 = NULL;
+  int __pyx_t_21;
+  Py_ssize_t __pyx_t_22;
   PyObject *__pyx_t_23 = NULL;
   PyObject *__pyx_t_24 = NULL;
-  int __pyx_t_25;
-  PyObject *(*__pyx_t_26)(PyObject *);
+  PyObject *__pyx_t_25 = NULL;
+  Py_ssize_t __pyx_t_26;
   PyObject *(*__pyx_t_27)(PyObject *);
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("parse_data", 0);
-  __pyx_cur_scope = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *)__pyx_ptype_5pysam_4cvcf___pyx_scope_struct__parse_data->tp_new(__pyx_ptype_5pysam_4cvcf___pyx_scope_struct__parse_data, __pyx_empty_tuple, NULL);
-  if (unlikely(!__pyx_cur_scope)) {
-    __Pyx_RefNannyFinishContext();
-    return NULL;
-  }
-  __Pyx_GOTREF(__pyx_cur_scope);
 
-  /* "pysam/cvcf.pyx":651
+  /* "pysam/cvcf.pyx":652
  * 
  *     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_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_cols = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":652
+  /* "pysam/cvcf.pyx":653
  *     def parse_data( self, line, lineparse=False ):
  *         cols = line.split('\t')
  *         if len(cols) != len(self._samples)+9:             # <<<<<<<<<<<<<<
  *             # gracefully deal with absent FORMAT column
  *             # and those missing samples
  */
-  __pyx_t_3 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __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 = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __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 = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __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));
+  __pyx_t_5 = ((__pyx_t_3 != (__pyx_t_4 + 9)) != 0);
   if (__pyx_t_5) {
 
-    /* "pysam/cvcf.pyx":655
+    /* "pysam/cvcf.pyx":656
  *             # gracefully deal with absent FORMAT column
  *             # and those missing samples
  *             if len(cols) == 8:             # <<<<<<<<<<<<<<
  *                 cols.append("")
  *             else:
  */
-    __pyx_t_4 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = (__pyx_t_4 == 8);
+    __pyx_t_4 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = ((__pyx_t_4 == 8) != 0);
     if (__pyx_t_5) {
 
-      /* "pysam/cvcf.pyx":656
+      /* "pysam/cvcf.pyx":657
  *             # and those missing samples
  *             if len(cols) == 8:
  *                 cols.append("")             # <<<<<<<<<<<<<<
  *             else:
  *                 self.error(line,
  */
-      __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 = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_cols, __pyx_kp_s_); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L4;
     }
     /*else*/ {
 
-      /* "pysam/cvcf.pyx":658
+      /* "pysam/cvcf.pyx":659
  *                 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_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
 
-      /* "pysam/cvcf.pyx":659
+      /* "pysam/cvcf.pyx":660
  *             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_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_104); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BAD_NUMBER_OF_COLUMNS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
 
-      /* "pysam/cvcf.pyx":660
+      /* "pysam/cvcf.pyx":661
  *                 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_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_4 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_4 + 9)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_4 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyInt_FromSsize_t((__pyx_t_4 + 9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __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 = 661; __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); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_4 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __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 = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __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 = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_4); 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);
-      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
-      __Pyx_GIVEREF(__pyx_t_6);
-      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7);
+      __pyx_t_11 = PyTuple_New(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);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
       __Pyx_GIVEREF(__pyx_t_7);
-      PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_8);
+      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8);
       __Pyx_GIVEREF(__pyx_t_8);
-      PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
       __Pyx_GIVEREF(__pyx_t_9);
-      __pyx_t_6 = 0;
+      PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
       __pyx_t_7 = 0;
       __pyx_t_8 = 0;
       __pyx_t_9 = 0;
-      __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_105), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-      __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 = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = 0;
+      __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_expected_s_for_s_samples_s_got_s, __pyx_t_11); 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_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+      /* "pysam/cvcf.pyx":659
+ *                 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_11 = PyTuple_New(3); 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_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_1);
+      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
       __Pyx_GIVEREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_t_9));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
+      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
       __pyx_t_1 = 0;
-      __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_10 = 0;
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __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_10)); __pyx_t_10 = 0;
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     }
     __pyx_L4:;
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":662
+  /* "pysam/cvcf.pyx":663
  *                            "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
  */
-  __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_v_chrom = __pyx_t_9;
-  __pyx_t_9 = 0;
+  __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_v_chrom = __pyx_t_10;
+  __pyx_t_10 = 0;
 
-  /* "pysam/cvcf.pyx":665
+  /* "pysam/cvcf.pyx":666
  * 
  *         # get 0-based position
  *         try:    pos = int(cols[1])-1             # <<<<<<<<<<<<<<
@@ -15148,41 +15040,36 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  *         if pos < 0: self.error(line,self.POS_NOT_POSITIVE)
  */
   {
-    __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
-    __Pyx_XGOTREF(__pyx_t_11);
+    __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
     __Pyx_XGOTREF(__pyx_t_12);
     __Pyx_XGOTREF(__pyx_t_13);
+    __Pyx_XGOTREF(__pyx_t_14);
     /*try:*/ {
-      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
       __Pyx_GOTREF(__pyx_t_10);
-      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
-      __Pyx_GIVEREF(__pyx_t_9);
-      __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-      __pyx_t_10 = PyNumber_Subtract(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+      __pyx_t_11 = PyNumber_Int(__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = PyNumber_Subtract(__pyx_t_11, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L5_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_v_pos = __pyx_t_10;
       __pyx_t_10 = 0;
     }
-    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
     __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
     goto __pyx_L12_try_end;
     __pyx_L5_error:;
-    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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_11); __pyx_t_11 = 0;
     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-    /* "pysam/cvcf.pyx":666
+    /* "pysam/cvcf.pyx":667
  *         # get 0-based position
  *         try:    pos = int(cols[1])-1
  *         except: self.error(line,self.POS_NOT_NUMERICAL)             # <<<<<<<<<<<<<<
@@ -15191,89 +15078,90 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  */
     /*except:*/ {
       __Pyx_AddTraceback("pysam.cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
-      if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_GOTREF(__pyx_t_11);
       __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 = 666; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__POS_NOT_NUMERICAL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_POS_NOT_NUMERICAL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
       __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
-      __Pyx_GOTREF(__pyx_t_7);
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
-      __Pyx_GIVEREF(__pyx_t_8);
-      __pyx_t_8 = 0;
-      __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
-      __Pyx_GOTREF(__pyx_t_8);
+      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
+      __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      __Pyx_GOTREF(__pyx_t_9);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_11); __pyx_t_11 = 0;
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       goto __pyx_L6_exception_handled;
     }
     __pyx_L7_except_error:;
-    __Pyx_XGIVEREF(__pyx_t_11);
     __Pyx_XGIVEREF(__pyx_t_12);
     __Pyx_XGIVEREF(__pyx_t_13);
-    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+    __Pyx_XGIVEREF(__pyx_t_14);
+    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
     goto __pyx_L1_error;
     __pyx_L6_exception_handled:;
-    __Pyx_XGIVEREF(__pyx_t_11);
     __Pyx_XGIVEREF(__pyx_t_12);
     __Pyx_XGIVEREF(__pyx_t_13);
-    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+    __Pyx_XGIVEREF(__pyx_t_14);
+    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
     __pyx_L12_try_end:;
   }
 
-  /* "pysam/cvcf.pyx":667
+  /* "pysam/cvcf.pyx":668
  *         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 (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-  __pyx_t_2 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __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 = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  __pyx_t_2 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __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 = 668; __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 = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__POS_NOT_POSITIVE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __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 = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_POS_NOT_POSITIVE); 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_t_10 = PyTuple_New(2); 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(__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_9);
-    __Pyx_GIVEREF(__pyx_t_9);
-    __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
+    __Pyx_GIVEREF(__pyx_t_11);
+    __pyx_t_11 = 0;
+    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __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_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__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_11); __pyx_t_11 = 0;
     goto __pyx_L15;
   }
   __pyx_L15:;
 
-  /* "pysam/cvcf.pyx":670
+  /* "pysam/cvcf.pyx":671
  * 
  *         # implement filtering
  *         if not self.inregion(chrom,pos): return None             # <<<<<<<<<<<<<<
  * 
  *         # end of first-pass parse for sortedVCF
  */
-  __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__inregion); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __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 = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inregion); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_10);
   __Pyx_INCREF(__pyx_v_chrom);
   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_chrom);
@@ -15281,33 +15169,32 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
   __Pyx_INCREF(__pyx_v_pos);
   PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_pos);
   __Pyx_GIVEREF(__pyx_v_pos);
-  __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); 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_11); __pyx_t_11 = 0;
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_14 = (!__pyx_t_5);
-  if (__pyx_t_14) {
+  __pyx_t_15 = ((!__pyx_t_5) != 0);
+  if (__pyx_t_15) {
     __Pyx_XDECREF(__pyx_r);
     __Pyx_INCREF(Py_None);
     __pyx_r = Py_None;
     goto __pyx_L0;
-    goto __pyx_L16;
   }
-  __pyx_L16:;
 
-  /* "pysam/cvcf.pyx":673
+  /* "pysam/cvcf.pyx":674
  * 
  *         # end of first-pass parse for sortedVCF
  *         if lineparse: return chrom, pos, line             # <<<<<<<<<<<<<<
  * 
  *         id = cols[2]
  */
-  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_lineparse); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_14) {
+  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_lineparse); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_15) {
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_INCREF(__pyx_v_chrom);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
@@ -15318,142 +15205,138 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
     __Pyx_INCREF(__pyx_v_line);
     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    __pyx_r = ((PyObject *)__pyx_t_2);
+    __pyx_r = __pyx_t_2;
     __pyx_t_2 = 0;
     goto __pyx_L0;
-    goto __pyx_L17;
   }
-  __pyx_L17:;
 
-  /* "pysam/cvcf.pyx":675
+  /* "pysam/cvcf.pyx":676
  *         if lineparse: return chrom, pos, line
  * 
  *         id = cols[2]             # <<<<<<<<<<<<<<
  * 
  *         ref = cols[3].upper()
  */
-  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_v_id = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":677
+  /* "pysam/cvcf.pyx":678
  *         id = cols[2]
  * 
  *         ref = cols[3].upper()             # <<<<<<<<<<<<<<
  *         if ref == ".":
  *             self.error(line,self.MISSING_REF)
  */
-  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __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 = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __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 = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   __pyx_v_ref = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":678
+  /* "pysam/cvcf.pyx":679
  * 
  *         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_2 = PyObject_RichCompare(__pyx_v_ref, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_14) {
+  __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_v_ref, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_15) {
 
-    /* "pysam/cvcf.pyx":679
+    /* "pysam/cvcf.pyx":680
  *         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_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__MISSING_REF); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MISSING_REF); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __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 = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
     __Pyx_INCREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_line);
     __Pyx_GIVEREF(__pyx_v_line);
-    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
+    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10);
     __Pyx_GIVEREF(__pyx_t_10);
     __pyx_t_10 = 0;
-    __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __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_9)); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-    /* "pysam/cvcf.pyx":680
+    /* "pysam/cvcf.pyx":681
  *         if ref == ".":
  *             self.error(line,self.MISSING_REF)
  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)             # <<<<<<<<<<<<<<
  *             else:                   ref = ""
  *         else:
  */
-    __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__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_9 = PyObject_RichCompare(__pyx_t_10, __pyx_int_33, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_int_33, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    if (__pyx_t_14) {
-      __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 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_15) {
+      __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); 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);
+      if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_int_1); if (unlikely(!__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_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
       __Pyx_INCREF(__pyx_v_chrom);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_chrom);
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_chrom);
       __Pyx_GIVEREF(__pyx_v_chrom);
       __Pyx_INCREF(__pyx_v_pos);
-      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_pos);
+      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_pos);
       __Pyx_GIVEREF(__pyx_v_pos);
-      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_10);
       __Pyx_GIVEREF(__pyx_t_10);
-      PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_2);
       __Pyx_GIVEREF(__pyx_t_2);
       __pyx_t_10 = 0;
       __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __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_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-      __Pyx_DECREF(__pyx_v_ref);
-      __pyx_v_ref = __pyx_t_2;
+      __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_2);
       __pyx_t_2 = 0;
       goto __pyx_L19;
     }
     /*else*/ {
 
-      /* "pysam/cvcf.pyx":681
+      /* "pysam/cvcf.pyx":682
  *             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:
  */
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-      __Pyx_DECREF(__pyx_v_ref);
-      __pyx_v_ref = ((PyObject *)__pyx_kp_s_1);
+      __Pyx_INCREF(__pyx_kp_s_);
+      __Pyx_DECREF_SET(__pyx_v_ref, __pyx_kp_s_);
     }
     __pyx_L19:;
     goto __pyx_L18;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":683
+    /* "pysam/cvcf.pyx":684
  *             else:                   ref = ""
  *         else:
  *             for c in ref:             # <<<<<<<<<<<<<<
@@ -15462,183 +15345,188 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  */
     if (PyList_CheckExact(__pyx_v_ref) || PyTuple_CheckExact(__pyx_v_ref)) {
       __pyx_t_2 = __pyx_v_ref; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-      __pyx_t_15 = NULL;
+      __pyx_t_16 = NULL;
     } else {
-      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
+      __pyx_t_16 = Py_TYPE(__pyx_t_2)->tp_iternext;
     }
     for (;;) {
-      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
+      if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_2)) {
         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
+      } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_2)) {
         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_8 = __pyx_t_15(__pyx_t_2);
-        if (unlikely(!__pyx_t_8)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = __pyx_t_16(__pyx_t_2);
+        if (unlikely(!__pyx_t_9)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_GOTREF(__pyx_t_9);
       }
-      __Pyx_XDECREF(__pyx_v_c);
-      __pyx_v_c = __pyx_t_8;
-      __pyx_t_8 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_9);
+      __pyx_t_9 = 0;
 
-      /* "pysam/cvcf.pyx":684
+      /* "pysam/cvcf.pyx":685
  *         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_14 = (__Pyx_PySequence_Contains(__pyx_v_c, ((PyObject *)__pyx_n_s__ACGTN), Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_14) {
-        __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__UNKNOWN_CHAR_IN_REF); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_15 = (__Pyx_PySequence_Contains(__pyx_v_c, __pyx_n_s_ACGTN, Py_NE)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = (__pyx_t_15 != 0);
+      if (__pyx_t_5) {
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__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_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_UNKNOWN_CHAR_IN_REF); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__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_9);
-        __Pyx_GIVEREF(__pyx_t_9);
-        __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
+        __Pyx_GIVEREF(__pyx_t_11);
+        __pyx_t_11 = 0;
+        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
         goto __pyx_L22;
       }
       __pyx_L22:;
     }
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":685
+    /* "pysam/cvcf.pyx":686
  *             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_14 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__N), __pyx_v_ref, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_14) {
-      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_n_s_N, __pyx_v_ref, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_15 = (__pyx_t_5 != 0);
+    if (__pyx_t_15) {
+      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __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 = 685; __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 = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __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 = 686; __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 = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_t_11); 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;
-      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); 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(4); 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_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
       __Pyx_INCREF(__pyx_v_chrom);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_chrom);
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_chrom);
       __Pyx_GIVEREF(__pyx_v_chrom);
       __Pyx_INCREF(__pyx_v_pos);
-      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_pos);
+      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_pos);
       __Pyx_GIVEREF(__pyx_v_pos);
-      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_10);
       __Pyx_GIVEREF(__pyx_t_10);
-      PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_9);
-      __Pyx_GIVEREF(__pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_11);
+      __Pyx_GIVEREF(__pyx_t_11);
       __pyx_t_10 = 0;
-      __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_11 = 0;
+      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __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_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-      __Pyx_DECREF(__pyx_v_ref);
-      __pyx_v_ref = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_11);
+      __pyx_t_11 = 0;
       goto __pyx_L23;
     }
     __pyx_L23:;
   }
   __pyx_L18:;
 
-  /* "pysam/cvcf.pyx":688
+  /* "pysam/cvcf.pyx":689
  * 
  *         # make sure reference is sane
  *         if self._reference:             # <<<<<<<<<<<<<<
  *             left = max(0,pos-100)
  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)
  */
-  __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  if (__pyx_t_14) {
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  if (__pyx_t_15) {
 
-    /* "pysam/cvcf.pyx":689
+    /* "pysam/cvcf.pyx":690
  *         # 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:]
  */
-    __pyx_t_9 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_100); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_16 = 0;
-    __pyx_t_2 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_11 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_100); if (unlikely(!__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_17 = 0;
+    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyObject_RichCompare(__pyx_t_11, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    if (__pyx_t_14) {
-      __Pyx_INCREF(__pyx_t_9);
-      __pyx_t_8 = __pyx_t_9;
+    if (__pyx_t_15) {
+      __Pyx_INCREF(__pyx_t_11);
+      __pyx_t_9 = __pyx_t_11;
     } else {
-      __pyx_t_10 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__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_8 = __pyx_t_10;
+      __pyx_t_9 = __pyx_t_10;
       __pyx_t_10 = 0;
     }
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __pyx_t_11 = __pyx_t_9;
+    __Pyx_INCREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_9 = __pyx_t_8;
-    __Pyx_INCREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_v_left = __pyx_t_9;
-    __pyx_t_9 = 0;
+    __pyx_v_left = __pyx_t_11;
+    __pyx_t_11 = 0;
 
-    /* "pysam/cvcf.pyx":690
+    /* "pysam/cvcf.pyx":691
  *         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))
  */
-    __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); 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);
+    if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __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 = 691; __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 = 691; __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 = 690; __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 = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_t_9); 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_8); __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); 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_t_2 = PyTuple_New(4); 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_INCREF(__pyx_v_chrom);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
@@ -15648,80 +15536,80 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
     __Pyx_GIVEREF(__pyx_v_left);
     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_10);
     __Pyx_GIVEREF(__pyx_t_10);
-    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_8);
-    __Pyx_GIVEREF(__pyx_t_8);
+    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
     __pyx_t_10 = 0;
-    __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    __pyx_v_faref_leftflank = __pyx_t_8;
-    __pyx_t_8 = 0;
+    __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); 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_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_faref_leftflank = __pyx_t_9;
+    __pyx_t_9 = 0;
 
-    /* "pysam/cvcf.pyx":691
+    /* "pysam/cvcf.pyx":692
  *             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
  */
-    __pyx_t_8 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_faref_leftflank, __pyx_t_4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_v_faref = __pyx_t_8;
-    __pyx_t_8 = 0;
+    if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_9 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_faref_leftflank, 0, 0, &__pyx_t_9, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_v_faref = __pyx_t_2;
+    __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":692
+    /* "pysam/cvcf.pyx":693
  *             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
  * 
  */
-    __pyx_t_8 = PyObject_RichCompare(__pyx_v_faref, __pyx_v_ref, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    if (__pyx_t_14) {
-      __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __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 = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_faref, __pyx_v_ref, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_15) {
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __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 = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_WRONG_REF); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
       __Pyx_INCREF(__pyx_v_faref);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_faref);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_faref);
       __Pyx_GIVEREF(__pyx_v_faref);
       __Pyx_INCREF(__pyx_v_ref);
-      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ref);
+      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ref);
       __Pyx_GIVEREF(__pyx_v_ref);
-      __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_106), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
-      __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 = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_reference_is_s_VCF_says_s, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __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(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_t_10));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
-      __pyx_t_2 = 0;
+      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
+      __pyx_t_9 = 0;
       __pyx_t_10 = 0;
-      __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       goto __pyx_L25;
     }
     __pyx_L25:;
 
-    /* "pysam/cvcf.pyx":693
+    /* "pysam/cvcf.pyx":694
  *             faref = faref_leftflank[pos-left:]
  *             if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
  *             ref = faref             # <<<<<<<<<<<<<<
@@ -15729,82 +15617,75 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  *         # convert v3.3 to v4.0 alleles below
  */
     __Pyx_INCREF(__pyx_v_faref);
-    __Pyx_DECREF(__pyx_v_ref);
-    __pyx_v_ref = __pyx_v_faref;
+    __Pyx_DECREF_SET(__pyx_v_ref, __pyx_v_faref);
     goto __pyx_L24;
   }
   __pyx_L24:;
 
-  /* "pysam/cvcf.pyx":696
+  /* "pysam/cvcf.pyx":697
  * 
  *         # convert v3.3 to v4.0 alleles below
  *         if cols[4] == ".": alt = []             # <<<<<<<<<<<<<<
  *         else: alt = cols[4].upper().split(',')
  * 
  */
-  __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  if (__pyx_t_14) {
-    __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
-    __pyx_cur_scope->__pyx_v_alt = ((PyObject *)__pyx_t_9);
-    __pyx_t_9 = 0;
+  if (__pyx_t_15) {
+    __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_v_alt = __pyx_t_10;
+    __pyx_t_10 = 0;
     goto __pyx_L26;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":697
+    /* "pysam/cvcf.pyx":698
  *         # convert v3.3 to v4.0 alleles below
  *         if cols[4] == ".": alt = []
  *         else: alt = cols[4].upper().split(',')             # <<<<<<<<<<<<<<
  * 
  *         if cols[5] == ".": qual = -1
  */
-    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_upper); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__split); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_107), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __Pyx_GIVEREF(__pyx_t_9);
-    __pyx_cur_scope->__pyx_v_alt = __pyx_t_9;
-    __pyx_t_9 = 0;
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __pyx_v_alt = __pyx_t_10;
+    __pyx_t_10 = 0;
   }
   __pyx_L26:;
 
-  /* "pysam/cvcf.pyx":699
+  /* "pysam/cvcf.pyx":700
  *         else: alt = cols[4].upper().split(',')
  * 
  *         if cols[5] == ".": qual = -1             # <<<<<<<<<<<<<<
  *         else:
  *             try:    qual = float(cols[5])
  */
-  __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 5, sizeof(long), PyInt_FromLong); if (!__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 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  if (__pyx_t_14) {
+  if (__pyx_t_15) {
     __pyx_v_qual = -1.0;
     goto __pyx_L27;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":701
+    /* "pysam/cvcf.pyx":702
  *         if cols[5] == ".": qual = -1
  *         else:
  *             try:    qual = float(cols[5])             # <<<<<<<<<<<<<<
@@ -15812,31 +15693,31 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  * 
  */
     {
-      __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
+      __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
+      __Pyx_XGOTREF(__pyx_t_14);
       __Pyx_XGOTREF(__pyx_t_13);
       __Pyx_XGOTREF(__pyx_t_12);
-      __Pyx_XGOTREF(__pyx_t_11);
       /*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 = 701; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L28_error;};
         __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_17 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_17 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
+        __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_v_qual = __pyx_t_17;
+        __pyx_v_qual = __pyx_t_18;
       }
+      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
       __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
-      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
       goto __pyx_L35_try_end;
       __pyx_L28_error:;
-      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __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_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-      /* "pysam/cvcf.pyx":702
+      /* "pysam/cvcf.pyx":703
  *         else:
  *             try:    qual = float(cols[5])
  *             except: self.error(line,self.QUAL_NOT_NUMERICAL)             # <<<<<<<<<<<<<<
@@ -15845,313 +15726,302 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  */
       /*except:*/ {
         __Pyx_AddTraceback("pysam.cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __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 = 702; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
         __Pyx_GOTREF(__pyx_t_1);
         __Pyx_INCREF(__pyx_v_line);
         PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        __pyx_t_7 = 0;
-        __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8);
+        __Pyx_GIVEREF(__pyx_t_8);
+        __pyx_t_8 = 0;
+        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
+        __Pyx_GOTREF(__pyx_t_8);
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         goto __pyx_L29_exception_handled;
       }
       __pyx_L30_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_14);
       __Pyx_XGIVEREF(__pyx_t_13);
       __Pyx_XGIVEREF(__pyx_t_12);
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
+      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
       goto __pyx_L1_error;
       __pyx_L29_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_14);
       __Pyx_XGIVEREF(__pyx_t_13);
       __Pyx_XGIVEREF(__pyx_t_12);
-      __Pyx_XGIVEREF(__pyx_t_11);
-      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
+      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
       __pyx_L35_try_end:;
     }
   }
   __pyx_L27:;
 
-  /* "pysam/cvcf.pyx":705
+  /* "pysam/cvcf.pyx":706
  * 
  *         # 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_8 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_kp_s_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  if (!__pyx_t_14) {
-    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_n_s__PASS), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (!__pyx_t_15) {
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_PASS, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     if (!__pyx_t_5) {
-      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_kp_s__0), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_19 = __pyx_t_18;
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_19 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_0, Py_EQ)); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_20 = __pyx_t_19;
     } else {
-      __pyx_t_19 = __pyx_t_5;
+      __pyx_t_20 = __pyx_t_5;
     }
-    __pyx_t_5 = __pyx_t_19;
+    __pyx_t_5 = __pyx_t_20;
   } else {
-    __pyx_t_5 = __pyx_t_14;
+    __pyx_t_5 = __pyx_t_15;
   }
   if (__pyx_t_5) {
-    __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_v_filter = ((PyObject *)__pyx_t_9);
-    __pyx_t_9 = 0;
+    __pyx_t_2 = PyList_New(0); 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_v_filter = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L38;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":706
+    /* "pysam/cvcf.pyx":707
  *         # 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_9 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_v_filter = __pyx_t_9;
-    __pyx_t_9 = 0;
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); 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_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __pyx_v_filter = __pyx_t_2;
+    __pyx_t_2 = 0;
   }
   __pyx_L38:;
 
-  /* "pysam/cvcf.pyx":709
+  /* "pysam/cvcf.pyx":710
  * 
  *         # dictionary of keys, and list of values
  *         info = {}             # <<<<<<<<<<<<<<
  *         if cols[7] != ".":
  *             for blurp in cols[7].split(';'):
  */
-  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-  __pyx_v_info = ((PyObject*)__pyx_t_9);
-  __pyx_t_9 = 0;
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_v_info = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":710
+  /* "pysam/cvcf.pyx":711
  *         # dictionary of keys, and list of values
  *         info = {}
  *         if cols[7] != ".":             # <<<<<<<<<<<<<<
  *             for blurp in cols[7].split(';'):
  *                 elts = blurp.split('=')
  */
-  __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_kp_s_9), Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__8, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_5) {
 
-    /* "pysam/cvcf.pyx":711
+    /* "pysam/cvcf.pyx":712
  *         info = {}
  *         if cols[7] != ".":
  *             for blurp in cols[7].split(';'):             # <<<<<<<<<<<<<<
  *                 elts = blurp.split('=')
  *                 if len(elts) == 1: v = None
  */
-    __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cols, 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
-      __pyx_t_9 = __pyx_t_8; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = 0;
-      __pyx_t_15 = NULL;
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+      __pyx_t_11 = __pyx_t_2; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+      __pyx_t_16 = NULL;
     } else {
-      __pyx_t_4 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_15 = Py_TYPE(__pyx_t_9)->tp_iternext;
+      __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext;
     }
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     for (;;) {
-      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_9)) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_9)) break;
+      if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_11)) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_8 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_9)) {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+      } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_11)) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_8 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_8 = __pyx_t_15(__pyx_t_9);
-        if (unlikely(!__pyx_t_8)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __pyx_t_16(__pyx_t_11);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_GOTREF(__pyx_t_2);
       }
-      __Pyx_XDECREF(__pyx_v_blurp);
-      __pyx_v_blurp = __pyx_t_8;
-      __pyx_t_8 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_blurp, __pyx_t_2);
+      __pyx_t_2 = 0;
 
-      /* "pysam/cvcf.pyx":712
+      /* "pysam/cvcf.pyx":713
  *         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_8 = PyObject_GetAttr(__pyx_v_blurp, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_110), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_blurp, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __Pyx_XDECREF(__pyx_v_elts);
-      __pyx_v_elts = __pyx_t_10;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_elts, __pyx_t_10);
       __pyx_t_10 = 0;
 
-      /* "pysam/cvcf.pyx":713
+      /* "pysam/cvcf.pyx":714
  *             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_3 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_5 = (__pyx_t_3 == 1);
+      __pyx_t_3 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = ((__pyx_t_3 == 1) != 0);
       if (__pyx_t_5) {
         __Pyx_INCREF(Py_None);
-        __Pyx_XDECREF(__pyx_v_v);
-        __pyx_v_v = Py_None;
+        __Pyx_XDECREF_SET(__pyx_v_v, Py_None);
         goto __pyx_L42;
       }
 
-      /* "pysam/cvcf.pyx":714
+      /* "pysam/cvcf.pyx":715
  *                 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],
  */
-      __pyx_t_3 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_5 = (__pyx_t_3 == 2);
+      __pyx_t_3 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = ((__pyx_t_3 == 2) != 0);
       if (__pyx_t_5) {
-        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_XDECREF(__pyx_v_v);
-        __pyx_v_v = __pyx_t_10;
+        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_10);
         __pyx_t_10 = 0;
         goto __pyx_L42;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":715
+        /* "pysam/cvcf.pyx":716
  *                 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,
  */
-        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_INFO_STRING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
-        __Pyx_GIVEREF(__pyx_t_8);
-        __pyx_t_8 = 0;
-        __pyx_t_8 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
+        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       }
       __pyx_L42:;
 
-      /* "pysam/cvcf.pyx":716
+      /* "pysam/cvcf.pyx":717
  *                 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,
  */
-      __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_formatdata); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
 
-      /* "pysam/cvcf.pyx":717
+      /* "pysam/cvcf.pyx":718
  *                 else: self.error(line,self.ERROR_INFO_STRING)
  *                 info[elts[0]] = self.parse_formatdata(elts[0],
  *                                                       v,             # <<<<<<<<<<<<<<
  *                                                       self._info,
  *                                                       line)
  */
-      if (unlikely(!__pyx_v_v)) { __Pyx_RaiseUnboundLocalError("v"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      if (unlikely(!__pyx_v_v)) { __Pyx_RaiseUnboundLocalError("v"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
 
-      /* "pysam/cvcf.pyx":718
+      /* "pysam/cvcf.pyx":719
  *                 info[elts[0]] = self.parse_formatdata(elts[0],
  *                                                       v,
  *                                                       self._info,             # <<<<<<<<<<<<<<
  *                                                       line)
  * 
  */
-      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
 
-      /* "pysam/cvcf.pyx":719
+      /* "pysam/cvcf.pyx":717
+ *                 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_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
-      __Pyx_GIVEREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
       __Pyx_INCREF(__pyx_v_v);
       PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_v);
       __Pyx_GIVEREF(__pyx_v_v);
@@ -16160,74 +16030,64 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
       __Pyx_INCREF(__pyx_v_line);
       PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      __pyx_t_7 = 0;
+      __pyx_t_8 = 0;
       __pyx_t_10 = 0;
-      __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-      /* "pysam/cvcf.pyx":716
- *                 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,
- */
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
       __Pyx_GOTREF(__pyx_t_1);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_info), __pyx_t_1, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(PyDict_SetItem(__pyx_v_info, __pyx_t_1, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __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_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     goto __pyx_L39;
   }
   __pyx_L39:;
 
-  /* "pysam/cvcf.pyx":722
+  /* "pysam/cvcf.pyx":723
  * 
  *         # Gracefully deal with absent FORMAT column
  *         if cols[8] == "": format = []             # <<<<<<<<<<<<<<
  *         else: format = cols[8].split(':')
  * 
  */
-  __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_kp_s_1), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_11);
+  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_11, __pyx_kp_s_, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   if (__pyx_t_5) {
-    __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __pyx_v_format = ((PyObject *)__pyx_t_10);
-    __pyx_t_10 = 0;
+    __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_v_format = __pyx_t_11;
+    __pyx_t_11 = 0;
     goto __pyx_L43;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":723
+    /* "pysam/cvcf.pyx":724
  *         # Gracefully deal with absent FORMAT column
  *         if cols[8] == "": format = []
  *         else: format = cols[8].split(':')             # <<<<<<<<<<<<<<
  * 
  *         # check: all filters are defined
  */
-    __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_cols, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_split); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_111), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_v_format = __pyx_t_10;
-    __pyx_t_10 = 0;
+    __pyx_v_format = __pyx_t_11;
+    __pyx_t_11 = 0;
   }
   __pyx_L43:;
 
-  /* "pysam/cvcf.pyx":726
+  /* "pysam/cvcf.pyx":727
  * 
  *         # check: all filters are defined
  *         for f in filter:             # <<<<<<<<<<<<<<
@@ -16235,95 +16095,96 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  * 
  */
   if (PyList_CheckExact(__pyx_v_filter) || PyTuple_CheckExact(__pyx_v_filter)) {
-    __pyx_t_10 = __pyx_v_filter; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0;
-    __pyx_t_15 = NULL;
+    __pyx_t_11 = __pyx_v_filter; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+    __pyx_t_16 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_filter); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_15 = Py_TYPE(__pyx_t_10)->tp_iternext;
+    __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_filter); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext;
   }
   for (;;) {
-    if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_10)) {
-      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_10)) break;
+    if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_11)) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-    } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_10)) {
-      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+    } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_11)) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
-      __pyx_t_9 = __pyx_t_15(__pyx_t_10);
-      if (unlikely(!__pyx_t_9)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __pyx_t_16(__pyx_t_11);
+      if (unlikely(!__pyx_t_10)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_GOTREF(__pyx_t_10);
     }
-    __Pyx_XDECREF(__pyx_v_f);
-    __pyx_v_f = __pyx_t_9;
-    __pyx_t_9 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_10);
+    __pyx_t_10 = 0;
 
-    /* "pysam/cvcf.pyx":727
+    /* "pysam/cvcf.pyx":728
  *         # 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 = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_9, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    if (__pyx_t_5) {
-      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __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 = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_10, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_15 = (__pyx_t_5 != 0);
+    if (__pyx_t_15) {
+      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FILTER_NOT_DEFINED); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
       __Pyx_GIVEREF(__pyx_t_1);
       __Pyx_INCREF(__pyx_v_f);
-      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_f);
+      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_f);
       __Pyx_GIVEREF(__pyx_v_f);
       __pyx_t_1 = 0;
-      __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 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_L46;
     }
     __pyx_L46:;
   }
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
-  /* "pysam/cvcf.pyx":730
+  /* "pysam/cvcf.pyx":731
  * 
  *         # check: format fields are defined
  *         if self._format:             # <<<<<<<<<<<<<<
  *             for f in format:
  *                 if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f)
  */
-  __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __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 = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  if (__pyx_t_5) {
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  if (__pyx_t_15) {
 
-    /* "pysam/cvcf.pyx":731
+    /* "pysam/cvcf.pyx":732
  *         # check: format fields are defined
  *         if self._format:
  *             for f in format:             # <<<<<<<<<<<<<<
@@ -16331,143 +16192,144 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  * 
  */
     if (PyList_CheckExact(__pyx_v_format) || PyTuple_CheckExact(__pyx_v_format)) {
-      __pyx_t_10 = __pyx_v_format; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0;
-      __pyx_t_15 = NULL;
+      __pyx_t_11 = __pyx_v_format; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+      __pyx_t_16 = NULL;
     } else {
-      __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_15 = Py_TYPE(__pyx_t_10)->tp_iternext;
+      __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_format); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext;
     }
     for (;;) {
-      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_10)) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_10)) break;
+      if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_11)) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_10)) {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+      } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_11)) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_1 = __pyx_t_15(__pyx_t_10);
+        __pyx_t_1 = __pyx_t_16(__pyx_t_11);
         if (unlikely(!__pyx_t_1)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
         __Pyx_GOTREF(__pyx_t_1);
       }
-      __Pyx_XDECREF(__pyx_v_f);
-      __pyx_v_f = __pyx_t_1;
+      __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1);
       __pyx_t_1 = 0;
 
-      /* "pysam/cvcf.pyx":732
+      /* "pysam/cvcf.pyx":733
  *         if self._format:
  *             for f in format:
  *                 if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f)             # <<<<<<<<<<<<<<
  * 
  *         # convert v3.3 alleles
  */
-      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_15 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_5 = (__pyx_t_15 != 0);
       if (__pyx_t_5) {
-        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FORMAT_NOT_DEFINED); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __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 = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FORMAT_NOT_DEFINED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __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 = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__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_8);
-        __Pyx_GIVEREF(__pyx_t_8);
+        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
         __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_8 = 0;
-        __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __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_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         goto __pyx_L50;
       }
       __pyx_L50:;
     }
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     goto __pyx_L47;
   }
   __pyx_L47:;
 
-  /* "pysam/cvcf.pyx":735
+  /* "pysam/cvcf.pyx":736
  * 
  *         # convert v3.3 alleles
  *         if self._version == 33:             # <<<<<<<<<<<<<<
  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)
  *             newalts = []
  */
-  __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_8 = PyObject_RichCompare(__pyx_t_10, __pyx_int_33, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_11, __pyx_int_33, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_5) {
 
-    /* "pysam/cvcf.pyx":736
+    /* "pysam/cvcf.pyx":737
  *         # 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_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_5 = (__pyx_t_4 != 1);
+    __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = ((__pyx_t_4 != 1) != 0);
     if (__pyx_t_5) {
-      __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_REF); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V33_BAD_REF); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_10 = PyTuple_New(2); 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_t_9 = PyTuple_New(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_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);
-      __pyx_t_10 = 0;
-      __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), 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_8); __pyx_t_8 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
+      __Pyx_GIVEREF(__pyx_t_11);
+      __pyx_t_11 = 0;
+      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
       goto __pyx_L52;
     }
     __pyx_L52:;
 
-    /* "pysam/cvcf.pyx":737
+    /* "pysam/cvcf.pyx":738
  *         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_10 = PyList_New(0); 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_v_newalts = ((PyObject*)__pyx_t_10);
-    __pyx_t_10 = 0;
+    __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_v_newalts = ((PyObject*)__pyx_t_11);
+    __pyx_t_11 = 0;
 
-    /* "pysam/cvcf.pyx":738
+    /* "pysam/cvcf.pyx":739
  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)
  *             newalts = []
  *             have_deletions = False             # <<<<<<<<<<<<<<
@@ -16476,124 +16338,122 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  */
     __pyx_v_have_deletions = 0;
 
-    /* "pysam/cvcf.pyx":739
+    /* "pysam/cvcf.pyx":740
  *             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 (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-      __pyx_t_10 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0;
-      __pyx_t_15 = NULL;
+    if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
+      __pyx_t_11 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+      __pyx_t_16 = NULL;
     } else {
-      __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_15 = Py_TYPE(__pyx_t_10)->tp_iternext;
+      __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext;
     }
     for (;;) {
-      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_10)) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_10)) break;
+      if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_11)) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_10)) {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+      } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_11)) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_9 = __pyx_t_15(__pyx_t_10);
-        if (unlikely(!__pyx_t_9)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __pyx_t_16(__pyx_t_11);
+        if (unlikely(!__pyx_t_10)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_GOTREF(__pyx_t_10);
       }
-      __Pyx_XDECREF(__pyx_v_a);
-      __pyx_v_a = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_10);
+      __pyx_t_10 = 0;
 
-      /* "pysam/cvcf.pyx":740
+      /* "pysam/cvcf.pyx":741
  *             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_3 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_5 = (__pyx_t_3 == 1);
+      __pyx_t_3 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = ((__pyx_t_3 == 1) != 0);
       if (__pyx_t_5) {
-        __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_8 = PyNumber_Add(__pyx_v_a, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_v_a);
-        __pyx_v_a = __pyx_t_8;
-        __pyx_t_8 = 0;
+        __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_ref, 1, 0, NULL, NULL, &__pyx_slice__71, 1, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_2 = PyNumber_Add(__pyx_v_a, __pyx_t_10); 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_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_2);
+        __pyx_t_2 = 0;
         goto __pyx_L55;
       }
 
-      /* "pysam/cvcf.pyx":741
+      /* "pysam/cvcf.pyx":742
  *             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_8 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_112), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_startswith); 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);
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__72, NULL); 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);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
       if (__pyx_t_5) {
-        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_1 = PyNumber_Add(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_ref, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_a, 1, 0, NULL, NULL, &__pyx_slice__73, 1, 0, 1); 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);
+        __pyx_t_1 = PyNumber_Add(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_9 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __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_PyObject_GetSlice(__pyx_v_ref, 1, 0, NULL, NULL, &__pyx_slice__74, 1, 0, 1); 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);
+        __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_2); 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);
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_DECREF(__pyx_v_a);
-        __pyx_v_a = __pyx_t_9;
-        __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_10);
+        __pyx_t_10 = 0;
         goto __pyx_L55;
       }
 
-      /* "pysam/cvcf.pyx":742
+      /* "pysam/cvcf.pyx":743
  *                 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_9 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); 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);
-      __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_113), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_startswith); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       if (__pyx_t_5) {
 
-        /* "pysam/cvcf.pyx":743
+        /* "pysam/cvcf.pyx":744
  *                 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             # <<<<<<<<<<<<<<
@@ -16602,7 +16462,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  */
         __pyx_v_have_deletions = 1;
 
-        /* "pysam/cvcf.pyx":744
+        /* "pysam/cvcf.pyx":745
  *                 elif a.startswith('D'): # allow D<seq> and D<num>
  *                     have_deletions = True
  *                     try:             # <<<<<<<<<<<<<<
@@ -16610,104 +16470,98 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  *                         if len(ref) < l:        # add to reference if necessary
  */
         {
-          __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
-          __Pyx_XGOTREF(__pyx_t_11);
+          __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
           __Pyx_XGOTREF(__pyx_t_12);
           __Pyx_XGOTREF(__pyx_t_13);
+          __Pyx_XGOTREF(__pyx_t_14);
           /*try:*/ {
 
-            /* "pysam/cvcf.pyx":745
+            /* "pysam/cvcf.pyx":746
  *                     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_8 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __Pyx_GOTREF(__pyx_t_8);
-            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __Pyx_GOTREF(__pyx_t_9);
-            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
-            __Pyx_GIVEREF(__pyx_t_8);
-            __pyx_t_8 = 0;
-            __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __Pyx_GOTREF(__pyx_t_8);
-            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-            __Pyx_XDECREF(__pyx_v_l);
-            __pyx_v_l = __pyx_t_8;
-            __pyx_t_8 = 0;
+            __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_a, 1, 0, NULL, NULL, &__pyx_slice__76, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+            __Pyx_GOTREF(__pyx_t_2);
+            __pyx_t_10 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_10);
+            __pyx_t_10 = 0;
 
-            /* "pysam/cvcf.pyx":746
+            /* "pysam/cvcf.pyx":747
  *                     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_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __Pyx_GOTREF(__pyx_t_8);
-            __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_v_l, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+            __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+            __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __pyx_t_2 = PyObject_RichCompare(__pyx_t_10, __pyx_v_l, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
             if (__pyx_t_5) {
 
-              /* "pysam/cvcf.pyx":747
+              /* "pysam/cvcf.pyx":748
  *                         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 = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-              __Pyx_GOTREF(__pyx_t_9);
-              __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-              __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-              __Pyx_GOTREF(__pyx_t_8);
-              __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __Pyx_GOTREF(__pyx_t_2);
+              if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;} }
+              __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __Pyx_GOTREF(__pyx_t_10);
+              __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
               __Pyx_GOTREF(__pyx_t_1);
-              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-              __pyx_t_8 = PyNumber_Add(__pyx_v_pos, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+              if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;} }
+              __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_v_l); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __Pyx_GOTREF(__pyx_t_10);
+              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
               __Pyx_GOTREF(__pyx_t_8);
-              __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-              __Pyx_GOTREF(__pyx_t_7);
-              __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-              __Pyx_GOTREF(__pyx_t_2);
+              __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __Pyx_GOTREF(__pyx_t_9);
               __Pyx_INCREF(__pyx_v_chrom);
-              PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
+              PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_chrom);
               __Pyx_GIVEREF(__pyx_v_chrom);
-              PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+              PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
               __Pyx_GIVEREF(__pyx_t_1);
-              PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
+              PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_10);
+              __Pyx_GIVEREF(__pyx_t_10);
+              PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_8);
               __Pyx_GIVEREF(__pyx_t_8);
-              PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
-              __Pyx_GIVEREF(__pyx_t_7);
               __pyx_t_1 = 0;
+              __pyx_t_10 = 0;
               __pyx_t_8 = 0;
-              __pyx_t_7 = 0;
-              __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-              __Pyx_GOTREF(__pyx_t_7);
+              __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __Pyx_GOTREF(__pyx_t_8);
+              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
               __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-              __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-              __Pyx_XDECREF(__pyx_v_addns);
-              __pyx_v_addns = __pyx_t_7;
-              __pyx_t_7 = 0;
+              __Pyx_XDECREF_SET(__pyx_v_addns, __pyx_t_8);
+              __pyx_t_8 = 0;
 
-              /* "pysam/cvcf.pyx":748
+              /* "pysam/cvcf.pyx":749
  *                         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_7 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-              __Pyx_GOTREF(__pyx_t_7);
-              __Pyx_DECREF(__pyx_v_ref);
-              __pyx_v_ref = __pyx_t_7;
-              __pyx_t_7 = 0;
+              __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+              __Pyx_GOTREF(__pyx_t_8);
+              __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_8);
+              __pyx_t_8 = 0;
 
-              /* "pysam/cvcf.pyx":749
+              /* "pysam/cvcf.pyx":750
  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
  *                             ref += addns
  *                             for i,na in enumerate(newalts): newalts[i] = na+addns             # <<<<<<<<<<<<<<
@@ -16715,278 +16569,283 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  *                     except ValueError:
  */
               __Pyx_INCREF(__pyx_int_0);
-              __pyx_t_7 = __pyx_int_0;
-              __pyx_t_2 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+              __pyx_t_8 = __pyx_int_0;
+              __pyx_t_9 = __pyx_v_newalts; __Pyx_INCREF(__pyx_t_9); __pyx_t_3 = 0;
               for (;;) {
-                if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+                if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_9)) break;
                 #if CYTHON_COMPILING_IN_CPYTHON
-                __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_9); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+                __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
                 #else
-                __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+                __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
                 #endif
-                __Pyx_XDECREF(__pyx_v_na);
-                __pyx_v_na = __pyx_t_9;
-                __pyx_t_9 = 0;
-                __Pyx_INCREF(__pyx_t_7);
-                __Pyx_XDECREF(__pyx_v_i);
-                __pyx_v_i = __pyx_t_7;
-                __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-                __Pyx_GOTREF(__pyx_t_9);
-                __Pyx_DECREF(__pyx_t_7);
-                __pyx_t_7 = __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 = 749; __pyx_clineno = __LINE__; goto __pyx_L56_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 = 749; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+                __Pyx_XDECREF_SET(__pyx_v_na, __pyx_t_2);
+                __pyx_t_2 = 0;
+                __Pyx_INCREF(__pyx_t_8);
+                __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
+                __pyx_t_2 = PyNumber_Add(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+                __Pyx_GOTREF(__pyx_t_2);
+                __Pyx_DECREF(__pyx_t_8);
+                __pyx_t_8 = __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 = 750; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+                __Pyx_GOTREF(__pyx_t_2);
+                if (unlikely(PyObject_SetItem(__pyx_v_newalts, __pyx_v_i, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
               }
-              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
               goto __pyx_L64;
             }
             __pyx_L64:;
 
-            /* "pysam/cvcf.pyx":750
+            /* "pysam/cvcf.pyx":751
  *                             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_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 = 750; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_ref, __pyx_t_3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
-            __Pyx_GOTREF(__pyx_t_7);
-            __Pyx_DECREF(__pyx_v_a);
-            __pyx_v_a = __pyx_t_7;
-            __pyx_t_7 = 0;
+            __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_ref, 0, 0, &__pyx_v_l, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+            __Pyx_GOTREF(__pyx_t_8);
+            __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_8);
+            __pyx_t_8 = 0;
           }
-          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
           __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
           __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
           goto __pyx_L63_try_end;
           __pyx_L56_error:;
-          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
           __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
           __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-          /* "pysam/cvcf.pyx":751
+          /* "pysam/cvcf.pyx":752
  *                             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
  */
-          __pyx_t_20 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
-          if (__pyx_t_20) {
+          __pyx_t_21 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+          if (__pyx_t_21) {
             __Pyx_AddTraceback("pysam.cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
-            if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-            __Pyx_GOTREF(__pyx_t_7);
-            __Pyx_GOTREF(__pyx_t_2);
+            if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+            __Pyx_GOTREF(__pyx_t_8);
             __Pyx_GOTREF(__pyx_t_9);
+            __Pyx_GOTREF(__pyx_t_2);
 
-            /* "pysam/cvcf.pyx":752
+            /* "pysam/cvcf.pyx":753
  *                         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_8 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-            __Pyx_GOTREF(__pyx_t_8);
-            __Pyx_XDECREF(__pyx_v_s);
-            __pyx_v_s = __pyx_t_8;
-            __pyx_t_8 = 0;
+            __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_a, 1, 0, NULL, NULL, &__pyx_slice__77, 1, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_10);
+            __pyx_t_10 = 0;
 
-            /* "pysam/cvcf.pyx":753
+            /* "pysam/cvcf.pyx":754
  *                     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_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-            __pyx_t_21 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-            __pyx_t_5 = (__pyx_t_3 < __pyx_t_21);
+            __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+            __pyx_t_22 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+            __pyx_t_5 = ((__pyx_t_3 < __pyx_t_22) != 0);
             if (__pyx_t_5) {
 
-              /* "pysam/cvcf.pyx":754
+              /* "pysam/cvcf.pyx":755
  *                         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_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __Pyx_GOTREF(__pyx_t_8);
-              __pyx_t_21 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __Pyx_GOTREF(__pyx_t_10);
+              if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;} }
+              __pyx_t_22 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
               __Pyx_GOTREF(__pyx_t_1);
-              __pyx_t_6 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __Pyx_GOTREF(__pyx_t_6);
+              __pyx_t_7 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __Pyx_GOTREF(__pyx_t_7);
               __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-              __pyx_t_21 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;} }
+              __pyx_t_22 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
               __Pyx_GOTREF(__pyx_t_1);
-              __pyx_t_22 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __Pyx_GOTREF(__pyx_t_22);
+              __pyx_t_23 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __Pyx_GOTREF(__pyx_t_23);
               __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 = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
               __Pyx_GOTREF(__pyx_t_1);
-              __pyx_t_23 = PyTuple_New(4); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __Pyx_GOTREF(__pyx_t_23);
+              __pyx_t_24 = PyTuple_New(4); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __Pyx_GOTREF(__pyx_t_24);
               __Pyx_INCREF(__pyx_v_chrom);
-              PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_chrom);
+              PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_chrom);
               __Pyx_GIVEREF(__pyx_v_chrom);
-              PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_6);
-              __Pyx_GIVEREF(__pyx_t_6);
-              PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_22);
-              __Pyx_GIVEREF(__pyx_t_22);
-              PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_1);
+              PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_7);
+              __Pyx_GIVEREF(__pyx_t_7);
+              PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_t_23);
+              __Pyx_GIVEREF(__pyx_t_23);
+              PyTuple_SET_ITEM(__pyx_t_24, 3, __pyx_t_1);
               __Pyx_GIVEREF(__pyx_t_1);
-              __pyx_t_6 = 0;
-              __pyx_t_22 = 0;
+              __pyx_t_7 = 0;
+              __pyx_t_23 = 0;
               __pyx_t_1 = 0;
-              __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_24, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
               __Pyx_GOTREF(__pyx_t_1);
-              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-              __Pyx_DECREF(((PyObject *)__pyx_t_23)); __pyx_t_23 = 0;
-              __Pyx_XDECREF(__pyx_v_addns);
-              __pyx_v_addns = __pyx_t_1;
+              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+              __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
+              __Pyx_XDECREF_SET(__pyx_v_addns, __pyx_t_1);
               __pyx_t_1 = 0;
 
-              /* "pysam/cvcf.pyx":755
+              /* "pysam/cvcf.pyx":756
  *                         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_1 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
               __Pyx_GOTREF(__pyx_t_1);
-              __pyx_t_23 = PyTuple_New(1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __Pyx_GOTREF(__pyx_t_23);
+              __pyx_t_24 = PyTuple_New(1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __Pyx_GOTREF(__pyx_t_24);
               __Pyx_INCREF(__pyx_v_addns);
-              PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_addns);
+              PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_addns);
               __Pyx_GIVEREF(__pyx_v_addns);
-              __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_23), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __Pyx_GOTREF(__pyx_t_8);
+              __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_24, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __Pyx_GOTREF(__pyx_t_10);
               __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-              __Pyx_DECREF(((PyObject *)__pyx_t_23)); __pyx_t_23 = 0;
-              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-              __pyx_t_14 = (!__pyx_t_5);
-              if (__pyx_t_14) {
-                __pyx_t_21 = PyObject_Length(__pyx_v_addns); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_8);
-                __pyx_t_23 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_8); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(((PyObject *)__pyx_t_23));
-                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-                __pyx_t_8 = PyObject_RichCompare(__pyx_v_addns, ((PyObject *)__pyx_t_23), Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_DECREF(((PyObject *)__pyx_t_23)); __pyx_t_23 = 0;
-                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-                __pyx_t_19 = __pyx_t_5;
+              __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
+              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+              __pyx_t_15 = (!__pyx_t_5);
+              if (__pyx_t_15) {
+                __pyx_t_22 = PyObject_Length(__pyx_v_addns); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_22); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_10);
+                __pyx_t_24 = PyNumber_Multiply(__pyx_n_s_N, __pyx_t_10); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_24);
+                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+                __pyx_t_10 = PyObject_RichCompare(__pyx_v_addns, __pyx_t_24, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
+                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+                __pyx_t_20 = __pyx_t_5;
               } else {
-                __pyx_t_19 = __pyx_t_14;
+                __pyx_t_20 = __pyx_t_15;
               }
-              if (__pyx_t_19) {
+              if (__pyx_t_20) {
 
-                /* "pysam/cvcf.pyx":756
+                /* "pysam/cvcf.pyx":757
  *                             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_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_8);
-                __pyx_t_23 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_114); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_23);
+                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_10);
+                __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V33_UNMATCHED_DELETION); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_24);
 
-                /* "pysam/cvcf.pyx":757
+                /* "pysam/cvcf.pyx":758
  *                             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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
                 __Pyx_GOTREF(__pyx_t_1);
-                __pyx_t_21 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __pyx_t_22 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_22);
-                __pyx_t_6 = PyNumber_Add(__pyx_v_pos, __pyx_t_22); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_6);
-                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-                __pyx_t_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_22);
-                __pyx_t_24 = PyTuple_New(4); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_24);
+                if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;} }
+                if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;} }
+                __pyx_t_22 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __pyx_t_23 = PyInt_FromSsize_t(__pyx_t_22); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_23);
+                __pyx_t_7 = PyNumber_Add(__pyx_v_pos, __pyx_t_23); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_7);
+                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+                __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_23);
+                __pyx_t_25 = PyTuple_New(4); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_25);
                 __Pyx_INCREF(__pyx_v_chrom);
-                PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_chrom);
+                PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_v_chrom);
                 __Pyx_GIVEREF(__pyx_v_chrom);
                 __Pyx_INCREF(__pyx_v_pos);
-                PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_v_pos);
+                PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_v_pos);
                 __Pyx_GIVEREF(__pyx_v_pos);
-                PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_t_6);
-                __Pyx_GIVEREF(__pyx_t_6);
-                PyTuple_SET_ITEM(__pyx_t_24, 3, __pyx_t_22);
-                __Pyx_GIVEREF(__pyx_t_22);
-                __pyx_t_6 = 0;
-                __pyx_t_22 = 0;
-                __pyx_t_22 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_22);
+                PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_t_7);
+                __Pyx_GIVEREF(__pyx_t_7);
+                PyTuple_SET_ITEM(__pyx_t_25, 3, __pyx_t_23);
+                __Pyx_GIVEREF(__pyx_t_23);
+                __pyx_t_7 = 0;
+                __pyx_t_23 = 0;
+                __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_25, NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_23);
                 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-                __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
-                __pyx_t_24 = PyTuple_New(2); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_24);
+                __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+                __pyx_t_25 = PyTuple_New(2); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_25);
                 __Pyx_INCREF(__pyx_v_a);
-                PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_a);
+                PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_v_a);
                 __Pyx_GIVEREF(__pyx_v_a);
-                PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_22);
-                __Pyx_GIVEREF(__pyx_t_22);
-                __pyx_t_22 = 0;
-                __pyx_t_22 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_115), ((PyObject *)__pyx_t_24)); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(((PyObject *)__pyx_t_22));
-                __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
-                __pyx_t_24 = PyTuple_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_24);
+                PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_t_23);
+                __Pyx_GIVEREF(__pyx_t_23);
+                __pyx_t_23 = 0;
+                __pyx_t_23 = __Pyx_PyString_Format(__pyx_kp_s_deletion_is_s_reference_is_s, __pyx_t_25); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_23);
+                __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+
+                /* "pysam/cvcf.pyx":757
+ *                             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_25 = PyTuple_New(3); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_25);
                 __Pyx_INCREF(__pyx_v_line);
-                PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_line);
+                PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_v_line);
                 __Pyx_GIVEREF(__pyx_v_line);
-                PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_23);
+                PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_t_24);
+                __Pyx_GIVEREF(__pyx_t_24);
+                PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_t_23);
                 __Pyx_GIVEREF(__pyx_t_23);
-                PyTuple_SET_ITEM(__pyx_t_24, 2, ((PyObject *)__pyx_t_22));
-                __Pyx_GIVEREF(((PyObject *)__pyx_t_22));
+                __pyx_t_24 = 0;
                 __pyx_t_23 = 0;
-                __pyx_t_22 = 0;
-                __pyx_t_22 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_22);
-                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-                __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
-                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+                __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_25, NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_23);
+                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+                __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                 goto __pyx_L70;
               }
               __pyx_L70:;
 
-              /* "pysam/cvcf.pyx":758
+              /* "pysam/cvcf.pyx":759
  *                                 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
  */
-              __pyx_t_22 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-              __Pyx_GOTREF(__pyx_t_22);
-              __Pyx_DECREF(__pyx_v_ref);
-              __pyx_v_ref = __pyx_t_22;
-              __pyx_t_22 = 0;
+              __pyx_t_23 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+              __Pyx_GOTREF(__pyx_t_23);
+              __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_23);
+              __pyx_t_23 = 0;
 
-              /* "pysam/cvcf.pyx":759
+              /* "pysam/cvcf.pyx":760
  *                                            "(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             # <<<<<<<<<<<<<<
@@ -16994,388 +16853,321 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  *                 else:
  */
               __Pyx_INCREF(__pyx_int_0);
-              __pyx_t_22 = __pyx_int_0;
-              __pyx_t_24 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_24); __pyx_t_21 = 0;
+              __pyx_t_23 = __pyx_int_0;
+              __pyx_t_25 = __pyx_v_newalts; __Pyx_INCREF(__pyx_t_25); __pyx_t_22 = 0;
               for (;;) {
-                if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_24)) break;
+                if (__pyx_t_22 >= PyList_GET_SIZE(__pyx_t_25)) break;
                 #if CYTHON_COMPILING_IN_CPYTHON
-                __pyx_t_8 = PyList_GET_ITEM(__pyx_t_24, __pyx_t_21); __Pyx_INCREF(__pyx_t_8); __pyx_t_21++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __pyx_t_10 = PyList_GET_ITEM(__pyx_t_25, __pyx_t_22); __Pyx_INCREF(__pyx_t_10); __pyx_t_22++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
                 #else
-                __pyx_t_8 = PySequence_ITEM(__pyx_t_24, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __pyx_t_10 = PySequence_ITEM(__pyx_t_25, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
                 #endif
-                __Pyx_XDECREF(__pyx_v_na);
-                __pyx_v_na = __pyx_t_8;
-                __pyx_t_8 = 0;
-                __Pyx_INCREF(__pyx_t_22);
-                __Pyx_XDECREF(__pyx_v_i);
-                __pyx_v_i = __pyx_t_22;
-                __pyx_t_8 = PyNumber_Add(__pyx_t_22, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_8);
-                __Pyx_DECREF(__pyx_t_22);
-                __pyx_t_22 = __pyx_t_8;
-                __pyx_t_8 = 0;
-                __pyx_t_8 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_GOTREF(__pyx_t_8);
-                if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+                __Pyx_XDECREF_SET(__pyx_v_na, __pyx_t_10);
+                __pyx_t_10 = 0;
+                __Pyx_INCREF(__pyx_t_23);
+                __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_23);
+                __pyx_t_10 = PyNumber_Add(__pyx_t_23, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_10);
+                __Pyx_DECREF(__pyx_t_23);
+                __pyx_t_23 = __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 = 760; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_GOTREF(__pyx_t_10);
+                if (unlikely(PyObject_SetItem(__pyx_v_newalts, __pyx_v_i, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
               }
-              __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
-              __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+              __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+              __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
               goto __pyx_L69;
             }
             __pyx_L69:;
 
-            /* "pysam/cvcf.pyx":760
+            /* "pysam/cvcf.pyx":761
  *                             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)
  */
-            __pyx_t_21 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-            __pyx_t_22 = __Pyx_PySequence_GetSlice(__pyx_v_ref, __pyx_t_21, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
-            __Pyx_GOTREF(__pyx_t_22);
-            __Pyx_DECREF(__pyx_v_a);
-            __pyx_v_a = __pyx_t_22;
-            __pyx_t_22 = 0;
-            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __pyx_t_22 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+            __pyx_t_23 = __Pyx_PyObject_GetSlice(__pyx_v_ref, __pyx_t_22, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
+            __Pyx_GOTREF(__pyx_t_23);
+            __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_23);
+            __pyx_t_23 = 0;
+            __Pyx_DECREF(__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;
             goto __pyx_L57_exception_handled;
           }
+          goto __pyx_L58_except_error;
           __pyx_L58_except_error:;
-          __Pyx_XGIVEREF(__pyx_t_11);
           __Pyx_XGIVEREF(__pyx_t_12);
           __Pyx_XGIVEREF(__pyx_t_13);
-          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_14);
+          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
           goto __pyx_L1_error;
           __pyx_L57_exception_handled:;
-          __Pyx_XGIVEREF(__pyx_t_11);
           __Pyx_XGIVEREF(__pyx_t_12);
           __Pyx_XGIVEREF(__pyx_t_13);
-          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_14);
+          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
           __pyx_L63_try_end:;
         }
         goto __pyx_L55;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":762
+        /* "pysam/cvcf.pyx":763
  *                         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 = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __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 = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __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 = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V33_BAD_ALLELE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_8, 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_9, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
+        __Pyx_GIVEREF(__pyx_t_9);
+        __pyx_t_9 = 0;
+        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __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_8); __pyx_t_8 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
       }
       __pyx_L55:;
 
-      /* "pysam/cvcf.pyx":763
+      /* "pysam/cvcf.pyx":764
  *                 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
  */
-      __pyx_t_25 = PyList_Append(__pyx_v_newalts, __pyx_v_a); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_newalts, __pyx_v_a); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
-    /* "pysam/cvcf.pyx":764
+    /* "pysam/cvcf.pyx":765
  *                     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:
  */
-    __Pyx_INCREF(((PyObject *)__pyx_v_newalts));
-    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
-    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
-    __Pyx_GIVEREF(((PyObject *)__pyx_v_newalts));
-    __pyx_cur_scope->__pyx_v_alt = ((PyObject *)__pyx_v_newalts);
+    __Pyx_INCREF(__pyx_v_newalts);
+    __Pyx_DECREF_SET(__pyx_v_alt, __pyx_v_newalts);
 
-    /* "pysam/cvcf.pyx":766
+    /* "pysam/cvcf.pyx":767
  *             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
  */
-    if (__pyx_v_have_deletions) {
+    __pyx_t_20 = (__pyx_v_have_deletions != 0);
+    if (__pyx_t_20) {
 
-      /* "pysam/cvcf.pyx":767
+      /* "pysam/cvcf.pyx":768
  *             # 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_10 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      if (__pyx_t_19) {
+      if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      __pyx_t_11 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      if (__pyx_t_20) {
 
-        /* "pysam/cvcf.pyx":769
+        /* "pysam/cvcf.pyx":770
  *                 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_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __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 = 769; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __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 = 769; __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 = 769; __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 = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __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 = 770; __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 = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyNumber_Add(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = PyNumber_Add(__pyx_v_pos, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __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 = 770; __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 = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_2 = PyNumber_Add(__pyx_v_pos, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_2);
         __Pyx_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 = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_22 = PyTuple_New(4); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_23 = PyTuple_New(4); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
         __Pyx_INCREF(__pyx_v_chrom);
-        PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_v_chrom);
+        PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_chrom);
         __Pyx_GIVEREF(__pyx_v_chrom);
-        PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_7);
-        __Pyx_GIVEREF(__pyx_t_7);
-        PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
-        PyTuple_SET_ITEM(__pyx_t_22, 3, __pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_8);
+        __Pyx_GIVEREF(__pyx_t_8);
+        PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_9);
         __Pyx_GIVEREF(__pyx_t_9);
-        __pyx_t_7 = 0;
-        __pyx_t_2 = 0;
-        __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __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_22)); __pyx_t_22 = 0;
-        __pyx_v_addn = __pyx_t_9;
+        PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_8 = 0;
         __pyx_t_9 = 0;
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_23, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __pyx_v_addn = __pyx_t_2;
+        __pyx_t_2 = 0;
 
-        /* "pysam/cvcf.pyx":770
+        /* "pysam/cvcf.pyx":771
  *                     # 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 = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_v_ref);
-        __pyx_v_ref = __pyx_t_9;
-        __pyx_t_9 = 0;
+        __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_2);
+        __pyx_t_2 = 0;
 
-        /* "pysam/cvcf.pyx":771
+        /* "pysam/cvcf.pyx":772
  *                     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 = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-          __pyx_t_22 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_22); __pyx_t_4 = 0;
-          __pyx_t_15 = NULL;
-        } else {
-          __pyx_t_4 = -1; __pyx_t_22 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          __pyx_t_15 = Py_TYPE(__pyx_t_22)->tp_iternext;
-        }
+        __pyx_t_2 = PyList_New(0); 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_23 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_23); __pyx_t_4 = 0;
         for (;;) {
-          if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_22)) {
-            if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_22)) break;
-            #if CYTHON_COMPILING_IN_CPYTHON
-            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #else
-            __pyx_t_10 = PySequence_ITEM(__pyx_t_22, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
-          } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_22)) {
-            if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_22)) break;
-            #if CYTHON_COMPILING_IN_CPYTHON
-            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #else
-            __pyx_t_10 = PySequence_ITEM(__pyx_t_22, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
-          } else {
-            __pyx_t_10 = __pyx_t_15(__pyx_t_22);
-            if (unlikely(!__pyx_t_10)) {
-              if (PyErr_Occurred()) {
-                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              }
-              break;
-            }
-            __Pyx_GOTREF(__pyx_t_10);
-          }
-          __Pyx_XDECREF(__pyx_v_allele);
-          __pyx_v_allele = __pyx_t_10;
-          __pyx_t_10 = 0;
-          __pyx_t_10 = PyNumber_Add(__pyx_v_allele, __pyx_v_addn); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_10);
-          if (unlikely(__Pyx_PyList_Append(__pyx_t_9, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_23)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_11 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_11 = PySequence_ITEM(__pyx_t_23, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+          __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_11);
+          __pyx_t_11 = 0;
+          __pyx_t_11 = PyNumber_Add(__pyx_v_allele, __pyx_v_addn); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_11);
+          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
         }
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_22 = ((PyObject *)__pyx_t_9);
-        __Pyx_INCREF(__pyx_t_22);
-        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-        __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
-        __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
-        __Pyx_GIVEREF(__pyx_t_22);
-        __pyx_cur_scope->__pyx_v_alt = __pyx_t_22;
-        __pyx_t_22 = 0;
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_2);
+        __pyx_t_2 = 0;
         goto __pyx_L74;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":773
+        /* "pysam/cvcf.pyx":774
  *                     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_22 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __pyx_t_9 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_sequence); 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);
+        if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        __pyx_t_23 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
+        if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_9 = PyTuple_New(4); 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_INCREF(__pyx_v_chrom);
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_chrom);
         __Pyx_GIVEREF(__pyx_v_chrom);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
-        __Pyx_GIVEREF(__pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_23);
+        __Pyx_GIVEREF(__pyx_t_23);
         __Pyx_INCREF(__pyx_v_pos);
-        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_pos);
+        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_pos);
         __Pyx_GIVEREF(__pyx_v_pos);
-        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_10);
-        __Pyx_GIVEREF(__pyx_t_10);
-        __pyx_t_9 = 0;
-        __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __pyx_v_addn = __pyx_t_10;
-        __pyx_t_10 = 0;
+        PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_11);
+        __Pyx_GIVEREF(__pyx_t_11);
+        __pyx_t_23 = 0;
+        __pyx_t_11 = 0;
+        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_v_addn = __pyx_t_11;
+        __pyx_t_11 = 0;
 
-        /* "pysam/cvcf.pyx":774
+        /* "pysam/cvcf.pyx":775
  *                 else:
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
  *                     ref = addn + ref             # <<<<<<<<<<<<<<
  *                     alt = [addn + allele for allele in alt]
  *                     pos -= 1
  */
-        __pyx_t_10 = PyNumber_Add(__pyx_v_addn, __pyx_v_ref); 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_v_ref);
-        __pyx_v_ref = __pyx_t_10;
-        __pyx_t_10 = 0;
+        __pyx_t_11 = PyNumber_Add(__pyx_v_addn, __pyx_v_ref); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_11);
+        __pyx_t_11 = 0;
 
-        /* "pysam/cvcf.pyx":775
+        /* "pysam/cvcf.pyx":776
  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
  *                     ref = addn + ref
  *                     alt = [addn + allele for allele in alt]             # <<<<<<<<<<<<<<
  *                     pos -= 1
  *         else:
  */
-        __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-          __pyx_t_2 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-          __pyx_t_15 = NULL;
-        } else {
-          __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
-        }
+        __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_9 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = 0;
         for (;;) {
-          if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
-            if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
-            #if CYTHON_COMPILING_IN_CPYTHON
-            __pyx_t_22 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_22); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #else
-            __pyx_t_22 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
-          } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
-            if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-            #if CYTHON_COMPILING_IN_CPYTHON
-            __pyx_t_22 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_22); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #else
-            __pyx_t_22 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
-          } else {
-            __pyx_t_22 = __pyx_t_15(__pyx_t_2);
-            if (unlikely(!__pyx_t_22)) {
-              if (PyErr_Occurred()) {
-                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              }
-              break;
-            }
-            __Pyx_GOTREF(__pyx_t_22);
-          }
-          __Pyx_XDECREF(__pyx_v_allele);
-          __pyx_v_allele = __pyx_t_22;
-          __pyx_t_22 = 0;
-          __pyx_t_22 = PyNumber_Add(__pyx_v_addn, __pyx_v_allele); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          if (unlikely(__Pyx_PyList_Append(__pyx_t_10, (PyObject*)__pyx_t_22))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_9)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+          __Pyx_XDECREF_SET(__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 = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __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 = ((PyObject *)__pyx_t_10);
-        __Pyx_INCREF(__pyx_t_2);
-        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-        __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
-        __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
-        __Pyx_GIVEREF(__pyx_t_2);
-        __pyx_cur_scope->__pyx_v_alt = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_11);
+        __pyx_t_11 = 0;
 
-        /* "pysam/cvcf.pyx":776
+        /* "pysam/cvcf.pyx":777
  *                     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 = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_v_pos);
-        __pyx_v_pos = __pyx_t_2;
-        __pyx_t_2 = 0;
+        if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        __pyx_t_11 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_11);
+        __pyx_t_11 = 0;
       }
       __pyx_L74:;
       goto __pyx_L73;
@@ -17385,275 +17177,275 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":779
+    /* "pysam/cvcf.pyx":780
  *         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)
  */
-    if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-      __pyx_t_2 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-      __pyx_t_15 = NULL;
+    if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
+      __pyx_t_11 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+      __pyx_t_16 = NULL;
     } else {
-      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
+      __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext;
     }
     for (;;) {
-      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_11)) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_11)) {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        __pyx_t_10 = __pyx_t_15(__pyx_t_2);
-        if (unlikely(!__pyx_t_10)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = __pyx_t_16(__pyx_t_11);
+        if (unlikely(!__pyx_t_9)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
           break;
         }
-        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(__pyx_t_9);
       }
-      __Pyx_XDECREF(__pyx_v_allele);
-      __pyx_v_allele = __pyx_t_10;
-      __pyx_t_10 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_9);
+      __pyx_t_9 = 0;
 
-      /* "pysam/cvcf.pyx":780
+      /* "pysam/cvcf.pyx":781
  *             # 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_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__alleleRegEx); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_22 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__match); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      __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 = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_alleleRegEx); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_match); 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_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 = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
       __Pyx_INCREF(__pyx_v_allele);
-      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_allele);
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_allele);
       __Pyx_GIVEREF(__pyx_v_allele);
-      __pyx_t_9 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-      __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_23);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_14 = (!__pyx_t_19);
-      if (__pyx_t_14) {
+      __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      __pyx_t_15 = ((!__pyx_t_20) != 0);
+      if (__pyx_t_15) {
 
-        /* "pysam/cvcf.pyx":781
+        /* "pysam/cvcf.pyx":782
  *             for allele in alt:
  *                 if not alleleRegEx.match(allele):
  *                     self.error(line,self.V40_BAD_ALLELE,allele)             # <<<<<<<<<<<<<<
  * 
  *         # check for leading nucleotide in indel calls
  */
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V40_BAD_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_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 = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
+        __pyx_t_2 = PyTuple_New(3); 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_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_10);
-        __Pyx_GIVEREF(__pyx_t_10);
+        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
+        __Pyx_GIVEREF(__pyx_t_9);
         __Pyx_INCREF(__pyx_v_allele);
-        PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_v_allele);
+        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_allele);
         __Pyx_GIVEREF(__pyx_v_allele);
-        __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_9 = 0;
+        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_2, NULL); 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_23); __pyx_t_23 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
         goto __pyx_L81;
       }
       __pyx_L81:;
     }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   }
   __pyx_L51:;
 
-  /* "pysam/cvcf.pyx":784
+  /* "pysam/cvcf.pyx":785
  * 
  *         # 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 (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-    __pyx_t_2 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-    __pyx_t_15 = NULL;
+  if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
+    __pyx_t_11 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+    __pyx_t_16 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
+    __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext;
   }
   for (;;) {
-    if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
-      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+    if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_11)) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-    } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
-      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+    } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_11)) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
-      __pyx_t_10 = __pyx_t_15(__pyx_t_2);
-      if (unlikely(!__pyx_t_10)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __pyx_t_16(__pyx_t_11);
+      if (unlikely(!__pyx_t_9)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_GOTREF(__pyx_t_9);
     }
-    __Pyx_XDECREF(__pyx_v_allele);
-    __pyx_v_allele = __pyx_t_10;
-    __pyx_t_10 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_9);
+    __pyx_t_9 = 0;
 
-    /* "pysam/cvcf.pyx":785
+    /* "pysam/cvcf.pyx":786
  *         # 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():
  */
-    __pyx_t_21 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_14 = (__pyx_t_21 != __pyx_t_3);
-    if (__pyx_t_14) {
+    __pyx_t_22 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_15 = ((__pyx_t_22 != __pyx_t_3) != 0);
+    if (__pyx_t_15) {
 
-      /* "pysam/cvcf.pyx":786
+      /* "pysam/cvcf.pyx":787
  *         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_3 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_14 = (__pyx_t_3 == 0);
-      if (__pyx_t_14) {
-        __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ZERO_LENGTH_ALLELE); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __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 = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_15 = ((__pyx_t_3 == 0) != 0);
+      if (__pyx_t_15) {
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ZERO_LENGTH_ALLELE); 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_23 = PyTuple_New(2); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_22);
-        __Pyx_GIVEREF(__pyx_t_22);
-        __pyx_t_22 = 0;
-        __pyx_t_22 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+        PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_23, NULL); 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_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         goto __pyx_L85;
       }
       __pyx_L85:;
 
-      /* "pysam/cvcf.pyx":787
+      /* "pysam/cvcf.pyx":788
  *             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_22 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      __pyx_t_9 = PyObject_GetAttr(__pyx_t_22, __pyx_n_s__upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-      __pyx_t_22 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ref, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_upper); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_23);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      __pyx_t_23 = __Pyx_GetItemInt(__pyx_v_allele, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_23 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_23);
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_23);
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __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_22, __pyx_t_9, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+      __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_23, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      if (__pyx_t_14) {
-        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_15) {
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_ref, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_22 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_GetAttr(__pyx_t_22, __pyx_n_s__upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_22 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
+        __pyx_t_23 = __Pyx_GetItemInt(__pyx_v_allele, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_23 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_23);
+        __pyx_t_2 = PyNumber_Add(__pyx_t_9, __pyx_t_23); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_19 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__N), __pyx_t_22, Py_NE)); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_5 = __pyx_t_19;
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_upper); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __pyx_t_20 = (__Pyx_PySequence_Contains(__pyx_n_s_N, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_5 = __pyx_t_20;
       } else {
-        __pyx_t_5 = __pyx_t_14;
+        __pyx_t_5 = __pyx_t_15;
       }
       if (__pyx_t_5) {
 
-        /* "pysam/cvcf.pyx":788
+        /* "pysam/cvcf.pyx":789
  *                 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_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_116); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
+        __pyx_t_9 = PyTuple_New(2); 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_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
-        __Pyx_GIVEREF(__pyx_t_9);
-        __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_23);
+        __Pyx_GIVEREF(__pyx_t_23);
+        __pyx_t_23 = 0;
+        __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
         goto __pyx_L86;
       }
       __pyx_L86:;
@@ -17661,286 +17453,46 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
     }
     __pyx_L84:;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
-  /* "pysam/cvcf.pyx":791
+  /* "pysam/cvcf.pyx":801
  * 
- *         # trim trailing bases in alleles
- *         if alt:             # <<<<<<<<<<<<<<
- *             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():
+ *         # left-align alleles, if a reference is available
+ *         if self._leftalign and self._reference:             # <<<<<<<<<<<<<<
+ *             while left < pos:
+ *                 movable = True
  */
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_alt); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_leftalign_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   if (__pyx_t_5) {
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __pyx_t_20 = __pyx_t_15;
+  } else {
+    __pyx_t_20 = __pyx_t_5;
+  }
+  if (__pyx_t_20) {
 
-    /* "pysam/cvcf.pyx":792
- *         # trim trailing bases in alleles
- *         if alt:
- *             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 = __Pyx_GetName(__pyx_b, __pyx_n_s__len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __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 = 792; __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_INCREF(__pyx_cur_scope->__pyx_v_alt);
-    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_cur_scope->__pyx_v_alt);
-    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alt);
-    __pyx_t_2 = 0;
-    __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 = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __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 = 792; __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_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-    __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __pyx_t_22 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_LT); __Pyx_XGOTREF(__pyx_t_22); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-    if (__pyx_t_5) {
-      __Pyx_INCREF(__pyx_t_2);
-      __pyx_t_9 = __pyx_t_2;
-    } else {
-      __pyx_t_22 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      __pyx_t_9 = __pyx_t_22;
-      __pyx_t_22 = 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 = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__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(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
-    __Pyx_GIVEREF(__pyx_t_9);
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
-      __pyx_t_2 = __pyx_t_9; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-      __pyx_t_15 = NULL;
-    } else {
-      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
-    }
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    for (;;) {
-      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_9 = __pyx_t_15(__pyx_t_2);
-        if (unlikely(!__pyx_t_9)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_9);
-      }
-      __Pyx_XDECREF(__pyx_v_i);
-      __pyx_v_i = __pyx_t_9;
-      __pyx_t_9 = 0;
-
-      /* "pysam/cvcf.pyx":793
- *         if alt:
- *             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_9 = __pyx_pf_5pysam_4cvcf_3VCF_10parse_data_genexpr(((PyObject*)__pyx_cur_scope)); 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_22 = PyTuple_New(1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_9);
-      __Pyx_GIVEREF(__pyx_t_9);
-      __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_22), NULL); 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_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
-      __pyx_t_3 = PySet_Size(__pyx_t_9); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_5 = (__pyx_t_3 > 1);
-      if (!__pyx_t_5) {
-        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_ref, -1, sizeof(long), PyInt_FromLong); if (!__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_22 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__upper); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_empty_tuple), NULL); 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_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_22 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_alt, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_22, -1, sizeof(long), PyInt_FromLong); if (!__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_22); __pyx_t_22 = 0;
-        __pyx_t_22 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_t_10 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_22 = PyObject_RichCompare(__pyx_t_9, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_22); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_19 = __pyx_t_14;
-      } else {
-        __pyx_t_19 = __pyx_t_5;
-      }
-      if (__pyx_t_19) {
-
-        /* "pysam/cvcf.pyx":794
- *             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]
- * 
- */
-        goto __pyx_L89_break;
-        goto __pyx_L90;
-      }
-      __pyx_L90:;
-
-      /* "pysam/cvcf.pyx":795
- *                 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_22 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-        __pyx_t_9 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_9); __pyx_t_3 = 0;
-        __pyx_t_26 = NULL;
-      } else {
-        __pyx_t_3 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_26 = Py_TYPE(__pyx_t_9)->tp_iternext;
-      }
-      for (;;) {
-        if (!__pyx_t_26 && PyList_CheckExact(__pyx_t_9)) {
-          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_9)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_7 = PySequence_ITEM(__pyx_t_9, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else if (!__pyx_t_26 && PyTuple_CheckExact(__pyx_t_9)) {
-          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_7 = PySequence_ITEM(__pyx_t_9, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          __pyx_t_7 = __pyx_t_26(__pyx_t_9);
-          if (unlikely(!__pyx_t_7)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            }
-            break;
-          }
-          __Pyx_GOTREF(__pyx_t_7);
-        }
-        __Pyx_XDECREF(__pyx_v_allele);
-        __pyx_v_allele = __pyx_t_7;
-        __pyx_t_7 = 0;
-        __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        if (unlikely(__Pyx_PyList_Append(__pyx_t_10, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      }
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_9 = ((PyObject *)__pyx_t_10);
-      __Pyx_INCREF(__pyx_t_9);
-      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-      __Pyx_DECREF(__pyx_v_ref);
-      __pyx_v_ref = __pyx_t_22;
-      __pyx_t_22 = 0;
-      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
-      __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
-      __Pyx_GIVEREF(__pyx_t_9);
-      __pyx_cur_scope->__pyx_v_alt = __pyx_t_9;
-      __pyx_t_9 = 0;
-    }
-    __pyx_L89_break:;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    goto __pyx_L87;
-  }
-  __pyx_L87:;
-
-  /* "pysam/cvcf.pyx":798
- * 
- *         # 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 = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_19) {
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __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 = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_14 = __pyx_t_5;
-  } else {
-    __pyx_t_14 = __pyx_t_19;
-  }
-  if (__pyx_t_14) {
-
-    /* "pysam/cvcf.pyx":799
- *         # left-align alleles, if a reference is available
- *         if self._leftalign and self._reference:
- *             while left < pos:             # <<<<<<<<<<<<<<
- *                 movable = True
- *                 for allele in alt:
+    /* "pysam/cvcf.pyx":802
+ *         # left-align alleles, if a reference is available
+ *         if self._leftalign and self._reference:
+ *             while left < pos:             # <<<<<<<<<<<<<<
+ *                 movable = True
+ *                 for allele in alt:
  */
     while (1) {
-      if (unlikely(!__pyx_v_left)) { __Pyx_RaiseUnboundLocalError("left"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-      __pyx_t_2 = PyObject_RichCompare(__pyx_v_left, __pyx_v_pos, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (!__pyx_t_14) break;
-
-      /* "pysam/cvcf.pyx":800
+      if (unlikely(!__pyx_v_left)) { __Pyx_RaiseUnboundLocalError("left"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      __pyx_t_11 = PyObject_RichCompare(__pyx_v_left, __pyx_v_pos, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      if (!__pyx_t_20) break;
+
+      /* "pysam/cvcf.pyx":803
  *         if self._leftalign and self._reference:
  *             while left < pos:
  *                 movable = True             # <<<<<<<<<<<<<<
@@ -17949,141 +17501,137 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  */
       __pyx_v_movable = 1;
 
-      /* "pysam/cvcf.pyx":801
+      /* "pysam/cvcf.pyx":804
  *             while left < pos:
  *                 movable = True
  *                 for allele in alt:             # <<<<<<<<<<<<<<
  *                     if len(allele) > len(ref):
  *                         longest, shortest = allele, ref
  */
-      if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-        __pyx_t_2 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-        __pyx_t_15 = NULL;
+      if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
+        __pyx_t_11 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+        __pyx_t_16 = NULL;
       } else {
-        __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
+        __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext;
       }
       for (;;) {
-        if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
-          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_11)) {
+          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
           #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_23 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_23); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #else
-          __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_23 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #endif
-        } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
-          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_11)) {
+          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
           #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_23 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_23); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #else
-          __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_23 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #endif
         } else {
-          __pyx_t_9 = __pyx_t_15(__pyx_t_2);
-          if (unlikely(!__pyx_t_9)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_23 = __pyx_t_16(__pyx_t_11);
+          if (unlikely(!__pyx_t_23)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             }
             break;
           }
-          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_GOTREF(__pyx_t_23);
         }
-        __Pyx_XDECREF(__pyx_v_allele);
-        __pyx_v_allele = __pyx_t_9;
-        __pyx_t_9 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_23);
+        __pyx_t_23 = 0;
 
-        /* "pysam/cvcf.pyx":802
+        /* "pysam/cvcf.pyx":805
  *                 movable = True
  *                 for allele in alt:
  *                     if len(allele) > len(ref):             # <<<<<<<<<<<<<<
  *                         longest, shortest = allele, ref
  *                     else:
  */
-        __pyx_t_3 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_21 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_14 = (__pyx_t_3 > __pyx_t_21);
-        if (__pyx_t_14) {
+        __pyx_t_3 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_22 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_20 = ((__pyx_t_3 > __pyx_t_22) != 0);
+        if (__pyx_t_20) {
 
-          /* "pysam/cvcf.pyx":803
+          /* "pysam/cvcf.pyx":806
  *                 for allele in alt:
  *                     if len(allele) > len(ref):
  *                         longest, shortest = allele, ref             # <<<<<<<<<<<<<<
  *                     else:
  *                         longest, shortest = ref, allele
  */
-          __pyx_t_9 = __pyx_v_allele;
+          __pyx_t_23 = __pyx_v_allele;
+          __Pyx_INCREF(__pyx_t_23);
+          __pyx_t_9 = __pyx_v_ref;
           __Pyx_INCREF(__pyx_t_9);
-          __pyx_t_22 = __pyx_v_ref;
-          __Pyx_INCREF(__pyx_t_22);
-          __Pyx_XDECREF(__pyx_v_longest);
-          __pyx_v_longest = __pyx_t_9;
+          __Pyx_XDECREF_SET(__pyx_v_longest, __pyx_t_23);
+          __pyx_t_23 = 0;
+          __Pyx_XDECREF_SET(__pyx_v_shortest, __pyx_t_9);
           __pyx_t_9 = 0;
-          __Pyx_XDECREF(__pyx_v_shortest);
-          __pyx_v_shortest = __pyx_t_22;
-          __pyx_t_22 = 0;
-          goto __pyx_L98;
+          goto __pyx_L92;
         }
         /*else*/ {
 
-          /* "pysam/cvcf.pyx":805
+          /* "pysam/cvcf.pyx":808
  *                         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_22 = __pyx_v_ref;
-          __Pyx_INCREF(__pyx_t_22);
-          __pyx_t_9 = __pyx_v_allele;
+          __pyx_t_9 = __pyx_v_ref;
           __Pyx_INCREF(__pyx_t_9);
-          __Pyx_XDECREF(__pyx_v_longest);
-          __pyx_v_longest = __pyx_t_22;
-          __pyx_t_22 = 0;
-          __Pyx_XDECREF(__pyx_v_shortest);
-          __pyx_v_shortest = __pyx_t_9;
+          __pyx_t_23 = __pyx_v_allele;
+          __Pyx_INCREF(__pyx_t_23);
+          __Pyx_XDECREF_SET(__pyx_v_longest, __pyx_t_9);
           __pyx_t_9 = 0;
+          __Pyx_XDECREF_SET(__pyx_v_shortest, __pyx_t_23);
+          __pyx_t_23 = 0;
         }
-        __pyx_L98:;
+        __pyx_L92:;
 
-        /* "pysam/cvcf.pyx":806
+        /* "pysam/cvcf.pyx":809
  *                     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():
  */
-        __pyx_t_21 = PyObject_Length(__pyx_v_longest); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __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 = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_14 = (__pyx_t_21 == __pyx_t_3);
-        if (!__pyx_t_14) {
-          __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_longest, 0, __pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_22 = PyObject_Length(__pyx_v_longest); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __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 = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_20 = (__pyx_t_22 == __pyx_t_3);
+        if (!__pyx_t_20) {
+          __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_23 = __Pyx_PyObject_GetSlice(__pyx_v_longest, 0, __pyx_t_3, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_23);
+          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_9);
-          __pyx_t_22 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__upper); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
+          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+          __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_23);
           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __pyx_t_9 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_shortest, __pyx_n_s_upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_9);
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-          __pyx_t_22 = PyObject_GetAttr(__pyx_v_shortest, __pyx_n_s__upper); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          __pyx_t_10 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_10);
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-          __pyx_t_22 = PyObject_RichCompare(__pyx_t_9, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_22); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __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_RichCompare(__pyx_t_23, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-          __pyx_t_5 = __pyx_t_19;
+          __pyx_t_15 = __pyx_t_5;
         } else {
-          __pyx_t_5 = __pyx_t_14;
+          __pyx_t_15 = __pyx_t_20;
         }
-        if (__pyx_t_5) {
+        if (__pyx_t_15) {
 
-          /* "pysam/cvcf.pyx":807
+          /* "pysam/cvcf.pyx":810
  *                         longest, shortest = ref, allele
  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
  *                         movable = False             # <<<<<<<<<<<<<<
@@ -18091,43 +17639,43 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  *                         movable = False
  */
           __pyx_v_movable = 0;
-          goto __pyx_L99;
+          goto __pyx_L93;
         }
-        __pyx_L99:;
+        __pyx_L93:;
 
-        /* "pysam/cvcf.pyx":808
+        /* "pysam/cvcf.pyx":811
  *                     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_22 = __Pyx_GetItemInt(__pyx_v_longest, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __pyx_t_10 = PyObject_GetAttr(__pyx_t_22, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_22 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_21 = (__pyx_t_3 - 1);
-        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_longest, __pyx_t_21, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_longest, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyObject_RichCompare(__pyx_t_22, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_22 = (__pyx_t_3 - 1);
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_longest, __pyx_t_22, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_upper); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __pyx_t_23 = PyObject_RichCompare(__pyx_t_9, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        if (__pyx_t_5) {
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        if (__pyx_t_15) {
 
-          /* "pysam/cvcf.pyx":809
+          /* "pysam/cvcf.pyx":812
  *                         movable = False
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
  *                         movable = False             # <<<<<<<<<<<<<<
@@ -18135,1014 +17683,883 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  *                     break
  */
           __pyx_v_movable = 0;
-          goto __pyx_L100;
+          goto __pyx_L94;
         }
-        __pyx_L100:;
+        __pyx_L94:;
       }
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
-      /* "pysam/cvcf.pyx":810
+      /* "pysam/cvcf.pyx":813
  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
  *                         movable = False
  *                 if not movable:             # <<<<<<<<<<<<<<
  *                     break
  *                 ref = ref[:-1]
  */
-      __pyx_t_5 = (!__pyx_v_movable);
-      if (__pyx_t_5) {
+      __pyx_t_15 = ((!(__pyx_v_movable != 0)) != 0);
+      if (__pyx_t_15) {
 
-        /* "pysam/cvcf.pyx":811
+        /* "pysam/cvcf.pyx":814
  *                         movable = False
  *                 if not movable:
  *                     break             # <<<<<<<<<<<<<<
  *                 ref = ref[:-1]
  *                 alt = [allele[:-1] for allele in alt]
  */
-        goto __pyx_L95_break;
-        goto __pyx_L101;
+        goto __pyx_L89_break;
       }
-      __pyx_L101:;
 
-      /* "pysam/cvcf.pyx":812
+      /* "pysam/cvcf.pyx":815
  *                 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 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 0, -1); 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);
-      __Pyx_DECREF(__pyx_v_ref);
-      __pyx_v_ref = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_ref, 0, -1, NULL, NULL, &__pyx_slice__78, 0, 1, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_11);
+      __pyx_t_11 = 0;
 
-      /* "pysam/cvcf.pyx":813
+      /* "pysam/cvcf.pyx":816
  *                     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 = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-        __pyx_t_9 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = 0;
-        __pyx_t_15 = NULL;
+      __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      if (PyList_CheckExact(__pyx_v_alt) || PyTuple_CheckExact(__pyx_v_alt)) {
+        __pyx_t_23 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_23); __pyx_t_4 = 0;
+        __pyx_t_16 = NULL;
       } else {
-        __pyx_t_4 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __pyx_t_15 = Py_TYPE(__pyx_t_9)->tp_iternext;
+        __pyx_t_4 = -1; __pyx_t_23 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
+        __pyx_t_16 = Py_TYPE(__pyx_t_23)->tp_iternext;
       }
       for (;;) {
-        if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_9)) {
-          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_9)) break;
+        if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_23)) {
+          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_23)) break;
           #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #else
-          __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_23, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #endif
-        } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_9)) {
-          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+        } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_23)) {
+          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_23)) break;
           #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_23, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #else
-          __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_23, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #endif
         } else {
-          __pyx_t_10 = __pyx_t_15(__pyx_t_9);
-          if (unlikely(!__pyx_t_10)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_2 = __pyx_t_16(__pyx_t_23);
+          if (unlikely(!__pyx_t_2)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             }
             break;
           }
-          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_GOTREF(__pyx_t_2);
         }
-        __Pyx_XDECREF(__pyx_v_allele);
-        __pyx_v_allele = __pyx_t_10;
-        __pyx_t_10 = 0;
-        __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_allele, 0, -1, NULL, NULL, &__pyx_slice__79, 0, 1, 1); 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);
+        if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __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_9 = ((PyObject *)__pyx_t_2);
-      __Pyx_INCREF(__pyx_t_9);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
-      __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
-      __Pyx_GIVEREF(__pyx_t_9);
-      __pyx_cur_scope->__pyx_v_alt = __pyx_t_9;
-      __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_11);
+      __pyx_t_11 = 0;
 
-      /* "pysam/cvcf.pyx":814
+      /* "pysam/cvcf.pyx":817
  *                 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_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-        __pyx_t_2 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-        __pyx_t_15 = NULL;
-      } else {
-        __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
-      }
+      __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_23 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_23); __pyx_t_4 = 0;
       for (;;) {
-        if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
-          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
-          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          __pyx_t_10 = __pyx_t_15(__pyx_t_2);
-          if (unlikely(!__pyx_t_10)) {
-            if (PyErr_Occurred()) {
-              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            }
-            break;
-          }
-          __Pyx_GOTREF(__pyx_t_10);
-        }
-        __Pyx_XDECREF(__pyx_v_allele);
-        __pyx_v_allele = __pyx_t_10;
-        __pyx_t_10 = 0;
-        __pyx_t_21 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        if (unlikely(__Pyx_PyList_Append(__pyx_t_9, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_23)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_23, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+        __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_2);
+        __pyx_t_2 = 0;
+        __pyx_t_22 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __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 = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_t_9));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_9));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
-      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-      __pyx_t_9 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_9);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_RichCompare(__pyx_t_9, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (!__pyx_t_5) {
-        __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_14 = (__pyx_t_4 == 0);
-        __pyx_t_19 = __pyx_t_14;
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      __pyx_t_23 = PyTuple_New(1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_23);
+      PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_11);
+      __Pyx_GIVEREF(__pyx_t_11);
+      __pyx_t_11 = 0;
+      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_23, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      __pyx_t_23 = PyObject_RichCompare(__pyx_t_11, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      if (!__pyx_t_15) {
+        __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_20 = (__pyx_t_4 == 0);
+        __pyx_t_5 = __pyx_t_20;
       } else {
-        __pyx_t_19 = __pyx_t_5;
+        __pyx_t_5 = __pyx_t_15;
       }
-      if (__pyx_t_19) {
+      if (__pyx_t_5) {
 
-        /* "pysam/cvcf.pyx":815
+        /* "pysam/cvcf.pyx":818
  *                 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
  */
-        if (unlikely(!__pyx_v_faref_leftflank)) { __Pyx_RaiseUnboundLocalError("faref_leftflank"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-        __pyx_t_2 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_9 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_9); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-        __pyx_t_9 = PyNumber_Add(__pyx_t_2, __pyx_v_ref); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_9);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_v_ref);
-        __pyx_v_ref = __pyx_t_9;
-        __pyx_t_9 = 0;
+        if (unlikely(!__pyx_v_faref_leftflank)) { __Pyx_RaiseUnboundLocalError("faref_leftflank"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        if (unlikely(!__pyx_v_left)) { __Pyx_RaiseUnboundLocalError("left"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        __pyx_t_23 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_23);
+        __pyx_t_11 = PyNumber_Subtract(__pyx_t_23, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __pyx_t_23 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_11); if (unlikely(__pyx_t_23 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_23);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __pyx_t_11 = PyNumber_Add(__pyx_t_23, __pyx_v_ref); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_11);
+        __pyx_t_11 = 0;
 
-        /* "pysam/cvcf.pyx":816
+        /* "pysam/cvcf.pyx":819
  *                 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_9 = PyList_New(0); 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 (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
-          __pyx_t_2 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-          __pyx_t_15 = NULL;
-        } else {
-          __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
-        }
+        __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_23 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_23); __pyx_t_4 = 0;
         for (;;) {
-          if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
-            if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
-            #if CYTHON_COMPILING_IN_CPYTHON
-            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #else
-            __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
-          } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
-            if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-            #if CYTHON_COMPILING_IN_CPYTHON
-            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #else
-            __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
-          } else {
-            __pyx_t_10 = __pyx_t_15(__pyx_t_2);
-            if (unlikely(!__pyx_t_10)) {
-              if (PyErr_Occurred()) {
-                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              }
-              break;
-            }
-            __Pyx_GOTREF(__pyx_t_10);
-          }
-          __Pyx_XDECREF(__pyx_v_allele);
-          __pyx_v_allele = __pyx_t_10;
-          __pyx_t_10 = 0;
-          __pyx_t_10 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); 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_22 = PyNumber_Subtract(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          __pyx_t_10 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_22); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_10);
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-          __pyx_t_22 = PyNumber_Add(__pyx_t_10, __pyx_v_allele); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          if (unlikely(__Pyx_PyList_Append(__pyx_t_9, (PyObject*)__pyx_t_22))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_23)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_23, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+          __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_2);
+          __pyx_t_2 = 0;
+          if (unlikely(!__pyx_v_faref_leftflank)) { __Pyx_RaiseUnboundLocalError("faref_leftflank"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+          if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+          if (unlikely(!__pyx_v_left)) { __Pyx_RaiseUnboundLocalError("left"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+          __pyx_t_2 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_9 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_2 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_9); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_t_9 = PyNumber_Add(__pyx_t_2, __pyx_v_allele); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __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_9);
-        __Pyx_INCREF(__pyx_t_2);
-        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-        __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
-        __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
-        __Pyx_GIVEREF(__pyx_t_2);
-        __pyx_cur_scope->__pyx_v_alt = __pyx_t_2;
-        __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+        __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_11);
+        __pyx_t_11 = 0;
 
-        /* "pysam/cvcf.pyx":817
+        /* "pysam/cvcf.pyx":820
  *                     ref = faref_leftflank[pos-left-1] + ref
  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
  *                     pos -= 1             # <<<<<<<<<<<<<<
  * 
  *         # parse sample columns
  */
-        __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_v_pos);
-        __pyx_v_pos = __pyx_t_2;
-        __pyx_t_2 = 0;
-        goto __pyx_L104;
+        if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        __pyx_t_11 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_11);
+        __pyx_t_11 = 0;
+        goto __pyx_L98;
       }
-      __pyx_L104:;
+      __pyx_L98:;
     }
-    __pyx_L95_break:;
-    goto __pyx_L93;
+    __pyx_L89_break:;
+    goto __pyx_L87;
   }
-  __pyx_L93:;
+  __pyx_L87:;
 
-  /* "pysam/cvcf.pyx":820
+  /* "pysam/cvcf.pyx":823
  * 
  *         # parse sample columns
  *         samples = []             # <<<<<<<<<<<<<<
  *         for sample in cols[9:]:
  *             dict = {}
  */
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_samples = ((PyObject*)__pyx_t_2);
-  __pyx_t_2 = 0;
+  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __pyx_v_samples = ((PyObject*)__pyx_t_11);
+  __pyx_t_11 = 0;
 
-  /* "pysam/cvcf.pyx":821
+  /* "pysam/cvcf.pyx":824
  *         # parse sample columns
  *         samples = []
  *         for sample in cols[9:]:             # <<<<<<<<<<<<<<
  *             dict = {}
  *             values = sample.split(':')
  */
-  __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_cols, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __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_9 = __pyx_t_2; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = 0;
-    __pyx_t_15 = NULL;
+  __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_cols, 9, 0, NULL, NULL, &__pyx_slice__80, 1, 0, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  if (PyList_CheckExact(__pyx_t_11) || PyTuple_CheckExact(__pyx_t_11)) {
+    __pyx_t_23 = __pyx_t_11; __Pyx_INCREF(__pyx_t_23); __pyx_t_4 = 0;
+    __pyx_t_16 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_15 = Py_TYPE(__pyx_t_9)->tp_iternext;
+    __pyx_t_4 = -1; __pyx_t_23 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_23);
+    __pyx_t_16 = Py_TYPE(__pyx_t_23)->tp_iternext;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   for (;;) {
-    if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_9)) {
-      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_9)) break;
+    if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_23)) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_23)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PySequence_ITEM(__pyx_t_23, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-    } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_9)) {
-      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+    } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_23)) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_23)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_23, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PySequence_ITEM(__pyx_t_23, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
-      __pyx_t_2 = __pyx_t_15(__pyx_t_9);
-      if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __pyx_t_16(__pyx_t_23);
+      if (unlikely(!__pyx_t_11)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_11);
     }
-    __Pyx_XDECREF(__pyx_v_sample);
-    __pyx_v_sample = __pyx_t_2;
-    __pyx_t_2 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_sample, __pyx_t_11);
+    __pyx_t_11 = 0;
 
-    /* "pysam/cvcf.pyx":822
+    /* "pysam/cvcf.pyx":825
  *         samples = []
  *         for sample in cols[9:]:
  *             dict = {}             # <<<<<<<<<<<<<<
  *             values = sample.split(':')
  *             if len(values) > len(format):
  */
-    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    __Pyx_XDECREF(((PyObject *)__pyx_v_dict));
-    __pyx_v_dict = ((PyObject*)__pyx_t_2);
-    __pyx_t_2 = 0;
+    __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __Pyx_XDECREF_SET(__pyx_v_dict, ((PyObject*)__pyx_t_11));
+    __pyx_t_11 = 0;
 
-    /* "pysam/cvcf.pyx":823
+    /* "pysam/cvcf.pyx":826
  *         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_t_2 = PyObject_GetAttr(__pyx_v_sample, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_22 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_117), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_22);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_XDECREF(__pyx_v_values);
-    __pyx_v_values = __pyx_t_22;
-    __pyx_t_22 = 0;
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_values, __pyx_t_9);
+    __pyx_t_9 = 0;
 
-    /* "pysam/cvcf.pyx":824
+    /* "pysam/cvcf.pyx":827
  *             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)):
  */
-    __pyx_t_21 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_19 = (__pyx_t_21 > __pyx_t_3);
-    if (__pyx_t_19) {
+    __pyx_t_22 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = ((__pyx_t_22 > __pyx_t_3) != 0);
+    if (__pyx_t_5) {
 
-      /* "pysam/cvcf.pyx":825
+      /* "pysam/cvcf.pyx":828
  *             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_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_18); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BAD_NUMBER_OF_VALUES); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __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 = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_24 = PyTuple_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_24);
-      PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_10);
-      __Pyx_GIVEREF(__pyx_t_10);
+      __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_25 = PyTuple_New(3); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_25);
+      PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_sample);
-      PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_v_sample);
+      PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_v_sample);
       __Pyx_GIVEREF(__pyx_v_sample);
-      PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_t_7);
-      __Pyx_GIVEREF(__pyx_t_7);
-      __pyx_t_10 = 0;
-      __pyx_t_7 = 0;
-      __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_24)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-      __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
-      __pyx_t_24 = PyTuple_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_24);
+      PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
+      __pyx_t_2 = 0;
+      __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_found_s_values_in_element_s_exp, __pyx_t_25); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+      __pyx_t_25 = PyTuple_New(3); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_25);
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      PyTuple_SET_ITEM(__pyx_t_24, 2, ((PyObject *)__pyx_t_7));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
-      __pyx_t_2 = 0;
-      __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      goto __pyx_L111;
+      PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_t_11);
+      __Pyx_GIVEREF(__pyx_t_11);
+      PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
+      __pyx_t_11 = 0;
+      __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_25, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      goto __pyx_L105;
     }
-    __pyx_L111:;
+    __pyx_L105:;
 
-    /* "pysam/cvcf.pyx":826
+    /* "pysam/cvcf.pyx":829
  *             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_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_24 = PyTuple_New(1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_24);
-    PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_7);
-    __Pyx_GIVEREF(__pyx_t_7);
-    __pyx_t_7 = 0;
-    __pyx_t_7 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
-    if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
-      __pyx_t_24 = __pyx_t_7; __Pyx_INCREF(__pyx_t_24); __pyx_t_3 = 0;
-      __pyx_t_26 = NULL;
-    } else {
-      __pyx_t_3 = -1; __pyx_t_24 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_24);
-      __pyx_t_26 = Py_TYPE(__pyx_t_24)->tp_iternext;
-    }
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    for (;;) {
-      if (!__pyx_t_26 && PyList_CheckExact(__pyx_t_24)) {
-        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_24)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_24, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_24, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else if (!__pyx_t_26 && PyTuple_CheckExact(__pyx_t_24)) {
-        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_24)) break;
-        #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_24, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_24, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
-      } else {
-        __pyx_t_7 = __pyx_t_26(__pyx_t_24);
-        if (unlikely(!__pyx_t_7)) {
-          if (PyErr_Occurred()) {
-            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_7);
-      }
-      __Pyx_XDECREF(__pyx_v_idx);
-      __pyx_v_idx = __pyx_t_7;
-      __pyx_t_7 = 0;
+    __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_3; __pyx_t_22+=1) {
+      __pyx_v_idx = __pyx_t_22;
 
-      /* "pysam/cvcf.pyx":827
+      /* "pysam/cvcf.pyx":830
  *                 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_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__get_expected); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_22 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); 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_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_22);
-      __Pyx_GIVEREF(__pyx_t_22);
-      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
-      __Pyx_GIVEREF(__pyx_t_2);
-      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_alt);
-      PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_cur_scope->__pyx_v_alt);
-      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alt);
-      __pyx_t_22 = 0;
-      __pyx_t_2 = 0;
-      __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_10), 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_7); __pyx_t_7 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
-      __Pyx_XDECREF(__pyx_v_expected);
-      __pyx_v_expected = __pyx_t_2;
-      __pyx_t_2 = 0;
+      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_expected); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_25 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_25 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_25);
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_25);
+      __Pyx_GIVEREF(__pyx_t_25);
+      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
+      __Pyx_INCREF(__pyx_v_alt);
+      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_alt);
+      __Pyx_GIVEREF(__pyx_v_alt);
+      __pyx_t_25 = 0;
+      __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __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_11); __pyx_t_11 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_expected, __pyx_t_9);
+      __pyx_t_9 = 0;
 
-      /* "pysam/cvcf.pyx":828
+      /* "pysam/cvcf.pyx":831
  *             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 = "."
  */
-      __pyx_t_21 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_10 = PyObject_RichCompare(__pyx_v_idx, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      if (__pyx_t_19) {
-        __pyx_t_10 = PyObject_GetItem(__pyx_v_values, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_XDECREF(__pyx_v_value);
-        __pyx_v_value = __pyx_t_10;
-        __pyx_t_10 = 0;
-        goto __pyx_L114;
+      __pyx_t_26 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = ((__pyx_v_idx < __pyx_t_26) != 0);
+      if (__pyx_t_5) {
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_9);
+        __pyx_t_9 = 0;
+        goto __pyx_L108;
       }
       /*else*/ {
 
-        /* "pysam/cvcf.pyx":830
+        /* "pysam/cvcf.pyx":833
  *                 if idx < len(values): value = values[idx]
  *                 else:
  *                     if expected == -1: value = "."             # <<<<<<<<<<<<<<
  *                     else: value = ",".join(["."]*expected)
  * 
  */
-        __pyx_t_10 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        if (__pyx_t_19) {
-          __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-          __Pyx_XDECREF(__pyx_v_value);
-          __pyx_v_value = ((PyObject *)__pyx_kp_s_9);
-          goto __pyx_L115;
+        __pyx_t_9 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __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 = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        if (__pyx_t_5) {
+          __Pyx_INCREF(__pyx_kp_s__8);
+          __Pyx_XDECREF_SET(__pyx_v_value, __pyx_kp_s__8);
+          goto __pyx_L109;
         }
         /*else*/ {
 
-          /* "pysam/cvcf.pyx":831
+          /* "pysam/cvcf.pyx":834
  *                 else:
  *                     if expected == -1: value = "."
  *                     else: value = ",".join(["."]*expected)             # <<<<<<<<<<<<<<
  * 
  *                 dict[format[idx]] = self.parse_formatdata(format[idx],
  */
-          __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 = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_10);
-          __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-          PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_9));
-          __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
-          { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_expected); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_INCREF(__pyx_kp_s__8);
+          PyList_SET_ITEM(__pyx_t_9, 0, __pyx_kp_s__8);
+          __Pyx_GIVEREF(__pyx_kp_s__8);
+          { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_9, __pyx_v_expected); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             __Pyx_GOTREF(__pyx_temp);
-            __Pyx_DECREF(__pyx_t_2);
-            __pyx_t_2 = __pyx_temp;
+            __Pyx_DECREF(__pyx_t_9);
+            __pyx_t_9 = __pyx_temp;
           }
-          __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_2));
-          __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
-          __pyx_t_2 = 0;
-          __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __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_7)); __pyx_t_7 = 0;
-          __Pyx_XDECREF(__pyx_v_value);
-          __pyx_v_value = __pyx_t_2;
-          __pyx_t_2 = 0;
+          __pyx_t_11 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_11);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11);
+          __pyx_t_11 = 0;
         }
-        __pyx_L115:;
+        __pyx_L109:;
       }
-      __pyx_L114:;
+      __pyx_L108:;
 
-      /* "pysam/cvcf.pyx":833
+      /* "pysam/cvcf.pyx":836
  *                     else: value = ",".join(["."]*expected)
  * 
  *                 dict[format[idx]] = self.parse_formatdata(format[idx],             # <<<<<<<<<<<<<<
  *                                                           value,
  *                                                           self._format,
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_formatdata); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_9);
 
-      /* "pysam/cvcf.pyx":835
+      /* "pysam/cvcf.pyx":838
  *                 dict[format[idx]] = self.parse_formatdata(format[idx],
  *                                                           value,
  *                                                           self._format,             # <<<<<<<<<<<<<<
  *                                                           line)
  *                 if expected != -1 and len(dict[format[idx]]) != expected:
  */
-      __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
 
       /* "pysam/cvcf.pyx":836
+ *                     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_22 = PyTuple_New(4); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_7);
-      __Pyx_GIVEREF(__pyx_t_7);
+      __pyx_t_25 = PyTuple_New(4); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_25);
+      PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
       __Pyx_INCREF(__pyx_v_value);
-      PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_v_value);
       __Pyx_GIVEREF(__pyx_v_value);
-      PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_10);
-      __Pyx_GIVEREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
       __Pyx_INCREF(__pyx_v_line);
-      PyTuple_SET_ITEM(__pyx_t_22, 3, __pyx_v_line);
+      PyTuple_SET_ITEM(__pyx_t_25, 3, __pyx_v_line);
       __Pyx_GIVEREF(__pyx_v_line);
-      __pyx_t_7 = 0;
-      __pyx_t_10 = 0;
-      __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __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_22)); __pyx_t_22 = 0;
-
-      /* "pysam/cvcf.pyx":833
- *                     else: value = ",".join(["."]*expected)
- * 
- *                 dict[format[idx]] = self.parse_formatdata(format[idx],             # <<<<<<<<<<<<<<
- *                                                           value,
- *                                                           self._format,
- */
-      __pyx_t_22 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
-      if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_22, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_9 = 0;
+      __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_25, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+      __pyx_t_25 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_25 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_25);
+      if (unlikely(PyDict_SetItem(__pyx_v_dict, __pyx_t_25, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-      /* "pysam/cvcf.pyx":837
+      /* "pysam/cvcf.pyx":840
  *                                                           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_10 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-      if (__pyx_t_19) {
-        __pyx_t_10 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_22 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_10); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_t_21 = PyObject_Length(__pyx_t_22); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_22 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __pyx_t_10 = PyObject_RichCompare(__pyx_t_22, __pyx_v_expected, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_t_14 = __pyx_t_5;
+      __pyx_t_8 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      if (__pyx_t_5) {
+        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_25 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_8); if (unlikely(__pyx_t_25 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_25);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_26 = PyObject_Length(__pyx_t_25); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+        __pyx_t_25 = PyInt_FromSsize_t(__pyx_t_26); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_25);
+        __pyx_t_8 = PyObject_RichCompare(__pyx_t_25, __pyx_v_expected, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+        __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_20 = __pyx_t_15;
       } else {
-        __pyx_t_14 = __pyx_t_19;
+        __pyx_t_20 = __pyx_t_5;
       }
-      if (__pyx_t_14) {
+      if (__pyx_t_20) {
 
-        /* "pysam/cvcf.pyx":838
+        /* "pysam/cvcf.pyx":841
  *                                                           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_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_20); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
+        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BAD_NUMBER_OF_PARAMETERS); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_25);
 
-        /* "pysam/cvcf.pyx":839
+        /* "pysam/cvcf.pyx":842
  *                 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_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_9); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_7); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
-        __Pyx_GIVEREF(__pyx_t_2);
+        __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 = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11);
+        __Pyx_GIVEREF(__pyx_t_11);
         __Pyx_INCREF(__pyx_v_expected);
-        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_expected);
+        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_expected);
         __Pyx_GIVEREF(__pyx_v_expected);
-        PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_8);
-        __Pyx_GIVEREF(__pyx_t_8);
+        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_11 = 0;
         __pyx_t_2 = 0;
-        __pyx_t_8 = 0;
-        __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-        __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_id_s_expected_s_parameters_got_s, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+        /* "pysam/cvcf.pyx":841
+ *                                                           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_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
         __Pyx_INCREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
         __Pyx_GIVEREF(__pyx_v_line);
-        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_22);
-        __Pyx_GIVEREF(__pyx_t_22);
-        PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_8));
-        __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
-        __pyx_t_22 = 0;
-        __pyx_t_8 = 0;
-        __pyx_t_8 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_25);
+        __Pyx_GIVEREF(__pyx_t_25);
+        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_2);
+        __Pyx_GIVEREF(__pyx_t_2);
+        __pyx_t_25 = 0;
+        __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
         __Pyx_DECREF(__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;
 
-        /* "pysam/cvcf.pyx":840
+        /* "pysam/cvcf.pyx":843
  *                     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_8 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_8); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_t_21 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_v_expected, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        if (__pyx_t_14) {
-          __pyx_t_8 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_8); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __pyx_t_10 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_10);
-          __pyx_t_22 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_10); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_22, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_10);
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-          __pyx_t_22 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_22); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-          __pyx_t_21 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __pyx_t_22 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          __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 = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_2); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_26 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_26); 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_2 = PyObject_RichCompare(__pyx_t_9, __pyx_v_expected, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        if (__pyx_t_20) {
+          __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
           __Pyx_GOTREF(__pyx_t_2);
-          PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_10);
-          __Pyx_GIVEREF(__pyx_t_10);
-          { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_22); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_2); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_9);
+          __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_25 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_8); if (unlikely(__pyx_t_25 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_25);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_25, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+          __pyx_t_25 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_25 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_25);
+          __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_25); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_11);
+          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+          __pyx_t_26 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+          __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_26); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_11);
+          __pyx_t_25 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_11); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_25);
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+          __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_11);
+          PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
+          __Pyx_GIVEREF(__pyx_t_8);
+          { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_11, __pyx_t_25); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             __Pyx_GOTREF(__pyx_temp);
-            __Pyx_DECREF(__pyx_t_2);
-            __pyx_t_2 = __pyx_temp;
+            __Pyx_DECREF(__pyx_t_11);
+            __pyx_t_11 = __pyx_temp;
           }
-          __pyx_t_10 = 0;
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-          __pyx_t_22 = PyNumber_InPlaceAdd(__pyx_t_7, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_22);
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-          if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_8, __pyx_t_22) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-          goto __pyx_L117;
+          __pyx_t_8 = 0;
+          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+          __pyx_t_25 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_25);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+          if (unlikely(PyDict_SetItem(__pyx_v_dict, __pyx_t_2, __pyx_t_25) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          goto __pyx_L111;
         }
-        __pyx_L117:;
+        __pyx_L111:;
 
-        /* "pysam/cvcf.pyx":841
+        /* "pysam/cvcf.pyx":844
  *                                "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_8 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __pyx_t_22 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_8); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_t_22, 0, __pyx_t_21); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_8);
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __pyx_t_22 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_22);
-        if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_22, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        goto __pyx_L116;
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_25 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_2); if (unlikely(__pyx_t_25 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_25);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_25, 0, 0, NULL, &__pyx_v_expected, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+        __pyx_t_25 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_25 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_25);
+        if (unlikely(PyDict_SetItem(__pyx_v_dict, __pyx_t_25, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        goto __pyx_L110;
       }
-      __pyx_L116:;
+      __pyx_L110:;
     }
-    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
 
-    /* "pysam/cvcf.pyx":842
+    /* "pysam/cvcf.pyx":845
  *                     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
  */
-    __pyx_t_25 = PyList_Append(__pyx_v_samples, ((PyObject *)__pyx_v_dict)); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_samples, __pyx_v_dict); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
 
-  /* "pysam/cvcf.pyx":845
+  /* "pysam/cvcf.pyx":848
  * 
  *         # done
  *         d = {'chrom':chrom,             # <<<<<<<<<<<<<<
  *              'pos':pos,      # return 0-based position
  *              'id':id,
  */
-  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__chrom), __pyx_v_chrom) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_23 = PyDict_New(); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_23);
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_chrom, __pyx_v_chrom) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":846
+  /* "pysam/cvcf.pyx":849
  *         # done
  *         d = {'chrom':chrom,
  *              'pos':pos,      # return 0-based position             # <<<<<<<<<<<<<<
  *              'id':id,
  *              'ref':ref,
  */
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__pos), __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_pos, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":847
+  /* "pysam/cvcf.pyx":850
  *         d = {'chrom':chrom,
  *              'pos':pos,      # return 0-based position
  *              'id':id,             # <<<<<<<<<<<<<<
  *              'ref':ref,
  *              'alt':alt,
  */
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__id), __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_id, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":848
+  /* "pysam/cvcf.pyx":851
  *              'pos':pos,      # return 0-based position
  *              'id':id,
  *              'ref':ref,             # <<<<<<<<<<<<<<
  *              'alt':alt,
  *              'qual':qual,
  */
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__ref), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_ref, __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":849
+  /* "pysam/cvcf.pyx":852
  *              'id':id,
  *              'ref':ref,
  *              'alt':alt,             # <<<<<<<<<<<<<<
  *              'qual':qual,
  *              'filter':filter,
  */
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__alt), __pyx_cur_scope->__pyx_v_alt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_alt, __pyx_v_alt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":850
+  /* "pysam/cvcf.pyx":853
  *              'ref':ref,
  *              'alt':alt,
  *              'qual':qual,             # <<<<<<<<<<<<<<
  *              'filter':filter,
  *              'info':info,
  */
-  __pyx_t_24 = PyFloat_FromDouble(__pyx_v_qual); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_24);
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__qual), __pyx_t_24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
+  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_qual, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":851
+  /* "pysam/cvcf.pyx":854
  *              'alt':alt,
  *              'qual':qual,
  *              'filter':filter,             # <<<<<<<<<<<<<<
  *              'info':info,
  *              'format':format}
  */
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__filter), __pyx_v_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_filter_2, __pyx_v_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":852
+  /* "pysam/cvcf.pyx":855
  *              'qual':qual,
  *              'filter':filter,
  *              'info':info,             # <<<<<<<<<<<<<<
  *              'format':format}
  *         for key,value in zip(self._samples,samples):
  */
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_v_info)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_info_2, __pyx_v_info) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":853
+  /* "pysam/cvcf.pyx":856
  *              'filter':filter,
  *              'info':info,
  *              'format':format}             # <<<<<<<<<<<<<<
  *         for key,value in zip(self._samples,samples):
  *             d[key] = value
  */
-  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__format), __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_d = ((PyObject*)__pyx_t_9);
-  __pyx_t_9 = 0;
+  if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_format, __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_d = ((PyObject*)__pyx_t_23);
+  __pyx_t_23 = 0;
 
-  /* "pysam/cvcf.pyx":854
+  /* "pysam/cvcf.pyx":857
  *              'info':info,
  *              'format':format}
  *         for key,value in zip(self._samples,samples):             # <<<<<<<<<<<<<<
  *             d[key] = value
  * 
  */
-  __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_24 = PyTuple_New(2); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_24);
-  PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_9);
-  __Pyx_GIVEREF(__pyx_t_9);
-  __Pyx_INCREF(((PyObject *)__pyx_v_samples));
-  PyTuple_SET_ITEM(__pyx_t_24, 1, ((PyObject *)__pyx_v_samples));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_samples));
-  __pyx_t_9 = 0;
-  __pyx_t_9 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
-  if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
-    __pyx_t_24 = __pyx_t_9; __Pyx_INCREF(__pyx_t_24); __pyx_t_4 = 0;
-    __pyx_t_15 = NULL;
+  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_23);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_23);
+  __Pyx_GIVEREF(__pyx_t_23);
+  __Pyx_INCREF(__pyx_v_samples);
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_samples);
+  __Pyx_GIVEREF(__pyx_v_samples);
+  __pyx_t_23 = 0;
+  __pyx_t_23 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_23);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyList_CheckExact(__pyx_t_23) || PyTuple_CheckExact(__pyx_t_23)) {
+    __pyx_t_2 = __pyx_t_23; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+    __pyx_t_16 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_24 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_24);
-    __pyx_t_15 = Py_TYPE(__pyx_t_24)->tp_iternext;
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_23); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_16 = Py_TYPE(__pyx_t_2)->tp_iternext;
   }
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
   for (;;) {
-    if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_24)) {
-      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_24)) break;
+    if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_24, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_23 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_23); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_9 = PySequence_ITEM(__pyx_t_24, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_23 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-    } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_24)) {
-      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_24)) break;
+    } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_24, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_23 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_23); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_9 = PySequence_ITEM(__pyx_t_24, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_23 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
-      __pyx_t_9 = __pyx_t_15(__pyx_t_24);
-      if (unlikely(!__pyx_t_9)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_23 = __pyx_t_16(__pyx_t_2);
+      if (unlikely(!__pyx_t_23)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_GOTREF(__pyx_t_23);
     }
-    if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
-      PyObject* sequence = __pyx_t_9;
+    if ((likely(PyTuple_CheckExact(__pyx_t_23))) || (PyList_CheckExact(__pyx_t_23))) {
+      PyObject* sequence = __pyx_t_23;
       #if CYTHON_COMPILING_IN_CPYTHON
       Py_ssize_t size = Py_SIZE(sequence);
       #else
@@ -19151,66 +18568,63 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
       if (unlikely(size != 2)) {
         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       #if CYTHON_COMPILING_IN_CPYTHON
       if (likely(PyTuple_CheckExact(sequence))) {
-        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
-        __pyx_t_22 = PyTuple_GET_ITEM(sequence, 1); 
+        __pyx_t_25 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
       } else {
-        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_22 = PyList_GET_ITEM(sequence, 1); 
+        __pyx_t_25 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
       }
-      __Pyx_INCREF(__pyx_t_8);
-      __Pyx_INCREF(__pyx_t_22);
+      __Pyx_INCREF(__pyx_t_25);
+      __Pyx_INCREF(__pyx_t_11);
       #else
-      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_8);
-      __pyx_t_22 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_22);
+      __pyx_t_25 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_25);
+      __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
       #endif
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    } else
-    {
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+    } else {
       Py_ssize_t index = -1;
-      __pyx_t_2 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-      __pyx_t_27 = Py_TYPE(__pyx_t_2)->tp_iternext;
-      index = 0; __pyx_t_8 = __pyx_t_27(__pyx_t_2); if (unlikely(!__pyx_t_8)) goto __pyx_L120_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_8);
-      index = 1; __pyx_t_22 = __pyx_t_27(__pyx_t_2); if (unlikely(!__pyx_t_22)) goto __pyx_L120_unpacking_failed;
-      __Pyx_GOTREF(__pyx_t_22);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_27(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyObject_GetIter(__pyx_t_23); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+      __pyx_t_27 = Py_TYPE(__pyx_t_9)->tp_iternext;
+      index = 0; __pyx_t_25 = __pyx_t_27(__pyx_t_9); if (unlikely(!__pyx_t_25)) goto __pyx_L114_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_25);
+      index = 1; __pyx_t_11 = __pyx_t_27(__pyx_t_9); if (unlikely(!__pyx_t_11)) goto __pyx_L114_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_11);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_27(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_t_27 = NULL;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      goto __pyx_L121_unpacking_done;
-      __pyx_L120_unpacking_failed:;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      goto __pyx_L115_unpacking_done;
+      __pyx_L114_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
       __pyx_t_27 = NULL;
       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L121_unpacking_done:;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L115_unpacking_done:;
     }
-    __Pyx_XDECREF(__pyx_v_key);
-    __pyx_v_key = __pyx_t_8;
-    __pyx_t_8 = 0;
-    __Pyx_XDECREF(__pyx_v_value);
-    __pyx_v_value = __pyx_t_22;
-    __pyx_t_22 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_25);
+    __pyx_t_25 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11);
+    __pyx_t_11 = 0;
 
-    /* "pysam/cvcf.pyx":855
+    /* "pysam/cvcf.pyx":858
  *              'format':format}
  *         for key,value in zip(self._samples,samples):
  *             d[key] = value             # <<<<<<<<<<<<<<
  * 
  *         return d
  */
-    if (PyDict_SetItem(((PyObject *)__pyx_v_d), __pyx_v_key, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_key, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":857
+  /* "pysam/cvcf.pyx":860
  *             d[key] = value
  * 
  *         return d             # <<<<<<<<<<<<<<
@@ -19218,23 +18632,30 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
  * 
  */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_d));
-  __pyx_r = ((PyObject *)__pyx_v_d);
+  __Pyx_INCREF(__pyx_v_d);
+  __pyx_r = __pyx_v_d;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":651
+ *         return False
+ * 
+ *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
+ *         cols = line.split('\t')
+ *         if len(cols) != len(self._samples)+9:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_6);
   __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_8);
   __Pyx_XDECREF(__pyx_t_9);
   __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_XDECREF(__pyx_t_22);
+  __Pyx_XDECREF(__pyx_t_11);
   __Pyx_XDECREF(__pyx_t_23);
   __Pyx_XDECREF(__pyx_t_24);
+  __Pyx_XDECREF(__pyx_t_25);
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -19247,6 +18668,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
   __Pyx_XDECREF(__pyx_v_left);
   __Pyx_XDECREF(__pyx_v_faref_leftflank);
   __Pyx_XDECREF(__pyx_v_faref);
+  __Pyx_XDECREF(__pyx_v_alt);
   __Pyx_XDECREF(__pyx_v_filter);
   __Pyx_XDECREF(__pyx_v_info);
   __Pyx_XDECREF(__pyx_v_blurp);
@@ -19269,17 +18691,23 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject
   __Pyx_XDECREF(__pyx_v_sample);
   __Pyx_XDECREF(__pyx_v_dict);
   __Pyx_XDECREF(__pyx_v_values);
-  __Pyx_XDECREF(__pyx_v_idx);
   __Pyx_XDECREF(__pyx_v_expected);
   __Pyx_XDECREF(__pyx_v_value);
   __Pyx_XDECREF(__pyx_v_d);
   __Pyx_XDECREF(__pyx_v_key);
-  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":863
+ * 
+ * 
+ *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
+ *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
+ *         for k in required:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_35write_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_35write_data = {__Pyx_NAMESTR("write_data"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_35write_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -19287,11 +18715,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_35write_data(PyObject *__pyx_self, P
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_v_data = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("write_data (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,&__pyx_n_s__data,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,&__pyx_n_s_data,0};
     PyObject* values[3] = {0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -19306,21 +18737,21 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_35write_data(PyObject *__pyx_self, P
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_data") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_data") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
       goto __pyx_L5_argtuple_error;
@@ -19335,25 +18766,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_35write_data(PyObject *__pyx_self, P
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.write_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_34write_data(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_data);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":860
- * 
- * 
- *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
- *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
- *         for k in required:
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_34write_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_data) {
   PyObject *__pyx_v_required = NULL;
   PyObject *__pyx_v_k = NULL;
@@ -19370,64 +18795,65 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_34write_data(CYTHON_UNUSED PyObject
   Py_ssize_t __pyx_t_4;
   PyObject *(*__pyx_t_5)(PyObject *);
   int __pyx_t_6;
-  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_7;
   PyObject *__pyx_t_8 = NULL;
   PyObject *__pyx_t_9 = NULL;
   PyObject *__pyx_t_10 = NULL;
   PyObject *__pyx_t_11 = NULL;
   PyObject *__pyx_t_12 = NULL;
-  int __pyx_t_13;
+  PyObject *__pyx_t_13 = NULL;
+  int __pyx_t_14;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("write_data", 0);
 
-  /* "pysam/cvcf.pyx":861
+  /* "pysam/cvcf.pyx":864
  * 
  *     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))
  */
-  __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((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_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_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_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_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_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_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_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_1, 8, ((PyObject *)__pyx_n_s__format));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_n_s_chrom);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_chrom);
+  __Pyx_GIVEREF(__pyx_n_s_chrom);
+  __Pyx_INCREF(__pyx_n_s_pos);
+  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_pos);
+  __Pyx_GIVEREF(__pyx_n_s_pos);
+  __Pyx_INCREF(__pyx_n_s_id);
+  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_id);
+  __Pyx_GIVEREF(__pyx_n_s_id);
+  __Pyx_INCREF(__pyx_n_s_ref);
+  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_ref);
+  __Pyx_GIVEREF(__pyx_n_s_ref);
+  __Pyx_INCREF(__pyx_n_s_alt);
+  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_alt);
+  __Pyx_GIVEREF(__pyx_n_s_alt);
+  __Pyx_INCREF(__pyx_n_s_qual);
+  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_qual);
+  __Pyx_GIVEREF(__pyx_n_s_qual);
+  __Pyx_INCREF(__pyx_n_s_filter_2);
+  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_filter_2);
+  __Pyx_GIVEREF(__pyx_n_s_filter_2);
+  __Pyx_INCREF(__pyx_n_s_info_2);
+  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_info_2);
+  __Pyx_GIVEREF(__pyx_n_s_info_2);
+  __Pyx_INCREF(__pyx_n_s_format);
+  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_format);
+  __Pyx_GIVEREF(__pyx_n_s_format);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __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(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_v_required = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":862
+  /* "pysam/cvcf.pyx":865
  *     def write_data(self, stream, data):
  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
  *         for k in required:             # <<<<<<<<<<<<<<
@@ -19438,7 +18864,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_34write_data(CYTHON_UNUSED PyObject
     __pyx_t_3 = __pyx_v_required; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_required); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_required); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
   }
@@ -19446,532 +18872,517 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_34write_data(CYTHON_UNUSED PyObject
     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_2 = __pyx_t_5(__pyx_t_3);
       if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_2);
     }
-    __Pyx_XDECREF(__pyx_v_k);
-    __pyx_v_k = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
     __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":863
+    /* "pysam/cvcf.pyx":866
  *         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'])
  */
-    __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_k, __pyx_v_data, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_6) {
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_k, __pyx_v_data, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = (__pyx_t_6 != 0);
+    if (__pyx_t_7) {
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_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))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __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 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_118), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Required_key_s_not_found_in_data, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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);
-      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      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_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L5;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L5:;
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":864
+  /* "pysam/cvcf.pyx":867
  *         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 = "."
  */
-  __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__alt)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_alt); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_t_2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __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;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_6) {
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-    __pyx_v_alt = ((PyObject *)__pyx_kp_s_9);
+  if (__pyx_t_7) {
+    __Pyx_INCREF(__pyx_kp_s__8);
+    __pyx_v_alt = __pyx_kp_s__8;
     goto __pyx_L6;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":865
+    /* "pysam/cvcf.pyx":868
  *             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'] == []:
  */
-    __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 = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_alt); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__alt)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __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 = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-    __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_t_2 = 0;
-    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __pyx_v_alt = __pyx_t_2;
     __pyx_t_2 = 0;
   }
   __pyx_L6:;
 
-  /* "pysam/cvcf.pyx":866
+  /* "pysam/cvcf.pyx":869
  *         if data['alt'] == []: alt = "."
  *         else: alt = ",".join(data['alt'])
  *         if data['filter'] == None: filter = "."             # <<<<<<<<<<<<<<
  *         elif data['filter'] == []:
  *             if self._version == 33: filter = "0"
  */
-  __pyx_t_2 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__filter)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_filter_2); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_6) {
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-    __pyx_v_filter = ((PyObject *)__pyx_kp_s_9);
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_7) {
+    __Pyx_INCREF(__pyx_kp_s__8);
+    __pyx_v_filter = __pyx_kp_s__8;
     goto __pyx_L7;
   }
 
-  /* "pysam/cvcf.pyx":867
+  /* "pysam/cvcf.pyx":870
  *         else: alt = ",".join(data['alt'])
  *         if data['filter'] == None: filter = "."
  *         elif data['filter'] == []:             # <<<<<<<<<<<<<<
  *             if self._version == 33: filter = "0"
  *             else: filter = "PASS"
  */
-  __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__filter)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_filter_2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __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 = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_t_2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __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;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_6) {
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_7) {
 
-    /* "pysam/cvcf.pyx":868
+    /* "pysam/cvcf.pyx":871
  *         if data['filter'] == None: filter = "."
  *         elif data['filter'] == []:
  *             if self._version == 33: filter = "0"             # <<<<<<<<<<<<<<
  *             else: filter = "PASS"
  *         else: filter = ';'.join(data['filter'])
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_33, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __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 = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_33, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_6) {
-      __Pyx_INCREF(((PyObject *)__pyx_kp_s__0));
-      __pyx_v_filter = ((PyObject *)__pyx_kp_s__0);
+    if (__pyx_t_7) {
+      __Pyx_INCREF(__pyx_kp_s_0);
+      __pyx_v_filter = __pyx_kp_s_0;
       goto __pyx_L8;
     }
     /*else*/ {
 
-      /* "pysam/cvcf.pyx":869
+      /* "pysam/cvcf.pyx":872
  *         elif data['filter'] == []:
  *             if self._version == 33: filter = "0"
  *             else: filter = "PASS"             # <<<<<<<<<<<<<<
  *         else: filter = ';'.join(data['filter'])
  *         if data['qual'] == -1: qual = "."
  */
-      __Pyx_INCREF(((PyObject *)__pyx_n_s__PASS));
-      __pyx_v_filter = ((PyObject *)__pyx_n_s__PASS);
+      __Pyx_INCREF(__pyx_n_s_PASS);
+      __pyx_v_filter = __pyx_n_s_PASS;
     }
     __pyx_L8:;
     goto __pyx_L7;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":870
+    /* "pysam/cvcf.pyx":873
  *             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_11), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_filter_2); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __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 = 870; __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 = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__10, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
-    __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-    __pyx_v_filter = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_v_filter = __pyx_t_3;
+    __pyx_t_3 = 0;
   }
   __pyx_L7:;
 
-  /* "pysam/cvcf.pyx":871
+  /* "pysam/cvcf.pyx":874
  *             else: filter = "PASS"
  *         else: filter = ';'.join(data['filter'])
  *         if data['qual'] == -1: qual = "."             # <<<<<<<<<<<<<<
  *         else: qual = str(data['qual'])
  * 
  */
-  __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__qual)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_qual); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (__pyx_t_6) {
-    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-    __pyx_v_qual = ((PyObject *)__pyx_kp_s_9);
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_7) {
+    __Pyx_INCREF(__pyx_kp_s__8);
+    __pyx_v_qual = __pyx_kp_s__8;
     goto __pyx_L9;
   }
   /*else*/ {
 
-    /* "pysam/cvcf.pyx":872
+    /* "pysam/cvcf.pyx":875
  *         else: filter = ';'.join(data['filter'])
  *         if data['qual'] == -1: qual = "."
  *         else: qual = str(data['qual'])             # <<<<<<<<<<<<<<
  * 
  *         output = [data['chrom'],
  */
-    __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__qual)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __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 = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
-    __Pyx_GIVEREF(__pyx_t_3);
-    __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_qual); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __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 = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __pyx_v_qual = __pyx_t_3;
-    __pyx_t_3 = 0;
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_v_qual = __pyx_t_2;
+    __pyx_t_2 = 0;
   }
   __pyx_L9:;
 
-  /* "pysam/cvcf.pyx":874
+  /* "pysam/cvcf.pyx":877
  *         else: qual = str(data['qual'])
  * 
  *         output = [data['chrom'],             # <<<<<<<<<<<<<<
  *                   str(data['pos']+1),   # change to 1-based position
  *                   data['id'],
  */
-  __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__chrom)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_chrom); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
 
-  /* "pysam/cvcf.pyx":875
+  /* "pysam/cvcf.pyx":878
  * 
  *         output = [data['chrom'],
  *                   str(data['pos']+1),   # change to 1-based position             # <<<<<<<<<<<<<<
  *                   data['id'],
  *                   data['ref'],
  */
-  __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__pos)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_pos); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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 = 875; __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 = 875; __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 = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __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))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":876
+  /* "pysam/cvcf.pyx":879
  *         output = [data['chrom'],
  *                   str(data['pos']+1),   # change to 1-based position
  *                   data['id'],             # <<<<<<<<<<<<<<
  *                   data['ref'],
  *                   alt,
  */
-  __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_id); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
 
-  /* "pysam/cvcf.pyx":877
+  /* "pysam/cvcf.pyx":880
  *                   str(data['pos']+1),   # change to 1-based position
  *                   data['id'],
  *                   data['ref'],             # <<<<<<<<<<<<<<
  *                   alt,
  *                   qual,
  */
-  __pyx_t_7 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__ref)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_ref); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_8);
 
-  /* "pysam/cvcf.pyx":881
+  /* "pysam/cvcf.pyx":884
  *                   qual,
  *                   filter,
  *                   self.format_formatdata( data['info'], self._info, separator=";" ),             # <<<<<<<<<<<<<<
  *                   self.format_formatdata( data['format'], self._format, value=False ) ]
  * 
  */
-  __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_formatdata); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_9 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__info)); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_formatdata); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_info_2); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
-  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
-  __Pyx_GIVEREF(__pyx_t_9);
-  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10);
+  __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10);
   __Pyx_GIVEREF(__pyx_t_10);
-  __pyx_t_9 = 0;
+  PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
+  __Pyx_GIVEREF(__pyx_t_11);
   __pyx_t_10 = 0;
-  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
-  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__separator), ((PyObject *)__pyx_kp_s_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+  __pyx_t_11 = 0;
+  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_separator, __pyx_kp_s__10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __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_12); __pyx_t_12 = 0;
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
-  /* "pysam/cvcf.pyx":882
+  /* "pysam/cvcf.pyx":885
  *                   filter,
  *                   self.format_formatdata( data['info'], self._info, separator=";" ),
  *                   self.format_formatdata( data['format'], self._format, value=False ) ]             # <<<<<<<<<<<<<<
  * 
  *         for s in self._samples:
  */
-  __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_formatdata); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_11 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__format)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_formatdata); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_11);
-  __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = PyObject_GetItem(__pyx_v_data, __pyx_n_s_format); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_12);
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12);
+  __Pyx_GIVEREF(__pyx_t_12);
+  PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  __pyx_t_12 = 0;
+  __pyx_t_9 = 0;
+  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_value, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, __pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_12);
-  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
-  __Pyx_GIVEREF(__pyx_t_11);
-  PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8);
-  __Pyx_GIVEREF(__pyx_t_8);
-  __pyx_t_11 = 0;
-  __pyx_t_8 = 0;
-  __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_8));
-  __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_11);
-  if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__value), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  __pyx_t_11 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_11);
-  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
-  __pyx_t_8 = PyList_New(9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
-  __Pyx_GIVEREF(__pyx_t_3);
-  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+  /* "pysam/cvcf.pyx":877
+ *         else: qual = str(data['qual'])
+ * 
+ *         output = [data['chrom'],             # <<<<<<<<<<<<<<
+ *                   str(data['pos']+1),   # change to 1-based position
+ *                   data['id'],
+ */
+  __pyx_t_9 = PyList_New(9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
-  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_1);
+  PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
-  PyList_SET_ITEM(__pyx_t_8, 3, __pyx_t_7);
-  __Pyx_GIVEREF(__pyx_t_7);
+  PyList_SET_ITEM(__pyx_t_9, 2, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyList_SET_ITEM(__pyx_t_9, 3, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
   __Pyx_INCREF(__pyx_v_alt);
-  PyList_SET_ITEM(__pyx_t_8, 4, __pyx_v_alt);
+  PyList_SET_ITEM(__pyx_t_9, 4, __pyx_v_alt);
   __Pyx_GIVEREF(__pyx_v_alt);
   __Pyx_INCREF(__pyx_v_qual);
-  PyList_SET_ITEM(__pyx_t_8, 5, __pyx_v_qual);
+  PyList_SET_ITEM(__pyx_t_9, 5, __pyx_v_qual);
   __Pyx_GIVEREF(__pyx_v_qual);
   __Pyx_INCREF(__pyx_v_filter);
-  PyList_SET_ITEM(__pyx_t_8, 6, __pyx_v_filter);
+  PyList_SET_ITEM(__pyx_t_9, 6, __pyx_v_filter);
   __Pyx_GIVEREF(__pyx_v_filter);
-  PyList_SET_ITEM(__pyx_t_8, 7, __pyx_t_9);
-  __Pyx_GIVEREF(__pyx_t_9);
-  PyList_SET_ITEM(__pyx_t_8, 8, __pyx_t_11);
-  __Pyx_GIVEREF(__pyx_t_11);
-  __pyx_t_3 = 0;
+  PyList_SET_ITEM(__pyx_t_9, 7, __pyx_t_10);
+  __Pyx_GIVEREF(__pyx_t_10);
+  PyList_SET_ITEM(__pyx_t_9, 8, __pyx_t_12);
+  __Pyx_GIVEREF(__pyx_t_12);
   __pyx_t_2 = 0;
   __pyx_t_1 = 0;
-  __pyx_t_7 = 0;
-  __pyx_t_9 = 0;
-  __pyx_t_11 = 0;
-  __pyx_v_output = ((PyObject*)__pyx_t_8);
+  __pyx_t_3 = 0;
   __pyx_t_8 = 0;
+  __pyx_t_10 = 0;
+  __pyx_t_12 = 0;
+  __pyx_v_output = ((PyObject*)__pyx_t_9);
+  __pyx_t_9 = 0;
 
-  /* "pysam/cvcf.pyx":884
+  /* "pysam/cvcf.pyx":887
  *                   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 ) )
  * 
  */
-  __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
-    __pyx_t_11 = __pyx_t_8; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __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_12 = __pyx_t_9; __Pyx_INCREF(__pyx_t_12); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_5 = Py_TYPE(__pyx_t_11)->tp_iternext;
+    __pyx_t_4 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
+    __pyx_t_5 = Py_TYPE(__pyx_t_12)->tp_iternext;
   }
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   for (;;) {
-    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_11)) {
-      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
+    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_12)) {
+      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_12)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_8 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_8 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_12, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
-    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_11)) {
-      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
+    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_12)) {
+      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_8 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_12, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
-      __pyx_t_8 = __pyx_t_5(__pyx_t_11);
-      if (unlikely(!__pyx_t_8)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __pyx_t_5(__pyx_t_12);
+      if (unlikely(!__pyx_t_9)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_GOTREF(__pyx_t_9);
     }
-    __Pyx_XDECREF(__pyx_v_s);
-    __pyx_v_s = __pyx_t_8;
-    __pyx_t_8 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_9);
+    __pyx_t_9 = 0;
 
-    /* "pysam/cvcf.pyx":885
+    /* "pysam/cvcf.pyx":888
  * 
  *         for s in self._samples:
  *             output.append( self.format_formatdata( data[s], self._format, key=False ) )             # <<<<<<<<<<<<<<
  * 
  *         stream.write( "\t".join(output) + "\n" )
  */
-    __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_formatdata); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_t_9 = PyObject_GetItem(__pyx_v_data, __pyx_v_s); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_9);
-    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
-    __Pyx_GIVEREF(__pyx_t_9);
-    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
-    __Pyx_GIVEREF(__pyx_t_7);
-    __pyx_t_9 = 0;
-    __pyx_t_7 = 0;
-    __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
-    __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_formatdata); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_9);
-    if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__key), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = PyObject_GetItem(__pyx_v_data, __pyx_v_s); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_3 = PyTuple_New(2); 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);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10);
+    __Pyx_GIVEREF(__pyx_t_10);
+    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
+    __Pyx_GIVEREF(__pyx_t_8);
+    __pyx_t_10 = 0;
+    __pyx_t_8 = 0;
+    __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_key, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-    __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __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_8); __pyx_t_8 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-    __pyx_t_13 = PyList_Append(__pyx_v_output, __pyx_t_9); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_output, __pyx_t_10); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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;
 
-  /* "pysam/cvcf.pyx":887
+  /* "pysam/cvcf.pyx":890
  *             output.append( self.format_formatdata( data[s], self._format, key=False ) )
  * 
  *         stream.write( "\t".join(output) + "\n" )             # <<<<<<<<<<<<<<
  * 
  *     def _parse_header(self, stream):
  */
-  __pyx_t_11 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_11);
-  __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_88), __pyx_n_s__join); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_INCREF(((PyObject *)__pyx_v_output));
-  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_output));
-  __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
-  __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
-  __pyx_t_7 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_s_94)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __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(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
-  __Pyx_GIVEREF(__pyx_t_7);
-  __pyx_t_7 = 0;
-  __pyx_t_7 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  __pyx_t_10 = __Pyx_PyString_Join(__pyx_kp_s__55, __pyx_v_output); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_t_8 = PyNumber_Add(__pyx_t_10, __pyx_kp_s__60); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __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 = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
+  __pyx_t_8 = 0;
+  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+  /* "pysam/cvcf.pyx":863
+ * 
+ * 
+ *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
+ *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
+ *         for k in required:
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_8);
   __Pyx_XDECREF(__pyx_t_9);
   __Pyx_XDECREF(__pyx_t_10);
   __Pyx_XDECREF(__pyx_t_11);
   __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
   __Pyx_AddTraceback("pysam.cvcf.VCF.write_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -19987,17 +19398,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_34write_data(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":892
+ *         stream.write( "\t".join(output) + "\n" )
+ * 
+ *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
+ *         self._lineno = 0
+ *         for line in stream:
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_37_parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_37_parse_header = {__Pyx_NAMESTR("_parse_header"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_37_parse_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_37_parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_parse_header (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -20011,16 +19433,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_37_parse_header(PyObject *__pyx_self
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_parse_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_parse_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -20033,25 +19455,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_37_parse_header(PyObject *__pyx_self
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_parse_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_parse_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF._parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(__pyx_self, __pyx_v_self, __pyx_v_stream);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":889
- *         stream.write( "\t".join(output) + "\n" )
- * 
- *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
- *         self._lineno = 0
- *         for line in stream:
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
   PyObject *__pyx_v_line = NULL;
   PyObject *__pyx_r = NULL;
@@ -20068,27 +19484,27 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObje
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_parse_header", 0);
 
-  /* "pysam/cvcf.pyx":890
+  /* "pysam/cvcf.pyx":893
  * 
  *     def _parse_header(self, stream):
  *         self._lineno = 0             # <<<<<<<<<<<<<<
  *         for line in stream:
- *             self._lineno += 1
+ *             line = ctabix._force_str(line)
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lineno, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lineno, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":891
+  /* "pysam/cvcf.pyx":894
  *     def _parse_header(self, stream):
  *         self._lineno = 0
  *         for line in stream:             # <<<<<<<<<<<<<<
+ *             line = ctabix._force_str(line)
  *             self._lineno += 1
- *             if line.startswith('##'):
  */
   if (PyList_CheckExact(__pyx_v_stream) || PyTuple_CheckExact(__pyx_v_stream)) {
     __pyx_t_1 = __pyx_v_stream; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
     __pyx_t_3 = NULL;
   } else {
-    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_stream); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_stream); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
   }
@@ -20096,141 +19512,153 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObje
     if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_4 = __pyx_t_3(__pyx_t_1);
       if (unlikely(!__pyx_t_4)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_4);
     }
-    __Pyx_XDECREF(__pyx_v_line);
-    __pyx_v_line = __pyx_t_4;
+    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_4);
     __pyx_t_4 = 0;
 
-    /* "pysam/cvcf.pyx":892
+    /* "pysam/cvcf.pyx":895
  *         self._lineno = 0
  *         for line in stream:
- *             self._lineno += 1             # <<<<<<<<<<<<<<
+ *             line = ctabix._force_str(line)             # <<<<<<<<<<<<<<
+ *             self._lineno += 1
+ *             if line.startswith('##'):
+ */
+    __pyx_t_4 = __pyx_f_5pysam_6ctabix__force_str(__pyx_v_line); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_4);
+    __pyx_t_4 = 0;
+
+    /* "pysam/cvcf.pyx":896
+ *         for line in stream:
+ *             line = ctabix._force_str(line)
+ *             self._lineno += 1             # <<<<<<<<<<<<<<
  *             if line.startswith('##'):
  *                 self.parse_header( line.strip() )
  */
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lineno); 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_t_5 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lineno, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lineno, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":893
- *         for line in stream:
+    /* "pysam/cvcf.pyx":897
+ *             line = ctabix._force_str(line)
  *             self._lineno += 1
  *             if line.startswith('##'):             # <<<<<<<<<<<<<<
  *                 self.parse_header( line.strip() )
  *             elif line.startswith('#'):
  */
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_119), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     if (__pyx_t_6) {
 
-      /* "pysam/cvcf.pyx":894
+      /* "pysam/cvcf.pyx":898
  *             self._lineno += 1
  *             if line.startswith('##'):
  *                 self.parse_header( line.strip() )             # <<<<<<<<<<<<<<
  *             elif line.startswith('#'):
  *                 self.parse_heading( line.strip() )
  */
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_header); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_header); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __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 = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
       __Pyx_GIVEREF(__pyx_t_7);
       __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       goto __pyx_L5;
     }
 
-    /* "pysam/cvcf.pyx":895
+    /* "pysam/cvcf.pyx":899
  *             if line.startswith('##'):
  *                 self.parse_header( line.strip() )
  *             elif line.startswith('#'):             # <<<<<<<<<<<<<<
  *                 self.parse_heading( line.strip() )
  *                 self.enter_default_format()
  */
-    __pyx_t_7 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_120), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_6) {
 
-      /* "pysam/cvcf.pyx":896
+      /* "pysam/cvcf.pyx":900
  *                 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 = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_heading); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, 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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
       __Pyx_GIVEREF(__pyx_t_4);
       __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-      /* "pysam/cvcf.pyx":897
+      /* "pysam/cvcf.pyx":901
  *             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_121); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_enter_default_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __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_7); __pyx_t_7 = 0;
@@ -20238,7 +19666,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObje
     }
     /*else*/ {
 
-      /* "pysam/cvcf.pyx":899
+      /* "pysam/cvcf.pyx":903
  *                 self.enter_default_format()
  *             else:
  *                 break             # <<<<<<<<<<<<<<
@@ -20252,7 +19680,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObje
   __pyx_L4_break:;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":900
+  /* "pysam/cvcf.pyx":904
  *             else:
  *                 break
  *         return line             # <<<<<<<<<<<<<<
@@ -20260,13 +19688,20 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObje
  *     def _parse(self, line, stream):
  */
   __Pyx_XDECREF(__pyx_r);
-  if (unlikely(!__pyx_v_line)) { __Pyx_RaiseUnboundLocalError("line"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  if (unlikely(!__pyx_v_line)) { __Pyx_RaiseUnboundLocalError("line"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
   __Pyx_INCREF(__pyx_v_line);
   __pyx_r = __pyx_v_line;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":892
+ *         stream.write( "\t".join(output) + "\n" )
+ * 
+ *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
+ *         self._lineno = 0
+ *         for line in stream:
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_4);
@@ -20282,6 +19717,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObje
 }
 static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
 
+/* "pysam/cvcf.pyx":906
+ *         return line
+ * 
+ *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
+ *         # deal with files with header only
+ *         if line.startswith("##"): return
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_39_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_39_parse = {__Pyx_NAMESTR("_parse"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_39_parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
@@ -20289,11 +19732,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_39_parse(PyObject *__pyx_self, PyObj
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_line = 0;
   PyObject *__pyx_v_stream = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_parse (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,&__pyx_n_s__stream,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,&__pyx_n_s_stream,0};
     PyObject* values[3] = {0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -20308,21 +19754,21 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_39_parse(PyObject *__pyx_self, PyObj
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
       goto __pyx_L5_argtuple_error;
@@ -20337,34 +19783,28 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_39_parse(PyObject *__pyx_self, PyObj
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF._parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_38_parse(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_stream);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":902
- *         return line
- * 
- *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
- *         # deal with files with header only
- *         if line.startswith("##"): return
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_38_parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_stream) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *__pyx_cur_scope;
+  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *__pyx_cur_scope;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_parse", 0);
-  __pyx_cur_scope = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *)__pyx_ptype_5pysam_4cvcf___pyx_scope_struct_2__parse->tp_new(__pyx_ptype_5pysam_4cvcf___pyx_scope_struct_2__parse, __pyx_empty_tuple, NULL);
+  __pyx_cur_scope = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *)__pyx_tp_new_5pysam_4cvcf___pyx_scope_struct___parse(__pyx_ptype_5pysam_4cvcf___pyx_scope_struct___parse, __pyx_empty_tuple, NULL);
   if (unlikely(!__pyx_cur_scope)) {
     __Pyx_RefNannyFinishContext();
     return NULL;
@@ -20380,12 +19820,13 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_38_parse(CYTHON_UNUSED PyObject *__p
   __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stream);
   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stream);
   {
-    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_4cvcf_3VCF_40generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5pysam_4cvcf_3VCF_40generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_cur_scope);
     __Pyx_RefNannyFinishContext();
     return (PyObject *) gen;
   }
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -20400,7 +19841,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_38_parse(CYTHON_UNUSED PyObject *__p
 
 static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
 {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *__pyx_cur_scope = ((struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *)__pyx_generator->closure);
+  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *__pyx_cur_scope = ((struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *)__pyx_generator->closure);
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
@@ -20411,6 +19852,9 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
   PyObject *__pyx_t_7 = NULL;
   int __pyx_t_8;
   int __pyx_t_9;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("None", 0);
   switch (__pyx_generator->resume_label) {
@@ -20422,82 +19866,80 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
     return NULL;
   }
   __pyx_L3_first_run:;
-  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":904
+  /* "pysam/cvcf.pyx":908
  *     def _parse(self, line, stream):
  *         # deal with files with header only
  *         if line.startswith("##"): return             # <<<<<<<<<<<<<<
  *         if len(line.strip()) > 0:
  *             d = self.parse_data( line.strip() )
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_startswith); 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);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_122), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __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 = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (__pyx_t_3) {
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
-    goto __pyx_L4;
   }
-  __pyx_L4:;
 
-  /* "pysam/cvcf.pyx":905
+  /* "pysam/cvcf.pyx":909
  *         # deal with files with header only
  *         if line.startswith("##"): return
  *         if len(line.strip()) > 0:             # <<<<<<<<<<<<<<
  *             d = self.parse_data( line.strip() )
  *             if d: yield d
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __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 = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = (__pyx_t_4 > 0);
+  __pyx_t_3 = ((__pyx_t_4 > 0) != 0);
   if (__pyx_t_3) {
 
-    /* "pysam/cvcf.pyx":906
+    /* "pysam/cvcf.pyx":910
  *         if line.startswith("##"): return
  *         if len(line.strip()) > 0:
  *             d = self.parse_data( line.strip() )             # <<<<<<<<<<<<<<
  *             if d: yield d
  *         for line in stream:
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__parse_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_parse_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __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 = 906; __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 = 910; __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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __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_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_GIVEREF(__pyx_t_5);
     __pyx_cur_scope->__pyx_v_d = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "pysam/cvcf.pyx":907
+    /* "pysam/cvcf.pyx":911
  *         if len(line.strip()) > 0:
  *             d = self.parse_data( line.strip() )
  *             if d: yield d             # <<<<<<<<<<<<<<
  *         for line in stream:
  *             self._lineno += 1
  */
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_3) {
       __Pyx_INCREF(__pyx_cur_scope->__pyx_v_d);
       __pyx_r = __pyx_cur_scope->__pyx_v_d;
@@ -20507,7 +19949,7 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
       __pyx_generator->resume_label = 1;
       return __pyx_r;
       __pyx_L7_resume_from_yield:;
-      if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L6;
     }
     __pyx_L6:;
@@ -20515,7 +19957,7 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
   }
   __pyx_L5:;
 
-  /* "pysam/cvcf.pyx":908
+  /* "pysam/cvcf.pyx":912
  *             d = self.parse_data( line.strip() )
  *             if d: yield d
  *         for line in stream:             # <<<<<<<<<<<<<<
@@ -20526,7 +19968,7 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
     __pyx_t_5 = __pyx_cur_scope->__pyx_v_stream; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0;
     __pyx_t_6 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_stream); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_stream); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
   }
@@ -20534,69 +19976,69 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
     if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_5)) {
       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_5)) {
       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_2 = __pyx_t_6(__pyx_t_5);
       if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_2);
     }
     __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_line);
-    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_line);
+    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_line, __pyx_t_2);
     __Pyx_GIVEREF(__pyx_t_2);
-    __pyx_cur_scope->__pyx_v_line = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "pysam/cvcf.pyx":909
+    /* "pysam/cvcf.pyx":913
  *             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() )
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lineno); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __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_cur_scope->__pyx_v_self, __pyx_n_s___lineno, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lineno, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":910
+    /* "pysam/cvcf.pyx":914
  *         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
  */
-    __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lines_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __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 = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     if (__pyx_t_3) {
-      __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lineno); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lines_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __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_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_9 = __pyx_t_8;
     } else {
@@ -20604,48 +20046,45 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
     }
     if (__pyx_t_9) {
       __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L10;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L10:;
 
-    /* "pysam/cvcf.pyx":911
+    /* "pysam/cvcf.pyx":915
  *             self._lineno += 1
  *             if self._lines and self._lineno > self._lines: raise StopIteration
  *             d = self.parse_data( line.strip() )             # <<<<<<<<<<<<<<
  *             if d: yield d
  * 
  */
-    __pyx_t_7 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__parse_data); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_parse_data); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __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 = 911; __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 = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
     __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_d);
-    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_d);
+    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_d, __pyx_t_1);
     __Pyx_GIVEREF(__pyx_t_1);
-    __pyx_cur_scope->__pyx_v_d = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":912
+    /* "pysam/cvcf.pyx":916
  *             if self._lines and self._lineno > self._lines: raise StopIteration
  *             d = self.parse_data( line.strip() )
  *             if d: yield d             # <<<<<<<<<<<<<<
  * 
  *     ######################################################################################################
  */
-    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_9) {
       __Pyx_INCREF(__pyx_cur_scope->__pyx_v_d);
       __pyx_r = __pyx_cur_scope->__pyx_v_d;
@@ -20664,12 +20103,22 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
       __pyx_cur_scope->__pyx_t_1 = 0;
       __Pyx_XGOTREF(__pyx_t_5);
       __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
-      if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L11;
     }
     __pyx_L11:;
   }
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "pysam/cvcf.pyx":906
+ *         return line
+ * 
+ *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
+ *         # deal with files with header only
+ *         if line.startswith("##"): return
+ */
+
+  /* function exit code */
   PyErr_SetNone(PyExc_StopIteration);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -20686,6 +20135,14 @@ static PyObject *__pyx_gb_5pysam_4cvcf_3VCF_40generator(__pyx_GeneratorObject *_
   return NULL;
 }
 
+/* "pysam/cvcf.pyx":924
+ *     ######################################################################################################
+ * 
+ *     def getsamples(self):             # <<<<<<<<<<<<<<
+ *         """ List of samples in VCF file """
+ *         return self._samples
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_42getsamples(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_41getsamples[] = " List of samples in VCF file ";
@@ -20695,18 +20152,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_42getsamples(PyObject *__pyx_self, P
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("getsamples (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_41getsamples(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":920
- *     ######################################################################################################
- * 
- *     def getsamples(self):             # <<<<<<<<<<<<<<
- *         """ List of samples in VCF file """
- *         return self._samples
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_41getsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -20716,7 +20167,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_41getsamples(CYTHON_UNUSED PyObject
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("getsamples", 0);
 
-  /* "pysam/cvcf.pyx":922
+  /* "pysam/cvcf.pyx":926
  *     def getsamples(self):
  *         """ List of samples in VCF file """
  *         return self._samples             # <<<<<<<<<<<<<<
@@ -20724,14 +20175,21 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_41getsamples(CYTHON_UNUSED PyObject
  *     def setsamples(self,samples):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":924
+ *     ######################################################################################################
+ * 
+ *     def getsamples(self):             # <<<<<<<<<<<<<<
+ *         """ List of samples in VCF file """
+ *         return self._samples
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCF.getsamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -20742,6 +20200,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_41getsamples(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":928
+ *         return self._samples
+ * 
+ *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
+ *         """ List of samples in VCF file """
+ *         self._samples = samples
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_44setsamples(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_43setsamples[] = " List of samples in VCF file ";
@@ -20749,11 +20215,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_44setsamples = {__Pyx_NAMESTR("s
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_44setsamples(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_samples = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setsamples (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__samples,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_samples_2,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -20767,16 +20236,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_44setsamples(PyObject *__pyx_self, P
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samples_2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setsamples", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setsamples", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setsamples") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setsamples") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -20789,25 +20258,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_44setsamples(PyObject *__pyx_self, P
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setsamples", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setsamples", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.setsamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_43setsamples(__pyx_self, __pyx_v_self, __pyx_v_samples);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":924
- *         return self._samples
- * 
- *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
- *         """ List of samples in VCF file """
- *         self._samples = samples
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_43setsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_samples) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -20816,15 +20279,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_43setsamples(CYTHON_UNUSED PyObject
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setsamples", 0);
 
-  /* "pysam/cvcf.pyx":926
+  /* "pysam/cvcf.pyx":930
  *     def setsamples(self,samples):
  *         """ List of samples in VCF file """
  *         self._samples = samples             # <<<<<<<<<<<<<<
  * 
  *     def getheader(self):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_v_samples) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_samples, __pyx_v_samples) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":928
+ *         return self._samples
+ * 
+ *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
+ *         """ List of samples in VCF file """
+ *         self._samples = samples
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -20836,6 +20308,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_43setsamples(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":932
+ *         self._samples = samples
+ * 
+ *     def getheader(self):             # <<<<<<<<<<<<<<
+ *         """ List of header key-value pairs (strings) """
+ *         return self._header
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_46getheader(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_45getheader[] = " List of header key-value pairs (strings) ";
@@ -20845,18 +20325,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_46getheader(PyObject *__pyx_self, Py
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("getheader (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_45getheader(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":928
- *         self._samples = samples
- * 
- *     def getheader(self):             # <<<<<<<<<<<<<<
- *         """ List of header key-value pairs (strings) """
- *         return self._header
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_45getheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -20866,7 +20340,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_45getheader(CYTHON_UNUSED PyObject *
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("getheader", 0);
 
-  /* "pysam/cvcf.pyx":930
+  /* "pysam/cvcf.pyx":934
  *     def getheader(self):
  *         """ List of header key-value pairs (strings) """
  *         return self._header             # <<<<<<<<<<<<<<
@@ -20874,14 +20348,21 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_45getheader(CYTHON_UNUSED PyObject *
  *     def setheader(self,header):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":932
+ *         self._samples = samples
+ * 
+ *     def getheader(self):             # <<<<<<<<<<<<<<
+ *         """ List of header key-value pairs (strings) """
+ *         return self._header
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCF.getheader", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -20892,6 +20373,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_45getheader(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":936
+ *         return self._header
+ * 
+ *     def setheader(self,header):             # <<<<<<<<<<<<<<
+ *         """ List of header key-value pairs (strings) """
+ *         self._header = header
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_48setheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_47setheader[] = " List of header key-value pairs (strings) ";
@@ -20899,11 +20388,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_48setheader = {__Pyx_NAMESTR("se
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_48setheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_header = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setheader (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__header,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_header_2,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -20917,16 +20409,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_48setheader(PyObject *__pyx_self, Py
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__header)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_header_2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setheader", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setheader", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setheader") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setheader") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -20939,25 +20431,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_48setheader(PyObject *__pyx_self, Py
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setheader", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setheader", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.setheader", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_47setheader(__pyx_self, __pyx_v_self, __pyx_v_header);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":932
- *         return self._header
- * 
- *     def setheader(self,header):             # <<<<<<<<<<<<<<
- *         """ List of header key-value pairs (strings) """
- *         self._header = header
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_47setheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_header) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -20966,15 +20452,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_47setheader(CYTHON_UNUSED PyObject *
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setheader", 0);
 
-  /* "pysam/cvcf.pyx":934
+  /* "pysam/cvcf.pyx":938
  *     def setheader(self,header):
  *         """ List of header key-value pairs (strings) """
  *         self._header = header             # <<<<<<<<<<<<<<
  * 
  *     def getinfo(self):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___header, __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":936
+ *         return self._header
+ * 
+ *     def setheader(self,header):             # <<<<<<<<<<<<<<
+ *         """ List of header key-value pairs (strings) """
+ *         self._header = header
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -20986,6 +20481,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_47setheader(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":940
+ *         self._header = header
+ * 
+ *     def getinfo(self):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
+ *         return self._info
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_50getinfo(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_49getinfo[] = " Dictionary of ##INFO tags, as VCF.FORMAT values ";
@@ -20995,18 +20498,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_50getinfo(PyObject *__pyx_self, PyOb
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("getinfo (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_49getinfo(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":936
- *         self._header = header
- * 
- *     def getinfo(self):             # <<<<<<<<<<<<<<
- *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
- *         return self._info
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_49getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21016,7 +20513,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_49getinfo(CYTHON_UNUSED PyObject *__
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("getinfo", 0);
 
-  /* "pysam/cvcf.pyx":938
+  /* "pysam/cvcf.pyx":942
  *     def getinfo(self):
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         return self._info             # <<<<<<<<<<<<<<
@@ -21024,14 +20521,21 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_49getinfo(CYTHON_UNUSED PyObject *__
  *     def setinfo(self,info):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":940
+ *         self._header = header
+ * 
+ *     def getinfo(self):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
+ *         return self._info
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCF.getinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -21042,6 +20546,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_49getinfo(CYTHON_UNUSED PyObject *__
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":944
+ *         return self._info
+ * 
+ *     def setinfo(self,info):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
+ *         self._info = info
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_52setinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_51setinfo[] = " Dictionary of ##INFO tags, as VCF.FORMAT values ";
@@ -21049,11 +20561,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_52setinfo = {__Pyx_NAMESTR("seti
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_52setinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_info = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setinfo (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__info,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_info_2,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -21067,16 +20582,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_52setinfo(PyObject *__pyx_self, PyOb
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__info)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_info_2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setinfo", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setinfo", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setinfo") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setinfo") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -21089,25 +20604,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_52setinfo(PyObject *__pyx_self, PyOb
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setinfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setinfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.setinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_51setinfo(__pyx_self, __pyx_v_self, __pyx_v_info);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":940
- *         return self._info
- * 
- *     def setinfo(self,info):             # <<<<<<<<<<<<<<
- *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
- *         self._info = info
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_51setinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21116,15 +20625,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_51setinfo(CYTHON_UNUSED PyObject *__
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setinfo", 0);
 
-  /* "pysam/cvcf.pyx":942
+  /* "pysam/cvcf.pyx":946
  *     def setinfo(self,info):
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         self._info = info             # <<<<<<<<<<<<<<
  * 
  *     def getformat(self):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___info, __pyx_v_info) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_info, __pyx_v_info) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":944
+ *         return self._info
+ * 
+ *     def setinfo(self,info):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
+ *         self._info = info
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -21136,6 +20654,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_51setinfo(CYTHON_UNUSED PyObject *__
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":948
+ *         self._info = info
+ * 
+ *     def getformat(self):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
+ *         return self._format
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_54getformat(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_53getformat[] = " Dictionary of ##FORMAT tags, as VCF.FORMAT values ";
@@ -21145,18 +20671,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_54getformat(PyObject *__pyx_self, Py
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("getformat (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_53getformat(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":944
- *         self._info = info
- * 
- *     def getformat(self):             # <<<<<<<<<<<<<<
- *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
- *         return self._format
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_53getformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21166,7 +20686,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_53getformat(CYTHON_UNUSED PyObject *
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("getformat", 0);
 
-  /* "pysam/cvcf.pyx":946
+  /* "pysam/cvcf.pyx":950
  *     def getformat(self):
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         return self._format             # <<<<<<<<<<<<<<
@@ -21174,15 +20694,22 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_53getformat(CYTHON_UNUSED PyObject *
  *     def setformat(self,format):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_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:;
+  /* "pysam/cvcf.pyx":948
+ *         self._info = info
+ * 
+ *     def getformat(self):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
+ *         return self._format
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCF.getformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
@@ -21192,6 +20719,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_53getformat(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":952
+ *         return self._format
+ * 
+ *     def setformat(self,format):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
+ *         self._format = format
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_56setformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_55setformat[] = " Dictionary of ##FORMAT tags, as VCF.FORMAT values ";
@@ -21199,11 +20734,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_56setformat = {__Pyx_NAMESTR("se
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_56setformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_format = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setformat (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_format,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -21217,16 +20755,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_56setformat(PyObject *__pyx_self, Py
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setformat", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setformat", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setformat") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setformat") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -21239,25 +20777,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_56setformat(PyObject *__pyx_self, Py
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setformat", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setformat", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.setformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_55setformat(__pyx_self, __pyx_v_self, __pyx_v_format);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":948
- *         return self._format
- * 
- *     def setformat(self,format):             # <<<<<<<<<<<<<<
- *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
- *         self._format = format
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_55setformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21266,15 +20798,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_55setformat(CYTHON_UNUSED PyObject *
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setformat", 0);
 
-  /* "pysam/cvcf.pyx":950
+  /* "pysam/cvcf.pyx":954
  *     def setformat(self,format):
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         self._format = format             # <<<<<<<<<<<<<<
  * 
  *     def getfilter(self):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___format, __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_format_2, __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":952
+ *         return self._format
+ * 
+ *     def setformat(self,format):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
+ *         self._format = format
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -21286,6 +20827,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_55setformat(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":956
+ *         self._format = format
+ * 
+ *     def getfilter(self):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
+ *         return self._filter
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_58getfilter(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_57getfilter[] = " Dictionary of ##FILTER tags, as VCF.FORMAT values ";
@@ -21295,18 +20844,12 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_58getfilter(PyObject *__pyx_self, Py
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("getfilter (wrapper)", 0);
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_57getfilter(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":952
- *         self._format = format
- * 
- *     def getfilter(self):             # <<<<<<<<<<<<<<
- *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
- *         return self._filter
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_57getfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21316,7 +20859,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_57getfilter(CYTHON_UNUSED PyObject *
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("getfilter", 0);
 
-  /* "pysam/cvcf.pyx":954
+  /* "pysam/cvcf.pyx":958
  *     def getfilter(self):
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         return self._filter             # <<<<<<<<<<<<<<
@@ -21324,14 +20867,21 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_57getfilter(CYTHON_UNUSED PyObject *
  *     def setfilter(self,filter):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":956
+ *         self._format = format
+ * 
+ *     def getfilter(self):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
+ *         return self._filter
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCF.getfilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -21342,6 +20892,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_57getfilter(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":960
+ *         return self._filter
+ * 
+ *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
+ *         self._filter = filter
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_60setfilter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_59setfilter[] = " Dictionary of ##FILTER tags, as VCF.FORMAT values ";
@@ -21349,11 +20907,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_60setfilter = {__Pyx_NAMESTR("se
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_60setfilter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_filter = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setfilter (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__filter,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filter_2,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -21367,16 +20928,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_60setfilter(PyObject *__pyx_self, Py
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filter)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filter_2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setfilter", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setfilter", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfilter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfilter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -21389,25 +20950,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_60setfilter(PyObject *__pyx_self, Py
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setfilter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setfilter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.setfilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_59setfilter(__pyx_self, __pyx_v_self, __pyx_v_filter);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":956
- *         return self._filter
- * 
- *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
- *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
- *         self._filter = filter
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_59setfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filter) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21416,15 +20971,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_59setfilter(CYTHON_UNUSED PyObject *
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setfilter", 0);
 
-  /* "pysam/cvcf.pyx":958
+  /* "pysam/cvcf.pyx":962
  *     def setfilter(self,filter):
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         self._filter = filter             # <<<<<<<<<<<<<<
  * 
  *     def setversion(self, version):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___filter, __pyx_v_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filter, __pyx_v_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":960
+ *         return self._filter
+ * 
+ *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
+ *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
+ *         self._filter = filter
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -21436,17 +21000,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_59setfilter(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":964
+ *         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
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_62setversion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_62setversion = {__Pyx_NAMESTR("setversion"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_62setversion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_62setversion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_version = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setversion (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__version,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_version_2,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -21460,16 +21035,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_62setversion(PyObject *__pyx_self, P
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__version)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setversion", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setversion", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setversion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setversion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -21482,25 +21057,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_62setversion(PyObject *__pyx_self, P
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setversion", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setversion", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.setversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_61setversion(__pyx_self, __pyx_v_self, __pyx_v_version);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":960
- *         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
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_61setversion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_version) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21513,43 +21082,50 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_61setversion(CYTHON_UNUSED PyObject
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setversion", 0);
 
-  /* "pysam/cvcf.pyx":961
+  /* "pysam/cvcf.pyx":965
  * 
  *     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_1 = PyObject_RichCompare(__pyx_v_version, __pyx_int_33, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_version, __pyx_int_33, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __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 = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_2) {
-    __pyx_t_1 = PyObject_RichCompare(__pyx_v_version, __pyx_int_40, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_RichCompare(__pyx_v_version, __pyx_int_40, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __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 = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_t_4 = __pyx_t_3;
   } else {
     __pyx_t_4 = __pyx_t_2;
   }
   if (__pyx_t_4) {
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L3;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":962
+  /* "pysam/cvcf.pyx":966
  *     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):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_v_version) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_v_version) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":964
+ *         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
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -21562,17 +21138,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_61setversion(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":968
+ *         self._version = version
+ * 
+ *     def setregions(self, regions):             # <<<<<<<<<<<<<<
+ *         self._regions = regions
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_64setregions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_64setregions = {__Pyx_NAMESTR("setregions"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_64setregions, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_64setregions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_regions = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setregions (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__regions,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_regions,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -21586,16 +21173,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_64setregions(PyObject *__pyx_self, P
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__regions)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_regions)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setregions", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setregions", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setregions") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setregions") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -21608,25 +21195,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_64setregions(PyObject *__pyx_self, P
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setregions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setregions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.setregions", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_63setregions(__pyx_self, __pyx_v_self, __pyx_v_regions);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":964
- *         self._version = version
- * 
- *     def setregions(self, regions):             # <<<<<<<<<<<<<<
- *         self._regions = regions
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_63setregions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_regions) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21635,15 +21216,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_63setregions(CYTHON_UNUSED PyObject
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setregions", 0);
 
-  /* "pysam/cvcf.pyx":965
+  /* "pysam/cvcf.pyx":969
  * 
  *     def setregions(self, regions):
  *         self._regions = regions             # <<<<<<<<<<<<<<
  * 
  *     def setreference(self, ref):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___regions, __pyx_v_regions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_regions_2, __pyx_v_regions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":968
+ *         self._version = version
+ * 
+ *     def setregions(self, regions):             # <<<<<<<<<<<<<<
+ *         self._regions = regions
+ * 
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -21655,6 +21245,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_63setregions(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":971
+ *         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
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_66setreference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_65setreference[] = " Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile ";
@@ -21662,11 +21260,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_66setreference = {__Pyx_NAMESTR(
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_66setreference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_ref = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("setreference (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__ref,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ref,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -21680,16 +21281,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_66setreference(PyObject *__pyx_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("setreference", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setreference", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setreference") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setreference") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -21702,25 +21303,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_66setreference(PyObject *__pyx_self,
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("setreference", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setreference", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.setreference", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_65setreference(__pyx_self, __pyx_v_self, __pyx_v_ref);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":967
- *         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
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_65setreference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ref) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21729,15 +21324,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_65setreference(CYTHON_UNUSED PyObjec
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("setreference", 0);
 
-  /* "pysam/cvcf.pyx":969
+  /* "pysam/cvcf.pyx":973
  *     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):
  */
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___reference, __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reference_2, __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":971
+ *         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
+ */
 
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -21749,17 +21353,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_65setreference(CYTHON_UNUSED PyObjec
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":975
+ *         self._reference = ref
+ * 
+ *     def ignoreerror(self, errorstring):             # <<<<<<<<<<<<<<
+ *         try:             self._ignored_errors.add(self.__dict__[errorstring])
+ *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_68ignoreerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_68ignoreerror = {__Pyx_NAMESTR("ignoreerror"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_68ignoreerror, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_68ignoreerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_errorstring = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("ignoreerror (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__errorstring,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_errorstring,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -21773,16 +21388,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_68ignoreerror(PyObject *__pyx_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__errorstring)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errorstring)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("ignoreerror", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("ignoreerror", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ignoreerror") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ignoreerror") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -21795,25 +21410,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_68ignoreerror(PyObject *__pyx_self,
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("ignoreerror", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("ignoreerror", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.ignoreerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_67ignoreerror(__pyx_self, __pyx_v_self, __pyx_v_errorstring);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":971
- *         self._reference = ref
- * 
- *     def ignoreerror(self, errorstring):             # <<<<<<<<<<<<<<
- *         try:             self._ignored_errors.add(self.__dict__[errorstring])
- *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -21831,7 +21440,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("ignoreerror", 0);
 
-  /* "pysam/cvcf.pyx":972
+  /* "pysam/cvcf.pyx":976
  * 
  *     def ignoreerror(self, errorstring):
  *         try:             self._ignored_errors.add(self.__dict__[errorstring])             # <<<<<<<<<<<<<<
@@ -21844,25 +21453,25 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject
     __Pyx_XGOTREF(__pyx_t_2);
     __Pyx_XGOTREF(__pyx_t_3);
     /*try:*/ {
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___ignored_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ignored_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__add); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____dict__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_errorstring); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_errorstring); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_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 = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__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_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     }
     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -21874,7 +21483,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject
     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-    /* "pysam/cvcf.pyx":973
+    /* "pysam/cvcf.pyx":977
  *     def ignoreerror(self, errorstring):
  *         try:             self._ignored_errors.add(self.__dict__[errorstring])
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)             # <<<<<<<<<<<<<<
@@ -21884,28 +21493,29 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject
     __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
     if (__pyx_t_7) {
       __Pyx_AddTraceback("pysam.cvcf.VCF.ignoreerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
-      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_GOTREF(__pyx_t_6);
       __Pyx_GOTREF(__pyx_t_4);
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_125), __pyx_v_errorstring); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L5_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 = 973; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_error_string_s, __pyx_v_errorstring); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
       __pyx_t_8 = 0;
-      __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 = 973; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       goto __pyx_L4_exception_handled;
     }
+    goto __pyx_L5_except_error;
     __pyx_L5_except_error:;
     __Pyx_XGIVEREF(__pyx_t_1);
     __Pyx_XGIVEREF(__pyx_t_2);
@@ -21920,6 +21530,15 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject
     __pyx_L10_try_end:;
   }
 
+  /* "pysam/cvcf.pyx":975
+ *         self._reference = ref
+ * 
+ *     def ignoreerror(self, errorstring):             # <<<<<<<<<<<<<<
+ *         try:             self._ignored_errors.add(self.__dict__[errorstring])
+ *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -21936,17 +21555,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":979
+ *         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)
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_70warnerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_70warnerror = {__Pyx_NAMESTR("warnerror"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_70warnerror, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_70warnerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_errorstring = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("warnerror (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__errorstring,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_errorstring,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -21960,16 +21590,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_70warnerror(PyObject *__pyx_self, Py
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__errorstring)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errorstring)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("warnerror", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("warnerror", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "warnerror") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "warnerror") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -21982,25 +21612,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_70warnerror(PyObject *__pyx_self, Py
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("warnerror", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("warnerror", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.warnerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_69warnerror(__pyx_self, __pyx_v_self, __pyx_v_errorstring);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":975
- *         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)
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -22018,7 +21642,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("warnerror", 0);
 
-  /* "pysam/cvcf.pyx":976
+  /* "pysam/cvcf.pyx":980
  * 
  *     def warnerror(self, errorstring):
  *         try:             self._warn_errors.add(self.__dict__[errorstring])             # <<<<<<<<<<<<<<
@@ -22031,25 +21655,25 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *
     __Pyx_XGOTREF(__pyx_t_2);
     __Pyx_XGOTREF(__pyx_t_3);
     /*try:*/ {
-      __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 = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_warn_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__add); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____dict__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_errorstring); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_errorstring); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_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 = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__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_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     }
     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -22061,7 +21685,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *
     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-    /* "pysam/cvcf.pyx":977
+    /* "pysam/cvcf.pyx":981
  *     def warnerror(self, errorstring):
  *         try:             self._warn_errors.add(self.__dict__[errorstring])
  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)             # <<<<<<<<<<<<<<
@@ -22071,28 +21695,29 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *
     __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
     if (__pyx_t_7) {
       __Pyx_AddTraceback("pysam.cvcf.VCF.warnerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
-      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_GOTREF(__pyx_t_6);
       __Pyx_GOTREF(__pyx_t_4);
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_125), __pyx_v_errorstring); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L5_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 = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_error_string_s, __pyx_v_errorstring); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_GOTREF(__pyx_t_9);
-      PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
-      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
       __pyx_t_8 = 0;
-      __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 = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_GOTREF(__pyx_t_8);
-      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
       goto __pyx_L4_exception_handled;
     }
+    goto __pyx_L5_except_error;
     __pyx_L5_except_error:;
     __Pyx_XGIVEREF(__pyx_t_1);
     __Pyx_XGIVEREF(__pyx_t_2);
@@ -22107,8 +21732,17 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *
     __pyx_L10_try_end:;
   }
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":979
+ *         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)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_5);
@@ -22123,6 +21757,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":983
+ *         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)
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_72parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_71parse[] = " Parse a stream of VCF-formatted lines.  Initializes class instance and return generator ";
@@ -22130,11 +21772,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_72parse = {__Pyx_NAMESTR("parse"
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_72parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("parse (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -22148,16 +21793,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_72parse(PyObject *__pyx_self, PyObje
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -22170,25 +21815,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_72parse(PyObject *__pyx_self, PyObje
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_71parse(__pyx_self, __pyx_v_self, __pyx_v_stream);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":979
- *         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)
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
   PyObject *__pyx_v_last_line = NULL;
   PyObject *__pyx_r = NULL;
@@ -22201,28 +21840,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__py
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("parse", 0);
 
-  /* "pysam/cvcf.pyx":981
+  /* "pysam/cvcf.pyx":985
  *     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
  */
-  __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 = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_header_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __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 = 981; __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 = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_v_last_line = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":984
+  /* "pysam/cvcf.pyx":988
  *         # 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)             # <<<<<<<<<<<<<<
@@ -22230,9 +21869,9 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__py
  *     def write(self, stream, datagenerator):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __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 = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_last_line);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_last_line);
@@ -22240,16 +21879,23 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__py
   __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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":983
+ *         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)
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -22263,6 +21909,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__py
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":990
+ *         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)
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_74write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_73write[] = " Writes a VCF file to a stream, using a data generator (or list) ";
@@ -22271,11 +21925,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_74write(PyObject *__pyx_self, PyObje
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
   PyObject *__pyx_v_datagenerator = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("write (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,&__pyx_n_s__datagenerator,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,&__pyx_n_s_datagenerator,0};
     PyObject* values[3] = {0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -22290,21 +21947,21 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_74write(PyObject *__pyx_self, PyObje
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__datagenerator)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datagenerator)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
       goto __pyx_L5_argtuple_error;
@@ -22319,25 +21976,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_74write(PyObject *__pyx_self, PyObje
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_73write(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_datagenerator);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":986
- *         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)
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_73write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_datagenerator) {
   PyObject *__pyx_v_data = NULL;
   PyObject *__pyx_r = NULL;
@@ -22353,47 +22004,47 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_73write(CYTHON_UNUSED PyObject *__py
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("write", 0);
 
-  /* "pysam/cvcf.pyx":988
+  /* "pysam/cvcf.pyx":992
  *     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)
  */
-  __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 = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __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 = 988; __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 = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":989
+  /* "pysam/cvcf.pyx":993
  *         """ 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)
  * 
  */
-  __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 = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_heading); 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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __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 = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "pysam/cvcf.pyx":990
+  /* "pysam/cvcf.pyx":994
  *         self.write_header(stream)
  *         self.write_heading(stream)
  *         for data in datagenerator: self.write_data(stream,data)             # <<<<<<<<<<<<<<
@@ -22404,7 +22055,7 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_73write(CYTHON_UNUSED PyObject *__py
     __pyx_t_1 = __pyx_v_datagenerator; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
     __pyx_t_5 = NULL;
   } else {
-    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_datagenerator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_datagenerator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
   }
@@ -22412,34 +22063,34 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_73write(CYTHON_UNUSED PyObject *__py
     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_2 = __pyx_t_5(__pyx_t_1);
       if (unlikely(!__pyx_t_2)) {
-        if (PyErr_Occurred()) {
-          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_2);
     }
-    __Pyx_XDECREF(__pyx_v_data);
-    __pyx_v_data = __pyx_t_2;
+    __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_2);
     __pyx_t_2 = 0;
-    __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 = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __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 = 990; __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 = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_INCREF(__pyx_v_stream);
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stream);
@@ -22447,14 +22098,23 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_73write(CYTHON_UNUSED PyObject *__py
     __Pyx_INCREF(__pyx_v_data);
     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_data);
     __Pyx_GIVEREF(__pyx_v_data);
-    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
+  /* "pysam/cvcf.pyx":990
+ *         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)
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -22471,6 +22131,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_73write(CYTHON_UNUSED PyObject *__py
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":996
+ *         for data in datagenerator: self.write_data(stream,data)
+ * 
+ *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
+ *         """ Writes a VCF header """
+ *         self.write_header(stream)
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_76writeheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_75writeheader[] = " Writes a VCF header ";
@@ -22478,11 +22146,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_76writeheader = {__Pyx_NAMESTR("
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_76writeheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_stream = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("writeheader (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -22496,16 +22167,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_76writeheader(PyObject *__pyx_self,
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("writeheader", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("writeheader", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeheader") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeheader") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -22518,25 +22189,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_76writeheader(PyObject *__pyx_self,
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("writeheader", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("writeheader", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.writeheader", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_75writeheader(__pyx_self, __pyx_v_self, __pyx_v_stream);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":992
- *         for data in datagenerator: self.write_data(stream,data)
- * 
- *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
- *         """ Writes a VCF header """
- *         self.write_header(stream)
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_75writeheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -22548,46 +22213,55 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_75writeheader(CYTHON_UNUSED PyObject
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("writeheader", 0);
 
-  /* "pysam/cvcf.pyx":994
+  /* "pysam/cvcf.pyx":998
  *     def writeheader(self, stream):
  *         """ Writes a VCF header """
  *         self.write_header(stream)             # <<<<<<<<<<<<<<
  *         self.write_heading(stream)
  * 
  */
-  __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 = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __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 = 994; __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 = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":995
+  /* "pysam/cvcf.pyx":999
  *         """ Writes a VCF header """
  *         self.write_header(stream)
  *         self.write_heading(stream)             # <<<<<<<<<<<<<<
  * 
  *     def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):
  */
-  __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 = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_heading); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __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 = 995; __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 = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
+  /* "pysam/cvcf.pyx":996
+ *         for data in datagenerator: self.write_data(stream,data)
+ * 
+ *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
+ *         """ Writes a VCF header """
+ *         self.write_header(stream)
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -22602,6 +22276,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_75writeheader(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":1001
+ *         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
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_78compare_calls(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_77compare_calls[] = " Utility function: compares two calls for equality ";
@@ -22614,11 +22296,14 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_78compare_calls(PyObject *__pyx_self
   PyObject *__pyx_v_pos2 = 0;
   PyObject *__pyx_v_ref2 = 0;
   PyObject *__pyx_v_alt2 = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("compare_calls (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__pos1,&__pyx_n_s__ref1,&__pyx_n_s__alt1,&__pyx_n_s__pos2,&__pyx_n_s__ref2,&__pyx_n_s__alt2,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pos1,&__pyx_n_s_ref1,&__pyx_n_s_alt1,&__pyx_n_s_pos2,&__pyx_n_s_ref2,&__pyx_n_s_alt2,0};
     PyObject* values[7] = {0,0,0,0,0,0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -22637,41 +22322,41 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_78compare_calls(PyObject *__pyx_self
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos1)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos1)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
-        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref1)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref1)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
-        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alt1)) != 0)) kw_args--;
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alt1)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  4:
-        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos2)) != 0)) kw_args--;
+        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  5:
-        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref2)) != 0)) kw_args--;
+        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  6:
-        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alt2)) != 0)) kw_args--;
+        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alt2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare_calls") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare_calls") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
       goto __pyx_L5_argtuple_error;
@@ -22694,25 +22379,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_78compare_calls(PyObject *__pyx_self
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.compare_calls", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(__pyx_self, __pyx_v_self, __pyx_v_pos1, __pyx_v_ref1, __pyx_v_alt1, __pyx_v_pos2, __pyx_v_ref2, __pyx_v_alt2);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":997
- *         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
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_pos1, PyObject *__pyx_v_ref1, PyObject *__pyx_v_alt1, PyObject *__pyx_v_pos2, PyObject *__pyx_v_ref2, PyObject *__pyx_v_alt2) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -22733,28 +22412,24 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObje
   __Pyx_INCREF(__pyx_v_ref2);
   __Pyx_INCREF(__pyx_v_alt2);
 
-  /* "pysam/cvcf.pyx":1002
+  /* "pysam/cvcf.pyx":1006
  *         # 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
  */
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos1, __pyx_v_pos2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __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 = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos1, __pyx_v_pos2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __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 = 1006; __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_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __Pyx_INCREF(Py_False);
+    __pyx_r = Py_False;
     goto __pyx_L0;
-    goto __pyx_L3;
   }
-  __pyx_L3:;
 
-  /* "pysam/cvcf.pyx":1005
+  /* "pysam/cvcf.pyx":1009
  *         # 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]:             # <<<<<<<<<<<<<<
@@ -22762,20 +22437,20 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObje
  *             alt1 = alt1[:-1]
  */
   while (1) {
-    __pyx_t_3 = PyObject_Length(__pyx_v_ref1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Length(__pyx_v_ref1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_2 = (__pyx_t_3 > 0);
     if (__pyx_t_2) {
-      __pyx_t_3 = PyObject_Length(__pyx_v_alt1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Length(__pyx_v_alt1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_t_4 = (__pyx_t_3 > 0);
       if (__pyx_t_4) {
-        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ref1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ref1, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_alt1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_alt1, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __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;
-        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
         __pyx_t_8 = __pyx_t_7;
       } else {
@@ -22787,34 +22462,32 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObje
     }
     if (!__pyx_t_4) break;
 
-    /* "pysam/cvcf.pyx":1006
+    /* "pysam/cvcf.pyx":1010
  *         # 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 = __Pyx_PySequence_GetSlice(__pyx_v_ref1, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_ref1, 0, -1, NULL, NULL, &__pyx_slice__86, 0, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_v_ref1);
-    __pyx_v_ref1 = __pyx_t_6;
+    __Pyx_DECREF_SET(__pyx_v_ref1, __pyx_t_6);
     __pyx_t_6 = 0;
 
-    /* "pysam/cvcf.pyx":1007
+    /* "pysam/cvcf.pyx":1011
  *         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 = __Pyx_PySequence_GetSlice(__pyx_v_alt1, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_alt1, 0, -1, NULL, NULL, &__pyx_slice__87, 0, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_v_alt1);
-    __pyx_v_alt1 = __pyx_t_6;
+    __Pyx_DECREF_SET(__pyx_v_alt1, __pyx_t_6);
     __pyx_t_6 = 0;
   }
 
-  /* "pysam/cvcf.pyx":1008
+  /* "pysam/cvcf.pyx":1012
  *             ref1 = ref1[:-1]
  *             alt1 = alt1[:-1]
  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:             # <<<<<<<<<<<<<<
@@ -22822,20 +22495,20 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObje
  *             alt2 = alt2[:-1]
  */
   while (1) {
-    __pyx_t_3 = PyObject_Length(__pyx_v_ref2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Length(__pyx_v_ref2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_4 = (__pyx_t_3 > 0);
     if (__pyx_t_4) {
-      __pyx_t_3 = PyObject_Length(__pyx_v_alt2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Length(__pyx_v_alt2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_t_2 = (__pyx_t_3 > 0);
       if (__pyx_t_2) {
-        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ref2, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ref2, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_6);
-        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_alt2, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_alt2, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
         __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
         __pyx_t_7 = __pyx_t_8;
       } else {
@@ -22847,34 +22520,32 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObje
     }
     if (!__pyx_t_2) break;
 
-    /* "pysam/cvcf.pyx":1009
+    /* "pysam/cvcf.pyx":1013
  *             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 = __Pyx_PySequence_GetSlice(__pyx_v_ref2, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_ref2, 0, -1, NULL, NULL, &__pyx_slice__88, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_v_ref2);
-    __pyx_v_ref2 = __pyx_t_1;
+    __Pyx_DECREF_SET(__pyx_v_ref2, __pyx_t_1);
     __pyx_t_1 = 0;
 
-    /* "pysam/cvcf.pyx":1010
+    /* "pysam/cvcf.pyx":1014
  *         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 = __Pyx_PySequence_GetSlice(__pyx_v_alt2, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_alt2, 0, -1, NULL, NULL, &__pyx_slice__89, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_v_alt2);
-    __pyx_v_alt2 = __pyx_t_1;
+    __Pyx_DECREF_SET(__pyx_v_alt2, __pyx_t_1);
     __pyx_t_1 = 0;
   }
 
-  /* "pysam/cvcf.pyx":1012
+  /* "pysam/cvcf.pyx":1016
  *             alt2 = alt2[:-1]
  *         # now, the alternative alleles must be identical
  *         return alt1 == alt2             # <<<<<<<<<<<<<<
@@ -22882,13 +22553,20 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObje
  * ###########################################################################################################
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt1, __pyx_v_alt2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt1, __pyx_v_alt2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":1001
+ *         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
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_5);
@@ -22905,6 +22583,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObje
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":1023
+ * ###########################################################################################################
+ * 
+ *     def connect(self, filename):             # <<<<<<<<<<<<<<
+ *         '''connect to tabix file.'''
+ *         self.tabixfile = pysam.Tabixfile( filename )
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_80connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_79connect[] = "connect to tabix file.";
@@ -22912,11 +22598,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_80connect = {__Pyx_NAMESTR("conn
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_80connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
   PyObject *__pyx_v_filename = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("connect (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__filename,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -22930,16 +22619,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_80connect(PyObject *__pyx_self, PyOb
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("connect", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("connect", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -22952,25 +22641,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_80connect(PyObject *__pyx_self, PyOb
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("connect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("connect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_79connect(__pyx_self, __pyx_v_self, __pyx_v_filename);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":1019
- * ###########################################################################################################
- * 
- *     def connect( self, filename ):             # <<<<<<<<<<<<<<
- *         '''connect to tabix file.'''
- *         self.tabixfile = pysam.Tabixfile( filename )
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_79connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -22982,55 +22665,64 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_79connect(CYTHON_UNUSED PyObject *__
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("connect", 0);
 
-  /* "pysam/cvcf.pyx":1021
- *     def connect( self, filename ):
+  /* "pysam/cvcf.pyx":1025
+ *     def connect(self, filename):
  *         '''connect to tabix file.'''
  *         self.tabixfile = pysam.Tabixfile( filename )             # <<<<<<<<<<<<<<
  *         self._parse_header(self.tabixfile.header)
  * 
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pysam); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pysam); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__Tabixfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Tabixfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __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 = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_INCREF(__pyx_v_filename);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
   __Pyx_GIVEREF(__pyx_v_filename);
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__tabixfile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":1022
+  /* "pysam/cvcf.pyx":1026
  *         '''connect to tabix file.'''
  *         self.tabixfile = pysam.Tabixfile( filename )
  *         self._parse_header(self.tabixfile.header)             # <<<<<<<<<<<<<<
  * 
  *     def fetch(self,
  */
-  __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 = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_header_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tabixfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile); 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_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__header); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_header_2); 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_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 = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(1); 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);
   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, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
+  /* "pysam/cvcf.pyx":1023
+ * ###########################################################################################################
+ * 
+ *     def connect(self, filename):             # <<<<<<<<<<<<<<
+ *         '''connect to tabix file.'''
+ *         self.tabixfile = pysam.Tabixfile( filename )
+ */
+
+  /* function exit code */
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -23045,9 +22737,17 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_79connect(CYTHON_UNUSED PyObject *__
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":1028
+ *         self._parse_header(self.tabixfile.header)
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference = None,
+ *               start = None,
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5pysam_4cvcf_3VCF_81fetch[] = " Parse a stream of VCF-formatted lines.  Initializes class instance and return generator ";
+static char __pyx_doc_5pysam_4cvcf_3VCF_81fetch[] = " Parse a stream of VCF-formatted lines.  \n        Initializes class instance and return generator ";
 static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_82fetch = {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_5pysam_4cvcf_3VCF_82fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_4cvcf_3VCF_81fetch)};
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_self = 0;
@@ -23055,14 +22755,17 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObje
   PyObject *__pyx_v_start = 0;
   PyObject *__pyx_v_end = 0;
   PyObject *__pyx_v_region = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,0};
     PyObject* values[5] = {0,0,0,0,0};
 
-    /* "pysam/cvcf.pyx":1025
+    /* "pysam/cvcf.pyx":1029
  * 
  *     def fetch(self,
  *               reference = None,             # <<<<<<<<<<<<<<
@@ -23071,7 +22774,7 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObje
  */
     values[1] = ((PyObject *)((PyObject *)Py_None));
 
-    /* "pysam/cvcf.pyx":1026
+    /* "pysam/cvcf.pyx":1030
  *     def fetch(self,
  *               reference = None,
  *               start = None,             # <<<<<<<<<<<<<<
@@ -23080,21 +22783,21 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObje
  */
     values[2] = ((PyObject *)((PyObject *)Py_None));
 
-    /* "pysam/cvcf.pyx":1027
+    /* "pysam/cvcf.pyx":1031
  *               reference = None,
  *               start = None,
  *               end = None,             # <<<<<<<<<<<<<<
  *               region = None ):
- *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
+ *         """ Parse a stream of VCF-formatted lines.
  */
     values[3] = ((PyObject *)((PyObject *)Py_None));
 
-    /* "pysam/cvcf.pyx":1028
+    /* "pysam/cvcf.pyx":1032
  *               start = None,
  *               end = None,
  *               region = None ):             # <<<<<<<<<<<<<<
- *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
- * 
+ *         """ Parse a stream of VCF-formatted lines.
+ *         Initializes class instance and return generator """
  */
     values[4] = ((PyObject *)((PyObject *)Py_None));
     if (unlikely(__pyx_kwds)) {
@@ -23112,31 +22815,31 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObje
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference);
           if (value) { values[1] = value; kw_args--; }
         }
         case  2:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
           if (value) { values[2] = value; kw_args--; }
         }
         case  3:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end);
           if (value) { values[3] = value; kw_args--; }
         }
         case  4:
         if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
           if (value) { values[4] = value; kw_args--; }
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -23157,18 +22860,15 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObje
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("fetch", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("fetch", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_81fetch(__pyx_self, __pyx_v_self, __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
 
-/* "pysam/cvcf.pyx":1024
+  /* "pysam/cvcf.pyx":1028
  *         self._parse_header(self.tabixfile.header)
  * 
  *     def fetch(self,             # <<<<<<<<<<<<<<
@@ -23176,6 +22876,11 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObje
  *               start = None,
  */
 
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_81fetch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -23189,20 +22894,28 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_81fetch(CYTHON_UNUSED PyObject *__py
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("fetch", 0);
 
-  /* "pysam/cvcf.pyx":1031
- *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
- * 
- *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )             # <<<<<<<<<<<<<<
- * 
- *     def validate( self, record ):
+  /* "pysam/cvcf.pyx":1035
+ *         """ Parse a stream of VCF-formatted lines.
+ *         Initializes class instance and return generator """
+ *         return self.tabixfile.fetch(             # <<<<<<<<<<<<<<
+ *             reference,
+ *             start,
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tabixfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile); 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_t_1, __pyx_n_s__fetch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fetch); 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_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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":1039
+ *             start,
+ *             end,
+ *             region,             # <<<<<<<<<<<<<<
+ *             parser = asVCFRecord(self))
+ * 
+ */
+  __pyx_t_1 = PyTuple_New(4); 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_INCREF(__pyx_v_reference);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
@@ -23216,29 +22929,60 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_81fetch(CYTHON_UNUSED PyObject *__py
   __Pyx_INCREF(__pyx_v_region);
   PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
   __Pyx_GIVEREF(__pyx_v_region);
-  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":1035
+ *         """ Parse a stream of VCF-formatted lines.
+ *         Initializes class instance and return generator """
+ *         return self.tabixfile.fetch(             # <<<<<<<<<<<<<<
+ *             reference,
+ *             start,
+ */
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+
+  /* "pysam/cvcf.pyx":1040
+ *             end,
+ *             region,
+ *             parser = asVCFRecord(self))             # <<<<<<<<<<<<<<
+ * 
+ *     def validate( self, record ):
+ */
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__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_5pysam_4cvcf_asVCFRecord)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_4cvcf_asVCFRecord)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
-  __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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_parser, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pysam/cvcf.pyx":1035
+ *         """ Parse a stream of VCF-formatted lines.
+ *         Initializes class instance and return generator """
+ *         return self.tabixfile.fetch(             # <<<<<<<<<<<<<<
+ *             reference,
+ *             start,
+ */
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); 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_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __pyx_r = __pyx_t_5;
   __pyx_t_5 = 0;
   goto __pyx_L0;
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":1028
+ *         self._parse_header(self.tabixfile.header)
+ * 
+ *     def fetch(self,             # <<<<<<<<<<<<<<
+ *               reference = None,
+ *               start = None,
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
@@ -23253,6 +22997,14 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_81fetch(CYTHON_UNUSED PyObject *__py
   return __pyx_r;
 }
 
+/* "pysam/cvcf.pyx":1042
+ *             parser = asVCFRecord(self))
+ * 
+ *     def validate( self, record ):             # <<<<<<<<<<<<<<
+ *         '''validate vcf record.
+ * 
+ */
+
 /* Python wrapper */
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_84validate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static char __pyx_doc_5pysam_4cvcf_3VCF_83validate[] = "validate vcf record.\n\n        returns a validated record.\n        ";
@@ -23260,11 +23012,14 @@ static PyMethodDef __pyx_mdef_5pysam_4cvcf_3VCF_84validate = {__Pyx_NAMESTR("val
 static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_84validate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   CYTHON_UNUSED PyObject *__pyx_v_self = 0;
   CYTHON_UNUSED PyObject *__pyx_v_record = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("validate (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__record,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_record,0};
     PyObject* values[2] = {0,0};
     if (unlikely(__pyx_kwds)) {
       Py_ssize_t kw_args;
@@ -23278,16 +23033,16 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_84validate(PyObject *__pyx_self, PyO
       kw_args = PyDict_Size(__pyx_kwds);
       switch (pos_args) {
         case  0:
-        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
         else goto __pyx_L5_argtuple_error;
         case  1:
-        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__record)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("validate", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("validate", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "validate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "validate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -23300,25 +23055,19 @@ static PyObject *__pyx_pw_5pysam_4cvcf_3VCF_84validate(PyObject *__pyx_self, PyO
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("validate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("validate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("pysam.cvcf.VCF.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
   __pyx_r = __pyx_pf_5pysam_4cvcf_3VCF_83validate(__pyx_self, __pyx_v_self, __pyx_v_record);
+
+  /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "pysam/cvcf.pyx":1033
- *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
- * 
- *     def validate( self, record ):             # <<<<<<<<<<<<<<
- *         '''validate vcf record.
- * 
- */
-
 static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_83validate(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_record) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
@@ -23328,26 +23077,32 @@ static PyObject *__pyx_pf_5pysam_4cvcf_3VCF_83validate(CYTHON_UNUSED PyObject *_
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("validate", 0);
 
-  /* "pysam/cvcf.pyx":1039
+  /* "pysam/cvcf.pyx":1048
  *         '''
  * 
  *         raise NotImplementedError( "needs to be checked" )             # <<<<<<<<<<<<<<
  * 
  *         chrom, pos = record.chrom, record.pos
  */
-  __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_127), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
+  /* "pysam/cvcf.pyx":1042
+ *             parser = asVCFRecord(self))
+ * 
+ *     def validate( self, record ):             # <<<<<<<<<<<<<<
+ *         '''validate vcf record.
+ * 
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_AddTraceback("pysam.cvcf.VCF.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
-  __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
@@ -23357,11 +23112,11 @@ static struct __pyx_vtabstruct_5pysam_4cvcf_VCFRecord __pyx_vtable_5pysam_4cvcf_
 static PyObject *__pyx_tp_new_5pysam_4cvcf_VCFRecord(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5pysam_4cvcf_VCFRecord *p;
   PyObject *o = __pyx_ptype_5pysam_10TabProxies_TupleProxy->tp_new(t, a, k);
-  if (!o) return 0;
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5pysam_4cvcf_VCFRecord *)o);
   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10TabProxies_TupleProxy*)__pyx_vtabptr_5pysam_4cvcf_VCFRecord;
   p->vcf = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5pysam_4cvcf_9VCFRecord_3__cinit__(o, a, k) < 0) {
+  if (unlikely(__pyx_pw_5pysam_4cvcf_9VCFRecord_3__cinit__(o, a, k) < 0)) {
     Py_DECREF(o); o = 0;
   }
   return o;
@@ -23369,8 +23124,16 @@ static PyObject *__pyx_tp_new_5pysam_4cvcf_VCFRecord(PyTypeObject *t, PyObject *
 
 static void __pyx_tp_dealloc_5pysam_4cvcf_VCFRecord(PyObject *o) {
   struct __pyx_obj_5pysam_4cvcf_VCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_VCFRecord *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
   PyObject_GC_UnTrack(o);
   Py_CLEAR(p->vcf);
+  #if CYTHON_COMPILING_IN_CPYTHON
+  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
+  #endif
   PyObject_GC_Track(o);
   if (likely(__pyx_ptype_5pysam_10TabProxies_TupleProxy)) __pyx_ptype_5pysam_10TabProxies_TupleProxy->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_5pysam_4cvcf_VCFRecord);
 }
@@ -23386,8 +23149,8 @@ static int __pyx_tp_traverse_5pysam_4cvcf_VCFRecord(PyObject *o, visitproc v, vo
 }
 
 static int __pyx_tp_clear_5pysam_4cvcf_VCFRecord(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf_VCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_VCFRecord *)o;
   PyObject* tmp;
+  struct __pyx_obj_5pysam_4cvcf_VCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_VCFRecord *)o;
   if (likely(__pyx_ptype_5pysam_10TabProxies_TupleProxy)) { if (__pyx_ptype_5pysam_10TabProxies_TupleProxy->tp_clear) __pyx_ptype_5pysam_10TabProxies_TupleProxy->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_4cvcf_VCFRecord);
   tmp = ((PyObject*)p->vcf);
   p->vcf = Py_None; Py_INCREF(Py_None);
@@ -23406,514 +23169,66 @@ static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_contig(PyObject *o, CYTHO
   return __pyx_pw_5pysam_4cvcf_9VCFRecord_6contig_1__get__(o);
 }
 
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_pos(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_3pos_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_id(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_2id_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_ref(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_3ref_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_alt(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_3alt_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_qual(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_4qual_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_filter(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_6filter_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_info(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_4info_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_format(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_6format_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_samples(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_5pysam_4cvcf_9VCFRecord_7samples_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_5pysam_4cvcf_VCFRecord[] = {
-  {__Pyx_NAMESTR("error"), (PyCFunction)__pyx_pw_5pysam_4cvcf_9VCFRecord_5error, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_4cvcf_9VCFRecord_4error)},
-  {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_5pysam_4cvcf_VCFRecord[] = {
-  {(char *)"contig", __pyx_getprop_5pysam_4cvcf_9VCFRecord_contig, 0, 0, 0},
-  {(char *)"pos", __pyx_getprop_5pysam_4cvcf_9VCFRecord_pos, 0, 0, 0},
-  {(char *)"id", __pyx_getprop_5pysam_4cvcf_9VCFRecord_id, 0, 0, 0},
-  {(char *)"ref", __pyx_getprop_5pysam_4cvcf_9VCFRecord_ref, 0, 0, 0},
-  {(char *)"alt", __pyx_getprop_5pysam_4cvcf_9VCFRecord_alt, 0, 0, 0},
-  {(char *)"qual", __pyx_getprop_5pysam_4cvcf_9VCFRecord_qual, 0, 0, 0},
-  {(char *)"filter", __pyx_getprop_5pysam_4cvcf_9VCFRecord_filter, 0, 0, 0},
-  {(char *)"info", __pyx_getprop_5pysam_4cvcf_9VCFRecord_info, 0, 0, 0},
-  {(char *)"format", __pyx_getprop_5pysam_4cvcf_9VCFRecord_format, 0, 0, 0},
-  {(char *)"samples", __pyx_getprop_5pysam_4cvcf_9VCFRecord_samples, 0, 0, 0},
-  {0, 0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_VCFRecord = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_VCFRecord = {
-  __pyx_pw_5pysam_4cvcf_9VCFRecord_7__len__, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  __pyx_sq_item_5pysam_4cvcf_VCFRecord, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_VCFRecord = {
-  __pyx_pw_5pysam_4cvcf_9VCFRecord_7__len__, /*mp_length*/
-  __pyx_pw_5pysam_4cvcf_9VCFRecord_9__getitem__, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_VCFRecord = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_4cvcf_VCFRecord = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.cvcf.VCFRecord"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_4cvcf_VCFRecord), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_4cvcf_VCFRecord, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_VCFRecord, /*tp_as_number*/
-  &__pyx_tp_as_sequence_VCFRecord, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_VCFRecord, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  0, /*tp_call*/
-  0, /*tp_str*/
-  0, /*tp_getattro*/
-  0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_VCFRecord, /*tp_as_buffer*/
-  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_5pysam_4cvcf_VCFRecord, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_4cvcf_VCFRecord, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_4cvcf_VCFRecord, /*tp_methods*/
-  0, /*tp_members*/
-  __pyx_getsets_5pysam_4cvcf_VCFRecord, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  __pyx_pw_5pysam_4cvcf_9VCFRecord_1__init__, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_4cvcf_VCFRecord, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
-static struct __pyx_vtabstruct_5pysam_4cvcf_asVCFRecord __pyx_vtable_5pysam_4cvcf_asVCFRecord;
-
-static PyObject *__pyx_tp_new_5pysam_4cvcf_asVCFRecord(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_5pysam_4cvcf_asVCFRecord *p;
-  PyObject *o = __pyx_ptype_5pysam_6ctabix_Parser->tp_new(t, a, k);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)o);
-  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_4cvcf_asVCFRecord;
-  p->vcffile = Py_None; Py_INCREF(Py_None);
-  return o;
-}
-
-static void __pyx_tp_dealloc_5pysam_4cvcf_asVCFRecord(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->vcffile);
-  PyObject_GC_Track(o);
-  if (likely(__pyx_ptype_5pysam_6ctabix_Parser)) __pyx_ptype_5pysam_6ctabix_Parser->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_5pysam_4cvcf_asVCFRecord);
-}
-
-static int __pyx_tp_traverse_5pysam_4cvcf_asVCFRecord(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_4cvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)o;
-  e = ((likely(__pyx_ptype_5pysam_6ctabix_Parser)) ? ((__pyx_ptype_5pysam_6ctabix_Parser->tp_traverse) ? __pyx_ptype_5pysam_6ctabix_Parser->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_4cvcf_asVCFRecord)); if (e) return e;
-  if (p->vcffile) {
-    e = (*v)(p->vcffile, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_4cvcf_asVCFRecord(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)o;
-  PyObject* tmp;
-  if (likely(__pyx_ptype_5pysam_6ctabix_Parser)) { if (__pyx_ptype_5pysam_6ctabix_Parser->tp_clear) __pyx_ptype_5pysam_6ctabix_Parser->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_4cvcf_asVCFRecord);
-  tmp = ((PyObject*)p->vcffile);
-  p->vcffile = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_4cvcf_asVCFRecord[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_asVCFRecord = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_asVCFRecord = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping_asVCFRecord = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_asVCFRecord = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_4cvcf_asVCFRecord = {
-  PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.cvcf.asVCFRecord"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_4cvcf_asVCFRecord), /*tp_basicsize*/
-  0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_4cvcf_asVCFRecord, /*tp_dealloc*/
-  0, /*tp_print*/
-  0, /*tp_getattr*/
-  0, /*tp_setattr*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*tp_compare*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*tp_repr*/
-  &__pyx_tp_as_number_asVCFRecord, /*tp_as_number*/
-  &__pyx_tp_as_sequence_asVCFRecord, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_asVCFRecord, /*tp_as_mapping*/
-  0, /*tp_hash*/
-  __pyx_pw_5pysam_4cvcf_11asVCFRecord_3__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_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_5pysam_4cvcf_asVCFRecord, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_4cvcf_asVCFRecord, /*tp_clear*/
-  0, /*tp_richcompare*/
-  0, /*tp_weaklistoffset*/
-  0, /*tp_iter*/
-  0, /*tp_iternext*/
-  __pyx_methods_5pysam_4cvcf_asVCFRecord, /*tp_methods*/
-  0, /*tp_members*/
-  0, /*tp_getset*/
-  0, /*tp_base*/
-  0, /*tp_dict*/
-  0, /*tp_descr_get*/
-  0, /*tp_descr_set*/
-  0, /*tp_dictoffset*/
-  __pyx_pw_5pysam_4cvcf_11asVCFRecord_1__init__, /*tp_init*/
-  0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_4cvcf_asVCFRecord, /*tp_new*/
-  0, /*tp_free*/
-  0, /*tp_is_gc*/
-  0, /*tp_bases*/
-  0, /*tp_mro*/
-  0, /*tp_cache*/
-  0, /*tp_subclasses*/
-  0, /*tp_weaklist*/
-  0, /*tp_del*/
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*tp_version_tag*/
-  #endif
-};
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_pos(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_3pos_1__get__(o);
+}
 
-static PyObject *__pyx_tp_new_5pysam_4cvcf___pyx_scope_struct__parse_data(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *)o);
-  p->__pyx_v_alt = 0;
-  return o;
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_id(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_2id_1__get__(o);
 }
 
-static void __pyx_tp_dealloc_5pysam_4cvcf___pyx_scope_struct__parse_data(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *)o;
-  PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->__pyx_v_alt);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_ref(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_3ref_1__get__(o);
 }
 
-static int __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct__parse_data(PyObject *o, visitproc v, void *a) {
-  int e;
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *)o;
-  if (p->__pyx_v_alt) {
-    e = (*v)(p->__pyx_v_alt, a); if (e) return e;
-  }
-  return 0;
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_alt(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_3alt_1__get__(o);
 }
 
-static int __pyx_tp_clear_5pysam_4cvcf___pyx_scope_struct__parse_data(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->__pyx_v_alt);
-  p->__pyx_v_alt = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_qual(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_4qual_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_filter(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_6filter_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_info(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_4info_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_format(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_6format_1__get__(o);
 }
 
-static PyMethodDef __pyx_methods_5pysam_4cvcf___pyx_scope_struct__parse_data[] = {
+static PyObject *__pyx_getprop_5pysam_4cvcf_9VCFRecord_samples(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_5pysam_4cvcf_9VCFRecord_7samples_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_4cvcf_VCFRecord[] = {
+  {__Pyx_NAMESTR("error"), (PyCFunction)__pyx_pw_5pysam_4cvcf_9VCFRecord_5error, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5pysam_4cvcf_9VCFRecord_4error)},
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct__parse_data = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
+static struct PyGetSetDef __pyx_getsets_5pysam_4cvcf_VCFRecord[] = {
+  {(char *)"contig", __pyx_getprop_5pysam_4cvcf_9VCFRecord_contig, 0, 0, 0},
+  {(char *)"pos", __pyx_getprop_5pysam_4cvcf_9VCFRecord_pos, 0, 0, 0},
+  {(char *)"id", __pyx_getprop_5pysam_4cvcf_9VCFRecord_id, 0, 0, 0},
+  {(char *)"ref", __pyx_getprop_5pysam_4cvcf_9VCFRecord_ref, 0, 0, 0},
+  {(char *)"alt", __pyx_getprop_5pysam_4cvcf_9VCFRecord_alt, 0, 0, 0},
+  {(char *)"qual", __pyx_getprop_5pysam_4cvcf_9VCFRecord_qual, 0, 0, 0},
+  {(char *)"filter", __pyx_getprop_5pysam_4cvcf_9VCFRecord_filter, 0, 0, 0},
+  {(char *)"info", __pyx_getprop_5pysam_4cvcf_9VCFRecord_info, 0, 0, 0},
+  {(char *)"format", __pyx_getprop_5pysam_4cvcf_9VCFRecord_format, 0, 0, 0},
+  {(char *)"samples", __pyx_getprop_5pysam_4cvcf_9VCFRecord_samples, 0, 0, 0},
+  {0, 0, 0, 0, 0}
 };
 
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__parse_data = {
-  0, /*sq_length*/
+static PySequenceMethods __pyx_tp_as_sequence_VCFRecord = {
+  __pyx_pw_5pysam_4cvcf_9VCFRecord_7__len__, /*sq_length*/
   0, /*sq_concat*/
   0, /*sq_repeat*/
-  0, /*sq_item*/
+  __pyx_sq_item_5pysam_4cvcf_VCFRecord, /*sq_item*/
   0, /*sq_slice*/
   0, /*sq_ass_item*/
   0, /*sq_ass_slice*/
@@ -23922,39 +23237,18 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__parse_data = {
   0, /*sq_inplace_repeat*/
 };
 
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct__parse_data = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
+static PyMappingMethods __pyx_tp_as_mapping_VCFRecord = {
+  __pyx_pw_5pysam_4cvcf_9VCFRecord_7__len__, /*mp_length*/
+  __pyx_pw_5pysam_4cvcf_9VCFRecord_9__getitem__, /*mp_subscript*/
   0, /*mp_ass_subscript*/
 };
 
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct__parse_data = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct__parse_data = {
+static PyTypeObject __pyx_type_5pysam_4cvcf_VCFRecord = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.cvcf.__pyx_scope_struct__parse_data"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.cvcf.VCFRecord"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_4cvcf_VCFRecord), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_4cvcf___pyx_scope_struct__parse_data, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_4cvcf_VCFRecord, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -23964,34 +23258,34 @@ static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct__parse_data = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number___pyx_scope_struct__parse_data, /*tp_as_number*/
-  &__pyx_tp_as_sequence___pyx_scope_struct__parse_data, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping___pyx_scope_struct__parse_data, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  &__pyx_tp_as_sequence_VCFRecord, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_VCFRecord, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer___pyx_scope_struct__parse_data, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
-  __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct__parse_data, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_4cvcf___pyx_scope_struct__parse_data, /*tp_clear*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("vcf record.\n\n    initialized from data and vcf meta \n    "), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_4cvcf_VCFRecord, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_4cvcf_VCFRecord, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_5pysam_4cvcf___pyx_scope_struct__parse_data, /*tp_methods*/
+  __pyx_methods_5pysam_4cvcf_VCFRecord, /*tp_methods*/
   0, /*tp_members*/
-  0, /*tp_getset*/
+  __pyx_getsets_5pysam_4cvcf_VCFRecord, /*tp_getset*/
   0, /*tp_base*/
   0, /*tp_dict*/
   0, /*tp_descr_get*/
   0, /*tp_descr_set*/
   0, /*tp_dictoffset*/
-  0, /*tp_init*/
+  __pyx_pw_5pysam_4cvcf_9VCFRecord_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_4cvcf___pyx_scope_struct__parse_data, /*tp_new*/
+  __pyx_tp_new_5pysam_4cvcf_VCFRecord, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -24003,167 +23297,68 @@ static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct__parse_data = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
+static struct __pyx_vtabstruct_5pysam_4cvcf_asVCFRecord __pyx_vtable_5pysam_4cvcf_asVCFRecord;
 
-static PyObject *__pyx_tp_new_5pysam_4cvcf___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *)o);
-  p->__pyx_outer_scope = 0;
-  p->__pyx_v_allele = 0;
-  p->__pyx_t_0 = 0;
+static PyObject *__pyx_tp_new_5pysam_4cvcf_asVCFRecord(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_5pysam_4cvcf_asVCFRecord *p;
+  PyObject *o = __pyx_ptype_5pysam_6ctabix_Parser->tp_new(t, a, k);
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__pyx_vtabptr_5pysam_4cvcf_asVCFRecord;
+  p->vcffile = Py_None; Py_INCREF(Py_None);
   return o;
 }
 
-static void __pyx_tp_dealloc_5pysam_4cvcf___pyx_scope_struct_1_genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *)o;
+static void __pyx_tp_dealloc_5pysam_4cvcf_asVCFRecord(PyObject *o) {
+  struct __pyx_obj_5pysam_4cvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
   PyObject_GC_UnTrack(o);
-  Py_CLEAR(p->__pyx_outer_scope);
-  Py_CLEAR(p->__pyx_v_allele);
-  Py_CLEAR(p->__pyx_t_0);
+  Py_CLEAR(p->vcffile);
+  #if CYTHON_COMPILING_IN_CPYTHON
+  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
+  #endif
   PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
+  if (likely(__pyx_ptype_5pysam_6ctabix_Parser)) __pyx_ptype_5pysam_6ctabix_Parser->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_5pysam_4cvcf_asVCFRecord);
 }
 
-static int __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_5pysam_4cvcf_asVCFRecord(PyObject *o, visitproc v, void *a) {
   int e;
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *)o;
-  if (p->__pyx_outer_scope) {
-    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
-  }
-  if (p->__pyx_v_allele) {
-    e = (*v)(p->__pyx_v_allele, a); if (e) return e;
-  }
-  if (p->__pyx_t_0) {
-    e = (*v)(p->__pyx_t_0, a); if (e) return e;
+  struct __pyx_obj_5pysam_4cvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)o;
+  e = ((likely(__pyx_ptype_5pysam_6ctabix_Parser)) ? ((__pyx_ptype_5pysam_6ctabix_Parser->tp_traverse) ? __pyx_ptype_5pysam_6ctabix_Parser->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_4cvcf_asVCFRecord)); if (e) return e;
+  if (p->vcffile) {
+    e = (*v)(p->vcffile, a); if (e) return e;
   }
   return 0;
 }
 
-static int __pyx_tp_clear_5pysam_4cvcf___pyx_scope_struct_1_genexpr(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr *)o;
+static int __pyx_tp_clear_5pysam_4cvcf_asVCFRecord(PyObject *o) {
   PyObject* tmp;
-  tmp = ((PyObject*)p->__pyx_outer_scope);
-  p->__pyx_outer_scope = ((struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct__parse_data *)Py_None); Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_v_allele);
-  p->__pyx_v_allele = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_t_0);
-  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+  struct __pyx_obj_5pysam_4cvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_4cvcf_asVCFRecord *)o;
+  if (likely(__pyx_ptype_5pysam_6ctabix_Parser)) { if (__pyx_ptype_5pysam_6ctabix_Parser->tp_clear) __pyx_ptype_5pysam_6ctabix_Parser->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_4cvcf_asVCFRecord);
+  tmp = ((PyObject*)p->vcffile);
+  p->vcffile = Py_None; Py_INCREF(Py_None);
   Py_XDECREF(tmp);
   return 0;
 }
 
-static PyMethodDef __pyx_methods_5pysam_4cvcf___pyx_scope_struct_1_genexpr[] = {
+static PyMethodDef __pyx_methods_5pysam_4cvcf_asVCFRecord[] = {
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1_genexpr = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_1_genexpr = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_1_genexpr = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1_genexpr = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
-static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct_1_genexpr = {
+static PyTypeObject __pyx_type_5pysam_4cvcf_asVCFRecord = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.cvcf.__pyx_scope_struct_1_genexpr"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.cvcf.asVCFRecord"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_4cvcf_asVCFRecord), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_4cvcf___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_4cvcf_asVCFRecord, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -24173,24 +23368,24 @@ static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct_1_genexpr = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number___pyx_scope_struct_1_genexpr, /*tp_as_number*/
-  &__pyx_tp_as_sequence___pyx_scope_struct_1_genexpr, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping___pyx_scope_struct_1_genexpr, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer___pyx_scope_struct_1_genexpr, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
-  __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct_1_genexpr, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_4cvcf___pyx_scope_struct_1_genexpr, /*tp_clear*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("converts a :term:`tabix row` into a VCF record."), /*tp_doc*/
+  __pyx_tp_traverse_5pysam_4cvcf_asVCFRecord, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_4cvcf_asVCFRecord, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_5pysam_4cvcf___pyx_scope_struct_1_genexpr, /*tp_methods*/
+  __pyx_methods_5pysam_4cvcf_asVCFRecord, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -24198,9 +23393,9 @@ static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct_1_genexpr = {
   0, /*tp_descr_get*/
   0, /*tp_descr_set*/
   0, /*tp_dictoffset*/
-  0, /*tp_init*/
+  __pyx_pw_5pysam_4cvcf_11asVCFRecord_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_4cvcf___pyx_scope_struct_1_genexpr, /*tp_new*/
+  __pyx_tp_new_5pysam_4cvcf_asVCFRecord, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -24212,36 +23407,46 @@ static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct_1_genexpr = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 
-static PyObject *__pyx_tp_new_5pysam_4cvcf___pyx_scope_struct_2__parse(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
-  p = ((struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *)o);
-  p->__pyx_v_d = 0;
-  p->__pyx_v_line = 0;
-  p->__pyx_v_self = 0;
-  p->__pyx_v_stream = 0;
-  p->__pyx_t_1 = 0;
+static struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *__pyx_freelist_5pysam_4cvcf___pyx_scope_struct___parse[8];
+static int __pyx_freecount_5pysam_4cvcf___pyx_scope_struct___parse = 0;
+
+static PyObject *__pyx_tp_new_5pysam_4cvcf___pyx_scope_struct___parse(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((__pyx_freecount_5pysam_4cvcf___pyx_scope_struct___parse > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse)))) {
+    o = (PyObject*)__pyx_freelist_5pysam_4cvcf___pyx_scope_struct___parse[--__pyx_freecount_5pysam_4cvcf___pyx_scope_struct___parse];
+    memset(o, 0, sizeof(struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse));
+    (void) PyObject_INIT(o, t);
+    PyObject_GC_Track(o);
+  } else {
+    o = (*t->tp_alloc)(t, 0);
+    if (unlikely(!o)) return 0;
+  }
   return o;
 }
 
-static void __pyx_tp_dealloc_5pysam_4cvcf___pyx_scope_struct_2__parse(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *)o;
+static void __pyx_tp_dealloc_5pysam_4cvcf___pyx_scope_struct___parse(PyObject *o) {
+  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *)o;
   PyObject_GC_UnTrack(o);
   Py_CLEAR(p->__pyx_v_d);
   Py_CLEAR(p->__pyx_v_line);
   Py_CLEAR(p->__pyx_v_self);
   Py_CLEAR(p->__pyx_v_stream);
   Py_CLEAR(p->__pyx_t_1);
-  PyObject_GC_Track(o);
-  (*Py_TYPE(o)->tp_free)(o);
+  if ((__pyx_freecount_5pysam_4cvcf___pyx_scope_struct___parse < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse))) {
+    __pyx_freelist_5pysam_4cvcf___pyx_scope_struct___parse[__pyx_freecount_5pysam_4cvcf___pyx_scope_struct___parse++] = ((struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *)o);
+  } else {
+    (*Py_TYPE(o)->tp_free)(o);
+  }
 }
 
-static int __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct_2__parse(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct___parse(PyObject *o, visitproc v, void *a) {
   int e;
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *)o;
+  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *)o;
   if (p->__pyx_v_d) {
     e = (*v)(p->__pyx_v_d, a); if (e) return e;
   }
@@ -24249,146 +23454,44 @@ static int __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct_2__parse(PyObject *
     e = (*v)(p->__pyx_v_line, a); if (e) return e;
   }
   if (p->__pyx_v_self) {
-    e = (*v)(p->__pyx_v_self, a); if (e) return e;
-  }
-  if (p->__pyx_v_stream) {
-    e = (*v)(p->__pyx_v_stream, a); if (e) return e;
-  }
-  if (p->__pyx_t_1) {
-    e = (*v)(p->__pyx_t_1, a); if (e) return e;
-  }
-  return 0;
-}
-
-static int __pyx_tp_clear_5pysam_4cvcf___pyx_scope_struct_2__parse(PyObject *o) {
-  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse *)o;
-  PyObject* tmp;
-  tmp = ((PyObject*)p->__pyx_v_d);
-  p->__pyx_v_d = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_v_line);
-  p->__pyx_v_line = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_v_self);
-  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_v_stream);
-  p->__pyx_v_stream = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  tmp = ((PyObject*)p->__pyx_t_1);
-  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
-  Py_XDECREF(tmp);
-  return 0;
-}
-
-static PyMethodDef __pyx_methods_5pysam_4cvcf___pyx_scope_struct_2__parse[] = {
-  {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_2__parse = {
-  0, /*nb_add*/
-  0, /*nb_subtract*/
-  0, /*nb_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_divide*/
-  #endif
-  0, /*nb_remainder*/
-  0, /*nb_divmod*/
-  0, /*nb_power*/
-  0, /*nb_negative*/
-  0, /*nb_positive*/
-  0, /*nb_absolute*/
-  0, /*nb_nonzero*/
-  0, /*nb_invert*/
-  0, /*nb_lshift*/
-  0, /*nb_rshift*/
-  0, /*nb_and*/
-  0, /*nb_xor*/
-  0, /*nb_or*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_coerce*/
-  #endif
-  0, /*nb_int*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  0, /*nb_float*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_oct*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_hex*/
-  #endif
-  0, /*nb_inplace_add*/
-  0, /*nb_inplace_subtract*/
-  0, /*nb_inplace_multiply*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_inplace_divide*/
-  #endif
-  0, /*nb_inplace_remainder*/
-  0, /*nb_inplace_power*/
-  0, /*nb_inplace_lshift*/
-  0, /*nb_inplace_rshift*/
-  0, /*nb_inplace_and*/
-  0, /*nb_inplace_xor*/
-  0, /*nb_inplace_or*/
-  0, /*nb_floor_divide*/
-  0, /*nb_true_divide*/
-  0, /*nb_inplace_floor_divide*/
-  0, /*nb_inplace_true_divide*/
-  #if PY_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_2__parse = {
-  0, /*sq_length*/
-  0, /*sq_concat*/
-  0, /*sq_repeat*/
-  0, /*sq_item*/
-  0, /*sq_slice*/
-  0, /*sq_ass_item*/
-  0, /*sq_ass_slice*/
-  0, /*sq_contains*/
-  0, /*sq_inplace_concat*/
-  0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_2__parse = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
+    e = (*v)(p->__pyx_v_self, a); if (e) return e;
+  }
+  if (p->__pyx_v_stream) {
+    e = (*v)(p->__pyx_v_stream, a); if (e) return e;
+  }
+  if (p->__pyx_t_1) {
+    e = (*v)(p->__pyx_t_1, a); if (e) return e;
+  }
+  return 0;
+}
 
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_2__parse = {
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getreadbuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getwritebuffer*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getsegcount*/
-  #endif
-  #if PY_MAJOR_VERSION < 3
-  0, /*bf_getcharbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
+static int __pyx_tp_clear_5pysam_4cvcf___pyx_scope_struct___parse(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *p = (struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse *)o;
+  tmp = ((PyObject*)p->__pyx_v_d);
+  p->__pyx_v_d = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_v_line);
+  p->__pyx_v_line = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_v_self);
+  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_v_stream);
+  p->__pyx_v_stream = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx_t_1);
+  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
 
-static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct_2__parse = {
+static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct___parse = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("pysam.cvcf.__pyx_scope_struct_2__parse"), /*tp_name*/
-  sizeof(struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct_2__parse), /*tp_basicsize*/
+  __Pyx_NAMESTR("pysam.cvcf.__pyx_scope_struct___parse"), /*tp_name*/
+  sizeof(struct __pyx_obj_5pysam_4cvcf___pyx_scope_struct___parse), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_5pysam_4cvcf___pyx_scope_struct_2__parse, /*tp_dealloc*/
+  __pyx_tp_dealloc_5pysam_4cvcf___pyx_scope_struct___parse, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -24398,24 +23501,24 @@ static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct_2__parse = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number___pyx_scope_struct_2__parse, /*tp_as_number*/
-  &__pyx_tp_as_sequence___pyx_scope_struct_2__parse, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping___pyx_scope_struct_2__parse, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer___pyx_scope_struct_2__parse, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   0, /*tp_doc*/
-  __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct_2__parse, /*tp_traverse*/
-  __pyx_tp_clear_5pysam_4cvcf___pyx_scope_struct_2__parse, /*tp_clear*/
+  __pyx_tp_traverse_5pysam_4cvcf___pyx_scope_struct___parse, /*tp_traverse*/
+  __pyx_tp_clear_5pysam_4cvcf___pyx_scope_struct___parse, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_5pysam_4cvcf___pyx_scope_struct_2__parse, /*tp_methods*/
+  0, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
@@ -24425,7 +23528,7 @@ static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct_2__parse = {
   0, /*tp_dictoffset*/
   0, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_5pysam_4cvcf___pyx_scope_struct_2__parse, /*tp_new*/
+  __pyx_tp_new_5pysam_4cvcf___pyx_scope_struct___parse, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -24437,6 +23540,9 @@ static PyTypeObject __pyx_type_5pysam_4cvcf___pyx_scope_struct_2__parse = {
   #if PY_VERSION_HEX >= 0x02060000
   0, /*tp_version_tag*/
   #endif
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
 };
 
 static PyMethodDef __pyx_methods[] = {
@@ -24462,457 +23568,466 @@ static struct PyModuleDef __pyx_moduledef = {
 #endif
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
-  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
-  {&__pyx_n_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 1},
-  {&__pyx_n_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 1},
-  {&__pyx_n_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 1},
-  {&__pyx_n_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 1},
-  {&__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_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
-  {&__pyx_n_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 1},
-  {&__pyx_kp_s_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 1, 0},
-  {&__pyx_n_s_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 1},
-  {&__pyx_kp_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 0},
-  {&__pyx_n_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 1},
-  {&__pyx_kp_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 0},
-  {&__pyx_kp_s_125, __pyx_k_125, sizeof(__pyx_k_125), 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_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 1, 0},
-  {&__pyx_n_s_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 1, 1},
-  {&__pyx_kp_s_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 1, 0},
-  {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 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_kp_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 0},
-  {&__pyx_kp_s_164, __pyx_k_164, sizeof(__pyx_k_164), 0, 0, 1, 0},
-  {&__pyx_kp_s_165, __pyx_k_165, sizeof(__pyx_k_165), 0, 0, 1, 0},
-  {&__pyx_kp_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 0},
-  {&__pyx_kp_s_167, __pyx_k_167, sizeof(__pyx_k_167), 0, 0, 1, 0},
-  {&__pyx_kp_s_168, __pyx_k_168, sizeof(__pyx_k_168), 0, 0, 1, 0},
-  {&__pyx_kp_s_169, __pyx_k_169, sizeof(__pyx_k_169), 0, 0, 1, 0},
-  {&__pyx_kp_s_170, __pyx_k_170, sizeof(__pyx_k_170), 0, 0, 1, 0},
-  {&__pyx_kp_s_171, __pyx_k_171, sizeof(__pyx_k_171), 0, 0, 1, 0},
-  {&__pyx_kp_s_172, __pyx_k_172, sizeof(__pyx_k_172), 0, 0, 1, 0},
-  {&__pyx_kp_s_173, __pyx_k_173, sizeof(__pyx_k_173), 0, 0, 1, 0},
-  {&__pyx_n_s_176, __pyx_k_176, sizeof(__pyx_k_176), 0, 0, 1, 1},
-  {&__pyx_n_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 1},
-  {&__pyx_n_s_180, __pyx_k_180, sizeof(__pyx_k_180), 0, 0, 1, 1},
-  {&__pyx_n_s_183, __pyx_k_183, sizeof(__pyx_k_183), 0, 0, 1, 1},
-  {&__pyx_n_s_186, __pyx_k_186, sizeof(__pyx_k_186), 0, 0, 1, 1},
-  {&__pyx_n_s_189, __pyx_k_189, sizeof(__pyx_k_189), 0, 0, 1, 1},
-  {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
-  {&__pyx_n_s_192, __pyx_k_192, sizeof(__pyx_k_192), 0, 0, 1, 1},
-  {&__pyx_n_s_195, __pyx_k_195, sizeof(__pyx_k_195), 0, 0, 1, 1},
-  {&__pyx_n_s_198, __pyx_k_198, sizeof(__pyx_k_198), 0, 0, 1, 1},
-  {&__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_201, __pyx_k_201, sizeof(__pyx_k_201), 0, 0, 1, 1},
-  {&__pyx_n_s_204, __pyx_k_204, sizeof(__pyx_k_204), 0, 0, 1, 1},
-  {&__pyx_n_s_207, __pyx_k_207, sizeof(__pyx_k_207), 0, 0, 1, 1},
-  {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
-  {&__pyx_n_s_210, __pyx_k_210, sizeof(__pyx_k_210), 0, 0, 1, 1},
-  {&__pyx_n_s_213, __pyx_k_213, sizeof(__pyx_k_213), 0, 0, 1, 1},
-  {&__pyx_n_s_216, __pyx_k_216, sizeof(__pyx_k_216), 0, 0, 1, 1},
-  {&__pyx_n_s_219, __pyx_k_219, sizeof(__pyx_k_219), 0, 0, 1, 1},
-  {&__pyx_n_s_222, __pyx_k_222, sizeof(__pyx_k_222), 0, 0, 1, 1},
-  {&__pyx_n_s_225, __pyx_k_225, sizeof(__pyx_k_225), 0, 0, 1, 1},
-  {&__pyx_n_s_228, __pyx_k_228, sizeof(__pyx_k_228), 0, 0, 1, 1},
-  {&__pyx_n_s_231, __pyx_k_231, sizeof(__pyx_k_231), 0, 0, 1, 1},
-  {&__pyx_n_s_234, __pyx_k_234, sizeof(__pyx_k_234), 0, 0, 1, 1},
-  {&__pyx_n_s_237, __pyx_k_237, sizeof(__pyx_k_237), 0, 0, 1, 1},
-  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
-  {&__pyx_n_s_240, __pyx_k_240, sizeof(__pyx_k_240), 0, 0, 1, 1},
-  {&__pyx_n_s_243, __pyx_k_243, sizeof(__pyx_k_243), 0, 0, 1, 1},
-  {&__pyx_n_s_246, __pyx_k_246, sizeof(__pyx_k_246), 0, 0, 1, 1},
-  {&__pyx_n_s_249, __pyx_k_249, sizeof(__pyx_k_249), 0, 0, 1, 1},
-  {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
-  {&__pyx_n_s_252, __pyx_k_252, sizeof(__pyx_k_252), 0, 0, 1, 1},
-  {&__pyx_n_s_255, __pyx_k_255, sizeof(__pyx_k_255), 0, 0, 1, 1},
-  {&__pyx_n_s_258, __pyx_k_258, sizeof(__pyx_k_258), 0, 0, 1, 1},
-  {&__pyx_n_s_261, __pyx_k_261, sizeof(__pyx_k_261), 0, 0, 1, 1},
-  {&__pyx_n_s_264, __pyx_k_264, sizeof(__pyx_k_264), 0, 0, 1, 1},
-  {&__pyx_n_s_267, __pyx_k_267, sizeof(__pyx_k_267), 0, 0, 1, 1},
-  {&__pyx_n_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 1},
-  {&__pyx_n_s_270, __pyx_k_270, sizeof(__pyx_k_270), 0, 0, 1, 1},
-  {&__pyx_n_s_273, __pyx_k_273, sizeof(__pyx_k_273), 0, 0, 1, 1},
-  {&__pyx_n_s_276, __pyx_k_276, sizeof(__pyx_k_276), 0, 0, 1, 1},
-  {&__pyx_n_s_279, __pyx_k_279, sizeof(__pyx_k_279), 0, 0, 1, 1},
-  {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
-  {&__pyx_n_s_282, __pyx_k_282, sizeof(__pyx_k_282), 0, 0, 1, 1},
-  {&__pyx_n_s_285, __pyx_k_285, sizeof(__pyx_k_285), 0, 0, 1, 1},
-  {&__pyx_n_s_288, __pyx_k_288, sizeof(__pyx_k_288), 0, 0, 1, 1},
-  {&__pyx_n_s_291, __pyx_k_291, sizeof(__pyx_k_291), 0, 0, 1, 1},
-  {&__pyx_n_s_294, __pyx_k_294, sizeof(__pyx_k_294), 0, 0, 1, 1},
-  {&__pyx_n_s_298, __pyx_k_298, sizeof(__pyx_k_298), 0, 0, 1, 1},
-  {&__pyx_n_s_301, __pyx_k_301, sizeof(__pyx_k_301), 0, 0, 1, 1},
-  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
-  {&__pyx_n_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 1},
-  {&__pyx_n_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 1},
-  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
-  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
-  {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
-  {&__pyx_kp_s_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_n_s_50, __pyx_k_50, sizeof(__pyx_k_50), 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_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_n_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 1},
-  {&__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_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
-  {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0},
-  {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0},
-  {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0},
-  {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
-  {&__pyx_kp_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 0},
-  {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 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_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0},
-  {&__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_n_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 1},
-  {&__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_88, __pyx_k_88, sizeof(__pyx_k_88), 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_n_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 1},
-  {&__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_n_s_96, __pyx_k_96, sizeof(__pyx_k_96), 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__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1},
-  {&__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},
-  {&__pyx_n_s__BAD_GENOTYPE, __pyx_k__BAD_GENOTYPE, sizeof(__pyx_k__BAD_GENOTYPE), 0, 0, 1, 1},
-  {&__pyx_n_s__CHROM, __pyx_k__CHROM, sizeof(__pyx_k__CHROM), 0, 0, 1, 1},
-  {&__pyx_n_s__Character, __pyx_k__Character, sizeof(__pyx_k__Character), 0, 0, 1, 1},
-  {&__pyx_n_s__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 1, 1},
-  {&__pyx_n_s__DP, __pyx_k__DP, sizeof(__pyx_k__DP), 0, 0, 1, 1},
-  {&__pyx_n_s__Description, __pyx_k__Description, sizeof(__pyx_k__Description), 0, 0, 1, 1},
-  {&__pyx_n_s__EC, __pyx_k__EC, sizeof(__pyx_k__EC), 0, 0, 1, 1},
-  {&__pyx_n_s__ERROR_INFO_STRING, __pyx_k__ERROR_INFO_STRING, sizeof(__pyx_k__ERROR_INFO_STRING), 0, 0, 1, 1},
-  {&__pyx_n_s__ERROR_TRAILING_DATA, __pyx_k__ERROR_TRAILING_DATA, sizeof(__pyx_k__ERROR_TRAILING_DATA), 0, 0, 1, 1},
-  {&__pyx_n_s__ERROR_UNKNOWN_KEY, __pyx_k__ERROR_UNKNOWN_KEY, sizeof(__pyx_k__ERROR_UNKNOWN_KEY), 0, 0, 1, 1},
-  {&__pyx_n_s__Error, __pyx_k__Error, sizeof(__pyx_k__Error), 0, 0, 1, 1},
-  {&__pyx_n_s__FILTER, __pyx_k__FILTER, sizeof(__pyx_k__FILTER), 0, 0, 1, 1},
-  {&__pyx_n_s__FILTER_NOT_DEFINED, __pyx_k__FILTER_NOT_DEFINED, sizeof(__pyx_k__FILTER_NOT_DEFINED), 0, 0, 1, 1},
-  {&__pyx_n_s__FORMAT, __pyx_k__FORMAT, sizeof(__pyx_k__FORMAT), 0, 0, 1, 1},
-  {&__pyx_n_s__FORMAT_NOT_DEFINED, __pyx_k__FORMAT_NOT_DEFINED, sizeof(__pyx_k__FORMAT_NOT_DEFINED), 0, 0, 1, 1},
-  {&__pyx_n_s__FT, __pyx_k__FT, sizeof(__pyx_k__FT), 0, 0, 1, 1},
-  {&__pyx_n_s__Flag, __pyx_k__Flag, sizeof(__pyx_k__Flag), 0, 0, 1, 1},
-  {&__pyx_n_s__Float, __pyx_k__Float, sizeof(__pyx_k__Float), 0, 0, 1, 1},
-  {&__pyx_n_s__G, __pyx_k__G, sizeof(__pyx_k__G), 0, 0, 1, 1},
-  {&__pyx_n_s__GL, __pyx_k__GL, sizeof(__pyx_k__GL), 0, 0, 1, 1},
-  {&__pyx_n_s__GLE, __pyx_k__GLE, sizeof(__pyx_k__GLE), 0, 0, 1, 1},
-  {&__pyx_n_s__GP, __pyx_k__GP, sizeof(__pyx_k__GP), 0, 0, 1, 1},
-  {&__pyx_n_s__GQ, __pyx_k__GQ, sizeof(__pyx_k__GQ), 0, 0, 1, 1},
-  {&__pyx_n_s__GT, __pyx_k__GT, sizeof(__pyx_k__GT), 0, 0, 1, 1},
-  {&__pyx_n_s__GTdata, __pyx_k__GTdata, sizeof(__pyx_k__GTdata), 0, 0, 1, 1},
-  {&__pyx_n_s__GTstring, __pyx_k__GTstring, sizeof(__pyx_k__GTstring), 0, 0, 1, 1},
-  {&__pyx_n_s__Genotype, __pyx_k__Genotype, sizeof(__pyx_k__Genotype), 0, 0, 1, 1},
-  {&__pyx_n_s__HQ, __pyx_k__HQ, sizeof(__pyx_k__HQ), 0, 0, 1, 1},
-  {&__pyx_n_s__I, __pyx_k__I, sizeof(__pyx_k__I), 0, 0, 1, 1},
-  {&__pyx_n_s__ID, __pyx_k__ID, sizeof(__pyx_k__ID), 0, 0, 1, 1},
-  {&__pyx_n_s__INFO, __pyx_k__INFO, sizeof(__pyx_k__INFO), 0, 0, 1, 1},
-  {&__pyx_n_s__Integer, __pyx_k__Integer, sizeof(__pyx_k__Integer), 0, 0, 1, 1},
-  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
-  {&__pyx_n_s__MISSING_REF, __pyx_k__MISSING_REF, sizeof(__pyx_k__MISSING_REF), 0, 0, 1, 1},
-  {&__pyx_n_s__MQ, __pyx_k__MQ, sizeof(__pyx_k__MQ), 0, 0, 1, 1},
-  {&__pyx_n_s__N, __pyx_k__N, sizeof(__pyx_k__N), 0, 0, 1, 1},
-  {&__pyx_n_s__NT_ALLELES, __pyx_k__NT_ALLELES, sizeof(__pyx_k__NT_ALLELES), 0, 0, 1, 1},
-  {&__pyx_n_s__NT_GENOTYPES, __pyx_k__NT_GENOTYPES, sizeof(__pyx_k__NT_GENOTYPES), 0, 0, 1, 1},
-  {&__pyx_n_s__NT_NR_ALLELES, __pyx_k__NT_NR_ALLELES, sizeof(__pyx_k__NT_NR_ALLELES), 0, 0, 1, 1},
-  {&__pyx_n_s__NT_NUMBER, __pyx_k__NT_NUMBER, sizeof(__pyx_k__NT_NUMBER), 0, 0, 1, 1},
-  {&__pyx_n_s__NT_PHASED_GENOTYPES, __pyx_k__NT_PHASED_GENOTYPES, sizeof(__pyx_k__NT_PHASED_GENOTYPES), 0, 0, 1, 1},
-  {&__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__PL, __pyx_k__PL, sizeof(__pyx_k__PL), 0, 0, 1, 1},
-  {&__pyx_n_s__POS, __pyx_k__POS, sizeof(__pyx_k__POS), 0, 0, 1, 1},
-  {&__pyx_n_s__POS_NOT_NUMERICAL, __pyx_k__POS_NOT_NUMERICAL, sizeof(__pyx_k__POS_NOT_NUMERICAL), 0, 0, 1, 1},
-  {&__pyx_n_s__POS_NOT_POSITIVE, __pyx_k__POS_NOT_POSITIVE, sizeof(__pyx_k__POS_NOT_POSITIVE), 0, 0, 1, 1},
-  {&__pyx_n_s__PQ, __pyx_k__PQ, sizeof(__pyx_k__PQ), 0, 0, 1, 1},
-  {&__pyx_n_s__PS, __pyx_k__PS, sizeof(__pyx_k__PS), 0, 0, 1, 1},
-  {&__pyx_n_s__QUAL, __pyx_k__QUAL, sizeof(__pyx_k__QUAL), 0, 0, 1, 1},
-  {&__pyx_n_s__QUAL_NOT_NUMERICAL, __pyx_k__QUAL_NOT_NUMERICAL, sizeof(__pyx_k__QUAL_NOT_NUMERICAL), 0, 0, 1, 1},
-  {&__pyx_n_s__REF, __pyx_k__REF, sizeof(__pyx_k__REF), 0, 0, 1, 1},
-  {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
-  {&__pyx_n_s__String, __pyx_k__String, sizeof(__pyx_k__String), 0, 0, 1, 1},
-  {&__pyx_n_s__Tabixfile, __pyx_k__Tabixfile, sizeof(__pyx_k__Tabixfile), 0, 0, 1, 1},
-  {&__pyx_n_s__Type, __pyx_k__Type, sizeof(__pyx_k__Type), 0, 0, 1, 1},
-  {&__pyx_n_s__UNKNOWN_CHAR_IN_REF, __pyx_k__UNKNOWN_CHAR_IN_REF, sizeof(__pyx_k__UNKNOWN_CHAR_IN_REF), 0, 0, 1, 1},
-  {&__pyx_n_s__V33_BAD_ALLELE, __pyx_k__V33_BAD_ALLELE, sizeof(__pyx_k__V33_BAD_ALLELE), 0, 0, 1, 1},
-  {&__pyx_n_s__V33_BAD_REF, __pyx_k__V33_BAD_REF, sizeof(__pyx_k__V33_BAD_REF), 0, 0, 1, 1},
-  {&__pyx_n_s__V40_BAD_ALLELE, __pyx_k__V40_BAD_ALLELE, sizeof(__pyx_k__V40_BAD_ALLELE), 0, 0, 1, 1},
-  {&__pyx_n_s__VCF, __pyx_k__VCF, sizeof(__pyx_k__VCF), 0, 0, 1, 1},
-  {&__pyx_n_s__VCFRecord, __pyx_k__VCFRecord, sizeof(__pyx_k__VCFRecord), 0, 0, 1, 1},
-  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
-  {&__pyx_n_s__WRONG_REF, __pyx_k__WRONG_REF, sizeof(__pyx_k__WRONG_REF), 0, 0, 1, 1},
-  {&__pyx_n_s__Warning, __pyx_k__Warning, sizeof(__pyx_k__Warning), 0, 0, 1, 1},
-  {&__pyx_n_s__ZERO_LENGTH_ALLELE, __pyx_k__ZERO_LENGTH_ALLELE, sizeof(__pyx_k__ZERO_LENGTH_ALLELE), 0, 0, 1, 1},
-  {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1},
-  {&__pyx_n_s____dict__, __pyx_k____dict__, sizeof(__pyx_k____dict__), 0, 0, 1, 1},
-  {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
-  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
-  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
-  {&__pyx_n_s___add_definition, __pyx_k___add_definition, sizeof(__pyx_k___add_definition), 0, 0, 1, 1},
-  {&__pyx_n_s___copy, __pyx_k___copy, sizeof(__pyx_k___copy), 0, 0, 1, 1},
-  {&__pyx_n_s___errors, __pyx_k___errors, sizeof(__pyx_k___errors), 0, 0, 1, 1},
-  {&__pyx_n_s___filter, __pyx_k___filter, sizeof(__pyx_k___filter), 0, 0, 1, 1},
-  {&__pyx_n_s___format, __pyx_k___format, sizeof(__pyx_k___format), 0, 0, 1, 1},
-  {&__pyx_n_s___header, __pyx_k___header, sizeof(__pyx_k___header), 0, 0, 1, 1},
-  {&__pyx_n_s___ignored_errors, __pyx_k___ignored_errors, sizeof(__pyx_k___ignored_errors), 0, 0, 1, 1},
-  {&__pyx_n_s___info, __pyx_k___info, sizeof(__pyx_k___info), 0, 0, 1, 1},
-  {&__pyx_n_s___leftalign, __pyx_k___leftalign, sizeof(__pyx_k___leftalign), 0, 0, 1, 1},
-  {&__pyx_n_s___line, __pyx_k___line, sizeof(__pyx_k___line), 0, 0, 1, 1},
-  {&__pyx_n_s___lineno, __pyx_k___lineno, sizeof(__pyx_k___lineno), 0, 0, 1, 1},
-  {&__pyx_n_s___lines, __pyx_k___lines, sizeof(__pyx_k___lines), 0, 0, 1, 1},
-  {&__pyx_n_s___parse, __pyx_k___parse, sizeof(__pyx_k___parse), 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___reference, __pyx_k___reference, sizeof(__pyx_k___reference), 0, 0, 1, 1},
-  {&__pyx_n_s___regions, __pyx_k___regions, sizeof(__pyx_k___regions), 0, 0, 1, 1},
-  {&__pyx_n_s___required, __pyx_k___required, sizeof(__pyx_k___required), 0, 0, 1, 1},
-  {&__pyx_n_s___sample2column, __pyx_k___sample2column, sizeof(__pyx_k___sample2column), 0, 0, 1, 1},
-  {&__pyx_n_s___samples, __pyx_k___samples, sizeof(__pyx_k___samples), 0, 0, 1, 1},
-  {&__pyx_n_s___version, __pyx_k___version, sizeof(__pyx_k___version), 0, 0, 1, 1},
-  {&__pyx_n_s___warn_errors, __pyx_k___warn_errors, sizeof(__pyx_k___warn_errors), 0, 0, 1, 1},
-  {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
-  {&__pyx_n_s__add, __pyx_k__add, sizeof(__pyx_k__add), 0, 0, 1, 1},
-  {&__pyx_n_s__addn, __pyx_k__addn, sizeof(__pyx_k__addn), 0, 0, 1, 1},
-  {&__pyx_n_s__addns, __pyx_k__addns, sizeof(__pyx_k__addns), 0, 0, 1, 1},
-  {&__pyx_n_s__allele, __pyx_k__allele, sizeof(__pyx_k__allele), 0, 0, 1, 1},
-  {&__pyx_n_s__alleleRegEx, __pyx_k__alleleRegEx, sizeof(__pyx_k__alleleRegEx), 0, 0, 1, 1},
-  {&__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__bisect, __pyx_k__bisect, sizeof(__pyx_k__bisect), 0, 0, 1, 1},
-  {&__pyx_n_s__blurp, __pyx_k__blurp, sizeof(__pyx_k__blurp), 0, 0, 1, 1},
-  {&__pyx_n_s__buffer, __pyx_k__buffer, sizeof(__pyx_k__buffer), 0, 0, 1, 1},
-  {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
-  {&__pyx_n_s__chrom, __pyx_k__chrom, sizeof(__pyx_k__chrom), 0, 0, 1, 1},
-  {&__pyx_n_s__collections, __pyx_k__collections, sizeof(__pyx_k__collections), 0, 0, 1, 1},
-  {&__pyx_n_s__cols, __pyx_k__cols, sizeof(__pyx_k__cols), 0, 0, 1, 1},
-  {&__pyx_n_s__compare_calls, __pyx_k__compare_calls, sizeof(__pyx_k__compare_calls), 0, 0, 1, 1},
-  {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1},
-  {&__pyx_n_s__connect, __pyx_k__connect, sizeof(__pyx_k__connect), 0, 0, 1, 1},
-  {&__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__d, __pyx_k__d, sizeof(__pyx_k__d), 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},
-  {&__pyx_n_s__defaultdict, __pyx_k__defaultdict, sizeof(__pyx_k__defaultdict), 0, 0, 1, 1},
-  {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1},
-  {&__pyx_n_s__description, __pyx_k__description, sizeof(__pyx_k__description), 0, 0, 1, 1},
-  {&__pyx_n_s__dict, __pyx_k__dict, sizeof(__pyx_k__dict), 0, 0, 1, 1},
-  {&__pyx_n_s__elts, __pyx_k__elts, sizeof(__pyx_k__elts), 0, 0, 1, 1},
-  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
-  {&__pyx_n_s__endswith, __pyx_k__endswith, sizeof(__pyx_k__endswith), 0, 0, 1, 1},
-  {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
-  {&__pyx_n_s__err, __pyx_k__err, sizeof(__pyx_k__err), 0, 0, 1, 1},
-  {&__pyx_n_s__error, __pyx_k__error, sizeof(__pyx_k__error), 0, 0, 1, 1},
-  {&__pyx_n_s__errorlabel, __pyx_k__errorlabel, sizeof(__pyx_k__errorlabel), 0, 0, 1, 1},
-  {&__pyx_n_s__errorstring, __pyx_k__errorstring, sizeof(__pyx_k__errorstring), 0, 0, 1, 1},
-  {&__pyx_n_s__errwarn, __pyx_k__errwarn, sizeof(__pyx_k__errwarn), 0, 0, 1, 1},
-  {&__pyx_n_s__expected, __pyx_k__expected, sizeof(__pyx_k__expected), 0, 0, 1, 1},
-  {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
-  {&__pyx_n_s__fa, __pyx_k__fa, sizeof(__pyx_k__fa), 0, 0, 1, 1},
-  {&__pyx_n_s__faref, __pyx_k__faref, sizeof(__pyx_k__faref), 0, 0, 1, 1},
-  {&__pyx_n_s__faref_leftflank, __pyx_k__faref_leftflank, sizeof(__pyx_k__faref_leftflank), 0, 0, 1, 1},
-  {&__pyx_n_s__fetch, __pyx_k__fetch, sizeof(__pyx_k__fetch), 0, 0, 1, 1},
-  {&__pyx_n_s__fileformat, __pyx_k__fileformat, sizeof(__pyx_k__fileformat), 0, 0, 1, 1},
-  {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
-  {&__pyx_n_s__filter, __pyx_k__filter, sizeof(__pyx_k__filter), 0, 0, 1, 1},
-  {&__pyx_n_s__find, __pyx_k__find, sizeof(__pyx_k__find), 0, 0, 1, 1},
-  {&__pyx_n_s__first, __pyx_k__first, sizeof(__pyx_k__first), 0, 0, 1, 1},
-  {&__pyx_n_s__fmt, __pyx_k__fmt, sizeof(__pyx_k__fmt), 0, 0, 1, 1},
-  {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
-  {&__pyx_n_s__format_format, __pyx_k__format_format, sizeof(__pyx_k__format_format), 0, 0, 1, 1},
-  {&__pyx_n_s__format_formatdata, __pyx_k__format_formatdata, sizeof(__pyx_k__format_formatdata), 0, 0, 1, 1},
-  {&__pyx_n_s__formatdict, __pyx_k__formatdict, sizeof(__pyx_k__formatdict), 0, 0, 1, 1},
-  {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1},
-  {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1},
-  {&__pyx_n_s__get_expected, __pyx_k__get_expected, sizeof(__pyx_k__get_expected), 0, 0, 1, 1},
-  {&__pyx_n_s__get_sequence, __pyx_k__get_sequence, sizeof(__pyx_k__get_sequence), 0, 0, 1, 1},
-  {&__pyx_n_s__getfilter, __pyx_k__getfilter, sizeof(__pyx_k__getfilter), 0, 0, 1, 1},
-  {&__pyx_n_s__getformat, __pyx_k__getformat, sizeof(__pyx_k__getformat), 0, 0, 1, 1},
-  {&__pyx_n_s__getheader, __pyx_k__getheader, sizeof(__pyx_k__getheader), 0, 0, 1, 1},
-  {&__pyx_n_s__getinfo, __pyx_k__getinfo, sizeof(__pyx_k__getinfo), 0, 0, 1, 1},
-  {&__pyx_n_s__getsamples, __pyx_k__getsamples, sizeof(__pyx_k__getsamples), 0, 0, 1, 1},
-  {&__pyx_n_s__gts, __pyx_k__gts, sizeof(__pyx_k__gts), 0, 0, 1, 1},
-  {&__pyx_n_s__gtsRegEx, __pyx_k__gtsRegEx, sizeof(__pyx_k__gtsRegEx), 0, 0, 1, 1},
-  {&__pyx_n_s__have_deletions, __pyx_k__have_deletions, sizeof(__pyx_k__have_deletions), 0, 0, 1, 1},
-  {&__pyx_n_s__header, __pyx_k__header, sizeof(__pyx_k__header), 0, 0, 1, 1},
-  {&__pyx_n_s__headings, __pyx_k__headings, sizeof(__pyx_k__headings), 0, 0, 1, 1},
-  {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
-  {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
-  {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1},
-  {&__pyx_n_s__ielts, __pyx_k__ielts, sizeof(__pyx_k__ielts), 0, 0, 1, 1},
-  {&__pyx_n_s__ignoreerror, __pyx_k__ignoreerror, sizeof(__pyx_k__ignoreerror), 0, 0, 1, 1},
-  {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1},
-  {&__pyx_n_s__inregion, __pyx_k__inregion, sizeof(__pyx_k__inregion), 0, 0, 1, 1},
-  {&__pyx_n_s__itemgetter, __pyx_k__itemgetter, sizeof(__pyx_k__itemgetter), 0, 0, 1, 1},
-  {&__pyx_n_s__itervalues, __pyx_k__itervalues, sizeof(__pyx_k__itervalues), 0, 0, 1, 1},
-  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
-  {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
-  {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1},
-  {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1},
-  {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1},
-  {&__pyx_n_s__label, __pyx_k__label, sizeof(__pyx_k__label), 0, 0, 1, 1},
-  {&__pyx_n_s__last, __pyx_k__last, sizeof(__pyx_k__last), 0, 0, 1, 1},
-  {&__pyx_n_s__last_line, __pyx_k__last_line, sizeof(__pyx_k__last_line), 0, 0, 1, 1},
-  {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1},
-  {&__pyx_n_s__leftalign, __pyx_k__leftalign, sizeof(__pyx_k__leftalign), 0, 0, 1, 1},
-  {&__pyx_n_s__len, __pyx_k__len, sizeof(__pyx_k__len), 0, 0, 1, 1},
-  {&__pyx_n_s__line, __pyx_k__line, sizeof(__pyx_k__line), 0, 0, 1, 1},
-  {&__pyx_n_s__lineparse, __pyx_k__lineparse, sizeof(__pyx_k__lineparse), 0, 0, 1, 1},
-  {&__pyx_n_s__lines, __pyx_k__lines, sizeof(__pyx_k__lines), 0, 0, 1, 1},
-  {&__pyx_n_s__longest, __pyx_k__longest, sizeof(__pyx_k__longest), 0, 0, 1, 1},
-  {&__pyx_n_s__map, __pyx_k__map, sizeof(__pyx_k__map), 0, 0, 1, 1},
-  {&__pyx_n_s__match, __pyx_k__match, sizeof(__pyx_k__match), 0, 0, 1, 1},
-  {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1},
-  {&__pyx_n_s__missing, __pyx_k__missing, sizeof(__pyx_k__missing), 0, 0, 1, 1},
-  {&__pyx_n_s__missingvalue, __pyx_k__missingvalue, sizeof(__pyx_k__missingvalue), 0, 0, 1, 1},
-  {&__pyx_n_s__movable, __pyx_k__movable, sizeof(__pyx_k__movable), 0, 0, 1, 1},
-  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
-  {&__pyx_n_s__na, __pyx_k__na, sizeof(__pyx_k__na), 0, 0, 1, 1},
-  {&__pyx_n_s__namedtuple, __pyx_k__namedtuple, sizeof(__pyx_k__namedtuple), 0, 0, 1, 1},
-  {&__pyx_n_s__newalts, __pyx_k__newalts, sizeof(__pyx_k__newalts), 0, 0, 1, 1},
-  {&__pyx_n_s__nmb, __pyx_k__nmb, sizeof(__pyx_k__nmb), 0, 0, 1, 1},
-  {&__pyx_n_s__number, __pyx_k__number, sizeof(__pyx_k__number), 0, 0, 1, 1},
-  {&__pyx_n_s__numbertype, __pyx_k__numbertype, sizeof(__pyx_k__numbertype), 0, 0, 1, 1},
-  {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
-  {&__pyx_n_s__operator, __pyx_k__operator, sizeof(__pyx_k__operator), 0, 0, 1, 1},
-  {&__pyx_n_s__opt, __pyx_k__opt, sizeof(__pyx_k__opt), 0, 0, 1, 1},
-  {&__pyx_n_s__output, __pyx_k__output, sizeof(__pyx_k__output), 0, 0, 1, 1},
-  {&__pyx_n_s__parse, __pyx_k__parse, sizeof(__pyx_k__parse), 0, 0, 1, 1},
-  {&__pyx_n_s__parse_data, __pyx_k__parse_data, sizeof(__pyx_k__parse_data), 0, 0, 1, 1},
-  {&__pyx_n_s__parse_format, __pyx_k__parse_format, sizeof(__pyx_k__parse_format), 0, 0, 1, 1},
-  {&__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},
-  {&__pyx_n_s__pos2, __pyx_k__pos2, sizeof(__pyx_k__pos2), 0, 0, 1, 1},
-  {&__pyx_n_s__pysam, __pyx_k__pysam, sizeof(__pyx_k__pysam), 0, 0, 1, 1},
-  {&__pyx_n_s__qual, __pyx_k__qual, sizeof(__pyx_k__qual), 0, 0, 1, 1},
-  {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1},
-  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
-  {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1},
-  {&__pyx_n_s__record, __pyx_k__record, sizeof(__pyx_k__record), 0, 0, 1, 1},
-  {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1},
-  {&__pyx_n_s__ref1, __pyx_k__ref1, sizeof(__pyx_k__ref1), 0, 0, 1, 1},
-  {&__pyx_n_s__ref2, __pyx_k__ref2, sizeof(__pyx_k__ref2), 0, 0, 1, 1},
-  {&__pyx_n_s__reference, __pyx_k__reference, sizeof(__pyx_k__reference), 0, 0, 1, 1},
-  {&__pyx_n_s__region, __pyx_k__region, sizeof(__pyx_k__region), 0, 0, 1, 1},
-  {&__pyx_n_s__regions, __pyx_k__regions, sizeof(__pyx_k__regions), 0, 0, 1, 1},
-  {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1},
-  {&__pyx_n_s__required, __pyx_k__required, sizeof(__pyx_k__required), 0, 0, 1, 1},
-  {&__pyx_n_s__rest, __pyx_k__rest, sizeof(__pyx_k__rest), 0, 0, 1, 1},
-  {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1},
-  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
-  {&__pyx_n_s__sample, __pyx_k__sample, sizeof(__pyx_k__sample), 0, 0, 1, 1},
-  {&__pyx_n_s__samples, __pyx_k__samples, sizeof(__pyx_k__samples), 0, 0, 1, 1},
-  {&__pyx_n_s__sdata, __pyx_k__sdata, sizeof(__pyx_k__sdata), 0, 0, 1, 1},
-  {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
-  {&__pyx_n_s__separator, __pyx_k__separator, sizeof(__pyx_k__separator), 0, 0, 1, 1},
-  {&__pyx_n_s__sequence, __pyx_k__sequence, sizeof(__pyx_k__sequence), 0, 0, 1, 1},
-  {&__pyx_n_s__setfilter, __pyx_k__setfilter, sizeof(__pyx_k__setfilter), 0, 0, 1, 1},
-  {&__pyx_n_s__setformat, __pyx_k__setformat, sizeof(__pyx_k__setformat), 0, 0, 1, 1},
-  {&__pyx_n_s__setheader, __pyx_k__setheader, sizeof(__pyx_k__setheader), 0, 0, 1, 1},
-  {&__pyx_n_s__setinfo, __pyx_k__setinfo, sizeof(__pyx_k__setinfo), 0, 0, 1, 1},
-  {&__pyx_n_s__setreference, __pyx_k__setreference, sizeof(__pyx_k__setreference), 0, 0, 1, 1},
-  {&__pyx_n_s__setregions, __pyx_k__setregions, sizeof(__pyx_k__setregions), 0, 0, 1, 1},
-  {&__pyx_n_s__setsamples, __pyx_k__setsamples, sizeof(__pyx_k__setsamples), 0, 0, 1, 1},
-  {&__pyx_n_s__setversion, __pyx_k__setversion, sizeof(__pyx_k__setversion), 0, 0, 1, 1},
-  {&__pyx_n_s__shortest, __pyx_k__shortest, sizeof(__pyx_k__shortest), 0, 0, 1, 1},
-  {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
-  {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
-  {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1},
-  {&__pyx_n_s__stream, __pyx_k__stream, sizeof(__pyx_k__stream), 0, 0, 1, 1},
-  {&__pyx_n_s__string, __pyx_k__string, sizeof(__pyx_k__string), 0, 0, 1, 1},
-  {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1},
-  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
-  {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1},
-  {&__pyx_n_s__tabixfile, __pyx_k__tabixfile, sizeof(__pyx_k__tabixfile), 0, 0, 1, 1},
-  {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1},
-  {&__pyx_n_s__upper, __pyx_k__upper, sizeof(__pyx_k__upper), 0, 0, 1, 1},
-  {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
-  {&__pyx_n_s__validate, __pyx_k__validate, sizeof(__pyx_k__validate), 0, 0, 1, 1},
-  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
-  {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1},
-  {&__pyx_n_s__var, __pyx_k__var, sizeof(__pyx_k__var), 0, 0, 1, 1},
-  {&__pyx_n_s__vcf, __pyx_k__vcf, sizeof(__pyx_k__vcf), 0, 0, 1, 1},
-  {&__pyx_n_s__vcffile, __pyx_k__vcffile, sizeof(__pyx_k__vcffile), 0, 0, 1, 1},
-  {&__pyx_n_s__version, __pyx_k__version, sizeof(__pyx_k__version), 0, 0, 1, 1},
-  {&__pyx_n_s__warnerror, __pyx_k__warnerror, sizeof(__pyx_k__warnerror), 0, 0, 1, 1},
-  {&__pyx_n_s__write, __pyx_k__write, sizeof(__pyx_k__write), 0, 0, 1, 1},
-  {&__pyx_n_s__write_data, __pyx_k__write_data, sizeof(__pyx_k__write_data), 0, 0, 1, 1},
-  {&__pyx_n_s__write_header, __pyx_k__write_header, sizeof(__pyx_k__write_header), 0, 0, 1, 1},
-  {&__pyx_n_s__write_heading, __pyx_k__write_heading, sizeof(__pyx_k__write_heading), 0, 0, 1, 1},
-  {&__pyx_n_s__writeheader, __pyx_k__writeheader, sizeof(__pyx_k__writeheader), 0, 0, 1, 1},
-  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
-  {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
-  {&__pyx_n_s__zip, __pyx_k__zip, sizeof(__pyx_k__zip), 0, 0, 1, 1},
+  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
+  {&__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_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
+  {&__pyx_n_s_ACGTN, __pyx_k_ACGTN, sizeof(__pyx_k_ACGTN), 0, 0, 1, 1},
+  {&__pyx_kp_s_ACGTN_2, __pyx_k_ACGTN_2, sizeof(__pyx_k_ACGTN_2), 0, 0, 1, 0},
+  {&__pyx_n_s_ALT, __pyx_k_ALT, sizeof(__pyx_k_ALT), 0, 0, 1, 1},
+  {&__pyx_n_s_BADLY_FORMATTED_FORMAT_STRING, __pyx_k_BADLY_FORMATTED_FORMAT_STRING, sizeof(__pyx_k_BADLY_FORMATTED_FORMAT_STRING), 0, 0, 1, 1},
+  {&__pyx_kp_s_BADLY_FORMATTED_FORMAT_STRING_Fo, __pyx_k_BADLY_FORMATTED_FORMAT_STRING_Fo, sizeof(__pyx_k_BADLY_FORMATTED_FORMAT_STRING_Fo), 0, 0, 1, 0},
+  {&__pyx_n_s_BADLY_FORMATTED_HEADING, __pyx_k_BADLY_FORMATTED_HEADING, sizeof(__pyx_k_BADLY_FORMATTED_HEADING), 0, 0, 1, 1},
+  {&__pyx_kp_s_BADLY_FORMATTED_HEADING_Did_not, __pyx_k_BADLY_FORMATTED_HEADING_Did_not, sizeof(__pyx_k_BADLY_FORMATTED_HEADING_Did_not), 0, 0, 1, 0},
+  {&__pyx_kp_s_BAD_CHR_TAG_Error_calculating_ch, __pyx_k_BAD_CHR_TAG_Error_calculating_ch, sizeof(__pyx_k_BAD_CHR_TAG_Error_calculating_ch), 0, 0, 1, 0},
+  {&__pyx_n_s_BAD_GENOTYPE, __pyx_k_BAD_GENOTYPE, sizeof(__pyx_k_BAD_GENOTYPE), 0, 0, 1, 1},
+  {&__pyx_kp_s_BAD_GENOTYPE_Cannot_parse_genoty, __pyx_k_BAD_GENOTYPE_Cannot_parse_genoty, sizeof(__pyx_k_BAD_GENOTYPE_Cannot_parse_genoty), 0, 0, 1, 0},
+  {&__pyx_n_s_BAD_NUMBER_OF_COLUMNS, __pyx_k_BAD_NUMBER_OF_COLUMNS, sizeof(__pyx_k_BAD_NUMBER_OF_COLUMNS), 0, 0, 1, 1},
+  {&__pyx_kp_s_BAD_NUMBER_OF_COLUMNS_Wrong_numb, __pyx_k_BAD_NUMBER_OF_COLUMNS_Wrong_numb, sizeof(__pyx_k_BAD_NUMBER_OF_COLUMNS_Wrong_numb), 0, 0, 1, 0},
+  {&__pyx_n_s_BAD_NUMBER_OF_PARAMETERS, __pyx_k_BAD_NUMBER_OF_PARAMETERS, sizeof(__pyx_k_BAD_NUMBER_OF_PARAMETERS), 0, 0, 1, 1},
+  {&__pyx_kp_s_BAD_NUMBER_OF_PARAMETERS_Found_u, __pyx_k_BAD_NUMBER_OF_PARAMETERS_Found_u, sizeof(__pyx_k_BAD_NUMBER_OF_PARAMETERS_Found_u), 0, 0, 1, 0},
+  {&__pyx_n_s_BAD_NUMBER_OF_VALUES, __pyx_k_BAD_NUMBER_OF_VALUES, sizeof(__pyx_k_BAD_NUMBER_OF_VALUES), 0, 0, 1, 1},
+  {&__pyx_kp_s_BAD_NUMBER_OF_VALUES_Found_too_m, __pyx_k_BAD_NUMBER_OF_VALUES_Found_too_m, sizeof(__pyx_k_BAD_NUMBER_OF_VALUES_Found_too_m), 0, 0, 1, 0},
+  {&__pyx_n_s_CHROM, __pyx_k_CHROM, sizeof(__pyx_k_CHROM), 0, 0, 1, 1},
+  {&__pyx_kp_s_Can_only_handle_v3_3_and_v4_0_VC, __pyx_k_Can_only_handle_v3_3_and_v4_0_VC, sizeof(__pyx_k_Can_only_handle_v3_3_and_v4_0_VC), 0, 0, 1, 0},
+  {&__pyx_n_s_Character, __pyx_k_Character, sizeof(__pyx_k_Character), 0, 0, 1, 1},
+  {&__pyx_kp_s_Conditional_genotype_quality, __pyx_k_Conditional_genotype_quality, sizeof(__pyx_k_Conditional_genotype_quality), 0, 0, 1, 0},
+  {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1},
+  {&__pyx_n_s_DP, __pyx_k_DP, sizeof(__pyx_k_DP), 0, 0, 1, 1},
+  {&__pyx_kp_s_Description, __pyx_k_Description, sizeof(__pyx_k_Description), 0, 0, 1, 0},
+  {&__pyx_n_s_Description_2, __pyx_k_Description_2, sizeof(__pyx_k_Description_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_Don_t_understand_region_string_s, __pyx_k_Don_t_understand_region_string_s, sizeof(__pyx_k_Don_t_understand_region_string_s), 0, 0, 1, 0},
+  {&__pyx_n_s_EC, __pyx_k_EC, sizeof(__pyx_k_EC), 0, 0, 1, 1},
+  {&__pyx_n_s_ERROR_FLAG_HAS_VALUE, __pyx_k_ERROR_FLAG_HAS_VALUE, sizeof(__pyx_k_ERROR_FLAG_HAS_VALUE), 0, 0, 1, 1},
+  {&__pyx_kp_s_ERROR_FLAG_HAS_VALUE_Flag_fields, __pyx_k_ERROR_FLAG_HAS_VALUE_Flag_fields, sizeof(__pyx_k_ERROR_FLAG_HAS_VALUE_Flag_fields), 0, 0, 1, 0},
+  {&__pyx_n_s_ERROR_FORMAT_NOT_CHAR, __pyx_k_ERROR_FORMAT_NOT_CHAR, sizeof(__pyx_k_ERROR_FORMAT_NOT_CHAR), 0, 0, 1, 1},
+  {&__pyx_kp_s_ERROR_FORMAT_NOT_CHAR_Eexpected, __pyx_k_ERROR_FORMAT_NOT_CHAR_Eexpected, sizeof(__pyx_k_ERROR_FORMAT_NOT_CHAR_Eexpected), 0, 0, 1, 0},
+  {&__pyx_n_s_ERROR_FORMAT_NOT_INTEGER, __pyx_k_ERROR_FORMAT_NOT_INTEGER, sizeof(__pyx_k_ERROR_FORMAT_NOT_INTEGER), 0, 0, 1, 1},
+  {&__pyx_kp_s_ERROR_FORMAT_NOT_INTEGER_Expecte, __pyx_k_ERROR_FORMAT_NOT_INTEGER_Expecte, sizeof(__pyx_k_ERROR_FORMAT_NOT_INTEGER_Expecte), 0, 0, 1, 0},
+  {&__pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL, __pyx_k_ERROR_FORMAT_NOT_NUMERICAL, sizeof(__pyx_k_ERROR_FORMAT_NOT_NUMERICAL), 0, 0, 1, 1},
+  {&__pyx_kp_s_ERROR_FORMAT_NOT_NUMERICAL_Expec, __pyx_k_ERROR_FORMAT_NOT_NUMERICAL_Expec, sizeof(__pyx_k_ERROR_FORMAT_NOT_NUMERICAL_Expec), 0, 0, 1, 0},
+  {&__pyx_n_s_ERROR_INFO_STRING, __pyx_k_ERROR_INFO_STRING, sizeof(__pyx_k_ERROR_INFO_STRING), 0, 0, 1, 1},
+  {&__pyx_kp_s_ERROR_INFO_STRING_Error_while_pa, __pyx_k_ERROR_INFO_STRING_Error_while_pa, sizeof(__pyx_k_ERROR_INFO_STRING_Error_while_pa), 0, 0, 1, 0},
+  {&__pyx_n_s_ERROR_TRAILING_DATA, __pyx_k_ERROR_TRAILING_DATA, sizeof(__pyx_k_ERROR_TRAILING_DATA), 0, 0, 1, 1},
+  {&__pyx_kp_s_ERROR_TRAILING_DATA_Numerical_fi, __pyx_k_ERROR_TRAILING_DATA_Numerical_fi, sizeof(__pyx_k_ERROR_TRAILING_DATA_Numerical_fi), 0, 0, 1, 0},
+  {&__pyx_n_s_ERROR_UNKNOWN_KEY, __pyx_k_ERROR_UNKNOWN_KEY, sizeof(__pyx_k_ERROR_UNKNOWN_KEY), 0, 0, 1, 1},
+  {&__pyx_kp_s_ERROR_UNKNOWN_KEY_Unknown_key_s, __pyx_k_ERROR_UNKNOWN_KEY_Unknown_key_s, sizeof(__pyx_k_ERROR_UNKNOWN_KEY_Unknown_key_s), 0, 0, 1, 0},
+  {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
+  {&__pyx_kp_s_Expected_alternate_allel_counts, __pyx_k_Expected_alternate_allel_counts, sizeof(__pyx_k_Expected_alternate_allel_counts), 0, 0, 1, 0},
+  {&__pyx_n_s_FILTER, __pyx_k_FILTER, sizeof(__pyx_k_FILTER), 0, 0, 1, 1},
+  {&__pyx_n_s_FILTER_NOT_DEFINED, __pyx_k_FILTER_NOT_DEFINED, sizeof(__pyx_k_FILTER_NOT_DEFINED), 0, 0, 1, 1},
+  {&__pyx_kp_s_FILTER_NOT_DEFINED_Identifier_s, __pyx_k_FILTER_NOT_DEFINED_Identifier_s, sizeof(__pyx_k_FILTER_NOT_DEFINED_Identifier_s), 0, 0, 1, 0},
+  {&__pyx_n_s_FORMAT, __pyx_k_FORMAT, sizeof(__pyx_k_FORMAT), 0, 0, 1, 1},
+  {&__pyx_n_s_FORMAT_MISSING_QUOTES, __pyx_k_FORMAT_MISSING_QUOTES, sizeof(__pyx_k_FORMAT_MISSING_QUOTES), 0, 0, 1, 1},
+  {&__pyx_kp_s_FORMAT_MISSING_QUOTES_Descriptio, __pyx_k_FORMAT_MISSING_QUOTES_Descriptio, sizeof(__pyx_k_FORMAT_MISSING_QUOTES_Descriptio), 0, 0, 1, 0},
+  {&__pyx_n_s_FORMAT_NOT_DEFINED, __pyx_k_FORMAT_NOT_DEFINED, sizeof(__pyx_k_FORMAT_NOT_DEFINED), 0, 0, 1, 1},
+  {&__pyx_kp_s_FORMAT_NOT_DEFINED_Identifier_s, __pyx_k_FORMAT_NOT_DEFINED_Identifier_s, sizeof(__pyx_k_FORMAT_NOT_DEFINED_Identifier_s), 0, 0, 1, 0},
+  {&__pyx_n_s_FT, __pyx_k_FT, sizeof(__pyx_k_FT), 0, 0, 1, 1},
+  {&__pyx_n_s_Flag, __pyx_k_Flag, sizeof(__pyx_k_Flag), 0, 0, 1, 1},
+  {&__pyx_n_s_Float, __pyx_k_Float, sizeof(__pyx_k_Float), 0, 0, 1, 1},
+  {&__pyx_n_s_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 0, 1, 1},
+  {&__pyx_n_s_GL, __pyx_k_GL, sizeof(__pyx_k_GL), 0, 0, 1, 1},
+  {&__pyx_n_s_GLE, __pyx_k_GLE, sizeof(__pyx_k_GLE), 0, 0, 1, 1},
+  {&__pyx_n_s_GP, __pyx_k_GP, sizeof(__pyx_k_GP), 0, 0, 1, 1},
+  {&__pyx_n_s_GQ, __pyx_k_GQ, sizeof(__pyx_k_GQ), 0, 0, 1, 1},
+  {&__pyx_n_s_GT, __pyx_k_GT, sizeof(__pyx_k_GT), 0, 0, 1, 1},
+  {&__pyx_n_s_GTdata, __pyx_k_GTdata, sizeof(__pyx_k_GTdata), 0, 0, 1, 1},
+  {&__pyx_n_s_GTstring, __pyx_k_GTstring, sizeof(__pyx_k_GTstring), 0, 0, 1, 1},
+  {&__pyx_n_s_Genotype, __pyx_k_Genotype, sizeof(__pyx_k_Genotype), 0, 0, 1, 1},
+  {&__pyx_kp_s_Genotype_Quality, __pyx_k_Genotype_Quality, sizeof(__pyx_k_Genotype_Quality), 0, 0, 1, 0},
+  {&__pyx_kp_s_Genotype_likelihoods, __pyx_k_Genotype_likelihoods, sizeof(__pyx_k_Genotype_likelihoods), 0, 0, 1, 0},
+  {&__pyx_kp_s_Genotype_posterior_probabilities, __pyx_k_Genotype_posterior_probabilities, sizeof(__pyx_k_Genotype_posterior_probabilities), 0, 0, 1, 0},
+  {&__pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS, __pyx_k_HEADING_NOT_SEPARATED_BY_TABS, sizeof(__pyx_k_HEADING_NOT_SEPARATED_BY_TABS), 0, 0, 1, 1},
+  {&__pyx_kp_s_HEADING_NOT_SEPARATED_BY_TABS_He, __pyx_k_HEADING_NOT_SEPARATED_BY_TABS_He, sizeof(__pyx_k_HEADING_NOT_SEPARATED_BY_TABS_He), 0, 0, 1, 0},
+  {&__pyx_n_s_HQ, __pyx_k_HQ, sizeof(__pyx_k_HQ), 0, 0, 1, 1},
+  {&__pyx_kp_s_Haplotype_Quality, __pyx_k_Haplotype_Quality, sizeof(__pyx_k_Haplotype_Quality), 0, 0, 1, 0},
+  {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1},
+  {&__pyx_kp_s_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 0, 0, 1, 0},
+  {&__pyx_n_s_ID_2, __pyx_k_ID_2, sizeof(__pyx_k_ID_2), 0, 0, 1, 1},
+  {&__pyx_n_s_INFO, __pyx_k_INFO, sizeof(__pyx_k_INFO), 0, 0, 1, 1},
+  {&__pyx_n_s_Integer, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 0, 1, 1},
+  {&__pyx_kp_s_Invalid_error_string_s, __pyx_k_Invalid_error_string_s, sizeof(__pyx_k_Invalid_error_string_s), 0, 0, 1, 0},
+  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
+  {&__pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE, __pyx_k_MISSING_INDEL_ALLELE_REF_BASE, sizeof(__pyx_k_MISSING_INDEL_ALLELE_REF_BASE), 0, 0, 1, 1},
+  {&__pyx_kp_s_MISSING_INDEL_ALLELE_REF_BASE_In, __pyx_k_MISSING_INDEL_ALLELE_REF_BASE_In, sizeof(__pyx_k_MISSING_INDEL_ALLELE_REF_BASE_In), 0, 0, 1, 0},
+  {&__pyx_n_s_MISSING_REF, __pyx_k_MISSING_REF, sizeof(__pyx_k_MISSING_REF), 0, 0, 1, 1},
+  {&__pyx_kp_s_MISSING_REF_Reference_allele_mis, __pyx_k_MISSING_REF_Reference_allele_mis, sizeof(__pyx_k_MISSING_REF_Reference_allele_mis), 0, 0, 1, 0},
+  {&__pyx_n_s_MQ, __pyx_k_MQ, sizeof(__pyx_k_MQ), 0, 0, 1, 1},
+  {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1},
+  {&__pyx_n_s_NT_ALLELES, __pyx_k_NT_ALLELES, sizeof(__pyx_k_NT_ALLELES), 0, 0, 1, 1},
+  {&__pyx_n_s_NT_GENOTYPES, __pyx_k_NT_GENOTYPES, sizeof(__pyx_k_NT_GENOTYPES), 0, 0, 1, 1},
+  {&__pyx_n_s_NT_NR_ALLELES, __pyx_k_NT_NR_ALLELES, sizeof(__pyx_k_NT_NR_ALLELES), 0, 0, 1, 1},
+  {&__pyx_n_s_NT_NUMBER, __pyx_k_NT_NUMBER, sizeof(__pyx_k_NT_NUMBER), 0, 0, 1, 1},
+  {&__pyx_n_s_NT_PHASED_GENOTYPES, __pyx_k_NT_PHASED_GENOTYPES, sizeof(__pyx_k_NT_PHASED_GENOTYPES), 0, 0, 1, 1},
+  {&__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_kp_s_Number, __pyx_k_Number, sizeof(__pyx_k_Number), 0, 0, 1, 0},
+  {&__pyx_n_s_Number_2, __pyx_k_Number_2, sizeof(__pyx_k_Number_2), 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_PL, __pyx_k_PL, sizeof(__pyx_k_PL), 0, 0, 1, 1},
+  {&__pyx_n_s_POS, __pyx_k_POS, sizeof(__pyx_k_POS), 0, 0, 1, 1},
+  {&__pyx_n_s_POS_NOT_NUMERICAL, __pyx_k_POS_NOT_NUMERICAL, sizeof(__pyx_k_POS_NOT_NUMERICAL), 0, 0, 1, 1},
+  {&__pyx_kp_s_POS_NOT_NUMERICAL_Position_colum, __pyx_k_POS_NOT_NUMERICAL_Position_colum, sizeof(__pyx_k_POS_NOT_NUMERICAL_Position_colum), 0, 0, 1, 0},
+  {&__pyx_n_s_POS_NOT_POSITIVE, __pyx_k_POS_NOT_POSITIVE, sizeof(__pyx_k_POS_NOT_POSITIVE), 0, 0, 1, 1},
+  {&__pyx_kp_s_POS_NOT_POSITIVE_Position_field, __pyx_k_POS_NOT_POSITIVE_Position_field, sizeof(__pyx_k_POS_NOT_POSITIVE_Position_field), 0, 0, 1, 0},
+  {&__pyx_n_s_PQ, __pyx_k_PQ, sizeof(__pyx_k_PQ), 0, 0, 1, 1},
+  {&__pyx_n_s_PS, __pyx_k_PS, sizeof(__pyx_k_PS), 0, 0, 1, 1},
+  {&__pyx_kp_s_Phase_set, __pyx_k_Phase_set, sizeof(__pyx_k_Phase_set), 0, 0, 1, 0},
+  {&__pyx_kp_s_Phasing_quality, __pyx_k_Phasing_quality, sizeof(__pyx_k_Phasing_quality), 0, 0, 1, 0},
+  {&__pyx_kp_s_Phred_scaled_genotype_likelihood, __pyx_k_Phred_scaled_genotype_likelihood, sizeof(__pyx_k_Phred_scaled_genotype_likelihood), 0, 0, 1, 0},
+  {&__pyx_n_s_QUAL, __pyx_k_QUAL, sizeof(__pyx_k_QUAL), 0, 0, 1, 1},
+  {&__pyx_n_s_QUAL_NOT_NUMERICAL, __pyx_k_QUAL_NOT_NUMERICAL, sizeof(__pyx_k_QUAL_NOT_NUMERICAL), 0, 0, 1, 1},
+  {&__pyx_kp_s_QUAL_NOT_NUMERICAL_Quality_field, __pyx_k_QUAL_NOT_NUMERICAL_Quality_field, sizeof(__pyx_k_QUAL_NOT_NUMERICAL_Quality_field), 0, 0, 1, 0},
+  {&__pyx_n_s_REF, __pyx_k_REF, sizeof(__pyx_k_REF), 0, 0, 1, 1},
+  {&__pyx_kp_s_RMS_mapping_quality, __pyx_k_RMS_mapping_quality, sizeof(__pyx_k_RMS_mapping_quality), 0, 0, 1, 0},
+  {&__pyx_kp_s_Read_depth_at_this_position_for, __pyx_k_Read_depth_at_this_position_for, sizeof(__pyx_k_Read_depth_at_this_position_for), 0, 0, 1, 0},
+  {&__pyx_kp_s_Required_key_s_not_found_in_data, __pyx_k_Required_key_s_not_found_in_data, sizeof(__pyx_k_Required_key_s_not_found_in_data), 0, 0, 1, 0},
+  {&__pyx_kp_s_Sample_Genotype_Filter, __pyx_k_Sample_Genotype_Filter, sizeof(__pyx_k_Sample_Genotype_Filter), 0, 0, 1, 0},
+  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
+  {&__pyx_n_s_String, __pyx_k_String, sizeof(__pyx_k_String), 0, 0, 1, 1},
+  {&__pyx_n_s_Tabixfile, __pyx_k_Tabixfile, sizeof(__pyx_k_Tabixfile), 0, 0, 1, 1},
+  {&__pyx_kp_s_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 0, 1, 0},
+  {&__pyx_n_s_Type_2, __pyx_k_Type_2, sizeof(__pyx_k_Type_2), 0, 0, 1, 1},
+  {&__pyx_n_s_UNKNOWN_CHAR_IN_REF, __pyx_k_UNKNOWN_CHAR_IN_REF, sizeof(__pyx_k_UNKNOWN_CHAR_IN_REF), 0, 0, 1, 1},
+  {&__pyx_kp_s_UNKNOWN_CHAR_IN_REF_Unknown_char, __pyx_k_UNKNOWN_CHAR_IN_REF_Unknown_char, sizeof(__pyx_k_UNKNOWN_CHAR_IN_REF_Unknown_char), 0, 0, 1, 0},
+  {&__pyx_n_s_UNKNOWN_FORMAT_STRING, __pyx_k_UNKNOWN_FORMAT_STRING, sizeof(__pyx_k_UNKNOWN_FORMAT_STRING), 0, 0, 1, 1},
+  {&__pyx_kp_s_UNKNOWN_FORMAT_STRING_Unknown_fi, __pyx_k_UNKNOWN_FORMAT_STRING_Unknown_fi, sizeof(__pyx_k_UNKNOWN_FORMAT_STRING_Unknown_fi), 0, 0, 1, 0},
+  {&__pyx_kp_s_Undefined_tag, __pyx_k_Undefined_tag, sizeof(__pyx_k_Undefined_tag), 0, 0, 1, 0},
+  {&__pyx_kp_s_Unknown_number_type_encountered, __pyx_k_Unknown_number_type_encountered, sizeof(__pyx_k_Unknown_number_type_encountered), 0, 0, 1, 0},
+  {&__pyx_n_s_V33_BAD_ALLELE, __pyx_k_V33_BAD_ALLELE, sizeof(__pyx_k_V33_BAD_ALLELE), 0, 0, 1, 1},
+  {&__pyx_kp_s_V33_BAD_ALLELE_Cannot_interpret, __pyx_k_V33_BAD_ALLELE_Cannot_interpret, sizeof(__pyx_k_V33_BAD_ALLELE_Cannot_interpret), 0, 0, 1, 0},
+  {&__pyx_n_s_V33_BAD_REF, __pyx_k_V33_BAD_REF, sizeof(__pyx_k_V33_BAD_REF), 0, 0, 1, 1},
+  {&__pyx_kp_s_V33_BAD_REF_Reference_should_be, __pyx_k_V33_BAD_REF_Reference_should_be, sizeof(__pyx_k_V33_BAD_REF_Reference_should_be), 0, 0, 1, 0},
+  {&__pyx_n_s_V33_UNMATCHED_DELETION, __pyx_k_V33_UNMATCHED_DELETION, sizeof(__pyx_k_V33_UNMATCHED_DELETION), 0, 0, 1, 1},
+  {&__pyx_kp_s_V33_UNMATCHED_DELETION_Deleted_s, __pyx_k_V33_UNMATCHED_DELETION_Deleted_s, sizeof(__pyx_k_V33_UNMATCHED_DELETION_Deleted_s), 0, 0, 1, 0},
+  {&__pyx_n_s_V40_BAD_ALLELE, __pyx_k_V40_BAD_ALLELE, sizeof(__pyx_k_V40_BAD_ALLELE), 0, 0, 1, 1},
+  {&__pyx_kp_s_V40_BAD_ALLELE_Bad_allele_found, __pyx_k_V40_BAD_ALLELE_Bad_allele_found, sizeof(__pyx_k_V40_BAD_ALLELE_Bad_allele_found), 0, 0, 1, 0},
+  {&__pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD, __pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD, sizeof(__pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD), 0, 0, 1, 1},
+  {&__pyx_kp_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2, __pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2, sizeof(__pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2), 0, 0, 1, 0},
+  {&__pyx_n_s_V40_MISSING_ANGLE_BRACKETS, __pyx_k_V40_MISSING_ANGLE_BRACKETS, sizeof(__pyx_k_V40_MISSING_ANGLE_BRACKETS), 0, 0, 1, 1},
+  {&__pyx_kp_s_V40_MISSING_ANGLE_BRACKETS_Forma, __pyx_k_V40_MISSING_ANGLE_BRACKETS_Forma, sizeof(__pyx_k_V40_MISSING_ANGLE_BRACKETS_Forma), 0, 0, 1, 0},
+  {&__pyx_n_s_VCF, __pyx_k_VCF, sizeof(__pyx_k_VCF), 0, 0, 1, 1},
+  {&__pyx_n_s_VCFRecord, __pyx_k_VCFRecord, sizeof(__pyx_k_VCFRecord), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF___init, __pyx_k_VCF___init, sizeof(__pyx_k_VCF___init), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF__add_definition, __pyx_k_VCF__add_definition, sizeof(__pyx_k_VCF__add_definition), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF__parse, __pyx_k_VCF__parse, sizeof(__pyx_k_VCF__parse), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF__parse_header, __pyx_k_VCF__parse_header, sizeof(__pyx_k_VCF__parse_header), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_compare_calls, __pyx_k_VCF_compare_calls, sizeof(__pyx_k_VCF_compare_calls), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_connect, __pyx_k_VCF_connect, sizeof(__pyx_k_VCF_connect), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_convertGT, __pyx_k_VCF_convertGT, sizeof(__pyx_k_VCF_convertGT), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_convertGTback, __pyx_k_VCF_convertGTback, sizeof(__pyx_k_VCF_convertGTback), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_enter_default_format, __pyx_k_VCF_enter_default_format, sizeof(__pyx_k_VCF_enter_default_format), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_error, __pyx_k_VCF_error, sizeof(__pyx_k_VCF_error), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_fetch, __pyx_k_VCF_fetch, sizeof(__pyx_k_VCF_fetch), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_format_format, __pyx_k_VCF_format_format, sizeof(__pyx_k_VCF_format_format), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_format_formatdata, __pyx_k_VCF_format_formatdata, sizeof(__pyx_k_VCF_format_formatdata), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_get_expected, __pyx_k_VCF_get_expected, sizeof(__pyx_k_VCF_get_expected), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_getfilter, __pyx_k_VCF_getfilter, sizeof(__pyx_k_VCF_getfilter), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_getformat, __pyx_k_VCF_getformat, sizeof(__pyx_k_VCF_getformat), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_getheader, __pyx_k_VCF_getheader, sizeof(__pyx_k_VCF_getheader), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_getinfo, __pyx_k_VCF_getinfo, sizeof(__pyx_k_VCF_getinfo), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_getsamples, __pyx_k_VCF_getsamples, sizeof(__pyx_k_VCF_getsamples), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_ignoreerror, __pyx_k_VCF_ignoreerror, sizeof(__pyx_k_VCF_ignoreerror), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_inregion, __pyx_k_VCF_inregion, sizeof(__pyx_k_VCF_inregion), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_parse, __pyx_k_VCF_parse, sizeof(__pyx_k_VCF_parse), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_parse_data, __pyx_k_VCF_parse_data, sizeof(__pyx_k_VCF_parse_data), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_parse_format, __pyx_k_VCF_parse_format, sizeof(__pyx_k_VCF_parse_format), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_parse_formatdata, __pyx_k_VCF_parse_formatdata, sizeof(__pyx_k_VCF_parse_formatdata), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_parse_header, __pyx_k_VCF_parse_header, sizeof(__pyx_k_VCF_parse_header), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_parse_heading, __pyx_k_VCF_parse_heading, sizeof(__pyx_k_VCF_parse_heading), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_setfilter, __pyx_k_VCF_setfilter, sizeof(__pyx_k_VCF_setfilter), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_setformat, __pyx_k_VCF_setformat, sizeof(__pyx_k_VCF_setformat), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_setheader, __pyx_k_VCF_setheader, sizeof(__pyx_k_VCF_setheader), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_setinfo, __pyx_k_VCF_setinfo, sizeof(__pyx_k_VCF_setinfo), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_setreference, __pyx_k_VCF_setreference, sizeof(__pyx_k_VCF_setreference), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_setregions, __pyx_k_VCF_setregions, sizeof(__pyx_k_VCF_setregions), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_setsamples, __pyx_k_VCF_setsamples, sizeof(__pyx_k_VCF_setsamples), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_setversion, __pyx_k_VCF_setversion, sizeof(__pyx_k_VCF_setversion), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_validate, __pyx_k_VCF_validate, sizeof(__pyx_k_VCF_validate), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_warnerror, __pyx_k_VCF_warnerror, sizeof(__pyx_k_VCF_warnerror), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_write, __pyx_k_VCF_write, sizeof(__pyx_k_VCF_write), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_write_data, __pyx_k_VCF_write_data, sizeof(__pyx_k_VCF_write_data), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_write_header, __pyx_k_VCF_write_header, sizeof(__pyx_k_VCF_write_header), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_write_heading, __pyx_k_VCF_write_heading, sizeof(__pyx_k_VCF_write_heading), 0, 0, 1, 1},
+  {&__pyx_n_s_VCF_writeheader, __pyx_k_VCF_writeheader, sizeof(__pyx_k_VCF_writeheader), 0, 0, 1, 1},
+  {&__pyx_kp_s_VCFv3_3, __pyx_k_VCFv3_3, sizeof(__pyx_k_VCFv3_3), 0, 0, 1, 0},
+  {&__pyx_kp_s_VCFv4_0, __pyx_k_VCFv4_0, sizeof(__pyx_k_VCFv4_0), 0, 0, 1, 0},
+  {&__pyx_kp_s_VCFv4_1, __pyx_k_VCFv4_1, sizeof(__pyx_k_VCFv4_1), 0, 0, 1, 0},
+  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+  {&__pyx_n_s_WRONG_REF, __pyx_k_WRONG_REF, sizeof(__pyx_k_WRONG_REF), 0, 0, 1, 1},
+  {&__pyx_kp_s_WRONG_REF_Wrong_reference_s, __pyx_k_WRONG_REF_Wrong_reference_s, sizeof(__pyx_k_WRONG_REF_Wrong_reference_s), 0, 0, 1, 0},
+  {&__pyx_n_s_Warning, __pyx_k_Warning, sizeof(__pyx_k_Warning), 0, 0, 1, 1},
+  {&__pyx_n_s_ZERO_FOR_NON_FLAG_FIELD, __pyx_k_ZERO_FOR_NON_FLAG_FIELD, sizeof(__pyx_k_ZERO_FOR_NON_FLAG_FIELD), 0, 0, 1, 1},
+  {&__pyx_kp_s_ZERO_FOR_NON_FLAG_FIELD_number_s, __pyx_k_ZERO_FOR_NON_FLAG_FIELD_number_s, sizeof(__pyx_k_ZERO_FOR_NON_FLAG_FIELD_number_s), 0, 0, 1, 0},
+  {&__pyx_n_s_ZERO_LENGTH_ALLELE, __pyx_k_ZERO_LENGTH_ALLELE, sizeof(__pyx_k_ZERO_LENGTH_ALLELE), 0, 0, 1, 1},
+  {&__pyx_kp_s_ZERO_LENGTH_ALLELE_Found_zero_le, __pyx_k_ZERO_LENGTH_ALLELE_Found_zero_le, sizeof(__pyx_k_ZERO_LENGTH_ALLELE_Found_zero_le), 0, 0, 1, 0},
+  {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0},
+  {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
+  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
+  {&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0},
+  {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
+  {&__pyx_kp_s__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 1, 0},
+  {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
+  {&__pyx_kp_s__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 0, 1, 0},
+  {&__pyx_kp_s__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 0, 1, 0},
+  {&__pyx_kp_s__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 0, 1, 0},
+  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
+  {&__pyx_kp_s__60, __pyx_k__60, sizeof(__pyx_k__60), 0, 0, 1, 0},
+  {&__pyx_kp_s__61, __pyx_k__61, sizeof(__pyx_k__61), 0, 0, 1, 0},
+  {&__pyx_kp_b__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 0, 0},
+  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
+  {&__pyx_kp_s__91, __pyx_k__91, sizeof(__pyx_k__91), 0, 0, 1, 0},
+  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
+  {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
+  {&__pyx_n_s_add_definition, __pyx_k_add_definition, sizeof(__pyx_k_add_definition), 0, 0, 1, 1},
+  {&__pyx_n_s_addn, __pyx_k_addn, sizeof(__pyx_k_addn), 0, 0, 1, 1},
+  {&__pyx_n_s_addns, __pyx_k_addns, sizeof(__pyx_k_addns), 0, 0, 1, 1},
+  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+  {&__pyx_n_s_allele, __pyx_k_allele, sizeof(__pyx_k_allele), 0, 0, 1, 1},
+  {&__pyx_n_s_alleleRegEx, __pyx_k_alleleRegEx, sizeof(__pyx_k_alleleRegEx), 0, 0, 1, 1},
+  {&__pyx_kp_s_alleles, __pyx_k_alleles, sizeof(__pyx_k_alleles), 0, 0, 1, 0},
+  {&__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_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+  {&__pyx_n_s_bisect, __pyx_k_bisect, sizeof(__pyx_k_bisect), 0, 0, 1, 1},
+  {&__pyx_n_s_blurp, __pyx_k_blurp, sizeof(__pyx_k_blurp), 0, 0, 1, 1},
+  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
+  {&__pyx_n_s_chrom, __pyx_k_chrom, sizeof(__pyx_k_chrom), 0, 0, 1, 1},
+  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
+  {&__pyx_n_s_cols, __pyx_k_cols, sizeof(__pyx_k_cols), 0, 0, 1, 1},
+  {&__pyx_n_s_compare_calls, __pyx_k_compare_calls, sizeof(__pyx_k_compare_calls), 0, 0, 1, 1},
+  {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
+  {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1},
+  {&__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_copy_2, __pyx_k_copy_2, sizeof(__pyx_k_copy_2), 0, 0, 1, 1},
+  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 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},
+  {&__pyx_n_s_defaultdict, __pyx_k_defaultdict, sizeof(__pyx_k_defaultdict), 0, 0, 1, 1},
+  {&__pyx_kp_s_deletion_is_s_reference_is_s, __pyx_k_deletion_is_s_reference_is_s, sizeof(__pyx_k_deletion_is_s_reference_is_s), 0, 0, 1, 0},
+  {&__pyx_n_s_descr, __pyx_k_descr, sizeof(__pyx_k_descr), 0, 0, 1, 1},
+  {&__pyx_n_s_description, __pyx_k_description, sizeof(__pyx_k_description), 0, 0, 1, 1},
+  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
+  {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
+  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+  {&__pyx_n_s_elts, __pyx_k_elts, sizeof(__pyx_k_elts), 0, 0, 1, 1},
+  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
+  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
+  {&__pyx_n_s_enter_default_format, __pyx_k_enter_default_format, sizeof(__pyx_k_enter_default_format), 0, 0, 1, 1},
+  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+  {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
+  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
+  {&__pyx_n_s_errorlabel, __pyx_k_errorlabel, sizeof(__pyx_k_errorlabel), 0, 0, 1, 1},
+  {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
+  {&__pyx_n_s_errorstring, __pyx_k_errorstring, sizeof(__pyx_k_errorstring), 0, 0, 1, 1},
+  {&__pyx_n_s_errwarn, __pyx_k_errwarn, sizeof(__pyx_k_errwarn), 0, 0, 1, 1},
+  {&__pyx_n_s_expected, __pyx_k_expected, sizeof(__pyx_k_expected), 0, 0, 1, 1},
+  {&__pyx_kp_s_expected_s_for_s_samples_s_got_s, __pyx_k_expected_s_for_s_samples_s_got_s, sizeof(__pyx_k_expected_s_for_s_samples_s_got_s), 0, 0, 1, 0},
+  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
+  {&__pyx_n_s_fa, __pyx_k_fa, sizeof(__pyx_k_fa), 0, 0, 1, 1},
+  {&__pyx_n_s_faref, __pyx_k_faref, sizeof(__pyx_k_faref), 0, 0, 1, 1},
+  {&__pyx_n_s_faref_leftflank, __pyx_k_faref_leftflank, sizeof(__pyx_k_faref_leftflank), 0, 0, 1, 1},
+  {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
+  {&__pyx_n_s_fileformat, __pyx_k_fileformat, sizeof(__pyx_k_fileformat), 0, 0, 1, 1},
+  {&__pyx_kp_s_fileformat_VCFv_s_s, __pyx_k_fileformat_VCFv_s_s, sizeof(__pyx_k_fileformat_VCFv_s_s), 0, 0, 1, 0},
+  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
+  {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
+  {&__pyx_n_s_filter_2, __pyx_k_filter_2, sizeof(__pyx_k_filter_2), 0, 0, 1, 1},
+  {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
+  {&__pyx_n_s_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1},
+  {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
+  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
+  {&__pyx_n_s_format_2, __pyx_k_format_2, sizeof(__pyx_k_format_2), 0, 0, 1, 1},
+  {&__pyx_n_s_format_format, __pyx_k_format_format, sizeof(__pyx_k_format_format), 0, 0, 1, 1},
+  {&__pyx_n_s_format_formatdata, __pyx_k_format_formatdata, sizeof(__pyx_k_format_formatdata), 0, 0, 1, 1},
+  {&__pyx_n_s_formatdict, __pyx_k_formatdict, sizeof(__pyx_k_formatdict), 0, 0, 1, 1},
+  {&__pyx_kp_s_found_s_expected_s, __pyx_k_found_s_expected_s, sizeof(__pyx_k_found_s_expected_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_found_s_values_in_element_s_exp, __pyx_k_found_s_values_in_element_s_exp, sizeof(__pyx_k_found_s_values_in_element_s_exp), 0, 0, 1, 0},
+  {&__pyx_kp_s_genotypes, __pyx_k_genotypes, sizeof(__pyx_k_genotypes), 0, 0, 1, 0},
+  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
+  {&__pyx_n_s_get_expected, __pyx_k_get_expected, sizeof(__pyx_k_get_expected), 0, 0, 1, 1},
+  {&__pyx_n_s_get_sequence, __pyx_k_get_sequence, sizeof(__pyx_k_get_sequence), 0, 0, 1, 1},
+  {&__pyx_n_s_getfilter, __pyx_k_getfilter, sizeof(__pyx_k_getfilter), 0, 0, 1, 1},
+  {&__pyx_n_s_getformat, __pyx_k_getformat, sizeof(__pyx_k_getformat), 0, 0, 1, 1},
+  {&__pyx_n_s_getheader, __pyx_k_getheader, sizeof(__pyx_k_getheader), 0, 0, 1, 1},
+  {&__pyx_n_s_getinfo, __pyx_k_getinfo, sizeof(__pyx_k_getinfo), 0, 0, 1, 1},
+  {&__pyx_n_s_getsamples, __pyx_k_getsamples, sizeof(__pyx_k_getsamples), 0, 0, 1, 1},
+  {&__pyx_n_s_gts, __pyx_k_gts, sizeof(__pyx_k_gts), 0, 0, 1, 1},
+  {&__pyx_n_s_gtsRegEx, __pyx_k_gtsRegEx, sizeof(__pyx_k_gtsRegEx), 0, 0, 1, 1},
+  {&__pyx_n_s_have_deletions, __pyx_k_have_deletions, sizeof(__pyx_k_have_deletions), 0, 0, 1, 1},
+  {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1},
+  {&__pyx_n_s_header_2, __pyx_k_header_2, sizeof(__pyx_k_header_2), 0, 0, 1, 1},
+  {&__pyx_n_s_headings, __pyx_k_headings, sizeof(__pyx_k_headings), 0, 0, 1, 1},
+  {&__pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_k_home_andreas_devel_pysam_pysam, sizeof(__pyx_k_home_andreas_devel_pysam_pysam), 0, 0, 1, 0},
+  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
+  {&__pyx_kp_s_id_numbertype_number_type_descri, __pyx_k_id_numbertype_number_type_descri, sizeof(__pyx_k_id_numbertype_number_type_descri), 0, 0, 1, 0},
+  {&__pyx_kp_s_id_s_expected_s_parameters_got_s, __pyx_k_id_s_expected_s_parameters_got_s, sizeof(__pyx_k_id_s_expected_s_parameters_got_s), 0, 0, 1, 0},
+  {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
+  {&__pyx_n_s_ielts, __pyx_k_ielts, sizeof(__pyx_k_ielts), 0, 0, 1, 1},
+  {&__pyx_n_s_ignored_errors, __pyx_k_ignored_errors, sizeof(__pyx_k_ignored_errors), 0, 0, 1, 1},
+  {&__pyx_n_s_ignoreerror, __pyx_k_ignoreerror, sizeof(__pyx_k_ignoreerror), 0, 0, 1, 1},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_kp_s_in_line_s_s_s_s_s, __pyx_k_in_line_s_s_s_s_s, sizeof(__pyx_k_in_line_s_s_s_s_s), 0, 0, 1, 0},
+  {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
+  {&__pyx_n_s_info_2, __pyx_k_info_2, sizeof(__pyx_k_info_2), 0, 0, 1, 1},
+  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+  {&__pyx_n_s_inregion, __pyx_k_inregion, sizeof(__pyx_k_inregion), 0, 0, 1, 1},
+  {&__pyx_n_s_itemgetter, __pyx_k_itemgetter, sizeof(__pyx_k_itemgetter), 0, 0, 1, 1},
+  {&__pyx_n_s_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 0, 0, 1, 1},
+  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
+  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
+  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
+  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
+  {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
+  {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
+  {&__pyx_n_s_last, __pyx_k_last, sizeof(__pyx_k_last), 0, 0, 1, 1},
+  {&__pyx_n_s_last_line, __pyx_k_last_line, sizeof(__pyx_k_last_line), 0, 0, 1, 1},
+  {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1},
+  {&__pyx_n_s_leftalign, __pyx_k_leftalign, sizeof(__pyx_k_leftalign), 0, 0, 1, 1},
+  {&__pyx_n_s_leftalign_2, __pyx_k_leftalign_2, sizeof(__pyx_k_leftalign_2), 0, 0, 1, 1},
+  {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
+  {&__pyx_n_s_line_2, __pyx_k_line_2, sizeof(__pyx_k_line_2), 0, 0, 1, 1},
+  {&__pyx_n_s_lineno, __pyx_k_lineno, sizeof(__pyx_k_lineno), 0, 0, 1, 1},
+  {&__pyx_n_s_lineparse, __pyx_k_lineparse, sizeof(__pyx_k_lineparse), 0, 0, 1, 1},
+  {&__pyx_n_s_lines, __pyx_k_lines, sizeof(__pyx_k_lines), 0, 0, 1, 1},
+  {&__pyx_n_s_lines_2, __pyx_k_lines_2, sizeof(__pyx_k_lines_2), 0, 0, 1, 1},
+  {&__pyx_n_s_longest, __pyx_k_longest, sizeof(__pyx_k_longest), 0, 0, 1, 1},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
+  {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
+  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
+  {&__pyx_n_s_missing, __pyx_k_missing, sizeof(__pyx_k_missing), 0, 0, 1, 1},
+  {&__pyx_n_s_missingvalue, __pyx_k_missingvalue, sizeof(__pyx_k_missingvalue), 0, 0, 1, 1},
+  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+  {&__pyx_n_s_movable, __pyx_k_movable, sizeof(__pyx_k_movable), 0, 0, 1, 1},
+  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
+  {&__pyx_n_s_na, __pyx_k_na, sizeof(__pyx_k_na), 0, 0, 1, 1},
+  {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
+  {&__pyx_kp_s_needs_to_be_checked, __pyx_k_needs_to_be_checked, sizeof(__pyx_k_needs_to_be_checked), 0, 0, 1, 0},
+  {&__pyx_n_s_newalts, __pyx_k_newalts, sizeof(__pyx_k_newalts), 0, 0, 1, 1},
+  {&__pyx_n_s_nmb, __pyx_k_nmb, sizeof(__pyx_k_nmb), 0, 0, 1, 1},
+  {&__pyx_kp_s_nonref_alleles, __pyx_k_nonref_alleles, sizeof(__pyx_k_nonref_alleles), 0, 0, 1, 0},
+  {&__pyx_n_s_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1},
+  {&__pyx_n_s_numbertype, __pyx_k_numbertype, sizeof(__pyx_k_numbertype), 0, 0, 1, 1},
+  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
+  {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
+  {&__pyx_n_s_opt, __pyx_k_opt, sizeof(__pyx_k_opt), 0, 0, 1, 1},
+  {&__pyx_kp_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 0},
+  {&__pyx_n_s_output_2, __pyx_k_output_2, sizeof(__pyx_k_output_2), 0, 0, 1, 1},
+  {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1},
+  {&__pyx_n_s_parse_2, __pyx_k_parse_2, sizeof(__pyx_k_parse_2), 0, 0, 1, 1},
+  {&__pyx_n_s_parse_data, __pyx_k_parse_data, sizeof(__pyx_k_parse_data), 0, 0, 1, 1},
+  {&__pyx_n_s_parse_format, __pyx_k_parse_format, sizeof(__pyx_k_parse_format), 0, 0, 1, 1},
+  {&__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_header_2, __pyx_k_parse_header_2, sizeof(__pyx_k_parse_header_2), 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_kp_s_phased_genotypes, __pyx_k_phased_genotypes, sizeof(__pyx_k_phased_genotypes), 0, 0, 1, 0},
+  {&__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},
+  {&__pyx_n_s_pos2, __pyx_k_pos2, sizeof(__pyx_k_pos2), 0, 0, 1, 1},
+  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+  {&__pyx_n_s_pysam, __pyx_k_pysam, sizeof(__pyx_k_pysam), 0, 0, 1, 1},
+  {&__pyx_n_s_pysam_cvcf, __pyx_k_pysam_cvcf, sizeof(__pyx_k_pysam_cvcf), 0, 0, 1, 1},
+  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
+  {&__pyx_n_s_qual, __pyx_k_qual, sizeof(__pyx_k_qual), 0, 0, 1, 1},
+  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
+  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
+  {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
+  {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
+  {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
+  {&__pyx_n_s_ref1, __pyx_k_ref1, sizeof(__pyx_k_ref1), 0, 0, 1, 1},
+  {&__pyx_n_s_ref2, __pyx_k_ref2, sizeof(__pyx_k_ref2), 0, 0, 1, 1},
+  {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1},
+  {&__pyx_n_s_reference_2, __pyx_k_reference_2, sizeof(__pyx_k_reference_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_reference_is_s_VCF_says_s, __pyx_k_reference_is_s_VCF_says_s, sizeof(__pyx_k_reference_is_s_VCF_says_s), 0, 0, 1, 0},
+  {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1},
+  {&__pyx_n_s_regions, __pyx_k_regions, sizeof(__pyx_k_regions), 0, 0, 1, 1},
+  {&__pyx_n_s_regions_2, __pyx_k_regions_2, sizeof(__pyx_k_regions_2), 0, 0, 1, 1},
+  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
+  {&__pyx_n_s_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 0, 1, 1},
+  {&__pyx_n_s_required_2, __pyx_k_required_2, sizeof(__pyx_k_required_2), 0, 0, 1, 1},
+  {&__pyx_n_s_rest, __pyx_k_rest, sizeof(__pyx_k_rest), 0, 0, 1, 1},
+  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
+  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
+  {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0},
+  {&__pyx_n_s_sample, __pyx_k_sample, sizeof(__pyx_k_sample), 0, 0, 1, 1},
+  {&__pyx_n_s_sample2column, __pyx_k_sample2column, sizeof(__pyx_k_sample2column), 0, 0, 1, 1},
+  {&__pyx_n_s_samples, __pyx_k_samples, sizeof(__pyx_k_samples), 0, 0, 1, 1},
+  {&__pyx_n_s_samples_2, __pyx_k_samples_2, sizeof(__pyx_k_samples_2), 0, 0, 1, 1},
+  {&__pyx_n_s_sdata, __pyx_k_sdata, sizeof(__pyx_k_sdata), 0, 0, 1, 1},
+  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
+  {&__pyx_n_s_separator, __pyx_k_separator, sizeof(__pyx_k_separator), 0, 0, 1, 1},
+  {&__pyx_n_s_sequence, __pyx_k_sequence, sizeof(__pyx_k_sequence), 0, 0, 1, 1},
+  {&__pyx_n_s_setfilter, __pyx_k_setfilter, sizeof(__pyx_k_setfilter), 0, 0, 1, 1},
+  {&__pyx_n_s_setformat, __pyx_k_setformat, sizeof(__pyx_k_setformat), 0, 0, 1, 1},
+  {&__pyx_n_s_setheader, __pyx_k_setheader, sizeof(__pyx_k_setheader), 0, 0, 1, 1},
+  {&__pyx_n_s_setinfo, __pyx_k_setinfo, sizeof(__pyx_k_setinfo), 0, 0, 1, 1},
+  {&__pyx_n_s_setreference, __pyx_k_setreference, sizeof(__pyx_k_setreference), 0, 0, 1, 1},
+  {&__pyx_n_s_setregions, __pyx_k_setregions, sizeof(__pyx_k_setregions), 0, 0, 1, 1},
+  {&__pyx_n_s_setsamples, __pyx_k_setsamples, sizeof(__pyx_k_setsamples), 0, 0, 1, 1},
+  {&__pyx_n_s_setversion, __pyx_k_setversion, sizeof(__pyx_k_setversion), 0, 0, 1, 1},
+  {&__pyx_n_s_shortest, __pyx_k_shortest, sizeof(__pyx_k_shortest), 0, 0, 1, 1},
+  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
+  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
+  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
+  {&__pyx_kp_s_sth_entry_not_found, __pyx_k_sth_entry_not_found, sizeof(__pyx_k_sth_entry_not_found), 0, 0, 1, 0},
+  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
+  {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
+  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
+  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
+  {&__pyx_n_s_tabixfile, __pyx_k_tabixfile, sizeof(__pyx_k_tabixfile), 0, 0, 1, 1},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
+  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
+  {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
+  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
+  {&__pyx_n_s_validate, __pyx_k_validate, sizeof(__pyx_k_validate), 0, 0, 1, 1},
+  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
+  {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1},
+  {&__pyx_n_s_vcf, __pyx_k_vcf, sizeof(__pyx_k_vcf), 0, 0, 1, 1},
+  {&__pyx_n_s_vcffile, __pyx_k_vcffile, sizeof(__pyx_k_vcffile), 0, 0, 1, 1},
+  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
+  {&__pyx_n_s_version_2, __pyx_k_version_2, sizeof(__pyx_k_version_2), 0, 0, 1, 1},
+  {&__pyx_n_s_warn_errors, __pyx_k_warn_errors, sizeof(__pyx_k_warn_errors), 0, 0, 1, 1},
+  {&__pyx_n_s_warnerror, __pyx_k_warnerror, sizeof(__pyx_k_warnerror), 0, 0, 1, 1},
+  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
+  {&__pyx_n_s_write_data, __pyx_k_write_data, sizeof(__pyx_k_write_data), 0, 0, 1, 1},
+  {&__pyx_n_s_write_header, __pyx_k_write_header, sizeof(__pyx_k_write_header), 0, 0, 1, 1},
+  {&__pyx_n_s_write_heading, __pyx_k_write_heading, sizeof(__pyx_k_write_heading), 0, 0, 1, 1},
+  {&__pyx_n_s_writeheader, __pyx_k_writeheader, sizeof(__pyx_k_writeheader), 0, 0, 1, 1},
+  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
+  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
+  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
   {0, 0, 0, 0, 0, 0, 0}
 };
 static int __Pyx_InitCachedBuiltins(void) {
-  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __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 = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_min = __Pyx_GetName(__pyx_b, __pyx_n_s__min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_zip = __Pyx_GetName(__pyx_b, __pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __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 = 910; __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 = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -24929,9 +24044,9 @@ static int __Pyx_InitCachedConstants(void) {
  *         elts = r.split(':')
  *         chrom, start, end = elts[0], 0, 3000000000
  */
-  __pyx_k_tuple_3 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_3);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));
+  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__3);
+  __Pyx_GIVEREF(__pyx_tuple__3);
 
   /* "pysam/cvcf.pyx":72
  *     result = []
@@ -24940,9 +24055,9 @@ static int __Pyx_InitCachedConstants(void) {
  *         chrom, start, end = elts[0], 0, 3000000000
  *         if len(elts)==1: pass
  */
-  __pyx_k_tuple_5 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_5);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));
+  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__5);
+  __Pyx_GIVEREF(__pyx_tuple__5);
 
   /* "pysam/cvcf.pyx":77
  *         elif len(elts)==2:
@@ -24951,9 +24066,9 @@ static int __Pyx_InitCachedConstants(void) {
  *                 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_Pack(1, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_7);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));
+  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s__6); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__7);
+  __Pyx_GIVEREF(__pyx_tuple__7);
 
   /* "pysam/cvcf.pyx":159
  *             alt = self.fields[4]
@@ -24962,9 +24077,9 @@ static int __Pyx_InitCachedConstants(void) {
  *             return alt
  * 
  */
-  __pyx_k_tuple_10 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_10);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
+  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__9);
+  __Pyx_GIVEREF(__pyx_tuple__9);
 
   /* "pysam/cvcf.pyx":176
  *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
@@ -24973,9 +24088,9 @@ static int __Pyx_InitCachedConstants(void) {
  * 
  *     property info:
  */
-  __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_12);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
+  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s__10); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__11);
+  __Pyx_GIVEREF(__pyx_tuple__11);
 
   /* "pysam/cvcf.pyx":184
  *             info = {}
@@ -24984,9 +24099,9 @@ static int __Pyx_InitCachedConstants(void) {
  *                     elts = blurp.split('=')
  *                     if len(elts) == 1: v = None
  */
-  __pyx_k_tuple_13 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_13);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
+  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s__10); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__12);
+  __Pyx_GIVEREF(__pyx_tuple__12);
 
   /* "pysam/cvcf.pyx":185
  *             if col != b".":
@@ -24995,9 +24110,9 @@ static int __Pyx_InitCachedConstants(void) {
  *                     if len(elts) == 1: v = None
  *                     elif len(elts) == 2: v = elts[1]
  */
-  __pyx_k_tuple_15 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_15);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
+  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__14);
+  __Pyx_GIVEREF(__pyx_tuple__14);
 
   /* "pysam/cvcf.pyx":194
  *     property format:
@@ -25006,9 +24121,9 @@ static int __Pyx_InitCachedConstants(void) {
  * 
  *     property samples:
  */
-  __pyx_k_tuple_16 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_16);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
+  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__15);
+  __Pyx_GIVEREF(__pyx_tuple__15);
 
   /* "pysam/cvcf.pyx":203
  * 
@@ -25017,426 +24132,647 @@ static int __Pyx_InitCachedConstants(void) {
  *         alt = self.alt
  *         format = self.format
  */
-  __pyx_k_tuple_17 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_17);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));
+  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__16);
+  __Pyx_GIVEREF(__pyx_tuple__16);
 
-  /* "pysam/cvcf.pyx":319
+  /* "pysam/cvcf.pyx":320
  *     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_22 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_22);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));
+  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__17);
+  __Pyx_GIVEREF(__pyx_tuple__17);
 
-  /* "pysam/cvcf.pyx":340
+  /* "pysam/cvcf.pyx":323
+ *         if _copy != None:
+ *             self._leftalign = _copy._leftalign
+ *             self._header = _copy._header[:]             # <<<<<<<<<<<<<<
+ *             self._version = _copy._version
+ *             self._info = copy.deepcopy(_copy._info)
+ */
+  __pyx_slice__18 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__18);
+  __Pyx_GIVEREF(__pyx_slice__18);
+
+  /* "pysam/cvcf.pyx":328
+ *             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_slice__19 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__19);
+  __Pyx_GIVEREF(__pyx_slice__19);
+
+  /* "pysam/cvcf.pyx":341
  *     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_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_23);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
+  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__20);
+  __Pyx_GIVEREF(__pyx_tuple__20);
 
-  /* "pysam/cvcf.pyx":349
+  /* "pysam/cvcf.pyx":350
  *     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_26 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_26);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));
+  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s__21); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__22);
+  __Pyx_GIVEREF(__pyx_tuple__22);
 
-  /* "pysam/cvcf.pyx":352
+  /* "pysam/cvcf.pyx":353
  *                 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_29 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_28)); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_29);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));
+  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__24);
+  __Pyx_GIVEREF(__pyx_tuple__24);
 
-  /* "pysam/cvcf.pyx":359
+  /* "pysam/cvcf.pyx":356
+ *                 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_slice__25 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__25);
+  __Pyx_GIVEREF(__pyx_slice__25);
+
+  /* "pysam/cvcf.pyx":360
  *         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_30 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_30);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));
+  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__26);
+  __Pyx_GIVEREF(__pyx_tuple__26);
 
   /* "pysam/cvcf.pyx":361
+ *         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_slice__27 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__27);
+  __Pyx_GIVEREF(__pyx_slice__27);
+
+  /* "pysam/cvcf.pyx":362
  *             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_31 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_31);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
-  __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_33);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
-  __pyx_k_tuple_34 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_34);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));
-  __pyx_k_tuple_35 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_35);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));
-
-  /* "pysam/cvcf.pyx":365
+  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__28);
+  __Pyx_GIVEREF(__pyx_tuple__28);
+  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s__29); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__30);
+  __Pyx_GIVEREF(__pyx_tuple__30);
+  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__31);
+  __Pyx_GIVEREF(__pyx_tuple__31);
+  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s__29); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__32);
+  __Pyx_GIVEREF(__pyx_tuple__32);
+
+  /* "pysam/cvcf.pyx":366
  *                 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_42 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_38)); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_42);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));
-  __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_43);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));
+  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_ID); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__33);
+  __Pyx_GIVEREF(__pyx_tuple__33);
+  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__34);
+  __Pyx_GIVEREF(__pyx_tuple__34);
 
-  /* "pysam/cvcf.pyx":366
+  /* "pysam/cvcf.pyx":367
  *                 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_44 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_39)); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_44);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));
-  __pyx_k_tuple_45 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_45);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));
+  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Number); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__35);
+  __Pyx_GIVEREF(__pyx_tuple__35);
+  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__36);
+  __Pyx_GIVEREF(__pyx_tuple__36);
 
-  /* "pysam/cvcf.pyx":367
+  /* "pysam/cvcf.pyx":368
  *             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_46 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_40)); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_46);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));
-  __pyx_k_tuple_47 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_47);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
+  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_Type); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__37);
+  __Pyx_GIVEREF(__pyx_tuple__37);
+  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__38);
+  __Pyx_GIVEREF(__pyx_tuple__38);
 
-  /* "pysam/cvcf.pyx":368
+  /* "pysam/cvcf.pyx":369
  *             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_48 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_41)); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_48);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));
+  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_Description); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__39);
+  __Pyx_GIVEREF(__pyx_tuple__39);
 
-  /* "pysam/cvcf.pyx":369
+  /* "pysam/cvcf.pyx":370
  *             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_49 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_49);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));
+  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s__29); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__40);
+  __Pyx_GIVEREF(__pyx_tuple__40);
 
-  /* "pysam/cvcf.pyx":372
+  /* "pysam/cvcf.pyx":373
  *                 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_51 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_51);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
+  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__41);
+  __Pyx_GIVEREF(__pyx_tuple__41);
 
   /* "pysam/cvcf.pyx":375
+ *                     elts = first.split('=') + [rest]
+ *                 data['descr'] = elts[1]
+ *                 rest = '"'.join(elts[2:])             # <<<<<<<<<<<<<<
+ *                 if rest.startswith(','): rest = rest[1:]
+ *             else:
+ */
+  __pyx_slice__42 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__42);
+  __Pyx_GIVEREF(__pyx_slice__42);
+
+  /* "pysam/cvcf.pyx":376
  *                 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_52 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_52);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
+  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__43);
+  __Pyx_GIVEREF(__pyx_tuple__43);
 
-  /* "pysam/cvcf.pyx":495
+  /* "pysam/cvcf.pyx":496
  *         # 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_62 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_2), ((PyObject *)__pyx_kp_s_1)); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_62);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62));
-  __pyx_k_tuple_63 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_kp_s_1)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_63);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
+  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_kp_s__2, __pyx_kp_s_); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__44);
+  __Pyx_GIVEREF(__pyx_tuple__44);
+  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_kp_s__8, __pyx_kp_s_); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__45);
+  __Pyx_GIVEREF(__pyx_tuple__45);
 
-  /* "pysam/cvcf.pyx":521
+  /* "pysam/cvcf.pyx":522
  * 
  *     def parse_header( self, line ):
  *         assert line.startswith('##')             # <<<<<<<<<<<<<<
  *         elts = line[2:].split('=')
  *         key = elts[0].strip()
  */
-  __pyx_k_tuple_77 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_76)); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_77);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));
+  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s__46); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__47);
+  __Pyx_GIVEREF(__pyx_tuple__47);
 
-  /* "pysam/cvcf.pyx":522
+  /* "pysam/cvcf.pyx":523
  *     def parse_header( self, line ):
  *         assert line.startswith('##')
  *         elts = line[2:].split('=')             # <<<<<<<<<<<<<<
  *         key = elts[0].strip()
  *         value = '='.join(elts[1:]).strip()
  */
-  __pyx_k_tuple_78 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_78);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));
+  __pyx_slice__48 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__48);
+  __Pyx_GIVEREF(__pyx_slice__48);
+  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__49);
+  __Pyx_GIVEREF(__pyx_tuple__49);
 
-  /* "pysam/cvcf.pyx":557
+  /* "pysam/cvcf.pyx":525
+ *         elts = line[2:].split('=')
+ *         key = elts[0].strip()
+ *         value = '='.join(elts[1:]).strip()             # <<<<<<<<<<<<<<
+ *         if key == "fileformat":
+ *             if value == "VCFv3.3":
+ */
+  __pyx_slice__50 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__50);
+  __Pyx_GIVEREF(__pyx_slice__50);
+
+  /* "pysam/cvcf.pyx":558
  * 
  *     def parse_heading( self, line ):
  *         assert line.startswith('#')             # <<<<<<<<<<<<<<
  *         assert not line.startswith('##')
  *         headings = line[1:].split('\t')
  */
-  __pyx_k_tuple_86 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_85)); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_86);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
+  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s__51); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__52);
+  __Pyx_GIVEREF(__pyx_tuple__52);
 
-  /* "pysam/cvcf.pyx":558
+  /* "pysam/cvcf.pyx":559
  *     def parse_heading( self, line ):
  *         assert line.startswith('#')
  *         assert not line.startswith('##')             # <<<<<<<<<<<<<<
  *         headings = line[1:].split('\t')
  *         # test for 8, as FORMAT field might be missing
  */
-  __pyx_k_tuple_87 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_76)); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_87);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));
+  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s__46); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__53);
+  __Pyx_GIVEREF(__pyx_tuple__53);
 
-  /* "pysam/cvcf.pyx":559
+  /* "pysam/cvcf.pyx":560
  *         assert line.startswith('#')
  *         assert not line.startswith('##')
  *         headings = line[1:].split('\t')             # <<<<<<<<<<<<<<
  *         # test for 8, as FORMAT field might be missing
  *         if len(headings)==1 and len(line[1:].split()) >= 8:
  */
-  __pyx_k_tuple_89 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_88)); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_89);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));
+  __pyx_slice__54 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__54);
+  __Pyx_GIVEREF(__pyx_slice__54);
+  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s__55); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__56);
+  __Pyx_GIVEREF(__pyx_tuple__56);
+
+  /* "pysam/cvcf.pyx":562
+ *         headings = line[1:].split('\t')
+ *         # test for 8, as FORMAT field might be missing
+ *         if len(headings)==1 and len(line[1:].split()) >= 8:             # <<<<<<<<<<<<<<
+ *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
+ *             headings = line[1:].split()
+ */
+  __pyx_slice__57 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__57);
+  __Pyx_GIVEREF(__pyx_slice__57);
+
+  /* "pysam/cvcf.pyx":564
+ *         if len(headings)==1 and len(line[1:].split()) >= 8:
+ *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
+ *             headings = line[1:].split()             # <<<<<<<<<<<<<<
+ * 
+ *         for i,s in enumerate(self._required):
+ */
+  __pyx_slice__58 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__58);
+  __Pyx_GIVEREF(__pyx_slice__58);
+
+  /* "pysam/cvcf.pyx":582
+ *                     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_slice__59 = PySlice_New(__pyx_int_9, Py_None, Py_None); if (unlikely(!__pyx_slice__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__59);
+  __Pyx_GIVEREF(__pyx_slice__59);
 
-  /* "pysam/cvcf.pyx":611
+  /* "pysam/cvcf.pyx":612
  *             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_97 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_97);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));
+  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__62);
+  __Pyx_GIVEREF(__pyx_tuple__62);
 
-  /* "pysam/cvcf.pyx":613
+  /* "pysam/cvcf.pyx":614
  *         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_98 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_98);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
+  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s__10); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__63);
+  __Pyx_GIVEREF(__pyx_tuple__63);
 
-  /* "pysam/cvcf.pyx":615
+  /* "pysam/cvcf.pyx":616
  *         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_99 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_99);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
+  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s__10); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__64);
+  __Pyx_GIVEREF(__pyx_tuple__64);
 
-  /* "pysam/cvcf.pyx":651
+  /* "pysam/cvcf.pyx":652
  * 
  *     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_103 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_88)); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_103);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));
+  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s__55); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__65);
+  __Pyx_GIVEREF(__pyx_tuple__65);
 
-  /* "pysam/cvcf.pyx":697
+  /* "pysam/cvcf.pyx":698
  *         # 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_107 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_107);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));
+  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__66);
+  __Pyx_GIVEREF(__pyx_tuple__66);
 
-  /* "pysam/cvcf.pyx":706
+  /* "pysam/cvcf.pyx":707
  *         # 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_108 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_108);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
+  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s__10); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__67);
+  __Pyx_GIVEREF(__pyx_tuple__67);
 
-  /* "pysam/cvcf.pyx":711
+  /* "pysam/cvcf.pyx":712
  *         info = {}
  *         if cols[7] != ".":
  *             for blurp in cols[7].split(';'):             # <<<<<<<<<<<<<<
  *                 elts = blurp.split('=')
  *                 if len(elts) == 1: v = None
  */
-  __pyx_k_tuple_109 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_109);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
+  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s__10); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__68);
+  __Pyx_GIVEREF(__pyx_tuple__68);
 
-  /* "pysam/cvcf.pyx":712
+  /* "pysam/cvcf.pyx":713
  *         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_110 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_110);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
+  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__69);
+  __Pyx_GIVEREF(__pyx_tuple__69);
 
-  /* "pysam/cvcf.pyx":723
+  /* "pysam/cvcf.pyx":724
  *         # Gracefully deal with absent FORMAT column
  *         if cols[8] == "": format = []
  *         else: format = cols[8].split(':')             # <<<<<<<<<<<<<<
  * 
  *         # check: all filters are defined
  */
-  __pyx_k_tuple_111 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_111);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
+  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__70);
+  __Pyx_GIVEREF(__pyx_tuple__70);
 
   /* "pysam/cvcf.pyx":741
+ *             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_slice__71 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__71);
+  __Pyx_GIVEREF(__pyx_slice__71);
+
+  /* "pysam/cvcf.pyx":742
  *             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_112 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__I)); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_112);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));
-
-  /* "pysam/cvcf.pyx":742
+  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_s_I); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__72);
+  __Pyx_GIVEREF(__pyx_tuple__72);
+  __pyx_slice__73 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__73);
+  __Pyx_GIVEREF(__pyx_slice__73);
+  __pyx_slice__74 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__74);
+  __Pyx_GIVEREF(__pyx_slice__74);
+
+  /* "pysam/cvcf.pyx":743
  *                 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_113 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__D)); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_113);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));
+  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_D); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__75);
+  __Pyx_GIVEREF(__pyx_tuple__75);
 
-  /* "pysam/cvcf.pyx":823
+  /* "pysam/cvcf.pyx":746
+ *                     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_slice__76 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__76);
+  __Pyx_GIVEREF(__pyx_slice__76);
+
+  /* "pysam/cvcf.pyx":753
+ *                         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_slice__77 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__77);
+  __Pyx_GIVEREF(__pyx_slice__77);
+
+  /* "pysam/cvcf.pyx":815
+ *                 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_slice__78 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__78);
+  __Pyx_GIVEREF(__pyx_slice__78);
+
+  /* "pysam/cvcf.pyx":816
+ *                     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_slice__79 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__79);
+  __Pyx_GIVEREF(__pyx_slice__79);
+
+  /* "pysam/cvcf.pyx":824
+ *         # parse sample columns
+ *         samples = []
+ *         for sample in cols[9:]:             # <<<<<<<<<<<<<<
+ *             dict = {}
+ *             values = sample.split(':')
+ */
+  __pyx_slice__80 = PySlice_New(__pyx_int_9, Py_None, Py_None); if (unlikely(!__pyx_slice__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__80);
+  __Pyx_GIVEREF(__pyx_slice__80);
+
+  /* "pysam/cvcf.pyx":826
  *         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_117 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_117);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));
+  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__81);
+  __Pyx_GIVEREF(__pyx_tuple__81);
 
-  /* "pysam/cvcf.pyx":893
- *         for line in stream:
+  /* "pysam/cvcf.pyx":897
+ *             line = ctabix._force_str(line)
  *             self._lineno += 1
  *             if line.startswith('##'):             # <<<<<<<<<<<<<<
  *                 self.parse_header( line.strip() )
  *             elif line.startswith('#'):
  */
-  __pyx_k_tuple_119 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_76)); if (unlikely(!__pyx_k_tuple_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_119);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_119));
+  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s__46); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__82);
+  __Pyx_GIVEREF(__pyx_tuple__82);
 
-  /* "pysam/cvcf.pyx":895
+  /* "pysam/cvcf.pyx":899
  *             if line.startswith('##'):
  *                 self.parse_header( line.strip() )
  *             elif line.startswith('#'):             # <<<<<<<<<<<<<<
  *                 self.parse_heading( line.strip() )
  *                 self.enter_default_format()
  */
-  __pyx_k_tuple_120 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_85)); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_120);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120));
+  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s__51); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__83);
+  __Pyx_GIVEREF(__pyx_tuple__83);
 
-  /* "pysam/cvcf.pyx":904
+  /* "pysam/cvcf.pyx":908
  *     def _parse(self, line, stream):
  *         # deal with files with header only
  *         if line.startswith("##"): return             # <<<<<<<<<<<<<<
  *         if len(line.strip()) > 0:
  *             d = self.parse_data( line.strip() )
  */
-  __pyx_k_tuple_122 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_76)); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_122);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));
+  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s__46); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__84);
+  __Pyx_GIVEREF(__pyx_tuple__84);
 
-  /* "pysam/cvcf.pyx":961
+  /* "pysam/cvcf.pyx":965
  * 
  *     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_124 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_123)); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_124);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
+  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_Can_only_handle_v3_3_and_v4_0_VC); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__85);
+  __Pyx_GIVEREF(__pyx_tuple__85);
 
-  /* "pysam/cvcf.pyx":1039
+  /* "pysam/cvcf.pyx":1010
+ *         # 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_slice__86 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__86);
+  __Pyx_GIVEREF(__pyx_slice__86);
+
+  /* "pysam/cvcf.pyx":1011
+ *         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_slice__87 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__87);
+  __Pyx_GIVEREF(__pyx_slice__87);
+
+  /* "pysam/cvcf.pyx":1013
+ *             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_slice__88 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__88);
+  __Pyx_GIVEREF(__pyx_slice__88);
+
+  /* "pysam/cvcf.pyx":1014
+ *         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_slice__89 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__89);
+  __Pyx_GIVEREF(__pyx_slice__89);
+
+  /* "pysam/cvcf.pyx":1048
  *         '''
  * 
  *         raise NotImplementedError( "needs to be checked" )             # <<<<<<<<<<<<<<
  * 
  *         chrom, pos = record.chrom, record.pos
  */
-  __pyx_k_tuple_127 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_126)); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_127);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
+  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_needs_to_be_checked); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__90);
+  __Pyx_GIVEREF(__pyx_tuple__90);
 
   /* "pysam/cvcf.pyx":55
  * import pysam
@@ -25445,9 +24781,9 @@ static int __Pyx_InitCachedConstants(void) {
  * alleleRegEx = re.compile('^[ACGTN]+$')
  * 
  */
-  __pyx_k_tuple_129 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_128)); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_129);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129));
+  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s__91); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__92);
+  __Pyx_GIVEREF(__pyx_tuple__92);
 
   /* "pysam/cvcf.pyx":56
  * 
@@ -25456,9 +24792,9 @@ static int __Pyx_InitCachedConstants(void) {
  * 
  * # Utility function.  Uses 0-based coordinates
  */
-  __pyx_k_tuple_131 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_130)); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_131);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131));
+  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_ACGTN_2); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__93);
+  __Pyx_GIVEREF(__pyx_tuple__93);
 
   /* "pysam/cvcf.pyx":59
  * 
@@ -25467,10 +24803,10 @@ static int __Pyx_InitCachedConstants(void) {
  *     # obtain sequence from .fa file, without truncation
  *     if end<=start: return ""
  */
-  __pyx_k_tuple_132 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__chrom), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_n_s__fa), ((PyObject *)__pyx_n_s__sequence)); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_132);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));
-  __pyx_k_codeobj_133 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__get_sequence, 59, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__94 = PyTuple_Pack(5, __pyx_n_s_chrom, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_fa, __pyx_n_s_sequence); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__94);
+  __Pyx_GIVEREF(__pyx_tuple__94);
+  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_get_sequence, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
   /* "pysam/cvcf.pyx":69
  * 
@@ -25479,10 +24815,10 @@ static int __Pyx_InitCachedConstants(void) {
  *     result = []
  *     for r in string.split(','):
  */
-  __pyx_k_tuple_136 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__string), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__r), ((PyObject *)__pyx_n_s__elts), ((PyObject *)__pyx_n_s__chrom), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_n_s__ielts)); if (unlikely(!__pyx_k_tuple_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_136);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_136));
-  __pyx_k_codeobj_137 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_regions, 69, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__96 = PyTuple_Pack(8, __pyx_n_s_string, __pyx_n_s_result, __pyx_n_s_r, __pyx_n_s_elts, __pyx_n_s_chrom, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_ielts); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__96);
+  __Pyx_GIVEREF(__pyx_tuple__96);
+  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse_regions, 69, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
   /* "pysam/cvcf.pyx":87
  * 
@@ -25491,519 +24827,534 @@ static int __Pyx_InitCachedConstants(void) {
  * 
  * ###########################################################################################################
  */
-  __pyx_k_tuple_139 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__FORMAT), ((PyObject *)__pyx_kp_s_138)); if (unlikely(!__pyx_k_tuple_139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_139);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_139));
+  __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_FORMAT, __pyx_kp_s_id_numbertype_number_type_descri); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__98);
+  __Pyx_GIVEREF(__pyx_tuple__98);
 
-  /* "pysam/cvcf.pyx":317
+  /* "pysam/cvcf.pyx":318
  *     _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_k_tuple_174 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s___copy), ((PyObject *)__pyx_n_s__reference), ((PyObject *)__pyx_n_s__regions), ((PyObject *)__pyx_n_s__lines), ((PyObject *)__pyx_n_s__leftalign), ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_174);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174));
-  __pyx_k_codeobj_175 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s____init__, 317, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_175)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__99 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_copy, __pyx_n_s_reference, __pyx_n_s_regions, __pyx_n_s_lines, __pyx_n_s_leftalign, __pyx_n_s_id); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__99);
+  __Pyx_GIVEREF(__pyx_tuple__99);
+  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_init, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__101 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__101);
+  __Pyx_GIVEREF(__pyx_tuple__101);
 
-  /* "pysam/cvcf.pyx":338
+  /* "pysam/cvcf.pyx":339
  *         self._lines = lines
  * 
  *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
  *         if error in self._ignored_errors: return
  *         errorlabel, errorstring = self._errors[error].split(':')
  */
-  __pyx_k_tuple_177 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__line), ((PyObject *)__pyx_n_s__error), ((PyObject *)__pyx_n_s__opt), ((PyObject *)__pyx_n_s__errorlabel), ((PyObject *)__pyx_n_s__errorstring), ((PyObject *)__pyx_n_s__errwarn)); if (unlikely(!__pyx_k_tuple_177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_177);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_177));
-  __pyx_k_codeobj_178 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__error, 338, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_k_tuple_179 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_k_tuple_179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_179);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_179));
+  __pyx_tuple__102 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_error, __pyx_n_s_opt, __pyx_n_s_errorlabel, __pyx_n_s_errorstring, __pyx_n_s_errwarn); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__102);
+  __Pyx_GIVEREF(__pyx_tuple__102);
+  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_error, 339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__104 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__104);
+  __Pyx_GIVEREF(__pyx_tuple__104);
 
-  /* "pysam/cvcf.pyx":347
+  /* "pysam/cvcf.pyx":348
  *         raise ValueError(errorstring)
  * 
  *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
  *         if self._version == 40:
  *             if not format.startswith('<'):
  */
-  __pyx_k_tuple_181 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__line), ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_n_s__filter), ((PyObject *)__pyx_n_s__data), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__elts), ((PyObject *)__pyx_n_s__first), ((PyObject *)__pyx_n_s__rest), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__t)); if (unlikely(!__pyx_k_tuple_181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; got [...]
-  __Pyx_GOTREF(__pyx_k_tuple_181);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_181));
-  __pyx_k_codeobj_182 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_format, 347, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__105 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_format, __pyx_n_s_filter_2, __pyx_n_s_data, __pyx_n_s_idx, __pyx_n_s_elts, __pyx_n_s_first, __pyx_n_s_rest, __pyx_n_s_n, __pyx_n_s_t); if (unlikely(!__pyx_tuple__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__105);
+  __Pyx_GIVEREF(__pyx_tuple__105);
+  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse_format, 348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__107 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__107);
+  __Pyx_GIVEREF(__pyx_tuple__107);
 
-  /* "pysam/cvcf.pyx":419
+  /* "pysam/cvcf.pyx":420
  *         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:
  */
-  __pyx_k_tuple_184 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__fmt), ((PyObject *)__pyx_n_s__filter), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__nmb), ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_184);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));
-  __pyx_k_codeobj_185 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__format_format, 419, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__108 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_fmt, __pyx_n_s_filter_2, __pyx_n_s_values, __pyx_n_s_nmb, __pyx_n_s_format, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__108);
+  __Pyx_GIVEREF(__pyx_tuple__108);
+  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_format_format, 420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__110 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__110);
+  __Pyx_GIVEREF(__pyx_tuple__110);
 
-  /* "pysam/cvcf.pyx":439
+  /* "pysam/cvcf.pyx":440
  *         return format
  * 
  *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
  *         fmt = formatdict[format]
  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
  */
-  __pyx_k_tuple_187 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_n_s__formatdict), ((PyObject *)__pyx_n_s__alt), ((PyObject *)__pyx_n_s__fmt)); if (unlikely(!__pyx_k_tuple_187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_187);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_187));
-  __pyx_k_codeobj_188 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__get_expected, 439, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__111 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_format, __pyx_n_s_formatdict, __pyx_n_s_alt, __pyx_n_s_fmt); if (unlikely(!__pyx_tuple__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__111);
+  __Pyx_GIVEREF(__pyx_tuple__111);
+  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_get_expected, 440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":450
+  /* "pysam/cvcf.pyx":451
  * 
  * 
  *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
  *         if key in formatdict: return
  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
  */
-  __pyx_k_tuple_190 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__formatdict), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__data), ((PyObject *)__pyx_n_s__line)); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_190);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
-  __pyx_k_codeobj_191 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s___add_definition, 450, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_191)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__113 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_formatdict, __pyx_n_s_key, __pyx_n_s_data, __pyx_n_s_line); if (unlikely(!__pyx_tuple__113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__113);
+  __Pyx_GIVEREF(__pyx_tuple__113);
+  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_add_definition, 451, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":467
+  /* "pysam/cvcf.pyx":468
  * 
  *     # 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_k_tuple_193 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__data), ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__separator), ((PyObject *)__pyx_n_s__output), ((PyObject *)__pyx_n_s__sdata), ((PyObject *)__pyx_n_s__d), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__last)); if (unlikely(!__pyx_k_tuple_193)) {__pyx_filename [...]
-  __Pyx_GOTREF(__pyx_k_tuple_193);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_193));
-  __pyx_k_codeobj_194 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__format_formatdata, 467, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__115 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_format, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_separator, __pyx_n_s_output_2, __pyx_n_s_sdata, __pyx_n_s_d, __pyx_n_s_k, __pyx_n_s_idx, __pyx_n_s_v, __pyx_n_s_last); if (unlikely(!__pyx_tuple__115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__115);
+  __Pyx_GIVEREF(__pyx_tuple__115);
+  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_format_formatdata, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__117 = PyTuple_Pack(3, ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject*)__pyx_kp_s__4)); if (unlikely(!__pyx_tuple__117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__117);
+  __Pyx_GIVEREF(__pyx_tuple__117);
 
-  /* "pysam/cvcf.pyx":501
+  /* "pysam/cvcf.pyx":502
  * 
  * 
  *     def enter_default_format(self):             # <<<<<<<<<<<<<<
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
  */
-  __pyx_k_tuple_196 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__f)); if (unlikely(!__pyx_k_tuple_196)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_196);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_196));
-  __pyx_k_codeobj_197 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s_121, 501, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_197)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_f); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__118);
+  __Pyx_GIVEREF(__pyx_tuple__118);
+  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_enter_default_format, 502, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":520
+  /* "pysam/cvcf.pyx":521
  *                 self._format[f.id] = f
  * 
  *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
  *         assert line.startswith('##')
  *         elts = line[2:].split('=')
  */
-  __pyx_k_tuple_199 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__line), ((PyObject *)__pyx_n_s__elts), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__f)); if (unlikely(!__pyx_k_tuple_199)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_199);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_199));
-  __pyx_k_codeobj_200 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_header, 520, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__120 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_elts, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_f); if (unlikely(!__pyx_tuple__120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__120);
+  __Pyx_GIVEREF(__pyx_tuple__120);
+  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse_header, 521, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":549
+  /* "pysam/cvcf.pyx":550
  * 
  * 
  *     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_k_tuple_202 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__var), ((PyObject *)__pyx_n_s__label), ((PyObject *)__pyx_n_s__f)); if (unlikely(!__pyx_k_tuple_202)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_202);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_202));
-  __pyx_k_codeobj_203 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__write_header, 549, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_203)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__122 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_var, __pyx_n_s_label, __pyx_n_s_f); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__122);
+  __Pyx_GIVEREF(__pyx_tuple__122);
+  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_write_header, 550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":556
+  /* "pysam/cvcf.pyx":557
  * 
  * 
  *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
  *         assert line.startswith('#')
  *         assert not line.startswith('##')
  */
-  __pyx_k_tuple_205 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__line), ((PyObject *)__pyx_n_s__headings), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__err), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__y)); if (unlikely(!__pyx_k_tuple_205)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_205);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_205));
-  __pyx_k_codeobj_206 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_heading, 556, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_206)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__124 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_headings, __pyx_n_s_i, __pyx_n_s_s, __pyx_n_s_err, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__124);
+  __Pyx_GIVEREF(__pyx_tuple__124);
+  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse_heading, 557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":584
+  /* "pysam/cvcf.pyx":585
  *         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_k_tuple_208 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__stream)); if (unlikely(!__pyx_k_tuple_208)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_208);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_208));
-  __pyx_k_codeobj_209 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__write_heading, 584, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__126 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_stream); if (unlikely(!__pyx_tuple__126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__126);
+  __Pyx_GIVEREF(__pyx_tuple__126);
+  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_write_heading, 585, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":587
+  /* "pysam/cvcf.pyx":588
  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
  * 
  *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
  *         if GTstring == ".": return ["."]
  *         try:
  */
-  __pyx_k_tuple_211 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__GTstring), ((PyObject *)__pyx_n_s__gts)); if (unlikely(!__pyx_k_tuple_211)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_211);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_211));
-  __pyx_k_codeobj_212 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__convertGT, 587, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__128 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_GTstring, __pyx_n_s_gts); if (unlikely(!__pyx_tuple__128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__128);
+  __Pyx_GIVEREF(__pyx_tuple__128);
+  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_convertGT, 588, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":599
+  /* "pysam/cvcf.pyx":600
  *             return [".","|","."]
  * 
  *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
  *         return ''.join(map(str,GTdata))
  * 
  */
-  __pyx_k_tuple_214 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__GTdata)); if (unlikely(!__pyx_k_tuple_214)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_214);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_214));
-  __pyx_k_codeobj_215 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__convertGTback, 599, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_215)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__130 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_GTdata); if (unlikely(!__pyx_tuple__130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__130);
+  __Pyx_GIVEREF(__pyx_tuple__130);
+  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_convertGTback, 600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":602
+  /* "pysam/cvcf.pyx":603
  *         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_k_tuple_217 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__formatdict), ((PyObject *)__pyx_n_s__line), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_217)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_217);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_217));
-  __pyx_k_codeobj_218 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_formatdata, 602, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_218)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__132 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_formatdict, __pyx_n_s_line, __pyx_n_s_f, __pyx_n_s_values, __pyx_n_s_idx, __pyx_n_s_v); if (unlikely(!__pyx_tuple__132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__132);
+  __Pyx_GIVEREF(__pyx_tuple__132);
+  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse_formatdata, 603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":644
+  /* "pysam/cvcf.pyx":645
  *             self.error(line,self.ERROR_INFO_STRING)
  * 
  *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
  *         if not self._regions: return True
  *         for r in self._regions:
  */
-  __pyx_k_tuple_220 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__chrom), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__r)); if (unlikely(!__pyx_k_tuple_220)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_220);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_220));
-  __pyx_k_codeobj_221 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__inregion, 644, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_221)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__134 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_chrom, __pyx_n_s_pos, __pyx_n_s_r); if (unlikely(!__pyx_tuple__134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__134);
+  __Pyx_GIVEREF(__pyx_tuple__134);
+  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_inregion, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":650
+  /* "pysam/cvcf.pyx":651
  *         return False
  * 
  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
  *         cols = line.split('\t')
  *         if len(cols) != len(self._samples)+9:
  */
-  __pyx_k_tuple_223 = PyTuple_Pack(45, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__line), ((PyObject *)__pyx_n_s__lineparse), ((PyObject *)__pyx_n_s__cols), ((PyObject *)__pyx_n_s__chrom), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__id), ((PyObject *)__pyx_n_s__ref), ((PyObject *)__pyx_n_s__c), ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__faref_leftflank), ((PyObject *)__pyx_n_s__faref), ((PyObject *)__pyx_n_s__alt), ((PyObject *)__pyx_n_s__qual), ((PyObjec [...]
-  __Pyx_GOTREF(__pyx_k_tuple_223);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_223));
-  __pyx_k_codeobj_224 = (PyObject*)__Pyx_PyCode_New(3, 0, 45, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_data, 650, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__136 = PyTuple_Pack(43, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_lineparse, __pyx_n_s_cols, __pyx_n_s_chrom, __pyx_n_s_pos, __pyx_n_s_id, __pyx_n_s_ref, __pyx_n_s_c, __pyx_n_s_left, __pyx_n_s_faref_leftflank, __pyx_n_s_faref, __pyx_n_s_alt, __pyx_n_s_qual, __pyx_n_s_filter_2, __pyx_n_s_info_2, __pyx_n_s_blurp, __pyx_n_s_elts, __pyx_n_s_v, __pyx_n_s_format, __pyx_n_s_f, __pyx_n_s_newalts, __pyx_n_s_have_deletions, __pyx_n_s_a, __pyx_n_s_l, __pyx_n_s_addns, __pyx_n_s_i, __py [...]
+  __Pyx_GOTREF(__pyx_tuple__136);
+  __Pyx_GIVEREF(__pyx_tuple__136);
+  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(3, 0, 43, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse_data, 651, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__138 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__138);
+  __Pyx_GIVEREF(__pyx_tuple__138);
 
-  /* "pysam/cvcf.pyx":860
+  /* "pysam/cvcf.pyx":863
  * 
  * 
  *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
  *         for k in required:
  */
-  __pyx_k_tuple_226 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__data), ((PyObject *)__pyx_n_s__required), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__alt), ((PyObject *)__pyx_n_s__filter), ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_n_s__output), ((PyObject *)__pyx_n_s__s)); if (unlikely(!__pyx_k_tuple_226)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_226);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_226));
-  __pyx_k_codeobj_227 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__write_data, 860, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_227)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__139 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_data, __pyx_n_s_required_2, __pyx_n_s_k, __pyx_n_s_alt, __pyx_n_s_filter_2, __pyx_n_s_qual, __pyx_n_s_output_2, __pyx_n_s_s); if (unlikely(!__pyx_tuple__139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__139);
+  __Pyx_GIVEREF(__pyx_tuple__139);
+  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_write_data, 863, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":889
+  /* "pysam/cvcf.pyx":892
  *         stream.write( "\t".join(output) + "\n" )
  * 
  *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
  *         self._lineno = 0
  *         for line in stream:
  */
-  __pyx_k_tuple_229 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__line)); if (unlikely(!__pyx_k_tuple_229)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_229);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_229));
-  __pyx_k_codeobj_230 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s___parse_header, 889, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_230)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__141 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_line); if (unlikely(!__pyx_tuple__141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__141);
+  __Pyx_GIVEREF(__pyx_tuple__141);
+  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse_header_2, 892, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":902
+  /* "pysam/cvcf.pyx":906
  *         return line
  * 
  *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
  *         # deal with files with header only
  *         if line.startswith("##"): return
  */
-  __pyx_k_tuple_232 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__line), ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__d)); if (unlikely(!__pyx_k_tuple_232)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_232);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_232));
-  __pyx_k_codeobj_233 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s___parse, 902, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_233)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__143 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_stream, __pyx_n_s_d); if (unlikely(!__pyx_tuple__143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__143);
+  __Pyx_GIVEREF(__pyx_tuple__143);
+  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse, 906, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":920
+  /* "pysam/cvcf.pyx":924
  *     ######################################################################################################
  * 
  *     def getsamples(self):             # <<<<<<<<<<<<<<
  *         """ List of samples in VCF file """
  *         return self._samples
  */
-  __pyx_k_tuple_235 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_235)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_235);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_235));
-  __pyx_k_codeobj_236 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getsamples, 920, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_236)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__145);
+  __Pyx_GIVEREF(__pyx_tuple__145);
+  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_getsamples, 924, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":924
+  /* "pysam/cvcf.pyx":928
  *         return self._samples
  * 
  *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
  *         """ List of samples in VCF file """
  *         self._samples = samples
  */
-  __pyx_k_tuple_238 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__samples)); if (unlikely(!__pyx_k_tuple_238)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_238);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_238));
-  __pyx_k_codeobj_239 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setsamples, 924, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_239)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_samples_2); if (unlikely(!__pyx_tuple__147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__147);
+  __Pyx_GIVEREF(__pyx_tuple__147);
+  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setsamples, 928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":928
+  /* "pysam/cvcf.pyx":932
  *         self._samples = samples
  * 
  *     def getheader(self):             # <<<<<<<<<<<<<<
  *         """ List of header key-value pairs (strings) """
  *         return self._header
  */
-  __pyx_k_tuple_241 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_241)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_241);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_241));
-  __pyx_k_codeobj_242 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getheader, 928, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_242)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__149 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__149);
+  __Pyx_GIVEREF(__pyx_tuple__149);
+  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_getheader, 932, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":932
+  /* "pysam/cvcf.pyx":936
  *         return self._header
  * 
  *     def setheader(self,header):             # <<<<<<<<<<<<<<
  *         """ List of header key-value pairs (strings) """
  *         self._header = header
  */
-  __pyx_k_tuple_244 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__header)); if (unlikely(!__pyx_k_tuple_244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_244);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_244));
-  __pyx_k_codeobj_245 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setheader, 932, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_245)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_header_2); if (unlikely(!__pyx_tuple__151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__151);
+  __Pyx_GIVEREF(__pyx_tuple__151);
+  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setheader, 936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":936
+  /* "pysam/cvcf.pyx":940
  *         self._header = header
  * 
  *     def getinfo(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         return self._info
  */
-  __pyx_k_tuple_247 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_247)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_247);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_247));
-  __pyx_k_codeobj_248 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getinfo, 936, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_248)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__153);
+  __Pyx_GIVEREF(__pyx_tuple__153);
+  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_getinfo, 940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":940
+  /* "pysam/cvcf.pyx":944
  *         return self._info
  * 
  *     def setinfo(self,info):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         self._info = info
  */
-  __pyx_k_tuple_250 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__info)); if (unlikely(!__pyx_k_tuple_250)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_250);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_250));
-  __pyx_k_codeobj_251 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setinfo, 940, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_251)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__155 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_info_2); if (unlikely(!__pyx_tuple__155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__155);
+  __Pyx_GIVEREF(__pyx_tuple__155);
+  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setinfo, 944, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":944
+  /* "pysam/cvcf.pyx":948
  *         self._info = info
  * 
  *     def getformat(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         return self._format
  */
-  __pyx_k_tuple_253 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_253)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_253);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_253));
-  __pyx_k_codeobj_254 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getformat, 944, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_254)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__157);
+  __Pyx_GIVEREF(__pyx_tuple__157);
+  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_getformat, 948, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":948
+  /* "pysam/cvcf.pyx":952
  *         return self._format
  * 
  *     def setformat(self,format):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         self._format = format
  */
-  __pyx_k_tuple_256 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__format)); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_256);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256));
-  __pyx_k_codeobj_257 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setformat, 948, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__159 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_format); if (unlikely(!__pyx_tuple__159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__159);
+  __Pyx_GIVEREF(__pyx_tuple__159);
+  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setformat, 952, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":952
+  /* "pysam/cvcf.pyx":956
  *         self._format = format
  * 
  *     def getfilter(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         return self._filter
  */
-  __pyx_k_tuple_259 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_259);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_259));
-  __pyx_k_codeobj_260 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getfilter, 952, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_260)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__161 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__161);
+  __Pyx_GIVEREF(__pyx_tuple__161);
+  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_getfilter, 956, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":956
+  /* "pysam/cvcf.pyx":960
  *         return self._filter
  * 
  *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         self._filter = filter
  */
-  __pyx_k_tuple_262 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filter)); if (unlikely(!__pyx_k_tuple_262)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_262);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_262));
-  __pyx_k_codeobj_263 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setfilter, 956, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_263)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__163 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_filter_2); if (unlikely(!__pyx_tuple__163)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__163);
+  __Pyx_GIVEREF(__pyx_tuple__163);
+  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setfilter, 960, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":960
+  /* "pysam/cvcf.pyx":964
  *         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_k_tuple_265 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__version)); if (unlikely(!__pyx_k_tuple_265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_265);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_265));
-  __pyx_k_codeobj_266 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setversion, 960, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_266)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_version_2); if (unlikely(!__pyx_tuple__165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__165);
+  __Pyx_GIVEREF(__pyx_tuple__165);
+  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setversion, 964, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":964
+  /* "pysam/cvcf.pyx":968
  *         self._version = version
  * 
  *     def setregions(self, regions):             # <<<<<<<<<<<<<<
  *         self._regions = regions
  * 
  */
-  __pyx_k_tuple_268 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__regions)); if (unlikely(!__pyx_k_tuple_268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_268);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_268));
-  __pyx_k_codeobj_269 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setregions, 964, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_269)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__167 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_regions); if (unlikely(!__pyx_tuple__167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__167);
+  __Pyx_GIVEREF(__pyx_tuple__167);
+  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setregions, 968, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":967
+  /* "pysam/cvcf.pyx":971
  *         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_k_tuple_271 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__ref)); if (unlikely(!__pyx_k_tuple_271)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_271);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_271));
-  __pyx_k_codeobj_272 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setreference, 967, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_272)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__169 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ref); if (unlikely(!__pyx_tuple__169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__169);
+  __Pyx_GIVEREF(__pyx_tuple__169);
+  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_setreference, 971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":971
+  /* "pysam/cvcf.pyx":975
  *         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_k_tuple_274 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__errorstring)); if (unlikely(!__pyx_k_tuple_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_274);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_274));
-  __pyx_k_codeobj_275 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__ignoreerror, 971, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_275)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__171 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_errorstring); if (unlikely(!__pyx_tuple__171)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__171);
+  __Pyx_GIVEREF(__pyx_tuple__171);
+  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_ignoreerror, 975, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":975
+  /* "pysam/cvcf.pyx":979
  *         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_k_tuple_277 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__errorstring)); if (unlikely(!__pyx_k_tuple_277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_277);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_277));
-  __pyx_k_codeobj_278 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__warnerror, 975, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_278)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__173 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_errorstring); if (unlikely(!__pyx_tuple__173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__173);
+  __Pyx_GIVEREF(__pyx_tuple__173);
+  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_warnerror, 979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":979
+  /* "pysam/cvcf.pyx":983
  *         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_k_tuple_280 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__last_line)); if (unlikely(!__pyx_k_tuple_280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_280);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_280));
-  __pyx_k_codeobj_281 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse, 979, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_281)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__175 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_last_line); if (unlikely(!__pyx_tuple__175)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__175);
+  __Pyx_GIVEREF(__pyx_tuple__175);
+  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_parse_2, 983, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":986
+  /* "pysam/cvcf.pyx":990
  *         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_k_tuple_283 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__datagenerator), ((PyObject *)__pyx_n_s__data)); if (unlikely(!__pyx_k_tuple_283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_283);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_283));
-  __pyx_k_codeobj_284 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__write, 986, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_284)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__177 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_datagenerator, __pyx_n_s_data); if (unlikely(!__pyx_tuple__177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__177);
+  __Pyx_GIVEREF(__pyx_tuple__177);
+  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_write, 990, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":992
+  /* "pysam/cvcf.pyx":996
  *         for data in datagenerator: self.write_data(stream,data)
  * 
  *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
  *         """ Writes a VCF header """
  *         self.write_header(stream)
  */
-  __pyx_k_tuple_286 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__stream)); if (unlikely(!__pyx_k_tuple_286)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_286);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_286));
-  __pyx_k_codeobj_287 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__writeheader, 992, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__179 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_stream); if (unlikely(!__pyx_tuple__179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__179);
+  __Pyx_GIVEREF(__pyx_tuple__179);
+  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_writeheader, 996, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":997
+  /* "pysam/cvcf.pyx":1001
  *         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_k_tuple_289 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__pos1), ((PyObject *)__pyx_n_s__ref1), ((PyObject *)__pyx_n_s__alt1), ((PyObject *)__pyx_n_s__pos2), ((PyObject *)__pyx_n_s__ref2), ((PyObject *)__pyx_n_s__alt2)); if (unlikely(!__pyx_k_tuple_289)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_289);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_289));
-  __pyx_k_codeobj_290 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__compare_calls, 997, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_290)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__181 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_pos1, __pyx_n_s_ref1, __pyx_n_s_alt1, __pyx_n_s_pos2, __pyx_n_s_ref2, __pyx_n_s_alt2); if (unlikely(!__pyx_tuple__181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__181);
+  __Pyx_GIVEREF(__pyx_tuple__181);
+  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_compare_calls, 1001, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":1019
+  /* "pysam/cvcf.pyx":1023
  * ###########################################################################################################
  * 
- *     def connect( self, filename ):             # <<<<<<<<<<<<<<
+ *     def connect(self, filename):             # <<<<<<<<<<<<<<
  *         '''connect to tabix file.'''
  *         self.tabixfile = pysam.Tabixfile( filename )
  */
-  __pyx_k_tuple_292 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filename)); if (unlikely(!__pyx_k_tuple_292)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_292);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_292));
-  __pyx_k_codeobj_293 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__connect, 1019, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_293)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__183 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__183);
+  __Pyx_GIVEREF(__pyx_tuple__183);
+  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_connect, 1023, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":1024
+  /* "pysam/cvcf.pyx":1028
  *         self._parse_header(self.tabixfile.header)
  * 
  *     def fetch(self,             # <<<<<<<<<<<<<<
  *               reference = None,
  *               start = None,
  */
-  __pyx_k_tuple_295 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__reference), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_n_s__region)); if (unlikely(!__pyx_k_tuple_295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_295);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_295));
-  __pyx_k_codeobj_296 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__fetch, 1024, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_296)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_k_tuple_297 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_k_tuple_297)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_297);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_297));
+  __pyx_tuple__185 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_reference, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_region); if (unlikely(!__pyx_tuple__185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__185);
+  __Pyx_GIVEREF(__pyx_tuple__185);
+  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_fetch, 1028, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__187 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__187);
+  __Pyx_GIVEREF(__pyx_tuple__187);
 
-  /* "pysam/cvcf.pyx":1033
- *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
+  /* "pysam/cvcf.pyx":1042
+ *             parser = asVCFRecord(self))
  * 
  *     def validate( self, record ):             # <<<<<<<<<<<<<<
  *         '''validate vcf record.
  * 
  */
-  __pyx_k_tuple_299 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__record)); if (unlikely(!__pyx_k_tuple_299)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_299);
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_299));
-  __pyx_k_codeobj_300 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__validate, 1033, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_300)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__188 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_record); if (unlikely(!__pyx_tuple__188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__188);
+  __Pyx_GIVEREF(__pyx_tuple__188);
+  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_andreas_devel_pysam_pysam, __pyx_n_s_validate, 1042, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_RefNannyFinishContext();
   return 0;
   __pyx_L1_error:;
@@ -26013,44 +25364,45 @@ static int __Pyx_InitCachedConstants(void) {
 
 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_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_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __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;};
+  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_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;}
+  __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_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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;}
+  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -26067,6 +25419,11 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   __Pyx_RefNannyDeclarations
   #if CYTHON_REFNANNY
   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
@@ -26104,14 +25461,8 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   __pyx_m = PyModule_Create(&__pyx_moduledef);
   #endif
   if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  #if PY_MAJOR_VERSION >= 3
-  {
-    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (!PyDict_GetItemString(modules, "pysam.cvcf")) {
-      if (unlikely(PyDict_SetItemString(modules, "pysam.cvcf", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-  }
-  #endif
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   #if CYTHON_COMPILING_IN_PYPY
   Py_INCREF(__pyx_b);
@@ -26119,9 +25470,20 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   /*--- Initialize various global constants etc. ---*/
   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
   if (__pyx_module_is_main_pysam__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;};
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "pysam.cvcf")) {
+      if (unlikely(PyDict_SetItemString(modules, "pysam.cvcf", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
   }
+  #endif
   /*--- Builtin init code ---*/
   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Constants init code ---*/
@@ -26137,6 +25499,7 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   __pyx_vtable_5pysam_4cvcf_VCFRecord.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_5pysam_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_4cvcf_9VCFRecord_update;
   __pyx_type_5pysam_4cvcf_VCFRecord.tp_base = __pyx_ptype_5pysam_10TabProxies_TupleProxy;
   if (PyType_Ready(&__pyx_type_5pysam_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_4cvcf_VCFRecord.tp_print = 0;
   if (__Pyx_SetVtable(__pyx_type_5pysam_4cvcf_VCFRecord.tp_dict, __pyx_vtabptr_5pysam_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__Pyx_SetAttrString(__pyx_m, "VCFRecord", (PyObject *)&__pyx_type_5pysam_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_4cvcf_VCFRecord = &__pyx_type_5pysam_4cvcf_VCFRecord;
@@ -26144,32 +25507,38 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   __pyx_vtabptr_5pysam_6ctabix_Parser = (struct __pyx_vtabstruct_5pysam_6ctabix_Parser*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_Parser->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_Parser)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_vtabptr_5pysam_4cvcf_asVCFRecord = &__pyx_vtable_5pysam_4cvcf_asVCFRecord;
   __pyx_vtable_5pysam_4cvcf_asVCFRecord.__pyx_base = *__pyx_vtabptr_5pysam_6ctabix_Parser;
+  __pyx_vtable_5pysam_4cvcf_asVCFRecord.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_6ctabix_Parser *, char *, int))__pyx_f_5pysam_4cvcf_11asVCFRecord_parse;
   __pyx_type_5pysam_4cvcf_asVCFRecord.tp_base = __pyx_ptype_5pysam_6ctabix_Parser;
   if (PyType_Ready(&__pyx_type_5pysam_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_4cvcf_asVCFRecord.tp_print = 0;
   if (__Pyx_SetVtable(__pyx_type_5pysam_4cvcf_asVCFRecord.tp_dict, __pyx_vtabptr_5pysam_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__Pyx_SetAttrString(__pyx_m, "asVCFRecord", (PyObject *)&__pyx_type_5pysam_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_4cvcf_asVCFRecord = &__pyx_type_5pysam_4cvcf_asVCFRecord;
-  if (PyType_Ready(&__pyx_type_5pysam_4cvcf___pyx_scope_struct__parse_data) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_4cvcf___pyx_scope_struct__parse_data = &__pyx_type_5pysam_4cvcf___pyx_scope_struct__parse_data;
-  if (PyType_Ready(&__pyx_type_5pysam_4cvcf___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_4cvcf___pyx_scope_struct_1_genexpr = &__pyx_type_5pysam_4cvcf___pyx_scope_struct_1_genexpr;
-  if (PyType_Ready(&__pyx_type_5pysam_4cvcf___pyx_scope_struct_2__parse) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_4cvcf___pyx_scope_struct_2__parse = &__pyx_type_5pysam_4cvcf___pyx_scope_struct_2__parse;
+  if (PyType_Ready(&__pyx_type_5pysam_4cvcf___pyx_scope_struct___parse) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_5pysam_4cvcf___pyx_scope_struct___parse.tp_print = 0;
+  __pyx_ptype_5pysam_4cvcf___pyx_scope_struct___parse = &__pyx_type_5pysam_4cvcf___pyx_scope_struct___parse;
   /*--- Type import code ---*/
-  __pyx_ptype_5pysam_6ctabix_tabix_file_iterator = __Pyx_ImportType("pysam.ctabix", "tabix_file_iterator", sizeof(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_tabix_file_iterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator = (struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_tabix_file_iterator->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_Tabixfile = __Pyx_ImportType("pysam.ctabix", "Tabixfile", sizeof(struct __pyx_obj_5pysam_6ctabix_Tabixfile), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_Tabixfile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_TabixIterator = __Pyx_ImportType("pysam.ctabix", "TabixIterator", sizeof(struct __pyx_obj_5pysam_6ctabix_TabixIterator), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_TabixIterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_TabixHeaderIterator = __Pyx_ImportType("pysam.ctabix", "TabixHeaderIterator", sizeof(struct __pyx_obj_5pysam_6ctabix_TabixHeaderIterator), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_TabixHeaderIterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_asTuple = __Pyx_ImportType("pysam.ctabix", "asTuple", sizeof(struct __pyx_obj_5pysam_6ctabix_asTuple), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_asTuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_6ctabix_asTuple = (struct __pyx_vtabstruct_5pysam_6ctabix_asTuple*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_asTuple->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_asTuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_asGTF = __Pyx_ImportType("pysam.ctabix", "asGTF", sizeof(struct __pyx_obj_5pysam_6ctabix_asGTF), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_asGTF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_6ctabix_asGTF = (struct __pyx_vtabstruct_5pysam_6ctabix_asGTF*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_asGTF->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_asGTF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_asBed = __Pyx_ImportType("pysam.ctabix", "asBed", sizeof(struct __pyx_obj_5pysam_6ctabix_asBed), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_asBed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_6ctabix_asBed = (struct __pyx_vtabstruct_5pysam_6ctabix_asBed*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_asBed->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_asBed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_asVCF = __Pyx_ImportType("pysam.ctabix", "asVCF", sizeof(struct __pyx_obj_5pysam_6ctabix_asVCF), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_asVCF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_vtabptr_5pysam_6ctabix_asVCF = (struct __pyx_vtabstruct_5pysam_6ctabix_asVCF*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_asVCF->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_asVCF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_5pysam_6ctabix_TabixIteratorParsed = __Pyx_ImportType("pysam.ctabix", "TabixIteratorParsed", sizeof(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_TabixIteratorParsed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_tabix_file_iterator = __Pyx_ImportType("pysam.ctabix", "tabix_file_iterator", sizeof(struct __pyx_obj_5pysam_6ctabix_tabix_file_iterator), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_tabix_file_iterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator = (struct __pyx_vtabstruct_5pysam_6ctabix_tabix_file_iterator*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_tabix_file_iterator->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_tabix_file_iterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_Tabixfile = __Pyx_ImportType("pysam.ctabix", "Tabixfile", sizeof(struct __pyx_obj_5pysam_6ctabix_Tabixfile), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_Tabixfile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_asTuple = __Pyx_ImportType("pysam.ctabix", "asTuple", sizeof(struct __pyx_obj_5pysam_6ctabix_asTuple), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_asTuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_asTuple = (struct __pyx_vtabstruct_5pysam_6ctabix_asTuple*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_asTuple->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_asTuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_asGTF = __Pyx_ImportType("pysam.ctabix", "asGTF", sizeof(struct __pyx_obj_5pysam_6ctabix_asGTF), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_asGTF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_asGTF = (struct __pyx_vtabstruct_5pysam_6ctabix_asGTF*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_asGTF->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_asGTF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_asBed = __Pyx_ImportType("pysam.ctabix", "asBed", sizeof(struct __pyx_obj_5pysam_6ctabix_asBed), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_asBed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_asBed = (struct __pyx_vtabstruct_5pysam_6ctabix_asBed*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_asBed->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_asBed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_asVCF = __Pyx_ImportType("pysam.ctabix", "asVCF", sizeof(struct __pyx_obj_5pysam_6ctabix_asVCF), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_asVCF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_asVCF = (struct __pyx_vtabstruct_5pysam_6ctabix_asVCF*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_asVCF->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_asVCF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_TabixIterator = __Pyx_ImportType("pysam.ctabix", "TabixIterator", sizeof(struct __pyx_obj_5pysam_6ctabix_TabixIterator), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_TabixIterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_TabixIterator = (struct __pyx_vtabstruct_5pysam_6ctabix_TabixIterator*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_TabixIterator->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_TabixIterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_TabixIteratorParsed = __Pyx_ImportType("pysam.ctabix", "TabixIteratorParsed", sizeof(struct __pyx_obj_5pysam_6ctabix_TabixIteratorParsed), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_TabixIteratorParsed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_TabixIteratorParsed = (struct __pyx_vtabstruct_5pysam_6ctabix_TabixIteratorParsed*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_TabixIteratorParsed->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_TabixIteratorParsed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_GZIterator = __Pyx_ImportType("pysam.ctabix", "GZIterator", sizeof(struct __pyx_obj_5pysam_6ctabix_GZIterator), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_GZIterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_GZIterator = (struct __pyx_vtabstruct_5pysam_6ctabix_GZIterator*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_GZIterator->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_GZIterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_GZIteratorHead = __Pyx_ImportType("pysam.ctabix", "GZIteratorHead", sizeof(struct __pyx_obj_5pysam_6ctabix_GZIteratorHead), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_GZIteratorHead)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_GZIteratorHead = (struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorHead*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_GZIteratorHead->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_GZIteratorHead)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5pysam_6ctabix_GZIteratorParsed = __Pyx_ImportType("pysam.ctabix", "GZIteratorParsed", sizeof(struct __pyx_obj_5pysam_6ctabix_GZIteratorParsed), 1); if (unlikely(!__pyx_ptype_5pysam_6ctabix_GZIteratorParsed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_vtabptr_5pysam_6ctabix_GZIteratorParsed = (struct __pyx_vtabstruct_5pysam_6ctabix_GZIteratorParsed*)__Pyx_GetVtable(__pyx_ptype_5pysam_6ctabix_GZIteratorParsed->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_6ctabix_GZIteratorParsed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_10TabProxies_GTFProxy = __Pyx_ImportType("pysam.TabProxies", "GTFProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_GTFProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_vtabptr_5pysam_10TabProxies_GTFProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_GTFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_GTFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5pysam_10TabProxies_NamedTupleProxy = __Pyx_ImportType("pysam.TabProxies", "NamedTupleProxy", sizeof(struct __pyx_obj_5pysam_10TabProxies_NamedTupleProxy), 1); if (unlikely(!__pyx_ptype_5pysam_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -26180,6 +25549,9 @@ PyMODINIT_FUNC PyInit_cvcf(void)
   __pyx_vtabptr_5pysam_10TabProxies_VCFProxy = (struct __pyx_vtabstruct_5pysam_10TabProxies_VCFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_10TabProxies_VCFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_5pysam_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   /*--- Variable import code ---*/
   /*--- Function import code ---*/
+  __pyx_t_1 = __Pyx_ImportModule("pysam.ctabix"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_ImportFunction(__pyx_t_1, "_force_str", (void (**)(void))&__pyx_f_5pysam_6ctabix__force_str, "PyObject *(PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   /*--- Execution code ---*/
 
   /* "pysam/cvcf.pyx":46
@@ -26189,34 +25561,26 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  * 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(__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), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyList_New(2); 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 (__pyx_t_1 == NULL) {
-    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__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 (__pyx_t_1 == NULL) {
-    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__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_INCREF(__pyx_n_s_namedtuple);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_namedtuple);
+  __Pyx_GIVEREF(__pyx_n_s_namedtuple);
+  __Pyx_INCREF(__pyx_n_s_defaultdict);
+  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_defaultdict);
+  __Pyx_GIVEREF(__pyx_n_s_defaultdict);
+  __pyx_t_3 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __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_ImportFrom(__pyx_t_3, __pyx_n_s_namedtuple); 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);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_defaultdict); 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);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_defaultdict, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
   /* "pysam/cvcf.pyx":47
  * 
@@ -26225,23 +25589,19 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  * 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(__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), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__itemgetter);
-  if (__pyx_t_2 == NULL) {
-    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__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_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_INCREF(__pyx_n_s_itemgetter);
+  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_itemgetter);
+  __Pyx_GIVEREF(__pyx_n_s_itemgetter);
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_operator, __pyx_t_3, -1); 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_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itemgetter, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   /* "pysam/cvcf.pyx":48
  * from collections import namedtuple, defaultdict
@@ -26250,22 +25610,22 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  * 
  * cimport ctabix
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __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, -1); 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;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__copy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__copy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__bisect), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  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;
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy_2, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_bisect, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bisect, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
   /* "pysam/cvcf.pyx":53
  * cimport TabProxies
@@ -26274,10 +25634,10 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  * 
  * gtsRegEx = re.compile("[|/\\\\]")
  */
-  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__pysam), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pysam, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pysam, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pysam, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
   /* "pysam/cvcf.pyx":55
  * import pysam
@@ -26286,16 +25646,16 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  * alleleRegEx = re.compile('^[ACGTN]+$')
  * 
  */
-  __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_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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); 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_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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gtsRegEx, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__gtsRegEx, __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;
 
   /* "pysam/cvcf.pyx":56
  * 
@@ -26304,16 +25664,16 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  * 
  * # Utility function.  Uses 0-based coordinates
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_131), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __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_d, __pyx_n_s_alleleRegEx, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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 = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   /* "pysam/cvcf.pyx":59
  * 
@@ -26322,10 +25682,10 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  *     # obtain sequence from .fa file, without truncation
  *     if end<=start: return ""
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_1get_sequence, NULL, __pyx_n_s_135); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_sequence, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_1get_sequence, NULL, __pyx_n_s_pysam_cvcf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_sequence, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
   /* "pysam/cvcf.pyx":69
  * 
@@ -26334,10 +25694,10 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  *     result = []
  *     for r in string.split(','):
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3parse_regions, NULL, __pyx_n_s_135); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__parse_regions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3parse_regions, NULL, __pyx_n_s_pysam_cvcf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_regions, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
   /* "pysam/cvcf.pyx":87
  * 
@@ -26346,912 +25706,879 @@ PyMODINIT_FUNC PyInit_cvcf(void)
  * 
  * ###########################################################################################################
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_139), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FORMAT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "pysam/cvcf.pyx":240
+  /* "pysam/cvcf.pyx":241
  *         return r
  * 
  * class VCF(object):             # <<<<<<<<<<<<<<
  * 
  *     # types
  */
-  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __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 = 241; __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_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_VCF, __pyx_n_s_VCF, (PyObject *) NULL, __pyx_n_s_pysam_cvcf, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
 
-  /* "pysam/cvcf.pyx":243
+  /* "pysam/cvcf.pyx":244
  * 
  *     # types
  *     NT_UNKNOWN = 0             # <<<<<<<<<<<<<<
  *     NT_NUMBER = 1
  *     NT_ALLELES = 2
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_UNKNOWN, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NT_UNKNOWN, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":244
+  /* "pysam/cvcf.pyx":245
  *     # types
  *     NT_UNKNOWN = 0
  *     NT_NUMBER = 1             # <<<<<<<<<<<<<<
  *     NT_ALLELES = 2
  *     NT_NR_ALLELES = 3
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_NUMBER, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NT_NUMBER, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":245
+  /* "pysam/cvcf.pyx":246
  *     NT_UNKNOWN = 0
  *     NT_NUMBER = 1
  *     NT_ALLELES = 2             # <<<<<<<<<<<<<<
  *     NT_NR_ALLELES = 3
  *     NT_GENOTYPES = 4
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_ALLELES, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NT_ALLELES, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":246
+  /* "pysam/cvcf.pyx":247
  *     NT_NUMBER = 1
  *     NT_ALLELES = 2
  *     NT_NR_ALLELES = 3             # <<<<<<<<<<<<<<
  *     NT_GENOTYPES = 4
  *     NT_PHASED_GENOTYPES = 5
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_NR_ALLELES, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NT_NR_ALLELES, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":247
+  /* "pysam/cvcf.pyx":248
  *     NT_ALLELES = 2
  *     NT_NR_ALLELES = 3
  *     NT_GENOTYPES = 4             # <<<<<<<<<<<<<<
  *     NT_PHASED_GENOTYPES = 5
  * 
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_GENOTYPES, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NT_GENOTYPES, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":248
+  /* "pysam/cvcf.pyx":249
  *     NT_NR_ALLELES = 3
  *     NT_GENOTYPES = 4
  *     NT_PHASED_GENOTYPES = 5             # <<<<<<<<<<<<<<
  * 
  *     _errors = { 0:"UNKNOWN_FORMAT_STRING:Unknown file format identifier",
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_PHASED_GENOTYPES, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NT_PHASED_GENOTYPES, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":250
+  /* "pysam/cvcf.pyx":251
  *     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_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __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_140)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, ((PyObject *)__pyx_kp_s_141)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_2, ((PyObject *)__pyx_kp_s_142)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_3, ((PyObject *)__pyx_kp_s_143)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_4, ((PyObject *)__pyx_kp_s_144)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_5, ((PyObject *)__pyx_kp_s_145)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_6, ((PyObject *)__pyx_kp_s_146)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_7, ((PyObject *)__pyx_kp_s_147)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_8, ((PyObject *)__pyx_kp_s_148)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_9, ((PyObject *)__pyx_kp_s_149)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_10, ((PyObject *)__pyx_kp_s_150)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_11, ((PyObject *)__pyx_kp_s_151)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_12, ((PyObject *)__pyx_kp_s_152)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_13, ((PyObject *)__pyx_kp_s_153)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_14, ((PyObject *)__pyx_kp_s_154)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_15, ((PyObject *)__pyx_kp_s_155)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_16, ((PyObject *)__pyx_kp_s_156)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_17, ((PyObject *)__pyx_kp_s_157)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_18, ((PyObject *)__pyx_kp_s_158)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_19, ((PyObject *)__pyx_kp_s_159)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_20, ((PyObject *)__pyx_kp_s_160)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_21, ((PyObject *)__pyx_kp_s_161)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_22, ((PyObject *)__pyx_kp_s_162)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_23, ((PyObject *)__pyx_kp_s_163)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_24, ((PyObject *)__pyx_kp_s_164)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_25, ((PyObject *)__pyx_kp_s_165)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_26, ((PyObject *)__pyx_kp_s_166)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_27, ((PyObject *)__pyx_kp_s_167)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_28, ((PyObject *)__pyx_kp_s_168)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_29, ((PyObject *)__pyx_kp_s_169)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_30, ((PyObject *)__pyx_kp_s_170)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_31, ((PyObject *)__pyx_kp_s_171)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_32, ((PyObject *)__pyx_kp_s_172)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_int_33, ((PyObject *)__pyx_kp_s_173)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __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 = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-  /* "pysam/cvcf.pyx":287
+  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_0, __pyx_kp_s_UNKNOWN_FORMAT_STRING_Unknown_fi) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_1, __pyx_kp_s_BADLY_FORMATTED_FORMAT_STRING_Fo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_2, __pyx_kp_s_BADLY_FORMATTED_HEADING_Did_not) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_3, __pyx_kp_s_BAD_NUMBER_OF_COLUMNS_Wrong_numb) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_4, __pyx_kp_s_POS_NOT_NUMERICAL_Position_colum) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_5, __pyx_kp_s_UNKNOWN_CHAR_IN_REF_Unknown_char) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_6, __pyx_kp_s_V33_BAD_REF_Reference_should_be) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_7, __pyx_kp_s_V33_BAD_ALLELE_Cannot_interpret) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_8, __pyx_kp_s_POS_NOT_POSITIVE_Position_field) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_9, __pyx_kp_s_QUAL_NOT_NUMERICAL_Quality_field) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_10, __pyx_kp_s_ERROR_INFO_STRING_Error_while_pa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_11, __pyx_kp_s_ERROR_UNKNOWN_KEY_Unknown_key_s) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_12, __pyx_kp_s_ERROR_FORMAT_NOT_NUMERICAL_Expec) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_13, __pyx_kp_s_ERROR_FORMAT_NOT_CHAR_Eexpected) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_14, __pyx_kp_s_FILTER_NOT_DEFINED_Identifier_s) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_15, __pyx_kp_s_FORMAT_NOT_DEFINED_Identifier_s) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_16, __pyx_kp_s_BAD_NUMBER_OF_VALUES_Found_too_m) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_17, __pyx_kp_s_BAD_NUMBER_OF_PARAMETERS_Found_u) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_18, __pyx_kp_s_BAD_GENOTYPE_Cannot_parse_genoty) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_19, __pyx_kp_s_V40_BAD_ALLELE_Bad_allele_found) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_20, __pyx_kp_s_MISSING_REF_Reference_allele_mis) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_21, __pyx_kp_s_V33_UNMATCHED_DELETION_Deleted_s) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_22, __pyx_kp_s_V40_MISSING_ANGLE_BRACKETS_Forma) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_23, __pyx_kp_s_FORMAT_MISSING_QUOTES_Descriptio) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_24, __pyx_kp_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_25, __pyx_kp_s_HEADING_NOT_SEPARATED_BY_TABS_He) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_26, __pyx_kp_s_WRONG_REF_Wrong_reference_s) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_27, __pyx_kp_s_ERROR_TRAILING_DATA_Numerical_fi) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_28, __pyx_kp_s_BAD_CHR_TAG_Error_calculating_ch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_29, __pyx_kp_s_ZERO_LENGTH_ALLELE_Found_zero_le) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_30, __pyx_kp_s_MISSING_INDEL_ALLELE_REF_BASE_In) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_31, __pyx_kp_s_ZERO_FOR_NON_FLAG_FIELD_number_s) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_32, __pyx_kp_s_ERROR_FORMAT_NOT_INTEGER_Expecte) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_5, __pyx_int_33, __pyx_kp_s_ERROR_FLAG_HAS_VALUE_Flag_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_errors, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "pysam/cvcf.pyx":288
  * 
  *     # 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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__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 = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_header, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":290
+  /* "pysam/cvcf.pyx":291
  * 
  *     # version number; 33=v3.3; 40=v4.0
  *     _version = 40             # <<<<<<<<<<<<<<
  * 
  *     # info, filter and format data
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":293
+  /* "pysam/cvcf.pyx":294
  * 
  *     # info, filter and format data
  *     _info = {}             # <<<<<<<<<<<<<<
  *     _filter = {}
  *     _format = {}
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __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 = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_info, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":294
+  /* "pysam/cvcf.pyx":295
  *     # info, filter and format data
  *     _info = {}
  *     _filter = {}             # <<<<<<<<<<<<<<
  *     _format = {}
  * 
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __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 = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_filter, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":295
+  /* "pysam/cvcf.pyx":296
  *     _info = {}
  *     _filter = {}
  *     _format = {}             # <<<<<<<<<<<<<<
  * 
  *     # header; and required columns
  */
-  __pyx_t_1 = PyDict_New(); 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));
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___format, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_format_2, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":298
+  /* "pysam/cvcf.pyx":299
  * 
  *     # header; and required columns
  *     _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"]             # <<<<<<<<<<<<<<
  *     _samples = []
  * 
  */
-  __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(((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_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_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_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_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_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_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_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_1, 8, ((PyObject *)__pyx_n_s__FORMAT));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORMAT));
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___required, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_5 = PyList_New(9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_INCREF(__pyx_n_s_CHROM);
+  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_CHROM);
+  __Pyx_GIVEREF(__pyx_n_s_CHROM);
+  __Pyx_INCREF(__pyx_n_s_POS);
+  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_POS);
+  __Pyx_GIVEREF(__pyx_n_s_POS);
+  __Pyx_INCREF(__pyx_n_s_ID_2);
+  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_ID_2);
+  __Pyx_GIVEREF(__pyx_n_s_ID_2);
+  __Pyx_INCREF(__pyx_n_s_REF);
+  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_n_s_REF);
+  __Pyx_GIVEREF(__pyx_n_s_REF);
+  __Pyx_INCREF(__pyx_n_s_ALT);
+  PyList_SET_ITEM(__pyx_t_5, 4, __pyx_n_s_ALT);
+  __Pyx_GIVEREF(__pyx_n_s_ALT);
+  __Pyx_INCREF(__pyx_n_s_QUAL);
+  PyList_SET_ITEM(__pyx_t_5, 5, __pyx_n_s_QUAL);
+  __Pyx_GIVEREF(__pyx_n_s_QUAL);
+  __Pyx_INCREF(__pyx_n_s_FILTER);
+  PyList_SET_ITEM(__pyx_t_5, 6, __pyx_n_s_FILTER);
+  __Pyx_GIVEREF(__pyx_n_s_FILTER);
+  __Pyx_INCREF(__pyx_n_s_INFO);
+  PyList_SET_ITEM(__pyx_t_5, 7, __pyx_n_s_INFO);
+  __Pyx_GIVEREF(__pyx_n_s_INFO);
+  __Pyx_INCREF(__pyx_n_s_FORMAT);
+  PyList_SET_ITEM(__pyx_t_5, 8, __pyx_n_s_FORMAT);
+  __Pyx_GIVEREF(__pyx_n_s_FORMAT);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_required, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":299
+  /* "pysam/cvcf.pyx":300
  *     # header; and required columns
  *     _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"]
  *     _samples = []             # <<<<<<<<<<<<<<
  * 
  *     # control behaviour
  */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__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 = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_samples, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":302
+  /* "pysam/cvcf.pyx":303
  * 
  *     # control behaviour
  *     _ignored_errors = set([11,31])   # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD             # <<<<<<<<<<<<<<
  *     _warn_errors = set([])
  *     _leftalign = False
  */
-  __pyx_t_1 = PySet_New(0); 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));
-  if (unlikely(PySet_Add(__pyx_t_1, __pyx_int_11) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(PySet_Add(__pyx_t_1, __pyx_int_31) < 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___ignored_errors, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PySet_Add(__pyx_t_5, __pyx_int_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PySet_Add(__pyx_t_5, __pyx_int_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ignored_errors, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":303
+  /* "pysam/cvcf.pyx":304
  *     # control behaviour
  *     _ignored_errors = set([11,31])   # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD
  *     _warn_errors = set([])             # <<<<<<<<<<<<<<
  *     _leftalign = False
  * 
  */
-  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___warn_errors, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_warn_errors, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":304
+  /* "pysam/cvcf.pyx":305
  *     _ignored_errors = set([11,31])   # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD
  *     _warn_errors = set([])
  *     _leftalign = False             # <<<<<<<<<<<<<<
  * 
  *     # reference sequence
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __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 = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_leftalign_2, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":307
+  /* "pysam/cvcf.pyx":308
  * 
  *     # reference sequence
  *     _reference = None             # <<<<<<<<<<<<<<
  * 
  *     # regions to include; None includes everything
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___reference, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_reference_2, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":310
+  /* "pysam/cvcf.pyx":311
  * 
  *     # regions to include; None includes everything
  *     _regions = None             # <<<<<<<<<<<<<<
  * 
  *     # statefull stuff
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___regions, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_regions_2, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":313
+  /* "pysam/cvcf.pyx":314
  * 
  *     # statefull stuff
  *     _lineno = -1             # <<<<<<<<<<<<<<
  *     _line = None
  *     _lines = None
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___lineno, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_lineno, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":314
+  /* "pysam/cvcf.pyx":315
  *     # statefull stuff
  *     _lineno = -1
  *     _line = None             # <<<<<<<<<<<<<<
  *     _lines = None
  * 
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___line, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_line_2, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":315
+  /* "pysam/cvcf.pyx":316
  *     _lineno = -1
  *     _line = None
  *     _lines = None             # <<<<<<<<<<<<<<
  * 
  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):
  */
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___lines, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_lines_2, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "pysam/cvcf.pyx":317
+  /* "pysam/cvcf.pyx":318
  *     _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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_1__init__, 0, __pyx_n_s_176, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_175)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyBool_FromLong(0); 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_CyFunction_Defaults(__pyx_defaults, __pyx_t_1)->__pyx_arg_leftalign = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_5pysam_4cvcf_3VCF_85__defaults__);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_1__init__, 0, __pyx_n_s_VCF___init, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__100)); 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);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__101);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":338
+  /* "pysam/cvcf.pyx":339
  *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_3error, 0, __pyx_n_s_180, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_178)); 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_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_179));
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__error, __pyx_t_1) < 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_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_3error, 0, __pyx_n_s_VCF_error, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__104);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_error, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":347
+  /* "pysam/cvcf.pyx":348
  *         raise ValueError(errorstring)
  * 
  *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
  *         if self._version == 40:
  *             if not format.startswith('<'):
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_5parse_format, 0, __pyx_n_s_183, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_182)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults1), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_1)->__pyx_arg_filter = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_5pysam_4cvcf_3VCF_87__defaults__);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_format, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_5parse_format, 0, __pyx_n_s_VCF_parse_format, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__107);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_parse_format, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":419
+  /* "pysam/cvcf.pyx":420
  *         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:
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_7format_format, 0, __pyx_n_s_186, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_185)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults2), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_1)->__pyx_arg_filter = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_5pysam_4cvcf_3VCF_89__defaults__);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__format_format, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_7format_format, 0, __pyx_n_s_VCF_format_format, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__110);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_format_format, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":439
+  /* "pysam/cvcf.pyx":440
  *         return format
  * 
  *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
  *         fmt = formatdict[format]
  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_9get_expected, 0, __pyx_n_s_189, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_188)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __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 = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_9get_expected, 0, __pyx_n_s_VCF_get_expected, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_get_expected, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":450
+  /* "pysam/cvcf.pyx":451
  * 
  * 
  *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
  *         if key in formatdict: return
  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_11_add_definition, 0, __pyx_n_s_192, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_191)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __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 = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_11_add_definition, 0, __pyx_n_s_VCF__add_definition, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_add_definition, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":467
+  /* "pysam/cvcf.pyx":468
  * 
  *     # 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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_13format_formatdata, 0, __pyx_n_s_195, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_194)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults3), 2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_1)->__pyx_arg_key = __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 = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_1)->__pyx_arg_value = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_5pysam_4cvcf_3VCF_91__defaults__);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__format_formatdata, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_13format_formatdata, 0, __pyx_n_s_VCF_format_formatdata, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__117);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_format_formatdata, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":501
+  /* "pysam/cvcf.pyx":502
  * 
  * 
  *     def enter_default_format(self):             # <<<<<<<<<<<<<<
  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_15enter_default_format, 0, __pyx_n_s_198, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_197)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_121, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_15enter_default_format, 0, __pyx_n_s_VCF_enter_default_format, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_enter_default_format, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":520
+  /* "pysam/cvcf.pyx":521
  *                 self._format[f.id] = f
  * 
  *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
  *         assert line.startswith('##')
  *         elts = line[2:].split('=')
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_17parse_header, 0, __pyx_n_s_201, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_200)); 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);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_header, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_17parse_header, 0, __pyx_n_s_VCF_parse_header, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_parse_header, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":549
+  /* "pysam/cvcf.pyx":550
  * 
  * 
  *     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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_19write_header, 0, __pyx_n_s_204, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_203)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __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 = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_19write_header, 0, __pyx_n_s_VCF_write_header, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_write_header, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":556
+  /* "pysam/cvcf.pyx":557
  * 
  * 
  *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
  *         assert line.startswith('#')
  *         assert not line.startswith('##')
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_21parse_heading, 0, __pyx_n_s_207, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_206)); 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__parse_heading, __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;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_21parse_heading, 0, __pyx_n_s_VCF_parse_heading, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_parse_heading, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":584
+  /* "pysam/cvcf.pyx":585
  *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_23write_heading, 0, __pyx_n_s_210, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_209)); 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);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write_heading, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_23write_heading, 0, __pyx_n_s_VCF_write_heading, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_write_heading, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":587
+  /* "pysam/cvcf.pyx":588
  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
  * 
  *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
  *         if GTstring == ".": return ["."]
  *         try:
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_25convertGT, 0, __pyx_n_s_213, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_212)); 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);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__convertGT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_25convertGT, 0, __pyx_n_s_VCF_convertGT, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_convertGT, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":599
+  /* "pysam/cvcf.pyx":600
  *             return [".","|","."]
  * 
  *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
  *         return ''.join(map(str,GTdata))
  * 
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_27convertGTback, 0, __pyx_n_s_216, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_215)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __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 = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_27convertGTback, 0, __pyx_n_s_VCF_convertGTback, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_convertGTback, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":602
+  /* "pysam/cvcf.pyx":603
  *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_29parse_formatdata, 0, __pyx_n_s_219, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_218)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __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 = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_29parse_formatdata, 0, __pyx_n_s_VCF_parse_formatdata, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_parse_formatdata, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":644
+  /* "pysam/cvcf.pyx":645
  *             self.error(line,self.ERROR_INFO_STRING)
  * 
  *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
  *         if not self._regions: return True
  *         for r in self._regions:
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_31inregion, 0, __pyx_n_s_222, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_221)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__inregion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_31inregion, 0, __pyx_n_s_VCF_inregion, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_inregion, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":650
+  /* "pysam/cvcf.pyx":651
  *         return False
  * 
  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
  *         cols = line.split('\t')
- *         if len(cols) != len(self._samples)+9:
- */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_33parse_data, 0, __pyx_n_s_225, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_224)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults4), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __Pyx_PyBool_FromLong(0); 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_CyFunction_Defaults(__pyx_defaults4, __pyx_t_1)->__pyx_arg_lineparse = __pyx_t_3;
-  __Pyx_GIVEREF(__pyx_t_3);
-  __pyx_t_3 = 0;
-  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_5pysam_4cvcf_3VCF_93__defaults__);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_data, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ *         if len(cols) != len(self._samples)+9:
+ */
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_33parse_data, 0, __pyx_n_s_VCF_parse_data, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__138);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_parse_data, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":860
+  /* "pysam/cvcf.pyx":863
  * 
  * 
  *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
  *         for k in required:
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_35write_data, 0, __pyx_n_s_228, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_227)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __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 = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_35write_data, 0, __pyx_n_s_VCF_write_data, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_write_data, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":889
+  /* "pysam/cvcf.pyx":892
  *         stream.write( "\t".join(output) + "\n" )
  * 
  *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
  *         self._lineno = 0
  *         for line in stream:
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_37_parse_header, 0, __pyx_n_s_231, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_230)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __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 = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_37_parse_header, 0, __pyx_n_s_VCF__parse_header, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_parse_header_2, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":902
+  /* "pysam/cvcf.pyx":906
  *         return line
  * 
  *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
  *         # deal with files with header only
  *         if line.startswith("##"): return
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_39_parse, 0, __pyx_n_s_234, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_233)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___parse, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_39_parse, 0, __pyx_n_s_VCF__parse, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_parse, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":920
+  /* "pysam/cvcf.pyx":924
  *     ######################################################################################################
  * 
  *     def getsamples(self):             # <<<<<<<<<<<<<<
  *         """ List of samples in VCF file """
  *         return self._samples
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_42getsamples, 0, __pyx_n_s_237, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_236)); 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__getsamples, __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;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_42getsamples, 0, __pyx_n_s_VCF_getsamples, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getsamples, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":924
+  /* "pysam/cvcf.pyx":928
  *         return self._samples
  * 
  *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
  *         """ List of samples in VCF file """
  *         self._samples = samples
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_44setsamples, 0, __pyx_n_s_240, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_239)); 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__setsamples, __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;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_44setsamples, 0, __pyx_n_s_VCF_setsamples, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_setsamples, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":928
+  /* "pysam/cvcf.pyx":932
  *         self._samples = samples
  * 
  *     def getheader(self):             # <<<<<<<<<<<<<<
  *         """ List of header key-value pairs (strings) """
  *         return self._header
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_46getheader, 0, __pyx_n_s_243, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_242)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __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 = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_46getheader, 0, __pyx_n_s_VCF_getheader, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getheader, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":932
+  /* "pysam/cvcf.pyx":936
  *         return self._header
  * 
  *     def setheader(self,header):             # <<<<<<<<<<<<<<
  *         """ List of header key-value pairs (strings) """
  *         self._header = header
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_48setheader, 0, __pyx_n_s_246, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_245)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __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 = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_48setheader, 0, __pyx_n_s_VCF_setheader, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_setheader, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":936
+  /* "pysam/cvcf.pyx":940
  *         self._header = header
  * 
  *     def getinfo(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         return self._info
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_50getinfo, 0, __pyx_n_s_249, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_248)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __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 = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_50getinfo, 0, __pyx_n_s_VCF_getinfo, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getinfo, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":940
+  /* "pysam/cvcf.pyx":944
  *         return self._info
  * 
  *     def setinfo(self,info):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
  *         self._info = info
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_52setinfo, 0, __pyx_n_s_252, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_251)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __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 = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_52setinfo, 0, __pyx_n_s_VCF_setinfo, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_setinfo, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":944
+  /* "pysam/cvcf.pyx":948
  *         self._info = info
  * 
  *     def getformat(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         return self._format
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_54getformat, 0, __pyx_n_s_255, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_254)); 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);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getformat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_54getformat, 0, __pyx_n_s_VCF_getformat, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getformat, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":948
+  /* "pysam/cvcf.pyx":952
  *         return self._format
  * 
  *     def setformat(self,format):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
  *         self._format = format
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_56setformat, 0, __pyx_n_s_258, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_257)); 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);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setformat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_56setformat, 0, __pyx_n_s_VCF_setformat, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_setformat, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":952
+  /* "pysam/cvcf.pyx":956
  *         self._format = format
  * 
  *     def getfilter(self):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         return self._filter
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_58getfilter, 0, __pyx_n_s_261, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_260)); 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__getfilter, __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;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_58getfilter, 0, __pyx_n_s_VCF_getfilter, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getfilter, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":956
+  /* "pysam/cvcf.pyx":960
  *         return self._filter
  * 
  *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
  *         self._filter = filter
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_60setfilter, 0, __pyx_n_s_264, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_263)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __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 = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_60setfilter, 0, __pyx_n_s_VCF_setfilter, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_setfilter, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":960
+  /* "pysam/cvcf.pyx":964
  *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_62setversion, 0, __pyx_n_s_267, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_266)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __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 = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_62setversion, 0, __pyx_n_s_VCF_setversion, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_setversion, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":964
+  /* "pysam/cvcf.pyx":968
  *         self._version = version
  * 
  *     def setregions(self, regions):             # <<<<<<<<<<<<<<
  *         self._regions = regions
  * 
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_64setregions, 0, __pyx_n_s_270, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_269)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setregions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_64setregions, 0, __pyx_n_s_VCF_setregions, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_setregions, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":967
+  /* "pysam/cvcf.pyx":971
  *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_66setreference, 0, __pyx_n_s_273, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_272)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __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 = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_66setreference, 0, __pyx_n_s_VCF_setreference, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_setreference, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":971
+  /* "pysam/cvcf.pyx":975
  *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_68ignoreerror, 0, __pyx_n_s_276, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_275)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __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 = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_68ignoreerror, 0, __pyx_n_s_VCF_ignoreerror, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ignoreerror, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":975
+  /* "pysam/cvcf.pyx":979
  *         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_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_70warnerror, 0, __pyx_n_s_279, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_278)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__warnerror, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_70warnerror, 0, __pyx_n_s_VCF_warnerror, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_warnerror, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":979
+  /* "pysam/cvcf.pyx":983
  *         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_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_72parse, 0, __pyx_n_s_282, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_281)); 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__parse, __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;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_72parse, 0, __pyx_n_s_VCF_parse, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_parse_2, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":986
+  /* "pysam/cvcf.pyx":990
  *         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_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_74write, 0, __pyx_n_s_285, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_284)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __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 = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_74write, 0, __pyx_n_s_VCF_write, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_write, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":992
+  /* "pysam/cvcf.pyx":996
  *         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_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_76writeheader, 0, __pyx_n_s_288, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_287)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __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 = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_76writeheader, 0, __pyx_n_s_VCF_writeheader, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_writeheader, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":997
+  /* "pysam/cvcf.pyx":1001
  *         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_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_78compare_calls, 0, __pyx_n_s_291, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_290)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __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 = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_78compare_calls, 0, __pyx_n_s_VCF_compare_calls, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compare_calls, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":1019
+  /* "pysam/cvcf.pyx":1023
  * ###########################################################################################################
  * 
- *     def connect( self, filename ):             # <<<<<<<<<<<<<<
+ *     def connect(self, filename):             # <<<<<<<<<<<<<<
  *         '''connect to tabix file.'''
  *         self.tabixfile = pysam.Tabixfile( filename )
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_80connect, 0, __pyx_n_s_294, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_293)); 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);
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__connect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_80connect, 0, __pyx_n_s_VCF_connect, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_connect, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":1024
+  /* "pysam/cvcf.pyx":1028
  *         self._parse_header(self.tabixfile.header)
  * 
  *     def fetch(self,             # <<<<<<<<<<<<<<
  *               reference = None,
  *               start = None,
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_82fetch, 0, __pyx_n_s_298, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_296)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_297));
-  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__fetch, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_82fetch, 0, __pyx_n_s_VCF_fetch, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__187);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_fetch, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":1033
- *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
+  /* "pysam/cvcf.pyx":1042
+ *             parser = asVCFRecord(self))
  * 
  *     def validate( self, record ):             # <<<<<<<<<<<<<<
  *         '''validate vcf record.
  * 
  */
-  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_84validate, 0, __pyx_n_s_301, NULL, __pyx_n_s_135, ((PyObject *)__pyx_k_codeobj_300)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __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 = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_4cvcf_3VCF_84validate, 0, __pyx_n_s_VCF_validate, NULL, __pyx_n_s_pysam_cvcf, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_validate, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "pysam/cvcf.pyx":240
+  /* "pysam/cvcf.pyx":241
  *         return r
  * 
  * class VCF(object):             # <<<<<<<<<<<<<<
  * 
  *     # types
  */
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_builtin_object);
-  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
-  __Pyx_GIVEREF(__pyx_builtin_object);
-  __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2), __pyx_n_s__VCF, __pyx_n_s__VCF, __pyx_n_s_135); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __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 = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_VCF, __pyx_t_3, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VCF, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
-  /* "pysam/cvcf.pyx":1158
+  /* "pysam/cvcf.pyx":1169
  *                     pos -= 1
  * 
  * __all__ = [             # <<<<<<<<<<<<<<
  *     "VCF", "VCFRecord", ]
  * 
  */
-  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__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 = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_INCREF(__pyx_n_s_VCF);
+  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_VCF);
+  __Pyx_GIVEREF(__pyx_n_s_VCF);
+  __Pyx_INCREF(__pyx_n_s_VCFRecord);
+  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_VCFRecord);
+  __Pyx_GIVEREF(__pyx_n_s_VCFRecord);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
   /* "pysam/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;
+  __pyx_t_3 = PyDict_New(); 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);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __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;
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
   if (__pyx_m) {
     __Pyx_AddTraceback("init pysam.cvcf", __pyx_clineno, __pyx_lineno, __pyx_filename);
     Py_DECREF(__pyx_m); __pyx_m = 0;
@@ -27284,17 +26611,15 @@ end:
 }
 #endif /* CYTHON_REFNANNY */
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
-    PyObject *result;
-    result = PyObject_GetAttr(dict, name);
-    if (!result) {
-        if (dict != __pyx_b) {
-            PyErr_Clear();
-            result = PyObject_GetAttr(__pyx_b, name);
-        }
-        if (!result) {
-            PyErr_SetObject(PyExc_NameError, name);
-        }
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
     }
     return result;
 }
@@ -27319,7 +26644,7 @@ static void __Pyx_RaiseArgtupleInvalid(
         more_or_less = "exactly";
     }
     PyErr_Format(PyExc_TypeError,
-                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                  func_name, more_or_less, num_expected,
                  (num_expected == 1) ? "" : "s", num_found);
 }
@@ -27423,12 +26748,12 @@ arg_passed_twice:
     goto bad;
 invalid_keyword_type:
     PyErr_Format(PyExc_TypeError,
-        "%s() keywords must be strings", function_name);
+        "%.200s() keywords must be strings", function_name);
     goto bad;
 invalid_keyword:
     PyErr_Format(PyExc_TypeError,
     #if PY_MAJOR_VERSION < 3
-        "%s() got an unexpected keyword argument '%s'",
+        "%.200s() got an unexpected keyword argument '%.200s'",
         function_name, PyString_AsString(key));
     #else
         "%s() got an unexpected keyword argument '%U'",
@@ -27438,6 +26763,155 @@ bad:
     return -1;
 }
 
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (result) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
+    }
+    return result;
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+#endif
+    result = (*call)(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+    Py_LeaveRecursiveCall();
+#endif
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        PyObject *r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        PyObject *r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+            PyObject *r = PyList_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    else if (PyTuple_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return NULL;
+                }
+            }
+            return m->sq_item(o, i);
+        }
+    }
+#else
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
+    }
+#endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->exc_type;
+    *value = tstate->exc_value;
+    *tb = tstate->exc_traceback;
+    Py_XINCREF(*type);
+    Py_XINCREF(*value);
+    Py_XINCREF(*tb);
+#else
+    PyErr_GetExcInfo(type, value, tb);
+#endif
+}
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = type;
+    tstate->exc_value = value;
+    tstate->exc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(type, value, tb);
+#endif
+}
+
 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
     PyObject *local_type, *local_value, *local_tb;
 #if CYTHON_COMPILING_IN_CPYTHON
@@ -27460,12 +26934,14 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
 #endif
         goto bad;
     #if PY_MAJOR_VERSION >= 3
-    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
-        goto bad;
+    if (local_tb) {
+        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+            goto bad;
+    }
     #endif
-    Py_INCREF(local_type);
-    Py_INCREF(local_value);
-    Py_INCREF(local_tb);
+    Py_XINCREF(local_tb);
+    Py_XINCREF(local_type);
+    Py_XINCREF(local_value);
     *type = local_type;
     *value = local_value;
     *tb = local_tb;
@@ -27476,8 +26952,6 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
     tstate->exc_type = local_type;
     tstate->exc_value = local_value;
     tstate->exc_traceback = local_tb;
-    /* Make sure tstate is in a consistent state when we XDECREF
-       these objects (DECREF may run arbitrary code). */
     Py_XDECREF(tmp_type);
     Py_XDECREF(tmp_value);
     Py_XDECREF(tmp_tb);
@@ -27564,24 +27038,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
         }
         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);
+        if (PyInstance_Check(type)) {
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
             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;
-            }
+        } 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);
@@ -27613,46 +27086,62 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
         value = type;
         type = (PyObject*) Py_TYPE(value);
     } else if (PyExceptionClass_Check(type)) {
-        PyObject *args;
-        if (!value)
-            args = PyTuple_New(0);
-        else if (PyTuple_Check(value)) {
-            Py_INCREF(value);
-            args = value;
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
         }
-        else
-            args = PyTuple_Pack(1, value);
-        if (!args)
-            goto bad;
-        owned_instance = PyEval_CallObject(type, args);
-        Py_DECREF(args);
-        if (!owned_instance)
-            goto bad;
-        value = owned_instance;
-        if (!PyExceptionInstance_Check(value)) {
-            PyErr_Format(PyExc_TypeError,
-                         "calling %R should have returned an instance of "
-                         "BaseException, not %R",
-                         type, Py_TYPE(value));
-            goto bad;
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
         }
     } else {
         PyErr_SetString(PyExc_TypeError,
             "raise: exception class must be a subclass of BaseException");
         goto bad;
     }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
     if (cause && cause != Py_None) {
+#endif
         PyObject *fixed_cause;
-        if (PyExceptionClass_Check(cause)) {
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
             fixed_cause = PyObject_CallObject(cause, NULL);
             if (fixed_cause == NULL)
                 goto bad;
-        }
-        else if (PyExceptionInstance_Check(cause)) {
+        } else if (PyExceptionInstance_Check(cause)) {
             fixed_cause = cause;
             Py_INCREF(fixed_cause);
-        }
-        else {
+        } else {
             PyErr_SetString(PyExc_TypeError,
                             "exception causes must derive from "
                             "BaseException");
@@ -27676,13 +27165,143 @@ bad:
 }
 #endif
 
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+    if (s1 == s2) {
+        return (equals == Py_EQ);
+    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
+        const char *ps1, *ps2;
+        Py_ssize_t length = PyBytes_GET_SIZE(s1);
+        if (length != PyBytes_GET_SIZE(s2))
+            return (equals == Py_NE);
+        ps1 = PyBytes_AS_STRING(s1);
+        ps2 = PyBytes_AS_STRING(s2);
+        if (ps1[0] != ps2[0]) {
+            return (equals == Py_NE);
+        } else if (length == 1) {
+            return (equals == Py_EQ);
+        } else {
+            int result = memcmp(ps1, ps2, (size_t)length);
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
+        return (equals == Py_NE);
+    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
+        return (equals == Py_NE);
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+#endif
+}
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+#if PY_MAJOR_VERSION < 3
+    PyObject* owned_ref = NULL;
+#endif
+    int s1_is_unicode, s2_is_unicode;
+    if (s1 == s2) {
+        goto return_eq;
+    }
+    s1_is_unicode = PyUnicode_CheckExact(s1);
+    s2_is_unicode = PyUnicode_CheckExact(s2);
+#if PY_MAJOR_VERSION < 3
+    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
+        owned_ref = PyUnicode_FromObject(s2);
+        if (unlikely(!owned_ref))
+            return -1;
+        s2 = owned_ref;
+        s2_is_unicode = 1;
+    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
+        owned_ref = PyUnicode_FromObject(s1);
+        if (unlikely(!owned_ref))
+            return -1;
+        s1 = owned_ref;
+        s1_is_unicode = 1;
+    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
+        return __Pyx_PyBytes_Equals(s1, s2, equals);
+    }
+#endif
+    if (s1_is_unicode & s2_is_unicode) {
+        Py_ssize_t length;
+        int kind;
+        void *data1, *data2;
+        #if CYTHON_PEP393_ENABLED
+        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
+            return -1;
+        #endif
+        length = __Pyx_PyUnicode_GET_LENGTH(s1);
+        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
+            goto return_ne;
+        }
+        kind = __Pyx_PyUnicode_KIND(s1);
+        if (kind != __Pyx_PyUnicode_KIND(s2)) {
+            goto return_ne;
+        }
+        data1 = __Pyx_PyUnicode_DATA(s1);
+        data2 = __Pyx_PyUnicode_DATA(s2);
+        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
+            goto return_ne;
+        } else if (length == 1) {
+            goto return_eq;
+        } else {
+            int result = memcmp(data1, data2, length * kind);
+            #if PY_MAJOR_VERSION < 3
+            Py_XDECREF(owned_ref);
+            #endif
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & s2_is_unicode) {
+        goto return_ne;
+    } else if ((s2 == Py_None) & s1_is_unicode) {
+        goto return_ne;
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+return_eq:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_EQ);
+return_ne:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_NE);
+#endif
+}
+
 static double __Pyx__PyObject_AsDouble(PyObject* obj) {
     PyObject* float_value;
 #if CYTHON_COMPILING_IN_PYPY
     float_value = PyNumber_Float(obj);
 #else
-    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
-        return PyFloat_AsDouble(obj);
+    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
+    if (likely(nb) && likely(nb->nb_float)) {
+        float_value = nb->nb_float(obj);
+        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
+            PyErr_Format(PyExc_TypeError,
+                "__float__ returned non-float (type %.200s)",
+                Py_TYPE(float_value)->tp_name);
+            Py_DECREF(float_value);
+            goto bad;
+        }
     } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
 #if PY_MAJOR_VERSION >= 3
         float_value = PyFloat_FromString(obj);
@@ -27711,6 +27330,109 @@ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
 }
 
+#if !CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
+    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL)
+}
+#endif
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
+        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyMappingMethods* mp;
+#if PY_MAJOR_VERSION < 3
+    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
+    if (likely(ms && ms->sq_slice)) {
+        if (!has_cstart) {
+            if (_py_start && (*_py_start != Py_None)) {
+                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
+                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstart = 0;
+        }
+        if (!has_cstop) {
+            if (_py_stop && (*_py_stop != Py_None)) {
+                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
+                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstop = PY_SSIZE_T_MAX;
+        }
+        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
+            Py_ssize_t l = ms->sq_length(obj);
+            if (likely(l >= 0)) {
+                if (cstop < 0) {
+                    cstop += l;
+                    if (cstop < 0) cstop = 0;
+                }
+                if (cstart < 0) {
+                    cstart += l;
+                    if (cstart < 0) cstart = 0;
+                }
+            } else {
+                if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                    PyErr_Clear();
+                else
+                    goto bad;
+            }
+        }
+        return ms->sq_slice(obj, cstart, cstop);
+    }
+#endif
+    mp = Py_TYPE(obj)->tp_as_mapping;
+    if (likely(mp && mp->mp_subscript))
+#endif
+    {
+        PyObject* result;
+        PyObject *py_slice, *py_start, *py_stop;
+        if (_py_slice) {
+            py_slice = *_py_slice;
+        } else {
+            PyObject* owned_start = NULL;
+            PyObject* owned_stop = NULL;
+            if (_py_start) {
+                py_start = *_py_start;
+            } else {
+                if (has_cstart) {
+                    owned_start = py_start = PyInt_FromSsize_t(cstart);
+                    if (unlikely(!py_start)) goto bad;
+                } else
+                    py_start = Py_None;
+            }
+            if (_py_stop) {
+                py_stop = *_py_stop;
+            } else {
+                if (has_cstop) {
+                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
+                    if (unlikely(!py_stop)) {
+                        Py_XDECREF(owned_start);
+                        goto bad;
+                    }
+                } else
+                    py_stop = Py_None;
+            }
+            py_slice = PySlice_New(py_start, py_stop, Py_None);
+            Py_XDECREF(owned_start);
+            Py_XDECREF(owned_stop);
+            if (unlikely(!py_slice)) goto bad;
+        }
+#if CYTHON_COMPILING_IN_CPYTHON
+        result = mp->mp_subscript(obj, py_slice);
+#else
+        result = PyObject_GetItem(obj, py_slice);
+#endif
+        if (!_py_slice) {
+            Py_DECREF(py_slice);
+        }
+        return result;
+    }
+    PyErr_Format(PyExc_TypeError,
+        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
+bad:
+    return NULL;
+}
+
 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
     PyErr_Format(PyExc_ValueError,
                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
@@ -27718,7 +27440,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
 
 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
     PyErr_Format(PyExc_ValueError,
-                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
+                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                  index, (index == 1) ? "" : "s");
 }
 
@@ -27774,6 +27496,76 @@ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b)
     return q;
 }
 
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
+    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
+    if (start < 0) {
+        start += length;
+        if (start < 0)
+            start = 0;
+    }
+    if (stop < 0)
+        stop += length;
+    else if (stop > length)
+        stop = length;
+    *_length = stop - start;
+    *_start = start;
+    *_stop = stop;
+}
+static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
+    PyObject *v;
+    Py_ssize_t i;
+    for (i = 0; i < length; i++) {
+        v = dest[i] = src[i];
+        Py_INCREF(v);
+    }
+}
+static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
+            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
+    PyObject* dest;
+    Py_ssize_t length = PyList_GET_SIZE(src);
+    __Pyx_crop_slice(&start, &stop, &length);
+    if (unlikely(length <= 0))
+        return PyList_New(0);
+    dest = PyList_New(length);
+    if (unlikely(!dest))
+        return NULL;
+    __Pyx_copy_object_array(
+        ((PyListObject*)src)->ob_item + start,
+        ((PyListObject*)dest)->ob_item,
+        length);
+    return dest;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
+            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
+    PyObject* dest;
+    Py_ssize_t length = PyTuple_GET_SIZE(src);
+    __Pyx_crop_slice(&start, &stop, &length);
+    if (unlikely(length <= 0))
+        return PyTuple_New(0);
+    dest = PyTuple_New(length);
+    if (unlikely(!dest))
+        return NULL;
+    __Pyx_copy_object_array(
+        ((PyTupleObject*)src)->ob_item + start,
+        ((PyTupleObject*)dest)->ob_item,
+        length);
+    return dest;
+}
+#endif
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+    if (likely(PyList_CheckExact(L))) {
+        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+    } else {
+        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+        if (unlikely(!retval))
+            return -1;
+        Py_DECREF(retval);
+    }
+    return 0;
+}
+
 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
 }
@@ -27848,7 +27640,7 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di
     *p_orig_length = 0;
     if (method_name) {
         PyObject* iter;
-        iterable = PyObject_CallMethodObjArgs(iterable, method_name, NULL);
+        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
         if (!iterable)
             return NULL;
 #if !CYTHON_COMPILING_IN_PYPY
@@ -27928,205 +27720,208 @@ static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t ori
     return 1;
 }
 
-static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
-    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
-}
-
-static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
-    PyTypeObject* type = Py_TYPE(obj);
-    while (type && type->tp_dealloc != current_tp_dealloc)
-        type = type->tp_base;
-    while (type && type->tp_dealloc == current_tp_dealloc)
-        type = type->tp_base;
-    if (type)
-        type->tp_dealloc(obj);
-}
-
-static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
-    PyTypeObject* type = Py_TYPE(obj);
-    while (type && type->tp_traverse != current_tp_traverse)
-        type = type->tp_base;
-    while (type && type->tp_traverse == current_tp_traverse)
-        type = type->tp_base;
-    if (type && type->tp_traverse)
-        return type->tp_traverse(obj, v, a);
-    return 0;
-}
-
-static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
-    PyTypeObject* type = Py_TYPE(obj);
-    while (type && type->tp_clear != current_tp_clear)
-        type = type->tp_base;
-    while (type && type->tp_clear == current_tp_clear)
-        type = type->tp_base;
-    if (type && type->tp_clear)
-        type->tp_clear(obj);
-}
-
-static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    PyThreadState *tstate = PyThreadState_GET();
-    *type = tstate->exc_type;
-    *value = tstate->exc_value;
-    *tb = tstate->exc_traceback;
-    Py_XINCREF(*type);
-    Py_XINCREF(*value);
-    Py_XINCREF(*tb);
-#else
-    PyErr_GetExcInfo(type, value, tb);
-#endif
+static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
+    int r;
+    if (!j) return -1;
+    r = PyObject_SetItem(o, j, v);
+    Py_DECREF(j);
+    return r;
 }
-static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
+                                               int is_list, int wraparound, int boundscheck) {
 #if CYTHON_COMPILING_IN_CPYTHON
-    PyObject *tmp_type, *tmp_value, *tmp_tb;
-    PyThreadState *tstate = PyThreadState_GET();
-    tmp_type = tstate->exc_type;
-    tmp_value = tstate->exc_value;
-    tmp_tb = tstate->exc_traceback;
-    tstate->exc_type = type;
-    tstate->exc_value = value;
-    tstate->exc_traceback = tb;
-    Py_XDECREF(tmp_type);
-    Py_XDECREF(tmp_value);
-    Py_XDECREF(tmp_tb);
-#else
-    PyErr_SetExcInfo(type, value, tb);
-#endif
-}
-
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
-    PyObject *empty_list = 0;
-    PyObject *module = 0;
-    PyObject *global_dict = 0;
-    PyObject *empty_dict = 0;
-    PyObject *list;
-    #if PY_VERSION_HEX < 0x03030000
-    PyObject *py_import = 0;
-    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
-    if (!py_import)
-        goto bad;
-    #endif
-    if (from_list)
-        list = from_list;
-    else {
-        empty_list = PyList_New(0);
-        if (!empty_list)
-            goto bad;
-        list = empty_list;
-    }
-    global_dict = PyModule_GetDict(__pyx_m);
-    if (!global_dict)
-        goto bad;
-    empty_dict = PyDict_New();
-    if (!empty_dict)
-        goto bad;
-    #if PY_VERSION_HEX >= 0x02050000
-    {
-        #if PY_MAJOR_VERSION >= 3
-        if (level == -1) {
-            if (strchr(__Pyx_MODULE_NAME, '.')) {
-                #if PY_VERSION_HEX < 0x03030000
-                PyObject *py_level = PyInt_FromLong(1);
-                if (!py_level)
-                    goto bad;
-                module = PyObject_CallFunctionObjArgs(py_import,
-                    name, global_dict, empty_dict, list, py_level, NULL);
-                Py_DECREF(py_level);
-                #else
-                module = PyImport_ImportModuleLevelObject(
-                    name, global_dict, empty_dict, list, 1);
-                #endif
-                if (!module) {
-                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
-                        goto bad;
-                    PyErr_Clear();
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
+        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
+            PyObject* old = PyList_GET_ITEM(o, n);
+            Py_INCREF(v);
+            PyList_SET_ITEM(o, n, v);
+            Py_DECREF(old);
+            return 1;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_ass_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return -1;
                 }
             }
-            level = 0; /* try absolute import on failure */
-        }
-        #endif
-        if (!module) {
-            #if PY_VERSION_HEX < 0x03030000
-            PyObject *py_level = PyInt_FromLong(level);
-            if (!py_level)
-                goto bad;
-            module = PyObject_CallFunctionObjArgs(py_import,
-                name, global_dict, empty_dict, list, py_level, NULL);
-            Py_DECREF(py_level);
-            #else
-            module = PyImport_ImportModuleLevelObject(
-                name, global_dict, empty_dict, list, level);
-            #endif
+            return m->sq_ass_item(o, i, v);
         }
     }
-    #else
-    if (level>0) {
-        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
-        goto bad;
+#else
+#if CYTHON_COMPILING_IN_PYPY
+    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
+#else
+    if (is_list || PySequence_Check(o)) {
+#endif
+        return PySequence_SetItem(o, i, v);
     }
-    module = PyObject_CallFunctionObjArgs(py_import,
-        name, global_dict, empty_dict, list, NULL);
-    #endif
+#endif
+    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
+}
+
+static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
+    PyTypeObject* type = Py_TYPE(obj);
+    while (type && type->tp_dealloc != current_tp_dealloc)
+        type = type->tp_base;
+    while (type && type->tp_dealloc == current_tp_dealloc)
+        type = type->tp_base;
+    if (type)
+        type->tp_dealloc(obj);
+}
+
+static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
+    PyTypeObject* type = Py_TYPE(obj);
+    while (type && type->tp_traverse != current_tp_traverse)
+        type = type->tp_base;
+    while (type && type->tp_traverse == current_tp_traverse)
+        type = type->tp_base;
+    if (type && type->tp_traverse)
+        return type->tp_traverse(obj, v, a);
+    return 0;
+}
+
+static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
+    PyTypeObject* type = Py_TYPE(obj);
+    while (type && type->tp_clear != current_tp_clear)
+        type = type->tp_base;
+    while (type && type->tp_clear == current_tp_clear)
+        type = type->tp_base;
+    if (type && type->tp_clear)
+        type->tp_clear(obj);
+}
+
+static void* __Pyx_GetVtable(PyObject *dict) {
+    void* ptr;
+    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
+    if (!ob)
+        goto bad;
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    ptr = PyCapsule_GetPointer(ob, 0);
+#else
+    ptr = PyCObject_AsVoidPtr(ob);
+#endif
+    if (!ptr && !PyErr_Occurred())
+        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
+    Py_DECREF(ob);
+    return ptr;
 bad:
-    #if PY_VERSION_HEX < 0x03030000
-    Py_XDECREF(py_import);
-    #endif
-    Py_XDECREF(empty_list);
-    Py_XDECREF(empty_dict);
-    return module;
+    Py_XDECREF(ob);
+    return NULL;
 }
 
-static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
-#if PY_MAJOR_VERSION < 3
-    PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
-                 PyString_AsString(name));
+static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    PyObject *ob = PyCapsule_New(vtable, 0, 0);
 #else
-    PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
+    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
 #endif
+    if (!ob)
+        goto bad;
+    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
+        goto bad;
+    Py_DECREF(ob);
+    return 0;
+bad:
+    Py_XDECREF(ob);
+    return -1;
+}
+
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+        PyErr_Format(PyExc_ImportError,
+        #if PY_MAJOR_VERSION < 3
+            "cannot import name %.230s", PyString_AS_STRING(name));
+        #else
+            "cannot import name %S", name);
+        #endif
+    }
+    return value;
 }
 
-static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
-    PyObject *metaclass;
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+    for (i=0; i < nbases; i++) {
+        PyTypeObject *tmptype;
+        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+        tmptype = Py_TYPE(tmp);
 #if PY_MAJOR_VERSION < 3
-    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
-        PyObject *base = PyTuple_GET_ITEM(bases, 0);
-        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
+        if (tmptype == &PyClass_Type)
+            continue;
+#endif
         if (!metaclass) {
-            PyErr_Clear();
-            metaclass = (PyObject*) Py_TYPE(base);
+            metaclass = tmptype;
+            continue;
         }
-    } else {
-        metaclass = (PyObject *) &PyClass_Type;
+        if (PyType_IsSubtype(metaclass, tmptype))
+            continue;
+        if (PyType_IsSubtype(tmptype, metaclass)) {
+            metaclass = tmptype;
+            continue;
+        }
+        PyErr_SetString(PyExc_TypeError,
+                        "metaclass conflict: "
+                        "the metaclass of a derived class "
+                        "must be a (non-strict) subclass "
+                        "of the metaclasses of all its bases");
+        return NULL;
     }
+    if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+        metaclass = &PyClass_Type;
 #else
-    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;
-    }
+        metaclass = &PyType_Type;
 #endif
-    Py_INCREF(metaclass);
-    return metaclass;
+    }
+    Py_INCREF((PyObject*) metaclass);
+    return (PyObject*) metaclass;
 }
 
-static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
-                                   PyObject *qualname, PyObject *modname) {
-    PyObject *result;
-    PyObject *metaclass;
-    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
-        return NULL;
-    if (PyDict_SetItemString(dict, "__qualname__", qualname) < 0)
-        return NULL;
-    metaclass = PyDict_GetItemString(dict, "__metaclass__");
-    if (metaclass) {
-        Py_INCREF(metaclass);
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+    PyObject* fake_module;
+    PyTypeObject* cached_type = NULL;
+    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+    if (!fake_module) return NULL;
+    Py_INCREF(fake_module);
+    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+    if (cached_type) {
+        if (!PyType_Check((PyObject*)cached_type)) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s is not a type object",
+                type->tp_name);
+            goto bad;
+        }
+        if (cached_type->tp_basicsize != type->tp_basicsize) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s has the wrong size, try recompiling",
+                type->tp_name);
+            goto bad;
+        }
     } else {
-        metaclass = __Pyx_FindPy2Metaclass(bases);
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+        PyErr_Clear();
+        if (PyType_Ready(type) < 0) goto bad;
+        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+            goto bad;
+        Py_INCREF(type);
+        cached_type = type;
     }
-    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
-    Py_DECREF(metaclass);
-    return result;
+done:
+    Py_DECREF(fake_module);
+    return cached_type;
+bad:
+    Py_XDECREF(cached_type);
+    cached_type = NULL;
+    goto done;
 }
 
 static PyObject *
@@ -28261,11 +28056,10 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
     return 0;
 }
 static PyObject *
-__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
 {
-    PyObject* dict = PyModule_GetDict(__pyx_m);
-    Py_XINCREF(dict);
-    return dict;
+    Py_INCREF(op->func_globals);
+    return op->func_globals;
 }
 static PyObject *
 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
@@ -28280,23 +28074,104 @@ __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
     Py_INCREF(result);
     return result;
 }
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+    PyObject *res = op->defaults_getter((PyObject *) op);
+    if (unlikely(!res))
+        return -1;
+    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+    Py_INCREF(op->defaults_tuple);
+    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+    Py_INCREF(op->defaults_kwdict);
+    Py_DECREF(res);
+    return 0;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyTuple_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__defaults__ must be set to a tuple object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_tuple;
+    op->defaults_tuple = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
 static PyObject *
-__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
-{
-    if (op->defaults_tuple) {
-        Py_INCREF(op->defaults_tuple);
-        return op->defaults_tuple;
-    }
-    if (op->defaults_getter) {
-        PyObject *res = op->defaults_getter((PyObject *) op);
-        if (likely(res)) {
-            Py_INCREF(res);
-            op->defaults_tuple = res;
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_tuple;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_tuple;
+        } else {
+            result = Py_None;
         }
-        return res;
     }
-    Py_INCREF(Py_None);
-    return Py_None;
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__kwdefaults__ must be set to a dict object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_kwdict;
+    op->defaults_kwdict = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_kwdict;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_kwdict;
+        } else {
+            result = Py_None;
+        }
+    }
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value || value == Py_None) {
+        value = NULL;
+    } else if (!PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__annotations__ must be set to a dict object");
+        return -1;
+    }
+    Py_XINCREF(value);
+    tmp = op->func_annotations;
+    op->func_annotations = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->func_annotations;
+    if (unlikely(!result)) {
+        result = PyDict_New();
+        if (unlikely(!result)) return NULL;
+        op->func_annotations = result;
+    }
+    Py_INCREF(result);
+    return result;
 }
 static PyGetSetDef __pyx_CyFunction_getsets[] = {
     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
@@ -28313,8 +28188,10 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = {
     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
-    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
-    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
+    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
     {0, 0, 0, 0, 0}
 };
 #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
@@ -28338,7 +28215,7 @@ static PyMethodDef __pyx_CyFunction_methods[] = {
     {0, 0, 0, 0}
 };
 static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
-                                      PyObject *closure, PyObject *module, PyObject* code) {
+                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
     __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
     if (op == NULL)
         return NULL;
@@ -28356,12 +28233,16 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f
     op->func_qualname = qualname;
     op->func_doc = NULL;
     op->func_classobj = NULL;
+    op->func_globals = globals;
+    Py_INCREF(op->func_globals);
     Py_XINCREF(code);
     op->func_code = code;
     op->defaults_pyobjects = 0;
     op->defaults = NULL;
     op->defaults_tuple = NULL;
+    op->defaults_kwdict = NULL;
     op->defaults_getter = NULL;
+    op->func_annotations = NULL;
     PyObject_GC_Track(op);
     return (PyObject *) op;
 }
@@ -28374,9 +28255,12 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
     Py_CLEAR(m->func_name);
     Py_CLEAR(m->func_qualname);
     Py_CLEAR(m->func_doc);
+    Py_CLEAR(m->func_globals);
     Py_CLEAR(m->func_code);
     Py_CLEAR(m->func_classobj);
     Py_CLEAR(m->defaults_tuple);
+    Py_CLEAR(m->defaults_kwdict);
+    Py_CLEAR(m->func_annotations);
     if (m->defaults) {
         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
         int i;
@@ -28403,9 +28287,11 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit,
     Py_VISIT(m->func_name);
     Py_VISIT(m->func_qualname);
     Py_VISIT(m->func_doc);
+    Py_VISIT(m->func_globals);
     Py_VISIT(m->func_code);
     Py_VISIT(m->func_classobj);
     Py_VISIT(m->defaults_tuple);
+    Py_VISIT(m->defaults_kwdict);
     if (m->defaults) {
         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
         int i;
@@ -28546,14 +28432,18 @@ static PyTypeObject __pyx_CyFunctionType_type = {
 #if PY_VERSION_HEX >= 0x02060000
     0,                                  /*tp_version_tag*/
 #endif
+#if PY_VERSION_HEX >= 0x030400a1
+    0,                                  /*tp_finalize*/
+#endif
 };
 static int __Pyx_CyFunction_init(void) {
 #if !CYTHON_COMPILING_IN_PYPY
     __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
 #endif
-    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
+    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+    if (__pyx_CyFunctionType == NULL) {
         return -1;
-    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
+    }
     return 0;
 }
 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
@@ -28561,7 +28451,7 @@ static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t
     m->defaults = PyMem_Malloc(size);
     if (!m->defaults)
         return PyErr_NoMemory();
-    memset(m->defaults, 0, sizeof(size));
+    memset(m->defaults, 0, size);
     m->defaults_pyobjects = pyobjects;
     return m->defaults;
 }
@@ -28570,427 +28460,428 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyOb
     m->defaults_tuple = tuple;
     Py_INCREF(tuple);
 }
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults_kwdict = dict;
+    Py_INCREF(dict);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->func_annotations = dict;
+    Py_INCREF(dict);
+}
 
-static 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;
-    if ((sizeof(uint32_t) == sizeof(char))  ||
-        (sizeof(uint32_t) == sizeof(short))) {
-        return PyInt_FromLong((long)val);
-    } else if ((sizeof(uint32_t) == sizeof(int)) ||
-               (sizeof(uint32_t) == sizeof(long))) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLong((unsigned long)val);
-        else
-            return PyInt_FromLong((long)val);
-    } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
-        if (is_unsigned)
-            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
-        else
-            return PyLong_FromLongLong((PY_LONG_LONG)val);
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+    PyObject *ns;
+    if (metaclass) {
+        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+        if (prep) {
+            PyObject *pargs = PyTuple_Pack(2, name, bases);
+            if (unlikely(!pargs)) {
+                Py_DECREF(prep);
+                return NULL;
+            }
+            ns = PyObject_Call(prep, pargs, mkw);
+            Py_DECREF(prep);
+            Py_DECREF(pargs);
+        } else {
+            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+                return NULL;
+            PyErr_Clear();
+            ns = PyDict_New();
+        }
     } else {
-        int one = 1; int little = (int)*(unsigned char *)&one;
-        unsigned char *bytes = (unsigned char *)&val;
-        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
-                                     little, !is_unsigned);
+        ns = PyDict_New();
     }
+    if (unlikely(!ns))
+        return NULL;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+    return ns;
+bad:
+    Py_DECREF(ns);
+    return NULL;
 }
-
-static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
-    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned char" :
-                    "value too large to convert to unsigned char");
-            }
-            return (unsigned char)-1;
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+                                      PyObject *dict, PyObject *mkw,
+                                      int calculate_metaclass, int allow_py2_metaclass) {
+    PyObject *result, *margs;
+    PyObject *owned_metaclass = NULL;
+    if (allow_py2_metaclass) {
+        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+        if (owned_metaclass) {
+            metaclass = owned_metaclass;
+        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+            PyErr_Clear();
+        } else {
+            return NULL;
         }
-        return (unsigned char)val;
     }
-    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
+    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+        Py_XDECREF(owned_metaclass);
+        if (unlikely(!metaclass))
+            return NULL;
+        owned_metaclass = metaclass;
+    }
+    margs = PyTuple_Pack(3, name, bases, dict);
+    if (unlikely(!margs)) {
+        result = NULL;
+    } else {
+        result = PyObject_Call(metaclass, margs, mkw);
+        Py_DECREF(margs);
+    }
+    Py_XDECREF(owned_metaclass);
+    return result;
 }
 
-static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
-    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned short" :
-                    "value too large to convert to unsigned short");
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+    if (!py_import)
+        goto bad;
+    #endif
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    #if PY_VERSION_HEX >= 0x02050000
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                #if PY_VERSION_HEX < 0x03030000
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
             }
-            return (unsigned short)-1;
+            level = 0; /* try absolute import on failure */
         }
-        return (unsigned short)val;
-    }
-    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
-}
-
-static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
-    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(unsigned int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(unsigned int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to unsigned int" :
-                    "value too large to convert to unsigned int");
-            }
-            return (unsigned int)-1;
+        #endif
+        if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
         }
-        return (unsigned int)val;
     }
-    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
-}
-
-static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
-    const char neg_one = (char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to char" :
-                    "value too large to convert to char");
-            }
-            return (char)-1;
-        }
-        return (char)val;
+    #else
+    if (level>0) {
+        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
+        goto bad;
     }
-    return (char)__Pyx_PyInt_AsLong(x);
+    module = PyObject_CallFunctionObjArgs(py_import,
+        name, global_dict, empty_dict, list, NULL);
+    #endif
+bad:
+    #if PY_VERSION_HEX < 0x03030000
+    Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
+    Py_XDECREF(empty_dict);
+    return module;
 }
 
-static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
-    const short neg_one = (short)-1, const_zero = 0;
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-    if (sizeof(short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to short" :
-                    "value too large to convert to short");
-            }
-            return (short)-1;
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
-        return (short)val;
-    }
-    return (short)__Pyx_PyInt_AsLong(x);
-}
-
-static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
-    const int neg_one = (int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to int" :
-                    "value too large to convert to int");
-            }
-            return (int)-1;
+    } else {
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
         }
-        return (int)val;
     }
-    return (int)__Pyx_PyInt_AsLong(x);
-}
-
-static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
-    const signed char neg_one = (signed char)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed char) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed char)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed char" :
-                    "value too large to convert to signed char");
-            }
-            return (signed char)-1;
-        }
-        return (signed char)val;
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
     }
-    return (signed char)__Pyx_PyInt_AsSignedLong(x);
 }
 
-static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
-    const signed short neg_one = (signed short)-1, const_zero = 0;
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
+    const uint32_t neg_one = (uint32_t) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed short) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed short)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed short" :
-                    "value too large to convert to signed short");
-            }
-            return (signed short)-1;
+    if (is_unsigned) {
+        if (sizeof(uint32_t) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(uint32_t) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
         }
-        return (signed short)val;
-    }
-    return (signed short)__Pyx_PyInt_AsSignedLong(x);
-}
-
-static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
-    const signed int neg_one = (signed int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(signed int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(signed int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to signed int" :
-                    "value too large to convert to signed int");
-            }
-            return (signed int)-1;
+    } else {
+        if (sizeof(uint32_t) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(uint32_t) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
         }
-        return (signed int)val;
     }
-    return (signed int)__Pyx_PyInt_AsSignedLong(x);
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
+                                     little, !is_unsigned);
+    }
 }
 
-static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
-    const int neg_one = (int)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-    if (sizeof(int) < sizeof(long)) {
-        long val = __Pyx_PyInt_AsLong(x);
-        if (unlikely(val != (long)(int)val)) {
-            if (!unlikely(val == -1 && PyErr_Occurred())) {
-                PyErr_SetString(PyExc_OverflowError,
-                    (is_unsigned && unlikely(val < 0)) ?
-                    "can't convert negative value to int" :
-                    "value too large to convert to int");
-            }
-            return (int)-1;
-        }
-        return (int)val;
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
+    {                                                                     \
+        func_type value = func(x);                                        \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                PyErr_SetString(PyExc_OverflowError,                      \
+                    (is_unsigned && unlikely(value < zero)) ?             \
+                    "can't convert negative value to " #target_type :     \
+                    "value too large to convert to " #target_type);       \
+                return (target_type) -1;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
     }
-    return (int)__Pyx_PyInt_AsLong(x);
-}
 
-static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
-    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned long");
-            return (unsigned long)-1;
-        }
-        return (unsigned long)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to unsigned long");
-                return (unsigned long)-1;
+                                "can't convert negative value to long");
+                return (long) -1;
             }
-            return (unsigned long)PyLong_AsUnsignedLong(x);
-        } else {
-            return (unsigned long)PyLong_AsLong(x);
-        }
-    } else {
-        unsigned long val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (unsigned long)-1;
-        val = __Pyx_PyInt_AsUnsignedLong(tmp);
-        Py_DECREF(tmp);
-        return val;
-    }
-}
-
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
-    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to unsigned PY_LONG_LONG");
-            return (unsigned PY_LONG_LONG)-1;
+            return (long) val;
         }
-        return (unsigned PY_LONG_LONG)val;
     } else
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to unsigned PY_LONG_LONG");
-                return (unsigned PY_LONG_LONG)-1;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
+                }
             }
-            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
-        } else {
-            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
-        }
-    } else {
-        unsigned PY_LONG_LONG val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (unsigned PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
-        Py_DECREF(tmp);
-        return val;
-    }
-}
-
-static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
-    const long neg_one = (long)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to long");
-            return (long)-1;
-        }
-        return (long)val;
-    } else
+ #endif
 #endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
                                 "can't convert negative value to long");
-                return (long)-1;
+                return (long) -1;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (long)PyLong_AsUnsignedLong(x);
         } else {
-            return (long)PyLong_AsLong(x);
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (long) -1;
         }
     } else {
         long val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (long)-1;
-        val = __Pyx_PyInt_AsLong(tmp);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
         Py_DECREF(tmp);
         return val;
     }
 }
 
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
-    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to PY_LONG_LONG");
-            return (PY_LONG_LONG)-1;
-        }
-        return (PY_LONG_LONG)val;
-    } else
-#endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to PY_LONG_LONG");
-                return (PY_LONG_LONG)-1;
+                                "can't convert negative value to int");
+                return (int) -1;
             }
-            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
-        } else {
-            return (PY_LONG_LONG)PyLong_AsLongLong(x);
-        }
-    } else {
-        PY_LONG_LONG val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsLongLong(tmp);
-        Py_DECREF(tmp);
-        return val;
-    }
-}
-
-static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
-    const signed long neg_one = (signed long)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed long");
-            return (signed long)-1;
+            return (int) val;
         }
-        return (signed long)val;
     } else
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
-            if (unlikely(Py_SIZE(x) < 0)) {
-                PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to signed long");
-                return (signed long)-1;
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
+                }
             }
-            return (signed long)PyLong_AsUnsignedLong(x);
-        } else {
-            return (signed long)PyLong_AsLong(x);
-        }
-    } else {
-        signed long val;
-        PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (signed long)-1;
-        val = __Pyx_PyInt_AsSignedLong(tmp);
-        Py_DECREF(tmp);
-        return val;
-    }
-}
-
-static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
-    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
-    const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
-    if (likely(PyInt_Check(x))) {
-        long val = PyInt_AS_LONG(x);
-        if (is_unsigned && unlikely(val < 0)) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "can't convert negative value to signed PY_LONG_LONG");
-            return (signed PY_LONG_LONG)-1;
-        }
-        return (signed PY_LONG_LONG)val;
-    } else
+ #endif
 #endif
-    if (likely(PyLong_Check(x))) {
-        if (is_unsigned) {
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "can't convert negative value to signed PY_LONG_LONG");
-                return (signed PY_LONG_LONG)-1;
+                                "can't convert negative value to int");
+                return (int) -1;
+            }
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
             }
-            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
         } else {
-            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(int)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+ #endif
+#endif
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int) -1;
         }
     } else {
-        signed PY_LONG_LONG val;
+        int val;
         PyObject *tmp = __Pyx_PyNumber_Int(x);
-        if (!tmp) return (signed PY_LONG_LONG)-1;
-        val = __Pyx_PyInt_AsSignedLongLong(tmp);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
         Py_DECREF(tmp);
         return val;
     }
@@ -29064,7 +28955,7 @@ static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
     Py_DECREF(ev);
 #else
     {
-        PyObject* args = PyObject_GetAttrString(ev, "args");
+        PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args);
         Py_DECREF(ev);
         if (likely(args)) {
             value = PyObject_GetItem(args, 0);
@@ -29200,7 +29091,7 @@ static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
             if (value == Py_None)
                 ret = PyIter_Next(yf);
             else
-                ret = PyObject_CallMethod(yf, (char*)"send", (char*)"O", value);
+                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
         }
         gen->is_running = 0;
         if (likely(ret)) {
@@ -29220,7 +29111,7 @@ static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
     } else {
         PyObject *meth;
         gen->is_running = 1;
-        meth = PyObject_GetAttrString(yf, "close");
+        meth = PyObject_GetAttr(yf, __pyx_n_s_close);
         if (unlikely(!meth)) {
             if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                 PyErr_WriteUnraisable(yf);
@@ -29305,7 +29196,7 @@ static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
         if (__Pyx_Generator_CheckExact(yf)) {
             ret = __Pyx_Generator_Throw(yf, args);
         } else {
-            PyObject *meth = PyObject_GetAttrString(yf, "throw");
+            PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw);
             if (unlikely(!meth)) {
                 Py_DECREF(yf);
                 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
@@ -29356,13 +29247,17 @@ static void __Pyx_Generator_dealloc(PyObject *self) {
     PyObject_GC_UnTrack(gen);
     if (gen->gi_weakreflist != NULL)
         PyObject_ClearWeakRefs(self);
-    PyObject_GC_Track(self);
     if (gen->resume_label > 0) {
+        PyObject_GC_Track(self);
+#if PY_VERSION_HEX >= 0x030400a1
+        if (PyObject_CallFinalizerFromDealloc(self))
+#else
         Py_TYPE(gen)->tp_del(self);
         if (self->ob_refcnt > 0)
+#endif
             return;                     /* resurrected.  :( */
+        PyObject_GC_UnTrack(self);
     }
-    PyObject_GC_UnTrack(self);
     __Pyx_Generator_clear(self);
     PyObject_GC_Del(gen);
 }
@@ -29372,8 +29267,10 @@ static void __Pyx_Generator_del(PyObject *self) {
     __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
     if (gen->resume_label <= 0)
         return ;
+#if PY_VERSION_HEX < 0x030400a1
     assert(self->ob_refcnt == 0);
     self->ob_refcnt = 1;
+#endif
     __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
     res = __Pyx_Generator_Close(self);
     if (res == NULL)
@@ -29381,6 +29278,7 @@ static void __Pyx_Generator_del(PyObject *self) {
     else
         Py_DECREF(res);
     __Pyx_ErrRestore(error_type, error_value, error_traceback);
+#if PY_VERSION_HEX < 0x030400a1
     /* Undo the temporary resurrection; can't use DECREF here, it would
      * cause a recursive call.
      */
@@ -29395,7 +29293,7 @@ static void __Pyx_Generator_del(PyObject *self) {
         _Py_NewReference(self);
         self->ob_refcnt = refcnt;
     }
-#if CYTHON_COMPILING_FOR_CPYTHON
+#if CYTHON_COMPILING_IN_CPYTHON
     assert(PyType_IS_GC(self->ob_type) &&
            _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
     /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
@@ -29412,6 +29310,7 @@ static void __Pyx_Generator_del(PyObject *self) {
     --Py_TYPE(self)->tp_frees;
     --Py_TYPE(self)->tp_allocs;
 #endif
+#endif
 }
 static PyMemberDef __pyx_Generator_memberlist[] = {
     {(char *) "gi_running",
@@ -29455,7 +29354,7 @@ static PyTypeObject __pyx_GeneratorType_type = {
     0,                                  /*tp_getattro*/
     0,                                  /*tp_setattro*/
     0,                                  /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/
     0,                                  /*tp_doc*/
     (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
     0,                                  /*tp_clear*/
@@ -29481,10 +29380,17 @@ static PyTypeObject __pyx_GeneratorType_type = {
     0,                                  /*tp_cache*/
     0,                                  /*tp_subclasses*/
     0,                                  /*tp_weaklist*/
+#if PY_VERSION_HEX >= 0x030400a1
+    0,                                  /*tp_del*/
+#else
     __Pyx_Generator_del,                /*tp_del*/
+#endif
 #if PY_VERSION_HEX >= 0x02060000
     0,                                  /*tp_version_tag*/
 #endif
+#if PY_VERSION_HEX >= 0x030400a1
+    __Pyx_Generator_del,                /*tp_finalize*/
+#endif
 };
 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                   PyObject *closure) {
@@ -29509,10 +29415,10 @@ static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
 static int __pyx_Generator_init(void) {
     __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
     __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
-    if (PyType_Ready(&__pyx_GeneratorType_type)) {
+    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
+    if (__pyx_GeneratorType == NULL) {
         return -1;
     }
-    __pyx_GeneratorType = &__pyx_GeneratorType_type;
     return 0;
 }
 
@@ -29580,7 +29486,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
         goto bad;
     if (!PyType_Check(result)) {
         PyErr_Format(PyExc_TypeError,
-            "%s.%s is not a type object",
+            "%.200s.%.200s is not a type object",
             module_name, class_name);
         goto bad;
     }
@@ -29608,7 +29514,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
     }
     else if ((size_t)basicsize != size) {
         PyErr_Format(PyExc_ValueError,
-            "%s.%s has the wrong size, try recompiling",
+            "%.200s.%.200s has the wrong size, try recompiling",
             module_name, class_name);
         goto bad;
     }
@@ -29620,41 +29526,58 @@ bad:
 }
 #endif
 
-static void* __Pyx_GetVtable(PyObject *dict) {
-    void* ptr;
-    PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__");
-    if (!ob)
+#ifndef __PYX_HAVE_RT_ImportFunction
+#define __PYX_HAVE_RT_ImportFunction
+static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
+    PyObject *d = 0;
+    PyObject *cobj = 0;
+    union {
+        void (*fp)(void);
+        void *p;
+    } tmp;
+    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
+    if (!d)
         goto bad;
-#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
-    ptr = PyCapsule_GetPointer(ob, 0);
-#else
-    ptr = PyCObject_AsVoidPtr(ob);
-#endif
-    if (!ptr && !PyErr_Occurred())
-        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
-    Py_DECREF(ob);
-    return ptr;
-bad:
-    Py_XDECREF(ob);
-    return NULL;
-}
-
-static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
-#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
-    PyObject *ob = PyCapsule_New(vtable, 0, 0);
+    cobj = PyDict_GetItemString(d, funcname);
+    if (!cobj) {
+        PyErr_Format(PyExc_ImportError,
+            "%.200s does not export expected C function %.200s",
+                PyModule_GetName(module), funcname);
+        goto bad;
+    }
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0)
+    if (!PyCapsule_IsValid(cobj, sig)) {
+        PyErr_Format(PyExc_TypeError,
+            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
+             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
+        goto bad;
+    }
+    tmp.p = PyCapsule_GetPointer(cobj, sig);
 #else
-    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
-#endif
-    if (!ob)
+    {const char *desc, *s1, *s2;
+    desc = (const char *)PyCObject_GetDesc(cobj);
+    if (!desc)
         goto bad;
-    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
+    s1 = desc; s2 = sig;
+    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
+    if (*s1 != *s2) {
+        PyErr_Format(PyExc_TypeError,
+            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
+             PyModule_GetName(module), funcname, sig, desc);
         goto bad;
-    Py_DECREF(ob);
+    }
+    tmp.p = PyCObject_AsVoidPtr(cobj);}
+#endif
+    *f = tmp.fp;
+    if (!(*f))
+        goto bad;
+    Py_DECREF(d);
     return 0;
 bad:
-    Py_XDECREF(ob);
+    Py_XDECREF(d);
     return -1;
 }
+#endif
 
 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
     int start = 0, mid = 0, end = count - 1;
@@ -29848,6 +29771,73 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
     return 0;
 }
 
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else /* PY_VERSION_HEX < 0x03030000 */
+        if (PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_DATA_SIZE(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+#endif /* PY_VERSION_HEX < 0x03030000 */
+    } else
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+#if !CYTHON_COMPILING_IN_PYPY
+#if PY_VERSION_HEX >= 0x02060000
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
    int is_true = x == Py_True;
    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
@@ -29857,14 +29847,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   PyNumberMethods *m;
   const char *name = NULL;
   PyObject *res = NULL;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (PyInt_Check(x) || PyLong_Check(x))
 #else
   if (PyLong_Check(x))
 #endif
     return Py_INCREF(x), x;
   m = Py_TYPE(x)->tp_as_number;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (m && m->nb_int) {
     name = "int";
     res = PyNumber_Int(x);
@@ -29880,13 +29870,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
 #endif
   if (res) {
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (!PyInt_Check(res) && !PyLong_Check(res)) {
 #else
     if (!PyLong_Check(res)) {
 #endif
       PyErr_Format(PyExc_TypeError,
-                   "__%s__ returned non-%s (type %.200s)",
+                   "__%.4s__ returned non-%.4s (type %.200s)",
                    name, name, Py_TYPE(res)->tp_name);
       Py_DECREF(res);
       return NULL;
@@ -29898,9 +29888,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
   return res;
 }
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   Py_ssize_t ival;
-  PyObject* x = PyNumber_Index(b);
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+  #if PY_VERSION_HEX < 0x02060000
+    return PyInt_AsSsize_t(b);
+  #else
+    return PyLong_AsSsize_t(b);
+  #endif
+  }
+  x = PyNumber_Index(b);
   if (!x) return -1;
   ival = PyInt_AsSsize_t(x);
   Py_DECREF(x);
@@ -29919,17 +29935,6 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
 #endif
 }
-static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
-   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
-   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
-       return (size_t)-1;
-   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
-       PyErr_SetString(PyExc_OverflowError,
-                       "value too large to convert to size_t");
-       return (size_t)-1;
-   }
-   return (size_t)val;
-}
 
 
 #endif /* Py_PYTHON_H */
diff --git a/pysam/cvcf.pxd b/pysam/cvcf.pxd
index 477e0fa..a583d99 100644
--- a/pysam/cvcf.pxd
+++ b/pysam/cvcf.pxd
@@ -39,3 +39,4 @@ cdef extern from "stdint.h":
   ctypedef int uint8_t
   ctypedef int uint64_t
 
+
diff --git a/pysam/cvcf.pyx b/pysam/cvcf.pyx
index 09616d9..5809d06 100644
--- a/pysam/cvcf.pyx
+++ b/pysam/cvcf.pyx
@@ -113,27 +113,27 @@ cdef class VCFRecord( TabProxies.TupleProxy):
         #                     self.vcf._samples, 
         #                     len(data)))
     
-    def __cinit__(self, vcf ): 
+    def __cinit__(self, vcf): 
         # start indexed access at genotypes
         self.offset = 9
         
         self.vcf = vcf
     
-    def error(self,line,error,opt=None):
+    def error(self, line, error, opt=None):
         '''raise error.'''
         # pass to vcf file for error handling
         return self.vcf.error( line, error, opt )
 
-    cdef update( self, char * buffer, size_t nbytes ):
+    cdef update(self, char * buffer, size_t nbytes):
         '''update internal data.
         
         nbytes does not include the terminal '\0'.
         '''
-        TabProxies.TupleProxy.update( self, buffer, nbytes )
+        TabProxies.TupleProxy.update(self, buffer, nbytes)
 
         self.contig = self.fields[0]
         # vcf counts from 1 - correct here
-        self.pos = atoi( self.fields[1] ) - 1
+        self.pos = atoi(self.fields[1]) - 1
 
     def __len__(self):
         return max(0, self.nfields - 9)
@@ -226,15 +226,16 @@ cdef class VCFRecord( TabProxies.TupleProxy):
         return result
  
 
-cdef class asVCFRecord( ctabix.Parser ): 
+cdef class asVCFRecord(ctabix.Parser): 
     '''converts a :term:`tabix row` into a VCF record.'''
     cdef vcffile
-    def __init__(self, vcffile ):
+    def __init__(self, vcffile):
         self.vcffile = vcffile
-    def __call__(self, char * buffer, int len ):
+
+    cdef parse(self, char * buffer, int len):
         cdef VCFRecord r
-        r = VCFRecord( self.vcffile )
-        r.copy( buffer, len )
+        r = VCFRecord(self.vcffile)
+        r.copy(buffer, len)
         return r
 
 class VCF(object):
@@ -683,7 +684,7 @@ class VCF(object):
             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)
@@ -788,11 +789,13 @@ class VCF(object):
                     self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)
 
         # trim trailing bases in alleles
-        if alt:
-            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]
+        # AH: not certain why trimming this needs to be added 
+        #     disabled now for unit testing
+        # if alt:
+        #     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:
@@ -889,6 +892,7 @@ class VCF(object):
     def _parse_header(self, stream):
         self._lineno = 0
         for line in stream:
+            line = ctabix._force_str(line)
             self._lineno += 1
             if line.startswith('##'):
                 self.parse_header( line.strip() )
@@ -1016,7 +1020,7 @@ class VCF(object):
 ## API functions added by Andreas
 ###########################################################################################################
 
-    def connect( self, filename ):
+    def connect(self, filename):
         '''connect to tabix file.'''
         self.tabixfile = pysam.Tabixfile( filename )
         self._parse_header(self.tabixfile.header)
@@ -1026,9 +1030,14 @@ class VCF(object):
               start = None, 
               end = None, 
               region = None ):
-        """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
-
-        return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
+        """ Parse a stream of VCF-formatted lines.  
+        Initializes class instance and return generator """
+        return self.tabixfile.fetch(
+            reference,
+            start,
+            end,
+            region,
+            parser = asVCFRecord(self))
 
     def validate( self, record ):
         '''validate vcf record.
@@ -1128,10 +1137,12 @@ class VCF(object):
                     self.error(str(record),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]
+        # AH: not certain why trimming this needs to be added 
+        #     disabled now for unit testing
+        # 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:
diff --git a/pysam/htslib_util.c b/pysam/htslib_util.c
new file mode 100644
index 0000000..ea048c0
--- /dev/null
+++ b/pysam/htslib_util.c
@@ -0,0 +1,143 @@
+#include <ctype.h>
+#include <assert.h>
+#include "htslib/khash.h"
+#include "htslib/ksort.h"
+#include "htslib/sam.h"
+#include "htslib/hts.h"
+#include "htslib/knetfile.h"
+#include "htslib/kseq.h"
+#include "htslib_util.h"
+#include <stdio.h>
+
+#ifndef inline
+#define inline __inline
+#endif
+
+// taken from samtools/bam_import.c
+static inline uint8_t *alloc_data(bam1_t *b, size_t size)
+{
+  if (b->m_data < size)
+    {
+      b->m_data = size;
+      kroundup32(b->m_data);
+      b->data = (uint8_t*)realloc(b->data, b->m_data);
+    }
+  return b->data;
+}
+
+// update the variable length data within a bam1_t entry.
+// Adds *nbytes_new* - *nbytes_old* into the variable length data of *src* at *pos*.
+// Data within the bam1_t entry is moved so that it is
+// consistent with the data field lengths.
+bam1_t * pysam_bam_update(bam1_t * b,
+			  const size_t nbytes_old,
+			  const size_t nbytes_new, 
+			  uint8_t * field_start)
+{
+  int d = nbytes_new - nbytes_old;
+  int new_size;
+  size_t nbytes_before;
+
+  // no change
+  if (d == 0)
+    return b;
+
+  // new size of total data
+  new_size = d + b->l_data;
+  
+  // fields before field in data
+  nbytes_before = field_start - b->data;
+
+  if (b->l_data != 0)
+    {
+      assert(nbytes_before >= 0);
+      assert(nbytes_before <= b->l_data);
+    }
+
+  // increase memory if required
+  if (d > 0)
+    {
+      alloc_data(b, new_size);
+      field_start = b->data + nbytes_before;
+    }
+  
+  // move data after field to new location
+  memmove(field_start + nbytes_new,
+	  field_start + nbytes_old,
+	  b->l_data - (nbytes_before + nbytes_old));
+
+  // adjust l_data
+  b->l_data = new_size;
+      
+  return b;
+}
+
+// translate a nucleotide character to binary code
+unsigned char pysam_translate_sequence(const unsigned char s)
+{
+  return seq_nt16_table[s];
+}
+
+// Auxiliary functions for B support
+void bam_aux_appendB(bam1_t *b,
+		     const char tag[2],
+		     char type,
+		     char subtype,
+		     int len,
+		     uint8_t *data)
+{
+
+  int ori_len;
+  int l_data;
+
+  // check that type is 'B'
+  if('B' != type) return;
+
+  ori_len = b->l_data;
+
+  l_data = len * aux_type2size(subtype);
+  // infer the data length from the sub-type
+  b->l_data += 8 + l_data;
+
+  // htslib: obsolete?
+  // b->l_aux += 8 + l_data;
+  if (b->m_data < b->l_data) 
+    {
+      b->m_data = b->l_data;
+      kroundup32(b->m_data);
+      b->data = (uint8_t*)realloc(b->data, b->m_data);
+    }
+
+  b->data[ori_len] = tag[0];
+  b->data[ori_len + 1] = tag[1];
+  // tag
+  b->data[ori_len + 2] = type;
+  // type
+  b->data[ori_len + 3] = subtype;
+  // subtype
+  (*(int32_t*)(b->data + ori_len + 4)) = len;
+  // size
+  memcpy(b->data + ori_len + 8, data, l_data);
+  // data
+}
+
+int aux_type2size(uint8_t type)
+{
+	switch (type) {
+	case 'A': case 'c': case 'C':
+		return 1;
+	case 's': case 'S':
+		return 2;
+	case 'i': case 'I': case 'f':
+		return 4;
+	case 'd':
+		return 8;
+	case 'Z': case 'H': case 'B':
+		return type;
+	default:
+		return 0;
+	}
+}
+
+
+
diff --git a/pysam/htslib_util.h b/pysam/htslib_util.h
new file mode 100644
index 0000000..9b65d47
--- /dev/null
+++ b/pysam/htslib_util.h
@@ -0,0 +1,90 @@
+#ifndef PYSAM_UTIL_H
+#define PYSAM_UTIL_H
+
+//////////////////////////////////////////////////////////////////
+/*! set pysam standard error to point to file descriptor
+
+  Setting the stderr will close the previous stderr.
+ */
+// FILE * pysam_set_stderr(int fd);
+
+//////////////////////////////////////////////////////////////////
+/*! set pysam standard error to /dev/null.
+  
+  Unsetting the stderr will close the previous stderr.
+ */
+// void pysam_unset_stderr();
+
+//////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////
+// various helper functions
+//
+// fill pileup buffer for next position.
+
+int pysam_dispatch(int argc, char *argv[] );
+
+/*!
+  @abstract Update the variable length data within a bam1_t entry
+
+  Old data is deleted and the data within b are re-arranged to 
+  make place for new data.
+  
+  @discussion Returns b
+
+  @param  b           bam1_t data
+  @param  nbytes_old  size of old data
+  @param  nbytes_new  size of new data
+  @param  pos         position of data
+*/
+bam1_t * pysam_bam_update(bam1_t * b,
+			  const size_t nbytes_old,
+			  const size_t nbytes_new,
+			  uint8_t * pos);
+
+// translate a nucleotide character to binary code
+unsigned char pysam_translate_sequence(const unsigned char s);
+
+// return byte size of type
+int aux_type2size(uint8_t type);
+
+// Wrapping accessor macros in sam.h
+static inline int pysam_bam_is_rev(bam1_t * b) {return bam_is_rev(b);};
+static inline int pysam_bam_is_mrev(bam1_t * b) {return bam_is_mrev(b);}
+static inline char * pysam_bam_get_qname(bam1_t * b) {return bam_get_qname(b);}
+static inline uint32_t * pysam_bam_get_cigar(bam1_t * b) {return bam_get_cigar(b);}
+static inline uint8_t * pysam_bam_get_seq(bam1_t * b) {return bam_get_seq(b);}
+static inline uint8_t * pysam_bam_get_qual(bam1_t * b) {return bam_get_qual(b);}
+static inline uint8_t * pysam_bam_get_aux(bam1_t * b) {return bam_get_aux(b);}
+static inline int pysam_bam_get_l_aux(bam1_t * b) { return bam_get_l_aux(b); }
+static inline char pysam_bam_seqi(uint8_t * s, int i) {return bam_seqi(s,i);}
+
+// Wrapping bit field access in bam1_core_t
+// bit fields not supported in cython and due
+// to endian-ness it is not clear which part
+// of the bit-field is in the higher or lower bytes.
+static inline uint16_t pysam_get_bin(bam1_t * b) {return b->core.bin;}
+static inline uint8_t pysam_get_qual(bam1_t * b) {return b->core.qual;}
+static inline uint8_t pysam_get_l_qname(bam1_t * b) {return b->core.l_qname;}
+static inline uint16_t pysam_get_flag(bam1_t * b) {return b->core.flag;}
+static inline uint16_t pysam_get_n_cigar(bam1_t * b) {return b->core.n_cigar;}
+
+static inline void pysam_set_bin(bam1_t * b, uint16_t v) {
+  b->core.bin=v;}
+static inline void pysam_set_qual(bam1_t * b, uint8_t v) {
+  b->core.qual=v;}
+static inline void pysam_set_l_qname(bam1_t * b, uint8_t v) {
+  b->core.l_qname=v;}
+static inline void pysam_set_flag(bam1_t * b, uint16_t v) {
+  b->core.flag=v;}
+static inline void pysam_set_n_cigar(bam1_t * b, uint16_t v) {
+  b->core.n_cigar=v;}
+static inline void pysam_update_flag(bam1_t * b, uint16_t v, uint16_t flag) {
+  if (v)
+    b->core.flag |= flag;
+  else
+    b->core.flag &= ~flag;
+}
+
+  
+#endif
diff --git a/pysam/pysam_stream.h b/pysam/pysam_stream.h
new file mode 100644
index 0000000..3e93e29
--- /dev/null
+++ b/pysam/pysam_stream.h
@@ -0,0 +1,12 @@
+#ifndef PYSAM_STREAM_H
+#define PYSAM_STREAM_H
+
+#include "htslib/kseq.h"
+
+// #######################################################
+// fastq parsing
+KSEQ_INIT(gzFile, gzread)
+
+//KSTREAM_INIT( gzFile, gzread, 16384)
+
+#endif
diff --git a/pysam/pysam_util.c b/pysam/pysam_util.c
index 82c959c..2d8a060 100644
--- a/pysam/pysam_util.c
+++ b/pysam/pysam_util.c
@@ -6,14 +6,6 @@
 #include "bam_endian.h"
 #include "knetfile.h"
 #include "pysam_util.h"
-#include "errmod.h" // for pysam_dump 
-
-// for sequence parsing
-#include "kseq.h"
-
-#ifndef inline
-#define inline __inline
-#endif
 
 // Definition of pysamerr
 #include "stdio.h"
@@ -27,271 +19,13 @@ FILE * pysam_set_stderr(int fd)
   return pysamerr;
 }
 
-void pysam_unset_stderr()
+void pysam_unset_stderr(void)
 {
   if (pysamerr != NULL)
     fclose(pysamerr);
   pysamerr = fopen("/dev/null", "w");
 }
 
-// #######################################################
-// utility routines to avoid using callbacks in bam_fetch
-// 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;
-} pair64_t;
-
-#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;
-} bam_binlist_t;
-
-typedef struct {
-	int32_t n, m;
-	uint64_t *offset;
-} bam_lidx_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;
-  uint64_t n_no_coor; // unmapped reads without coordinate
-  khash_t(i) **index;
-  bam_lidx_t *index2;
-};
-
-typedef struct __linkbuf_t {
-	bam1_t b;
-	uint32_t beg, end;
-	struct __linkbuf_t *next;
-} lbnode_t;
-
-typedef struct {
-	int cnt, n, max;
-	lbnode_t **buf;
-} mempool_t;
-
-struct __bam_plbuf_t {
-	mempool_t *mp;
-	lbnode_t *head, *tail, *dummy;
-	bam_pileup_f func;
-	void *func_data;
-	int32_t tid, pos, max_tid, max_pos;
-	int max_pu, is_eof;
-	bam_pileup1_t *pu;
-	int flag_mask;
-};
-  
-static mempool_t *mp_init()
-{
-	mempool_t *mp;
-	mp = (mempool_t*)calloc(1, sizeof(mempool_t));
-	return mp;
-}
-static void mp_destroy(mempool_t *mp)
-{
-	int k;
-	for (k = 0; k < mp->n; ++k) {
-		free(mp->buf[k]->b.data);
-		free(mp->buf[k]);
-	}
-	free(mp->buf);
-	free(mp);
-}
-static inline lbnode_t *mp_alloc(mempool_t *mp)
-{
-	++mp->cnt;
-	if (mp->n == 0) return (lbnode_t*)calloc(1, sizeof(lbnode_t));
-	else return mp->buf[--mp->n];
-}
-static inline void mp_free(mempool_t *mp, lbnode_t *p)
-{
-	--mp->cnt; p->next = 0; // clear lbnode_t::next here
-	if (mp->n == mp->max) {
-		mp->max = mp->max? mp->max<<1 : 256;
-		mp->buf = (lbnode_t**)realloc(mp->buf, sizeof(lbnode_t*) * mp->max);
-	}
-	mp->buf[mp->n++] = p;
-}
-
-static inline int resolve_cigar(bam_pileup1_t *p, uint32_t pos)
-{
-	unsigned k;
-	bam1_t *b = p->b;
-	bam1_core_t *c = &b->core;
-	uint32_t x = c->pos, y = 0;
-	int ret = 1, is_restart = 1;
-
-	if (c->flag&BAM_FUNMAP) return 0; // unmapped read
-	assert(x <= pos); // otherwise a bug
-	p->qpos = -1; p->indel = 0; p->is_del = p->is_head = p->is_tail = 0;
-	for (k = 0; k < c->n_cigar; ++k) {
-		int op = bam1_cigar(b)[k] & BAM_CIGAR_MASK; // operation
-		int l = bam1_cigar(b)[k] >> BAM_CIGAR_SHIFT; // length
-		if (op == BAM_CMATCH) { // NOTE: this assumes the first and the last operation MUST BE a match or a clip
-			if (x + l > pos) { // overlap with pos
-				p->indel = p->is_del = 0;
-				p->qpos = y + (pos - x);
-				if (x == pos && is_restart) p->is_head = 1;
-				if (x + l - 1 == pos) { // come to the end of a match
-					if (k < c->n_cigar - 1) { // there are additional operation(s)
-						uint32_t cigar = bam1_cigar(b)[k+1]; // next CIGAR
-						int op_next = cigar&BAM_CIGAR_MASK; // next CIGAR operation
-						if (op_next == BAM_CDEL) p->indel = -(int32_t)(cigar>>BAM_CIGAR_SHIFT); // del
-						else if (op_next == BAM_CINS) p->indel = cigar>>BAM_CIGAR_SHIFT; // ins
-						if (op_next == BAM_CSOFT_CLIP || op_next == BAM_CREF_SKIP || op_next == BAM_CHARD_CLIP)
-							p->is_tail = 1; // tail
-					} else p->is_tail = 1; // this is the last operation; set tail
-				}
-			}
-			x += l; y += l;
-		} else if (op == BAM_CDEL) { // then set ->is_del
-			if (x + l > pos) {
-				p->indel = 0; p->is_del = 1;
-				p->qpos = y + (pos - x);
-			}
-			x += l;
-		} else if (op == BAM_CREF_SKIP) x += l;
-		else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) y += l;
-		is_restart = (op == BAM_CREF_SKIP || op == BAM_CSOFT_CLIP || op == BAM_CHARD_CLIP);
-		if (x > pos) {
-			if (op == BAM_CREF_SKIP) ret = 0; // then do not put it into pileup at all
-			break;
-		}
-	}
-	assert(x > pos); // otherwise a bug
-	return ret;
-
-}
-// the following code has been taken from bam_plbuf_push
-// and modified such that instead of a function call
-// the function returns and will continue (if cont is true).
-// from where it left off.
-
-// returns
-// 1: if buf is full and can be emitted
-// 0: if b has been added
-// -1: if there was an error
-int pysam_pileup_next(const bam1_t *b,
-		      bam_plbuf_t *buf,
-		      bam_pileup1_t ** plp,
-		      int * tid,
-		      int * pos,
-		      int * n_plp )
-{
-  *plp = bam_plp_next(buf->iter, tid, pos, n_plp);
-  if (plp == NULL) return 0;
-  return 1;
-}
-
-typedef struct __bmc_aux_t {
-	int max;
-	uint32_t *info;
-	uint16_t *info16;
-	errmod_t *em;
-} bmc_aux_t;
-
-// 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 no values if index data not present
-  if (idx==NULL) return 0;
-  
-  if (tid >= 0)
-    {
-      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;
-    }
-
-  return 0;
-}
-
-uint32_t pysam_get_unmapped( const bam_index_t *idx, const int tid )
-{
-
-  if (tid >= 0)
-    {
-      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; */
-/*     } */
-/* } */
-
-
-  
-
 // pysam dispatch function to emulate the samtools
 // command line within python.
 // taken from the main function in bamtk.c
@@ -321,7 +55,6 @@ int main_bamshuf(int argc, char *argv[]);
 
 int faidx_main(int argc, char *argv[]);
 
-
 int pysam_dispatch(int argc, char *argv[] )
 {
   extern int optind;
@@ -376,145 +109,6 @@ int pysam_dispatch(int argc, char *argv[] )
   return retval;
 }
 
-// taken from samtools/bam_import.c
-static inline uint8_t *alloc_data(bam1_t *b, size_t size)
-{
-  if (b->m_data < size)
-    {
-      b->m_data = size;
-      kroundup32(b->m_data);
-      b->data = (uint8_t*)realloc(b->data, b->m_data);
-    }
-  return b->data;
-}
-
-// update the variable length data within a bam1_t entry.
-// Adds *nbytes_new* - *nbytes_old* into the variable length data of *src* at *pos*.
-// Data within the bam1_t entry is moved so that it is
-// consistent with the data field lengths.
-bam1_t * pysam_bam_update( bam1_t * b,
-			   const size_t nbytes_old,
-			   const size_t nbytes_new, 
-			   uint8_t * pos )
-{
-  int d = nbytes_new-nbytes_old;
-  int new_size;
-  size_t offset;
-
-  // no change
-  if (d == 0) return b;
-
-  new_size = d + b->data_len;
-  offset = pos - b->data;
-
-  //printf("d=%i, old=%i, new=%i, old_size=%i, new_size=%i\n",
-  // d, nbytes_old, nbytes_new, b->data_len, new_size);
-  
-  // increase memory if required
-  if (d > 0)
-    {
-      alloc_data( b, new_size );
-      pos = b->data + offset;
-    }
-  
-  if (b->data_len != 0)
-    {
-      if (offset < 0 || offset > b->data_len)
-	fprintf(stderr, "[pysam_bam_insert] illegal offset: '%i'\n", (int)offset);
-    }
-  
-  // printf("dest=%p, src=%p, n=%i\n", pos+nbytes_new, pos + nbytes_old, b->data_len - (offset+nbytes_old));
-  memmove( pos + nbytes_new,
-	   pos + nbytes_old,
-	   b->data_len - (offset + nbytes_old));
-    
-  b->data_len = new_size;
-      
-  return b;
-}
-
-// translate a nucleotide character to binary code
-unsigned char pysam_translate_sequence( const unsigned char s )
-{
-  return bam_nt16_table[s];
-}
-
-
-void bam_init_header_hash(bam_header_t *header);
-
-// translate a reference string *s* to a tid
-// code taken from bam_parse_region
-int pysam_reference2tid( bam_header_t *header, const char * s )
-{
-  
-  khiter_t iter;
-  khash_t(s) *h;
-  
-  bam_init_header_hash(header);
-  h = (khash_t(s)*)header->hash;
-
-  iter = kh_get(s, h, s); /* get the ref_id */
-  if (iter == kh_end(h)) { // name not found
-    return -1;
-  }
-
-  return kh_value(h, iter);
-}
-
-// Auxiliary functions for B support
-void bam_aux_appendB(bam1_t *b, const char tag[2], char type, char subtype, int len, uint8_t *data)
-{
-
-  int ori_len;
-
-  int data_len;
-
-  // check that type is 'B'
-  if('B' != type) return;
-
-  ori_len = b->data_len;
-
-  data_len = len * bam_aux_type2size(subtype);
-  // infer the data length from the sub-type
-  b->data_len += 8 + data_len;
-
-  b->l_aux += 8 + data_len;
-
-  if (b->m_data < b->data_len) 
-    {
-
-      b->m_data = b->data_len;
-
-      kroundup32(b->m_data);
-
-      b->data = (uint8_t*)realloc(b->data, b->m_data);
-
-    }
-
-  b->data[ori_len] = tag[0];
-  b->data[ori_len + 1] = tag[1];
-  // tag
-  b->data[ori_len + 2] = type;
-  // type
-  b->data[ori_len + 3] = subtype;
-  // subtype
-  (*(int32_t*)(b->data + ori_len + 4)) = len;
-  // size
-  memcpy(b->data + ori_len + 8, data, data_len);
-  // data
-}
-
-/*
-// return size of auxiliary type
-int bam_aux_type2size(int x)
-{
-  if (x == 'C' || x == 'c' || x == 'A') return 1;
-  else if (x == 'S' || x == 's') return 2;
-  else if (x == 'I' || x == 'i' || x == 'f') return 4;
-  else return 0;
-}
-*/
-
 
 
 
diff --git a/pysam/pysam_util.h b/pysam/pysam_util.h
index ce6c753..d6e5141 100644
--- a/pysam/pysam_util.h
+++ b/pysam/pysam_util.h
@@ -1,84 +1,20 @@
 #ifndef PYSAM_UTIL_H
 #define PYSAM_UTIL_H
 
-#include "kseq.h"
-
-// #######################################################
-// fastq parsing
-KSEQ_INIT(gzFile, gzread)
-
 //////////////////////////////////////////////////////////////////
 /*! set pysam standard error to point to file descriptor
 
   Setting the stderr will close the previous stderr.
  */
-FILE * pysam_set_stderr( int fd );
+FILE * pysam_set_stderr(int fd);
 
 //////////////////////////////////////////////////////////////////
 /*! set pysam standard error to /dev/null.
   
   Unsetting the stderr will close the previous stderr.
  */
-void pysam_unset_stderr();
-
-//////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////
-// various helper functions
-//
-// fill pileup buffer for next position.
-
-int pysam_pileup_next(const bam1_t *b,
-		      bam_plbuf_t *buf,
-		      bam_pileup1_t ** plp,
-		      int * tid,
-		      int * pos,
-		      int * n_plp);
-
-int pysam_dispatch(int argc, char *argv[] );
-
-/*!
-  @abstract Update the variable length data within a bam1_t entry
-
-  Old data is deleted and the data within b are re-arranged to 
-  make place for new data.
-  
-  @discussion Returns b
-
-  @param  b           bam1_t data
-  @param  nbytes_old  size of old data
-  @param  nbytes_new  size of new data
-  @param  pos         position of data
-*/
-bam1_t * pysam_bam_update( bam1_t * b,
-			   const size_t nbytes_old,
-			   const size_t nbytes_new,
-			   uint8_t * pos );
-
-// translate a nucleotide character to binary code
-unsigned char pysam_translate_sequence( const unsigned char s );
-
-// defined in bam_import.c
-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 "bam_maqcns.h" */
-/* void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c ); */
-
+void pysam_unset_stderr(void);
 
-// return size of auxilliary type
-// int bam_aux_type2size(int x);
+int pysam_dispatch(int argc, char *argv[]);
 
 #endif
diff --git a/pysam/samfile_util.c b/pysam/samfile_util.c
new file mode 100644
index 0000000..50cabae
--- /dev/null
+++ b/pysam/samfile_util.c
@@ -0,0 +1,186 @@
+#include "samfile_util.h"
+#include "htslib/sam.h"
+#include "kprobaln.h"
+
+// taken from bam_md.c
+// replace bam1_{qual,seq,cigar} with bam_get_{qual,seq,cigar}
+// bam1_seqi -> bam_seqi
+// bam_nt16_table -> seq_nt16_table
+
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+
+char bam_nt16_nt4_table[] = { 4, 0, 1, 4, 2, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4 };
+
+int bam_cap_mapQ(bam1_t *b, char *ref, int thres)
+{
+	uint8_t *seq = bam_get_seq(b), *qual = bam_get_qual(b);
+	uint32_t *cigar = bam_get_cigar(b);
+	bam1_core_t *c = &b->core;
+	int i, x, y, mm, q, len, clip_l, clip_q;
+	double t;
+	if (thres < 0) thres = 40; // set the default
+	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 || op == BAM_CEQUAL || op == BAM_CDIFF) {
+			for (j = 0; j < l; ++j) {
+				int z = y + j;
+				int c1 = bam_seqi(seq, z), c2 = seq_nt16_table[(int)ref[x+j]];
+				if (ref[x+j] == 0) break; // out of boundary
+				if (c2 != 15 && c1 != 15 && qual[z] >= 13) { // not ambiguous
+					++len;
+					if (c1 && c1 != c2 && qual[z] >= 13) { // mismatch
+						++mm;
+						q += qual[z] > 33? 33 : qual[z];
+					}
+				}
+			}
+			if (j < l) break;
+			x += l; y += l; len += l;
+		} else if (op == BAM_CDEL) {
+			for (j = 0; j < l; ++j)
+				if (ref[x+j] == 0) break;
+			if (j < l) break;
+			x += l;
+		} else if (op == BAM_CSOFT_CLIP) {
+			for (j = 0; j < l; ++j) clip_q += qual[y+j];
+			clip_l += l;
+			y += l;
+		} else if (op == BAM_CHARD_CLIP) {
+			clip_q += 13 * l;
+			clip_l += l;
+		} else if (op == BAM_CINS) y += l;
+		else if (op == BAM_CREF_SKIP) x += l;
+	}
+	for (i = 0, t = 1; i < mm; ++i)
+		t *= (double)len / (i+1);
+	t = q - 4.343 * log(t) + clip_q / 5.;
+	if (t > thres) return -1;
+	if (t < 0) t = 0;
+	t = sqrt((thres - t) / thres) * thres;
+//	fprintf(stderr, "%s %lf %d\n", bam1_qname(b), t, q);
+	return (int)(t + .499);
+}
+
+
+int bam_prob_realn_core(bam1_t *b, const char *ref, int flag)
+{
+	int k, i, bw, x, y, yb, ye, xb, xe, apply_baq = flag&1, extend_baq = flag>>1&1, redo_baq = flag&4;
+	uint32_t *cigar = bam_get_cigar(b);
+	bam1_core_t *c = &b->core;
+	kpa_par_t conf = kpa_par_def;
+	uint8_t *bq = 0, *zq = 0, *qual = bam_get_qual(b);
+	if ((c->flag & BAM_FUNMAP) || b->core.l_qseq == 0) return -1; // do nothing
+	// test if BQ or ZQ is present
+	if ((bq = bam_aux_get(b, "BQ")) != 0) ++bq;
+	if ((zq = bam_aux_get(b, "ZQ")) != 0 && *zq == 'Z') ++zq;
+	if (bq && redo_baq)
+	{
+	    bam_aux_del(b, bq-1);
+	    bq = 0;
+	}
+	if (bq && zq) { // remove the ZQ tag
+		bam_aux_del(b, zq-1);
+		zq = 0;
+	}
+	if (bq || zq) {
+		if ((apply_baq && zq) || (!apply_baq && bq)) return -3; // in both cases, do nothing
+		if (bq && apply_baq) { // then convert BQ to ZQ
+			for (i = 0; i < c->l_qseq; ++i)
+				qual[i] = qual[i] + 64 < bq[i]? 0 : qual[i] - ((int)bq[i] - 64);
+			*(bq - 3) = 'Z';
+		} else if (zq && !apply_baq) { // then convert ZQ to BQ
+			for (i = 0; i < c->l_qseq; ++i)
+				qual[i] += (int)zq[i] - 64;
+			*(zq - 3) = 'B';
+		}
+		return 0;
+	}
+	// find the start and end of the alignment	
+	x = c->pos, y = 0, yb = ye = xb = xe = -1;
+	for (k = 0; k < c->n_cigar; ++k) {
+		int op, l;
+		op = cigar[k]&0xf; l = cigar[k]>>4;
+		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;
+			x += l; y += l;
+		} else if (op == BAM_CSOFT_CLIP || op == BAM_CINS) y += l;
+		else if (op == BAM_CDEL) x += l;
+		else if (op == BAM_CREF_SKIP) return -1; // do nothing if there is a reference skip
+	}
+	// set bandwidth and the start and the end
+	bw = 7;
+	if (abs((xe - xb) - (ye - yb)) > bw)
+		bw = abs((xe - xb) - (ye - yb)) + 3;
+	conf.bw = bw;
+	xb -= yb + bw/2; if (xb < 0) xb = 0;
+	xe += c->l_qseq - ye + bw/2;
+	if (xe - xb - c->l_qseq > bw)
+		xb += (xe - xb - c->l_qseq - bw) / 2, xe -= (xe - xb - c->l_qseq - bw) / 2;
+	{ // glocal
+		uint8_t *s, *r, *q, *seq = bam_get_seq(b), *bq;
+		int *state;
+		bq = calloc(c->l_qseq + 1, 1);
+		memcpy(bq, qual, c->l_qseq);
+		s = calloc(c->l_qseq, 1);
+		for (i = 0; i < c->l_qseq; ++i) s[i] = bam_nt16_nt4_table[bam_seqi(seq, i)];
+		r = calloc(xe - xb, 1);
+		for (i = xb; i < xe; ++i) {
+			if (ref[i] == 0) { xe = i; break; }
+			r[i-xb] = bam_nt16_nt4_table[seq_nt16_table[(int)ref[i]]];
+		}
+		state = calloc(c->l_qseq, sizeof(int));
+		q = calloc(c->l_qseq, 1);
+		kpa_glocal(r, xe-xb, s, c->l_qseq, qual, &conf, state, q);
+		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 || 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];
+					}
+					x += l; y += l;
+				} else if (op == BAM_CSOFT_CLIP || op == BAM_CINS) y += l;
+				else if (op == BAM_CDEL) x += l;
+			}
+			for (i = 0; i < c->l_qseq; ++i) bq[i] = qual[i] - bq[i] + 64; // finalize BQ
+		} else { // in this block, bq[] is BAQ that can be larger than qual[] (different from the above!)
+			uint8_t *left, *rght;
+			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 || 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)
+						left[i] = bq[i] > left[i-1]? bq[i] : left[i-1];
+					for (rght[y+l-1] = bq[y+l-1], i = y + l - 2; i >= y; --i)
+						rght[i] = bq[i] > rght[i+1]? bq[i] : rght[i+1];
+					for (i = y; i < y + l; ++i)
+						bq[i] = left[i] < rght[i]? left[i] : rght[i];
+					x += l; y += l;
+				} else if (op == BAM_CSOFT_CLIP || op == BAM_CINS) y += l;
+				else if (op == BAM_CDEL) x += l;
+			}
+			for (i = 0; i < c->l_qseq; ++i) bq[i] = 64 + (qual[i] <= bq[i]? 0 : qual[i] - bq[i]); // finalize BQ
+			free(left); free(rght);
+		}
+		if (apply_baq) {
+			for (i = 0; i < c->l_qseq; ++i) qual[i] -= bq[i] - 64; // modify qual
+			bam_aux_append(b, "ZQ", 'Z', c->l_qseq + 1, bq);
+		} else bam_aux_append(b, "BQ", 'Z', c->l_qseq + 1, bq);
+		free(bq); free(s); free(r); free(q); free(state);
+	}
+	return 0;
+}
+
+int bam_prob_realn(bam1_t *b, const char *ref)
+{
+	return bam_prob_realn_core(b, ref, 1);
+}
+
diff --git a/pysam/samfile_util.h b/pysam/samfile_util.h
new file mode 100644
index 0000000..ae3eb49
--- /dev/null
+++ b/pysam/samfile_util.h
@@ -0,0 +1,11 @@
+#ifndef SAMFILE_UTIL_H
+#define SAMFILE_UTIL_H
+
+#include "htslib/sam.h"
+
+int bam_cap_mapQ(bam1_t *b, char *ref, int thres);
+int bam_prob_realn(bam1_t *b, const char *ref);
+
+
+#endif
+
diff --git a/pysam/tabix_util.h b/pysam/tabix_util.h
index e3e38d1..65412ca 100644
--- a/pysam/tabix_util.h
+++ b/pysam/tabix_util.h
@@ -1,13 +1,12 @@
 /* See issue 122
    On some MACOSX systems getline is not defined.
  */
-#include <zlib.h>
-#include "kseq.h"
-
 #if !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)
 #include "unistd.h"
 ssize_t getline(char **line, size_t *linelen, FILE *fp);
 #endif
 
-KSTREAM_INIT( gzFile, gzread, 16384)
+
+
+
 
diff --git a/pysam/version.py b/pysam/version.py
index c3375ad..fde7d27 100644
--- a/pysam/version.py
+++ b/pysam/version.py
@@ -1,7 +1,9 @@
 # pysam versioning information
 
-__version__ = "0.7.7"
+__version__ = "0.8.0"
 
 __samtools_version__ = "0.1.19"
 
 __tabix_version__ = "0.2.6"
+
+__htslib_version__ = "0.0.1"
diff --git a/samtools/bam.h b/samtools/bam.h
index 80e8703..a383378 100644
--- a/samtools/bam.h
+++ b/samtools/bam.h
@@ -380,7 +380,7 @@ extern "C" {
 	int bam_strmap_put(void *strmap, const char *rg, const char *lib);
 	const char *bam_strmap_get(const void *strmap, const char *rg);
 	void *bam_strmap_dup(const void*);
-	void *bam_strmap_init();
+	void *bam_strmap_init(void);
 	void bam_strmap_destroy(void *strmap);
 
 
@@ -395,7 +395,7 @@ extern "C" {
 	  @discussion This function also modifies the global variable
 	  bam_is_be.
 	 */
-	bam_header_t *bam_header_init();
+	bam_header_t *bam_header_init(void);
 
 	/*!
 	  @abstract        Destroy a header structure.
diff --git a/samtools/bam_endian.h b/samtools/bam_endian.h
index 0fc74a8..4919016 100644
--- a/samtools/bam_endian.h
+++ b/samtools/bam_endian.h
@@ -3,7 +3,7 @@
 
 #include <stdint.h>
 
-static inline int bam_is_big_endian()
+static inline int bam_is_big_endian(void)
 {
 	long one= 1;
 	return !(*((char *)(&one)));
diff --git a/samtools/bam_lpileup.c.pysam.c b/samtools/bam_lpileup.c.pysam.c
index a5c5b04..e3c2785 100644
--- a/samtools/bam_lpileup.c.pysam.c
+++ b/samtools/bam_lpileup.c.pysam.c
@@ -22,7 +22,7 @@ typedef struct {
 	freenode_t **buf;
 } mempool_t;
 
-static mempool_t *mp_init()
+static mempool_t *mp_init(void)
 {
 	return (mempool_t*)calloc(1, sizeof(mempool_t));
 }
diff --git a/samtools/bam_mate.c.pysam.c b/samtools/bam_mate.c.pysam.c
index a09157b..bdeb885 100644
--- a/samtools/bam_mate.c.pysam.c
+++ b/samtools/bam_mate.c.pysam.c
@@ -102,7 +102,7 @@ void bam_mating_core(bamFile in, bamFile out, int remove_reads)
 	free(str.s);
 }
 
-void usage()
+void usage(void)
 {
     fprintf(pysamerr,"Usage: samtools fixmate <in.nameSrt.bam> <out.nameSrt.bam>\n");
     fprintf(pysamerr,"Options:\n");
diff --git a/samtools/bam_pileup.c.pysam.c b/samtools/bam_pileup.c.pysam.c
index cca29d2..3d9a3b7 100644
--- a/samtools/bam_pileup.c.pysam.c
+++ b/samtools/bam_pileup.c.pysam.c
@@ -26,7 +26,7 @@ typedef struct {
 	lbnode_t **buf;
 } mempool_t;
 
-static mempool_t *mp_init()
+static mempool_t *mp_init(void)
 {
 	mempool_t *mp;
 	mp = (mempool_t*)calloc(1, sizeof(mempool_t));
diff --git a/samtools/bamshuf.c.pysam.c b/samtools/bamshuf.c.pysam.c
index d64b094..b526408 100644
--- a/samtools/bamshuf.c.pysam.c
+++ b/samtools/bamshuf.c.pysam.c
@@ -104,7 +104,8 @@ static void bamshuf(const char *fn, int n_files, const char *pre, int clevel, in
 			// was: assert( bam_read1(fp, a[j].b );
 			// Assume that assertion was optimized out
 			// and a[j].b not set.
-			int _l = bam_read1(fp, a[j].b);
+			int _l = 0;
+			_l = bam_read1(fp, a[j].b);
 			assert( _l >= 0 );
 			a[j].key = hash_X31_Wang(bam_get_qname(a[j].b));
 		}
diff --git a/samtools/bcftools/bcf.h b/samtools/bcftools/bcf.h
index f722525..1cc13c9 100644
--- a/samtools/bcftools/bcf.h
+++ b/samtools/bcftools/bcf.h
@@ -170,7 +170,7 @@ extern "C" {
 	void bcf_str2id_thorough_destroy(void *_hash);
 	int bcf_str2id_add(void *_hash, const char *str);
 	int bcf_str2id(void *_hash, const char *str);
-	void *bcf_str2id_init();
+	void *bcf_str2id_init(void);
 
 	// indexing related functions
 	int bcf_idx_build(const char *fn);
diff --git a/samtools/bgzf.c.pysam.c b/samtools/bgzf.c.pysam.c
index a3b857f..a7543c5 100644
--- a/samtools/bgzf.c.pysam.c
+++ b/samtools/bgzf.c.pysam.c
@@ -103,7 +103,7 @@ static inline void packInt32(uint8_t *buffer, uint32_t value)
 	buffer[3] = value >> 24;
 }
 
-static BGZF *bgzf_read_init()
+static BGZF *bgzf_read_init(void)
 {
 	BGZF *fp;
 	fp = calloc(1, sizeof(BGZF));
diff --git a/samtools/khash.h b/samtools/khash.h
index a7e8056..e2a9d7a 100644
--- a/samtools/khash.h
+++ b/samtools/khash.h
@@ -150,7 +150,7 @@ static const double __ac_HASH_UPPER = 0.77;
 		khkey_t *keys;													\
 		khval_t *vals;													\
 	} kh_##name##_t;													\
-	extern kh_##name##_t *kh_init_##name();								\
+	extern kh_##name##_t *kh_init_##name(void);								\
 	extern void kh_destroy_##name(kh_##name##_t *h);					\
 	extern void kh_clear_##name(kh_##name##_t *h);						\
 	extern khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key); 	\
@@ -165,7 +165,7 @@ static const double __ac_HASH_UPPER = 0.77;
 		khkey_t *keys;													\
 		khval_t *vals;													\
 	} kh_##name##_t;													\
-	SCOPE kh_##name##_t *kh_init_##name() {								\
+	SCOPE kh_##name##_t *kh_init_##name(void) {								\
 		return (kh_##name##_t*)calloc(1, sizeof(kh_##name##_t));		\
 	}																	\
 	SCOPE void kh_destroy_##name(kh_##name##_t *h)						\
diff --git a/samtools/klist.h b/samtools/klist.h
index 2f17016..71ef19a 100644
--- a/samtools/klist.h
+++ b/samtools/klist.h
@@ -8,7 +8,7 @@
 		size_t cnt, n, max;												\
 		kmptype_t **buf;												\
 	} kmp_##name##_t;													\
-	static inline kmp_##name##_t *kmp_init_##name() {					\
+	static inline kmp_##name##_t *kmp_init_##name(void) {					\
 		return calloc(1, sizeof(kmp_##name##_t));						\
 	}																	\
 	static inline void kmp_destroy_##name(kmp_##name##_t *mp) {			\
@@ -50,7 +50,7 @@
 		kmp_##name##_t *mp;												\
 		size_t size;													\
 	} kl_##name##_t;													\
-	static inline kl_##name##_t *kl_init_##name() {						\
+	static inline kl_##name##_t *kl_init_##name(void) {						\
 		kl_##name##_t *kl = calloc(1, sizeof(kl_##name##_t));			\
 		kl->mp = kmp_init(name);										\
 		kl->head = kl->tail = kmp_alloc(name, kl->mp);					\
diff --git a/samtools/kprobaln.c b/samtools/kprobaln.c
new file mode 100644
index 0000000..04e526a
--- /dev/null
+++ b/samtools/kprobaln.c
@@ -0,0 +1,280 @@
+/* The MIT License
+
+   Copyright (c) 2003-2006, 2008-2010, by Heng Li <lh3lh3 at 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"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+   SOFTWARE.
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+#include <math.h>
+#include "kprobaln.h"
+
+/*****************************************
+ * Probabilistic banded glocal alignment *
+ *****************************************/
+
+#define EI .25
+#define EM .33333333333
+
+static float g_qual2prob[256];
+
+#define set_u(u, b, i, k) { int x=(i)-(b); x=x>0?x:0; (u)=((k)-x+1)*3; }
+
+kpa_par_t kpa_par_def = { 0.001, 0.1, 10 };
+kpa_par_t kpa_par_alt = { 0.0001, 0.01, 10 };
+
+/*
+  The topology of the profile HMM:
+
+           /\             /\        /\             /\
+           I[1]           I[k-1]    I[k]           I[L]
+            ^   \      \    ^    \   ^   \      \   ^
+            |    \      \   |     \  |    \      \  |
+    M[0]   M[1] -> ... -> M[k-1] -> M[k] -> ... -> M[L]   M[L+1]
+                \      \/        \/      \/      /
+                 \     /\        /\      /\     /
+                       -> D[k-1] -> D[k] ->
+
+   M[0] points to every {M,I}[k] and every {M,I}[k] points M[L+1].
+
+   On input, _ref is the reference sequence and _query is the query
+   sequence. Both are sequences of 0/1/2/3/4 where 4 stands for an
+   ambiguous residue. iqual is the base quality. c sets the gap open
+   probability, gap extension probability and band width.
+
+   On output, state and q are arrays of length l_query. The higher 30
+   bits give the reference position the query base is matched to and the
+   lower two bits can be 0 (an alignment match) or 1 (an
+   insertion). q[i] gives the phred scaled posterior probability of
+   state[i] being wrong.
+ */
+int kpa_glocal(const uint8_t *_ref, int l_ref, const uint8_t *_query, int l_query, const uint8_t *iqual,
+			   const kpa_par_t *c, int *state, uint8_t *q)
+{
+	double **f, **b = 0, *s, m[9], sI, sM, bI, bM, pb;
+	float *qual, *_qual;
+	const uint8_t *ref, *query;
+	int bw, bw2, i, k, is_diff = 0, is_backward = 1, Pr;
+
+    if ( l_ref<=0 || l_query<=0 ) return 0; // FIXME: this may not be an ideal fix, just prevents sefgault
+
+	/*** initialization ***/
+	is_backward = state && q? 1 : 0;
+	ref = _ref - 1; query = _query - 1; // change to 1-based coordinate
+	bw = l_ref > l_query? l_ref : l_query;
+	if (bw > c->bw) bw = c->bw;
+	if (bw < abs(l_ref - l_query)) bw = abs(l_ref - l_query);
+	bw2 = bw * 2 + 1;
+	// allocate the forward and backward matrices f[][] and b[][] and the scaling array s[]
+	f = calloc(l_query+1, sizeof(void*));
+	if (is_backward) b = calloc(l_query+1, sizeof(void*));
+	for (i = 0; i <= l_query; ++i) {    // FIXME: this will lead in segfault for l_query==0
+		f[i] = calloc(bw2 * 3 + 6, sizeof(double)); // FIXME: this is over-allocated for very short seqs
+		if (is_backward) b[i] = calloc(bw2 * 3 + 6, sizeof(double));
+	}
+	s = calloc(l_query+2, sizeof(double)); // s[] is the scaling factor to avoid underflow
+	// initialize qual
+	_qual = calloc(l_query, sizeof(float));
+	if (g_qual2prob[0] == 0)
+		for (i = 0; i < 256; ++i)
+			g_qual2prob[i] = pow(10, -i/10.);
+	for (i = 0; i < l_query; ++i) _qual[i] = g_qual2prob[iqual? iqual[i] : 30];
+	qual = _qual - 1;
+	// initialize transition probability
+	sM = sI = 1. / (2 * l_query + 2); // the value here seems not to affect results; FIXME: need proof
+	m[0*3+0] = (1 - c->d - c->d) * (1 - sM); m[0*3+1] = m[0*3+2] = c->d * (1 - sM);
+	m[1*3+0] = (1 - c->e) * (1 - sI); m[1*3+1] = c->e * (1 - sI); m[1*3+2] = 0.;
+	m[2*3+0] = 1 - c->e; m[2*3+1] = 0.; m[2*3+2] = c->e;
+	bM = (1 - c->d) / l_ref; bI = c->d / l_ref; // (bM+bI)*l_ref==1
+	/*** forward ***/
+	// f[0]
+	set_u(k, bw, 0, 0);
+	f[0][k] = s[0] = 1.;
+	{ // f[1]
+		double *fi = f[1], sum;
+		int beg = 1, end = l_ref < bw + 1? l_ref : bw + 1, _beg, _end;
+		for (k = beg, sum = 0.; k <= end; ++k) {
+			int u;
+			double e = (ref[k] > 3 || query[1] > 3)? 1. : ref[k] == query[1]? 1. - qual[1] : qual[1] * EM;
+			set_u(u, bw, 1, k);
+			fi[u+0] = e * bM; fi[u+1] = EI * bI;
+			sum += fi[u] + fi[u+1];
+		}
+		// rescale
+		s[1] = sum;
+		set_u(_beg, bw, 1, beg); set_u(_end, bw, 1, end); _end += 2;
+		for (k = _beg; k <= _end; ++k) fi[k] /= sum;
+	}
+	// f[2..l_query]
+	for (i = 2; i <= l_query; ++i) {
+		double *fi = f[i], *fi1 = f[i-1], sum, qli = qual[i];
+		int beg = 1, end = l_ref, x, _beg, _end;
+		uint8_t qyi = query[i];
+		x = i - bw; beg = beg > x? beg : x; // band start
+		x = i + bw; end = end < x? end : x; // band end
+		for (k = beg, sum = 0.; k <= end; ++k) {
+			int u, v11, v01, v10;
+			double e;
+			e = (ref[k] > 3 || qyi > 3)? 1. : ref[k] == qyi? 1. - qli : qli * EM;
+			set_u(u, bw, i, k); set_u(v11, bw, i-1, k-1); set_u(v10, bw, i-1, k); set_u(v01, bw, i, k-1);
+			fi[u+0] = e * (m[0] * fi1[v11+0] + m[3] * fi1[v11+1] + m[6] * fi1[v11+2]);
+			fi[u+1] = EI * (m[1] * fi1[v10+0] + m[4] * fi1[v10+1]);
+			fi[u+2] = m[2] * fi[v01+0] + m[8] * fi[v01+2];
+			sum += fi[u] + fi[u+1] + fi[u+2];
+//			fprintf(stderr, "F (%d,%d;%d): %lg,%lg,%lg\n", i, k, u, fi[u], fi[u+1], fi[u+2]); // DEBUG
+		}
+		// rescale
+		s[i] = sum;
+		set_u(_beg, bw, i, beg); set_u(_end, bw, i, end); _end += 2;
+		for (k = _beg, sum = 1./sum; k <= _end; ++k) fi[k] *= sum;
+	}
+	{ // f[l_query+1]
+		double sum;
+		for (k = 1, sum = 0.; k <= l_ref; ++k) {
+			int u;
+			set_u(u, bw, l_query, k);
+			if (u < 3 || u >= bw2*3+3) continue;
+		    sum += f[l_query][u+0] * sM + f[l_query][u+1] * sI;
+		}
+		s[l_query+1] = sum; // the last scaling factor
+	}
+	{ // compute likelihood
+		double p = 1., Pr1 = 0.;
+		for (i = 0; i <= l_query + 1; ++i) {
+			p *= s[i];
+			if (p < 1e-100) Pr1 += -4.343 * log(p), p = 1.;
+		}
+		Pr1 += -4.343 * log(p * l_ref * l_query);
+		Pr = (int)(Pr1 + .499);
+		if (!is_backward) { // skip backward and MAP
+			for (i = 0; i <= l_query; ++i) free(f[i]);
+			free(f); free(s); free(_qual);
+			return Pr;
+		}
+	}
+	/*** backward ***/
+	// b[l_query] (b[l_query+1][0]=1 and thus \tilde{b}[][]=1/s[l_query+1]; this is where s[l_query+1] comes from)
+	for (k = 1; k <= l_ref; ++k) {
+		int u;
+		double *bi = b[l_query];
+		set_u(u, bw, l_query, k);
+		if (u < 3 || u >= bw2*3+3) continue;
+		bi[u+0] = sM / s[l_query] / s[l_query+1]; bi[u+1] = sI / s[l_query] / s[l_query+1];
+	}
+	// b[l_query-1..1]
+	for (i = l_query - 1; i >= 1; --i) {
+		int beg = 1, end = l_ref, x, _beg, _end;
+		double *bi = b[i], *bi1 = b[i+1], y = (i > 1), qli1 = qual[i+1];
+		uint8_t qyi1 = query[i+1];
+		x = i - bw; beg = beg > x? beg : x;
+		x = i + bw; end = end < x? end : x;
+		for (k = end; k >= beg; --k) {
+			int u, v11, v01, v10;
+			double e;
+			set_u(u, bw, i, k); set_u(v11, bw, i+1, k+1); set_u(v10, bw, i+1, k); set_u(v01, bw, i, k+1);
+			e = (k >= l_ref? 0 : (ref[k+1] > 3 || qyi1 > 3)? 1. : ref[k+1] == qyi1? 1. - qli1 : qli1 * EM) * bi1[v11];
+			bi[u+0] = e * m[0] + EI * m[1] * bi1[v10+1] + m[2] * bi[v01+2]; // bi1[v11] has been foled into e.
+			bi[u+1] = e * m[3] + EI * m[4] * bi1[v10+1];
+			bi[u+2] = (e * m[6] + m[8] * bi[v01+2]) * y;
+//			fprintf(stderr, "B (%d,%d;%d): %lg,%lg,%lg\n", i, k, u, bi[u], bi[u+1], bi[u+2]); // DEBUG
+		}
+		// rescale
+		set_u(_beg, bw, i, beg); set_u(_end, bw, i, end); _end += 2;
+		for (k = _beg, y = 1./s[i]; k <= _end; ++k) bi[k] *= y;
+	}
+	{ // b[0]
+		int beg = 1, end = l_ref < bw + 1? l_ref : bw + 1;
+		double sum = 0.;
+		for (k = end; k >= beg; --k) {
+			int u;
+			double e = (ref[k] > 3 || query[1] > 3)? 1. : ref[k] == query[1]? 1. - qual[1] : qual[1] * EM;
+			set_u(u, bw, 1, k);
+			if (u < 3 || u >= bw2*3+3) continue;
+		    sum += e * b[1][u+0] * bM + EI * b[1][u+1] * bI;
+		}
+		set_u(k, bw, 0, 0);
+		pb = b[0][k] = sum / s[0]; // if everything works as is expected, pb == 1.0
+	}
+	is_diff = fabs(pb - 1.) > 1e-7? 1 : 0;
+	/*** MAP ***/
+	for (i = 1; i <= l_query; ++i) {
+		double sum = 0., *fi = f[i], *bi = b[i], max = 0.;
+		int beg = 1, end = l_ref, x, max_k = -1;
+		x = i - bw; beg = beg > x? beg : x;
+		x = i + bw; end = end < x? end : x;
+		for (k = beg; k <= end; ++k) {
+			int u;
+			double z;
+			set_u(u, bw, i, k);
+			z = fi[u+0] * bi[u+0]; if (z > max) max = z, max_k = (k-1)<<2 | 0; sum += z;
+			z = fi[u+1] * bi[u+1]; if (z > max) max = z, max_k = (k-1)<<2 | 1; sum += z;
+		}
+		max /= sum; sum *= s[i]; // if everything works as is expected, sum == 1.0
+		if (state) state[i-1] = max_k;
+		if (q) k = (int)(-4.343 * log(1. - max) + .499), q[i-1] = k > 100? 99 : k;
+#ifdef _MAIN
+		fprintf(stderr, "(%.10lg,%.10lg) (%d,%d:%c,%c:%d) %lg\n", pb, sum, i-1, max_k>>2,
+				"ACGT"[query[i]], "ACGT"[ref[(max_k>>2)+1]], max_k&3, max); // DEBUG
+#endif
+	}
+	/*** free ***/
+	for (i = 0; i <= l_query; ++i) {
+		free(f[i]); free(b[i]);
+	}
+	free(f); free(b); free(s); free(_qual);
+	return Pr;
+}
+
+#ifdef _MAIN
+#include <unistd.h>
+int main(int argc, char *argv[])
+{
+	uint8_t conv[256], *iqual, *ref, *query;
+	int c, l_ref, l_query, i, q = 30, b = 10, P;
+	while ((c = getopt(argc, argv, "b:q:")) >= 0) {
+		switch (c) {
+		case 'b': b = atoi(optarg); break;
+		case 'q': q = atoi(optarg); break;
+		}
+	}
+	if (optind + 2 > argc) {
+		fprintf(stderr, "Usage: %s [-q %d] [-b %d] <ref> <query>\n", argv[0], q, b); // example: acttc attc
+		return 1;
+	}
+	memset(conv, 4, 256);
+	conv['a'] = conv['A'] = 0; conv['c'] = conv['C'] = 1;
+	conv['g'] = conv['G'] = 2; conv['t'] = conv['T'] = 3;
+	ref = (uint8_t*)argv[optind]; query = (uint8_t*)argv[optind+1];
+	l_ref = strlen((char*)ref); l_query = strlen((char*)query);
+	for (i = 0; i < l_ref; ++i) ref[i] = conv[ref[i]];
+	for (i = 0; i < l_query; ++i) query[i] = conv[query[i]];
+	iqual = malloc(l_query);
+	memset(iqual, q, l_query);
+	kpa_par_def.bw = b;
+	P = kpa_glocal(ref, l_ref, query, l_query, iqual, &kpa_par_alt, 0, 0);
+	fprintf(stderr, "%d\n", P);
+	free(iqual);
+	return 0;
+}
+#endif
diff --git a/samtools/razf.c.pysam.c b/samtools/razf.c.pysam.c
index 4021637..49ce37c 100644
--- a/samtools/razf.c.pysam.c
+++ b/samtools/razf.c.pysam.c
@@ -73,7 +73,7 @@ static inline uint64_t byte_swap_8(uint64_t v){
 	return ((v & 0x00FF00FF00FF00FFLLU) << 8) | ((v & 0xFF00FF00FF00FF00LLU) >> 8);
 }
 
-static inline int is_big_endian(){
+static inline int is_big_endian(void){
 	int x = 0x01;
 	char *c = (char*)&x;
 	return (c[0] != 0x01);
diff --git a/setup.cfg b/setup.cfg
index 81d163a..b9711b8 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,8 +1,8 @@
 [bdist_rpm]
-vendor = TDB
 doc_files = README doc/*.html ChangeLog
-distribution-name = Red Hat Linux
+vendor = TDB
 packager = TDB <email at email.com>
+distribution-name = Red Hat Linux
 requires = python
 
 [egg_info]
diff --git a/setup.py b/setup.py
index 5fa876f..4589409 100644
--- a/setup.py
+++ b/setup.py
@@ -6,46 +6,100 @@ pysam
 
 '''
 
-import os, sys, glob, shutil, hashlib, re, fnmatch
+import os
+import sys
+import glob
+import shutil
+import hashlib
+import re
+import fnmatch
 import platform
+import subprocess
 
 name = "pysam"
 
 IS_PYTHON3 = sys.version_info[0] >= 3
 
+
+# How to link against HTSLIB
+# separate: use included htslib and include in each extension
+#           module. No dependencies between modules and works
+#           with setup.py install, but wasteful in terms of 
+#           memory and compilation time.
+# shared: share chtslib across extension modules. This would be
+#         the ideal method, but currently requires
+#         LD_LIBRARY_PATH to be set correctly when using
+#         pysam. 
+# external: use shared libhts.so compiled outside of 
+#           pysam
+HTSLIB = "separate"
+HTSLIB_DIR = []
+
 # collect pysam version
-sys.path.insert( 0, "pysam")
+sys.path.insert(0, "pysam")
 import version
 
 version = version.__version__
 
-samtools_exclude = ( "bamtk.c", "razip.c", "bgzip.c", 
-                     "main.c", "calDepth.c", "bam2bed.c",
-                     "wgsim.c", "md5fa.c", "maq2sam.c",
-                     "bamcheck.c",
-                     "chk_indel.c" )
-samtools_dest = os.path.abspath( "samtools" )
-tabix_exclude = ( "main.c", )
-tabix_dest = os.path.abspath( "tabix" )
+samtools_exclude = ("bamtk.c", "razip.c", "bgzip.c",
+                    "main.c", "calDepth.c", "bam2bed.c",
+                    "wgsim.c", "md5fa.c", "maq2sam.c",
+                    "bamcheck.c",
+                    "chk_indel.c")
+htslib_exclude = ('htslib/tabix.c',)
+samtools_dest = os.path.abspath("samtools")
+tabix_exclude = ("main.c",)
+tabix_dest = os.path.abspath("tabix")
+
+# Linking against htslib
+if HTSLIB == 'external':
+    htslib_sources = []
+    chtslib_sources = []
+    htslib_library_dirs = HTSLIB_DIR
+    htslib_libraries = ['hts']
+elif HTSLIB == 'separate':
+    htslib_sources = [
+        x for x in
+        glob.glob(os.path.join("htslib", "*.c")) +
+        glob.glob(os.path.join("htslib", "cram", "*.c"))
+        if x not in htslib_exclude]
+    shared_htslib_sources = htslib_sources
+    htslib_library_dirs = []
+    htslib_libraries = []
+elif HTSLIB == 'shared':
+    htslib_sources = []
+    shared_htslib_sources = [
+        x for x in
+        glob.glob(os.path.join("htslib", "*.c")) +
+        glob.glob(os.path.join("htslib", "cram", "*.c"))
+        if x not in htslib_exclude]
+    htslib_library_dirs = ['pysam']
+    htslib_libraries = ['chtslib']
+else:
+    raise ValueError("unknown HTSLIB value '%s'" % HTSLIB)
+
 
 def locate(pattern, root=os.curdir):
     '''Locate all files matching supplied filename pattern in and below
     supplied root directory.'''
     for path, dirs, files in os.walk(os.path.abspath(root)):
-       for filename in fnmatch.filter(files, pattern):
-          yield os.path.join(path, filename)
+        for filename in fnmatch.filter(files, pattern):
+            yield os.path.join(path, filename)
+
 
 def _update_pysam_files(cf, destdir):
     '''update pysam files applying redirection of ouput'''
     for filename in cf:
-        if not filename: continue
+        if not filename:
+            continue
         dest = filename + ".pysam.c"
-        with open( filename ) as infile:
-            with open( dest, "w" ) as outfile:
-                outfile.write( '#include "pysam.h"\n\n' )
-                outfile.write( re.sub( "stderr", "pysamerr", "".join(infile.readlines()) ) )
-            with open( os.path.join( destdir, "pysam.h" ), "w" )as outfile:
-                outfile.write ("""#ifndef PYSAM_H
+        with open(filename) as infile:
+            with open(dest, "w") as outfile:
+                outfile.write('#include "pysam.h"\n\n')
+                outfile.write(
+                    re.sub("stderr", "pysamerr", "".join(infile.readlines())))
+            with open(os.path.join(destdir, "pysam.h"), "w")as outfile:
+                outfile.write("""#ifndef PYSAM_H
 #define PYSAM_H
 #include "stdio.h"
 extern FILE * pysamerr;
@@ -54,71 +108,93 @@ extern FILE * pysamerr;
 
 # copy samtools source
 if len(sys.argv) >= 2 and sys.argv[1] == "import":
-   if len(sys.argv) < 3: raise ValueError("missing PATH to samtools source directory")
-   if len(sys.argv) < 4: raise ValueError("missing PATH to tabix source directory")
-
-   for destdir, srcdir, exclude in zip( 
-      (samtools_dest, tabix_dest), 
-      sys.argv[2:4],
-      (samtools_exclude, tabix_exclude)):
-
-      srcdir = os.path.abspath( srcdir )
-      if not os.path.exists( srcdir ): raise IOError( "samtools src dir `%s` does not exist." % srcdir )
-
-      cfiles = locate( "*.c", srcdir )
-      hfiles = locate( "*.h", srcdir )
-      ncopied = 0
-      
-      def _compareAndCopy( src, srcdir, destdir, exclude ):
-
-         d, f = os.path.split(src)
-         if f in exclude: return None
-         common_prefix = os.path.commonprefix( (d, srcdir ) )
-         subdir = re.sub( common_prefix, "", d )[1:]
-         targetdir = os.path.join( destdir, subdir )
-         if not os.path.exists( targetdir ):
-            os.makedirs( targetdir )
-         old_file = os.path.join( targetdir, f )
-         if os.path.exists( old_file ):
-            md5_old = hashlib.md5("".join(open(old_file,"r").readlines())).digest()
-            md5_new = hashlib.md5("".join(open(src,"r").readlines())).digest()
-            if md5_old != md5_new:
-               raise ValueError( "incompatible files for %s and %s" % (old_file, src ))
-
-         shutil.copy( src, targetdir )
-         return old_file
-
-      for src_file in hfiles:
-         _compareAndCopy( src_file, srcdir,destdir, exclude )
-         ncopied += 1
-
-      cf = []
-      for src_file in cfiles:
-         cf.append( _compareAndCopy( src_file, srcdir, destdir, exclude ) )
-         ncopied += 1
-         
-      sys.stdout.write("installed latest source code from %s: %i files copied" % (srcdir, ncopied))
-      # redirect stderr to pysamerr and replace bam.h with a stub.
-      sys.stdout.write("applying stderr redirection")
-     
-      _update_pysam_files(cf, destdir)
-      
-
-   sys.exit(0)
+    if len(sys.argv) < 3:
+        raise ValueError("missing PATH to samtools source directory")
+    if len(sys.argv) < 4:
+        raise ValueError("missing PATH to tabix source directory")
+
+    for destdir, srcdir, exclude in zip(
+            (samtools_dest, tabix_dest),
+            sys.argv[2:4],
+            (samtools_exclude, tabix_exclude)):
+
+        srcdir = os.path.abspath(srcdir)
+        if not os.path.exists(srcdir):
+            raise IOError("samtools src dir `%s` does not exist." % srcdir)
+
+        cfiles = locate("*.c", srcdir)
+        hfiles = locate("*.h", srcdir)
+        ncopied = 0
+
+        def _compareAndCopy(src, srcdir, destdir, exclude):
+
+            d, f = os.path.split(src)
+            if f in exclude:
+                return None
+            common_prefix = os.path.commonprefix((d, srcdir))
+            subdir = re.sub(common_prefix, "", d)[1:]
+            targetdir = os.path.join(destdir, subdir)
+            if not os.path.exists(targetdir):
+                os.makedirs(targetdir)
+            old_file = os.path.join(targetdir, f)
+            if os.path.exists(old_file):
+                md5_old = hashlib.md5(
+                    "".join(open(old_file, "r").readlines())).digest()
+                md5_new = hashlib.md5(
+                    "".join(open(src, "r").readlines())).digest()
+                if md5_old != md5_new:
+                    raise ValueError(
+                        "incompatible files for %s and %s" % (old_file, src))
+
+            shutil.copy(src, targetdir)
+            return old_file
+
+        for src_file in hfiles:
+            _compareAndCopy(src_file, srcdir, destdir, exclude)
+            ncopied += 1
+
+        cf = []
+        for src_file in cfiles:
+            cf.append(_compareAndCopy(src_file, srcdir, destdir, exclude))
+            ncopied += 1
+
+        sys.stdout.write(
+            "installed latest source code from %s: "
+            "%i files copied" % (srcdir, ncopied))
+        # redirect stderr to pysamerr and replace bam.h with a stub.
+        sys.stdout.write("applying stderr redirection")
+
+        _update_pysam_files(cf, destdir)
+
+    sys.exit(0)
+
 
 if len(sys.argv) >= 2 and sys.argv[1] == "refresh":
     sys.stdout.write("refreshing latest source code from .c to .pysam.c")
-# redirect stderr to pysamerr and replace bam.h with a stub.
+    # redirect stderr to pysamerr and replace bam.h with a stub.
     sys.stdout.write("applying stderr redirection")
     for destdir in ('samtools', 'tabix'):
-        pysamcfiles = locate( "*.pysam.c", destdir )
-        for f in pysamcfiles: os.remove(f)
-        cfiles = locate( "*.c", destdir )
+        pysamcfiles = locate("*.pysam.c", destdir)
+        for f in pysamcfiles:
+            os.remove(f)
+        cfiles = locate("*.c", destdir)
         _update_pysam_files(cfiles, destdir)
 
     sys.exit(0)
 
 
+# checkout latest version of htslib
+if len(sys.argv) == 2 and sys.argv[1] == "htslib":
+    if not os.path.exists("htslib"):
+        subprocess.call(["git", "clone", "git at github.com:samtools/htslib.git"])
+        with open(os.path.join("htslib", "version.h"), "w") as outfile:
+            outfile.write('#define HTS_VERSION "0.0.1"')
+    else:
+        os.chdir('htslib')
+        subprocess.call(["git", "pull"])
+
+    sys.exit(0)
+
 ###################
 # populate headers
 # mkdir pysam/include pysam/include/win32
@@ -127,11 +203,11 @@ if len(sys.argv) >= 2 and sys.argv[1] == "refresh":
 # cp samtools/win32/*.h pysam/include/win32
 
 try:
-    from setuptools import Extension, setup, find_packages
+    from setuptools import Extension, setup
 except ImportError:
     from ez_setup import use_setuptools
     use_setuptools()
-    from setuptools import Extension, setup, find_packages
+    from setuptools import Extension, setup
 
 #######################################################
 #######################################################
@@ -139,29 +215,38 @@ try:
     from Cython.Distutils import build_ext
 except ImportError:
     # no Cython available - use existing C code
-    cmdclass = { }
-    csamtools_sources = [ "pysam/csamtools.c" ]
-    tabix_sources = [ "pysam/ctabix.c" ]
-    tabproxies_sources = ["pysam/TabProxies.c" ]
-    cvcf_sources = ["pysam/cvcf.c" ]
+    cmdclass = {}
+    csamtools_sources = ["pysam/csamtools.c"]
+    chtslib_sources = ["pysam/chtslib.c"]
+    tabix_sources = ["pysam/ctabix.c"]
+    faidx_sources = ["pysam/cfaidx.c"]
+    csamfile_sources = ["pysam/csamfile.c"]
+    tabproxies_sources = ["pysam/TabProxies.c"]
+    cvcf_sources = ["pysam/cvcf.c"]
 else:
     # remove existing files to recompute
     # necessary to be both compatible for python 2.7 and 3.3
     if IS_PYTHON3:
-        for f in ( "pysam/csamtools.c", 
-                   "pysam/ctabix.c",
-                   "pysam/TabProxies.c",
-                   "pysam/cvcf.c" ):
+        for f in ("pysam/csamtools.c",
+                  "pysam/chtslib.c",
+                  "pysam/ctabix.c",
+                  "pysam/cfaidx.c",
+                  "pysam/csamfile.c",
+                  "pysam/TabProxies.c",
+                  "pysam/cvcf.c"):
             try:
-                os.unlink( f )
+                os.unlink(f)
             except:
                 pass
-    
-    cmdclass = { 'build_ext' : build_ext }
-    csamtools_sources = [ "pysam/csamtools.pyx" ]
-    tabix_sources = [ "pysam/ctabix.pyx" ]
-    tabproxies_sources = ["pysam/TabProxies.pyx" ]
-    cvcf_sources = ["pysam/cvcf.pyx" ]
+
+    cmdclass = {'build_ext': build_ext}
+    csamtools_sources = ["pysam/csamtools.pyx"]
+    chtslib_sources = ["pysam/chtslib.pyx"]
+    csamfile_sources = ["pysam/csamfile.pyx"]
+    tabix_sources = ["pysam/ctabix.pyx"]
+    faidx_sources = ["pysam/cfaidx.pyx"]
+    tabproxies_sources = ["pysam/TabProxies.pyx"]
+    cvcf_sources = ["pysam/cvcf.pyx"]
 
 #######################################################
 classifiers = """
@@ -178,8 +263,8 @@ Topic :: Scientific/Engineering :: Bioinformatics
 """
 
 #######################################################
-## Windows compatibility
-if platform.system()=='Windows':
+# Windows compatibility
+if platform.system() == 'Windows':
     include_os = ['win32']
     os_c_files = ['win32/getopt.c']
 else:
@@ -188,81 +273,145 @@ else:
 
 #######################################################
 samtools = Extension(
-    "pysam.csamtools",              
-    csamtools_sources +\
-        [ "pysam/%s" % x for x in (
-                "pysam_util.c", )] +\
-        glob.glob( os.path.join( "samtools", "*.pysam.c" )) +\
-        os_c_files + \
-        glob.glob( os.path.join( "samtools", "*", "*.pysam.c" ) ),
+    "pysam.csamtools",
+    csamtools_sources +
+    ["pysam/%s" % x for x in (
+        "pysam_util.c", )] +
+    glob.glob(os.path.join("samtools", "*.pysam.c")) +
+    os_c_files +
+    glob.glob(os.path.join("samtools", "*", "*.pysam.c")),
     library_dirs=[],
-    include_dirs=[ "samtools", "pysam" ] + include_os,
-    libraries=[ "z", ],
+    include_dirs=["samtools", "pysam"] + include_os,
+    libraries=["z"],
     language="c",
-    define_macros = [('_FILE_OFFSET_BITS','64'),
-                     ('_USE_KNETFILE','')], 
-    )
+    extra_compile_args=["-Wno-error=declaration-after-statement"],
+    define_macros=[('_FILE_OFFSET_BITS', '64'),
+                   ('_USE_KNETFILE', '')]
+)
+
+htslib = Extension(
+    "pysam.libchtslib",
+    chtslib_sources +
+    ["pysam/%s" % x for x in (
+        "htslib_util.c", )] +
+    shared_htslib_sources +
+    os_c_files,
+    library_dirs=htslib_library_dirs,
+    include_dirs=["htslib",
+                  "pysam"] + include_os,
+    libraries=["z"] + htslib_libraries,
+    language="c",
+    extra_compile_args=["-Wno-error=declaration-after-statement",
+                        "-DSAMTOOLS=1"],
+    define_macros=[('_FILE_OFFSET_BITS', '64'),
+                   ('_USE_KNETFILE', '')]
+)
+
+# samfile requires functions defined in bam_md.c
+# for __advance_samtools method.
+# Selected ones have been copied into samfile_utils.c
+# Needs to be devolved somehow.
+samfile = Extension(
+    "pysam.csamfile",
+    csamfile_sources +
+    ["pysam/%s" % x for x in (
+        "htslib_util.c", "samfile_util.c",)] +
+    ["samtools/kprobaln.c"] +
+    htslib_sources +
+    os_c_files,
+    library_dirs=htslib_library_dirs,
+    include_dirs=["htslib", "pysam", "samtools"] + include_os,
+    libraries=["z"] + htslib_libraries,
+    language="c",
+    extra_compile_args=[
+        "-Wno-error=declaration-after-statement",
+        "-DSAMTOOLS=1"],
+    define_macros=[('_FILE_OFFSET_BITS', '64'),
+                   ('_USE_KNETFILE', '')]
+)
 
 tabix = Extension(
-    "pysam.ctabix",                   
-    tabix_sources +\
-       [ "pysam/%s" % x for x in ( "tabix_util.c", )] +\
-        os_c_files + \
-       glob.glob( os.path.join( "tabix", "*.pysam.c" ) ),
-    library_dirs=[],
-    include_dirs=[ "tabix", "pysam" ] + include_os,
-    libraries=[ "z", ],
+    "pysam.ctabix",
+    tabix_sources +
+    ["pysam/%s" % x for x in ("tabix_util.c", )] +
+    htslib_sources +
+    os_c_files,
+    library_dirs=["pysam"] + htslib_library_dirs,
+    include_dirs=["htslib", "pysam"] + include_os,
+    libraries=["z"] + htslib_libraries,
+    language="c",
+    extra_compile_args=["-Wno-error=declaration-after-statement",
+                        "-DSAMTOOLS=1"],
+    define_macros=[('_FILE_OFFSET_BITS', '64'),
+                   ('_USE_KNETFILE', '')],
+)
+
+faidx = Extension(
+    "pysam.cfaidx",
+    faidx_sources +
+    htslib_sources +
+    os_c_files,
+    library_dirs=["pysam"],
+    include_dirs=["htslib", "pysam"] + include_os,
+    libraries=["z"] + htslib_libraries,
     language="c",
-    define_macros = [('_FILE_OFFSET_BITS','64'),
-                     ('_USE_KNETFILE','')], 
-    )
+    extra_compile_args=["-Wno-error=declaration-after-statement",
+                        "-DSAMTOOLS=1"],
+    define_macros=[('_FILE_OFFSET_BITS', '64'),
+                   ('_USE_KNETFILE', '')],
+)
 
 tabproxies = Extension(
-    "pysam.TabProxies",               
+    "pysam.TabProxies",
     tabproxies_sources + os_c_files,
     library_dirs=[],
-    include_dirs= include_os,
-    libraries=[ "z", ],
+    include_dirs=include_os,
+    libraries=["z"],
     language="c",
-    )
+    extra_compile_args=["-Wno-error=declaration-after-statement"],
+)
 
 cvcf = Extension(
-    "pysam.cvcf",                   
+    "pysam.cvcf",
     cvcf_sources + os_c_files,
     library_dirs=[],
-    include_dirs= ["tabix",] + include_os,
-    libraries=[ "z", ],
+    include_dirs=["htslib"] + include_os,
+    libraries=["z"],
     language="c",
-    )
+    extra_compile_args=["-Wno-error=declaration-after-statement"],
+)
 
 metadata = {
     'name': name,
     'version': version,
-    'description': "pysam", 
+    'description': "pysam",
     'long_description': __doc__,
     'author': "Andreas Heger",
     'author_email': "andreas.heger at gmail.com",
     'license': "MIT",
     'platforms': "ALL",
     'url': "http://code.google.com/p/pysam/",
-    'packages' : ['pysam',
-                  'pysam.include',
-                  'pysam.include.samtools',
-                  'pysam.include.samtools.bcftools',
-                  'pysam.include.samtools.win32',
-                  'pysam.include.tabix'],
-    'requires' : ['cython (>=0.17)'],
-    'ext_modules': [samtools, tabix, tabproxies, cvcf ],
-    'cmdclass' : cmdclass,
-    'install_requires' : ['cython>=0.17',], 
-    'package_dir' : { 'pysam'                  : 'pysam',
-                      'pysam.include.samtools' : 'samtools',
-                      'pysam.include.tabix'    : 'tabix' },
-    'package_data' : { '' : ['*.pxd', '*.h'],  },
+    'packages': ['pysam',
+                 'pysam.include',
+                 'pysam.include.htslib',
+                 'pysam.include.htslib.htslib',
+                 'pysam.include.samtools',
+                 'pysam.include.samtools.bcftools',
+                 'pysam.include.samtools.win32'],
+    'requires': ['cython (>=0.20.1)'],
+    'ext_modules': [samtools, htslib, samfile,
+                    tabix, tabproxies, cvcf,
+                    faidx],
+    'cmdclass': cmdclass,
+    'install_requires': ['cython>=0.20.1', ],
+    'package_dir': {'pysam': 'pysam',
+                    'pysam.include.htslib': 'htslib',
+                    'pysam.include.samtools': 'samtools'},
+    'package_data': {'': ['*.pxd', '*.h'], },
     # do not pack in order to permit linking to csamtools.so
-    'zip_safe' :False,
+    'zip_safe': False,
     'use_2to3': True,
-    }
+}
 
-if __name__=='__main__':
-   dist = setup(**metadata)
+if __name__ == '__main__':
+    dist = setup(**metadata)
diff --git a/tabix/bam_endian.h b/tabix/bam_endian.h
deleted file mode 100644
index 0fc74a8..0000000
--- a/tabix/bam_endian.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef BAM_ENDIAN_H
-#define BAM_ENDIAN_H
-
-#include <stdint.h>
-
-static inline int bam_is_big_endian()
-{
-	long one= 1;
-	return !(*((char *)(&one)));
-}
-static inline uint16_t bam_swap_endian_2(uint16_t v)
-{
-	return (uint16_t)(((v & 0x00FF00FFU) << 8) | ((v & 0xFF00FF00U) >> 8));
-}
-static inline void *bam_swap_endian_2p(void *x)
-{
-	*(uint16_t*)x = bam_swap_endian_2(*(uint16_t*)x);
-	return x;
-}
-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 void *bam_swap_endian_4p(void *x)
-{
-	*(uint32_t*)x = bam_swap_endian_4(*(uint32_t*)x);
-	return x;
-}
-static inline uint64_t bam_swap_endian_8(uint64_t v)
-{
-	v = ((v & 0x00000000FFFFFFFFLLU) << 32) | (v >> 32);
-	v = ((v & 0x0000FFFF0000FFFFLLU) << 16) | ((v & 0xFFFF0000FFFF0000LLU) >> 16);
-	return ((v & 0x00FF00FF00FF00FFLLU) << 8) | ((v & 0xFF00FF00FF00FF00LLU) >> 8);
-}
-static inline void *bam_swap_endian_8p(void *x)
-{
-	*(uint64_t*)x = bam_swap_endian_8(*(uint64_t*)x);
-	return x;
-}
-
-#endif
diff --git a/tabix/bedidx.c b/tabix/bedidx.c
deleted file mode 100644
index 722877d..0000000
--- a/tabix/bedidx.c
+++ /dev/null
@@ -1,156 +0,0 @@
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdio.h>
-#include <zlib.h>
-
-#include "ksort.h"
-KSORT_INIT_GENERIC(uint64_t)
-
-#include "kseq.h"
-KSTREAM_INIT(gzFile, gzread, 8192)
-
-typedef struct {
-	int n, m;
-	uint64_t *a;
-	int *idx;
-} bed_reglist_t;
-
-#include "khash.h"
-KHASH_MAP_INIT_STR(reg, bed_reglist_t)
-
-#define LIDX_SHIFT 13
-
-typedef kh_reg_t reghash_t;
-
-int *bed_index_core(int n, uint64_t *a, int *n_idx)
-{
-	int i, j, m, *idx;
-	m = *n_idx = 0; idx = 0;
-	for (i = 0; i < n; ++i) {
-		int beg, end;
-		beg = a[i]>>32 >> LIDX_SHIFT; end = ((uint32_t)a[i]) >> LIDX_SHIFT;
-		if (m < end + 1) {
-			int oldm = m;
-			m = end + 1;
-			kroundup32(m);
-			idx = realloc(idx, m * sizeof(int));
-			for (j = oldm; j < m; ++j) idx[j] = -1;
-		}
-		if (beg == end) {
-			if (idx[beg] < 0) idx[beg] = i;
-		} else {
-			for (j = beg; j <= end; ++j)
-				if (idx[j] < 0) idx[j] = i;
-		}
-		*n_idx = end + 1;
-	}
-	return idx;
-}
-
-void bed_index(void *_h)
-{
-	reghash_t *h = (reghash_t*)_h;
-	khint_t k;
-	for (k = 0; k < kh_end(h); ++k) {
-		if (kh_exist(h, k)) {
-			bed_reglist_t *p = &kh_val(h, k);
-			if (p->idx) free(p->idx);
-			ks_introsort(uint64_t, p->n, p->a);
-			p->idx = bed_index_core(p->n, p->a, &p->m);
-		}
-	}
-}
-
-int bed_overlap_core(const bed_reglist_t *p, int beg, int end)
-{
-	int i, min_off;
-	if (p->n == 0) return 0;
-	min_off = (beg>>LIDX_SHIFT >= p->n)? p->idx[p->n-1] : p->idx[beg>>LIDX_SHIFT];
-	if (min_off < 0) { // TODO: this block can be improved, but speed should not matter too much here
-		int n = beg>>LIDX_SHIFT;
-		if (n > p->n) n = p->n;
-		for (i = n - 1; i >= 0; --i)
-			if (p->idx[i] >= 0) break;
-		min_off = i >= 0? p->idx[i] : 0;
-	}
-	for (i = min_off; i < p->n; ++i) {
-		if ((int)(p->a[i]>>32) >= end) break; // out of range; no need to proceed
-		if ((int32_t)p->a[i] > beg && (int32_t)(p->a[i]>>32) < end)
-			return 1; // find the overlap; return
-	}
-	return 0;
-}
-
-int bed_overlap(const void *_h, const char *chr, int beg, int end)
-{
-	const reghash_t *h = (const reghash_t*)_h;
-	khint_t k;
-	if (!h) return 0;
-	k = kh_get(reg, h, chr);
-	if (k == kh_end(h)) return 0;
-	return bed_overlap_core(&kh_val(h, k), beg, end);
-}
-
-void *bed_read(const char *fn)
-{
-	reghash_t *h = kh_init(reg);
-	gzFile fp;
-	kstream_t *ks;
-	int dret;
-	kstring_t *str;
-	// read the list
-	fp = strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(fileno(stdin), "r");
-	if (fp == 0) return 0;
-	str = calloc(1, sizeof(kstring_t));
-	ks = ks_init(fp);
-	while (ks_getuntil(ks, 0, str, &dret) >= 0) { // read the chr name
-		int beg = -1, end = -1;
-		bed_reglist_t *p;
-		khint_t k = kh_get(reg, h, str->s);
-		if (k == kh_end(h)) { // absent from the hash table
-			int ret;
-			char *s = strdup(str->s);
-			k = kh_put(reg, h, s, &ret);
-			memset(&kh_val(h, k), 0, sizeof(bed_reglist_t));
-		}
-		p = &kh_val(h, k);
-		if (dret != '\n') { // if the lines has other characters
-			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]))
-						end = atoi(str->s); // end
-				}
-			}
-		}
-		if (dret != '\n') while ((dret = ks_getc(ks)) > 0 && dret != '\n'); // skip the rest of the line
-		if (end < 0 && beg > 0) end = beg, beg = beg - 1; // if there is only one column
-		if (beg >= 0 && end > beg) {
-			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);
-	bed_index(h);
-	return h;
-}
-
-void bed_destroy(void *_h)
-{
-	reghash_t *h = (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(kh_val(h, k).idx);
-			free((char*)kh_key(h, k));
-		}
-	}
-	kh_destroy(reg, h);
-}
diff --git a/tabix/bedidx.c.pysam.c b/tabix/bedidx.c.pysam.c
deleted file mode 100644
index c3ab06f..0000000
--- a/tabix/bedidx.c.pysam.c
+++ /dev/null
@@ -1,158 +0,0 @@
-#include "pysam.h"
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdio.h>
-#include <zlib.h>
-
-#include "ksort.h"
-KSORT_INIT_GENERIC(uint64_t)
-
-#include "kseq.h"
-KSTREAM_INIT(gzFile, gzread, 8192)
-
-typedef struct {
-	int n, m;
-	uint64_t *a;
-	int *idx;
-} bed_reglist_t;
-
-#include "khash.h"
-KHASH_MAP_INIT_STR(reg, bed_reglist_t)
-
-#define LIDX_SHIFT 13
-
-typedef kh_reg_t reghash_t;
-
-int *bed_index_core(int n, uint64_t *a, int *n_idx)
-{
-	int i, j, m, *idx;
-	m = *n_idx = 0; idx = 0;
-	for (i = 0; i < n; ++i) {
-		int beg, end;
-		beg = a[i]>>32 >> LIDX_SHIFT; end = ((uint32_t)a[i]) >> LIDX_SHIFT;
-		if (m < end + 1) {
-			int oldm = m;
-			m = end + 1;
-			kroundup32(m);
-			idx = realloc(idx, m * sizeof(int));
-			for (j = oldm; j < m; ++j) idx[j] = -1;
-		}
-		if (beg == end) {
-			if (idx[beg] < 0) idx[beg] = i;
-		} else {
-			for (j = beg; j <= end; ++j)
-				if (idx[j] < 0) idx[j] = i;
-		}
-		*n_idx = end + 1;
-	}
-	return idx;
-}
-
-void bed_index(void *_h)
-{
-	reghash_t *h = (reghash_t*)_h;
-	khint_t k;
-	for (k = 0; k < kh_end(h); ++k) {
-		if (kh_exist(h, k)) {
-			bed_reglist_t *p = &kh_val(h, k);
-			if (p->idx) free(p->idx);
-			ks_introsort(uint64_t, p->n, p->a);
-			p->idx = bed_index_core(p->n, p->a, &p->m);
-		}
-	}
-}
-
-int bed_overlap_core(const bed_reglist_t *p, int beg, int end)
-{
-	int i, min_off;
-	if (p->n == 0) return 0;
-	min_off = (beg>>LIDX_SHIFT >= p->n)? p->idx[p->n-1] : p->idx[beg>>LIDX_SHIFT];
-	if (min_off < 0) { // TODO: this block can be improved, but speed should not matter too much here
-		int n = beg>>LIDX_SHIFT;
-		if (n > p->n) n = p->n;
-		for (i = n - 1; i >= 0; --i)
-			if (p->idx[i] >= 0) break;
-		min_off = i >= 0? p->idx[i] : 0;
-	}
-	for (i = min_off; i < p->n; ++i) {
-		if ((int)(p->a[i]>>32) >= end) break; // out of range; no need to proceed
-		if ((int32_t)p->a[i] > beg && (int32_t)(p->a[i]>>32) < end)
-			return 1; // find the overlap; return
-	}
-	return 0;
-}
-
-int bed_overlap(const void *_h, const char *chr, int beg, int end)
-{
-	const reghash_t *h = (const reghash_t*)_h;
-	khint_t k;
-	if (!h) return 0;
-	k = kh_get(reg, h, chr);
-	if (k == kh_end(h)) return 0;
-	return bed_overlap_core(&kh_val(h, k), beg, end);
-}
-
-void *bed_read(const char *fn)
-{
-	reghash_t *h = kh_init(reg);
-	gzFile fp;
-	kstream_t *ks;
-	int dret;
-	kstring_t *str;
-	// read the list
-	fp = strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(fileno(stdin), "r");
-	if (fp == 0) return 0;
-	str = calloc(1, sizeof(kstring_t));
-	ks = ks_init(fp);
-	while (ks_getuntil(ks, 0, str, &dret) >= 0) { // read the chr name
-		int beg = -1, end = -1;
-		bed_reglist_t *p;
-		khint_t k = kh_get(reg, h, str->s);
-		if (k == kh_end(h)) { // absent from the hash table
-			int ret;
-			char *s = strdup(str->s);
-			k = kh_put(reg, h, s, &ret);
-			memset(&kh_val(h, k), 0, sizeof(bed_reglist_t));
-		}
-		p = &kh_val(h, k);
-		if (dret != '\n') { // if the lines has other characters
-			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]))
-						end = atoi(str->s); // end
-				}
-			}
-		}
-		if (dret != '\n') while ((dret = ks_getc(ks)) > 0 && dret != '\n'); // skip the rest of the line
-		if (end < 0 && beg > 0) end = beg, beg = beg - 1; // if there is only one column
-		if (beg >= 0 && end > beg) {
-			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);
-	bed_index(h);
-	return h;
-}
-
-void bed_destroy(void *_h)
-{
-	reghash_t *h = (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(kh_val(h, k).idx);
-			free((char*)kh_key(h, k));
-		}
-	}
-	kh_destroy(reg, h);
-}
diff --git a/tabix/bgzf.c b/tabix/bgzf.c
deleted file mode 100644
index 3bea718..0000000
--- a/tabix/bgzf.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/* The MIT License
-
-   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
-                 2011 Attractive Chaos <attractor at 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"), to deal
-   in the Software without restriction, including without limitation the rights
-   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-   copies of the Software, and to permit persons to whom the Software is
-   furnished to do so, subject to the following conditions:
-
-   The above copyright notice and this permission notice shall be included in
-   all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-   THE SOFTWARE.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <assert.h>
-#include <sys/types.h>
-#include "bgzf.h"
-
-#ifdef _USE_KNETFILE
-#include "knetfile.h"
-typedef knetFile *_bgzf_file_t;
-#define _bgzf_open(fn, mode) knet_open(fn, mode)
-#define _bgzf_dopen(fp, mode) knet_dopen(fp, mode)
-#define _bgzf_close(fp) knet_close(fp)
-#define _bgzf_fileno(fp) ((fp)->fd)
-#define _bgzf_tell(fp) knet_tell(fp)
-#define _bgzf_seek(fp, offset, whence) knet_seek(fp, offset, whence)
-#define _bgzf_read(fp, buf, len) knet_read(fp, buf, len)
-#define _bgzf_write(fp, buf, len) knet_write(fp, buf, len)
-#else // ~defined(_USE_KNETFILE)
-#if defined(_WIN32) || defined(_MSC_VER)
-#define ftello(fp) ftell(fp)
-#define fseeko(fp, offset, whence) fseek(fp, offset, whence)
-#else // ~defined(_WIN32)
-extern off_t ftello(FILE *stream);
-extern int fseeko(FILE *stream, off_t offset, int whence);
-#endif // ~defined(_WIN32)
-typedef FILE *_bgzf_file_t;
-#define _bgzf_open(fn, mode) fopen(fn, mode)
-#define _bgzf_dopen(fp, mode) fdopen(fp, mode)
-#define _bgzf_close(fp) fclose(fp)
-#define _bgzf_fileno(fp) fileno(fp)
-#define _bgzf_tell(fp) ftello(fp)
-#define _bgzf_seek(fp, offset, whence) fseeko(fp, offset, whence)
-#define _bgzf_read(fp, buf, len) fread(buf, 1, len, fp)
-#define _bgzf_write(fp, buf, len) fwrite(buf, 1, len, fp)
-#endif // ~define(_USE_KNETFILE)
-
-#define BLOCK_HEADER_LENGTH 18
-#define BLOCK_FOOTER_LENGTH 8
-
-/* BGZF/GZIP header (speciallized from RFC 1952; little endian):
- +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
- | 31|139|  8|  4|              0|  0|255|      6| 66| 67|      2|BLK_LEN|
- +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
-*/
-static const uint8_t g_magic[19] = "\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\0\0";
-
-#ifdef BGZF_CACHE
-typedef struct {
-	int size;
-	uint8_t *block;
-	int64_t end_offset;
-} cache_t;
-#include "khash.h"
-KHASH_MAP_INIT_INT64(cache, cache_t)
-#endif
-
-static inline void packInt16(uint8_t *buffer, uint16_t value)
-{
-	buffer[0] = value;
-	buffer[1] = value >> 8;
-}
-
-static inline int unpackInt16(const uint8_t *buffer)
-{
-	return buffer[0] | buffer[1] << 8;
-}
-
-static inline void packInt32(uint8_t *buffer, uint32_t value)
-{
-	buffer[0] = value;
-	buffer[1] = value >> 8;
-	buffer[2] = value >> 16;
-	buffer[3] = value >> 24;
-}
-
-static BGZF *bgzf_read_init()
-{
-	BGZF *fp;
-	fp = calloc(1, sizeof(BGZF));
-	fp->open_mode = 'r';
-	fp->uncompressed_block = malloc(BGZF_BLOCK_SIZE);
-	fp->compressed_block = malloc(BGZF_BLOCK_SIZE);
-#ifdef BGZF_CACHE
-	fp->cache = kh_init(cache);
-#endif
-	return fp;
-}
-
-static BGZF *bgzf_write_init(int compress_level) // compress_level==-1 for the default level
-{
-	BGZF *fp;
-	fp = calloc(1, sizeof(BGZF));
-	fp->open_mode = 'w';
-	fp->uncompressed_block = malloc(BGZF_BLOCK_SIZE);
-	fp->compressed_block = malloc(BGZF_BLOCK_SIZE);
-	fp->compress_level = compress_level < 0? Z_DEFAULT_COMPRESSION : compress_level; // Z_DEFAULT_COMPRESSION==-1
-	if (fp->compress_level > 9) fp->compress_level = Z_DEFAULT_COMPRESSION;
-	return fp;
-}
-// get the compress level from the mode string
-static int mode2level(const char *__restrict mode)
-{
-	int i, compress_level = -1;
-	for (i = 0; mode[i]; ++i)
-		if (mode[i] >= '0' && mode[i] <= '9') break;
-	if (mode[i]) compress_level = (int)mode[i] - '0';
-	if (strchr(mode, 'u')) compress_level = 0;
-	return compress_level;
-}
-
-BGZF *bgzf_open(const char *path, const char *mode)
-{
-	BGZF *fp = 0;
-	if (strchr(mode, 'r') || strchr(mode, 'R')) {
-		_bgzf_file_t fpr;
-		if ((fpr = _bgzf_open(path, "r")) == 0) return 0;
-		fp = bgzf_read_init();
-		fp->fp = fpr;
-	} else if (strchr(mode, 'w') || strchr(mode, 'W')) {
-		FILE *fpw;
-		if ((fpw = fopen(path, "w")) == 0) return 0;
-		fp = bgzf_write_init(mode2level(mode));
-		fp->fp = fpw;
-	}
-	return fp;
-}
-
-BGZF *bgzf_dopen(int fd, const char *mode)
-{
-	BGZF *fp = 0;
-	if (strchr(mode, 'r') || strchr(mode, 'R')) {
-		_bgzf_file_t fpr;
-		if ((fpr = _bgzf_dopen(fd, "r")) == 0) return 0;
-		fp = bgzf_read_init();
-		fp->fp = fpr;
-	} else if (strchr(mode, 'w') || strchr(mode, 'W')) {
-		FILE *fpw;
-		if ((fpw = fdopen(fd, "w")) == 0) return 0;
-		fp = bgzf_write_init(mode2level(mode));
-		fp->fp = fpw;
-	}
-	return fp;
-}
-
-// Deflate the block in fp->uncompressed_block into fp->compressed_block. Also adds an extra field that stores the compressed block length.
-static int deflate_block(BGZF *fp, int block_length)
-{
-	uint8_t *buffer = fp->compressed_block;
-	int buffer_size = BGZF_BLOCK_SIZE;
-	int input_length = block_length;
-	int compressed_length = 0;
-	int remaining;
-	uint32_t crc;
-
-	assert(block_length <= BGZF_BLOCK_SIZE); // guaranteed by the caller
-	memcpy(buffer, g_magic, BLOCK_HEADER_LENGTH); // the last two bytes are a place holder for the length of the block
-	while (1) { // loop to retry for blocks that do not compress enough
-		int status;
-		z_stream zs;
-		zs.zalloc = NULL;
-		zs.zfree = NULL;
-		zs.next_in = fp->uncompressed_block;
-		zs.avail_in = input_length;
-		zs.next_out = (void*)&buffer[BLOCK_HEADER_LENGTH];
-		zs.avail_out = buffer_size - BLOCK_HEADER_LENGTH - BLOCK_FOOTER_LENGTH;
-		status = deflateInit2(&zs, fp->compress_level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); // -15 to disable zlib header/footer
-		if (status != Z_OK) {
-			fp->errcode |= BGZF_ERR_ZLIB;
-			return -1;
-		}
-		status = deflate(&zs, Z_FINISH);
-		if (status != Z_STREAM_END) { // not compressed enough
-			deflateEnd(&zs); // reset the stream
-			if (status == Z_OK) { // reduce the size and recompress
-				input_length -= 1024;
-				assert(input_length > 0); // logically, this should not happen
-				continue;
-			}
-			fp->errcode |= BGZF_ERR_ZLIB;
-			return -1;
-		}
-		if (deflateEnd(&zs) != Z_OK) {
-			fp->errcode |= BGZF_ERR_ZLIB;
-			return -1;
-		}
-		compressed_length = zs.total_out;
-		compressed_length += BLOCK_HEADER_LENGTH + BLOCK_FOOTER_LENGTH;
-		assert(compressed_length <= BGZF_BLOCK_SIZE);
-		break;
-	}
-
-	assert(compressed_length > 0);
-	packInt16((uint8_t*)&buffer[16], compressed_length - 1); // write the compressed_length; -1 to fit 2 bytes
-	crc = crc32(0L, NULL, 0L);
-	crc = crc32(crc, fp->uncompressed_block, input_length);
-	packInt32((uint8_t*)&buffer[compressed_length-8], crc);
-	packInt32((uint8_t*)&buffer[compressed_length-4], input_length);
-
-	remaining = block_length - input_length;
-	if (remaining > 0) {
-		assert(remaining <= input_length);
-		memcpy(fp->uncompressed_block, fp->uncompressed_block + input_length, remaining);
-	}
-	fp->block_offset = remaining;
-	return compressed_length;
-}
-
-// Inflate the block in fp->compressed_block into fp->uncompressed_block
-static int inflate_block(BGZF* fp, int block_length)
-{
-	z_stream zs;
-	zs.zalloc = NULL;
-	zs.zfree = NULL;
-	zs.next_in = fp->compressed_block + 18;
-	zs.avail_in = block_length - 16;
-	zs.next_out = fp->uncompressed_block;
-	zs.avail_out = BGZF_BLOCK_SIZE;
-
-	if (inflateInit2(&zs, -15) != Z_OK) {
-		fp->errcode |= BGZF_ERR_ZLIB;
-		return -1;
-	}
-	if (inflate(&zs, Z_FINISH) != Z_STREAM_END) {
-		inflateEnd(&zs);
-		fp->errcode |= BGZF_ERR_ZLIB;
-		return -1;
-	}
-	if (inflateEnd(&zs) != Z_OK) {
-		fp->errcode |= BGZF_ERR_ZLIB;
-		return -1;
-	}
-	return zs.total_out;
-}
-
-static int check_header(const uint8_t *header)
-{
-	return (header[0] == 31 && header[1] == 139 && header[2] == 8 && (header[3] & 4) != 0
-			&& unpackInt16((uint8_t*)&header[10]) == 6
-			&& header[12] == 'B' && header[13] == 'C'
-			&& unpackInt16((uint8_t*)&header[14]) == 2);
-}
-
-#ifdef BGZF_CACHE
-static void free_cache(BGZF *fp)
-{
-	khint_t k;
-	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
-	if (fp->open_mode != 'r') return;
-	for (k = kh_begin(h); k < kh_end(h); ++k)
-		if (kh_exist(h, k)) free(kh_val(h, k).block);
-	kh_destroy(cache, h);
-}
-
-static int load_block_from_cache(BGZF *fp, int64_t block_address)
-{
-	khint_t k;
-	cache_t *p;
-	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
-	k = kh_get(cache, h, block_address);
-	if (k == kh_end(h)) return 0;
-	p = &kh_val(h, k);
-	if (fp->block_length != 0) fp->block_offset = 0;
-	fp->block_address = block_address;
-	fp->block_length = p->size;
-	memcpy(fp->uncompressed_block, p->block, BGZF_BLOCK_SIZE);
-	_bgzf_seek((_bgzf_file_t)fp->fp, p->end_offset, SEEK_SET);
-	return p->size;
-}
-
-static void cache_block(BGZF *fp, int size)
-{
-	int ret;
-	khint_t k;
-	cache_t *p;
-	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
-	if (BGZF_BLOCK_SIZE >= fp->cache_size) return;
-	if ((kh_size(h) + 1) * BGZF_BLOCK_SIZE > fp->cache_size) {
-		/* A better way would be to remove the oldest block in the
-		 * cache, but here we remove a random one for simplicity. This
-		 * should not have a big impact on performance. */
-		for (k = kh_begin(h); k < kh_end(h); ++k)
-			if (kh_exist(h, k)) break;
-		if (k < kh_end(h)) {
-			free(kh_val(h, k).block);
-			kh_del(cache, h, k);
-		}
-	}
-	k = kh_put(cache, h, fp->block_address, &ret);
-	if (ret == 0) return; // if this happens, a bug!
-	p = &kh_val(h, k);
-	p->size = fp->block_length;
-	p->end_offset = fp->block_address + size;
-	p->block = malloc(BGZF_BLOCK_SIZE);
-	memcpy(kh_val(h, k).block, fp->uncompressed_block, BGZF_BLOCK_SIZE);
-}
-#else
-static void free_cache(BGZF *fp) {}
-static int load_block_from_cache(BGZF *fp, int64_t block_address) {return 0;}
-static void cache_block(BGZF *fp, int size) {}
-#endif
-
-int bgzf_read_block(BGZF *fp)
-{
-	uint8_t header[BLOCK_HEADER_LENGTH], *compressed_block;
-	int count, size = 0, block_length, remaining;
-	int64_t block_address;
-	block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
-	if (load_block_from_cache(fp, block_address)) return 0;
-	count = _bgzf_read(fp->fp, header, sizeof(header));
-	if (count == 0) { // no data read
-		fp->block_length = 0;
-		return 0;
-	}
-	if (count != sizeof(header) || !check_header(header)) {
-		fp->errcode |= BGZF_ERR_HEADER;
-		return -1;
-	}
-	size = count;
-	block_length = unpackInt16((uint8_t*)&header[16]) + 1; // +1 because when writing this number, we used "-1"
-	compressed_block = (uint8_t*)fp->compressed_block;
-	memcpy(compressed_block, header, BLOCK_HEADER_LENGTH);
-	remaining = block_length - BLOCK_HEADER_LENGTH;
-	count = _bgzf_read(fp->fp, &compressed_block[BLOCK_HEADER_LENGTH], remaining);
-	if (count != remaining) {
-		fp->errcode |= BGZF_ERR_IO;
-		return -1;
-	}
-	size += count;
-	if ((count = inflate_block(fp, block_length)) < 0) return -1;
-	if (fp->block_length != 0) fp->block_offset = 0; // Do not reset offset if this read follows a seek.
-	fp->block_address = block_address;
-	fp->block_length = count;
-	cache_block(fp, size);
-	return 0;
-}
-
-ssize_t bgzf_read(BGZF *fp, void *data, ssize_t length)
-{
-	ssize_t bytes_read = 0;
-	uint8_t *output = data;
-	if (length <= 0) return 0;
-	assert(fp->open_mode == 'r');
-	while (bytes_read < length) {
-		int copy_length, available = fp->block_length - fp->block_offset;
-		uint8_t *buffer;
-		if (available <= 0) {
-			if (bgzf_read_block(fp) != 0) return -1;
-			available = fp->block_length - fp->block_offset;
-			if (available <= 0) break;
-		}
-		copy_length = length - bytes_read < available? length - bytes_read : available;
-		buffer = fp->uncompressed_block;
-		memcpy(output, buffer + fp->block_offset, copy_length);
-		fp->block_offset += copy_length;
-		output += copy_length;
-		bytes_read += copy_length;
-	}
-	if (fp->block_offset == fp->block_length) {
-		fp->block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
-		fp->block_offset = fp->block_length = 0;
-	}
-	return bytes_read;
-}
-
-int bgzf_flush(BGZF *fp)
-{
-	assert(fp->open_mode == 'w');
-	while (fp->block_offset > 0) {
-		int block_length;
-		block_length = deflate_block(fp, fp->block_offset);
-		if (block_length < 0) return -1;
-		if (fwrite(fp->compressed_block, 1, block_length, fp->fp) != block_length) {
-			fp->errcode |= BGZF_ERR_IO; // possibly truncated file
-			return -1;
-		}
-		fp->block_address += block_length;
-	}
-	return 0;
-}
-
-int bgzf_flush_try(BGZF *fp, ssize_t size)
-{
-	if (fp->block_offset + size > BGZF_BLOCK_SIZE)
-		return bgzf_flush(fp);
-	return -1;
-}
-
-ssize_t bgzf_write(BGZF *fp, const void *data, ssize_t length)
-{
-	const uint8_t *input = data;
-	int block_length = BGZF_BLOCK_SIZE, bytes_written;
-	assert(fp->open_mode == 'w');
-	input = data;
-	bytes_written = 0;
-	while (bytes_written < length) {
-		uint8_t* buffer = fp->uncompressed_block;
-		int copy_length = block_length - fp->block_offset < length - bytes_written? block_length - fp->block_offset : length - bytes_written;
-		memcpy(buffer + fp->block_offset, input, copy_length);
-		fp->block_offset += copy_length;
-		input += copy_length;
-		bytes_written += copy_length;
-		if (fp->block_offset == block_length && bgzf_flush(fp)) break;
-	}
-	return bytes_written;
-}
-
-int bgzf_close(BGZF* fp)
-{
-	int ret, count, block_length;
-	if (fp == 0) return -1;
-	if (fp->open_mode == 'w') {
-		if (bgzf_flush(fp) != 0) return -1;
-		block_length = deflate_block(fp, 0); // write an empty block
-		count = fwrite(fp->compressed_block, 1, block_length, fp->fp);
-		if (fflush(fp->fp) != 0) {
-			fp->errcode |= BGZF_ERR_IO;
-			return -1;
-		}
-	}
-	ret = fp->open_mode == 'w'? fclose(fp->fp) : _bgzf_close(fp->fp);
-	if (ret != 0) return -1;
-	free(fp->uncompressed_block);
-	free(fp->compressed_block);
-	free_cache(fp);
-	free(fp);
-	return 0;
-}
-
-void bgzf_set_cache_size(BGZF *fp, int cache_size)
-{
-	if (fp) fp->cache_size = cache_size;
-}
-
-int bgzf_check_EOF(BGZF *fp)
-{
-	static uint8_t magic[28] = "\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\033\0\3\0\0\0\0\0\0\0\0\0";
-	uint8_t buf[28];
-	off_t offset;
-	offset = _bgzf_tell((_bgzf_file_t)fp->fp);
-	if (_bgzf_seek(fp->fp, -28, SEEK_END) < 0) return 0;
-	_bgzf_read(fp->fp, buf, 28);
-	_bgzf_seek(fp->fp, offset, SEEK_SET);
-	return (memcmp(magic, buf, 28) == 0)? 1 : 0;
-}
-
-int64_t bgzf_seek(BGZF* fp, int64_t pos, int where)
-{
-	int block_offset;
-	int64_t block_address;
-
-	if (fp->open_mode != 'r' || where != SEEK_SET) {
-		fp->errcode |= BGZF_ERR_MISUSE;
-		return -1;
-	}
-	block_offset = pos & 0xFFFF;
-	block_address = pos >> 16;
-	if (_bgzf_seek(fp->fp, block_address, SEEK_SET) < 0) {
-		fp->errcode |= BGZF_ERR_IO;
-		return -1;
-	}
-	fp->block_length = 0;  // indicates current block has not been loaded
-	fp->block_address = block_address;
-	fp->block_offset = block_offset;
-	return 0;
-}
-
-int bgzf_is_bgzf(const char *fn)
-{
-	uint8_t buf[16];
-	int n;
-	_bgzf_file_t fp;
-	if ((fp = _bgzf_open(fn, "r")) == 0) return 0;
-	n = _bgzf_read(fp, buf, 16);
-	_bgzf_close(fp);
-	if (n != 16) return 0;
-	return memcmp(g_magic, buf, 16) == 0? 1 : 0;
-}
-
-int bgzf_getc(BGZF *fp)
-{
-	int c;
-	if (fp->block_offset >= fp->block_length) {
-		if (bgzf_read_block(fp) != 0) return -2; /* error */
-		if (fp->block_length == 0) return -1; /* end-of-file */
-	}
-	c = ((unsigned char*)fp->uncompressed_block)[fp->block_offset++];
-    if (fp->block_offset == fp->block_length) {
-        fp->block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
-        fp->block_offset = 0;
-        fp->block_length = 0;
-    }
-	return c;
-}
-
-#ifndef kroundup32
-#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
-#endif
-
-int bgzf_getline(BGZF *fp, int delim, kstring_t *str)
-{
-	int l, state = 0;
-	unsigned char *buf = (unsigned char*)fp->uncompressed_block;
-	str->l = 0;
-	do {
-		if (fp->block_offset >= fp->block_length) {
-			if (bgzf_read_block(fp) != 0) { state = -2; break; }
-			if (fp->block_length == 0) { state = -1; break; }
-		}
-		for (l = fp->block_offset; l < fp->block_length && buf[l] != delim; ++l);
-		if (l < fp->block_length) state = 1;
-		l -= fp->block_offset;
-		if (str->l + l + 1 >= str->m) {
-			str->m = str->l + l + 2;
-			kroundup32(str->m);
-			str->s = (char*)realloc(str->s, str->m);
-		}
-		memcpy(str->s + str->l, buf + fp->block_offset, l);
-		str->l += l;
-		fp->block_offset += l + 1;
-		if (fp->block_offset >= fp->block_length) {
-			fp->block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
-			fp->block_offset = 0;
-			fp->block_length = 0;
-		} 
-	} while (state == 0);
-	if (str->l == 0 && state < 0) return state;
-	str->s[str->l] = 0;
-	return str->l;
-}
diff --git a/tabix/bgzf.c.pysam.c b/tabix/bgzf.c.pysam.c
deleted file mode 100644
index cb4c000..0000000
--- a/tabix/bgzf.c.pysam.c
+++ /dev/null
@@ -1,557 +0,0 @@
-#include "pysam.h"
-
-/* The MIT License
-
-   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
-                 2011 Attractive Chaos <attractor at 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"), to deal
-   in the Software without restriction, including without limitation the rights
-   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-   copies of the Software, and to permit persons to whom the Software is
-   furnished to do so, subject to the following conditions:
-
-   The above copyright notice and this permission notice shall be included in
-   all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-   THE SOFTWARE.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <assert.h>
-#include <sys/types.h>
-#include "bgzf.h"
-
-#ifdef _USE_KNETFILE
-#include "knetfile.h"
-typedef knetFile *_bgzf_file_t;
-#define _bgzf_open(fn, mode) knet_open(fn, mode)
-#define _bgzf_dopen(fp, mode) knet_dopen(fp, mode)
-#define _bgzf_close(fp) knet_close(fp)
-#define _bgzf_fileno(fp) ((fp)->fd)
-#define _bgzf_tell(fp) knet_tell(fp)
-#define _bgzf_seek(fp, offset, whence) knet_seek(fp, offset, whence)
-#define _bgzf_read(fp, buf, len) knet_read(fp, buf, len)
-#define _bgzf_write(fp, buf, len) knet_write(fp, buf, len)
-#else // ~defined(_USE_KNETFILE)
-#if defined(_WIN32) || defined(_MSC_VER)
-#define ftello(fp) ftell(fp)
-#define fseeko(fp, offset, whence) fseek(fp, offset, whence)
-#else // ~defined(_WIN32)
-extern off_t ftello(FILE *stream);
-extern int fseeko(FILE *stream, off_t offset, int whence);
-#endif // ~defined(_WIN32)
-typedef FILE *_bgzf_file_t;
-#define _bgzf_open(fn, mode) fopen(fn, mode)
-#define _bgzf_dopen(fp, mode) fdopen(fp, mode)
-#define _bgzf_close(fp) fclose(fp)
-#define _bgzf_fileno(fp) fileno(fp)
-#define _bgzf_tell(fp) ftello(fp)
-#define _bgzf_seek(fp, offset, whence) fseeko(fp, offset, whence)
-#define _bgzf_read(fp, buf, len) fread(buf, 1, len, fp)
-#define _bgzf_write(fp, buf, len) fwrite(buf, 1, len, fp)
-#endif // ~define(_USE_KNETFILE)
-
-#define BLOCK_HEADER_LENGTH 18
-#define BLOCK_FOOTER_LENGTH 8
-
-/* BGZF/GZIP header (speciallized from RFC 1952; little endian):
- +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
- | 31|139|  8|  4|              0|  0|255|      6| 66| 67|      2|BLK_LEN|
- +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
-*/
-static const uint8_t g_magic[19] = "\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\0\0";
-
-#ifdef BGZF_CACHE
-typedef struct {
-	int size;
-	uint8_t *block;
-	int64_t end_offset;
-} cache_t;
-#include "khash.h"
-KHASH_MAP_INIT_INT64(cache, cache_t)
-#endif
-
-static inline void packInt16(uint8_t *buffer, uint16_t value)
-{
-	buffer[0] = value;
-	buffer[1] = value >> 8;
-}
-
-static inline int unpackInt16(const uint8_t *buffer)
-{
-	return buffer[0] | buffer[1] << 8;
-}
-
-static inline void packInt32(uint8_t *buffer, uint32_t value)
-{
-	buffer[0] = value;
-	buffer[1] = value >> 8;
-	buffer[2] = value >> 16;
-	buffer[3] = value >> 24;
-}
-
-static BGZF *bgzf_read_init()
-{
-	BGZF *fp;
-	fp = calloc(1, sizeof(BGZF));
-	fp->open_mode = 'r';
-	fp->uncompressed_block = malloc(BGZF_BLOCK_SIZE);
-	fp->compressed_block = malloc(BGZF_BLOCK_SIZE);
-#ifdef BGZF_CACHE
-	fp->cache = kh_init(cache);
-#endif
-	return fp;
-}
-
-static BGZF *bgzf_write_init(int compress_level) // compress_level==-1 for the default level
-{
-	BGZF *fp;
-	fp = calloc(1, sizeof(BGZF));
-	fp->open_mode = 'w';
-	fp->uncompressed_block = malloc(BGZF_BLOCK_SIZE);
-	fp->compressed_block = malloc(BGZF_BLOCK_SIZE);
-	fp->compress_level = compress_level < 0? Z_DEFAULT_COMPRESSION : compress_level; // Z_DEFAULT_COMPRESSION==-1
-	if (fp->compress_level > 9) fp->compress_level = Z_DEFAULT_COMPRESSION;
-	return fp;
-}
-// get the compress level from the mode string
-static int mode2level(const char *__restrict mode)
-{
-	int i, compress_level = -1;
-	for (i = 0; mode[i]; ++i)
-		if (mode[i] >= '0' && mode[i] <= '9') break;
-	if (mode[i]) compress_level = (int)mode[i] - '0';
-	if (strchr(mode, 'u')) compress_level = 0;
-	return compress_level;
-}
-
-BGZF *bgzf_open(const char *path, const char *mode)
-{
-	BGZF *fp = 0;
-	if (strchr(mode, 'r') || strchr(mode, 'R')) {
-		_bgzf_file_t fpr;
-		if ((fpr = _bgzf_open(path, "r")) == 0) return 0;
-		fp = bgzf_read_init();
-		fp->fp = fpr;
-	} else if (strchr(mode, 'w') || strchr(mode, 'W')) {
-		FILE *fpw;
-		if ((fpw = fopen(path, "w")) == 0) return 0;
-		fp = bgzf_write_init(mode2level(mode));
-		fp->fp = fpw;
-	}
-	return fp;
-}
-
-BGZF *bgzf_dopen(int fd, const char *mode)
-{
-	BGZF *fp = 0;
-	if (strchr(mode, 'r') || strchr(mode, 'R')) {
-		_bgzf_file_t fpr;
-		if ((fpr = _bgzf_dopen(fd, "r")) == 0) return 0;
-		fp = bgzf_read_init();
-		fp->fp = fpr;
-	} else if (strchr(mode, 'w') || strchr(mode, 'W')) {
-		FILE *fpw;
-		if ((fpw = fdopen(fd, "w")) == 0) return 0;
-		fp = bgzf_write_init(mode2level(mode));
-		fp->fp = fpw;
-	}
-	return fp;
-}
-
-// Deflate the block in fp->uncompressed_block into fp->compressed_block. Also adds an extra field that stores the compressed block length.
-static int deflate_block(BGZF *fp, int block_length)
-{
-	uint8_t *buffer = fp->compressed_block;
-	int buffer_size = BGZF_BLOCK_SIZE;
-	int input_length = block_length;
-	int compressed_length = 0;
-	int remaining;
-	uint32_t crc;
-
-	assert(block_length <= BGZF_BLOCK_SIZE); // guaranteed by the caller
-	memcpy(buffer, g_magic, BLOCK_HEADER_LENGTH); // the last two bytes are a place holder for the length of the block
-	while (1) { // loop to retry for blocks that do not compress enough
-		int status;
-		z_stream zs;
-		zs.zalloc = NULL;
-		zs.zfree = NULL;
-		zs.next_in = fp->uncompressed_block;
-		zs.avail_in = input_length;
-		zs.next_out = (void*)&buffer[BLOCK_HEADER_LENGTH];
-		zs.avail_out = buffer_size - BLOCK_HEADER_LENGTH - BLOCK_FOOTER_LENGTH;
-		status = deflateInit2(&zs, fp->compress_level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); // -15 to disable zlib header/footer
-		if (status != Z_OK) {
-			fp->errcode |= BGZF_ERR_ZLIB;
-			return -1;
-		}
-		status = deflate(&zs, Z_FINISH);
-		if (status != Z_STREAM_END) { // not compressed enough
-			deflateEnd(&zs); // reset the stream
-			if (status == Z_OK) { // reduce the size and recompress
-				input_length -= 1024;
-				assert(input_length > 0); // logically, this should not happen
-				continue;
-			}
-			fp->errcode |= BGZF_ERR_ZLIB;
-			return -1;
-		}
-		if (deflateEnd(&zs) != Z_OK) {
-			fp->errcode |= BGZF_ERR_ZLIB;
-			return -1;
-		}
-		compressed_length = zs.total_out;
-		compressed_length += BLOCK_HEADER_LENGTH + BLOCK_FOOTER_LENGTH;
-		assert(compressed_length <= BGZF_BLOCK_SIZE);
-		break;
-	}
-
-	assert(compressed_length > 0);
-	packInt16((uint8_t*)&buffer[16], compressed_length - 1); // write the compressed_length; -1 to fit 2 bytes
-	crc = crc32(0L, NULL, 0L);
-	crc = crc32(crc, fp->uncompressed_block, input_length);
-	packInt32((uint8_t*)&buffer[compressed_length-8], crc);
-	packInt32((uint8_t*)&buffer[compressed_length-4], input_length);
-
-	remaining = block_length - input_length;
-	if (remaining > 0) {
-		assert(remaining <= input_length);
-		memcpy(fp->uncompressed_block, fp->uncompressed_block + input_length, remaining);
-	}
-	fp->block_offset = remaining;
-	return compressed_length;
-}
-
-// Inflate the block in fp->compressed_block into fp->uncompressed_block
-static int inflate_block(BGZF* fp, int block_length)
-{
-	z_stream zs;
-	zs.zalloc = NULL;
-	zs.zfree = NULL;
-	zs.next_in = fp->compressed_block + 18;
-	zs.avail_in = block_length - 16;
-	zs.next_out = fp->uncompressed_block;
-	zs.avail_out = BGZF_BLOCK_SIZE;
-
-	if (inflateInit2(&zs, -15) != Z_OK) {
-		fp->errcode |= BGZF_ERR_ZLIB;
-		return -1;
-	}
-	if (inflate(&zs, Z_FINISH) != Z_STREAM_END) {
-		inflateEnd(&zs);
-		fp->errcode |= BGZF_ERR_ZLIB;
-		return -1;
-	}
-	if (inflateEnd(&zs) != Z_OK) {
-		fp->errcode |= BGZF_ERR_ZLIB;
-		return -1;
-	}
-	return zs.total_out;
-}
-
-static int check_header(const uint8_t *header)
-{
-	return (header[0] == 31 && header[1] == 139 && header[2] == 8 && (header[3] & 4) != 0
-			&& unpackInt16((uint8_t*)&header[10]) == 6
-			&& header[12] == 'B' && header[13] == 'C'
-			&& unpackInt16((uint8_t*)&header[14]) == 2);
-}
-
-#ifdef BGZF_CACHE
-static void free_cache(BGZF *fp)
-{
-	khint_t k;
-	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
-	if (fp->open_mode != 'r') return;
-	for (k = kh_begin(h); k < kh_end(h); ++k)
-		if (kh_exist(h, k)) free(kh_val(h, k).block);
-	kh_destroy(cache, h);
-}
-
-static int load_block_from_cache(BGZF *fp, int64_t block_address)
-{
-	khint_t k;
-	cache_t *p;
-	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
-	k = kh_get(cache, h, block_address);
-	if (k == kh_end(h)) return 0;
-	p = &kh_val(h, k);
-	if (fp->block_length != 0) fp->block_offset = 0;
-	fp->block_address = block_address;
-	fp->block_length = p->size;
-	memcpy(fp->uncompressed_block, p->block, BGZF_BLOCK_SIZE);
-	_bgzf_seek((_bgzf_file_t)fp->fp, p->end_offset, SEEK_SET);
-	return p->size;
-}
-
-static void cache_block(BGZF *fp, int size)
-{
-	int ret;
-	khint_t k;
-	cache_t *p;
-	khash_t(cache) *h = (khash_t(cache)*)fp->cache;
-	if (BGZF_BLOCK_SIZE >= fp->cache_size) return;
-	if ((kh_size(h) + 1) * BGZF_BLOCK_SIZE > fp->cache_size) {
-		/* A better way would be to remove the oldest block in the
-		 * cache, but here we remove a random one for simplicity. This
-		 * should not have a big impact on performance. */
-		for (k = kh_begin(h); k < kh_end(h); ++k)
-			if (kh_exist(h, k)) break;
-		if (k < kh_end(h)) {
-			free(kh_val(h, k).block);
-			kh_del(cache, h, k);
-		}
-	}
-	k = kh_put(cache, h, fp->block_address, &ret);
-	if (ret == 0) return; // if this happens, a bug!
-	p = &kh_val(h, k);
-	p->size = fp->block_length;
-	p->end_offset = fp->block_address + size;
-	p->block = malloc(BGZF_BLOCK_SIZE);
-	memcpy(kh_val(h, k).block, fp->uncompressed_block, BGZF_BLOCK_SIZE);
-}
-#else
-static void free_cache(BGZF *fp) {}
-static int load_block_from_cache(BGZF *fp, int64_t block_address) {return 0;}
-static void cache_block(BGZF *fp, int size) {}
-#endif
-
-int bgzf_read_block(BGZF *fp)
-{
-	uint8_t header[BLOCK_HEADER_LENGTH], *compressed_block;
-	int count, size = 0, block_length, remaining;
-	int64_t block_address;
-	block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
-	if (load_block_from_cache(fp, block_address)) return 0;
-	count = _bgzf_read(fp->fp, header, sizeof(header));
-	if (count == 0) { // no data read
-		fp->block_length = 0;
-		return 0;
-	}
-	if (count != sizeof(header) || !check_header(header)) {
-		fp->errcode |= BGZF_ERR_HEADER;
-		return -1;
-	}
-	size = count;
-	block_length = unpackInt16((uint8_t*)&header[16]) + 1; // +1 because when writing this number, we used "-1"
-	compressed_block = (uint8_t*)fp->compressed_block;
-	memcpy(compressed_block, header, BLOCK_HEADER_LENGTH);
-	remaining = block_length - BLOCK_HEADER_LENGTH;
-	count = _bgzf_read(fp->fp, &compressed_block[BLOCK_HEADER_LENGTH], remaining);
-	if (count != remaining) {
-		fp->errcode |= BGZF_ERR_IO;
-		return -1;
-	}
-	size += count;
-	if ((count = inflate_block(fp, block_length)) < 0) return -1;
-	if (fp->block_length != 0) fp->block_offset = 0; // Do not reset offset if this read follows a seek.
-	fp->block_address = block_address;
-	fp->block_length = count;
-	cache_block(fp, size);
-	return 0;
-}
-
-ssize_t bgzf_read(BGZF *fp, void *data, ssize_t length)
-{
-	ssize_t bytes_read = 0;
-	uint8_t *output = data;
-	if (length <= 0) return 0;
-	assert(fp->open_mode == 'r');
-	while (bytes_read < length) {
-		int copy_length, available = fp->block_length - fp->block_offset;
-		uint8_t *buffer;
-		if (available <= 0) {
-			if (bgzf_read_block(fp) != 0) return -1;
-			available = fp->block_length - fp->block_offset;
-			if (available <= 0) break;
-		}
-		copy_length = length - bytes_read < available? length - bytes_read : available;
-		buffer = fp->uncompressed_block;
-		memcpy(output, buffer + fp->block_offset, copy_length);
-		fp->block_offset += copy_length;
-		output += copy_length;
-		bytes_read += copy_length;
-	}
-	if (fp->block_offset == fp->block_length) {
-		fp->block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
-		fp->block_offset = fp->block_length = 0;
-	}
-	return bytes_read;
-}
-
-int bgzf_flush(BGZF *fp)
-{
-	assert(fp->open_mode == 'w');
-	while (fp->block_offset > 0) {
-		int block_length;
-		block_length = deflate_block(fp, fp->block_offset);
-		if (block_length < 0) return -1;
-		if (fwrite(fp->compressed_block, 1, block_length, fp->fp) != block_length) {
-			fp->errcode |= BGZF_ERR_IO; // possibly truncated file
-			return -1;
-		}
-		fp->block_address += block_length;
-	}
-	return 0;
-}
-
-int bgzf_flush_try(BGZF *fp, ssize_t size)
-{
-	if (fp->block_offset + size > BGZF_BLOCK_SIZE)
-		return bgzf_flush(fp);
-	return -1;
-}
-
-ssize_t bgzf_write(BGZF *fp, const void *data, ssize_t length)
-{
-	const uint8_t *input = data;
-	int block_length = BGZF_BLOCK_SIZE, bytes_written;
-	assert(fp->open_mode == 'w');
-	input = data;
-	bytes_written = 0;
-	while (bytes_written < length) {
-		uint8_t* buffer = fp->uncompressed_block;
-		int copy_length = block_length - fp->block_offset < length - bytes_written? block_length - fp->block_offset : length - bytes_written;
-		memcpy(buffer + fp->block_offset, input, copy_length);
-		fp->block_offset += copy_length;
-		input += copy_length;
-		bytes_written += copy_length;
-		if (fp->block_offset == block_length && bgzf_flush(fp)) break;
-	}
-	return bytes_written;
-}
-
-int bgzf_close(BGZF* fp)
-{
-	int ret, count, block_length;
-	if (fp == 0) return -1;
-	if (fp->open_mode == 'w') {
-		if (bgzf_flush(fp) != 0) return -1;
-		block_length = deflate_block(fp, 0); // write an empty block
-		count = fwrite(fp->compressed_block, 1, block_length, fp->fp);
-		if (fflush(fp->fp) != 0) {
-			fp->errcode |= BGZF_ERR_IO;
-			return -1;
-		}
-	}
-	ret = fp->open_mode == 'w'? fclose(fp->fp) : _bgzf_close(fp->fp);
-	if (ret != 0) return -1;
-	free(fp->uncompressed_block);
-	free(fp->compressed_block);
-	free_cache(fp);
-	free(fp);
-	return 0;
-}
-
-void bgzf_set_cache_size(BGZF *fp, int cache_size)
-{
-	if (fp) fp->cache_size = cache_size;
-}
-
-int bgzf_check_EOF(BGZF *fp)
-{
-	static uint8_t magic[28] = "\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\033\0\3\0\0\0\0\0\0\0\0\0";
-	uint8_t buf[28];
-	off_t offset;
-	offset = _bgzf_tell((_bgzf_file_t)fp->fp);
-	if (_bgzf_seek(fp->fp, -28, SEEK_END) < 0) return 0;
-	_bgzf_read(fp->fp, buf, 28);
-	_bgzf_seek(fp->fp, offset, SEEK_SET);
-	return (memcmp(magic, buf, 28) == 0)? 1 : 0;
-}
-
-int64_t bgzf_seek(BGZF* fp, int64_t pos, int where)
-{
-	int block_offset;
-	int64_t block_address;
-
-	if (fp->open_mode != 'r' || where != SEEK_SET) {
-		fp->errcode |= BGZF_ERR_MISUSE;
-		return -1;
-	}
-	block_offset = pos & 0xFFFF;
-	block_address = pos >> 16;
-	if (_bgzf_seek(fp->fp, block_address, SEEK_SET) < 0) {
-		fp->errcode |= BGZF_ERR_IO;
-		return -1;
-	}
-	fp->block_length = 0;  // indicates current block has not been loaded
-	fp->block_address = block_address;
-	fp->block_offset = block_offset;
-	return 0;
-}
-
-int bgzf_is_bgzf(const char *fn)
-{
-	uint8_t buf[16];
-	int n;
-	_bgzf_file_t fp;
-	if ((fp = _bgzf_open(fn, "r")) == 0) return 0;
-	n = _bgzf_read(fp, buf, 16);
-	_bgzf_close(fp);
-	if (n != 16) return 0;
-	return memcmp(g_magic, buf, 16) == 0? 1 : 0;
-}
-
-int bgzf_getc(BGZF *fp)
-{
-	int c;
-	if (fp->block_offset >= fp->block_length) {
-		if (bgzf_read_block(fp) != 0) return -2; /* error */
-		if (fp->block_length == 0) return -1; /* end-of-file */
-	}
-	c = ((unsigned char*)fp->uncompressed_block)[fp->block_offset++];
-    if (fp->block_offset == fp->block_length) {
-        fp->block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
-        fp->block_offset = 0;
-        fp->block_length = 0;
-    }
-	return c;
-}
-
-#ifndef kroundup32
-#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
-#endif
-
-int bgzf_getline(BGZF *fp, int delim, kstring_t *str)
-{
-	int l, state = 0;
-	unsigned char *buf = (unsigned char*)fp->uncompressed_block;
-	str->l = 0;
-	do {
-		if (fp->block_offset >= fp->block_length) {
-			if (bgzf_read_block(fp) != 0) { state = -2; break; }
-			if (fp->block_length == 0) { state = -1; break; }
-		}
-		for (l = fp->block_offset; l < fp->block_length && buf[l] != delim; ++l);
-		if (l < fp->block_length) state = 1;
-		l -= fp->block_offset;
-		if (str->l + l + 1 >= str->m) {
-			str->m = str->l + l + 2;
-			kroundup32(str->m);
-			str->s = (char*)realloc(str->s, str->m);
-		}
-		memcpy(str->s + str->l, buf + fp->block_offset, l);
-		str->l += l;
-		fp->block_offset += l + 1;
-		if (fp->block_offset >= fp->block_length) {
-			fp->block_address = _bgzf_tell((_bgzf_file_t)fp->fp);
-			fp->block_offset = 0;
-			fp->block_length = 0;
-		} 
-	} while (state == 0);
-	if (str->l == 0 && state < 0) return state;
-	str->s[str->l] = 0;
-	return str->l;
-}
diff --git a/tabix/bgzf.h b/tabix/bgzf.h
deleted file mode 100644
index 1fdf625..0000000
--- a/tabix/bgzf.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* The MIT License
-
-   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
-                 2011 Attractive Chaos <attractor at 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"), to deal
-   in the Software without restriction, including without limitation the rights
-   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-   copies of the Software, and to permit persons to whom the Software is
-   furnished to do so, subject to the following conditions:
-
-   The above copyright notice and this permission notice shall be included in
-   all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-   THE SOFTWARE.
-*/
-
-/* The BGZF library was originally written by Bob Handsaker from the Broad
- * Institute. It was later improved by the SAMtools developers. */
-
-#ifndef __BGZF_H
-#define __BGZF_H
-
-#include <stdint.h>
-#include <stdio.h>
-#include <zlib.h>
-
-#define BGZF_BLOCK_SIZE 0x10000 // 64k
-
-#define BGZF_ERR_ZLIB   1
-#define BGZF_ERR_HEADER 2
-#define BGZF_ERR_IO     4
-#define BGZF_ERR_MISUSE 8
-
-typedef struct {
-    int open_mode:8, compress_level:8, errcode:16;
-	int cache_size;
-    int block_length, block_offset;
-    int64_t block_address;
-    void *uncompressed_block, *compressed_block;
-	void *cache; // a pointer to a hash table
-	void *fp; // actual file handler; FILE* on writing; FILE* or knetFile* on reading
-} BGZF;
-
-#ifndef KSTRING_T
-#define KSTRING_T kstring_t
-typedef struct __kstring_t {
-	size_t l, m;
-	char *s;
-} kstring_t;
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-	/******************
-	 * Basic routines *
-	 ******************/
-
-	/**
-	 * Open an existing file descriptor for reading or writing.
-	 *
-	 * @param fd    file descriptor
-	 * @param mode  mode matching /[rwu0-9]+/: 'r' for reading, 'w' for writing and a digit specifies
-	 *              the zlib compression level; if both 'r' and 'w' are present, 'w' is ignored.
-     * @return      BGZF file handler; 0 on error
-	 */
-	BGZF* bgzf_dopen(int fd, const char *mode);
-
-	/**
-	 * Open the specified file for reading or writing.
-	 */
-	BGZF* bgzf_open(const char* path, const char *mode);
-
-	/**
-	 * Close the BGZF and free all associated resources.
-	 *
-	 * @param fp    BGZF file handler
-	 * @return      0 on success and -1 on error
-	 */
-	int bgzf_close(BGZF *fp);
-
-	/**
-	 * Read up to _length_ bytes from the file storing into _data_.
-	 *
-	 * @param fp     BGZF file handler
-	 * @param data   data array to read into
-	 * @param length size of data to read
-	 * @return       number of bytes actually read; 0 on end-of-file and -1 on error
-	 */
-	ssize_t bgzf_read(BGZF *fp, void *data, ssize_t length);
-
-	/**
-	 * Write _length_ bytes from _data_ to the file.
-	 *
-	 * @param fp     BGZF file handler
-	 * @param data   data array to write
-	 * @param length size of data to write
-	 * @return       number of bytes actually written; -1 on error
-	 */
-	ssize_t bgzf_write(BGZF *fp, const void *data, ssize_t length);
-
-	/**
-	 * Write the data in the buffer to the file.
-	 */
-	int bgzf_flush(BGZF *fp);
-
-	/**
-	 * Return a virtual file pointer to the current location in the file.
-	 * No interpetation of the value should be made, other than a subsequent
-	 * call to bgzf_seek can be used to position the file at the same point.
-	 * Return value is non-negative on success.
-	 */
-	#define bgzf_tell(fp) ((fp->block_address << 16) | (fp->block_offset & 0xFFFF))
-
-	/**
-	 * Set the file to read from the location specified by _pos_.
-	 *
-	 * @param fp     BGZF file handler
-	 * @param pos    virtual file offset returned by bgzf_tell()
-	 * @param whence must be SEEK_SET
-	 * @return       0 on success and -1 on error
-	 */
-	int64_t bgzf_seek(BGZF *fp, int64_t pos, int whence);
-
-	/**
-	 * Check if the BGZF end-of-file (EOF) marker is present
-	 *
-	 * @param fp    BGZF file handler opened for reading
-	 * @return      1 if EOF is present; 0 if not or on I/O error
-	 */
-	int bgzf_check_EOF(BGZF *fp);
-
-	/**
-	 * Check if a file is in the BGZF format
-	 *
-	 * @param fn    file name
-	 * @return      1 if _fn_ is BGZF; 0 if not or on I/O error
-	 */
-	 int bgzf_is_bgzf(const char *fn);
-
-	/*********************
-	 * Advanced routines *
-	 *********************/
-
-	/**
-	 * Set the cache size. Only effective when compiled with -DBGZF_CACHE.
-	 *
-	 * @param fp    BGZF file handler
-	 * @param size  size of cache in bytes; 0 to disable caching (default)
-	 */
-	void bgzf_set_cache_size(BGZF *fp, int size);
-
-	/**
-	 * Flush the file if the remaining buffer size is smaller than _size_ 
-	 */
-	int bgzf_flush_try(BGZF *fp, ssize_t size);
-
-	/**
-	 * Read one byte from a BGZF file. It is faster than bgzf_read()
-	 * @param fp     BGZF file handler
-	 * @return       byte read; -1 on end-of-file or error
-	 */
-	int bgzf_getc(BGZF *fp);
-
-	/**
-	 * Read one line from a BGZF file. It is faster than bgzf_getc()
-	 *
-	 * @param fp     BGZF file handler
-	 * @param delim  delimitor
-	 * @param str    string to write to; must be initialized
-	 * @return       length of the string; 0 on end-of-file; negative on error
-	 */
-	int bgzf_getline(BGZF *fp, int delim, kstring_t *str);
-
-	/**
-	 * Read the next BGZF block.
-	 */
-	int bgzf_read_block(BGZF *fp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/tabix/bgzip.c b/tabix/bgzip.c
deleted file mode 100644
index 5429a22..0000000
--- a/tabix/bgzip.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/* The MIT License
-
-   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
-
-   Permission is hereby granted, free of charge, to any person obtaining a copy
-   of this software and associated documentation files (the "Software"), to deal
-   in the Software without restriction, including without limitation the rights
-   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-   copies of the Software, and to permit persons to whom the Software is
-   furnished to do so, subject to the following conditions:
-
-   The above copyright notice and this permission notice shall be included in
-   all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-   THE SOFTWARE.
-*/
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/select.h>
-#include <sys/stat.h>
-#include "bgzf.h"
-
-static const int WINDOW_SIZE = 64 * 1024;
-
-static int bgzip_main_usage()
-{
-	fprintf(stderr, "\n");
-	fprintf(stderr, "Usage:   bgzip [options] [file] ...\n\n");
-	fprintf(stderr, "Options: -c      write on standard output, keep original files unchanged\n");
-	fprintf(stderr, "         -d      decompress\n");
-	fprintf(stderr, "         -f      overwrite files without asking\n");
-	fprintf(stderr, "         -b INT  decompress at virtual file pointer INT\n");
-	fprintf(stderr, "         -s INT  decompress INT bytes in the uncompressed file\n");
-	fprintf(stderr, "         -h      give this help\n");
-	fprintf(stderr, "\n");
-	return 1;
-}
-
-static int write_open(const char *fn, int is_forced)
-{
-	int fd = -1;
-	char c;
-	if (!is_forced) {
-		if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0666)) < 0 && errno == EEXIST) {
-			fprintf(stderr, "[bgzip] %s already exists; do you wish to overwrite (y or n)? ", fn);
-			scanf("%c", &c);
-			if (c != 'Y' && c != 'y') {
-				fprintf(stderr, "[bgzip] not overwritten\n");
-				exit(1);
-			}
-		}
-	}
-	if (fd < 0) {
-		if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
-			fprintf(stderr, "[bgzip] %s: Fail to write\n", fn);
-			exit(1);
-		}
-	}
-	return fd;
-}
-
-static void fail(BGZF* fp)
-{
-    fprintf(stderr, "Error: %d\n", fp->errcode);
-    exit(1);
-}
-
-int main(int argc, char **argv)
-{
-	int c, compress, pstdout, is_forced;
-	BGZF *fp;
-	void *buffer;
-	long start, end, size;
-
-	compress = 1; pstdout = 0; start = 0; size = -1; end = -1; is_forced = 0;
-	while((c  = getopt(argc, argv, "cdhfb:s:")) >= 0){
-		switch(c){
-		case 'h': return bgzip_main_usage();
-		case 'd': compress = 0; break;
-		case 'c': pstdout = 1; break;
-		case 'b': start = atol(optarg); break;
-		case 's': size = atol(optarg); break;
-		case 'f': is_forced = 1; break;
-		}
-	}
-	if (size >= 0) end = start + size;
-	if (end >= 0 && end < start) {
-		fprintf(stderr, "[bgzip] Illegal region: [%ld, %ld]\n", start, end);
-		return 1;
-	}
-	if (compress == 1) {
-		struct stat sbuf;
-		int f_src = fileno(stdin);
-		int f_dst = fileno(stdout);
-
-		if ( argc>optind )
-		{
-			if ( stat(argv[optind],&sbuf)<0 ) 
-			{ 
-				fprintf(stderr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
-				return 1; 
-			}
-
-			if ((f_src = open(argv[optind], O_RDONLY)) < 0) {
-				fprintf(stderr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
-				return 1;
-			}
-
-			if (pstdout)
-				f_dst = fileno(stdout);
-			else
-			{
-				char *name = malloc(strlen(argv[optind]) + 5);
-				strcpy(name, argv[optind]);
-				strcat(name, ".gz");
-				f_dst = write_open(name, is_forced);
-				if (f_dst < 0) return 1;
-				free(name);
-			}
-		}
-		else if (!pstdout && isatty(fileno((FILE *)stdout)) )
-			return bgzip_main_usage();
-
-		fp = bgzf_dopen(f_dst, "w");
-		buffer = malloc(WINDOW_SIZE);
-		while ((c = read(f_src, buffer, WINDOW_SIZE)) > 0)
-			if (bgzf_write(fp, buffer, c) < 0) fail(fp);
-		// f_dst will be closed here
-		if (bgzf_close(fp) < 0) fail(fp);
-		if (argc > optind && !pstdout) unlink(argv[optind]);
-		free(buffer);
-		close(f_src);
-		return 0;
-	} else {
-		struct stat sbuf;
-		int f_dst;
-
-		if ( argc>optind )
-		{
-			if ( stat(argv[optind],&sbuf)<0 )
-			{
-				fprintf(stderr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
-				return 1;
-			}
-			char *name;
-			int len = strlen(argv[optind]);
-			if ( strcmp(argv[optind]+len-3,".gz") )
-			{
-				fprintf(stderr, "[bgzip] %s: unknown suffix -- ignored\n", argv[optind]);
-				return 1;
-			}
-			fp = bgzf_open(argv[optind], "r");
-			if (fp == NULL) {
-				fprintf(stderr, "[bgzip] Could not open file: %s\n", argv[optind]);
-				return 1;
-			}
-
-			if (pstdout) {
-				f_dst = fileno(stdout);
-			}
-			else {
-				name = strdup(argv[optind]);
-				name[strlen(name) - 3] = '\0';
-				f_dst = write_open(name, is_forced);
-				free(name);
-			}
-		}
-		else if (!pstdout && isatty(fileno((FILE *)stdin)) )
-			return bgzip_main_usage();
-		else
-		{
-			f_dst = fileno(stdout);
-			fp = bgzf_dopen(fileno(stdin), "r");
-			if (fp == NULL) {
-				fprintf(stderr, "[bgzip] Could not read from stdin: %s\n", strerror(errno));
-				return 1;
-			}
-		}
-		buffer = malloc(WINDOW_SIZE);
-		if (bgzf_seek(fp, start, SEEK_SET) < 0) fail(fp);
-		while (1) {
-			if (end < 0) c = bgzf_read(fp, buffer, WINDOW_SIZE);
-			else c = bgzf_read(fp, buffer, (end - start > WINDOW_SIZE)? WINDOW_SIZE:(end - start));
-			if (c == 0) break;
-			if (c < 0) fail(fp);
-			start += c;
-			write(f_dst, buffer, c);
-			if (end >= 0 && start >= end) break;
-		}
-		free(buffer);
-		if (bgzf_close(fp) < 0) fail(fp);
-		if (!pstdout) unlink(argv[optind]);
-		return 0;
-	}
-}
diff --git a/tabix/bgzip.c.pysam.c b/tabix/bgzip.c.pysam.c
deleted file mode 100644
index bb8e906..0000000
--- a/tabix/bgzip.c.pysam.c
+++ /dev/null
@@ -1,208 +0,0 @@
-#include "pysam.h"
-
-/* The MIT License
-
-   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
-
-   Permission is hereby granted, free of charge, to any person obtaining a copy
-   of this software and associated documentation files (the "Software"), to deal
-   in the Software without restriction, including without limitation the rights
-   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-   copies of the Software, and to permit persons to whom the Software is
-   furnished to do so, subject to the following conditions:
-
-   The above copyright notice and this permission notice shall be included in
-   all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-   THE SOFTWARE.
-*/
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/select.h>
-#include <sys/stat.h>
-#include "bgzf.h"
-
-static const int WINDOW_SIZE = 64 * 1024;
-
-static int bgzip_main_usage()
-{
-	fprintf(pysamerr, "\n");
-	fprintf(pysamerr, "Usage:   bgzip [options] [file] ...\n\n");
-	fprintf(pysamerr, "Options: -c      write on standard output, keep original files unchanged\n");
-	fprintf(pysamerr, "         -d      decompress\n");
-	fprintf(pysamerr, "         -f      overwrite files without asking\n");
-	fprintf(pysamerr, "         -b INT  decompress at virtual file pointer INT\n");
-	fprintf(pysamerr, "         -s INT  decompress INT bytes in the uncompressed file\n");
-	fprintf(pysamerr, "         -h      give this help\n");
-	fprintf(pysamerr, "\n");
-	return 1;
-}
-
-static int write_open(const char *fn, int is_forced)
-{
-	int fd = -1;
-	char c;
-	if (!is_forced) {
-		if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0666)) < 0 && errno == EEXIST) {
-			fprintf(pysamerr, "[bgzip] %s already exists; do you wish to overwrite (y or n)? ", fn);
-			scanf("%c", &c);
-			if (c != 'Y' && c != 'y') {
-				fprintf(pysamerr, "[bgzip] not overwritten\n");
-				exit(1);
-			}
-		}
-	}
-	if (fd < 0) {
-		if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
-			fprintf(pysamerr, "[bgzip] %s: Fail to write\n", fn);
-			exit(1);
-		}
-	}
-	return fd;
-}
-
-static void fail(BGZF* fp)
-{
-    fprintf(pysamerr, "Error: %d\n", fp->errcode);
-    exit(1);
-}
-
-int main(int argc, char **argv)
-{
-	int c, compress, pstdout, is_forced;
-	BGZF *fp;
-	void *buffer;
-	long start, end, size;
-
-	compress = 1; pstdout = 0; start = 0; size = -1; end = -1; is_forced = 0;
-	while((c  = getopt(argc, argv, "cdhfb:s:")) >= 0){
-		switch(c){
-		case 'h': return bgzip_main_usage();
-		case 'd': compress = 0; break;
-		case 'c': pstdout = 1; break;
-		case 'b': start = atol(optarg); break;
-		case 's': size = atol(optarg); break;
-		case 'f': is_forced = 1; break;
-		}
-	}
-	if (size >= 0) end = start + size;
-	if (end >= 0 && end < start) {
-		fprintf(pysamerr, "[bgzip] Illegal region: [%ld, %ld]\n", start, end);
-		return 1;
-	}
-	if (compress == 1) {
-		struct stat sbuf;
-		int f_src = fileno(stdin);
-		int f_dst = fileno(stdout);
-
-		if ( argc>optind )
-		{
-			if ( stat(argv[optind],&sbuf)<0 ) 
-			{ 
-				fprintf(pysamerr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
-				return 1; 
-			}
-
-			if ((f_src = open(argv[optind], O_RDONLY)) < 0) {
-				fprintf(pysamerr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
-				return 1;
-			}
-
-			if (pstdout)
-				f_dst = fileno(stdout);
-			else
-			{
-				char *name = malloc(strlen(argv[optind]) + 5);
-				strcpy(name, argv[optind]);
-				strcat(name, ".gz");
-				f_dst = write_open(name, is_forced);
-				if (f_dst < 0) return 1;
-				free(name);
-			}
-		}
-		else if (!pstdout && isatty(fileno((FILE *)stdout)) )
-			return bgzip_main_usage();
-
-		fp = bgzf_dopen(f_dst, "w");
-		buffer = malloc(WINDOW_SIZE);
-		while ((c = read(f_src, buffer, WINDOW_SIZE)) > 0)
-			if (bgzf_write(fp, buffer, c) < 0) fail(fp);
-		// f_dst will be closed here
-		if (bgzf_close(fp) < 0) fail(fp);
-		if (argc > optind && !pstdout) unlink(argv[optind]);
-		free(buffer);
-		close(f_src);
-		return 0;
-	} else {
-		struct stat sbuf;
-		int f_dst;
-
-		if ( argc>optind )
-		{
-			if ( stat(argv[optind],&sbuf)<0 )
-			{
-				fprintf(pysamerr, "[bgzip] %s: %s\n", strerror(errno), argv[optind]);
-				return 1;
-			}
-			char *name;
-			int len = strlen(argv[optind]);
-			if ( strcmp(argv[optind]+len-3,".gz") )
-			{
-				fprintf(pysamerr, "[bgzip] %s: unknown suffix -- ignored\n", argv[optind]);
-				return 1;
-			}
-			fp = bgzf_open(argv[optind], "r");
-			if (fp == NULL) {
-				fprintf(pysamerr, "[bgzip] Could not open file: %s\n", argv[optind]);
-				return 1;
-			}
-
-			if (pstdout) {
-				f_dst = fileno(stdout);
-			}
-			else {
-				name = strdup(argv[optind]);
-				name[strlen(name) - 3] = '\0';
-				f_dst = write_open(name, is_forced);
-				free(name);
-			}
-		}
-		else if (!pstdout && isatty(fileno((FILE *)stdin)) )
-			return bgzip_main_usage();
-		else
-		{
-			f_dst = fileno(stdout);
-			fp = bgzf_dopen(fileno(stdin), "r");
-			if (fp == NULL) {
-				fprintf(pysamerr, "[bgzip] Could not read from stdin: %s\n", strerror(errno));
-				return 1;
-			}
-		}
-		buffer = malloc(WINDOW_SIZE);
-		if (bgzf_seek(fp, start, SEEK_SET) < 0) fail(fp);
-		while (1) {
-			if (end < 0) c = bgzf_read(fp, buffer, WINDOW_SIZE);
-			else c = bgzf_read(fp, buffer, (end - start > WINDOW_SIZE)? WINDOW_SIZE:(end - start));
-			if (c == 0) break;
-			if (c < 0) fail(fp);
-			start += c;
-			write(f_dst, buffer, c);
-			if (end >= 0 && start >= end) break;
-		}
-		free(buffer);
-		if (bgzf_close(fp) < 0) fail(fp);
-		if (!pstdout) unlink(argv[optind]);
-		return 0;
-	}
-}
diff --git a/tabix/index.c b/tabix/index.c
deleted file mode 100644
index 15cd65e..0000000
--- a/tabix/index.c
+++ /dev/null
@@ -1,967 +0,0 @@
-#include <ctype.h>
-#include <assert.h>
-#include <sys/stat.h>
-#include "khash.h"
-#include "ksort.h"
-#include "kstring.h"
-#include "bam_endian.h"
-#ifdef _USE_KNETFILE
-#include "knetfile.h"
-#endif
-#include "tabix.h"
-
-#define TAD_MIN_CHUNK_GAP 32768
-// 1<<14 is the size of minimum bin.
-#define TAD_LIDX_SHIFT    14
-
-typedef struct {
-	uint64_t u, v;
-} pair64_t;
-
-#define pair64_lt(a,b) ((a).u < (b).u)
-KSORT_INIT(offt, pair64_t, pair64_lt)
-
-typedef struct {
-	uint32_t m, n;
-	pair64_t *list;
-} ti_binlist_t;
-
-typedef struct {
-	int32_t n, m;
-	uint64_t *offset;
-} ti_lidx_t;
-
-KHASH_MAP_INIT_INT(i, ti_binlist_t)
-KHASH_MAP_INIT_STR(s, int)
-
-struct __ti_index_t {
-	ti_conf_t conf;
-	int32_t n, max;
-	khash_t(s) *tname;
-	khash_t(i) **index;
-	ti_lidx_t *index2;
-};
-
-struct __ti_iter_t {
-	int from_first; // read from the first record; no random access
-	int tid, beg, end, n_off, i, finished;
-	uint64_t curr_off;
-	kstring_t str;
-	const ti_index_t *idx;
-	pair64_t *off;
-};
-
-typedef struct {
-	int tid, beg, end, bin;
-} ti_intv_t;
-
-ti_conf_t ti_conf_gff = { 0, 1, 4, 5, '#', 0 };
-ti_conf_t ti_conf_bed = { TI_FLAG_UCSC, 1, 2, 3, '#', 0 };
-ti_conf_t ti_conf_psltbl = { TI_FLAG_UCSC, 15, 17, 18, '#', 0 };
-ti_conf_t ti_conf_sam = { TI_PRESET_SAM, 3, 4, 0, '@', 0 };
-ti_conf_t ti_conf_vcf = { TI_PRESET_VCF, 1, 2, 0, '#', 0 };
-
-/***************
- * read a line *
- ***************/
-
-/*
-int ti_readline(BGZF *fp, kstring_t *str)
-{
-	int c, l = 0;
-	str->l = 0;
-	while ((c = bgzf_getc(fp)) >= 0 && c != '\n') {
-		++l;
-		if (c != '\r') kputc(c, str);
-	}
-	if (c < 0 && l == 0) return -1; // end of file
-	return str->l;
-}
-*/
-
-/* Below is a faster implementation largely equivalent to the one
- * commented out above. */
-int ti_readline(BGZF *fp, kstring_t *str)
-{
-	return bgzf_getline(fp, '\n', str);
-}
-
-/*************************************
- * get the interval from a data line *
- *************************************/
-
-static inline int ti_reg2bin(uint32_t beg, uint32_t end)
-{
-	--end;
-	if (beg>>14 == end>>14) return 4681 + (beg>>14);
-	if (beg>>17 == end>>17) return  585 + (beg>>17);
-	if (beg>>20 == end>>20) return   73 + (beg>>20);
-	if (beg>>23 == end>>23) return    9 + (beg>>23);
-	if (beg>>26 == end>>26) return    1 + (beg>>26);
-	return 0;
-}
-
-static int get_tid(ti_index_t *idx, const char *ss)
-{
-	khint_t k;
-	int tid;
-	k = kh_get(s, idx->tname, ss);
-	if (k == kh_end(idx->tname)) { // a new target sequence
-		int ret, size;
-		// update idx->n, ->max, ->index and ->index2
-		if (idx->n == idx->max) {
-			idx->max = idx->max? idx->max<<1 : 8;
-			idx->index = realloc(idx->index, idx->max * sizeof(void*));
-			idx->index2 = realloc(idx->index2, idx->max * sizeof(ti_lidx_t));
-		}
-		memset(&idx->index2[idx->n], 0, sizeof(ti_lidx_t));
-		idx->index[idx->n++] = kh_init(i);
-		// update ->tname
-		tid = size = kh_size(idx->tname);
-		k = kh_put(s, idx->tname, strdup(ss), &ret);
-		kh_value(idx->tname, k) = size;
-		assert(idx->n == kh_size(idx->tname));
-	} else tid = kh_value(idx->tname, k);
-	return tid;
-}
-
-int ti_get_intv(const ti_conf_t *conf, int len, char *line, ti_interval_t *intv)
-{
-	int i, b = 0, id = 1, ncols = 0;
-	char *s;
-	intv->ss = intv->se = 0; intv->beg = intv->end = -1;
-	for (i = 0; i <= len; ++i) {
-		if (line[i] == '\t' || line[i] == 0) {
-            ++ncols;
-			if (id == conf->sc) {
-				intv->ss = line + b; intv->se = line + i;
-			} else if (id == conf->bc) {
-				// here ->beg is 0-based.
-				intv->beg = intv->end = strtol(line + b, &s, 0);
-				if (!(conf->preset&TI_FLAG_UCSC)) --intv->beg;
-				else ++intv->end;
-				if (intv->beg < 0) intv->beg = 0;
-				if (intv->end < 1) intv->end = 1;
-			} else {
-				if ((conf->preset&0xffff) == TI_PRESET_GENERIC) {
-					if (id == conf->ec) intv->end = strtol(line + b, &s, 0);
-				} else if ((conf->preset&0xffff) == TI_PRESET_SAM) {
-					if (id == 6) { // CIGAR
-						int l = 0, op;
-						char *t;
-						for (s = line + b; s < line + i;) {
-							long x = strtol(s, &t, 10);
-							op = toupper(*t);
-							if (op == 'M' || op == 'D' || op == 'N') l += x;
-							s = t + 1;
-						}
-						if (l == 0) l = 1;
-						intv->end = intv->beg + l;
-					}
-				} else if ((conf->preset&0xffff) == TI_PRESET_VCF) {
-					// FIXME: the following is NOT tested and is likely to be buggy
-					if (id == 4) {
-						if (b < i) intv->end = intv->beg + (i - b);
-					} else if (id == 8) { // look for "END="
-						int c = line[i];
-						line[i] = 0;
-						s = strstr(line + b, "END=");
-						if (s == line + b) s += 4;
-						else if (s) {
-							s = strstr(line + b, ";END=");
-							if (s) s += 5;
-						}
-						if (s) intv->end = strtol(s, &s, 0);
-						line[i] = c;
-					}
-				}
-			}
-			b = i + 1;
-			++id;
-		}
-	}
-/*
-	if (ncols < conf->sc || ncols < conf->bc || ncols < conf->ec) {
-		if (ncols == 1) fprintf(stderr,"[get_intv] Is the file tab-delimited? The line has %d field only: %s\n", ncols, line);
-		else fprintf(stderr,"[get_intv] The line has %d field(s) only: %s\n", ncols, line);
-		exit(1);
-	}
-*/
-	if (intv->ss == 0 || intv->se == 0 || intv->beg < 0 || intv->end < 0) return -1;
-	return 0;
-}
-
-static int get_intv(ti_index_t *idx, kstring_t *str, ti_intv_t *intv)
-{
-	ti_interval_t x;
-	intv->tid = intv->beg = intv->end = intv->bin = -1;
-	if (ti_get_intv(&idx->conf, str->l, str->s, &x) == 0) {
-		int c = *x.se;
-		*x.se = '\0'; intv->tid = get_tid(idx, x.ss); *x.se = c;
-		intv->beg = x.beg; intv->end = x.end;
-		intv->bin = ti_reg2bin(intv->beg, intv->end);
-		return (intv->tid >= 0 && intv->beg >= 0 && intv->end >= 0)? 0 : -1;
-	} else {
-		fprintf(stderr, "[%s] the following line cannot be parsed and skipped: %s\n", __func__, str->s);
-		return -1;
-	}
-}
-
-/************
- * indexing *
- ************/
-
-// requirement: len <= LEN_MASK
-static inline void insert_offset(khash_t(i) *h, int bin, uint64_t beg, uint64_t end)
-{
-	khint_t k;
-	ti_binlist_t *l;
-	int ret;
-	k = kh_put(i, h, bin, &ret);
-	l = &kh_value(h, k);
-	if (ret) { // not present
-		l->m = 1; l->n = 0;
-		l->list = (pair64_t*)calloc(l->m, 16);
-	}
-	if (l->n == l->m) {
-		l->m <<= 1;
-		l->list = (pair64_t*)realloc(l->list, l->m * 16);
-	}
-	l->list[l->n].u = beg; l->list[l->n++].v = end;
-}
-
-static inline uint64_t insert_offset2(ti_lidx_t *index2, int _beg, int _end, uint64_t offset)
-{
-	int i, beg, end;
-	beg = _beg >> TAD_LIDX_SHIFT;
-	end = (_end - 1) >> TAD_LIDX_SHIFT;
-	if (index2->m < end + 1) {
-		int old_m = index2->m;
-		index2->m = end + 1;
-		kroundup32(index2->m);
-		index2->offset = (uint64_t*)realloc(index2->offset, index2->m * 8);
-		memset(index2->offset + old_m, 0, 8 * (index2->m - old_m));
-	}
-	if (beg == end) {
-		if (index2->offset[beg] == 0) index2->offset[beg] = offset;
-	} else {
-		for (i = beg; i <= end; ++i)
-			if (index2->offset[i] == 0) index2->offset[i] = offset;
-	}
-	if (index2->n < end + 1) index2->n = end + 1;
-	return (uint64_t)beg<<32 | end;
-}
-
-static void merge_chunks(ti_index_t *idx)
-{
-	khash_t(i) *index;
-	int i, l, m;
-	khint_t k;
-	for (i = 0; i < idx->n; ++i) {
-		index = idx->index[i];
-		for (k = kh_begin(index); k != kh_end(index); ++k) {
-			ti_binlist_t *p;
-			if (!kh_exist(index, k)) continue;
-			p = &kh_value(index, k);
-			m = 0;
-			for (l = 1; l < p->n; ++l) {
-				if (p->list[m].v>>16 == p->list[l].u>>16) p->list[m].v = p->list[l].v;
-				else p->list[++m] = p->list[l];
-			} // ~for(l)
-			p->n = m + 1;
-		} // ~for(k)
-	} // ~for(i)
-}
-
-static void fill_missing(ti_index_t *idx)
-{
-	int i, j;
-	for (i = 0; i < idx->n; ++i) {
-		ti_lidx_t *idx2 = &idx->index2[i];
-		for (j = 1; j < idx2->n; ++j)
-			if (idx2->offset[j] == 0)
-				idx2->offset[j] = idx2->offset[j-1];
-	}
-}
-
-ti_index_t *ti_index_core(BGZF *fp, const ti_conf_t *conf)
-{
-	int ret;
-	ti_index_t *idx;
-	uint32_t last_bin, save_bin;
-	int32_t last_coor, last_tid, save_tid;
-	uint64_t save_off, last_off, lineno = 0, offset0 = (uint64_t)-1, tmp;
-	kstring_t *str;
-
-	str = calloc(1, sizeof(kstring_t));
-
-	idx = (ti_index_t*)calloc(1, sizeof(ti_index_t));
-	idx->conf = *conf;
-	idx->n = idx->max = 0;
-	idx->tname = kh_init(s);
-	idx->index = 0;
-	idx->index2 = 0;
-
-	save_bin = save_tid = last_tid = last_bin = 0xffffffffu;
-	save_off = last_off = bgzf_tell(fp); last_coor = 0xffffffffu;
-	while ((ret = ti_readline(fp, str)) >= 0) {
-		ti_intv_t intv;
-		++lineno;
-		if (lineno <= idx->conf.line_skip || str->s[0] == idx->conf.meta_char) {
-			last_off = bgzf_tell(fp);
-			continue;
-		}
-		get_intv(idx, str, &intv);
-        if ( intv.beg<0 || intv.end<0 )
-        {
-            fprintf(stderr,"[ti_index_core] the indexes overlap or are out of bounds\n");
-            exit(1);
-        }
-		if (last_tid != intv.tid) { // change of chromosomes
-            if (last_tid>intv.tid )
-            {
-                fprintf(stderr,"[ti_index_core] the chromosome blocks not continuous at line %llu, is the file sorted? [pos %d]\n",(unsigned long long)lineno,intv.beg+1);
-                exit(1);
-            }
-			last_tid = intv.tid;
-			last_bin = 0xffffffffu;
-		} else if (last_coor > intv.beg) {
-			fprintf(stderr, "[ti_index_core] the file out of order at line %llu\n", (unsigned long long)lineno);
-			exit(1);
-		}
-		tmp = insert_offset2(&idx->index2[intv.tid], intv.beg, intv.end, last_off);
-		if (last_off == 0) offset0 = tmp;
-		if (intv.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);
-			save_off = last_off;
-			save_bin = last_bin = intv.bin;
-			save_tid = intv.tid;
-			if (save_tid < 0) break;
-		}
-		if (bgzf_tell(fp) <= last_off) {
-			fprintf(stderr, "[ti_index_core] bug in BGZF: %llx < %llx\n",
-					(unsigned long long)bgzf_tell(fp), (unsigned long long)last_off);
-			exit(1);
-		}
-		last_off = bgzf_tell(fp);
-		last_coor = intv.beg;
-	}
-	if (save_tid >= 0) insert_offset(idx->index[save_tid], save_bin, save_off, bgzf_tell(fp));
-	merge_chunks(idx);
-	fill_missing(idx);
-	if (offset0 != (uint64_t)-1 && idx->n && idx->index2[0].offset) {
-		int i, beg = offset0>>32, end = offset0&0xffffffffu;
-		for (i = beg; i <= end; ++i) idx->index2[0].offset[i] = 0;
-	}
-
-	free(str->s); free(str);
-	return idx;
-}
-
-void ti_index_destroy(ti_index_t *idx)
-{
-	khint_t k;
-	int i;
-	if (idx == 0) return;
-	// destroy the name hash table
-	for (k = kh_begin(idx->tname); k != kh_end(idx->tname); ++k) {
-		if (kh_exist(idx->tname, k))
-			free((char*)kh_key(idx->tname, k));
-	}
-	kh_destroy(s, idx->tname);
-	// destroy the binning index
-	for (i = 0; i < idx->n; ++i) {
-		khash_t(i) *index = idx->index[i];
-		ti_lidx_t *index2 = idx->index2 + i;
-		for (k = kh_begin(index); k != kh_end(index); ++k) {
-			if (kh_exist(index, k))
-				free(kh_value(index, k).list);
-		}
-		kh_destroy(i, index);
-		free(index2->offset);
-	}
-	free(idx->index);
-	// destroy the linear index
-	free(idx->index2);
-	free(idx);
-}
-
-/******************
- * index file I/O *
- ******************/
-
-void ti_index_save(const ti_index_t *idx, BGZF *fp)
-{
-	int32_t i, size, ti_is_be;
-	khint_t k;
-	ti_is_be = bam_is_big_endian();
-	bgzf_write(fp, "TBI\1", 4);
-	if (ti_is_be) {
-		uint32_t x = idx->n;
-		bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-	} else bgzf_write(fp, &idx->n, 4);
-	assert(sizeof(ti_conf_t) == 24);
-	if (ti_is_be) { // write ti_conf_t;
-		uint32_t x[6];
-		memcpy(x, &idx->conf, 24);
-		for (i = 0; i < 6; ++i) bgzf_write(fp, bam_swap_endian_4p(&x[i]), 4);
-	} else bgzf_write(fp, &idx->conf, sizeof(ti_conf_t));
-	{ // write target names
-		char **name;
-		int32_t l = 0;
-		name = calloc(kh_size(idx->tname), sizeof(void*));
-		for (k = kh_begin(idx->tname); k != kh_end(idx->tname); ++k)
-			if (kh_exist(idx->tname, k))
-				name[kh_value(idx->tname, k)] = (char*)kh_key(idx->tname, k);
-		for (i = 0; i < kh_size(idx->tname); ++i)
-			l += strlen(name[i]) + 1;
-		if (ti_is_be) bgzf_write(fp, bam_swap_endian_4p(&l), 4);
-		else bgzf_write(fp, &l, 4);
-		for (i = 0; i < kh_size(idx->tname); ++i)
-			bgzf_write(fp, name[i], strlen(name[i]) + 1);
-		free(name);
-	}
-	for (i = 0; i < idx->n; ++i) {
-		khash_t(i) *index = idx->index[i];
-		ti_lidx_t *index2 = idx->index2 + i;
-		// write binning index
-		size = kh_size(index);
-		if (ti_is_be) { // big endian
-			uint32_t x = size;
-			bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-		} else bgzf_write(fp, &size, 4);
-		for (k = kh_begin(index); k != kh_end(index); ++k) {
-			if (kh_exist(index, k)) {
-				ti_binlist_t *p = &kh_value(index, k);
-				if (ti_is_be) { // big endian
-					uint32_t x;
-					x = kh_key(index, k); bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-					x = p->n; bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-					for (x = 0; (int)x < p->n; ++x) {
-						bam_swap_endian_8p(&p->list[x].u);
-						bam_swap_endian_8p(&p->list[x].v);
-					}
-					bgzf_write(fp, p->list, 16 * p->n);
-					for (x = 0; (int)x < p->n; ++x) {
-						bam_swap_endian_8p(&p->list[x].u);
-						bam_swap_endian_8p(&p->list[x].v);
-					}
-				} else {
-					bgzf_write(fp, &kh_key(index, k), 4);
-					bgzf_write(fp, &p->n, 4);
-					bgzf_write(fp, p->list, 16 * p->n);
-				}
-			}
-		}
-		// write linear index (index2)
-		if (ti_is_be) {
-			int x = index2->n;
-			bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-		} else bgzf_write(fp, &index2->n, 4);
-		if (ti_is_be) { // big endian
-			int x;
-			for (x = 0; (int)x < index2->n; ++x)
-				bam_swap_endian_8p(&index2->offset[x]);
-			bgzf_write(fp, index2->offset, 8 * index2->n);
-			for (x = 0; (int)x < index2->n; ++x)
-				bam_swap_endian_8p(&index2->offset[x]);
-		} else bgzf_write(fp, index2->offset, 8 * index2->n);
-	}
-}
-
-static ti_index_t *ti_index_load_core(BGZF *fp)
-{
-	int i, ti_is_be;
-	char magic[4];
-	ti_index_t *idx;
-	ti_is_be = bam_is_big_endian();
-	if (fp == 0) {
-		fprintf(stderr, "[ti_index_load_core] fail to load index.\n");
-		return 0;
-	}
-	bgzf_read(fp, magic, 4);
-	if (strncmp(magic, "TBI\1", 4)) {
-		fprintf(stderr, "[ti_index_load] wrong magic number.\n");
-		return 0;
-	}
-	idx = (ti_index_t*)calloc(1, sizeof(ti_index_t));	
-	bgzf_read(fp, &idx->n, 4);
-	if (ti_is_be) bam_swap_endian_4p(&idx->n);
-	idx->tname = kh_init(s);
-	idx->index = (khash_t(i)**)calloc(idx->n, sizeof(void*));
-	idx->index2 = (ti_lidx_t*)calloc(idx->n, sizeof(ti_lidx_t));
-	// read idx->conf
-	bgzf_read(fp, &idx->conf, sizeof(ti_conf_t));
-	if (ti_is_be) {
-		bam_swap_endian_4p(&idx->conf.preset);
-		bam_swap_endian_4p(&idx->conf.sc);
-		bam_swap_endian_4p(&idx->conf.bc);
-		bam_swap_endian_4p(&idx->conf.ec);
-		bam_swap_endian_4p(&idx->conf.meta_char);
-		bam_swap_endian_4p(&idx->conf.line_skip);
-	}
-	{ // read target names
-		int j, ret;
-		kstring_t *str;
-		int32_t l;
-		uint8_t *buf;
-		bgzf_read(fp, &l, 4);
-		if (ti_is_be) bam_swap_endian_4p(&l);
-		buf = calloc(l, 1);
-		bgzf_read(fp, buf, l);
-		str = calloc(1, sizeof(kstring_t));
-		for (i = j = 0; i < l; ++i) {
-			if (buf[i] == 0) {
-				khint_t k = kh_put(s, idx->tname, strdup(str->s), &ret);
-				kh_value(idx->tname, k) = j++;
-				str->l = 0;
-			} else kputc(buf[i], str);
-		}
-		free(str->s); free(str); free(buf);
-	}
-	for (i = 0; i < idx->n; ++i) {
-		khash_t(i) *index;
-		ti_lidx_t *index2 = idx->index2 + i;
-		uint32_t key, size;
-		khint_t k;
-		int j, ret;
-		ti_binlist_t *p;
-		index = idx->index[i] = kh_init(i);
-		// load binning index
-		bgzf_read(fp, &size, 4);
-		if (ti_is_be) bam_swap_endian_4p(&size);
-		for (j = 0; j < (int)size; ++j) {
-			bgzf_read(fp, &key, 4);
-			if (ti_is_be) bam_swap_endian_4p(&key);
-			k = kh_put(i, index, key, &ret);
-			p = &kh_value(index, k);
-			bgzf_read(fp, &p->n, 4);
-			if (ti_is_be) bam_swap_endian_4p(&p->n);
-			p->m = p->n;
-			p->list = (pair64_t*)malloc(p->m * 16);
-			bgzf_read(fp, p->list, 16 * p->n);
-			if (ti_is_be) {
-				int x;
-				for (x = 0; x < p->n; ++x) {
-					bam_swap_endian_8p(&p->list[x].u);
-					bam_swap_endian_8p(&p->list[x].v);
-				}
-			}
-		}
-		// load linear index
-		bgzf_read(fp, &index2->n, 4);
-		if (ti_is_be) bam_swap_endian_4p(&index2->n);
-		index2->m = index2->n;
-		index2->offset = (uint64_t*)calloc(index2->m, 8);
-		bgzf_read(fp, index2->offset, index2->n * 8);
-		if (ti_is_be)
-			for (j = 0; j < index2->n; ++j) bam_swap_endian_8p(&index2->offset[j]);
-	}
-	return idx;
-}
-
-ti_index_t *ti_index_load_local(const char *fnidx)
-{
-	BGZF *fp;
-	fp = bgzf_open(fnidx, "r");
-	if (fp) {
-		ti_index_t *idx = ti_index_load_core(fp);
-		bgzf_close(fp);
-		return idx;
-	} else return 0;
-}
-
-#ifdef _USE_KNETFILE
-static void download_from_remote(const char *url)
-{
-	const int buf_size = 1 * 1024 * 1024;
-	char *fn;
-	FILE *fp;
-	uint8_t *buf;
-	knetFile *fp_remote;
-	int l;
-	if (strstr(url, "ftp://") != url && strstr(url, "http://") != url) return;
-	l = strlen(url);
-	for (fn = (char*)url + l - 1; fn >= url; --fn)
-		if (*fn == '/') break;
-	++fn; // fn now points to the file name
-	fp_remote = knet_open(url, "r");
-	if (fp_remote == 0) {
-		fprintf(stderr, "[download_from_remote] fail to open remote file.\n");
-		return;
-	}
-	if ((fp = fopen(fn, "w")) == 0) {
-		fprintf(stderr, "[download_from_remote] fail to create file in the working directory.\n");
-		knet_close(fp_remote);
-		return;
-	}
-	buf = (uint8_t*)calloc(buf_size, 1);
-	while ((l = knet_read(fp_remote, buf, buf_size)) != 0)
-		fwrite(buf, 1, l, fp);
-	free(buf);
-	fclose(fp);
-	knet_close(fp_remote);
-}
-#else
-static void download_from_remote(const char *url)
-{
-	return;
-}
-#endif
-
-static char *get_local_version(const char *fn)
-{
-    struct stat sbuf;
-	char *fnidx = (char*)calloc(strlen(fn) + 5, 1);
-	strcat(strcpy(fnidx, fn), ".tbi");
-	if ((strstr(fnidx, "ftp://") == fnidx || strstr(fnidx, "http://") == fnidx)) {
-		char *p, *url;
-		int l = strlen(fnidx);
-		for (p = fnidx + l - 1; p >= fnidx; --p)
-			if (*p == '/') break;
-		url = fnidx; fnidx = strdup(p + 1);
-		if (stat(fnidx, &sbuf) == 0) {
-			free(url);
-			return fnidx;
-		}
-		fprintf(stderr, "[%s] downloading the index file...\n", __func__);
-		download_from_remote(url);
-		free(url);
-	}
-    if (stat(fnidx, &sbuf) == 0) return fnidx;
-	free(fnidx); return 0;
-}
-
-const char **ti_seqname(const ti_index_t *idx, int *n)
-{
-	const char **names;
-	khint_t k;
-	*n = idx->n;
-	names = calloc(idx->n, sizeof(void*));
-	for (k = kh_begin(idx->tname); k < kh_end(idx->tname); ++k)
-		if (kh_exist(idx->tname, k))
-			names[kh_val(idx->tname, k)] = kh_key(idx->tname, k);
-	return names;
-}
-
-ti_index_t *ti_index_load(const char *fn)
-{
-	ti_index_t *idx;
-    char *fname = get_local_version(fn);
-	if (fname == 0) return 0;
-	idx = ti_index_load_local(fname);
-	if (idx == 0) fprintf(stderr, "[ti_index_load] fail to load the index: %s\n", fname);
-    free(fname);
-	return idx;
-}
-
-int ti_index_build2(const char *fn, const ti_conf_t *conf, const char *_fnidx)
-{
-	char *fnidx;
-	BGZF *fp, *fpidx;
-	ti_index_t *idx;
-	if ((fp = bgzf_open(fn, "r")) == 0) {
-		fprintf(stderr, "[ti_index_build2] fail to open the file: %s\n", fn);
-		return -1;
-	}
-	idx = ti_index_core(fp, conf);
-	bgzf_close(fp);
-	if (_fnidx == 0) {
-		fnidx = (char*)calloc(strlen(fn) + 5, 1);
-		strcpy(fnidx, fn); strcat(fnidx, ".tbi");
-	} else fnidx = strdup(_fnidx);
-	fpidx = bgzf_open(fnidx, "w");
-	if (fpidx == 0) {
-		fprintf(stderr, "[ti_index_build2] fail to create the index file.\n");
-		free(fnidx);
-		return -1;
-	}
-	ti_index_save(idx, fpidx);
-	ti_index_destroy(idx);
-	bgzf_close(fpidx);
-	free(fnidx);
-	return 0;
-}
-
-int ti_index_build(const char *fn, const ti_conf_t *conf)
-{
-	return ti_index_build2(fn, conf, 0);
-}
-
-/********************************************
- * parse a region in the format chr:beg-end *
- ********************************************/
-
-int ti_get_tid(const ti_index_t *idx, const char *name)
-{
-	khiter_t iter;
-	const khash_t(s) *h = idx->tname;
-	iter = kh_get(s, h, name); /* get the tid */
-	if (iter == kh_end(h)) return -1;
-	return kh_value(h, iter);
-}
-
-int ti_parse_region(const ti_index_t *idx, const char *str, int *tid, int *begin, int *end)
-{
-	char *s, *p;
-	int i, l, k;
-	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;
-	if ((*tid = ti_get_tid(idx, s)) < 0) {
-		free(s);
-		return -1;
-	}
-	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;
-	free(s);
-	if (*begin > *end) return -1;
-	return 0;
-}
-
-/*******************************
- * retrieve a specified region *
- *******************************/
-
-#define MAX_BIN 37450 // =(8^6-1)/7+1
-
-static inline int reg2bins(uint32_t beg, uint32_t end, uint16_t list[MAX_BIN])
-{
-	int i = 0, k;
-	if (beg >= end) return 0;
-	if (end >= 1u<<29) end = 1u<<29;
-	--end;
-	list[i++] = 0;
-	for (k =    1 + (beg>>26); k <=    1 + (end>>26); ++k) list[i++] = k;
-	for (k =    9 + (beg>>23); k <=    9 + (end>>23); ++k) list[i++] = k;
-	for (k =   73 + (beg>>20); k <=   73 + (end>>20); ++k) list[i++] = k;
-	for (k =  585 + (beg>>17); k <=  585 + (end>>17); ++k) list[i++] = k;
-	for (k = 4681 + (beg>>14); k <= 4681 + (end>>14); ++k) list[i++] = k;
-	return i;
-}
-
-ti_iter_t ti_iter_first()
-{
-	ti_iter_t iter;
-	iter = calloc(1, sizeof(struct __ti_iter_t));
-	iter->from_first = 1;
-	return iter;
-}
-
-ti_iter_t ti_iter_query(const ti_index_t *idx, int tid, int beg, int end)
-{
-	uint16_t *bins;
-	int i, n_bins, n_off;
-	pair64_t *off;
-	khint_t k;
-	khash_t(i) *index;
-	uint64_t min_off;
-	ti_iter_t iter = 0;
-
-	if (beg < 0) beg = 0;
-	if (end < beg) return 0;
-	// initialize the iterator
-	iter = calloc(1, sizeof(struct __ti_iter_t));
-	iter->idx = idx; iter->tid = tid; iter->beg = beg; iter->end = end; iter->i = -1;
-	// random access
-	bins = (uint16_t*)calloc(MAX_BIN, 2);
-	n_bins = reg2bins(beg, end, bins);
-	index = idx->index[tid];
-	if (idx->index2[tid].n > 0) {
-		min_off = (beg>>TAD_LIDX_SHIFT >= idx->index2[tid].n)? idx->index2[tid].offset[idx->index2[tid].n-1]
-			: idx->index2[tid].offset[beg>>TAD_LIDX_SHIFT];
-		if (min_off == 0) { // improvement for index files built by tabix prior to 0.1.4
-			int n = beg>>TAD_LIDX_SHIFT;
-			if (n > idx->index2[tid].n) n = idx->index2[tid].n;
-			for (i = n - 1; i >= 0; --i)
-				if (idx->index2[tid].offset[i] != 0) break;
-			if (i >= 0) min_off = idx->index2[tid].offset[i];
-		}
-	} else min_off = 0; // tabix 0.1.2 may produce such index files
-	for (i = n_off = 0; i < n_bins; ++i) {
-		if ((k = kh_get(i, index, bins[i])) != kh_end(index))
-			n_off += kh_value(index, k).n;
-	}
-	if (n_off == 0) {
-		free(bins); return iter;
-	}
-	off = (pair64_t*)calloc(n_off, 16);
-	for (i = n_off = 0; i < n_bins; ++i) {
-		if ((k = kh_get(i, index, bins[i])) != kh_end(index)) {
-			int j;
-			ti_binlist_t *p = &kh_value(index, k);
-			for (j = 0; j < p->n; ++j)
-				if (p->list[j].v > min_off) off[n_off++] = p->list[j];
-		}
-	}
-	if (n_off == 0) {
-		free(bins); free(off); return iter;
-	}
-	free(bins);
-	{
-		int l;
-		ks_introsort(offt, n_off, off);
-		// resolve completely contained adjacent blocks
-		for (i = 1, l = 0; i < n_off; ++i)
-			if (off[l].v < off[i].v)
-				off[++l] = off[i];
-		n_off = l + 1;
-		// resolve overlaps between adjacent blocks; this may happen due to the merge in indexing
-		for (i = 1; i < n_off; ++i)
-			if (off[i-1].v >= off[i].u) off[i-1].v = off[i].u;
-		{ // merge adjacent blocks
-			for (i = 1, l = 0; i < n_off; ++i) {
-				if (off[l].v>>16 == off[i].u>>16) off[l].v = off[i].v;
-				else off[++l] = off[i];
-			}
-			n_off = l + 1;
-		}
-	}
-	iter->n_off = n_off; iter->off = off;
-	return iter;
-}
-
-const char *ti_iter_read(BGZF *fp, ti_iter_t iter, int *len)
-{
-	if (iter->finished) return 0;
-	if (iter->from_first) {
-		int ret;
-		if ((ret = ti_readline(fp, &iter->str)) < 0) {
-			iter->finished = 1;
-			return 0;
-		} else {
-			if (len) *len = iter->str.l;
-			return iter->str.s;
-		}
-	}
-	if (iter->n_off == 0) return 0;
-	while (1) {
-		int ret;
-		if (iter->curr_off == 0 || iter->curr_off >= iter->off[iter->i].v) { // then jump to the next chunk
-			if (iter->i == iter->n_off - 1) break; // no more chunks
-			if (iter->i >= 0) assert(iter->curr_off == iter->off[iter->i].v); // otherwise bug
-			if (iter->i < 0 || iter->off[iter->i].v != iter->off[iter->i+1].u) { // not adjacent chunks; then seek
-				bgzf_seek(fp, iter->off[iter->i+1].u, SEEK_SET);
-				iter->curr_off = bgzf_tell(fp);
-			}
-			++iter->i;
-		}
-		if ((ret = ti_readline(fp, &iter->str)) >= 0) {
-			ti_intv_t intv;
-			iter->curr_off = bgzf_tell(fp);
-			if (iter->str.s[0] == iter->idx->conf.meta_char) continue;
-			get_intv((ti_index_t*)iter->idx, &iter->str, &intv);
-			if (intv.tid != iter->tid || intv.beg >= iter->end) break; // no need to proceed
-			else if (intv.end > iter->beg && iter->end > intv.beg) {
-				if (len) *len = iter->str.l;
-				return iter->str.s;
-			}
-		} else break; // end of file
-	}
-	iter->finished = 1;
-	return 0;
-}
-
-void ti_iter_destroy(ti_iter_t iter)
-{
-	if (iter) {
-		free(iter->str.s); free(iter->off);
-		free(iter);
-	}
-}
-
-int ti_fetch(BGZF *fp, const ti_index_t *idx, int tid, int beg, int end, void *data, ti_fetch_f func)
-{
-	ti_iter_t iter;
-	const char *s;
-	int len;
-	iter = ti_iter_query(idx, tid, beg, end);
-	while ((s = ti_iter_read(fp, iter, &len)) != 0)
-		func(len, s, data);
-	ti_iter_destroy(iter);
-	return 0;
-}
-
-const ti_conf_t *ti_get_conf(ti_index_t *idx) { return idx? &idx->conf : 0; }
-
-/*******************
- * High-level APIs *
- *******************/
-
-tabix_t *ti_open(const char *fn, const char *fnidx)
-{
-	tabix_t *t;
-	BGZF *fp;
-	if ((fp = bgzf_open(fn, "r")) == 0) return 0;
-	t = calloc(1, sizeof(tabix_t));
-	t->fn = strdup(fn);
-	if (fnidx) t->fnidx = strdup(fnidx);
-	t->fp = fp;
-	return t;
-}
-
-void ti_close(tabix_t *t)
-{
-	if (t) {
-		bgzf_close(t->fp);
-		if (t->idx) ti_index_destroy(t->idx);
-		free(t->fn); free(t->fnidx);
-		free(t);
-	}
-}
-
-int ti_lazy_index_load(tabix_t *t)
-{
-	if (t->idx == 0) { // load index
-		if (t->fnidx) t->idx = ti_index_load_local(t->fnidx);
-		else t->idx = ti_index_load(t->fn);
-		if (t->idx == 0) return -1; // fail to load index
-	}
-	return 0;
-}
-
-ti_iter_t ti_queryi(tabix_t *t, int tid, int beg, int end)
-{
-	if (tid < 0) return ti_iter_first();
-	if (ti_lazy_index_load(t) != 0) return 0;
-	return ti_iter_query(t->idx, tid, beg, end);	
-}
-
-ti_iter_t ti_querys(tabix_t *t, const char *reg)
-{
-	int tid, beg, end;
-	if (reg == 0) return ti_iter_first();
-	if (ti_lazy_index_load(t) != 0) return 0;
-	if (ti_parse_region(t->idx, reg, &tid, &beg, &end) < 0) return 0;
-	return ti_iter_query(t->idx, tid, beg, end);
-}
-
-ti_iter_t ti_query(tabix_t *t, const char *name, int beg, int end)
-{
-	int tid;
-	if (name == 0) return ti_iter_first();
-	// then need to load the index
-	if (ti_lazy_index_load(t) != 0) return 0;
-	if ((tid = ti_get_tid(t->idx, name)) < 0) return 0;
-	return ti_iter_query(t->idx, tid, beg, end);
-}
-
-const char *ti_read(tabix_t *t, ti_iter_t iter, int *len)
-{
-	return ti_iter_read(t->fp, iter, len);
-}
diff --git a/tabix/index.c.pysam.c b/tabix/index.c.pysam.c
deleted file mode 100644
index 88cdc40..0000000
--- a/tabix/index.c.pysam.c
+++ /dev/null
@@ -1,969 +0,0 @@
-#include "pysam.h"
-
-#include <ctype.h>
-#include <assert.h>
-#include <sys/stat.h>
-#include "khash.h"
-#include "ksort.h"
-#include "kstring.h"
-#include "bam_endian.h"
-#ifdef _USE_KNETFILE
-#include "knetfile.h"
-#endif
-#include "tabix.h"
-
-#define TAD_MIN_CHUNK_GAP 32768
-// 1<<14 is the size of minimum bin.
-#define TAD_LIDX_SHIFT    14
-
-typedef struct {
-	uint64_t u, v;
-} pair64_t;
-
-#define pair64_lt(a,b) ((a).u < (b).u)
-KSORT_INIT(offt, pair64_t, pair64_lt)
-
-typedef struct {
-	uint32_t m, n;
-	pair64_t *list;
-} ti_binlist_t;
-
-typedef struct {
-	int32_t n, m;
-	uint64_t *offset;
-} ti_lidx_t;
-
-KHASH_MAP_INIT_INT(i, ti_binlist_t)
-KHASH_MAP_INIT_STR(s, int)
-
-struct __ti_index_t {
-	ti_conf_t conf;
-	int32_t n, max;
-	khash_t(s) *tname;
-	khash_t(i) **index;
-	ti_lidx_t *index2;
-};
-
-struct __ti_iter_t {
-	int from_first; // read from the first record; no random access
-	int tid, beg, end, n_off, i, finished;
-	uint64_t curr_off;
-	kstring_t str;
-	const ti_index_t *idx;
-	pair64_t *off;
-};
-
-typedef struct {
-	int tid, beg, end, bin;
-} ti_intv_t;
-
-ti_conf_t ti_conf_gff = { 0, 1, 4, 5, '#', 0 };
-ti_conf_t ti_conf_bed = { TI_FLAG_UCSC, 1, 2, 3, '#', 0 };
-ti_conf_t ti_conf_psltbl = { TI_FLAG_UCSC, 15, 17, 18, '#', 0 };
-ti_conf_t ti_conf_sam = { TI_PRESET_SAM, 3, 4, 0, '@', 0 };
-ti_conf_t ti_conf_vcf = { TI_PRESET_VCF, 1, 2, 0, '#', 0 };
-
-/***************
- * read a line *
- ***************/
-
-/*
-int ti_readline(BGZF *fp, kstring_t *str)
-{
-	int c, l = 0;
-	str->l = 0;
-	while ((c = bgzf_getc(fp)) >= 0 && c != '\n') {
-		++l;
-		if (c != '\r') kputc(c, str);
-	}
-	if (c < 0 && l == 0) return -1; // end of file
-	return str->l;
-}
-*/
-
-/* Below is a faster implementation largely equivalent to the one
- * commented out above. */
-int ti_readline(BGZF *fp, kstring_t *str)
-{
-	return bgzf_getline(fp, '\n', str);
-}
-
-/*************************************
- * get the interval from a data line *
- *************************************/
-
-static inline int ti_reg2bin(uint32_t beg, uint32_t end)
-{
-	--end;
-	if (beg>>14 == end>>14) return 4681 + (beg>>14);
-	if (beg>>17 == end>>17) return  585 + (beg>>17);
-	if (beg>>20 == end>>20) return   73 + (beg>>20);
-	if (beg>>23 == end>>23) return    9 + (beg>>23);
-	if (beg>>26 == end>>26) return    1 + (beg>>26);
-	return 0;
-}
-
-static int get_tid(ti_index_t *idx, const char *ss)
-{
-	khint_t k;
-	int tid;
-	k = kh_get(s, idx->tname, ss);
-	if (k == kh_end(idx->tname)) { // a new target sequence
-		int ret, size;
-		// update idx->n, ->max, ->index and ->index2
-		if (idx->n == idx->max) {
-			idx->max = idx->max? idx->max<<1 : 8;
-			idx->index = realloc(idx->index, idx->max * sizeof(void*));
-			idx->index2 = realloc(idx->index2, idx->max * sizeof(ti_lidx_t));
-		}
-		memset(&idx->index2[idx->n], 0, sizeof(ti_lidx_t));
-		idx->index[idx->n++] = kh_init(i);
-		// update ->tname
-		tid = size = kh_size(idx->tname);
-		k = kh_put(s, idx->tname, strdup(ss), &ret);
-		kh_value(idx->tname, k) = size;
-		assert(idx->n == kh_size(idx->tname));
-	} else tid = kh_value(idx->tname, k);
-	return tid;
-}
-
-int ti_get_intv(const ti_conf_t *conf, int len, char *line, ti_interval_t *intv)
-{
-	int i, b = 0, id = 1, ncols = 0;
-	char *s;
-	intv->ss = intv->se = 0; intv->beg = intv->end = -1;
-	for (i = 0; i <= len; ++i) {
-		if (line[i] == '\t' || line[i] == 0) {
-            ++ncols;
-			if (id == conf->sc) {
-				intv->ss = line + b; intv->se = line + i;
-			} else if (id == conf->bc) {
-				// here ->beg is 0-based.
-				intv->beg = intv->end = strtol(line + b, &s, 0);
-				if (!(conf->preset&TI_FLAG_UCSC)) --intv->beg;
-				else ++intv->end;
-				if (intv->beg < 0) intv->beg = 0;
-				if (intv->end < 1) intv->end = 1;
-			} else {
-				if ((conf->preset&0xffff) == TI_PRESET_GENERIC) {
-					if (id == conf->ec) intv->end = strtol(line + b, &s, 0);
-				} else if ((conf->preset&0xffff) == TI_PRESET_SAM) {
-					if (id == 6) { // CIGAR
-						int l = 0, op;
-						char *t;
-						for (s = line + b; s < line + i;) {
-							long x = strtol(s, &t, 10);
-							op = toupper(*t);
-							if (op == 'M' || op == 'D' || op == 'N') l += x;
-							s = t + 1;
-						}
-						if (l == 0) l = 1;
-						intv->end = intv->beg + l;
-					}
-				} else if ((conf->preset&0xffff) == TI_PRESET_VCF) {
-					// FIXME: the following is NOT tested and is likely to be buggy
-					if (id == 4) {
-						if (b < i) intv->end = intv->beg + (i - b);
-					} else if (id == 8) { // look for "END="
-						int c = line[i];
-						line[i] = 0;
-						s = strstr(line + b, "END=");
-						if (s == line + b) s += 4;
-						else if (s) {
-							s = strstr(line + b, ";END=");
-							if (s) s += 5;
-						}
-						if (s) intv->end = strtol(s, &s, 0);
-						line[i] = c;
-					}
-				}
-			}
-			b = i + 1;
-			++id;
-		}
-	}
-/*
-	if (ncols < conf->sc || ncols < conf->bc || ncols < conf->ec) {
-		if (ncols == 1) fprintf(pysamerr,"[get_intv] Is the file tab-delimited? The line has %d field only: %s\n", ncols, line);
-		else fprintf(pysamerr,"[get_intv] The line has %d field(s) only: %s\n", ncols, line);
-		exit(1);
-	}
-*/
-	if (intv->ss == 0 || intv->se == 0 || intv->beg < 0 || intv->end < 0) return -1;
-	return 0;
-}
-
-static int get_intv(ti_index_t *idx, kstring_t *str, ti_intv_t *intv)
-{
-	ti_interval_t x;
-	intv->tid = intv->beg = intv->end = intv->bin = -1;
-	if (ti_get_intv(&idx->conf, str->l, str->s, &x) == 0) {
-		int c = *x.se;
-		*x.se = '\0'; intv->tid = get_tid(idx, x.ss); *x.se = c;
-		intv->beg = x.beg; intv->end = x.end;
-		intv->bin = ti_reg2bin(intv->beg, intv->end);
-		return (intv->tid >= 0 && intv->beg >= 0 && intv->end >= 0)? 0 : -1;
-	} else {
-		fprintf(pysamerr, "[%s] the following line cannot be parsed and skipped: %s\n", __func__, str->s);
-		return -1;
-	}
-}
-
-/************
- * indexing *
- ************/
-
-// requirement: len <= LEN_MASK
-static inline void insert_offset(khash_t(i) *h, int bin, uint64_t beg, uint64_t end)
-{
-	khint_t k;
-	ti_binlist_t *l;
-	int ret;
-	k = kh_put(i, h, bin, &ret);
-	l = &kh_value(h, k);
-	if (ret) { // not present
-		l->m = 1; l->n = 0;
-		l->list = (pair64_t*)calloc(l->m, 16);
-	}
-	if (l->n == l->m) {
-		l->m <<= 1;
-		l->list = (pair64_t*)realloc(l->list, l->m * 16);
-	}
-	l->list[l->n].u = beg; l->list[l->n++].v = end;
-}
-
-static inline uint64_t insert_offset2(ti_lidx_t *index2, int _beg, int _end, uint64_t offset)
-{
-	int i, beg, end;
-	beg = _beg >> TAD_LIDX_SHIFT;
-	end = (_end - 1) >> TAD_LIDX_SHIFT;
-	if (index2->m < end + 1) {
-		int old_m = index2->m;
-		index2->m = end + 1;
-		kroundup32(index2->m);
-		index2->offset = (uint64_t*)realloc(index2->offset, index2->m * 8);
-		memset(index2->offset + old_m, 0, 8 * (index2->m - old_m));
-	}
-	if (beg == end) {
-		if (index2->offset[beg] == 0) index2->offset[beg] = offset;
-	} else {
-		for (i = beg; i <= end; ++i)
-			if (index2->offset[i] == 0) index2->offset[i] = offset;
-	}
-	if (index2->n < end + 1) index2->n = end + 1;
-	return (uint64_t)beg<<32 | end;
-}
-
-static void merge_chunks(ti_index_t *idx)
-{
-	khash_t(i) *index;
-	int i, l, m;
-	khint_t k;
-	for (i = 0; i < idx->n; ++i) {
-		index = idx->index[i];
-		for (k = kh_begin(index); k != kh_end(index); ++k) {
-			ti_binlist_t *p;
-			if (!kh_exist(index, k)) continue;
-			p = &kh_value(index, k);
-			m = 0;
-			for (l = 1; l < p->n; ++l) {
-				if (p->list[m].v>>16 == p->list[l].u>>16) p->list[m].v = p->list[l].v;
-				else p->list[++m] = p->list[l];
-			} // ~for(l)
-			p->n = m + 1;
-		} // ~for(k)
-	} // ~for(i)
-}
-
-static void fill_missing(ti_index_t *idx)
-{
-	int i, j;
-	for (i = 0; i < idx->n; ++i) {
-		ti_lidx_t *idx2 = &idx->index2[i];
-		for (j = 1; j < idx2->n; ++j)
-			if (idx2->offset[j] == 0)
-				idx2->offset[j] = idx2->offset[j-1];
-	}
-}
-
-ti_index_t *ti_index_core(BGZF *fp, const ti_conf_t *conf)
-{
-	int ret;
-	ti_index_t *idx;
-	uint32_t last_bin, save_bin;
-	int32_t last_coor, last_tid, save_tid;
-	uint64_t save_off, last_off, lineno = 0, offset0 = (uint64_t)-1, tmp;
-	kstring_t *str;
-
-	str = calloc(1, sizeof(kstring_t));
-
-	idx = (ti_index_t*)calloc(1, sizeof(ti_index_t));
-	idx->conf = *conf;
-	idx->n = idx->max = 0;
-	idx->tname = kh_init(s);
-	idx->index = 0;
-	idx->index2 = 0;
-
-	save_bin = save_tid = last_tid = last_bin = 0xffffffffu;
-	save_off = last_off = bgzf_tell(fp); last_coor = 0xffffffffu;
-	while ((ret = ti_readline(fp, str)) >= 0) {
-		ti_intv_t intv;
-		++lineno;
-		if (lineno <= idx->conf.line_skip || str->s[0] == idx->conf.meta_char) {
-			last_off = bgzf_tell(fp);
-			continue;
-		}
-		get_intv(idx, str, &intv);
-        if ( intv.beg<0 || intv.end<0 )
-        {
-            fprintf(pysamerr,"[ti_index_core] the indexes overlap or are out of bounds\n");
-            exit(1);
-        }
-		if (last_tid != intv.tid) { // change of chromosomes
-            if (last_tid>intv.tid )
-            {
-                fprintf(pysamerr,"[ti_index_core] the chromosome blocks not continuous at line %llu, is the file sorted? [pos %d]\n",(unsigned long long)lineno,intv.beg+1);
-                exit(1);
-            }
-			last_tid = intv.tid;
-			last_bin = 0xffffffffu;
-		} else if (last_coor > intv.beg) {
-			fprintf(pysamerr, "[ti_index_core] the file out of order at line %llu\n", (unsigned long long)lineno);
-			exit(1);
-		}
-		tmp = insert_offset2(&idx->index2[intv.tid], intv.beg, intv.end, last_off);
-		if (last_off == 0) offset0 = tmp;
-		if (intv.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);
-			save_off = last_off;
-			save_bin = last_bin = intv.bin;
-			save_tid = intv.tid;
-			if (save_tid < 0) break;
-		}
-		if (bgzf_tell(fp) <= last_off) {
-			fprintf(pysamerr, "[ti_index_core] bug in BGZF: %llx < %llx\n",
-					(unsigned long long)bgzf_tell(fp), (unsigned long long)last_off);
-			exit(1);
-		}
-		last_off = bgzf_tell(fp);
-		last_coor = intv.beg;
-	}
-	if (save_tid >= 0) insert_offset(idx->index[save_tid], save_bin, save_off, bgzf_tell(fp));
-	merge_chunks(idx);
-	fill_missing(idx);
-	if (offset0 != (uint64_t)-1 && idx->n && idx->index2[0].offset) {
-		int i, beg = offset0>>32, end = offset0&0xffffffffu;
-		for (i = beg; i <= end; ++i) idx->index2[0].offset[i] = 0;
-	}
-
-	free(str->s); free(str);
-	return idx;
-}
-
-void ti_index_destroy(ti_index_t *idx)
-{
-	khint_t k;
-	int i;
-	if (idx == 0) return;
-	// destroy the name hash table
-	for (k = kh_begin(idx->tname); k != kh_end(idx->tname); ++k) {
-		if (kh_exist(idx->tname, k))
-			free((char*)kh_key(idx->tname, k));
-	}
-	kh_destroy(s, idx->tname);
-	// destroy the binning index
-	for (i = 0; i < idx->n; ++i) {
-		khash_t(i) *index = idx->index[i];
-		ti_lidx_t *index2 = idx->index2 + i;
-		for (k = kh_begin(index); k != kh_end(index); ++k) {
-			if (kh_exist(index, k))
-				free(kh_value(index, k).list);
-		}
-		kh_destroy(i, index);
-		free(index2->offset);
-	}
-	free(idx->index);
-	// destroy the linear index
-	free(idx->index2);
-	free(idx);
-}
-
-/******************
- * index file I/O *
- ******************/
-
-void ti_index_save(const ti_index_t *idx, BGZF *fp)
-{
-	int32_t i, size, ti_is_be;
-	khint_t k;
-	ti_is_be = bam_is_big_endian();
-	bgzf_write(fp, "TBI\1", 4);
-	if (ti_is_be) {
-		uint32_t x = idx->n;
-		bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-	} else bgzf_write(fp, &idx->n, 4);
-	assert(sizeof(ti_conf_t) == 24);
-	if (ti_is_be) { // write ti_conf_t;
-		uint32_t x[6];
-		memcpy(x, &idx->conf, 24);
-		for (i = 0; i < 6; ++i) bgzf_write(fp, bam_swap_endian_4p(&x[i]), 4);
-	} else bgzf_write(fp, &idx->conf, sizeof(ti_conf_t));
-	{ // write target names
-		char **name;
-		int32_t l = 0;
-		name = calloc(kh_size(idx->tname), sizeof(void*));
-		for (k = kh_begin(idx->tname); k != kh_end(idx->tname); ++k)
-			if (kh_exist(idx->tname, k))
-				name[kh_value(idx->tname, k)] = (char*)kh_key(idx->tname, k);
-		for (i = 0; i < kh_size(idx->tname); ++i)
-			l += strlen(name[i]) + 1;
-		if (ti_is_be) bgzf_write(fp, bam_swap_endian_4p(&l), 4);
-		else bgzf_write(fp, &l, 4);
-		for (i = 0; i < kh_size(idx->tname); ++i)
-			bgzf_write(fp, name[i], strlen(name[i]) + 1);
-		free(name);
-	}
-	for (i = 0; i < idx->n; ++i) {
-		khash_t(i) *index = idx->index[i];
-		ti_lidx_t *index2 = idx->index2 + i;
-		// write binning index
-		size = kh_size(index);
-		if (ti_is_be) { // big endian
-			uint32_t x = size;
-			bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-		} else bgzf_write(fp, &size, 4);
-		for (k = kh_begin(index); k != kh_end(index); ++k) {
-			if (kh_exist(index, k)) {
-				ti_binlist_t *p = &kh_value(index, k);
-				if (ti_is_be) { // big endian
-					uint32_t x;
-					x = kh_key(index, k); bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-					x = p->n; bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-					for (x = 0; (int)x < p->n; ++x) {
-						bam_swap_endian_8p(&p->list[x].u);
-						bam_swap_endian_8p(&p->list[x].v);
-					}
-					bgzf_write(fp, p->list, 16 * p->n);
-					for (x = 0; (int)x < p->n; ++x) {
-						bam_swap_endian_8p(&p->list[x].u);
-						bam_swap_endian_8p(&p->list[x].v);
-					}
-				} else {
-					bgzf_write(fp, &kh_key(index, k), 4);
-					bgzf_write(fp, &p->n, 4);
-					bgzf_write(fp, p->list, 16 * p->n);
-				}
-			}
-		}
-		// write linear index (index2)
-		if (ti_is_be) {
-			int x = index2->n;
-			bgzf_write(fp, bam_swap_endian_4p(&x), 4);
-		} else bgzf_write(fp, &index2->n, 4);
-		if (ti_is_be) { // big endian
-			int x;
-			for (x = 0; (int)x < index2->n; ++x)
-				bam_swap_endian_8p(&index2->offset[x]);
-			bgzf_write(fp, index2->offset, 8 * index2->n);
-			for (x = 0; (int)x < index2->n; ++x)
-				bam_swap_endian_8p(&index2->offset[x]);
-		} else bgzf_write(fp, index2->offset, 8 * index2->n);
-	}
-}
-
-static ti_index_t *ti_index_load_core(BGZF *fp)
-{
-	int i, ti_is_be;
-	char magic[4];
-	ti_index_t *idx;
-	ti_is_be = bam_is_big_endian();
-	if (fp == 0) {
-		fprintf(pysamerr, "[ti_index_load_core] fail to load index.\n");
-		return 0;
-	}
-	bgzf_read(fp, magic, 4);
-	if (strncmp(magic, "TBI\1", 4)) {
-		fprintf(pysamerr, "[ti_index_load] wrong magic number.\n");
-		return 0;
-	}
-	idx = (ti_index_t*)calloc(1, sizeof(ti_index_t));	
-	bgzf_read(fp, &idx->n, 4);
-	if (ti_is_be) bam_swap_endian_4p(&idx->n);
-	idx->tname = kh_init(s);
-	idx->index = (khash_t(i)**)calloc(idx->n, sizeof(void*));
-	idx->index2 = (ti_lidx_t*)calloc(idx->n, sizeof(ti_lidx_t));
-	// read idx->conf
-	bgzf_read(fp, &idx->conf, sizeof(ti_conf_t));
-	if (ti_is_be) {
-		bam_swap_endian_4p(&idx->conf.preset);
-		bam_swap_endian_4p(&idx->conf.sc);
-		bam_swap_endian_4p(&idx->conf.bc);
-		bam_swap_endian_4p(&idx->conf.ec);
-		bam_swap_endian_4p(&idx->conf.meta_char);
-		bam_swap_endian_4p(&idx->conf.line_skip);
-	}
-	{ // read target names
-		int j, ret;
-		kstring_t *str;
-		int32_t l;
-		uint8_t *buf;
-		bgzf_read(fp, &l, 4);
-		if (ti_is_be) bam_swap_endian_4p(&l);
-		buf = calloc(l, 1);
-		bgzf_read(fp, buf, l);
-		str = calloc(1, sizeof(kstring_t));
-		for (i = j = 0; i < l; ++i) {
-			if (buf[i] == 0) {
-				khint_t k = kh_put(s, idx->tname, strdup(str->s), &ret);
-				kh_value(idx->tname, k) = j++;
-				str->l = 0;
-			} else kputc(buf[i], str);
-		}
-		free(str->s); free(str); free(buf);
-	}
-	for (i = 0; i < idx->n; ++i) {
-		khash_t(i) *index;
-		ti_lidx_t *index2 = idx->index2 + i;
-		uint32_t key, size;
-		khint_t k;
-		int j, ret;
-		ti_binlist_t *p;
-		index = idx->index[i] = kh_init(i);
-		// load binning index
-		bgzf_read(fp, &size, 4);
-		if (ti_is_be) bam_swap_endian_4p(&size);
-		for (j = 0; j < (int)size; ++j) {
-			bgzf_read(fp, &key, 4);
-			if (ti_is_be) bam_swap_endian_4p(&key);
-			k = kh_put(i, index, key, &ret);
-			p = &kh_value(index, k);
-			bgzf_read(fp, &p->n, 4);
-			if (ti_is_be) bam_swap_endian_4p(&p->n);
-			p->m = p->n;
-			p->list = (pair64_t*)malloc(p->m * 16);
-			bgzf_read(fp, p->list, 16 * p->n);
-			if (ti_is_be) {
-				int x;
-				for (x = 0; x < p->n; ++x) {
-					bam_swap_endian_8p(&p->list[x].u);
-					bam_swap_endian_8p(&p->list[x].v);
-				}
-			}
-		}
-		// load linear index
-		bgzf_read(fp, &index2->n, 4);
-		if (ti_is_be) bam_swap_endian_4p(&index2->n);
-		index2->m = index2->n;
-		index2->offset = (uint64_t*)calloc(index2->m, 8);
-		bgzf_read(fp, index2->offset, index2->n * 8);
-		if (ti_is_be)
-			for (j = 0; j < index2->n; ++j) bam_swap_endian_8p(&index2->offset[j]);
-	}
-	return idx;
-}
-
-ti_index_t *ti_index_load_local(const char *fnidx)
-{
-	BGZF *fp;
-	fp = bgzf_open(fnidx, "r");
-	if (fp) {
-		ti_index_t *idx = ti_index_load_core(fp);
-		bgzf_close(fp);
-		return idx;
-	} else return 0;
-}
-
-#ifdef _USE_KNETFILE
-static void download_from_remote(const char *url)
-{
-	const int buf_size = 1 * 1024 * 1024;
-	char *fn;
-	FILE *fp;
-	uint8_t *buf;
-	knetFile *fp_remote;
-	int l;
-	if (strstr(url, "ftp://") != url && strstr(url, "http://") != url) return;
-	l = strlen(url);
-	for (fn = (char*)url + l - 1; fn >= url; --fn)
-		if (*fn == '/') break;
-	++fn; // fn now points to the file name
-	fp_remote = knet_open(url, "r");
-	if (fp_remote == 0) {
-		fprintf(pysamerr, "[download_from_remote] fail to open remote file.\n");
-		return;
-	}
-	if ((fp = fopen(fn, "w")) == 0) {
-		fprintf(pysamerr, "[download_from_remote] fail to create file in the working directory.\n");
-		knet_close(fp_remote);
-		return;
-	}
-	buf = (uint8_t*)calloc(buf_size, 1);
-	while ((l = knet_read(fp_remote, buf, buf_size)) != 0)
-		fwrite(buf, 1, l, fp);
-	free(buf);
-	fclose(fp);
-	knet_close(fp_remote);
-}
-#else
-static void download_from_remote(const char *url)
-{
-	return;
-}
-#endif
-
-static char *get_local_version(const char *fn)
-{
-    struct stat sbuf;
-	char *fnidx = (char*)calloc(strlen(fn) + 5, 1);
-	strcat(strcpy(fnidx, fn), ".tbi");
-	if ((strstr(fnidx, "ftp://") == fnidx || strstr(fnidx, "http://") == fnidx)) {
-		char *p, *url;
-		int l = strlen(fnidx);
-		for (p = fnidx + l - 1; p >= fnidx; --p)
-			if (*p == '/') break;
-		url = fnidx; fnidx = strdup(p + 1);
-		if (stat(fnidx, &sbuf) == 0) {
-			free(url);
-			return fnidx;
-		}
-		fprintf(pysamerr, "[%s] downloading the index file...\n", __func__);
-		download_from_remote(url);
-		free(url);
-	}
-    if (stat(fnidx, &sbuf) == 0) return fnidx;
-	free(fnidx); return 0;
-}
-
-const char **ti_seqname(const ti_index_t *idx, int *n)
-{
-	const char **names;
-	khint_t k;
-	*n = idx->n;
-	names = calloc(idx->n, sizeof(void*));
-	for (k = kh_begin(idx->tname); k < kh_end(idx->tname); ++k)
-		if (kh_exist(idx->tname, k))
-			names[kh_val(idx->tname, k)] = kh_key(idx->tname, k);
-	return names;
-}
-
-ti_index_t *ti_index_load(const char *fn)
-{
-	ti_index_t *idx;
-    char *fname = get_local_version(fn);
-	if (fname == 0) return 0;
-	idx = ti_index_load_local(fname);
-	if (idx == 0) fprintf(pysamerr, "[ti_index_load] fail to load the index: %s\n", fname);
-    free(fname);
-	return idx;
-}
-
-int ti_index_build2(const char *fn, const ti_conf_t *conf, const char *_fnidx)
-{
-	char *fnidx;
-	BGZF *fp, *fpidx;
-	ti_index_t *idx;
-	if ((fp = bgzf_open(fn, "r")) == 0) {
-		fprintf(pysamerr, "[ti_index_build2] fail to open the file: %s\n", fn);
-		return -1;
-	}
-	idx = ti_index_core(fp, conf);
-	bgzf_close(fp);
-	if (_fnidx == 0) {
-		fnidx = (char*)calloc(strlen(fn) + 5, 1);
-		strcpy(fnidx, fn); strcat(fnidx, ".tbi");
-	} else fnidx = strdup(_fnidx);
-	fpidx = bgzf_open(fnidx, "w");
-	if (fpidx == 0) {
-		fprintf(pysamerr, "[ti_index_build2] fail to create the index file.\n");
-		free(fnidx);
-		return -1;
-	}
-	ti_index_save(idx, fpidx);
-	ti_index_destroy(idx);
-	bgzf_close(fpidx);
-	free(fnidx);
-	return 0;
-}
-
-int ti_index_build(const char *fn, const ti_conf_t *conf)
-{
-	return ti_index_build2(fn, conf, 0);
-}
-
-/********************************************
- * parse a region in the format chr:beg-end *
- ********************************************/
-
-int ti_get_tid(const ti_index_t *idx, const char *name)
-{
-	khiter_t iter;
-	const khash_t(s) *h = idx->tname;
-	iter = kh_get(s, h, name); /* get the tid */
-	if (iter == kh_end(h)) return -1;
-	return kh_value(h, iter);
-}
-
-int ti_parse_region(const ti_index_t *idx, const char *str, int *tid, int *begin, int *end)
-{
-	char *s, *p;
-	int i, l, k;
-	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;
-	if ((*tid = ti_get_tid(idx, s)) < 0) {
-		free(s);
-		return -1;
-	}
-	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;
-	free(s);
-	if (*begin > *end) return -1;
-	return 0;
-}
-
-/*******************************
- * retrieve a specified region *
- *******************************/
-
-#define MAX_BIN 37450 // =(8^6-1)/7+1
-
-static inline int reg2bins(uint32_t beg, uint32_t end, uint16_t list[MAX_BIN])
-{
-	int i = 0, k;
-	if (beg >= end) return 0;
-	if (end >= 1u<<29) end = 1u<<29;
-	--end;
-	list[i++] = 0;
-	for (k =    1 + (beg>>26); k <=    1 + (end>>26); ++k) list[i++] = k;
-	for (k =    9 + (beg>>23); k <=    9 + (end>>23); ++k) list[i++] = k;
-	for (k =   73 + (beg>>20); k <=   73 + (end>>20); ++k) list[i++] = k;
-	for (k =  585 + (beg>>17); k <=  585 + (end>>17); ++k) list[i++] = k;
-	for (k = 4681 + (beg>>14); k <= 4681 + (end>>14); ++k) list[i++] = k;
-	return i;
-}
-
-ti_iter_t ti_iter_first()
-{
-	ti_iter_t iter;
-	iter = calloc(1, sizeof(struct __ti_iter_t));
-	iter->from_first = 1;
-	return iter;
-}
-
-ti_iter_t ti_iter_query(const ti_index_t *idx, int tid, int beg, int end)
-{
-	uint16_t *bins;
-	int i, n_bins, n_off;
-	pair64_t *off;
-	khint_t k;
-	khash_t(i) *index;
-	uint64_t min_off;
-	ti_iter_t iter = 0;
-
-	if (beg < 0) beg = 0;
-	if (end < beg) return 0;
-	// initialize the iterator
-	iter = calloc(1, sizeof(struct __ti_iter_t));
-	iter->idx = idx; iter->tid = tid; iter->beg = beg; iter->end = end; iter->i = -1;
-	// random access
-	bins = (uint16_t*)calloc(MAX_BIN, 2);
-	n_bins = reg2bins(beg, end, bins);
-	index = idx->index[tid];
-	if (idx->index2[tid].n > 0) {
-		min_off = (beg>>TAD_LIDX_SHIFT >= idx->index2[tid].n)? idx->index2[tid].offset[idx->index2[tid].n-1]
-			: idx->index2[tid].offset[beg>>TAD_LIDX_SHIFT];
-		if (min_off == 0) { // improvement for index files built by tabix prior to 0.1.4
-			int n = beg>>TAD_LIDX_SHIFT;
-			if (n > idx->index2[tid].n) n = idx->index2[tid].n;
-			for (i = n - 1; i >= 0; --i)
-				if (idx->index2[tid].offset[i] != 0) break;
-			if (i >= 0) min_off = idx->index2[tid].offset[i];
-		}
-	} else min_off = 0; // tabix 0.1.2 may produce such index files
-	for (i = n_off = 0; i < n_bins; ++i) {
-		if ((k = kh_get(i, index, bins[i])) != kh_end(index))
-			n_off += kh_value(index, k).n;
-	}
-	if (n_off == 0) {
-		free(bins); return iter;
-	}
-	off = (pair64_t*)calloc(n_off, 16);
-	for (i = n_off = 0; i < n_bins; ++i) {
-		if ((k = kh_get(i, index, bins[i])) != kh_end(index)) {
-			int j;
-			ti_binlist_t *p = &kh_value(index, k);
-			for (j = 0; j < p->n; ++j)
-				if (p->list[j].v > min_off) off[n_off++] = p->list[j];
-		}
-	}
-	if (n_off == 0) {
-		free(bins); free(off); return iter;
-	}
-	free(bins);
-	{
-		int l;
-		ks_introsort(offt, n_off, off);
-		// resolve completely contained adjacent blocks
-		for (i = 1, l = 0; i < n_off; ++i)
-			if (off[l].v < off[i].v)
-				off[++l] = off[i];
-		n_off = l + 1;
-		// resolve overlaps between adjacent blocks; this may happen due to the merge in indexing
-		for (i = 1; i < n_off; ++i)
-			if (off[i-1].v >= off[i].u) off[i-1].v = off[i].u;
-		{ // merge adjacent blocks
-			for (i = 1, l = 0; i < n_off; ++i) {
-				if (off[l].v>>16 == off[i].u>>16) off[l].v = off[i].v;
-				else off[++l] = off[i];
-			}
-			n_off = l + 1;
-		}
-	}
-	iter->n_off = n_off; iter->off = off;
-	return iter;
-}
-
-const char *ti_iter_read(BGZF *fp, ti_iter_t iter, int *len)
-{
-	if (iter->finished) return 0;
-	if (iter->from_first) {
-		int ret;
-		if ((ret = ti_readline(fp, &iter->str)) < 0) {
-			iter->finished = 1;
-			return 0;
-		} else {
-			if (len) *len = iter->str.l;
-			return iter->str.s;
-		}
-	}
-	if (iter->n_off == 0) return 0;
-	while (1) {
-		int ret;
-		if (iter->curr_off == 0 || iter->curr_off >= iter->off[iter->i].v) { // then jump to the next chunk
-			if (iter->i == iter->n_off - 1) break; // no more chunks
-			if (iter->i >= 0) assert(iter->curr_off == iter->off[iter->i].v); // otherwise bug
-			if (iter->i < 0 || iter->off[iter->i].v != iter->off[iter->i+1].u) { // not adjacent chunks; then seek
-				bgzf_seek(fp, iter->off[iter->i+1].u, SEEK_SET);
-				iter->curr_off = bgzf_tell(fp);
-			}
-			++iter->i;
-		}
-		if ((ret = ti_readline(fp, &iter->str)) >= 0) {
-			ti_intv_t intv;
-			iter->curr_off = bgzf_tell(fp);
-			if (iter->str.s[0] == iter->idx->conf.meta_char) continue;
-			get_intv((ti_index_t*)iter->idx, &iter->str, &intv);
-			if (intv.tid != iter->tid || intv.beg >= iter->end) break; // no need to proceed
-			else if (intv.end > iter->beg && iter->end > intv.beg) {
-				if (len) *len = iter->str.l;
-				return iter->str.s;
-			}
-		} else break; // end of file
-	}
-	iter->finished = 1;
-	return 0;
-}
-
-void ti_iter_destroy(ti_iter_t iter)
-{
-	if (iter) {
-		free(iter->str.s); free(iter->off);
-		free(iter);
-	}
-}
-
-int ti_fetch(BGZF *fp, const ti_index_t *idx, int tid, int beg, int end, void *data, ti_fetch_f func)
-{
-	ti_iter_t iter;
-	const char *s;
-	int len;
-	iter = ti_iter_query(idx, tid, beg, end);
-	while ((s = ti_iter_read(fp, iter, &len)) != 0)
-		func(len, s, data);
-	ti_iter_destroy(iter);
-	return 0;
-}
-
-const ti_conf_t *ti_get_conf(ti_index_t *idx) { return idx? &idx->conf : 0; }
-
-/*******************
- * High-level APIs *
- *******************/
-
-tabix_t *ti_open(const char *fn, const char *fnidx)
-{
-	tabix_t *t;
-	BGZF *fp;
-	if ((fp = bgzf_open(fn, "r")) == 0) return 0;
-	t = calloc(1, sizeof(tabix_t));
-	t->fn = strdup(fn);
-	if (fnidx) t->fnidx = strdup(fnidx);
-	t->fp = fp;
-	return t;
-}
-
-void ti_close(tabix_t *t)
-{
-	if (t) {
-		bgzf_close(t->fp);
-		if (t->idx) ti_index_destroy(t->idx);
-		free(t->fn); free(t->fnidx);
-		free(t);
-	}
-}
-
-int ti_lazy_index_load(tabix_t *t)
-{
-	if (t->idx == 0) { // load index
-		if (t->fnidx) t->idx = ti_index_load_local(t->fnidx);
-		else t->idx = ti_index_load(t->fn);
-		if (t->idx == 0) return -1; // fail to load index
-	}
-	return 0;
-}
-
-ti_iter_t ti_queryi(tabix_t *t, int tid, int beg, int end)
-{
-	if (tid < 0) return ti_iter_first();
-	if (ti_lazy_index_load(t) != 0) return 0;
-	return ti_iter_query(t->idx, tid, beg, end);	
-}
-
-ti_iter_t ti_querys(tabix_t *t, const char *reg)
-{
-	int tid, beg, end;
-	if (reg == 0) return ti_iter_first();
-	if (ti_lazy_index_load(t) != 0) return 0;
-	if (ti_parse_region(t->idx, reg, &tid, &beg, &end) < 0) return 0;
-	return ti_iter_query(t->idx, tid, beg, end);
-}
-
-ti_iter_t ti_query(tabix_t *t, const char *name, int beg, int end)
-{
-	int tid;
-	if (name == 0) return ti_iter_first();
-	// then need to load the index
-	if (ti_lazy_index_load(t) != 0) return 0;
-	if ((tid = ti_get_tid(t->idx, name)) < 0) return 0;
-	return ti_iter_query(t->idx, tid, beg, end);
-}
-
-const char *ti_read(tabix_t *t, ti_iter_t iter, int *len)
-{
-	return ti_iter_read(t->fp, iter, len);
-}
diff --git a/tabix/knetfile.c.pysam.c b/tabix/knetfile.c.pysam.c
deleted file mode 100644
index 88d92f5..0000000
--- a/tabix/knetfile.c.pysam.c
+++ /dev/null
@@ -1,634 +0,0 @@
-#include "pysam.h"
-
-/* The MIT License
-
-   Copyright (c) 2008 Genome Research Ltd (GRL).
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   "Software"), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be
-   included in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-   SOFTWARE.
-*/
-
-/* Contact: Heng Li <lh3 at sanger.ac.uk> */
-
-/* Probably I will not do socket programming in the next few years and
-   therefore I decide to heavily annotate this file, for Linux and
-   Windows as well.  -lh3 */
-
-#include <time.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-#ifdef _WIN32
-#include <winsock.h>
-#else
-#include <netdb.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
-#endif
-
-#include "knetfile.h"
-
-/* In winsock.h, the type of a socket is SOCKET, which is: "typedef
- * u_int SOCKET". An invalid SOCKET is: "(SOCKET)(~0)", or signed
- * integer -1. In knetfile.c, I use "int" for socket type
- * throughout. This should be improved to avoid confusion.
- *
- * In Linux/Mac, recv() and read() do almost the same thing. You can see
- * in the header file that netread() is simply an alias of read(). In
- * Windows, however, they are different and using recv() is mandatory.
- */
-
-/* This function tests if the file handler is ready for reading (or
- * writing if is_read==0). */
-static int socket_wait(int fd, int is_read)
-{
-	fd_set fds, *fdr = 0, *fdw = 0;
-	struct timeval tv;
-	int ret;
-	tv.tv_sec = 5; tv.tv_usec = 0; // 5 seconds time out
-	FD_ZERO(&fds);
-	FD_SET(fd, &fds);
-	if (is_read) fdr = &fds;
-	else fdw = &fds;
-	ret = select(fd+1, fdr, fdw, 0, &tv);
-#ifndef _WIN32
-	if (ret == -1) perror("select");
-#else
-	if (ret == 0)
-		fprintf(pysamerr, "select time-out\n");
-	else if (ret == SOCKET_ERROR)
-		fprintf(pysamerr, "select: %d\n", WSAGetLastError());
-#endif
-	return ret;
-}
-
-#ifndef _WIN32
-/* This function does not work with Windows due to the lack of
- * getaddrinfo() in winsock. It is addapted from an example in "Beej's
- * Guide to Network Programming" (http://beej.us/guide/bgnet/). */
-static int socket_connect(const char *host, const char *port)
-{
-#define __err_connect(func) do { perror(func); freeaddrinfo(res); return -1; } while (0)
-
-	int on = 1, fd;
-	struct linger lng = { 0, 0 };
-	struct addrinfo hints, *res;
-	memset(&hints, 0, sizeof(struct addrinfo));
-	hints.ai_family = AF_UNSPEC;
-	hints.ai_socktype = SOCK_STREAM;
-	/* In Unix/Mac, getaddrinfo() is the most convenient way to get
-	 * server information. */
-	if (getaddrinfo(host, port, &hints, &res) != 0) __err_connect("getaddrinfo");
-	if ((fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) __err_connect("socket");
-	/* The following two setsockopt() are used by ftplib
-	 * (http://nbpfaus.net/~pfau/ftplib/). I am not sure if they
-	 * necessary. */
-	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) __err_connect("setsockopt");
-	if (setsockopt(fd, SOL_SOCKET, SO_LINGER, &lng, sizeof(lng)) == -1) __err_connect("setsockopt");
-	if (connect(fd, res->ai_addr, res->ai_addrlen) != 0) __err_connect("connect");
-	freeaddrinfo(res);
-	return fd;
-}
-#else
-/* MinGW's printf has problem with "%lld" */
-char *int64tostr(char *buf, int64_t x)
-{
-	int cnt;
-	int i = 0;
-	do {
-		buf[i++] = '0' + x % 10;
-		x /= 10;
-	} while (x);
-	buf[i] = 0;
-	for (cnt = i, i = 0; i < cnt/2; ++i) {
-		int c = buf[i]; buf[i] = buf[cnt-i-1]; buf[cnt-i-1] = c;
-	}
-	return buf;
-}
-
-int64_t strtoint64(const char *buf)
-{
-	int64_t x;
-	for (x = 0; *buf != '\0'; ++buf)
-		x = x * 10 + ((int64_t) *buf - 48);
-	return x;
-}
-/* In windows, the first thing is to establish the TCP connection. */
-int knet_win32_init()
-{
-	WSADATA wsaData;
-	return WSAStartup(MAKEWORD(2, 2), &wsaData);
-}
-void knet_win32_destroy()
-{
-	WSACleanup();
-}
-/* A slightly modfied version of the following function also works on
- * Mac (and presummably Linux). However, this function is not stable on
- * my Mac. It sometimes works fine but sometimes does not. Therefore for
- * non-Windows OS, I do not use this one. */
-static SOCKET socket_connect(const char *host, const char *port)
-{
-#define __err_connect(func)										\
-	do {														\
-		fprintf(pysamerr, "%s: %d\n", func, WSAGetLastError());	\
-		return -1;												\
-	} while (0)
-
-	int on = 1;
-	SOCKET fd;
-	struct linger lng = { 0, 0 };
-	struct sockaddr_in server;
-	struct hostent *hp = 0;
-	// open socket
-	if ((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) __err_connect("socket");
-	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&on, sizeof(on)) == -1) __err_connect("setsockopt");
-	if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (char*)&lng, sizeof(lng)) == -1) __err_connect("setsockopt");
-	// get host info
-	if (isalpha(host[0])) hp = gethostbyname(host);
-	else {
-		struct in_addr addr;
-		addr.s_addr = inet_addr(host);
-		hp = gethostbyaddr((char*)&addr, 4, AF_INET);
-	}
-	if (hp == 0) __err_connect("gethost");
-	// connect
-	server.sin_addr.s_addr = *((unsigned long*)hp->h_addr);
-	server.sin_family= AF_INET;
-	server.sin_port = htons(atoi(port));
-	if (connect(fd, (struct sockaddr*)&server, sizeof(server)) != 0) __err_connect("connect");
-	// freehostent(hp); // strangely in MSDN, hp is NOT freed (memory leak?!)
-	return fd;
-}
-#endif
-
-static off_t my_netread(int fd, void *buf, off_t len)
-{
-	off_t rest = len, curr, l = 0;
-	/* recv() and read() may not read the required length of data with
-	 * one call. They have to be called repeatedly. */
-	while (rest) {
-		if (socket_wait(fd, 1) <= 0) break; // socket is not ready for reading
-		curr = netread(fd, buf + l, rest);
-		/* According to the glibc manual, section 13.2, a zero returned
-		 * value indicates end-of-file (EOF), which should mean that
-		 * read() will not return zero if EOF has not been met but data
-		 * are not immediately available. */
-		if (curr == 0) break;
-		l += curr; rest -= curr;
-	}
-	return l;
-}
-
-/*************************
- * FTP specific routines *
- *************************/
-
-static int kftp_get_response(knetFile *ftp)
-{
-#ifndef _WIN32
-	unsigned char c;
-#else
-	char c;
-#endif
-	int n = 0;
-	char *p;
-	if (socket_wait(ftp->ctrl_fd, 1) <= 0) return 0;
-	while (netread(ftp->ctrl_fd, &c, 1)) { // FIXME: this is *VERY BAD* for unbuffered I/O
-		//fputc(c, pysamerr);
-		if (n >= ftp->max_response) {
-			ftp->max_response = ftp->max_response? ftp->max_response<<1 : 256;
-			ftp->response = realloc(ftp->response, ftp->max_response);
-		}
-		ftp->response[n++] = c;
-		if (c == '\n') {
-			if (n >= 4 && isdigit(ftp->response[0]) && isdigit(ftp->response[1]) && isdigit(ftp->response[2])
-				&& ftp->response[3] != '-') break;
-			n = 0;
-			continue;
-		}
-	}
-	if (n < 2) return -1;
-	ftp->response[n-2] = 0;
-	return strtol(ftp->response, &p, 0);
-}
-
-static int kftp_send_cmd(knetFile *ftp, const char *cmd, int is_get)
-{
-	if (socket_wait(ftp->ctrl_fd, 0) <= 0) return -1; // socket is not ready for writing
-	netwrite(ftp->ctrl_fd, cmd, strlen(cmd));
-	return is_get? kftp_get_response(ftp) : 0;
-}
-
-static int kftp_pasv_prep(knetFile *ftp)
-{
-	char *p;
-	int v[6];
-	kftp_send_cmd(ftp, "PASV\r\n", 1);
-	for (p = ftp->response; *p && *p != '('; ++p);
-	if (*p != '(') return -1;
-	++p;
-	sscanf(p, "%d,%d,%d,%d,%d,%d", &v[0], &v[1], &v[2], &v[3], &v[4], &v[5]);
-	memcpy(ftp->pasv_ip, v, 4 * sizeof(int));
-	ftp->pasv_port = (v[4]<<8&0xff00) + v[5];
-	return 0;
-}
-
-
-static int kftp_pasv_connect(knetFile *ftp)
-{
-	char host[80], port[10];
-	if (ftp->pasv_port == 0) {
-		fprintf(pysamerr, "[kftp_pasv_connect] kftp_pasv_prep() is not called before hand.\n");
-		return -1;
-	}
-	sprintf(host, "%d.%d.%d.%d", ftp->pasv_ip[0], ftp->pasv_ip[1], ftp->pasv_ip[2], ftp->pasv_ip[3]);
-	sprintf(port, "%d", ftp->pasv_port);
-	ftp->fd = socket_connect(host, port);
-	if (ftp->fd == -1) return -1;
-	return 0;
-}
-
-int kftp_connect(knetFile *ftp)
-{
-	ftp->ctrl_fd = socket_connect(ftp->host, ftp->port);
-	if (ftp->ctrl_fd == -1) return -1;
-	kftp_get_response(ftp);
-	kftp_send_cmd(ftp, "USER anonymous\r\n", 1);
-	kftp_send_cmd(ftp, "PASS kftp@\r\n", 1);
-	kftp_send_cmd(ftp, "TYPE I\r\n", 1);
-	return 0;
-}
-
-int kftp_reconnect(knetFile *ftp)
-{
-	if (ftp->ctrl_fd != -1) {
-		netclose(ftp->ctrl_fd);
-		ftp->ctrl_fd = -1;
-	}
-	netclose(ftp->fd);
-	ftp->fd = -1;
-	return kftp_connect(ftp);
-}
-
-// initialize ->type, ->host, ->retr and ->size
-knetFile *kftp_parse_url(const char *fn, const char *mode)
-{
-	knetFile *fp;
-	char *p;
-	int l;
-	if (strstr(fn, "ftp://") != fn) return 0;
-	for (p = (char*)fn + 6; *p && *p != '/'; ++p);
-	if (*p != '/') return 0;
-	l = p - fn - 6;
-	fp = calloc(1, sizeof(knetFile));
-	fp->type = KNF_TYPE_FTP;
-	fp->fd = -1;
-	/* the Linux/Mac version of socket_connect() also recognizes a port
-	 * like "ftp", but the Windows version does not. */
-	fp->port = strdup("21");
-	fp->host = calloc(l + 1, 1);
-	if (strchr(mode, 'c')) fp->no_reconnect = 1;
-	strncpy(fp->host, fn + 6, l);
-	fp->retr = calloc(strlen(p) + 8, 1);
-	sprintf(fp->retr, "RETR %s\r\n", p);
-    fp->size_cmd = calloc(strlen(p) + 8, 1);
-    sprintf(fp->size_cmd, "SIZE %s\r\n", p);
-	fp->seek_offset = 0;
-	return fp;
-}
-// place ->fd at offset off
-int kftp_connect_file(knetFile *fp)
-{
-	int ret;
-	long long file_size;
-	if (fp->fd != -1) {
-		netclose(fp->fd);
-		if (fp->no_reconnect) kftp_get_response(fp);
-	}
-	kftp_pasv_prep(fp);
-    kftp_send_cmd(fp, fp->size_cmd, 1);
-#ifndef _WIN32
-    if ( sscanf(fp->response,"%*d %lld", &file_size) != 1 )
-    {
-        fprintf(pysamerr,"[kftp_connect_file] %s\n", fp->response);
-        return -1;
-    }
-#else
-	const char *p = fp->response;
-	while (*p != ' ') ++p;
-	while (*p < '0' || *p > '9') ++p;
-	file_size = strtoint64(p);
-#endif
-	fp->file_size = file_size;
-	if (fp->offset>=0) {
-		char tmp[32];
-#ifndef _WIN32
-		sprintf(tmp, "REST %lld\r\n", (long long)fp->offset);
-#else
-		strcpy(tmp, "REST ");
-		int64tostr(tmp + 5, fp->offset);
-		strcat(tmp, "\r\n");
-#endif
-		kftp_send_cmd(fp, tmp, 1);
-	}
-	kftp_send_cmd(fp, fp->retr, 0);
-	kftp_pasv_connect(fp);
-	ret = kftp_get_response(fp);
-	if (ret != 150) {
-		fprintf(pysamerr, "[kftp_connect_file] %s\n", fp->response);
-		netclose(fp->fd);
-		fp->fd = -1;
-		return -1;
-	}
-	fp->is_ready = 1;
-	return 0;
-}
-
-
-/**************************
- * HTTP specific routines *
- **************************/
-
-knetFile *khttp_parse_url(const char *fn, const char *mode)
-{
-	knetFile *fp;
-	char *p, *proxy, *q;
-	int l;
-	if (strstr(fn, "http://") != fn) return 0;
-	// set ->http_host
-	for (p = (char*)fn + 7; *p && *p != '/'; ++p);
-	l = p - fn - 7;
-	fp = calloc(1, sizeof(knetFile));
-	fp->http_host = calloc(l + 1, 1);
-	strncpy(fp->http_host, fn + 7, l);
-	fp->http_host[l] = 0;
-	for (q = fp->http_host; *q && *q != ':'; ++q);
-	if (*q == ':') *q++ = 0;
-	// get http_proxy
-	proxy = getenv("http_proxy");
-	// set ->host, ->port and ->path
-	if (proxy == 0) {
-		fp->host = strdup(fp->http_host); // when there is no proxy, server name is identical to http_host name.
-		fp->port = strdup(*q? q : "80");
-		fp->path = strdup(*p? p : "/");
-	} else {
-		fp->host = (strstr(proxy, "http://") == proxy)? strdup(proxy + 7) : strdup(proxy);
-		for (q = fp->host; *q && *q != ':'; ++q);
-		if (*q == ':') *q++ = 0; 
-		fp->port = strdup(*q? q : "80");
-		fp->path = strdup(fn);
-	}
-	fp->type = KNF_TYPE_HTTP;
-	fp->ctrl_fd = fp->fd = -1;
-	fp->seek_offset = 0;
-	return fp;
-}
-
-int khttp_connect_file(knetFile *fp)
-{
-	int ret, l = 0;
-	char *buf, *p;
-	if (fp->fd != -1) netclose(fp->fd);
-	fp->fd = socket_connect(fp->host, fp->port);
-	buf = calloc(0x10000, 1); // FIXME: I am lazy... But in principle, 64KB should be large enough.
-	l += sprintf(buf + l, "GET %s HTTP/1.0\r\nHost: %s\r\n", fp->path, fp->http_host);
-    l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset);
-	l += sprintf(buf + l, "\r\n");
-	netwrite(fp->fd, buf, l);
-	l = 0;
-	while (netread(fp->fd, buf + l, 1)) { // read HTTP header; FIXME: bad efficiency
-		if (buf[l] == '\n' && l >= 3)
-			if (strncmp(buf + l - 3, "\r\n\r\n", 4) == 0) break;
-		++l;
-	}
-	buf[l] = 0;
-	if (l < 14) { // prematured header
-		netclose(fp->fd);
-		fp->fd = -1;
-		return -1;
-	}
-	ret = strtol(buf + 8, &p, 0); // HTTP return code
-	if (ret == 200 && fp->offset>0) { // 200 (complete result); then skip beginning of the file
-		off_t rest = fp->offset;
-		while (rest) {
-			off_t l = rest < 0x10000? rest : 0x10000;
-			rest -= my_netread(fp->fd, buf, l);
-		}
-	} else if (ret != 206 && ret != 200) {
-		free(buf);
-		fprintf(pysamerr, "[khttp_connect_file] fail to open file (HTTP code: %d).\n", ret);
-		netclose(fp->fd);
-		fp->fd = -1;
-		return -1;
-	}
-	free(buf);
-	fp->is_ready = 1;
-	return 0;
-}
-
-/********************
- * Generic routines *
- ********************/
-
-knetFile *knet_open(const char *fn, const char *mode)
-{
-	knetFile *fp = 0;
-	if (mode[0] != 'r') {
-		fprintf(pysamerr, "[kftp_open] only mode \"r\" is supported.\n");
-		return 0;
-	}
-	if (strstr(fn, "ftp://") == fn) {
-		fp = kftp_parse_url(fn, mode);
-		if (fp == 0) return 0;
-		if (kftp_connect(fp) == -1) {
-			knet_close(fp);
-			return 0;
-		}
-		kftp_connect_file(fp);
-	} else if (strstr(fn, "http://") == fn) {
-		fp = khttp_parse_url(fn, mode);
-		if (fp == 0) return 0;
-		khttp_connect_file(fp);
-	} else { // local file
-#ifdef _WIN32
-		/* In windows, O_BINARY is necessary. In Linux/Mac, O_BINARY may
-		 * be undefined on some systems, although it is defined on my
-		 * Mac and the Linux I have tested on. */
-		int fd = open(fn, O_RDONLY | O_BINARY);
-#else		
-		int fd = open(fn, O_RDONLY);
-#endif
-		if (fd == -1) {
-			perror("open");
-			return 0;
-		}
-		fp = (knetFile*)calloc(1, sizeof(knetFile));
-		fp->type = KNF_TYPE_LOCAL;
-		fp->fd = fd;
-		fp->ctrl_fd = -1;
-	}
-	if (fp && fp->fd == -1) {
-		knet_close(fp);
-		return 0;
-	}
-	return fp;
-}
-
-knetFile *knet_dopen(int fd, const char *mode)
-{
-	knetFile *fp = (knetFile*)calloc(1, sizeof(knetFile));
-	fp->type = KNF_TYPE_LOCAL;
-	fp->fd = fd;
-	return fp;
-}
-
-off_t knet_read(knetFile *fp, void *buf, off_t len)
-{
-	off_t l = 0;
-	if (fp->fd == -1) return 0;
-	if (fp->type == KNF_TYPE_FTP) {
-		if (fp->is_ready == 0) {
-			if (!fp->no_reconnect) kftp_reconnect(fp);
-			kftp_connect_file(fp);
-		}
-	} else if (fp->type == KNF_TYPE_HTTP) {
-		if (fp->is_ready == 0)
-			khttp_connect_file(fp);
-	}
-	if (fp->type == KNF_TYPE_LOCAL) { // on Windows, the following block is necessary; not on UNIX
-		off_t rest = len, curr;
-		while (rest) {
-			curr = read(fp->fd, buf + l, rest);
-			if (curr == 0) break;
-			l += curr; rest -= curr;
-		}
-	} else l = my_netread(fp->fd, buf, len);
-	fp->offset += l;
-	return l;
-}
-
-off_t knet_seek(knetFile *fp, int64_t off, int whence)
-{
-	if (whence == SEEK_SET && off == fp->offset) return 0;
-	if (fp->type == KNF_TYPE_LOCAL) {
-		/* Be aware that lseek() returns the offset after seeking,
-		 * while fseek() returns zero on success. */
-		off_t offset = lseek(fp->fd, off, whence);
-		if (offset == -1) {
-            // Be silent, it is OK for knet_seek to fail when the file is streamed
-            // fprintf(pysamerr,"[knet_seek] %s\n", strerror(errno));
-			return -1;
-		}
-		fp->offset = offset;
-		return 0;
-	}
-    else if (fp->type == KNF_TYPE_FTP) 
-    {
-        if (whence==SEEK_CUR)
-            fp->offset += off;
-        else if (whence==SEEK_SET)
-            fp->offset = off;
-        else if ( whence==SEEK_END)
-            fp->offset = fp->file_size+off;
-		fp->is_ready = 0;
-		return 0;
-	} 
-    else if (fp->type == KNF_TYPE_HTTP) 
-    {
-		if (whence == SEEK_END) { // FIXME: can we allow SEEK_END in future?
-			fprintf(pysamerr, "[knet_seek] SEEK_END is not supported for HTTP. Offset is unchanged.\n");
-			errno = ESPIPE;
-			return -1;
-		}
-        if (whence==SEEK_CUR)
-            fp->offset += off;
-        else if (whence==SEEK_SET)
-            fp->offset = off;
-		fp->is_ready = 0;
-		return fp->offset;
-	}
-	errno = EINVAL;
-    fprintf(pysamerr,"[knet_seek] %s\n", strerror(errno));
-	return -1;
-}
-
-int knet_close(knetFile *fp)
-{
-	if (fp == 0) return 0;
-	if (fp->ctrl_fd != -1) netclose(fp->ctrl_fd); // FTP specific
-	if (fp->fd != -1) {
-		/* On Linux/Mac, netclose() is an alias of close(), but on
-		 * Windows, it is an alias of closesocket(). */
-		if (fp->type == KNF_TYPE_LOCAL) close(fp->fd);
-		else netclose(fp->fd);
-	}
-	free(fp->host); free(fp->port);
-	free(fp->response); free(fp->retr); free(fp->size_cmd); // FTP specific
-	free(fp->path); free(fp->http_host); // HTTP specific
-	free(fp);
-	return 0;
-}
-
-#ifdef KNETFILE_MAIN
-int main(void)
-{
-	char *buf;
-	knetFile *fp;
-	int type = 4, l;
-#ifdef _WIN32
-	knet_win32_init();
-#endif
-	buf = calloc(0x100000, 1);
-	if (type == 0) {
-		fp = knet_open("knetfile.c", "r");
-		knet_seek(fp, 1000, SEEK_SET);
-	} else if (type == 1) { // NCBI FTP, large file
-		fp = knet_open("ftp://ftp.ncbi.nih.gov/1000genomes/ftp/data/NA12878/alignment/NA12878.chrom6.SLX.SRP000032.2009_06.bam", "r");
-		knet_seek(fp, 2500000000ll, SEEK_SET);
-		l = knet_read(fp, buf, 255);
-	} else if (type == 2) {
-		fp = knet_open("ftp://ftp.sanger.ac.uk/pub4/treefam/tmp/index.shtml", "r");
-		knet_seek(fp, 1000, SEEK_SET);
-	} else if (type == 3) {
-		fp = knet_open("http://www.sanger.ac.uk/Users/lh3/index.shtml", "r");
-		knet_seek(fp, 1000, SEEK_SET);
-	} else if (type == 4) {
-		fp = knet_open("http://www.sanger.ac.uk/Users/lh3/ex1.bam", "r");
-		knet_read(fp, buf, 10000);
-		knet_seek(fp, 20000, SEEK_SET);
-		knet_seek(fp, 10000, SEEK_SET);
-		l = knet_read(fp, buf+10000, 10000000) + 10000;
-	}
-	if (type != 4 && type != 1) {
-		knet_read(fp, buf, 255);
-		buf[255] = 0;
-		printf("%s\n", buf);
-	} else write(fileno(stdout), buf, l);
-	knet_close(fp);
-	free(buf);
-	return 0;
-}
-#endif
diff --git a/tabix/kseq.h b/tabix/kseq.h
deleted file mode 100644
index 82face0..0000000
--- a/tabix/kseq.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/* The MIT License
-
-   Copyright (c) 2008 Genome Research Ltd (GRL).
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   "Software"), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be
-   included in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-   SOFTWARE.
-*/
-
-/* Contact: Heng Li <lh3 at sanger.ac.uk> */
-
-/*
-  2009-07-16 (lh3): in kstream_t, change "char*" to "unsigned char*"
- */
-
-/* Last Modified: 12APR2009 */
-
-#ifndef AC_KSEQ_H
-#define AC_KSEQ_H
-
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-
-#define KS_SEP_SPACE 0 // isspace(): \t, \n, \v, \f, \r
-#define KS_SEP_TAB   1 // isspace() && !' '
-#define KS_SEP_MAX   1
-
-#define __KS_TYPE(type_t)						\
-	typedef struct __kstream_t {				\
-		unsigned char *buf;						\
-		int begin, end, is_eof;					\
-		type_t f;								\
-	} kstream_t;
-
-#define ks_eof(ks) ((ks)->is_eof && (ks)->begin >= (ks)->end)
-#define ks_rewind(ks) ((ks)->is_eof = (ks)->begin = (ks)->end = 0)
-
-#define __KS_BASIC(type_t, __bufsize)								\
-	static inline kstream_t *ks_init(type_t f)						\
-	{																\
-		kstream_t *ks = (kstream_t*)calloc(1, sizeof(kstream_t));	\
-		ks->f = f;													\
-		ks->buf = malloc(__bufsize);								\
-		return ks;													\
-	}																\
-	static inline void ks_destroy(kstream_t *ks)					\
-	{																\
-		if (ks) {													\
-			free(ks->buf);											\
-			free(ks);												\
-		}															\
-	}
-
-#define __KS_GETC(__read, __bufsize)						\
-	static inline int ks_getc(kstream_t *ks)				\
-	{														\
-		if (ks->is_eof && ks->begin >= ks->end) return -1;	\
-		if (ks->begin >= ks->end) {							\
-			ks->begin = 0;									\
-			ks->end = __read(ks->f, ks->buf, __bufsize);	\
-			if (ks->end < __bufsize) ks->is_eof = 1;		\
-			if (ks->end == 0) return -1;					\
-		}													\
-		return (int)ks->buf[ks->begin++];					\
-	}
-
-#ifndef KSTRING_T
-#define KSTRING_T kstring_t
-typedef struct __kstring_t {
-	size_t l, m;
-	char *s;
-} kstring_t;
-#endif
-
-#ifndef kroundup32
-#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
-#endif
-
-#define __KS_GETUNTIL(__read, __bufsize)								\
-	static int ks_getuntil(kstream_t *ks, int delimiter, kstring_t *str, int *dret) \
-	{																	\
-		if (dret) *dret = 0;											\
-		str->l = 0;														\
-		if (ks->begin >= ks->end && ks->is_eof) return -1;				\
-		for (;;) {														\
-			int i;														\
-			if (ks->begin >= ks->end) {									\
-				if (!ks->is_eof) {										\
-					ks->begin = 0;										\
-					ks->end = __read(ks->f, ks->buf, __bufsize);		\
-					if (ks->end < __bufsize) ks->is_eof = 1;			\
-					if (ks->end == 0) break;							\
-				} else break;											\
-			}															\
-			if (delimiter > KS_SEP_MAX) {								\
-				for (i = ks->begin; i < ks->end; ++i)					\
-					if (ks->buf[i] == delimiter) break;					\
-			} else if (delimiter == KS_SEP_SPACE) {						\
-				for (i = ks->begin; i < ks->end; ++i)					\
-					if (isspace(ks->buf[i])) break;						\
-			} else if (delimiter == KS_SEP_TAB) {						\
-				for (i = ks->begin; i < ks->end; ++i)					\
-					if (isspace(ks->buf[i]) && ks->buf[i] != ' ') break; \
-			} else i = 0; /* never come to here! */						\
-			if (str->m - str->l < i - ks->begin + 1) {					\
-				str->m = str->l + (i - ks->begin) + 1;					\
-				kroundup32(str->m);										\
-				str->s = (char*)realloc(str->s, str->m);				\
-			}															\
-			memcpy(str->s + str->l, ks->buf + ks->begin, i - ks->begin); \
-			str->l = str->l + (i - ks->begin);							\
-			ks->begin = i + 1;											\
-			if (i < ks->end) {											\
-				if (dret) *dret = ks->buf[i];							\
-				break;													\
-			}															\
-		}																\
-		if (str->l == 0) {												\
-			str->m = 1;													\
-			str->s = (char*)calloc(1, 1);								\
-		}																\
-		str->s[str->l] = '\0';											\
-		return str->l;													\
-	}
-
-#define KSTREAM_INIT(type_t, __read, __bufsize) \
-	__KS_TYPE(type_t)							\
-	__KS_BASIC(type_t, __bufsize)				\
-	__KS_GETC(__read, __bufsize)				\
-	__KS_GETUNTIL(__read, __bufsize)
-
-#define __KSEQ_BASIC(type_t)											\
-	static inline kseq_t *kseq_init(type_t fd)							\
-	{																	\
-		kseq_t *s = (kseq_t*)calloc(1, sizeof(kseq_t));					\
-		s->f = ks_init(fd);												\
-		return s;														\
-	}																	\
-	static inline void kseq_rewind(kseq_t *ks)							\
-	{																	\
-		ks->last_char = 0;												\
-		ks->f->is_eof = ks->f->begin = ks->f->end = 0;					\
-	}																	\
-	static inline void kseq_destroy(kseq_t *ks)							\
-	{																	\
-		if (!ks) return;												\
-		free(ks->name.s); free(ks->comment.s); free(ks->seq.s);	free(ks->qual.s); \
-		ks_destroy(ks->f);												\
-		free(ks);														\
-	}
-
-/* Return value:
-   >=0  length of the sequence (normal)
-   -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;											\
-		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 != '+' && 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;						\
-			}															\
-		}																\
-		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);		\
-		}																\
-		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 */		\
-		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;												\
-	}
-
-#define __KSEQ_TYPE(type_t)						\
-	typedef struct {							\
-		kstring_t name, comment, seq, qual;		\
-		int last_char;							\
-		kstream_t *f;							\
-	} kseq_t;
-
-#define KSEQ_INIT(type_t, __read)				\
-	KSTREAM_INIT(type_t, __read, 4096)			\
-	__KSEQ_TYPE(type_t)							\
-	__KSEQ_BASIC(type_t)						\
-	__KSEQ_READ
-
-#endif
diff --git a/tabix/kstring.c b/tabix/kstring.c
deleted file mode 100644
index e0203fa..0000000
--- a/tabix/kstring.c
+++ /dev/null
@@ -1,165 +0,0 @@
-#include <stdarg.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdint.h>
-#include "kstring.h"
-
-int ksprintf(kstring_t *s, const char *fmt, ...)
-{
-	va_list ap;
-	int l;
-	va_start(ap, fmt);
-	l = vsnprintf(s->s + s->l, s->m - s->l, fmt, ap); // This line does not work with glibc 2.0. See `man snprintf'.
-	va_end(ap);
-	if (l + 1 > s->m - s->l) {
-		s->m = s->l + l + 2;
-		kroundup32(s->m);
-		s->s = (char*)realloc(s->s, s->m);
-		va_start(ap, fmt);
-		l = vsnprintf(s->s + s->l, s->m - s->l, fmt, ap);
-	}
-	va_end(ap);
-	s->l += l;
-	return l;
-}
-
-// s MUST BE a null terminated string; l = strlen(s)
-int ksplit_core(char *s, int delimiter, int *_max, int **_offsets)
-{
-	int i, n, max, last_char, last_start, *offsets, l;
-	n = 0; max = *_max; offsets = *_offsets;
-	l = strlen(s);
-	
-#define __ksplit_aux do {												\
-		if (_offsets) {													\
-			s[i] = 0;													\
-			if (n == max) {												\
-				max = max? max<<1 : 2;									\
-				offsets = (int*)realloc(offsets, sizeof(int) * max);	\
-			}															\
-			offsets[n++] = last_start;									\
-		} else ++n;														\
-	} while (0)
-
-	for (i = 0, last_char = last_start = 0; i <= l; ++i) {
-		if (delimiter == 0) {
-			if (isspace(s[i]) || s[i] == 0) {
-				if (isgraph(last_char)) __ksplit_aux; // the end of a field
-			} else {
-				if (isspace(last_char) || last_char == 0) last_start = i;
-			}
-		} else {
-			if (s[i] == delimiter || s[i] == 0) {
-				if (last_char != 0 && last_char != delimiter) __ksplit_aux; // the end of a field
-			} else {
-				if (last_char == delimiter || last_char == 0) last_start = i;
-			}
-		}
-		last_char = s[i];
-	}
-	*_max = max; *_offsets = offsets;
-	return n;
-}
-
-/**********************
- * Boyer-Moore search *
- **********************/
-
-// reference: http://www-igm.univ-mlv.fr/~lecroq/string/node14.html
-int *ksBM_prep(const uint8_t *pat, int m)
-{
-	int i, *suff, *prep, *bmGs, *bmBc;
-	prep = calloc(m + 256, 1);
-	bmGs = prep; bmBc = prep + m;
-	{ // preBmBc()
-		for (i = 0; i < 256; ++i) bmBc[i] = m;
-		for (i = 0; i < m - 1; ++i) bmBc[pat[i]] = m - i - 1;
-	}
-	suff = calloc(m, sizeof(int));
-	{ // suffixes()
-		int f = 0, g;
-		suff[m - 1] = m;
-		g = m - 1;
-		for (i = m - 2; i >= 0; --i) {
-			if (i > g && suff[i + m - 1 - f] < i - g)
-				suff[i] = suff[i + m - 1 - f];
-			else {
-				if (i < g) g = i;
-				f = i;
-				while (g >= 0 && pat[g] == pat[g + m - 1 - f]) --g;
-				suff[i] = f - g;
-			}
-		}
-	}
-	{ // preBmGs()
-		int j = 0;
-		for (i = 0; i < m; ++i) bmGs[i] = m;
-		for (i = m - 1; i >= 0; --i)
-			if (suff[i] == i + 1)
-				for (; j < m - 1 - i; ++j)
-					if (bmGs[j] == m)
-						bmGs[j] = m - 1 - i;
-		for (i = 0; i <= m - 2; ++i)
-			bmGs[m - 1 - suff[i]] = m - 1 - i;
-	}
-	free(suff);
-	return prep;
-}
-
-int *ksBM_search(const uint8_t *str, int n, const uint8_t *pat, int m, int *_prep, int *n_matches)
-{
-	int i, j, *prep, *bmGs, *bmBc;
-	int *matches = 0, mm = 0, nm = 0;
-	prep = _prep? _prep : ksBM_prep(pat, m);
-	bmGs = prep; bmBc = prep + m;
-	j = 0;
-	while (j <= n - m) {
-		for (i = m - 1; i >= 0 && pat[i] == str[i+j]; --i);
-		if (i < 0) {
-			if (nm == mm) {
-				mm = mm? mm<<1 : 1;
-				matches = realloc(matches, mm * sizeof(int));
-			}
-			matches[nm++] = j;
-			j += bmGs[0];
-		} else {
-			int max = bmBc[str[i+j]] - m + 1 + i;
-			if (max < bmGs[i]) max = bmGs[i];
-			j += max;
-		}
-	}
-	*n_matches = nm;
-	if (_prep == 0) free(prep);
-	return matches;
-}
-
-#ifdef KSTRING_MAIN
-#include <stdio.h>
-int main()
-{
-	kstring_t *s;
-	int *fields, n, i;
-	s = (kstring_t*)calloc(1, sizeof(kstring_t));
-	// test ksprintf()
-	ksprintf(s, " abcdefg:    %d ", 100);
-	printf("'%s'\n", s->s);
-	// test ksplit()
-	fields = ksplit(s, 0, &n);
-	for (i = 0; i < n; ++i)
-		printf("field[%d] = '%s'\n", i, s->s + fields[i]);
-	free(s);
-
-	{
-		static char *str = "abcdefgcdg";
-		static char *pat = "cd";
-		int n, *matches;
-		matches = ksBM_search(str, strlen(str), pat, strlen(pat), 0, &n);
-		printf("%d: \n", n);
-		for (i = 0; i < n; ++i)
-			printf("- %d\n", matches[i]);
-		free(matches);
-	}
-	return 0;
-}
-#endif
diff --git a/tabix/kstring.c.pysam.c b/tabix/kstring.c.pysam.c
deleted file mode 100644
index 3114a23..0000000
--- a/tabix/kstring.c.pysam.c
+++ /dev/null
@@ -1,167 +0,0 @@
-#include "pysam.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdint.h>
-#include "kstring.h"
-
-int ksprintf(kstring_t *s, const char *fmt, ...)
-{
-	va_list ap;
-	int l;
-	va_start(ap, fmt);
-	l = vsnprintf(s->s + s->l, s->m - s->l, fmt, ap); // This line does not work with glibc 2.0. See `man snprintf'.
-	va_end(ap);
-	if (l + 1 > s->m - s->l) {
-		s->m = s->l + l + 2;
-		kroundup32(s->m);
-		s->s = (char*)realloc(s->s, s->m);
-		va_start(ap, fmt);
-		l = vsnprintf(s->s + s->l, s->m - s->l, fmt, ap);
-	}
-	va_end(ap);
-	s->l += l;
-	return l;
-}
-
-// s MUST BE a null terminated string; l = strlen(s)
-int ksplit_core(char *s, int delimiter, int *_max, int **_offsets)
-{
-	int i, n, max, last_char, last_start, *offsets, l;
-	n = 0; max = *_max; offsets = *_offsets;
-	l = strlen(s);
-	
-#define __ksplit_aux do {												\
-		if (_offsets) {													\
-			s[i] = 0;													\
-			if (n == max) {												\
-				max = max? max<<1 : 2;									\
-				offsets = (int*)realloc(offsets, sizeof(int) * max);	\
-			}															\
-			offsets[n++] = last_start;									\
-		} else ++n;														\
-	} while (0)
-
-	for (i = 0, last_char = last_start = 0; i <= l; ++i) {
-		if (delimiter == 0) {
-			if (isspace(s[i]) || s[i] == 0) {
-				if (isgraph(last_char)) __ksplit_aux; // the end of a field
-			} else {
-				if (isspace(last_char) || last_char == 0) last_start = i;
-			}
-		} else {
-			if (s[i] == delimiter || s[i] == 0) {
-				if (last_char != 0 && last_char != delimiter) __ksplit_aux; // the end of a field
-			} else {
-				if (last_char == delimiter || last_char == 0) last_start = i;
-			}
-		}
-		last_char = s[i];
-	}
-	*_max = max; *_offsets = offsets;
-	return n;
-}
-
-/**********************
- * Boyer-Moore search *
- **********************/
-
-// reference: http://www-igm.univ-mlv.fr/~lecroq/string/node14.html
-int *ksBM_prep(const uint8_t *pat, int m)
-{
-	int i, *suff, *prep, *bmGs, *bmBc;
-	prep = calloc(m + 256, 1);
-	bmGs = prep; bmBc = prep + m;
-	{ // preBmBc()
-		for (i = 0; i < 256; ++i) bmBc[i] = m;
-		for (i = 0; i < m - 1; ++i) bmBc[pat[i]] = m - i - 1;
-	}
-	suff = calloc(m, sizeof(int));
-	{ // suffixes()
-		int f = 0, g;
-		suff[m - 1] = m;
-		g = m - 1;
-		for (i = m - 2; i >= 0; --i) {
-			if (i > g && suff[i + m - 1 - f] < i - g)
-				suff[i] = suff[i + m - 1 - f];
-			else {
-				if (i < g) g = i;
-				f = i;
-				while (g >= 0 && pat[g] == pat[g + m - 1 - f]) --g;
-				suff[i] = f - g;
-			}
-		}
-	}
-	{ // preBmGs()
-		int j = 0;
-		for (i = 0; i < m; ++i) bmGs[i] = m;
-		for (i = m - 1; i >= 0; --i)
-			if (suff[i] == i + 1)
-				for (; j < m - 1 - i; ++j)
-					if (bmGs[j] == m)
-						bmGs[j] = m - 1 - i;
-		for (i = 0; i <= m - 2; ++i)
-			bmGs[m - 1 - suff[i]] = m - 1 - i;
-	}
-	free(suff);
-	return prep;
-}
-
-int *ksBM_search(const uint8_t *str, int n, const uint8_t *pat, int m, int *_prep, int *n_matches)
-{
-	int i, j, *prep, *bmGs, *bmBc;
-	int *matches = 0, mm = 0, nm = 0;
-	prep = _prep? _prep : ksBM_prep(pat, m);
-	bmGs = prep; bmBc = prep + m;
-	j = 0;
-	while (j <= n - m) {
-		for (i = m - 1; i >= 0 && pat[i] == str[i+j]; --i);
-		if (i < 0) {
-			if (nm == mm) {
-				mm = mm? mm<<1 : 1;
-				matches = realloc(matches, mm * sizeof(int));
-			}
-			matches[nm++] = j;
-			j += bmGs[0];
-		} else {
-			int max = bmBc[str[i+j]] - m + 1 + i;
-			if (max < bmGs[i]) max = bmGs[i];
-			j += max;
-		}
-	}
-	*n_matches = nm;
-	if (_prep == 0) free(prep);
-	return matches;
-}
-
-#ifdef KSTRING_MAIN
-#include <stdio.h>
-int main()
-{
-	kstring_t *s;
-	int *fields, n, i;
-	s = (kstring_t*)calloc(1, sizeof(kstring_t));
-	// test ksprintf()
-	ksprintf(s, " abcdefg:    %d ", 100);
-	printf("'%s'\n", s->s);
-	// test ksplit()
-	fields = ksplit(s, 0, &n);
-	for (i = 0; i < n; ++i)
-		printf("field[%d] = '%s'\n", i, s->s + fields[i]);
-	free(s);
-
-	{
-		static char *str = "abcdefgcdg";
-		static char *pat = "cd";
-		int n, *matches;
-		matches = ksBM_search(str, strlen(str), pat, strlen(pat), 0, &n);
-		printf("%d: \n", n);
-		for (i = 0; i < n; ++i)
-			printf("- %d\n", matches[i]);
-		free(matches);
-	}
-	return 0;
-}
-#endif
diff --git a/tabix/kstring.h b/tabix/kstring.h
deleted file mode 100644
index f4e5a99..0000000
--- a/tabix/kstring.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef KSTRING_H
-#define KSTRING_H
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdint.h>
-
-#ifndef kroundup32
-#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
-#endif
-
-#ifndef KSTRING_T
-#define KSTRING_T kstring_t
-typedef struct __kstring_t {
-	size_t l, m;
-	char *s;
-} kstring_t;
-#endif
-
-int ksprintf(kstring_t *s, const char *fmt, ...);
-int ksplit_core(char *s, int delimiter, int *_max, int **_offsets);
-
-// calculate the auxiliary array, allocated by calloc()
-int *ksBM_prep(const uint8_t *pat, int m);
-
-/* Search pat in str and returned the list of matches. The size of the
- * list is returned as n_matches. _prep is the array returned by
- * ksBM_prep(). If it is a NULL pointer, ksBM_prep() will be called. */
-int *ksBM_search(const uint8_t *str, int n, const uint8_t *pat, int m, int *_prep, int *n_matches);
-
-static inline int kputsn(const char *p, int l, kstring_t *s)
-{
-	if (s->l + l + 1 >= s->m) {
-		s->m = s->l + l + 2;
-		kroundup32(s->m);
-		s->s = (char*)realloc(s->s, s->m);
-	}
-	strncpy(s->s + s->l, p, l);
-	s->l += l;
-	s->s[s->l] = 0;
-	return l;
-}
-
-static inline int kputs(const char *p, kstring_t *s)
-{
-	return kputsn(p, strlen(p), s);
-}
-
-static inline int kputc(int c, kstring_t *s)
-{
-	if (s->l + 1 >= s->m) {
-		s->m = s->l + 2;
-		kroundup32(s->m);
-		s->s = (char*)realloc(s->s, s->m);
-	}
-	s->s[s->l++] = c;
-	s->s[s->l] = 0;
-	return c;
-}
-
-static inline int *ksplit(kstring_t *s, int delimiter, int *n)
-{
-	int max = 0, *offsets = 0;
-	*n = ksplit_core(s->s, delimiter, &max, &offsets);
-	return offsets;
-}
-
-#endif
diff --git a/tabix/pysam.h b/tabix/pysam.h
deleted file mode 100644
index 008cbbd..0000000
--- a/tabix/pysam.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef PYSAM_H
-#define PYSAM_H
-#include "stdio.h"
-extern FILE * pysamerr;
-#endif
diff --git a/tabix/tabix.h b/tabix/tabix.h
deleted file mode 100644
index 7b4497a..0000000
--- a/tabix/tabix.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* The MIT License
-
-   Copyright (c) 2009 Genome Research Ltd (GRL), 2010 Broad Institute
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   "Software"), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be
-   included in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-   SOFTWARE.
-*/
-
-/* Contact: Heng Li <lh3 at live.co.uk> */
-
-#ifndef __TABIDX_H
-#define __TABIDX_H
-
-#include <stdint.h>
-#include "kstring.h"
-#include "bgzf.h"
-
-#define TI_PRESET_GENERIC 0
-#define TI_PRESET_SAM     1
-#define TI_PRESET_VCF     2
-
-#define TI_FLAG_UCSC      0x10000
-
-typedef int (*ti_fetch_f)(int l, const char *s, void *data);
-
-struct __ti_index_t;
-typedef struct __ti_index_t ti_index_t;
-
-struct __ti_iter_t;
-typedef struct __ti_iter_t *ti_iter_t;
-
-typedef struct {
-	BGZF *fp;
-	ti_index_t *idx;
-	char *fn, *fnidx;
-} tabix_t;
-
-typedef struct {
-	int32_t preset;
-	int32_t sc, bc, ec; // seq col., beg col. and end col.
-	int32_t meta_char, line_skip;
-} ti_conf_t;
-
-typedef struct {
-	int beg, end;
-	char *ss, *se;
-} ti_interval_t;
-
-extern ti_conf_t ti_conf_gff, ti_conf_bed, ti_conf_psltbl, ti_conf_vcf, ti_conf_sam; // preset
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-	/*******************
-	 * High-level APIs *
-	 *******************/
-
-	tabix_t *ti_open(const char *fn, const char *fnidx);
-	int ti_lazy_index_load(tabix_t *t);
-	void ti_close(tabix_t *t);
-	ti_iter_t ti_query(tabix_t *t, const char *name, int beg, int end);
-	ti_iter_t ti_queryi(tabix_t *t, int tid, int beg, int end);
-	ti_iter_t ti_querys(tabix_t *t, const char *reg);
-	const char *ti_read(tabix_t *t, ti_iter_t iter, int *len);
-
-	/* Destroy the iterator */
-	void ti_iter_destroy(ti_iter_t iter);
-
-	/* Get the list of sequence names. Each "char*" pointer points to a
-	 * internal member of the index, so DO NOT modify the returned
-	 * pointer; otherwise the index will be corrupted. The returned
-	 * pointer should be freed by a single free() call by the routine
-	 * calling this function. The number of sequences is returned at *n. */
-	const char **ti_seqname(const ti_index_t *idx, int *n);
-
-	/******************
-	 * Low-level APIs *
-	 ******************/
-
-	/* Build the index for file <fn>. File <fn>.tbi will be generated
-	 * and overwrite the file of the same name. Return -1 on failure. */
-	int ti_index_build(const char *fn, const ti_conf_t *conf);
-
-	/* Load the index from file <fn>.tbi. If <fn> is a URL and the index
-	 * file is not in the working directory, <fn>.tbi will be
-	 * downloaded. Return NULL on failure. */
-	ti_index_t *ti_index_load(const char *fn);
-
-	ti_index_t *ti_index_load_local(const char *fnidx);
-
-	/* Destroy the index */
-	void ti_index_destroy(ti_index_t *idx);
-
-	/* Parse a region like: chr2, chr2:100, chr2:100-200. Return -1 on failure. */
-	int ti_parse_region(const ti_index_t *idx, const char *str, int *tid, int *begin, int *end);
-
-	int ti_get_tid(const ti_index_t *idx, const char *name);
-
-	/* Get the iterator pointing to the first record at the current file
-	 * position. If the file is just openned, the iterator points to the
-	 * first record in the file. */
-	ti_iter_t ti_iter_first(void);
-
-	/* Get the iterator pointing to the first record in region tid:beg-end */
-	ti_iter_t ti_iter_query(const ti_index_t *idx, int tid, int beg, int end);
-
-	/* Get the data line pointed by the iterator and iterate to the next record. */
-	const char *ti_iter_read(BGZF *fp, ti_iter_t iter, int *len);
-
-	const ti_conf_t *ti_get_conf(ti_index_t *idx);
-	int ti_get_intv(const ti_conf_t *conf, int len, char *line, ti_interval_t *intv);
-
-	/*******************
-	 * Deprecated APIs *
-	 *******************/
-
-	/* The callback version for random access */
-	int ti_fetch(BGZF *fp, const ti_index_t *idx, int tid, int beg, int end, void *data, ti_fetch_f func);
-
-	/* Read one line. */
-	int ti_readline(BGZF *fp, kstring_t *str);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/tests/Makefile b/tests/Makefile
deleted file mode 100644
index e985e61..0000000
--- a/tests/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-all: ex1.pileup.gz ex1.bam.bai \
-	ex2.sam.gz ex2.sam ex1.sam \
-	ex2.bam \
-	ex3.bam ex3.bam.bai \
-	ex4.bam ex4.bam.bai \
-	ex5.bam ex5.bam.bai \
-	ex6.bam \
-	ex8.bam ex8.bam.bai \
-	ex9_nofail.bam.bai \
-	ex9_fail.bam.bai \
-        ex10.bam ex10.bam.bai \
-	example_unmapped_reads_no_sq.bam \
-	example_user_header.bam \
-	example_btag.bam \
-	example_bai.bam \
-	softclip.bam
-
-ex2.sam.gz: ex1.bam ex1.bam.bai
-		samtools view -h ex1.bam | gzip > ex2.sam.gz
-
-%.bam: %.sam ex1.fa.fai
-	samtools import ex1.fa.fai $< $@
-
-%.sam: %.sam.gz
-	gunzip < $< > $@
-
-ex1.fa.fai:ex1.fa
-		samtools faidx ex1.fa
-ex1.bam:ex1.sam.gz ex1.fa.fai
-		samtools import ex1.fa.fai ex1.sam.gz ex1.bam
-%.bam.bai:%.bam
-		samtools index $<
-ex1.pileup.gz:ex1.bam ex1.fa
-		samtools pileup -cf ex1.fa ex1.bam | gzip > ex1.pileup.gz
-
-example_unmapped_reads_no_sq.bam: example_unmapped_reads_no_sq.sam
-	touch tmp.list
-	samtools import tmp.list $< $@
-	rm -f tmp.list
-
-example_bai.bam: ex1.bam
-	cp ex1.bam $@
-	samtools index $@
-	mv $@.bai example_bai.bai
-
-softclip.bam: softclip.sam
-	samtools view -bS $< > $@
-
-clean:
-	rm -fr *.bam *.bai *.fai *.pileup* \
-		*~ calDepth *.dSYM pysam_*.sam \
-	ex2.sam ex2.sam.gz ex1.sam
diff --git a/tests/ex1.fa b/tests/ex1.fa
deleted file mode 100644
index b4ed0cf..0000000
--- a/tests/ex1.fa
+++ /dev/null
@@ -1,56 +0,0 @@
->chr1
-CACTAGTGGCTCATTGTAAATGTGTGGTTTAACTCGTCCATGGCCCAGCATTAGGGAGCT
-GTGGACCCTGCAGCCTGGCTGTGGGGGCCGCAGTGGCTGAGGGGTGCAGAGCCGAGTCAC
-GGGGTTGCCAGCACAGGGGCTTAACCTCTGGTGACTGCCAGAGCTGCTGGCAAGCTAGAG
-TCCCATTTGGAGCCCCTCTAAGCCGTTCTATTTGTAATGAAAACTATATTTATGCTATTC
-AGTTCTAAATATAGAAATTGAAACAGCTGTGTTTAGTGCCTTTGTTCAACCCCCTTGCAA
-CAACCTTGAGAACCCCAGGGAATTTGTCAATGTCAGGGAAGGAGCATTTTGTCAGTTACC
-AAATGTGTTTATTACCAGAGGGATGGAGGGAAGAGGGACGCTGAAGAACTTTGATGCCCT
-CTTCTTCCAAAGATGAAACGCGTAACTGCGCTCTCATTCACTCCAGCTCCCTGTCACCCA
-ATGGACCTGTGATATCTGGATTCTGGGAAATTCTTCATCCTGGACCCTGAGAGATTCTGC
-AGCCCAGCTCCAGATTGCTTGTGGTCTGACAGGCTGCAACTGTGAGCCATCACAATGAAC
-AACAGGAAGAAAAGGTCTTTCAAAAGGTGATGTGTGTTCTCATCAACCTCATACACACAC
-ATGGTTTAGGGGTATAATACCTCTACATGGCTGATTATGAAAACAATGTTCCCCAGATAC
-CATCCCTGTCTTACTTCCAGCTCCCCAGAGGGAAAGCTTTCAACGCTTCTAGCCATTTCT
-TTTGGCATTTGCCTTCAGACCCTACACGAATGCGTCTCTACCACAGGGGGCTGCGCGGTT
-TCCCATCATGAAGCACTGAACTTCCACGTCTCATCTAGGGGAACAGGGAGGTGCACTAAT
-GCGCTCCACGCCCAAGCCCTTCTCACAGTTTCTGCCCCCAGCATGGTTGTACTGGGCAAT
-ACATGAGATTATTAGGAAATGCTTTACTGTCATAACTATGAAGAGACTATTGCCAGATGA
-ACCACACATTAATACTATGTTTCTTATCTGCACATTACTACCCTGCAATTAATATAATTG
-TGTCCATGTACACACGCTGTCCTATGTACTTATCATGACTCTATCCCAAATTCCCAATTA
-CGTCCTATCTTCTTCTTAGGGAAGAACAGCTTAGGTATCAATTTGGTGTTCTGTGTAAAG
-TCTCAGGGAGCCGTCCGTGTCCTCCCATCTGGCCTCGTCCACACTGGTTCTCTTGAAAGC
-TTGGGCTGTAATGATGCCCCTTGGCCATCACCCAGTCCCTGCCCCATCTCTTGTAATCTC
-TCTCCTTTTTGCTGCATCCCTGTCTTCCTCTGTCTTGATTTACTTGTTGTTGGTTTTCTG
-TTTCTTTGTTTGATTTGGTGGAAGACATAATCCCACGCTTCCTATGGAAAGGTTGTTGGG
-AGATTTTTAATGATTCCTCAATGTTAAAATGTCTATTTTTGTCTTGACACCCAACTAATA
-TTTGTCTGAGCAAAACAGTCTAGATGAGAGAGAACTTCCCTGGAGGTCTGATGGCGTTTC
-TCCCTCGTCTTCTTA
->chr2
-TTCAAATGAACTTCTGTAATTGAAAAATTCATTTAAGAAATTACAAAATATAGTTGAAAG
-CTCTAACAATAGACTAAACCAAGCAGAAGAAAGAGGTTCAGAACTTGAAGACAAGTCTCT
-TATGAATTAACCCAGTCAGACAAAAATAAAGAAAAAAATTTTAAAAATGAACAGAGCTTT
-CAAGAAGTATGAGATTATGTAAAGTAACTGAACCTATGAGTCACAGGTATTCCTGAGGAA
-AAAGAAAAAGTGAGAAGTTTGGAAAAACTATTTGAGGAAGTAATTGGGGAAAACCTCTTT
-AGTCTTGCTAGAGATTTAGACATCTAAATGAAAGAGGCTCAAAGAATGCCAGGAAGATAC
-ATTGCAAGACAGACTTCATCAAGATATGTAGTCATCAGACTATCTAAAGTCAACATGAAG
-GAAAAAAATTCTAAAATCAGCAAGAGAAAAGCATACAGTCATCTATAAAGGAAATCCCAT
-CAGAATAACAATGGGCTTCTCAGCAGAAACCTTACAAGCCAGAAGAGATTGGATCTAATT
-TTTGGACTTCTTAAAGAAAAAAAAACCTGTCAAACACGAATGTTATGCCCTGCTAAACTA
-AGCATCATAAATGAAGGGGAAATAAAGTCAAGTCTTTCCTGACAAGCAAATGCTAAGATA
-ATTCATCATCACTAAACCAGTCCTATAAGAAATGCTCAAAAGAATTGTAAAAGTCAAAAT
-TAAAGTTCAATACTCACCATCATAAATACACACAAAAGTACAAAACTCACAGGTTTTATA
-AAACAATTGAGACTACAGAGCAACTAGGTAAAAAATTAACATTACAACAGGAACAAAACC
-TCATATATCAATATTAACTTTGAATAAAAAGGGATTAAATTCCCCCACTTAAGAGATATA
-GATTGGCAGAACAGATTTAAAAACATGAACTAACTATATGCTGTTTACAAGAAACTCATT
-AATAAAGACATGAGTTCAGGTAAAGGGGTGGAAAAAGATGTTCTACGCAAACAGAAACCA
-AATGAGAGAAGGAGTAGCTATACTTATATCAGATAAAGCACACTTTAAATCAACAACAGT
-AAAATAAAACAAAGGAGGTCATCATACAATGATAAAAAGATCAATTCAGCAAGAAGATAT
-AACCATCCTACTAAATACATATGCACCTAACACAAGACTACCCAGATTCATAAAACAAAT
-ACTACTAGACCTAAGAGGGATGAGAAATTACCTAATTGGTACAATGTACAATATTCTGAT
-GATGGTTACACTAAAAGCCCATACTTTACTGCTACTCAATATATCCATGTAACAAATCTG
-CGCTTGTACTTCTAAATCTATAAAAAAATTAAAATTTAACAAAAGTAAATAAAACACATA
-GCTAAAACTAAAAAAGCAAAAACAAAAACTATGCTAAGTATTGGTAAAGATGTGGGGAAA
-AAAGTAAACTCTCAAATATTGCTAGTGGGAGTATAAATTGTTTTCCACTTTGGAAAACAA
-TTTGGTAATTTCGTTTTTTTTTTTTTCTTTTCTCTTTTTTTTTTTTTTTTTTTTGCATGC
-CAGAAAAAAATATTTACAGTAACT
diff --git a/tests/ex1.sam.gz b/tests/ex1.sam.gz
deleted file mode 100644
index 8dd2bc4..0000000
Binary files a/tests/ex1.sam.gz and /dev/null differ
diff --git a/tests/ex10.sam b/tests/ex10.sam
deleted file mode 100644
index 45f08c5..0000000
--- a/tests/ex10.sam
+++ /dev/null
@@ -1,19 +0,0 @@
- at HD	VN:1.0
- at SQ	SN:1	LN:249250621
-read1	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:i:65536	ZL:i:25
-read2	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:i:214748	ZL:i:25
-read3	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:i:2147484	ZL:i:25
-read4	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:i:2147483647	ZL:i:25
-read5	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:i:-65536	ZL:i:25
-read6	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:i:-214748	ZL:i:25
-read7	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:i:-2147484	ZL:i:25
-read8	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:i:-2147483647	ZL:i:25
-read1	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:f:65536	ZL:i:25
-read2	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:f:214748	ZL:i:25
-read3	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:f:2147484	ZL:i:25
-read5	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:f:-65536	ZL:i:25
-read6	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:f:-214748	ZL:i:25
-read7	115	1	142618765	255	25M	=	142618765	25	CGACCCACTCCGCCATTTTCATCCG	IIGIIIHIGIIFIIIIIIIGIGIII	NM:i:0	ZP:f:-2147484	ZL:i:25
-
-
-
diff --git a/tests/ex3.sam b/tests/ex3.sam
deleted file mode 100644
index 495d4fe..0000000
--- a/tests/ex3.sam
+++ /dev/null
@@ -1,13 +0,0 @@
- at HD	VN:1.0
- at SQ	SN:chr1	LN:1575
- at SQ	SN:chr2	LN:1584
- at RG	ID:L1	PU:SC_1_10	LB:SC_1	SM:NA12891	CN:name:with:colon
- at RG	ID:L2	PU:SC_2_12	LB:SC_2	SM:NA12891	CN:name:with:colon
- at PG	ID:P1	VN:1.0
- at PG	ID:P2	VN:1.1
- at CO	this is a comment
- at CO	this is another comment
-read_28833_29006_6945	99	chr1	33	20	10M1D25M	=	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<	NM:i:1	RG:Z:L1	PG:Z:P1	XT:A:U
-read_28701_28881_323b	147	chr2	88	30	35M	=	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<	MF:i:18	RG:Z:L2	PG:Z:P2	XT:A:R
-read_28701_28881_323c	147	chr2	88	30	35M	=	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<
-test_clipped1	99	chr2	997	20	4S6M1D20M5S	=	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<	NM:i:1	RG:Z:L1	PG:Z:P1	XT:A:U
diff --git a/tests/ex4.sam b/tests/ex4.sam
deleted file mode 100644
index b2282b8..0000000
--- a/tests/ex4.sam
+++ /dev/null
@@ -1,9 +0,0 @@
- at HD	VN:1.0
- at SQ	SN:chr1	LN:100
- at SQ	SN:chr2	LN:100
- at RG	ID:L1	PU:SC_1_10	LB:SC_1	SM:NA12891
- at RG	ID:L2	PU:SC_2_12	LB:SC_2	SM:NA12891
- at CO	this is a comment
- at CO	this is another comment
-read_28833_29006_6945	99	chr1	21	20	10M1D25M	=	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<	NM:i:1	RG:Z:L1
-read_28701_28881_323b	147	chr2	21	30	35M	=	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<	MF:i:18	RG:Z:L2
diff --git a/tests/ex5.sam b/tests/ex5.sam
deleted file mode 100644
index f1f8aad..0000000
--- a/tests/ex5.sam
+++ /dev/null
@@ -1,5 +0,0 @@
- at HD	VN:1.0
- at SQ	SN:chr1	LN:100
- at SQ	SN:chr2	LN:100
-read_28833_29006_6945	0	*	*	*	*	*	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<
-read_28701_28881_323b	0	*	*	*	*	*	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<
diff --git a/tests/ex6.sam b/tests/ex6.sam
deleted file mode 100644
index 7ae90f3..0000000
--- a/tests/ex6.sam
+++ /dev/null
@@ -1,5 +0,0 @@
- at HD	VN:1.0
- at SQ	SN:chr1	LN:1575
- at SQ	SN:chr2	LN:1584
-read_28833_29006_6945	99	chr1	33	20	10M1D25M	=	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<	NM:i:1	RG:Z:L1
-read_28701_28881_323b	147	chr2	88	30	35M	=	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<	MF:i:18	RG:Z:L2
diff --git a/tests/ex7.sam b/tests/ex7.sam
deleted file mode 100644
index 12befae..0000000
--- a/tests/ex7.sam
+++ /dev/null
@@ -1,2 +0,0 @@
-read_28833_29006_6945	99	chr1	33	20	10M1D25M	=	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<	NM:i:1	RG:Z:L1	PG:Z:P1	XT:A:U
-read_28701_28881_323b	147	chr2	88	30	35M	=	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<	MF:i:18	RG:Z:L2	PG:Z:P2	XT:A:R
diff --git a/tests/ex8.sam b/tests/ex8.sam
deleted file mode 100644
index 5a16b4f..0000000
--- a/tests/ex8.sam
+++ /dev/null
@@ -1,3 +0,0 @@
- at HD	VN:1.0
- at SQ	SN:2	LN:48297693
-GJP00TM04CAQ5W	0	2	38297693	60	45H51M1D13M1D12M1D9M2D5M1D7M4D2M1I6M1D28M1D5M1D2M1D18M55H	*	0	0	CATGAAGAACCGCTGGGTATGGAGCACACCTCACCTGATGGACAGTTGATTATGCTCACCTTAACGCTAATTGAGAGCAGCACAAGAGGACTGGAAACTAGAATTTACTCCTCATCTCCGAAGATGTGAATATTCTAAATTCAGCTTGCCTCTTGCTTC	IID7757111/=;?///:D>777;EEGAAAEEIHHIIIIIIIIIIIIIIBBBIIIIH==<<<DDGEEE;<<<A><<<DEDDA>>>D?1112544556::03---//25.22=;DD?;;;>BDDDEEEGGGA<888<BAA888<GGGGGEB?9::DD551	NM:i:15	MD:Z:51^T13^A12^A9^AA5^A7^AAAA8^T28^T5^A2^T18	RG:Z:GJP00TM04
diff --git a/tests/ex9_fail.bam b/tests/ex9_fail.bam
deleted file mode 100644
index c30a7a7..0000000
Binary files a/tests/ex9_fail.bam and /dev/null differ
diff --git a/tests/ex9_nofail.bam b/tests/ex9_nofail.bam
deleted file mode 100644
index 1f90cda..0000000
Binary files a/tests/ex9_nofail.bam and /dev/null differ
diff --git a/tests/example.bed.gz b/tests/example.bed.gz
deleted file mode 100644
index c31dca6..0000000
Binary files a/tests/example.bed.gz and /dev/null differ
diff --git a/tests/example.bed.gz.tbi b/tests/example.bed.gz.tbi
deleted file mode 100644
index 297daed..0000000
Binary files a/tests/example.bed.gz.tbi and /dev/null differ
diff --git a/tests/example.gtf.gz b/tests/example.gtf.gz
deleted file mode 100644
index 9d6b241..0000000
Binary files a/tests/example.gtf.gz and /dev/null differ
diff --git a/tests/example.py b/tests/example.py
deleted file mode 100644
index 473158e..0000000
--- a/tests/example.py
+++ /dev/null
@@ -1,79 +0,0 @@
-## 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" )
-
-print "###################"
-# check different ways to iterate
-print len(list(samfile.fetch()))
-print len(list(samfile.fetch( "chr1", 10, 200 )))
-print len(list(samfile.fetch( region="chr1:10-200" )))
-print len(list(samfile.fetch( "chr1" )))
-print len(list(samfile.fetch( region="chr1")))
-print len(list(samfile.fetch( "chr2" )))
-print len(list(samfile.fetch( region="chr2")))
-print len(list(samfile.fetch()))
-print len(list(samfile.fetch( "chr1" )))
-print len(list(samfile.fetch( region="chr1")))
-print len(list(samfile.fetch()))
-
-print len(list(samfile.pileup( "chr1", 10, 200 )))
-print len(list(samfile.pileup( region="chr1:10-200" )))
-print len(list(samfile.pileup( "chr1" )))
-print len(list(samfile.pileup( region="chr1")))
-print len(list(samfile.pileup( "chr2" )))
-print len(list(samfile.pileup( region="chr2")))
-print len(list(samfile.pileup()))
-print len(list(samfile.pileup()))
-
-print "########### fetch with callback ################"
-def my_fetch_callback( alignment ): print str(alignment)
-samfile.fetch( region="chr1:10-200", callback=my_fetch_callback )
-
-print "########## pileup with callback ################"
-def my_pileup_callback( column ): print str(column)
-samfile.pileup( region="chr1:10-200", callback=my_pileup_callback )
-
-
-print "########### Using a callback object ###### "
-
-class Counter:
-    mCounts = 0
-    def __call__(self, alignment):
-        self.mCounts += 1
-
-c = Counter()
-samfile.fetch( region = "chr1:10-200", callback = c )
-print "counts=", c.mCounts
-
-print "########### Calling a samtools command line function ############"
-
-for p in pysam.mpileup( "-c", "ex1.bam" ):
-    print str(p)
-
-print pysam.mpileup.getMessages()
-
-print "########### Investigating headers #######################"
-
-# playing arount with headers
-samfile = pysam.Samfile( "ex3.sam", "r" )
-print samfile.references
-print samfile.lengths
-print samfile.text
-print samfile.header
-header = samfile.header
-samfile.close()
-
-header["HD"]["SO"] = "unsorted"
-outfile = pysam.Samfile( "out.sam", "wh", 
-                         header = header )
-
-outfile.close()
-
diff --git a/tests/example.vcf40 b/tests/example.vcf40
deleted file mode 100644
index 07e0746..0000000
--- a/tests/example.vcf40
+++ /dev/null
@@ -1,23 +0,0 @@
-##fileformat=VCFv4.0
-##fileDate=20090805
-##source=myImputationProgramV3.1
-##reference=1000GenomesPilot-NCBI36
-##phasing=partial
-##INFO=<ID=NS,Number=1,Type=Integer,Description="Number of Samples With Data">
-##INFO=<ID=DP,Number=1,Type=Integer,Description="Total Depth">
-##INFO=<ID=AF,Number=.,Type=Float,Description="Allele Frequency">
-##INFO=<ID=AA,Number=1,Type=String,Description="Ancestral Allele">
-##INFO=<ID=DB,Number=0,Type=Flag,Description="dbSNP membership, build 129">
-##INFO=<ID=H2,Number=0,Type=Flag,Description="HapMap2 membership">
-##FILTER=<ID=q10,Description="Quality below 10">
-##FILTER=<ID=s50,Description="Less than 50% of samples have data">
-##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
-##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
-##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth">
-##FORMAT=<ID=HQ,Number=2,Type=Integer,Description="Haplotype Quality">
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	NA00001	NA00002	NA00003
-M	1230237	.	T	.	47	PASS	NS=3;DP=13;AA=T	GT:GQ:DP:HQ	0|0:54:7:56,60	0|0:48:4:51,51	0/0:61:2
-17	14370	rs6054257	G	A	29	PASS	NS=3;DP=14;AF=0.5;DB;H2	GT:GQ:DP:HQ	0|0:48:1:51,51	1|0:48:8:51,51	1/1:43:5:.,.
-20	17330	.	T	A	3	q10	NS=3;DP=11;AF=0.017	GT:GQ:DP:HQ	0|0:49:3:58,50	0|1:3:5:65,3	0/0:41:3
-20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	GT:GQ:DP:HQ	1|2:21:6:23,27	2|1:2:0:18,2	2/2:35:4
-20	1234567	microsat1	GTCT	G,GTACT	50	PASS	NS=3;DP=9;AA=G	GT:GQ:DP	0/1:35:4	0/2:17:2	1/1:40:3
diff --git a/tests/example_btag.bam b/tests/example_btag.bam
deleted file mode 100644
index 7cd5c0c..0000000
Binary files a/tests/example_btag.bam and /dev/null differ
diff --git a/tests/example_btag.sam b/tests/example_btag.sam
deleted file mode 100644
index 2dd4990..0000000
--- a/tests/example_btag.sam
+++ /dev/null
@@ -1,6 +0,0 @@
- at SQ	LN:200000000	SN:chr1
-QW85I:468:729	0	chr1	156268499	63	140M15H	*	0	0	GTCCAGTCTCCTGTAATTCTTGGGCTTGACTAGGCTTCCGACAACCTGGAGGCATTGCTCTTTCAGGGTATACACTGCAGTGTGATGTTGGCAAAAACAGGCTGTCCATTAACATTGGAAGATGGCACAAACAATTCAGT	>>>>>>>====>=>>;:8,,((1*0536;;=<>;:;>>>>>>>>>>>>>>>>>>>><9=556.2<<<8===<<<9;9=>=>>>>>>>>>>>>>>>>.>>>===>>>>>>>4=>>==;<<896=>===<>>588-1.19<=	RG:Z:QW85I	PG:Z:tmap	MD:Z:140	NM:i:0	AS:i:140	FZ:B:S,100,1,91,0,7,101,0,201,96,204,0,0,87,109,0,7,97,112,1,12,78,197,0,7,100,95,101,202,0,6,0,1,186,0,84,0,244,0,0 [...]
-QW85I:468:729	0	chr1	156268499	63	140M15H	*	0	0	GTCCAGTCTCCTGTAATTCTTGGGCTTGACTAGGCTTCCGACAACCTGGAGGCATTGCTCTTTCAGGGTATACACTGCAGTGTGATGTTGGCAAAAACAGGCTGTCCATTAACATTGGAAGATGGCACAAACAATTCAGT	>>>>>>>====>=>>;:8,,((1*0536;;=<>;:;>>>>>>>>>>>>>>>>>>>><9=556.2<<<8===<<<9;9=>=>>>>>>>>>>>>>>>>.>>>===>>>>>>>4=>>==;<<896=>===<>>588-1.19<=	RG:Z:QW85I	PG:Z:tmap	MD:Z:140	NM:i:0	AS:i:140	FZ:B:s,-100,200,-300,-400	XA:Z:map2-1	XS:i:53	XT:i:38	XF:i:1	XE:i:0
-QW85I:468:729	0	chr1	156268499	63	140M15H	*	0	0	GTCCAGTCTCCTGTAATTCTTGGGCTTGACTAGGCTTCCGACAACCTGGAGGCATTGCTCTTTCAGGGTATACACTGCAGTGTGATGTTGGCAAAAACAGGCTGTCCATTAACATTGGAAGATGGCACAAACAATTCAGT	>>>>>>>====>=>>;:8,,((1*0536;;=<>;:;>>>>>>>>>>>>>>>>>>>><9=556.2<<<8===<<<9;9=>=>>>>>>>>>>>>>>>>.>>>===>>>>>>>4=>>==;<<896=>===<>>588-1.19<=	RG:Z:QW85I	PG:Z:tmap	MD:Z:140	NM:i:0	AS:i:140	FZ:B:c,-100,12	XA:Z:map2-1	XS:i:53	XT:i:38	XF:i:1	XE:i:0
-QW85I:468:729	0	chr1	156268499	63	140M15H	*	0	0	GTCCAGTCTCCTGTAATTCTTGGGCTTGACTAGGCTTCCGACAACCTGGAGGCATTGCTCTTTCAGGGTATACACTGCAGTGTGATGTTGGCAAAAACAGGCTGTCCATTAACATTGGAAGATGGCACAAACAATTCAGT	>>>>>>>====>=>>;:8,,((1*0536;;=<>;:;>>>>>>>>>>>>>>>>>>>><9=556.2<<<8===<<<9;9=>=>>>>>>>>>>>>>>>>.>>>===>>>>>>>4=>>==;<<896=>===<>>588-1.19<=	RG:Z:QW85I	PG:Z:tmap	MD:Z:140	NM:i:0	AS:i:140	FZ:B:C,12,15	XA:Z:map2-1	XS:i:53	XT:i:38	XF:i:1	XE:i:0
-QW85I:468:729	0	chr1	156268499	63	140M15H	*	0	0	GTCCAGTCTCCTGTAATTCTTGGGCTTGACTAGGCTTCCGACAACCTGGAGGCATTGCTCTTTCAGGGTATACACTGCAGTGTGATGTTGGCAAAAACAGGCTGTCCATTAACATTGGAAGATGGCACAAACAATTCAGT	>>>>>>>====>=>>;:8,,((1*0536;;=<>;:;>>>>>>>>>>>>>>>>>>>><9=556.2<<<8===<<<9;9=>=>>>>>>>>>>>>>>>>.>>>===>>>>>>>4=>>==;<<896=>===<>>588-1.19<=	RG:Z:QW85I	PG:Z:tmap	MD:Z:140	NM:i:0	AS:i:140	FZ:B:f,-1.0,5.0,2.5	XA:Z:map2-1	XS:i:53	XT:i:38	XF:i:1 XE:i:0
diff --git a/tests/example_empty_header.bam b/tests/example_empty_header.bam
deleted file mode 100644
index 4522777..0000000
Binary files a/tests/example_empty_header.bam and /dev/null differ
diff --git a/tests/example_unmapped_reads_no_sq.sam b/tests/example_unmapped_reads_no_sq.sam
deleted file mode 100644
index cccf973..0000000
--- a/tests/example_unmapped_reads_no_sq.sam
+++ /dev/null
@@ -1,3 +0,0 @@
- at HD	VN:1.0
-read_28833_29006_6945	0	*	*	*	*	*	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<
-read_28701_28881_323b	0	*	*	*	*	*	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<
diff --git a/tests/example_user_header.sam b/tests/example_user_header.sam
deleted file mode 100644
index cebe71d..0000000
--- a/tests/example_user_header.sam
+++ /dev/null
@@ -1,8 +0,0 @@
- at HD	VN:1.0
- at SQ	SN:chr1	LN:1575
- at SQ	SN:chr2	LN:1584
- at x1	A:2	B:5
- at x2	A:4	B:5
- at x3	A:6	B:5
-read_28833_29006_6945	99	chr1	33	20	10M1D25M	=	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<	NM:i:1	RG:Z:L1
-read_28701_28881_323b	147	chr2	88	30	35M	=	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<	MF:i:18	RG:Z:L2
diff --git a/tests/issue100.bam b/tests/issue100.bam
deleted file mode 100644
index e47798c..0000000
Binary files a/tests/issue100.bam and /dev/null differ
diff --git a/tests/pysam_test.py b/tests/pysam_test.py
old mode 100755
new mode 100644
index 3cb49bd..ae43dcf
--- a/tests/pysam_test.py
+++ b/tests/pysam_test.py
@@ -7,735 +7,762 @@ and data files located there.
 
 import pysam
 import unittest
-import os, re, sys
-import itertools
+import os
+import sys
 import collections
 import subprocess
-import shutil
 import logging
+from TestUtils import checkBinaryEqual
 
 IS_PYTHON3 = sys.version_info[0] >= 3
 
-if IS_PYTHON3:
-    from itertools import zip_longest
-else:
-    from itertools import izip as zip_longest
+SAMTOOLS = "samtools"
+WORKDIR = "pysam_test_work"
+DATADIR = "pysam_data"
 
 
-SAMTOOLS="samtools"
-WORKDIR="pysam_test_work"
+class BasicTestBAMFetch(unittest.TestCase):
 
-def checkBinaryEqual( filename1, filename2 ):
-    '''return true if the two files are binary equal.'''
-    if os.path.getsize( filename1 ) !=  os.path.getsize( filename2 ):
-        return False
+    '''basic first test - detailed testing
+    if information in file is consistent
+    with information in AlignedRead object.'''
 
-    infile1 = open(filename1, "rb")
-    infile2 = open(filename2, "rb")
+    def setUp(self):
+        self.samfile = pysam.Samfile(
+            os.path.join(DATADIR, "ex3.bam"),
+            "rb")
+        self.reads = list(self.samfile.fetch())
 
-    def chariter( infile ):
-        while 1:
-            c = infile.read(1)
-            if c == b"": break
-            yield c
+    def testARqname(self):
+        self.assertEqual(
+            self.reads[0].qname,
+            "read_28833_29006_6945",
+            "read name mismatch in read 1: %s != %s" % (
+                self.reads[0].qname, "read_28833_29006_6945"))
+        self.assertEqual(
+            self.reads[1].qname,
+            "read_28701_28881_323b",
+            "read name mismatch in read 2: %s != %s" % (
+                self.reads[1].qname, "read_28701_28881_323b"))
 
-    found = False
-    for c1,c2 in zip_longest( chariter( infile1), chariter( infile2) ):
-        if c1 != c2: break
-    else:
-        found = True
+    def testARflag(self):
+        self.assertEqual(
+            self.reads[0].flag, 99,
+            "flag mismatch in read 1: %s != %s" % (
+                self.reads[0].flag, 99))
+        self.assertEqual(
+            self.reads[1].flag, 147,
+            "flag mismatch in read 2: %s != %s" % (
+                self.reads[1].flag, 147))
 
-    infile1.close()
-    infile2.close()
-    return found
+    def testARrname(self):
+        self.assertEqual(
+            self.reads[0].rname, 0,
+            "chromosome/target id mismatch in read 1: %s != %s" %
+            (self.reads[0].rname, 0))
+        self.assertEqual(
+            self.reads[1].rname, 1,
+            "chromosome/target id mismatch in read 2: %s != %s" %
+            (self.reads[1].rname, 1))
 
-def runSamtools( cmd ):
-    '''run a samtools command'''
+    def testARpos(self):
+        self.assertEqual(
+            self.reads[0].pos, 33 - 1,
+            "mapping position mismatch in read 1: %s != %s" %
+            (self.reads[0].pos, 33 - 1))
+        self.assertEqual(
+            self.reads[1].pos, 88 - 1,
+            "mapping position mismatch in read 2: %s != %s" %
+            (self.reads[1].pos, 88 - 1))
 
-    try:
-        retcode = subprocess.call(cmd, shell=True,
-                                  stderr = subprocess.PIPE)
-        if retcode < 0:
-            print("Child was terminated by signal", -retcode)
-    except OSError as e:
-        print("Execution failed:", e)
+    def testARmapq(self):
+        self.assertEqual(
+            self.reads[0].mapq, 20,
+            "mapping quality mismatch in read 1: %s != %s" %
+            (self.reads[0].mapq, 20))
+        self.assertEqual(
+            self.reads[1].mapq, 30,
+            "mapping quality mismatch in read 2: %s != %s" % (
+                self.reads[1].mapq, 30))
 
-def getSamtoolsVersion():
-    '''return samtools version'''
+    def testARcigar(self):
+        self.assertEqual(
+            self.reads[0].cigar,
+            [(0, 10), (2, 1), (0, 25)],
+            "read name length mismatch in read 1: %s != %s" %
+            (self.reads[0].cigar, [(0, 10), (2, 1), (0, 25)]))
+        self.assertEqual(
+            self.reads[1].cigar, [(0, 35)],
+            "read name length mismatch in read 2: %s != %s" %
+            (self.reads[1].cigar, [(0, 35)]))
 
-    with subprocess.Popen(SAMTOOLS, shell=True, stderr=subprocess.PIPE).stderr as pipe:
-        lines = b"".join(pipe.readlines())
+    def testARcigarstring(self):
+        self.assertEqual(self.reads[0].cigarstring, '10M1D25M')
+        self.assertEqual(self.reads[1].cigarstring, '35M')
 
-    if IS_PYTHON3:
-        lines = lines.decode('ascii')
-    return re.search( "Version:\s+(\S+)", lines).groups()[0]
+    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))
 
-class BinaryTest(unittest.TestCase):
-    '''test samtools command line commands and compare
-    against pysam commands.
+    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))
 
-    Tests fail, if the output is not binary identical.
-    '''
+    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))
 
-    first_time = True
-
-    # a dictionary of commands to test
-    # first entry: (samtools output file, samtools command)
-    # second entry: (pysam output file, (pysam function, pysam options) )
-    commands = \
-        { 
-          "view" :
-              (
-                ("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" ) ),
-                ),
-          "idxstats" :
-              ( 
-                ("ex1.idxstats", "idxstats ex1.bam > ex1.idxstats" ),
-                ("pysam_ex1.idxstats", (pysam.idxstats, "pysam_ex1.bam" ) ),
-                ),
-          "fixmate" :
-              (
-                ("ex1.fixmate", "fixmate ex1.bam ex1.fixmate" ),
-                ("pysam_ex1.fixmate", (pysam.fixmate, "pysam_ex1.bam pysam_ex1.fixmate") ),
-                ),
-          "flagstat" :
-              (
-                ("ex1.flagstat", "flagstat ex1.bam > ex1.flagstat" ),
-                ("pysam_ex1.flagstat", (pysam.flagstat, "pysam_ex1.bam") ),
-                ),
-          "calmd" :
-              (
-                ("ex1.calmd", "calmd ex1.bam ex1.fa > ex1.calmd" ),
-                ("pysam_ex1.calmd", (pysam.calmd, "pysam_ex1.bam ex1.fa") ),
-                ),
-          "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") ),
-                ),
-          "pad2unpad":
-              (
-                ("ex2.unpad", "pad2unpad -T ex1.fa ex2.bam > ex2.unpad" ),
-                ("pysam_ex2.unpad", (pysam.pad2unpad, "-T ex1.fa ex2.bam") ),
-                ),
-          "bamshuf":
-              (
-                ("ex1.bamshuf.bam", "bamshuf ex1.bam ex1.bamshuf" ),
-                ("pysam_ex1.bamshuf.bam", (pysam.bamshuf, "ex1.bam pysam_ex1.bamshuf") ),
-                ),
-          "bedcov":
-              (
-                ("ex1.bedcov", "bedcov ex1.bed ex1.bam > ex1.bedcov" ),
-                ("pysam_ex1.bedcov", (pysam.bedcov, "ex1.bed ex1.bam") ),
-                ),
-        }
-
-    # some tests depend on others. The order specifies in which order
-    # the samtools commands are executed.
-    # 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',
-             'sort',
-             'mpileup',
-             'depth',
-             'idxstats',
-             'fixmate',
-             'flagstat',
-              ## 'calmd',
-             'merge',
-             'rmdup',
-             'reheader',
-             'cat',
-             'bedcov',
-             'targetcut',
-             'phase',
-             'bamshuf',
-             'bam2fq',
-              'pad2unpad',
-              )
-
-    def setUp( self ):
-        '''setup tests. 
-
-        For setup, all commands will be run before the first test is
-        executed. Individual tests will then just compare the output
-        files.
-        '''
-        if BinaryTest.first_time:
-
-            # remove previous files
-            if os.path.exists( WORKDIR ):
-                shutil.rmtree( WORKDIR )
-                pass
-
-            # 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" ) )
-            shutil.copy( "ex2.bam", os.path.join( WORKDIR, "ex2.bam" ) )
-
-            # cd to workdir
-            savedir = os.getcwd()
-            os.chdir( WORKDIR )
-            
-            for label in self.order:
-                # print ("command=", label)
-                command = self.commands[label]
-                # build samtools command and target and run
-                samtools_target, samtools_command = command[0]
-                runSamtools( " ".join( (SAMTOOLS, samtools_command )))
-
-                # get pysam command and run
-                try:
-                    pysam_target, pysam_command = command[1]
-                except ValueError as msg:
-                    raise ValueError( "error while setting up %s=%s: %s" %\
-                                          (label, command, msg) )
-
-                pysam_method, pysam_options = pysam_command
-                try:
-                    output = pysam_method( *pysam_options.split(" "), raw=True)
-                except pysam.SamtoolsError as msg:
-                    raise pysam.SamtoolsError( "error while executing %s: options=%s: msg=%s" %\
-                                                   (label, pysam_options, msg) )
-
-                
-                if ">" in samtools_command:
-                    with open( pysam_target, "wb" ) as outfile:
-                        if type(output) == list:
-                            if IS_PYTHON3:
-                                for line in output: 
-                                    outfile.write( line.encode('ascii') )
-                            else:
-                                for line in output: outfile.write( line )
-                        else:
-                            outfile.write(output)
-
-            os.chdir( savedir )
-            BinaryTest.first_time = False
-
-        samtools_version = getSamtoolsVersion()
+    def testARseq(self):
+        self.assertEqual(self.reads[0].seq, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG", "sequence mismatch in read 1: %s != %s" % (
+            self.reads[0].seq, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG"))
+        self.assertEqual(self.reads[1].seq, b"ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA", "sequence size mismatch in read 2: %s != %s" % (
+            self.reads[1].seq, b"ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA"))
+        self.assertEqual(self.reads[3].seq, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG", "sequence mismatch in read 4: %s != %s" % (
+            self.reads[3].seq, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG"))
 
-        
-        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('-')]
-            return re.sub( "[^0-9.]", "", s )
-
-        if _r(samtools_version) != _r( pysam.__samtools_version__):
-            raise ValueError("versions of pysam/samtools and samtools differ: %s != %s" % \
-                                 (pysam.__samtools_version__,
-                                  samtools_version ))
-
-    def checkCommand( self, command ):
-        if command:
-            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) )
-            
-    def testImport( self ):
-        self.checkCommand( "import" )
-
-    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 testMerge( self ):
-        self.checkCommand( "merge" )
+    def testARqual(self):
+        self.assertEqual(self.reads[0].qual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<",
+                         "quality string mismatch in read 1: %s != %s" % (self.reads[0].qual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<"))
+        self.assertEqual(self.reads[1].qual, b"<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<", "quality string mismatch in read 2: %s != %s" % (
+            self.reads[1].qual, b"<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<"))
+        self.assertEqual(self.reads[3].qual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<",
+                         "quality string mismatch in read 3: %s != %s" % (self.reads[3].qual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<"))
 
-    def testRmdup( self ):
-        self.checkCommand( "rmdup" )
+    def testARquery(self):
+        self.assertEqual(self.reads[0].query, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG", "query mismatch in read 1: %s != %s" % (
+            self.reads[0].query, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG"))
+        self.assertEqual(self.reads[1].query, b"ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA", "query size mismatch in read 2: %s != %s" % (
+            self.reads[1].query, b"ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA"))
+        self.assertEqual(self.reads[3].query, b"TAGCTAGCTACCTATATCTTGGTCTT", "query mismatch in read 4: %s != %s" % (
+            self.reads[3].query, b"TAGCTAGCTACCTATATCTTGGTCTT"))
 
-    def testReheader( self ):
-        self.checkCommand( "reheader" )
+    def testARqqual(self):
+        self.assertEqual(self.reads[0].qqual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<",
+                         "qquality string mismatch in read 1: %s != %s" % (self.reads[0].qqual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<"))
+        self.assertEqual(self.reads[1].qqual, b"<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<", "qquality string mismatch in read 2: %s != %s" % (
+            self.reads[1].qqual, b"<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<"))
+        self.assertEqual(self.reads[3].qqual, b"<<<<<<<<<<<<<<<<<:<9/,&,22",
+                         "qquality string mismatch in read 3: %s != %s" % (self.reads[3].qqual, b"<<<<<<<<<<<<<<<<<:<9/,&,22"))
 
-    def testCat( self ):
-        self.checkCommand( "cat" )
+    def testPresentOptionalFields(self):
+        self.assertEqual(self.reads[0].opt(
+            'NM'), 1, "optional field mismatch in read 1, NM: %s != %s" % (self.reads[0].opt('NM'), 1))
+        self.assertEqual(self.reads[0].opt(
+            'RG'), 'L1', "optional field mismatch in read 1, RG: %s != %s" % (self.reads[0].opt('RG'), 'L1'))
+        self.assertEqual(self.reads[1].opt(
+            'RG'), 'L2', "optional field mismatch in read 2, RG: %s != %s" % (self.reads[1].opt('RG'), 'L2'))
+        self.assertEqual(self.reads[1].opt(
+            'MF'), 18, "optional field mismatch in read 2, MF: %s != %s" % (self.reads[1].opt('MF'), 18))
 
-    def testTargetcut( self ):
-        self.checkCommand( "targetcut" )
+    def testPairedBools(self):
+        self.assertEqual(self.reads[0].is_paired, True, "is paired mismatch in read 1: %s != %s" % (
+            self.reads[0].is_paired, True))
+        self.assertEqual(self.reads[1].is_paired, True, "is paired mismatch in read 2: %s != %s" % (
+            self.reads[1].is_paired, True))
+        self.assertEqual(self.reads[0].is_proper_pair, True, "is proper pair mismatch in read 1: %s != %s" % (
+            self.reads[0].is_proper_pair, True))
+        self.assertEqual(self.reads[1].is_proper_pair, True, "is proper pair mismatch in read 2: %s != %s" % (
+            self.reads[1].is_proper_pair, True))
+
+    def testTags(self):
+        self.assertEqual(self.reads[0].tags,
+                         [('NM', 1), ('RG', 'L1'),
+                          ('PG', 'P1'), ('XT', 'U')])
+        self.assertEqual(self.reads[1].tags,
+                         [('MF', 18), ('RG', 'L2'),
+                          ('PG', 'P2'), ('XT', 'R')])
+
+    def testAddTags(self):
+        self.assertEqual(sorted(self.reads[0].tags),
+                         sorted([('NM', 1), ('RG', 'L1'),
+                                 ('PG', 'P1'), ('XT', 'U')]))
+
+        self.reads[0].setTag('X1', 'C')
+        self.assertEqual(sorted(self.reads[0].tags),
+                         sorted([('X1', 'C'), ('NM', 1), ('RG', 'L1'),
+                                 ('PG', 'P1'), ('XT', 'U'), ]))
+        self.reads[0].setTag('X2', 5)
+        self.assertEqual(sorted(self.reads[0].tags),
+                         sorted([('X2', 5), ('X1', 'C'),
+                                 ('NM', 1), ('RG', 'L1'),
+                                 ('PG', 'P1'), ('XT', 'U'), ]))
+        # add with replacement
+        self.reads[0].setTag('X2', 10)
+        self.assertEqual(sorted(self.reads[0].tags),
+                         sorted([('X2', 10), ('X1', 'C'),
+                                 ('NM', 1), ('RG', 'L1'),
+                                 ('PG', 'P1'), ('XT', 'U'), ]))
+
+        # add without replacement
+        self.reads[0].setTag('X2', 5, replace=False)
+        self.assertEqual(sorted(self.reads[0].tags),
+                         sorted([('X2', 10), ('X1', 'C'),
+                                 ('X2', 5),
+                                 ('NM', 1), ('RG', 'L1'),
+                                 ('PG', 'P1'), ('XT', 'U'), ]))
+
+    def testAddTagsType(self):
+        self.reads[0].tags = None
+        self.assertEqual(self.reads[0].tags, [])
+
+        self.reads[0].setTag('X1', 5.0)
+        self.reads[0].setTag('X2', "5.0")
+        self.reads[0].setTag('X3', 5)
+
+        self.assertEqual(sorted(self.reads[0].tags),
+                         sorted([('X1', 5.0),
+                                 ('X2', "5.0"),
+                                 ('X3', 5)]))
+
+        # test setting float for int value
+        self.reads[0].setTag('X4', 5, value_type='d')
+        self.assertEqual(sorted(self.reads[0].tags),
+                         sorted([('X1', 5.0),
+                                 ('X2', "5.0"),
+                                 ('X3', 5),
+                                 ('X4', 5.0)]))
+
+        # test setting int for float value - the
+        # value will be rounded.
+        self.reads[0].setTag('X5', 5.2, value_type='i')
+        self.assertEqual(sorted(self.reads[0].tags),
+                         sorted([('X1', 5.0),
+                                 ('X2', "5.0"),
+                                 ('X3', 5),
+                                 ('X4', 5.0),
+                                 ('X5', 5)]))
+
+        # test setting invalid type code
+        self.assertRaises(ValueError, self.reads[0].setTag, 'X6', 5.2, 'g')
+
+    def testTagsUpdatingFloat(self):
+        self.assertEqual(self.reads[0].tags,
+                         [('NM', 1), ('RG', 'L1'),
+                          ('PG', 'P1'), ('XT', 'U')])
+        self.reads[0].tags += [('XC', 5.0)]
+        self.assertEqual(self.reads[0].tags,
+                         [('NM', 1), ('RG', 'L1'),
+                          ('PG', 'P1'), ('XT', 'U'), ('XC', 5.0)])
+
+    def testOpt(self):
+        self.assertEqual(self.reads[0].opt("XT"), "U")
+        self.assertEqual(self.reads[1].opt("XT"), "R")
+
+    def testMissingOpt(self):
+        self.assertRaises(KeyError, self.reads[0].opt, "XP")
+
+    def testEmptyOpt(self):
+        self.assertRaises(KeyError, self.reads[2].opt, "XT")
 
-    def testPhase( self ):
-        self.checkCommand( "phase" )
+    def tearDown(self):
+        self.samfile.close()
 
-    def testBam2fq( self ):
-        self.checkCommand( "bam2fq" )
 
-    def testBedcov( self ):
-        self.checkCommand( "bedcov" )
+class BasicTestBAMFile(BasicTestBAMFetch):
 
-    def testBamshuf( self ):
-        self.checkCommand( "bamshuf" )
+    def setUp(self):
+        self.samfile = pysam.Samfile(
+            os.path.join(DATADIR, "ex3.sam"),
+            "r")
+        self.reads = [r for r in self.samfile]
 
-    def testPad2Unpad( self ):
-        self.checkCommand( "pad2unpad" )
 
-    # def testPileup1( self ):
-    #     self.checkCommand( "pileup1" )
-    
-    # def testPileup2( self ):
-    #     self.checkCommand( "pileup2" )
+class BasicTestSAMFile(BasicTestBAMFetch):
 
-    # deprecated
-    # def testGLFView( self ):
-    #     self.checkCommand( "glfview" )
+    def setUp(self):
+        self.samfile = pysam.Samfile(
+            os.path.join(DATADIR, "ex3.sam"),
+            "r")
+        self.reads = [r for r in self.samfile]
 
-    def testView( self ):
-        self.checkCommand( "view" )
 
-    def testEmptyIndex( self ):
-        self.assertRaises( IOError, pysam.index, "exdoesntexist.bam" )
+class BasicTestSAMFetch(BasicTestBAMFetch):
+    def setUp(self):
+        self.samfile = pysam.Samfile(
+            os.path.join(DATADIR, "ex3.sam"),
+            "r")
+        self.reads = list(self.samfile.fetch())
 
-    def __del__(self):
-        if os.path.exists( WORKDIR ):
-            pass
-        # shutil.rmtree( WORKDIR )
 
-class IOTest(unittest.TestCase):
+# needs to be implemented
+# class TestAlignedReadFromSamWithoutHeader(TestAlignedReadFromBam):
+#
+#     def setUp(self):
+#         self.samfile=pysam.Samfile( "ex7.sam","r" )
+#         self.reads=list(self.samfile.fetch())
+
+
+class TestIO(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 ):
+    def checkEcho(self,
+                  input_filename,
+                  reference_filename,
+                  output_filename,
+                  input_mode, output_mode,
+                  use_template=True):
         '''iterate through *input_filename* writing to *output_filename* and
-        comparing the output to *reference_filename*. 
-        
+        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. 
+        If *use_template* is set, the header is copied from infile
+        using the template mechanism, otherwise target names and
+        lengths are passed explicitely.
 
         '''
 
-        infile = pysam.Samfile( input_filename, input_mode )
+        infile = pysam.Samfile(os.path.join(DATADIR, input_filename),
+                               input_mode)
         if use_template:
-            outfile = pysam.Samfile( output_filename, output_mode, template = infile )
+            outfile = pysam.Samfile(output_filename,
+                                    output_mode,
+                                    template=infile)
         else:
-            outfile = pysam.Samfile( output_filename, output_mode, 
-                                     referencenames = infile.references,
-                                     referencelengths = infile.lengths,
-                                     add_sq_text = False )
-            
+            outfile = pysam.Samfile(output_filename,
+                                    output_mode,
+                                    referencenames=infile.references,
+                                    referencelengths=infile.lengths,
+                                    add_sq_text=False)
+
         iter = infile.fetch()
 
-        for x in iter: outfile.write( x )
+        for x in iter:
+            outfile.write(x)
         infile.close()
         outfile.close()
 
-        self.assertTrue( checkBinaryEqual( reference_filename, output_filename), 
-                         "files %s and %s are not the same" % (reference_filename, output_filename) )
+        self.assertTrue(
+            checkBinaryEqual(os.path.join(DATADIR, reference_filename),
+                             output_filename),
+            "files %s and %s are not the same" % (reference_filename,
+                                                  output_filename))
 
+    def testReadWriteBam(self):
 
-    def testReadWriteBam( self ):
-        
         input_filename = "ex1.bam"
         output_filename = "pysam_ex1.bam"
         reference_filename = "ex1.bam"
 
-        self.checkEcho( input_filename, reference_filename, output_filename,
-                        "rb", "wb" )
+        self.checkEcho(input_filename, reference_filename, output_filename,
+                       "rb", "wb", use_template=True)
+
+    def testReadWriteBamWithTargetNames(self):
 
-    def testReadWriteBamWithTargetNames( self ):
-        
         input_filename = "ex1.bam"
         output_filename = "pysam_ex1.bam"
         reference_filename = "ex1.bam"
 
-        self.checkEcho( input_filename, reference_filename, output_filename,
-                        "rb", "wb", use_template = False )
+        self.checkEcho(input_filename, reference_filename, output_filename,
+                       "rb", "wb", use_template=False)
+
+    def testReadWriteSamWithHeader(self):
 
-    def testReadWriteSamWithHeader( self ):
-        
         input_filename = "ex2.sam"
         output_filename = "pysam_ex2.sam"
         reference_filename = "ex2.sam"
 
-        self.checkEcho( input_filename, reference_filename, output_filename,
-                        "r", "wh" )
+        self.checkEcho(input_filename,
+                       reference_filename,
+                       output_filename,
+                       "r", "wh")
+
+    # Release 0.8.0
+    # no samfiles without header
+    def testReadWriteSamWithoutHeader(self):
 
-    def testReadWriteSamWithoutHeader( self ):
-        
         input_filename = "ex2.sam"
         output_filename = "pysam_ex2.sam"
         reference_filename = "ex1.sam"
 
-        self.checkEcho( input_filename, reference_filename, output_filename,
-                        "r", "w" )
+        self.checkEcho(input_filename,
+                       reference_filename,
+                       output_filename,
+                       "r", "w")
 
-    def testReadSamWithoutTargetNames( self ):
+    def testReadSamWithoutTargetNames(self):
         '''see issue 104.'''
-        input_filename = "example_unmapped_reads_no_sq.sam"
+        input_filename = os.path.join(DATADIR,
+                                      "example_unmapped_reads_no_sq.sam")
 
         # raise exception in default mode
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "r" )
+        self.assertRaises(ValueError, pysam.Samfile, input_filename, "r")
 
         # raise exception if no SQ files
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "r",
-                           check_header = True)
-
-        infile = pysam.Samfile( input_filename, check_header = False, check_sq = False )
-        result = list(infile.fetch())
+        self.assertRaises(ValueError, pysam.Samfile,
+                          input_filename, "r",
+                          check_header=True)
+
+        infile = pysam.Samfile(
+            input_filename,
+            check_header=False,
+            check_sq=False)
+        
+        # TODO
+        # result = list(infile.fetch(until_eof=True))
+        # self.assertEqual(2, len(result))
 
-    def testReadBamWithoutTargetNames( self ):
+    def testReadBamWithoutTargetNames(self):
         '''see issue 104.'''
-        input_filename = "example_unmapped_reads_no_sq.bam"
+        input_filename = os.path.join(
+            DATADIR, "example_unmapped_reads_no_sq.bam")
 
         # raise exception in default mode
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "r" )
+        self.assertRaises(ValueError, pysam.Samfile, input_filename, "r")
 
         # raise exception if no SQ files
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "r",
-                           check_header = True)
-
-
-        infile = pysam.Samfile( input_filename, check_header = False, check_sq = False )
-        result = list(infile.fetch( until_eof = True))
-
-    def testReadSamWithoutHeader( self ):
-        input_filename = "ex1.sam"
-        output_filename = "pysam_ex1.sam"
-        reference_filename = "ex1.sam"
-
-        # reading from a samfile without header is not implemented.
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "r" )
-
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "r",
-                           check_header = False )
-
-    def testReadUnformattedFile( self ):
-        '''test reading from a file that is not bam/sam formatted'''
-        input_filename = "example.vcf40"
-
-        # bam - file raise error
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "rb" )
-
-        # sam - file error, but can't fetch
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "r" )
-        
-        self.assertRaises( ValueError, pysam.Samfile, input_filename, "r", 
-                           check_header = False)
-
-    def testBAMWithoutAlignedReads( self ):
+        self.assertRaises(ValueError, pysam.Samfile, input_filename, "r",
+                          check_header=True)
+
+        infile = pysam.Samfile(
+            input_filename, check_header=False, check_sq=False)
+        result = list(infile.fetch(until_eof=True))
+
+    # TODO
+    def testReadSamWithoutHeader(self):
+        input_filename = os.path.join(DATADIR, "ex1.sam")
+
+        # reading from a samfile without header is not 
+        # implemented
+        self.assertRaises(ValueError,
+                          pysam.Samfile,
+                          input_filename,
+                          "r")
+
+        # TODO
+        # without check_header header is no read
+        # leading to segfault
+        # self.assertRaises(ValueError,
+        #                   pysam.Samfile,
+        #                   input_filename,
+        #                   "r",
+        #                   check_header=False)
+
+    # TODO
+    # def testReadUnformattedFile(self):
+    #     '''test reading from a file that is not bam/sam formatted'''
+    #     input_filename = os.path.join(DATADIR, 'Makefile')
+
+    #     # bam - file raise error
+    #     self.assertRaises(ValueError,
+    #                       pysam.Samfile,
+    #                       input_filename,
+    #                       "rb")
+
+    #     # sam - file error, but can't fetch
+    #     self.assertRaises(ValueError,
+    #                       pysam.Samfile,
+    #                       input_filename,
+    #                       "r")
+
+    #     self.assertRaises(ValueError,
+    #                       pysam.Samfile,
+    #                       input_filename,
+    #                       "r",
+    #                       check_header=False)
+
+    def testBAMWithoutAlignedReads(self):
         '''see issue 117'''
-        input_filename = "test_unaligned.bam"
-        samfile = pysam.Samfile( input_filename, "rb", check_sq = False )
-        samfile.fetch( until_eof = True )
+        input_filename = os.path.join(DATADIR, "test_unaligned.bam")
+        samfile = pysam.Samfile(input_filename, "rb", check_sq=False)
+        samfile.fetch(until_eof=True)
 
-    def testBAMWithShortBAI( self ):
+    def testBAMWithShortBAI(self):
         '''see issue 116'''
-        input_filename = "example_bai.bam"
-        samfile = pysam.Samfile( input_filename, "rb", check_sq = False )
-        samfile.fetch( 'chr2' )
+        input_filename = os.path.join(DATADIR, "example_bai.bam")
+        samfile = pysam.Samfile(input_filename, "rb", check_sq=False)
+        samfile.fetch('chr2')
 
-    def testFetchFromClosedFile( self ):
+    def testFetchFromClosedFile(self):
 
-        samfile = pysam.Samfile( "ex1.bam", "rb" )
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                "rb")
         samfile.close()
-        self.assertRaises( ValueError, samfile.fetch, 'chr1', 100, 120)
+        self.assertRaises(ValueError, samfile.fetch, 'chr1', 100, 120)
 
-    def testClosedFile( self ):
+    def testClosedFile(self):
         '''test that access to a closed samfile raises ValueError.'''
 
-        samfile = pysam.Samfile( "ex1.bam", "rb" )
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                "rb")
         samfile.close()
-        self.assertRaises( ValueError, samfile.fetch, 'chr1', 100, 120)
-        self.assertRaises( ValueError, samfile.pileup, 'chr1', 100, 120)
-        self.assertRaises( ValueError, samfile.getrname, 0 )
-        self.assertRaises( ValueError, samfile.tell )
-        self.assertRaises( ValueError, samfile.seek, 0 )
-        self.assertRaises( ValueError, getattr, samfile, "nreferences" )
-        self.assertRaises( ValueError, getattr, samfile, "references" )
-        self.assertRaises( ValueError, getattr, samfile, "lengths" )
-        self.assertRaises( ValueError, getattr, samfile, "text" )
-        self.assertRaises( ValueError, getattr, samfile, "header" )
-
-        # write on closed file 
-        self.assertEqual( 0, samfile.write(None) )
-
-    def testAutoDetection( self ):
+        self.assertRaises(ValueError, samfile.fetch, 'chr1', 100, 120)
+        self.assertRaises(ValueError, samfile.pileup, 'chr1', 100, 120)
+        self.assertRaises(ValueError, samfile.getrname, 0)
+        # TODO
+        self.assertRaises(ValueError, samfile.tell)
+        self.assertRaises(ValueError, samfile.seek, 0)
+        self.assertRaises(ValueError, getattr, samfile, "nreferences")
+        self.assertRaises(ValueError, getattr, samfile, "references")
+        self.assertRaises(ValueError, getattr, samfile, "lengths")
+        self.assertRaises(ValueError, getattr, samfile, "text")
+        self.assertRaises(ValueError, getattr, samfile, "header")
+
+        # write on closed file
+        self.assertEqual(0, samfile.write(None))
+
+    def testAutoDetection(self):
         '''test if autodetection works.'''
 
-        samfile = pysam.Samfile( "ex3.sam" )
-        self.assertRaises( ValueError, samfile.fetch, 'chr1' )
-        samfile.close()
+        # TODO
+        # samfile = pysam.Samfile(os.path.join(DATADIR, "ex3.sam"))
+        # self.assertRaises(ValueError, samfile.fetch, 'chr1')
+        # samfile.close()
 
-        samfile = pysam.Samfile( "ex3.bam" )
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex3.bam"))
         samfile.fetch('chr1')
         samfile.close()
 
-    def testReadingFromSamFileWithoutHeader( self ):
-        '''read from samfile without header.
-        '''
-        samfile = pysam.Samfile( "ex7.sam", check_header = False, check_sq = False )
-        self.assertRaises( NotImplementedError, samfile.__iter__ )
+    # TOOD
+    # def testReadingFromSamFileWithoutHeader(self):
+    #     '''read from samfile without header.
+    #     '''
+    #     samfile = pysam.Samfile(os.path.join(DATADIR, "ex7.sam"),
+    #                             check_header=False,
+    #                             check_sq=False)
+    #     self.assertRaises(NotImplementedError, samfile.__iter__)
 
-    def testReadingFromFileWithoutIndex( self ):
+    def testReadingFromFileWithoutIndex(self):
         '''read from bam file without index.'''
 
-        assert not os.path.exists( "ex2.bam.bai" )
-        samfile = pysam.Samfile( "ex2.bam", "rb" )
-        self.assertRaises( ValueError, samfile.fetch )
-        self.assertEqual( len(list( samfile.fetch(until_eof = True) )), 3270 )
+        assert not os.path.exists(os.path.join(DATADIR, "ex2.bam.bai"))
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex2.bam"),
+                                "rb")
+        self.assertRaises(ValueError, samfile.fetch)
+        self.assertEqual(len(list(samfile.fetch(until_eof=True))),
+                         3270)
 
-    def testReadingUniversalFileMode( self ):
-        '''read from samfile without header.
-        '''
+    # def testReadingUniversalFileMode(self):
+    #     '''read from samfile without header.
+    #     '''
 
-        input_filename = "ex2.sam"
-        output_filename = "pysam_ex2.sam"
-        reference_filename = "ex1.sam"
+    #     input_filename = "ex2.sam"
+    #     output_filename = "pysam_ex2.sam"
+    #     reference_filename = "ex1.sam"
+
+    #     self.checkEcho(input_filename,
+    #                    reference_filename,
+    #                    output_filename,
+    #                    "rU", "w")
+
+    def testHead(self):
+        '''test IteratorRowHead'''
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                "rb")
+        l10 = list(samfile.head(10))
+        l100 = list(samfile.head(100))
+        self.assertEqual(len(l10), 10)
+        self.assertEqual(len(l100), 100)
+        self.assertEqual(list(map(str, l10)),
+                         list(map(str, l100[:10])))
 
-        self.checkEcho( input_filename, reference_filename, output_filename,
-                        "rU", "w" )
 
-class TestFloatTagBug( unittest.TestCase ):
+class TestFloatTagBug(unittest.TestCase):
+
     '''see issue 71'''
 
-    def testFloatTagBug( self ): 
+    def testFloatTagBug(self):
         '''a float tag before another exposed a parsing bug in bam_aux_get.
 
         Fixed in 0.1.19
         '''
-        samfile = pysam.Samfile("tag_bug.bam")
+        samfile = pysam.Samfile(os.path.join(DATADIR, "tag_bug.bam"))
         read = next(samfile.fetch(until_eof=True))
-        self.assertTrue( ('XC',1) in read.tags )
+        self.assertTrue(('XC', 1) in read.tags)
         self.assertEqual(read.opt('XC'), 1)
 
-class TestLargeFieldBug( unittest.TestCase ):
+
+class TestLargeFieldBug(unittest.TestCase):
+
     '''see issue 100'''
 
-    def testLargeFileBug( self ): 
+    def testLargeFileBug(self):
         '''when creating a read with a large entry in the tag field
         causes an errror:
             NotImplementedError: tags field too large
         '''
-        samfile = pysam.Samfile("issue100.bam")
+        samfile = pysam.Samfile(os.path.join(DATADIR, "issue100.bam"))
         read = next(samfile.fetch(until_eof=True))
         new_read = pysam.AlignedRead()
         new_read.tags = read.tags
-        self.assertEqual( new_read.tags, read.tags )
+        self.assertEqual(new_read.tags, read.tags)
+
+
+class TestTagParsing(unittest.TestCase):
 
-class TestTagParsing( unittest.TestCase ):
     '''tests checking the accuracy of tag setting and retrieval.'''
 
-    def makeRead( self ):
+    def makeRead(self):
         a = pysam.AlignedRead()
         a.qname = "read_12345"
         a.tid = 0
-        a.seq="ACGT" * 3
+        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.cigar = ((0, 10), (2, 1), (0, 25))
         a.mrnm = 0
-        a.mpos=200
+        a.mpos = 200
         a.isize = 0
-        a.qual ="1234" * 3
+        a.qual = "1234" * 3
         # todo: create tags
         return a
 
-    def testNegativeIntegers( self ):
+    def testNegativeIntegers(self):
         x = -2
         aligned_read = self.makeRead()
-        aligned_read.tags = [("XD", int(x) ) ]
+        aligned_read.tags = [("XD", int(x))]
         # print (aligned_read.tags)
 
-    def testNegativeIntegers2( self ):
+    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 )
+        r.tags = [("XD", int(x))]
+        outfile = pysam.Samfile("test.bam",
+                                "wb",
+                                referencenames=("chr1",),
+                                referencelengths = (1000,))
+        outfile.write(r)
         outfile.close()
 
-    def testCigarString( self ):
+    def testCigarString(self):
         r = self.makeRead()
-        self.assertEqual( r.cigarstring, "10M1D25M" )
+        self.assertEqual(r.cigarstring, "10M1D25M")
         r.cigarstring = "20M10D20M"
-        self.assertEqual( r.cigar, [(0,20), (2,10), (0,20)])
+        self.assertEqual(r.cigar, [(0, 20), (2, 10), (0, 20)])
+        # unsetting cigar string
+        r.cigarstring = None
+        self.assertEqual(r.cigarstring, '')
+
+    def testCigar(self):
+        r = self.makeRead()
+        self.assertEqual(r.cigar, [(0, 10), (2, 1), (0, 25)])
+        # unsetting cigar string
+        r.cigar = None
+        self.assertEqual(r.cigar, [])
 
-    def testLongTags( self ):
+    def testLongTags(self):
         '''see issue 115'''
-        
+
         r = self.makeRead()
         rg = 'HS2000-899_199.L3'
-        tags = [('XC', 85), ('XT', 'M'), ('NM', 5), ('SM', 29), ('AM', 29), ('XM', 1), ('XO', 1), ('XG', 4), ('MD', '37^ACCC29T18'), ('XA','5,+11707,36M1I48M,2;21,-48119779,46M1I38M,2;hs37d5,-10060835,40M1D45M,3;5,+11508,36M1I48M,3;hs37d5,+6743812,36M1I48M,3;19,-59118894,46M1I38M,3;4,-191044002,6M1I78M,3;')]
+        tags = [('XC', 85), ('XT', 'M'), ('NM', 5),
+                ('SM', 29), ('AM', 29), ('XM', 1),
+                ('XO', 1), ('XG', 4), ('MD', '37^ACCC29T18'),
+                ('XA', '5,+11707,36M1I48M,2;21,-48119779,46M1I38M,2;hs37d5,-10060835,40M1D45M,3;5,+11508,36M1I48M,3;hs37d5,+6743812,36M1I48M,3;19,-59118894,46M1I38M,3;4,-191044002,6M1I78M,3;')]
 
         r.tags = tags
-        r.tags += [("RG",rg)] * 100
-        tags += [("RG",rg)] * 100
-        
-        self.assertEqual( tags, r.tags )
+        r.tags += [("RG", rg)] * 100
+        tags += [("RG", rg)] * 100
+
+        self.assertEqual(tags, r.tags)
+
 
 class TestClipping(unittest.TestCase):
-    
-    def testClipping( self ):
-        
-        self.samfile = pysam.Samfile("softclip.bam", "rb" )
+
+    def testClipping(self):
+
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "softclip.bam"),
+                                     "rb")
         for read in self.samfile:
 
             if read.qname == "r001":
-                self.assertEqual( read.seq, b'AAAAGATAAGGATA' )
-                self.assertEqual( read.query, b'AGATAAGGATA' )
-                self.assertEqual( read.qual, None )
-                self.assertEqual( read.qqual, None )
-                
+                self.assertEqual(read.seq, b'AAAAGATAAGGATA')
+                self.assertEqual(read.query, b'AGATAAGGATA')
+                self.assertEqual(read.qual, None)
+                self.assertEqual(read.qqual, None)
+
             elif read.qname == "r002":
-                
-                self.assertEqual( read.seq, b'GCCTAAGCTAA' )
-                self.assertEqual( read.query, b'AGCTAA' )
-                self.assertEqual( read.qual, b'01234567890' )
-                self.assertEqual( read.qqual, b'567890' )
-            
+
+                self.assertEqual(read.seq, b'GCCTAAGCTAA')
+                self.assertEqual(read.query, b'AGCTAA')
+                self.assertEqual(read.qual, b'01234567890')
+                self.assertEqual(read.qqual, b'567890')
+
             elif read.qname == "r003":
-                
-                self.assertEqual( read.seq, b'GCCTAAGCTAA' )
-                self.assertEqual( read.query, b'GCCTAA' )
-                self.assertEqual( read.qual, b'01234567890' )
-                self.assertEqual( read.qqual, b'012345' )
+
+                self.assertEqual(read.seq, b'GCCTAAGCTAA')
+                self.assertEqual(read.query, b'GCCTAA')
+                self.assertEqual(read.qual, b'01234567890')
+                self.assertEqual(read.qqual, b'012345')
 
             elif read.qname == "r004":
-                
-                self.assertEqual( read.seq, b'TAGGC' )
-                self.assertEqual( read.query, b'TAGGC' )
-                self.assertEqual( read.qual, b'01234' )
-                self.assertEqual( read.qqual, b'01234' )
-                
+
+                self.assertEqual(read.seq, b'TAGGC')
+                self.assertEqual(read.query, b'TAGGC')
+                self.assertEqual(read.qual, b'01234')
+                self.assertEqual(read.qqual, b'01234')
+
+
 class TestIteratorRow(unittest.TestCase):
 
     def setUp(self):
-        self.samfile=pysam.Samfile( "ex1.bam","rb" )
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                     "rb")
 
-    def checkRange( self, rnge ):
+    def checkRange(self, rnge):
         '''compare results from iterator with those from samtools.'''
         ps = list(self.samfile.fetch(region=rnge))
-        sa = list(pysam.view( "ex1.bam", rnge, raw = True) )
-        self.assertEqual( len(ps), len(sa), "unequal number of results for range %s: %i != %i" % (rnge, len(ps), len(sa) ))
+        sa = list(pysam.view(os.path.join(DATADIR, "ex1.bam"),
+                             rnge,
+                             raw=True))
+        self.assertEqual(len(ps), len(
+            sa), "unequal number of results for range %s: %i != %i" % (rnge, len(ps), len(sa)))
         # check if the same reads are returned and in the same order
-        for line, (a, b) in enumerate( list(zip( ps, sa )) ):
+        for line, (a, b) in enumerate(list(zip(ps, sa))):
             d = b.split("\t")
-            self.assertEqual( a.qname, d[0], "line %i: read id mismatch: %s != %s" % (line, a.rname, d[0]) )
-            self.assertEqual( a.pos, int(d[3])-1, "line %i: read position mismatch: %s != %s, \n%s\n%s\n" % \
-                                  (line, a.pos, int(d[3])-1,
-                                   str(a), str(d) ) )
+            self.assertEqual(
+                a.qname, d[0], "line %i: read id mismatch: %s != %s" % (line, a.rname, d[0]))
+            self.assertEqual(a.pos, int(d[3]) - 1, "line %i: read position mismatch: %s != %s, \n%s\n%s\n" %
+                             (line, a.pos, int(d[3]) - 1,
+                              str(a), str(d)))
             if sys.version_info[0] < 3:
                 qual = d[10]
             else:
                 qual = d[10].encode('ascii')
-            self.assertEqual( a.qual, qual, "line %i: quality mismatch: %s != %s, \n%s\n%s\n" % \
-                                  (line, a.qual, qual,
-                                   str(a), str(d) ) )
+            self.assertEqual(a.qual, qual, "line %i: quality mismatch: %s != %s, \n%s\n%s\n" %
+                             (line, a.qual, qual,
+                              str(a), str(d)))
 
     def testIteratePerContig(self):
         '''check random access per contig'''
         for contig in self.samfile.references:
-            self.checkRange( contig )
+            self.checkRange(contig)
 
     def testIterateRanges(self):
         '''check random access per range'''
         for contig, length in zip(self.samfile.references, self.samfile.lengths):
-            for start in range( 1, length, 90):
-                self.checkRange( "%s:%i-%i" % (contig, start, start + 90) ) # this includes empty ranges
+            for start in range(1, length, 90):
+                # this includes empty ranges
+                self.checkRange("%s:%i-%i" % (contig, start, start + 90))
 
     def tearDown(self):
         self.samfile.close()
@@ -744,522 +771,398 @@ class TestIteratorRow(unittest.TestCase):
 class TestIteratorRowAll(unittest.TestCase):
 
     def setUp(self):
-        self.samfile=pysam.Samfile( "ex1.bam","rb" )
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                     "rb")
 
     def testIterate(self):
         '''compare results from iterator with those from samtools.'''
         ps = list(self.samfile.fetch())
-        sa = list(pysam.view( "ex1.bam", raw = True) )
-        self.assertEqual( len(ps), len(sa), "unequal number of results: %i != %i" % (len(ps), len(sa) ))
+        sa = list(pysam.view(os.path.join(DATADIR, "ex1.bam"),
+                             raw=True))
+        self.assertEqual(
+            len(ps), len(sa), "unequal number of results: %i != %i" % (len(ps), len(sa)))
         # check if the same reads are returned
-        for line, pair in enumerate( list(zip( ps, sa )) ):
+        for line, pair in enumerate(list(zip(ps, sa))):
             data = pair[1].split("\t")
-            self.assertEqual( pair[0].qname, data[0], "read id mismatch in line %i: %s != %s" % (line, pair[0].rname, data[0]) )
+            self.assertEqual(pair[0].qname, data[
+                             0], "read id mismatch in line %i: %s != %s" % (line, pair[0].rname, data[0]))
 
     def tearDown(self):
         self.samfile.close()
 
+
 class TestIteratorColumn(unittest.TestCase):
+
     '''test iterator column against contents of ex4.bam.'''
-    
+
     # note that samfile contains 1-based coordinates
     # 1D means deletion with respect to reference sequence
-    # 
-    mCoverages = { 'chr1' : [ 0 ] * 20 + [1] * 36 + [0] * (100 - 20 -35 ),
-                   'chr2' : [ 0 ] * 20 + [1] * 35 + [0] * (100 - 20 -35 ),
-                   }
+    #
+    mCoverages = {'chr1': [0] * 20 + [1] * 36 + [0] * (100 - 20 - 35),
+                  'chr2': [0] * 20 + [1] * 35 + [0] * (100 - 20 - 35),
+                  }
 
     def setUp(self):
-        self.samfile=pysam.Samfile( "ex4.bam","rb" )
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "ex4.bam"),
+                                     "rb")
 
-    def checkRange( self, contig, start = None, end = None, truncate = False ):
+    def checkRange(self, contig, start=None, end=None, truncate=False):
         '''compare results from iterator with those from samtools.'''
         # check if the same reads are returned and in the same order
-        for column in self.samfile.pileup(contig, start, end, truncate = truncate):
+        for column in self.samfile.pileup(contig, start, end, truncate=truncate):
             if truncate:
-                self.assertGreaterEqual( column.pos, start )
-                self.assertLess( column.pos, end )
+                self.assertGreaterEqual(column.pos, start)
+                self.assertLess(column.pos, end)
             thiscov = len(column.pileups)
-            refcov = self.mCoverages[self.samfile.getrname(column.tid)][column.pos]
-            self.assertEqual( thiscov, refcov, "wrong coverage at pos %s:%i %i should be %i" % (self.samfile.getrname(column.tid), column.pos, thiscov, refcov))
+            refcov = self.mCoverages[
+                self.samfile.getrname(column.tid)][column.pos]
+            self.assertEqual(thiscov, refcov, "wrong coverage at pos %s:%i %i should be %i" % (
+                self.samfile.getrname(column.tid), column.pos, thiscov, refcov))
 
     def testIterateAll(self):
         '''check random access per contig'''
-        self.checkRange( None )
+        self.checkRange(None)
 
     def testIteratePerContig(self):
         '''check random access per contig'''
         for contig in self.samfile.references:
-            self.checkRange( contig )
+            self.checkRange(contig)
 
     def testIterateRanges(self):
         '''check random access per range'''
         for contig, length in zip(self.samfile.references, self.samfile.lengths):
-            for start in range( 1, length, 90):
-                self.checkRange( contig, start, start + 90 ) # this includes empty ranges
+            for start in range(1, length, 90):
+                # this includes empty ranges
+                self.checkRange(contig, start, start + 90)
 
-    def testInverse( self ):
+    def testInverse(self):
         '''test the inverse, is point-wise pileup accurate.'''
         for contig, refseq in list(self.mCoverages.items()):
             refcolumns = sum(refseq)
-            for pos, refcov in enumerate( refseq ):
-                columns = list(self.samfile.pileup( contig, pos, pos+1) )
+            for pos, refcov in enumerate(refseq):
+                columns = list(self.samfile.pileup(contig, pos, pos + 1))
                 if refcov == 0:
                     # if no read, no coverage
-                    self.assertEqual( len(columns), refcov, "wrong number of pileup columns returned for position %s:%i, %i should be %i" %(contig,pos,len(columns), refcov) )
+                    self.assertEqual(
+                        len(columns),
+                        refcov,
+                        "wrong number of pileup columns returned for position %s:%i, %i should be %i" % (
+                            contig, pos,
+                            len(columns), refcov))
                 elif refcov == 1:
                     # one read, all columns of the read are returned
-                    self.assertEqual( len(columns), refcolumns, "pileup incomplete at position %i: got %i, expected %i " %\
-                                          (pos, len(columns), refcolumns))
+                    self.assertEqual(
+                        len(columns),
+                        refcolumns,
+                        "pileup incomplete at position %i: got %i, expected %i " %
+                        (pos, len(columns), refcolumns))
 
-    def testIterateTruncate( self ):
+    def testIterateTruncate(self):
         '''check random access per range'''
         for contig, length in zip(self.samfile.references, self.samfile.lengths):
-            for start in range( 1, length, 90):
-                self.checkRange( contig, start, start + 90, truncate = True ) # this includes empty ranges
-                
+            for start in range(1, length, 90):
+                # this includes empty ranges
+                self.checkRange(contig, start, start + 90, truncate=True)
+
     def tearDown(self):
         self.samfile.close()
 
+
 class TestIteratorColumn2(unittest.TestCase):
+
     '''test iterator column against contents of ex1.bam.'''
 
     def setUp(self):
-        self.samfile=pysam.Samfile( "ex1.bam","rb" )
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                     "rb")
 
-    def testStart( self ):
-        #print self.samfile.fetch().next().pos
-        #print self.samfile.pileup().next().pos
+    def testStart(self):
+        # print self.samfile.fetch().next().pos
+        # print self.samfile.pileup().next().pos
         pass
 
-    def testTruncate( self ):
+    def testTruncate(self):
         '''see issue 107.'''
         # note that ranges in regions start from 1
         p = self.samfile.pileup(region='chr1:170:172', truncate=True)
-        columns = [ x.pos for x in p ]
-        self.assertEqual( len(columns), 3)
-        self.assertEqual( columns, [169,170,171] )
+        columns = [x.pos for x in p]
+        self.assertEqual(len(columns), 3)
+        self.assertEqual(columns, [169, 170, 171])
+
+        p = self.samfile.pileup('chr1', 169, 172, truncate=True)
+        columns = [x.pos for x in p]
 
-        p = self.samfile.pileup( 'chr1', 169, 172, truncate=True)
-        columns = [ x.pos for x in p ]
-    
-        self.assertEqual( len(columns), 3)
-        self.assertEqual( columns, [169,170,171] )
+        self.assertEqual(len(columns), 3)
+        self.assertEqual(columns, [169, 170, 171])
 
-    def testAccessOnClosedIterator( self ):
+    def testAccessOnClosedIterator(self):
         '''see issue 131
 
         Accessing pileup data after iterator has closed.
         '''
-        pcolumn = self.samfile.pileup( 'chr1', 170, 180).__next__()
-        self.assertRaises( ValueError, getattr, pcolumn, "pileups" )
-
-class TestAlignedReadFromBam(unittest.TestCase):
-
-    def setUp(self):
-        self.samfile=pysam.Samfile( "ex3.bam","rb" )
-        self.reads=list(self.samfile.fetch())
-
-    def testARqname(self):
-        self.assertEqual( self.reads[0].qname, "read_28833_29006_6945", "read name mismatch in read 1: %s != %s" % (self.reads[0].qname, "read_28833_29006_6945") )
-        self.assertEqual( self.reads[1].qname, "read_28701_28881_323b", "read name mismatch in read 2: %s != %s" % (self.reads[1].qname, "read_28701_28881_323b") )
-
-    def testARflag(self):
-        self.assertEqual( self.reads[0].flag, 99, "flag mismatch in read 1: %s != %s" % (self.reads[0].flag, 99) )
-        self.assertEqual( self.reads[1].flag, 147, "flag mismatch in read 2: %s != %s" % (self.reads[1].flag, 147) )
-
-    def testARrname(self):
-        self.assertEqual( self.reads[0].rname, 0, "chromosome/target id mismatch in read 1: %s != %s" % (self.reads[0].rname, 0) )
-        self.assertEqual( self.reads[1].rname, 1, "chromosome/target id mismatch in read 2: %s != %s" % (self.reads[1].rname, 1) )
-
-    def testARpos(self):
-        self.assertEqual( self.reads[0].pos, 33-1, "mapping position mismatch in read 1: %s != %s" % (self.reads[0].pos, 33-1) )
-        self.assertEqual( self.reads[1].pos, 88-1, "mapping position mismatch in read 2: %s != %s" % (self.reads[1].pos, 88-1) )
-
-    def testARmapq(self):
-        self.assertEqual( self.reads[0].mapq, 20, "mapping quality mismatch in read 1: %s != %s" % (self.reads[0].mapq, 20) )
-        self.assertEqual( self.reads[1].mapq, 30, "mapping quality mismatch in read 2: %s != %s" % (self.reads[1].mapq, 30) )
-
-    def testARcigar(self):
-        self.assertEqual( self.reads[0].cigar, [(0, 10), (2, 1), (0, 25)], "read name length mismatch in read 1: %s != %s" % (self.reads[0].cigar, [(0, 10), (2, 1), (0, 25)]) )
-        self.assertEqual( self.reads[1].cigar, [(0, 35)], "read name length mismatch in read 2: %s != %s" % (self.reads[1].cigar, [(0, 35)]) )
-
-    def testARcigarstring(self):
-        self.assertEqual( self.reads[0].cigarstring, '10M1D25M' )
-        self.assertEqual( self.reads[1].cigarstring, '35M' )
-
-    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, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG", "sequence mismatch in read 1: %s != %s" % (self.reads[0].seq, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG") )
-        self.assertEqual( self.reads[1].seq, b"ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA", "sequence size mismatch in read 2: %s != %s" % (self.reads[1].seq, b"ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA") )
-        self.assertEqual( self.reads[3].seq, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG", "sequence mismatch in read 4: %s != %s" % (self.reads[3].seq, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG") )
-
-    def testARqual(self):
-        self.assertEqual( self.reads[0].qual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<", "quality string mismatch in read 1: %s != %s" % (self.reads[0].qual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<") )
-        self.assertEqual( self.reads[1].qual, b"<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<", "quality string mismatch in read 2: %s != %s" % (self.reads[1].qual, b"<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<") )
-        self.assertEqual( self.reads[3].qual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<", "quality string mismatch in read 3: %s != %s" % (self.reads[3].qual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<") )
-
-    def testARquery(self):
-        self.assertEqual( self.reads[0].query, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG", "query mismatch in read 1: %s != %s" % (self.reads[0].query, b"AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG") )
-        self.assertEqual( self.reads[1].query, b"ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA", "query size mismatch in read 2: %s != %s" % (self.reads[1].query, b"ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA") )
-        self.assertEqual( self.reads[3].query, b"TAGCTAGCTACCTATATCTTGGTCTT", "query mismatch in read 4: %s != %s" % (self.reads[3].query, b"TAGCTAGCTACCTATATCTTGGTCTT") )
-
-    def testARqqual(self):
-        self.assertEqual( self.reads[0].qqual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<", "qquality string mismatch in read 1: %s != %s" % (self.reads[0].qqual, b"<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<") )
-        self.assertEqual( self.reads[1].qqual, b"<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<", "qquality string mismatch in read 2: %s != %s" % (self.reads[1].qqual, b"<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<") )
-        self.assertEqual( self.reads[3].qqual, b"<<<<<<<<<<<<<<<<<:<9/,&,22", "qquality string mismatch in read 3: %s != %s" % (self.reads[3].qqual, b"<<<<<<<<<<<<<<<<<:<9/,&,22") )
-
-    def testPresentOptionalFields(self):
-        self.assertEqual( self.reads[0].opt('NM'), 1, "optional field mismatch in read 1, NM: %s != %s" % (self.reads[0].opt('NM'), 1) )
-        self.assertEqual( self.reads[0].opt('RG'), 'L1', "optional field mismatch in read 1, RG: %s != %s" % (self.reads[0].opt('RG'), 'L1') )
-        self.assertEqual( self.reads[1].opt('RG'), 'L2', "optional field mismatch in read 2, RG: %s != %s" % (self.reads[1].opt('RG'), 'L2') )
-        self.assertEqual( self.reads[1].opt('MF'), 18, "optional field mismatch in read 2, MF: %s != %s" % (self.reads[1].opt('MF'), 18) )
-
-    def testPairedBools(self):
-        self.assertEqual( self.reads[0].is_paired, True, "is paired mismatch in read 1: %s != %s" % (self.reads[0].is_paired, True) )
-        self.assertEqual( self.reads[1].is_paired, True, "is paired mismatch in read 2: %s != %s" % (self.reads[1].is_paired, True) )
-        self.assertEqual( self.reads[0].is_proper_pair, True, "is proper pair mismatch in read 1: %s != %s" % (self.reads[0].is_proper_pair, True) )
-        self.assertEqual( self.reads[1].is_proper_pair, True, "is proper pair mismatch in read 2: %s != %s" % (self.reads[1].is_proper_pair, True) )
-
-    def testTags( self ):
-        self.assertEqual( self.reads[0].tags, 
-                          [('NM', 1), ('RG', 'L1'), 
-                           ('PG', 'P1'), ('XT', 'U')] )
-        self.assertEqual( self.reads[1].tags, 
-                          [('MF', 18), ('RG', 'L2'), 
-                           ('PG', 'P2'),('XT', 'R') ] )
-
-    def testOpt( self ):
-        self.assertEqual( self.reads[0].opt("XT"), "U" )
-        self.assertEqual( self.reads[1].opt("XT"), "R" )
-
-    def testMissingOpt( self ):
-        self.assertRaises( KeyError, self.reads[0].opt, "XP" )
-
-    def testEmptyOpt( self ):
-        self.assertRaises( KeyError, self.reads[2].opt, "XT" )
-
-    def tearDown(self):
-        self.samfile.close()
-
-class TestAlignedReadFromSam(TestAlignedReadFromBam):
-
-    def setUp(self):
-        self.samfile=pysam.Samfile( "ex3.sam","r" )
-        self.reads=list(self.samfile.fetch())
+        pcolumn = self.samfile.pileup('chr1', 170, 180).__next__()
+        self.assertRaises(ValueError, getattr, pcolumn, "pileups")
 
-# needs to be implemented 
-# class TestAlignedReadFromSamWithoutHeader(TestAlignedReadFromBam):
-#
-#     def setUp(self):
-#         self.samfile=pysam.Samfile( "ex7.sam","r" )
-#         self.reads=list(self.samfile.fetch())
 
 class TestHeaderSam(unittest.TestCase):
 
-    header = {'SQ': [{'LN': 1575, 'SN': 'chr1'}, 
-                     {'LN': 1584, 'SN': 'chr2'}], 
-              'RG': [{'LB': 'SC_1', 'ID': 'L1', 'SM': 'NA12891', 'PU': 'SC_1_10', "CN":"name:with:colon"}, 
-                     {'LB': 'SC_2', 'ID': 'L2', 'SM': 'NA12891', 'PU': 'SC_2_12', "CN":"name:with:colon"}],
-              'PG': [{'ID': 'P1', 'VN': '1.0'}, {'ID': 'P2', 'VN': '1.1'}], 
+    header = {'SQ': [{'LN': 1575, 'SN': 'chr1'},
+                     {'LN': 1584, 'SN': 'chr2'}],
+              'RG': [{'LB': 'SC_1', 'ID': 'L1', 'SM': 'NA12891', 'PU': 'SC_1_10', "CN": "name:with:colon"},
+                     {'LB': 'SC_2', 'ID': 'L2', 'SM': 'NA12891', 'PU': 'SC_2_12', "CN": "name:with:colon"}],
+              'PG': [{'ID': 'P1', 'VN': '1.0'}, {'ID': 'P2', 'VN': '1.1'}],
               'HD': {'VN': '1.0'},
-              'CO' : [ 'this is a comment', 'this is another comment'],
+              'CO': ['this is a comment', 'this is another comment'],
               }
 
-    def compareHeaders( self, a, b ):
+    def compareHeaders(self, a, b):
         '''compare two headers a and b.'''
-        for ak,av in a.items():
-            self.assertTrue( ak in b, "key '%s' not in '%s' " % (ak,b) )
-            self.assertEqual( av, b[ak] )
+        for ak, av in a.items():
+            self.assertTrue(ak in b, "key '%s' not in '%s' " % (ak, b))
+            self.assertEqual(av, b[ak])
 
     def setUp(self):
-        self.samfile=pysam.Samfile( "ex3.sam","r" )
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "ex3.sam"),
+                                     "r")
 
     def testHeaders(self):
-        self.compareHeaders( self.header, self.samfile.header )
-        self.compareHeaders( self.samfile.header, self.header )
+        self.compareHeaders(self.header, self.samfile.header)
+        self.compareHeaders(self.samfile.header, self.header)
 
-    def testNameMapping( self ):
-        for x, y in enumerate( ("chr1", "chr2")):
-            tid = self.samfile.gettid( y )
-            ref = self.samfile.getrname( x )
-            self.assertEqual( tid, x )
-            self.assertEqual( ref, y )
+    def testNameMapping(self):
+        for x, y in enumerate(("chr1", "chr2")):
+            tid = self.samfile.gettid(y)
+            ref = self.samfile.getrname(x)
+            self.assertEqual(tid, x)
+            self.assertEqual(ref, y)
 
-        self.assertEqual( self.samfile.gettid("chr?"), -1 )
-        self.assertRaises( ValueError, self.samfile.getrname, 2 )
+        self.assertEqual(self.samfile.gettid("chr?"), -1)
+        self.assertRaises(ValueError, self.samfile.getrname, 2)
 
     def tearDown(self):
         self.samfile.close()
 
+
 class TestHeaderBam(TestHeaderSam):
 
     def setUp(self):
-        self.samfile=pysam.Samfile( "ex3.bam","rb" )
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "ex3.bam"),
+                                     "rb")
+
+
+class TestHeaderFromRefs(unittest.TestCase):
 
-class TestHeaderFromRefs( unittest.TestCase ):
     '''see issue 144
 
     reference names need to be converted to string for python 3
     '''
 
-    def testHeader( self ):
-        refs = ['chr1', 'chr2']
-        tmpfile = "tmp_%i" % id(self)
-        s = pysam.Samfile(tmpfile, 'wb', 
-                          referencenames=refs, 
-                          referencelengths=[100]*len(refs))
-        s.close()
-        
-        self.assertTrue( checkBinaryEqual( 'issue144.bam', tmpfile ),
-                         'bam files differ')
-        os.unlink( tmpfile )
-        
-class TestHeader1000Genomes( unittest.TestCase ):
+    # def testHeader( self ):
+    #     refs = ['chr1', 'chr2']
+    #     tmpfile = "tmp_%i" % id(self)
+    #     s = pysam.Samfile(tmpfile, 'wb',
+    #                       referencenames=refs,
+    #                       referencelengths=[100]*len(refs))
+    #     s.close()
+
+    #     self.assertTrue( checkBinaryEqual( 'issue144.bam', tmpfile ),
+    #                      'bam files differ')
+    #     os.unlink( tmpfile )
+
 
+class TestHeader1000Genomes(unittest.TestCase):
+    '''see issue 110'''
     # bamfile = "http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/phase2b_alignment/data/NA07048/exome_alignment/NA07048.unmapped.ILLUMINA.bwa.CEU.exome.20120522_p2b.bam"
     bamfile = "http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/phase3_EX_or_LC_only_alignment/data/HG00104/alignment/HG00104.chrom11.ILLUMINA.bwa.GBR.low_coverage.20130415.bam"
-        
-    def testRead( self ):
 
-        f = pysam.Samfile( self.bamfile, "rb" )
+    def testRead(self):
+
+        f = pysam.Samfile(self.bamfile, "rb")
         data = f.header.copy()
-        self.assertTrue( data )
+        self.assertTrue(data)
+
 
 class TestUnmappedReads(unittest.TestCase):
 
-    def testSAM(self):
-        samfile=pysam.Samfile( "ex5.sam","r" )
-        self.assertEqual( len(list(samfile.fetch( until_eof = True))), 2 ) 
-        samfile.close()
+    # TODO
+    # def testSAM(self):
+    #     samfile = pysam.Samfile(os.path.join(DATADIR, "ex5.sam"),
+    #                             "r")
+    #     self.assertEqual(len(list(samfile.fetch(until_eof=True))), 2)
+    #     samfile.close()
 
     def testBAM(self):
-        samfile=pysam.Samfile( "ex5.bam","rb" )
-        self.assertEqual( len(list(samfile.fetch( until_eof = True))), 2 ) 
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex5.bam"),
+                                "rb")
+        self.assertEqual(len(list(samfile.fetch(until_eof=True))), 2)
         samfile.close()
 
+
 class TestPileupObjects(unittest.TestCase):
 
     def setUp(self):
-        self.samfile=pysam.Samfile( "ex1.bam","rb" )
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                     "rb")
 
     def testPileupColumn(self):
-        for pcolumn1 in self.samfile.pileup( region="chr1:105" ):
+        for pcolumn1 in self.samfile.pileup(region="chr1:105"):
             if pcolumn1.pos == 104:
-                self.assertEqual( pcolumn1.tid, 0, "chromosome/target id mismatch in position 1: %s != %s" % (pcolumn1.tid, 0) )
-                self.assertEqual( pcolumn1.pos, 105-1, "position mismatch in position 1: %s != %s" % (pcolumn1.pos, 105-1) )
-                self.assertEqual( pcolumn1.n, 2, "# reads mismatch in position 1: %s != %s" % (pcolumn1.n, 2) )
-        for pcolumn2 in self.samfile.pileup( region="chr2:1480" ):
+                self.assertEqual(
+                    pcolumn1.tid, 0, "chromosome/target id mismatch in position 1: %s != %s" % (pcolumn1.tid, 0))
+                self.assertEqual(
+                    pcolumn1.pos, 105 - 1, "position mismatch in position 1: %s != %s" % (pcolumn1.pos, 105 - 1))
+                self.assertEqual(
+                    pcolumn1.n, 2, "# reads mismatch in position 1: %s != %s" % (pcolumn1.n, 2))
+        for pcolumn2 in self.samfile.pileup(region="chr2:1480"):
             if pcolumn2.pos == 1479:
-                self.assertEqual( pcolumn2.tid, 1, "chromosome/target id mismatch in position 1: %s != %s" % (pcolumn2.tid, 1) )
-                self.assertEqual( pcolumn2.pos, 1480-1, "position mismatch in position 1: %s != %s" % (pcolumn2.pos, 1480-1) )
-                self.assertEqual( pcolumn2.n, 12, "# reads mismatch in position 1: %s != %s" % (pcolumn2.n, 12) )
+                self.assertEqual(
+                    pcolumn2.tid, 1, "chromosome/target id mismatch in position 1: %s != %s" % (pcolumn2.tid, 1))
+                self.assertEqual(
+                    pcolumn2.pos, 1480 - 1, "position mismatch in position 1: %s != %s" % (pcolumn2.pos, 1480 - 1))
+                self.assertEqual(
+                    pcolumn2.n, 12, "# reads mismatch in position 1: %s != %s" % (pcolumn2.n, 12))
 
     def testPileupRead(self):
-        for pcolumn1 in self.samfile.pileup( region="chr1:105" ):
+        for pcolumn1 in self.samfile.pileup(region="chr1:105"):
             if pcolumn1.pos == 104:
-                self.assertEqual( len(pcolumn1.pileups), 2, "# reads aligned to column mismatch in position 1: %s != %s" % (len(pcolumn1.pileups), 2) )
-#                self.assertEqual( pcolumn1.pileups[0]  # need to test additional properties here
+                self.assertEqual(
+                    len(pcolumn1.pileups), 2,
+                    "# reads aligned to column mismatch in position 1"
+                    ": %s != %s" %
+                    (len(pcolumn1.pileups), 2))
+
+
+# self.assertEqual( pcolumn1.pileups[0]  # need to test additional
+# properties here
 
     def tearDown(self):
         self.samfile.close()
 
-    def testIteratorOutOfScope( self ):
-        '''test if exception is raised if pileup col is accessed after iterator is exhausted.'''
+    def testIteratorOutOfScope(self):
+        '''test if exception is raised if pileup col is accessed after
+        iterator is exhausted.'''
 
         for pileupcol in self.samfile.pileup():
             pass
-        
-        self.assertRaises( ValueError, getattr, pileupcol, "pileups" )
+
+        self.assertRaises(ValueError, getattr, pileupcol, "pileups")
+
 
 class TestContextManager(unittest.TestCase):
 
-    def testManager( self ):
-        with pysam.Samfile('ex1.bam', 'rb') as samfile:
+    def testManager(self):
+        with pysam.Samfile(os.path.join(DATADIR, 'ex1.bam'),
+                           'rb') as samfile:
             samfile.fetch()
-        self.assertEqual( samfile._isOpen(), False )
+        self.assertEqual(samfile._isOpen(), False)
+
 
 class TestExceptions(unittest.TestCase):
 
     def setUp(self):
-        self.samfile=pysam.Samfile( "ex1.bam","rb" )
+        self.samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                     "rb")
 
     def testMissingFile(self):
 
-        self.assertRaises( IOError, pysam.Samfile, "exdoesntexist.bam", "rb" )
-        self.assertRaises( IOError, pysam.Samfile, "exdoesntexist.sam", "r" )
-        self.assertRaises( IOError, pysam.Samfile, "exdoesntexist.bam", "r" )
-        self.assertRaises( IOError, pysam.Samfile, "exdoesntexist.sam", "rb" )
+        self.assertRaises(IOError, pysam.Samfile, "exdoesntexist.bam", "rb")
+        self.assertRaises(IOError, pysam.Samfile, "exdoesntexist.sam", "r")
+        self.assertRaises(IOError, pysam.Samfile, "exdoesntexist.bam", "r")
+        self.assertRaises(IOError, pysam.Samfile, "exdoesntexist.sam", "rb")
 
     def testBadContig(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr88" )
+        self.assertRaises(ValueError, self.samfile.fetch, "chr88")
 
     def testMeaninglessCrap(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "skljf" )
+        self.assertRaises(ValueError, self.samfile.fetch, "skljf")
 
     def testBackwardsOrderNewFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, 'chr1', 100, 10 )
+        self.assertRaises(ValueError, self.samfile.fetch, 'chr1', 100, 10)
 
     def testBackwardsOrderOldFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, region="chr1:100-10")
-        
+        self.assertRaises(ValueError, self.samfile.fetch, region="chr1:100-10")
+
     def testOutOfRangeNegativeNewFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", 5, -10 )
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", 5, 0 )
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", -5, -10 )
+        self.assertRaises(ValueError, self.samfile.fetch, "chr1", 5, -10)
+        self.assertRaises(ValueError, self.samfile.fetch, "chr1", 5, 0)
+        self.assertRaises(ValueError, self.samfile.fetch, "chr1", -5, -10)
 
-        self.assertRaises( ValueError, self.samfile.count, "chr1", 5, -10 )
-        self.assertRaises( ValueError, self.samfile.count, "chr1", 5, 0 )        
-        self.assertRaises( ValueError, self.samfile.count, "chr1", -5, -10 )
+        self.assertRaises(ValueError, self.samfile.count, "chr1", 5, -10)
+        self.assertRaises(ValueError, self.samfile.count, "chr1", 5, 0)
+        self.assertRaises(ValueError, self.samfile.count, "chr1", -5, -10)
 
     def testOutOfRangeNegativeOldFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, region="chr1:-5-10" )
-        self.assertRaises( ValueError, self.samfile.fetch, region="chr1:-5-0" )
-        self.assertRaises( ValueError, self.samfile.fetch, region="chr1:-5--10" )
+        self.assertRaises(ValueError, self.samfile.fetch, region="chr1:-5-10")
+        self.assertRaises(ValueError, self.samfile.fetch, region="chr1:-5-0")
+        self.assertRaises(ValueError, self.samfile.fetch, region="chr1:-5--10")
 
-        self.assertRaises( ValueError, self.samfile.count, region="chr1:-5-10" )
-        self.assertRaises( ValueError, self.samfile.count, region="chr1:-5-0" )
-        self.assertRaises( ValueError, self.samfile.count, region="chr1:-5--10" )
+        self.assertRaises(ValueError, self.samfile.count, region="chr1:-5-10")
+        self.assertRaises(ValueError, self.samfile.count, region="chr1:-5-0")
+        self.assertRaises(ValueError, self.samfile.count, region="chr1:-5--10")
 
     def testOutOfRangNewFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", 9999999999, 99999999999 )
-        self.assertRaises( ValueError, self.samfile.count, "chr1", 9999999999, 99999999999 )
+        self.assertRaises(
+            ValueError, self.samfile.fetch, "chr1", 9999999999, 99999999999)
+        self.assertRaises(
+            ValueError, self.samfile.count, "chr1", 9999999999, 99999999999)
 
     def testOutOfRangeLargeNewFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", 9999999999999999999999999999999, 9999999999999999999999999999999999999999 )
-        self.assertRaises( ValueError, self.samfile.count, "chr1", 9999999999999999999999999999999, 9999999999999999999999999999999999999999 )
+        self.assertRaises(ValueError, self.samfile.fetch, "chr1",
+                          9999999999999999999999999999999, 9999999999999999999999999999999999999999)
+        self.assertRaises(ValueError, self.samfile.count, "chr1",
+                          9999999999999999999999999999999, 9999999999999999999999999999999999999999)
 
     def testOutOfRangeLargeOldFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1:99999999999999999-999999999999999999" )
-        self.assertRaises( ValueError, self.samfile.count, "chr1:99999999999999999-999999999999999999" )
+        self.assertRaises(
+            ValueError, self.samfile.fetch, "chr1:99999999999999999-999999999999999999")
+        self.assertRaises(
+            ValueError, self.samfile.count, "chr1:99999999999999999-999999999999999999")
 
-    def testZeroToZero(self):        
+    def testZeroToZero(self):
         '''see issue 44'''
-        self.assertEqual( len(list(self.samfile.fetch('chr1', 0, 0))), 0)
+        self.assertEqual(len(list(self.samfile.fetch('chr1', 0, 0))), 0)
 
     def tearDown(self):
         self.samfile.close()
 
+
 class TestWrongFormat(unittest.TestCase):
+
     '''test cases for opening files not in bam/sam format.'''
 
-    def testOpenSamAsBam( self ):
-        self.assertRaises( ValueError, pysam.Samfile, 'ex1.sam', 'rb' )
+    def testOpenSamAsBam(self):
+        self.assertRaises(ValueError,
+                          pysam.Samfile,
+                          os.path.join(DATADIR, 'ex1.sam'),
+                          'rb')
 
-    def testOpenBamAsSam( self ):
+    def testOpenBamAsSam(self):
         # 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 ):
+    def testOpenFastaAsSam(self):
         # 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' )
-
-class TestFastaFile(unittest.TestCase):
-
-    mSequences = { 'chr1' :
-                       b"CACTAGTGGCTCATTGTAAATGTGTGGTTTAACTCGTCCATGGCCCAGCATTAGGGAGCTGTGGACCCTGCAGCCTGGCTGTGGGGGCCGCAGTGGCTGAGGGGTGCAGAGCCGAGTCACGGGGTTGCCAGCACAGGGGCTTAACCTCTGGTGACTGCCAGAGCTGCTGGCAAGCTAGAGTCCCATTTGGAGCCCCTCTAAGCCGTTCTATTTGTAATGAAAACTATATTTATGCTATTCAGTTCTAAATATAGAAATTGAAACAGCTGTGTTTAGTGCCTTTGTTCAACCCCCTTGCAACAACCTTGAGAACCCCAGGGAATTTGTCAATGTCAGGGAAGGAGCATTTTGTCAGTTACCAAATGTGTTTATTACCAGAGGGATGGAGGGAAGAGGGACGCTGAAGAACTTTGATGCCCTCTTCTTCCAAAGATGAAACGCGTAACTGCGCTCTCATTCACTCCAGC [...]
-                   'chr2' :
-                       b"TTCAAATGAACTTCTGTAATTGAAAAATTCATTTAAGAAATTACAAAATATAGTTGAAAGCTCTAACAATAGACTAAACCAAGCAGAAGAAAGAGGTTCAGAACTTGAAGACAAGTCTCTTATGAATTAACCCAGTCAGACAAAAATAAAGAAAAAAATTTTAAAAATGAACAGAGCTTTCAAGAAGTATGAGATTATGTAAAGTAACTGAACCTATGAGTCACAGGTATTCCTGAGGAAAAAGAAAAAGTGAGAAGTTTGGAAAAACTATTTGAGGAAGTAATTGGGGAAAACCTCTTTAGTCTTGCTAGAGATTTAGACATCTAAATGAAAGAGGCTCAAAGAATGCCAGGAAGATACATTGCAAGACAGACTTCATCAAGATATGTAGTCATCAGACTATCTAAAGTCAACATGAAGGAAAAAAATTCTAAAATCAGCAAGAGAAAAGCATACAGTCATCTATA [...]
-                   }
-
-    def setUp(self):
-        self.file=pysam.Fastafile( "ex1.fa" )
-
-    def testFetch(self):
-        for id, seq in list(self.mSequences.items()):
-            self.assertEqual( seq, self.file.fetch( id ) )
-            for x in range( 0, len(seq), 10):
-                self.assertEqual( seq[x:x+10], self.file.fetch( id, x, x+10) )
-                # test x:end
-                self.assertEqual( seq[x:], self.file.fetch( id, x) )
-                # test 0:x
-                self.assertEqual( seq[:x], self.file.fetch( id, None, x) )
-
-        
-        # unknown sequence returns ""
-        # change: should be an IndexError
-        self.assertEqual( b"", self.file.fetch("chr12") )
-
-    def testOutOfRangeAccess( self ):
-        '''test out of range access.'''
-        # out of range access returns an empty string
-        for contig, s in self.mSequences.items():
-            self.assertEqual( self.file.fetch( contig, len(s), len(s)+1), b"" )
-
-        self.assertEqual( self.file.fetch( "chr3", 0 , 100), b"" ) 
-
-    def testFetchErrors( self ):
-        self.assertRaises( ValueError, self.file.fetch )
-        self.assertRaises( IndexError, self.file.fetch, "chr1", -1, 10 )
-        self.assertRaises( ValueError, self.file.fetch, "chr1", 20, 10 )
-        
-        # does not work yet
-        # self.assertRaises( KeyError, self.file.fetch, "chrX" )
-
-    def testLength( self ):
-        self.assertEqual( len(self.file), 2 )
-        
-    def testSequenceLengths( self ):
-        self.assertEqual( 1575, self.file.getReferenceLength( "chr1" ) )
-        self.assertEqual( 1584, self.file.getReferenceLength( "chr2" ) )
-
-    def tearDown(self):
-        self.file.close()
-
-class TestFastqFile(unittest.TestCase):
-
-    def setUp(self):
-        self.file=pysam.Fastqfile( "ex1.fq" )
+    def testOpenFastaAsBam(self):
+        self.assertRaises(ValueError,
+                          pysam.Samfile,
+                          os.path.join(DATADIR, 'ex1.fa'),
+                          'rb')
 
-    def testCounts( self ):
-        self.assertEqual( len( [ x for x in self.file ] ), 3270 )
 
-    def testMissingFile( self ):
-        self.assertRaises( IOError, pysam.Fastqfile, "nothere.fq" )
-
-    def testSequence( self ):
-        s = self.file.__next__()
-        # test first entry
-        self.assertEqual( s.sequence, b"GGGAACAGGGGGGTGCACTAATGCGCTCCACGCCC")
-        self.assertEqual( s.quality, b"<<86<<;<78<<<)<;4<67<;<;<74-7;,;8,;")
-        self.assertEqual( s.name, b"B7_589:1:101:825:28" )
-
-        for s in self.file: pass
-        # test last entry
-        self.assertEqual( s.sequence, b"TAATTGAAAAATTCATTTAAGAAATTACAAAATAT")
-        self.assertEqual( s.quality, b"<<<<<;<<<<<<<<<<<<<<<;;;<<<;<<8;<;<")
-        self.assertEqual( s.name, b"EAS56_65:8:64:507:478" )
 
 class TestAlignedRead(unittest.TestCase):
+
     '''tests to check if aligned read can be constructed
     and manipulated.
     '''
 
-    def checkFieldEqual( self, read1, read2, exclude = []):
+    def checkFieldEqual(self, read1, read2, exclude=[]):
         '''check if two reads are equal by comparing each field.'''
 
         for x in ("qname", "seq", "flag",
@@ -1271,43 +1174,47 @@ class TestAlignedRead(unittest.TestCase):
                   "is_read1", "is_read2",
                   "is_secondary", "is_qcfail",
                   "is_duplicate", "bin"):
-            if x in exclude: continue
-            self.assertEqual( getattr(read1, x), getattr(read2,x), "attribute mismatch for %s: %s != %s" % 
-                              (x, getattr(read1, x), getattr(read2,x)))
-    
-    def testEmpty( self ):
+            if x in exclude:
+                continue
+            self.assertEqual(
+                getattr(read1, x),
+                getattr(read2, x),
+                "attribute mismatch for %s: %s != %s" %
+                (x, getattr(read1, x), getattr(read2, x)))
+
+    def testEmpty(self):
         a = pysam.AlignedRead()
-        self.assertEqual( a.qname, None )
-        self.assertEqual( a.seq, None )
-        self.assertEqual( a.qual, None )
-        self.assertEqual( a.flag, 0 )
-        self.assertEqual( a.rname, 0 )
-        self.assertEqual( a.mapq, 0 )
-        self.assertEqual( a.cigar, None )
-        self.assertEqual( a.tags, [] )
-        self.assertEqual( a.mrnm, 0 )
-        self.assertEqual( a.mpos, 0 )
-        self.assertEqual( a.isize, 0 )
-
-    def buildRead( self ):
+        self.assertEqual(a.qname, None)
+        self.assertEqual(a.seq, None)
+        self.assertEqual(a.qual, None)
+        self.assertEqual(a.flag, 0)
+        self.assertEqual(a.rname, 0)
+        self.assertEqual(a.mapq, 0)
+        self.assertEqual(a.cigar, [])
+        self.assertEqual(a.tags, [])
+        self.assertEqual(a.mrnm, 0)
+        self.assertEqual(a.mpos, 0)
+        self.assertEqual(a.isize, 0)
+
+    def buildRead(self):
         '''build an example read.'''
-        
+
         a = pysam.AlignedRead()
         a.qname = "read_12345"
-        a.seq="ACGT" * 10
+        a.seq = "ACGT" * 10
         a.flag = 0
         a.rname = 0
         a.pos = 20
         a.mapq = 20
-        a.cigar = ( (0,10), (2,1), (0,9), (1,1), (0,20) )
+        a.cigar = ((0, 10), (2, 1), (0, 9), (1, 1), (0, 20))
         a.mrnm = 0
-        a.mpos=200
-        a.isize=167
-        a.qual="1234" * 10
+        a.mpos = 200
+        a.isize = 167
+        a.qual = "1234" * 10
         # todo: create tags
         return a
 
-    def testUpdate( self ):
+    def testUpdate(self):
         '''check if updating fields affects other variable length data
         '''
         a = self.buildRead()
@@ -1315,144 +1222,160 @@ class TestAlignedRead(unittest.TestCase):
 
         # check qname
         b.qname = "read_123"
-        self.checkFieldEqual( a, b, "qname" )
+        self.checkFieldEqual(a, b, "qname")
         b.qname = "read_12345678"
-        self.checkFieldEqual( a, b, "qname" )
+        self.checkFieldEqual(a, b, "qname")
         b.qname = "read_12345"
-        self.checkFieldEqual( a, b)
+        self.checkFieldEqual(a, b)
 
         # check cigar
-        b.cigar = ( (0,10), )
-        self.checkFieldEqual( a, b, "cigar" )
-        b.cigar = ( (0,10), (2,1), (0,10) )
-        self.checkFieldEqual( a, b, "cigar" )
-        b.cigar = ( (0,10), (2,1), (0,9), (1,1), (0,20) )
-        self.checkFieldEqual( a, b)
-
-        # check seq 
+        b.cigar = ((0, 10), )
+        self.checkFieldEqual(a, b, "cigar")
+        b.cigar = ((0, 10), (2, 1), (0, 10))
+        self.checkFieldEqual(a, b, "cigar")
+        b.cigar = ((0, 10), (2, 1), (0, 9), (1, 1), (0, 20))
+        self.checkFieldEqual(a, b)
+
+        # check seq
         b.seq = "ACGT"
-        self.checkFieldEqual( a, b, ("seq", "qual") )
+        self.checkFieldEqual(a, b, ("seq", "qual"))
         b.seq = "ACGT" * 3
-        self.checkFieldEqual( a, b, ("seq", "qual") )
+        self.checkFieldEqual(a, b, ("seq", "qual"))
         b.seq = "ACGT" * 10
-        self.checkFieldEqual( a, b, ("qual",))
+        self.checkFieldEqual(a, b, ("qual",))
 
         # reset qual
         b = self.buildRead()
 
         # check flags:
         for x in (
-            "is_paired", "is_proper_pair",
-            "is_unmapped", "mate_is_unmapped",
-            "is_reverse", "mate_is_reverse",
-            "is_read1", "is_read2",
-            "is_secondary", "is_qcfail",
-            "is_duplicate"):
-            setattr( b, x, True )
-            self.assertEqual( getattr(b, x), True )
-            self.checkFieldEqual( a, b, ("flag", x,) )
-            setattr( b, x, False )
-            self.assertEqual( getattr(b, x), False )
-            self.checkFieldEqual( a, b )
-
-    def testUpdate( self ):
+                "is_paired", "is_proper_pair",
+                "is_unmapped", "mate_is_unmapped",
+                "is_reverse", "mate_is_reverse",
+                "is_read1", "is_read2",
+                "is_secondary", "is_qcfail",
+                "is_duplicate"):
+            setattr(b, x, True)
+            self.assertEqual(getattr(b, x), True)
+            self.checkFieldEqual(a, b, ("flag", x,))
+            setattr(b, x, False)
+            self.assertEqual(getattr(b, x), False)
+            self.checkFieldEqual(a, b)
+
+    def testUpdate2(self):
         '''issue 135: inplace update of sequence and quality score.
-        
+
         This does not work as setting the sequence will erase
         the quality scores.
         '''
         a = self.buildRead()
         a.seq = a.seq[5:10]
-        self.assertEqual( a.qual, None )
-        
+        self.assertEqual(a.qual, None)
+
         a = self.buildRead()
         s = a.qual
         a.seq = a.seq[5:10]
         a.qual = s[5:10]
-        
-        self.assertEqual( a.qual, s[5:10])
 
-    def testLargeRead( self ):
+        self.assertEqual(a.qual, s[5:10])
+
+    def testLargeRead(self):
         '''build an example read.'''
-        
+
         a = pysam.AlignedRead()
         a.qname = "read_12345"
-        a.seq="ACGT" * 200
+        a.seq = "ACGT" * 200
         a.flag = 0
         a.rname = 0
         a.pos = 20
         a.mapq = 20
-        a.cigar = ( (0, 4 * 200), )
+        a.cigar = ((0, 4 * 200), )
         a.mrnm = 0
-        a.mpos=200
-        a.isize=167
-        a.qual="1234" * 200
+        a.mpos = 200
+        a.isize = 167
+        a.qual = "1234" * 200
 
         return a
 
-    def testTagParsing( self ):
+    def testTagParsing(self):
         '''test for tag parsing
 
         see http://groups.google.com/group/pysam-user-group/browse_thread/thread/67ca204059ea465a
         '''
-        samfile=pysam.Samfile( "ex8.bam","rb" )
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex8.bam"),
+                                "rb")
 
         for entry in samfile:
             before = entry.tags
             entry.tags = entry.tags
             after = entry.tags
-            self.assertEqual( after, before )
+            self.assertEqual(after, before)
 
-    def testUpdateTlen( self ):
+    def testUpdateTlen(self):
         '''check if updating tlen works'''
         a = self.buildRead()
         oldlen = a.tlen
         oldlen *= 2
         a.tlen = oldlen
-        self.assertEqual( a.tlen, oldlen )
+        self.assertEqual(a.tlen, oldlen)
 
-    def testPositions( self ):
+    def testPositions(self):
         a = self.buildRead()
-        self.assertEqual( a.positions,
-                          [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 
-                                31, 32, 33, 34, 35, 36, 37, 38, 39, 
-                           40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 
-                           50, 51, 52, 53, 54, 55, 56, 57, 58, 59] )
-
-        self.assertEqual( a.aligned_pairs,
-                          [(0, 20), (1, 21), (2, 22), (3, 23), (4, 24), 
-                           (5, 25), (6, 26), (7, 27), (8, 28), (9, 29), 
-                           (None, 30), 
-                           (10, 31), (11, 32), (12, 33), (13, 34), (14, 35), 
-                           (15, 36), (16, 37), (17, 38), (18, 39), (19, None), 
-                           (20, 40), (21, 41), (22, 42), (23, 43), (24, 44), 
-                           (25, 45), (26, 46), (27, 47), (28, 48), (29, 49), 
-                           (30, 50), (31, 51), (32, 52), (33, 53), (34, 54), 
-                           (35, 55), (36, 56), (37, 57), (38, 58), (39, 59)] )
-
-        self.assertEqual( a.positions, [x[1] for x in a.aligned_pairs if x[0] != None and x[1] != None] )
+        self.assertEqual(a.positions,
+                         [20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+                          31, 32, 33, 34, 35, 36, 37, 38, 39,
+                          40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+                          50, 51, 52, 53, 54, 55, 56, 57, 58, 59])
+
+        self.assertEqual(a.aligned_pairs,
+                         [(0, 20), (1, 21), (2, 22), (3, 23), (4, 24),
+                          (5, 25), (6, 26), (7, 27), (8, 28), (9, 29),
+                          (None, 30),
+                          (10, 31), (11, 32), (12, 33), (13, 34), (14, 35),
+                          (15, 36), (16, 37), (17, 38), (18, 39), (19, None),
+                          (20, 40), (21, 41), (22, 42), (23, 43), (24, 44),
+                          (25, 45), (26, 46), (27, 47), (28, 48), (29, 49),
+                          (30, 50), (31, 51), (32, 52), (33, 53), (34, 54),
+                          (35, 55), (36, 56), (37, 57), (38, 58), (39, 59)])
+
+        self.assertEqual(
+            a.positions,
+            [x[1] for x in a.aligned_pairs
+             if x[0] is not None and x[1] is not None])
         # alen is the length of the aligned read in genome
-        self.assertEqual( a.alen, a.aligned_pairs[-1][0] + 1 )
+        self.assertEqual(a.alen, a.aligned_pairs[-1][0] + 1)
         # aend points to one beyond last aligned base in ref
-        self.assertEqual( a.positions[-1], a.aend - 1 )
+        self.assertEqual(a.positions[-1], a.aend - 1)
+
+    def testBlocks(self):
+        a = self.buildRead()
+        self.assertEqual(a.blocks,
+                         [(20, 30), (31, 40), (40, 60)])
+
+    def testFancyStr(self):
+        a = self.buildRead()
+        output = a.fancy_str()
+        self.assertEqual(len(output), 9)
+
 
 class TestDeNovoConstruction(unittest.TestCase):
+
     '''check BAM/SAM file construction using ex6.sam
-    
+
     (note these are +1 coordinates):
-    
+
     read_28833_29006_6945	99	chr1	33	20	10M1D25M	=	200	167	AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG	<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<	NM:i:1	RG:Z:L1
     read_28701_28881_323b	147	chr2	88	30	35M	=	500	412	ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA	<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<	MF:i:18	RG:Z:L2
     '''
 
-    header = { 'HD': {'VN': '1.0'},
-               'SQ': [{'LN': 1575, 'SN': 'chr1'}, 
-                      {'LN': 1584, 'SN': 'chr2'}], }
+    header = {'HD': {'VN': '1.0'},
+              'SQ': [{'LN': 1575, 'SN': 'chr1'},
+                     {'LN': 1584, 'SN': 'chr2'}], }
 
-    bamfile = "ex6.bam"
-    samfile = "ex6.sam"
+    bamfile = os.path.join(DATADIR, "ex6.bam")
+    samfile = os.path.join(DATADIR, "ex6.sam")
 
-    def checkFieldEqual( self, read1, read2, exclude = []):
+    def checkFieldEqual(self, read1, read2, exclude=[]):
         '''check if two reads are equal by comparing each field.'''
 
         for x in ("qname", "seq", "flag",
@@ -1465,173 +1388,195 @@ class TestDeNovoConstruction(unittest.TestCase):
                   "is_read1", "is_read2",
                   "is_secondary", "is_qcfail",
                   "is_duplicate"):
-            if x in exclude: continue
-            self.assertEqual( getattr(read1, x), getattr(read2,x), "attribute mismatch for %s: %s != %s" % 
-                              (x, getattr(read1, x), getattr(read2,x)))
+            if x in exclude:
+                continue
+            self.assertEqual(getattr(read1, x), getattr(read2, x), "attribute mismatch for %s: %s != %s" %
+                             (x, getattr(read1, x), getattr(read2, x)))
 
-    def setUp( self ):
+    def setUp(self):
 
         a = pysam.AlignedRead()
         a.qname = "read_28833_29006_6945"
-        a.seq="AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG"
+        a.seq = "AGCTTAGCTAGCTACCTATATCTTGGTCTTGGCCG"
         a.flag = 99
         a.rname = 0
         a.pos = 32
         a.mapq = 20
-        a.cigar = ( (0,10), (2,1), (0,25) )
+        a.cigar = ((0, 10), (2, 1), (0, 25))
         a.mrnm = 0
-        a.mpos=199
-        a.isize=167
-        a.qual="<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<"
-        a.tags = ( ("NM", 1),
-                   ("RG", "L1") )
+        a.mpos = 199
+        a.isize = 167
+        a.qual = "<<<<<<<<<<<<<<<<<<<<<:<9/,&,22;;<<<"
+        a.tags = (("NM", 1),
+                  ("RG", "L1"))
 
         b = pysam.AlignedRead()
         b.qname = "read_28701_28881_323b"
-        b.seq="ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA"
+        b.seq = "ACCTATATCTTGGCCTTGGCCGATGCGGCCTTGCA"
         b.flag = 147
         b.rname = 1
         b.pos = 87
         b.mapq = 30
-        b.cigar = ( (0,35), )
+        b.cigar = ((0, 35), )
         b.mrnm = 1
-        b.mpos=499
-        b.isize=412
-        b.qual="<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<"
-        b.tags = ( ("MF", 18),
-                   ("RG", "L2") )
+        b.mpos = 499
+        b.isize = 412
+        b.qual = "<<<<<;<<<<7;:<<<6;<<<<<<<<<<<<7<<<<"
+        b.tags = (("MF", 18),
+                  ("RG", "L2"))
 
-        self.reads = (a,b)
+        self.reads = (a, b)
 
-    def testSAMWholeFile( self ):
-        
-        tmpfilename = "tmp_%i.sam" % id(self)
+    # TODO
+    # def testSAMWholeFile(self):
 
-        outfile = pysam.Samfile( tmpfilename, "wh", header = self.header )
+    #     tmpfilename = "tmp_%i.sam" % id(self)
 
-        for x in self.reads: outfile.write( x )
-        outfile.close()
-        self.assertTrue( checkBinaryEqual( tmpfilename, self.samfile ),
-                         "mismatch when construction SAM file, see %s %s" % (tmpfilename, self.samfile))
-        
-        os.unlink( tmpfilename )
+    #     outfile = pysam.Samfile(tmpfilename,
+    #                             "wh",
+    #                             header=self.header)
 
-    def testBAMPerRead( self ):
-        '''check if individual reads are binary equal.'''
-        infile = pysam.Samfile( self.bamfile, "rb")
+    #     for x in self.reads:
+    #         outfile.write(x)
+    #     outfile.close()
+    #     self.assertTrue(checkBinaryEqual(tmpfilename, self.samfile),
+    #                     "mismatch when construction SAM file, see %s %s" % (tmpfilename, self.samfile))
 
-        others = list(infile)
-        for denovo, other in zip( others, self.reads):
-            self.checkFieldEqual( other, denovo )
-            self.assertEqual( other.compare( denovo ), 0 )
+    #     os.unlink(tmpfilename)
 
-    def testSAMPerRead( self ):
+    def testBAMPerRead(self):
         '''check if individual reads are binary equal.'''
-        infile = pysam.Samfile( self.samfile, "r")
+        infile = pysam.Samfile(self.bamfile, "rb")
 
         others = list(infile)
-        for denovo, other in zip( others, self.reads):
-            self.checkFieldEqual( other, denovo )
-            self.assertEqual( other.compare( denovo), 0 )
-            
-    def testBAMWholeFile( self ):
-        
+        for denovo, other in zip(others, self.reads):
+            self.checkFieldEqual(other, denovo)
+            self.assertEqual(other.compare(denovo), 0)
+
+    # TODO
+    # def testSAMPerRead(self):
+    #     '''check if individual reads are binary equal.'''
+    #     infile = pysam.Samfile(self.samfile, "r")
+
+    #     others = list(infile)
+    #     for denovo, other in zip(others, self.reads):
+    #         self.checkFieldEqual(other, denovo)
+    #         self.assertEqual(other.compare(denovo), 0)
+
+    def testBAMWholeFile(self):
+
         tmpfilename = "tmp_%i.bam" % id(self)
 
-        outfile = pysam.Samfile( tmpfilename, "wb", header = self.header )
+        outfile = pysam.Samfile(tmpfilename, "wb", header=self.header)
 
-        for x in self.reads: outfile.write( x )
+        for x in self.reads:
+            outfile.write(x)
         outfile.close()
-        
-        self.assertTrue( checkBinaryEqual( tmpfilename, self.bamfile ),
-                         "mismatch when construction BAM file, see %s %s" % (tmpfilename, self.bamfile))
-        
-        os.unlink( tmpfilename )
+
+        self.assertTrue(checkBinaryEqual(tmpfilename, self.bamfile),
+                        "mismatch when construction BAM file, see %s %s" % (tmpfilename, self.bamfile))
+
+        os.unlink(tmpfilename)
+
 
 class TestDeNovoConstructionUserTags(TestDeNovoConstruction):
+
     '''test de novo construction with a header that contains lower-case tags.'''
 
-    header = { 'HD': {'VN': '1.0'},
-               'SQ': [{'LN': 1575, 'SN': 'chr1'}, 
-                      {'LN': 1584, 'SN': 'chr2'}],
-               'x1': {'A': 2, 'B': 5 },
-               'x3': {'A': 6, 'B': 5 },
-               'x2': {'A': 4, 'B': 5 } }
+    header = {'HD': {'VN': '1.0'},
+              'SQ': [{'LN': 1575, 'SN': 'chr1'},
+                     {'LN': 1584, 'SN': 'chr2'}],
+              'x1': {'A': 2, 'B': 5},
+              'x3': {'A': 6, 'B': 5},
+              'x2': {'A': 4, 'B': 5}}
+
+    bamfile = os.path.join(DATADIR, "example_user_header.bam")
+    samfile = os.path.join(DATADIR, "example_user_header.sam")
+
 
-    bamfile = "example_user_header.bam"
-    samfile = "example_user_header.sam"
+class TestEmptyHeader(unittest.TestCase):
 
-class TestEmptyHeader( unittest.TestCase ):
     '''see issue 84.'''
-    
-    def testEmptyHeader( self ):
 
-        s = pysam.Samfile('example_empty_header.bam')
-        self.assertEqual( s.header, {'SQ': [{'LN': 1000, 'SN': 'chr1'}]} )
+    def testEmptyHeader(self):
+
+        s = pysam.Samfile(os.path.join(DATADIR, 'example_empty_header.bam'))
+        self.assertEqual(s.header, {'SQ': [{'LN': 1000, 'SN': 'chr1'}]})
+
+
+class TestBTagSam(unittest.TestCase):
 
-class TestBTagSam( unittest.TestCase ):
     '''see issue 81.'''
-    
-    compare = [ [100, 1, 91, 0, 7, 101, 0, 201, 96, 204, 0, 0, 87, 109, 0, 7, 97, 112, 1, 12, 78, 197, 0, 7, 100, 95, 101, 202, 0, 6, 0, 1, 186, 0, 84, 0, 244, 0, 0, 324, 0, 107, 195, 101, 113, 0, 102, 0, 104, 3, 0, 101, 1, 0, 212, 6, 0, 0, 1, 0, 74, 1, 11, 0, 196, 2, 197, 103, 0, 108, 98, 2, 7, 0, 1, 2, 194, 0, 180, 0, 108, 0, 203, 104, 16, 5, 205, 0, 0, 0, 1, 1, 100, 98, 0, 0, 204, 6, 0, 79, 0, 0, 101, 7, 109, 90, 265, 1, 27, 10, 109, 102, 9, 0, 292, 0, 110, 0, 0, 102, 112, 0, 0, 84, 1 [...]
-                [-100,200,-300,-400],
-                [-100,12],
-                [12,15],
-                [-1.0,5.0,2.5] ]
-            
-    filename = 'example_btag.sam'
 
-    def testRead( self ):
+    compare = [[100, 1, 91, 0, 7, 101, 0, 201, 96, 204, 0, 0, 87, 109, 0, 7, 97, 112, 1, 12, 78, 197, 0, 7, 100, 95, 101, 202, 0, 6, 0, 1, 186, 0, 84, 0, 244, 0, 0, 324, 0, 107, 195, 101, 113, 0, 102, 0, 104, 3, 0, 101, 1, 0, 212, 6, 0, 0, 1, 0, 74, 1, 11, 0, 196, 2, 197, 103, 0, 108, 98, 2, 7, 0, 1, 2, 194, 0, 180, 0, 108, 0, 203, 104, 16, 5, 205, 0, 0, 0, 1, 1, 100, 98, 0, 0, 204, 6, 0, 79, 0, 0, 101, 7, 109, 90, 265, 1, 27, 10, 109, 102, 9, 0, 292, 0, 110, 0, 0, 102, 112, 0, 0, 84, 10 [...]
+               [-100, 200, -300, -400],
+               [-100, 12],
+               [12, 15],
+               [-1.0, 5.0, 2.5]]
+
+    filename = os.path.join(DATADIR, 'example_btag.sam')
+
+    def testRead(self):
 
         s = pysam.Samfile(self.filename)
         for x, read in enumerate(s):
             if x == 0:
-                self.assertEqual( read.tags, [('RG', 'QW85I'), ('PG', 'tmap'), ('MD', '140'), ('NM', 0), ('AS', 140), ('FZ', [100, 1, 91, 0, 7, 101, 0, 201, 96, 204, 0, 0, 87, 109, 0, 7, 97, 112, 1, 12, 78, 197, 0, 7, 100, 95, 101, 202, 0, 6, 0, 1, 186, 0, 84, 0, 244, 0, 0, 324, 0, 107, 195, 101, 113, 0, 102, 0, 104, 3, 0, 101, 1, 0, 212, 6, 0, 0, 1, 0, 74, 1, 11, 0, 196, 2, 197, 103, 0, 108, 98, 2, 7, 0, 1, 2, 194, 0, 180, 0, 108, 0, 203, 104, 16, 5, 205, 0, 0, 0, 1, 1, 100, 98, 0, 0, 2 [...]
-                                  )
-                         
+                self.assertEqual(read.tags, [('RG', 'QW85I'), ('PG', 'tmap'), ('MD', '140'), ('NM', 0), ('AS', 140), ('FZ', [100, 1, 91, 0, 7, 101, 0, 201, 96, 204, 0, 0, 87, 109, 0, 7, 97, 112, 1, 12, 78, 197, 0, 7, 100, 95, 101, 202, 0, 6, 0, 1, 186, 0, 84, 0, 244, 0, 0, 324, 0, 107, 195, 101, 113, 0, 102, 0, 104, 3, 0, 101, 1, 0, 212, 6, 0, 0, 1, 0, 74, 1, 11, 0, 196, 2, 197, 103, 0, 108, 98, 2, 7, 0, 1, 2, 194, 0, 180, 0, 108, 0, 203, 104, 16, 5, 205, 0, 0, 0, 1, 1, 100, 98, 0, 0, 20 [...]
+                                 )
+
             fz = dict(read.tags)["FZ"]
-            self.assertEqual( fz, self.compare[x] )
-            self.assertEqual( read.opt("FZ"), self.compare[x])
+            self.assertEqual(fz, self.compare[x])
+            self.assertEqual(read.opt("FZ"), self.compare[x])
+
+    def testWrite(self):
 
-    def testWrite( self ):
-        
         s = pysam.Samfile(self.filename)
         for read in s:
             before = read.tags
             read.tags = read.tags
             after = read.tags
-            self.assertEqual( after, before )
+            self.assertEqual(after, before)
+
+
+class TestBTagBam(TestBTagSam):
+    filename = os.path.join(DATADIR, 'example_btag.bam')
 
-class TestBTagBam( TestBTagSam ):
-    filename = 'example_btag.bam'
 
 class TestDoubleFetch(unittest.TestCase):
+
     '''check if two iterators on the same bamfile are independent.'''
-    
-    def testDoubleFetch( self ):
 
-        samfile1 = pysam.Samfile('ex1.bam', 'rb')
+    filename = os.path.join(DATADIR, 'ex1.bam')
+
+    def testDoubleFetch(self):
+
+        samfile1 = pysam.Samfile(self.filename, 'rb')
 
-        for a,b in zip(samfile1.fetch(), samfile1.fetch()):
-            self.assertEqual( a.compare( b ), 0 )
+        for a, b in zip(samfile1.fetch(), samfile1.fetch()):
+            self.assertEqual(a.compare(b), 0)
 
-    def testDoubleFetchWithRegion( self ):
+    def testDoubleFetchWithRegion(self):
 
-        samfile1 = pysam.Samfile('ex1.bam', 'rb')
+        samfile1 = pysam.Samfile(self.filename, 'rb')
         chr, start, stop = 'chr1', 200, 3000000
-        self.assertTrue(len(list(samfile1.fetch ( chr, start, stop))) > 0) #just making sure the test has something to catch
+        # just making sure the test has something to catch
+        self.assertTrue(len(list(samfile1.fetch(chr, start, stop))) > 0)
 
-        for a,b in zip(samfile1.fetch( chr, start, stop), samfile1.fetch( chr, start, stop)):
-            self.assertEqual( a.compare( b ), 0 ) 
+        for a, b in zip(samfile1.fetch(chr, start, stop),
+                        samfile1.fetch(chr, start, stop)):
+            self.assertEqual(a.compare(b), 0)
 
-    def testDoubleFetchUntilEOF( self ):
+    def testDoubleFetchUntilEOF(self):
 
-        samfile1 = pysam.Samfile('ex1.bam', 'rb')
+        samfile1 = pysam.Samfile(self.filename, 'rb')
+
+        for a, b in zip(samfile1.fetch(until_eof=True),
+                        samfile1.fetch(until_eof=True)):
+            self.assertEqual(a.compare(b), 0)
 
-        for a,b in zip(samfile1.fetch( until_eof = True), 
-                       samfile1.fetch( until_eof = True )):
-            self.assertEqual( a.compare( b), 0 )
 
 class TestRemoteFileFTP(unittest.TestCase):
+
     '''test remote access.
 
     '''
@@ -1642,314 +1587,299 @@ class TestRemoteFileFTP(unittest.TestCase):
     url = "ftp://ftp.sanger.ac.uk/pub/rd/humanSequences/CV.bam"
     region = "1:1-1000"
 
-    def testFTPView( self ):
+    def testFTPView(self):
         return
-        result = pysam.view( self.url, self.region )
-        self.assertEqual( len(result), 36 )
-        
-    def testFTPFetch( self ):
+        result = pysam.view(self.url, self.region)
+        self.assertEqual(len(result), 36)
+
+    def testFTPFetch(self):
         return
-        samfile = pysam.Samfile(self.url, "rb")  
-        result = list(samfile.fetch( region = self.region ))
-        self.assertEqual( len(result), 36 )
+        samfile = pysam.Samfile(self.url, "rb")
+        result = list(samfile.fetch(region=self.region))
+        self.assertEqual(len(result), 36)
 
-class TestRemoteFileHTTP( unittest.TestCase):
+
+class TestRemoteFileHTTP(unittest.TestCase):
 
     url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/ex1.bam"
     region = "chr1:1-1000"
-    local = "ex1.bam"
+    local = os.path.join(DATADIR, "ex1.bam")
 
-    def testView( self ):
-        samfile_local = pysam.Samfile(self.local, "rb")  
-        ref = list(samfile_local.fetch( region = self.region ))
-        
-        result = pysam.view( self.url, self.region )
-        self.assertEqual( len(result), len(ref) )
-        
-    def testFetch( self ):
-        samfile = pysam.Samfile(self.url, "rb")  
-        result = list(samfile.fetch( region = self.region ))
-        samfile_local = pysam.Samfile(self.local, "rb")  
-        ref = list(samfile_local.fetch( region = self.region ))
+    def testView(self):
+        samfile_local = pysam.Samfile(self.local, "rb")
+        ref = list(samfile_local.fetch(region=self.region))
+
+        result = pysam.view(self.url, self.region)
+        self.assertEqual(len(result), len(ref))
 
-        self.assertEqual( len(ref), len(result) )
+    def testFetch(self):
+        samfile = pysam.Samfile(self.url, "rb")
+        result = list(samfile.fetch(region=self.region))
+        samfile_local = pysam.Samfile(self.local, "rb")
+        ref = list(samfile_local.fetch(region=self.region))
+
+        self.assertEqual(len(ref), len(result))
         for x, y in zip(result, ref):
-            self.assertEqual( x.compare( y ), 0 )
+            self.assertEqual(x.compare(y), 0)
 
-    def testFetchAll( self ):
-        samfile = pysam.Samfile(self.url, "rb")  
+    def testFetchAll(self):
+        samfile = pysam.Samfile(self.url, "rb")
         result = list(samfile.fetch())
-        samfile_local = pysam.Samfile(self.local, "rb")  
-        ref = list(samfile_local.fetch() )
+        samfile_local = pysam.Samfile(self.local, "rb")
+        ref = list(samfile_local.fetch())
 
-        self.assertEqual( len(ref), len(result) )
+        self.assertEqual(len(ref), len(result))
         for x, y in zip(result, ref):
-            self.assertEqual( x.compare( y ), 0 )
+            self.assertEqual(x.compare(y), 0)
 
-class TestLargeOptValues( unittest.TestCase ):
 
-    ints = ( 65536, 214748, 2147484, 2147483647 )
-    floats = ( 65536.0, 214748.0, 2147484.0 )
+class TestLargeOptValues(unittest.TestCase):
+
+    ints = (65536, 214748, 2147484, 2147483647)
+    floats = (65536.0, 214748.0, 2147484.0)
+
+    def check(self, samfile):
 
-    def check( self, samfile ):
-        
         i = samfile.fetch()
         for exp in self.ints:
             rr = next(i)
             obs = rr.opt("ZP")
-            self.assertEqual( exp, obs, "expected %s, got %s\n%s" % (str(exp), str(obs), str(rr)))
+            self.assertEqual(exp, obs, "expected %s, got %s\n%s" %
+                             (str(exp), str(obs), str(rr)))
 
-        for exp in [ -x for x in self.ints ]:
+        for exp in [-x for x in self.ints]:
             rr = next(i)
             obs = rr.opt("ZP")
-            self.assertEqual( exp, obs, "expected %s, got %s\n%s" % (str(exp), str(obs), str(rr)))
+            self.assertEqual(exp, obs, "expected %s, got %s\n%s" %
+                             (str(exp), str(obs), str(rr)))
 
         for exp in self.floats:
             rr = next(i)
             obs = rr.opt("ZP")
-            self.assertEqual( exp, obs, "expected %s, got %s\n%s" % (str(exp), str(obs), str(rr)))
+            self.assertEqual(exp, obs, "expected %s, got %s\n%s" %
+                             (str(exp), str(obs), str(rr)))
 
-        for exp in [ -x for x in self.floats ]:
+        for exp in [-x for x in self.floats]:
             rr = next(i)
             obs = rr.opt("ZP")
-            self.assertEqual( exp, obs, "expected %s, got %s\n%s" % (str(exp), str(obs), str(rr)))
-
-    def testSAM( self ):
-        samfile = pysam.Samfile("ex10.sam", "r")
-        self.check( samfile )
-
-    def testBAM( self ):
-        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 TestLogging( unittest.TestCase ):
+            self.assertEqual(exp, obs, "expected %s, got %s\n%s" %
+                             (str(exp), str(obs), str(rr)))
+
+    def testSAM(self):
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex10.sam"),
+                                "r")
+        self.check(samfile)
+
+    def testBAM(self):
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex10.bam"),
+                                "rb")
+        self.check(samfile)
+
+
+class TestPileup(unittest.TestCase):
+    '''test pileup functionality.'''
+
+    samfilename = "pysam_data/ex1.bam"
+    fastafilename = "pysam_data/ex1.fa"
+
+    def setUp(self):
+
+        self.samfile = pysam.Samfile(self.samfilename)
+        self.fastafile = pysam.Fastafile(self.fastafilename)
+
+    def checkEqual(self, references, iterator):
+
+        for x, column in enumerate(iterator):
+            (contig, pos, reference_base,
+             read_bases, read_qualities, alignment_mapping_qualities) \
+                = references[x][:-1].split("\t")
+            self.assertEqual(int(pos) - 1, column.pos)
+
+    def testSamtoolsStepper(self):
+        refs = pysam.mpileup(
+            "-f", self.fastafilename,
+            self.samfilename)
+        iterator = self.samfile.pileup(
+            stepper="samtools",
+            fastafile=self.fastafile)
+        self.checkEqual(refs, iterator)
+
+    def testAllStepper(self):
+        refs = pysam.mpileup(
+            "-f", self.fastafilename,
+            "-A", "-B",
+            self.samfilename)
+
+        iterator = self.samfile.pileup(
+            stepper="all",
+            fastafile=self.fastafile)
+        self.checkEqual(refs, iterator)
+
+
+class TestLogging(unittest.TestCase):
+
     '''test around bug issue 42,
 
     failed in versions < 0.4
     '''
 
-    def check( self, bamfile, log ):
+    def check(self, bamfile, log):
 
         if log:
             logger = logging.getLogger('franklin')
             logger.setLevel(logging.INFO)
-            formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
-            log_hand  = logging.FileHandler('log.txt')
+            formatter = logging.Formatter(
+                '%(asctime)s %(levelname)s %(message)s')
+            log_hand = logging.FileHandler('log.txt')
             log_hand.setFormatter(formatter)
             logger.addHandler(log_hand)
 
-        bam  = pysam.Samfile(bamfile, 'rb')
+        bam = pysam.Samfile(bamfile, 'rb')
         cols = bam.pileup()
-        self.assertTrue( True )
+        self.assertTrue(True)
+
+    def testFail1(self):
+        self.check(os.path.join(DATADIR, "ex9_fail.bam"),
+                   False)
+        self.check(os.path.join(DATADIR, "ex9_fail.bam"),
+                   True)
+
+    def testNoFail1(self):
+        self.check(os.path.join(DATADIR, "ex9_nofail.bam"),
+                   False)
+        self.check(os.path.join(DATADIR, "ex9_nofail.bam"),
+                   True)
+
+    def testNoFail2(self):
+        self.check(os.path.join(DATADIR, "ex9_nofail.bam"),
+                   True)
+        self.check(os.path.join(DATADIR, "ex9_nofail.bam"),
+                   True)
 
-    def testFail1( self ):
-        self.check( "ex9_fail.bam", False )
-        self.check( "ex9_fail.bam", True )
-
-    def testNoFail1( self ):
-        self.check( "ex9_nofail.bam", False )
-        self.check( "ex9_nofail.bam", True )
-
-    def testNoFail2( self ):
-        self.check( "ex9_nofail.bam", True )
-        self.check( "ex9_nofail.bam", True )
-        
 # TODOS
 # 1. finish testing all properties within pileup objects
 # 2. check exceptions and bad input problems (missing files, optional fields that aren't present, etc...)
 # 3. check: presence of sequence
 
-class TestSamfileUtilityFunctions( unittest.TestCase ):
 
-    def testCount( self ):
+class TestSamfileUtilityFunctions(unittest.TestCase):
+
+    def testCount(self):
 
-        samfile = pysam.Samfile( "ex1.bam", "rb" )
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                "rb")
 
-        for contig in ("chr1", "chr2" ):
-            for start in range( 0, 2000, 100 ):
+        for contig in ("chr1", "chr2"):
+            for start in range(0, 2000, 100):
                 end = start + 1
-                self.assertEqual( len( list( samfile.fetch( contig, start, end ) ) ),
-                                  samfile.count( contig, start, end ) )
+                self.assertEqual(
+                    len(list(samfile.fetch(contig, start, end))),
+                    samfile.count(contig, start, end),
+                    'number mismatch for %s:%i-%i %i != %i' % (
+                        contig, start, end,
+                        len(list(samfile.fetch(contig, start, end))),
+                        samfile.count(contig, start, end)))
 
                 # test empty intervals
-                self.assertEqual( len( list( samfile.fetch( contig, start, start ) ) ),
-                                  samfile.count( contig, start, start ) )
+                self.assertEqual(
+                    len(list(samfile.fetch(contig, start, start))),
+                    samfile.count(contig, start, start),
+                    'number mismatch for %s:%i-%i %i != %i' % (
+                        contig, start, start,
+                        len(list(samfile.fetch(contig, start, start))),
+                        samfile.count(contig, start, start)))
 
                 # test half empty intervals
-                self.assertEqual( len( list( samfile.fetch( contig, start ) ) ),
-                                  samfile.count( contig, start ) )
-
-    def testMate( self ):
+                self.assertEqual(len(list(samfile.fetch(contig, start))),
+                                 samfile.count(contig, start))
+
+                self.assertEqual(
+                    len(list(samfile.fetch(contig, start))),
+                    samfile.count(contig, start),
+                    'number mismatch for %s:%i %i != %i' % (
+                        contig, start,
+                        len(list(samfile.fetch(contig, start))),
+                        samfile.count(contig, start)))
+
+    def testMate(self):
         '''test mate access.'''
 
-        with open( "ex1.sam", "rb" ) as inf:
-            readnames = [ x.split(b"\t")[0] for x in inf.readlines() ]
+        with open(os.path.join(DATADIR, "ex1.sam"), "rb") as inf:
+            readnames = [x.split(b"\t")[0] for x in inf.readlines()]
         if sys.version_info[0] >= 3:
-            readnames = [ name.decode('ascii') for name in readnames ]
-            
-        counts = collections.defaultdict( int )
-        for x in readnames: counts[x] += 1
+            readnames = [name.decode('ascii') for name in readnames]
+
+        counts = collections.defaultdict(int)
+        for x in readnames:
+            counts[x] += 1
+
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                "rb")
 
-        samfile = pysam.Samfile( "ex1.bam", "rb" )
         for read in samfile.fetch():
             if not read.is_paired:
-                self.assertRaises( ValueError, samfile.mate, read )
+                self.assertRaises(ValueError, samfile.mate, read)
             elif read.mate_is_unmapped:
-                self.assertRaises( ValueError, samfile.mate, read )
+                self.assertRaises(ValueError, samfile.mate, read)
             else:
                 if counts[read.qname] == 1:
-                    self.assertRaises( ValueError, samfile.mate, read )
+                    self.assertRaises(ValueError, samfile.mate, read)
                 else:
-                    mate = samfile.mate( read )
-                    self.assertEqual( read.qname, mate.qname )
-                    self.assertEqual( read.is_read1, mate.is_read2 )
-                    self.assertEqual( read.is_read2, mate.is_read1 )
-                    self.assertEqual( read.pos, mate.mpos )
-                    self.assertEqual( read.mpos, mate.pos )
-
-    def testIndexStats( self ):
+                    mate = samfile.mate(read)
+                    self.assertEqual(read.qname, mate.qname)
+                    self.assertEqual(read.is_read1, mate.is_read2)
+                    self.assertEqual(read.is_read2, mate.is_read1)
+                    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 )
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                "rb")
+        self.assertEqual(samfile.mapped, 3235)
+        self.assertEqual(samfile.unmapped, 35)
+        self.assertEqual(samfile.nocoordinate, 0)
+
+
+class TestSamtoolsProxy(unittest.TestCase):
 
-class TestSamtoolsProxy( unittest.TestCase ):
     '''tests for sanity checking access to samtools functions.'''
 
-    def testIndex( self ):
-        self.assertRaises( IOError, pysam.index, "missing_file" )
+    def testIndex(self):
+        self.assertRaises(IOError, pysam.index, "missing_file")
 
-    def testView( self ):
+    def testView(self):
         # note that view still echos "open: No such file or directory"
-        self.assertRaises( pysam.SamtoolsError, pysam.view, "missing_file" )
+        self.assertRaises(pysam.SamtoolsError, pysam.view, "missing_file")
+
+    def testSort(self):
+        self.assertRaises(pysam.SamtoolsError, pysam.sort, "missing_file")
 
-    def testSort( self ):
-        self.assertRaises( pysam.SamtoolsError, pysam.sort, "missing_file" )
 
-class TestSamfileIndex( unittest.TestCase):
-    
-    def testIndex( self ):
-        samfile = pysam.Samfile( "ex1.bam", "rb" )
-        index = pysam.IndexedReads( samfile )
+class TestSamfileIndex(unittest.TestCase):
+
+    def testIndex(self):
+        samfile = pysam.Samfile(os.path.join(DATADIR, "ex1.bam"),
+                                "rb")
+        index = pysam.IndexedReads(samfile)
         index.build()
+        reads = collections.defaultdict(int)
 
-        reads = collections.defaultdict( int )
+        for read in samfile:
+            reads[read.qname] += 1
 
-        for read in samfile: reads[read.qname] += 1
-            
         for qname, counts in reads.items():
-            found = list(index.find( qname ))
-            self.assertEqual( len(found), counts )
-            for x in found: self.assertEqual( x.qname, qname )
-            
+            found = list(index.find(qname))
+            self.assertEqual(len(found), counts)
+            for x in found:
+                self.assertEqual(x.qname, qname)
+
 
 if __name__ == "__main__":
     # build data files
     print ("building data files")
-    subprocess.call( "make", shell=True)
+    subprocess.call("make -C %s" % DATADIR, shell=True)
     print ("starting tests")
     unittest.main()
     print ("completed tests")
diff --git a/tests/segfault_tests.py b/tests/segfault_tests.py
deleted file mode 100755
index ff32fec..0000000
--- a/tests/segfault_tests.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-'''unit testing code for pysam.'''
-
-import pysam
-import unittest
-import os
-import itertools
-import subprocess
-import shutil
-
-class TestExceptions(unittest.TestCase):
-
-    def setUp(self):
-        self.samfile=pysam.Samfile( "ex1.bam","rb" )
-
-    def testOutOfRangeNegativeNewFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", 5, -10 )
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", 5, 0 )
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", -5, -10 )
-
-    def testOutOfRangeNegativeOldFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1:-5-10" )
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1:-5-0" )
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1:-5--10" )
-
-    def testOutOfRangeLargeNewFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1", 99999999999999999, 999999999999999999 )
-
-    def testOutOfRangeLargeOldFormat(self):
-        self.assertRaises( ValueError, self.samfile.fetch, "chr1:99999999999999999-999999999999999999" )
-
-    def tearDown(self):
-        self.samfile.close()
-
-if __name__ == "__main__":
-    unittest.main()
-
diff --git a/tests/tabix_test.py b/tests/tabix_test.py
index 90c2340..b3c7dc5 100644
--- a/tests/tabix_test.py
+++ b/tests/tabix_test.py
@@ -5,7 +5,10 @@ Execute in the :file:`tests` directory as it requires the Makefile
 and data files located there.
 '''
 
-import sys, os, shutil, gzip
+import sys
+import os
+import shutil
+import gzip
 import pysam
 import unittest
 import itertools
@@ -13,9 +16,12 @@ import subprocess
 import glob
 import re
 
+DATADIR = 'tabix_data'
+
 IS_PYTHON3 = sys.version_info[0] >= 3
 
-def myzip_open( infile, mode = "r" ):
+
+def myzip_open(infile, mode="r"):
     '''open compressed file and decode.'''
 
     def _convert(f):
@@ -24,45 +30,50 @@ def myzip_open( infile, mode = "r" ):
 
     if IS_PYTHON3:
         if mode == "r":
-            return _convert(gzip.open(infile,"r"))
+            return _convert(gzip.open(infile, "r"))
     else:
-        return gzip.open( mode )
+        return gzip.open(mode)
+
 
-def loadAndConvert( infile, encode = True ):
+def loadAndConvert(infile, encode=True):
     '''load data from infile and convert all fields to bytes.
 
     infile can be either plain or compressed (ending in .gz).
     '''
     data = []
     if infile.endswith(".gz"):
-        for line in gzip.open( infile ):
+        for line in gzip.open(infile):
             line = line.decode("ascii")
-            if line.startswith("#"): continue
+            if line.startswith("#"):
+                continue
             d = line.strip().split("\t")
             if encode:
-                data.append( [x.encode("ascii") for x in d ] )
+                data.append([x.encode("ascii") for x in d])
             else:
-                data.append( d )
+                data.append(d)
 
     else:
         with open(infile) as f:
             for line in f:
-                if line.startswith("#"): continue
+                if line.startswith("#"):
+                    continue
                 d = line.strip().split("\t")
                 if encode:
-                    data.append( [x.encode("ascii") for x in d ] )
+                    data.append([x.encode("ascii") for x in d])
                 else:
-                    data.append( d )
-                
+                    data.append(d)
+
     return data
 
-def splitToBytes( s ):
+
+def splitToBytes(s):
     '''split string and return list of bytes.'''
     return [x.encode("ascii") for x in s.split("\t")]
 
-def checkBinaryEqual( filename1, filename2 ):
+
+def checkBinaryEqual(filename1, filename2):
     '''return true if the two files are binary equal.'''
-    if os.path.getsize( filename1 ) !=  os.path.getsize( filename2 ):
+    if os.path.getsize(filename1) != os.path.getsize(filename2):
         return False
 
     infile1 = open(filename1, "rb")
@@ -70,8 +81,9 @@ def checkBinaryEqual( filename1, filename2 ):
 
     d1, d2 = infile1.read(), infile2.read()
     found = False
-    for c1,c2 in zip( d1, d2 ):
-        if c1 != c2: break
+    for c1, c2 in zip(d1, d2):
+        if c1 != c2:
+            break
     else:
         found = True
 
@@ -79,234 +91,281 @@ def checkBinaryEqual( filename1, filename2 ):
     infile2.close()
     return found
 
+
 class TestIndexing(unittest.TestCase):
-    filename = "example.gtf.gz" 
-    filename_idx = "example.gtf.gz.tbi" 
+    filename = os.path.join(DATADIR, "example.gtf.gz")
+    filename_idx = os.path.join(DATADIR, "example.gtf.gz.tbi")
+
+    def setUp(self):
 
-    def setUp( self ):
-        
         self.tmpfilename = "tmp_%i.gtf.gz" % id(self)
-        shutil.copyfile( self.filename, self.tmpfilename )
+        shutil.copyfile(self.filename, self.tmpfilename)
 
-    def testIndexPreset( self ):
+    def testIndexPreset(self):
         '''test indexing via preset.'''
 
-        pysam.tabix_index( self.tmpfilename, preset = "gff" )
-        checkBinaryEqual( self.tmpfilename + ".tbi", self.filename_idx )
+        pysam.tabix_index(self.tmpfilename, preset="gff")
+        checkBinaryEqual(self.tmpfilename + ".tbi", self.filename_idx)
+
+    def tearDown(self):
+        os.unlink(self.tmpfilename)
+        os.unlink(self.tmpfilename + ".tbi")
 
-    def tearDown( self ):
-        os.unlink( self.tmpfilename )
-        os.unlink( self.tmpfilename + ".tbi" )
 
 class TestCompression(unittest.TestCase):
-    filename = "example.gtf.gz" 
-    filename_idx = "example.gtf.gz.tbi" 
+    filename = os.path.join(DATADIR, "example.gtf.gz")
+    filename_idx = os.path.join(DATADIR, "example.gtf.gz.tbi")
     preset = "gff"
 
-    def setUp( self ):
-        
+    def setUp(self):
+
         self.tmpfilename = "tmp_%i" % id(self)
-        infile = gzip.open( self.filename, "rb")
-        outfile = open( self.tmpfilename, "wb" )
-        outfile.write( infile.read() )
+        infile = gzip.open(self.filename, "rb")
+        outfile = open(self.tmpfilename, "wb")
+        outfile.write(infile.read())
         outfile.close()
         infile.close()
 
-    def testCompression( self ):
+    def testCompression(self):
         '''see also issue 106'''
-        pysam.tabix_compress( self.tmpfilename, self.tmpfilename + ".gz" )
-        checkBinaryEqual( self.tmpfilename, self.tmpfilename + ".gz" )
+        pysam.tabix_compress(self.tmpfilename, self.tmpfilename + ".gz")
+        checkBinaryEqual(self.tmpfilename, self.tmpfilename + ".gz")
 
-    def testIndexPresetUncompressed( self ):
+    def testIndexPresetUncompressed(self):
         '''test indexing via preset.'''
-        
-        pysam.tabix_index( self.tmpfilename, preset = self.preset )
+
+        pysam.tabix_index(self.tmpfilename, preset=self.preset)
         # check if uncompressed file has been removed
-        self.assertEqual( os.path.exists( self.tmpfilename ), False )
-        checkBinaryEqual( self.tmpfilename + ".gz", self.filename )
-        checkBinaryEqual( self.tmpfilename + ".gz.tbi", self.filename_idx )
+        self.assertEqual(os.path.exists(self.tmpfilename), False)
+        checkBinaryEqual(self.tmpfilename + ".gz", self.filename)
+        checkBinaryEqual(self.tmpfilename + ".gz.tbi", self.filename_idx)
 
-    def testIndexPresetCompressed( self ):
+    def testIndexPresetCompressed(self):
         '''test indexing via preset.'''
 
-        pysam.tabix_compress( self.tmpfilename, self.tmpfilename + ".gz" )
-        pysam.tabix_index( self.tmpfilename + ".gz", preset = self.preset )
-        checkBinaryEqual( self.tmpfilename + ".gz", self.filename )
-        checkBinaryEqual( self.tmpfilename + ".gz.tbi", self.filename_idx )
-        
-    def tearDown( self ):
+        pysam.tabix_compress(self.tmpfilename, self.tmpfilename + ".gz")
+        pysam.tabix_index(self.tmpfilename + ".gz", preset=self.preset)
+        checkBinaryEqual(self.tmpfilename + ".gz", self.filename)
+        checkBinaryEqual(self.tmpfilename + ".gz.tbi", self.filename_idx)
 
-        try: 
-            os.unlink( self.tmpfilename )
-            os.unlink( self.tmpfilename + ".gz" )
-            os.unlink( self.tmpfilename + ".gz.tbi" )
+    def tearDown(self):
+
+        try:
+            os.unlink(self.tmpfilename)
+            os.unlink(self.tmpfilename + ".gz")
+            os.unlink(self.tmpfilename + ".gz.tbi")
         except OSError:
             pass
 
-class TestCompressionSam( TestCompression ):
-    filename = "example.sam.gz"
-    filename_index = "example.sam.gz.tbi"
+
+class TestCompressionSam(TestCompression):
+    filename = os.path.join(DATADIR, "example.sam.gz")
+    filename_index = os.path.join(DATADIR, "example.sam.gz.tbi")
     preset = "sam"
 
-class TestCompressionBed( TestCompression ):
-    filename = "example.bed.gz"
-    filename_index = "example.bed.gz.tbi"
+
+class TestCompressionBed(TestCompression):
+    filename = os.path.join(DATADIR, "example.bed.gz")
+    filename_index = os.path.join(DATADIR, "example.bed.gz.tbi")
     preset = "bed"
 
-class TestCompressionVCF( TestCompression ):
-    filename = "example.vcf.gz"
-    filename_index = "example.vcf.gz.tbi"
+
+class TestCompressionVCF(TestCompression):
+    filename = os.path.join(DATADIR, "example.vcf.gz")
+    filename_index = os.path.join(DATADIR, "example.vcf.gz.tbi")
     preset = "vcf"
 
-class TestIteration( unittest.TestCase ):
+class IterationTest(unittest.TestCase):
 
-    filename = "example.gtf.gz" 
+    with_comments = False
 
-    def setUp( self ):
+    def setUp(self):
 
-        self.tabix = pysam.Tabixfile( self.filename )
         lines = []
-        inf = gzip.open( self.filename, "rb")
+        inf = gzip.open(self.filename, "rb")
         for line in inf:
             line = line.decode('ascii')
-            if line.startswith("#"): continue
-            lines.append( line )
+            if line.startswith("#"):
+                if not self.with_comments:
+                    continue
+            lines.append(line)
         inf.close()
+
         # creates index of contig, start, end, adds content without newline.
-        self.compare = [ 
+        self.compare = [
             (x[0][0], int(x[0][3]), int(x[0][4]), x[1])
-            for x in [ (y.split("\t"), y[:-1]) for y in lines ] ]
-                         
-    def getSubset( self, contig = None, start = None, end = None):
-        
-        if contig == None:
+            for x in [(y.split("\t"), y[:-1]) for y in lines
+                      if not y.startswith("#")]]
+
+        self.comments = [x[:-1] for x in lines if x.startswith("#")]
+
+    def getSubset(self, contig=None, start=None, end=None):
+
+        if contig is None:
             # all lines
-            subset = [ x[3] for x in self.compare ]
+            subset = [x[3] for x in self.compare]
         else:
-            if start != None and end == None:
+            if start is not None and end is None:
                 # until end of contig
-                subset = [ x[3] for x in self.compare if x[0] == contig and x[2] > start ]
-            elif start == None and end != None:
+                subset = [x[3]
+                          for x in self.compare if x[0] == contig
+                          and x[2] > start]
+            elif start is None and end is not None:
                 # from start of contig
-                subset = [ x[3] for x in self.compare if x[0] == contig and x[1] <= end ]
-            elif start == None and end == None:
-                subset = [ x[3] for x in self.compare if x[0] == contig ]
+                subset = [x[3]
+                          for x in self.compare if x[0] == contig
+                          and x[1] <= end]
+            elif start is None and end is None:
+                subset = [x[3] for x in self.compare if x[0] == contig]
             else:
                 # all within interval
-                subset = [ x[3] for x in self.compare if x[0] == contig and \
-                               min( x[2], end) - max(x[1], start) > 0 ]
-            
-        return subset
+                subset = [x[3] for x in self.compare if x[0] == contig
+                          and min(x[2], end) - max(x[1], start) > 0]
 
-    def checkPairwise( self, result, ref ):
+        if self.with_comments:
+            subset.extend(self.comments)
+        
+        return subset
+    
+    def checkPairwise(self, result, ref):
         '''check pairwise results.
         '''
         result.sort()
         ref.sort()
-
         a = set(result)
         b = set(ref)
 
-        self.assertEqual( len(result), len(ref),
-                          "unexpected number of results: result=%i, expected ref=%i, differences are %s: %s" \
-                              % (len(result), len(ref),
-                                 a.difference(b), 
-                                 b.difference(a) ))
+        self.assertEqual(
+            len(result), len(ref),
+            "unexpected number of results: result=%i, expected ref=%i, differences are %s: %s"
+            % (len(result), len(ref),
+               a.difference(b),
+               b.difference(a)))
+
+        for x, d in enumerate(list(zip(result, ref))):
+            self.assertEqual(
+                d[0], d[1],
+                "unexpected results in pair %i:\n'%s', expected\n'%s'" %
+                (x,
+                 d[0],
+                 d[1]))
+
+
+class TestGZFile(IterationTest):
+
+    filename = os.path.join(DATADIR, "example.gtf.gz")
+    with_comments = True
+
+    def setUp(self):
+
+        IterationTest.setUp(self)
+
+        self.iter = pysam.GZIterator(self.filename)
+
+    def testAll(self):
+        result = list(self.iter)
+        ref = self.getSubset()
+        self.checkPairwise(result, ref)
 
-        for x, d in enumerate( list(zip( result, ref ))):
-            self.assertEqual( d[0], d[1],
-                              "unexpected results in pair %i:\n'%s', expected\n'%s'" % \
-                                  (x, 
-                                   d[0], 
-                                   d[1]) )
 
+class TestIterationWithoutComments(IterationTest):
+    '''test iterating with Tabixfile.fetch() when
+    there are no comments in the file.'''
 
-    def testAll( self ):
+    filename = os.path.join(DATADIR,
+                            "example.gtf.gz")
+
+    def setUp(self):
+        IterationTest.setUp(self)
+        self.tabix = pysam.Tabixfile(self.filename)
+
+    def testAll(self):
         result = list(self.tabix.fetch())
-        ref = self.getSubset( )
-        self.checkPairwise( result, ref )
-
-    def testPerContig( self ):
-        for contig in ("chr1", "chr2", "chr1", "chr2" ):
-            result = list(self.tabix.fetch( contig ))
-            ref = self.getSubset( contig )
-            self.checkPairwise( result, ref )
-            
-    def testPerContigToEnd( self ):
-        
+        ref = self.getSubset()
+        self.checkPairwise(result, ref)
+
+    def testPerContig(self):
+        for contig in ("chr1", "chr2", "chr1", "chr2"):
+            result = list(self.tabix.fetch(contig))
+            ref = self.getSubset(contig)
+            self.checkPairwise(result, ref)
+
+    def testPerContigToEnd(self):
+
         end = None
-        for contig in ("chr1", "chr2", "chr1", "chr2" ):
-            for start in range( 0, 200000, 1000):
-                result = list(self.tabix.fetch( contig, start, end ))
-                ref = self.getSubset( contig, start, end )
-                self.checkPairwise( result, ref )
+        for contig in ("chr1", "chr2", "chr1", "chr2"):
+            for start in range(0, 200000, 1000):
+                result = list(self.tabix.fetch(contig, start, end))
+                ref = self.getSubset(contig, start, end)
+                self.checkPairwise(result, ref)
+
+    def testPerContigFromStart(self):
 
-    def testPerContigFromStart( self ):
-        
         start = None
-        for contig in ("chr1", "chr2", "chr1", "chr2" ):
-            for end in range( 0, 200000, 1000):
-                result = list(self.tabix.fetch( contig, start, end ))
-                ref = self.getSubset( contig, start, end )
-                self.checkPairwise( result, ref )
+        for contig in ("chr1", "chr2", "chr1", "chr2"):
+            for end in range(0, 200000, 1000):
+                result = list(self.tabix.fetch(contig, start, end))
+                ref = self.getSubset(contig, start, end)
+                self.checkPairwise(result, ref)
+
+    def testPerContig(self):
+
+        start, end = None, None
+        for contig in ("chr1", "chr2", "chr1", "chr2"):
+            result = list(self.tabix.fetch(contig, start, end))
+            ref = self.getSubset(contig, start, end)
+            self.checkPairwise(result, ref)
+
+    def testPerInterval(self):
+
+        start, end = None, None
+        for contig in ("chr1", "chr2", "chr1", "chr2"):
+            for start in range(0, 200000, 2000):
+                for end in range(start, start + 2000, 500):
+                    result = list(self.tabix.fetch(contig, start, end))
+                    ref = self.getSubset(contig, start, end)
+                    self.checkPairwise(result, ref)
+
+    def testInvalidIntervals(self):
 
-    def testPerContig( self ):
-        
-        start, end  = None, None
-        for contig in ("chr1", "chr2", "chr1", "chr2" ):
-            result = list(self.tabix.fetch( contig, start, end ))
-            ref = self.getSubset( contig, start, end )
-            self.checkPairwise( result, ref )
-                
-    def testPerInterval( self ):
-        
-        start, end  = None, None
-        for contig in ("chr1", "chr2", "chr1", "chr2" ):
-            for start in range( 0, 200000, 2000):
-                for end in range( start, start + 2000, 500):
-                    result = list(self.tabix.fetch( contig, start, end ))
-                    ref = self.getSubset( contig, start, end )
-                    self.checkPairwise( result, ref )
-                
-
-    def testInvalidIntervals( self ):
-        
         # invalid intervals (start > end)
-        self.assertRaises( ValueError, self.tabix.fetch, "chr1", 0, -10)
-        self.assertRaises( ValueError, self.tabix.fetch, "chr1", 200, 0)
+        self.assertRaises(ValueError, self.tabix.fetch, "chr1", 0, -10)
+        self.assertRaises(ValueError, self.tabix.fetch, "chr1", 200, 0)
 
         # out of range intervals
-        self.assertRaises( IndexError, self.tabix.fetch, "chr1", -10, 200)
-        self.assertRaises( IndexError, self.tabix.fetch, "chr1", -10, -20)
+        self.assertRaises(ValueError, self.tabix.fetch, "chr1", -10, 200)
+        self.assertRaises(ValueError, self.tabix.fetch, "chr1", -10, -20)
 
         # unknown chromosome
-        self.assertRaises( KeyError, self.tabix.fetch, "chrUn" )
+        self.assertRaises(ValueError, self.tabix.fetch, "chrUn")
 
         # out of range access
         # to be implemented
         # self.assertRaises( IndexError, self.tabix.fetch, "chr1", 1000000, 2000000 )
 
         # raise no error for invalid intervals
-        self.tabix.fetch( "chr1", 100,100)
+        self.tabix.fetch("chr1", 100, 100)
 
-    def testGetContigs( self ):
-        self.assertEqual( sorted(self.tabix.contigs), [b"chr1", b"chr2"] )
+    def testGetContigs(self):
+        self.assertEqual(sorted(self.tabix.contigs), [b"chr1", b"chr2"])
         # check that contigs is read-only
-        self.assertRaises( AttributeError, setattr, self.tabix, "contigs", ["chr1", "chr2"] )
+        self.assertRaises(
+            AttributeError, setattr, self.tabix, "contigs", ["chr1", "chr2"])
 
-    def testHeader( self ):
+    def testHeader(self):
         ref = []
-        inf = gzip.open( self.filename )
+        inf = gzip.open(self.filename)
         for x in inf:
             x = x.decode("ascii")
-            if not x.startswith("#"): break
-            ref.append( x[:-1].encode('ascii') )
+            if not x.startswith("#"):
+                break
+            ref.append(x[:-1].encode('ascii'))
         inf.close()
 
-        header = list( self.tabix.header )
-        self.assertEqual( ref, header )
+        header = list(self.tabix.header)
+        self.assertEqual(ref, header)
 
-    def testReopening( self ):
+    def testReopening(self):
         '''test repeated opening of the same file.'''
         def func1():
             # opens any tabix file
@@ -316,468 +375,534 @@ class TestIteration( unittest.TestCase ):
         for i in range(10000):
             func1()
 
-class TestParser( unittest.TestCase ):
 
-    filename = "example.gtf.gz" 
+class TestIterationWithComments(TestIterationWithoutComments):
+    '''test iterating with Tabixfile.fetch() when
+    there are comments in the file.
+
+    
+    Tests will create plenty of warnings on stderr.
+    '''
+
+    filename = os.path.join(DATADIR, "example_comments.gtf.gz")
+
+    def setUp(self):
+        TestIterationWithoutComments.setUp(self)
+
 
-    def setUp( self ):
+class TestParser(unittest.TestCase):
 
-        self.tabix = pysam.Tabixfile( self.filename )
-        self.compare = loadAndConvert( self.filename )
+    filename = os.path.join(DATADIR, "example.gtf.gz")
 
-    def testRead( self ):
+    def setUp(self):
 
-        for x, r in enumerate(self.tabix.fetch( parser = pysam.asTuple() )):
-            self.assertEqual( self.compare[x], list(r) )
-            self.assertEqual( len(self.compare[x]), len(r) )
+        self.tabix = pysam.Tabixfile(self.filename)
+        self.compare = loadAndConvert(self.filename)
+
+    def testRead(self):
+
+        for x, r in enumerate(self.tabix.fetch(parser=pysam.asTuple())):
+            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] )
+            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] )
+            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() )):
-            self.assertEqual( self.compare[x], list(r) )
+    def testWrite(self):
+
+        for x, r in enumerate(self.tabix.fetch(parser=pysam.asTuple())):
+            self.assertEqual(self.compare[x], list(r))
             c = list(r)
             for y in range(len(r)):
                 r[y] = "test_%05i" % y
                 c[y] = "test_%05i" % y
-            self.assertEqual( [x.encode("ascii") for x in c], list(r) )
-            self.assertEqual( "\t".join( c ), str(r) )
+            self.assertEqual([x.encode("ascii") for x in c], list(r))
+            self.assertEqual("\t".join(c), str(r))
             # check second assignment
             for y in range(len(r)):
                 r[y] = "test_%05i" % y
-            self.assertEqual( [x.encode("ascii") for x in c], list(r) )
-            self.assertEqual( "\t".join( c ), str(r) )
+            self.assertEqual([x.encode("ascii") for x in c], list(r))
+            self.assertEqual("\t".join(c), str(r))
 
-    def testUnset( self ):
-        for x, r in enumerate(self.tabix.fetch( parser = pysam.asTuple() )):
-            self.assertEqual( self.compare[x], list(r) )
+    def testUnset(self):
+        for x, r in enumerate(self.tabix.fetch(parser=pysam.asTuple())):
+            self.assertEqual(self.compare[x], list(r))
             c = list(r)
-            e = [ x.decode('ascii') for x in r ]
+            e = [x.decode('ascii') for x in r]
             for y in range(len(r)):
                 r[y] = None
                 c[y] = None
                 e[y] = ""
-                self.assertEqual( c, list(r) )
-                self.assertEqual( "\t".join(e), str(r) )
+                self.assertEqual(c, list(r))
+                self.assertEqual("\t".join(e), str(r))
 
-    def testIteratorCompressed( self ):
+    def testIteratorCompressed(self):
         '''test iteration from compressed file.'''
-        with gzip.open( self.filename ) as infile:
-            for x, r in enumerate(pysam.tabix_iterator( infile, pysam.asTuple() )):
-                self.assertEqual( self.compare[x], list(r) )
-                self.assertEqual( len(self.compare[x]), len(r) )
+        with gzip.open(self.filename) as infile:
+            for x, r in enumerate(pysam.tabix_iterator(infile, pysam.asTuple())):
+                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] )
+                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] )
+                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 testIteratorUncompressed( self ):
+    def testIteratorUncompressed(self):
         '''test iteration from uncompressed file.'''
         tmpfilename = 'tmp_testIteratorUncompressed'
-        infile = gzip.open( self.filename, "rb")
-        outfile = open( tmpfilename, "wb" )
-        outfile.write( infile.read() )
+        infile = gzip.open(self.filename, "rb")
+        outfile = open(tmpfilename, "wb")
+        outfile.write(infile.read())
         outfile.close()
         infile.close()
 
-        with open( tmpfilename ) as infile:
-            for x, r in enumerate(pysam.tabix_iterator( infile, pysam.asTuple() )):
-                self.assertEqual( self.compare[x], list(r) )
-                self.assertEqual( len(self.compare[x]), len(r) )
+        with open(tmpfilename) as infile:
+            for x, r in enumerate(pysam.tabix_iterator(infile, pysam.asTuple())):
+                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] )
+                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] )
+                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])
+
+        os.unlink(tmpfilename)
 
-        os.unlink( tmpfilename )
 
-class TestIterators( unittest.TestCase ):
+class TestIterators(unittest.TestCase):
 
-    filename = "example.gtf.gz" 
+    filename = os.path.join(DATADIR, "example.gtf.gz")
 
     iterator = pysam.tabix_generic_iterator
     parser = pysam.asTuple
     is_compressed = False
 
-    def setUp( self ):
+    def setUp(self):
 
-        self.tabix = pysam.Tabixfile( self.filename )
-        self.compare = loadAndConvert( self.filename )
+        self.tabix = pysam.Tabixfile(self.filename)
+        self.compare = loadAndConvert(self.filename)
         self.tmpfilename_uncompressed = 'tmp_TestIterators'
-        infile = gzip.open( self.filename, "rb")
-        outfile = open( self.tmpfilename_uncompressed, "wb" )
-        outfile.write( infile.read() )
+        infile = gzip.open(self.filename, "rb")
+        outfile = open(self.tmpfilename_uncompressed, "wb")
+        outfile.write(infile.read())
         outfile.close()
         infile.close()
 
-    def open( self ):
+    def open(self):
 
         if self.is_compressed:
-            infile = gzip.open( self.filename )
+            infile = gzip.open(self.filename)
         else:
-            infile = open( self.tmpfilename_uncompressed ) 
+            infile = open(self.tmpfilename_uncompressed)
         return infile
 
-    def testIteration( self ):
+    def testIteration(self):
 
         infile = self.open()
 
-        for x, r in enumerate(self.iterator( infile, self.parser())):
-            self.assertEqual( self.compare[x], list(r) )
-            self.assertEqual( len(self.compare[x]), len(r) )
+        for x, r in enumerate(self.iterator(infile, self.parser())):
+            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] )
+            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] )
+            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 testClosedFile( self ):
+    def testClosedFile(self):
         '''test for error when iterating from closed file.'''
         infile = self.open()
         infile.close()
 
         # iterating from a closed file should raise a value error
-        self.assertRaises( ValueError, self.iterator, infile, self.parser())
+        self.assertRaises(ValueError, self.iterator, infile, self.parser())
 
-    def testClosedFileIteration( self ):
+    def testClosedFileIteration(self):
         '''test for error when iterating from file that has been closed'''
-        
+
         infile = self.open()
 
-        i = self.iterator( infile, self.parser())
+        i = self.iterator(infile, self.parser())
         x = i.next()
         infile.close()
         # Not implemented
-        #self.assertRaises( ValueError, i.next )
+        # self.assertRaises(ValueError, i.next)
+
+    def tearUp(self):
+        os.unlink(self.tmpfilename_uncompressed)
 
-    def tearUp( self ):
-        os.unlink( self.tmpfilename_uncompressed )
 
-class TestIteratorsGenericCompressed( TestIterators ):
+class TestIteratorsGenericCompressed(TestIterators):
     is_compressed = True
 
-class TestIteratorsFileCompressed( TestIterators ):
+
+class TestIteratorsFileCompressed(TestIterators):
     iterator = pysam.tabix_file_iterator
     is_compressed = True
 
-class TestIteratorsFileUncompressed( TestIterators ):
+
+class TestIteratorsFileUncompressed(TestIterators):
     iterator = pysam.tabix_file_iterator
     is_compressed = False
-                      
 
-class TestGTF( TestParser ):
 
-    def testRead( self ):
+class TestGTF(TestParser):
+
+    def testRead(self):
 
-        for x, r in enumerate(self.tabix.fetch( parser = pysam.asGTF() )):
+        for x, r in enumerate(self.tabix.fetch(parser=pysam.asGTF())):
             c = self.compare[x]
-            self.assertEqual( len(c), len(r) )
-            self.assertEqual( list(c), list(r) )
-            self.assertEqual( c, splitToBytes( str(r) ) )
-            self.assertTrue( r.gene_id.startswith("ENSG") )
+            self.assertEqual(len(c), len(r))
+            self.assertEqual(list(c), list(r))
+            self.assertEqual(c, splitToBytes(str(r)))
+            self.assertTrue(r.gene_id.startswith("ENSG"))
             if r.feature != b'gene':
-                self.assertTrue( r.transcript_id.startswith("ENST") )
-            self.assertEqual( c[0], r.contig )
+                self.assertTrue(r.transcript_id.startswith("ENST"))
+            self.assertEqual(c[0], r.contig)
+
 
-class TestBed( unittest.TestCase ):
-    filename = "example.bed.gz"
+class TestBed(unittest.TestCase):
+    filename = os.path.join(DATADIR, "example.bed.gz")
 
-    def setUp( self ):
+    def setUp(self):
 
-        self.tabix = pysam.Tabixfile( self.filename)
-        self.compare = loadAndConvert( self.filename )
+        self.tabix = pysam.Tabixfile(self.filename)
+        self.compare = loadAndConvert(self.filename)
 
-    def testRead( self ):
+    def testRead(self):
 
-        for x, r in enumerate(self.tabix.fetch( parser = pysam.asBed() )):
+        for x, r in enumerate(self.tabix.fetch(parser=pysam.asBed())):
             c = self.compare[x]
-            self.assertEqual( len(c), len(r) )
-            self.assertEqual( c, splitToBytes( str(r) ) )
-            self.assertEqual( list(c), list(r) )
-            self.assertEqual( c[0], r.contig)
-            self.assertEqual( int(c[1]), r.start)
-            self.assertEqual( int(c[2]), r.end)
+            self.assertEqual(len(c), len(r))
+            self.assertEqual(c, splitToBytes(str(r)))
+            self.assertEqual(list(c), list(r))
+            self.assertEqual(c[0], r.contig)
+            self.assertEqual(int(c[1]), r.start)
+            self.assertEqual(int(c[2]), r.end)
 
-    def testWrite( self ):
+    def testWrite(self):
 
-        for x, r in enumerate(self.tabix.fetch( parser = pysam.asBed() )):
+        for x, r in enumerate(self.tabix.fetch(parser=pysam.asBed())):
             c = self.compare[x]
-            self.assertEqual( c, splitToBytes(str(r) ))
-            self.assertEqual( list(c), list(r) )
+            self.assertEqual(c, splitToBytes(str(r)))
+            self.assertEqual(list(c), list(r))
 
             r.contig = "test"
-            self.assertEqual( b"test", r.contig)
-            self.assertEqual( b"test", r[0])
+            self.assertEqual(b"test", r.contig)
+            self.assertEqual(b"test", r[0])
 
             r.start += 1
-            self.assertEqual( int(c[1]) + 1, r.start )
-            self.assertEqual( str(int(c[1]) + 1), r[1].decode("ascii" ))
+            self.assertEqual(int(c[1]) + 1, r.start)
+            self.assertEqual(str(int(c[1]) + 1), r[1].decode("ascii"))
 
             r.end += 1
-            self.assertEqual( int(c[2]) + 1, r.end )
-            self.assertEqual( str(int(c[2]) + 1), r[2].decode("ascii") )
+            self.assertEqual(int(c[2]) + 1, r.end)
+            self.assertEqual(str(int(c[2]) + 1), r[2].decode("ascii"))
 
-class TestVCF( unittest.TestCase ):
 
-    filename = "example.vcf40"
+class TestVCF(unittest.TestCase):
+
+    filename = os.path.join(DATADIR, "example.vcf40")
+
+    def setUp(self):
 
-    def setUp( self ):
-        
         self.tmpfilename = "tmp_%s.vcf" % id(self)
-        shutil.copyfile( self.filename, self.tmpfilename )
-        pysam.tabix_index( self.tmpfilename, preset = "vcf" )
+        shutil.copyfile(self.filename, self.tmpfilename)
+        pysam.tabix_index(self.tmpfilename, preset="vcf")
 
-    def tearDown( self ):
-        os.unlink( self.tmpfilename + ".gz" )
-        if os.path.exists( self.tmpfilename + ".gz.tbi" ):
-            os.unlink( self.tmpfilename + ".gz.tbi" )
+    def tearDown(self):
+        os.unlink(self.tmpfilename + ".gz")
+        if os.path.exists(self.tmpfilename + ".gz.tbi"):
+            os.unlink(self.tmpfilename + ".gz.tbi")
 
-class TestVCFFromTabix( TestVCF ):
 
-    columns = ("contig", "pos", "id", 
-               "ref", "alt", "qual", 
-               "filter", "info", "format" )
+class TestVCFFromTabix(TestVCF):
 
+    columns = ("contig", "pos", "id",
+               "ref", "alt", "qual",
+               "filter", "info", "format")
 
-    def setUp( self ):
+    def setUp(self):
 
-        TestVCF.setUp( self )
+        TestVCF.setUp(self)
 
-        self.tabix = pysam.Tabixfile( self.tmpfilename + ".gz" )
-        self.compare = loadAndConvert( self.filename )
+        self.tabix = pysam.Tabixfile(self.tmpfilename + ".gz")
+        self.compare = loadAndConvert(self.filename)
 
-    def testRead( self ):
-        
-        ncolumns = len(self.columns) 
+    def testRead(self):
+
+        ncolumns = len(self.columns)
 
-        for x, r in enumerate(self.tabix.fetch( parser = pysam.asVCF() )):
+        for x, r in enumerate(self.tabix.fetch(parser=pysam.asVCF())):
             c = self.compare[x]
-            for y, field in enumerate( self.columns ):
+            for y, field in enumerate(self.columns):
                 # it is ok to have a missing format column
-                if y == 8 and y == len(c): continue
+                if y == 8 and y == len(c):
+                    continue
                 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" %\
-                                          ( field,c[y], getattr( r, field ) ) )
+                    self.assertEqual(c[y], getattr(r, field),
+                                     "mismatch in field %s: %s != %s" %
+                                     (field, c[y], getattr(r, field)))
             if len(c) == 8:
-                self.assertEqual( 0, len(r) )
+                self.assertEqual(0, len(r))
             else:
-                self.assertEqual( len(c), len( r ) + ncolumns )
+                self.assertEqual(len(c), len(r) + ncolumns)
 
             for y in range(len(c) - ncolumns):
-                self.assertEqual( c[ncolumns+y], r[y] )
-   
-    def testWrite( self ):
+                self.assertEqual(c[ncolumns + y], r[y])
+
+    def testWrite(self):
 
-        ncolumns = len(self.columns) 
+        ncolumns = len(self.columns)
 
-        for x, r in enumerate(self.tabix.fetch( parser = pysam.asVCF() )):
+        for x, r in enumerate(self.tabix.fetch(parser=pysam.asVCF())):
             c = self.compare[x]
             # check unmodified string
             cmp_string = str(r)
-            ref_string = "\t".join( [x.decode() for x in c] )
+            ref_string = "\t".join([x.decode() for x in c])
+
+            self.assertEqual(ref_string, cmp_string)
 
-            self.assertEqual( ref_string, cmp_string )
-            
             # set fields and compare field-wise
-            for y, field in enumerate( self.columns ):
+            for y, field in enumerate(self.columns):
                 # it is ok to have a missing format column
-                if y == 8 and y == len(c): continue
+                if y == 8 and y == len(c):
+                    continue
                 if field == "pos":
-                    rpos = getattr( r, field )
-                    self.assertEqual( int(c[y]) - 1, rpos )
-                    self.assertEqual( int(c[y]) - 1, 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 ) 
+                    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)
+                    setattr(r, field, "test_%i" % y)
                     c[y] = ("test_%i" % y).encode('ascii')
-                    self.assertEqual( c[y], getattr( r, field ), 
-                                      "mismatch in field %s: %s != %s" %\
-                                          ( field,c[y], getattr( r, field ) ) )
+                    self.assertEqual(c[y], getattr(r, field),
+                                     "mismatch in field %s: %s != %s" %
+                                     (field, c[y], getattr(r, field)))
 
             if len(c) == 8:
-                self.assertEqual( 0, len(r) )
+                self.assertEqual(0, len(r))
             else:
-                self.assertEqual( len(c), len( r ) + ncolumns )
-            
+                self.assertEqual(len(c), len(r) + ncolumns)
+
             for y in range(len(c) - ncolumns):
-                c[ncolumns+y] = ("test_%i" % y).encode('ascii')
+                c[ncolumns + y] = ("test_%i" % y).encode('ascii')
                 r[y] = ("test_%i" % y).encode('ascii')
-                self.assertEqual( c[ncolumns+y], r[y] )
+                self.assertEqual(c[ncolumns + y], r[y])
+
 
-class TestVCFFromVCF( TestVCF ):
+class TestVCFFromVCF(TestVCF):
 
-    columns = ("chrom", "pos", "id", 
-               "ref", "alt", "qual", 
-               "filter", "info", "format" )
+    columns = ("chrom", "pos", "id",
+               "ref", "alt", "qual",
+               "filter", "info", "format")
 
     # tests failing while parsing
-    fail_on_parsing = ( (5, "Flag fields should not have a value"),
-                       (9, "aouao" ),
-                       (13, "aoeu" ),
-                       (18, "Error BAD_NUMBER_OF_PARAMETERS" ),
-                       (24, "Error HEADING_NOT_SEPARATED_BY_TABS" ) )
+    fail_on_parsing = (
+        (5, "Flag fields should not have a value"),
+        (9, "aouao"),
+        (13, "aoeu"),
+        (18, "Error BAD_NUMBER_OF_PARAMETERS"),
+        (24, "Error HEADING_NOT_SEPARATED_BY_TABS"))
 
     # tests failing on opening
-    fail_on_opening = ( (24, "Error HEADING_NOT_SEPARATED_BY_TABS" ),
-                     )
-    def setUp( self ):
-        
-        TestVCF.setUp( self )
+    fail_on_opening = ((24, "Error HEADING_NOT_SEPARATED_BY_TABS"),
+                       )
+
+    def setUp(self):
+
+        TestVCF.setUp(self)
 
         self.vcf = pysam.VCF()
-        self.compare = loadAndConvert( self.filename, encode = False )
+        self.compare = loadAndConvert(self.filename, encode=False)
 
-    def testParsing( self ):
+    def testConnecting(self):
 
-        # self.vcf.connect( self.tmpfilename + ".gz" )
-        ncolumns = len(self.columns) 
+        fn = os.path.basename(self.filename)
+        for x, msg in self.fail_on_opening:
+            if "%i.vcf" % x == fn:
+                self.assertRaises(ValueError,
+                                  self.vcf.connect,
+                                  self.tmpfilename + ".gz")
+            else:
+                self.vcf.connect(self.tmpfilename + ".gz")
+
+    def testParsing(self):
 
-        fn = os.path.basename( self.filename )
+        fn = os.path.basename(self.filename)
         with open(self.filename) as f:
 
             for x, msg in self.fail_on_opening:
                 if "%i.vcf" % x == fn:
-                    self.assertRaises( ValueError, self.vcf.parse, f )
+                    self.assertRaises(ValueError, self.vcf.parse, f)
                     return
             else:
                 iter = self.vcf.parse(f)
 
             for x, msg in self.fail_on_parsing:
                 if "%i.vcf" % x == fn:
-                    self.assertRaises( ValueError, list, iter )
+                    self.assertRaises(ValueError, list, iter)
                     break
                     # python 2.7
-                    # self.assertRaisesRegexp( ValueError, re.compile(msg), self.vcf.parse, f )
+                    # self.assertRaisesRegexp(
+                    # ValueError, re.compile(msg), self.vcf.parse, f)
             else:
                 # do the actual parsing
                 for x, r in enumerate(iter):
                     c = self.compare[x]
-                    for y, field in enumerate( self.columns ):
+                    for y, field in enumerate(self.columns):
                         # it is ok to have a missing format column
-                        if y == 8 and y == len(c): continue
+                        if y == 8 and y == len(c):
+                            continue
 
-                        val = r[field] 
+                        val = r[field]
                         if field == "pos":
-                            self.assertEqual( int(c[y]) - 1, val )
+                            self.assertEqual(int(c[y]) - 1, val)
                         elif field == "alt":
                             if c[y] == ".":
                                 # convert . to empty list
-                                self.assertEqual( [], val, 
-                                                  "mismatch in field %s: expected %s, got %s" %\
-                                                      ( field,c[y], val ) )
+                                self.assertEqual(
+                                    [], val,
+                                    "mismatch in field %s: expected %s, got %s" %
+                                    (field, c[y], val))
                             else:
                                 # convert to list
-                                self.assertEqual( c[y].split(","), val, 
-                                                  "mismatch in field %s: expected %s, got %s" %\
-                                                      ( field,c[y], val ) )
-
+                                self.assertEqual(
+                                    c[y].split(","), val,
+                                    "mismatch in field %s: expected %s, got %s" %
+                                    (field, c[y], val))
+                                
                         elif field == "filter":
                             if c[y] == "PASS" or c[y] == ".":
                                 # convert PASS to empty list
-                                self.assertEqual( [], val, 
-                                                  "mismatch in field %s: expected %s, got %s" %\
-                                                      ( field,c[y], val ) )
+                                self.assertEqual(
+                                    [], val,
+                                    "mismatch in field %s: expected %s, got %s" %
+                                    (field, c[y], val))
                             else:
                                 # convert to list
-                                self.assertEqual( c[y].split(";"), val, 
-                                                  "mismatch in field %s: expected %s, got %s" %\
-                                                      ( field,c[y], val ) )
+                                self.assertEqual(
+                                    c[y].split(";"), val,
+                                    "mismatch in field %s: expected %s, got %s" %
+                                    (field, c[y], val))
 
                         elif field == "info":
                             # tests for info field not implemented
                             pass
                         elif field == "qual" and c[y] == ".":
-                            self.assertEqual( -1, val,
-                                               "mismatch in field %s: expected %s, got %s" %\
-                                                   ( field,c[y], val ) )
+                            self.assertEqual(
+                                -1, val,
+                                "mismatch in field %s: expected %s, got %s" %
+                                (field, c[y], val))
+
                         elif field == "format":
                             # format field converted to list
-                            self.assertEqual( c[y].split(":"), val,
-                                              "mismatch in field %s: expected %s, got %s" %\
-                                                  ( field,c[y], val ) )
+                            self.assertEqual(
+                                c[y].split(":"), val,
+                                "mismatch in field %s: expected %s, got %s" %
+                                (field, c[y], val))
 
                         elif type(val) in (int, float):
                             if c[y] == ".":
-                                self.assertEqual( None, val, 
-                                                  "mismatch in field %s: expected %s, got %s" %\
-                                                      ( field,c[y], val ) )
-
+                                self.assertEqual(
+                                    None, val,
+                                    "mismatch in field %s: expected %s, got %s" %
+                                    (field, c[y], val))
                             else:
-                                self.assertEqual( float( c[y]), float(val), 
-                                                  "mismatch in field %s: expected %s, got %s" %\
-                                                      ( field,c[y], val ) )
-
+                                self.assertEqual(
+                                    float(c[y]), float(val),
+                                    "mismatch in field %s: expected %s, got %s" %
+                                    (field, c[y], val))
                         else:
-                            self.assertEqual( c[y], val, 
-                                              "mismatch in field %s: expected %s, got %s" %\
-                                                  ( field, c[y], val ) )
+                            self.assertEqual(
+                                c[y], val,
+                                "mismatch in field %s: expected %s, got %s" %
+                                (field, c[y], val))
 
-############################################################################ 
+############################################################################
 # create a test class for each example vcf file.
-# Two samples are created - 
+# Two samples are created -
 # 1. Testing pysam/tabix access
 # 2. Testing the VCF class
-vcf_files = glob.glob( "vcf-examples/*.vcf" )
+vcf_files = glob.glob(os.path.join(DATADIR, "vcf", "*.vcf"))
 
 for vcf_file in vcf_files:
-    n = "VCFFromTabixTest_%s" % os.path.basename( vcf_file[:-4] )
-    globals()[n] = type( n, (TestVCFFromTabix,), dict( filename=vcf_file,) )
-    n = "VCFFromVCFTest_%s" % os.path.basename( vcf_file[:-4] )
-    globals()[n] = type( n, (TestVCFFromVCF,), dict( filename=vcf_file,) )
+    n = "VCFFromTabixTest_%s" % os.path.basename(vcf_file[:-4])
+    globals()[n] = type(n, (TestVCFFromTabix,), dict(filename=vcf_file,))
+    n = "VCFFromVCFTest_%s" % os.path.basename(vcf_file[:-4])
+    globals()[n] = type(n, (TestVCFFromVCF,), dict(filename=vcf_file,))
 
-############################################################################                   
-class TestRemoteFileHTTP( unittest.TestCase):
+############################################################################
 
-    url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz"
+
+class TestRemoteFileHTTP(unittest.TestCase):
+
+    url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_htslib.gtf.gz"
     region = "chr1:1-1000"
-    local = "example.gtf.gz"
+    local = os.path.join(DATADIR, "example.gtf.gz")
 
-    def testFetchAll( self ):
-        remote_file = pysam.Tabixfile(self.url, "r")  
+    def testFetchAll(self):
+        remote_file = pysam.Tabixfile(self.url, "r")
         remote_result = list(remote_file.fetch())
-        local_file = pysam.Tabixfile(self.local, "r")  
+        local_file = pysam.Tabixfile(self.local, "r")
         local_result = list(local_file.fetch())
 
-        self.assertEqual( len(remote_result), len(local_result) )
+        self.assertEqual(len(remote_result), len(local_result))
         for x, y in zip(remote_result, local_result):
-            self.assertEqual( x, y )
+            self.assertEqual(x, y)
 
 
-if __name__ == "__main__":
+class TestIndexArgument(unittest.TestCase):
 
-    unittest.main()
+    filename_src = os.path.join(DATADIR, "example.vcf.gz")
+    filename_dst = "tmp_example.vcf.gz"
+    index_src = os.path.join(DATADIR, "example.vcf.gz.tbi")
+    index_dst = "tmp_index_example.vcf.gz.tbi"
+    preset = "vcf"
+
+    def testFetchAll(self):
+        shutil.copyfile(self.filename_src, self.filename_dst)
+        shutil.copyfile(self.index_src, self.index_dst)
+        same_basename_file = pysam.Tabixfile(
+            self.filename_src, "r", index=self.index_src)
+        same_basename_results = list(same_basename_file.fetch())
+        diff_index_file = pysam.Tabixfile(
+            self.filename_dst, "r", index=self.index_dst)
+        diff_index_result = list(diff_index_file.fetch())
 
+        self.assertEqual(len(same_basename_results), len(diff_index_result))
+        for x, y in zip(same_basename_results, diff_index_result):
+            self.assertEqual(x, y)
 
+if __name__ == "__main__":
+
+    unittest.main()
diff --git a/tests/tag_bug.bam b/tests/tag_bug.bam
deleted file mode 100644
index 40e25f6..0000000
Binary files a/tests/tag_bug.bam and /dev/null differ
diff --git a/tests/test_unaligned.bam b/tests/test_unaligned.bam
deleted file mode 100644
index c71b01c..0000000
Binary files a/tests/test_unaligned.bam and /dev/null differ
diff --git a/tests/vcf-examples/10.vcf b/tests/vcf-examples/10.vcf
deleted file mode 100644
index 4ec2daf..0000000
--- a/tests/vcf-examples/10.vcf
+++ /dev/null
@@ -1,84 +0,0 @@
-##fileformat=VCFv4.0
-##FILTER=<ID=HardyWeinbergViolation,Description="The validation is in Hardy-Weinberg violation">
-##FILTER=<ID=HighNoCallRate,Description="The validation no-call rate is too high">
-##FILTER=<ID=TooManyHomVars,Description="The validation homozygous variant rate is too high">
-##INFO=<ID=AC,Number=1,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
-##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
-##INFO=<ID=HW,Number=1,Type=Float,Description="Phred-scaled Hardy-Weinberg violation p-value">
-##INFO=<ID=HetPct,Number=1,Type=Float,Description="Percent of heterozygous genotypes">
-##INFO=<ID=HomRefPct,Number=1,Type=Float,Description="Percent of homozygous reference genotypes">
-##INFO=<ID=HomVarPct,Number=1,Type=Float,Description="Percent homozygous variant genotypes">
-##INFO=<ID=NoCallPct,Number=1,Type=Float,Description="Percent of no-calls">
-##ValidationMetrics_HardyWeinbergViolations="25 (8%)"
-##ValidationMetrics_HomVarViolations="0 (0%)"
-##ValidationMetrics_NoCallViolations="13 (4%)"
-##ValidationMetrics_PolymorphicPassingRecords="195 (75%)"
-##ValidationMetrics_RecordsPassingFilters="258 (87%)"
-##ValidationMetrics_RecordsProcessed=296
-##ValidationMetrics_SamplesAssayed=383
-##VariantValidationAssessor="analysis_type=VariantValidationAssessor input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=null excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[rawData/plink.renamed.sorted.fixed.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction=null downsample_to_coverage=null baq=OFF baqGap [...]
-##source=PLINK
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	HG00127	HG00128	HG00136	HG00137	HG00138	HG00139	HG00152	HG00156	HG00234	HG00235	HG00237	HG00242	HG00244	HG00262	HG01055	HG01079	NA19138	NA18974	NA18523	NA12717	NA19209	NA18577	NA18973	NA18943	NA12873	NA18623	NA18622	NA18948	NA19171	NA19204	NA06994	NA18563	NA18547	NA18861	NA18608	NA18995	NA10851	NA18976	NA18603	NA19200	HG01204	HG01191	HG01101	HG00146	HG00306	NA18985	HG00160	HG00635	HG00372	HG00357	HG00634	NA18541	NA18950	NA19759	HG00351	HG0025 [...]
-20	676148	.	A	AC	.	PASS	AC=0;AN=758;HW=0.00;HetPct=0.0;HomRefPct=99.0;HomVarPct=0.0;NoCallPct=1.0	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0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ct=99.5;HomVarPct=0.0;NoCallPct=0.5	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/ [...]
-20	61531765	.	AG	A	.	PASS	AC=0;AN=766;HW=0.00;HetPct=0.0;HomRefPct=100.0;HomVarPct=0.0;NoCallPct=0.0	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	 [...]
diff --git a/tests/vcf-examples/11.vcf b/tests/vcf-examples/11.vcf
deleted file mode 100644
index fe190df..0000000
--- a/tests/vcf-examples/11.vcf
+++ /dev/null
@@ -1,216 +0,0 @@
-##fileformat=VCFv4.0
-##FILTER=<ID=HardyWeinbergViolation,Description="The validation is in Hardy-Weinberg violation">
-##FILTER=<ID=HighNoCallRate,Description="The validation no-call rate is too high">
-##FILTER=<ID=TooManyHomVars,Description="The validation homozygous variant rate is too high">
-##INFO=<ID=AC,Number=1,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
-##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
-##INFO=<ID=HW,Number=1,Type=Float,Description="Phred-scaled Hardy-Weinberg violation p-value">
-##INFO=<ID=HetPct,Number=1,Type=Float,Description="Percent of heterozygous genotypes">
-##INFO=<ID=HomRefPct,Number=1,Type=Float,Description="Percent of homozygous reference genotypes">
-##INFO=<ID=HomVarPct,Number=1,Type=Float,Description="Percent homozygous variant genotypes">
-##INFO=<ID=NoCallPct,Number=1,Type=Float,Description="Percent of no-calls">
-##ValidationMetrics_HardyWeinbergViolations="25 (8%)"
-##ValidationMetrics_HomVarViolations="0 (0%)"
-##ValidationMetrics_NoCallViolations="13 (4%)"
-##ValidationMetrics_PolymorphicPassingRecords="195 (75%)"
-##ValidationMetrics_RecordsPassingFilters="258 (87%)"
-##ValidationMetrics_RecordsProcessed=296
-##ValidationMetrics_SamplesAssayed=383
-##VariantValidationAssessor="analysis_type=VariantValidationAssessor input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=null excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[rawData/plink.renamed.sorted.fixed.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction=null downsample_to_coverage=null baq=OFF baqGap [...]
-##source=PLINK
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	HG00127	HG00128	HG00136	HG00137	HG00138	HG00139	HG00152	HG00156	HG00234	HG00235	HG00237	HG00242	HG00244	HG00262	HG01055	HG01079	NA19138	NA18974	NA18523	NA12717	NA19209	NA18577	NA18973	NA18943	NA12873	NA18623	NA18622	NA18948	NA19171	NA19204	NA06994	NA18563	NA18547	NA18861	NA18608	NA18995	NA10851	NA18976	NA18603	NA19200	HG01204	HG01191	HG01101	HG00146	HG00306	NA18985	HG00160	HG00635	HG00372	HG00357	HG00634	NA18541	NA18950	NA19759	HG00351	HG0025 [...]
-20	669442	.	TG	T	.	PASS	AC=54;AN=766;HW=6.74;HetPct=12.0;HomRefPct=86.9;HomVarPct=1.0;NoCallPct=0.0	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	1/1	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0 [...]
-20	719486	.	C	CT	.	PASS	AC=1;AN=760;HW=0.00;HetPct=0.3;HomRefPct=99.0;HomVarPct=0.0;NoCallPct=0.8	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0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0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/ [...]
-20	62871860	.	C	CCCGCA	.	PASS	AC=27;AN=764;HW=17.87;HetPct=5.5;HomRefPct=93.5;HomVarPct=0.8;NoCallPct=0.3	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	1/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1 [...]
diff --git a/tests/vcf-examples/12.vcf b/tests/vcf-examples/12.vcf
deleted file mode 100644
index e0d112c..0000000
--- a/tests/vcf-examples/12.vcf
+++ /dev/null
@@ -1,1000 +0,0 @@
-##fileformat=VCFv4.0
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	DNA_pool_A
-chr1	1281168	.	A	G	14	.	DP=37;AF1=0.6243;CI95=0.5,1;DP4=4,0,6,0;MQ=15;PV4=1,0.027,1,1	PL:GT:GQ	43,0,4:0/1:6
-chr1	1281205	.	T	C	26	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	58,9,0:1/1:63
-chr1	1281206	.	G	C	25	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	57,9,0:1/1:63
-chr1	1922737	.	G	C	13.2	.	DP=21;AF1=1;CI95=1,1;DP4=0,0,0,21;MQ=22	PL:GT:GQ	46,63,0:1/1:99
-chr1	21197513	.	A	G	55.1	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=41	PL:GT:GQ	88,21,0:1/1:84
-chr1	21343209	.	T	C	5.45	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=14	PL:GT:GQ	37,51,0:1/1:99
-chr1	22097362	.	T	C	4.75	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	35,9,0:1/1:63
-chr1	22254012	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	22650927	.	G	A	48.1	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=24	PL:GT:GQ	81,21,0:1/1:84
-chr1	23535401	.	C	T	40.4	.	DP=25;AF1=1;CI95=0.5,1;DP4=0,16,0,5;MQ=19;PV4=1,0.2,1,1	PL:GT:GQ	73,13,0:1/1:65
-chr1	23543855	.	T	C	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=44	PL:GT:GQ	82,18,0:1/1:90
-chr1	24245107	.	C	G	32	.	DP=4;AF1=0.5001;CI95=0.5,0.5;DP4=0,2,0,2;MQ=36;PV4=1,1,1,1	PL:GT:GQ	62,0,35:0/1:38
-chr1	24274412	.	G	C	39.5	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=32	PL:GT:GQ	72,12,0:1/1:72
-chr1	36529832	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr1	37788090	.	A	G	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr1	43120440	.	C	T	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=49;PV4=1,1,1,1	PL:GT:GQ	64,0,31:0/1:34
-chr1	43980466	.	C	T	43	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=19	PL:GT:GQ	76,45,0:1/1:99
-chr1	46047795	.	T	C	29.1	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=31	PL:GT:GQ	62,18,0:1/1:90
-chr1	48860309	.	C	T	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=46	PL:GT:GQ	141,18,0:1/1:90
-chr1	49415599	.	T	C	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	34,6,0:1/1:49
-chr1	51601816	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	51955459	.	G	C	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr1	68479569	.	T	G	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	43,6,0:1/1:49
-chr1	69032455	.	A	G	15.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	47,9,0:1/1:63
-chr1	71888225	.	G	T	9.31	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr1	72381528	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr1	82004013	.	A	G	37.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	70,12,0:1/1:72
-chr1	86289622	.	C	T	18	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	50,9,0:1/1:63
-chr1	90267663	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=45	PL:GT:GQ	54,9,0:1/1:63
-chr1	92699542	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr1	94867317	.	G	A	26.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	58,6,0:1/1:49
-chr1	96428713	.	C	G	3.98	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=27	PL:GT:GQ	33,6,0:1/1:49
-chr1	100466329	.	G	C	4.85	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=22	PL:GT:GQ	36,18,0:1/1:90
-chr1	101909281	.	G	A	70	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=4,0,5,0;MQ=46;PV4=1,1,0.096,1	PL:GT:GQ	100,0,88:0/1:91
-chr1	106216572	.	T	A	22	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,16,0;MQ=21	PL:GT:GQ	55,48,0:1/1:99
-chr1	107901770	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	40,6,0:1/1:49
-chr1	108431179	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=41	PL:GT:GQ	155,24,0:1/1:96
-chr1	112005344	.	C	T	99	.	DP=52;AF1=1;CI95=1,1;DP4=7,0,27,0;MQ=44;PV4=1,1,1,1	PL:GT:GQ	196,25,0:1/1:99
-chr1	116625452	.	C	T	36	.	DP=44;AF1=0.5;CI95=0.5,0.5;DP4=0,23,0,20;MQ=49;PV4=1,2.3e-69,0.42,1	PL:GT:GQ	66,0,179:0/1:69
-chr1	118060710	.	G	T	6.98	.	DP=8;AF1=0.4999;CI95=0.5,0.5;DP4=4,0,3,0;MQ=47;PV4=1,0.0071,1,1	PL:GT:GQ	36,0,73:0/1:39
-chr1	118198177	.	A	G	15.9	.	DP=23;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	47,6,0:1/1:49
-chr1	118586346	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr1	120809555	.	G	A	20	.	DP=8;AF1=0.5;CI95=0.5,0.5;DP4=6,0,2,0;MQ=46;PV4=1,1,1,1	PL:GT:GQ	50,0,106:0/1:53
-chr1	130723110	.	C	A	20.7	.	DP=8;AF1=0.5939;CI95=0.5,1;DP4=0,6,0,2;MQ=26;PV4=1,1,1,1	PL:GT:GQ	50,0,5:0/1:7
-chr1	133979895	.	T	C	14.9	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	46,6,0:1/1:49
-chr1	134977940	.	C	T	30	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=38;PV4=1,1,0.26,1	PL:GT:GQ	60,0,31:0/1:34
-chr1	141768589	.	G	A	18.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=4,0,4,0;MQ=51;PV4=1,2.7e-05,1,1	PL:GT:GQ	48,0,100:0/1:51
-chr1	141768590	.	G	A	22	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=2,0,4,0;MQ=50;PV4=1,0.0033,1,1	PL:GT:GQ	52,0,40:0/1:43
-chr1	146506051	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=43	PL:GT:GQ	76,9,0:1/1:63
-chr1	150997009	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr1	162915612	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	168455400	.	A	G	4.12	.	DP=28;AF1=1;CI95=1,1;DP4=0,0,0,27;MQ=10	PL:GT:GQ	35,81,0:1/1:99
-chr1	172784744	.	T	C	17.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	49,6,0:1/1:49
-chr1	183627307	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	185789457	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr1	187081827	.	T	C	4.77	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=17	PL:GT:GQ	36,30,0:1/1:99
-chr1	188468339	.	C	T	33	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=24	PL:GT:GQ	66,39,0:1/1:99
-chr1	188595435	.	C	T	41.8	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr1	188670561	.	G	C	3.55	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=18	PL:GT:GQ	34,27,0:1/1:99
-chr1	188924877	.	G	A	6.2	.	DP=10;AF1=0.9999;CI95=0.5,1;DP4=2,0,3,0;MQ=21;PV4=1,1,1,0.3	PL:GT:GQ	35,3,0:1/1:41
-chr1	190536295	.	G	A	68	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,36,0;MQ=18	PL:GT:GQ	101,108,0:1/1:99
-chr1	191129408	.	T	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr1	195937816	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr1	198857619	.	T	C	89	.	DP=61;AF1=0.5;CI95=0.5,0.5;DP4=0,38,0,17;MQ=30;PV4=1,0.032,1,1	PL:GT:GQ	119,0,139:0/1:99
-chr1	199057483	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	44,6,0:1/1:49
-chr1	200133619	.	G	C	5.83	.	DP=49;AF1=1;CI95=0.5,1;DP4=2,0,8,0;MQ=17;PV4=1,0.059,1,0.2	PL:GT:GQ	37,12,0:1/1:72
-chr1	200729661	.	A	T	36	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=27	PL:GT:GQ	69,42,0:1/1:99
-chr1	201374519	.	T	C	69.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=39	PL:GT:GQ	102,12,0:1/1:72
-chr1	202811668	.	G	A	20.2	.	DP=4;AF1=0.5163;CI95=0.5,1;DP4=0,1,0,3;MQ=24;PV4=1,1,1,1	PL:GT:GQ	50,0,12:0/1:15
-chr1	202960650	.	C	T	16.6	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=27	PL:GT:GQ	49,12,0:1/1:72
-chr1	205686638	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr1	205949857	.	A	G	3.14	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=21	PL:GT:GQ	33,15,0:1/1:75
-chr1	209806643	.	A	G	13.2	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=21	PL:GT:GQ	46,24,0:1/1:96
-chr1	209871501	.	C	T	25	.	DP=12;AF1=0.5;CI95=0.5,0.5;DP4=5,0,4,0;MQ=41;PV4=1,7.7e-06,1,1	PL:GT:GQ	55,0,84:0/1:58
-chr1	211051323	.	G	A	99	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=49	PL:GT:GQ	176,24,0:1/1:96
-chr1	211389716	.	C	T	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	43,6,0:1/1:49
-chr1	211868415	.	G	A	3.54	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=14	PL:GT:GQ	34,33,0:1/1:99
-chr1	211914531	.	C	T	84.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,1,0,4;MQ=46;PV4=1,1,1,1	PL:GT:GQ	116,7,0:1/1:57
-chr1	214691313	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr1	215184650	.	C	T	40.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	72,6,0:1/1:49
-chr1	215995258	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr1	217031394	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	217986960	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	76,9,0:1/1:63
-chr1	218086681	.	A	G	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=34	PL:GT:GQ	142,27,0:1/1:99
-chr1	218546019	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	218632417	.	G	T	17.1	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=26	PL:GT:GQ	50,21,0:1/1:84
-chr1	218833355	.	C	G	23	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=5,0,2,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	53,0,63:0/1:56
-chr1	219303186	.	T	C	7.79	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,25;MQ=12	PL:GT:GQ	40,75,0:1/1:99
-chr1	219517634	.	G	A	26.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=42	PL:GT:GQ	59,12,0:1/1:72
-chr1	219590158	.	T	C	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	33,12,0:1/1:72
-chr1	219709853	.	A	T	99	.	DP=124;AF1=0.5;CI95=0.5,0.5;DP4=80,0,41,0;MQ=44;PV4=1,0.26,1,1	PL:GT:GQ	143,0,156:0/1:99
-chr1	222457988	.	A	G	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=23	PL:GT:GQ	42,6,0:1/1:49
-chr1	222477914	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr1	223010233	.	A	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr1	223796360	.	G	A	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=21	PL:GT:GQ	37,6,0:1/1:49
-chr1	224273784	.	A	T	14.2	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=15	PL:GT:GQ	47,30,0:1/1:99
-chr1	224454685	.	C	T	46.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=32	PL:GT:GQ	79,15,0:1/1:75
-chr1	224514706	.	G	C	21	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,38,0;MQ=19	PL:GT:GQ	54,114,0:1/1:99
-chr1	224515793	.	C	T	99	.	DP=26;AF1=1;CI95=1,1;DP4=0,0,26,0;MQ=45	PL:GT:GQ	211,78,0:1/1:99
-chr1	224692969	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	40,6,0:1/1:49
-chr1	225607249	.	A	G	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=45;PV4=1,1,0,1	PL:GT:GQ	64,0,31:0/1:34
-chr1	226923918	.	C	A	29.1	.	DP=52;AF1=1;CI95=0.5,1;DP4=0,2,0,10;MQ=27;PV4=1,1,1,1	PL:GT:GQ	62,18,0:1/1:90
-chr1	227125189	.	T	C	56.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=41	PL:GT:GQ	89,12,0:1/1:72
-chr1	227133712	.	A	T	20.1	.	DP=26;AF1=0.5;CI95=0.5,0.5;DP4=11,0,10,0;MQ=23;PV4=1,1,0.48,1	PL:GT:GQ	50,0,39:0/1:42
-chr1	227943954	.	G	C	47	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=37	PL:GT:GQ	79,9,0:1/1:63
-chr1	227943974	.	G	A	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=34	PL:GT:GQ	66,12,0:1/1:72
-chr1	228067480	.	A	G	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=45	PL:GT:GQ	75,15,0:1/1:75
-chr1	228067510	.	A	G	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=45	PL:GT:GQ	140,15,0:1/1:75
-chr1	228088778	.	C	T	6.79	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=23	PL:GT:GQ	37,6,0:1/1:49
-chr1	228117888	.	A	C	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	45,6,0:1/1:49
-chr1	228139641	.	T	C	44.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	77,12,0:1/1:72
-chr1	228577146	.	T	C	26	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,14;MQ=22;PV4=1,1,1,0.027	PL:GT:GQ	56,0,77:0/1:59
-chr1	229001369	.	C	A	45	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	77,9,0:1/1:63
-chr1	229001386	.	C	T	8.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	39,6,0:1/1:49
-chr1	229348080	.	T	C	18.1	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=40;PV4=1,0.33,0.17,0.33	PL:GT:GQ	48,0,31:0/1:34
-chr1	229439710	.	C	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=32	PL:GT:GQ	66,12,0:1/1:72
-chr1	229655149	.	T	C	30	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=30	PL:GT:GQ	63,24,0:1/1:96
-chr1	229660873	.	C	G	81	.	DP=28;AF1=0.5;CI95=0.5,0.5;DP4=0,20,0,7;MQ=36;PV4=1,1,1,1	PL:GT:GQ	111,0,120:0/1:99
-chr2a	3661005	.	C	G	24	.	DP=13;AF1=0.5001;CI95=0.5,0.5;DP4=7,0,4,0;MQ=27;PV4=1,1.1e-05,1,1	PL:GT:GQ	54,0,34:0/1:37
-chr2a	4140063	.	G	A	81	.	DP=26;AF1=0.6671;CI95=0.5,1;DP4=18,0,8,0;MQ=24;PV4=1,8.3e-09,1,1	PL:GT:GQ	110,0,3:0/1:5
-chr2a	4248440	.	T	C	20	.	DP=28;AF1=0.5;CI95=0.5,0.5;DP4=11,0,7,0;MQ=25;PV4=1,1,0.47,1	PL:GT:GQ	50,0,92:0/1:53
-chr2a	4707656	.	A	G	63	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	95,9,0:1/1:63
-chr2a	5194801	.	G	A	7.59	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=24	PL:GT:GQ	38,6,0:1/1:49
-chr2a	14111103	.	A	G	7.84	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=20	PL:GT:GQ	40,21,0:1/1:84
-chr2a	17799746	.	A	G	11.3	.	DP=5;AF1=0.5001;CI95=0.5,0.5;DP4=0,3,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	41,0,35:0/1:37
-chr2a	24728910	.	G	A	45.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=28	PL:GT:GQ	78,15,0:1/1:75
-chr2a	29627939	.	G	T	5.44	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=27	PL:GT:GQ	36,9,0:1/1:63
-chr2a	31373164	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr2a	33935228	.	T	C	41.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr2a	36311856	.	G	A	99	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,0,29;MQ=44	PL:GT:GQ	213,87,0:1/1:99
-chr2a	39281204	.	T	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr2a	41087565	.	C	T	74.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=38	PL:GT:GQ	107,12,0:1/1:72
-chr2a	45574768	.	C	A	11.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=18	PL:GT:GQ	43,9,0:1/1:63
-chr2a	55464464	.	T	C	26.1	.	DP=7;AF1=0.9966;CI95=0.5,1;DP4=5,0,2,0;MQ=26;PV4=1,1,1,1	PL:GT:GQ	55,1,0:1/1:23
-chr2a	63107673	.	T	A	70.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=34	PL:GT:GQ	103,12,0:1/1:72
-chr2a	63141732	.	A	T	22.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	54,6,0:1/1:49
-chr2a	63141910	.	G	A	3.41	.	DP=16;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr2a	63141911	.	C	T	9.55	.	DP=16;AF1=0.5031;CI95=0.5,0.5;DP4=0,2,0,3;MQ=33;PV4=1,0.43,1,1	PL:GT:GQ	39,0,19:0/1:22
-chr2a	63143543	.	C	T	28	.	DP=18;AF1=1;CI95=1,1;DP4=0,1,0,17;MQ=16;PV4=1,1,1,1	PL:GT:GQ	61,42,0:1/1:99
-chr2a	66419805	.	G	A	3.69	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	34,15,0:1/1:75
-chr2a	66563922	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr2a	67719136	.	C	T	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	71,6,0:1/1:49
-chr2a	72781453	.	A	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr2a	76733211	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr2a	78190502	.	A	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr2a	85021209	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr2a	88554861	.	A	T	39	.	DP=74;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,4;MQ=46;PV4=1,1,1,1	PL:GT:GQ	69,0,92:0/1:72
-chr2a	88554877	.	A	G	92	.	DP=90;AF1=0.5;CI95=0.5,0.5;DP4=0,23,0,13;MQ=41;PV4=1,0.3,1,1	PL:GT:GQ	122,0,128:0/1:99
-chr2a	88824857	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr2a	93546675	.	C	T	26	.	DP=6;AF1=0.5;CI95=0.5,0.5;DP4=4,0,2,0;MQ=46;PV4=1,1,1,1	PL:GT:GQ	56,0,87:0/1:59
-chr2a	94788853	.	A	G	34.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	67,15,0:1/1:75
-chr2a	96738146	.	T	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr2a	102737384	.	A	G	12.3	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,18,0;MQ=11	PL:GT:GQ	45,54,0:1/1:99
-chr2a	103407172	.	A	G	35	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=19	PL:GT:GQ	68,24,0:1/1:96
-chr2a	105774580	.	T	G	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=30	PL:GT:GQ	135,39,0:1/1:99
-chr2a	106376301	.	C	G	24.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=19	PL:GT:GQ	57,18,0:1/1:90
-chr2a	106376315	.	C	T	8.75	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=19	PL:GT:GQ	41,18,0:1/1:90
-chr2a	112422267	.	C	T	30	.	DP=20;AF1=0.5;CI95=0.5,0.5;DP4=14,0,5,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	60,0,131:0/1:63
-chr2b	3049384	.	A	C	14.9	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	3049385	.	G	C	14.9	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	3049406	.	C	G	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=36	PL:GT:GQ	135,18,0:1/1:90
-chr2b	4213802	.	T	C	89.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr2b	5022895	.	G	A	66	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=49	PL:GT:GQ	99,30,0:1/1:99
-chr2b	6037666	.	G	T	56	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=17	PL:GT:GQ	89,39,0:1/1:99
-chr2b	13656952	.	G	A	19.2	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=21	PL:GT:GQ	52,18,0:1/1:90
-chr2b	15026944	.	A	G	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	37,6,0:1/1:49
-chr2b	23362613	.	A	G	5.64	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	37,15,0:1/1:75
-chr2b	45947861	.	C	G	68	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=50	PL:GT:GQ	101,33,0:1/1:99
-chr2b	46597824	.	T	C	65.6	.	DP=39;AF1=0.5939;CI95=0.5,1;DP4=23,0,10,0;MQ=22;PV4=1,0.014,1,1	PL:GT:GQ	95,0,5:0/1:7
-chr2b	49665191	.	G	T	34.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=37	PL:GT:GQ	67,21,0:1/1:84
-chr2b	61001546	.	A	G	48	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=26	PL:GT:GQ	81,24,0:1/1:96
-chr2b	88502851	.	T	C	4.77	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,2;MQ=37;PV4=1,1,0.46,1	PL:GT:GQ	33,0,34:0/1:33
-chr2b	91675431	.	C	T	30	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=27	PL:GT:GQ	63,24,0:1/1:96
-chr2b	91870148	.	T	G	67	.	DP=14;AF1=1;CI95=1,1;DP4=0,1,0,13;MQ=47;PV4=1,1,1,1	PL:GT:GQ	100,31,0:1/1:99
-chr2b	97066826	.	G	A	20.1	.	DP=9;AF1=0.5001;CI95=0.5,0.5;DP4=0,6,0,2;MQ=31;PV4=1,1,1,1	PL:GT:GQ	50,0,35:0/1:38
-chr2b	97670822	.	G	A	4.85	.	DP=6;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=18	PL:GT:GQ	36,18,0:1/1:90
-chr2b	102773175	.	A	G	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	49,9,0:1/1:63
-chr2b	109805532	.	T	C	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=45	PL:GT:GQ	176,24,0:1/1:96
-chr2b	110841448	.	A	G	11.1	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	42,6,0:1/1:49
-chr2b	123217025	.	T	C	31.5	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=37	PL:GT:GQ	64,12,0:1/1:72
-chr2b	123263214	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	43,9,0:1/1:63
-chr2b	127747292	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=52	PL:GT:GQ	100,9,0:1/1:63
-chr2b	130121958	.	A	G	89.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	122,15,0:1/1:75
-chr2b	130253633	.	A	G	14.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	130692761	.	C	T	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=51	PL:GT:GQ	82,18,0:1/1:90
-chr2b	130743365	.	A	G	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=42	PL:GT:GQ	140,15,0:1/1:75
-chr2b	131553874	.	A	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=37	PL:GT:GQ	43,9,0:1/1:63
-chr2b	131716894	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=40	PL:GT:GQ	137,24,0:1/1:96
-chr2b	131716936	.	G	A	99	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=36	PL:GT:GQ	173,36,0:1/1:99
-chr2b	131716952	.	A	G	99	.	DP=22;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,14;MQ=36;PV4=1,1,1,1	PL:GT:GQ	152,0,43:0/1:46
-chr2b	133360184	.	C	T	99	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,20;MQ=32	PL:GT:GQ	163,60,0:1/1:99
-chr2b	133644741	.	T	A	16.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=27	PL:GT:GQ	49,15,0:1/1:75
-chr2b	133720595	.	T	C	41	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=29	PL:GT:GQ	74,36,0:1/1:99
-chr2b	133727192	.	C	T	19.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	52,15,0:1/1:75
-chr2b	133727260	.	G	A	3.56	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=18	PL:GT:GQ	34,24,0:1/1:95
-chr2b	133800294	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=23	PL:GT:GQ	40,6,0:1/1:49
-chr2b	134582754	.	A	C	56.1	.	DP=37;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=36	PL:GT:GQ	89,21,0:1/1:84
-chr2b	134582763	.	G	C	78	.	DP=37;AF1=1;CI95=1,1;DP4=0,0,0,36;MQ=34	PL:GT:GQ	111,108,0:1/1:99
-chr2b	134809668	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr3	527814	.	C	G	46	.	DP=9;AF1=0.5;CI95=0.5,0.5;DP4=6,0,3,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	76,0,106:0/1:79
-chr3	559510	.	G	A	38	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=10,0,17,0;MQ=28;PV4=1,1,0.014,1	PL:GT:GQ	68,0,111:0/1:71
-chr3	879433	.	T	G	32	.	DP=4;AF1=0.5001;CI95=0.5,0.5;DP4=2,0,2,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	62,0,34:0/1:37
-chr3	1809645	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr3	3235812	.	C	T	7.59	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	38,6,0:1/1:49
-chr3	3250176	.	A	G	83	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=32	PL:GT:GQ	116,24,0:1/1:96
-chr3	5049073	.	T	A	99	.	DP=25;AF1=0.5;CI95=0.5,0.5;DP4=16,0,9,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	136,0,129:0/1:99
-chr3	5142874	.	G	A	99	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,38,0;MQ=28	PL:GT:GQ	179,114,0:1/1:99
-chr3	5554864	.	T	C	3.54	.	DP=7;AF1=0.4999;CI95=0.5,0.5;DP4=0,4,0,3;MQ=27;PV4=1,1,1,1	PL:GT:GQ	31,0,35:0/1:33
-chr3	5749648	.	G	A	21.2	.	DP=26;AF1=0.7303;CI95=0.5,1;DP4=0,7,0,7;MQ=26;PV4=1,0.16,1,0.17	PL:GT:GQ	50,0,2:0/1:3
-chr3	16451708	.	A	T	71.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=38	PL:GT:GQ	104,15,0:1/1:75
-chr3	23410276	.	G	A	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	140,15,0:1/1:75
-chr3	51368824	.	A	G	28	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	60,9,0:1/1:63
-chr3	53000453	.	A	G	54	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=19	PL:GT:GQ	87,30,0:1/1:99
-chr3	53000463	.	A	G	54	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=19	PL:GT:GQ	87,30,0:1/1:99
-chr3	59077423	.	C	T	77.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=33	PL:GT:GQ	110,15,0:1/1:75
-chr3	60040501	.	T	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	43,9,0:1/1:63
-chr3	64203481	.	A	G	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	66,12,0:1/1:72
-chr3	67947441	.	C	T	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr3	76372631	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	76,9,0:1/1:63
-chr3	80611316	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr3	81554381	.	G	T	17.6	.	DP=24;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=26	PL:GT:GQ	50,12,0:1/1:72
-chr3	87614647	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr3	93900455	.	A	T	11.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=13	PL:GT:GQ	44,15,0:1/1:75
-chr3	96174457	.	A	G	4.11	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=24	PL:GT:GQ	34,9,0:1/1:63
-chr3	96215569	.	A	C	3.41	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr3	96587998	.	A	C	7.08	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,6,0;MQ=17	PL:GT:GQ	39,18,0:1/1:90
-chr3	99711220	.	A	C	12.8	.	DP=11;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	42,2,0:1/1:37
-chr3	99789741	.	C	G	99	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=47	PL:GT:GQ	210,51,0:1/1:99
-chr3	103667651	.	A	C	3.98	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	33,6,0:1/1:49
-chr3	104604896	.	G	C	55	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	87,9,0:1/1:63
-chr3	104997217	.	G	A	33.1	.	DP=18;AF1=1;CI95=1,1;DP4=1,0,16,0;MQ=34;PV4=1,3e-10,0.17,0.36	PL:GT:GQ	66,19,0:1/1:76
-chr3	106097816	.	A	G	28	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=26	PL:GT:GQ	61,45,0:1/1:99
-chr3	106822259	.	G	C	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=50	PL:GT:GQ	140,15,0:1/1:75
-chr3	109946413	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	44,6,0:1/1:49
-chr3	121238963	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr3	126248567	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	45,6,0:1/1:49
-chr3	129733836	.	A	G	6.2	.	DP=4;AF1=0.5003;CI95=0.5,0.5;DP4=1,0,3,0;MQ=43;PV4=1,0.02,0.31,1	PL:GT:GQ	35,0,28:0/1:30
-chr3	131372785	.	C	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=34	PL:GT:GQ	76,9,0:1/1:63
-chr3	132290987	.	C	T	22	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=45	PL:GT:GQ	54,9,0:1/1:63
-chr3	136054421	.	C	T	73	.	DP=82;AF1=1;CI95=1,1;DP4=0,0,78,0;MQ=28	PL:GT:GQ	106,235,0:1/1:99
-chr3	141075246	.	G	A	30.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=41	PL:GT:GQ	62,6,0:1/1:49
-chr3	141075262	.	T	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=41	PL:GT:GQ	73,6,0:1/1:49
-chr3	141430649	.	G	T	81.8	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,1,0,4;MQ=41;PV4=1,0.34,1,0.25	PL:GT:GQ	113,6,0:1/1:49
-chr3	143617747	.	G	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	54,9,0:1/1:63
-chr3	163576128	.	C	T	5.6	.	DP=4;AF1=0.7302;CI95=0.5,1;DP4=2,0,2,0;MQ=23;PV4=1,1,1,1	PL:GT:GQ	33,0,2:0/1:3
-chr3	163839828	.	A	G	4.45	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=26	PL:GT:GQ	35,12,0:1/1:72
-chr3	175839340	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr3	190193258	.	G	T	3.98	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	33,6,0:1/1:49
-chr3	190777007	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr3	190970350	.	A	G	61	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=37	PL:GT:GQ	94,30,0:1/1:99
-chr3	198686408	.	G	A	36.6	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,1,0,16;MQ=25;PV4=1,1,0.026,1	PL:GT:GQ	69,11,0:1/1:66
-chr3	199277478	.	T	C	3.61	.	DP=6;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=21	PL:GT:GQ	34,18,0:1/1:90
-chr3	199780181	.	G	T	77	.	DP=45;AF1=0.5;CI95=0.5,0.5;DP4=0,35,0,10;MQ=33;PV4=1,1,1,1	PL:GT:GQ	107,0,114:0/1:99
-chr3	199889335	.	A	C	9.54	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=18	PL:GT:GQ	42,24,0:1/1:96
-chr3	200018161	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr4	195475	.	A	G	13	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	44,6,0:1/1:49
-chr4	639141	.	C	A	14.9	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr4	639152	.	C	T	15.2	.	DP=17;AF1=0.5016;CI95=0.5,0.5;DP4=0,2,0,2;MQ=33;PV4=1,1,1,1	PL:GT:GQ	45,0,22:0/1:25
-chr4	986497	.	G	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=33	PL:GT:GQ	163,30,0:1/1:99
-chr4	986516	.	C	T	55.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=37	PL:GT:GQ	88,21,0:1/1:84
-chr4	1207485	.	A	C	14.9	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	46,6,0:1/1:49
-chr4	1323502	.	G	A	13.2	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=22	PL:GT:GQ	46,33,0:1/1:99
-chr4	1613521	.	G	A	89	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,16,0;MQ=32	PL:GT:GQ	122,48,0:1/1:99
-chr4	1748790	.	C	T	38	.	DP=21;AF1=0.5005;CI95=0.5,0.5;DP4=6,0,8,0;MQ=40;PV4=1,0.09,1,1	PL:GT:GQ	68,0,27:0/1:30
-chr4	2255732	.	T	C	99	.	DP=29;AF1=1;CI95=1,1;DP4=0,0,28,0;MQ=31	PL:GT:GQ	186,84,0:1/1:99
-chr4	3010159	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr4	3545023	.	A	G	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=38	PL:GT:GQ	145,27,0:1/1:99
-chr4	3586344	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr4	3879337	.	A	G	16.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	49,12,0:1/1:72
-chr4	3940733	.	A	G	47.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	80,15,0:1/1:75
-chr4	4410338	.	T	C	13.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=31	PL:GT:GQ	46,15,0:1/1:75
-chr4	4796408	.	T	C	41	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=17	PL:GT:GQ	74,48,0:1/1:99
-chr4	4796414	.	A	G	11.3	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=17	PL:GT:GQ	44,45,0:1/1:99
-chr4	6436959	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr4	9494256	.	T	C	3.41	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=37	PL:GT:GQ	32,6,0:1/1:49
-chr4	24881479	.	G	A	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	46,9,0:1/1:63
-chr4	26128644	.	A	G	23	.	DP=18;AF1=0.5006;CI95=0.5,0.5;DP4=8,0,10,0;MQ=22;PV4=1,1,1,1	PL:GT:GQ	53,0,26:0/1:29
-chr4	42109100	.	G	A	17.1	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	49,9,0:1/1:63
-chr4	42309652	.	C	T	68	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr4	46913966	.	C	T	9.08	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=16	PL:GT:GQ	41,12,0:1/1:72
-chr4	50335142	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr4	51658550	.	C	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr4	58258023	.	T	C	26	.	DP=5;AF1=0.5002;CI95=0.5,0.5;DP4=0,3,0,2;MQ=34;PV4=1,1,1,0.05	PL:GT:GQ	56,0,32:0/1:35
-chr4	59219112	.	C	A	42.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=50	PL:GT:GQ	75,12,0:1/1:72
-chr4	62746067	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr4	67404338	.	G	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=39	PL:GT:GQ	66,12,0:1/1:72
-chr4	73353380	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr4	73946294	.	G	C	4.77	.	DP=51;AF1=0.4999;CI95=0.5,0.5;DP4=0,5,0,3;MQ=40;PV4=1,0.19,0.37,0.11	PL:GT:GQ	33,0,64:0/1:36
-chr4	79607484	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr4	82337365	.	G	C	90	.	DP=54;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=28	PL:GT:GQ	123,48,0:1/1:99
-chr4	82653801	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	34,9,0:1/1:63
-chr4	87130164	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	43,9,0:1/1:63
-chr4	87130176	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	43,9,0:1/1:63
-chr4	91459729	.	C	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr4	96130778	.	G	C	99	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,0,19;MQ=45	PL:GT:GQ	211,57,0:1/1:99
-chr4	100709417	.	A	G	45.1	.	DP=16;AF1=0.505;CI95=0.5,0.5;DP4=12,0,4,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	75,0,17:0/1:20
-chr4	107276770	.	C	T	70	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,6;MQ=31;PV4=1,1,1,1	PL:GT:GQ	100,0,97:0/1:98
-chr4	115327550	.	G	C	42	.	DP=67;AF1=1;CI95=1,1;DP4=0,1,0,66;MQ=35;PV4=1,3.2e-24,0.13,1	PL:GT:GQ	75,162,0:1/1:99
-chr4	136558502	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr4	159572459	.	G	A	15.1	.	DP=126;AF1=0.5;CI95=0.5,0.5;DP4=0,69,0,57;MQ=39;PV4=1,4.1e-96,0.077,1	PL:GT:GQ	45,0,175:0/1:48
-chr4	174968484	.	G	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	40,6,0:1/1:49
-chr4	175030633	.	T	C	14.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=29	PL:GT:GQ	47,18,0:1/1:90
-chr4	183410027	.	G	T	6.2	.	DP=31;AF1=0.5003;CI95=0.5,0.5;DP4=2,0,2,0;MQ=45;PV4=1,0.035,1,0.21	PL:GT:GQ	35,0,28:0/1:30
-chr4	190907368	.	T	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=50	PL:GT:GQ	66,12,0:1/1:72
-chr4	192175690	.	A	G	76.8	.	DP=7;AF1=0.95;CI95=0.5,1;DP4=0,3,0,4;MQ=35;PV4=1,1,1,1	PL:GT:GQ	105,0,0:1/1:10
-chr4	192673268	.	G	A	14.2	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=22	PL:GT:GQ	47,27,0:1/1:99
-chr4	192943966	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr4	195460104	.	C	G	23.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=19	PL:GT:GQ	56,24,0:1/1:96
-chr4	198277830	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr5	170098	.	A	G	13	.	DP=12;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	44,6,0:1/1:49
-chr5	395814	.	T	C	4.77	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,2;MQ=36;PV4=1,1,0.48,1	PL:GT:GQ	33,0,33:0/1:33
-chr5	414024	.	T	A	10.4	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=20	PL:GT:GQ	42,9,0:1/1:63
-chr5	496767	.	T	C	13.9	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr5	805676	.	C	G	45	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=32	PL:GT:GQ	78,51,0:1/1:99
-chr5	1252896	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr5	1418370	.	G	A	3.65	.	DP=8;AF1=0.7301;CI95=0.5,1;DP4=4,0,4,0;MQ=13;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr5	1494911	.	G	C	62	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=46	PL:GT:GQ	95,24,0:1/1:96
-chr5	1494932	.	C	T	6.98	.	DP=8;AF1=0.5001;CI95=0.5,0.5;DP4=1,0,2,0;MQ=46;PV4=1,0.1,0.077,1	PL:GT:GQ	36,0,31:0/1:33
-chr5	1506037	.	T	C	24.1	.	DP=24;AF1=1;CI95=0.5,1;DP4=11,0,13,0;MQ=16;PV4=1,1,1,1	PL:GT:GQ	55,5,0:1/1:46
-chr5	1509406	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	73,6,0:1/1:49
-chr5	1733649	.	A	G	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,25;MQ=47	PL:GT:GQ	212,75,0:1/1:99
-chr5	1747304	.	A	G	12.3	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=19	PL:GT:GQ	45,36,0:1/1:99
-chr5	1747308	.	C	A	44	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=19	PL:GT:GQ	77,36,0:1/1:99
-chr5	3519783	.	C	T	21.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=18	PL:GT:GQ	54,24,0:1/1:96
-chr5	4101593	.	A	G	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=43	PL:GT:GQ	102,12,0:1/1:72
-chr5	7204332	.	T	A	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=24	PL:GT:GQ	34,6,0:1/1:49
-chr5	11510398	.	A	C	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=51;PV4=1,1,0,1	PL:GT:GQ	64,0,31:0/1:34
-chr5	15406720	.	T	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	36,6,0:1/1:49
-chr5	25152417	.	C	A	10.9	.	DP=28;AF1=0.5718;CI95=0.5,1;DP4=0,2,0,6;MQ=25;PV4=1,1,0.21,1	PL:GT:GQ	40,0,6:0/1:8
-chr5	39072637	.	A	G	35.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=50	PL:GT:GQ	68,15,0:1/1:75
-chr5	46022699	.	G	A	44	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	76,9,0:1/1:63
-chr5	55664181	.	C	G	10.4	.	DP=8;AF1=0.9999;CI95=0.5,1;DP4=3,0,5,0;MQ=18;PV4=1,1,1,1	PL:GT:GQ	40,3,0:1/1:41
-chr5	56253386	.	T	C	50.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=36	PL:GT:GQ	83,21,0:1/1:84
-chr5	56253447	.	C	T	42.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=45	PL:GT:GQ	75,12,0:1/1:72
-chr5	71950166	.	G	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr5	72703090	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	40,6,0:1/1:49
-chr5	73570280	.	G	T	5.45	.	DP=41;AF1=1;CI95=1,1;DP4=0,0,41,0;MQ=15	PL:GT:GQ	37,123,0:1/1:99
-chr5	73701762	.	G	T	40.8	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	72,6,0:1/1:49
-chr5	76956867	.	T	C	10.2	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	41,6,0:1/1:49
-chr5	79097961	.	C	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	54,9,0:1/1:63
-chr5	87026167	.	T	C	22	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr5	97680525	.	T	C	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=23	PL:GT:GQ	33,12,0:1/1:72
-chr5	100674737	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr5	105389966	.	T	C	3.52	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=15	PL:GT:GQ	33,9,0:1/1:63
-chr5	109998341	.	A	C	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr5	120629105	.	C	T	6.79	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	37,6,0:1/1:49
-chr5	128383954	.	C	T	23	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=0,5,0,5;MQ=48;PV4=1,3.3e-07,1,1	PL:GT:GQ	53,0,98:0/1:56
-chr5	133925142	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr5	135375404	.	T	C	11.8	.	DP=6;AF1=1;CI95=0.5,1;DP4=1,0,3,0;MQ=31;PV4=1,0.03,1,1	PL:GT:GQ	42,4,0:1/1:45
-chr5	136498281	.	T	G	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr5	136717285	.	A	G	82.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	115,12,0:1/1:72
-chr5	136910734	.	G	A	62	.	DP=19;AF1=1;CI95=1,1;DP4=0,1,0,13;MQ=23;PV4=1,1,1,1	PL:GT:GQ	95,31,0:1/1:99
-chr5	141208149	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr5	148056348	.	C	A	37.1	.	DP=4;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=38;PV4=1,1,1,1	PL:GT:GQ	66,1,0:1/1:23
-chr5	151941534	.	G	T	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=34	PL:GT:GQ	79,12,0:1/1:72
-chr5	159967229	.	G	C	22.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	55,12,0:1/1:72
-chr5	174024541	.	T	G	29.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	59,2,0:1/1:37
-chr5	175525290	.	A	G	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=20	PL:GT:GQ	33,12,0:1/1:72
-chr5	175988954	.	A	C	14.2	.	DP=23;AF1=0.5;CI95=0.5,0.5;DP4=0,6,0,4;MQ=47;PV4=1,1,0.2,1	PL:GT:GQ	44,0,76:0/1:47
-chr5	176782226	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr5	179132834	.	C	G	99	.	DP=28;AF1=1;CI95=1,1;DP4=0,0,0,28;MQ=41	PL:GT:GQ	207,84,0:1/1:99
-chr5	180155809	.	G	C	3.01	.	DP=36;AF1=0.4997;CI95=0.5,0.5;DP4=25,0,9,0;MQ=35;PV4=1,1e-15,1,1	PL:GT:GQ	30,0,121:0/1:33
-chr5	181282819	.	T	G	38.3	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,2,0,9;MQ=23;PV4=1,1,1,1	PL:GT:GQ	71,14,0:1/1:70
-chr5	182426125	.	G	C	29	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=26	PL:GT:GQ	61,9,0:1/1:63
-chr5	182443682	.	G	A	3.69	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=21	PL:GT:GQ	34,15,0:1/1:75
-chr5	183008993	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr5	183312016	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr6_cox_hap1	519146	.	G	A	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=30	PL:GT:GQ	49,9,0:1/1:63
-chr6_cox_hap1	687497	.	A	G	33	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=2,0,4,0;MQ=35;PV4=1,0.0016,1,1	PL:GT:GQ	63,3,0:1/1:41
-chr6_qbl_hap2	120066	.	T	C	99	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	139,27,0:1/1:99
-chr6	277954	.	C	T	53	.	DP=41;AF1=1;CI95=1,1;DP4=4,0,37,0;MQ=19;PV4=1,1,0.3,1	PL:GT:GQ	86,49,0:1/1:99
-chr6	593158	.	A	G	4.61	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	34,6,0:1/1:49
-chr6	2865562	.	T	G	25	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=23	PL:GT:GQ	58,27,0:1/1:99
-chr6	3751403	.	G	A	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=32	PL:GT:GQ	75,15,0:1/1:75
-chr6	3884989	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr6	4127278	.	A	T	13.9	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr6	5887783	.	C	G	99	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=34	PL:GT:GQ	142,21,0:1/1:84
-chr6	5887811	.	C	T	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=34	PL:GT:GQ	88,21,0:1/1:84
-chr6	6937170	.	G	C	99	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,0,47;MQ=28	PL:GT:GQ	157,141,0:1/1:99
-chr6	7262317	.	C	T	13.2	.	DP=50;AF1=0.5;CI95=0.5,0.5;DP4=21,0,9,0;MQ=36;PV4=1,4e-05,0.17,0.26	PL:GT:GQ	43,0,158:0/1:46
-chr6	7533214	.	A	G	10.4	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	42,9,0:1/1:63
-chr6	20979907	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=38	PL:GT:GQ	76,9,0:1/1:63
-chr6	22321632	.	A	G	41	.	DP=5;AF1=0.5004;CI95=0.5,0.5;DP4=1,0,3,0;MQ=46;PV4=1,0.24,0.19,0.33	PL:GT:GQ	71,0,28:0/1:31
-chr6	25352296	.	G	A	7.8	.	DP=4;AF1=0.5003;CI95=0.5,0.5;DP4=0,1,0,3;MQ=38;PV4=1,1,0.16,1	PL:GT:GQ	37,0,28:0/1:30
-chr6	26298040	.	T	A	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=48;PV4=1,1,0.21,0.33	PL:GT:GQ	64,0,31:0/1:34
-chr6	33428755	.	G	A	70	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=32	PL:GT:GQ	103,27,0:1/1:99
-chr6	39512099	.	G	A	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=50	PL:GT:GQ	88,21,0:1/1:84
-chr6	39961094	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr6	40452120	.	A	G	40.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	72,6,0:1/1:49
-chr6	43204766	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=51	PL:GT:GQ	176,24,0:1/1:96
-chr6	52696512	.	C	T	70	.	DP=76;AF1=0.5;CI95=0.5,0.5;DP4=0,34,0,42;MQ=18;PV4=1,0.11,1,1	PL:GT:GQ	100,0,51:0/1:54
-chr6	53785550	.	A	G	99	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=46	PL:GT:GQ	190,30,0:1/1:99
-chr6	53897484	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr6	57038290	.	C	T	10.2	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	41,6,0:1/1:49
-chr6	62925087	.	G	C	35	.	DP=5;AF1=0.5008;CI95=0.5,0.5;DP4=1,0,4,0;MQ=36;PV4=1,1,0.2,1	PL:GT:GQ	65,0,25:0/1:28
-chr6	62925094	.	T	C	25.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=36	PL:GT:GQ	58,15,0:1/1:75
-chr6	70834405	.	G	A	72.1	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=29	PL:GT:GQ	105,21,0:1/1:84
-chr6	71026058	.	C	T	48.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=42	PL:GT:GQ	81,18,0:1/1:90
-chr6	74420752	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	76,9,0:1/1:63
-chr6	77498624	.	T	C	16.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	48,6,0:1/1:49
-chr6	80416836	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr6	113611590	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=46	PL:GT:GQ	100,9,0:1/1:63
-chr6	119308431	.	T	C	38.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=40	PL:GT:GQ	71,12,0:1/1:72
-chr6	151758592	.	T	C	3.07	.	DP=17;AF1=0.9966;CI95=0.5,1;DP4=0,8,0,9;MQ=13;PV4=1,1,1,1	PL:GT:GQ	29,1,0:1/1:23
-chr6	151759358	.	A	G	99	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=12,0,15,0;MQ=44;PV4=1,1,1,0.19	PL:GT:GQ	171,0,128:0/1:99
-chr6	154741755	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr6	161061053	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=52	PL:GT:GQ	40,6,0:1/1:49
-chr6	161474189	.	C	T	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	36,6,0:1/1:49
-chr6	164304657	.	C	T	10.4	.	DP=63;AF1=0.5;CI95=0.5,0.5;DP4=0,29,0,19;MQ=22;PV4=1,7.7e-11,1,0.049	PL:GT:GQ	40,0,37:0/1:38
-chr6	164703105	.	T	C	99	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=40	PL:GT:GQ	165,30,0:1/1:99
-chr6	167518328	.	A	G	78	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=27,0,14,0;MQ=33;PV4=1,0.026,0.43,0.056	PL:GT:GQ	108,0,149:0/1:99
-chr6	169906323	.	G	A	41.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr6	171893912	.	G	A	69.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=33	PL:GT:GQ	102,15,0:1/1:75
-chr6	173631604	.	A	G	6.98	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=4,0,3,0;MQ=37;PV4=1,0.069,1,1	PL:GT:GQ	36,0,34:0/1:35
-chr7	835856	.	C	T	27.5	.	DP=13;AF1=0.9998;CI95=0.5,1;DP4=4,0,6,0;MQ=23;PV4=1,0.46,1,1	PL:GT:GQ	57,2,0:1/1:37
-chr7	1046005	.	C	T	11.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	43,9,0:1/1:63
-chr7	1564339	.	C	T	71	.	DP=66;AF1=0.5;CI95=0.5,0.5;DP4=36,0,24,0;MQ=29;PV4=1,1,0.35,1	PL:GT:GQ	101,0,134:0/1:99
-chr7	1806266	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr7	1936013	.	G	T	7.77	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=17	PL:GT:GQ	39,9,0:1/1:63
-chr7	2319532	.	C	A	4.11	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=14	PL:GT:GQ	34,9,0:1/1:63
-chr7	2682121	.	C	T	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr7	3248116	.	T	C	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=37;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr7	3624766	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	40,6,0:1/1:49
-chr7	5291140	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr7	5314457	.	C	A	3.56	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=18	PL:GT:GQ	34,24,0:1/1:95
-chr7	5595072	.	T	A	79	.	DP=13;AF1=0.5;CI95=0.5,0.5;DP4=8,0,5,0;MQ=31;PV4=1,1,1,1	PL:GT:GQ	109,0,57:0/1:60
-chr7	5646060	.	G	C	7.79	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=10	PL:GT:GQ	40,30,0:1/1:99
-chr7	6056816	.	C	G	7.08	.	DP=6;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=23;PV4=1,1,1,1	PL:GT:GQ	35,1,0:1/1:23
-chr7	6412641	.	C	T	40	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=33	PL:GT:GQ	73,33,0:1/1:99
-chr7	6766874	.	A	G	34.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=43	PL:GT:GQ	67,15,0:1/1:75
-chr7	8482729	.	C	T	5.08	.	DP=16;AF1=0.8276;CI95=0.5,1;DP4=3,0,3,0;MQ=22;PV4=1,1,1,0.19	PL:GT:GQ	32,0,1:1/1:5
-chr7	9238362	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr7	9687781	.	G	A	33	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=0,16,0,12;MQ=48;PV4=1,6.5e-38,1,1	PL:GT:GQ	63,0,170:0/1:66
-chr7	9752803	.	A	T	14.2	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=18	PL:GT:GQ	47,27,0:1/1:99
-chr7	10240910	.	T	C	45.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	78,12,0:1/1:72
-chr7	11046187	.	C	T	86.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=47	PL:GT:GQ	119,12,0:1/1:72
-chr7	11548207	.	C	G	14.6	.	DP=13;AF1=1;CI95=0.5,1;DP4=6,1,0,5;MQ=18;PV4=0.015,1,1,1	PL:GT:GQ	46,7,0:1/1:57
-chr7	11580317	.	C	T	42	.	DP=12;AF1=1;CI95=1,1;DP4=0,1,0,10;MQ=22;PV4=1,1,1,1	PL:GT:GQ	75,23,0:1/1:92
-chr7	11585384	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr7	13498356	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	73,6,0:1/1:49
-chr7	13500887	.	G	A	15.1	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=22	PL:GT:GQ	48,30,0:1/1:99
-chr7	13827079	.	C	T	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	36,6,0:1/1:49
-chr7	14403976	.	T	G	59	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=39	PL:GT:GQ	92,24,0:1/1:96
-chr7	14756588	.	A	G	44	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=5,0,10,0;MQ=44;PV4=1,5.3e-18,1,1	PL:GT:GQ	74,0,70:0/1:72
-chr7	14756619	.	T	G	44	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=5,0,10,0;MQ=44;PV4=1,6.4e-10,1,1	PL:GT:GQ	74,0,70:0/1:72
-chr7	36734598	.	A	C	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	42,6,0:1/1:49
-chr7	36734599	.	A	T	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	42,6,0:1/1:49
-chr7	36734603	.	G	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	40,6,0:1/1:49
-chr7	40634921	.	A	C	55	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=39	PL:GT:GQ	88,39,0:1/1:99
-chr7	48271285	.	A	T	73	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=25	PL:GT:GQ	106,30,0:1/1:99
-chr7	56264700	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr7	62326003	.	C	A	26.1	.	DP=35;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=28	PL:GT:GQ	59,18,0:1/1:90
-chr7	109468934	.	T	G	5.13	.	DP=10;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=39;PV4=1,0.031,1,1	PL:GT:GQ	33,2,0:1/1:37
-chr7	110208327	.	C	G	16.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	48,6,0:1/1:49
-chr7	125654934	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=27	PL:GT:GQ	34,9,0:1/1:63
-chr7	125770209	.	A	C	32	.	DP=31;AF1=0.5;CI95=0.5,0.5;DP4=11,0,13,0;MQ=34;PV4=1,0.00017,0.16,0.22	PL:GT:GQ	62,0,105:0/1:65
-chr7	125770265	.	G	C	36	.	DP=16;AF1=0.5;CI95=0.5,0.5;DP4=0,5,0,5;MQ=48;PV4=1,0.0047,0.016,0.035	PL:GT:GQ	66,0,110:0/1:69
-chr7	126687042	.	A	G	21.1	.	DP=36;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=22	PL:GT:GQ	54,21,0:1/1:84
-chr7	132292897	.	G	T	99	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=43	PL:GT:GQ	167,21,0:1/1:84
-chr7	132334562	.	A	C	23	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=23	PL:GT:GQ	56,30,0:1/1:99
-chr7	132431838	.	C	T	13.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=1,0,4,0;MQ=23;PV4=1,1,1,1	PL:GT:GQ	44,5,0:1/1:46
-chr7	136324945	.	T	C	13.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	46,12,0:1/1:72
-chr7	136957634	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr7	141746871	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	40,6,0:1/1:49
-chr7	146831870	.	C	T	4.77	.	DP=14;AF1=0.5003;CI95=0.5,0.5;DP4=1,0,3,0;MQ=37;PV4=1,0.0029,0.28,1	PL:GT:GQ	33,0,28:0/1:30
-chr7	147142770	.	T	C	45	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=31	PL:GT:GQ	77,9,0:1/1:63
-chr7	147713906	.	C	T	4.77	.	DP=8;AF1=0.5002;CI95=0.5,0.5;DP4=2,0,4,0;MQ=35;PV4=1,8.9e-06,0.48,0.27	PL:GT:GQ	33,0,29:0/1:31
-chr7	148742642	.	G	A	68	.	DP=14;AF1=0.5032;CI95=0.5,0.5;DP4=4,0,10,0;MQ=28;PV4=1,1,1,1	PL:GT:GQ	98,0,19:0/1:22
-chr7	148879148	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr7	149484407	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr7	152444478	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	44,6,0:1/1:49
-chr7	154106613	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=51	PL:GT:GQ	100,9,0:1/1:63
-chr7	154776891	.	G	T	14.4	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	47,15,0:1/1:75
-chr7	155882061	.	A	C	29	.	DP=24;AF1=0.502;CI95=0.5,0.5;DP4=0,1,0,4;MQ=46;PV4=1,0.018,0.15,0.29	PL:GT:GQ	59,0,21:0/1:24
-chr7	155956844	.	G	C	23	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,4;MQ=38;PV4=1,1,0.38,1	PL:GT:GQ	53,0,103:0/1:56
-chr7	156277694	.	G	A	62	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=46	PL:GT:GQ	95,24,0:1/1:96
-chr7	156720588	.	T	C	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr7	156807649	.	T	C	3.01	.	DP=30;AF1=0.4997;CI95=0.5,0.5;DP4=0,4,0,3;MQ=43;PV4=1,0.16,0.15,1	PL:GT:GQ	30,0,72:0/1:33
-chr7	157331292	.	G	T	43.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=34	PL:GT:GQ	76,21,0:1/1:84
-chr7	157382957	.	T	C	33.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	66,12,0:1/1:72
-chr8	556382	.	A	G	37.1	.	DP=5;AF1=0.9966;CI95=0.5,1;DP4=2,0,3,0;MQ=31;PV4=1,1,1,1	PL:GT:GQ	66,1,0:1/1:23
-chr8	1661673	.	T	C	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr8	7379751	.	C	A	6.24	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=19	PL:GT:GQ	38,21,0:1/1:84
-chr8	8160505	.	A	T	68.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	101,12,0:1/1:72
-chr8	8160508	.	C	T	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	57,12,0:1/1:72
-chr8	16781011	.	A	G	55.5	.	DP=9;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=34	PL:GT:GQ	88,12,0:1/1:72
-chr8	18716499	.	A	T	20	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=0,4,0,2;MQ=29;PV4=1,1,1,1	PL:GT:GQ	50,0,52:0/1:51
-chr8	23326483	.	A	G	60	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=47	PL:GT:GQ	92,9,0:1/1:63
-chr8	25842819	.	T	A	12	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	43,6,0:1/1:49
-chr8	26300279	.	T	C	34	.	DP=44;AF1=1;CI95=1,1;DP4=0,0,41,0;MQ=21	PL:GT:GQ	67,123,0:1/1:99
-chr8	29673470	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	73,6,0:1/1:49
-chr8	29673473	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	40,6,0:1/1:49
-chr8	31685466	.	C	T	34	.	DP=17;AF1=0.5;CI95=0.5,0.5;DP4=10,0,5,0;MQ=28;PV4=1,0.072,1,0.36	PL:GT:GQ	64,0,50:0/1:53
-chr8	37378739	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr8	51325952	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr8	59221963	.	G	A	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr8	62764995	.	T	G	20	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=32	PL:GT:GQ	52,9,0:1/1:63
-chr8	63157426	.	C	G	41.6	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,7,0,15;MQ=19;PV4=1,1,1,0.25	PL:GT:GQ	74,11,0:1/1:66
-chr8	68710444	.	G	A	30	.	DP=5;AF1=0.6671;CI95=0.5,1;DP4=3,0,2,0;MQ=32;PV4=1,1,1,1	PL:GT:GQ	59,0,3:0/1:5
-chr8	76416560	.	G	A	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=46	PL:GT:GQ	122,12,0:1/1:72
-chr8	81425275	.	T	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr8	89842286	.	G	C	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=30	PL:GT:GQ	34,6,0:1/1:49
-chr8	100926281	.	G	A	38	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	70,9,0:1/1:63
-chr8	102746002	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr8	107850176	.	C	T	43.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=45	PL:GT:GQ	76,18,0:1/1:90
-chr8	109966441	.	T	C	27.3	.	DP=9;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=38	PL:GT:GQ	60,15,0:1/1:75
-chr8	118811716	.	G	T	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=50	PL:GT:GQ	155,18,0:1/1:90
-chr8	119440254	.	A	T	58.5	.	DP=5;AF1=0.8277;CI95=0.5,1;DP4=2,0,3,0;MQ=34;PV4=1,1,1,0.14	PL:GT:GQ	87,0,1:1/1:5
-chr8	121236024	.	G	A	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	71,6,0:1/1:49
-chr8	125489079	.	C	T	13	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr8	128502549	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr8	128502551	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr8	130951113	.	G	A	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=19	PL:GT:GQ	34,6,0:1/1:49
-chr8	135307123	.	G	A	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	36,6,0:1/1:49
-chr8	138814155	.	C	T	57.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	90,18,0:1/1:90
-chr8	140566111	.	A	G	18.1	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=15	PL:GT:GQ	51,36,0:1/1:99
-chr8	141586480	.	T	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr8	143376712	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr8	150662729	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr8	150741294	.	A	G	25.1	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=34	PL:GT:GQ	58,18,0:1/1:90
-chr8	150975618	.	A	G	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr8	151580103	.	T	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=20	PL:GT:GQ	36,6,0:1/1:49
-chr8	151634410	.	G	T	48	.	DP=17;AF1=0.5;CI95=0.5,0.5;DP4=0,12,0,5;MQ=39;PV4=1,0.072,1,1	PL:GT:GQ	78,0,125:0/1:81
-chr8	151709267	.	G	A	91.1	.	DP=8;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,7;MQ=40;PV4=1,1,0.28,0.37	PL:GT:GQ	121,0,16:0/1:19
-chr8	152636420	.	G	A	8.75	.	DP=3;AF1=0.9966;CI95=0.5,1;DP4=0,1,0,2;MQ=30;PV4=1,1,1,1	PL:GT:GQ	37,1,0:1/1:23
-chr8	152706967	.	G	A	3.01	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=16	PL:GT:GQ	33,30,0:1/1:99
-chr8	152786522	.	T	C	80.1	.	DP=16;AF1=0.5102;CI95=0.5,0.5;DP4=0,4,0,12;MQ=31;PV4=1,0.25,1,1	PL:GT:GQ	110,0,14:0/1:17
-chr8	152863132	.	T	G	5.44	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=30	PL:GT:GQ	36,9,0:1/1:63
-chr9	23235268	.	C	T	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	43,6,0:1/1:49
-chr9	26391176	.	T	C	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	47,6,0:1/1:49
-chr9	26868232	.	C	G	63	.	DP=20;AF1=0.5025;CI95=0.5,0.5;DP4=7,0,13,0;MQ=22;PV4=1,0.2,1,0.44	PL:GT:GQ	93,0,20:0/1:23
-chr9	34223668	.	C	T	22	.	DP=16;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,7;MQ=27;PV4=1,0.14,0.34,1	PL:GT:GQ	52,0,79:0/1:55
-chr9	39696645	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr9	40654130	.	T	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr9	41145321	.	T	G	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	79,12,0:1/1:72
-chr9	42273483	.	G	A	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr9	55633192	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	58705807	.	T	C	70	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=24	PL:GT:GQ	103,30,0:1/1:99
-chr9	61697149	.	C	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	63152790	.	A	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr9	63703913	.	C	G	90.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=38	PL:GT:GQ	123,21,0:1/1:84
-chr9	65116068	.	T	C	70	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=49	PL:GT:GQ	103,39,0:1/1:99
-chr9	71266598	.	C	A	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	33,6,0:1/1:49
-chr9	73188677	.	G	T	52	.	DP=294;AF1=1;CI95=1,1;DP4=44,0,245,0;MQ=33;PV4=1,0.28,0.0092,1	PL:GT:GQ	85,147,0:1/1:99
-chr9	78854179	.	G	T	22	.	DP=97;AF1=0.5;CI95=0.5,0.5;DP4=21,0,12,0;MQ=44;PV4=1,0.02,0.032,0.0033	PL:GT:GQ	52,0,158:0/1:55
-chr9	82964679	.	A	C	13.2	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=36	PL:GT:GQ	45,9,0:1/1:63
-chr9	84124545	.	G	T	57	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=2,0,3,0;MQ=49;PV4=1,1,0.024,1	PL:GT:GQ	87,0,59:0/1:62
-chr9	86552862	.	C	T	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=26	PL:GT:GQ	47,15,0:1/1:75
-chr9	87548941	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr9	89021101	.	G	A	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr9	90447825	.	G	A	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	40,6,0:1/1:49
-chr9	92462035	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	40,6,0:1/1:49
-chr9	93077294	.	T	G	5.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=31	PL:GT:GQ	36,9,0:1/1:63
-chr9	93998137	.	G	A	68	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=46	PL:GT:GQ	100,9,0:1/1:63
-chr9	93998148	.	C	T	21.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=36	PL:GT:GQ	54,15,0:1/1:75
-chr9	95028964	.	C	A	99	.	DP=83;AF1=0.5;CI95=0.5,0.5;DP4=0,57,0,26;MQ=32;PV4=1,9.3e-08,1,0.092	PL:GT:GQ	134,0,120:0/1:99
-chr9	103829155	.	A	G	33	.	DP=96;AF1=1;CI95=1,1;DP4=0,0,96,0;MQ=16	PL:GT:GQ	66,255,0:1/1:99
-chr9	104981331	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	73,6,0:1/1:49
-chr9	111070656	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	117395657	.	T	C	16.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	49,15,0:1/1:75
-chr9	117718907	.	A	G	46.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=29	PL:GT:GQ	79,18,0:1/1:90
-chr9	119149161	.	T	C	3.14	.	DP=65;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	33,15,0:1/1:75
-chr9	124528802	.	G	A	78	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=25	PL:GT:GQ	111,39,0:1/1:99
-chr9	126707903	.	G	A	26	.	DP=37;AF1=0.5;CI95=0.5,0.5;DP4=0,21,0,8;MQ=46;PV4=1,2.6e-07,0.21,0.42	PL:GT:GQ	56,0,175:0/1:59
-chr9	128700686	.	C	G	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	66,12,0:1/1:72
-chr9	129084077	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr9	129116900	.	A	T	20	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	52,9,0:1/1:63
-chr9	130290720	.	C	G	21.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	53,6,0:1/1:49
-chr9	130306057	.	C	G	71	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=28	PL:GT:GQ	104,42,0:1/1:99
-chr9	130528990	.	G	A	99	.	DP=31;AF1=1;CI95=1,1;DP4=0,0,31,0;MQ=27	PL:GT:GQ	174,93,0:1/1:99
-chr9	130529002	.	A	T	7.79	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=15	PL:GT:GQ	40,33,0:1/1:99
-chr9	130639996	.	A	G	8.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	39,6,0:1/1:49
-chr9	130704890	.	A	G	3.27	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=26	PL:GT:GQ	33,12,0:1/1:72
-chr9	130708345	.	G	A	13.3	.	DP=11;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=38;PV4=1,0.096,1,1	PL:GT:GQ	42,1,0:1/1:23
-chr9	131001601	.	T	A	3.98	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	33,6,0:1/1:49
-chr9	131058539	.	T	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	44,6,0:1/1:49
-chr9	131808965	.	C	T	42	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	75,27,0:1/1:99
-chr9	132551867	.	C	T	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	49,9,0:1/1:63
-chr9	132685120	.	A	G	4.75	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	35,9,0:1/1:63
-chr9	133175050	.	A	G	18.1	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=20	PL:GT:GQ	51,51,0:1/1:99
-chr9	133584978	.	A	G	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,25,0;MQ=45	PL:GT:GQ	212,75,0:1/1:99
-chr9	133661895	.	A	G	99	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=31	PL:GT:GQ	138,42,0:1/1:99
-chr9	133670376	.	T	C	68	.	DP=19;AF1=1;CI95=1,1;DP4=0,1,0,16;MQ=39;PV4=1,1.4e-20,1,1	PL:GT:GQ	101,39,0:1/1:99
-chr9	133843777	.	T	C	99	.	DP=9;AF1=0.5129;CI95=0.5,0.5;DP4=1,0,8,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	154,0,13:0/1:16
-chr9	134017265	.	G	C	3.27	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=13	PL:GT:GQ	33,12,0:1/1:72
-chr9	134105563	.	T	C	34.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=39	PL:GT:GQ	67,18,0:1/1:90
-chr9	134608906	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr9	134861929	.	T	A	9.49	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	41,9,0:1/1:63
-chr10	796662	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	54,9,0:1/1:63
-chr10	1216716	.	T	A	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr10	1220781	.	G	A	21	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=18	PL:GT:GQ	54,27,0:1/1:99
-chr10	1225208	.	T	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=47	PL:GT:GQ	100,9,0:1/1:63
-chr10	1727946	.	T	C	14.2	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=27	PL:GT:GQ	47,21,0:1/1:84
-chr10	5986542	.	T	C	83	.	DP=93;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=39	PL:GT:GQ	116,30,0:1/1:99
-chr10	6436277	.	G	A	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	36,6,0:1/1:49
-chr10	7704114	.	C	A	35	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=0,2,0,4;MQ=29;PV4=1,0.27,1,0.27	PL:GT:GQ	65,3,0:1/1:41
-chr10	10881734	.	A	G	9.52	.	DP=9;AF1=0.5;CI95=0.5,0.5;DP4=4,0,5,0;MQ=42;PV4=1,0.0026,0.14,1	PL:GT:GQ	39,0,91:0/1:42
-chr10	13099383	.	G	A	27.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	60,12,0:1/1:72
-chr10	15764077	.	G	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr10	18091502	.	T	C	47	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	79,9,0:1/1:63
-chr10	19645913	.	A	T	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	47,6,0:1/1:49
-chr10	22845062	.	C	T	18.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=18	PL:GT:GQ	51,21,0:1/1:84
-chr10	28282802	.	T	C	69	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,12,0;MQ=42	PL:GT:GQ	102,36,0:1/1:99
-chr10	28496872	.	T	G	8.44	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	39,6,0:1/1:49
-chr10	32746793	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr10	41437604	.	T	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr10	43051239	.	C	T	6.98	.	DP=3;AF1=0.5001;CI95=0.5,0.5;DP4=1,0,2,0;MQ=40;PV4=1,0.33,0.33,1	PL:GT:GQ	36,0,31:0/1:33
-chr10	44455192	.	C	T	4.41	.	DP=6;AF1=0.8276;CI95=0.5,1;DP4=0,3,0,3;MQ=21;PV4=1,1,1,1	PL:GT:GQ	31,0,1:1/1:5
-chr10	48387336	.	A	G	13	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr10	51561705	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr10	51561712	.	C	G	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	71,6,0:1/1:49
-chr10	55617954	.	G	A	8.44	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	39,6,0:1/1:49
-chr10	55718281	.	T	A	3.41	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr10	55888771	.	T	C	23.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	56,12,0:1/1:72
-chr10	56025569	.	C	G	34.1	.	DP=3;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,2;MQ=39;PV4=1,1,1,1	PL:GT:GQ	64,0,16:0/1:19
-chr10	57384943	.	G	T	84	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=16,0,13,0;MQ=26;PV4=1,0.015,1,1	PL:GT:GQ	114,0,110:0/1:99
-chr10	59873077	.	T	G	49	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=42	PL:GT:GQ	82,24,0:1/1:96
-chr10	61329572	.	C	T	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	47,6,0:1/1:49
-chr10	63790636	.	T	G	32.1	.	DP=19;AF1=1;CI95=1,1;DP4=1,0,10,0;MQ=28;PV4=1,0.14,1,1	PL:GT:GQ	65,22,0:1/1:88
-chr10	64466048	.	C	G	18.2	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=28	PL:GT:GQ	51,18,0:1/1:90
-chr10	65053440	.	G	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=39	PL:GT:GQ	153,30,0:1/1:99
-chr10	65407358	.	C	G	84.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	117,15,0:1/1:75
-chr10	65605291	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr10	66104447	.	T	C	99	.	DP=47;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,21;MQ=34;PV4=1,1,0.15,1	PL:GT:GQ	136,0,162:0/1:99
-chr10	82160859	.	G	C	99	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=36	PL:GT:GQ	153,39,0:1/1:99
-chr10	82198579	.	C	T	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr10	87086290	.	A	G	4.13	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=17	PL:GT:GQ	35,27,0:1/1:99
-chr10	89550621	.	T	G	74	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,0,45;MQ=45	PL:GT:GQ	107,135,0:1/1:99
-chr10	92325046	.	G	A	42.3	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	75,15,0:1/1:75
-chr10	94488050	.	A	G	5.46	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=2,0,2,0;MQ=43;PV4=1,0.16,1,1	PL:GT:GQ	34,0,34:0/1:34
-chr10	95024815	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr10	95466306	.	G	A	53	.	DP=7;AF1=0.6671;CI95=0.5,1;DP4=0,4,0,3;MQ=33;PV4=1,1,1,1	PL:GT:GQ	82,0,3:0/1:5
-chr10	100256777	.	T	G	3.83	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=23	PL:GT:GQ	34,12,0:1/1:72
-chr10	101510485	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr10	101530760	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr10	101879744	.	T	C	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=44	PL:GT:GQ	54,9,0:1/1:63
-chr10	102147276	.	G	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=33	PL:GT:GQ	43,9,0:1/1:63
-chr10	102642248	.	T	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr10	107666616	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr10	108319945	.	C	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	43,9,0:1/1:63
-chr10	109734371	.	G	A	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr10	112870604	.	C	T	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=36	PL:GT:GQ	79,12,0:1/1:72
-chr10	115304673	.	T	C	11.3	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr10	119380588	.	G	A	14.2	.	DP=4;AF1=0.502;CI95=0.5,0.5;DP4=1,0,3,0;MQ=43;PV4=1,0.18,0.32,1	PL:GT:GQ	44,0,21:0/1:24
-chr10	123063756	.	C	T	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=23	PL:GT:GQ	46,9,0:1/1:63
-chr10	128424770	.	T	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	45,6,0:1/1:49
-chr10	131229204	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr10	132420570	.	G	C	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr10	132528066	.	C	T	99	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,19,0;MQ=42	PL:GT:GQ	213,57,0:1/1:99
-chr10	132644619	.	G	A	19.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=23	PL:GT:GQ	52,15,0:1/1:75
-chr10	132707581	.	G	C	9.11	.	DP=51;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=25;PV4=1,1,1,1	PL:GT:GQ	38,2,0:1/1:37
-chr10	133026892	.	T	C	55.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=44	PL:GT:GQ	88,18,0:1/1:90
-chr11	768033	.	T	C	33.5	.	DP=4;AF1=0.8277;CI95=0.5,1;DP4=0,2,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	62,0,1:1/1:5
-chr11	768042	.	T	C	33.5	.	DP=6;AF1=0.8277;CI95=0.5,1;DP4=0,2,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	62,0,1:1/1:5
-chr11	874568	.	G	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	66,12,0:1/1:72
-chr11	1009210	.	T	C	4	.	DP=70;AF1=0.6241;CI95=0.5,1;DP4=0,3,0,8;MQ=24;PV4=1,1,0.5,1	PL:GT:GQ	31,0,4:0/1:6
-chr11	1016692	.	C	T	27	.	DP=39;AF1=1;CI95=1,1;DP4=0,0,0,38;MQ=22	PL:GT:GQ	60,114,0:1/1:99
-chr11	1034477	.	A	G	66	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	98,9,0:1/1:63
-chr11	1074037	.	G	A	4.13	.	DP=9;AF1=0.5001;CI95=0.5,0.5;DP4=4,0,5,0;MQ=24;PV4=1,1,0.43,1	PL:GT:GQ	32,0,30:0/1:31
-chr11	1556298	.	G	A	11.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	44,12,0:1/1:72
-chr11	1824777	.	T	C	27	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=28	PL:GT:GQ	60,30,0:1/1:99
-chr11	3395801	.	C	T	22	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr11	3411901	.	G	A	4.75	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	35,9,0:1/1:63
-chr11	3731606	.	A	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr11	3783855	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr11	3967636	.	A	G	4.29	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=24	PL:GT:GQ	35,15,0:1/1:75
-chr11	4385618	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr11	4424365	.	T	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr11	5295586	.	C	T	3.01	.	DP=52;AF1=0.4997;CI95=0.5,0.5;DP4=33,0,10,0;MQ=29;PV4=1,0.0045,0.3,0.17	PL:GT:GQ	30,0,131:0/1:33
-chr11	6157144	.	C	G	45.1	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=35	PL:GT:GQ	78,21,0:1/1:84
-chr11	6352044	.	C	T	18	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=31	PL:GT:GQ	50,9,0:1/1:63
-chr11	6767356	.	T	C	9.63	.	DP=3;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=29;PV4=1,1,1,1	PL:GT:GQ	38,1,0:1/1:23
-chr11	6999404	.	G	C	21	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=37	PL:GT:GQ	53,9,0:1/1:63
-chr11	9120930	.	C	G	17.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr11	9373125	.	T	C	19.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	51,6,0:1/1:49
-chr11	9585101	.	C	T	67	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=45	PL:GT:GQ	100,42,0:1/1:99
-chr11	10266192	.	A	C	14.3	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=27	PL:GT:GQ	47,18,0:1/1:90
-chr11	10303263	.	T	C	8.64	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,17;MQ=18	PL:GT:GQ	41,51,0:1/1:99
-chr11	10420170	.	T	C	35	.	DP=17;AF1=1;CI95=1,1;DP4=0,1,0,15;MQ=28;PV4=1,0.12,1,0.4	PL:GT:GQ	68,36,0:1/1:99
-chr11	10912169	.	G	A	99	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=49	PL:GT:GQ	155,18,0:1/1:90
-chr11	11315826	.	T	G	6.29	.	DP=27;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=19	PL:GT:GQ	38,18,0:1/1:90
-chr11	11603859	.	A	C	22	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,6;MQ=34;PV4=1,9.5e-13,0.22,1	PL:GT:GQ	52,0,115:0/1:55
-chr11	11700034	.	C	T	33	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=30	PL:GT:GQ	66,27,0:1/1:99
-chr11	11822758	.	G	A	15.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,3;MQ=38;PV4=1,0.18,1,1	PL:GT:GQ	45,0,88:0/1:48
-chr11	11976636	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=24	PL:GT:GQ	54,9,0:1/1:63
-chr11	14380517	.	C	G	16.1	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=5,0,5,0;MQ=48;PV4=1,2.1e-05,0.13,1	PL:GT:GQ	46,0,113:0/1:49
-chr11	14419212	.	A	G	91.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=38	PL:GT:GQ	124,18,0:1/1:90
-chr11	14846792	.	A	G	55	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=19	PL:GT:GQ	88,33,0:1/1:99
-chr11	15494556	.	C	T	99	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=22,0,14,0;MQ=34;PV4=1,0.0071,1,1	PL:GT:GQ	146,0,159:0/1:99
-chr11	16262879	.	A	C	16.1	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=0,1,0,3;MQ=43;PV4=1,0.061,0.24,0.33	PL:GT:GQ	46,0,28:0/1:31
-chr11	21514947	.	T	C	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=41	PL:GT:GQ	57,12,0:1/1:72
-chr11	22532576	.	C	G	28	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,17;MQ=17	PL:GT:GQ	61,51,0:1/1:99
-chr11	23529238	.	G	T	4.29	.	DP=13;AF1=0.5334;CI95=0.5,1;DP4=1,0,3,0;MQ=37;PV4=1,1,0.34,0.21	PL:GT:GQ	32,0,9:0/1:12
-chr11	24249554	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr11	24853167	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr11	33353903	.	T	C	24.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=36	PL:GT:GQ	57,15,0:1/1:75
-chr11	35126569	.	T	C	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	57,12,0:1/1:72
-chr11	35132248	.	C	T	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr11	35155482	.	T	C	68	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=46	PL:GT:GQ	101,66,0:1/1:99
-chr11	52494088	.	T	C	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	140,27,0:1/1:99
-chr11	57899943	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr11	62261460	.	G	T	19.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,5;MQ=27;PV4=1,1.1e-06,1,1	PL:GT:GQ	49,0,58:0/1:51
-chr11	67456049	.	C	T	39.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=19	PL:GT:GQ	72,18,0:1/1:90
-chr11	68509708	.	C	G	3.65	.	DP=9;AF1=0.7301;CI95=0.5,1;DP4=0,5,0,4;MQ=17;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr11	70115115	.	T	A	99	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=49	PL:GT:GQ	140,15,0:1/1:75
-chr11	72643951	.	T	C	70	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=39	PL:GT:GQ	103,66,0:1/1:99
-chr11	72647930	.	G	A	36	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=0,1,0,3;MQ=41;PV4=1,1,0.3,1	PL:GT:GQ	66,0,28:0/1:31
-chr11	73330148	.	C	T	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr11	81720893	.	A	G	5.83	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=19	PL:GT:GQ	37,12,0:1/1:72
-chr11	83813797	.	A	G	23.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	56,12,0:1/1:72
-chr11	85949488	.	C	A	54	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=37	PL:GT:GQ	87,42,0:1/1:99
-chr11	87634829	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr11	90913093	.	A	T	35.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	67,6,0:1/1:49
-chr11	93793348	.	G	A	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=31	PL:GT:GQ	139,24,0:1/1:96
-chr11	100802294	.	T	C	16.6	.	DP=21;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	49,12,0:1/1:72
-chr11	107455449	.	C	T	8.44	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=26	PL:GT:GQ	39,6,0:1/1:49
-chr11	111344355	.	A	G	69.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=43	PL:GT:GQ	102,12,0:1/1:72
-chr11	111611115	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr11	113050466	.	G	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	36,6,0:1/1:49
-chr11	114332544	.	T	C	3.54	.	DP=17;AF1=0.4999;CI95=0.5,0.5;DP4=0,4,0,5;MQ=37;PV4=1,0.32,0.13,1	PL:GT:GQ	31,0,37:0/1:33
-chr11	114332549	.	G	A	3.54	.	DP=17;AF1=0.4998;CI95=0.5,0.5;DP4=0,9,0,8;MQ=36;PV4=1,3.1e-10,0.088,1	PL:GT:GQ	31,0,127:0/1:34
-chr11	114843578	.	G	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr11	115580279	.	A	G	99	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,15,0;MQ=48	PL:GT:GQ	190,45,0:1/1:99
-chr11	116434328	.	G	A	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr11	125914161	.	A	G	20.8	.	DP=7;AF1=0.95;CI95=0.5,1;DP4=3,0,4,0;MQ=38;PV4=1,0.074,1,1	PL:GT:GQ	49,0,0:1/1:10
-chr11	125917089	.	C	T	12.3	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=0,28,0,12;MQ=44;PV4=1,4.7e-25,1,1	PL:GT:GQ	42,0,167:0/1:45
-chr11	127194100	.	A	G	60	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=49	PL:GT:GQ	93,24,0:1/1:96
-chr12	70856	.	G	A	27.5	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	60,12,0:1/1:72
-chr12	153693	.	T	C	52.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=38	PL:GT:GQ	85,15,0:1/1:75
-chr12	924547	.	C	G	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	69,6,0:1/1:49
-chr12	1555916	.	G	A	7.18	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	39,15,0:1/1:75
-chr12	1919860	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr12	2283756	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr12	2805983	.	G	C	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr12	6088203	.	T	C	72.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=37	PL:GT:GQ	105,15,0:1/1:75
-chr12	7099460	.	G	C	10.8	.	DP=6;AF1=0.8277;CI95=0.5,1;DP4=3,0,3,0;MQ=26;PV4=1,0.027,1,1	PL:GT:GQ	39,0,1:1/1:5
-chr12	7099464	.	G	A	13.3	.	DP=6;AF1=0.9966;CI95=0.5,1;DP4=2,0,3,0;MQ=28;PV4=1,0.16,1,1	PL:GT:GQ	42,1,0:1/1:23
-chr12	7198516	.	T	G	4.61	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	34,6,0:1/1:49
-chr12	23331895	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr12	28209020	.	T	G	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	47,15,0:1/1:75
-chr12	30074073	.	C	T	32.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	64,6,0:1/1:49
-chr12	30563452	.	T	C	25	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	57,9,0:1/1:63
-chr12	30563453	.	A	G	25	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	57,9,0:1/1:63
-chr12	30563464	.	C	A	78.8	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,2,0,5;MQ=34;PV4=1,0.29,1,1	PL:GT:GQ	110,6,0:1/1:49
-chr12	31505085	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr12	34041336	.	G	A	5.46	.	DP=5;AF1=0.5;CI95=0.5,0.5;DP4=2,0,2,0;MQ=36;PV4=1,1,0.48,0.21	PL:GT:GQ	34,0,34:0/1:34
-chr12	49003648	.	C	G	42	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=39	PL:GT:GQ	75,24,0:1/1:96
-chr12	51280690	.	G	A	69	.	DP=98;AF1=0.5;CI95=0.5,0.5;DP4=13,0,18,0;MQ=45;PV4=1,1,0.051,1	PL:GT:GQ	99,0,84:0/1:87
-chr12	69206633	.	T	C	17.1	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=17	PL:GT:GQ	50,33,0:1/1:99
-chr12	80417253	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr12	86633033	.	C	T	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=43;PV4=1,1,0.33,1	PL:GT:GQ	64,0,31:0/1:34
-chr12	98097274	.	C	T	47.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=31	PL:GT:GQ	80,15,0:1/1:75
-chr12	105269319	.	C	T	19	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=26	PL:GT:GQ	51,9,0:1/1:63
-chr12	109053425	.	G	A	9.53	.	DP=8;AF1=0.5012;CI95=0.5,0.5;DP4=2,0,6,0;MQ=25;PV4=1,1,0.19,1	PL:GT:GQ	39,0,23:0/1:26
-chr12	111904540	.	A	G	3.41	.	DP=65;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	32,6,0:1/1:49
-chr12	115038686	.	T	C	15.2	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=27	PL:GT:GQ	48,21,0:1/1:84
-chr12	115039419	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	34,9,0:1/1:63
-chr12	115103890	.	G	A	66	.	DP=39;AF1=1;CI95=1,1;DP4=0,0,0,38;MQ=49	PL:GT:GQ	99,114,0:1/1:99
-chr12	115833830	.	G	A	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr12	116361873	.	T	G	6.34	.	DP=5;AF1=0.7302;CI95=0.5,1;DP4=0,2,0,2;MQ=23;PV4=1,1,1,1	PL:GT:GQ	34,0,2:0/1:3
-chr12	123583527	.	G	A	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	46,9,0:1/1:63
-chr12	124115330	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	76,9,0:1/1:63
-chr12	125062296	.	G	A	41.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr12	126718106	.	A	G	8.76	.	DP=50;AF1=0.5163;CI95=0.5,1;DP4=2,0,6,0;MQ=26;PV4=1,0.33,0.37,1	PL:GT:GQ	38,0,12:0/1:15
-chr12	133348311	.	G	A	24	.	DP=18;AF1=0.5;CI95=0.5,0.5;DP4=14,0,3,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	54,0,118:0/1:57
-chr12	134494475	.	C	T	28	.	DP=18;AF1=0.6671;CI95=0.5,1;DP4=8,0,10,0;MQ=18;PV4=1,1,1,1	PL:GT:GQ	57,0,3:0/1:5
-chr12	134831761	.	C	T	41.3	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=27	PL:GT:GQ	74,15,0:1/1:75
-chr12	134992770	.	A	C,T	84	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,26,0;MQ=29	PL:GT:GQ	117,72,114,0,44,114:1/1:99
-chr12	135261117	.	G	A	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	82,18,0:1/1:90
-chr12	135261144	.	A	G	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	155,18,0:1/1:90
-chr12	135460302	.	G	A	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,23,0;MQ=40	PL:GT:GQ	198,69,0:1/1:99
-chr12	135463758	.	A	G	83	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=26	PL:GT:GQ	116,48,0:1/1:99
-chr12	135523325	.	G	A	99	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=26	PL:GT:GQ	136,66,0:1/1:99
-chr12	135782401	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr12	135795472	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr13	18040027	.	G	C	42	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=33	PL:GT:GQ	74,9,0:1/1:63
-chr13	19494625	.	G	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr13	20121126	.	A	G	15.1	.	DP=36;AF1=0.5;CI95=0.5,0.5;DP4=25,0,9,0;MQ=36;PV4=1,1,0.13,1	PL:GT:GQ	45,0,153:0/1:48
-chr13	21536703	.	A	G	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr13	23160035	.	G	T	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	33,6,0:1/1:49
-chr13	23476554	.	C	A	6.79	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=52	PL:GT:GQ	37,6,0:1/1:49
-chr13	26632967	.	C	G	32	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=34	PL:GT:GQ	65,27,0:1/1:99
-chr13	26790010	.	T	C	89.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=35	PL:GT:GQ	122,15,0:1/1:75
-chr13	36083571	.	T	C	43	.	DP=84;AF1=1;CI95=1,1;DP4=1,0,37,0;MQ=16;PV4=1,1,1,0.3	PL:GT:GQ	76,99,0:1/1:99
-chr13	44432419	.	C	T	3.58	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=19	PL:GT:GQ	34,21,0:1/1:84
-chr13	46592359	.	T	C	16.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	48,6,0:1/1:49
-chr13	52764657	.	A	T	3.14	.	DP=32;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	33,15,0:1/1:75
-chr13	53084193	.	C	T	9.11	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=29;PV4=1,1,1,1	PL:GT:GQ	38,2,0:1/1:37
-chr13	57763228	.	C	T	45	.	DP=555;AF1=1;CI95=1,1;DP4=2,0,21,0;MQ=23;PV4=1,0.00021,1,0.3	PL:GT:GQ	78,45,0:1/1:99
-chr13	73857921	.	G	C	31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	63,9,0:1/1:63
-chr13	76718001	.	G	A	59	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=1,0,3,0;MQ=45;PV4=1,1,0.12,1	PL:GT:GQ	89,0,28:0/1:31
-chr13	100912695	.	A	T	23	.	DP=22;AF1=0.5;CI95=0.5,0.5;DP4=0,16,0,6;MQ=31;PV4=1,0.029,1,0.35	PL:GT:GQ	53,0,103:0/1:56
-chr13	101332001	.	G	C	21	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,23,0;MQ=21	PL:GT:GQ	54,69,0:1/1:99
-chr13	102637334	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr13	102895627	.	C	T	63	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=48	PL:GT:GQ	96,27,0:1/1:99
-chr13	103830322	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr13	112842448	.	G	A	39	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=27	PL:GT:GQ	72,27,0:1/1:99
-chr13	113310291	.	C	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	66,12,0:1/1:72
-chr13	114775162	.	A	G	80	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=21	PL:GT:GQ	113,51,0:1/1:99
-chr13	115267482	.	A	G	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr13	116068676	.	C	T	3.83	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=27	PL:GT:GQ	34,12,0:1/1:72
-chr13	116455918	.	A	G	33	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=13,0,15,0;MQ=42;PV4=1,1.8e-20,0.3,1	PL:GT:GQ	63,0,146:0/1:66
-chr13	116765012	.	G	A	30.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	62,6,0:1/1:49
-chr13	116779773	.	C	T	17.1	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=27,0,11,0;MQ=24;PV4=1,4.5e-35,1,1	PL:GT:GQ	47,0,106:0/1:50
-chr13	116779791	.	C	T	57	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=24,0,14,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	87,0,103:0/1:90
-chr14	20159250	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr14	23510676	.	T	C	52	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=32	PL:GT:GQ	85,66,0:1/1:99
-chr14	24735256	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr14	29525577	.	G	A	21	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=16	PL:GT:GQ	54,27,0:1/1:99
-chr14	36186389	.	C	T	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=20	PL:GT:GQ	37,6,0:1/1:49
-chr14	36186394	.	A	G	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=20	PL:GT:GQ	37,6,0:1/1:49
-chr14	37440609	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr14	40432807	.	A	G	18.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=23	PL:GT:GQ	51,12,0:1/1:72
-chr14	59466268	.	T	C	15.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=25	PL:GT:GQ	47,9,0:1/1:63
-chr14	61368162	.	G	T	7.18	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=17	PL:GT:GQ	39,15,0:1/1:75
-chr14	65152922	.	G	A	92	.	DP=33;AF1=0.5;CI95=0.5,0.5;DP4=0,18,0,15;MQ=36;PV4=1,0.059,0.35,1	PL:GT:GQ	122,0,144:0/1:99
-chr14	69749148	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=25	PL:GT:GQ	40,6,0:1/1:49
-chr14	74877658	.	C	T	45	.	DP=48;AF1=1;CI95=1,1;DP4=0,1,0,12;MQ=36;PV4=1,0.02,1,0.39	PL:GT:GQ	78,28,0:1/1:99
-chr14	75546678	.	C	T	19.2	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=17	PL:GT:GQ	52,18,0:1/1:90
-chr14	76439185	.	T	C	67.1	.	DP=7;AF1=0.505;CI95=0.5,0.5;DP4=0,1,0,6;MQ=33;PV4=1,1,0.056,0.29	PL:GT:GQ	97,0,17:0/1:20
-chr14	77313295	.	T	A	99	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=48	PL:GT:GQ	191,30,0:1/1:99
-chr14	77673422	.	G	A	11.5	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=24	PL:GT:GQ	44,18,0:1/1:90
-chr14	78646125	.	T	C	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=40	PL:GT:GQ	153,24,0:1/1:96
-chr14	91702449	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr14	91769842	.	G	A	63	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=47	PL:GT:GQ	95,9,0:1/1:63
-chr14	91775899	.	C	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr14	91775924	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr14	93482918	.	A	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr14	93665819	.	C	T	75	.	DP=7;AF1=0.5002;CI95=0.5,0.5;DP4=0,3,0,4;MQ=42;PV4=1,1,1,1	PL:GT:GQ	105,0,31:0/1:34
-chr14	95422276	.	A	G	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=45	PL:GT:GQ	88,21,0:1/1:84
-chr14	95731986	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr14	96045464	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr14	97172020	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=51	PL:GT:GQ	100,9,0:1/1:63
-chr14	100515480	.	A	G	6.98	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=45;PV4=1,0.14,0.085,0.33	PL:GT:GQ	36,0,30:0/1:32
-chr14	100770214	.	A	T	8.69	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=16	PL:GT:GQ	41,21,0:1/1:84
-chr14	101258303	.	G	A	82	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,15,0;MQ=26	PL:GT:GQ	115,45,0:1/1:99
-chr14	101701492	.	C	G	66	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=49	PL:GT:GQ	99,30,0:1/1:99
-chr14	102113772	.	T	C	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=30	PL:GT:GQ	33,6,0:1/1:49
-chr14	102751431	.	A	C	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr14	103708033	.	A	G	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=27	PL:GT:GQ	141,36,0:1/1:99
-chr14	104744582	.	G	A	3.52	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	33,9,0:1/1:63
-chr14	105989100	.	C	T	3.14	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	33,15,0:1/1:75
-chr14	105989162	.	C	T	3.65	.	DP=12;AF1=0.7301;CI95=0.5,1;DP4=0,6,0,6;MQ=15;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr14	106234810	.	G	A	25.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=39	PL:GT:GQ	58,15,0:1/1:75
-chr14	106995572	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr14	107283057	.	T	C	5.5	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=20	PL:GT:GQ	37,21,0:1/1:84
-chr14	107285319	.	T	C	33	.	DP=36;AF1=1;CI95=1,1;DP4=0,0,0,35;MQ=22	PL:GT:GQ	66,105,0:1/1:99
-chr14	107640449	.	A	G	11.8	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=36	PL:GT:GQ	44,12,0:1/1:72
-chr15	20082092	.	T	G	18.3	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=24	PL:GT:GQ	51,15,0:1/1:75
-chr15	22955884	.	T	C	67	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,12,0;MQ=48	PL:GT:GQ	100,36,0:1/1:99
-chr15	22971987	.	A	G	5.29	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=22	PL:GT:GQ	35,6,0:1/1:49
-chr15	23233324	.	C	A	47	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=31	PL:GT:GQ	80,42,0:1/1:99
-chr15	25175286	.	C	T	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=42;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr15	25385709	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr15	27372396	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr15	35998093	.	C	T	9.53	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=17	PL:GT:GQ	42,27,0:1/1:99
-chr15	36716538	.	C	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr15	36793360	.	G	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	76,9,0:1/1:63
-chr15	53783097	.	A	G	10.5	.	DP=31;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=16	PL:GT:GQ	43,21,0:1/1:84
-chr15	54180175	.	C	T	10.4	.	DP=7;AF1=0.5001;CI95=0.5,0.5;DP4=4,0,3,0;MQ=27;PV4=1,1.2e-05,1,1	PL:GT:GQ	40,0,32:0/1:34
-chr15	54939306	.	C	T	99	.	DP=34;AF1=0.5;CI95=0.5,0.5;DP4=0,18,0,16;MQ=49;PV4=1,1,0.18,1	PL:GT:GQ	172,0,181:0/1:99
-chr15	59377916	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr15	59685961	.	G	C	68	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=36	PL:GT:GQ	101,33,0:1/1:99
-chr15	60306384	.	A	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr15	60345642	.	G	C	14.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	46,6,0:1/1:49
-chr15	60367387	.	G	A	13.2	.	DP=6;AF1=0.5001;CI95=0.5,0.5;DP4=3,0,3,0;MQ=34;PV4=1,0.098,0.24,1	PL:GT:GQ	43,0,35:0/1:37
-chr15	60367446	.	C	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr15	61763755	.	G	A	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=45	PL:GT:GQ	100,9,0:1/1:63
-chr15	61831362	.	C	G	11.3	.	DP=5;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,3;MQ=30;PV4=1,0.00077,0.47,1	PL:GT:GQ	41,0,42:0/1:41
-chr15	63978880	.	G	C	60	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=2,0,4,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	90,3,0:1/1:41
-chr15	64342445	.	A	G	12.2	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=18	PL:GT:GQ	44,9,0:1/1:63
-chr15	65424859	.	T	C	11.3	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=21	PL:GT:GQ	44,30,0:1/1:99
-chr15	65603698	.	C	T	60	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	92,9,0:1/1:63
-chr15	67005078	.	G	A	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr15	71133512	.	G	C	22.3	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=25	PL:GT:GQ	55,15,0:1/1:75
-chr15	72619009	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr15	73272688	.	C	T	70.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=39	PL:GT:GQ	103,15,0:1/1:75
-chr15	73699335	.	T	A	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=45	PL:GT:GQ	175,27,0:1/1:99
-chr15	74513352	.	C	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=37	PL:GT:GQ	139,30,0:1/1:99
-chr15	75540536	.	G	A	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr15	75822537	.	C	A	17.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=23	PL:GT:GQ	50,15,0:1/1:75
-chr15	78554005	.	T	C	12	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	43,6,0:1/1:49
-chr15	80089369	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=28	PL:GT:GQ	40,6,0:1/1:49
-chr15	83089149	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	40,6,0:1/1:49
-chr15	86839307	.	T	C	90.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	123,15,0:1/1:75
-chr15	89836258	.	T	C	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=39	PL:GT:GQ	141,24,0:1/1:96
-chr15	89837706	.	G	A	4.13	.	DP=8;AF1=0.4998;CI95=0.5,0.5;DP4=0,4,0,4;MQ=30;PV4=1,1,0.25,1	PL:GT:GQ	32,0,59:0/1:35
-chr15	89857648	.	T	C	99	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=8,0,8,0;MQ=40;PV4=1,1,0.3,1	PL:GT:GQ	133,0,130:0/1:99
-chr15	89864228	.	A	C	32	.	DP=4;AF1=0.5002;CI95=0.5,0.5;DP4=2,0,2,0;MQ=42;PV4=1,1,1,1	PL:GT:GQ	62,0,31:0/1:34
-chr15	91261235	.	G	A	7.8	.	DP=4;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=44;PV4=1,1,0.32,1	PL:GT:GQ	37,0,30:0/1:32
-chr16	256990	.	A	C	10.4	.	DP=16;AF1=0.5008;CI95=0.5,0.5;DP4=4,0,3,0;MQ=23;PV4=1,0.34,1,1	PL:GT:GQ	40,0,25:0/1:28
-chr16	260794	.	T	C	3.01	.	DP=19;AF1=0.4999;CI95=0.5,0.5;DP4=13,0,2,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	30,0,32:0/1:31
-chr16	419905	.	A	G	7.9	.	DP=5;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=22;PV4=1,1,1,1	PL:GT:GQ	36,1,0:1/1:23
-chr16	824086	.	T	C	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr16	1085063	.	C	T	52	.	DP=12;AF1=0.5;CI95=0.5,0.5;DP4=6,0,6,0;MQ=42;PV4=1,1,0.014,1	PL:GT:GQ	82,0,128:0/1:85
-chr16	1221305	.	T	C	54	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=0,3,0,3;MQ=40;PV4=1,1,1,1	PL:GT:GQ	84,0,60:0/1:63
-chr16	1411728	.	A	G	32.3	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=35	PL:GT:GQ	65,15,0:1/1:75
-chr16	1443197	.	C	G	64	.	DP=26;AF1=1;CI95=1,1;DP4=0,0,25,0;MQ=36	PL:GT:GQ	97,75,0:1/1:99
-chr16	1478746	.	A	T	32	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=28	PL:GT:GQ	65,24,0:1/1:96
-chr16	1514438	.	A	C	45	.	DP=49;AF1=1;CI95=1,1;DP4=0,0,48,0;MQ=26	PL:GT:GQ	78,144,0:1/1:99
-chr16	1601989	.	T	C	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=29	PL:GT:GQ	133,39,0:1/1:99
-chr16	2043883	.	C	T	30	.	DP=33;AF1=1;CI95=1,1;DP4=0,0,0,33;MQ=14	PL:GT:GQ	63,99,0:1/1:99
-chr16	2137470	.	A	C	39	.	DP=38;AF1=0.5016;CI95=0.5,0.5;DP4=4,0,6,0;MQ=34;PV4=1,0.02,1,1	PL:GT:GQ	69,0,22:0/1:25
-chr16	2537260	.	A	G	99	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=40	PL:GT:GQ	177,33,0:1/1:99
-chr16	2564737	.	T	C	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,22;MQ=41	PL:GT:GQ	199,66,0:1/1:99
-chr16	2612605	.	A	T	62.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=28	PL:GT:GQ	95,15,0:1/1:75
-chr16	2704518	.	G	A	41	.	DP=48;AF1=0.5;CI95=0.5,0.5;DP4=0,17,0,12;MQ=48;PV4=1,1.9e-23,0.24,0.034	PL:GT:GQ	71,0,175:0/1:74
-chr16	3274307	.	G	T	68	.	DP=39;AF1=0.5;CI95=0.5,0.5;DP4=0,30,0,8;MQ=37;PV4=1,1,1,1	PL:GT:GQ	98,0,138:0/1:99
-chr16	5467292	.	G	C	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	69,6,0:1/1:49
-chr16	10079145	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr16	11483702	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr16	12038227	.	A	T	23	.	DP=47;AF1=0.5;CI95=0.5,0.5;DP4=0,22,0,23;MQ=32;PV4=1,4.4e-66,0.47,0.028	PL:GT:GQ	53,0,135:0/1:56
-chr16	21336880	.	G	C	55	.	DP=35;AF1=0.5;CI95=0.5,0.5;DP4=0,12,0,19;MQ=47;PV4=1,5.6e-21,1,1	PL:GT:GQ	85,0,121:0/1:88
-chr16	21980241	.	C	T	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr16	23275383	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	44,6,0:1/1:49
-chr16	27546495	.	G	T	25	.	DP=35;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=43	PL:GT:GQ	57,9,0:1/1:63
-chr16	27700399	.	A	T	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=17	PL:GT:GQ	50,12,0:1/1:72
-chr16	28021935	.	A	G	18.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	51,15,0:1/1:75
-chr16	29070016	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr16	29478618	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr16	29718140	.	C	T	46.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	79,15,0:1/1:75
-chr16	30700759	.	T	C	17.1	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,14;MQ=14	PL:GT:GQ	50,42,0:1/1:99
-chr16	35139103	.	A	G	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=37	PL:GT:GQ	79,12,0:1/1:72
-chr16	35473348	.	G	A	3.83	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	34,12,0:1/1:72
-chr16	36213667	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr16	36705528	.	G	A	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=32	PL:GT:GQ	47,15,0:1/1:75
-chr16	43831353	.	C	T	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=42	PL:GT:GQ	102,12,0:1/1:72
-chr16	44715166	.	A	C	25	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=32	PL:GT:GQ	58,24,0:1/1:96
-chr16	44957661	.	T	C	7.03	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=18	PL:GT:GQ	39,21,0:1/1:84
-chr16	44958698	.	C	T	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=49	PL:GT:GQ	75,15,0:1/1:75
-chr16	44959163	.	T	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	66,12,0:1/1:72
-chr16	45167959	.	C	T	4.45	.	DP=16;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=24	PL:GT:GQ	35,12,0:1/1:72
-chr16	50254956	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr16	52383122	.	A	C	46.5	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=42	PL:GT:GQ	79,12,0:1/1:72
-chr16	55978159	.	C	T	10.7	.	DP=20;AF1=0.5336;CI95=0.5,1;DP4=2,0,5,0;MQ=35;PV4=1,0.038,1,0.059	PL:GT:GQ	40,0,9:0/1:12
-chr16	61358878	.	T	A	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	47,6,0:1/1:49
-chr16	61392487	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	44,6,0:1/1:49
-chr16	61621603	.	G	T	6.59	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=22	PL:GT:GQ	38,12,0:1/1:72
-chr16	69120890	.	G	C	51.3	.	DP=36;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=42	PL:GT:GQ	84,15,0:1/1:75
-chr16	70778219	.	A	G	21.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=39	PL:GT:GQ	53,6,0:1/1:49
-chr16	71899519	.	T	C	40	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=33	PL:GT:GQ	73,33,0:1/1:99
-chr16	72079251	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr16	72093003	.	G	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr16	72672428	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr16	72864515	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr16	72890560	.	G	A	47.1	.	DP=10;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,7;MQ=49;PV4=1,0.0019,0.0033,1	PL:GT:GQ	77,0,16:0/1:19
-chr16	73048929	.	A	G	6.29	.	DP=4;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=27;PV4=1,1,1,0.33	PL:GT:GQ	34,1,0:1/1:23
-chr16	73177179	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr16	73191468	.	C	T	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=40	PL:GT:GQ	102,12,0:1/1:72
-chr16	73367439	.	A	C	7.41	.	DP=36;AF1=1;CI95=0.5,1;DP4=0,2,0,13;MQ=26;PV4=1,1,0.027,1	PL:GT:GQ	37,4,0:1/1:45
-chr16	74259316	.	C	T	89.5	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr16	75271450	.	C	G	6.99	.	DP=15;AF1=0.5015;CI95=0.5,0.5;DP4=0,1,0,3;MQ=44;PV4=1,0.065,0.31,1	PL:GT:GQ	36,0,22:0/1:25
-chr16	76199870	.	G	A	26	.	DP=14;AF1=0.5;CI95=0.5,0.5;DP4=8,0,6,0;MQ=47;PV4=1,1.2e-06,0.32,1	PL:GT:GQ	56,0,141:0/1:59
-chr16	77723692	.	A	G	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	122,12,0:1/1:72
-chr17	165875	.	G	A	40.8	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	72,6,0:1/1:49
-chr17	1443809	.	C	G	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr17	1618253	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=39	PL:GT:GQ	54,9,0:1/1:63
-chr17	2815309	.	T	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr17	3537486	.	T	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr17	3734367	.	C	A	23.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=36	PL:GT:GQ	56,12,0:1/1:72
-chr17	5634764	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr17	6408090	.	C	G	3.54	.	DP=5;AF1=0.4998;CI95=0.5,0.5;DP4=3,0,2,0;MQ=40;PV4=1,1,0.36,1	PL:GT:GQ	31,0,66:0/1:34
-chr17	7089723	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr17	8731503	.	G	C	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	42,6,0:1/1:49
-chr17	9282935	.	T	C,G	24.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=40	PL:GT:GQ	57,12,61,0,3,61:1/1:72
-chr17	17284831	.	T	C	29	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	61,9,0:1/1:63
-chr17	18439515	.	G	A	4.11	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=25	PL:GT:GQ	34,9,0:1/1:63
-chr17	18602146	.	C	T	4.76	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=16	PL:GT:GQ	36,33,0:1/1:99
-chr17	19427888	.	C	T	57	.	DP=104;AF1=0.5;CI95=0.5,0.5;DP4=45,0,29,0;MQ=39;PV4=1,2.2e-12,1,1	PL:GT:GQ	87,0,131:0/1:90
-chr17	19604159	.	T	C	9.31	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr17	19610366	.	C	T	13	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr17	20484706	.	C	G	51	.	DP=35;AF1=0.5001;CI95=0.5,0.5;DP4=0,11,0,21;MQ=21;PV4=1,0.39,0.49,1	PL:GT:GQ	81,0,36:0/1:39
-chr17	20555720	.	A	G	26.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=28	PL:GT:GQ	59,15,0:1/1:75
-chr17	24328984	.	A	C	15.4	.	DP=34;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=25	PL:GT:GQ	48,15,0:1/1:75
-chr17	26237090	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr17	28394766	.	C	A	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr17	31218277	.	A	G	3.62	.	DP=38;AF1=0.5161;CI95=0.5,0.5;DP4=0,1,0,2;MQ=38;PV4=1,0.26,1,1	PL:GT:GQ	31,0,12:0/1:15
-chr17	31254021	.	C	T	15.1	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=35	PL:GT:GQ	47,9,0:1/1:63
-chr17	32516798	.	G	A	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	69,6,0:1/1:49
-chr17	32600253	.	A	G	16.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	49,12,0:1/1:72
-chr17	34255214	.	G	C	19.2	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=21	PL:GT:GQ	52,18,0:1/1:90
-chr17	34365900	.	T	C	93.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=38	PL:GT:GQ	126,18,0:1/1:90
-chr17	35380386	.	A	T	6.79	.	DP=44;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	37,6,0:1/1:49
-chr17	41993344	.	C	T	64	.	DP=41;AF1=1;CI95=1,1;DP4=0,0,0,41;MQ=16	PL:GT:GQ	97,123,0:1/1:99
-chr17	42128201	.	A	G	4.13	.	DP=5;AF1=0.4998;CI95=0.5,0.5;DP4=0,2,0,2;MQ=52;PV4=1,0.0041,1,1	PL:GT:GQ	32,0,62:0/1:35
-chr17	42984490	.	C	A	56	.	DP=33;AF1=0.5001;CI95=0.5,0.5;DP4=6,0,12,0;MQ=42;PV4=1,0.004,1,1	PL:GT:GQ	86,0,34:0/1:37
-chr17	43419457	.	G	A	99	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,14;MQ=45	PL:GT:GQ	185,42,0:1/1:99
-chr17	43421225	.	A	G	65.1	.	DP=31;AF1=1;CI95=0.5,1;DP4=0,6,0,17;MQ=43;PV4=1,0.004,1,1	PL:GT:GQ	98,18,0:1/1:90
-chr17	45206897	.	G	A	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=47	PL:GT:GQ	54,9,0:1/1:63
-chr17	45381302	.	T	C	18.6	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr17	45530812	.	C	A	3.54	.	DP=6;AF1=0.4998;CI95=0.5,0.5;DP4=0,3,0,2;MQ=40;PV4=1,1,0.37,1	PL:GT:GQ	31,0,58:0/1:34
-chr17	50242633	.	G	A	44	.	DP=42;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,13;MQ=32;PV4=1,0.084,0.14,1	PL:GT:GQ	74,0,154:0/1:77
-chr17	51275317	.	G	A	14.9	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	46,6,0:1/1:49
-chr17	52325530	.	C	T	29	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,0,18;MQ=24	PL:GT:GQ	62,54,0:1/1:99
-chr17	52411748	.	T	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr17	53190746	.	C	G	62.1	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=40	PL:GT:GQ	95,18,0:1/1:90
-chr17	58289916	.	T	C	18.2	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=22	PL:GT:GQ	51,18,0:1/1:90
-chr17	59796875	.	C	T	42	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=35	PL:GT:GQ	74,9,0:1/1:63
diff --git a/tests/vcf-examples/13.vcf b/tests/vcf-examples/13.vcf
deleted file mode 100644
index 08b54e0..0000000
--- a/tests/vcf-examples/13.vcf
+++ /dev/null
@@ -1,220 +0,0 @@
-##fileformat=VCFv4.0
-##fileDate=2011-10-11
-##source=Platypus_Version_0.1.5
-##INFO=<ID=func,Number=1,Type=String,Description="Functional category: exnoic, intergenic etc">
-##INFO=<ID=gene,Number=2,Type=String,Description="RefSeq gene name">
-##INFO=<ID=exon_func,Number=1,Type=String,Description="Exonic function of the variant">
-##INFO=<ID=AAchange,Number=1,Type=String,Description="Amino Acid change">
-##INFO=<ID=cons46,Number=1,Type=String,Description="UCSC 46 species conservation score">
-##INFO=<ID=segdup,Number=1,Type=Float,Description="UCSC segment duplication score">
-##INFO=<ID=1000g,Number=1,Type=Float,Description="1000 genomes allelic frequency">
-##INFO=<ID=dbsnp,Number=1,Type=String,Description="dbSNP ID">
-##INFO=<ID=sift,Number=1,Type=Float,Description="SIFT score">
-##INFO=<ID=pp2,Number=1,Type=Float,Description="PolyPhen2 score">
-##INFO=<ID=phylop,Number=1,Type=Float,Description="Phylop score">
-##INFO=<ID=mutT,Number=1,Type=Float,Description="Mutation Taster score">
-##INFO=<ID=LRT,Number=1,Type=Float,Description="LRT score">
-##INFO=<ID=FR,Number=0,Type=Float,Description="Estimated population frequency">
-##INFO=<ID=RPV,Number=0,Type=Float,Description="Median minimum base quality for bases around variant">
-##INFO=<ID=RPV,Number=0,Type=Float,Description="Reverse strand p-value">
-##INFO=<ID=TCR,Number=0,Type=Integer,Description="Total reverse strand coverage at this locus">
-##INFO=<ID=HP,Number=1,Type=Integer,Description="Homopolmer run length">
-##INFO=<ID=ABPV,Number=0,Type=Float,Description="Allele-bias p-value. Testing for low variant coverage">
-##INFO=<ID=TR,Number=0,Type=Integer,Description="Total number of reads containing this variant">
-##INFO=<ID=PP,Number=0,Type=Float,Description="Posterior probability (phred scaled) that this variant segregates">
-##INFO=<ID=NF,Number=0,Type=Integer,Description="Total number of forward reads containing this variant">
-##INFO=<ID=SC,Number=1,Type=String,Description="Genomic sequence 10 bases either side of variant position">
-##INFO=<ID=FPV,Number=0,Type=Float,Description="Forward strand p-value">
-##INFO=<ID=TCF,Number=0,Type=Integer,Description="Total forward strand coverage at this locus">
-##INFO=<ID=NR,Number=0,Type=Integer,Description="Total number of reverse reads containing this variant">
-##INFO=<ID=RMP,Number=0,Type=Float,Description="RMS Position in reads of Variant">
-##INFO=<ID=TC,Number=0,Type=Integer,Description="Total coverage at this locus">
-##FILTER=<ID=sb,Description="Variant fails strand-bias filter">
-##FILTER=<ID=ab,Description="Variant fails allele-bias filter">
-##FILTER=<ID=badReads,Description="Variant supported only by reads with low quality bases close to variant position, and not present on both strands.">
-##FILTER=<ID=hp10,Description="Flanking sequence contains homopolymer of length 10 or greater">
-##FORMAT=<ID=GL,Number=.,Type=Float,Description="Genotype log-likelihoods (log10) for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites">
-##FORMAT=<ID=GT,Number=1,Type=String,Description="Unphased genotypes">
-##FORMAT=<ID=NR,Number=1,Type=Integer,Description="Number of reads covering variant in this sample">
-##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype quality, as Phred score">
-##FORMAT=<ID=GT:GL:GQ:NR,Number=.,Type=String,Description="(Undefined tag)">
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	WTCHG_27173_05.bam	WTCHG_27173_04.bam
-chr1	1451489	.	T	C	103	PASS	ABPV=1.00e+00;FPV=7.56e-01;FR=0.2501;HP=7;MMLQ=30;NF=2;NR=18;PP=103;RMP=57.54;RPV=1.00e-00;SC=CCGGTGTGGGTGGGGAGGCCG;TC=42;TCF=7;TCR=35;TR=20;func=intronic;gene=ATAD3A;segdup=0.91;1000g=0.36;dbsnp=rs76717221	GT:GL:GQ:NR	0/0:-43.28,-51.0,-125.34:35:18	1/0:-135.58,-103.29,-138.87:100:24
-chr1	1451490	.	G	A	73	PASS	ABPV=1.00e+00;FPV=9.29e-01;FR=0.2501;HP=3;MMLQ=30;NF=3;NR=16;PP=73;RMP=58.79;RPV=9.98e-01;SC=CGGTGTGGGTGGGGAGGCCGG;TC=42;TCF=7;TCR=35;TR=19;func=intronic;gene=ATAD3A;segdup=0.91;1000g=0.33;dbsnp=rs9439460	GT:GL:GQ:NR	0/0:-43.28,-50.99,-127.79:35:18	0/1:-135.58,-110.35,-146.87:100:24
-chr1	12939904	.	A	C	109	PASS	ABPV=1.00e+00;FPV=7.66e-01;FR=0.2500;HP=1;MMLQ=37;NF=22;NR=1;PP=109;RMP=45.66;RPV=4.46e-06;SC=ATTGTGAGGAACTTTAACGAG;TC=132;TCF=79;TCR=53;TR=23	GT:GL:GQ:NR	0/0:-40.31,-50.48,-301.89:45:53	0/1:-121.0,-87.39,-396.61:100:79
-chr1	16902943	.	T	C	50	PASS	ABPV=1.00e+00;FPV=2.90e-01;FR=0.2506;HP=2;MMLQ=34;NF=30;NR=18;PP=50;RMP=46.42;RPV=8.84e-01;SC=GGGTCAGCTCTCGTTCCTGAG;TC=191;TCF=133;TCR=58;TR=48	GT:GL:GQ:NR	0/0:-337.26,-342.92,-618.53:26:93	0/1:-428.71,-408.75,-668.15:84:98
-chr1	16902982	.	G	T	41	PASS	ABPV=1.00e+00;FPV=5.26e-02;FR=0.2500;HP=1;MMLQ=36;NF=29;NR=10;PP=41;RMP=55.68;RPV=1.90e-02;SC=ATTGCCTAAGGTGAGACGGTA;TC=223;TCF=152;TCR=71;TR=39	GT:GL:GQ:NR	0/0:-282.16,-293.75,-760.18:52:108	0/1:-308.83,-290.99,-786.16:75:115
-chr1	16918180	.	C	T	200	PASS	ABPV=1.00e+00;FPV=7.60e-05;FR=0.2500;HP=1;MMLQ=37;NF=8;NR=11;PP=200;RMP=57.84;RPV=6.15e-01;SC=TACTTTGGTACCTCTGTCTTC;TC=134;TCF=91;TCR=43;TR=19	GT:GL:GQ:NR	0/0:-48.3,-68.7,-289.28:90:47	0/1:-194.28,-132.13,-452.09:100:87
-chr1	17083652	.	C	T	200	PASS	ABPV=3.06e-02;FPV=6.38e-13;FR=0.2500;HP=2;MMLQ=36;NF=29;NR=3;PP=200;RMP=38.16;RPV=2.05e-02;SC=AAATCTCAACCTTGAGTACAA;TC=350;TCF=317;TCR=33;TR=32;func=ncRNA;gene=MST1P9;cons46=632 Name=lod=492;segdup=0.99;1000g=0.37;dbsnp=rs113710576	GT:GL:GQ:NR	0/0:-547.14,-559.85,-1017.76:56:159	0/1:-723.35,-656.42,-1167.76:100:191
-chr1	17083776	.	C	A	79	PASS	ABPV=1.08e-01;FPV=7.38e-01;FR=0.2500;HP=1;MMLQ=35;NF=1;NR=22;PP=79;RMP=76.99;RPV=1.13e-09;SC=CACAGAGACACGCGTGAAGAC;TC=238;TCF=4;TCR=234;TR=23;func=ncRNA;gene=MST1P9;cons46=632 Name=lod=492;segdup=0.99;1000g=0.20;dbsnp=rs56318124	GT:GL:GQ:NR	0/0:-442.45,-455.85,-790.66:59:121	0/1:-451.84,-425.21,-717.41:100:117
-chr1	17575714	.	G	A	59	PASS	ABPV=2.52e-01;FPV=3.10e-02;FR=0.2500;HP=1;MMLQ=31;NF=1;NR=4;PP=59;RMP=43.35;RPV=1.94e-02;SC=GACCCTCGTGGACATTTATGG;TC=58;TCF=19;TCR=39;TR=5	GT:GL:GQ:NR	0/0:-14.49,-33.87,-234.95:85:32	0/1:-39.36,-17.32,-168.9:93:26
-chr1	21751228	.	T	TCGCGCCCGGC	66	PASS	ABPV=3.86e-06;FPV=8.03e-37;FR=0.2500;HP=4;NF=1;NR=1;PP=66;RMP=15.56;RPV=1.98e-06;SC=CTCAAATGAGTAAAAGGCACT;TC=133;TCF=77;TCR=56;TR=2	GT:GL:GQ:NR	0/0:-178.34,-190.57,-398.5:54:72	0/1:-308.3,-271.14,-540.05:100:98
-chr1	21755539	.	C	A	27	PASS	ABPV=1.00e+00;FPV=9.84e-01;FR=0.2503;HP=1;MMLQ=31;NF=2;NR=1;PP=27;RMP=65.83;RPV=4.98e-02;SC=GGCCAACAACCGCCAGGTGCG;TC=20;TCF=3;TCR=17;TR=3;func=intergenic;gene=ECE1(dist=83505) NBPF3(dist=11092);cons46=807 Name=lod=2532;segdup=0.99;1000g=0.80;dbsnp=rs3855556	GT:GL:GQ:NR	0/0:0.0,-6.22,-62.68:28:10	1/0:-21.51,-6.92,-52.98:61:10
-chr1	40798730	.	A	AT	59	PASS	ABPV=1.00e+00;FPV=6.06e-01;FR=0.2504;HP=10;NF=7;NR=1;PP=59;RMP=50.29;RPV=7.38e-01;SC=GAAGTCTTCTATTTTTTTTTA;TC=28;TCF=24;TCR=4;TR=8;func=intergenic;gene=COL9A2(dist=15791) SMAP2(dist=40648);dbsnp=rs34372767	GT:GL:GQ:NR	0/0:0.0,-6.13,-39.37:28:12	0/1:-35.97,-10.49,-31.53:98:16
-chr1	142803580	.	TA	T	145	PASS	ABPV=1.00e+00;FPV=6.35e-02;FR=0.2500;HP=6;NF=1;NR=11;PP=145;RMP=65.89;RPV=8.29e-02;SC=TTCATAGATTTAAAAAATTAT;TC=81;TCF=16;TCR=65;TR=12	GT:GL:GQ:NR	0/0:-39.18,-49.93,-242.54:48:33	1/0:-80.12,-35.74,-249.72:100:48
-chr1	144854799	.	C	T	50	PASS	ABPV=1.00e+00;FPV=9.37e-01;FR=0.2504;HP=1;MMLQ=34;NF=1;NR=19;PP=50;RMP=60.89;RPV=9.86e-01;SC=GCCTCGGATACCTCCAGCTGA;TC=52;TCF=2;TCR=50;TR=20;func=intronic;gene=PDE4DIP;segdup=0.96;dbsnp=rs5004097	GT:GL:GQ:NR	0/0:-89.24,-95.22,-205.12:27:25	0/1:-177.25,-157.18,-246.67:85:27
-chr1	145116027	.	T	C	127	PASS	ABPV=1.00e+00;FPV=1.00e+00;FR=0.2501;HP=2;MMLQ=34;NF=0;NR=7;PP=127;RMP=54.07;RPV=5.14e-01;SC=AAAAGAGATGTCCTGAAAATG;TC=30;TCF=0;TCR=30;TR=7;func=UTR3;gene=SEC22B;cons46=340 Name=lod=32;1000g=0.45;dbsnp=rs7550440	GT:GL:GQ:NR	0/0:0.0,-7.61,-92.94:34:11	0/1:-56.84,-19.14,-106.99:100:19
-chr1	146554532	.	C	T	57	PASS	ABPV=1.00e+00;FPV=5.18e-01;FR=0.2501;HP=12;MMLQ=31;NF=4;NR=5;PP=57;RMP=66.19;RPV=4.68e-01;SC=CTTCTTCTTTCTTTTTTTTTA;TC=41;TCF=18;TCR=23;TR=9;func=intergenic;gene=LOC728989(dist=39933) PRKAB2(dist=72153);segdup=0.93;dbsnp=rs9662613	GT:GL:GQ:NR	0/0:-13.82,-21.42,-95.53:34:13	0/1:-131.76,-110.18,-223.87:91:28
-chr1	148344564	.	T	C	34	PASS	ABPV=3.69e-01;FPV=1.16e-03;FR=0.2500;HP=2;MMLQ=36;NF=24;NR=1;PP=34;RMP=22.65;RPV=1.98e-06;SC=TTCGTTCTTATTTCTCCCCGC;TC=218;TCF=162;TCR=56;TR=25	GT:GL:GQ:NR	0/0:-210.1,-224.84,-651.44:65:104	0/1:-232.74,-216.41,-586.14:69:114
-chr1	148853862	.	G	T	37	PASS	ABPV=3.79e-01;FPV=1.94e-02;FR=0.2500;HP=3;MMLQ=31;NF=6;NR=2;PP=37;RMP=50.34;RPV=2.58e-02;SC=CGCTCCTGGAGCCCAGCCCGG;TC=76;TCF=50;TCR=26;TR=8	GT:GL:GQ:NR	0/0:-247.75,-257.0,-317.61:41:35	1/0:-179.5,-162.62,-280.47:71:41
-chr1	148854004	.	C	T	32	PASS	ABPV=1.83e-01;FPV=3.17e-02;FR=0.2500;HP=1;MMLQ=34;NF=0;NR=3;PP=32;RMP=93.74;RPV=2.52e-02;SC=GCCCGCACTGCTGCAGCGCCC;TC=44;TCF=12;TCR=32;TR=3	GT:GL:GQ:NR	0/0:-75.02,-87.66,-197.34:56:26	1/0:-55.07,-39.25,-94.0:66:18
-chr1	152187606	.	G	A	200	PASS	ABPV=3.64e-01;FPV=4.08e-07;FR=0.2500;HP=2;MMLQ=32;NF=7;NR=16;PP=200;RMP=30.4;RPV=4.89e-02;SC=GAAGACTGACGGGAGCCAGAC;TC=202;TCF=109;TCR=93;TR=23;func=exonic;gene=HRNR;exon_func=nonsynonymous SNV;AAchange=NM_001009931:c.C6499T:p.R2167C;segdup=0.98;1000g=0.05;sift=0.2;pp2=0.269490;phylop=0.009549;mutT=0.062064;LRT=0.589002	GT:GL:GQ:NR	0/0:-190.82,-206.2,-650.62:68:98	0/1:-306.73,-239.37,-605.74:100:104
-chr1	152281007	.	A	G	38	PASS	ABPV=1.00e+00;FPV=2.01e-01;FR=0.2500;HP=1;MMLQ=31;NF=37;NR=62;PP=38;RMP=56.83;RPV=9.75e-01;SC=GCCTGATCATAATGGGATCCT;TC=370;TCF=169;TCR=201;TR=99	GT:GL:GQ:NR	0/0:-830.31,-842.03,-1695.93:52:178	0/1:-1104.87,-1087.65,-1851.72:72:192
-chr1	152281008	.	A	G	56	PASS	ABPV=1.00e+00;FPV=2.26e-01;FR=0.2500;HP=1;MMLQ=31;NF=37;NR=62;PP=56;RMP=57.69;RPV=9.75e-01;SC=CCTGATCATAATGGGATCCTT;TC=368;TCF=167;TCR=201;TR=99	GT:GL:GQ:NR	0/0:-836.29,-850.28,-1704.3:62:178	1/0:-1097.96,-1076.67,-1811.19:90:190
-chr1	152281466	.	C	T	200	PASS	ABPV=1.00e+00;FPV=3.99e-04;FR=0.2500;HP=2;MMLQ=33;NF=26;NR=66;PP=200;RMP=66.62;RPV=7.23e-01;SC=TGCCCGTGACCGGCTCTGTCT;TC=430;TCF=180;TCR=250;TR=92	GT:GL:GQ:NR	0/0:-912.94,-966.99,-1954.85:100:223	1/0:-939.3,-872.22,-1720.42:100:207
-chr1	168549565	.	T	C	28	PASS	ABPV=1.00e+00;FPV=1.00e+00;FR=0.2504;HP=2;MMLQ=37;NF=0;NR=8;PP=28;RMP=72.28;RPV=1.34e-01;SC=TCCTTATCAATCATGTCTTTC;TC=47;TCF=0;TCR=47;TR=8	GT:GL:GQ:NR	0/0:-27.57,-33.72,-167.32:28:21	1/0:-34.62,-19.62,-182.0:63:26
-chr1	236647542	.	G	T	46	PASS	ABPV=1.00e+00;FPV=9.99e-01;FR=0.2500;HP=3;MMLQ=34;NF=16;NR=40;PP=46;RMP=62.31;RPV=1.00e-00;SC=GTGCAAGCTGGCCCAGGCCAA;TC=104;TCF=32;TCR=72;TR=56	GT:GL:GQ:NR	0/0:-318.17,-328.23,-521.3:45:54	1/0:-498.22,-479.17,-572.27:80:50
-chr1	236647562	.	T	C	73	PASS	ABPV=1.00e+00;FPV=9.95e-01;FR=0.2503;HP=2;MMLQ=37;NF=11;NR=36;PP=73;RMP=64.25;RPV=1.00e-00;SC=ATGGTTGGTGTGTCATGGTGC;TC=85;TCF=23;TCR=62;TR=47	GT:GL:GQ:NR	0/0:-240.39,-246.81,-405.51:29:42	0/1:-421.95,-396.59,-483.66:100:43
-chr1	236700807	.	T	A	130	PASS	ABPV=1.00e+00;FPV=5.12e-01;FR=0.2502;HP=2;MMLQ=33;NF=8;NR=7;PP=130;RMP=47.87;RPV=8.70e-01;SC=GTAATCCCGTTTGTTGGCACC;TC=55;TCF=34;TCR=21;TR=15;func=exonic;gene=LGALS8;exon_func=nonsynonymous SNV;AAchange=NM_201544:c.T56A:p.F19Y;cons46=463 Name=lod=102;1000g=0.62;dbsnp=rs2737713;pp2=0.0;phylop=0.983932;mutT=4.6E-5;LRT=0.999982	GT:GL:GQ:NR	0/0:-41.35,-48.14,-183.02:31:21	0/1:-204.57,-166.19,-295.14:100:34
-chr1	236700823	.	T	C	200	PASS	ABPV=1.00e+00;FPV=6.24e-01;FR=0.2504;HP=2;MMLQ=32;NF=9;NR=8;PP=200;RMP=58.62;RPV=8.49e-01;SC=GCACCATTCCTGATCAGCTGG;TC=60;TCF=35;TCR=25;TR=17;func=exonic;gene=LGALS8;exon_func=synonymous SNV;AAchange=NM_201544:c.T72C:p.P24P;cons46=463 Name=lod=102;1000g=0.61;dbsnp=rs1041934	GT:GL:GQ:NR	0/0:-41.35,-47.43,-173.43:28:22	1/0:-232.08,-183.12,-325.41:100:38
-chr1	241663902	.	TGA	T	37	PASS	ABPV=2.57e-03;FPV=3.07e-05;FR=0.2507;HP=2;NF=0;NR=3;PP=37;RMP=44.45;RPV=2.39e-06;SC=TTTGAGTGAGTGAGAGAGAGA;TC=90;TCF=18;TCR=72;TR=3;func=intronic;gene=FH	GT:GL:GQ:NR	0/0:-115.58,-120.99,-206.17:25:29	1/0:-208.1,-188.38,-347.52:83:62
-chr10	52420020	.	G	A	135	PASS	ABPV=1.00e+00;FPV=2.24e-01;FR=0.2502;HP=2;MMLQ=35;NF=3;NR=3;PP=135;RMP=58.04;RPV=7.75e-01;SC=GAGAACTTCCGGCTGCAGTAC;TC=30;TCF=20;TCR=10;TR=6	GT:GL:GQ:NR	0/0:-65.01,-71.52,-138.01:30:16	0/1:-83.86,-44.38,-74.93:100:14
-chr10	118380701	.	G	A	77	PASS	ABPV=1.00e+00;FPV=5.15e-01;FR=0.2503;HP=3;MMLQ=32;NF=5;NR=0;PP=77;RMP=22.32;RPV=5.62e-01;SC=CCGGGTTGCGGGGCGTCTGTT;TC=24;TCF=22;TCR=2;TR=5	GT:GL:GQ:NR	0/0:-4.14,-10.38,-77.71:28:10	0/1:-51.41,-25.11,-83.53:100:14
-chr11	1651169	.	T	C	84	PASS	ABPV=1.00e+00;FPV=9.98e-01;FR=0.2502;HP=2;MMLQ=33;NF=8;NR=26;PP=84;RMP=71.99;RPV=1.00e-00;SC=GCTGTGGCTCTGGCTGTGGGG;TC=71;TCF=14;TCR=57;TR=34;func=exonic;gene=KRTAP5-5;exon_func=synonymous SNV;AAchange=NM_001001480:c.T99C:p.S33S;1000g=0.29;dbsnp=rs71454095	GT:GL:GQ:NR	0/0:-199.38,-206.33,-365.55:31:38	0/1:-226.68,-198.86,-282.14:100:33
-chr11	3431576	.	G	A	33	PASS	ABPV=4.46e-01;FPV=4.99e-05;FR=0.2500;HP=1;MMLQ=30;NF=13;NR=10;PP=33;RMP=62.67;RPV=1.90e-02;SC=TCGTGTGTGAGTCCTACAGTG;TC=194;TCF=123;TCR=71;TR=23	GT:GL:GQ:NR	0/0:-71.93,-106.62,-693.75:100:102	1/0:-110.6,-94.58,-543.82:67:92
-chr11	43918703	.	C	CTTTTCATATTAT	36	PASS	ABPV=4.61e-02;FPV=1.12e-04;FR=0.2500;HP=3;NF=2;NR=0;PP=36;RMP=5.0;RPV=1.00e+00;SC=CTGACAGTGGCTTTATATATA;TC=49;TCF=49;TCR=0;TR=2	GT:GL:GQ:NR	0/0:-14.5,-34.6,-394.96:89:42	1/0:-47.66,-15.24,-223.69:100:36
-chr11	48366812	.	A	C	48	PASS	ABPV=1.00e+00;FPV=9.80e-01;FR=0.2502;HP=1;MMLQ=35;NF=16;NR=2;PP=48;RMP=45.69;RPV=1.00e+00;SC=AGATAATTGAATGTCCCAAGT;TC=44;TCF=42;TCR=2;TR=18	GT:GL:GQ:NR	0/0:-92.79,-99.69,-183.18:31:18	0/1:-133.87,-114.4,-228.26:82:26
-chr11	48387506	.	A	G	48	PASS	ABPV=1.00e+00;FPV=6.15e-01;FR=0.2500;HP=3;MMLQ=34;NF=28;NR=52;PP=48;RMP=59.69;RPV=1.00e-00;SC=AAATCCCCCGACCCATGCCAT;TC=227;TCF=109;TCR=118;TR=80;func=intergenic;gene=OR4C45(dist=13507) OR4A47(dist=122839);dbsnp=rs72898882;sift=0.42	GT:GL:GQ:NR	0/0:-665.75,-691.04,-1124.95:100:117	0/1:-697.01,-677.56,-1037.3:82:110
-chr11	56143357	.	G	A	91	PASS	ABPV=1.00e+00;FPV=9.70e-04;FR=0.2500;HP=3;MMLQ=36;NF=7;NR=60;PP=91;RMP=66.63;RPV=1.00e-00;SC=GGAATTTCTTGTACAAACAAA;TC=221;TCF=72;TCR=149;TR=67;func=exonic;gene=OR8U1 OR8U8;exon_func=synonymous SNV;AAchange=NM_001005204:c.G258A:p.L86L;dbsnp=rs76949582	GT:GL:GQ:NR	0/0:-538.52,-560.54,-1080.28:97:104	1/0:-924.01,-894.57,-1497.61:100:131
-chr11	56468493	.	A	G	86	PASS	ABPV=1.00e+00;FPV=1.31e-03;FR=0.2500;HP=1;MMLQ=30;NF=23;NR=16;PP=86;RMP=49.16;RPV=3.74e-01;SC=TCTGCCCCGCAGTGCTCATCC;TC=227;TCF=156;TCR=71;TR=39	GT:GL:GQ:NR	0/0:-212.22,-234.78,-819.52:99:105	0/1:-472.13,-443.86,-1063.46:100:122
-chr11	92592540	.	T	G	22	PASS	ABPV=9.72e-03;FPV=5.62e-02;FR=0.2501;HP=3;MMLQ=35;NF=0;NR=3;PP=22;RMP=99.66;RPV=8.62e-06;SC=GTTAGTGTTTTGGCTCTTGGA;TC=77;TCF=10;TCR=67;TR=3	GT:GL:GQ:NR	0/0:-302.47,-309.64,-322.1:32:36	0/1:-338.7,-325.07,-335.6:52:41
-chr11	123504959	.	C	G	200	PASS	ABPV=1.00e+00;FPV=4.20e-01;FR=0.2508;HP=2;MMLQ=40;NF=0;NR=7;PP=200;RMP=63.62;RPV=9.72e-01;SC=CAGTGCCCAGCGTGGGAACAC;TC=19;TCF=3;TCR=16;TR=7;func=intronic;gene=SCN3B;1000g=0.72;dbsnp=rs1148110	GT:GL:GQ:NR	0/0:-1.61,-6.93,-61.43:24:8	1/0:-66.0,-7.62,-36.11:100:11
-chr12	92675	.	C	T	152	PASS	ABPV=1.00e+00;FPV=7.38e-01;FR=0.2500;HP=1;MMLQ=37;NF=1;NR=7;PP=152;RMP=66.0;RPV=3.57e-01;SC=GGACTGTTTCCTGCTTGTAGC;TC=38;TCF=4;TCR=34;TR=8	GT:GL:GQ:NR	0/0:-41.61,-49.75,-120.62:37:14	1/0:-68.65,-25.34,-113.9:100:24
-chr12	11183642	.	A	G	154	PASS	ABPV=1.00e+00;FPV=8.37e-01;FR=0.2500;HP=1;MMLQ=34;NF=47;NR=62;PP=154;RMP=57.25;RPV=1.00e-00;SC=GCTAGTAGCAAGCCAGTTGCT;TC=311;TCF=168;TCR=143;TR=109;func=exonic;gene=TAS2R31;exon_func=nonsynonymous SNV;AAchange=NM_176885:c.T293C:p.L98P;segdup=0.93;dbsnp=rs73049067	GT:GL:GQ:NR	0/0:-561.52,-579.71,-1246.3:80:152	0/1:-826.02,-782.04,-1401.37:100:159
-chr12	29908580	.	A	ATTGTT	200	PASS	ABPV=1.00e+00;FPV=9.78e-01;FR=0.2507;HP=3;NF=10;NR=0;PP=200;RMP=36.19;RPV=1.00e+00;SC=TTTGGAAACTATTAAGTAATT;TC=24;TCF=24;TCR=0;TR=10;func=intronic;gene=TMTC1;dbsnp=rs3830194	GT:GL:GQ:NR	0/0:0.0,-5.55,-96.69:25:9	1/0:-151.5,-15.23,-76.28:100:17
-chr12	31282765	.	A	T	21	PASS	ABPV=1.00e+00;FPV=8.68e-01;FR=0.2502;HP=2;MMLQ=35;NF=12;NR=5;PP=21;RMP=46.72;RPV=8.51e-01;SC=AATGAATACAAATTTTTTCAT;TC=53;TCF=38;TCR=15;TR=17	GT:GL:GQ:NR	0/0:-83.08,-89.72,-221.87:30:27	1/0:-63.64,-50.39,-170.59:55:26
-chr12	52843779	.	T	C	52	PASS	ABPV=1.00e+00;FPV=1.21e-05;FR=0.2500;HP=4;MMLQ=20;NF=8;NR=16;PP=52;RMP=64.54;RPV=6.52e-01;SC=TTTGAACCCCTGGCTTCATCT;TC=161;TCF=100;TCR=61;TR=24;func=intronic;gene=KRT6B;segdup=0.93;dbsnp=rs380379	GT:GL:GQ:NR	0/0:-109.82,-139.81,-567.08:100:82	0/1:-186.27,-165.75,-481.84:87:79
-chr12	65471467	.	A	G	200	PASS	ABPV=1.00e+00;FPV=6.42e-01;FR=0.2501;HP=2;MMLQ=36;NF=7;NR=0;PP=200;RMP=38.97;RPV=4.22e-01;SC=TGCATCTTAAATATTCTTATC;TC=30;TCF=27;TCR=3;TR=7;func=intronic;gene=WIF1;1000g=0.27;dbsnp=rs2289936	GT:GL:GQ:NR	0/0:0.0,-7.62,-98.02:34:12	1/0:-69.82,-23.48,-105.09:100:18
-chr12	99175091	.	AAC	A	86	PASS	ABPV=3.61e-01;FPV=7.09e-04;FR=0.2503;HP=1;NF=4;NR=0;PP=86;RMP=34.87;RPV=9.95e-03;SC=AAACAACAACAACACACACAC;TC=43;TCF=27;TCR=16;TR=4;func=intronic;gene=ANKS1B	GT:GL:GQ:NR	0/0:-4.37,-10.61,-100.0:28:17	0/1:-72.08,-41.09,-136.47:100:27
-chr12	104378526	.	G	GACACAGAAACT	200	PASS	ABPV=2.37e-01;FPV=8.53e-03;FR=0.2500;HP=1;NF=5;NR=0;PP=200;RMP=8.25;RPV=5.63e-02;SC=TGTGATTCTAGCTCTGCTATG;TC=59;TCF=49;TCR=10;TR=5	GT:GL:GQ:NR	0/0:0.0,-15.25,-297.25:67:32	1/0:-137.95,-64.82,-429.82:100:44
-chr13	25169091	.	A	G	41	PASS	ABPV=1.00e+00;FPV=1.23e-02;FR=0.2501;HP=3;MMLQ=35;NF=18;NR=1;PP=41;RMP=17.52;RPV=3.10e-02;SC=AATAACCAAAACAGTTTTTTA;TC=133;TCF=114;TCR=19;TR=19	GT:GL:GQ:NR	0/0:-140.13,-147.81,-405.22:35:57	0/1:-204.4,-186.51,-512.07:75:76
-chr13	37795039	.	G	T	20	PASS	ABPV=5.69e-01;FPV=5.25e-01;FR=0.2502;HP=1;MMLQ=40;NF=2;NR=0;PP=20;RMP=33.0;RPV=7.49e-02;SC=TCCTTGGCCTGAGCTTCTTTG;TC=19;TCF=10;TCR=9;TR=2	GT:GL:GQ:NR	0/0:0.0,-6.93,-89.94:31:11	1/0:-22.03,-9.0,-57.23:54:8
-chr13	100517209	.	G	A	21	PASS	ABPV=2.00e-01;FPV=2.14e-03;FR=0.2500;HP=2;MMLQ=35;NF=6;NR=7;PP=21;RMP=94.07;RPV=9.71e-04;SC=GTGTGTGTGTGTATATGTGTG;TC=134;TCF=62;TCR=72;TR=13	GT:GL:GQ:NR	0/0:-265.23,-279.13,-623.6:62:70	1/0:-308.0,-294.6,-524.58:56:64
-chr13	114540947	.	C	CTCTGCTCTT	45	PASS	ABPV=1.42e-01;FPV=3.34e-03;FR=0.2500;HP=2;NF=2;NR=0;PP=45;RMP=1.0;RPV=5.62e-01;SC=CCACAGGAACCCAGCCAGCAG;TC=37;TCF=35;TCR=2;TR=2	GT:GL:GQ:NR	0/0:0.0,-11.09,-214.96:49:19	1/0:-74.37,-43.34,-288.0:100:27
-chr14	19118192	.	A	G	200	PASS	ABPV=1.00e+00;FPV=1.32e-05;FR=0.2507;HP=2;MMLQ=32;NF=68;NR=76;PP=200;RMP=53.85;RPV=5.74e-02;SC=TGCTTGCCATATGTCATGGAT;TC=771;TCF=415;TCR=356;TR=144;func=intergenic;gene=NONE(dist=NONE) OR11H12(dist=259402);segdup=0.96;dbsnp=rs77434589	GT:GL:GQ:NR	0/0:-730.61,-736.03,-2441.78:25:349	1/0:-997.51,-891.65,-2847.93:100:422
-chr14	19500081	.	A	G	22	PASS	ABPV=1.00e+00;FPV=1.61e-01;FR=0.2505;HP=3;MMLQ=22;NF=3;NR=0;PP=22;RMP=47.77;RPV=1.00e+00;SC=GGTGCACACCACTGTGGACGT;TC=22;TCF=22;TCR=0;TR=3	GT:GL:GQ:NR	0/0:-15.46,-21.36,-64.18:27:10	0/1:-27.84,-14.25,-57.82:57:12
-chr14	20137380	.	C	T	33	PASS	ABPV=1.24e-02;FPV=1.12e-09;FR=0.2500;HP=1;MMLQ=31;NF=8;NR=17;PP=33;RMP=61.98;RPV=3.46e-06;SC=TCACTGCCCTCGCCGCATGCA;TC=303;TCF=142;TCR=161;TR=25	GT:GL:GQ:NR	0/0:-373.48,-389.86,-1035.03:72:144	0/1:-475.48,-459.41,-1121.57:68:159
-chr14	64496872	.	G	C	96	PASS	ABPV=1.00e+00;FPV=1.00e+00;FR=0.2503;HP=1;MMLQ=37;NF=0;NR=4;PP=96;RMP=55.12;RPV=5.17e-01;SC=AGAAATTCCAGTGGTATTCAG;TC=18;TCF=0;TCR=18;TR=4;func=intronic;gene=SYNE2;1000g=0.90;dbsnp=rs3866737	GT:GL:GQ:NR	0/0:0.0,-6.24,-83.73:28:9	0/1:-36.8,-6.24,-45.77:100:9
-chr14	106881425	.	A	G	71	PASS	ABPV=1.00e+00;FPV=1.15e-01;FR=0.2500;HP=1;MMLQ=32;NF=4;NR=10;PP=71;RMP=49.71;RPV=2.88e-01;SC=CCATCCACTCAAGCCCTTGTC;TC=78;TCF=29;TCR=49;TR=14	GT:GL:GQ:NR	0/0:-39.35,-48.57,-258.02:41:30	1/0:-231.62,-206.72,-399.17:100:48
-chr14	106881452	.	T	C	66	PASS	ABPV=1.00e+00;FPV=3.03e-01;FR=0.2509;HP=1;MMLQ=27;NF=3;NR=10;PP=66;RMP=65.33;RPV=1.89e-01;SC=CTGGTCACACTGAATTCATAC;TC=71;TCF=18;TCR=53;TR=13	GT:GL:GQ:NR	0/0:-57.13,-62.37,-258.3:24:30	0/1:-168.08,-144.38,-338.93:100:41
-chr14	107034967	.	T	C	105	PASS	ABPV=1.00e+00;FPV=6.54e-01;FR=0.2500;HP=1;MMLQ=34;NF=6;NR=9;PP=105;RMP=58.51;RPV=6.64e-01;SC=ACAGGAGATCTTCAGAGACTC;TC=57;TCF=23;TCR=34;TR=15	GT:GL:GQ:NR	0/0:-163.23,-172.19,-255.57:40:20	1/0:-379.46,-346.84,-445.34:100:39
-chr15	20083754	.	G	A	54	PASS	ABPV=1.00e+00;FPV=5.67e-01;FR=0.2500;HP=2;MMLQ=36;NF=33;NR=5;PP=54;RMP=47.07;RPV=4.22e-01;SC=AAATCATTATGTGCTTTGAGA;TC=155;TCF=131;TCR=24;TR=38	GT:GL:GQ:NR	0/0:-122.79,-137.29,-483.11:64:64	1/0:-176.25,-155.43,-655.46:88:91
-chr15	20446256	.	G	C	57	PASS	ABPV=1.00e+00;FPV=1.00e+00;FR=0.2500;HP=2;MMLQ=34;NF=1;NR=7;PP=57;RMP=71.88;RPV=4.32e-01;SC=CATGCAAGAAGCTGGAAAGCC;TC=33;TCF=1;TCR=32;TR=8;func=intergenic;gene=NONE(dist=NONE) LOC646096(dist=41741);segdup=0.97;dbsnp=rs3907011	GT:GL:GQ:NR	0/0:-13.82,-23.14,-131.81:42:16	0/1:-45.04,-23.56,-104.26:91:17
-chr15	20875055	.	C	G	154	PASS	ABPV=1.00e+00;FPV=7.50e-01;FR=0.2504;HP=3;MMLQ=37;NF=0;NR=12;PP=154;RMP=60.19;RPV=1.71e-01;SC=AATTTAAACGCAAATTAGTAA;TC=64;TCF=1;TCR=63;TR=12;func=ncRNA;gene=NBEAP1;segdup=0.93;1000g=0.26;dbsnp=rs7496378	GT:GL:GQ:NR	0/0:-9.2,-15.25,-188.16:27:22	0/1:-137.96,-94.13,-342.43:100:42
-chr15	20875100	.	A	G	21	PASS	ABPV=1.00e+00;FPV=7.50e-01;FR=0.2502;HP=4;MMLQ=35;NF=0;NR=6;PP=21;RMP=81.39;RPV=2.77e-01;SC=AGAGGTTAAAAATAACTTTCT;TC=33;TCF=1;TCR=32;TR=6;func=ncRNA;gene=NBEAP1;cons46=243 Name=lod=13;segdup=0.93;1000g=0.28;dbsnp=rs7497715	GT:GL:GQ:NR	0/0:-7.83,-14.75,-92.12:31:10	1/0:-92.65,-79.35,-211.07:56:23
-chr15	21140945	.	C	T	26	PASS	ABPV=1.00e+00;FPV=1.00e-01;FR=0.2506;HP=2;MMLQ=33;NF=1;NR=3;PP=26;RMP=65.04;RPV=7.12e-01;SC=ACATGTACAGCGCCACACTTC;TC=25;TCF=14;TCR=11;TR=4;func=intergenic;gene=NF1P2(dist=6320) LOC348120(dist=4822);cons46=679 Name=lod=765;segdup=1.00;1000g=0.24;dbsnp=rs12324229	GT:GL:GQ:NR	0/0:-16.95,-22.6,-60.18:26:13	0/1:-36.66,-22.19,-44.85:61:12
-chr15	28900400	.	G	T	133	PASS	ABPV=1.00e+00;FPV=6.31e-01;FR=0.2502;HP=3;MMLQ=34;NF=14;NR=0;PP=133;RMP=36.99;RPV=4.21e-01;SC=GCTTGTCATTGTAAATTTTCT;TC=57;TCF=54;TCR=3;TR=14	GT:GL:GQ:NR	0/0:-26.38,-32.94,-192.24:30:27	1/0:-71.34,-32.36,-180.89:100:30
-chr15	75656200	.	G	A	75	PASS	ABPV=1.00e+00;FPV=6.28e-01;FR=0.2507;HP=6;MMLQ=37;NF=4;NR=0;PP=75;RMP=47.43;RPV=1.00e+00;SC=CCAGCCCCCCGGCCCCGTTTT;TC=16;TCF=16;TCR=0;TR=4	GT:GL:GQ:NR	0/0:-7.14,-12.68,-76.44:25:8	0/1:-34.75,-8.99,-31.71:100:8
-chr15	76075732	.	A	C	29	PASS	ABPV=1.00e+00;FPV=9.97e-01;FR=0.2501;HP=2;MMLQ=34;NF=11;NR=15;PP=29;RMP=61.41;RPV=9.58e-01;SC=ATCCCTATCTATCCAGGCCTT;TC=64;TCF=22;TCR=42;TR=26	GT:GL:GQ:NR	0/0:-89.15,-96.33,-237.9:32:31	1/0:-134.14,-119.09,-238.26:63:33
-chr15	100340178	.	C	G	52	PASS	ABPV=1.00e+00;FPV=1.76e-01;FR=0.2500;HP=1;MMLQ=31;NF=5;NR=5;PP=52;RMP=87.78;RPV=1.32e-01;SC=AGTGTCTTCTCGTTCCCACGC;TC=64;TCF=31;TCR=33;TR=10;func=ncRNA;gene=DNM1P46;cons46=699 Name=lod=923;segdup=0.97;sift=0.27	GT:GL:GQ:NR	0/0:-139.12,-149.96,-310.47:37:36	1/0:-206.67,-186.19,-317.68:87:38
-chr15	102303399	.	C	T	65	PASS	ABPV=1.00e+00;FPV=4.32e-02;FR=0.2500;HP=2;MMLQ=34;NF=5;NR=30;PP=65;RMP=65.58;RPV=1.00e-00;SC=AGAGCTGCTGCCCAACCTGCA;TC=90;TCF=40;TCR=50;TR=35;func=intergenic;gene=TARSL2(dist=38754) OR4F6(dist=42524);cons46=920 Name=lod=7327;segdup=0.98;1000g=0.50;dbsnp=rs71416239	GT:GL:GQ:NR	0/0:-129.26,-138.34,-250.21:41:46	0/1:-118.78,-95.27,-224.48:100:44
-chr15	102506389	.	C	T	50	PASS	ABPV=6.29e-01;FPV=1.27e-01;FR=0.2500;HP=1;MMLQ=34;NF=1;NR=3;PP=50;RMP=67.19;RPV=2.63e-01;SC=GGATGCCCTGCAGTACCTGCA;TC=32;TCF=13;TCR=19;TR=4	GT:GL:GQ:NR	0/0:-3.9,-15.65,-133.88:52:17	0/1:-31.25,-11.29,-72.06:84:15
-chr16	9250260	.	T	G	22	PASS	ABPV=1.00e+00;FPV=1.00e-02;FR=0.2500;HP=2;MMLQ=29;NF=0;NR=4;PP=22;RMP=37.36;RPV=8.85e-01;SC=CACCTATTATTCCATGAATTC;TC=27;TCF=16;TCR=11;TR=4;func=intergenic;gene=C16orf72(dist=36705) MIR548X(dist=78514);cons46=749 Name=lod=1471;1000g=0.73;dbsnp=rs12929693	GT:GL:GQ:NR	0/0:-1.84,-10.83,-100.69:40:14	0/1:-25.85,-12.37,-70.66:56:13
-chr16	21747662	.	G	A	36	PASS	ABPV=1.00e+00;FPV=2.01e-01;FR=0.2500;HP=1;MMLQ=34;NF=16;NR=6;PP=36;RMP=40.34;RPV=5.40e-05;SC=CTGTCTTTCAGTCTGTTCGGA;TC=159;TCF=79;TCR=80;TR=22	GT:GL:GQ:NR	0/0:-69.29,-88.69,-470.14:85:75	1/0:-171.53,-154.82,-534.35:70:84
-chr16	28618446	.	T	C	36	PASS	ABPV=1.00e+00;FPV=8.61e-01;FR=0.2500;HP=3;MMLQ=32;NF=6;NR=14;PP=36;RMP=63.74;RPV=5.40e-01;SC=ACACAGCCTGTCCCAGGCCAG;TC=75;TCF=18;TCR=57;TR=20	GT:GL:GQ:NR	0/0:-33.24,-41.67,-205.86:38:27	0/1:-113.92,-97.17,-312.83:70:48
-chr16	33390329	.	G	C	24	PASS	ABPV=6.16e-01;FPV=4.32e-02;FR=0.2500;HP=2;MMLQ=34;NF=5;NR=0;PP=24;RMP=54.47;RPV=1.00e+00;SC=TTAGAAACAGGTTCACAATTG;TC=40;TCF=40;TCR=0;TR=5;func=intergenic;gene=LOC390705(dist=91627) LINC00273(dist=570723);segdup=0.97;1000g=0.32;dbsnp=rs12232434	GT:GL:GQ:NR	0/0:-6.09,-14.55,-170.95:38:21	0/1:-47.14,-33.16,-147.34:58:19
-chr16	33401967	.	G	A	116	PASS	ABPV=1.00e+00;FPV=1.64e-02;FR=0.2500;HP=2;MMLQ=34;NF=16;NR=15;PP=116;RMP=51.2;RPV=2.96e-01;SC=GAGGTCTGCCGACAGCTGCAC;TC=172;TCF=102;TCR=70;TR=31;func=intergenic;gene=LOC390705(dist=103265) LINC00273(dist=559085);cons46=611 Name=lod=406;segdup=0.97;dbsnp=rs8047578	GT:GL:GQ:NR	0/0:-133.55,-144.14,-490.22:47:76	1/0:-209.17,-173.99,-648.51:100:96
-chr16	33407954	.	C	G	34	PASS	ABPV=1.00e+00;FPV=4.21e-01;FR=0.2507;HP=3;MMLQ=34;NF=0;NR=3;PP=34;RMP=61.08;RPV=5.19e-01;SC=GAAATTGTCTCGGGCCTGAAG;TC=17;TCF=3;TCR=14;TR=3	GT:GL:GQ:NR	0/0:-10.82,-16.36,-77.44:25:9	1/0:-63.55,-47.37,-59.15:58:8
-chr16	46405120	.	C	G	37	PASS	ABPV=3.94e-02;FPV=4.07e-03;FR=0.2510;HP=2;MMLQ=40;NF=2;NR=1;PP=37;RMP=51.27;RPV=3.18e-03;SC=CGATTCCATTCGATAATGATT;TC=62;TCF=34;TCR=28;TR=3	GT:GL:GQ:NR	0/0:-129.24,-134.38,-161.33:24:28	0/1:-205.7,-188.69,-196.8:42:34
-chr16	58148083	.	C	CACACGCAGGTACA	31	PASS	ABPV=1.69e-01;FPV=1.00e+00;FR=0.2500;HP=2;NF=0;NR=2;PP=31;RMP=88.0;RPV=3.34e-03;SC=CAGGGAAGCACCCACCCTTGT;TC=35;TCF=0;TCR=35;TR=2	GT:GL:GQ:NR	0/0:-11.28,-21.68,-223.8:46:16	0/1:-62.86,-30.44,-243.59:100:20
-chr17	5036281	.	G	C	48	PASS	ABPV=1.00e+00;FPV=8.00e-01;FR=0.2500;HP=1;MMLQ=32;NF=14;NR=49;PP=48;RMP=47.67;RPV=9.22e-01;SC=AAGCACAGTAGCAAAGTAATG;TC=214;TCF=48;TCR=166;TR=63	GT:GL:GQ:NR	0/0:-506.02,-514.23,-1090.2:37:117	0/1:-460.03,-440.62,-871.14:82:97
-chr17	6328747	.	T	G	200	PASS	ABPV=1.00e+00;FPV=8.77e-01;FR=0.2507;HP=4;MMLQ=32;NF=8;NR=5;PP=200;RMP=59.22;RPV=9.45e-01;SC=GGCCACTTGCTCCCTGCCTGG;TC=36;TCF=24;TCR=12;TR=13	GT:GL:GQ:NR	0/0:-4.84,-10.37,-69.24:25:8	0/1:-116.1,-23.7,-86.84:100:28
-chr17	14140191	.	G	A	125	PASS	ABPV=1.00e+00;FPV=3.98e-02;FR=0.2500;HP=1;MMLQ=34;NF=2;NR=11;PP=125;RMP=71.76;RPV=3.84e-02;SC=AGCTGTTTACGGCGCTGACTC;TC=95;TCF=24;TCR=71;TR=13;func=upstream;gene=CDRT15;segdup=0.99;1000g=0.17;dbsnp=rs28533558	GT:GL:GQ:NR	0/0:-146.51,-156.3,-338.05:44:40	0/1:-162.79,-125.58,-384.62:100:55
-chr17	21904955	.	G	A	29	PASS	ABPV=1.46e-01;FPV=3.00e-01;FR=0.2500;HP=2;MMLQ=33;NF=1;NR=7;PP=29;RMP=77.08;RPV=5.90e-05;SC=GTGGCACGGCGCTGTATCCTG;TC=95;TCF=9;TCR=86;TR=8	GT:GL:GQ:NR	0/0:-95.23,-110.26,-302.39:67:42	0/1:-104.15,-88.94,-334.7:64:53
-chr17_gl000205_random	114392	.	G	GC	200	PASS	ABPV=1.00e+00;FPV=1.00e+00;FR=0.2503;HP=1;NF=1;NR=9;PP=200;RMP=62.13;RPV=8.86e-01;SC=GAGCTTCTATGAGGCGTGGGG;TC=28;TCF=1;TCR=27;TR=10;func=intergenic;gene=NONE(dist=NONE) MGC70870(dist=2231)	GT:GL:GQ:NR	0/0:0.0,-6.24,-93.01:28:9	0/1:-137.06,-63.68,-124.76:100:19
-chr17_gl000205_random	118186	.	TCGC	T	157	PASS	ABPV=1.00e+00;FPV=4.85e-02;FR=0.2506;HP=1;NF=4;NR=5;PP=157;RMP=51.77;RPV=1.51e-01;SC=CCATCATAAGTCGCATCCCGG;TC=55;TCF=23;TCR=32;TR=9;func=ncRNA;gene=MGC70870;cons46=824 Name=lod=2972;segdup=0.90	GT:GL:GQ:NR	0/0:-80.93,-86.51,-246.22:26:23	0/1:-151.92,-104.34,-309.99:100:34
-chr17_gl000205_random	118289	.	G	A	30	PASS	ABPV=1.00e+00;FPV=2.43e-02;FR=0.2500;HP=1;MMLQ=38;NF=1;NR=4;PP=30;RMP=51.3;RPV=5.18e-01;SC=TGAGCTCAGTGGTGCTACCTA;TC=38;TCF=20;TCR=18;TR=5	GT:GL:GQ:NR	0/0:-92.27,-100.53,-170.2:37:15	0/1:-193.59,-178.31,-262.43:64:23
-chr17_gl000205_random	122791	.	T	C	124	PASS	ABPV=1.00e+00;FPV=6.72e-01;FR=0.2504;HP=1;MMLQ=34;NF=8;NR=0;PP=124;RMP=54.5;RPV=1.00e+00;SC=GATATAAACTTCTAAAATTCA;TC=30;TCF=30;TCR=0;TR=8;func=intergenic;gene=MGC70870(dist=3059) NONE(dist=NONE)	GT:GL:GQ:NR	0/0:-33.82,-39.98,-100.64:28:10	1/0:-177.82,-140.79,-190.46:100:20
-chr18	14183747	.	T	C	115	PASS	ABPV=1.00e+00;FPV=9.72e-01;FR=0.2500;HP=5;MMLQ=36;NF=49;NR=88;PP=115;RMP=54.47;RPV=9.86e-01;SC=ACAAAGAAAATAGAACGCCTT;TC=444;TCF=156;TCR=288;TR=137	GT:GL:GQ:NR	0/0:-919.95,-948.86,-1765.89:100:211	0/1:-1189.4,-1154.37,-1918.79:100:233
-chr19	3611146	.	A	G	30	PASS	ABPV=1.00e+00;FPV=5.15e-01;FR=0.2501;HP=1;MMLQ=24;NF=6;NR=1;PP=30;RMP=42.3;RPV=2.44e-01;SC=CCCTGTGCTCAGAGGTGGGGG;TC=36;TCF=26;TCR=10;TR=7;func=ncRNA;gene=C19orf29-AS1;1000g=0.56;dbsnp=rs2074786	GT:GL:GQ:NR	0/0:-27.63,-35.13,-121.04:34:15	0/1:-69.97,-54.53,-137.67:65:21
-chr19	12543121	.	C	G	200	PASS	ABPV=1.00e+00;FPV=7.14e-01;FR=0.2502;HP=7;MMLQ=40;NF=11;NR=0;PP=200;RMP=33.87;RPV=7.50e-01;SC=TTCTTTGCTTCTTTTTAAATT;TC=41;TCF=40;TCR=1;TR=11;func=intronic;gene=ZNF443;segdup=0.96;dbsnp=rs74181652	GT:GL:GQ:NR	0/0:-8.47,-15.46,-153.74:32:20	0/1:-71.21,-15.46,-97.4:100:21
-chr19	15014189	.	T	C	90	PASS	ABPV=1.00e+00;FPV=1.97e-01;FR=0.2500;HP=4;MMLQ=100;NF=2;NR=5;PP=90;RMP=90.56;RPV=4.68e-01;SC=GAGTGAGTTGTGGGTTGCAGC;TC=39;TCF=16;TCR=23;TR=7	GT:GL:GQ:NR	0/0:-190.71,-200.49,-255.11:44:24	1/0:-174.95,-145.84,-178.61:100:15
-chr19	41515263	.	A	G	88	PASS	ABPV=3.76e-01;FPV=1.82e-01;FR=0.2500;HP=2;MMLQ=33;NF=7;NR=3;PP=88;RMP=64.16;RPV=2.48e-04;SC=AGCGCCCCCAAGGACCTCATC;TC=93;TCF=40;TCR=53;TR=10;func=exonic;gene=CYP2B6;exon_func=nonsynonymous SNV;AAchange=NM_000767:c.A785G:p.K262R;segdup=0.92;1000g=0.20;dbsnp=rs2279343;pp2=0.0;phylop=0.086093;mutT=1.0E-6;LRT=0.999974	GT:GL:GQ:NR	0/0:-4.81,-28.32,-273.38:100:41	0/1:-65.82,-37.11,-263.4:100:52
-chr19	42188037	.	C	T	114	PASS	ABPV=1.00e+00;FPV=6.06e-02;FR=0.2500;HP=4;MMLQ=34;NF=2;NR=8;PP=114;RMP=98.9;RPV=1.54e-02;SC=GTGTGGCCCCCTTGGTTCCCC;TC=73;TCF=11;TCR=62;TR=10	GT:GL:GQ:NR	0/0:-205.49,-214.25,-251.15:29:29	0/1:-379.34,-343.91,-357.8:15:44
-chr19	50474708	.	T	G	61	PASS	ABPV=1.00e+00;FPV=7.17e-01;FR=0.2501;HP=2;MMLQ=30;NF=5;NR=1;PP=61;RMP=67.96;RPV=3.09e-02;SC=CTGGGCTCAGTGTCCCAGAGC;TC=37;TCF=18;TCR=19;TR=6	GT:GL:GQ:NR	0/0:-86.34,-93.74,-137.77:33:15	0/1:-129.81,-107.4,-147.05:95:22
-chr19	52977823	.	A	G	102	PASS	ABPV=1.00e+00;FPV=3.15e-01;FR=0.2507;HP=2;MMLQ=35;NF=0;NR=4;PP=102;RMP=41.58;RPV=8.84e-01;SC=GTTTCTCTCCAGTATGAATTC;TC=15;TCF=4;TCR=11;TR=4;func=intronic;gene=ZNF578;cons46=395 Name=lod=54;1000g=0.94;dbsnp=rs1673901	GT:GL:GQ:NR	0/0:0.0,-5.54,-65.87:25:9	1/0:-36.12,-4.16,-18.86:71:6
-chr19	54726711	.	G	T	43	PASS	ABPV=1.00e+00;FPV=1.00e-00;FR=0.2504;HP=3;MMLQ=31;NF=22;NR=2;PP=43;RMP=52.84;RPV=6.78e-01;SC=GTCCCCGCCCGGGTGCCTCCT;TC=53;TCF=45;TCR=8;TR=24	GT:GL:GQ:NR	0/0:-47.88,-54.03,-95.64:28:18	1/0:-164.89,-146.64,-206.88:77:35
-chr2	905553	.	G	C	76	PASS	ABPV=1.62e-02;FPV=5.75e-08;FR=0.2500;HP=2;MMLQ=31;NF=1;NR=7;PP=76;RMP=95.73;RPV=1.04e-02;SC=GCCTGCACTGGGTCTGGTGTT;TC=128;TCF=69;TCR=59;TR=8	GT:GL:GQ:NR	0/0:-314.19,-325.21,-450.94:49:57	0/1:-390.34,-364.48,-513.78:100:71
-chr2	905595	.	G	C	24	PASS	ABPV=1.21e-01;FPV=1.79e-02;FR=0.2500;HP=2;MMLQ=35;NF=5;NR=1;PP=24;RMP=13.0;RPV=6.96e-04;SC=GCCTGCACTGGGTCTGGTGTT;TC=79;TCF=45;TCR=34;TR=6	GT:GL:GQ:NR	0/0:-210.22,-219.58,-290.19:42:42	1/0:-197.49,-183.47,-250.46:59:38
-chr2	91885842	.	G	A	37	PASS	ABPV=1.00e+00;FPV=2.46e-01;FR=0.2502;HP=1;MMLQ=36;NF=4;NR=0;PP=37;RMP=71.85;RPV=4.22e-01;SC=CCAACATTACGGAATTTGGAT;TC=27;TCF=24;TCR=3;TR=4	GT:GL:GQ:NR	0/0:-11.45,-18.39,-83.47:31:11	0/1:-59.01,-41.99,-86.53:72:16
-chr2	96525556	.	C	T	37	PASS	ABPV=1.00e+00;FPV=1.00e-00;FR=0.2503;HP=1;MMLQ=37;NF=60;NR=2;PP=37;RMP=45.25;RPV=9.49e-01;SC=TCTCCTTATACGTCTTTAATA;TC=91;TCF=87;TCR=4;TR=62	GT:GL:GQ:NR	0/0:-304.4,-310.82,-406.42:29:43	0/1:-411.62,-394.62,-459.09:72:48
-chr2	107042620	.	C	T	45	PASS	ABPV=1.00e+00;FPV=7.50e-01;FR=0.2500;HP=4;MMLQ=33;NF=0;NR=10;PP=45;RMP=77.64;RPV=2.94e-02;SC=GCAAGAGCTACAAATACAAAA;TC=69;TCF=1;TCR=68;TR=10;func=intronic;gene=RGPD3;cons46=333 Name=lod=30;segdup=0.99;dbsnp=rs2433787	GT:GL:GQ:NR	0/0:-9.17,-23.45,-154.19:63:21	1/0:-107.84,-88.96,-294.09:80:48
-chr2	132860931	.	G	A	113	PASS	ABPV=1.00e+00;FPV=5.61e-01;FR=0.2507;HP=1;MMLQ=38;NF=0;NR=8;PP=113;RMP=69.43;RPV=9.58e-01;SC=GAAGAATGTGGTAAAGCCTTT;TC=22;TCF=2;TCR=20;TR=8	GT:GL:GQ:NR	0/0:-12.66,-18.1,-56.72:25:9	1/0:-57.64,-23.24,-50.67:100:13
-chr2	133020074	.	G	A	33	PASS	ABPV=1.00e+00;FPV=9.94e-01;FR=0.2501;HP=2;MMLQ=36;NF=45;NR=12;PP=33;RMP=47.59;RPV=9.08e-01;SC=ATTTCAGAAGGGAAAATATCC;TC=167;TCF=131;TCR=36;TR=57;func=intergenic;gene=ANKRD30BL(dist=4532) GPR39(dist=154073);cons46=762 Name=lod=1662;segdup=0.91;dbsnp=rs111959326	GT:GL:GQ:NR	0/0:-698.84,-706.52,-798.38:35:80	1/0:-786.87,-770.7,-903.5:68:87
-chr2	133020186	.	T	C	66	PASS	ABPV=1.00e+00;FPV=1.55e-01;FR=0.2500;HP=1;MMLQ=34;NF=52;NR=51;PP=66;RMP=46.69;RPV=9.65e-01;SC=TAGCTTTGTGTTCATACCACT;TC=402;TCF=237;TCR=165;TR=103;func=intergenic;gene=ANKRD30BL(dist=4644) GPR39(dist=153961);cons46=762 Name=lod=1662;segdup=0.91;dbsnp=rs112259198	GT:GL:GQ:NR	0/0:-1712.52,-1737.48,-1975.72:100:192	1/0:-1974.59,-1950.96,-2276.74:100:211
-chr2	133020542	.	G	A	50	PASS	ABPV=1.00e+00;FPV=1.14e-01;FR=0.2503;HP=1;MMLQ=32;NF=3;NR=6;PP=50;RMP=53.94;RPV=7.08e-02;SC=CTATCCAAGTGGATCCAAATT;TC=66;TCF=24;TCR=42;TR=9;func=intergenic;gene=ANKRD30BL(dist=5000) GPR39(dist=153605);cons46=762 Name=lod=1662;segdup=0.93;dbsnp=rs2257591	GT:GL:GQ:NR	0/0:-181.04,-187.42,-271.44:29:29	1/0:-243.98,-224.07,-313.1:84:37
-chr2	166801924	.	C	G	78	PASS	ABPV=1.00e+00;FPV=5.71e-01;FR=0.2507;HP=3;MMLQ=34;NF=4;NR=0;PP=78;RMP=67.75;RPV=7.49e-01;SC=TATTTACAAACTGGCAATAGA;TC=18;TCF=17;TCR=1;TR=4;func=ncRNA;gene=LOC100506134;1000g=0.64;dbsnp=rs6432853	GT:GL:GQ:NR	0/0:-34.05,-39.57,-91.24:25:8	1/0:-42.79,-16.34,-58.89:100:10
-chr2	204055943	.	T	C	59	PASS	ABPV=2.58e-01;FPV=8.29e-02;FR=0.2500;HP=2;MMLQ=33;NF=11;NR=2;PP=59;RMP=61.13;RPV=3.22e-06;SC=ATGGCCGCCATCCTCATGACA;TC=128;TCF=65;TCR=63;TR=13;func=intronic;gene=NBEAL1;cons46=702 Name=lod=950;dbsnp=rs4561645	GT:GL:GQ:NR	0/0:-41.52,-53.03,-440.53:51:70	1/0:-89.56,-67.55,-350.54:93:58
-chr2	210594540	.	A	G	200	PASS	ABPV=1.00e+00;FPV=9.70e-01;FR=0.2507;HP=1;MMLQ=30;NF=10;NR=1;PP=200;RMP=52.61;RPV=9.37e-01;SC=CGAATGCAAGATATAGTTAAA;TC=27;TCF=25;TCR=2;TR=11;func=intronic;gene=MAP2;1000g=0.88;dbsnp=rs4673486	GT:GL:GQ:NR	0/0:0.0,-5.54,-62.54:25:8	0/1:-93.19,-14.77,-63.29:100:19
-chr2	211444533	.	GGT	G	32	PASS	ABPV=1.78e-01;FPV=1.96e-01;FR=0.2503;HP=2;NF=1;NR=3;PP=32;RMP=50.82;RPV=2.40e-03;SC=TGTTTCTTCGGGTGTGTGTGT;TC=54;TCF=11;TCR=43;TR=4	GT:GL:GQ:NR	0/0:-4.14,-10.38,-103.02:28:17	1/0:-41.6,-23.06,-172.26:78:37
-chr2	227659818	.	T	TCAAGTGAGGA	93	PASS	ABPV=3.68e-02;FPV=2.37e-01;FR=0.2500;HP=1;NF=0;NR=3;PP=93;RMP=91.0;RPV=7.64e-05;SC=CTCTCACCGCTGCCCAGGGGT;TC=63;TCF=5;TCR=58;TR=3	GT:GL:GQ:NR	0/0:-17.96,-35.28,-330.9:77:30	0/1:-94.07,-50.73,-458.79:100:41
-chr2	227954599	.	G	A	200	PASS	ABPV=1.00e+00;FPV=9.19e-01;FR=0.2507;HP=2;MMLQ=31;NF=6;NR=4;PP=200;RMP=46.35;RPV=9.51e-01;SC=TCTCCTTTTGGGCCTCTTCCT;TC=25;TCF=16;TCR=9;TR=10;func=exonic;gene=COL4A4;exon_func=nonsynonymous SNV;AAchange=NM_000092:c.C1444T:p.P482S;1000g=0.55;dbsnp=rs2229814;sift=0.44;pp2=0.0;phylop=0.897442;mutT=9.0E-5;LRT=0.824593	GT:GL:GQ:NR	0/0:0.0,-5.54,-68.56:25:9	0/1:-80.77,-11.53,-34.97:100:16
-chr2	233273018	.	G	A	32	PASS	ABPV=1.00e+00;FPV=3.62e-01;FR=0.2500;HP=3;MMLQ=34;NF=13;NR=4;PP=32;RMP=56.47;RPV=8.89e-03;SC=TTCCCATGGGGACCCCAGACC;TC=102;TCF=59;TCR=43;TR=17	GT:GL:GQ:NR	0/0:-50.24,-59.48,-309.03:41:45	0/1:-159.89,-144.07,-409.74:66:57
-chr20	29633938	.	A	G	28	PASS	ABPV=1.00e+00;FPV=1.27e-01;FR=0.2500;HP=2;MMLQ=34;NF=16;NR=24;PP=28;RMP=56.91;RPV=2.94e-01;SC=AAATGACTGGAATTTTTGTTT;TC=192;TCF=84;TCR=108;TR=40;func=ncRNA;gene=FRG1B;cons46=514 Name=lod=163;segdup=0.96;dbsnp=rs4006818	GT:GL:GQ:NR	0/0:-963.63,-978.07,-1139.59:64:101	1/0:-1046.34,-1031.41,-1112.07:63:91
-chr20	33356511	.	C	T	44	PASS	ABPV=1.00e+00;FPV=7.49e-01;FR=0.2507;HP=1;MMLQ=37;NF=0;NR=4;PP=44;RMP=57.46;RPV=6.28e-01;SC=AGTTTACCACCAGAAAAATGG;TC=17;TCF=1;TCR=16;TR=4;func=intronic;gene=NCOA6;cons46=243 Name=lod=13;1000g=0.36;dbsnp=rs2295353	GT:GL:GQ:NR	0/0:0.0,-5.54,-70.65:25:8	0/1:-49.75,-31.07,-63.51:79:9
-chr21	14424170	.	C	G	200	PASS	ABPV=1.00e+00;FPV=7.37e-05;FR=0.2502;HP=1;MMLQ=31;NF=51;NR=68;PP=200;RMP=55.06;RPV=7.01e-02;SC=GGAAAGAACACCTGACACGGC;TC=637;TCF=318;TCR=319;TR=119	GT:GL:GQ:NR	0/0:-1068.97,-1075.78,-2090.04:31:272	1/0:-1608.82,-1559.51,-2814.14:100:365
-chr22	16256578	.	G	T	200	PASS	ABPV=2.18e-01;FPV=6.87e-08;FR=0.2502;HP=4;MMLQ=34;NF=19;NR=8;PP=200;RMP=40.16;RPV=2.46e-02;SC=TGGCTCTGATGTTTCATTATG;TC=253;TCF=194;TCR=59;TR=27	GT:GL:GQ:NR	0/0:-139.12,-145.98,-745.94:31:118	0/1:-324.53,-220.54,-788.14:100:135
-chr22	24640438	.	TCA	T	58	PASS	ABPV=5.57e-01;FPV=3.19e-02;FR=0.2503;HP=2;NF=2;NR=1;PP=58;RMP=48.68;RPV=9.37e-01;SC=ATACATTCACTCACACACACA;TC=27;TCF=25;TCR=2;TR=3	GT:GL:GQ:NR	0/0:-4.37,-10.61,-107.94:28:12	0/1:-47.48,-22.82,-120.6:100:15
-chr22	42524924	.	A	G	32	PASS	ABPV=1.00e+00;FPV=1.78e-02;FR=0.2500;HP=2;MMLQ=35;NF=0;NR=4;PP=32;RMP=71.83;RPV=5.74e-01;SC=TGTCCAAGAGACCGTTGGGGC;TC=31;TCF=14;TCR=17;TR=4	GT:GL:GQ:NR	0/0:-1.84,-12.87,-112.28:49:17	1/0:-35.2,-19.47,-73.62:66:14
-chr3	6522043	.	G	A	62	PASS	ABPV=1.00e+00;FPV=5.16e-01;FR=0.2507;HP=3;MMLQ=37;NF=4;NR=0;PP=62;RMP=44.82;RPV=7.49e-01;SC=TAACTGCAAAGTAGGAACACG;TC=19;TCF=18;TCR=1;TR=4	GT:GL:GQ:NR	0/0:0.0,-5.54,-65.36:25:9	1/0:-46.21,-23.49,-68.33:96:10
-chr3	135742089	.	GAAAATA	G	56	PASS	ABPV=2.53e-02;FPV=5.62e-01;FR=0.2500;HP=4;NF=0;NR=2;PP=56;RMP=97.0;RPV=4.10e-05;SC=GTTTTGTTTTGAAAATATTTT;TC=55;TCF=2;TCR=53;TR=2	GT:GL:GQ:NR	0/0:-171.19,-180.69,-401.53:43:27	1/0:-163.7,-138.73,-368.83:100:28
-chr3	195453014	.	G	A	73	PASS	ABPV=1.00e+00;FPV=9.99e-01;FR=0.2500;HP=3;MMLQ=31;NF=44;NR=44;PP=73;RMP=52.04;RPV=1.00e-00;SC=GACAGCACCCGGGGCCACGAC;TC=210;TCF=115;TCR=95;TR=88	GT:GL:GQ:NR	0/0:-596.82,-608.68,-929.74:53:99	0/1:-825.59,-800.41,-1040.36:100:111
-chr3	195453412	.	C	T	21	PASS	ABPV=1.00e+00;FPV=1.25e-02;FR=0.2502;HP=2;MMLQ=25;NF=13;NR=52;PP=21;RMP=62.2;RPV=1.00e-00;SC=CCACGACTGCCCGGACGAGGC;TC=219;TCF=89;TCR=130;TR=65	GT:GL:GQ:NR	0/0:-275.62,-282.43,-681.47:31:103	0/1:-362.65,-349.41,-719.87:55:117
-chr3	195506775	.	G	A	87	PASS	ABPV=1.00e+00;FPV=8.81e-01;FR=0.2500;HP=1;MMLQ=34;NF=11;NR=4;PP=87;RMP=30.23;RPV=4.10e-02;SC=AGGAAGTGTCGGTGACAGGAA;TC=69;TCF=34;TCR=35;TR=15;func=exonic;gene=MUC4;exon_func=synonymous SNV;AAchange=NM_018406:c.C11676T:p.H3892H;cons46=381 Name=lod=47;segdup=0.92;1000g=0.48;dbsnp=rs79609066	GT:GL:GQ:NR	0/0:-215.78,-225.62,-329.97:44:31	0/1:-253.55,-225.09,-324.19:100:38
-chr3	195507372	.	C	A	72	PASS	ABPV=1.00e+00;FPV=9.50e-01;FR=0.2510;HP=1;MMLQ=31;NF=12;NR=10;PP=72;RMP=82.02;RPV=4.71e-01;SC=GAGGGGTGGCCTGACCTGTGG;TC=76;TCF=33;TCR=43;TR=22	GT:GL:GQ:NR	0/0:-85.59,-90.71,-175.03:23:27	0/1:-302.0,-277.02,-435.24:100:49
-chr3	195509974	.	A	G	107	PASS	ABPV=1.00e+00;FPV=4.52e-02;FR=0.2501;HP=1;MMLQ=33;NF=7;NR=15;PP=107;RMP=66.83;RPV=1.62e-01;SC=ATGACCTGTGAACACTGAGGA;TC=127;TCF=50;TCR=77;TR=22	GT:GL:GQ:NR	0/0:-281.04,-289.1,-469.31:36:51	0/1:-474.46,-441.44,-679.46:100:76
-chr4	3589510	.	G	A	82	PASS	ABPV=1.00e+00;FPV=1.00e-00;FR=0.2500;HP=1;MMLQ=35;NF=28;NR=15;PP=82;RMP=39.79;RPV=1.00e-00;SC=ACTTCCAGATGAGACTTCCTG;TC=89;TCF=62;TCR=27;TR=43;func=ncRNA;gene=FLJ35424	GT:GL:GQ:NR	0/0:-202.17,-216.0,-372.38:61:36	0/1:-618.94,-591.66,-690.1:100:53
-chr4	5747131	.	C	A	40	PASS	ABPV=1.00e+00;FPV=6.32e-01;FR=0.2502;HP=2;MMLQ=33;NF=1;NR=19;PP=40;RMP=63.27;RPV=9.99e-01;SC=AAATTGGCTACATTAGAGAGA;TC=45;TCF=5;TCR=40;TR=20	GT:GL:GQ:NR	0/0:-175.23,-182.17,-227.63:31:19	1/0:-264.71,-246.95,-301.81:75:26
-chr4	70261725	.	G	A	25	PASS	ABPV=1.00e+00;FPV=8.43e-01;FR=0.2503;HP=3;MMLQ=36;NF=1;NR=5;PP=25;RMP=77.58;RPV=8.09e-01;SC=TGTGGCCCTGGGGTAGTTACT;TC=19;TCF=3;TCR=16;TR=6	GT:GL:GQ:NR	0/0:-25.09,-31.31,-100.1:28:11	1/0:-62.48,-48.33,-68.8:59:8
-chr5	837488	.	C	A	84	PASS	ABPV=3.03e-01;FPV=2.26e-02;FR=0.2502;HP=2;MMLQ=35;NF=22;NR=3;PP=84;RMP=67.65;RPV=4.45e-09;SC=ACCTGGAGAACTCCTTTGTCC;TC=225;TCF=128;TCR=97;TR=25	GT:GL:GQ:NR	0/0:-71.02,-77.56,-596.34:30:92	0/1:-157.13,-129.33,-794.35:100:133
-chr5	34192944	.	A	G	136	PASS	ABPV=3.53e-01;FPV=1.29e-04;FR=0.2500;HP=1;MMLQ=31;NF=17;NR=13;PP=136;RMP=51.73;RPV=7.15e-05;SC=GCAGTGGATGAAGGCCCCTCA;TC=261;TCF=140;TCR=121;TR=30	GT:GL:GQ:NR	0/0:-120.41,-138.2,-806.35:79:120	0/1:-199.6,-159.91,-913.41:100:141
-chr5	36200413	.	G	A	33	PASS	ABPV=1.25e-02;FPV=1.03e-02;FR=0.2511;HP=3;MMLQ=34;NF=2;NR=4;PP=33;RMP=98.68;RPV=2.69e-06;SC=GAAAATGTATGTTATAAATAT;TC=109;TCF=30;TCR=79;TR=6	GT:GL:GQ:NR	0/0:-295.77,-300.82,-490.03:23:53	1/0:-290.08,-274.08,-469.93:67:56
-chr5	41909830	.	C	T	27	PASS	ABPV=5.28e-01;FPV=2.35e-03;FR=0.2504;HP=18;MMLQ=0;NF=0;NR=3;PP=27;RMP=14.14;RPV=9.29e-01;SC=AGATATCTTTCTTTTTTTTTT;TC=28;TCF=21;TCR=7;TR=3	GT:GL:GQ:NR	0/0:-4.61,-10.58,-40.73:26:11	0/1:-41.44,-26.72,-53.62:62:17
-chr5	54329850	.	C	CTGCTTTACTTA	68	PASS	ABPV=5.01e-01;FPV=1.00e+00;FR=0.2503;HP=1;NF=0;NR=2;PP=68;RMP=90.0;RPV=7.41e-02;SC=CATATGGGGTCCATTTTTGCA;TC=21;TCF=0;TCR=21;TR=2	GT:GL:GQ:NR	0/0:0.0,-6.24,-122.94:28:9	1/0:-45.59,-6.93,-110.5:100:12
-chr5	58121059	.	G	A	112	PASS	ABPV=1.00e+00;FPV=4.22e-01;FR=0.2501;HP=2;MMLQ=35;NF=0;NR=5;PP=112;RMP=75.51;RPV=4.68e-01;SC=TACAGAGTCCGAGCTAATTGT;TC=26;TCF=3;TCR=23;TR=5	GT:GL:GQ:NR	0/0:-31.77,-39.38,-124.25:34:12	0/1:-43.94,-9.7,-79.61:100:15
-chr5	169535734	.	C	A	20	PASS	ABPV=1.00e+00;FPV=1.00e+00;FR=0.2507;HP=1;MMLQ=34;NF=0;NR=2;PP=20;RMP=68.72;RPV=3.31e-01;SC=CAGGAGCCTCCGAGGAATCCA;TC=13;TCF=0;TCR=13;TR=2;func=UTR3;gene=FOXI1;1000g=0.35;dbsnp=rs6873124	GT:GL:GQ:NR	0/0:-5.3,-10.84,-76.27:25:8	1/0:-15.88,-2.77,-16.56:54:5
-chr5	175467765	.	A	C	34	PASS	ABPV=1.00e+00;FPV=6.86e-01;FR=0.2503;HP=3;MMLQ=37;NF=4;NR=7;PP=34;RMP=58.23;RPV=9.60e-01;SC=AGGAAAGCAGATTTGTACATC;TC=32;TCF=15;TCR=17;TR=11	GT:GL:GQ:NR	0/0:-48.25,-54.62,-116.89:29:16	0/1:-64.43,-48.26,-102.15:68:18
-chr5	180047739	.	CGT	C	40	PASS	ABPV=3.01e-01;FPV=4.20e-02;FR=0.2503;HP=3;NF=0;NR=2;PP=40;RMP=66.37;RPV=1.63e-01;SC=AAGGGGCCGGCGTGTGTGTGT;TC=28;TCF=11;TCR=17;TR=2	GT:GL:GQ:NR	0/0:-15.43,-21.66,-115.16:28:17	0/1:-35.79,-15.44,-86.67:86:11
-chr6	26370657	.	A	G	26	PASS	ABPV=1.00e+00;FPV=9.98e-01;FR=0.2500;HP=1;MMLQ=34;NF=25;NR=18;PP=26;RMP=46.67;RPV=9.65e-01;SC=ACAGTGGAGCAACGCCAAGGG;TC=112;TCF=61;TCR=51;TR=43	GT:GL:GQ:NR	0/0:-408.78,-416.97,-671.27:37:70	1/0:-270.25,-255.76,-422.39:61:42
-chr6	26370659	.	C	T	32	PASS	ABPV=1.00e+00;FPV=9.98e-01;FR=0.2500;HP=2;MMLQ=34;NF=25;NR=17;PP=32;RMP=48.69;RPV=9.08e-01;SC=AGTGGAGCAACGCCAAGGGAG;TC=114;TCF=61;TCR=53;TR=42	GT:GL:GQ:NR	0/0:-408.78,-419.23,-664.68:47:70	1/0:-278.07,-262.18,-440.62:67:44
-chr6	35838820	.	A	ATTCTTACTTGG	44	PASS	ABPV=1.42e-01;FPV=7.50e-01;FR=0.2500;HP=1;NF=0;NR=2;PP=44;RMP=90.0;RPV=2.64e-03;SC=CTCTACCAGAATGAAAAGTCT;TC=37;TCF=1;TCR=36;TR=2	GT:GL:GQ:NR	0/0:-22.8,-33.89,-243.84:49:19	1/0:-50.19,-17.08,-221.97:100:21
-chr6	58777098	.	A	T	42	PASS	ABPV=1.00e+00;FPV=2.57e-03;FR=0.2500;HP=2;MMLQ=34;NF=14;NR=25;PP=42;RMP=50.5;RPV=1.85e-01;SC=GTAACTCTAGATTGAAGAATT;TC=224;TCF=105;TCR=119;TR=39;func=intergenic;gene=GUSBP4(dist=489374) NONE(dist=NONE);dbsnp=rs4330557	GT:GL:GQ:NR	0/0:-1161.42,-1180.18,-1411.53:83:106	0/1:-1283.78,-1265.72,-1460.11:76:119
-chr6	116774635	.	C	G	38	PASS	ABPV=1.00e+00;FPV=3.66e-01;FR=0.2504;HP=1;MMLQ=36;NF=4;NR=12;PP=38;RMP=76.7;RPV=4.76e-01;SC=CTTTTTCCACCACAAATTCTT;TC=72;TCF=21;TCR=51;TR=16	GT:GL:GQ:NR	0/0:-45.72,-51.81,-228.46:28:30	0/1:-179.58,-162.43,-353.98:72:42
-chr6	136599000	.	T	TCATCTGTGA	73	PASS	ABPV=2.21e-05;FPV=2.55e-09;FR=0.2505;HP=4;NF=2;NR=0;PP=73;RMP=1.41;RPV=3.11e-04;SC=TTTTAGTTTTTACCTTTTTAA;TC=118;TCF=90;TCR=28;TR=2;func=intronic;gene=BCLAF1;cons46=573 Name=lod=284;segdup=0.97	GT:GL:GQ:NR	0/0:-44.16,-49.89,-603.4:26:61	1/0:-105.25,-67.59,-750.95:100:79
-chr6	155757781	.	T	A	106	PASS	ABPV=1.00e+00;FPV=3.16e-01;FR=0.2504;HP=2;MMLQ=36;NF=0;NR=5;PP=106;RMP=66.42;RPV=6.16e-01;SC=TACAGTGAGCTCTGAAATATC;TC=24;TCF=4;TCR=20;TR=5;func=intronic;gene=NOX3;1000g=0.22;dbsnp=rs231961	GT:GL:GQ:NR	0/0:0.0,-6.09,-69.03:28:9	0/1:-48.54,-15.69,-84.63:100:15
-chr7	65159983	.	A	G	128	PASS	ABPV=1.00e+00;FPV=5.13e-01;FR=0.2500;HP=2;MMLQ=33;NF=9;NR=0;PP=128;RMP=42.05;RPV=1.33e-01;SC=TTGCTTAGTTACCAGGTAGAA;TC=45;TCF=38;TCR=7;TR=9;func=ncRNA;gene=INTS4L2 LOC441242;cons46=439 Name=lod=81;segdup=0.99;1000g=0.26;dbsnp=rs2949280	GT:GL:GQ:NR	0/0:0.0,-9.67,-99.87:43:16	0/1:-63.32,-25.43,-98.84:100:29
-chr7	100552044	.	T	G	46	PASS	ABPV=1.00e+00;FPV=1.00e-00;FR=0.2500;HP=1;MMLQ=33;NF=133;NR=185;PP=46;RMP=54.24;RPV=1.00e-00;SC=CTGTTCCTTCTTCACCATACA;TC=776;TCF=387;TCR=389;TR=318	GT:GL:GQ:NR	0/0:-2768.08,-2799.9,-3980.82:100:373	0/1:-3148.55,-3129.5,-4372.1:80:403
-chr7	102319079	.	G	A	34	PASS	ABPV=4.40e-01;FPV=1.00e+00;FR=0.2500;HP=1;MMLQ=38;NF=0;NR=6;PP=34;RMP=53.53;RPV=6.65e-03;SC=TGTGAGATGCGTGTGAAAATG;TC=56;TCF=0;TCR=56;TR=6;func=intergenic;gene=POLR2J2(dist=6903) FAM185A(dist=70320);segdup=1.00;1000g=0.17;dbsnp=rs62458736	GT:GL:GQ:NR	0/0:-9.39,-20.95,-166.2:51:26	0/1:-46.26,-30.07,-176.58:68:30
-chr7	106272259	.	C	T	200	PASS	ABPV=1.00e+00;FPV=1.51e-04;FR=0.2501;HP=2;MMLQ=31;NF=27;NR=25;PP=200;RMP=18.87;RPV=1.08e-05;SC=CTCATTCCAACCTCTGCTTCC;TC=391;TCF=192;TCR=199;TR=52	GT:GL:GQ:NR	0/0:-1599.11,-1606.25,-1841.06:32:195	0/1:-1703.84,-1621.18,-1787.33:100:196
-chr7	128492558	.	G	A	32	PASS	ABPV=1.00e+00;FPV=9.80e-01;FR=0.2501;HP=6;MMLQ=35;NF=15;NR=1;PP=32;RMP=45.11;RPV=5.34e-01;SC=TGAGTCCAGGGGGGGCTGCTC;TC=45;TCF=39;TCR=6;TR=16	GT:GL:GQ:NR	0/0:-82.82,-89.89,-214.44:32:24	0/1:-137.27,-121.35,-194.99:67:21
-chr7	142223942	.	A	G	200	PASS	ABPV=1.00e+00;FPV=1.00e-00;FR=0.2500;HP=1;MMLQ=33;NF=86;NR=42;PP=200;RMP=48.5;RPV=9.93e-01;SC=ACTGTGAATCATCTACTACAC;TC=282;TCF=160;TCR=122;TR=128	GT:GL:GQ:NR	0/0:-840.21,-856.54,-1228.56:72:124	1/0:-1069.18,-1023.08,-1489.98:100:158
-chr7	142498735	.	A	C	51	PASS	ABPV=1.00e+00;FPV=9.39e-01;FR=0.2500;HP=4;MMLQ=34;NF=23;NR=20;PP=51;RMP=54.1;RPV=9.74e-01;SC=AGGACCTGAAAAACGTGTTCC;TC=127;TCF=71;TCR=56;TR=43;func=intergenic;gene=TRY6(dist=16336) EPHB6(dist=54057);sift=0.35	GT:GL:GQ:NR	0/0:-407.53,-415.97,-666.18:38:67	0/1:-407.94,-387.73,-626.55:86:62
-chr7	143295456	.	A	C	200	PASS	ABPV=1.00e+00;FPV=7.75e-01;FR=0.2500;HP=1;MMLQ=26;NF=24;NR=7;PP=200;RMP=70.65;RPV=6.11e-02;SC=GCCTCCTCGCAGTGGGGGGCA;TC=135;TCF=87;TCR=48;TR=31	GT:GL:GQ:NR	0/0:-28.78,-39.63,-253.37:48:66	0/1:-158.76,-57.73,-187.94:100:69
-chr7	143453710	.	T	A	66	PASS	ABPV=1.00e+00;FPV=5.62e-01;FR=0.2501;HP=3;MMLQ=36;NF=0;NR=15;PP=66;RMP=54.55;RPV=5.68e-01;SC=TCTTCCTTTGTTTTGTCCACT;TC=62;TCF=2;TCR=60;TR=15	GT:GL:GQ:NR	0/0:-65.41,-73.41,-216.2:36:31	0/1:-102.8,-79.18,-187.97:100:31
-chr7	143956461	.	T	C	37	PASS	ABPV=1.00e+00;FPV=8.34e-02;FR=0.2500;HP=2;MMLQ=31;NF=5;NR=0;PP=37;RMP=48.38;RPV=1.00e+00;SC=TGGGCTTGGCTGGATGCAGGA;TC=36;TCF=36;TCR=0;TR=5	GT:GL:GQ:NR	0/0:-6.63,-15.42,-125.53:39:20	1/0:-33.93,-16.96,-77.4:71:16
-chr7	157367205	.	TGA	T	52	PASS	ABPV=3.26e-01;FPV=5.62e-01;FR=0.2503;HP=2;NF=0;NR=2;PP=52;RMP=55.44;RPV=3.19e-02;SC=AGAGTAATAATGAGAGAGAGA;TC=27;TCF=2;TCR=25;TR=2;func=intronic;gene=PTPRN2	GT:GL:GQ:NR	0/0:-10.36,-16.59,-113.87:28:16	1/0:-39.42,-16.12,-59.64:99:12
-chr8	8095880	.	C	T	131	PASS	ABPV=1.00e+00;FPV=2.37e-01;FR=0.2500;HP=3;MMLQ=37;NF=0;NR=10;PP=131;RMP=64.63;RPV=8.71e-01;SC=GCCACATGGCCCCAGGCCCAA;TC=36;TCF=5;TCR=31;TR=10;func=ncRNA;gene=FLJ10661;segdup=0.98	GT:GL:GQ:NR	0/0:-78.8,-87.2,-171.27:38:18	0/1:-81.81,-43.3,-81.08:100:18
-chr8	12236123	.	T	G	111	PASS	ABPV=1.00e+00;FPV=1.38e-39;FR=0.2500;HP=2;MMLQ=30;NF=16;NR=9;PP=111;RMP=18.14;RPV=9.45e-01;SC=GTATTTGTGTTTGTGTGTGTG;TC=103;TCF=79;TCR=24;TR=25	GT:GL:GQ:NR	0/0:-265.16,-270.76,-457.35:100:49	1/0:-317.4,-305.02,-585.97:25:76
-chr8	12428634	.	C	T	69	PASS	ABPV=1.00e+00;FPV=7.50e-01;FR=0.2500;HP=1;MMLQ=36;NF=0;NR=5;PP=69;RMP=63.98;RPV=2.03e-01;SC=TCTTAACAACCGCCATGGTGC;TC=31;TCF=1;TCR=30;TR=5	GT:GL:GQ:NR	0/0:-10.77,-21.63,-134.62:48:17	1/0:-41.03,-16.59,-80.89:100:14
-chr8	35608374	.	T	C	24	PASS	ABPV=1.00e+00;FPV=6.32e-01;FR=0.2502;HP=2;MMLQ=34;NF=1;NR=34;PP=24;RMP=69.53;RPV=1.00e-00;SC=TGAAAGTGTGTGTTTTCCAAA;TC=62;TCF=5;TCR=57;TR=35	GT:GL:GQ:NR	0/0:-248.65,-255.21,-376.27:30:35	1/0:-265.91,-251.92,-307.04:58:27
-chr8	121500323	.	A	AGTGGGATTGC	40	PASS	ABPV=2.19e-01;FPV=8.43e-03;FR=0.2500;HP=2;NF=2;NR=0;PP=40;RMP=1.0;RPV=7.50e-01;SC=ATTATATCCTATGGATCAAAT;TC=32;TCF=31;TCR=1;TR=2	GT:GL:GQ:NR	0/0:-2.07,-11.08,-162.96:40:13	1/0:-47.66,-16.63,-264.67:100:25
-chr9	14510	.	CTGT	C	200	PASS	ABPV=2.20e-01;FPV=4.66e-14;FR=0.2500;HP=1;NF=12;NR=0;PP=200;RMP=43.31;RPV=1.00e-02;SC=TAAAAGCACACTGTTGGTTTC;TC=123;TCF=107;TCR=16;TR=12	GT:GL:GQ:NR	0/0:-22.04,-38.67,-350.71:73:53	0/1:-133.83,-67.48,-425.73:100:75
-chr9	34724786	.	G	A	54	PASS	ABPV=1.00e+00;FPV=5.46e-01;FR=0.2503;HP=2;MMLQ=31;NF=10;NR=18;PP=54;RMP=64.11;RPV=9.71e-01;SC=GGATTTCCACGGGACTAGGCT;TC=91;TCF=41;TCR=50;TR=28	GT:GL:GQ:NR	0/0:-77.92,-84.2,-224.15:29:46	1/0:-101.32,-80.48,-207.58:88:45
-chr9	44118498	.	G	C	200	PASS	ABPV=1.00e+00;FPV=9.49e-01;FR=0.2503;HP=2;MMLQ=34;NF=2;NR=7;PP=200;RMP=65.44;RPV=6.41e-01;SC=GAGGGCAGCTGCCTGTCACCT;TC=31;TCF=4;TCR=27;TR=9;func=intergenic;gene=CNTNAP3B(dist=196025) FAM27C(dist=871738);segdup=0.98;1000g=0.77;dbsnp=rs28610048	GT:GL:GQ:NR	0/0:-11.97,-18.32,-91.33:29:13	0/1:-73.63,-27.61,-81.59:100:18
-chr9	67281836	.	T	G	200	PASS	ABPV=1.00e+00;FPV=3.12e-01;FR=0.2500;HP=2;MMLQ=34;NF=6;NR=21;PP=200;RMP=63.02;RPV=5.58e-01;SC=GTGGACCTGATACAGTGGCCC;TC=115;TCF=31;TCR=84;TR=27;func=ncRNA;gene=AQP7P1;segdup=0.99;1000g=0.26;dbsnp=rs75812522	GT:GL:GQ:NR	0/0:-227.43,-240.42,-365.47:58:50	0/1:-353.09,-303.78,-464.7:100:65
-chr9	67293649	.	T	G	200	PASS	ABPV=1.00e+00;FPV=2.40e-02;FR=0.2509;HP=2;MMLQ=32;NF=8;NR=20;PP=200;RMP=65.85;RPV=6.29e-01;SC=GTGTGCCAAGTGACTTCATCT;TC=136;TCF=59;TCR=77;TR=28	GT:GL:GQ:NR	0/0:-52.46,-57.7,-399.51:24:62	0/1:-141.44,-82.05,-400.07:100:74
-chr9	68358140	.	T	C	101	PASS	ABPV=1.00e+00;FPV=4.09e-01;FR=0.2501;HP=2;MMLQ=31;NF=10;NR=13;PP=101;RMP=52.55;RPV=9.14e-01;SC=CCGCTTCAGATAGTGAAGAAG;TC=84;TCF=45;TCR=39;TR=23;func=intergenic;gene=ANKRD20A3(dist=387847) LOC642236(dist=69643);cons46=780 Name=lod=1967;segdup=0.98;dbsnp=rs62544188	GT:GL:GQ:NR	0/0:-99.49,-107.4,-306.63:36:46	0/1:-122.69,-91.06,-221.21:100:38
-chr9	92995102	.	C	T	25	PASS	ABPV=1.74e-02;FPV=2.34e-06;FR=0.2500;HP=3;MMLQ=33;NF=11;NR=10;PP=25;RMP=36.17;RPV=2.75e-07;SC=ATAAAATTGTCCCCTCCATTC;TC=258;TCF=127;TCR=131;TR=21;func=intergenic;gene=LOC286370(dist=191321) LOC340515(dist=229612);segdup=0.96	GT:GL:GQ:NR	0/0:-127.8,-170.89,-839.43:100:127	1/0:-164.37,-150.07,-829.28:60:131
-chr9	139572068	.	C	G	44	PASS	ABPV=1.00e+00;FPV=4.21e-01;FR=0.2507;HP=2;MMLQ=29;NF=0;NR=3;PP=44;RMP=57.58;RPV=7.11e-01;SC=GGCTGGGGCGCGAAGGCCTGG;TC=14;TCF=3;TCR=11;TR=3;func=intronic;gene=AGPAT2;1000g=0.57;dbsnp=rs2236514	GT:GL:GQ:NR	0/0:0.0,-5.54,-62.14:25:9	1/0:-29.67,-11.06,-23.48:61:5
-chr9	140777194	.	A	AGAGCGGCT	200	PASS	ABPV=7.76e-05;FPV=4.77e-24;FR=0.2500;HP=2;NF=2;NR=1;PP=200;RMP=4.36;RPV=2.92e-05;SC=CGCTTCTCCTAGGACGACACG;TC=123;TCF=77;TCR=46;TR=3;func=splicing;gene=CACNA1B(NM_000718:c.390-2->CATGTCCGAGCGGCT NM_001243812:c.390-2->CATGTCCGAGCGGCT);cons46=573 Name=lod=285	GT:GL:GQ:NR	0/0:-260.4,-275.23,-819.04:71:85	0/1:-510.15,-408.95,-886.86:3:93
-chrUn_gl000214	53458	.	T	A	82	PASS	ABPV=4.34e-01;FPV=7.36e-06;FR=0.2500;HP=4;MMLQ=34;NF=22;NR=0;PP=82;RMP=47.4;RPV=5.62e-01;SC=AAACACTATATAAATATAATT;TC=187;TCF=185;TCR=2;TR=22;func=intergenic;gene=NONE(dist=NONE) NONE(dist=NONE);segdup=0.98	GT:GL:GQ:NR	0/0:-154.3,-180.61,-694.01:100:88	1/0:-304.62,-277.18,-752.95:100:99
-chrUn_gl000214	61035	.	A	G	25	PASS	ABPV=2.68e-01;FPV=1.27e-06;FR=0.2500;HP=2;MMLQ=34;NF=20;NR=0;PP=25;RMP=60.63;RPV=4.22e-01;SC=ATGTTTACCTATATAACAAAC;TC=187;TCF=184;TCR=3;TR=20	GT:GL:GQ:NR	0/0:-517.15,-538.58,-910.78:94:80	0/1:-812.82,-798.54,-1242.08:60:107
-chrUn_gl000214	74804	.	T	C	45	PASS	ABPV=5.69e-01;FPV=4.33e-02;FR=0.2500;HP=2;MMLQ=35;NF=5;NR=0;PP=45;RMP=36.66;RPV=5.62e-01;SC=ATCACTTGAATGCAGTAGGCA;TC=42;TCF=40;TCR=2;TR=5	GT:GL:GQ:NR	0/0:-65.35,-75.06,-177.61:43:16	0/1:-180.67,-161.94,-279.38:79:26
-chrUn_gl000220	121703	.	T	C	75	PASS	ABPV=9.31e-02;FPV=1.94e-05;FR=0.2500;HP=2;MMLQ=31;NF=5;NR=8;PP=75;RMP=52.13;RPV=2.81e-03;SC=GTGGGCACGGTACGCTCTGGT;TC=150;TCF=78;TCR=72;TR=13	GT:GL:GQ:NR	0/0:-64.92,-78.18,-505.13:59:80	1/0:-102.59,-76.78,-453.86:100:70
-chrUn_gl000220	128026	.	C	T	73	PASS	ABPV=1.00e+00;FPV=1.39e-05;FR=0.2500;HP=1;MMLQ=37;NF=12;NR=5;PP=73;RMP=48.23;RPV=2.65e-03;SC=TCTCTGTCTCCGTCTCTGTCT;TC=117;TCF=62;TCR=55;TR=17	GT:GL:GQ:NR	0/0:-175.58,-193.94,-521.81:81:62	1/0:-151.61,-126.36,-397.61:100:57
-chrUn_gl000220	132074	.	G	A	200	PASS	ABPV=1.00e+00;FPV=2.39e-03;FR=0.2500;HP=2;MMLQ=34;NF=10;NR=11;PP=200;RMP=61.51;RPV=6.72e-03;SC=CTCTCTGTCCGTCTCTGTCTT;TC=167;TCF=84;TCR=83;TR=21;func=intergenic;gene=LOC100507412(dist=5378) RN5-8S1(dist=23923);segdup=0.95	GT:GL:GQ:NR	0/0:-248.2,-257.69,-615.12:42:77	0/1:-290.71,-234.79,-658.31:100:90
-chrUn_gl000220	145002	.	C	T	28	PASS	ABPV=3.17e-02;FPV=7.56e-08;FR=0.2500;HP=4;MMLQ=31;NF=1;NR=3;PP=28;RMP=65.86;RPV=4.70e-03;SC=ACTAGCCGGGCGCGGTGGCAC;TC=76;TCF=36;TCR=40;TR=4	GT:GL:GQ:NR	0/0:-17.73,-43.17,-320.69:100:46	1/0:-67.96,-52.99,-236.43:63:37
-chrUn_gl000220	145368	.	T	C	30	PASS	ABPV=1.09e-01;FPV=1.31e-02;FR=0.2500;HP=1;MMLQ=29;NF=8;NR=2;PP=30;RMP=72.81;RPV=1.92e-05;SC=AGCCGGGCGCTGTGCTGTGCT;TC=119;TCF=63;TCR=56;TR=10;func=intergenic;gene=LOC100507412(dist=18672) RN5-8S1(dist=10629);dbsnp=rs3878955	GT:GL:GQ:NR	0/0:-48.56,-59.69,-409.13:50:53	0/1:-66.74,-51.46,-448.03:64:66
-chrUn_gl000225	30398	.	C	T	29	PASS	ABPV=1.13e-01;FPV=3.15e-04;FR=0.2502;HP=1;MMLQ=33;NF=1;NR=5;PP=29;RMP=58.12;RPV=2.55e-02;SC=CCTGCTCCTCCGAGCCTTTGA;TC=80;TCF=37;TCR=43;TR=6	GT:GL:GQ:NR	0/0:-195.73,-202.53,-342.72:31:35	1/0:-230.45,-215.31,-371.74:63:45
-chrUn_gl000225	43193	.	C	T	46	PASS	ABPV=1.00e+00;FPV=7.84e-02;FR=0.2507;HP=3;MMLQ=31;NF=8;NR=12;PP=46;RMP=44.42;RPV=4.19e-02;SC=GCCAGAGAGACGGGCCTCCCG;TC=126;TCF=51;TCR=75;TR=20	GT:GL:GQ:NR	0/0:-577.5,-583.01,-743.98:25:63	1/0:-604.31,-585.16,-703.98:81:63
-chrX	106390898	.	G	A	65	PASS	ABPV=4.78e-01;FPV=1.49e-02;FR=0.2500;HP=1;MMLQ=39;NF=5;NR=0;PP=65;RMP=43.16;RPV=1.00e+00;SC=GTTTGGTCATGGAGCATACAA;TC=46;TCF=46;TCR=0;TR=5	GT:GL:GQ:NR	0/0:0.0,-11.78,-148.84:52:17	1/0:-49.23,-25.85,-211.17:99:29
diff --git a/tests/vcf-examples/15.vcf b/tests/vcf-examples/15.vcf
deleted file mode 100644
index 9df9a1e..0000000
--- a/tests/vcf-examples/15.vcf
+++ /dev/null
@@ -1,317 +0,0 @@
-##fileformat=VCFv4.0
-##FILTER=<ID=HardyWeinbergViolation,Description="The validation is in Hardy-Weinberg violation">
-##FILTER=<ID=HighNoCallRate,Description="The validation no-call rate is too high">
-##FILTER=<ID=TooManyHomVars,Description="The validation homozygous variant rate is too high">
-##INFO=<ID=AC,Number=1,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
-##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
-##INFO=<ID=HW,Number=1,Type=Float,Description="Phred-scaled Hardy-Weinberg violation p-value">
-##INFO=<ID=HetPct,Number=1,Type=Float,Description="Percent of heterozygous genotypes">
-##INFO=<ID=HomRefPct,Number=1,Type=Float,Description="Percent of homozygous reference genotypes">
-##INFO=<ID=HomVarPct,Number=1,Type=Float,Description="Percent homozygous variant genotypes">
-##INFO=<ID=NoCallPct,Number=1,Type=Float,Description="Percent of no-calls">
-##ValidationMetrics_HardyWeinbergViolations="25 (8%)"
-##ValidationMetrics_HomVarViolations="0 (0%)"
-##ValidationMetrics_NoCallViolations="13 (4%)"
-##ValidationMetrics_PolymorphicPassingRecords="195 (75%)"
-##ValidationMetrics_RecordsPassingFilters="258 (87%)"
-##ValidationMetrics_RecordsProcessed=296
-##ValidationMetrics_SamplesAssayed=383
-##VariantValidationAssessor="analysis_type=VariantValidationAssessor input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=null excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[rawData/plink.renamed.sorted.fixed.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction=null downsample_to_coverage=null baq=OFF baqGap [...]
-##source=PLINK
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	HG00127	HG00128	HG00136	HG00137	HG00138	HG00139	HG00152	HG00156	HG00234	HG00235	HG00237	HG00242	HG00244	HG00262	HG01055	HG01079	NA19138	NA18974	NA18523	NA12717	NA19209	NA18577	NA18973	NA18943	NA12873	NA18623	NA18622	NA18948	NA19171	NA19204	NA06994	NA18563	NA18547	NA18861	NA18608	NA18995	NA10851	NA18976	NA18603	NA19200	HG01204	HG01191	HG01101	HG00146	HG00306	NA18985	HG00160	HG00635	HG00372	HG00357	HG00634	NA18541	NA18950	NA19759	HG00351	HG0025 [...]
-20	439104	.	AG	A	.	HighNoCallRate	AC=0;AN=158;HW=0.00;HetPct=0.0;HomRefPct=20.6;HomVarPct=0.0;NoCallPct=79.4	GT	.	0/0	.	.	.	.	0/0	.	0/0	.	0/0	0/0	.	.	.	.	.	.	.	.	.	.	.	.	0/0	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	0/0	.	.	.	.	.	.	.	.	.	.	.	.	.	.	0/0	0/0	0/0	0/0	.	0/0	0/0	.	0/0	.	0/0	0/0	.	.	.	.	.	.	.	.	.	.	.	.	0/0	0/0	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	0/0	0/0	.	.	0/0	.	.	0/0	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	 [...]
-20	669442	.	TG	T	.	PASS	AC=54;AN=766;HW=6.74;HetPct=12.0;HomRefPct=86.9;HomVarPct=1.0;NoCallPct=0.0	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	1/1	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0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	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1 [...]
diff --git a/tests/vcf-examples/16.vcf b/tests/vcf-examples/16.vcf
deleted file mode 100644
index eaa067e..0000000
--- a/tests/vcf-examples/16.vcf
+++ /dev/null
@@ -1,369 +0,0 @@
-##fileformat=VCFv4.0
-##ApplyRecalibration="analysis_type=ApplyRecalibration input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/combined.phase1.chr20.raw.indels.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample [...]
-##CombineVariants="analysis_type=CombineVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20:41000001-42000000] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/chr20/AFR/AFR.phase1.chr20.42.raw.indels.vcf, /humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/chr20/ASN/ASN.phase1.chr20.42. [...]
-##FILTER=<ID=BothStrands,Description="Variant not seen on both strands">
-##FILTER=<ID=HARD_TO_VALIDATE,Description="MQ0 >= 4 && (MQ0 / (1.0 * DP)) > 0.1">
-##FILTER=<ID=HP10,Description="Variant occurs in long homopolymer run (>10)">
-##FILTER=<ID=HaplotypeScore,Description="HaplotypeScore>20.0">
-##FILTER=<ID=HighCoverage,Description="Coverage at variant site is > 7500">
-##FILTER=<ID=HomopolymerRun,Description="HRun>=15">
-##FILTER=<ID=LongRepeat,Description="Variant occurs in long tandem repeat (as defined by 1kg phase one filters)">
-##FILTER=<ID=LowQual,Description="QUAL<30.0">
-##FILTER=<ID=PP20,Description="Variant posterior phred is < 20">
-##FILTER=<ID=QualByDepth,Description="QD<1.0">
-##FILTER=<ID=StrandBias,Description="SB>=-1.0">
-##FILTER=<ID=TruthSensitivityTranche93.00to94.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.9628 <= x < 4.1824">
-##FILTER=<ID=TruthSensitivityTranche94.00to95.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.7129 <= x < 3.9628">
-##FILTER=<ID=TruthSensitivityTranche95.00to96.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.3717 <= x < 3.7129">
-##FILTER=<ID=TruthSensitivityTranche96.00to97.00,Description="Truth sensitivity tranche level at VSQ Lod: 2.8762 <= x < 3.3717">
-##FILTER=<ID=TruthSensitivityTranche97.00to98.00,Description="Truth sensitivity tranche level at VSQ Lod: 2.2618 <= x < 2.8762">
-##FILTER=<ID=TruthSensitivityTranche98.00to99.00+,Description="Truth sensitivity tranche level at VQS Lod < 1.2907">
-##FILTER=<ID=TruthSensitivityTranche98.00to99.00,Description="Truth sensitivity tranche level at VSQ Lod: 1.2907 <= x < 2.2618">
-##FORMAT=<ID=AA,Number=1,Type=Integer,Description="Alternate allele observations">
-##FORMAT=<ID=AD,Number=.,Type=Integer,Description="Allelic depths for the ref and alt alleles in the order listed">
-##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth (only filtered reads used for calling)">
-##FORMAT=<ID=FT,Number=1,Type=String,Description="Sample Genotype Filter">
-##FORMAT=<ID=GL,Number=3,Type=Integer,Description="Genotype Likelihood, log-scaled likeilhoods of the data given the called genotype for each possible genotype generated from the reference and alternate alleles given the sample ploidy">
-##FORMAT=<ID=GQ,Number=1,Type=Float,Description="Genotype Quality">
-##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
-##FORMAT=<ID=HQ,Number=.,Type=Integer,Description="Haplotype Quality">
-##FORMAT=<ID=PL,Number=3,Type=Float,Description="Normalized, Phred-scaled likelihoods for AA,AB,BB genotypes where A=ref and B=alt; not applicable if site is not biallelic">
-##FORMAT=<ID=RA,Number=1,Type=Integer,Description="Reference allele observations">
-##FORMAT=<ID=SA,Number=1,Type=Integer,Description="Number of alternate observations by strand, delimited by |: [forward]|[reverse]">
-##FORMAT=<ID=SP,Number=1,Type=Integer,Description="Phred-scaled strand bias P-value">
-##FORMAT=<ID=SR,Number=1,Type=Integer,Description="Number of reference observations by strand, delimited by |: [forward]|[reverse]">
-##INFO=<ID=AA,Number=1,Type=Integer,Description="Alternate allele observations">
-##INFO=<ID=AB,Number=1,Type=Float,Description="Allele balance at heterozygous sites: a number between 0 and 1 representing the ratio of reads showing the reference allele to all reads, considering only reads from individuals called as heterozygous">
-##INFO=<ID=ABA,Number=1,Type=Integer,Description="Alternate allele balance count: the number of sequence reads from apparent heterozygotes supporting the alternate allele">
-##INFO=<ID=ABP,Number=1,Type=Float,Description="Allele balance probability at heterozygous sites: Phred-scaled upper-bounds estimate of the probability of observing the deviation between ABR and ABA given E(ABR/ABA) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=ABR,Number=1,Type=Integer,Description="Reference allele balance count: the number of sequence reads from apparent heterozygotes supporting the reference allele">
-##INFO=<ID=AC,Number=.,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
-##INFO=<ID=AF,Number=.,Type=Float,Description="Allele Frequency, for each ALT allele, in the same order as listed">
-##INFO=<ID=AF1,Number=1,Type=Float,Description="Max-likelihood estimate of the site allele frequency of the first ALT allele">
-##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
-##INFO=<ID=BL,Number=1,Type=Integer,Description="Base Pairs Left: number of base pairs in reads supporting the alternate to the left (5') of the alternate allele">
-##INFO=<ID=BR,Number=1,Type=Integer,Description="Base Pairs Right: number of base pairs in reads supporting the alternate to the right (3') of the alternate allele">
-##INFO=<ID=BVAR,Number=0,Type=Flag,Description="The best genotype combination in the posterior is variant (non homozygous).">
-##INFO=<ID=BaseQRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt Vs. Ref base qualities">
-##INFO=<ID=CI95,Number=2,Type=Float,Description="Equal-tail Bayesian credible interval of the site allele frequency at the 95% level">
-##INFO=<ID=CpG,Number=0,Type=Flag,Description="CpG site (either CpG, TpG or CpA)">
-##INFO=<ID=DB,Number=0,Type=Flag,Description="dbSNP Membership">
-##INFO=<ID=DEL,Number=0,Type=Flag,Description="deletion allele">
-##INFO=<ID=DP,Number=1,Type=Integer,Description="Filtered Depth">
-##INFO=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
-##INFO=<ID=DS,Number=0,Type=Flag,Description="Were any of the samples downsampled?">
-##INFO=<ID=Dels,Number=1,Type=Float,Description="Fraction of Reads Containing Spanning Deletions">
-##INFO=<ID=EL,Number=1,Type=Integer,Description="Allele End Left: number of observations of the alternate where the alternate occurs in the left end of the read">
-##INFO=<ID=EPP,Number=1,Type=Float,Description="End Placement Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between EL and ER given E(EL/ER) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=ER,Number=1,Type=Integer,Description="Allele End Right: number of observations of the alternate where the alternate occurs in the right end of the read">
-##INFO=<ID=FQ,Number=1,Type=Float,Description="Phred probability that sample chromosomes are not all the same">
-##INFO=<ID=FR,Number=0,Type=Float,Description="Estimated population frequency">
-##INFO=<ID=FS,Number=1,Type=Float,Description="Phred-scaled p-value using Fisher's exact test to detect strand bias">
-##INFO=<ID=HETAR,Number=1,Type=Integer,Description="Number of individuals heterozygous alternate / reference">
-##INFO=<ID=HOMA,Number=1,Type=Integer,Description="Number of individuals homozygous for the alternate">
-##INFO=<ID=HOMR,Number=1,Type=Integer,Description="Number of individuals homozygous for the reference">
-##INFO=<ID=HP,Number=1,Type=Integer,Description="Homopolmer run length">
-##INFO=<ID=HPLen,Number=1,Type=Integer,Description="Homopolymer length">
-##INFO=<ID=HR,Number=1,Type=Integer,Description="Homopolymer run length">
-##INFO=<ID=HRun,Number=1,Type=Integer,Description="Largest Contiguous Homopolymer Run of Variant Allele In Either Direction">
-##INFO=<ID=HU,Number=1,Type=String,Description="Homopolymer run unit (stranded)">
-##INFO=<ID=HaplotypeScore,Number=1,Type=Float,Description="Consistency of the site with at most two segregating haplotypes">
-##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Not provided in original VCF header">
-##INFO=<ID=INS,Number=0,Type=Flag,Description="insertion allele">
-##INFO=<ID=InbreedingCoeff,Number=1,Type=Float,Description="Inbreeding coefficient as estimated from the genotype likelihoods per-sample when compared against the Hardy-Weinberg expectation">
-##INFO=<ID=KGPilot123,Number=0,Type=Flag,Description="1000 Genome discovery all pilots 2010(1,2,3)">
-##INFO=<ID=LEN,Number=1,Type=Integer,Description="allele length">
-##INFO=<ID=LRB,Number=1,Type=Float,Description="((max(BR, BL) / (BR + BL)) - 0.5) * 2 : The proportion of base pairs in reads on one side of the alternate allele relative to total bases, scaled from [0.5,1] to [0,1]">
-##INFO=<ID=LRBP,Number=1,Type=Float,Description="Left-Right Balance Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between BL and BR given E(BR/BL) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=MNP,Number=0,Type=Flag,Description="MNP allele">
-##INFO=<ID=MQ,Number=1,Type=Float,Description="RMS Mapping Quality">
-##INFO=<ID=MQ0,Number=1,Type=Integer,Description="Total Mapping Quality Zero Reads">
-##INFO=<ID=MQ0Fraction,Number=1,Type=Float,Description="Fraction of Mapping Quality Zero Reads">
-##INFO=<ID=MQM,Number=1,Type=Float,Description="Mean mapping quality of observed alternate alleles">
-##INFO=<ID=MQRankSum,Number=1,Type=Float,Description="Z-score From Wilcoxon rank sum test of Alt vs. Ref read mapping qualities">
-##INFO=<ID=NF,Number=0,Type=Integer,Description="Total number of forward reads containing this variant">
-##INFO=<ID=NR,Number=0,Type=Integer,Description="Total number of reads containing this variant">
-##INFO=<ID=NS,Number=1,Type=Integer,Description="Number of samples with data">
-##INFO=<ID=PP,Number=0,Type=Float,Description="Posterior probability (phred scaled) that this variant segregates">
-##INFO=<ID=PV4,Number=4,Type=Float,Description="P-values for strand bias, baseQ bias, mapQ bias and tail distance bias">
-##INFO=<ID=QD,Number=1,Type=Float,Description="Variant Confidence/Quality by Depth">
-##INFO=<ID=RA,Number=1,Type=Integer,Description="Reference allele observations">
-##INFO=<ID=RL,Number=1,Type=Integer,Description="Reads Placed Left: number of reads supporting the alternate balanced to the left (5') of the alternate allele">
-##INFO=<ID=RPP,Number=1,Type=Float,Description="Read Placement Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between RPL and RPR given E(RPL/RPR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=RR,Number=1,Type=Integer,Description="Reads Placed Right: number of reads supporting the alternate balanced to the right (3') of the alternate allele">
-##INFO=<ID=RUN,Number=1,Type=Integer,Description="Homopolymer run length: the number of consecutive nucleotides in the reference genome matching the alternate allele prior to the current position">
-##INFO=<ID=ReadPosRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt vs. Ref read position bias">
-##INFO=<ID=SAB,Number=1,Type=Float,Description="Strand bias for the alternate allele: SAF / ( SAF + SAR )">
-##INFO=<ID=SAF,Number=1,Type=Integer,Description="Number of alternate observations on the forward strand">
-##INFO=<ID=SAP,Number=1,Type=Float,Description="Strand balance probability for the alternate allele: Phred-scaled upper-bounds estimate of the probability of observing the deviation between SAF and SAR given E(SAF/SAR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=SAR,Number=1,Type=Integer,Description="Number of alternate observations on the reverse strand">
-##INFO=<ID=SB,Number=1,Type=Float,Description="Strand Bias">
-##INFO=<ID=SC,Number=1,Type=String,Description="Genomic sequence 10 bases either side of variant position">
-##INFO=<ID=SNP,Number=0,Type=Flag,Description="SNP allele">
-##INFO=<ID=SRB,Number=1,Type=Float,Description="Strand bias for the reference allele: SRF / ( SRF + SRR )">
-##INFO=<ID=SRF,Number=1,Type=Integer,Description="Number of reference observations on the forward strand">
-##INFO=<ID=SRP,Number=1,Type=Float,Description="Strand balance probability for the reference allele: Phred-scaled upper-bounds estimate of the probability of observing the deviation between SRF and SRR given E(SRF/SRR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=SRR,Number=1,Type=Integer,Description="Number of reference observations on the reverse strand">
-##INFO=<ID=TC,Number=0,Type=Integer,Description="Total coverage">
-##INFO=<ID=TR,Number=1,Type=Integer,Description="Tandem repeat run length (bp)">
-##INFO=<ID=TS,Number=0,Type=Flag,Description="transition SNP">
-##INFO=<ID=TU,Number=1,Type=String,Description="tandem repeat run unit (stranded)">
-##INFO=<ID=TV,Number=0,Type=Flag,Description="transversion SNP">
-##INFO=<ID=VLD,Number=0,Type=Flag,Description="Is Validated.  This bit is set if the snp has 2+ minor allele count based on frequency or genotype data.">
-##INFO=<ID=VQSLOD,Number=1,Type=Float,Description="Log odds ratio of being a true variant versus being false under the trained gaussian mixture model">
-##INFO=<ID=dbSNP,Number=1,Type=Integer,Description="First SNP Build for RS">
-##INFO=<ID=set,Number=1,Type=String,Description="Source VCF for the merged record in CombineVariants">
-##LeftAlignVariants="analysis_type=LeftAlignVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta rodBind=[/humgen/gsa-scr1/ebanks/ALL.chr20.Oxford.20110407.indels.genotypes.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction= [...]
-##SelectVariants="analysis_type=SelectVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta rodBind=[/humgen/gsa-scr1/delangel/officialCalls/20110201_chr20_phase1_indels/dindel/20110208.chr20.dindel2.ALL.sites.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampli [...]
-##UnifiedGenotyper="analysis_type=UnifiedGenotyper input_file=[/broad/shptmp/delangel/calls/chr20/CHB.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/CHS.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/CLM.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/JPT.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/MXL.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/PUR.phase1.chr20.42.cleaned.bam] sample_metadata=[] re [...]
-##VariantFiltration="analysis_type=VariantFiltration input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[/humgen/1kg/processing/pipeline_test_bams/chr22_chunked.hg19.intervals] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/broad/shptmp/rpoplin/ALL.phase1.chr22.raw.indels.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION DBSNP=null downsampling_type=null downsample_to_fraction=null downsamp [...]
-##commandline="/share/software/freebayes/bin/freebayes --stdin --min-alternate-count 2 --genotype-combo-step-max 20 --genotype-variant-threshold 4 --no-marginals --pvar 0.0001 --indels --mnps --no-filters --binomial-obs-priors --allele-balance-priors --region 20:0..100000 --vcf /d1/data/1000G/20101123/populations/finalised.phase1/integrated/including454/wg/ALL/Pipeline/none//freebayes/freebayes.20:0-100000.baq.20110328.vcf --fasta-reference /d2/data/references/build_37/human_reference_v37.fa"
-##fileDate=2011-03-28
-##filedate=2011-02-08
-##filter="( SNP | MNP ) & ( MQM > 65 | QUAL > 1 ) & ABP < 30 & AB < 0.9 | ( INS | DEL ) & QUAL > 500"
-##phasing=none
-##platypusOptions={'bamFiles': ['/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06984', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06985', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06986', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06989', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06994', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA07000', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA07037', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA07048', '/scratch/ri [...]
-##reference=/lustre/scratch105/projects/g1k/ref/main_project/human_g1k_v37.fasta
-##source=Dindel2
-##source=SelectVariants
-##source_20110031.1=/nfs/users/nfs_p/pd3/cvs/vcftools/perl/vcf-annotate -d /nfs/users/nfs_p/pd3/sandbox/hapmap/dbSNP-b132/non-1kg-vld.desc -a /nfs/users/nfs_p/pd3/sandbox/hapmap/dbSNP-b132/non-1kg-vld.tab.gz -c CHROM,FROM,INFO/VLD,INFO/KGPilot123,INFO/dbSNP
-##vcfCTools=filter
-##vcfCtools=merge freebayes.20:0-100000.baq.20110328.vcf, freebayes.20:100000-200000.baq.20110328.vcf, freebayes.20:200000-300000.baq.20110328.vcf, freebayes.20:300000-400000.baq.20110328.vcf, freebayes.20:400000-500000.baq.20110328.vcf, freebayes.20:500000-600000.baq.20110328.vcf, freebayes.20:600000-700000.baq.20110328.vcf, freebayes.20:700000-800000.baq.20110328.vcf, freebayes.20:800000-900000.baq.20110328.vcf, freebayes.20:900000-1000000.baq.20110328.vcf, freebayes.20:1000000-1100000 [...]
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	
-20	458502	.	G	GA	4567.01	PASS	AA=20;AB=0.61111;ABA=14;ABP=6.8707;ABR=22;AC=38;AF=0.0544;AN=698;BL=374;BR=1129;BVAR;BaseQRankSum=13.364;DP=15979;DP4=1882,2188,45,37;Dels=0.00;EL=5;EPP=13.868;ER=15;FR;FS=6.503;HETAR=11;HOMA=2;HOMR=985;HP=1;HPLen=2;HR=2;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.0157;LEN=1;LRB=0.50233;LRBP=826.56;MQ=66.16;MQ0Fraction=0.0110;MQM=70.5;MQRankSum=-3.158;NF;NR;NS=998;PP;PV4=0.15,1,0.42,0.15;RA=3173;RL=1;RPP=38.188;RR=19;RUN=1;ReadPosRankSum=-2.346;SAB=0.7;SAF=14;SA [...]
-20	539571	.	TG	T	18546	PASS	AA=71;AB=0.92482;ABA=63;ABP=1316.6;ABR=775;AC=42;AF=0.03512;AN=1196;BL=3915;BR=252;BVAR;BaseQRankSum=0.556;DEL;DP=10073;Dels=0.01;EL=47;EPP=19.189;ER=24;FS=2.124;HETAR=290;HOMA=156;HOMR=570;HRun=1;InbreedingCoeff=0.0620;LEN=1;LRB=0.87905;LRBP=6995.1;MQ0=0;MQ0Fraction=0.0000;MQM=127.99;MQRankSum=0.410;NS=1016;RA=3090;RL=71;RPP=157.18;RR=0;RUN=1;ReadPosRankSum=-11.038;SAB=0.66197;SAF=47;SAP=19.189;SAR=24;SRB=0.55016;SRF=1700;SRP=70.544;SRR=1390;VQSLOD=2.6772;set [...]
-20	573764	.	TA	T	591.51	PASS	AC=91;AF=0.1987;AN=458;BaseQRankSum=0.137;DP=519;FS=3.153;HRun=1;HaplotypeScore=14.0744;InbreedingCoeff=0.1460;MQ=48.16;MQ0=26;MQ0Fraction=0.0501;MQRankSum=-1.636;QD=3.63;ReadPosRankSum=-4.140;SB=-408.14;VQSLOD=5.2458;set=VQSR
-20	766143	.	C	A,CATCTGGTA	5521.70	PASS	AA=24;AB=0.5;ABA=18;ABP=3.0103;ABR=18;AC=14;AF=0.0289;AF1=0.02038;AN=484;BL=655;BR=1542;BVAR;BaseQRankSum=3.801;CI95=0.01549,0.02655;DP=11749;DP4=2222,1998,14,8;Dels=0.00;EL=9;EPP=6.2675;ER=15;FQ=999;FR;FS=2.941;HETAR=9;HOMA=4;HOMR=901;HP=2;HPLen=2;HR=1;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.0515;LEN=8;LRB=0.40373;LRBP=780.64;MQ=56.81;MQ0Fraction=0.0253;MQM=22.167;MQRankSum=-4.809;NF;NR;NS=914;PP;PV4=0.39,1,5.8e-07,1;RA=3093;RL=6;RPP=16.039;RR=18;R [...]
-20	997076	rs11467490	CTG	C	15379.78	PASS	AA=195;AB=0.59878;ABA=132;ABP=30.896;ABR=197;AC=173;AF=0.14562;AN=1188;BL=7664;BR=7309;BVAR;BaseQRankSum=21.853;DB;DEL;DP=27127;DP4=1801,2002,241,282;Dels=0.13;EL=100;EPP=3.2887;ER=95;FQ=999;FR;FS=6.591;HETAR=77;HOMA=42;HOMR=815;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1284;LEN=2;LRB=0.023709;LRBP=21.287;MQ=61.18;MQ0Fraction=0.0214;MQM=43.041;MQRankSum=6.886;NF;NR;NS=934;PP;PV4=0.61,1.5e-78,1,1;RA=2800;RL=120;RPP=25.56;RR=75;RUN=1;Rea [...]
-20	1042261	rs10597473	CCCTG	C	168658.05	PASS	AA=4481;AB=0.29043;ABA=2128;ABP=1147.1;ABR=871;AC=1172;AF=0.97830;AN=1198;BL=169975;BR=194027;BVAR;BaseQRankSum=4.599;DB;DEL;DP=29418;DP4=29,47,1441,2403;Dels=0.84;EL=2358;EPP=29.772;ER=2123;FR;FS=9.122;HETAR=482;HOMA=559;HOMR=30;HP=2;HPLen=3;HR=3;HRun=0;HU=C;INDEL;InbreedingCoeff=0.0470;LEN=4;LRB=0.066077;LRBP=3454.1;MQ=104.58;MQ0=4;MQ0Fraction=0.0014;MQM=58.257;MQRankSum=-3.368;NF;NR;NS=1071;PP;PV4=0.91,6.8e-09,2.8e-05,1;RA=1039;RL=2088;RPP= [...]
-20	1046297	rs33956316	C	CT,CTT,CTTT	17698	PASS	ABR=408;AC=432,79,230;AF=0.39779,0.07274,0.21179;BVAR;BaseQRankSum=-8.413;DB;DP=15649;DP4=147,199,534,436;FR;FS=11.580;HOMA=97;HOMR=457;HP=20;HR=16;HU=T;HaplotypeScore=16.0590;INDEL;INS;InbreedingCoeff=0.6018;KGPilot123;MQ0=19;MQ0Fraction=0.0093;MQRankSum=7.992;NF;NR;NS=767;PP;PV4=6e-05,1,1,1;QD=8.18;RA=1183;RUN=1;ReadPosRankSum=2.684;SB=-6384.08;SC=GGAAAATTTTCTTTTTTTTTT;SRB=0.40913;SRF=484;SRP=87.859;SRR=699;TC;TR=16;TU=T;VQSLOD=8.4941;dbSN [...]
-20	1405740	.	T	TA	257.28	PASS	AF=0.0188;BaseQRankSum=-0.745;DP=3769;Dels=0.00;FS=0.742;HPLen=9;HRun=9;InbreedingCoeff=0.0462;MQ0Fraction=0.0151;MQRankSum=-0.090;ReadPosRankSum=-1.582;VQSLOD=5.6502;set=Intersection;sumGLbyD=6.94
-20	1690501	.	TC	T	27928	PASS	AA=108;AB=0.91372;ABA=100;ABP=1726.1;ABR=1059;AC=35;AF=0.02966;AN=1180;BL=593;BR=6973;BVAR;BaseQRankSum=7.567;DEL;DP=10612;Dels=0.01;EL=50;EPP=4.2971;ER=58;FS=0.000;HETAR=378;HOMA=184;HOMR=477;HRun=1;InbreedingCoeff=0.0495;LEN=1;LRB=0.84325;LRBP=11685;MQ0=0;MQ0Fraction=0.0000;MQM=87.361;MQRankSum=4.088;NS=1045;RA=3125;RL=3;RPP=212.2;RR=105;RUN=1;ReadPosRankSum=-13.096;SAB=0.56481;SAF=61;SAP=6.9511;SAR=47;SRB=0.51776;SRF=1618;SRP=11.572;SRR=1507;VQSLOD=3.9824; [...]
-20	1948787	.	GTC	G,GTCTC	78.70	PASS	AC=18,18;AF=0.01466,0.01466;AN=1228;BaseQRankSum=3.894;DP=19030;DP4=1874,1916,21,20;FR;FS=0.767;HP=2;HPLen=1;HR=1;HU=T;HaplotypeScore=16.5619;INDEL;InbreedingCoeff=0.2332;MQ0=0;MQ0Fraction=0.0000;MQRankSum=2.080;NF;NR;PP;PV4=0.88,1,0.094,0.47;QD=0.28;ReadPosRankSum=0.822;SB=-172.46;SC=CTCGACCCCTGTCTCTCTCTC;TC;TR=13;TU=CT;VQSLOD=3.7405;set=filterInVQSR-2of5
-20	1991285	rs113891396	TAA	T,TA,TAAA,TAAAAA,TAAAAAA,TAAAAAAA,TAAAAAAAA	39235.36	PASS	AC=5,251,20,39,188,52,79;AF=0.0056,0.2789,0.0222,0.0433,0.2089,0.0578,0.0878;AN=900;BVAR;BaseQRankSum=1.124;DB;DEL;DP=54393;DP4=906,772,824,579;Dels=0.21;FR;FS=37.525;HP=12;HR=12;HRun=12;HU=A;INDEL;INS;InbreedingCoeff=0.6891;MQ=76.81;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-6.593;NF;NR;PP;PV4=0.0087,1,6.3e-19,1;RUN=1;ReadPosRankSum=-2.184;SC=ATCTGCCACTTAAAAAAAAAA;TC;TR=12;TU=A;VQSLOD=9.0007;dbSNP=132;set=Inte [...]
-20	2355911	.	TA	T	11723	PASS	AA=79;AB=0.9393;ABA=57;ABP=1577;ABR=882;AC=38;AF=0.0411;AN=924;BL=644;BR=5536;BVAR;BaseQRankSum=2.434;DEL;DP=9687;Dels=0.00;EL=45;EPP=6.3362;ER=34;FS=3.043;HETAR=321;HOMA=182;HOMR=555;HRun=5;InbreedingCoeff=0.0412;LEN=1;LRB=0.79159;LRBP=8411.9;MQ0=0;MQ0Fraction=0.0000;MQM=70.848;MQRankSum=0.137;NS=1058;RA=3415;RL=3;RPP=149.49;RR=76;RUN=1;ReadPosRankSum=-12.116;SAB=0.44304;SAF=35;SAP=5.2367;SAR=44;SRB=0.43572;SRF=1488;SRP=125.55;SRR=1927;VQSLOD=3.8910;set=filt [...]
-20	2512346	.	A	AC	11046.11	PASS	AC=673;AF=0.57034;AN=1180;BaseQRankSum=19.890;DP=2717;FS=26.809;HRun=0;HaplotypeScore=19.0575;InbreedingCoeff=0.3068;MQ=61.07;MQ0=25;MQ0Fraction=0.0092;MQRankSum=2.745;QD=5.80;ReadPosRankSum=3.139;SB=-4564.39;VQSLOD=4.3252;set=VQSR
-20	2597210	rs71329387	TAAAG	T	32206.62	PASS	AA=689;AB=0.5805;ABA=542;ABP=75.724;ABR=750;AC=253;AF=0.20738;BL=29921;BR=30215;BVAR;BaseQRankSum=20.638;DB;DEL;DP=29293;DP4=1750,1070,405,274;Dels=0.18;EL=345;EPP=3.0135;ER=344;FQ=999;FR;FS=1.827;HETAR=225;HOMA=55;HOMR=783;HP=7;HPLen=4;HR=3;HRun=0;HU=A;INDEL;InbreedingCoeff=0.1419;LEN=4;LRB=0.0048889;LRBP=6.1314;MQ=66.96;MQ0=0;MQ0Fraction=0.0000;MQM=42.925;MQRankSum=-7.105;NF;NR;NS=1063;PP;PV4=0.25,1,9e-20,1;RA=4619;RL=345;RPP=3.0135;RR=344;RU [...]
-20	2771621	rs11479849	GT	G,GTT	1605.60	PASS	AA=80;AB=0.79825;ABA=69;ABP=267.24;ABR=273;AC=79,91;AF=0.06551,0.07546;AN=1206;BL=2593;BR=3805;BVAR;BaseQRankSum=7.825;DB;DP=9790;Dels=0.04;EL=37;EPP=3.9875;ER=43;FR;FS=4.751;HETAR=62;HOMA=5;HOMR=958;HP=11;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.2646;LEN=1;LRB=0.18943;LRBP=501.57;MQ0=0;MQ0Fraction=0.0000;MQM=52.45;MQRankSum=-0.560;NF;NR;NS=1025;PP;RA=3949;RL=29;RPP=16.148;RR=51;RUN=1;ReadPosRankSum=-2.397;SAB=0.525;SAF=42;SAP=3.4446;SAR=38;SC= [...]
-20	2891235	.	G	GT,GTTT	2869.87	PASS	AC=236,246;AF=0.2803,0.2922;AN=842;BaseQRankSum=8.979;DP=1067;FS=3.911;HaplotypeScore=20.3595;InbreedingCoeff=0.6511;MQ=44.86;MQ0=114;MQ0Fraction=0.1068;MQRankSum=-2.273;QD=4.00;ReadPosRankSum=-6.601;SB=-991.85;VQSLOD=5.4379;set=VQSR
-20	3033550	.	TGAG	T	2005.90	PASS	AA=34;AB=0.51429;ABA=34;ABP=3.1344;ABR=36;AC=22;AF=0.0332;AN=662;BL=1374;BR=1649;BVAR;BaseQRankSum=5.192;DEL;DP=14639;DP4=2271,1492,12,21;Dels=0.02;EL=19;EPP=4.0322;ER=15;FR;FS=16.657;HETAR=17;HOMA=0;HOMR=914;HP=1;HPLen=1;HR=1;HRun=0;HU=G;INDEL;InbreedingCoeff=-0.0454;LEN=3;LRB=0.090969;LRBP=57.333;MQ=53.99;MQ0Fraction=0.0304;MQM=46.735;MQRankSum=1.938;NF;NR;NS=931;PP;PV4=0.0068,9.4e-05,1,1;RA=2985;RL=11;RPP=12.207;RR=23;RUN=1;ReadPosRankSum=-0.466;SAB=0. [...]
-20	3635363	.	T	TG	999	PASS	AA=16;AB=0.61905;ABA=16;ABP=8.1805;ABR=26;AF=0.0141;AF1=0.01726;AN=708;BL=614;BR=523;BVAR;BaseQRankSum=2.337;CI95=0.01106,0.02434;DP=14594;DP4=2128,2038,6,10;Dels=0.00;EL=7;EPP=3.5532;ER=9;FQ=999;FR;FS=5.579;HETAR=8;HOMA=0;HOMR=1055;HP=3;HPLen=3;HR=3;HRun=3;HU=G;INDEL;INS;InbreedingCoeff=0.0633;LEN=1;LRB=0.080035;LRBP=18.826;MQ=100.74;MQ0=0;MQ0Fraction=0.0000;MQM=51.312;MQRankSum=2.569;NF;NR;NS=1063;PP;PV4=0.32,1,1,1;RA=5628;RL=9;RPP=3.5532;RR=7;RUN=1;ReadPosRa [...]
-20	3873327	rs61519218	A	AAG	683.85	PASS	AC=25;AF=0.0313;AN=800;BaseQRankSum=4.839;DB;DP=1718;FS=4.265;HRun=0;HaplotypeScore=20.5789;InbreedingCoeff=0.1055;MQ=53.70;MQ0=37;MQ0Fraction=0.0215;MQRankSum=2.468;QD=6.30;ReadPosRankSum=4.254;SB=-403.21;VQSLOD=6.1858;set=VQSR
-20	4028835	.	GC	G	2511.30	PASS	AA=66;AB=0.56954;ABA=65;ABP=9.3521;ABR=86;AC=22;AF=0.01836;AN=1198;BL=2303;BR=2463;BVAR;BaseQRankSum=7.621;DEL;DP=22795;DP4=1714,2774,22,37;Dels=0.02;EL=34;EPP=3.1419;ER=32;FQ=999;FR;FS=2.095;HETAR=21;HOMA=0;HOMR=1050;HP=2;HPLen=2;HR=2;HRun=2;HU=C;INDEL;InbreedingCoeff=0.0125;LEN=1;LRB=0.033571;LRBP=14.674;MQ=108.09;MQ0=0;MQ0Fraction=0.0000;MQM=53.318;MQRankSum=5.257;NF;NR;NS=1071;PP;PV4=1,5.4e-13,1,0.075;RA=6185;RL=36;RPP=4.1947;RR=30;RUN=1;ReadPosRankSum= [...]
-20	4039609	rs67812039	G	GA	43457	PASS	AA=909;AB=0.54639;ABA=572;ABP=26.583;ABR=689;AC=302;AF=0.3455;AN=874;BL=37070;BR=38211;BVAR;BaseQRankSum=20.147;DB;DP=25595;DP4=1483,1374,528,542;Dels=0.00;EL=467;EPP=4.5033;ER=442;FQ=999;FR;FS=5.441;HETAR=243;HOMA=127;HOMR=608;HP=4;HPLen=3;HR=3;HRun=3;HU=A;INDEL;INS;InbreedingCoeff=0.1388;LEN=1;LRB=0.015157;LRBP=40.563;MQ=119.50;MQ0=0;MQ0Fraction=0.0000;MQM=83.197;MQRankSum=1.080;NF;NR;NS=978;PP;PV4=0.16,1,3.6e-12,1;RA=3033;RL=443;RPP=4.274;RR=466;R [...]
-20	4390056	.	TC	T	49312	PASS	AA=91;AB=0.94353;ABA=86;ABP=2605.4;ABR=1437;AC=39;AF=0.03160;AN=1234;BL=6823;BR=731;BVAR;BaseQRankSum=2.727;DEL;DP=13149;Dels=0.00;EL=41;EPP=4.9431;ER=50;FS=4.002;HETAR=465;HOMA=313;HOMR=292;HRun=3;InbreedingCoeff=0.0326;LEN=1;LRB=0.80646;LRBP=10671;MQ0=0;MQ0Fraction=0.0000;MQM=69.824;MQRankSum=-0.903;NS=1073;RA=3078;RL=89;RPP=183.62;RR=2;RUN=1;ReadPosRankSum=-12.526;SAB=0.45055;SAF=41;SAP=4.9431;SAR=50;SRB=0.52567;SRF=1618;SRP=20.622;SRR=1460;VQSLOD=4.3235;s [...]
-20	4474622	.	TA	AA,T,TAA,TAAA,TAAAA	94522.28	PASS	ABR=114;AC=38,68,16,900;AF=0.03333,0.05965,0.01404,0.78947;AN=1140;BVAR;BaseQRankSum=9.741;DB;DP=16656;Dels=0.00;FR;FS=2.355;HOMA=3;HOMR=936;HP=10;HPLen=10;HR=10;HRun=10;HU=A;INS;InbreedingCoeff=0.4516;MQ0=2;MQ0Fraction=0.0008;MQRankSum=-4.096;NF;NR;NS=980;PP;RA=3766;RUN=1;ReadPosRankSum=2.380;SC=AGAAAAAAATTAAAAAAAAAA;SRB=0.49734;SRF=1873;SRP=3.2409;SRR=1893;TC;TR=10;TU=A;VQSLOD=8.8186;set=Intersection;sumGLbyD=38.79
-20	4824911	.	AC	A	41998.70	PASS	AC=1172;AF=0.97342;AN=1204;BaseQRankSum=8.604;DP=3615;FS=9.934;HRun=1;HaplotypeScore=39.6843;InbreedingCoeff=0.0980;MQ=129.80;MQ0=1;MQ0Fraction=0.0003;MQRankSum=3.378;QD=11.62;ReadPosRankSum=6.967;SB=-16955.28;VQSLOD=4.2689;set=VQSR
-20	4839897	rs35881880	TAA	T,TA,TAAA,TAAAAA	3906.80	PASS	AC=12,95,137,189;AF=0.01024,0.08106,0.11689,0.16126;AN=1172;BVAR;BaseQRankSum=15.271;DB;DEL;DP=15105;Dels=0.04;FR;FS=43.567;HP=19;HR=13;HRun=13;HU=A;INS;InbreedingCoeff=0.5716;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.569;NF;NR;PP;RUN=1;ReadPosRankSum=-13.794;SC=TGTTAAAAAATAAAAAAAAAA;TC;TR=13;TU=A;VQSLOD=8.1773;set=Intersection;sumGLbyD=3.77
-20	5071386	.	AT	A	45200.27	PASS	AC=685;AF=0.7495;AN=914;BaseQRankSum=11.006;DP=2725;FS=8.133;HRun=3;HaplotypeScore=50.5496;InbreedingCoeff=0.2364;MQ=81.40;MQ0=0;MQ0Fraction=0.0000;MQRankSum=2.411;QD=18.51;ReadPosRankSum=3.429;SB=-22405.85;VQSLOD=4.2872;set=VQSR
-20	5507414	.	G	GCC	439.08	PASS	AC=23;AF=0.01876;AN=1226;BaseQRankSum=3.051;DP=3023;FS=3.636;HRun=1;HaplotypeScore=30.3104;InbreedingCoeff=0.0204;MQ=112.09;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.065;QD=2.85;ReadPosRankSum=-2.709;SB=-302.22;VQSLOD=4.4311;set=VQSR
-20	5609676	.	GA	G,GAA	799.89	PASS	AA=42;AB=0.79096;ABA=37;ABP=133.16;ABR=140;AC=43,65;AF=0.03607,0.05453;AF1=0.02826;AN=1192;BL=1360;BR=2334;BVAR;BaseQRankSum=5.069;CI95=0.01242,0.04037;DP=15610;DP4=1548,2441,21,30;Dels=0.02;EL=18;EPP=4.8716;ER=24;FQ=12.1;FR;FS=0.000;HETAR=36;HOMA=1;HOMR=991;HP=13;HPLen=10;HR=10;HRun=10;HU=A;INDEL;INS;InbreedingCoeff=0.2001;LEN=1;LRB=0.26367;LRBP=560.68;MQ=63.29;MQ0Fraction=0.0003;MQM=44.143;MQRankSum=1.755;NF;NR;NS=1028;PP;PV4=0.77,1,0.0087,0.0053;RA=41 [...]
-20	5736211	rs35303106	CT	C,CTT	4384.40	PASS	AA=117;AB=0.71499;ABA=116;ABP=166.4;ABR=291;AC=32,145;AF=0.02712,0.12288;AN=1180;BL=5556;BR=4901;BVAR;BaseQRankSum=2.708;DB;DP=9157;Dels=0.01;EL=54;EPP=4.5136;ER=63;FR;FS=2.802;HETAR=79;HOMA=1;HOMR=837;HP=16;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.1903;LEN=1;LRB=0.062637;LRBP=92.1;MQ0Fraction=0.0273;MQM=48.932;MQRankSum=3.654;NF;NR;NS=917;PP;RA=2785;RL=79;RPP=34.209;RR=38;RUN=1;ReadPosRankSum=0.795;SAB=0.5641;SAF=66;SAP=7.1862;SAR=51;SC=TTTTCT [...]
-20	5898626	rs34483659	CAAA	C,CA,CAA,CAAAAA	1140.16	PASS	ABR=34;AC=19,98,56,199;AF=0.0227,0.1172,0.0670,0.2380;AF1=0.08519;BVAR;BaseQRankSum=5.049;CI95=0.03727,0.1273;DB;DEL;DP=5091;DP4=539,408,121,123;FQ=4.43;FR;FS=5.701;HOMA=64;HOMR=156;HP=19;HR=18;HU=A;HaplotypeScore=11.5333;INDEL;InbreedingCoeff=0.7405;MQ0=117;MQ0Fraction=0.0986;MQRankSum=6.290;NF;NR;NS=240;PP;PV4=0.043,1,1,0.0087;QD=1.22;RA=204;RUN=1;ReadPosRankSum=-2.684;SB=-1015.09;SC=ACTAAAAATACAAAAAAAAAA;SRB=0.35294;SRF=72;SRP=41 [...]
-20	5975126	rs10541892	C	CAG	504.78	PASS	AC=79;AF=0.07004;AN=1128;BaseQRankSum=10.498;DB;DP=2050;FS=38.228;HRun=0;HaplotypeScore=14.1426;InbreedingCoeff=-0.0053;MQ=60.40;MQ0=80;MQ0Fraction=0.0390;MQRankSum=5.098;QD=1.63;ReadPosRankSum=-4.851;SB=-590.69;VQSLOD=4.8517;set=VQSR
-20	5992611	.	G	GT	799.56	PASS	AA=39;AB=0.8301;ABA=35;ABP=197.98;ABR=171;AC=13;AF=0.0183;AN=712;BL=1164;BR=1566;BVAR;BaseQRankSum=1.914;DP=9561;Dels=0.01;EL=16;EPP=5.7386;ER=23;FS=0.739;HETAR=32;HOMA=0;HOMR=1024;HRun=9;INS;InbreedingCoeff=0.0339;LEN=1;LRB=0.14725;LRBP=131.55;MQ0=0;MQ0Fraction=0.0000;MQM=97.231;MQRankSum=0.764;NS=1056;RA=5204;RL=16;RPP=5.7386;RR=23;RUN=1;ReadPosRankSum=-1.169;SAB=0.69231;SAF=27;SAP=15.538;SAR=12;SRB=0.56399;SRF=2935;SRP=188.09;SRR=2269;VQSLOD=4.6516;set=In [...]
-20	6040983	rs11087710	A	AAAAAAGAG,AAAAAGAG,AAAAGAG,AAAAGAGAG,AAAGAG,AAAGAGAG,AAGAG,AAGAGAG,AG,AGAG,AGAGAG	66894.55	PASS	ABR=468;AC=80,9,20,136,31,91,33,29,9,3,5;AF=0.0980,0.0110,0.0245,0.1667,0.0380,0.1115,0.0404,0.0355,0.0110,0.0037,0.0061;AN=816;BVAR;BaseQRankSum=-12.470;DB;DP=38726;DP4=426,611,310,472;Dels=0.00;FQ=999;FR;FS=6.635;HOMA=110;HOMR=506;HP=14;HR=15;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.8291;KGPilot123;MQ=54.22;MQ0Fraction=0.0168;MQRankSum=-5.329;NF;NR;NS=861;PP;PV4=0.56,1 [...]
-20	6903392	.	TC	CC,T	999	PASS	AF=0.0000;AF1=0.01192;CI95=0.008547,0.01709;DP=10440;DP4=2544,2062,9,11;Dels=0.01;FQ=999;FR;HP=2;HPLen=3;HR=3;HRun=2;HU=T;INDEL;InbreedingCoeff=0.0324;MQ=62.78;MQ0=2;MQ0Fraction=0.0009;NF;NR;PP;PV4=0.38,0.0069,0.36,0.41;QD=8.05;SB=-320.13;SC=TTATTTTCTTTCCAATTTTTA;TC;TR=8;TU=CTTT;set=filterInVQSR-2of5;sumGLbyD=13.22
-20	7024548	.	G	GAT	5041.27	PASS	AC=123;AF=0.10336;AN=1190;BaseQRankSum=23.097;DP=3045;FS=7.979;HRun=0;HaplotypeScore=15.6967;InbreedingCoeff=0.1062;MQ=119.29;MQ0=2;MQ0Fraction=0.0007;MQRankSum=-3.725;QD=8.97;ReadPosRankSum=-1.636;SB=-2257.45;VQSLOD=5.9332;set=VQSR
-20	7484554	.	A	AT	5.09	PASS	AC=0;AF=0.0000;AN=710;BaseQRankSum=-0.696;DP=1862;FS=2.835;HRun=9;HaplotypeScore=13.5425;InbreedingCoeff=0.0567;MQ=76.92;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.932;ReadPosRankSum=-1.701;VQSLOD=4.3156;set=VQSR
-20	7632194	rs77286341	GAA	AAA,G	5324	PASS	AC=0;AF=0.0000;AN=700;BaseQRankSum=-1.741;DB;DP=1772;FR;HP=4;HPLen=3;HR=3;HRun=0;HU=A;HaplotypeScore=60.1795;InbreedingCoeff=0.0017;MQ=70.69;MQ0=13;MQ0Fraction=0.0073;MQRankSum=-1.315;NF;NR;PP;ReadPosRankSum=-3.650;SC=GAGAGAGAGAGAAAGGTGTAA;TC;TR=13;TU=AG;set=filterInVQSR-2of5
-20	7767508	rs71329674	G	GA	17914	PASS	AA=415;AB=0.61617;ABA=337;ABP=105.94;ABR=541;AC=141;AF=0.11614;AN=1214;BL=15187;BR=20323;BVAR;BaseQRankSum=-13.946;DB;DP=28222;Dels=0.00;EL=184;EPP=14.569;ER=231;FQ=999;FR;FS=13.296;HETAR=178;HOMA=35;HOMR=822;HP=14;HPLen=9;HR=9;HRun=9;HU=A;INDEL;INS;InbreedingCoeff=0.0714;LEN=1;LRB=0.14464;LRBP=1616.1;MQ=89.69;MQ0=1;MQ0Fraction=0.0003;MQM=51.667;MQRankSum=0.664;NF;NR;NS=1035;PP;RA=3707;RL=171;RPP=30.894;RR=244;RUN=1;ReadPosRankSum=-1.120;SAB=0.45301; [...]
-20	7920261	.	TA	T,TAA	802.15	PASS	AA=28;AB=0.8;ABA=28;ABP=112.45;ABR=112;AC=22,39;AF=0.01836,0.03255;AN=1198;BL=943;BR=1487;BVAR;BaseQRankSum=2.233;DP=10645;Dels=0.01;EL=11;EPP=5.8022;ER=17;FR;FS=1.691;HETAR=20;HOMA=0;HOMR=1007;HP=10;HPLen=9;HR=9;HRun=9;HU=A;INS;InbreedingCoeff=0.2256;LEN=1;LRB=0.22387;LRBP=267.46;MQ0=0;MQ0Fraction=0.0000;MQM=57.571;MQRankSum=0.940;NF;NR;NS=1027;PP;RA=4776;RL=8;RPP=14.178;RR=20;RUN=1;ReadPosRankSum=-1.567;SAB=0.53571;SAF=15;SAP=3.3205;SAR=13;SC=GTAACTGCT [...]
-20	8012465	rs10595338	TATGA	T	2104.41	PASS	AF=0.03339;BaseQRankSum=10.662;DB;DP=11772;DS;Dels=0.01;FR;FS=7.678;HP=1;HPLen=1;HR=1;HRun=0;HU=A;InbreedingCoeff=0.0266;MQ0Fraction=0.0731;MQRankSum=0.603;NF;NR;PP;ReadPosRankSum=1.276;SC=TGTATGTATGTATGATGTATG;TC;TR=19;TU=ATGT;VQSLOD=4.1376;set=filterInVQSR-2of5;sumGLbyD=6.53
-20	8573999	.	CGTGT	C,CGT,CGTGTGT,TGTGT	45865.96	PASS	AC=458,0,731;AF=0.37727,0.00000,0.60214;AN=1214;BVAR;BaseQRankSum=-6.703;DEL;DP=37714;Dels=0.03;FR;FS=11.079;HP=2;HPLen=1;HR=1;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.7632;LEN=2;MQ0Fraction=0.0026;MQRankSum=-1.394;NF;NR;PP;RUN=1;ReadPosRankSum=-2.102;SC=TGTGTGTGCGCGTGTGTGTGT;TC;TR=18;TU=GT;VQSLOD=6.1435;set=Intersection;sumGLbyD=3.53
-20	8610455	rs10571111	TTTTC	T	11763.51	PASS	AC=190;AF=0.17056;AN=1114;BaseQRankSum=-14.397;DB;DP=2323;FS=2.321;HRun=0;HaplotypeScore=39.8020;InbreedingCoeff=0.2502;MQ=53.39;MQ0=104;MQ0Fraction=0.0448;MQRankSum=3.519;QD=19.07;ReadPosRankSum=4.150;SB=-4067.02;VQSLOD=5.0554;set=VQSR
-20	9139079	.	ATT	A,AT,ATTT,ATTTT,ATTTTT	8777.90	PASS	AC=23,140,114,69,113;AF=0.01993,0.12132,0.09879,0.05979,0.09792;AN=1154;BVAR;BaseQRankSum=-0.022;DEL;DP=25109;DP4=502,657,278,313;FR;FS=11.929;HP=16;HR=16;HU=T;HaplotypeScore=20.2361;INDEL;INS;InbreedingCoeff=0.5704;MQ0=16;MQ0Fraction=0.0067;MQRankSum=2.624;NF;NR;PP;PV4=0.14,1,1,1;QD=1.48;RUN=1;ReadPosRankSum=-0.480;SB=-2354.28;SC=CACCTGGCTAATTTTTTTTTT;TC;TR=16;TU=T;VQSLOD=6.9180;set=Intersection
-20	9862448	.	CT	C	49312	PASS	AA=60;AB=0.96003;ABA=53;ABP=2440.4;ABR=1273;AC=18;AF=0.01461;AN=1232;BL=3516;BR=140;BVAR;BaseQRankSum=-2.056;DEL;DP=11893;Dels=0.01;EL=35;EPP=6.6294;ER=25;FS=1.787;HETAR=396;HOMA=344;HOMR=334;HRun=1;InbreedingCoeff=0.0379;LEN=1;LRB=0.92341;LRBP=6772.5;MQ0Fraction=0.0006;MQM=54.267;MQRankSum=-0.907;NS=1074;RA=2990;RL=60;RPP=133.3;RR=0;RUN=1;ReadPosRankSum=-10.579;SAB=0.58333;SAF=35;SAP=6.6294;SAR=25;SRB=0.47826;SRF=1430;SRP=15.284;SRR=1560;VQSLOD=3.0237;set=fi [...]
-20	9863736	rs73618103	G	GT	50570.21	PASS	AA=2247;AB=0.48878;ABA=1412;ABP=6.0324;ABR=1350;AC=546;AF=0.44463;AN=1228;BL=86886;BR=95862;BVAR;BaseQRankSum=-23.978;DB;DP=32517;DP4=1125,1133,1017,1048;Dels=0.00;EL=1089;EPP=7.6113;ER=1158;FQ=999;FR;FS=2.529;HETAR=445;HOMA=201;HOMR=393;HP=4;HPLen=4;HR=4;HRun=4;HU=T;INDEL;INS;InbreedingCoeff=0.1393;KGPilot123;LEN=1;LRB=0.049117;LRBP=960.35;MQ=68.10;MQ0=2;MQ0Fraction=0.0006;MQM=50.931;MQRankSum=-1.580;NF;NR;NS=1039;PP;PV4=0.71,1,0.11,1;RA=3139;RL= [...]
-20	10640876	.	TA	T	42819	PASS	AA=86;AB=0.92316;ABA=75;ABP=1521;ABR=901;AC=40;AF=0.0447;AN=894;BL=6265;BR=415;BVAR;BaseQRankSum=-0.850;DEL;DP=8223;Dels=0.00;EL=41;EPP=3.4143;ER=45;FS=3.190;HETAR=336;HOMA=384;HOMR=290;HRun=1;InbreedingCoeff=0.0173;LEN=1;LRB=0.87575;LRBP=11128;MQ0=0;MQ0Fraction=0.0000;MQM=76.163;MQRankSum=1.314;NS=1034;RA=2046;RL=83;RPP=164.61;RR=3;RUN=1;ReadPosRankSum=-12.060;SAB=0.46512;SAF=40;SAP=3.9193;SAR=46;SRB=0.5523;SRF=1130;SRP=51.615;SRR=916;VQSLOD=3.9183;set=filt [...]
-20	10926959	.	AG	A	12239	PASS	AA=65;AB=0.92801;ABA=64;ABP=1417.6;ABR=825;AC=24;AF=0.0264;AN=908;BL=616;BR=3782;BVAR;BaseQRankSum=9.990;DEL;DP=10708;Dels=0.01;EL=37;EPP=5.7163;ER=28;FS=1.652;HETAR=275;HOMA=70;HOMR=724;HRun=1;InbreedingCoeff=0.0102;LEN=1;LRB=0.71987;LRBP=4952;MQ0=1;MQ0Fraction=0.0004;MQM=118.82;MQRankSum=1.018;NS=1069;RA=4746;RL=5;RPP=104.07;RR=60;RUN=1;ReadPosRankSum=-12.039;SAB=0.41538;SAF=27;SAP=7.0526;SAR=38;SRB=0.4764;SRF=2261;SRP=25.968;SRR=2485;VQSLOD=2.9713;set=fil [...]
-20	11299648	.	TG	T	49315	PASS	AA=62;AB=0.95292;ABA=54;ABP=2046.7;ABR=1093;AC=28;AF=0.0373;AN=750;BL=3126;BR=528;BVAR;BaseQRankSum=-4.929;DEL;DP=10764;Dels=0.01;EL=26;EPP=6.5127;ER=36;FS=3.851;HETAR=366;HOMA=383;HOMR=304;HRun=1;InbreedingCoeff=0.0267;LEN=1;LRB=0.711;LRBP=4014.1;MQ0=1;MQ0Fraction=0.0005;MQM=76.468;MQRankSum=1.327;NS=1070;RA=2588;RL=54;RPP=77.121;RR=8;RUN=1;ReadPosRankSum=-12.507;SAB=0.48387;SAF=30;SAP=3.1504;SAR=32;SRB=0.47643;SRF=1233;SRP=15.499;SRR=1355;VQSLOD=3.8673;set [...]
-20	11561096	.	CTA	C	999	PASS	AC=2;AF=0.0029;AF1=0.005602;BaseQRankSum=3.190;CI95=0.004425,0.01106;DP=7521;DP4=1998,1794,2,4;Dels=0.00;FQ=999;FR;FS=5.422;HP=3;HPLen=2;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0056;MQ=113.88;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.297;NF;NR;PP;PV4=0.43,0.024,1,1;ReadPosRankSum=1.406;SC=CAATAGTATTCTATGTCAGTC;TC;TR=1;TU=T;VQSLOD=8.6243;set=Intersection;sumGLbyD=21.89
-20	11723671	.	C	CA	1096.60	PASS	AA=35;AB=0.69565;ABA=35;ABP=41.247;ABR=80;AC=10;AF=0.0141;AN=710;BL=2005;BR=1702;BVAR;BaseQRankSum=-3.427;DP=9819;Dels=0.00;EL=20;EPP=4.5614;ER=15;FR;FS=3.814;HETAR=20;HOMA=0;HOMR=1034;HP=8;HPLen=7;HR=7;HRun=7;HU=A;INS;InbreedingCoeff=0.0323;LEN=1;LRB=0.081737;LRBP=56.79;MQ0=0;MQ0Fraction=0.0000;MQM=81.057;MQRankSum=0.050;NF;NR;NS=1054;PP;RA=5562;RL=22;RPP=8.0357;RR=13;RUN=1;ReadPosRankSum=-2.012;SAB=0.71429;SAF=25;SAP=16.97;SAR=10;SC=ATATTGAAGACAAAAAAACAG [...]
-20	11767787	.	CA	C	1382.10	PASS	AA=24;AB=0.56667;ABA=13;ABP=4.1684;ABR=17;AC=10;AF=0.00810;AN=1234;BL=967;BR=819;BVAR;BaseQRankSum=1.629;DEL;DP=22318;DP4=2190,2491,8,14;Dels=0.01;EL=16;EPP=8.8009;ER=8;FQ=999;FR;FS=2.536;HETAR=6;HOMA=3;HOMR=1051;HP=2;HPLen=1;HR=1;HRun=1;HU=A;INDEL;InbreedingCoeff=0.0823;LEN=1;LRB=0.082867;LRBP=29.642;MQ=65.44;MQ0Fraction=0.0032;MQM=50.583;MQRankSum=0.931;NF;NR;NS=1060;PP;PV4=0.39,0.018,1,0.37;RA=5568;RL=11;RPP=3.3722;RR=13;RUN=1;ReadPosRankSum=-0.694;SAB= [...]
-20	12021825	.	A	AG	1063.30	PASS	AA=26;AB=0.53704;ABA=25;ABP=3.6537;ABR=29;AC=12;AF=0.0214;AN=562;BL=1077;BR=815;BVAR;BaseQRankSum=-3.787;DP=22049;DP4=2650,2464,13,12;Dels=0.00;EL=18;EPP=11.362;ER=8;FR;FS=0.735;HETAR=12;HOMA=1;HOMR=1064;HP=1;HR=1;HRun=1;HU=G;INDEL;INS;InbreedingCoeff=0.0876;LEN=1;LRB=0.13848;LRBP=81.794;MQ=102.78;MQ0=0;MQ0Fraction=0.0000;MQM=85.538;MQRankSum=-0.126;NF;NR;NS=1077;PP;PV4=1,1,0.19,0.2;RA=6457;RL=17;RPP=8.3555;RR=9;RUN=1;ReadPosRankSum=-1.941;SAB=0.57692;SAF= [...]
-20	12238835	rs113904674	CTCTTCATGGTCT	C	1813.44	PASS	AA=7;AB=0.73077;ABA=7;ABP=15.037;ABR=19;AC=4;AF=0.0056;AN=712;BL=360;BR=368;BVAR;BaseQRankSum=3.891;DB;DEL;DP=10309;Dels=0.00;EL=4;EPP=3.3205;ER=3;FR;FS=0.000;HETAR=3;HOMA=0;HOMR=1076;HP=1;HPLen=2;HR=2;HRun=0;HU=C;InbreedingCoeff=-0.0381;LEN=12;LRB=0.010989;LRBP=3.2012;MQ0=0;MQ0Fraction=0.0000;MQM=37;MQRankSum=-3.793;NF;NR;NS=1079;PP;RA=6085;RL=4;RPP=3.3205;RR=3;RUN=1;ReadPosRankSum=1.319;SAB=0.42857;SAF=3;SAP=3.3205;SAR=4;SC=CTTAATGCT [...]
-20	12602812	.	AT	A	12344	PASS	AA=47;AB=0.94372;ABA=43;ABP=1309.5;ABR=721;AC=14;AF=0.0196;AN=716;BL=2714;BR=217;BVAR;BaseQRankSum=1.424;DEL;DP=10743;Dels=0.00;EL=24;EPP=3.0565;ER=23;FS=0.629;HETAR=228;HOMA=65;HOMR=769;HRun=1;InbreedingCoeff=0.0233;LEN=1;LRB=0.85193;LRBP=4622.3;MQ0Fraction=0.0000;MQM=99.574;MQRankSum=1.901;NS=1080;RA=4839;RL=46;RPP=96.568;RR=1;RUN=1;ReadPosRankSum=-9.906;SAB=0.53191;SAF=25;SAP=3.4261;SAR=22;SRB=0.51106;SRF=2473;SRP=8.148;SRR=2366;VQSLOD=2.8161;set=filterIn [...]
-20	13600884	.	CTG	C,CTGTG	1278.10	PASS	AA=85;AB=0.77994;ABA=79;ABP=247.38;ABR=280;AC=71,22;AF=0.05907,0.01830;AN=1202;BL=3279;BR=3205;BVAR;BaseQRankSum=8.852;DEL;DP=24185;DP4=1317,931,52,49;Dels=0.03;EL=45;EPP=3.649;ER=40;FQ=999;FR;FS=31.826;HETAR=75;HOMA=4;HOMR=926;HP=2;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1566;LEN=2;LRB=0.011413;LRBP=4.8442;MQ=65.06;MQ0Fraction=0.0012;MQM=48.671;MQRankSum=-0.511;NF;NR;NS=1005;PP;PV4=0.18,1,0.39,0.27;RA=3342;RL=35;RPP=8.7583;RR=50;RUN=1;Read [...]
-20	13666265	.	T	TATAG	556.88	PASS	AC=21;AF=0.01959;AN=1072;BaseQRankSum=24.958;DP=2706;FS=2.581;HRun=0;HaplotypeScore=25.9952;InbreedingCoeff=0.1419;MQ=72.43;MQ0=0;MQ0Fraction=0.0000;MQRankSum=2.888;QD=4.38;ReadPosRankSum=2.552;SB=-417.04;VQSLOD=7.3380;set=VQSR
-20	13861245	rs72422273	C	CTCA	2685.46	PASS	AC=140;AF=0.11589;AN=1208;BaseQRankSum=24.355;DB;DP=2910;FS=6.808;HRun=0;HaplotypeScore=19.3095;InbreedingCoeff=-0.0991;MQ=78.25;MQ0=22;MQ0Fraction=0.0076;MQRankSum=3.225;QD=3.64;ReadPosRankSum=2.607;SB=-1861.38;VQSLOD=4.1974;set=VQSR
-20	13865746	.	T	TA,TAA	1416.23	PASS	AA=63;AB=0.80417;ABA=47;ABP=195.87;ABR=193;AC=122,21;AF=0.10133,0.01744;AN=1204;BL=3673;BR=1145;BVAR;BaseQRankSum=-3.336;DP=10513;Dels=0.00;EL=62;EPP=131.27;ER=1;FR;FS=716.583;HETAR=45;HOMA=1;HOMR=998;HP=2;HR=1;HRun=1;HU=A;INS;InbreedingCoeff=0.0814;LEN=1;LRB=0.5247;LRBP=2883.3;MQ0=0;MQ0Fraction=0.0000;MQM=56.143;MQRankSum=-1.197;NF;NR;NS=1044;PP;RA=4529;RL=62;RPP=131.27;RR=1;RUN=1;ReadPosRankSum=-12.295;SAB=1;SAF=63;SAP=139.81;SAR=0;SC=GGAACATGGATACCC [...]
-20	13881703	.	CTT	C	152.85	PASS	AC=8;AF=0.0093;AN=862;BaseQRankSum=3.941;DP=2063;FS=0.962;HRun=5;HaplotypeScore=24.0313;InbreedingCoeff=0.0790;MQ=55.05;MQ0=49;MQ0Fraction=0.0238;MQRankSum=-1.418;QD=3.47;ReadPosRankSum=-0.605;SB=-93.04;VQSLOD=5.3874;set=VQSR
-20	14033345	.	A	AT	2718.30	PASS	AA=91;AB=0.80899;ABA=85;ABP=372.04;ABR=360;AC=43;AF=0.03895;AN=1104;BL=3916;BR=4753;BVAR;BaseQRankSum=-6.609;DP=8350;Dels=0.02;EL=46;EPP=3.0342;ER=45;FR;FS=0.498;HETAR=70;HOMA=1;HOMR=871;HP=11;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.0952;LEN=1;LRB=0.096551;LRBP=178.49;MQ0=0;MQ0Fraction=0.0000;MQM=54.879;MQRankSum=2.164;NF;NR;NS=942;PP;RA=3717;RL=37;RPP=9.9065;RR=54;RUN=1;ReadPosRankSum=-1.447;SAB=0.48352;SAF=44;SAP=3.2251;SAR=47;SC=TTGCAAACAGATTTTTTTTTT;S [...]
-20	14260090	rs73619828	A	AT	27935	PASS	AA=596;AB=0.59484;ABA=487;ABP=96.922;ABR=715;AC=204;AF=0.17000;AN=1200;BL=21718;BR=28458;BVAR;BaseQRankSum=0.756;DB;DP=23629;DP4=1385,1492,287,328;Dels=0.00;EL=299;EPP=3.0249;ER=297;FQ=999;FR;FS=6.187;HETAR=218;HOMA=38;HOMR=788;HP=9;HPLen=9;HR=9;HRun=9;HU=T;INDEL;INS;InbreedingCoeff=0.0797;LEN=1;LRB=0.13433;LRBP=1969;MQ=100.81;MQ0=0;MQ0Fraction=0.0000;MQM=57.084;MQRankSum=2.224;NF;NR;NS=1044;PP;PV4=0.53,1,1.2e-11,1;RA=4143;RL=238;RPP=55.475;RR=358;R [...]
-20	14260558	.	AC	A	238	PASS	AC=1;AF=0.0014;AF1=0.003368;BaseQRankSum=2.868;CI95=0.003106,0.006211;DP=9724;DP4=2075,2329,1,7;Dels=0.00;FQ=106;FR;FS=10.678;HP=1;HPLen=2;HR=2;HRun=1;HU=A;INDEL;InbreedingCoeff=-0.0406;MQ=114.37;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.862;NF;NR;PP;PV4=0.074,0.0096,0.017,1;ReadPosRankSum=-0.042;SC=ATCAGGAATAACTGTGTGACC;TC;TR=2;TU=A;VQSLOD=8.1618;set=Intersection;sumGLbyD=18.65
-20	14425481	.	GTA	G,GTATA	148.85	PASS	AC=43,23;AF=0.03473,0.01858;AN=1238;BaseQRankSum=6.289;DP=25167;DP4=1800,2021,38,49;FR;FS=9.416;HP=2;HPLen=1;HR=1;HU=T;HaplotypeScore=17.7453;INDEL;InbreedingCoeff=0.0995;MQ0=21;MQ0Fraction=0.0058;MQRankSum=-0.200;NF;NR;PP;PV4=0.59,1,0.04,0.023;QD=0.35;ReadPosRankSum=-1.689;SB=-367.50;SC=CTGTGTGTGTGTATATATATA;TC;TR=13;TU=AT;VQSLOD=3.5796;set=filterInVQSR-2of5
-20	14943522	rs11478299	GA	AA,G	1761.24	PASS	AA=117;AB=0.68142;ABA=108;ABP=99.919;ABR=231;AC=0;AF=0.0000;AF1=0.04204;AN=712;BL=4931;BR=5802;BVAR;BaseQRankSum=9.118;CI95=0.02876,0.05752;DB;DEL;DP=13717;DP4=1908,1684,59,58;Dels=0.05;EL=60;EPP=3.1773;ER=57;FQ=81.9;FR;HETAR=56;HOMA=1;HOMR=1011;HP=8;HPLen=8;HR=8;HU=A;INDEL;InbreedingCoeff=0.1264;LEN=1;LRB=0.081152;LRBP=156.5;MQ=106.93;MQ0=0;MQ0Fraction=0.0000;MQM=96.855;MQRankSum=1.619;NF;NR;NS=1068;PP;PV4=0.57,1,0.0003,1;QD=7.40;RA=5080;RL=56 [...]
-20	14974486	.	A	AG	4101.40	PASS	AA=57;AB=0.57143;ABA=51;ABP=8.2839;ABR=68;AC=22;AF=0.01846;AN=1192;BL=2286;BR=2834;BVAR;BaseQRankSum=8.711;DP=20538;DP4=2172,2100,19,13;Dels=0.00;EL=32;EPP=4.877;ER=25;FS=0.517;HETAR=20;HOMA=4;HOMR=1027;HRun=1;INDEL;INS;InbreedingCoeff=0.0677;LEN=1;LRB=0.10703;LRBP=130.37;MQ=126.07;MQ0=0;MQ0Fraction=0.0000;MQM=56.088;MQRankSum=-10.756;NS=1051;PV4=0.38,3.5e-51,7.9e-34,1;RA=5203;RL=26;RPP=3.9627;RR=31;RUN=1;ReadPosRankSum=1.283;SAB=0.54386;SAF=31;SAP=3.9627; [...]
-20	15111137	.	GA	G	13533	PASS	AA=98;AB=0.84864;ABA=89;ABP=623.8;ABR=499;AC=47;AF=0.03796;AN=1238;BL=5324;BR=856;BVAR;BaseQRankSum=-11.577;DEL;DP=13384;Dels=0.01;EL=53;EPP=4.4284;ER=45;FS=6.099;HETAR=219;HOMA=845;HOMR=18;HRun=1;InbreedingCoeff=-0.0056;LEN=1;LRB=0.72298;LRBP=7017.4;MQ0Fraction=0.0003;MQM=90.449;MQRankSum=1.408;NS=1083;RA=590;RL=87;RPP=130.99;RR=11;RUN=1;ReadPosRankSum=-18.074;SAB=0.55102;SAF=54;SAP=5.2261;SAR=44;SRB=0.52373;SRF=309;SRP=5.8958;SRR=281;VQSLOD=4.1054;set=filt [...]
-20	15283028	.	A	AC,ACACACACACACAC	140844.83	PASS	AA=180;AB=0.61442;ABA=123;ABP=39.285;ABR=196;AC=13,817;AF=0.01111,0.69829;AN=1170;BL=4453;BR=11407;BVAR;BaseQRankSum=24.686;DP=6365;Dels=0.00;EL=124;EPP=58.793;ER=56;FR;FS=10.912;HETAR=87;HOMA=48;HOMR=683;HP=1;HR=1;HRun=1;HU=T;INS;InbreedingCoeff=0.2074;LEN=1;LRB=0.43846;LRBP=6624;MQ0Fraction=0.0558;MQM=38.211;MQRankSum=-21.111;NF;NR;NS=818;PP;RA=1732;RL=0;RPP=393.88;RR=180;RUN=1;ReadPosRankSum=-7.620;SAB=0.31111;SAF=56;SAP=58.793;SAR=124; [...]
-20	15361056	.	ATAACT	A	4892.81	PASS	AA=59;AB=0.63576;ABA=55;ABP=27.184;ABR=96;AC=34;AF=0.0487;AN=698;BL=3164;BR=1999;BVAR;BaseQRankSum=3.391;DEL;DP=7080;Dels=0.03;EL=27;EPP=3.9304;ER=32;FR;FS=4.816;HETAR=35;HOMA=6;HOMR=966;HP=2;HPLen=3;HR=3;HRun=0;HU=A;InbreedingCoeff=0.0785;LEN=5;LRB=0.22564;LRBP=573.84;MQ0=0;MQ0Fraction=0.0000;MQM=70.034;MQRankSum=-8.732;NF;NR;NS=1008;PP;RA=3915;RL=42;RPP=26.013;RR=17;RUN=1;ReadPosRankSum=-0.735;SAB=0.44068;SAF=26;SAP=4.8137;SAR=33;SC=AGATTAGGAAATAACTT [...]
-20	15579507	.	AATTAGTC	A,TATTAGTC	1936.38	PASS	AA=16;AB=0.58974;ABA=16;ABP=5.7386;ABR=23;AC=64;AF=0.05229;AN=1224;BL=699;BR=775;BVAR;BaseQRankSum=-21.390;DEL;DP=21920;DP4=2099,2403,6,6;Dels=0.00;EL=8;EPP=3.0103;ER=8;FR;FS=2.920;HETAR=5;HOMA=0;HOMR=1063;HP=3;HPLen=4;HR=4;HU=A;INDEL;InbreedingCoeff=-0.0143;LEN=7;LRB=0.05156;LRBP=11.519;MQ=129.49;MQ0=0;MQ0Fraction=0.0000;MQM=51.938;MQRankSum=3.331;NF;NR;NS=1068;PP;PV4=1,0.019,1.3e-07,1;RA=5334;RL=5;RPP=7.8961;RR=11;RUN=1;ReadPosRankSum=-16. [...]
-20	15752535	.	CT	C,GT	3775.20	PASS	AA=92;AB=0.78636;ABA=47;ABP=159.71;ABR=173;AC=0;AF=0.0000;AN=608;BL=4955;BR=2380;BVAR;BaseQRankSum=2.910;DEL;DP=3429;Dels=0.04;EL=13;EPP=105.82;ER=79;FR;HETAR=92;HOMA=95;HOMR=544;HP=2;HPLen=2;HR=2;HU=T;InbreedingCoeff=0.0483;LEN=1;LRB=0.35106;LRBP=1966;MQ0Fraction=0.0232;MQM=35.293;MQRankSum=-2.199;NF;NR;NS=732;PP;QD=4.91;RA=1272;RL=81;RPP=118.66;RR=11;RUN=1;ReadPosRankSum=-1.077;SAB=0.021739;SAF=2;SAP=185.79;SAR=90;SB=-59.51;SC=CAAGACCATCCTTGGCTAACA;SR [...]
-20	15883060	rs73619850	A	AT	1325.60	PASS	AA=38;AB=0.59302;ABA=35;ABP=9.4742;ABR=51;AC=14;AF=0.0156;AN=896;BL=1078;BR=1638;BVAR;BaseQRankSum=-4.526;DB;DP=19854;DP4=1632,1800,15,20;Dels=0.00;EL=18;EPP=3.2389;ER=20;FR;FS=0.000;HETAR=14;HOMA=1;HOMR=1014;HP=1;HPLen=1;HR=1;HRun=1;HU=T;INDEL;INS;InbreedingCoeff=-0.0131;LEN=1;LRB=0.20619;LRBP=253.74;MQ=118.40;MQ0=0;MQ0Fraction=0.0000;MQM=56.526;MQRankSum=0.892;NF;NR;NS=1029;PP;PV4=0.61,1,0.25,0.14;RA=4439;RL=14;RPP=8.7247;RR=24;RUN=1;ReadPosRank [...]
-20	16073315	rs111824749	GA	G,GAA,GAAA	6400.63	PASS	AC=138,47,20;AF=0.11577,0.03943,0.01678;AN=1192;BVAR;BaseQRankSum=11.377;DB;DEL;DP=35284;DP4=1695,1547,60,56;Dels=0.08;FR;FS=9.576;HP=11;HPLen=10;HR=10;HRun=10;HU=A;INDEL;INS;InbreedingCoeff=0.2137;MQ=106.87;MQ0=1;MQ0Fraction=0.0003;MQRankSum=0.773;NF;NR;PP;PV4=0.92,1,0.024,0.45;RUN=1;ReadPosRankSum=-2.224;SC=TATTTGAGGAGAAAAAAAAAA;TC;TR=10;TU=A;VQSLOD=9.3264;set=Intersection;sumGLbyD=8.64
-20	16122099	.	GA	G	12914	PASS	AA=85;AB=0.85915;ABA=80;ABP=639.4;ABR=488;AC=19;AF=0.01542;AN=1232;BL=805;BR=5457;BVAR;BaseQRankSum=-6.084;DEL;DP=13592;Dels=0.00;EL=45;EPP=3.649;ER=40;FS=0.935;HETAR=218;HOMA=841;HOMR=14;HRun=2;InbreedingCoeff=0.0250;LEN=1;LRB=0.74289;LRBP=7507.5;MQ0=0;MQ0Fraction=0.0000;MQM=103.01;MQRankSum=2.843;NS=1075;RA=541;RL=2;RPP=170.62;RR=83;RUN=1;ReadPosRankSum=-16.222;SAB=0.49412;SAF=42;SAP=3.0358;SAR=43;SRB=0.44917;SRF=243;SRP=15.152;SRR=298;VQSLOD=3.9745;set=fi [...]
-20	16828509	.	G	GT	843.62	PASS	AA=30;AB=0.70103;ABA=29;ABP=37.06;ABR=68;AC=10;AF=0.0140;AN=714;BL=1368;BR=1786;BVAR;BaseQRankSum=-4.061;DP=8682;Dels=0.01;EL=14;EPP=3.2998;ER=16;FR;FS=2.681;HETAR=22;HOMA=1;HOMR=1020;HP=8;HPLen=8;HR=8;HRun=8;HU=T;INS;InbreedingCoeff=0.1389;LEN=1;LRB=0.13253;LRBP=123.3;MQ0=0;MQ0Fraction=0.0000;MQM=62.8;MQRankSum=-1.491;NF;NR;NS=1043;PP;RA=4416;RL=11;RPP=7.6428;RR=19;RUN=1;ReadPosRankSum=-1.718;SAB=0.76667;SAF=23;SAP=21.54;SAR=7;SC=CCTTCAAAAGGTTTTTTTTGG;SRB= [...]
-20	17470034	.	GC	G	46975	PASS	AA=57;AB=0.96043;ABA=52;ABP=2422.5;ABR=1262;AC=34;AF=0.02773;AN=1226;BL=418;BR=3446;BVAR;BaseQRankSum=-6.250;DEL;DP=12035;Dels=0.00;EL=22;EPP=9.4485;ER=35;FS=1.350;HETAR=416;HOMA=409;HOMR=244;HRun=1;InbreedingCoeff=0.0083;LEN=1;LRB=0.78364;LRBP=5155.6;MQ0=0;MQ0Fraction=0.0000;MQM=99.509;MQRankSum=2.192;NS=1076;RA=2396;RL=5;RPP=87.164;RR=52;RUN=1;ReadPosRankSum=-15.199;SAB=0.5614;SAF=32;SAP=4.877;SAR=25;SRB=0.52963;SRF=1269;SRP=21.285;SRR=1127;VQSLOD=3.8440;s [...]
-20	17471374	.	AGCGGC	A	850.03	PASS	AC=6;AF=0.0085;AF1=0.01301;AN=704;BaseQRankSum=6.259;CI95=0.00885,0.01991;DP=8180;DP4=2215,1878,4,5;Dels=0.01;FQ=131;FS=0.000;HRun=0;INDEL;InbreedingCoeff=0.0009;MQ=104.41;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-5.521;PV4=0.74,0.37,0.0005,1;ReadPosRankSum=2.468;VQSLOD=6.8773;set=Intersection;sumGLbyD=30.85
-20	18433202	rs35582929	G	GA	2506.90	PASS	AA=55;AB=0.5812;ABA=49;ABP=9.7103;ABR=68;AC=20;AF=0.0218;AN=918;BL=2263;BR=2175;BVAR;BaseQRankSum=-6.639;DB;DP=19467;DP4=1845,2365,27,26;Dels=0.00;EL=21;EPP=9.6826;ER=34;FQ=999;FR;FS=5.633;HETAR=16;HOMA=3;HOMR=1045;HP=2;HPLen=3;HR=3;HRun=1;HU=G;INDEL;INS;InbreedingCoeff=0.0700;LEN=1;LRB=0.019829;LRBP=6.7994;MQ=114.03;MQ0=0;MQ0Fraction=0.0000;MQM=83.345;MQRankSum=1.610;NF;NR;NS=1064;PP;PV4=0.33,1,1,1;RA=5380;RL=28;RPP=3.0498;RR=27;RUN=1;ReadPosRank [...]
-20	18551314	rs10659122	CA	C,CAA,CAAA,CAAAA,CAAAAA	18810.74	PASS	ABR=243;AC=19,169,216,164,188;AF=0.01816,0.16157,0.20650,0.15679,0.17973;BVAR;BaseQRankSum=-5.742;DB;DP=17637;DP4=136,77,560,237;FR;FS=2.693;HOMA=177;HOMR=299;HP=17;HR=17;HU=A;HaplotypeScore=15.5048;INDEL;INS;InbreedingCoeff=0.8901;MQ0=11;MQ0Fraction=0.0069;MQRankSum=1.845;NF;NR;NS=658;PP;PV4=0.08,1,1,1;QD=12.66;RA=673;RUN=1;ReadPosRankSum=0.283;SB=-3514.45;SC=GATTCCATCTCAAAAAAAAAA;SRB=0.63596;SRF=428;SRP=111.06;SRR=245;TC;T [...]
-20	18785519	.	G	GTC	415.55	PASS	AC=28;AF=0.0400;AN=700;BaseQRankSum=10.889;DP=1929;FS=8.778;HRun=0;HaplotypeScore=27.6448;InbreedingCoeff=0.0510;MQ=61.99;MQ0=36;MQ0Fraction=0.0187;MQRankSum=4.508;QD=3.08;ReadPosRankSum=8.080;SB=-437.03;VQSLOD=4.9313;set=VQSR
-20	19149501	.	A	AG	17.85	PASS	AC=1;AF=0.0015;AN=670;BaseQRankSum=0.769;DP=1635;FS=9.858;HRun=0;HaplotypeScore=12.1949;InbreedingCoeff=-0.0381;MQ=102.63;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.200;QD=3.23;ReadPosRankSum=0.292;SB=-7.06;VQSLOD=4.4695;set=VQSR
-20	19540281	.	AC	A	19710	PASS	AA=145;AB=0.81843;ABA=134;ABP=652.98;ABR=604;AC=115;AF=0.09583;AN=1200;BL=9637;BR=817;BVAR;BaseQRankSum=-13.669;DEL;DP=10963;Dels=0.01;EL=66;EPP=5.5412;ER=79;FS=1.252;HETAR=305;HOMA=681;HOMR=59;HRun=1;InbreedingCoeff=0.0298;LEN=1;LRB=0.8437;LRBP=16162;MQ0=0;MQ0Fraction=0.0000;MQM=118.51;MQRankSum=-2.194;NS=1046;RA=823;RL=141;RPP=284.09;RR=4;RUN=1;ReadPosRankSum=-20.775;SAB=0.45517;SAF=66;SAP=5.5412;SAR=79;SRB=0.452;SRF=372;SRP=19.477;SRR=451;VQSLOD=3.9584;se [...]
-20	20015051	.	TGAGGGTGG	T	1820.73	PASS	AF=0.0112;AF1=0.01638;AN=714;BaseQRankSum=6.652;CI95=0.01106,0.02212;DP=9910;DP4=2812,1912,6,11;Dels=0.01;FQ=999;FR;FS=6.147;HP=1;HPLen=2;HR=2;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0077;MQ=129.13;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-3.195;NF;NR;PP;PV4=0.049,1,5.5e-05,0.006;ReadPosRankSum=-1.989;SC=TTGGTGGAGTTGAGGGTGGGA;TC;TR=2;TU=T;VQSLOD=6.5963;set=Intersection;sumGLbyD=33.49
-20	20301041	rs35451634	ATATG	A	200.42	PASS	AC=21;AF=0.0449;AN=468;BaseQRankSum=5.251;DB;DP=579;FS=24.013;HRun=0;HaplotypeScore=27.8977;InbreedingCoeff=0.0113;MQ=78.47;MQ0=26;MQ0Fraction=0.0449;MQRankSum=-5.284;QD=3.06;ReadPosRankSum=1.793;SB=-55.76;VQSLOD=5.0981;set=VQSR
-20	20378174	.	TC	T	245.55	PASS	AC=23;AF=0.01879;AN=1224;BaseQRankSum=0.990;DP=3225;FS=10.413;HRun=1;HaplotypeScore=22.6109;InbreedingCoeff=0.0244;MQ=93.70;MQ0=3;MQ0Fraction=0.0009;MQRankSum=-3.349;QD=1.86;ReadPosRankSum=-7.227;SB=-188.62;VQSLOD=4.2553;set=VQSR
-20	20809160	rs10571503	TAA	AAA,T	3496	PASS	AC=0;AF=0.0000;AN=612;BaseQRankSum=1.968;DB;DP=1092;FR;HP=4;HPLen=3;HR=3;HRun=0;HU=A;HaplotypeScore=26.1253;InbreedingCoeff=0.0603;MQ=68.98;MQ0=1;MQ0Fraction=0.0009;MQRankSum=1.520;NF;NR;PP;ReadPosRankSum=-4.042;SC=TATATATATATAAATTTAAAT;TC;TR=13;TU=AT;set=filterInVQSR-2of5
-20	22508765	.	CT	C	53877.84	PASS	AA=187;AB=0.78077;ABA=171;ABP=537.09;ABR=609;AC=1017;AF=0.91787;AN=1108;BL=12690;BR=1718;BVAR;BaseQRankSum=13.773;DEL;DP=7430;Dels=0.02;EL=73;EPP=22.53;ER=114;FR;FS=16.352;HETAR=152;HOMA=9;HOMR=786;HP=8;HR=4;HRun=4;HU=T;InbreedingCoeff=0.3885;LEN=1;LRB=0.76152;LRBP=18147;MQ0=0;MQ0Fraction=0.0000;MQM=46.086;MQRankSum=0.971;NF;NR;NS=947;PP;RA=2868;RL=177;RPP=326.86;RR=10;RUN=1;ReadPosRankSum=9.951;SAB=0.34759;SAF=65;SAP=40.738;SAR=122;SC=AAAAAATTTTCTTTTGAAC [...]
-20	22555082	rs11477526	AT	A	11503	PASS	AA=530;AB=0.50816;ABA=422;ABP=3.5063;ABR=436;AF=0.1614;AN=700;BL=21453;BR=23313;BVAR;BaseQRankSum=17.562;DB;DEL;DP=25587;DP4=1869,1600,283,201;Dels=0.14;EL=259;EPP=3.6003;ER=271;FQ=999;FR;FS=14.595;HETAR=159;HOMA=41;HOMR=846;HP=3;HPLen=3;HR=3;HRun=3;HU=T;INDEL;InbreedingCoeff=0.0995;LEN=1;LRB=0.041549;LRBP=170.83;MQ=95.89;MQ0=0;MQ0Fraction=0.0000;MQM=72.162;MQRankSum=2.564;NF;NR;NS=1046;PP;PV4=0.058,6.6e-129,0.04,1;RA=4303;RL=264;RPP=3.0267;RR=266;R [...]
-20	22590907	.	A	AC	4204.88	PASS	AA=67;AB=0.592;ABA=51;ABP=12.2;ABR=74;AF=0.0554;AF1=0.0468;AN=560;BL=2277;BR=2389;BVAR;BaseQRankSum=10.968;CI95=0.03759,0.05639;DP=14380;DP4=2514,2018,33,33;Dels=0.00;EL=22;EPP=20.155;ER=45;FQ=999;FR;FS=3.846;HETAR=25;HOMA=4;HOMR=1049;HP=4;HPLen=5;HR=5;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.0719;LEN=1;LRB=0.024003;LRBP=8.8481;MQ=110.68;MQ0=0;MQ0Fraction=0.0000;MQM=96.149;MQRankSum=2.668;NF;NR;NS=1078;PP;PV4=0.39,1,0.46,0.36;RA=5468;RL=33;RPP=3.0427;RR=34; [...]
-20	22806326	rs11468890	ATTCCATCAC	A	105320.99	PASS	AC=567;AF=0.48795;AN=1162;BVAR;BaseQRankSum=32.858;DB;DEL;DP=26278;DP4=727,796,554,587;Dels=0.30;FQ=999;FR;FS=1.923;HP=3;HPLen=3;HR=2;HRun=0;HU=T;INDEL;InbreedingCoeff=0.2548;LEN=9;MQ=89.42;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-23.545;NF;NR;PP;PV4=0.7,1,1.3e-167,1;RUN=1;ReadPosRankSum=4.384;SC=GGCTGCTCCCATTCCATCACT;TC;TR=2;TU=T;VQSLOD=8.2594;set=Intersection;sumGLbyD=69.81
-20	22999898	rs55966257	CAGGA	C	8019.97	PASS	AA=23;AB=0.57778;ABA=19;ABP=5.3748;ABR=26;AC=214;AF=0.18838;AN=1136;BL=1143;BR=1040;BVAR;BaseQRankSum=29.294;DB;DEL;DP=8216;Dels=0.02;EL=11;EPP=3.1047;ER=12;FS=14.938;HETAR=14;HOMA=2;HOMR=948;HRun=0;InbreedingCoeff=0.0797;LEN=4;LRB=0.047183;LRBP=13.563;MQ0=0;MQ0Fraction=0.0000;MQM=34.783;MQRankSum=-20.301;NS=964;RA=3637;RL=13;RPP=3.86;RR=10;RUN=1;ReadPosRankSum=-24.607;SAB=0.47826;SAF=11;SAP=3.1047;SAR=12;SRB=0.49024;SRF=1783;SRP=6.02;SRR=1854; [...]
-20	23385964	rs57723772	GAA	G	8170.95	PASS	AC=257;AF=0.20928;AN=1228;BaseQRankSum=32.220;DB;DP=3291;FS=1.688;HRun=3;HaplotypeScore=22.6739;InbreedingCoeff=0.0171;MQ=58.44;MQ0=32;MQ0Fraction=0.0097;MQRankSum=-4.893;QD=6.55;ReadPosRankSum=-35.524;SB=-3631.67;VQSLOD=5.6549;set=VQSR
-20	23534530	.	TA	T	3542.10	PASS	AA=45;AB=0.75658;ABA=37;ABP=89.926;ABR=115;AC=35;AF=0.02991;AN=1170;BL=3090;BR=270;BVAR;BaseQRankSum=-6.892;DEL;DP=8108;Dels=0.00;EL=19;EPP=5.3748;ER=26;FS=1.026;HETAR=76;HOMA=896;HOMR=18;HRun=1;InbreedingCoeff=0.0551;LEN=1;LRB=0.83929;LRBP=5142.4;MQ0Fraction=0.0017;MQM=41.578;MQRankSum=0.818;NS=991;RA=203;RL=43;RPP=84.127;RR=2;RUN=1;ReadPosRankSum=-12.923;SAB=0.37778;SAF=17;SAP=8.8491;SAR=28;SRB=0.5665;SRF=115;SRP=10.808;SRR=88;VQSLOD=4.2093;set=Intersect [...]
-20	23976810	rs5841018	A	ATATTAAT	1782.38	PASS	AF=0.1387;AF1=0.01507;BaseQRankSum=3.717;CI95=0.00188,0.03947;DB;DP=1712;DP4=357,376,7,2;Dels=0.00;FQ=31.1;FS=14.489;HPLen=2;HRun=0;INDEL;InbreedingCoeff=0.1123;MQ=49.53;MQ0=2;MQ0Fraction=0.0055;MQRankSum=-4.928;PV4=0.1,1,0.00085,0.016;ReadPosRankSum=-4.456;VQSLOD=5.3140;dbSNP=116;set=Intersection;sumGLbyD=19.98
-20	24222100	.	CTTTTA	C	4219.36	PASS	AA=57;AB=0.59434;ABA=43;ABP=11.205;ABR=63;AF=0.01803;AF1=0.01547;AN=1220;BL=2073;BR=2345;BVAR;BaseQRankSum=7.990;CI95=0.0114,0.02137;DEL;DP=17536;DP4=2140,2346,7,12;Dels=0.01;EL=32;EPP=4.877;ER=25;FQ=104;FS=0.614;HETAR=21;HOMA=4;HOMR=1042;HRun=0;INDEL;InbreedingCoeff=0.1941;LEN=5;LRB=0.061566;LRBP=39.374;MQ=73.32;MQ0Fraction=0.0021;MQM=39.614;MQRankSum=-5.728;NS=1067;PV4=0.37,1.1e-39,3.5e-09,1;RA=5527;RL=28;RPP=3.0484;RR=29;RUN=1;ReadPosRankSum=0.214;S [...]
-20	24395018	.	AT	A	49310	PASS	AA=146;AB=0.91198;ABA=130;ABP=2180.5;ABR=1347;AC=50;AF=0.04045;AN=1236;BL=587;BR=9625;BVAR;BaseQRankSum=-4.610;DEL;DP=12793;Dels=0.01;EL=54;EPP=24.487;ER=92;FS=22.108;HETAR=485;HOMA=384;HOMR=210;HRun=2;InbreedingCoeff=0.0374;LEN=1;LRB=0.88504;LRBP=17373;MQ0=0;MQ0Fraction=0.0000;MQM=102.26;MQRankSum=2.256;NS=1080;RA=2377;RL=1;RPP=311.42;RR=145;RUN=1;ReadPosRankSum=-16.347;SAB=0.63699;SAF=93;SAP=26.807;SAR=53;SRB=0.52167;SRF=1240;SRP=12.702;SRR=1137;VQSLOD=3.2 [...]
-20	24411517	.	C	CA	246.18	PASS	AF=0.01546;AF1=0.01095;BaseQRankSum=7.832;CI95=0.005698,0.01709;DP=7981;DP4=983,2037,7,7;Dels=0.00;FQ=27.9;FS=18.815;HPLen=3;HRun=3;INDEL;InbreedingCoeff=0.0175;MQ=60.28;MQ0Fraction=0.0137;MQRankSum=-7.243;PV4=0.25,1,2.7e-05,1;ReadPosRankSum=-0.143;VQSLOD=4.3701;set=Intersection;sumGLbyD=6.56
-20	24421169	.	AG	A	27480	PASS	AA=182;AB=0.8303;ABA=149;ABP=835;ABR=729;AC=89;AF=0.07224;AN=1232;BL=11276;BR=2214;BVAR;BaseQRankSum=-5.447;DEL;DP=11717;Dels=0.01;EL=103;EPP=9.8827;ER=79;FR;FS=15.492;HETAR=343;HOMA=607;HOMR=114;HP=4;HR=1;HRun=1;HU=G;InbreedingCoeff=0.0353;LEN=1;LRB=0.67176;LRBP=13222;MQ0=0;MQ0Fraction=0.0000;MQM=88.324;MQRankSum=2.221;NF;NR;NS=1071;PP;RA=1226;RL=169;RPP=293.37;RR=13;RUN=1;ReadPosRankSum=-19.711;SAB=0.54945;SAF=100;SAP=6.876;SAR=82;SC=CCTTAGCCCCAGAAAACATCT; [...]
-20	24765537	rs71841337	ATTT	A,AT,ATT,ATTTT,ATTTTT	37852	PASS	AC=13,120,527,51,92;AF=0.01102,0.10169,0.44661,0.04322,0.07797;AN=1180;BVAR;BaseQRankSum=8.172;DB;DEL;DP=39116;DP4=200,331,851,1169;FR;FS=2.394;HP=15;HR=15;HU=T;HaplotypeScore=20.8091;INDEL;INS;InbreedingCoeff=0.4815;MQ0=1;MQ0Fraction=0.0003;MQRankSum=4.344;NF;NR;PP;PV4=0.067,1,1,0.1;QD=7.90;RUN=1;ReadPosRankSum=1.798;SB=-8371.96;SC=CTCTGCAACAATTTTTTTTTT;TC;TR=15;TU=T;VQSLOD=9.9679;dbSNP=120;set=Intersection
-20	25500689	.	A	AATTT	84980.72	PASS	AC=1005;AF=0.89096;AN=1128;BaseQRankSum=17.400;DP=2324;FS=6.721;HRun=0;HaplotypeScore=25.3376;InbreedingCoeff=0.2148;MQ=75.19;MQ0=1;MQ0Fraction=0.0004;MQRankSum=-8.221;QD=38.28;ReadPosRankSum=4.504;SB=-34833.07;VQSLOD=4.6038;set=VQSR
-20	25550373	.	GA	G	11251.31	PASS	AA=246;AB=0.42963;ABA=154;ABP=14.624;ABR=116;AC=566;AF=0.6521;AN=868;BL=5230;BR=11845;BVAR;BaseQRankSum=7.418;DEL;DP=8885;Dels=0.02;EL=99;EPP=23.348;ER=147;FR;FS=50.357;HETAR=150;HOMA=849;HOMR=14;HP=1;HR=2;HRun=1;HU=G;InbreedingCoeff=0.1365;LEN=1;LRB=0.38741;LRBP=5567.9;MQ0=0;MQ0Fraction=0.0000;MQM=97.561;MQRankSum=0.050;NF;NR;NS=1013;PP;RA=269;RL=75;RPP=84.361;RR=171;RUN=1;ReadPosRankSum=-7.128;SAB=0.52846;SAF=130;SAP=4.7404;SAR=116;SC=CACGGAGGCGGAGGAAGC [...]
-20	25903865	.	TTC	T	7459.23	PASS	AC=277;AF=0.23316;AN=1188;BaseQRankSum=31.479;DP=2969;FS=137.723;HRun=0;HaplotypeScore=37.3300;InbreedingCoeff=-0.1755;MQ=53.49;MQ0=50;MQ0Fraction=0.0168;MQRankSum=-25.506;QD=4.70;ReadPosRankSum=-5.913;SB=-1747.98;VQSLOD=5.4731;set=VQSR
-20	25934237	.	C	CCACTT	771.36	PASS	AC=37;AF=0.0426;AN=868;BaseQRankSum=16.331;DP=2253;FS=4.545;HRun=0;HaplotypeScore=29.9764;InbreedingCoeff=-0.0685;MQ=48.12;MQ0=87;MQ0Fraction=0.0386;MQRankSum=-12.497;QD=3.37;ReadPosRankSum=-8.428;SB=-297.70;VQSLOD=4.2324;set=VQSR
-20	26054751	rs112967123	TATC	T	33244	PASS	AA=1863;AB=0.79012;ABA=1788;ABP=6231;ABR=6731;AC=227;AF=0.18218;AN=1246;BL=74924;BR=72452;BVAR;BaseQRankSum=32.258;DB;DEL;DP=36404;DS;Dels=0.05;EL=931;EPP=3.0115;ER=932;FR;FS=265.752;HETAR=527;HOMA=2;HOMR=565;HP=1;HR=2;HRun=0;HU=T;InbreedingCoeff=-0.2137;LEN=3;LRB=0.016773;LRBP=93.048;MQ0Fraction=0.0127;MQM=28.797;MQRankSum=-5.329;NF;NR;NS=1094;PP;RA=14604;RL=1014;RPP=34.743;RR=849;RUN=1;ReadPosRankSum=8.394;SAB=0.65486;SAF=1220;SAP=391.07;SAR=64 [...]
-20	26075169	.	CTTCATT	C	34603	PASS	AA=311;AB=0.88905;ABA=298;ABP=3534.4;ABR=2388;AC=235;AF=0.18921;AN=1242;BL=17537;BR=5525;BVAR;BaseQRankSum=33.761;DEL;DP=20706;DS;Dels=0.01;EL=206;EPP=74.236;ER=105;FR;FS=94.549;HETAR=596;HOMA=99;HOMR=336;HP=3;HR=2;HRun=0;HU=T;InbreedingCoeff=-0.2083;LEN=6;LRB=0.52086;LRBP=13589;MQ0Fraction=0.0426;MQM=14.524;MQRankSum=-37.199;NF;NR;NS=1038;PP;RA=3600;RL=311;RPP=678.34;RR=0;RUN=1;ReadPosRankSum=-27.333;SAB=0.66238;SAF=206;SAP=74.236;SAR=105;SC=TCACCATCAT [...]
-20	26120452	.	CAG	C	7863.19	PASS	AA=163;AB=0.70489;ABA=157;ABP=196.99;ABR=375;AC=171;AF=0.1908;AN=896;BL=3455;BR=4877;BVAR;BaseQRankSum=25.536;DEL;DP=7014;Dels=0.10;EL=58;EPP=32.438;ER=105;FS=231.723;HETAR=90;HOMA=5;HOMR=387;HRun=0;InbreedingCoeff=-0.1966;LEN=2;LRB=0.17067;LRBP=530;MQ0Fraction=0.0470;MQM=21.951;MQRankSum=-23.449;NS=482;RA=1117;RL=62;RPP=23.273;RR=101;RUN=1;ReadPosRankSum=1.904;SAB=0.37423;SAF=61;SAP=25.404;SAR=102;SRB=0.41719;SRF=466;SRP=69.544;SRR=651;VQSLOD=-0.9395;set [...]
-20	26136208	.	A	AT	17172.04	PASS	AA=252;AB=0.73593;ABA=183;ABP=338.07;ABR=510;AC=381;AF=0.30775;AN=1238;BL=8304;BR=14158;BVAR;BaseQRankSum=41.520;DP=40036;DP4=2448,2564,317,366;Dels=0.00;EL=163;EPP=50.197;ER=89;FQ=999;FS=6.531;HETAR=149;HOMA=52;HOMR=708;HRun=1;INDEL;INS;InbreedingCoeff=-0.3996;LEN=1;LRB=0.26062;LRBP=3315.9;MQ=64.20;MQ0=22;MQ0Fraction=0.0048;MQM=25.706;MQRankSum=-29.318;NS=909;PV4=0.24,1.1e-119,3.2e-281,1;RA=2939;RL=58;RPP=162.39;RR=194;RUN=1;ReadPosRankSum=0.592;SAB=0.24 [...]
-20	26185812	.	AG	A	322.58	PASS	AF=0.0342;BaseQRankSum=3.668;DP=3014;Dels=0.01;FR;FS=10.238;HP=8;HPLen=6;HR=6;HRun=6;HU=G;InbreedingCoeff=0.1504;MQ0Fraction=0.0473;MQRankSum=-5.464;NF;NR;PP;ReadPosRankSum=0.536;SC=GGGTGGGTGGAGGGGGGAGGG;TC;TR=6;TU=G;VQSLOD=5.0767;set=Intersection;sumGLbyD=8.46
-20	30963468	.	AGTTT	A	2041.12	PASS	AA=38;AB=0.75694;ABA=35;ABP=85.587;ABR=109;AC=34;AF=0.0377;AN=902;BL=1974;BR=668;BVAR;BaseQRankSum=3.060;DEL;DP=22806;DP4=1997,1747,28,36;Dels=0.02;EL=17;EPP=3.9246;ER=21;FR;FS=16.034;HETAR=29;HOMA=1;HOMR=1009;HP=1;HPLen=1;HR=1;HRun=0;HU=G;INDEL;InbreedingCoeff=0.0752;LEN=4;LRB=0.49432;LRBP=1404.9;MQ=87.17;MQ0Fraction=0.0013;MQM=98.079;MQRankSum=6.021;NF;NR;NS=1039;PP;PV4=0.13,1.5e-07,1,0.051;RA=4052;RL=36;RPP=69.069;RR=2;RUN=1;ReadPosRankSum=-1.847;SAB [...]
-20	31963212	.	AAAAAAAAAAAAG	A	727.15	PASS	AC=5;AF=0.0080;AN=622;BaseQRankSum=4.037;DP=1480;FS=0.000;HRun=0;HaplotypeScore=43.3793;InbreedingCoeff=0.0350;MQ=51.77;MQ0=59;MQ0Fraction=0.0399;MQRankSum=-1.799;QD=22.72;ReadPosRankSum=3.591;SB=-364.04;VQSLOD=5.3166;set=VQSR
-20	31997272	.	CT	C,CTT,CTTT	1837.10	PASS	AA=63;AB=0.77559;ABA=57;ABP=170.57;ABR=197;AC=79,49,30;AF=0.06594,0.04090,0.02504;AN=1198;BL=2372;BR=2640;BVAR;BaseQRankSum=3.277;DP=9050;Dels=0.03;EL=24;EPP=10.766;ER=39;FR;FS=0.303;HETAR=45;HOMA=1;HOMR=981;HP=10;HPLen=10;HR=10;HRun=10;HU=T;INS;InbreedingCoeff=0.2796;LEN=1;LRB=0.053472;LRBP=34.128;MQ0Fraction=0.0000;MQM=50.889;MQRankSum=0.610;NF;NR;NS=1027;PP;RA=3776;RL=30;RPP=3.3205;RR=33;RUN=1;ReadPosRankSum=-0.800;SAB=0.39683;SAF=25;SAP=8.8354 [...]
-20	33446974	rs113250263	TAA	T,TA,TAAA	17130.16	PASS	AC=65,417,184;AF=0.05941,0.38117,0.16819;AN=1094;BVAR;BaseQRankSum=3.400;DB;DEL;DP=22362;DP4=221,247,418,524;Dels=0.33;FR;FS=15.409;HP=15;HR=14;HRun=14;HU=A;INDEL;INS;InbreedingCoeff=0.5215;MQ=61.32;MQ0Fraction=0.0021;MQRankSum=0.481;NF;NR;PP;PV4=0.33,1,1,1;RUN=1;ReadPosRankSum=-0.056;SC=CTCCGTCTCATAAAAAAAAAA;TC;TR=14;TU=A;VQSLOD=8.0974;dbSNP=132;set=Intersection;sumGLbyD=12.78
-20	33877149	.	C	CT	1784.40	PASS	AA=58;AB=0.73096;ABA=53;ABP=94.289;ABR=144;AC=65;AF=0.05682;AN=1144;BL=3298;BR=1935;BVAR;BaseQRankSum=-2.066;DP=8074;Dels=0.02;EL=22;EPP=10.348;ER=36;FR;FS=11.452;HETAR=47;HOMA=3;HOMR=754;HP=16;HR=12;HRun=12;HU=T;INS;InbreedingCoeff=0.1178;LEN=1;LRB=0.26046;LRBP=773.91;MQ0Fraction=0.0165;MQM=52.259;MQRankSum=0.734;NF;NR;NS=804;PP;RA=2141;RL=43;RPP=32.363;RR=15;RUN=1;ReadPosRankSum=-1.273;SAB=0.46552;SAF=27;SAP=3.6093;SAR=31;SC=ATTTTCTTTTCTTTTTTTTTT;SRB=0.3 [...]
-20	34358698	.	A	AAAAAAT	583.61	PASS	AC=27;AF=0.02542;AN=1062;BaseQRankSum=5.228;DP=1997;FS=3.765;HRun=0;HaplotypeScore=27.7123;InbreedingCoeff=0.0566;MQ=55.50;MQ0=14;MQ0Fraction=0.0070;MQRankSum=-3.961;QD=5.21;ReadPosRankSum=0.862;SB=-399.69;VQSLOD=4.3826;set=VQSR
-20	34387589	rs112431805	CT	C,CTT	4039.10	PASS	AA=121;AB=0.75368;ABA=117;ABP=268.53;ABR=358;AC=84,139;AF=0.07047,0.11661;AN=1192;BL=5557;BR=3901;BVAR;BaseQRankSum=2.693;DB;DP=10157;Dels=0.03;EL=47;EPP=16.093;ER=74;FR;FS=7.639;HETAR=89;HOMA=2;HOMR=913;HP=13;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.2097;LEN=1;LRB=0.17509;LRBP=632.63;MQ0Fraction=0.0000;MQM=49.802;MQRankSum=-0.801;NF;NR;NS=1004;PP;RA=3789;RL=77;RPP=22.554;RR=44;RUN=1;ReadPosRankSum=-2.691;SAB=0.3719;SAF=45;SAP=20.256;SAR=76;S [...]
-20	34493409	rs73621682	C	CAG	62288.93	PASS	AA=1069;AB=0.54863;ABA=826;ABP=40.606;ABR=1004;AC=257;AF=0.3640;AN=706;BL=41524;BR=47039;BVAR;BaseQRankSum=-24.248;DB;DP=30195;DP4=1743,1636,614,487;Dels=0.00;EL=582;EPP=21.343;ER=487;FQ=999;FR;FS=5.080;HETAR=298;HOMA=63;HOMR=712;HP=1;HPLen=1;HR=1;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.1437;LEN=2;LRB=0.062272;LRBP=748.76;MQ=77.99;MQ0=3;MQ0Fraction=0.0015;MQM=54.446;MQRankSum=0.160;NF;NR;NS=1073;PP;PV4=0.016,1,0.01,1;RA=4461;RL=526;RPP=3.5973;RR [...]
-20	35086229	rs112534255	G	GAT	6109.24	PASS	AA=14;AB=0.71795;ABA=11;ABP=19.101;ABR=28;AC=35;AF=0.0509;AN=688;BL=846;BR=517;BVAR;BaseQRankSum=-7.153;DB;DP=15775;DP4=2064,2212,31,22;Dels=0.00;EL=7;EPP=3.0103;ER=7;FR;FS=0.000;HETAR=10;HOMA=2;HOMR=914;HP=3;HPLen=4;HR=4;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.1170;LEN=2;LRB=0.24138;LRBP=175.46;MQ=54.65;MQ0Fraction=0.0118;MQM=45.643;MQRankSum=1.614;NF;NR;NS=926;PP;PV4=0.17,1,1,1;RA=2867;RL=11;RPP=12.937;RR=3;RUN=1;ReadPosRankSum=-0.520;SAB=0.71 [...]
-20	35575895	rs67189278	AGTGT	A,AGT,AGTGTGT,TGTGT	43809.26	PASS	AC=593,3,481;AF=0.53327,0.00270,0.43255;AN=1112;BVAR;BaseQRankSum=-8.327;DB;DEL;DP=8989;Dels=0.04;FR;FS=9.400;HP=2;HPLen=1;HR=1;HRun=0;HU=G;INS;InbreedingCoeff=0.7735;LEN=2;MQ0Fraction=0.0400;MQRankSum=-2.719;NF;NR;PP;RUN=1;ReadPosRankSum=-9.301;SC=TGTGTGTGTGAGTGTGTGTGT;TC;TR=22;TU=GT;VQSLOD=8.6440;set=Intersection;sumGLbyD=6.01
-20	35957317	.	CTGACT	C,CGACT	4370.96	PASS	ABR=81;AC=22,1;AF=0.0321,0.0015;AF1=0.04523;AN=686;BVAR;BaseQRankSum=7.969;CI95=0.0354,0.05752;DEL;DP=16632;DP4=1942,1815,17,21;Dels=0.03;FQ=999;FR;FS=0.531;HOMA=1;HOMR=998;HP=2;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0587;MQ=83.38;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-7.201;NF;NR;NS=1020;PP;PV4=0.42,0.00017,4.5e-12,1;RA=4620;RUN=1;ReadPosRankSum=-1.007;SC=CCTCTCAGCTCTGACTGAGTC;SRB=0.50043;SRF=2312;SRP=3.0178;SRR=2308;TC;TR=8;TU=ACTG;VQSLO [...]
-20	36136198	.	GTGTC	G	2078.76	PASS	AA=35;AB=0.54167;ABA=33;ABP=4.096;ABR=39;AC=17;AF=0.01384;AN=1228;BL=1212;BR=1523;BVAR;BaseQRankSum=6.900;DEL;DP=22483;DP4=1696,2291,9,16;Dels=0.01;EL=9;EPP=20.94;ER=26;FQ=999;FR;FS=3.023;HETAR=13;HOMA=1;HOMR=1061;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1113;LEN=4;LRB=0.11371;LRBP=79.803;MQ=93.98;MQ0=1;MQ0Fraction=0.0003;MQM=83.686;MQRankSum=-1.683;NF;NR;NS=1075;PP;PV4=0.55,1,0.0083,1;RA=5771;RL=19;RPP=3.5687;RR=16;RUN=1;ReadPosRankSum=0.6 [...]
-20	36250522	.	CA	C	37933	PASS	AA=51;AB=0.95582;ABA=44;ABP=1800.5;ABR=952;AC=23;AF=0.01885;AN=1220;BL=691;BR=3464;BVAR;BaseQRankSum=-2.418;DEL;DP=11998;Dels=0.00;EL=18;EPP=12.59;ER=33;FS=2.307;HETAR=348;HOMA=534;HOMR=164;HRun=1;InbreedingCoeff=0.0763;LEN=1;LRB=0.66739;LRBP=4021.7;MQ0=2;MQ0Fraction=0.0006;MQM=53.647;MQRankSum=1.083;NS=1047;RA=1663;RL=2;RPP=97.065;RR=49;RUN=1;ReadPosRankSum=-12.726;SAB=0.68627;SAF=35;SAP=18.381;SAR=16;SRB=0.59651;SRF=992;SRP=137.56;SRR=671;VQSLOD=4.1346;set [...]
-20	36285033	rs34715186	AT	A	39417	PASS	AA=530;AB=0.5406;ABA=447;ABP=16.939;ABR=526;AC=88;AF=0.0950;AN=926;BL=20722;BR=20406;BVAR;BaseQRankSum=15.611;DB;DEL;DP=36713;DP4=2551,2475,236,218;Dels=0.09;EL=241;EPP=12.45;ER=289;FQ=999;FR;FS=1.290;HETAR=141;HOMA=16;HOMR=926;HP=2;HPLen=3;HR=3;HRun=1;HU=A;INDEL;InbreedingCoeff=0.0742;LEN=1;LRB=0.0076833;LRBP=8.2825;MQ=104.81;MQ0=0;MQ0Fraction=0.0000;MQM=84.285;MQRankSum=-0.702;NF;NR;NS=1083;PP;PV4=0.62,1,1,1;RA=6562;RL=263;RPP=3.0759;RR=267;RUN=1; [...]
-20	36384872	.	CTG	C	43532.41	PASS	AC=1213;AF=0.99589;AN=1218;BaseQRankSum=0.802;DP=3208;FS=9.727;HRun=0;HaplotypeScore=46.6153;InbreedingCoeff=0.1085;MQ=58.37;MQ0=50;MQ0Fraction=0.0156;MQRankSum=-1.672;QD=13.57;ReadPosRankSum=2.063;SB=-18894.12;VQSLOD=4.7353;set=VQSR
-20	36542802	.	GTA	G	31310.15	PASS	AA=1481;AB=0.67546;ABA=1378;ABP=1138.4;ABR=2868;AC=437;AF=0.35938;AN=1216;BL=25719;BR=95500;BVAR;BaseQRankSum=9.478;DEL;DP=18068;DS;Dels=0.10;EL=889;EPP=132.34;ER=592;FS=320.726;HETAR=591;HOMA=44;HOMR=378;HRun=0;InbreedingCoeff=-0.4197;LEN=2;LRB=0.57566;LRBP=87231;MQ0Fraction=0.0091;MQM=29.319;MQRankSum=-3.409;NS=1013;RA=4037;RL=3;RPP=3193;RR=1478;RUN=1;ReadPosRankSum=-6.687;SAB=0.40041;SAF=593;SAP=130.61;SAR=888;SRB=0.39014;SRF=1575;SRP=426.21;SRR=2462; [...]
-20	36985025	.	CCA	C	4.57	PASS	AC=0;AF=0.0000;AN=682;BaseQRankSum=4.199;DP=1504;FS=1.036;HRun=0;HaplotypeScore=18.5241;InbreedingCoeff=0.0460;MQ=57.04;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.774;ReadPosRankSum=-2.105;VQSLOD=6.7455;set=VQSR
-20	37139725	.	CAG	C	250.77	PASS	AF=0.0084;AF1=0.0139;BaseQRankSum=4.131;CI95=0.00885,0.01991;DP=7973;DP4=1808,1990,2,7;Dels=0.01;FQ=104;FR;FS=11.160;HP=3;HPLen=2;HR=1;HRun=0;HU=A;INDEL;InbreedingCoeff=-0.0001;MQ=103.71;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-3.378;NF;NR;PP;PV4=0.18,0.0011,0.041,1;ReadPosRankSum=0.605;SC=AGATGGGGAACAGAGAGCAAG;TC;TR=6;TU=AG;VQSLOD=7.0630;set=Intersection;sumGLbyD=12.13
-20	37213224	.	G	GTA	3230.05	PASS	AA=32;AB=0.50769;ABA=32;ABP=3.0437;ABR=33;AC=12;AF=0.0168;AF1=0.02635;AN=714;BL=1271;BR=1743;BVAR;BaseQRankSum=-7.288;CI95=0.02212,0.03319;DP=14304;DP4=2180,2256,13,21;Dels=0.00;EL=20;EPP=7.3532;ER=12;FQ=999;FR;FS=7.863;HETAR=9;HOMA=0;HOMR=1043;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0410;LEN=2;LRB=0.1566;LRBP=163.52;MQ=95.56;MQ0=1;MQ0Fraction=0.0005;MQM=51.562;MQRankSum=0.420;NF;NR;NS=1052;PP;PV4=0.23,1,0.03,0.33;RA=5138;RL=11;RPP=9.796 [...]
-20	37282014	.	ATGG	A	2518.52	PASS	AF=0.03519;BaseQRankSum=11.994;DP=24592;DP4=415,3804,8,49;DS;Dels=0.01;FQ=999;FR;FS=2.049;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1028;MQ=51.01;MQ0Fraction=0.0139;MQRankSum=-5.912;NF;NR;PP;PV4=0.27,1,0.22,0.015;ReadPosRankSum=1.781;SC=GGTGGTGATGATGGTGGTGGT;TC;TR=17;TU=GGT;VQSLOD=2.1183;set=filterInVQSR-2of5;sumGLbyD=9.05
-20	37532218	.	GTCCGTCCA	ATCCGTCCA,G	76120.88	PASS	AC=998;AF=0.92924;AN=1074;BaseQRankSum=-2.877;DP=3087;FR;FS=9.889;HP=2;HPLen=2;HR=1;HRun=0;HU=T;HaplotypeScore=71.6244;InbreedingCoeff=-0.0027;MQ=52.68;MQ0=543;MQ0Fraction=0.1759;MQRankSum=-1.750;NF;NR;PP;QD=24.98;ReadPosRankSum=-0.850;SB=-36635.43;SC=CCGTCCGTCCGTCCGTCCATC;TC;TR=19;TU=CCGT;VQSLOD=5.3068;set=Intersection
-20	37712193	.	AAG	A	2670.33	PASS	AA=106;AB=0.62821;ABA=87;ABP=36.418;ABR=147;AC=53;AF=0.0759;AN=698;BL=4672;BR=4303;BVAR;BaseQRankSum=13.696;DEL;DP=15155;DP4=1340,1852,32,52;Dels=0.06;EL=57;EPP=4.3214;ER=49;FR;FS=0.824;HETAR=43;HOMA=7;HOMR=982;HP=1;HPLen=2;HR=2;HRun=0;HU=A;INDEL;InbreedingCoeff=0.0861;LEN=2;LRB=0.041114;LRBP=35.954;MQ=86.12;MQ0=0;MQ0Fraction=0.0000;MQM=54.236;MQRankSum=-5.745;NF;NR;NS=1034;PP;PV4=0.5,7.3e-26,1.1e-10,1;RA=4423;RL=58;RPP=5.0589;RR=48;RUN=1;ReadPosRankSum=2 [...]
-20	37739002	.	T	TCA	1395.38	PASS	AA=16;AB=0.48387;ABA=16;ABP=3.0803;ABR=15;AC=11;AF=0.00950;AN=1158;BL=504;BR=630;BVAR;BaseQRankSum=-3.257;DP=13617;DP4=1660,883,7,5;Dels=0.00;EL=7;EPP=3.5532;ER=9;FR;FS=1.114;HETAR=9;HOMA=0;HOMR=991;HP=1;HPLen=2;HR=2;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0527;LEN=2;LRB=0.11111;LRBP=33.411;MQ=88.41;MQ0=0;MQ0Fraction=0.0000;MQM=83.75;MQRankSum=1.713;NF;NR;NS=1000;PP;PV4=0.76,1,1,0.5;RA=3257;RL=6;RPP=5.1818;RR=10;RUN=1;ReadPosRankSum=1.190;SAB=0.6875;SAF=1 [...]
-20	38122459	.	T	TG,TGG	1346.40	PASS	ABR=339;AC=37,26;AF=0.02989,0.02100;BVAR;BaseQRankSum=10.222;DP=16425;FS=601.551;HOMA=0;HOMR=1008;HaplotypeScore=20.6522;INS;InbreedingCoeff=0.0829;MQ=105.78;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-4.295;NS=1079;QD=0.40;RA=6208;RUN=1;ReadPosRankSum=-14.427;SAB=1;SAR=0;SB=-368.88;SRB=0.34907;SRF=2167;SRP=1231.4;SRR=4041;VQSLOD=-3.3455;set=filterInVQSR-2of5
-20	38395256	.	TTGAG	T	633.19	PASS	AF=0.0028;BaseQRankSum=5.667;DP=3839;Dels=0.00;FR;FS=10.238;HP=2;HPLen=3;HR=3;HRun=0;HU=T;InbreedingCoeff=-0.0097;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.276;NF;NR;PP;ReadPosRankSum=-1.016;SC=ATGTGTTTGTTTGAGTATGTT;TC;TR=10;TU=GTTT;VQSLOD=6.4906;set=Intersection;sumGLbyD=10.83
-20	38882632	rs72004513	AGTGTGTGTGT	A,AGT,AGTGT,AGTGTGT,AGTGTGTGT,AGTGTGTGTGTGT	12304.47	PASS	AC=57,24,51,78,89,186;AF=0.04664,0.01964,0.04173,0.06383,0.07283,0.15221;AN=1222;BVAR;BaseQRankSum=3.183;DB;DEL;DP=49261;DP4=144,106,104,101;Dels=0.05;FQ=999;FR;FS=5.209;HP=1;HPLen=2;HR=2;HRun=0;HU=A;INDEL;InbreedingCoeff=0.9090;MQ=87.48;MQ0Fraction=0.0071;MQRankSum=-0.897;NF;NR;PP;PV4=0.16,1,0.19,1;RUN=1;ReadPosRankSum=3.551;SC=TAACTCCTCAAGTGTGTGTGT;TC;TR=47;TU=GT;VQSLOD=9.9069;set=Intersection; [...]
-20	39345038	.	CTGAACCATAATGTG	C,CCCATAATGTG	60744.52	PASS	AA=23;AB=0.67143;ABA=23;ABP=20.878;ABR=47;AC=232,2;AF=0.19366,0.00167;AN=1198;BL=1607;BR=1843;BVAR;BaseQRankSum=30.955;DEL;DP=31490;DP4=1729,2100,265,278;Dels=0.13;EL=6;EPP=14.434;ER=17;FQ=999;FR;FS=1.767;HETAR=18;HOMA=0;HOMR=1015;HP=1;HPLen=2;HR=2;HRun=0;HU=C;INDEL;InbreedingCoeff=0.1991;LEN=14;LRB=0.068406;LRBP=38.066;MQ=104.60;MQ0=0;MQ0Fraction=0.0000;MQM=189.83;MQRankSum=-16.579;NF;NR;NS=1033;PP;PV4=0.12,1,5.5e-137,1;RA=5286;R [...]
-20	39418008	.	AG	A	46796	PASS	AA=113;AB=0.9511;ABA=80;ABP=2894.6;ABR=1556;AC=30;AF=0.02412;AN=1244;BL=638;BR=6936;BVAR;BaseQRankSum=7.280;DEL;DP=14307;Dels=0.00;EL=50;EPP=6.2579;ER=63;FR;FS=5.707;HETAR=473;HOMA=361;HOMR=246;HP=3;HR=3;HRun=3;HU=G;InbreedingCoeff=0.0272;LEN=1;LRB=0.83153;LRBP=11375;MQ0=0;MQ0Fraction=0.0000;MQM=62.398;MQRankSum=3.530;NF;NR;NS=1089;PP;RA=3000;RL=3;RPP=223.02;RR=110;RUN=1;ReadPosRankSum=-18.601;SAB=0.58407;SAF=66;SAP=9.9475;SAR=47;SC=ACTGGGGGAAAGGGATTCTAG;SRB [...]
-20	39876961	.	GT	G,GTT,GTTT	2302.10	PASS	ABR=496;AC=45,51,45;AF=0.03664,0.04153,0.03664;AN=1228;BVAR;BaseQRankSum=4.462;DP=37649;DP4=1457,1975,57,59;Dels=0.02;FR;FS=9.938;HOMA=0;HOMR=978;HP=10;HPLen=10;HR=10;HRun=10;HU=T;INDEL;INS;InbreedingCoeff=0.2583;MQ=97.28;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.246;NF;NR;NS=1063;PP;PV4=0.15,1,1.9e-09,0.016;RA=5185;RUN=1;ReadPosRankSum=-4.954;SC=AGTTTCTCCGGTTTTTTTTTT;SRB=0.47464;SRF=2461;SRP=31.978;SRR=2724;TC;TR=10;TU=T;VQSLOD=4.9752;set=Intersection [...]
-20	41013333	.	TC	T	20681	PASS	AA=137;AB=0.89211;ABA=134;ABP=1661.6;ABR=1108;AC=68;AF=0.05601;AN=1214;BL=1091;BR=8981;BVAR;BaseQRankSum=1.354;DEL;DP=12998;Dels=0.01;EL=57;EPP=11.395;ER=80;FS=0.758;HETAR=359;HOMA=100;HOMR=610;HRun=1;InbreedingCoeff=0.0104;LEN=1;LRB=0.78336;LRBP=13424;MQ0=1;MQ0Fraction=0.0003;MQM=67.745;MQRankSum=2.563;NS=1072;RA=4447;RL=5;RPP=258.66;RR=132;RUN=1;ReadPosRankSum=-14.092;SAB=0.59124;SAF=81;SAP=12.917;SAR=56;SRB=0.54194;SRF=2410;SRP=70.947;SRR=2037;VQSLOD=3.75 [...]
-20	41453533	rs112736557	T	TA	1734.60	PASS	AA=44;AB=0.58025;ABA=34;ABP=7.5409;ABR=47;AC=23;AF=0.0345;AN=666;BL=2061;BR=2408;BVAR;BaseQRankSum=5.768;DB;DP=7437;Dels=0.00;EL=25;EPP=4.787;ER=19;FR;FS=3.680;HETAR=17;HOMA=5;HOMR=975;HP=7;HPLen=6;HR=6;HRun=6;HU=A;INS;InbreedingCoeff=0.1712;LEN=1;LRB=0.077646;LRBP=61.517;MQ0=0;MQ0Fraction=0.0000;MQM=75.614;MQRankSum=-4.976;NF;NR;NS=997;PP;RA=4229;RL=21;RPP=3.2077;RR=23;RUN=1;ReadPosRankSum=-0.039;SAB=0.5;SAF=22;SAP=3.0103;SAR=22;SC=CCTTTCTCCATAA [...]
-20	41659532	.	GC	G	40544	PASS	AA=42;AB=0.97149;ABA=39;ABP=2644.5;ABR=1329;AC=15;AF=0.0209;AN=716;BL=2531;BR=135;BVAR;BaseQRankSum=-2.537;DEL;DP=12219;Dels=0.00;EL=25;EPP=6.3192;ER=17;FS=2.656;HETAR=374;HOMA=155;HOMR=551;HRun=1;InbreedingCoeff=-0.0270;LEN=1;LRB=0.89872;LRBP=4678.9;MQ0=0;MQ0Fraction=0.0000;MQM=103.31;MQRankSum=2.828;NS=1088;RA=4736;RL=41;RPP=85.733;RR=1;RUN=1;ReadPosRankSum=-9.702;SAB=0.57143;SAF=24;SAP=4.8716;SAR=18;SRB=0.5625;SRF=2664;SRP=163.7;SRR=2072;VQSLOD=4.3267;set [...]
-20	41687456	.	A	AT	19682	PASS	AA=446;AB=0.61202;ABA=426;ABP=122.69;ABR=672;AC=162;AF=0.13214;AN=1226;BL=15293;BR=20484;BVAR;BaseQRankSum=2.364;DP=29324;DP4=1993,1785,261,252;Dels=0.01;EL=214;EPP=4.5878;ER=232;FQ=999;FR;FS=1.923;HETAR=170;HOMA=7;HOMR=897;HP=11;HPLen=9;HR=9;HRun=9;HU=T;INDEL;INS;InbreedingCoeff=0.0769;LEN=1;LRB=0.14509;LRBP=1638.5;MQ=91.55;MQ0=0;MQ0Fraction=0.0000;MQM=57.168;MQRankSum=-0.764;NF;NR;NS=1074;PP;PV4=0.45,1,3.5e-08,1;RA=5437;RL=179;RPP=40.714;RR=267;RUN=1;ReadP [...]
-20	41845580	.	GA	G	49310	PASS	AA=83;AB=0.95258;ABA=69;ABP=2591.6;ABR=1386;AC=46;AF=0.03740;AN=1230;BL=1320;BR=5150;BVAR;BaseQRankSum=-1.121;DEL;DP=13336;Dels=0.00;EL=36;EPP=6.1759;ER=47;FR;FS=0.372;HETAR=442;HOMA=341;HOMR=295;HP=2;HR=3;HRun=1;HU=G;InbreedingCoeff=0.0238;LEN=1;LRB=0.59196;LRBP=4926.2;MQ0=0;MQ0Fraction=0.0000;MQM=89.048;MQRankSum=0.897;NF;NR;NS=1080;PP;RA=3006;RL=5;RPP=142.43;RR=78;RUN=1;ReadPosRankSum=-15.412;SAB=0.55422;SAF=46;SAP=5.1294;SAR=37;SC=CCAGCTGTGGGAGAGAAACAT;S [...]
-20	42209428	.	GC	G	13163	PASS	AA=89;AB=0.86677;ABA=83;ABP=730.96;ABR=540;AC=39;AF=0.03218;AN=1212;BL=950;BR=5334;BVAR;BaseQRankSum=-10.119;DEL;DP=10692;Dels=0.01;EL=48;EPP=4.2058;ER=41;FS=0.000;HETAR=259;HOMA=727;HOMR=54;HRun=1;InbreedingCoeff=0.0448;LEN=1;LRB=0.69764;LRBP=6644.4;MQ0=0;MQ0Fraction=0.0000;MQM=126.55;MQRankSum=4.223;NS=1040;RA=723;RL=12;RPP=106.09;RR=77;RUN=1;ReadPosRankSum=-17.362;SAB=0.39326;SAF=35;SAP=11.818;SAR=54;SRB=0.37898;SRF=274;SRP=94.99;SRR=449;VQSLOD=3.7157;set [...]
-20	42281109	.	T	TAG	2321.12	PASS	AC=181;AF=0.3740;AN=484;BaseQRankSum=8.977;DP=435;FS=17.001;HRun=0;HaplotypeScore=14.6734;InbreedingCoeff=0.2340;MQ=53.88;MQ0=47;MQ0Fraction=0.1080;MQRankSum=0.762;QD=12.41;ReadPosRankSum=3.399;SB=-1299.73;VQSLOD=4.8926;set=VQSR
-20	42436117	.	TC	T	38933	PASS	AA=18;AB=0.98435;ABA=17;ABP=2215.9;ABR=1069;AC=15;AF=0.01223;AN=1226;BL=498;BR=428;BVAR;BaseQRankSum=-7.224;DEL;DP=12436;Dels=0.00;EL=1;EPP=33.893;ER=17;FS=2.469;HETAR=303;HOMA=614;HOMR=123;HRun=1;InbreedingCoeff=0.0439;LEN=1;LRB=0.075594;LRBP=14.501;MQ0=0;MQ0Fraction=0.0000;MQM=98.611;MQRankSum=1.086;NS=1075;RA=1656;RL=10;RPP=3.4928;RR=8;RUN=1;ReadPosRankSum=-17.765;SAB=0.5;SAF=9;SAP=3.0103;SAR=9;SRB=0.49879;SRF=826;SRP=3.0313;SRR=830;VQSLOD=4.0821;set=filt [...]
-20	42682214	.	C	A,CAT	3904.51	PASS	AA=24;AB=0.6383;ABA=17;ABP=10.818;ABR=30;AC=0;AF=0.0000;AN=636;BL=1119;BR=949;BVAR;BaseQRankSum=1.426;DP=6509;Dels=0.00;EL=9;EPP=6.2675;ER=15;FR;HETAR=12;HOMA=3;HOMR=876;HP=2;HPLen=1;HR=1;HRun=0;HU=A;INS;InbreedingCoeff=0.0006;LEN=2;LRB=0.082205;LRBP=33.356;MQ0Fraction=0.0046;MQM=40.792;MQRankSum=-0.296;NF;NR;NS=891;PP;QD=32.81;RA=2679;RL=15;RPP=6.2675;RR=9;RUN=1;ReadPosRankSum=-1.806;SAB=0.75;SAF=18;SAP=16.039;SAR=6;SB=-924.23;SC=TATACACACACATATATATAC; [...]
-20	42973456	.	CA	C,CAA,CAAA	2675	PASS	AA=90;AB=0.79177;ABA=86;ABP=308.39;ABR=327;AC=77,61,39;AF=0.06492,0.05143,0.03288;AN=1186;BL=2983;BR=4446;BVAR;BaseQRankSum=2.422;DP=9416;Dels=0.03;EL=39;EPP=6.4847;ER=51;FR;FS=31.555;HETAR=75;HOMA=1;HOMR=888;HP=11;HR=11;HRun=11;HU=A;INS;InbreedingCoeff=0.2696;LEN=1;LRB=0.19693;LRBP=628.63;MQ0=0;MQ0Fraction=0.0000;MQM=55.567;MQRankSum=1.777;NF;NR;NS=964;PP;RA=3601;RL=37;RPP=9.1869;RR=53;RUN=1;ReadPosRankSum=-4.991;SAB=0.55556;SAF=50;SAP=5.423;SAR=40; [...]
-20	43091870	.	TC	T	2455.60	PASS	AA=120;AB=0.10619;ABA=101;ABP=155.22;ABR=12;AC=42;AF=0.03825;AN=1098;BL=573;BR=8744;BVAR;BaseQRankSum=-13.513;DEL;DP=9139;Dels=0.00;EL=64;EPP=4.1684;ER=56;FS=9.856;HETAR=118;HOMA=820;HOMR=0;HRun=1;InbreedingCoeff=0.0833;LEN=1;LRB=0.877;LRBP=15564;MQ0Fraction=0.0017;MQM=45.1;MQRankSum=2.266;NS=938;RA=24;RL=1;RPP=254.97;RR=119;RUN=1;ReadPosRankSum=-15.803;SAB=0.475;SAF=57;SAP=3.6617;SAR=63;SRB=0.54167;SRF=13;SRP=3.3722;SRR=11;VQSLOD=3.9930;set=filterInVQSR-2 [...]
-20	43233648	rs74585029	GA	G,GAA	1504.40	PASS	AA=113;AB=0.78652;ABA=95;ABP=320.31;ABR=350;AC=41,65;AF=0.03394,0.05381;AF1=0.0115;AN=1208;BL=4677;BR=5548;BVAR;BaseQRankSum=6.744;CI95=0.004274,0.01852;DB;DEL;DP=13996;DP4=1736,1549,15,17;Dels=0.03;EL=69;EPP=15.021;ER=44;FQ=14;FR;FS=12.174;HETAR=119;HOMA=15;HOMR=892;HP=11;HPLen=10;HR=10;HRun=10;HU=A;INDEL;InbreedingCoeff=0.2359;LEN=1;LRB=0.085183;LRBP=164.12;MQ=89.12;MQ0Fraction=0.0000;MQM=69.867;MQRankSum=2.513;NF;NR;NS=1027;PP;PV4=0.59,1,0. [...]
-20	43246548	.	AC	A,CC	41579.13	PASS	AA=382;AB=0.72402;ABA=316;ABP=502.11;ABR=829;AC=1197;AF=0.99254;AN=1206;BL=9889;BR=14293;BVAR;BaseQRankSum=1.373;DEL;DP=10477;DS;Dels=0.05;EL=243;EPP=64.494;ER=139;FS=29.162;HETAR=291;HOMA=85;HOMR=624;HPLen=10;InbreedingCoeff=0.1392;LEN=1;LRB=0.18212;LRBP=1744.6;MQ0Fraction=0.0024;MQM=48.471;MQRankSum=5.726;NS=1001;RA=3138;RL=174;RPP=9.5816;RR=208;RUN=1;ReadPosRankSum=5.755;SAB=0.79843;SAF=305;SAP=298.51;SAR=77;SRB=0.70363;SRF=2208;SRP=1133.2;SRR=930;V [...]
-20	43258646	.	T	TT	1107.17	PASS	AC=97;AF=0.08420;AN=1152;BaseQRankSum=4.525;DP=2345;FS=19.308;HRun=9;HaplotypeScore=13.6276;InbreedingCoeff=0.1299;MQ=76.70;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.395;QD=2.67;ReadPosRankSum=-4.696;SB=-899.41;VQSLOD=5.4523;set=VQSR
-20	43718299	.	ATTACT	A	5497.06	PASS	AA=56;AB=0.51818;ABA=53;ABP=3.3262;ABR=57;AC=18;AF=0.0251;AF1=0.03729;AN=718;BL=2321;BR=2591;BVAR;BaseQRankSum=11.142;CI95=0.03319,0.04425;DEL;DP=17576;DP4=2460,2692,31,22;Dels=0.02;EL=28;EPP=3.0103;ER=28;FQ=999;FR;FS=9.689;HETAR=15;HOMA=1;HOMR=1068;HP=2;HPLen=2;HR=2;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0448;LEN=5;LRB=0.054967;LRBP=35.238;MQ=96.55;MQ0=0;MQ0Fraction=0.0000;MQM=50.286;MQRankSum=-5.149;NF;NR;NS=1084;PP;PV4=0.13,1,1.2e-12,1;RA=6745;RL=28;RP [...]
-20	43981749	.	A	AAAAAAC,AC	20899.71	PASS	ABR=192;AC=91,0;AF=0.1285,0.0000;AN=708;BVAR;BaseQRankSum=7.858;DP=23372;DP4=1554,1457,55,42;Dels=0.00;FR;FS=0.000;HOMA=4;HOMR=995;HP=6;HPLen=7;HR=7;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.2109;MQ=95.59;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-12.081;NF;NR;NS=1051;PP;PV4=0.35,1,8.9e-73,1;RA=5027;RUN=1;ReadPosRankSum=-1.359;SC=TACACTAGCAAAAAAACAAAA;SRB=0.48518;SRF=2439;SRP=12.6;SRR=2588;TC;TR=7;TU=A;VQSLOD=8.0916;set=Intersection;sumGLbyD=54.33
-20	43999274	.	TCAAA	T	2948.85	PASS	AA=59;AB=0.59441;ABA=58;ABP=14.08;ABR=85;AC=20;AF=0.0290;AF1=0.04249;AN=690;BL=2277;BR=2436;BVAR;BaseQRankSum=9.320;CI95=0.0354,0.05088;DEL;DP=14599;DP4=2052,2303,21,22;Dels=0.03;EL=32;EPP=3.9304;ER=27;FQ=999;FR;FS=0.000;HETAR=21;HOMA=0;HOMR=1043;HP=2;HPLen=1;HR=1;HRun=0;HU=C;INDEL;InbreedingCoeff=-0.0037;LEN=4;LRB=0.033736;LRBP=14.658;MQ=90.05;MQ0=0;MQ0Fraction=0.0000;MQM=75.339;MQRankSum=-1.294;NF;NR;NS=1064;PP;PV4=0.88,1,0.0026,1;RA=5732;RL=27;RPP=3. [...]
-20	44098622	.	C	CG	1092.40	PASS	AA=129;AB=0.77301;ABA=74;ABP=214.06;ABR=252;AC=45;AF=0.0455;AN=988;BL=6586;BR=3029;BVAR;BaseQRankSum=2.802;DP=5177;Dels=0.00;EL=122;EPP=225.63;ER=7;FR;FS=355.273;HETAR=66;HOMA=11;HOMR=734;HP=6;HR=4;HRun=4;HU=G;INS;InbreedingCoeff=0.1759;LEN=1;LRB=0.36994;LRBP=2860.4;MQ0=0;MQ0Fraction=0.0000;MQM=52.395;MQRankSum=1.946;NF;NR;NS=811;PP;RA=1981;RL=121;RPP=217.95;RR=8;RUN=1;ReadPosRankSum=-6.413;SAB=0.99225;SAF=128;SAP=274.51;SAR=1;SC=GCGGAAGTGGCGGGGACCCTT;SRB= [...]
-20	44327637	.	A	AG,AGGGGGG	14351.23	PASS	AC=9,211;AF=0.0103,0.2409;AN=876;BaseQRankSum=15.517;DP=1704;FS=6.768;HaplotypeScore=31.5906;InbreedingCoeff=0.1538;MQ=54.64;MQ0=4;MQ0Fraction=0.0023;MQRankSum=-12.691;QD=20.83;ReadPosRankSum=-3.583;SB=-6278.99;VQSLOD=5.1556;set=VQSR
-20	45202636	.	GA	G	13269	PASS	AA=25;AB=0.96162;ABA=18;ABP=871.09;ABR=451;AC=24;AF=0.02013;AN=1192;BL=567;BR=1728;BVAR;BaseQRankSum=-5.361;DEL;DP=10873;Dels=0.00;EL=10;EPP=5.1818;ER=15;FS=0.928;HETAR=169;HOMA=831;HOMR=45;HRun=1;InbreedingCoeff=0.0999;LEN=1;LRB=0.50588;LRBP=1278.4;MQ0=0;MQ0Fraction=0.0000;MQM=170.56;MQRankSum=0.161;NS=1049;RA=632;RL=2;RPP=41.315;RR=23;RUN=1;ReadPosRankSum=-14.760;SAB=0.68;SAF=17;SAP=10.046;SAR=8;SRB=0.51424;SRF=325;SRP=4.1235;SRR=307;VQSLOD=3.9290;set=filt [...]
-20	45417828	.	TGAGC	T,TGC	4672.90	PASS	ABR=317;AC=69,104;AF=0.05712,0.08609;BVAR;BaseQRankSum=18.527;DEL;DP=11835;DS;FS=184.873;HOMA=48;HOMR=575;HaplotypeScore=65.5875;InbreedingCoeff=0.0599;MQ=29.78;MQ0=2988;MQ0Fraction=0.3629;MQRankSum=5.052;NS=713;QD=1.11;RA=1581;RUN=1;ReadPosRankSum=6.574;SB=-2116.87;SRB=0.47502;SRF=751;SRP=11.582;SRR=830;VQSLOD=0.0651;set=filterInVQSR-2of5
-20	45525657	rs66759083	TA	AA,T	49315	PASS	AA=2361;AB=0.45241;ABA=1398;ABP=53.235;ABR=1155;AC=20;AF=0.01701;AN=1176;BL=94913;BR=100886;BVAR;BaseQRankSum=0.740;DB;DEL;DP=30636;DP4=1258,881,1206,999;Dels=0.48;EL=1133;EPP=11.311;ER=1228;FQ=999;FR;FS=7.072;HETAR=503;HOMA=310;HOMR=218;HP=6;HPLen=7;HR=7;HU=T;INDEL;InbreedingCoeff=0.2271;LEN=1;LRB=0.030506;LRBP=398.68;MQ=102.24;MQ0=0;MQ0Fraction=0.0000;MQM=75.359;MQRankSum=0.148;NF;NR;NS=1031;PP;PV4=0.0064,0,4.6e-23,0.47;RA=2042;RL=1183;RPP=3.03 [...]
-20	45783456	.	T	TG	2355.68	PASS	AA=64;AB=0.78521;ABA=61;ABP=203.67;ABR=223;AC=15;AF=0.0165;AN=910;BL=815;BR=5486;BVAR;BaseQRankSum=8.593;DP=10348;Dels=0.00;EL=48;EPP=37.754;ER=16;FS=77.861;HETAR=56;HOMA=1;HOMR=970;HRun=1;INS;InbreedingCoeff=-0.0549;LEN=1;LRB=0.74131;LRBP=7522.1;MQ0Fraction=0.0122;MQM=44.562;MQRankSum=-1.258;NS=1027;RA=4750;RL=0;RPP=141.98;RR=64;RUN=1;ReadPosRankSum=-7.047;SAB=0.25;SAF=16;SAP=37.754;SAR=48;SRB=0.6;SRF=2850;SRP=415.59;SRR=1900;VQSLOD=1.3146;set=filterInVQS [...]
-20	46384744	.	CT	C	17791	PASS	AA=51;AB=0.94826;ABA=49;ABP=1655.8;ABR=898;AC=23;AF=0.01867;AN=1232;BL=120;BR=3678;BVAR;BaseQRankSum=-0.185;DEL;DP=13879;Dels=0.00;EL=23;EPP=4.0747;ER=28;FS=2.864;HETAR=262;HOMA=78;HOMR=722;HRun=2;InbreedingCoeff=0.0193;LEN=1;LRB=0.93681;LRBP=7240.9;MQ0=0;MQ0Fraction=0.0000;MQM=66.667;MQRankSum=1.031;NS=1079;RA=5295;RL=0;RPP=113.76;RR=51;RUN=1;ReadPosRankSum=-12.934;SAB=0.54902;SAF=28;SAP=4.0747;SAR=23;SRB=0.54674;SRF=2895;SRP=103.49;SRR=2400;VQSLOD=3.0419;s [...]
-20	46517110	.	C	CT	868.55	PASS	AC=15;AF=0.0218;AN=688;BaseQRankSum=8.522;DP=1752;FS=6.570;HRun=0;HaplotypeScore=14.9548;InbreedingCoeff=0.0452;MQ=77.73;MQ0=0;MQ0Fraction=0.0000;MQRankSum=3.874;QD=10.98;ReadPosRankSum=-0.733;SB=-396.78;VQSLOD=6.7740;set=VQSR
-20	46629361	.	TTTCTTTC	T,TTTTC	13000.91	PASS	AC=188,107;AF=0.2212,0.1259;AN=850;BaseQRankSum=7.214;DP=1846;FS=14.502;HaplotypeScore=40.8481;InbreedingCoeff=0.3210;MQ=50.74;MQ0=79;MQ0Fraction=0.0428;MQRankSum=-6.348;QD=13.59;ReadPosRankSum=3.943;SB=-3581.20;VQSLOD=5.9412;set=VQSR
-20	46951099	.	G	GT	1662.30	PASS	AA=55;AB=0.7713;ABA=51;ABP=145.58;ABR=172;AC=47;AF=0.03923;AN=1198;BL=3288;BR=2434;BVAR;BaseQRankSum=-4.014;DP=27423;DP4=1483,1590,58,42;Dels=0.01;EL=21;EPP=9.6826;ER=34;FR;FS=9.565;HETAR=48;HOMA=0;HOMR=913;HP=16;HPLen=10;HR=10;HRun=10;HU=T;INDEL;INS;InbreedingCoeff=0.0952;LEN=1;LRB=0.14925;LRBP=279.78;MQ=70.36;MQ0Fraction=0.0124;MQM=52.545;MQRankSum=0.717;NF;NR;NS=961;PP;PV4=0.067,1,1,0.17;RA=3035;RL=38;RPP=20.422;RR=17;RUN=1;ReadPosRankSum=-3.014;SAB=0.4 [...]
-20	47201076	rs58052846	C	CT	982.16	PASS	AC=50;AF=0.0551;AN=908;BaseQRankSum=12.598;DB;DP=2449;FS=35.648;HRun=0;HaplotypeScore=29.4602;InbreedingCoeff=-0.0542;MQ=63.54;MQ0=0;MQ0Fraction=0.0000;MQRankSum=2.196;QD=3.16;ReadPosRankSum=-13.833;SB=-488.19;VQSLOD=6.0429;set=VQSR
-20	47965974	rs60011158	G	GA	999	PASS	AA=21;AB=0.57143;ABA=21;ABP=5.1818;ABR=28;AC=7;AF=0.0101;AF1=0.02061;AN=690;BL=1043;BR=577;BVAR;BaseQRankSum=-3.087;CI95=0.01549,0.02655;DB;DP=14578;DP4=1554,3055,6,17;Dels=0.00;EL=11;EPP=3.1137;ER=10;FQ=999;FR;FS=5.982;HETAR=7;HOMA=0;HOMR=1041;HP=2;HPLen=1;HR=1;HRun=1;HU=A;INDEL;INS;InbreedingCoeff=0.0356;LEN=1;LRB=0.28765;LRBP=294.09;MQ=80.17;MQ0=0;MQ0Fraction=0.0000;MQM=64.19;MQRankSum=2.137;NF;NR;NS=1048;PP;PV4=0.51,1,1,1;RA=5224;RL=16;RPP=15.522; [...]
-20	48402974	rs57331436	GA	G	27741	PASS	AA=401;AB=0.5372;ABA=311;ABP=11.089;ABR=361;AC=84;AF=0.1186;AN=708;BL=16591;BR=14776;BVAR;BaseQRankSum=14.621;DB;DEL;DP=30607;DP4=1928,2310,195,225;Dels=0.11;EL=189;EPP=5.8749;ER=212;FQ=999;FR;FS=15.568;HETAR=110;HOMA=30;HOMR=923;HP=4;HPLen=3;HR=1;HRun=3;HU=A;INDEL;InbreedingCoeff=0.1263;KGPilot123;LEN=1;LRB=0.057863;LRBP=231.06;MQ=106.68;MQ0=0;MQ0Fraction=0.0000;MQM=63.005;MQRankSum=-2.010;NF;NR;NS=1063;PP;PV4=0.72,1,0.001,1;RA=5258;RL=223;RPP=13.9 [...]
-20	48519434	rs56747320	TA	T,TAA	26754	PASS	AC=91,355;AF=0.07738,0.30187;AN=1176;BVAR;BaseQRankSum=-5.499;DB;DEL;DP=24872;DP4=726,883,443,502;Dels=0.04;FR;FS=1.430;HP=12;HR=12;HRun=12;HU=A;INDEL;INS;InbreedingCoeff=0.2576;LEN=1;MQ=71.86;MQ0=1;MQ0Fraction=0.0004;MQRankSum=-0.526;NF;NR;PP;PV4=0.41,1,0.00077,1;RUN=1;ReadPosRankSum=-4.130;SC=CGTCTTAAACTAAAAAAAAAA;TC;TR=12;TU=A;VQSLOD=7.3200;set=Intersection;sumGLbyD=10.43
-20	49086519	rs111404890	CA	C,CAA	1379.10	PASS	AA=43;AB=0.672;ABA=41;ABP=35.131;ABR=84;AC=7,14;AF=0.0100,0.0201;AN=698;BL=1097;BR=2286;BVAR;BaseQRankSum=-2.656;DB;DP=9319;Dels=0.00;EL=22;EPP=3.0608;ER=21;FR;FS=1.147;HETAR=20;HOMA=0;HOMR=1029;HP=11;HPLen=8;HR=8;HRun=8;HU=A;INS;InbreedingCoeff=0.0760;LEN=1;LRB=0.35146;LRBP=910.45;MQ0=0;MQ0Fraction=0.0000;MQM=47.674;MQRankSum=2.682;NF;NR;NS=1049;PP;RA=5237;RL=10;RPP=29.724;RR=33;RUN=1;ReadPosRankSum=-2.367;SAB=0.48837;SAF=21;SAP=3.0608;SAR=2 [...]
-20	49101936	.	C	CT	404.46	PASS	AC=40;AF=0.03559;AN=1124;BaseQRankSum=0.750;DP=2162;FS=14.291;HRun=2;HaplotypeScore=30.9513;InbreedingCoeff=-0.0082;MQ=49.78;MQ0=113;MQ0Fraction=0.0523;MQRankSum=-1.289;QD=1.94;ReadPosRankSum=-2.041;SB=-385.48;VQSLOD=4.6365;set=VQSR
-20	49681276	.	TC	T	40042	PASS	AA=72;AB=0.93908;ABA=70;ABP=1927.1;ABR=1079;AC=18;AF=0.0196;AN=918;BL=514;BR=4340;BVAR;BaseQRankSum=0.869;DEL;DP=10368;Dels=0.00;EL=33;EPP=4.096;ER=39;FS=17.302;HETAR=389;HOMA=269;HOMR=405;HRun=1;InbreedingCoeff=0.0626;LEN=1;LRB=0.78822;LRBP=6551.6;MQ0=0;MQ0Fraction=0.0000;MQM=123.06;MQRankSum=-1.047;NS=1064;RA=3095;RL=3;RPP=134.38;RR=69;RUN=1;ReadPosRankSum=-10.928;SAB=0.58333;SAF=42;SAP=7.3532;SAR=30;SRB=0.57738;SRF=1787;SRP=163.99;SRR=1308;VQSLOD=2.8517;s [...]
-20	49690436	.	GT	G	473.74	PASS	AF=0.0263;AF1=0.02287;BaseQRankSum=3.830;CI95=0.01327,0.03319;DP=7473;DP4=2241,1740,14,12;Dels=0.01;FQ=129;FR;FS=0.000;HP=4;HPLen=4;HR=4;HRun=4;HU=T;INDEL;InbreedingCoeff=0.1310;MQ=51.71;MQ0Fraction=0.0407;MQRankSum=1.792;NF;NR;PP;PV4=0.84,5.7e-10,0.22,1;ReadPosRankSum=0.973;SC=GTAGGACGGGGTTTTACCATG;TC;TR=4;TU=T;VQSLOD=7.4809;set=Intersection;sumGLbyD=10.96
-20	49731218	.	ATTTTATTTTTTATT	A,ATTTTATT	8398.93	PASS	AF=0.0656,0.0156;AF1=0.0996;BaseQRankSum=13.996;CI95=0.07743,0.1239;DP=6308;DP4=951,1311,23,35;Dels=0.05;FQ=999;FR;FS=12.503;HP=7;HPLen=4;HR=4;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1892;MQ=57.61;MQ0Fraction=0.0145;MQRankSum=-5.208;NF;NR;PP;PV4=0.79,1,6.3e-06,0.16;ReadPosRankSum=-2.239;SC=TATTTTATTTATTTTATTTTT;TC;TR=11;TU=ATTT;VQSLOD=4.3191;set=Intersection;sumGLbyD=42.27
-20	49894989	.	TA	T	172.25	PASS	AF=0.0140;BaseQRankSum=7.220;DP=3882;Dels=0.00;FS=17.217;HPLen=2;HRun=1;InbreedingCoeff=0.0531;MQ0Fraction=0.0214;MQRankSum=-0.661;ReadPosRankSum=-0.592;VQSLOD=3.0905;set=filterInVQSR-2of5;sumGLbyD=6.60
-20	50010923	rs66516522	C	CT,CTGG	35851	PASS	ABR=555;AC=310,11;AF=0.26451,0.00939;BVAR;BaseQRankSum=10.662;DB;DP=8188;FR;FS=34.411;HOMA=261;HOMR=399;HP=5;HR=6;HU=C;HaplotypeScore=45.1715;INS;InbreedingCoeff=0.2090;MQ=72.80;MQ0=0;MQ0Fraction=0.0000;MQRankSum=9.015;NF;NR;NS=831;PP;QD=9.69;RA=1986;RUN=1;ReadPosRankSum=-24.284;SB=-6038.55;SC=TGTCTGTCCCCCCTCAGCACT;SRB=0.45972;SRF=913;SRP=31.001;SRR=1073;TC;TR=6;TU=C;VQSLOD=6.1824;set=Intersection
-20	50059710	.	C	CCA	4175.86	PASS	AA=28;AB=0.62963;ABA=20;ABP=10.892;ABR=34;AC=36;AF=0.0738;AN=488;BL=1050;BR=1273;BVAR;BaseQRankSum=3.198;DP=9138;Dels=0.00;EL=10;EPP=7.9737;ER=18;FR;FS=19.190;HETAR=10;HOMA=2;HOMR=1053;HP=6;HPLen=7;HR=7;HRun=0;HU=C;INS;InbreedingCoeff=0.1390;LEN=2;LRB=0.095997;LRBP=49.496;MQ0=0;MQ0Fraction=0.0000;MQM=57.464;MQRankSum=-1.875;NF;NR;NS=1065;PP;RA=5745;RL=12;RPP=4.2511;RR=16;RUN=1;ReadPosRankSum=-2.894;SAB=0.5;SAF=14;SAP=3.0103;SAR=14;SC=GGAGACCCCCCCTTCATCCTA [...]
-20	50228709	rs71192536	TG	T	20517	PASS	AA=924;AB=0.50203;ABA=735;ABP=3.0633;ABR=741;AC=200;AF=0.16502;AN=1212;BL=35460;BR=34197;BVAR;BaseQRankSum=13.810;DB;DEL;DP=32402;DP4=1760,2065,395,449;Dels=0.16;EL=439;EPP=7.9831;ER=485;FQ=999;FR;FS=0.558;HETAR=242;HOMA=63;HOMR=764;HP=5;HPLen=3;HR=3;HRun=3;HU=G;INDEL;InbreedingCoeff=0.1050;LEN=1;LRB=0.018132;LRBP=52.738;MQ=105.83;MQ0=0;MQ0Fraction=0.0000;MQM=75.87;MQRankSum=3.895;NF;NR;NS=1069;PP;PV4=0.7,1.5e-173,1,1;RA=4708;RL=486;RPP=8.4249;RR=43 [...]
-20	50236115	.	AGG	A,ACGGG,AG,AGGG	7429.57	PASS	AC=192,13,221,183;AF=0.2115,0.0143,0.2434,0.2015;AN=908;BaseQRankSum=1.045;DP=1177;FS=13.479;HaplotypeScore=11.8294;InbreedingCoeff=0.7959;MQ=52.98;MQ0=6;MQ0Fraction=0.0051;MQRankSum=-1.482;QD=7.28;ReadPosRankSum=-2.380;SB=-1229.31;VQSLOD=8.3762;set=VQSR
-20	51589568	.	TAAAC	AAAAC,T	12477.52	PASS	AF=0.27949;BaseQRankSum=-28.122;DP=3777;Dels=0.00;FR;FS=31.799;HP=7;HPLen=4;HR=3;HRun=0;HU=A;InbreedingCoeff=-0.1429;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.196;NF;NR;PP;ReadPosRankSum=-16.483;SC=AAATTCAAAATAAACAAACAA;TC;TR=18;TU=AAAC;VQSLOD=3.9201;set=filterInVQSR-2of5;sumGLbyD=52.43
-20	51617742	.	TGC	T,TGCGC	1374.91	PASS	AF=0.06000,0.02000;BaseQRankSum=12.051;DP=6231;Dels=0.00;FS=189.609;HPLen=1;HRun=0;InbreedingCoeff=0.0862;MQ0Fraction=0.0180;MQRankSum=-2.959;ReadPosRankSum=-5.090;VQSLOD=-2.8715;set=filterInVQSR-2of5;sumGLbyD=3.97
-20	51770354	.	AG	A	1010.90	PASS	AA=26;AB=0.52727;ABA=26;ABP=3.3656;ABR=29;AC=7;AF=0.0097;AF1=0.01637;AN=718;BL=1034;BR=964;BVAR;BaseQRankSum=5.588;CI95=0.01327,0.02212;DEL;DP=16259;DP4=2785,2239,15,10;Dels=0.01;EL=11;EPP=4.3466;ER=15;FQ=999;FR;FS=3.367;HETAR=8;HOMA=0;HOMR=1064;HP=2;HPLen=2;HR=2;HRun=2;HU=G;INDEL;InbreedingCoeff=0.0557;LEN=1;LRB=0.035035;LRBP=8.3357;MQ=90.48;MQ0=0;MQ0Fraction=0.0000;MQM=61.346;MQRankSum=-0.019;NF;NR;NS=1072;PP;PV4=0.69,2.1e-08,0.078,1;RA=6173;RL=13;RPP=3. [...]
-20	51848430	.	AT	A,ATT	999	PASS	AA=39;AB=0.83408;ABA=37;ABP=219.19;ABR=186;AC=14,33;AF=0.0153,0.0359;AF1=0.03062;AN=918;BL=1676;BR=1732;BVAR;BaseQRankSum=3.338;CI95=0.02212,0.03982;DP=14886;DP4=1970,1762,22,31;Dels=0.01;EL=18;EPP=3.5114;ER=21;FQ=999;FR;FS=3.004;HETAR=31;HOMA=0;HOMR=1040;HP=10;HPLen=9;HR=9;HRun=9;HU=T;INDEL;INS;InbreedingCoeff=0.1629;LEN=1;LRB=0.016432;LRBP=5.0085;MQ=80.05;MQ0=0;MQ0Fraction=0.0000;MQM=56.667;MQRankSum=0.325;NF;NR;NS=1071;PP;PV4=0.13,1,0.0095,0.064;RA=5318 [...]
-20	51897203	.	T	TG	8427.20	PASS	AA=237;AB=0.69846;ABA=215;ABP=246.92;ABR=498;AC=117;AF=0.1662;AN=704;BL=14961;BR=5990;BVAR;BaseQRankSum=22.203;DP=9710;Dels=0.00;EL=83;EPP=49.198;ER=154;FR;FS=9.450;HETAR=123;HOMA=9;HOMR=895;HP=5;HPLen=6;HR=6;HRun=0;HU=T;INS;InbreedingCoeff=-0.0513;LEN=1;LRB=0.42819;LRBP=8344.3;MQ0Fraction=0.0291;MQM=45.861;MQRankSum=-10.426;NF;NR;NS=1027;PP;RA=4919;RL=210;RPP=309.85;RR=27;RUN=1;ReadPosRankSum=-1.843;SAB=0.29536;SAF=70;SAP=89.219;SAR=167;SC=TTTGTTTGTTTTTTG [...]
-20	52274070	.	AAG	A	1400.37	PASS	AA=30;AB=0.74227;ABA=25;ABP=52.462;ABR=72;AC=21;AF=0.01756;AN=1196;BL=412;BR=1966;BVAR;BaseQRankSum=6.660;DEL;DP=9362;Dels=0.01;EL=16;EPP=3.2998;ER=14;FS=1.485;HETAR=18;HOMA=2;HOMR=1004;HRun=0;InbreedingCoeff=0.0317;LEN=2;LRB=0.65349;LRBP=2208.2;MQ0Fraction=0.0022;MQM=46.133;MQRankSum=-4.743;NS=1024;RA=3931;RL=2;RPP=51.941;RR=28;RUN=1;ReadPosRankSum=-4.152;SAB=0.4;SAF=12;SAP=5.6161;SAR=18;SRB=0.49784;SRF=1957;SRP=3.1699;SRR=1974;VQSLOD=5.6452;set=Intersec [...]
-20	52351501	.	TAC	T	199.59	PASS	AC=22;AF=0.0238;AN=926;BaseQRankSum=7.874;DP=22911;DP4=2146,1691,26,22;FR;FS=2.898;HP=4;HPLen=3;HR=1;HRun=0;HU=A;HaplotypeScore=18.6111;INDEL;InbreedingCoeff=-0.0326;MQ0=2;MQ0Fraction=0.0007;MQRankSum=1.011;NF;NR;PP;PV4=0.88,0.14,0.16,0.24;QD=1.10;ReadPosRankSum=-1.053;SB=-306.09;SC=GACACACAAATACACACACAC;TC;TR=13;TU=AC;VQSLOD=4.0486;set=filterInVQSR-2of5
-20	52447173	.	CA	C	503.89	PASS	AC=23;AF=0.01891;AN=1216;BaseQRankSum=0.801;DP=3266;FS=2.606;HRun=2;HaplotypeScore=22.1543;InbreedingCoeff=-0.0097;MQ=118.02;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.309;QD=2.65;ReadPosRankSum=-7.872;SB=-279.27;VQSLOD=4.1900;set=VQSR
-20	52498650	.	GT	G	24069	PASS	AA=74;AB=0.90594;ABA=57;ABP=870.4;ABR=549;AC=28;AF=0.02333;AN=1200;BL=505;BR=4514;BVAR;BaseQRankSum=-3.837;DEL;DP=9798;Dels=0.01;EL=41;EPP=4.8883;ER=33;FS=4.085;HETAR=209;HOMA=663;HOMR=121;HRun=1;InbreedingCoeff=0.0334;LEN=1;LRB=0.79876;LRBP=6956.6;MQ0=2;MQ0Fraction=0.0007;MQM=57.784;MQRankSum=-2.951;NS=995;RA=957;RL=8;RPP=101.72;RR=66;RUN=1;ReadPosRankSum=-14.806;SAB=0.39189;SAF=29;SAP=10.522;SAR=45;SRB=0.39916;SRF=382;SRP=87.53;SRR=575;VQSLOD=3.8710;set=fi [...]
-20	52823602	rs11469056	CAAA	C,CA,CAA,CAAAA,CAAAAA,CAAAAAA,CAAAAAAA,CAAAAAAAA,CAAAAAAAAA,CAAAAAAAAAA	14515.17	PASS	AC=24,83,246,109,83,19,10,16,22,59;AF=0.02128,0.07358,0.21809,0.09663,0.07358,0.01684,0.00887,0.01418,0.01950,0.05230;AN=1128;BVAR;BaseQRankSum=4.150;DB;DEL;DP=28279;FR;FS=2.021;HP=17;HR=17;HU=A;HaplotypeScore=27.8032;INS;InbreedingCoeff=0.7740;MQ=69.00;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.418;NF;NR;PP;QD=7.90;RUN=1;ReadPosRankSum=-3.864;SB=-3244.40;SC=GGTCCTAAGGCAAAAAAAAAA;T [...]
-20	53308906	.	CT	C,CTT	2276	PASS	AA=92;AB=0.84453;ABA=81;ABP=540.17;ABR=440;AC=53,81;AF=0.04351,0.06650;AN=1218;BL=3561;BR=4796;BVAR;BaseQRankSum=3.000;DP=11804;Dels=0.02;EL=48;EPP=3.3879;ER=44;FR;FS=13.197;HETAR=69;HOMA=3;HOMR=993;HP=11;HR=10;HRun=10;HU=T;INS;InbreedingCoeff=0.2297;LEN=1;LRB=0.14778;LRBP=399.32;MQ0=1;MQ0Fraction=0.0003;MQM=56.348;MQRankSum=3.154;NF;NR;NS=1065;PP;RA=5520;RL=39;RPP=7.6365;RR=53;RUN=1;ReadPosRankSum=-2.140;SAB=0.57609;SAF=53;SAP=7.6365;SAR=39;SC=AATCCAAAGT [...]
-20	53334602	.	T	TG,TGG	905.13	PASS	ABR=325;AC=44,22;AF=0.03624,0.01812;BVAR;BaseQRankSum=-4.608;DP=15015;FR;FS=494.901;HOMA=0;HOMR=1004;HP=1;HR=1;HU=G;HaplotypeScore=20.5023;INS;InbreedingCoeff=0.0799;MQ=116.70;MQ0=0;MQ0Fraction=0.0000;MQRankSum=8.022;NF;NR;NS=1064;PP;QD=0.35;RA=5690;RUN=1;ReadPosRankSum=-14.522;SB=-311.57;SC=AGCCATTGGCTGTTTCACTGA;SRB=0.40738;SRF=2318;SRP=426.97;SRR=3372;TC;TR=1;TU=G;VQSLOD=-2.3042;set=filterInVQSR-2of5
-20	53729115	.	T	TG	15.48	PASS	AC=1;AF=0.0015;AN=668;BaseQRankSum=-1.001;DP=1711;FS=9.048;HRun=2;HaplotypeScore=12.4681;InbreedingCoeff=-0.0320;MQ=131.36;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.193;QD=4.57;ReadPosRankSum=0.407;SB=-5.35;VQSLOD=4.8071;set=VQSR
-20	53960980	.	GC	G	588.40	PASS	AA=32;AB=0.78632;ABA=25;ABP=86.324;ABR=92;AF=0.0275;AF1=0.01689;AN=690;BL=1047;BR=1108;BVAR;BaseQRankSum=3.049;CI95=0.006637,0.02876;DEL;DP=11389;DP4=1514,1481,16,12;Dels=0.02;EL=27;EPP=35.854;ER=5;FQ=17.6;FS=0.652;HETAR=27;HOMA=3;HOMR=1006;HRun=1;INDEL;InbreedingCoeff=0.0473;LEN=1;LRB=0.028306;LRBP=6.7597;MQ=106.54;MQ0=0;MQ0Fraction=0.0000;MQM=115.53;MQRankSum=1.395;NS=1036;PV4=0.57,0.0057,0.46,0.22;RA=4207;RL=14;RPP=4.096;RR=18;RUN=1;ReadPosRankSum=-5.581 [...]
-20	54033830	.	GTATTTTAAAATCA	G	2220.86	PASS	AF=0.0113;BaseQRankSum=5.506;DP=2577;Dels=0.01;FR;FS=6.533;HP=5;HPLen=4;HR=1;HRun=0;HU=T;InbreedingCoeff=0.0032;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.969;NF;NR;PP;ReadPosRankSum=1.322;SC=TCAATATTTTGTATTTTAAAA;TC;TR=1;TU=T;VQSLOD=5.5145;set=Intersection;sumGLbyD=95.65
-20	54375236	.	GT	G	626.13	PASS	AA=40;AB=0.63551;ABA=39;ABP=20.078;ABR=68;AC=18;AF=0.0256;AN=702;BL=1331;BR=1743;BVAR;BaseQRankSum=9.346;DEL;DP=8568;Dels=0.02;EL=26;EPP=10.828;ER=14;FS=0.610;HETAR=21;HOMA=1;HOMR=1035;HRun=1;InbreedingCoeff=-0.0056;LEN=1;LRB=0.13403;LRBP=122.92;MQ0=0;MQ0Fraction=0.0000;MQM=67.125;MQRankSum=-2.537;NS=1058;RA=4870;RL=17;RPP=4.9646;RR=23;RUN=1;ReadPosRankSum=-1.229;SAB=0.525;SAF=21;SAP=3.2274;SAR=19;SRB=0.5271;SRF=2567;SRP=34.087;SRR=2303;VQSLOD=7.9228;set=In [...]
-20	54457331	.	G	GA	1793.40	PASS	AA=77;AB=0.66667;ABA=74;ABP=56.573;ABR=148;AC=33;AF=0.02687;AN=1228;BL=3834;BR=1154;BVAR;BaseQRankSum=10.572;DP=10230;Dels=0.00;EL=77;EPP=170.21;ER=0;FS=139.433;HETAR=44;HOMA=1;HOMR=1001;HRun=1;INS;InbreedingCoeff=0.0023;LEN=1;LRB=0.53729;LRBP=3129.8;MQ0Fraction=0.0095;MQM=4.7013;MQRankSum=-8.116;NS=1046;RA=4009;RL=77;RPP=170.21;RR=0;RUN=1;ReadPosRankSum=-6.026;SAB=1;SAF=77;SAP=170.21;SAR=0;SRB=0.57022;SRF=2286;SRP=174.7;SRR=1723;VQSLOD=1.1887;set=filterIn [...]
-20	54469810	.	CA	C	1697.62	PASS	AA=93;AB=0.63855;ABA=90;ABP=44.53;ABR=159;AC=34;AF=0.0374;AF1=0.01719;AN=908;BL=3242;BR=5839;BVAR;BaseQRankSum=10.425;CI95=0.009317,0.02795;DEL;DP=15197;DP4=2134,1896,56,46;Dels=0.03;EL=34;EPP=17.604;ER=59;FQ=16;FR;FS=9.985;HETAR=41;HOMA=1;HOMR=1011;HP=9;HPLen=8;HR=8;HRun=8;HU=A;INDEL;InbreedingCoeff=-0.0472;LEN=1;LRB=0.28598;LRBP=1615.8;MQ=83.37;MQ0=1;MQ0Fraction=0.0004;MQM=64.075;MQRankSum=3.036;NF;NR;NS=1053;PP;PV4=0.76,1,0.31,0.22;RA=5150;RL=28;RPP=34. [...]
-20	54542453	.	GTATA	G,GTA	5109.66	PASS	ABR=112;AC=66,56;AF=0.0682,0.0579;AN=968;BVAR;BaseQRankSum=17.089;DB;DEL;DP=5519;DS;Dels=0.06;FS=99.502;HOMA=15;HOMR=409;HRun=0;InbreedingCoeff=0.1584;MQ0Fraction=0.0178;MQRankSum=-6.854;NS=460;RA=864;RUN=1;ReadPosRankSum=0.855;SRB=0.79282;SRF=685;SRP=646.5;SRR=179;VQSLOD=0.6375;set=filterInVQSR-2of5;sumGLbyD=8.53
-20	54629773	.	CA	C	1799.50	PASS	AA=49;AB=0.82707;ABA=46;ABP=250.17;ABR=220;AC=9;AF=0.00746;AN=1206;BL=173;BR=2277;BVAR;BaseQRankSum=5.240;DEL;DP=8557;Dels=0.01;EL=49;EPP=109.41;ER=0;FS=32.359;HETAR=35;HOMA=1;HOMR=325;HRun=1;InbreedingCoeff=0.0892;LEN=1;LRB=0.85878;LRBP=3926.6;MQ0Fraction=0.0602;MQM=32.163;MQRankSum=-3.926;NS=361;RA=1091;RL=0;RPP=109.41;RR=49;RUN=1;ReadPosRankSum=-4.512;SAB=0;SAF=0;SAP=109.41;SAR=49;SRB=0.49404;SRF=539;SRP=3.3467;SRR=552;VQSLOD=1.1233;set=filterInVQSR-2of [...]
-20	54710245	.	TA	T	999	PASS	AF=0.0084;AF1=0.0148;BaseQRankSum=3.954;CI95=0.00885,0.02212;DP=8043;DP4=2000,1849,10,7;Dels=0.01;FQ=999;FR;FS=0.000;HP=9;HPLen=6;HR=3;HRun=6;HU=A;INDEL;InbreedingCoeff=0.1181;MQ=78.51;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.095;NF;NR;PP;PV4=0.63,0.00056,1,1;ReadPosRankSum=-0.448;SC=CAACAAAAAATAAATAAATAA;TC;TR=15;TU=AAAT;VQSLOD=7.8129;set=Intersection;sumGLbyD=19.02
-20	54968173	.	A	AAT,AATAT,AT,ATAT	89535.82	PASS	ABR=994;AC=561,278,2,3;AF=0.50179,0.24866,0.00179,0.00268;AN=1118;BVAR;BaseQRankSum=-2.699;DB;DP=27837;DP4=168,177,1045,866;Dels=0.00;FQ=999;FR;FS=12.472;HOMA=71;HOMR=455;HP=3;HPLen=4;HR=4;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.6391;KGPilot123;MQ=80.36;MQ0Fraction=0.0055;MQRankSum=-1.512;NF;NR;NS=913;PP;PV4=0.046,1,1,1;RA=2015;RUN=1;ReadPosRankSum=1.015;SC=GGCCACTTAAAATATATATAT;SRB=0.44864;SRF=904;SRP=49.187;SRR=1111;TC;TR=15;TU=AT;VQSLOD= [...]
-20	55176688	.	TA	T	421.84	PASS	AF=0.01322;AF1=0.01845;BaseQRankSum=5.383;CI95=0.01282,0.02564;DP=10531;DP4=1975,2017,16,14;Dels=0.01;FQ=91.2;FR;FS=7.401;HP=6;HPLen=5;HR=5;HRun=5;HU=A;INDEL;InbreedingCoeff=0.0829;MQ=75.80;MQ0=1;MQ0Fraction=0.0003;MQRankSum=-0.471;NF;NR;PP;PV4=0.72,1,1,1;ReadPosRankSum=0.223;SC=CTGCAAAATATAAAAATTAGG;TC;TR=5;TU=A;VQSLOD=6.6000;set=Intersection;sumGLbyD=12.15
-20	55664086	.	GTT	ATT,G,GT,GTTT	5622.44	PASS	AC=6,71,136;AF=0.00498,0.05887,0.11277;AN=1206;BVAR;BaseQRankSum=3.173;DB;DEL;DP=40384;DP4=1567,1317,54,29;Dels=0.05;FR;FS=1.949;HP=14;HR=11;HRun=11;HU=T;INDEL;INS;InbreedingCoeff=0.3490;MQ=77.90;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.052;NF;NR;PP;PV4=0.057,1,0.2,1.2e-05;RUN=1;ReadPosRankSum=-13.646;SC=AATTTTATTTGTTTTTTTTTT;TC;TR=11;TU=T;VQSLOD=11.7964;set=Intersection;sumGLbyD=8.09
-20	56045006	.	TG	T	342.15	PASS	AC=72;AF=0.0940;AN=766;BaseQRankSum=4.992;DP=1238;FS=1.460;HRun=7;HaplotypeScore=20.2784;InbreedingCoeff=0.1795;MQ=66.42;MQ0=1;MQ0Fraction=0.0008;MQRankSum=-0.937;QD=1.84;ReadPosRankSum=-4.385;SB=-320.83;VQSLOD=5.2383;set=VQSR
-20	56158711	.	AG	A	922.47	PASS	AA=18;AB=0.575;ABA=17;ABP=4.9646;ABR=23;AC=2;AF=0.0028;AN=714;BL=953;BR=808;BVAR;BaseQRankSum=3.129;DEL;DP=10462;Dels=0.01;EL=9;EPP=3.0103;ER=9;FR;FS=8.724;HETAR=4;HOMA=0;HOMR=1058;HP=1;HPLen=2;HR=2;HRun=1;HU=A;InbreedingCoeff=0.0262;LEN=1;LRB=0.08234;LRBP=28.936;MQ0=0;MQ0Fraction=0.0000;MQM=55.889;MQRankSum=2.052;NF;NR;NS=1062;PP;RA=6300;RL=9;RPP=3.0103;RR=9;RUN=1;ReadPosRankSum=-0.317;SAB=0.66667;SAF=12;SAP=7.3532;SAR=6;SC=TGGCCTAGCAAGCATCGTGAC;SRB=0.4814 [...]
-20	56258618	rs113670927	T	C,TGC,TGTGC,TGTGTGC	37834.99	PASS	ABR=441;AC=11,100,43;AF=0.0123,0.1119,0.0481;AN=894;BVAR;BaseQRankSum=19.514;DB;DP=23173;DP4=541,920,413,579;Dels=0.00;FQ=999;FR;FS=1.238;HOMA=28;HOMR=808;HP=2;HPLen=1;HR=1;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.2154;MQ=57.25;MQ0Fraction=0.0275;MQRankSum=-6.684;NF;NR;NS=976;PP;PV4=0.023,1,1,1;RA=3294;RUN=1;ReadPosRankSum=11.873;SC=TGCGTGTGTGTGTGTGTGTGT;SRB=0.42441;SRF=1398;SRP=166.5;SRR=1896;TC;TR=30;TU=GT;VQSLOD=6.7457;dbSNP=1 [...]
-20	56395857	.	T	TAGGCAG	6614.22	PASS	AA=30;AB=0.63415;ABA=30;ABP=15.827;ABR=52;AC=14;AF=0.0197;AF1=0.03154;AN=710;BL=991;BR=1813;BVAR;BaseQRankSum=-4.589;CI95=0.02434,0.04204;DP=13879;DP4=1543,1833,12,14;Dels=0.00;EL=14;EPP=3.2998;ER=16;FQ=999;FR;FS=1.482;HETAR=11;HOMA=0;HOMR=1051;HP=1;HPLen=2;HR=2;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0774;LEN=6;LRB=0.29315;LRBP=526.27;MQ=90.42;MQ0=0;MQ0Fraction=0.0000;MQM=39.433;MQRankSum=-7.011;NF;NR;NS=1062;PP;PV4=1,1,3.7e-09,1;RA=5322;RL=9;RPP=13. [...]
-20	56969289	.	GTTTGT	G	600.69	PASS	AF=0.0056;AF1=0.007726;BaseQRankSum=2.907;CI95=0.004425,0.01327;DP=9643;DP4=1892,1749,6,3;Dels=0.00;FQ=117;FR;FS=16.601;HP=5;HPLen=3;HR=3;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0236;MQ=92.59;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.134;NF;NR;PP;PV4=0.51,1,0.07,0.3;ReadPosRankSum=0.236;SC=TAAGGACGTTGTTTGTTTTGT;TC;TR=10;TU=GTTT;VQSLOD=5.8458;set=Intersection;sumGLbyD=39.51
-20	57187557	.	AG	A,AGG	1486.69	PASS	AA=130;AB=0.55446;ABA=90;ABP=8.2132;ABR=112;AC=56,26;AF=0.0574,0.0266;AN=976;BL=3817;BR=5968;BVAR;BaseQRankSum=5.517;DEL;DP=14174;DP4=925,721,59,48;Dels=0.05;EL=52;EPP=14.302;ER=78;FR;FS=0.917;HETAR=44;HOMA=17;HOMR=864;HP=4;HPLen=4;HR=4;HRun=4;HU=G;INDEL;InbreedingCoeff=0.2856;LEN=1;LRB=0.21983;LRBP=1029.8;MQ=91.56;MQ0=0;MQ0Fraction=0.0000;MQM=63.631;MQRankSum=1.900;NF;NR;NS=925;PP;PV4=0.84,1,1,0.39;RA=2746;RL=44;RPP=32.476;RR=86;RUN=1;ReadPosRankSum=- [...]
-20	57282771	.	T	TG	506.43	PASS	AA=34;AB=0.70312;ABA=19;ABP=25.946;ABR=45;AC=34;AF=0.0373;AN=912;BL=886;BR=1938;BVAR;BaseQRankSum=3.744;DP=4276;Dels=0.00;EL=18;EPP=3.2658;ER=16;FR;FS=0.639;HETAR=17;HOMA=9;HOMR=737;HP=9;HR=8;HRun=8;HU=G;INS;InbreedingCoeff=0.2149;LEN=1;LRB=0.37252;LRBP=853.99;MQ0=0;MQ0Fraction=0.0000;MQM=49.706;MQRankSum=-0.051;NF;NR;NS=763;PP;RA=1822;RL=9;RPP=19.36;RR=25;RUN=1;ReadPosRankSum=-2.111;SAB=0.55882;SAF=19;SAP=4.0322;SAR=15;SC=TCGGGGGGCGTGGGGGGGGTG;SRB=0.51098; [...]
-20	57419740	rs11481507	A	AT	82613.57	PASS	AA=3850;AB=0.41404;ABA=1786;ABP=198.63;ABR=1262;AC=919;AF=0.75328;AN=1220;BL=140665;BR=151383;BVAR;BaseQRankSum=-27.490;DB;DP=31794;DP4=588,585,1571,1721;Dels=0.00;EL=1924;EPP=3.0126;ER=1926;FQ=999;FR;FS=2.191;HETAR=482;HOMA=454;HOMR=135;HP=3;HPLen=3;HR=3;HRun=3;HU=T;INDEL;INS;InbreedingCoeff=0.0861;LEN=1;LRB=0.036699;LRBP=857.15;MQ=123.92;MQ0=0;MQ0Fraction=0.0000;MQM=91.654;MQRankSum=3.016;NF;NR;NS=1071;PP;PV4=0.16,1,0.12,1;RA=1850;RL=1874;RPP=8 [...]
-20	57529209	.	TA	AA,T	1285.20	PASS	AA=52;AB=0.89572;ABA=39;ABP=511.72;ABR=335;AC=0;AF=0.0000;AN=694;BL=1317;BR=3667;BVAR;BaseQRankSum=1.788;DEL;DP=8008;Dels=0.00;EL=30;EPP=5.6829;ER=22;FR;HETAR=151;HOMA=83;HOMR=752;HP=7;HR=7;HU=A;InbreedingCoeff=0.1368;LEN=1;LRB=0.47151;LRBP=2409.1;MQ0=0;MQ0Fraction=0.0000;MQM=58.288;MQRankSum=-0.490;NF;NR;NS=987;PP;QD=2.29;RA=2909;RL=4;RPP=83.856;RR=48;RUN=1;ReadPosRankSum=0.513;SAB=0.46154;SAF=24;SAP=3.6784;SAR=28;SB=-361.38;SC=CATAATTTTTTAAAAAAATAG;SR [...]
-20	57558194	.	CT	C,CTT,CTTT	6470.30	PASS	ABR=451;AC=104,161,177;AF=0.08919,0.13808,0.15180;BVAR;BaseQRankSum=1.172;DP=7985;FR;FS=2.202;HOMA=19;HOMR=778;HP=22;HR=15;HU=T;HaplotypeScore=16.1921;INS;InbreedingCoeff=0.6440;MQ=69.24;MQ0=27;MQ0Fraction=0.0109;MQRankSum=-0.003;NF;NR;NS=943;PP;QD=2.22;RA=2531;RUN=1;ReadPosRankSum=-0.104;SB=-2096.85;SC=GCCTTTTTTTCTTTTTTTTTT;SRB=0.34848;SRF=882;SRP=507.73;SRR=1649;TC;TR=15;TU=T;VQSLOD=6.5151;set=Intersection
-20	57693627	.	AG	A	1991.90	PASS	AA=52;AB=0.49462;ABA=47;ABP=3.0336;ABR=46;AC=15;AF=0.01227;AN=1222;BL=1902;BR=1478;BVAR;BaseQRankSum=-6.121;DEL;DP=26459;DP4=2647,2873,16,20;Dels=0.01;EL=25;EPP=3.1773;ER=27;FR;FS=3.135;HETAR=15;HOMA=1;HOMR=1064;HP=2;HPLen=3;HR=3;HRun=2;HU=A;INDEL;InbreedingCoeff=0.0866;LEN=1;LRB=0.12544;LRBP=118.51;MQ=116.26;MQ0=0;MQ0Fraction=0.0000;MQM=114.65;MQRankSum=1.942;NF;NR;NS=1080;PP;PV4=0.74,6.9e-08,1,0.38;RA=6781;RL=33;RPP=11.195;RR=19;RUN=1;ReadPosRankSum=-1.7 [...]
-20	57716287	.	A	AT	66.47	PASS	AC=6;AF=0.00506;AN=1186;BaseQRankSum=1.369;DP=2744;FS=3.834;HRun=8;HaplotypeScore=11.2046;InbreedingCoeff=0.1196;MQ=73.00;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-0.086;QD=2.14;ReadPosRankSum=-2.588;SB=-53.80;VQSLOD=4.2080;set=VQSR
-20	58121928	rs73625057	T	TGG	6649.17	PASS	AA=132;AB=0.57854;ABA=110;ABP=16.996;ABR=151;AC=57;AF=0.0617;AN=924;BL=4530;BR=4790;BVAR;BaseQRankSum=-13.456;DB;DP=30353;DP4=2107,2168,61,66;Dels=0.00;EL=67;EPP=3.0761;ER=65;FR;FS=0.708;HETAR=46;HOMA=8;HOMR=1023;HP=3;HPLen=2;HR=2;HRun=2;HU=G;INDEL;INS;InbreedingCoeff=0.1241;LEN=2;LRB=0.027897;LRBP=18.76;MQ=109.61;MQ0=1;MQ0Fraction=0.0004;MQM=79.833;MQRankSum=-0.699;NF;NR;NS=1077;PP;PV4=0.79,1,0.49,0.036;RA=5754;RL=61;RPP=4.6554;RR=71;RUN=1;ReadP [...]
-20	58287008	.	T	TC	23.57	PASS	AC=1;AF=0.0015;AN=678;BaseQRankSum=1.500;DP=1783;FS=0.000;HRun=1;HaplotypeScore=13.0585;InbreedingCoeff=0.0243;MQ=98.37;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.259;QD=5.43;ReadPosRankSum=1.115;SB=-40.33;VQSLOD=4.9523;set=VQSR
-20	58418087	.	TAC	T	1908.26	PASS	AA=64;AB=0.58667;ABA=62;ABP=12.796;ABR=88;AC=24;AF=0.0337;AN=712;BL=2841;BR=2706;BVAR;BaseQRankSum=12.276;DEL;DP=21427;DP4=2243,2398,22,31;Dels=0.03;EL=29;EPP=4.2318;ER=35;FQ=999;FR;FS=0.961;HETAR=21;HOMA=1;HOMR=1050;HP=2;HPLen=1;HR=1;HRun=0;HU=A;INDEL;InbreedingCoeff=0.0008;LEN=2;LRB=0.024337;LRBP=10.145;MQ=93.02;MQ0=0;MQ0Fraction=0.0000;MQM=51.109;MQRankSum=-3.746;NF;NR;NS=1072;PP;PV4=0.34,1.8e-11,2.3e-08,1;RA=6247;RL=37;RPP=6.4032;RR=27;RUN=1;ReadPosRa [...]
-20	58468826	.	ACAAG	A	999	PASS	AF=0.0014;AF1=0.003429;BaseQRankSum=4.082;CI95=0.003106,0.006211;DP=8461;DP4=2500,1817,8,2;Dels=0.01;FQ=999;FR;FS=5.034;HP=2;HPLen=1;HR=1;HRun=0;HU=C;INDEL;InbreedingCoeff=-0.0183;MQ=120.69;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.141;NF;NR;PP;PV4=0.21,1,0.054,1;ReadPosRankSum=2.096;SC=ATCCTGAAACACAAGAAGAAA;TC;TR=5;TU=AC;VQSLOD=7.4928;set=Intersection;sumGLbyD=29.17
-20	58731262	.	TC	T	999	PASS	AA=21;AB=0.48649;ABA=19;ABP=3.069;ABR=18;AC=7;AF=0.0101;AF1=0.01493;AN=694;BL=939;BR=848;BVAR;BaseQRankSum=4.205;CI95=0.01106,0.02212;DEL;DP=12598;DP4=1766,1428,11,15;Dels=0.01;EL=13;EPP=5.5954;ER=8;FQ=999;FR;FS=1.796;HETAR=8;HOMA=1;HOMR=1031;HP=7;HPLen=8;HR=8;HRun=2;HU=T;INDEL;InbreedingCoeff=-0.0030;LEN=1;LRB=0.050923;LRBP=13.073;MQ=124.57;MQ0=0;MQ0Fraction=0.0000;MQM=67.905;MQRankSum=1.103;NF;NR;NS=1040;PP;PV4=0.23,1,1,1;RA=4884;RL=10;RPP=3.1137;RR=11;RUN=1 [...]
-20	59181229	rs11476579	CTT	C,CT,CTTT,CTTTT	7787.17	PASS	AC=19,195,104,91;AF=0.01599,0.16414,0.08754,0.07660;AF1=0.2124;AN=1188;BVAR;BaseQRankSum=6.347;CI95=0.146,0.2743;DB;DEL;DP=26140;DP4=932,880,352,375;Dels=0.13;FQ=85.6;FR;FS=11.914;HP=14;HR=14;HRun=14;HU=T;INDEL;INS;InbreedingCoeff=0.4183;MQ=86.88;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.469;NF;NR;PP;PV4=0.17,1,1,1;RUN=1;ReadPosRankSum=-1.055;SC=GGTGAGAAAGCTTTTTTTTTT;TC;TR=14;TU=T;VQSLOD=7.4340;dbSNP=120;set=Intersection;sumGLbyD=7.02
-20	59213979	rs112141381	G	GC	9068	PASS	AA=131;AB=0.47115;ABA=110;ABP=4.5136;ABR=98;AF=0.0586;AN=700;BL=5395;BR=5816;BVAR;BaseQRankSum=15.453;DB;DP=23381;DP4=2191,2184,71,49;Dels=0.00;EL=66;EPP=3.0269;ER=65;FR;FS=7.907;HETAR=35;HOMA=5;HOMR=1019;HP=2;HPLen=3;HR=3;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.0283;LEN=1;LRB=0.037552;LRBP=37.34;MQ=72.13;MQ0=0;MQ0Fraction=0.0000;MQM=54.496;MQRankSum=0.897;NF;NR;NS=1059;PP;PV4=0.052,1,0.066,1;RA=4976;RL=59;RPP=5.8117;RR=72;RUN=1;ReadPosRankSum=-0.81 [...]
-20	59252945	.	CT	C,CTT	557.18	PASS	AA=24;AB=0.84868;ABA=23;ABP=163.53;ABR=129;AC=21,29;AF=0.01759,0.02429;BL=1217;BR=1336;BVAR;BaseQRankSum=5.135;DP=9970;Dels=0.01;EL=13;EPP=3.3722;ER=11;FS=2.302;HETAR=21;HOMA=1;HOMR=1012;HRun=9;INS;InbreedingCoeff=0.1549;LEN=1;LRB=0.046612;LRBP=15.055;MQ0=0;MQ0Fraction=0.0000;MQM=67.208;MQRankSum=0.086;NS=1034;RA=4421;RL=11;RPP=3.3722;RR=13;RUN=1;ReadPosRankSum=-1.826;SAB=0.41667;SAF=10;SAP=4.4579;SAR=14;SRB=0.49649;SRF=2195;SRP=3.4823;SRR=2226;VQSLOD=2 [...]
-20	60016966	.	CT	C	42650	PASS	AA=37;AB=0.97834;ABA=31;ABP=2847;ABR=1400;AC=15;AF=0.0163;AN=920;BL=2596;BR=778;BVAR;BaseQRankSum=-0.632;DEL;DP=10967;Dels=0.00;EL=14;EPP=7.7641;ER=23;FS=4.094;HETAR=421;HOMA=256;HOMR=385;HRun=1;InbreedingCoeff=-0.0051;LEN=1;LRB=0.53883;LRBP=2130.2;MQ0=0;MQ0Fraction=0.0000;MQM=120.3;MQRankSum=-0.911;NS=1072;RA=3413;RL=31;RPP=39.691;RR=6;RUN=1;ReadPosRankSum=-12.062;SAB=0.48649;SAF=18;SAP=3.069;SAR=19;SRB=0.47407;SRF=1618;SRP=22.943;SRR=1795;VQSLOD=3.3758;set [...]
-20	60188651	.	AG	A	17624.52	PASS	AA=462;AB=0.76548;ABA=409;ABP=1070.7;ABR=1335;AC=403;AF=0.34444;AN=1170;BL=13877;BR=25909;BVAR;BaseQRankSum=6.180;DEL;DP=9900;Dels=0.08;EL=353;EPP=282.84;ER=109;FR;FS=2699.057;HETAR=346;HOMA=26;HOMR=633;HP=3;HR=4;HRun=1;HU=A;InbreedingCoeff=-0.2900;LEN=1;LRB=0.30242;LRBP=7904.3;MQ0Fraction=0.0004;MQM=56.119;MQRankSum=1.644;NF;NR;NS=1005;PP;RA=3521;RL=112;RPP=269.25;RR=350;RUN=1;ReadPosRankSum=2.490;SAB=0.0064935;SAF=3;SAP=980.34;SAR=459;SC=AGGCTTCAAAAGAAA [...]
-20	60195570	.	GTACATACATACA	ATACATACATACA,G,GTACATACA	20140	PASS	ABR=102;AC=105,2;AF=0.08794,0.00168;AN=1194;BVAR;BaseQRankSum=-28.899;DB;DEL;DP=14347;Dels=0.02;FR;FS=52.125;HOMA=1;HOMR=1006;HP=1;HPLen=1;HR=1;HRun=0;HU=T;InbreedingCoeff=0.0695;MQ0Fraction=0.0007;MQRankSum=1.957;NF;NR;NS=1035;PP;RA=4759;RUN=1;ReadPosRankSum=-22.252;SAB=0.5;SAP=3.0103;SC=TGATAGATTCGTACATACATA;SRB=0.47615;SRF=2266;SRP=26.522;SRR=2493;TC;TR=21;TU=ACAT;VQSLOD=2.7673;set=filterInVQSR-2of5;sumGLbyD=19.14
-20	60670601	rs72127450	AT	A,ATT	6401.59	PASS	AC=177,79;AF=0.16239,0.07248;AF1=0.1602;AN=1090;BVAR;BaseQRankSum=8.618;CI95=0.1106,0.2058;DB;DEL;DP=17508;DP4=1285,1094,313,259;Dels=0.10;FQ=94.1;FR;FS=0.000;HP=12;HR=12;HRun=12;HU=T;INDEL;INS;InbreedingCoeff=0.1076;LEN=1;MQ=64.73;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.620;NF;NR;PP;PV4=0.78,1,0.012,1;RUN=1;ReadPosRankSum=-1.294;SC=AGCCAGGCACATTTTTTTTTT;TC;TR=12;TU=T;VQSLOD=6.1650;dbSNP=130;set=Intersection;sumGLbyD=5.80
-20	60685780	.	TC	T	1123.58	PASS	AC=79;AF=0.07655;AN=1032;BaseQRankSum=14.949;DP=2084;FS=23.521;HRun=1;HaplotypeScore=19.7117;InbreedingCoeff=0.1356;MQ=53.57;MQ0=61;MQ0Fraction=0.0293;MQRankSum=-7.958;QD=4.35;ReadPosRankSum=-13.757;SB=-791.28;VQSLOD=6.3549;set=VQSR
-20	60744906	rs113528167	CG	C	422.53	PASS	AC=48;AF=0.0732;AN=656;BaseQRankSum=17.669;DB;DP=1189;FS=0.356;HRun=1;HaplotypeScore=15.1808;InbreedingCoeff=0.2111;MQ=82.83;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-10.455;QD=2.71;ReadPosRankSum=-16.887;SB=-326.46;VQSLOD=7.1707;set=VQSR
-20	60848742	.	CGT	C,CGTGT	999	PASS	AF=0.00980,0.01225;BaseQRankSum=5.597;DP=17065;DP4=1928,2188,17,13;Dels=0.01;FR;HP=1;HPLen=2;HR=2;HRun=0;HU=C;INDEL;InbreedingCoeff=0.2094;MQ=115.78;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.281;NF;NR;PP;PV4=0.36,0.4,0.12,0.12;ReadPosRankSum=-1.465;SB=-157.35;SC=TAGACGCTTCCGTGTGTGTGT;TC;TR=11;TU=GT;VQSLOD=1.7100;set=filterInVQSR-2of5;sumGLbyD=16.39
-20	61023668	rs57452309	G	GAGC	6896.67	PASS	AC=115;AF=0.1445;AN=796;BaseQRankSum=12.146;DB;DP=1423;FS=5.070;HRun=0;HaplotypeScore=29.8897;InbreedingCoeff=0.0740;MQ=77.02;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-9.005;QD=19.16;ReadPosRankSum=-17.440;SB=-3045.82;VQSLOD=4.5788;set=VQSR
-20	61180519	.	C	CA,CT	1774.30	PASS	ABR=135;AC=27,15;AF=0.02538,0.01410;BVAR;BaseQRankSum=-2.189;DP=8393;FR;FS=27.692;HOMA=2;HOMR=825;HP=6;HPLen=3;HR=3;HU=T;HaplotypeScore=19.5313;INS;InbreedingCoeff=0.0868;LEN=1;MQ=56.11;MQ0=172;MQ0Fraction=0.0667;MQRankSum=2.605;NF;NR;NS=854;PP;QD=1.99;RA=2868;RUN=1;ReadPosRankSum=-7.324;SB=-385.54;SC=TTCTTTCTTTCTTTCTTTCTT;SRB=0.32741;SRF=939;SRP=745.08;SRR=1929;TC;TR=69;TU=CTTT;VQSLOD=3.4398;set=filterInVQSR-2of5
-20	61184281	.	AC	A	9798.10	PASS	AA=24;AB=0.96507;ABA=16;ABP=863.43;ABR=442;AC=4;AF=0.00341;AN=1174;BL=349;BR=1039;BVAR;BaseQRankSum=2.048;DEL;DP=10073;Dels=0.00;EL=11;EPP=3.3722;ER=13;FS=2.097;HETAR=141;HOMA=69;HOMR=829;HRun=1;InbreedingCoeff=0.0697;LEN=1;LRB=0.49712;LRBP=747.85;MQ0=0;MQ0Fraction=0.0000;MQM=98.042;MQRankSum=1.881;NS=1042;RA=3625;RL=5;RPP=20.744;RR=19;RUN=1;ReadPosRankSum=-8.009;SAB=0.75;SAF=18;SAP=16.039;SAR=6;SRB=0.52662;SRF=1909;SRP=25.323;SRR=1716;VQSLOD=1.8117;set=fi [...]
-20	62067246	.	T	TCGA	60869.60	PASS	AC=1024;AF=0.88889;AN=1152;BaseQRankSum=17.328;DP=2144;FS=2.378;HRun=0;HaplotypeScore=22.0069;InbreedingCoeff=0.1400;MQ=86.75;MQ0=6;MQ0Fraction=0.0028;MQRankSum=-5.536;QD=29.45;ReadPosRankSum=1.266;SB=-24220.18;VQSLOD=6.4647;set=VQSR
-20	62074219	.	C	CTAT,CTGT	2328	PASS	ABR=99;AC=20,6;AF=0.01754,0.00526;BVAR;BaseQRankSum=11.221;DP=9498;DS;FS=4.510;HOMA=15;HOMR=645;HaplotypeScore=82.8868;INS;InbreedingCoeff=0.0880;LEN=3;MQ=29.88;MQ0=1378;MQ0Fraction=0.2286;MQRankSum=-5.309;NS=689;QD=0.77;RA=1679;RUN=1;ReadPosRankSum=-3.510;SAR=1;SB=-93.21;SRB=0.70697;SRF=1187;SRP=627.71;SRR=492;VQSLOD=1.8325;set=filterInVQSR-2of5
-20	62304449	.	CA	C,CAA	6680.17	PASS	AC=141,69;AF=0.12567,0.06150;AF1=0.08178;AN=1122;BVAR;BaseQRankSum=9.754;CI95=0.05088,0.1128;DEL;DP=15867;DP4=1252,1289,232,208;Dels=0.10;FQ=52.6;FR;FS=6.576;HP=11;HR=11;HRun=11;HU=A;INDEL;INS;InbreedingCoeff=0.1950;LEN=1;MQ=60.48;MQ0Fraction=0.0004;MQRankSum=-0.049;NF;NR;PP;PV4=0.2,1,1,1;RUN=1;ReadPosRankSum=-2.137;SC=GATTCTGTGTCAAAAAAAAAA;TC;TR=11;TU=A;VQSLOD=7.4714;set=Intersection;sumGLbyD=8.36
-20	62804895	rs57769591	CCTT	C	1148	PASS	AC=8;AF=0.0085;AF1=0.002839;AN=938;BaseQRankSum=4.952;CI95=0.002212,0.006637;DB;DP=8889;DP4=2574,1668,4,8;FQ=12.3;FS=2.289;HPLen=3;HRun=0;HaplotypeScore=29.4184;INDEL;InbreedingCoeff=-0.0270;MQ0=876;MQ0Fraction=0.2674;MQRankSum=-0.641;PV4=0.074,1,1,1;QD=1.03;ReadPosRankSum=0.118;SB=-65.30;VQSLOD=6.4881;dbSNP=126;set=Intersection
-20	62907688	.	AAT	A	6629.57	PASS	AC=164;AF=0.13735;AN=1194;BaseQRankSum=27.368;DP=2746;FS=5.985;HRun=0;HaplotypeScore=14.7748;InbreedingCoeff=0.1433;MQ=96.65;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-3.318;QD=10.81;ReadPosRankSum=0.789;SB=-2662.16;VQSLOD=6.1473;set=VQSR
-20	62952465	.	G	GT	9149.70	PASS	AA=156;AB=0.66667;ABA=110;ABP=82.631;ABR=220;AC=8;AF=0.00768;AN=1042;BL=6618;BR=3296;BVAR;BaseQRankSum=-0.466;DP=6244;Dels=0.00;EL=70;EPP=6.5737;ER=86;FS=2.927;HETAR=88;HOMA=34;HOMR=664;HRun=0;INS;InbreedingCoeff=0.0711;LEN=1;LRB=0.33508;LRBP=2420.2;MQ0Fraction=0.0431;MQM=29.506;MQRankSum=-3.251;NS=786;RA=1722;RL=146;RPP=260.47;RR=10;RUN=1;ReadPosRankSum=-2.554;SAB=0.47436;SAF=74;SAP=3.9012;SAR=82;SRB=0.50523;SRF=870;SRP=3.4189;SRR=852;VQSLOD=6.1217;set=In [...]
diff --git a/tests/vcf-examples/18.vcf b/tests/vcf-examples/18.vcf
deleted file mode 100644
index e0d112c..0000000
--- a/tests/vcf-examples/18.vcf
+++ /dev/null
@@ -1,1000 +0,0 @@
-##fileformat=VCFv4.0
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	DNA_pool_A
-chr1	1281168	.	A	G	14	.	DP=37;AF1=0.6243;CI95=0.5,1;DP4=4,0,6,0;MQ=15;PV4=1,0.027,1,1	PL:GT:GQ	43,0,4:0/1:6
-chr1	1281205	.	T	C	26	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	58,9,0:1/1:63
-chr1	1281206	.	G	C	25	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	57,9,0:1/1:63
-chr1	1922737	.	G	C	13.2	.	DP=21;AF1=1;CI95=1,1;DP4=0,0,0,21;MQ=22	PL:GT:GQ	46,63,0:1/1:99
-chr1	21197513	.	A	G	55.1	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=41	PL:GT:GQ	88,21,0:1/1:84
-chr1	21343209	.	T	C	5.45	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=14	PL:GT:GQ	37,51,0:1/1:99
-chr1	22097362	.	T	C	4.75	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	35,9,0:1/1:63
-chr1	22254012	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	22650927	.	G	A	48.1	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=24	PL:GT:GQ	81,21,0:1/1:84
-chr1	23535401	.	C	T	40.4	.	DP=25;AF1=1;CI95=0.5,1;DP4=0,16,0,5;MQ=19;PV4=1,0.2,1,1	PL:GT:GQ	73,13,0:1/1:65
-chr1	23543855	.	T	C	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=44	PL:GT:GQ	82,18,0:1/1:90
-chr1	24245107	.	C	G	32	.	DP=4;AF1=0.5001;CI95=0.5,0.5;DP4=0,2,0,2;MQ=36;PV4=1,1,1,1	PL:GT:GQ	62,0,35:0/1:38
-chr1	24274412	.	G	C	39.5	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=32	PL:GT:GQ	72,12,0:1/1:72
-chr1	36529832	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr1	37788090	.	A	G	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr1	43120440	.	C	T	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=49;PV4=1,1,1,1	PL:GT:GQ	64,0,31:0/1:34
-chr1	43980466	.	C	T	43	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=19	PL:GT:GQ	76,45,0:1/1:99
-chr1	46047795	.	T	C	29.1	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=31	PL:GT:GQ	62,18,0:1/1:90
-chr1	48860309	.	C	T	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=46	PL:GT:GQ	141,18,0:1/1:90
-chr1	49415599	.	T	C	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	34,6,0:1/1:49
-chr1	51601816	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	51955459	.	G	C	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr1	68479569	.	T	G	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	43,6,0:1/1:49
-chr1	69032455	.	A	G	15.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	47,9,0:1/1:63
-chr1	71888225	.	G	T	9.31	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr1	72381528	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr1	82004013	.	A	G	37.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	70,12,0:1/1:72
-chr1	86289622	.	C	T	18	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	50,9,0:1/1:63
-chr1	90267663	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=45	PL:GT:GQ	54,9,0:1/1:63
-chr1	92699542	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr1	94867317	.	G	A	26.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	58,6,0:1/1:49
-chr1	96428713	.	C	G	3.98	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=27	PL:GT:GQ	33,6,0:1/1:49
-chr1	100466329	.	G	C	4.85	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=22	PL:GT:GQ	36,18,0:1/1:90
-chr1	101909281	.	G	A	70	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=4,0,5,0;MQ=46;PV4=1,1,0.096,1	PL:GT:GQ	100,0,88:0/1:91
-chr1	106216572	.	T	A	22	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,16,0;MQ=21	PL:GT:GQ	55,48,0:1/1:99
-chr1	107901770	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	40,6,0:1/1:49
-chr1	108431179	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=41	PL:GT:GQ	155,24,0:1/1:96
-chr1	112005344	.	C	T	99	.	DP=52;AF1=1;CI95=1,1;DP4=7,0,27,0;MQ=44;PV4=1,1,1,1	PL:GT:GQ	196,25,0:1/1:99
-chr1	116625452	.	C	T	36	.	DP=44;AF1=0.5;CI95=0.5,0.5;DP4=0,23,0,20;MQ=49;PV4=1,2.3e-69,0.42,1	PL:GT:GQ	66,0,179:0/1:69
-chr1	118060710	.	G	T	6.98	.	DP=8;AF1=0.4999;CI95=0.5,0.5;DP4=4,0,3,0;MQ=47;PV4=1,0.0071,1,1	PL:GT:GQ	36,0,73:0/1:39
-chr1	118198177	.	A	G	15.9	.	DP=23;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	47,6,0:1/1:49
-chr1	118586346	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr1	120809555	.	G	A	20	.	DP=8;AF1=0.5;CI95=0.5,0.5;DP4=6,0,2,0;MQ=46;PV4=1,1,1,1	PL:GT:GQ	50,0,106:0/1:53
-chr1	130723110	.	C	A	20.7	.	DP=8;AF1=0.5939;CI95=0.5,1;DP4=0,6,0,2;MQ=26;PV4=1,1,1,1	PL:GT:GQ	50,0,5:0/1:7
-chr1	133979895	.	T	C	14.9	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	46,6,0:1/1:49
-chr1	134977940	.	C	T	30	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=38;PV4=1,1,0.26,1	PL:GT:GQ	60,0,31:0/1:34
-chr1	141768589	.	G	A	18.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=4,0,4,0;MQ=51;PV4=1,2.7e-05,1,1	PL:GT:GQ	48,0,100:0/1:51
-chr1	141768590	.	G	A	22	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=2,0,4,0;MQ=50;PV4=1,0.0033,1,1	PL:GT:GQ	52,0,40:0/1:43
-chr1	146506051	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=43	PL:GT:GQ	76,9,0:1/1:63
-chr1	150997009	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr1	162915612	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	168455400	.	A	G	4.12	.	DP=28;AF1=1;CI95=1,1;DP4=0,0,0,27;MQ=10	PL:GT:GQ	35,81,0:1/1:99
-chr1	172784744	.	T	C	17.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	49,6,0:1/1:49
-chr1	183627307	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	185789457	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr1	187081827	.	T	C	4.77	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=17	PL:GT:GQ	36,30,0:1/1:99
-chr1	188468339	.	C	T	33	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=24	PL:GT:GQ	66,39,0:1/1:99
-chr1	188595435	.	C	T	41.8	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr1	188670561	.	G	C	3.55	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=18	PL:GT:GQ	34,27,0:1/1:99
-chr1	188924877	.	G	A	6.2	.	DP=10;AF1=0.9999;CI95=0.5,1;DP4=2,0,3,0;MQ=21;PV4=1,1,1,0.3	PL:GT:GQ	35,3,0:1/1:41
-chr1	190536295	.	G	A	68	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,36,0;MQ=18	PL:GT:GQ	101,108,0:1/1:99
-chr1	191129408	.	T	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr1	195937816	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr1	198857619	.	T	C	89	.	DP=61;AF1=0.5;CI95=0.5,0.5;DP4=0,38,0,17;MQ=30;PV4=1,0.032,1,1	PL:GT:GQ	119,0,139:0/1:99
-chr1	199057483	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	44,6,0:1/1:49
-chr1	200133619	.	G	C	5.83	.	DP=49;AF1=1;CI95=0.5,1;DP4=2,0,8,0;MQ=17;PV4=1,0.059,1,0.2	PL:GT:GQ	37,12,0:1/1:72
-chr1	200729661	.	A	T	36	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=27	PL:GT:GQ	69,42,0:1/1:99
-chr1	201374519	.	T	C	69.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=39	PL:GT:GQ	102,12,0:1/1:72
-chr1	202811668	.	G	A	20.2	.	DP=4;AF1=0.5163;CI95=0.5,1;DP4=0,1,0,3;MQ=24;PV4=1,1,1,1	PL:GT:GQ	50,0,12:0/1:15
-chr1	202960650	.	C	T	16.6	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=27	PL:GT:GQ	49,12,0:1/1:72
-chr1	205686638	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr1	205949857	.	A	G	3.14	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=21	PL:GT:GQ	33,15,0:1/1:75
-chr1	209806643	.	A	G	13.2	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=21	PL:GT:GQ	46,24,0:1/1:96
-chr1	209871501	.	C	T	25	.	DP=12;AF1=0.5;CI95=0.5,0.5;DP4=5,0,4,0;MQ=41;PV4=1,7.7e-06,1,1	PL:GT:GQ	55,0,84:0/1:58
-chr1	211051323	.	G	A	99	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=49	PL:GT:GQ	176,24,0:1/1:96
-chr1	211389716	.	C	T	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	43,6,0:1/1:49
-chr1	211868415	.	G	A	3.54	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=14	PL:GT:GQ	34,33,0:1/1:99
-chr1	211914531	.	C	T	84.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,1,0,4;MQ=46;PV4=1,1,1,1	PL:GT:GQ	116,7,0:1/1:57
-chr1	214691313	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr1	215184650	.	C	T	40.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	72,6,0:1/1:49
-chr1	215995258	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr1	217031394	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	217986960	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	76,9,0:1/1:63
-chr1	218086681	.	A	G	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=34	PL:GT:GQ	142,27,0:1/1:99
-chr1	218546019	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	218632417	.	G	T	17.1	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=26	PL:GT:GQ	50,21,0:1/1:84
-chr1	218833355	.	C	G	23	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=5,0,2,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	53,0,63:0/1:56
-chr1	219303186	.	T	C	7.79	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,25;MQ=12	PL:GT:GQ	40,75,0:1/1:99
-chr1	219517634	.	G	A	26.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=42	PL:GT:GQ	59,12,0:1/1:72
-chr1	219590158	.	T	C	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	33,12,0:1/1:72
-chr1	219709853	.	A	T	99	.	DP=124;AF1=0.5;CI95=0.5,0.5;DP4=80,0,41,0;MQ=44;PV4=1,0.26,1,1	PL:GT:GQ	143,0,156:0/1:99
-chr1	222457988	.	A	G	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=23	PL:GT:GQ	42,6,0:1/1:49
-chr1	222477914	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr1	223010233	.	A	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr1	223796360	.	G	A	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=21	PL:GT:GQ	37,6,0:1/1:49
-chr1	224273784	.	A	T	14.2	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=15	PL:GT:GQ	47,30,0:1/1:99
-chr1	224454685	.	C	T	46.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=32	PL:GT:GQ	79,15,0:1/1:75
-chr1	224514706	.	G	C	21	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,38,0;MQ=19	PL:GT:GQ	54,114,0:1/1:99
-chr1	224515793	.	C	T	99	.	DP=26;AF1=1;CI95=1,1;DP4=0,0,26,0;MQ=45	PL:GT:GQ	211,78,0:1/1:99
-chr1	224692969	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	40,6,0:1/1:49
-chr1	225607249	.	A	G	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=45;PV4=1,1,0,1	PL:GT:GQ	64,0,31:0/1:34
-chr1	226923918	.	C	A	29.1	.	DP=52;AF1=1;CI95=0.5,1;DP4=0,2,0,10;MQ=27;PV4=1,1,1,1	PL:GT:GQ	62,18,0:1/1:90
-chr1	227125189	.	T	C	56.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=41	PL:GT:GQ	89,12,0:1/1:72
-chr1	227133712	.	A	T	20.1	.	DP=26;AF1=0.5;CI95=0.5,0.5;DP4=11,0,10,0;MQ=23;PV4=1,1,0.48,1	PL:GT:GQ	50,0,39:0/1:42
-chr1	227943954	.	G	C	47	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=37	PL:GT:GQ	79,9,0:1/1:63
-chr1	227943974	.	G	A	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=34	PL:GT:GQ	66,12,0:1/1:72
-chr1	228067480	.	A	G	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=45	PL:GT:GQ	75,15,0:1/1:75
-chr1	228067510	.	A	G	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=45	PL:GT:GQ	140,15,0:1/1:75
-chr1	228088778	.	C	T	6.79	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=23	PL:GT:GQ	37,6,0:1/1:49
-chr1	228117888	.	A	C	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	45,6,0:1/1:49
-chr1	228139641	.	T	C	44.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	77,12,0:1/1:72
-chr1	228577146	.	T	C	26	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,14;MQ=22;PV4=1,1,1,0.027	PL:GT:GQ	56,0,77:0/1:59
-chr1	229001369	.	C	A	45	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	77,9,0:1/1:63
-chr1	229001386	.	C	T	8.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	39,6,0:1/1:49
-chr1	229348080	.	T	C	18.1	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=40;PV4=1,0.33,0.17,0.33	PL:GT:GQ	48,0,31:0/1:34
-chr1	229439710	.	C	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=32	PL:GT:GQ	66,12,0:1/1:72
-chr1	229655149	.	T	C	30	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=30	PL:GT:GQ	63,24,0:1/1:96
-chr1	229660873	.	C	G	81	.	DP=28;AF1=0.5;CI95=0.5,0.5;DP4=0,20,0,7;MQ=36;PV4=1,1,1,1	PL:GT:GQ	111,0,120:0/1:99
-chr2a	3661005	.	C	G	24	.	DP=13;AF1=0.5001;CI95=0.5,0.5;DP4=7,0,4,0;MQ=27;PV4=1,1.1e-05,1,1	PL:GT:GQ	54,0,34:0/1:37
-chr2a	4140063	.	G	A	81	.	DP=26;AF1=0.6671;CI95=0.5,1;DP4=18,0,8,0;MQ=24;PV4=1,8.3e-09,1,1	PL:GT:GQ	110,0,3:0/1:5
-chr2a	4248440	.	T	C	20	.	DP=28;AF1=0.5;CI95=0.5,0.5;DP4=11,0,7,0;MQ=25;PV4=1,1,0.47,1	PL:GT:GQ	50,0,92:0/1:53
-chr2a	4707656	.	A	G	63	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	95,9,0:1/1:63
-chr2a	5194801	.	G	A	7.59	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=24	PL:GT:GQ	38,6,0:1/1:49
-chr2a	14111103	.	A	G	7.84	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=20	PL:GT:GQ	40,21,0:1/1:84
-chr2a	17799746	.	A	G	11.3	.	DP=5;AF1=0.5001;CI95=0.5,0.5;DP4=0,3,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	41,0,35:0/1:37
-chr2a	24728910	.	G	A	45.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=28	PL:GT:GQ	78,15,0:1/1:75
-chr2a	29627939	.	G	T	5.44	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=27	PL:GT:GQ	36,9,0:1/1:63
-chr2a	31373164	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr2a	33935228	.	T	C	41.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr2a	36311856	.	G	A	99	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,0,29;MQ=44	PL:GT:GQ	213,87,0:1/1:99
-chr2a	39281204	.	T	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr2a	41087565	.	C	T	74.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=38	PL:GT:GQ	107,12,0:1/1:72
-chr2a	45574768	.	C	A	11.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=18	PL:GT:GQ	43,9,0:1/1:63
-chr2a	55464464	.	T	C	26.1	.	DP=7;AF1=0.9966;CI95=0.5,1;DP4=5,0,2,0;MQ=26;PV4=1,1,1,1	PL:GT:GQ	55,1,0:1/1:23
-chr2a	63107673	.	T	A	70.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=34	PL:GT:GQ	103,12,0:1/1:72
-chr2a	63141732	.	A	T	22.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	54,6,0:1/1:49
-chr2a	63141910	.	G	A	3.41	.	DP=16;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr2a	63141911	.	C	T	9.55	.	DP=16;AF1=0.5031;CI95=0.5,0.5;DP4=0,2,0,3;MQ=33;PV4=1,0.43,1,1	PL:GT:GQ	39,0,19:0/1:22
-chr2a	63143543	.	C	T	28	.	DP=18;AF1=1;CI95=1,1;DP4=0,1,0,17;MQ=16;PV4=1,1,1,1	PL:GT:GQ	61,42,0:1/1:99
-chr2a	66419805	.	G	A	3.69	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	34,15,0:1/1:75
-chr2a	66563922	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr2a	67719136	.	C	T	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	71,6,0:1/1:49
-chr2a	72781453	.	A	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr2a	76733211	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr2a	78190502	.	A	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr2a	85021209	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr2a	88554861	.	A	T	39	.	DP=74;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,4;MQ=46;PV4=1,1,1,1	PL:GT:GQ	69,0,92:0/1:72
-chr2a	88554877	.	A	G	92	.	DP=90;AF1=0.5;CI95=0.5,0.5;DP4=0,23,0,13;MQ=41;PV4=1,0.3,1,1	PL:GT:GQ	122,0,128:0/1:99
-chr2a	88824857	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr2a	93546675	.	C	T	26	.	DP=6;AF1=0.5;CI95=0.5,0.5;DP4=4,0,2,0;MQ=46;PV4=1,1,1,1	PL:GT:GQ	56,0,87:0/1:59
-chr2a	94788853	.	A	G	34.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	67,15,0:1/1:75
-chr2a	96738146	.	T	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr2a	102737384	.	A	G	12.3	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,18,0;MQ=11	PL:GT:GQ	45,54,0:1/1:99
-chr2a	103407172	.	A	G	35	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=19	PL:GT:GQ	68,24,0:1/1:96
-chr2a	105774580	.	T	G	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=30	PL:GT:GQ	135,39,0:1/1:99
-chr2a	106376301	.	C	G	24.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=19	PL:GT:GQ	57,18,0:1/1:90
-chr2a	106376315	.	C	T	8.75	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=19	PL:GT:GQ	41,18,0:1/1:90
-chr2a	112422267	.	C	T	30	.	DP=20;AF1=0.5;CI95=0.5,0.5;DP4=14,0,5,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	60,0,131:0/1:63
-chr2b	3049384	.	A	C	14.9	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	3049385	.	G	C	14.9	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	3049406	.	C	G	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=36	PL:GT:GQ	135,18,0:1/1:90
-chr2b	4213802	.	T	C	89.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr2b	5022895	.	G	A	66	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=49	PL:GT:GQ	99,30,0:1/1:99
-chr2b	6037666	.	G	T	56	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=17	PL:GT:GQ	89,39,0:1/1:99
-chr2b	13656952	.	G	A	19.2	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=21	PL:GT:GQ	52,18,0:1/1:90
-chr2b	15026944	.	A	G	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	37,6,0:1/1:49
-chr2b	23362613	.	A	G	5.64	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	37,15,0:1/1:75
-chr2b	45947861	.	C	G	68	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=50	PL:GT:GQ	101,33,0:1/1:99
-chr2b	46597824	.	T	C	65.6	.	DP=39;AF1=0.5939;CI95=0.5,1;DP4=23,0,10,0;MQ=22;PV4=1,0.014,1,1	PL:GT:GQ	95,0,5:0/1:7
-chr2b	49665191	.	G	T	34.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=37	PL:GT:GQ	67,21,0:1/1:84
-chr2b	61001546	.	A	G	48	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=26	PL:GT:GQ	81,24,0:1/1:96
-chr2b	88502851	.	T	C	4.77	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,2;MQ=37;PV4=1,1,0.46,1	PL:GT:GQ	33,0,34:0/1:33
-chr2b	91675431	.	C	T	30	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=27	PL:GT:GQ	63,24,0:1/1:96
-chr2b	91870148	.	T	G	67	.	DP=14;AF1=1;CI95=1,1;DP4=0,1,0,13;MQ=47;PV4=1,1,1,1	PL:GT:GQ	100,31,0:1/1:99
-chr2b	97066826	.	G	A	20.1	.	DP=9;AF1=0.5001;CI95=0.5,0.5;DP4=0,6,0,2;MQ=31;PV4=1,1,1,1	PL:GT:GQ	50,0,35:0/1:38
-chr2b	97670822	.	G	A	4.85	.	DP=6;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=18	PL:GT:GQ	36,18,0:1/1:90
-chr2b	102773175	.	A	G	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	49,9,0:1/1:63
-chr2b	109805532	.	T	C	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=45	PL:GT:GQ	176,24,0:1/1:96
-chr2b	110841448	.	A	G	11.1	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	42,6,0:1/1:49
-chr2b	123217025	.	T	C	31.5	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=37	PL:GT:GQ	64,12,0:1/1:72
-chr2b	123263214	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	43,9,0:1/1:63
-chr2b	127747292	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=52	PL:GT:GQ	100,9,0:1/1:63
-chr2b	130121958	.	A	G	89.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	122,15,0:1/1:75
-chr2b	130253633	.	A	G	14.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	130692761	.	C	T	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=51	PL:GT:GQ	82,18,0:1/1:90
-chr2b	130743365	.	A	G	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=42	PL:GT:GQ	140,15,0:1/1:75
-chr2b	131553874	.	A	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=37	PL:GT:GQ	43,9,0:1/1:63
-chr2b	131716894	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=40	PL:GT:GQ	137,24,0:1/1:96
-chr2b	131716936	.	G	A	99	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=36	PL:GT:GQ	173,36,0:1/1:99
-chr2b	131716952	.	A	G	99	.	DP=22;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,14;MQ=36;PV4=1,1,1,1	PL:GT:GQ	152,0,43:0/1:46
-chr2b	133360184	.	C	T	99	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,20;MQ=32	PL:GT:GQ	163,60,0:1/1:99
-chr2b	133644741	.	T	A	16.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=27	PL:GT:GQ	49,15,0:1/1:75
-chr2b	133720595	.	T	C	41	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=29	PL:GT:GQ	74,36,0:1/1:99
-chr2b	133727192	.	C	T	19.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	52,15,0:1/1:75
-chr2b	133727260	.	G	A	3.56	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=18	PL:GT:GQ	34,24,0:1/1:95
-chr2b	133800294	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=23	PL:GT:GQ	40,6,0:1/1:49
-chr2b	134582754	.	A	C	56.1	.	DP=37;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=36	PL:GT:GQ	89,21,0:1/1:84
-chr2b	134582763	.	G	C	78	.	DP=37;AF1=1;CI95=1,1;DP4=0,0,0,36;MQ=34	PL:GT:GQ	111,108,0:1/1:99
-chr2b	134809668	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr3	527814	.	C	G	46	.	DP=9;AF1=0.5;CI95=0.5,0.5;DP4=6,0,3,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	76,0,106:0/1:79
-chr3	559510	.	G	A	38	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=10,0,17,0;MQ=28;PV4=1,1,0.014,1	PL:GT:GQ	68,0,111:0/1:71
-chr3	879433	.	T	G	32	.	DP=4;AF1=0.5001;CI95=0.5,0.5;DP4=2,0,2,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	62,0,34:0/1:37
-chr3	1809645	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr3	3235812	.	C	T	7.59	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	38,6,0:1/1:49
-chr3	3250176	.	A	G	83	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=32	PL:GT:GQ	116,24,0:1/1:96
-chr3	5049073	.	T	A	99	.	DP=25;AF1=0.5;CI95=0.5,0.5;DP4=16,0,9,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	136,0,129:0/1:99
-chr3	5142874	.	G	A	99	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,38,0;MQ=28	PL:GT:GQ	179,114,0:1/1:99
-chr3	5554864	.	T	C	3.54	.	DP=7;AF1=0.4999;CI95=0.5,0.5;DP4=0,4,0,3;MQ=27;PV4=1,1,1,1	PL:GT:GQ	31,0,35:0/1:33
-chr3	5749648	.	G	A	21.2	.	DP=26;AF1=0.7303;CI95=0.5,1;DP4=0,7,0,7;MQ=26;PV4=1,0.16,1,0.17	PL:GT:GQ	50,0,2:0/1:3
-chr3	16451708	.	A	T	71.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=38	PL:GT:GQ	104,15,0:1/1:75
-chr3	23410276	.	G	A	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	140,15,0:1/1:75
-chr3	51368824	.	A	G	28	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	60,9,0:1/1:63
-chr3	53000453	.	A	G	54	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=19	PL:GT:GQ	87,30,0:1/1:99
-chr3	53000463	.	A	G	54	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=19	PL:GT:GQ	87,30,0:1/1:99
-chr3	59077423	.	C	T	77.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=33	PL:GT:GQ	110,15,0:1/1:75
-chr3	60040501	.	T	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	43,9,0:1/1:63
-chr3	64203481	.	A	G	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	66,12,0:1/1:72
-chr3	67947441	.	C	T	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr3	76372631	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	76,9,0:1/1:63
-chr3	80611316	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr3	81554381	.	G	T	17.6	.	DP=24;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=26	PL:GT:GQ	50,12,0:1/1:72
-chr3	87614647	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr3	93900455	.	A	T	11.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=13	PL:GT:GQ	44,15,0:1/1:75
-chr3	96174457	.	A	G	4.11	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=24	PL:GT:GQ	34,9,0:1/1:63
-chr3	96215569	.	A	C	3.41	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr3	96587998	.	A	C	7.08	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,6,0;MQ=17	PL:GT:GQ	39,18,0:1/1:90
-chr3	99711220	.	A	C	12.8	.	DP=11;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	42,2,0:1/1:37
-chr3	99789741	.	C	G	99	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=47	PL:GT:GQ	210,51,0:1/1:99
-chr3	103667651	.	A	C	3.98	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	33,6,0:1/1:49
-chr3	104604896	.	G	C	55	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	87,9,0:1/1:63
-chr3	104997217	.	G	A	33.1	.	DP=18;AF1=1;CI95=1,1;DP4=1,0,16,0;MQ=34;PV4=1,3e-10,0.17,0.36	PL:GT:GQ	66,19,0:1/1:76
-chr3	106097816	.	A	G	28	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=26	PL:GT:GQ	61,45,0:1/1:99
-chr3	106822259	.	G	C	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=50	PL:GT:GQ	140,15,0:1/1:75
-chr3	109946413	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	44,6,0:1/1:49
-chr3	121238963	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr3	126248567	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	45,6,0:1/1:49
-chr3	129733836	.	A	G	6.2	.	DP=4;AF1=0.5003;CI95=0.5,0.5;DP4=1,0,3,0;MQ=43;PV4=1,0.02,0.31,1	PL:GT:GQ	35,0,28:0/1:30
-chr3	131372785	.	C	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=34	PL:GT:GQ	76,9,0:1/1:63
-chr3	132290987	.	C	T	22	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=45	PL:GT:GQ	54,9,0:1/1:63
-chr3	136054421	.	C	T	73	.	DP=82;AF1=1;CI95=1,1;DP4=0,0,78,0;MQ=28	PL:GT:GQ	106,235,0:1/1:99
-chr3	141075246	.	G	A	30.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=41	PL:GT:GQ	62,6,0:1/1:49
-chr3	141075262	.	T	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=41	PL:GT:GQ	73,6,0:1/1:49
-chr3	141430649	.	G	T	81.8	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,1,0,4;MQ=41;PV4=1,0.34,1,0.25	PL:GT:GQ	113,6,0:1/1:49
-chr3	143617747	.	G	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	54,9,0:1/1:63
-chr3	163576128	.	C	T	5.6	.	DP=4;AF1=0.7302;CI95=0.5,1;DP4=2,0,2,0;MQ=23;PV4=1,1,1,1	PL:GT:GQ	33,0,2:0/1:3
-chr3	163839828	.	A	G	4.45	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=26	PL:GT:GQ	35,12,0:1/1:72
-chr3	175839340	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr3	190193258	.	G	T	3.98	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	33,6,0:1/1:49
-chr3	190777007	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr3	190970350	.	A	G	61	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=37	PL:GT:GQ	94,30,0:1/1:99
-chr3	198686408	.	G	A	36.6	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,1,0,16;MQ=25;PV4=1,1,0.026,1	PL:GT:GQ	69,11,0:1/1:66
-chr3	199277478	.	T	C	3.61	.	DP=6;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=21	PL:GT:GQ	34,18,0:1/1:90
-chr3	199780181	.	G	T	77	.	DP=45;AF1=0.5;CI95=0.5,0.5;DP4=0,35,0,10;MQ=33;PV4=1,1,1,1	PL:GT:GQ	107,0,114:0/1:99
-chr3	199889335	.	A	C	9.54	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=18	PL:GT:GQ	42,24,0:1/1:96
-chr3	200018161	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr4	195475	.	A	G	13	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	44,6,0:1/1:49
-chr4	639141	.	C	A	14.9	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr4	639152	.	C	T	15.2	.	DP=17;AF1=0.5016;CI95=0.5,0.5;DP4=0,2,0,2;MQ=33;PV4=1,1,1,1	PL:GT:GQ	45,0,22:0/1:25
-chr4	986497	.	G	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=33	PL:GT:GQ	163,30,0:1/1:99
-chr4	986516	.	C	T	55.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=37	PL:GT:GQ	88,21,0:1/1:84
-chr4	1207485	.	A	C	14.9	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	46,6,0:1/1:49
-chr4	1323502	.	G	A	13.2	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=22	PL:GT:GQ	46,33,0:1/1:99
-chr4	1613521	.	G	A	89	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,16,0;MQ=32	PL:GT:GQ	122,48,0:1/1:99
-chr4	1748790	.	C	T	38	.	DP=21;AF1=0.5005;CI95=0.5,0.5;DP4=6,0,8,0;MQ=40;PV4=1,0.09,1,1	PL:GT:GQ	68,0,27:0/1:30
-chr4	2255732	.	T	C	99	.	DP=29;AF1=1;CI95=1,1;DP4=0,0,28,0;MQ=31	PL:GT:GQ	186,84,0:1/1:99
-chr4	3010159	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr4	3545023	.	A	G	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=38	PL:GT:GQ	145,27,0:1/1:99
-chr4	3586344	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr4	3879337	.	A	G	16.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	49,12,0:1/1:72
-chr4	3940733	.	A	G	47.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	80,15,0:1/1:75
-chr4	4410338	.	T	C	13.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=31	PL:GT:GQ	46,15,0:1/1:75
-chr4	4796408	.	T	C	41	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=17	PL:GT:GQ	74,48,0:1/1:99
-chr4	4796414	.	A	G	11.3	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=17	PL:GT:GQ	44,45,0:1/1:99
-chr4	6436959	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr4	9494256	.	T	C	3.41	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=37	PL:GT:GQ	32,6,0:1/1:49
-chr4	24881479	.	G	A	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	46,9,0:1/1:63
-chr4	26128644	.	A	G	23	.	DP=18;AF1=0.5006;CI95=0.5,0.5;DP4=8,0,10,0;MQ=22;PV4=1,1,1,1	PL:GT:GQ	53,0,26:0/1:29
-chr4	42109100	.	G	A	17.1	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	49,9,0:1/1:63
-chr4	42309652	.	C	T	68	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr4	46913966	.	C	T	9.08	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=16	PL:GT:GQ	41,12,0:1/1:72
-chr4	50335142	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr4	51658550	.	C	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr4	58258023	.	T	C	26	.	DP=5;AF1=0.5002;CI95=0.5,0.5;DP4=0,3,0,2;MQ=34;PV4=1,1,1,0.05	PL:GT:GQ	56,0,32:0/1:35
-chr4	59219112	.	C	A	42.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=50	PL:GT:GQ	75,12,0:1/1:72
-chr4	62746067	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr4	67404338	.	G	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=39	PL:GT:GQ	66,12,0:1/1:72
-chr4	73353380	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr4	73946294	.	G	C	4.77	.	DP=51;AF1=0.4999;CI95=0.5,0.5;DP4=0,5,0,3;MQ=40;PV4=1,0.19,0.37,0.11	PL:GT:GQ	33,0,64:0/1:36
-chr4	79607484	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr4	82337365	.	G	C	90	.	DP=54;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=28	PL:GT:GQ	123,48,0:1/1:99
-chr4	82653801	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	34,9,0:1/1:63
-chr4	87130164	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	43,9,0:1/1:63
-chr4	87130176	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	43,9,0:1/1:63
-chr4	91459729	.	C	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr4	96130778	.	G	C	99	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,0,19;MQ=45	PL:GT:GQ	211,57,0:1/1:99
-chr4	100709417	.	A	G	45.1	.	DP=16;AF1=0.505;CI95=0.5,0.5;DP4=12,0,4,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	75,0,17:0/1:20
-chr4	107276770	.	C	T	70	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,6;MQ=31;PV4=1,1,1,1	PL:GT:GQ	100,0,97:0/1:98
-chr4	115327550	.	G	C	42	.	DP=67;AF1=1;CI95=1,1;DP4=0,1,0,66;MQ=35;PV4=1,3.2e-24,0.13,1	PL:GT:GQ	75,162,0:1/1:99
-chr4	136558502	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr4	159572459	.	G	A	15.1	.	DP=126;AF1=0.5;CI95=0.5,0.5;DP4=0,69,0,57;MQ=39;PV4=1,4.1e-96,0.077,1	PL:GT:GQ	45,0,175:0/1:48
-chr4	174968484	.	G	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	40,6,0:1/1:49
-chr4	175030633	.	T	C	14.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=29	PL:GT:GQ	47,18,0:1/1:90
-chr4	183410027	.	G	T	6.2	.	DP=31;AF1=0.5003;CI95=0.5,0.5;DP4=2,0,2,0;MQ=45;PV4=1,0.035,1,0.21	PL:GT:GQ	35,0,28:0/1:30
-chr4	190907368	.	T	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=50	PL:GT:GQ	66,12,0:1/1:72
-chr4	192175690	.	A	G	76.8	.	DP=7;AF1=0.95;CI95=0.5,1;DP4=0,3,0,4;MQ=35;PV4=1,1,1,1	PL:GT:GQ	105,0,0:1/1:10
-chr4	192673268	.	G	A	14.2	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=22	PL:GT:GQ	47,27,0:1/1:99
-chr4	192943966	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr4	195460104	.	C	G	23.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=19	PL:GT:GQ	56,24,0:1/1:96
-chr4	198277830	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr5	170098	.	A	G	13	.	DP=12;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	44,6,0:1/1:49
-chr5	395814	.	T	C	4.77	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,2;MQ=36;PV4=1,1,0.48,1	PL:GT:GQ	33,0,33:0/1:33
-chr5	414024	.	T	A	10.4	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=20	PL:GT:GQ	42,9,0:1/1:63
-chr5	496767	.	T	C	13.9	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr5	805676	.	C	G	45	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=32	PL:GT:GQ	78,51,0:1/1:99
-chr5	1252896	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr5	1418370	.	G	A	3.65	.	DP=8;AF1=0.7301;CI95=0.5,1;DP4=4,0,4,0;MQ=13;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr5	1494911	.	G	C	62	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=46	PL:GT:GQ	95,24,0:1/1:96
-chr5	1494932	.	C	T	6.98	.	DP=8;AF1=0.5001;CI95=0.5,0.5;DP4=1,0,2,0;MQ=46;PV4=1,0.1,0.077,1	PL:GT:GQ	36,0,31:0/1:33
-chr5	1506037	.	T	C	24.1	.	DP=24;AF1=1;CI95=0.5,1;DP4=11,0,13,0;MQ=16;PV4=1,1,1,1	PL:GT:GQ	55,5,0:1/1:46
-chr5	1509406	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	73,6,0:1/1:49
-chr5	1733649	.	A	G	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,25;MQ=47	PL:GT:GQ	212,75,0:1/1:99
-chr5	1747304	.	A	G	12.3	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=19	PL:GT:GQ	45,36,0:1/1:99
-chr5	1747308	.	C	A	44	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=19	PL:GT:GQ	77,36,0:1/1:99
-chr5	3519783	.	C	T	21.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=18	PL:GT:GQ	54,24,0:1/1:96
-chr5	4101593	.	A	G	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=43	PL:GT:GQ	102,12,0:1/1:72
-chr5	7204332	.	T	A	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=24	PL:GT:GQ	34,6,0:1/1:49
-chr5	11510398	.	A	C	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=51;PV4=1,1,0,1	PL:GT:GQ	64,0,31:0/1:34
-chr5	15406720	.	T	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	36,6,0:1/1:49
-chr5	25152417	.	C	A	10.9	.	DP=28;AF1=0.5718;CI95=0.5,1;DP4=0,2,0,6;MQ=25;PV4=1,1,0.21,1	PL:GT:GQ	40,0,6:0/1:8
-chr5	39072637	.	A	G	35.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=50	PL:GT:GQ	68,15,0:1/1:75
-chr5	46022699	.	G	A	44	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	76,9,0:1/1:63
-chr5	55664181	.	C	G	10.4	.	DP=8;AF1=0.9999;CI95=0.5,1;DP4=3,0,5,0;MQ=18;PV4=1,1,1,1	PL:GT:GQ	40,3,0:1/1:41
-chr5	56253386	.	T	C	50.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=36	PL:GT:GQ	83,21,0:1/1:84
-chr5	56253447	.	C	T	42.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=45	PL:GT:GQ	75,12,0:1/1:72
-chr5	71950166	.	G	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr5	72703090	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	40,6,0:1/1:49
-chr5	73570280	.	G	T	5.45	.	DP=41;AF1=1;CI95=1,1;DP4=0,0,41,0;MQ=15	PL:GT:GQ	37,123,0:1/1:99
-chr5	73701762	.	G	T	40.8	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	72,6,0:1/1:49
-chr5	76956867	.	T	C	10.2	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	41,6,0:1/1:49
-chr5	79097961	.	C	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	54,9,0:1/1:63
-chr5	87026167	.	T	C	22	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr5	97680525	.	T	C	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=23	PL:GT:GQ	33,12,0:1/1:72
-chr5	100674737	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr5	105389966	.	T	C	3.52	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=15	PL:GT:GQ	33,9,0:1/1:63
-chr5	109998341	.	A	C	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr5	120629105	.	C	T	6.79	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	37,6,0:1/1:49
-chr5	128383954	.	C	T	23	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=0,5,0,5;MQ=48;PV4=1,3.3e-07,1,1	PL:GT:GQ	53,0,98:0/1:56
-chr5	133925142	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr5	135375404	.	T	C	11.8	.	DP=6;AF1=1;CI95=0.5,1;DP4=1,0,3,0;MQ=31;PV4=1,0.03,1,1	PL:GT:GQ	42,4,0:1/1:45
-chr5	136498281	.	T	G	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr5	136717285	.	A	G	82.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	115,12,0:1/1:72
-chr5	136910734	.	G	A	62	.	DP=19;AF1=1;CI95=1,1;DP4=0,1,0,13;MQ=23;PV4=1,1,1,1	PL:GT:GQ	95,31,0:1/1:99
-chr5	141208149	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr5	148056348	.	C	A	37.1	.	DP=4;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=38;PV4=1,1,1,1	PL:GT:GQ	66,1,0:1/1:23
-chr5	151941534	.	G	T	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=34	PL:GT:GQ	79,12,0:1/1:72
-chr5	159967229	.	G	C	22.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	55,12,0:1/1:72
-chr5	174024541	.	T	G	29.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	59,2,0:1/1:37
-chr5	175525290	.	A	G	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=20	PL:GT:GQ	33,12,0:1/1:72
-chr5	175988954	.	A	C	14.2	.	DP=23;AF1=0.5;CI95=0.5,0.5;DP4=0,6,0,4;MQ=47;PV4=1,1,0.2,1	PL:GT:GQ	44,0,76:0/1:47
-chr5	176782226	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr5	179132834	.	C	G	99	.	DP=28;AF1=1;CI95=1,1;DP4=0,0,0,28;MQ=41	PL:GT:GQ	207,84,0:1/1:99
-chr5	180155809	.	G	C	3.01	.	DP=36;AF1=0.4997;CI95=0.5,0.5;DP4=25,0,9,0;MQ=35;PV4=1,1e-15,1,1	PL:GT:GQ	30,0,121:0/1:33
-chr5	181282819	.	T	G	38.3	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,2,0,9;MQ=23;PV4=1,1,1,1	PL:GT:GQ	71,14,0:1/1:70
-chr5	182426125	.	G	C	29	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=26	PL:GT:GQ	61,9,0:1/1:63
-chr5	182443682	.	G	A	3.69	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=21	PL:GT:GQ	34,15,0:1/1:75
-chr5	183008993	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr5	183312016	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr6_cox_hap1	519146	.	G	A	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=30	PL:GT:GQ	49,9,0:1/1:63
-chr6_cox_hap1	687497	.	A	G	33	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=2,0,4,0;MQ=35;PV4=1,0.0016,1,1	PL:GT:GQ	63,3,0:1/1:41
-chr6_qbl_hap2	120066	.	T	C	99	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	139,27,0:1/1:99
-chr6	277954	.	C	T	53	.	DP=41;AF1=1;CI95=1,1;DP4=4,0,37,0;MQ=19;PV4=1,1,0.3,1	PL:GT:GQ	86,49,0:1/1:99
-chr6	593158	.	A	G	4.61	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	34,6,0:1/1:49
-chr6	2865562	.	T	G	25	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=23	PL:GT:GQ	58,27,0:1/1:99
-chr6	3751403	.	G	A	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=32	PL:GT:GQ	75,15,0:1/1:75
-chr6	3884989	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr6	4127278	.	A	T	13.9	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr6	5887783	.	C	G	99	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=34	PL:GT:GQ	142,21,0:1/1:84
-chr6	5887811	.	C	T	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=34	PL:GT:GQ	88,21,0:1/1:84
-chr6	6937170	.	G	C	99	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,0,47;MQ=28	PL:GT:GQ	157,141,0:1/1:99
-chr6	7262317	.	C	T	13.2	.	DP=50;AF1=0.5;CI95=0.5,0.5;DP4=21,0,9,0;MQ=36;PV4=1,4e-05,0.17,0.26	PL:GT:GQ	43,0,158:0/1:46
-chr6	7533214	.	A	G	10.4	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	42,9,0:1/1:63
-chr6	20979907	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=38	PL:GT:GQ	76,9,0:1/1:63
-chr6	22321632	.	A	G	41	.	DP=5;AF1=0.5004;CI95=0.5,0.5;DP4=1,0,3,0;MQ=46;PV4=1,0.24,0.19,0.33	PL:GT:GQ	71,0,28:0/1:31
-chr6	25352296	.	G	A	7.8	.	DP=4;AF1=0.5003;CI95=0.5,0.5;DP4=0,1,0,3;MQ=38;PV4=1,1,0.16,1	PL:GT:GQ	37,0,28:0/1:30
-chr6	26298040	.	T	A	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=48;PV4=1,1,0.21,0.33	PL:GT:GQ	64,0,31:0/1:34
-chr6	33428755	.	G	A	70	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=32	PL:GT:GQ	103,27,0:1/1:99
-chr6	39512099	.	G	A	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=50	PL:GT:GQ	88,21,0:1/1:84
-chr6	39961094	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr6	40452120	.	A	G	40.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	72,6,0:1/1:49
-chr6	43204766	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=51	PL:GT:GQ	176,24,0:1/1:96
-chr6	52696512	.	C	T	70	.	DP=76;AF1=0.5;CI95=0.5,0.5;DP4=0,34,0,42;MQ=18;PV4=1,0.11,1,1	PL:GT:GQ	100,0,51:0/1:54
-chr6	53785550	.	A	G	99	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=46	PL:GT:GQ	190,30,0:1/1:99
-chr6	53897484	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr6	57038290	.	C	T	10.2	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	41,6,0:1/1:49
-chr6	62925087	.	G	C	35	.	DP=5;AF1=0.5008;CI95=0.5,0.5;DP4=1,0,4,0;MQ=36;PV4=1,1,0.2,1	PL:GT:GQ	65,0,25:0/1:28
-chr6	62925094	.	T	C	25.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=36	PL:GT:GQ	58,15,0:1/1:75
-chr6	70834405	.	G	A	72.1	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=29	PL:GT:GQ	105,21,0:1/1:84
-chr6	71026058	.	C	T	48.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=42	PL:GT:GQ	81,18,0:1/1:90
-chr6	74420752	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	76,9,0:1/1:63
-chr6	77498624	.	T	C	16.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	48,6,0:1/1:49
-chr6	80416836	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr6	113611590	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=46	PL:GT:GQ	100,9,0:1/1:63
-chr6	119308431	.	T	C	38.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=40	PL:GT:GQ	71,12,0:1/1:72
-chr6	151758592	.	T	C	3.07	.	DP=17;AF1=0.9966;CI95=0.5,1;DP4=0,8,0,9;MQ=13;PV4=1,1,1,1	PL:GT:GQ	29,1,0:1/1:23
-chr6	151759358	.	A	G	99	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=12,0,15,0;MQ=44;PV4=1,1,1,0.19	PL:GT:GQ	171,0,128:0/1:99
-chr6	154741755	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr6	161061053	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=52	PL:GT:GQ	40,6,0:1/1:49
-chr6	161474189	.	C	T	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	36,6,0:1/1:49
-chr6	164304657	.	C	T	10.4	.	DP=63;AF1=0.5;CI95=0.5,0.5;DP4=0,29,0,19;MQ=22;PV4=1,7.7e-11,1,0.049	PL:GT:GQ	40,0,37:0/1:38
-chr6	164703105	.	T	C	99	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=40	PL:GT:GQ	165,30,0:1/1:99
-chr6	167518328	.	A	G	78	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=27,0,14,0;MQ=33;PV4=1,0.026,0.43,0.056	PL:GT:GQ	108,0,149:0/1:99
-chr6	169906323	.	G	A	41.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr6	171893912	.	G	A	69.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=33	PL:GT:GQ	102,15,0:1/1:75
-chr6	173631604	.	A	G	6.98	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=4,0,3,0;MQ=37;PV4=1,0.069,1,1	PL:GT:GQ	36,0,34:0/1:35
-chr7	835856	.	C	T	27.5	.	DP=13;AF1=0.9998;CI95=0.5,1;DP4=4,0,6,0;MQ=23;PV4=1,0.46,1,1	PL:GT:GQ	57,2,0:1/1:37
-chr7	1046005	.	C	T	11.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	43,9,0:1/1:63
-chr7	1564339	.	C	T	71	.	DP=66;AF1=0.5;CI95=0.5,0.5;DP4=36,0,24,0;MQ=29;PV4=1,1,0.35,1	PL:GT:GQ	101,0,134:0/1:99
-chr7	1806266	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr7	1936013	.	G	T	7.77	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=17	PL:GT:GQ	39,9,0:1/1:63
-chr7	2319532	.	C	A	4.11	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=14	PL:GT:GQ	34,9,0:1/1:63
-chr7	2682121	.	C	T	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr7	3248116	.	T	C	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=37;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr7	3624766	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	40,6,0:1/1:49
-chr7	5291140	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr7	5314457	.	C	A	3.56	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=18	PL:GT:GQ	34,24,0:1/1:95
-chr7	5595072	.	T	A	79	.	DP=13;AF1=0.5;CI95=0.5,0.5;DP4=8,0,5,0;MQ=31;PV4=1,1,1,1	PL:GT:GQ	109,0,57:0/1:60
-chr7	5646060	.	G	C	7.79	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=10	PL:GT:GQ	40,30,0:1/1:99
-chr7	6056816	.	C	G	7.08	.	DP=6;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=23;PV4=1,1,1,1	PL:GT:GQ	35,1,0:1/1:23
-chr7	6412641	.	C	T	40	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=33	PL:GT:GQ	73,33,0:1/1:99
-chr7	6766874	.	A	G	34.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=43	PL:GT:GQ	67,15,0:1/1:75
-chr7	8482729	.	C	T	5.08	.	DP=16;AF1=0.8276;CI95=0.5,1;DP4=3,0,3,0;MQ=22;PV4=1,1,1,0.19	PL:GT:GQ	32,0,1:1/1:5
-chr7	9238362	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr7	9687781	.	G	A	33	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=0,16,0,12;MQ=48;PV4=1,6.5e-38,1,1	PL:GT:GQ	63,0,170:0/1:66
-chr7	9752803	.	A	T	14.2	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=18	PL:GT:GQ	47,27,0:1/1:99
-chr7	10240910	.	T	C	45.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	78,12,0:1/1:72
-chr7	11046187	.	C	T	86.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=47	PL:GT:GQ	119,12,0:1/1:72
-chr7	11548207	.	C	G	14.6	.	DP=13;AF1=1;CI95=0.5,1;DP4=6,1,0,5;MQ=18;PV4=0.015,1,1,1	PL:GT:GQ	46,7,0:1/1:57
-chr7	11580317	.	C	T	42	.	DP=12;AF1=1;CI95=1,1;DP4=0,1,0,10;MQ=22;PV4=1,1,1,1	PL:GT:GQ	75,23,0:1/1:92
-chr7	11585384	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr7	13498356	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	73,6,0:1/1:49
-chr7	13500887	.	G	A	15.1	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=22	PL:GT:GQ	48,30,0:1/1:99
-chr7	13827079	.	C	T	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	36,6,0:1/1:49
-chr7	14403976	.	T	G	59	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=39	PL:GT:GQ	92,24,0:1/1:96
-chr7	14756588	.	A	G	44	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=5,0,10,0;MQ=44;PV4=1,5.3e-18,1,1	PL:GT:GQ	74,0,70:0/1:72
-chr7	14756619	.	T	G	44	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=5,0,10,0;MQ=44;PV4=1,6.4e-10,1,1	PL:GT:GQ	74,0,70:0/1:72
-chr7	36734598	.	A	C	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	42,6,0:1/1:49
-chr7	36734599	.	A	T	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	42,6,0:1/1:49
-chr7	36734603	.	G	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	40,6,0:1/1:49
-chr7	40634921	.	A	C	55	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=39	PL:GT:GQ	88,39,0:1/1:99
-chr7	48271285	.	A	T	73	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=25	PL:GT:GQ	106,30,0:1/1:99
-chr7	56264700	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr7	62326003	.	C	A	26.1	.	DP=35;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=28	PL:GT:GQ	59,18,0:1/1:90
-chr7	109468934	.	T	G	5.13	.	DP=10;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=39;PV4=1,0.031,1,1	PL:GT:GQ	33,2,0:1/1:37
-chr7	110208327	.	C	G	16.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	48,6,0:1/1:49
-chr7	125654934	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=27	PL:GT:GQ	34,9,0:1/1:63
-chr7	125770209	.	A	C	32	.	DP=31;AF1=0.5;CI95=0.5,0.5;DP4=11,0,13,0;MQ=34;PV4=1,0.00017,0.16,0.22	PL:GT:GQ	62,0,105:0/1:65
-chr7	125770265	.	G	C	36	.	DP=16;AF1=0.5;CI95=0.5,0.5;DP4=0,5,0,5;MQ=48;PV4=1,0.0047,0.016,0.035	PL:GT:GQ	66,0,110:0/1:69
-chr7	126687042	.	A	G	21.1	.	DP=36;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=22	PL:GT:GQ	54,21,0:1/1:84
-chr7	132292897	.	G	T	99	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=43	PL:GT:GQ	167,21,0:1/1:84
-chr7	132334562	.	A	C	23	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=23	PL:GT:GQ	56,30,0:1/1:99
-chr7	132431838	.	C	T	13.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=1,0,4,0;MQ=23;PV4=1,1,1,1	PL:GT:GQ	44,5,0:1/1:46
-chr7	136324945	.	T	C	13.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	46,12,0:1/1:72
-chr7	136957634	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr7	141746871	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	40,6,0:1/1:49
-chr7	146831870	.	C	T	4.77	.	DP=14;AF1=0.5003;CI95=0.5,0.5;DP4=1,0,3,0;MQ=37;PV4=1,0.0029,0.28,1	PL:GT:GQ	33,0,28:0/1:30
-chr7	147142770	.	T	C	45	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=31	PL:GT:GQ	77,9,0:1/1:63
-chr7	147713906	.	C	T	4.77	.	DP=8;AF1=0.5002;CI95=0.5,0.5;DP4=2,0,4,0;MQ=35;PV4=1,8.9e-06,0.48,0.27	PL:GT:GQ	33,0,29:0/1:31
-chr7	148742642	.	G	A	68	.	DP=14;AF1=0.5032;CI95=0.5,0.5;DP4=4,0,10,0;MQ=28;PV4=1,1,1,1	PL:GT:GQ	98,0,19:0/1:22
-chr7	148879148	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr7	149484407	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr7	152444478	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	44,6,0:1/1:49
-chr7	154106613	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=51	PL:GT:GQ	100,9,0:1/1:63
-chr7	154776891	.	G	T	14.4	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	47,15,0:1/1:75
-chr7	155882061	.	A	C	29	.	DP=24;AF1=0.502;CI95=0.5,0.5;DP4=0,1,0,4;MQ=46;PV4=1,0.018,0.15,0.29	PL:GT:GQ	59,0,21:0/1:24
-chr7	155956844	.	G	C	23	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,4;MQ=38;PV4=1,1,0.38,1	PL:GT:GQ	53,0,103:0/1:56
-chr7	156277694	.	G	A	62	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=46	PL:GT:GQ	95,24,0:1/1:96
-chr7	156720588	.	T	C	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr7	156807649	.	T	C	3.01	.	DP=30;AF1=0.4997;CI95=0.5,0.5;DP4=0,4,0,3;MQ=43;PV4=1,0.16,0.15,1	PL:GT:GQ	30,0,72:0/1:33
-chr7	157331292	.	G	T	43.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=34	PL:GT:GQ	76,21,0:1/1:84
-chr7	157382957	.	T	C	33.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	66,12,0:1/1:72
-chr8	556382	.	A	G	37.1	.	DP=5;AF1=0.9966;CI95=0.5,1;DP4=2,0,3,0;MQ=31;PV4=1,1,1,1	PL:GT:GQ	66,1,0:1/1:23
-chr8	1661673	.	T	C	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr8	7379751	.	C	A	6.24	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=19	PL:GT:GQ	38,21,0:1/1:84
-chr8	8160505	.	A	T	68.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	101,12,0:1/1:72
-chr8	8160508	.	C	T	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	57,12,0:1/1:72
-chr8	16781011	.	A	G	55.5	.	DP=9;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=34	PL:GT:GQ	88,12,0:1/1:72
-chr8	18716499	.	A	T	20	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=0,4,0,2;MQ=29;PV4=1,1,1,1	PL:GT:GQ	50,0,52:0/1:51
-chr8	23326483	.	A	G	60	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=47	PL:GT:GQ	92,9,0:1/1:63
-chr8	25842819	.	T	A	12	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	43,6,0:1/1:49
-chr8	26300279	.	T	C	34	.	DP=44;AF1=1;CI95=1,1;DP4=0,0,41,0;MQ=21	PL:GT:GQ	67,123,0:1/1:99
-chr8	29673470	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	73,6,0:1/1:49
-chr8	29673473	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	40,6,0:1/1:49
-chr8	31685466	.	C	T	34	.	DP=17;AF1=0.5;CI95=0.5,0.5;DP4=10,0,5,0;MQ=28;PV4=1,0.072,1,0.36	PL:GT:GQ	64,0,50:0/1:53
-chr8	37378739	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr8	51325952	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr8	59221963	.	G	A	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr8	62764995	.	T	G	20	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=32	PL:GT:GQ	52,9,0:1/1:63
-chr8	63157426	.	C	G	41.6	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,7,0,15;MQ=19;PV4=1,1,1,0.25	PL:GT:GQ	74,11,0:1/1:66
-chr8	68710444	.	G	A	30	.	DP=5;AF1=0.6671;CI95=0.5,1;DP4=3,0,2,0;MQ=32;PV4=1,1,1,1	PL:GT:GQ	59,0,3:0/1:5
-chr8	76416560	.	G	A	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=46	PL:GT:GQ	122,12,0:1/1:72
-chr8	81425275	.	T	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr8	89842286	.	G	C	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=30	PL:GT:GQ	34,6,0:1/1:49
-chr8	100926281	.	G	A	38	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	70,9,0:1/1:63
-chr8	102746002	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr8	107850176	.	C	T	43.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=45	PL:GT:GQ	76,18,0:1/1:90
-chr8	109966441	.	T	C	27.3	.	DP=9;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=38	PL:GT:GQ	60,15,0:1/1:75
-chr8	118811716	.	G	T	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=50	PL:GT:GQ	155,18,0:1/1:90
-chr8	119440254	.	A	T	58.5	.	DP=5;AF1=0.8277;CI95=0.5,1;DP4=2,0,3,0;MQ=34;PV4=1,1,1,0.14	PL:GT:GQ	87,0,1:1/1:5
-chr8	121236024	.	G	A	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	71,6,0:1/1:49
-chr8	125489079	.	C	T	13	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr8	128502549	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr8	128502551	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr8	130951113	.	G	A	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=19	PL:GT:GQ	34,6,0:1/1:49
-chr8	135307123	.	G	A	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	36,6,0:1/1:49
-chr8	138814155	.	C	T	57.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	90,18,0:1/1:90
-chr8	140566111	.	A	G	18.1	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=15	PL:GT:GQ	51,36,0:1/1:99
-chr8	141586480	.	T	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr8	143376712	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr8	150662729	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr8	150741294	.	A	G	25.1	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=34	PL:GT:GQ	58,18,0:1/1:90
-chr8	150975618	.	A	G	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr8	151580103	.	T	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=20	PL:GT:GQ	36,6,0:1/1:49
-chr8	151634410	.	G	T	48	.	DP=17;AF1=0.5;CI95=0.5,0.5;DP4=0,12,0,5;MQ=39;PV4=1,0.072,1,1	PL:GT:GQ	78,0,125:0/1:81
-chr8	151709267	.	G	A	91.1	.	DP=8;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,7;MQ=40;PV4=1,1,0.28,0.37	PL:GT:GQ	121,0,16:0/1:19
-chr8	152636420	.	G	A	8.75	.	DP=3;AF1=0.9966;CI95=0.5,1;DP4=0,1,0,2;MQ=30;PV4=1,1,1,1	PL:GT:GQ	37,1,0:1/1:23
-chr8	152706967	.	G	A	3.01	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=16	PL:GT:GQ	33,30,0:1/1:99
-chr8	152786522	.	T	C	80.1	.	DP=16;AF1=0.5102;CI95=0.5,0.5;DP4=0,4,0,12;MQ=31;PV4=1,0.25,1,1	PL:GT:GQ	110,0,14:0/1:17
-chr8	152863132	.	T	G	5.44	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=30	PL:GT:GQ	36,9,0:1/1:63
-chr9	23235268	.	C	T	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	43,6,0:1/1:49
-chr9	26391176	.	T	C	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	47,6,0:1/1:49
-chr9	26868232	.	C	G	63	.	DP=20;AF1=0.5025;CI95=0.5,0.5;DP4=7,0,13,0;MQ=22;PV4=1,0.2,1,0.44	PL:GT:GQ	93,0,20:0/1:23
-chr9	34223668	.	C	T	22	.	DP=16;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,7;MQ=27;PV4=1,0.14,0.34,1	PL:GT:GQ	52,0,79:0/1:55
-chr9	39696645	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr9	40654130	.	T	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr9	41145321	.	T	G	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	79,12,0:1/1:72
-chr9	42273483	.	G	A	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr9	55633192	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	58705807	.	T	C	70	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=24	PL:GT:GQ	103,30,0:1/1:99
-chr9	61697149	.	C	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	63152790	.	A	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr9	63703913	.	C	G	90.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=38	PL:GT:GQ	123,21,0:1/1:84
-chr9	65116068	.	T	C	70	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=49	PL:GT:GQ	103,39,0:1/1:99
-chr9	71266598	.	C	A	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	33,6,0:1/1:49
-chr9	73188677	.	G	T	52	.	DP=294;AF1=1;CI95=1,1;DP4=44,0,245,0;MQ=33;PV4=1,0.28,0.0092,1	PL:GT:GQ	85,147,0:1/1:99
-chr9	78854179	.	G	T	22	.	DP=97;AF1=0.5;CI95=0.5,0.5;DP4=21,0,12,0;MQ=44;PV4=1,0.02,0.032,0.0033	PL:GT:GQ	52,0,158:0/1:55
-chr9	82964679	.	A	C	13.2	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=36	PL:GT:GQ	45,9,0:1/1:63
-chr9	84124545	.	G	T	57	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=2,0,3,0;MQ=49;PV4=1,1,0.024,1	PL:GT:GQ	87,0,59:0/1:62
-chr9	86552862	.	C	T	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=26	PL:GT:GQ	47,15,0:1/1:75
-chr9	87548941	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr9	89021101	.	G	A	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr9	90447825	.	G	A	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	40,6,0:1/1:49
-chr9	92462035	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	40,6,0:1/1:49
-chr9	93077294	.	T	G	5.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=31	PL:GT:GQ	36,9,0:1/1:63
-chr9	93998137	.	G	A	68	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=46	PL:GT:GQ	100,9,0:1/1:63
-chr9	93998148	.	C	T	21.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=36	PL:GT:GQ	54,15,0:1/1:75
-chr9	95028964	.	C	A	99	.	DP=83;AF1=0.5;CI95=0.5,0.5;DP4=0,57,0,26;MQ=32;PV4=1,9.3e-08,1,0.092	PL:GT:GQ	134,0,120:0/1:99
-chr9	103829155	.	A	G	33	.	DP=96;AF1=1;CI95=1,1;DP4=0,0,96,0;MQ=16	PL:GT:GQ	66,255,0:1/1:99
-chr9	104981331	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	73,6,0:1/1:49
-chr9	111070656	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	117395657	.	T	C	16.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	49,15,0:1/1:75
-chr9	117718907	.	A	G	46.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=29	PL:GT:GQ	79,18,0:1/1:90
-chr9	119149161	.	T	C	3.14	.	DP=65;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	33,15,0:1/1:75
-chr9	124528802	.	G	A	78	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=25	PL:GT:GQ	111,39,0:1/1:99
-chr9	126707903	.	G	A	26	.	DP=37;AF1=0.5;CI95=0.5,0.5;DP4=0,21,0,8;MQ=46;PV4=1,2.6e-07,0.21,0.42	PL:GT:GQ	56,0,175:0/1:59
-chr9	128700686	.	C	G	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	66,12,0:1/1:72
-chr9	129084077	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr9	129116900	.	A	T	20	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	52,9,0:1/1:63
-chr9	130290720	.	C	G	21.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	53,6,0:1/1:49
-chr9	130306057	.	C	G	71	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=28	PL:GT:GQ	104,42,0:1/1:99
-chr9	130528990	.	G	A	99	.	DP=31;AF1=1;CI95=1,1;DP4=0,0,31,0;MQ=27	PL:GT:GQ	174,93,0:1/1:99
-chr9	130529002	.	A	T	7.79	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=15	PL:GT:GQ	40,33,0:1/1:99
-chr9	130639996	.	A	G	8.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	39,6,0:1/1:49
-chr9	130704890	.	A	G	3.27	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=26	PL:GT:GQ	33,12,0:1/1:72
-chr9	130708345	.	G	A	13.3	.	DP=11;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=38;PV4=1,0.096,1,1	PL:GT:GQ	42,1,0:1/1:23
-chr9	131001601	.	T	A	3.98	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	33,6,0:1/1:49
-chr9	131058539	.	T	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	44,6,0:1/1:49
-chr9	131808965	.	C	T	42	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	75,27,0:1/1:99
-chr9	132551867	.	C	T	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	49,9,0:1/1:63
-chr9	132685120	.	A	G	4.75	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	35,9,0:1/1:63
-chr9	133175050	.	A	G	18.1	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=20	PL:GT:GQ	51,51,0:1/1:99
-chr9	133584978	.	A	G	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,25,0;MQ=45	PL:GT:GQ	212,75,0:1/1:99
-chr9	133661895	.	A	G	99	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=31	PL:GT:GQ	138,42,0:1/1:99
-chr9	133670376	.	T	C	68	.	DP=19;AF1=1;CI95=1,1;DP4=0,1,0,16;MQ=39;PV4=1,1.4e-20,1,1	PL:GT:GQ	101,39,0:1/1:99
-chr9	133843777	.	T	C	99	.	DP=9;AF1=0.5129;CI95=0.5,0.5;DP4=1,0,8,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	154,0,13:0/1:16
-chr9	134017265	.	G	C	3.27	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=13	PL:GT:GQ	33,12,0:1/1:72
-chr9	134105563	.	T	C	34.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=39	PL:GT:GQ	67,18,0:1/1:90
-chr9	134608906	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr9	134861929	.	T	A	9.49	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	41,9,0:1/1:63
-chr10	796662	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	54,9,0:1/1:63
-chr10	1216716	.	T	A	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr10	1220781	.	G	A	21	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=18	PL:GT:GQ	54,27,0:1/1:99
-chr10	1225208	.	T	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=47	PL:GT:GQ	100,9,0:1/1:63
-chr10	1727946	.	T	C	14.2	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=27	PL:GT:GQ	47,21,0:1/1:84
-chr10	5986542	.	T	C	83	.	DP=93;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=39	PL:GT:GQ	116,30,0:1/1:99
-chr10	6436277	.	G	A	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	36,6,0:1/1:49
-chr10	7704114	.	C	A	35	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=0,2,0,4;MQ=29;PV4=1,0.27,1,0.27	PL:GT:GQ	65,3,0:1/1:41
-chr10	10881734	.	A	G	9.52	.	DP=9;AF1=0.5;CI95=0.5,0.5;DP4=4,0,5,0;MQ=42;PV4=1,0.0026,0.14,1	PL:GT:GQ	39,0,91:0/1:42
-chr10	13099383	.	G	A	27.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	60,12,0:1/1:72
-chr10	15764077	.	G	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr10	18091502	.	T	C	47	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	79,9,0:1/1:63
-chr10	19645913	.	A	T	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	47,6,0:1/1:49
-chr10	22845062	.	C	T	18.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=18	PL:GT:GQ	51,21,0:1/1:84
-chr10	28282802	.	T	C	69	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,12,0;MQ=42	PL:GT:GQ	102,36,0:1/1:99
-chr10	28496872	.	T	G	8.44	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	39,6,0:1/1:49
-chr10	32746793	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr10	41437604	.	T	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr10	43051239	.	C	T	6.98	.	DP=3;AF1=0.5001;CI95=0.5,0.5;DP4=1,0,2,0;MQ=40;PV4=1,0.33,0.33,1	PL:GT:GQ	36,0,31:0/1:33
-chr10	44455192	.	C	T	4.41	.	DP=6;AF1=0.8276;CI95=0.5,1;DP4=0,3,0,3;MQ=21;PV4=1,1,1,1	PL:GT:GQ	31,0,1:1/1:5
-chr10	48387336	.	A	G	13	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr10	51561705	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr10	51561712	.	C	G	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	71,6,0:1/1:49
-chr10	55617954	.	G	A	8.44	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	39,6,0:1/1:49
-chr10	55718281	.	T	A	3.41	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr10	55888771	.	T	C	23.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	56,12,0:1/1:72
-chr10	56025569	.	C	G	34.1	.	DP=3;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,2;MQ=39;PV4=1,1,1,1	PL:GT:GQ	64,0,16:0/1:19
-chr10	57384943	.	G	T	84	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=16,0,13,0;MQ=26;PV4=1,0.015,1,1	PL:GT:GQ	114,0,110:0/1:99
-chr10	59873077	.	T	G	49	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=42	PL:GT:GQ	82,24,0:1/1:96
-chr10	61329572	.	C	T	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	47,6,0:1/1:49
-chr10	63790636	.	T	G	32.1	.	DP=19;AF1=1;CI95=1,1;DP4=1,0,10,0;MQ=28;PV4=1,0.14,1,1	PL:GT:GQ	65,22,0:1/1:88
-chr10	64466048	.	C	G	18.2	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=28	PL:GT:GQ	51,18,0:1/1:90
-chr10	65053440	.	G	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=39	PL:GT:GQ	153,30,0:1/1:99
-chr10	65407358	.	C	G	84.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	117,15,0:1/1:75
-chr10	65605291	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr10	66104447	.	T	C	99	.	DP=47;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,21;MQ=34;PV4=1,1,0.15,1	PL:GT:GQ	136,0,162:0/1:99
-chr10	82160859	.	G	C	99	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=36	PL:GT:GQ	153,39,0:1/1:99
-chr10	82198579	.	C	T	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr10	87086290	.	A	G	4.13	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=17	PL:GT:GQ	35,27,0:1/1:99
-chr10	89550621	.	T	G	74	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,0,45;MQ=45	PL:GT:GQ	107,135,0:1/1:99
-chr10	92325046	.	G	A	42.3	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	75,15,0:1/1:75
-chr10	94488050	.	A	G	5.46	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=2,0,2,0;MQ=43;PV4=1,0.16,1,1	PL:GT:GQ	34,0,34:0/1:34
-chr10	95024815	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr10	95466306	.	G	A	53	.	DP=7;AF1=0.6671;CI95=0.5,1;DP4=0,4,0,3;MQ=33;PV4=1,1,1,1	PL:GT:GQ	82,0,3:0/1:5
-chr10	100256777	.	T	G	3.83	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=23	PL:GT:GQ	34,12,0:1/1:72
-chr10	101510485	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr10	101530760	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr10	101879744	.	T	C	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=44	PL:GT:GQ	54,9,0:1/1:63
-chr10	102147276	.	G	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=33	PL:GT:GQ	43,9,0:1/1:63
-chr10	102642248	.	T	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr10	107666616	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr10	108319945	.	C	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	43,9,0:1/1:63
-chr10	109734371	.	G	A	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr10	112870604	.	C	T	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=36	PL:GT:GQ	79,12,0:1/1:72
-chr10	115304673	.	T	C	11.3	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr10	119380588	.	G	A	14.2	.	DP=4;AF1=0.502;CI95=0.5,0.5;DP4=1,0,3,0;MQ=43;PV4=1,0.18,0.32,1	PL:GT:GQ	44,0,21:0/1:24
-chr10	123063756	.	C	T	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=23	PL:GT:GQ	46,9,0:1/1:63
-chr10	128424770	.	T	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	45,6,0:1/1:49
-chr10	131229204	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr10	132420570	.	G	C	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr10	132528066	.	C	T	99	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,19,0;MQ=42	PL:GT:GQ	213,57,0:1/1:99
-chr10	132644619	.	G	A	19.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=23	PL:GT:GQ	52,15,0:1/1:75
-chr10	132707581	.	G	C	9.11	.	DP=51;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=25;PV4=1,1,1,1	PL:GT:GQ	38,2,0:1/1:37
-chr10	133026892	.	T	C	55.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=44	PL:GT:GQ	88,18,0:1/1:90
-chr11	768033	.	T	C	33.5	.	DP=4;AF1=0.8277;CI95=0.5,1;DP4=0,2,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	62,0,1:1/1:5
-chr11	768042	.	T	C	33.5	.	DP=6;AF1=0.8277;CI95=0.5,1;DP4=0,2,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	62,0,1:1/1:5
-chr11	874568	.	G	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	66,12,0:1/1:72
-chr11	1009210	.	T	C	4	.	DP=70;AF1=0.6241;CI95=0.5,1;DP4=0,3,0,8;MQ=24;PV4=1,1,0.5,1	PL:GT:GQ	31,0,4:0/1:6
-chr11	1016692	.	C	T	27	.	DP=39;AF1=1;CI95=1,1;DP4=0,0,0,38;MQ=22	PL:GT:GQ	60,114,0:1/1:99
-chr11	1034477	.	A	G	66	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	98,9,0:1/1:63
-chr11	1074037	.	G	A	4.13	.	DP=9;AF1=0.5001;CI95=0.5,0.5;DP4=4,0,5,0;MQ=24;PV4=1,1,0.43,1	PL:GT:GQ	32,0,30:0/1:31
-chr11	1556298	.	G	A	11.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	44,12,0:1/1:72
-chr11	1824777	.	T	C	27	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=28	PL:GT:GQ	60,30,0:1/1:99
-chr11	3395801	.	C	T	22	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr11	3411901	.	G	A	4.75	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	35,9,0:1/1:63
-chr11	3731606	.	A	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr11	3783855	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr11	3967636	.	A	G	4.29	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=24	PL:GT:GQ	35,15,0:1/1:75
-chr11	4385618	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr11	4424365	.	T	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr11	5295586	.	C	T	3.01	.	DP=52;AF1=0.4997;CI95=0.5,0.5;DP4=33,0,10,0;MQ=29;PV4=1,0.0045,0.3,0.17	PL:GT:GQ	30,0,131:0/1:33
-chr11	6157144	.	C	G	45.1	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=35	PL:GT:GQ	78,21,0:1/1:84
-chr11	6352044	.	C	T	18	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=31	PL:GT:GQ	50,9,0:1/1:63
-chr11	6767356	.	T	C	9.63	.	DP=3;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=29;PV4=1,1,1,1	PL:GT:GQ	38,1,0:1/1:23
-chr11	6999404	.	G	C	21	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=37	PL:GT:GQ	53,9,0:1/1:63
-chr11	9120930	.	C	G	17.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr11	9373125	.	T	C	19.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	51,6,0:1/1:49
-chr11	9585101	.	C	T	67	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=45	PL:GT:GQ	100,42,0:1/1:99
-chr11	10266192	.	A	C	14.3	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=27	PL:GT:GQ	47,18,0:1/1:90
-chr11	10303263	.	T	C	8.64	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,17;MQ=18	PL:GT:GQ	41,51,0:1/1:99
-chr11	10420170	.	T	C	35	.	DP=17;AF1=1;CI95=1,1;DP4=0,1,0,15;MQ=28;PV4=1,0.12,1,0.4	PL:GT:GQ	68,36,0:1/1:99
-chr11	10912169	.	G	A	99	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=49	PL:GT:GQ	155,18,0:1/1:90
-chr11	11315826	.	T	G	6.29	.	DP=27;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=19	PL:GT:GQ	38,18,0:1/1:90
-chr11	11603859	.	A	C	22	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,6;MQ=34;PV4=1,9.5e-13,0.22,1	PL:GT:GQ	52,0,115:0/1:55
-chr11	11700034	.	C	T	33	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=30	PL:GT:GQ	66,27,0:1/1:99
-chr11	11822758	.	G	A	15.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,3;MQ=38;PV4=1,0.18,1,1	PL:GT:GQ	45,0,88:0/1:48
-chr11	11976636	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=24	PL:GT:GQ	54,9,0:1/1:63
-chr11	14380517	.	C	G	16.1	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=5,0,5,0;MQ=48;PV4=1,2.1e-05,0.13,1	PL:GT:GQ	46,0,113:0/1:49
-chr11	14419212	.	A	G	91.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=38	PL:GT:GQ	124,18,0:1/1:90
-chr11	14846792	.	A	G	55	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=19	PL:GT:GQ	88,33,0:1/1:99
-chr11	15494556	.	C	T	99	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=22,0,14,0;MQ=34;PV4=1,0.0071,1,1	PL:GT:GQ	146,0,159:0/1:99
-chr11	16262879	.	A	C	16.1	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=0,1,0,3;MQ=43;PV4=1,0.061,0.24,0.33	PL:GT:GQ	46,0,28:0/1:31
-chr11	21514947	.	T	C	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=41	PL:GT:GQ	57,12,0:1/1:72
-chr11	22532576	.	C	G	28	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,17;MQ=17	PL:GT:GQ	61,51,0:1/1:99
-chr11	23529238	.	G	T	4.29	.	DP=13;AF1=0.5334;CI95=0.5,1;DP4=1,0,3,0;MQ=37;PV4=1,1,0.34,0.21	PL:GT:GQ	32,0,9:0/1:12
-chr11	24249554	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr11	24853167	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr11	33353903	.	T	C	24.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=36	PL:GT:GQ	57,15,0:1/1:75
-chr11	35126569	.	T	C	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	57,12,0:1/1:72
-chr11	35132248	.	C	T	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr11	35155482	.	T	C	68	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=46	PL:GT:GQ	101,66,0:1/1:99
-chr11	52494088	.	T	C	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	140,27,0:1/1:99
-chr11	57899943	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr11	62261460	.	G	T	19.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,5;MQ=27;PV4=1,1.1e-06,1,1	PL:GT:GQ	49,0,58:0/1:51
-chr11	67456049	.	C	T	39.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=19	PL:GT:GQ	72,18,0:1/1:90
-chr11	68509708	.	C	G	3.65	.	DP=9;AF1=0.7301;CI95=0.5,1;DP4=0,5,0,4;MQ=17;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr11	70115115	.	T	A	99	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=49	PL:GT:GQ	140,15,0:1/1:75
-chr11	72643951	.	T	C	70	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=39	PL:GT:GQ	103,66,0:1/1:99
-chr11	72647930	.	G	A	36	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=0,1,0,3;MQ=41;PV4=1,1,0.3,1	PL:GT:GQ	66,0,28:0/1:31
-chr11	73330148	.	C	T	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr11	81720893	.	A	G	5.83	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=19	PL:GT:GQ	37,12,0:1/1:72
-chr11	83813797	.	A	G	23.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	56,12,0:1/1:72
-chr11	85949488	.	C	A	54	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=37	PL:GT:GQ	87,42,0:1/1:99
-chr11	87634829	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr11	90913093	.	A	T	35.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	67,6,0:1/1:49
-chr11	93793348	.	G	A	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=31	PL:GT:GQ	139,24,0:1/1:96
-chr11	100802294	.	T	C	16.6	.	DP=21;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	49,12,0:1/1:72
-chr11	107455449	.	C	T	8.44	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=26	PL:GT:GQ	39,6,0:1/1:49
-chr11	111344355	.	A	G	69.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=43	PL:GT:GQ	102,12,0:1/1:72
-chr11	111611115	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr11	113050466	.	G	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	36,6,0:1/1:49
-chr11	114332544	.	T	C	3.54	.	DP=17;AF1=0.4999;CI95=0.5,0.5;DP4=0,4,0,5;MQ=37;PV4=1,0.32,0.13,1	PL:GT:GQ	31,0,37:0/1:33
-chr11	114332549	.	G	A	3.54	.	DP=17;AF1=0.4998;CI95=0.5,0.5;DP4=0,9,0,8;MQ=36;PV4=1,3.1e-10,0.088,1	PL:GT:GQ	31,0,127:0/1:34
-chr11	114843578	.	G	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr11	115580279	.	A	G	99	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,15,0;MQ=48	PL:GT:GQ	190,45,0:1/1:99
-chr11	116434328	.	G	A	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr11	125914161	.	A	G	20.8	.	DP=7;AF1=0.95;CI95=0.5,1;DP4=3,0,4,0;MQ=38;PV4=1,0.074,1,1	PL:GT:GQ	49,0,0:1/1:10
-chr11	125917089	.	C	T	12.3	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=0,28,0,12;MQ=44;PV4=1,4.7e-25,1,1	PL:GT:GQ	42,0,167:0/1:45
-chr11	127194100	.	A	G	60	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=49	PL:GT:GQ	93,24,0:1/1:96
-chr12	70856	.	G	A	27.5	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	60,12,0:1/1:72
-chr12	153693	.	T	C	52.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=38	PL:GT:GQ	85,15,0:1/1:75
-chr12	924547	.	C	G	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	69,6,0:1/1:49
-chr12	1555916	.	G	A	7.18	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	39,15,0:1/1:75
-chr12	1919860	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr12	2283756	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr12	2805983	.	G	C	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr12	6088203	.	T	C	72.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=37	PL:GT:GQ	105,15,0:1/1:75
-chr12	7099460	.	G	C	10.8	.	DP=6;AF1=0.8277;CI95=0.5,1;DP4=3,0,3,0;MQ=26;PV4=1,0.027,1,1	PL:GT:GQ	39,0,1:1/1:5
-chr12	7099464	.	G	A	13.3	.	DP=6;AF1=0.9966;CI95=0.5,1;DP4=2,0,3,0;MQ=28;PV4=1,0.16,1,1	PL:GT:GQ	42,1,0:1/1:23
-chr12	7198516	.	T	G	4.61	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	34,6,0:1/1:49
-chr12	23331895	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr12	28209020	.	T	G	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	47,15,0:1/1:75
-chr12	30074073	.	C	T	32.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	64,6,0:1/1:49
-chr12	30563452	.	T	C	25	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	57,9,0:1/1:63
-chr12	30563453	.	A	G	25	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	57,9,0:1/1:63
-chr12	30563464	.	C	A	78.8	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,2,0,5;MQ=34;PV4=1,0.29,1,1	PL:GT:GQ	110,6,0:1/1:49
-chr12	31505085	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr12	34041336	.	G	A	5.46	.	DP=5;AF1=0.5;CI95=0.5,0.5;DP4=2,0,2,0;MQ=36;PV4=1,1,0.48,0.21	PL:GT:GQ	34,0,34:0/1:34
-chr12	49003648	.	C	G	42	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=39	PL:GT:GQ	75,24,0:1/1:96
-chr12	51280690	.	G	A	69	.	DP=98;AF1=0.5;CI95=0.5,0.5;DP4=13,0,18,0;MQ=45;PV4=1,1,0.051,1	PL:GT:GQ	99,0,84:0/1:87
-chr12	69206633	.	T	C	17.1	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=17	PL:GT:GQ	50,33,0:1/1:99
-chr12	80417253	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr12	86633033	.	C	T	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=43;PV4=1,1,0.33,1	PL:GT:GQ	64,0,31:0/1:34
-chr12	98097274	.	C	T	47.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=31	PL:GT:GQ	80,15,0:1/1:75
-chr12	105269319	.	C	T	19	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=26	PL:GT:GQ	51,9,0:1/1:63
-chr12	109053425	.	G	A	9.53	.	DP=8;AF1=0.5012;CI95=0.5,0.5;DP4=2,0,6,0;MQ=25;PV4=1,1,0.19,1	PL:GT:GQ	39,0,23:0/1:26
-chr12	111904540	.	A	G	3.41	.	DP=65;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	32,6,0:1/1:49
-chr12	115038686	.	T	C	15.2	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=27	PL:GT:GQ	48,21,0:1/1:84
-chr12	115039419	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	34,9,0:1/1:63
-chr12	115103890	.	G	A	66	.	DP=39;AF1=1;CI95=1,1;DP4=0,0,0,38;MQ=49	PL:GT:GQ	99,114,0:1/1:99
-chr12	115833830	.	G	A	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr12	116361873	.	T	G	6.34	.	DP=5;AF1=0.7302;CI95=0.5,1;DP4=0,2,0,2;MQ=23;PV4=1,1,1,1	PL:GT:GQ	34,0,2:0/1:3
-chr12	123583527	.	G	A	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	46,9,0:1/1:63
-chr12	124115330	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	76,9,0:1/1:63
-chr12	125062296	.	G	A	41.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr12	126718106	.	A	G	8.76	.	DP=50;AF1=0.5163;CI95=0.5,1;DP4=2,0,6,0;MQ=26;PV4=1,0.33,0.37,1	PL:GT:GQ	38,0,12:0/1:15
-chr12	133348311	.	G	A	24	.	DP=18;AF1=0.5;CI95=0.5,0.5;DP4=14,0,3,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	54,0,118:0/1:57
-chr12	134494475	.	C	T	28	.	DP=18;AF1=0.6671;CI95=0.5,1;DP4=8,0,10,0;MQ=18;PV4=1,1,1,1	PL:GT:GQ	57,0,3:0/1:5
-chr12	134831761	.	C	T	41.3	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=27	PL:GT:GQ	74,15,0:1/1:75
-chr12	134992770	.	A	C,T	84	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,26,0;MQ=29	PL:GT:GQ	117,72,114,0,44,114:1/1:99
-chr12	135261117	.	G	A	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	82,18,0:1/1:90
-chr12	135261144	.	A	G	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	155,18,0:1/1:90
-chr12	135460302	.	G	A	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,23,0;MQ=40	PL:GT:GQ	198,69,0:1/1:99
-chr12	135463758	.	A	G	83	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=26	PL:GT:GQ	116,48,0:1/1:99
-chr12	135523325	.	G	A	99	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=26	PL:GT:GQ	136,66,0:1/1:99
-chr12	135782401	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr12	135795472	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr13	18040027	.	G	C	42	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=33	PL:GT:GQ	74,9,0:1/1:63
-chr13	19494625	.	G	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr13	20121126	.	A	G	15.1	.	DP=36;AF1=0.5;CI95=0.5,0.5;DP4=25,0,9,0;MQ=36;PV4=1,1,0.13,1	PL:GT:GQ	45,0,153:0/1:48
-chr13	21536703	.	A	G	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr13	23160035	.	G	T	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	33,6,0:1/1:49
-chr13	23476554	.	C	A	6.79	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=52	PL:GT:GQ	37,6,0:1/1:49
-chr13	26632967	.	C	G	32	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=34	PL:GT:GQ	65,27,0:1/1:99
-chr13	26790010	.	T	C	89.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=35	PL:GT:GQ	122,15,0:1/1:75
-chr13	36083571	.	T	C	43	.	DP=84;AF1=1;CI95=1,1;DP4=1,0,37,0;MQ=16;PV4=1,1,1,0.3	PL:GT:GQ	76,99,0:1/1:99
-chr13	44432419	.	C	T	3.58	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=19	PL:GT:GQ	34,21,0:1/1:84
-chr13	46592359	.	T	C	16.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	48,6,0:1/1:49
-chr13	52764657	.	A	T	3.14	.	DP=32;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	33,15,0:1/1:75
-chr13	53084193	.	C	T	9.11	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=29;PV4=1,1,1,1	PL:GT:GQ	38,2,0:1/1:37
-chr13	57763228	.	C	T	45	.	DP=555;AF1=1;CI95=1,1;DP4=2,0,21,0;MQ=23;PV4=1,0.00021,1,0.3	PL:GT:GQ	78,45,0:1/1:99
-chr13	73857921	.	G	C	31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	63,9,0:1/1:63
-chr13	76718001	.	G	A	59	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=1,0,3,0;MQ=45;PV4=1,1,0.12,1	PL:GT:GQ	89,0,28:0/1:31
-chr13	100912695	.	A	T	23	.	DP=22;AF1=0.5;CI95=0.5,0.5;DP4=0,16,0,6;MQ=31;PV4=1,0.029,1,0.35	PL:GT:GQ	53,0,103:0/1:56
-chr13	101332001	.	G	C	21	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,23,0;MQ=21	PL:GT:GQ	54,69,0:1/1:99
-chr13	102637334	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr13	102895627	.	C	T	63	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=48	PL:GT:GQ	96,27,0:1/1:99
-chr13	103830322	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr13	112842448	.	G	A	39	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=27	PL:GT:GQ	72,27,0:1/1:99
-chr13	113310291	.	C	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	66,12,0:1/1:72
-chr13	114775162	.	A	G	80	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=21	PL:GT:GQ	113,51,0:1/1:99
-chr13	115267482	.	A	G	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr13	116068676	.	C	T	3.83	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=27	PL:GT:GQ	34,12,0:1/1:72
-chr13	116455918	.	A	G	33	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=13,0,15,0;MQ=42;PV4=1,1.8e-20,0.3,1	PL:GT:GQ	63,0,146:0/1:66
-chr13	116765012	.	G	A	30.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	62,6,0:1/1:49
-chr13	116779773	.	C	T	17.1	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=27,0,11,0;MQ=24;PV4=1,4.5e-35,1,1	PL:GT:GQ	47,0,106:0/1:50
-chr13	116779791	.	C	T	57	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=24,0,14,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	87,0,103:0/1:90
-chr14	20159250	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr14	23510676	.	T	C	52	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=32	PL:GT:GQ	85,66,0:1/1:99
-chr14	24735256	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr14	29525577	.	G	A	21	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=16	PL:GT:GQ	54,27,0:1/1:99
-chr14	36186389	.	C	T	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=20	PL:GT:GQ	37,6,0:1/1:49
-chr14	36186394	.	A	G	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=20	PL:GT:GQ	37,6,0:1/1:49
-chr14	37440609	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr14	40432807	.	A	G	18.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=23	PL:GT:GQ	51,12,0:1/1:72
-chr14	59466268	.	T	C	15.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=25	PL:GT:GQ	47,9,0:1/1:63
-chr14	61368162	.	G	T	7.18	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=17	PL:GT:GQ	39,15,0:1/1:75
-chr14	65152922	.	G	A	92	.	DP=33;AF1=0.5;CI95=0.5,0.5;DP4=0,18,0,15;MQ=36;PV4=1,0.059,0.35,1	PL:GT:GQ	122,0,144:0/1:99
-chr14	69749148	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=25	PL:GT:GQ	40,6,0:1/1:49
-chr14	74877658	.	C	T	45	.	DP=48;AF1=1;CI95=1,1;DP4=0,1,0,12;MQ=36;PV4=1,0.02,1,0.39	PL:GT:GQ	78,28,0:1/1:99
-chr14	75546678	.	C	T	19.2	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=17	PL:GT:GQ	52,18,0:1/1:90
-chr14	76439185	.	T	C	67.1	.	DP=7;AF1=0.505;CI95=0.5,0.5;DP4=0,1,0,6;MQ=33;PV4=1,1,0.056,0.29	PL:GT:GQ	97,0,17:0/1:20
-chr14	77313295	.	T	A	99	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=48	PL:GT:GQ	191,30,0:1/1:99
-chr14	77673422	.	G	A	11.5	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=24	PL:GT:GQ	44,18,0:1/1:90
-chr14	78646125	.	T	C	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=40	PL:GT:GQ	153,24,0:1/1:96
-chr14	91702449	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr14	91769842	.	G	A	63	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=47	PL:GT:GQ	95,9,0:1/1:63
-chr14	91775899	.	C	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr14	91775924	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr14	93482918	.	A	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr14	93665819	.	C	T	75	.	DP=7;AF1=0.5002;CI95=0.5,0.5;DP4=0,3,0,4;MQ=42;PV4=1,1,1,1	PL:GT:GQ	105,0,31:0/1:34
-chr14	95422276	.	A	G	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=45	PL:GT:GQ	88,21,0:1/1:84
-chr14	95731986	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr14	96045464	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr14	97172020	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=51	PL:GT:GQ	100,9,0:1/1:63
-chr14	100515480	.	A	G	6.98	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=45;PV4=1,0.14,0.085,0.33	PL:GT:GQ	36,0,30:0/1:32
-chr14	100770214	.	A	T	8.69	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=16	PL:GT:GQ	41,21,0:1/1:84
-chr14	101258303	.	G	A	82	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,15,0;MQ=26	PL:GT:GQ	115,45,0:1/1:99
-chr14	101701492	.	C	G	66	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=49	PL:GT:GQ	99,30,0:1/1:99
-chr14	102113772	.	T	C	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=30	PL:GT:GQ	33,6,0:1/1:49
-chr14	102751431	.	A	C	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr14	103708033	.	A	G	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=27	PL:GT:GQ	141,36,0:1/1:99
-chr14	104744582	.	G	A	3.52	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	33,9,0:1/1:63
-chr14	105989100	.	C	T	3.14	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	33,15,0:1/1:75
-chr14	105989162	.	C	T	3.65	.	DP=12;AF1=0.7301;CI95=0.5,1;DP4=0,6,0,6;MQ=15;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr14	106234810	.	G	A	25.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=39	PL:GT:GQ	58,15,0:1/1:75
-chr14	106995572	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr14	107283057	.	T	C	5.5	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=20	PL:GT:GQ	37,21,0:1/1:84
-chr14	107285319	.	T	C	33	.	DP=36;AF1=1;CI95=1,1;DP4=0,0,0,35;MQ=22	PL:GT:GQ	66,105,0:1/1:99
-chr14	107640449	.	A	G	11.8	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=36	PL:GT:GQ	44,12,0:1/1:72
-chr15	20082092	.	T	G	18.3	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=24	PL:GT:GQ	51,15,0:1/1:75
-chr15	22955884	.	T	C	67	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,12,0;MQ=48	PL:GT:GQ	100,36,0:1/1:99
-chr15	22971987	.	A	G	5.29	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=22	PL:GT:GQ	35,6,0:1/1:49
-chr15	23233324	.	C	A	47	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=31	PL:GT:GQ	80,42,0:1/1:99
-chr15	25175286	.	C	T	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=42;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr15	25385709	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr15	27372396	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr15	35998093	.	C	T	9.53	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=17	PL:GT:GQ	42,27,0:1/1:99
-chr15	36716538	.	C	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr15	36793360	.	G	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	76,9,0:1/1:63
-chr15	53783097	.	A	G	10.5	.	DP=31;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=16	PL:GT:GQ	43,21,0:1/1:84
-chr15	54180175	.	C	T	10.4	.	DP=7;AF1=0.5001;CI95=0.5,0.5;DP4=4,0,3,0;MQ=27;PV4=1,1.2e-05,1,1	PL:GT:GQ	40,0,32:0/1:34
-chr15	54939306	.	C	T	99	.	DP=34;AF1=0.5;CI95=0.5,0.5;DP4=0,18,0,16;MQ=49;PV4=1,1,0.18,1	PL:GT:GQ	172,0,181:0/1:99
-chr15	59377916	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr15	59685961	.	G	C	68	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=36	PL:GT:GQ	101,33,0:1/1:99
-chr15	60306384	.	A	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr15	60345642	.	G	C	14.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	46,6,0:1/1:49
-chr15	60367387	.	G	A	13.2	.	DP=6;AF1=0.5001;CI95=0.5,0.5;DP4=3,0,3,0;MQ=34;PV4=1,0.098,0.24,1	PL:GT:GQ	43,0,35:0/1:37
-chr15	60367446	.	C	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr15	61763755	.	G	A	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=45	PL:GT:GQ	100,9,0:1/1:63
-chr15	61831362	.	C	G	11.3	.	DP=5;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,3;MQ=30;PV4=1,0.00077,0.47,1	PL:GT:GQ	41,0,42:0/1:41
-chr15	63978880	.	G	C	60	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=2,0,4,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	90,3,0:1/1:41
-chr15	64342445	.	A	G	12.2	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=18	PL:GT:GQ	44,9,0:1/1:63
-chr15	65424859	.	T	C	11.3	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=21	PL:GT:GQ	44,30,0:1/1:99
-chr15	65603698	.	C	T	60	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	92,9,0:1/1:63
-chr15	67005078	.	G	A	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr15	71133512	.	G	C	22.3	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=25	PL:GT:GQ	55,15,0:1/1:75
-chr15	72619009	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr15	73272688	.	C	T	70.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=39	PL:GT:GQ	103,15,0:1/1:75
-chr15	73699335	.	T	A	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=45	PL:GT:GQ	175,27,0:1/1:99
-chr15	74513352	.	C	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=37	PL:GT:GQ	139,30,0:1/1:99
-chr15	75540536	.	G	A	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr15	75822537	.	C	A	17.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=23	PL:GT:GQ	50,15,0:1/1:75
-chr15	78554005	.	T	C	12	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	43,6,0:1/1:49
-chr15	80089369	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=28	PL:GT:GQ	40,6,0:1/1:49
-chr15	83089149	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	40,6,0:1/1:49
-chr15	86839307	.	T	C	90.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	123,15,0:1/1:75
-chr15	89836258	.	T	C	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=39	PL:GT:GQ	141,24,0:1/1:96
-chr15	89837706	.	G	A	4.13	.	DP=8;AF1=0.4998;CI95=0.5,0.5;DP4=0,4,0,4;MQ=30;PV4=1,1,0.25,1	PL:GT:GQ	32,0,59:0/1:35
-chr15	89857648	.	T	C	99	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=8,0,8,0;MQ=40;PV4=1,1,0.3,1	PL:GT:GQ	133,0,130:0/1:99
-chr15	89864228	.	A	C	32	.	DP=4;AF1=0.5002;CI95=0.5,0.5;DP4=2,0,2,0;MQ=42;PV4=1,1,1,1	PL:GT:GQ	62,0,31:0/1:34
-chr15	91261235	.	G	A	7.8	.	DP=4;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=44;PV4=1,1,0.32,1	PL:GT:GQ	37,0,30:0/1:32
-chr16	256990	.	A	C	10.4	.	DP=16;AF1=0.5008;CI95=0.5,0.5;DP4=4,0,3,0;MQ=23;PV4=1,0.34,1,1	PL:GT:GQ	40,0,25:0/1:28
-chr16	260794	.	T	C	3.01	.	DP=19;AF1=0.4999;CI95=0.5,0.5;DP4=13,0,2,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	30,0,32:0/1:31
-chr16	419905	.	A	G	7.9	.	DP=5;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=22;PV4=1,1,1,1	PL:GT:GQ	36,1,0:1/1:23
-chr16	824086	.	T	C	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr16	1085063	.	C	T	52	.	DP=12;AF1=0.5;CI95=0.5,0.5;DP4=6,0,6,0;MQ=42;PV4=1,1,0.014,1	PL:GT:GQ	82,0,128:0/1:85
-chr16	1221305	.	T	C	54	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=0,3,0,3;MQ=40;PV4=1,1,1,1	PL:GT:GQ	84,0,60:0/1:63
-chr16	1411728	.	A	G	32.3	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=35	PL:GT:GQ	65,15,0:1/1:75
-chr16	1443197	.	C	G	64	.	DP=26;AF1=1;CI95=1,1;DP4=0,0,25,0;MQ=36	PL:GT:GQ	97,75,0:1/1:99
-chr16	1478746	.	A	T	32	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=28	PL:GT:GQ	65,24,0:1/1:96
-chr16	1514438	.	A	C	45	.	DP=49;AF1=1;CI95=1,1;DP4=0,0,48,0;MQ=26	PL:GT:GQ	78,144,0:1/1:99
-chr16	1601989	.	T	C	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=29	PL:GT:GQ	133,39,0:1/1:99
-chr16	2043883	.	C	T	30	.	DP=33;AF1=1;CI95=1,1;DP4=0,0,0,33;MQ=14	PL:GT:GQ	63,99,0:1/1:99
-chr16	2137470	.	A	C	39	.	DP=38;AF1=0.5016;CI95=0.5,0.5;DP4=4,0,6,0;MQ=34;PV4=1,0.02,1,1	PL:GT:GQ	69,0,22:0/1:25
-chr16	2537260	.	A	G	99	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=40	PL:GT:GQ	177,33,0:1/1:99
-chr16	2564737	.	T	C	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,22;MQ=41	PL:GT:GQ	199,66,0:1/1:99
-chr16	2612605	.	A	T	62.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=28	PL:GT:GQ	95,15,0:1/1:75
-chr16	2704518	.	G	A	41	.	DP=48;AF1=0.5;CI95=0.5,0.5;DP4=0,17,0,12;MQ=48;PV4=1,1.9e-23,0.24,0.034	PL:GT:GQ	71,0,175:0/1:74
-chr16	3274307	.	G	T	68	.	DP=39;AF1=0.5;CI95=0.5,0.5;DP4=0,30,0,8;MQ=37;PV4=1,1,1,1	PL:GT:GQ	98,0,138:0/1:99
-chr16	5467292	.	G	C	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	69,6,0:1/1:49
-chr16	10079145	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr16	11483702	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr16	12038227	.	A	T	23	.	DP=47;AF1=0.5;CI95=0.5,0.5;DP4=0,22,0,23;MQ=32;PV4=1,4.4e-66,0.47,0.028	PL:GT:GQ	53,0,135:0/1:56
-chr16	21336880	.	G	C	55	.	DP=35;AF1=0.5;CI95=0.5,0.5;DP4=0,12,0,19;MQ=47;PV4=1,5.6e-21,1,1	PL:GT:GQ	85,0,121:0/1:88
-chr16	21980241	.	C	T	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr16	23275383	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	44,6,0:1/1:49
-chr16	27546495	.	G	T	25	.	DP=35;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=43	PL:GT:GQ	57,9,0:1/1:63
-chr16	27700399	.	A	T	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=17	PL:GT:GQ	50,12,0:1/1:72
-chr16	28021935	.	A	G	18.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	51,15,0:1/1:75
-chr16	29070016	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr16	29478618	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr16	29718140	.	C	T	46.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	79,15,0:1/1:75
-chr16	30700759	.	T	C	17.1	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,14;MQ=14	PL:GT:GQ	50,42,0:1/1:99
-chr16	35139103	.	A	G	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=37	PL:GT:GQ	79,12,0:1/1:72
-chr16	35473348	.	G	A	3.83	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	34,12,0:1/1:72
-chr16	36213667	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr16	36705528	.	G	A	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=32	PL:GT:GQ	47,15,0:1/1:75
-chr16	43831353	.	C	T	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=42	PL:GT:GQ	102,12,0:1/1:72
-chr16	44715166	.	A	C	25	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=32	PL:GT:GQ	58,24,0:1/1:96
-chr16	44957661	.	T	C	7.03	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=18	PL:GT:GQ	39,21,0:1/1:84
-chr16	44958698	.	C	T	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=49	PL:GT:GQ	75,15,0:1/1:75
-chr16	44959163	.	T	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	66,12,0:1/1:72
-chr16	45167959	.	C	T	4.45	.	DP=16;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=24	PL:GT:GQ	35,12,0:1/1:72
-chr16	50254956	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr16	52383122	.	A	C	46.5	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=42	PL:GT:GQ	79,12,0:1/1:72
-chr16	55978159	.	C	T	10.7	.	DP=20;AF1=0.5336;CI95=0.5,1;DP4=2,0,5,0;MQ=35;PV4=1,0.038,1,0.059	PL:GT:GQ	40,0,9:0/1:12
-chr16	61358878	.	T	A	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	47,6,0:1/1:49
-chr16	61392487	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	44,6,0:1/1:49
-chr16	61621603	.	G	T	6.59	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=22	PL:GT:GQ	38,12,0:1/1:72
-chr16	69120890	.	G	C	51.3	.	DP=36;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=42	PL:GT:GQ	84,15,0:1/1:75
-chr16	70778219	.	A	G	21.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=39	PL:GT:GQ	53,6,0:1/1:49
-chr16	71899519	.	T	C	40	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=33	PL:GT:GQ	73,33,0:1/1:99
-chr16	72079251	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr16	72093003	.	G	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr16	72672428	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr16	72864515	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr16	72890560	.	G	A	47.1	.	DP=10;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,7;MQ=49;PV4=1,0.0019,0.0033,1	PL:GT:GQ	77,0,16:0/1:19
-chr16	73048929	.	A	G	6.29	.	DP=4;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=27;PV4=1,1,1,0.33	PL:GT:GQ	34,1,0:1/1:23
-chr16	73177179	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr16	73191468	.	C	T	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=40	PL:GT:GQ	102,12,0:1/1:72
-chr16	73367439	.	A	C	7.41	.	DP=36;AF1=1;CI95=0.5,1;DP4=0,2,0,13;MQ=26;PV4=1,1,0.027,1	PL:GT:GQ	37,4,0:1/1:45
-chr16	74259316	.	C	T	89.5	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr16	75271450	.	C	G	6.99	.	DP=15;AF1=0.5015;CI95=0.5,0.5;DP4=0,1,0,3;MQ=44;PV4=1,0.065,0.31,1	PL:GT:GQ	36,0,22:0/1:25
-chr16	76199870	.	G	A	26	.	DP=14;AF1=0.5;CI95=0.5,0.5;DP4=8,0,6,0;MQ=47;PV4=1,1.2e-06,0.32,1	PL:GT:GQ	56,0,141:0/1:59
-chr16	77723692	.	A	G	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	122,12,0:1/1:72
-chr17	165875	.	G	A	40.8	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	72,6,0:1/1:49
-chr17	1443809	.	C	G	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr17	1618253	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=39	PL:GT:GQ	54,9,0:1/1:63
-chr17	2815309	.	T	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr17	3537486	.	T	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr17	3734367	.	C	A	23.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=36	PL:GT:GQ	56,12,0:1/1:72
-chr17	5634764	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr17	6408090	.	C	G	3.54	.	DP=5;AF1=0.4998;CI95=0.5,0.5;DP4=3,0,2,0;MQ=40;PV4=1,1,0.36,1	PL:GT:GQ	31,0,66:0/1:34
-chr17	7089723	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr17	8731503	.	G	C	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	42,6,0:1/1:49
-chr17	9282935	.	T	C,G	24.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=40	PL:GT:GQ	57,12,61,0,3,61:1/1:72
-chr17	17284831	.	T	C	29	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	61,9,0:1/1:63
-chr17	18439515	.	G	A	4.11	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=25	PL:GT:GQ	34,9,0:1/1:63
-chr17	18602146	.	C	T	4.76	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=16	PL:GT:GQ	36,33,0:1/1:99
-chr17	19427888	.	C	T	57	.	DP=104;AF1=0.5;CI95=0.5,0.5;DP4=45,0,29,0;MQ=39;PV4=1,2.2e-12,1,1	PL:GT:GQ	87,0,131:0/1:90
-chr17	19604159	.	T	C	9.31	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr17	19610366	.	C	T	13	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr17	20484706	.	C	G	51	.	DP=35;AF1=0.5001;CI95=0.5,0.5;DP4=0,11,0,21;MQ=21;PV4=1,0.39,0.49,1	PL:GT:GQ	81,0,36:0/1:39
-chr17	20555720	.	A	G	26.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=28	PL:GT:GQ	59,15,0:1/1:75
-chr17	24328984	.	A	C	15.4	.	DP=34;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=25	PL:GT:GQ	48,15,0:1/1:75
-chr17	26237090	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr17	28394766	.	C	A	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr17	31218277	.	A	G	3.62	.	DP=38;AF1=0.5161;CI95=0.5,0.5;DP4=0,1,0,2;MQ=38;PV4=1,0.26,1,1	PL:GT:GQ	31,0,12:0/1:15
-chr17	31254021	.	C	T	15.1	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=35	PL:GT:GQ	47,9,0:1/1:63
-chr17	32516798	.	G	A	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	69,6,0:1/1:49
-chr17	32600253	.	A	G	16.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	49,12,0:1/1:72
-chr17	34255214	.	G	C	19.2	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=21	PL:GT:GQ	52,18,0:1/1:90
-chr17	34365900	.	T	C	93.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=38	PL:GT:GQ	126,18,0:1/1:90
-chr17	35380386	.	A	T	6.79	.	DP=44;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	37,6,0:1/1:49
-chr17	41993344	.	C	T	64	.	DP=41;AF1=1;CI95=1,1;DP4=0,0,0,41;MQ=16	PL:GT:GQ	97,123,0:1/1:99
-chr17	42128201	.	A	G	4.13	.	DP=5;AF1=0.4998;CI95=0.5,0.5;DP4=0,2,0,2;MQ=52;PV4=1,0.0041,1,1	PL:GT:GQ	32,0,62:0/1:35
-chr17	42984490	.	C	A	56	.	DP=33;AF1=0.5001;CI95=0.5,0.5;DP4=6,0,12,0;MQ=42;PV4=1,0.004,1,1	PL:GT:GQ	86,0,34:0/1:37
-chr17	43419457	.	G	A	99	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,14;MQ=45	PL:GT:GQ	185,42,0:1/1:99
-chr17	43421225	.	A	G	65.1	.	DP=31;AF1=1;CI95=0.5,1;DP4=0,6,0,17;MQ=43;PV4=1,0.004,1,1	PL:GT:GQ	98,18,0:1/1:90
-chr17	45206897	.	G	A	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=47	PL:GT:GQ	54,9,0:1/1:63
-chr17	45381302	.	T	C	18.6	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr17	45530812	.	C	A	3.54	.	DP=6;AF1=0.4998;CI95=0.5,0.5;DP4=0,3,0,2;MQ=40;PV4=1,1,0.37,1	PL:GT:GQ	31,0,58:0/1:34
-chr17	50242633	.	G	A	44	.	DP=42;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,13;MQ=32;PV4=1,0.084,0.14,1	PL:GT:GQ	74,0,154:0/1:77
-chr17	51275317	.	G	A	14.9	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	46,6,0:1/1:49
-chr17	52325530	.	C	T	29	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,0,18;MQ=24	PL:GT:GQ	62,54,0:1/1:99
-chr17	52411748	.	T	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr17	53190746	.	C	G	62.1	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=40	PL:GT:GQ	95,18,0:1/1:90
-chr17	58289916	.	T	C	18.2	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=22	PL:GT:GQ	51,18,0:1/1:90
-chr17	59796875	.	C	T	42	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=35	PL:GT:GQ	74,9,0:1/1:63
diff --git a/tests/vcf-examples/2.vcf b/tests/vcf-examples/2.vcf
deleted file mode 100644
index c77f2c4..0000000
--- a/tests/vcf-examples/2.vcf
+++ /dev/null
@@ -1,334 +0,0 @@
-##fileformat=VCFv4.0
-##ApplyRecalibration="analysis_type=ApplyRecalibration input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/combined.phase1.chr20.raw.indels.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample [...]
-##CombineVariants="analysis_type=CombineVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20:41000001-42000000] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/chr20/AFR/AFR.phase1.chr20.42.raw.indels.vcf, /humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/chr20/ASN/ASN.phase1.chr20.42. [...]
-##FILTER=<ID=BothStrands,Description="Variant not seen on both strands">
-##FILTER=<ID=HARD_TO_VALIDATE,Description="MQ0 >= 4 && (MQ0 / (1.0 * DP)) > 0.1">
-##FILTER=<ID=HP10,Description="Variant occurs in long homopolymer run (>10)">
-##FILTER=<ID=HaplotypeScore,Description="HaplotypeScore>20.0">
-##FILTER=<ID=HighCoverage,Description="Coverage at variant site is > 7500">
-##FILTER=<ID=HomopolymerRun,Description="HRun>=15">
-##FILTER=<ID=LongRepeat,Description="Variant occurs in long tandem repeat (as defined by 1kg phase one filters)">
-##FILTER=<ID=LowQual,Description="QUAL<30.0">
-##FILTER=<ID=PP20,Description="Variant posterior phred is < 20">
-##FILTER=<ID=QualByDepth,Description="QD<1.0">
-##FILTER=<ID=StrandBias,Description="SB>=-1.0">
-##FILTER=<ID=TruthSensitivityTranche93.00to94.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.9628 <= x < 4.1824">
-##FILTER=<ID=TruthSensitivityTranche94.00to95.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.7129 <= x < 3.9628">
-##FILTER=<ID=TruthSensitivityTranche95.00to96.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.3717 <= x < 3.7129">
-##FILTER=<ID=TruthSensitivityTranche96.00to97.00,Description="Truth sensitivity tranche level at VSQ Lod: 2.8762 <= x < 3.3717">
-##FILTER=<ID=TruthSensitivityTranche97.00to98.00,Description="Truth sensitivity tranche level at VSQ Lod: 2.2618 <= x < 2.8762">
-##FILTER=<ID=TruthSensitivityTranche98.00to99.00+,Description="Truth sensitivity tranche level at VQS Lod < 1.2907">
-##FILTER=<ID=TruthSensitivityTranche98.00to99.00,Description="Truth sensitivity tranche level at VSQ Lod: 1.2907 <= x < 2.2618">
-##FORMAT=<ID=AA,Number=1,Type=Integer,Description="Alternate allele observations">
-##FORMAT=<ID=AD,Number=.,Type=Integer,Description="Allelic depths for the ref and alt alleles in the order listed">
-##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth (only filtered reads used for calling)">
-##FORMAT=<ID=FT,Number=1,Type=String,Description="Sample Genotype Filter">
-##FORMAT=<ID=GL,Number=3,Type=Integer,Description="Genotype Likelihood, log-scaled likeilhoods of the data given the called genotype for each possible genotype generated from the reference and alternate alleles given the sample ploidy">
-##FORMAT=<ID=GQ,Number=1,Type=Float,Description="Genotype Quality">
-##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
-##FORMAT=<ID=HQ,Number=.,Type=Integer,Description="Haplotype Quality">
-##FORMAT=<ID=PL,Number=3,Type=Float,Description="Normalized, Phred-scaled likelihoods for AA,AB,BB genotypes where A=ref and B=alt; not applicable if site is not biallelic">
-##FORMAT=<ID=RA,Number=1,Type=Integer,Description="Reference allele observations">
-##FORMAT=<ID=SA,Number=1,Type=Integer,Description="Number of alternate observations by strand, delimited by |: [forward]|[reverse]">
-##FORMAT=<ID=SP,Number=1,Type=Integer,Description="Phred-scaled strand bias P-value">
-##FORMAT=<ID=SR,Number=1,Type=Integer,Description="Number of reference observations by strand, delimited by |: [forward]|[reverse]">
-##INFO=<ID=AA,Number=1,Type=Integer,Description="Alternate allele observations">
-##INFO=<ID=AB,Number=1,Type=Float,Description="Allele balance at heterozygous sites: a number between 0 and 1 representing the ratio of reads showing the reference allele to all reads, considering only reads from individuals called as heterozygous">
-##INFO=<ID=ABA,Number=1,Type=Integer,Description="Alternate allele balance count: the number of sequence reads from apparent heterozygotes supporting the alternate allele">
-##INFO=<ID=ABP,Number=1,Type=Float,Description="Allele balance probability at heterozygous sites: Phred-scaled upper-bounds estimate of the probability of observing the deviation between ABR and ABA given E(ABR/ABA) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=ABR,Number=1,Type=Integer,Description="Reference allele balance count: the number of sequence reads from apparent heterozygotes supporting the reference allele">
-##INFO=<ID=AC,Number=.,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
-##INFO=<ID=AF,Number=.,Type=Float,Description="Allele Frequency, for each ALT allele, in the same order as listed">
-##INFO=<ID=AF1,Number=1,Type=Float,Description="Max-likelihood estimate of the site allele frequency of the first ALT allele">
-##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
-##INFO=<ID=BL,Number=1,Type=Integer,Description="Base Pairs Left: number of base pairs in reads supporting the alternate to the left (5') of the alternate allele">
-##INFO=<ID=BR,Number=1,Type=Integer,Description="Base Pairs Right: number of base pairs in reads supporting the alternate to the right (3') of the alternate allele">
-##INFO=<ID=BVAR,Number=0,Type=Flag,Description="The best genotype combination in the posterior is variant (non homozygous).">
-##INFO=<ID=BaseQRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt Vs. Ref base qualities">
-##INFO=<ID=CI95,Number=2,Type=Float,Description="Equal-tail Bayesian credible interval of the site allele frequency at the 95% level">
-##INFO=<ID=CpG,Number=0,Type=Flag,Description="CpG site (either CpG, TpG or CpA)">
-##INFO=<ID=DB,Number=0,Type=Flag,Description="dbSNP Membership">
-##INFO=<ID=DEL,Number=0,Type=Flag,Description="deletion allele">
-##INFO=<ID=DP,Number=1,Type=Integer,Description="Filtered Depth">
-##INFO=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
-##INFO=<ID=DS,Number=0,Type=Flag,Description="Were any of the samples downsampled?">
-##INFO=<ID=Dels,Number=1,Type=Float,Description="Fraction of Reads Containing Spanning Deletions">
-##INFO=<ID=EL,Number=1,Type=Integer,Description="Allele End Left: number of observations of the alternate where the alternate occurs in the left end of the read">
-##INFO=<ID=EPP,Number=1,Type=Float,Description="End Placement Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between EL and ER given E(EL/ER) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=ER,Number=1,Type=Integer,Description="Allele End Right: number of observations of the alternate where the alternate occurs in the right end of the read">
-##INFO=<ID=FQ,Number=1,Type=Float,Description="Phred probability that sample chromosomes are not all the same">
-##INFO=<ID=FR,Number=0,Type=Float,Description="Estimated population frequency">
-##INFO=<ID=FS,Number=1,Type=Float,Description="Phred-scaled p-value using Fisher's exact test to detect strand bias">
-##INFO=<ID=HETAR,Number=1,Type=Integer,Description="Number of individuals heterozygous alternate / reference">
-##INFO=<ID=HOMA,Number=1,Type=Integer,Description="Number of individuals homozygous for the alternate">
-##INFO=<ID=HOMR,Number=1,Type=Integer,Description="Number of individuals homozygous for the reference">
-##INFO=<ID=HP,Number=1,Type=Integer,Description="Homopolmer run length">
-##INFO=<ID=HPLen,Number=1,Type=Integer,Description="Homopolymer length">
-##INFO=<ID=HR,Number=1,Type=Integer,Description="Homopolymer run length">
-##INFO=<ID=HRun,Number=1,Type=Integer,Description="Largest Contiguous Homopolymer Run of Variant Allele In Either Direction">
-##INFO=<ID=HU,Number=1,Type=String,Description="Homopolymer run unit (stranded)">
-##INFO=<ID=HaplotypeScore,Number=1,Type=Float,Description="Consistency of the site with at most two segregating haplotypes">
-##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Not provided in original VCF header">
-##INFO=<ID=INS,Number=0,Type=Flag,Description="insertion allele">
-##INFO=<ID=InbreedingCoeff,Number=1,Type=Float,Description="Inbreeding coefficient as estimated from the genotype likelihoods per-sample when compared against the Hardy-Weinberg expectation">
-##INFO=<ID=IndelType,Number=1,Type=String,Description="Indel type description">
-##INFO=<ID=KGPilot123,Number=0,Type=Flag,Description="1000 Genome discovery all pilots 2010(1,2,3)">
-##INFO=<ID=LEN,Number=1,Type=Integer,Description="allele length">
-##INFO=<ID=LRB,Number=1,Type=Float,Description="((max(BR, BL) / (BR + BL)) - 0.5) * 2 : The proportion of base pairs in reads on one side of the alternate allele relative to total bases, scaled from [0.5,1] to [0,1]">
-##INFO=<ID=LRBP,Number=1,Type=Float,Description="Left-Right Balance Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between BL and BR given E(BR/BL) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=MNP,Number=0,Type=Flag,Description="MNP allele">
-##INFO=<ID=MQ,Number=1,Type=Float,Description="RMS Mapping Quality">
-##INFO=<ID=MQ0,Number=1,Type=Integer,Description="Total Mapping Quality Zero Reads">
-##INFO=<ID=MQ0Fraction,Number=1,Type=Float,Description="Fraction of Mapping Quality Zero Reads">
-##INFO=<ID=MQM,Number=1,Type=Float,Description="Mean mapping quality of observed alternate alleles">
-##INFO=<ID=MQRankSum,Number=1,Type=Float,Description="Z-score From Wilcoxon rank sum test of Alt vs. Ref read mapping qualities">
-##INFO=<ID=NF,Number=0,Type=Integer,Description="Total number of forward reads containing this variant">
-##INFO=<ID=NR,Number=0,Type=Integer,Description="Total number of reads containing this variant">
-##INFO=<ID=NS,Number=1,Type=Integer,Description="Number of samples with data">
-##INFO=<ID=PP,Number=0,Type=Float,Description="Posterior probability (phred scaled) that this variant segregates">
-##INFO=<ID=PV4,Number=4,Type=Float,Description="P-values for strand bias, baseQ bias, mapQ bias and tail distance bias">
-##INFO=<ID=QD,Number=1,Type=Float,Description="Variant Confidence/Quality by Depth">
-##INFO=<ID=RA,Number=1,Type=Integer,Description="Reference allele observations">
-##INFO=<ID=RL,Number=1,Type=Integer,Description="Reads Placed Left: number of reads supporting the alternate balanced to the left (5') of the alternate allele">
-##INFO=<ID=RPP,Number=1,Type=Float,Description="Read Placement Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between RPL and RPR given E(RPL/RPR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=RR,Number=1,Type=Integer,Description="Reads Placed Right: number of reads supporting the alternate balanced to the right (3') of the alternate allele">
-##INFO=<ID=RUN,Number=1,Type=Integer,Description="Homopolymer run length: the number of consecutive nucleotides in the reference genome matching the alternate allele prior to the current position">
-##INFO=<ID=ReadPosRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt vs. Ref read position bias">
-##INFO=<ID=SAB,Number=1,Type=Float,Description="Strand bias for the alternate allele: SAF / ( SAF + SAR )">
-##INFO=<ID=SAF,Number=1,Type=Integer,Description="Number of alternate observations on the forward strand">
-##INFO=<ID=SAP,Number=1,Type=Float,Description="Strand balance probability for the alternate allele: Phred-scaled upper-bounds estimate of the probability of observing the deviation between SAF and SAR given E(SAF/SAR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=SAR,Number=1,Type=Integer,Description="Number of alternate observations on the reverse strand">
-##INFO=<ID=SB,Number=1,Type=Float,Description="Strand Bias">
-##INFO=<ID=SC,Number=1,Type=String,Description="Genomic sequence 10 bases either side of variant position">
-##INFO=<ID=SNP,Number=0,Type=Flag,Description="SNP allele">
-##INFO=<ID=SRB,Number=1,Type=Float,Description="Strand bias for the reference allele: SRF / ( SRF + SRR )">
-##INFO=<ID=SRF,Number=1,Type=Integer,Description="Number of reference observations on the forward strand">
-##INFO=<ID=SRP,Number=1,Type=Float,Description="Strand balance probability for the reference allele: Phred-scaled upper-bounds estimate of the probability of observing the deviation between SRF and SRR given E(SRF/SRR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=SRR,Number=1,Type=Integer,Description="Number of reference observations on the reverse strand">
-##INFO=<ID=TC,Number=0,Type=Integer,Description="Total coverage">
-##INFO=<ID=TR,Number=1,Type=Integer,Description="Tandem repeat run length (bp)">
-##INFO=<ID=TS,Number=0,Type=Flag,Description="transition SNP">
-##INFO=<ID=TU,Number=1,Type=String,Description="tandem repeat run unit (stranded)">
-##INFO=<ID=TV,Number=0,Type=Flag,Description="transversion SNP">
-##INFO=<ID=VLD,Number=0,Type=Flag,Description="Is Validated.  This bit is set if the snp has 2+ minor allele count based on frequency or genotype data.">
-##INFO=<ID=VQSLOD,Number=1,Type=Float,Description="Log odds ratio of being a true variant versus being false under the trained gaussian mixture model">
-##INFO=<ID=dbSNP,Number=1,Type=Integer,Description="First SNP Build for RS">
-##INFO=<ID=set,Number=1,Type=String,Description="Source VCF for the merged record in CombineVariants">
-##LeftAlignVariants="analysis_type=LeftAlignVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta rodBind=[/humgen/gsa-scr1/ebanks/ALL.chr20.Oxford.20110407.indels.genotypes.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction= [...]
-##SelectVariants="analysis_type=SelectVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta rodBind=[/humgen/gsa-scr1/delangel/officialCalls/20110201_chr20_phase1_indels/dindel/20110208.chr20.dindel2.ALL.sites.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampli [...]
-##UnifiedGenotyper="analysis_type=UnifiedGenotyper input_file=[/broad/shptmp/delangel/calls/chr20/CHB.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/CHS.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/CLM.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/JPT.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/MXL.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/PUR.phase1.chr20.42.cleaned.bam] sample_metadata=[] re [...]
-##VariantAnnotator="analysis_type=VariantAnnotator input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=null excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[./ALL.chr20.vqsr_2of5_union_sites_for_validation_boosted.vcf] rodToIntervalTrackName=variant BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction=null downsample_to_coverage=null baq=OFF [...]
-##VariantFiltration="analysis_type=VariantFiltration input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[/humgen/1kg/processing/pipeline_test_bams/chr22_chunked.hg19.intervals] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/broad/shptmp/rpoplin/ALL.phase1.chr22.raw.indels.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION DBSNP=null downsampling_type=null downsample_to_fraction=null downsamp [...]
-##commandline="/share/software/freebayes/bin/freebayes --stdin --min-alternate-count 2 --genotype-combo-step-max 20 --genotype-variant-threshold 4 --no-marginals --pvar 0.0001 --indels --mnps --no-filters --binomial-obs-priors --allele-balance-priors --region 20:0..100000 --vcf /d1/data/1000G/20101123/populations/finalised.phase1/integrated/including454/wg/ALL/Pipeline/none//freebayes/freebayes.20:0-100000.baq.20110328.vcf --fasta-reference /d2/data/references/build_37/human_reference_v37.fa"
-##fileDate=2011-03-28
-##filedate=2011-02-08
-##filter="( SNP | MNP ) & ( MQM > 65 | QUAL > 1 ) & ABP < 30 & AB < 0.9 | ( INS | DEL ) & QUAL > 500"
-##phasing=none
-##platypusOptions={'bamFiles': ['/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06984', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06985', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06986', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06989', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA06994', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA07000', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA07037', '/scratch/rimmer/ThousandGenomes/PhaseOneBAMs/NA07048', '/scratch/ri [...]
-##reference=/lustre/scratch105/projects/g1k/ref/main_project/human_g1k_v37.fasta
-##source=Dindel2
-##source=SelectVariants
-##source_20110031.1=/nfs/users/nfs_p/pd3/cvs/vcftools/perl/vcf-annotate -d /nfs/users/nfs_p/pd3/sandbox/hapmap/dbSNP-b132/non-1kg-vld.desc -a /nfs/users/nfs_p/pd3/sandbox/hapmap/dbSNP-b132/non-1kg-vld.tab.gz -c CHROM,FROM,INFO/VLD,INFO/KGPilot123,INFO/dbSNP
-##vcfCTools=filter
-##vcfCtools=merge freebayes.20:0-100000.baq.20110328.vcf, freebayes.20:100000-200000.baq.20110328.vcf, freebayes.20:200000-300000.baq.20110328.vcf, freebayes.20:300000-400000.baq.20110328.vcf, freebayes.20:400000-500000.baq.20110328.vcf, freebayes.20:500000-600000.baq.20110328.vcf, freebayes.20:600000-700000.baq.20110328.vcf, freebayes.20:700000-800000.baq.20110328.vcf, freebayes.20:800000-900000.baq.20110328.vcf, freebayes.20:900000-1000000.baq.20110328.vcf, freebayes.20:1000000-1100000 [...]
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	
-20	458502	.	G	GA	4567.01	PASS	AA=20;AB=0.61111;ABA=14;ABP=6.8707;ABR=22;AC=38;AF=0.0544;AN=698;BL=374;BR=1129;BVAR;BaseQRankSum=13.364;DP=15979;DP4=1882,2188,45,37;Dels=0.00;EL=5;EPP=13.868;ER=15;FR;FS=6.503;HETAR=11;HOMA=2;HOMR=985;HP=1;HPLen=2;HR=2;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.0157;IndelType=INS.NOVEL_1.Novel_A.;LEN=1;LRB=0.50233;LRBP=826.56;MQ=66.16;MQ0Fraction=0.0110;MQM=70.5;MQRankSum=-3.158;NF;NR;NS=998;PP;PV4=0.15,1,0.42,0.15;RA=3173;RL=1;RPP=38.188;RR=19;RUN=1;ReadPosR [...]
-20	573764	.	TA	T	591.51	PASS	AC=91;AF=0.1987;AN=458;BaseQRankSum=0.137;DP=519;FS=3.153;HRun=1;HaplotypeScore=14.0744;InbreedingCoeff=0.1460;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;MQ=48.16;MQ0=26;MQ0Fraction=0.0501;MQRankSum=-1.636;QD=3.63;ReadPosRankSum=-4.140;SB=-408.14;VQSLOD=5.2458;set=VQSR
-20	766143	.	C	CATCTGGTA	5521.70	PASS	AA=24;AB=0.5;ABA=18;ABP=3.0103;ABR=18;AC=14;AF=0.0289;AF1=0.02038;AN=484;BL=655;BR=1542;BVAR;BaseQRankSum=3.801;CI95=0.01549,0.02655;DP=11749;DP4=2222,1998,14,8;Dels=0.00;EL=9;EPP=6.2675;ER=15;FQ=999;FR;FS=2.941;HETAR=9;HOMA=4;HOMR=901;HP=2;HPLen=2;HR=1;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.0515;IndelType=INS.NumRepetitions_1.EventLength_8.;LEN=8;LRB=0.40373;LRBP=780.64;MQ=56.81;MQ0Fraction=0.0253;MQM=22.167;MQRankSum=-4.809;NF;NR;NS=914;PP;PV4=0.39 [...]
-20	997076	rs11467490	CTG	C	15379.78	PASS	AA=195;AB=0.59878;ABA=132;ABP=30.896;ABR=197;AC=173;AF=0.14562;AN=1188;BL=7664;BR=7309;BVAR;BaseQRankSum=21.853;DB;DEL;DP=27127;DP4=1801,2002,241,282;Dels=0.13;EL=100;EPP=3.2887;ER=95;FQ=999;FR;FS=6.591;HETAR=77;HOMA=42;HOMR=815;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1284;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_TG.;LEN=2;LRB=0.023709;LRBP=21.287;MQ=61.18;MQ0Fraction=0.0214;MQM=43.041;MQRankSum=6.886;NF;NR;NS=934 [...]
-20	1042261	rs10597473	CCCTG	C	168658.05	PASS	AA=4481;AB=0.29043;ABA=2128;ABP=1147.1;ABR=871;AC=1172;AF=0.97830;AN=1198;BL=169975;BR=194027;BVAR;BaseQRankSum=4.599;DB;DEL;DP=29418;DP4=29,47,1441,2403;Dels=0.84;EL=2358;EPP=29.772;ER=2123;FR;FS=9.122;HETAR=482;HOMA=559;HOMR=30;HP=2;HPLen=3;HR=3;HRun=0;HU=C;INDEL;InbreedingCoeff=0.0470;IndelType=DEL.NumRepetitions_2.EventLength_4.;LEN=4;LRB=0.066077;LRBP=3454.1;MQ=104.58;MQ0=4;MQ0Fraction=0.0014;MQM=58.257;MQRankSum=-3.368;NF;NR;NS=1071;PP;P [...]
-20	1046297	rs33956316	C	CT,CTT,CTTT	17698	PASS	ABR=408;AC=432,79,230;AF=0.39779,0.07274,0.21179;BVAR;BaseQRankSum=-8.413;DB;DP=15649;DP4=147,199,534,436;FR;FS=11.580;HOMA=97;HOMR=457;HP=20;HR=16;HU=T;HaplotypeScore=16.0590;INDEL;INS;InbreedingCoeff=0.6018;IndelType=MULTIALLELIC_INDEL;KGPilot123;MQ0=19;MQ0Fraction=0.0093;MQRankSum=7.992;NF;NR;NS=767;PP;PV4=6e-05,1,1,1;QD=8.18;RA=1183;RUN=1;ReadPosRankSum=2.684;SB=-6384.08;SC=GGAAAATTTTCTTTTTTTTTT;SRB=0.40913;SRF=484;SRP=87.859;SRR=699;TC; [...]
-20	1405740	.	T	TA	257.28	PASS	AF=0.0188;BaseQRankSum=-0.745;DP=3769;Dels=0.00;FS=0.742;HPLen=9;HRun=9;InbreedingCoeff=0.0462;IndelType=INS.NumRepetitions_9.EventLength_1.RepeatExpansion_A.;MQ0Fraction=0.0151;MQRankSum=-0.090;ReadPosRankSum=-1.582;VQSLOD=5.6502;set=Intersection;sumGLbyD=6.94
-20	1690501	.	TC	T	27928	PASS	AA=108;AB=0.91372;ABA=100;ABP=1726.1;ABR=1059;AC=35;AF=0.02966;AN=1180;BL=593;BR=6973;BVAR;BaseQRankSum=7.567;DEL;DP=10612;Dels=0.01;EL=50;EPP=4.2971;ER=58;FS=0.000;HETAR=378;HOMA=184;HOMR=477;HRun=1;InbreedingCoeff=0.0495;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.84325;LRBP=11685;MQ0=0;MQ0Fraction=0.0000;MQM=87.361;MQRankSum=4.088;NS=1045;RA=3125;RL=3;RPP=212.2;RR=105;RUN=1;ReadPosRankSum=-13.096;SAB=0.56481;SAF=61;SAP=6.951 [...]
-20	1991285	rs113891396	TAA	T,TA,TAAA,TAAAAA,TAAAAAA,TAAAAAAA,TAAAAAAAA	39235.36	PASS	AC=5,251,20,39,188,52,79;AF=0.0056,0.2789,0.0222,0.0433,0.2089,0.0578,0.0878;AN=900;BVAR;BaseQRankSum=1.124;DB;DEL;DP=54393;DP4=906,772,824,579;Dels=0.21;FR;FS=37.525;HP=12;HR=12;HRun=12;HU=A;INDEL;INS;InbreedingCoeff=0.6891;IndelType=MULTIALLELIC_INDEL;MQ=76.81;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-6.593;NF;NR;PP;PV4=0.0087,1,6.3e-19,1;RUN=1;ReadPosRankSum=-2.184;SC=ATCTGCCACTTAAAAAAAAAA;TC;TR=12;TU=A;VQS [...]
-20	2355911	.	TA	T	11723	PASS	AA=79;AB=0.9393;ABA=57;ABP=1577;ABR=882;AC=38;AF=0.0411;AN=924;BL=644;BR=5536;BVAR;BaseQRankSum=2.434;DEL;DP=9687;Dels=0.00;EL=45;EPP=6.3362;ER=34;FS=3.043;HETAR=321;HOMA=182;HOMR=555;HRun=5;InbreedingCoeff=0.0412;IndelType=DEL.NumRepetitions_5.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.79159;LRBP=8411.9;MQ0=0;MQ0Fraction=0.0000;MQM=70.848;MQRankSum=0.137;NS=1058;RA=3415;RL=3;RPP=149.49;RR=76;RUN=1;ReadPosRankSum=-12.116;SAB=0.44304;SAF=35;SAP=5.2367;SAR=44 [...]
-20	2771621	rs11479849	GT	G,GTT	1605.60	PASS	AA=80;AB=0.79825;ABA=69;ABP=267.24;ABR=273;AC=79,91;AF=0.06551,0.07546;AN=1206;BL=2593;BR=3805;BVAR;BaseQRankSum=7.825;DB;DP=9790;Dels=0.04;EL=37;EPP=3.9875;ER=43;FR;FS=4.751;HETAR=62;HOMA=5;HOMR=958;HP=11;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.2646;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.18943;LRBP=501.57;MQ0=0;MQ0Fraction=0.0000;MQM=52.45;MQRankSum=-0.560;NF;NR;NS=1025;PP;RA=3949;RL=29;RPP=16.148;RR=51;RUN=1;ReadPosRankSum=-2.397;SAB=0.525 [...]
-20	2891235	.	G	GT,GTTT	2869.87	PASS	AC=236,246;AF=0.2803,0.2922;AN=842;BaseQRankSum=8.979;DP=1067;FS=3.911;HaplotypeScore=20.3595;InbreedingCoeff=0.6511;IndelType=MULTIALLELIC_INDEL;MQ=44.86;MQ0=114;MQ0Fraction=0.1068;MQRankSum=-2.273;QD=4.00;ReadPosRankSum=-6.601;SB=-991.85;VQSLOD=5.4379;set=VQSR
-20	3033550	.	TGAG	T	2005.90	PASS	AA=34;AB=0.51429;ABA=34;ABP=3.1344;ABR=36;AC=22;AF=0.0332;AN=662;BL=1374;BR=1649;BVAR;BaseQRankSum=5.192;DEL;DP=14639;DP4=2271,1492,12,21;Dels=0.02;EL=19;EPP=4.0322;ER=15;FR;FS=16.657;HETAR=17;HOMA=0;HOMR=914;HP=1;HPLen=1;HR=1;HRun=0;HU=G;INDEL;InbreedingCoeff=-0.0454;IndelType=DEL.NumRepetitions_1.EventLength_3.;LEN=3;LRB=0.090969;LRBP=57.333;MQ=53.99;MQ0Fraction=0.0304;MQM=46.735;MQRankSum=1.938;NF;NR;NS=931;PP;PV4=0.0068,9.4e-05,1,1;RA=2985;RL=11;RPP=1 [...]
-20	3873327	rs61519218	A	AAG	683.85	PASS	AC=25;AF=0.0313;AN=800;BaseQRankSum=4.839;DB;DP=1718;FS=4.265;HRun=0;HaplotypeScore=20.5789;InbreedingCoeff=0.1055;IndelType=INS.NOVEL_2.;MQ=53.70;MQ0=37;MQ0Fraction=0.0215;MQRankSum=2.468;QD=6.30;ReadPosRankSum=4.254;SB=-403.21;VQSLOD=6.1858;set=VQSR
-20	4028835	.	GC	G	2511.30	PASS	AA=66;AB=0.56954;ABA=65;ABP=9.3521;ABR=86;AC=22;AF=0.01836;AN=1198;BL=2303;BR=2463;BVAR;BaseQRankSum=7.621;DEL;DP=22795;DP4=1714,2774,22,37;Dels=0.02;EL=34;EPP=3.1419;ER=32;FQ=999;FR;FS=2.095;HETAR=21;HOMA=0;HOMR=1050;HP=2;HPLen=2;HR=2;HRun=2;HU=C;INDEL;InbreedingCoeff=0.0125;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.033571;LRBP=14.674;MQ=108.09;MQ0=0;MQ0Fraction=0.0000;MQM=53.318;MQRankSum=5.257;NF;NR;NS=1071;PP;PV4=1,5.4e [...]
-20	4039609	rs67812039	G	GA	43457	PASS	AA=909;AB=0.54639;ABA=572;ABP=26.583;ABR=689;AC=302;AF=0.3455;AN=874;BL=37070;BR=38211;BVAR;BaseQRankSum=20.147;DB;DP=25595;DP4=1483,1374,528,542;Dels=0.00;EL=467;EPP=4.5033;ER=442;FQ=999;FR;FS=5.441;HETAR=243;HOMA=127;HOMR=608;HP=4;HPLen=3;HR=3;HRun=3;HU=A;INDEL;INS;InbreedingCoeff=0.1388;IndelType=INS.NumRepetitions_3.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.015157;LRBP=40.563;MQ=119.50;MQ0=0;MQ0Fraction=0.0000;MQM=83.197;MQRankSum=1.080;NF;NR; [...]
-20	4390056	.	TC	T	49312	PASS	AA=91;AB=0.94353;ABA=86;ABP=2605.4;ABR=1437;AC=39;AF=0.03160;AN=1234;BL=6823;BR=731;BVAR;BaseQRankSum=2.727;DEL;DP=13149;Dels=0.00;EL=41;EPP=4.9431;ER=50;FS=4.002;HETAR=465;HOMA=313;HOMR=292;HRun=3;InbreedingCoeff=0.0326;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.80646;LRBP=10671;MQ0=0;MQ0Fraction=0.0000;MQM=69.824;MQRankSum=-0.903;NS=1073;RA=3078;RL=89;RPP=183.62;RR=2;RUN=1;ReadPosRankSum=-12.526;SAB=0.45055;SAF=41;SAP=4.9431 [...]
-20	4474622	.	TA	T,TAA,TAAA,TAAAA	94522.28	PASS	ABR=114;AC=38,68,16,900;AF=0.03333,0.05965,0.01404,0.78947;AN=1140;BVAR;BaseQRankSum=9.741;DB;DP=16656;Dels=0.00;FR;FS=2.355;HOMA=3;HOMR=936;HP=10;HPLen=10;HR=10;HRun=10;HU=A;INS;InbreedingCoeff=0.4516;IndelType=MULTIALLELIC_INDEL;MQ0=2;MQ0Fraction=0.0008;MQRankSum=-4.096;NF;NR;NS=980;PP;RA=3766;RUN=1;ReadPosRankSum=2.380;SC=AGAAAAAAATTAAAAAAAAAA;SRB=0.49734;SRF=1873;SRP=3.2409;SRR=1893;TC;TR=10;TU=A;VQSLOD=8.8186;set=Intersection;sumGLbyD=38.79
-20	4824911	.	AC	A	41998.70	PASS	AC=1172;AF=0.97342;AN=1204;BaseQRankSum=8.604;DP=3615;FS=9.934;HRun=1;HaplotypeScore=39.6843;InbreedingCoeff=0.0980;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=129.80;MQ0=1;MQ0Fraction=0.0003;MQRankSum=3.378;QD=11.62;ReadPosRankSum=6.967;SB=-16955.28;VQSLOD=4.2689;set=VQSR
-20	4839897	rs35881880	TAA	T,TA,TAAA,TAAAAA	3906.80	PASS	AC=12,95,137,189;AF=0.01024,0.08106,0.11689,0.16126;AN=1172;BVAR;BaseQRankSum=15.271;DB;DEL;DP=15105;Dels=0.04;FR;FS=43.567;HP=19;HR=13;HRun=13;HU=A;INS;InbreedingCoeff=0.5716;IndelType=MULTIALLELIC_INDEL;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.569;NF;NR;PP;RUN=1;ReadPosRankSum=-13.794;SC=TGTTAAAAAATAAAAAAAAAA;TC;TR=13;TU=A;VQSLOD=8.1773;set=Intersection;sumGLbyD=3.77
-20	5507414	.	G	GCC	439.08	PASS	AC=23;AF=0.01876;AN=1226;BaseQRankSum=3.051;DP=3023;FS=3.636;HRun=1;HaplotypeScore=30.3104;InbreedingCoeff=0.0204;IndelType=INS.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=112.09;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.065;QD=2.85;ReadPosRankSum=-2.709;SB=-302.22;VQSLOD=4.4311;set=VQSR
-20	5609676	.	GA	G,GAA	799.89	PASS	AA=42;AB=0.79096;ABA=37;ABP=133.16;ABR=140;AC=43,65;AF=0.03607,0.05453;AF1=0.02826;AN=1192;BL=1360;BR=2334;BVAR;BaseQRankSum=5.069;CI95=0.01242,0.04037;DP=15610;DP4=1548,2441,21,30;Dels=0.02;EL=18;EPP=4.8716;ER=24;FQ=12.1;FR;FS=0.000;HETAR=36;HOMA=1;HOMR=991;HP=13;HPLen=10;HR=10;HRun=10;HU=A;INDEL;INS;InbreedingCoeff=0.2001;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.26367;LRBP=560.68;MQ=63.29;MQ0Fraction=0.0003;MQM=44.143;MQRankSum=1.755;NF;NR;NS=1028;PP;P [...]
-20	5736211	rs35303106	CT	C,CTT	4384.40	PASS	AA=117;AB=0.71499;ABA=116;ABP=166.4;ABR=291;AC=32,145;AF=0.02712,0.12288;AN=1180;BL=5556;BR=4901;BVAR;BaseQRankSum=2.708;DB;DP=9157;Dels=0.01;EL=54;EPP=4.5136;ER=63;FR;FS=2.802;HETAR=79;HOMA=1;HOMR=837;HP=16;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.1903;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.062637;LRBP=92.1;MQ0Fraction=0.0273;MQM=48.932;MQRankSum=3.654;NF;NR;NS=917;PP;RA=2785;RL=79;RPP=34.209;RR=38;RUN=1;ReadPosRankSum=0.795;SAB=0.5641;SAF=6 [...]
-20	5898626	rs34483659	CAAA	C,CA,CAA,CAAAAA	1140.16	PASS	ABR=34;AC=19,98,56,199;AF=0.0227,0.1172,0.0670,0.2380;AF1=0.08519;BVAR;BaseQRankSum=5.049;CI95=0.03727,0.1273;DB;DEL;DP=5091;DP4=539,408,121,123;FQ=4.43;FR;FS=5.701;HOMA=64;HOMR=156;HP=19;HR=18;HU=A;HaplotypeScore=11.5333;INDEL;InbreedingCoeff=0.7405;IndelType=MULTIALLELIC_INDEL;MQ0=117;MQ0Fraction=0.0986;MQRankSum=6.290;NF;NR;NS=240;PP;PV4=0.043,1,1,0.0087;QD=1.22;RA=204;RUN=1;ReadPosRankSum=-2.684;SB=-1015.09;SC=ACTAAAAATACAAAAAAA [...]
-20	5975126	rs10541892	C	CAG	504.78	PASS	AC=79;AF=0.07004;AN=1128;BaseQRankSum=10.498;DB;DP=2050;FS=38.228;HRun=0;HaplotypeScore=14.1426;InbreedingCoeff=-0.0053;IndelType=INS.NOVEL_2.;MQ=60.40;MQ0=80;MQ0Fraction=0.0390;MQRankSum=5.098;QD=1.63;ReadPosRankSum=-4.851;SB=-590.69;VQSLOD=4.8517;set=VQSR
-20	6040983	rs11087710	A	AAAAAAGAG,AAAAAGAG,AAAAGAG,AAAAGAGAG,AAAGAG,AAAGAGAG,AAGAG,AAGAGAG,AG,AGAG,AGAGAG	66894.55	PASS	ABR=468;AC=80,9,20,136,31,91,33,29,9,3,5;AF=0.0980,0.0110,0.0245,0.1667,0.0380,0.1115,0.0404,0.0355,0.0110,0.0037,0.0061;AN=816;BVAR;BaseQRankSum=-12.470;DB;DP=38726;DP4=426,611,310,472;Dels=0.00;FQ=999;FR;FS=6.635;HOMA=110;HOMR=506;HP=14;HR=15;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.8291;IndelType=MULTIALLELIC_INDEL;KGPilot123;MQ=54.22;MQ0Fraction=0.0168;MQRankSum=-5.3 [...]
-20	7024548	.	G	GAT	5041.27	PASS	AC=123;AF=0.10336;AN=1190;BaseQRankSum=23.097;DP=3045;FS=7.979;HRun=0;HaplotypeScore=15.6967;InbreedingCoeff=0.1062;IndelType=INS.NumRepetitions_5.EventLength_2.RepeatExpansion_AT.;MQ=119.29;MQ0=2;MQ0Fraction=0.0007;MQRankSum=-3.725;QD=8.97;ReadPosRankSum=-1.636;SB=-2257.45;VQSLOD=5.9332;set=VQSR
-20	7484554	.	A	AT	5.09	PASS	AC=0;AF=0.0000;AN=710;BaseQRankSum=-0.696;DP=1862;FS=2.835;HRun=9;HaplotypeScore=13.5425;InbreedingCoeff=0.0567;IndelType=INS.NumRepetitions_9.EventLength_1.RepeatExpansion_T.;MQ=76.92;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.932;ReadPosRankSum=-1.701;VQSLOD=4.3156;set=VQSR
-20	7632194	rs77286341	GAA	AAA,G	5324	PASS	AC=0;AF=0.0000;AN=700;BaseQRankSum=-1.741;DB;DP=1772;FR;HP=4;HPLen=3;HR=3;HRun=0;HU=A;HaplotypeScore=60.1795;InbreedingCoeff=0.0017;IndelType=MIXED;MQ=70.69;MQ0=13;MQ0Fraction=0.0073;MQRankSum=-1.315;NF;NR;PP;ReadPosRankSum=-3.650;SC=GAGAGAGAGAGAAAGGTGTAA;TC;TR=13;TU=AG;set=filterInVQSR-2of5
-20	7767508	rs71329674	G	GA	17914	PASS	AA=415;AB=0.61617;ABA=337;ABP=105.94;ABR=541;AC=141;AF=0.11614;AN=1214;BL=15187;BR=20323;BVAR;BaseQRankSum=-13.946;DB;DP=28222;Dels=0.00;EL=184;EPP=14.569;ER=231;FQ=999;FR;FS=13.296;HETAR=178;HOMA=35;HOMR=822;HP=14;HPLen=9;HR=9;HRun=9;HU=A;INDEL;INS;InbreedingCoeff=0.0714;IndelType=INS.NumRepetitions_9.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.14464;LRBP=1616.1;MQ=89.69;MQ0=1;MQ0Fraction=0.0003;MQM=51.667;MQRankSum=0.664;NF;NR;NS=1035;PP;RA=3707;R [...]
-20	7920261	.	TA	T,TAA	802.15	PASS	AA=28;AB=0.8;ABA=28;ABP=112.45;ABR=112;AC=22,39;AF=0.01836,0.03255;AN=1198;BL=943;BR=1487;BVAR;BaseQRankSum=2.233;DP=10645;Dels=0.01;EL=11;EPP=5.8022;ER=17;FR;FS=1.691;HETAR=20;HOMA=0;HOMR=1007;HP=10;HPLen=9;HR=9;HRun=9;HU=A;INS;InbreedingCoeff=0.2256;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.22387;LRBP=267.46;MQ0=0;MQ0Fraction=0.0000;MQM=57.571;MQRankSum=0.940;NF;NR;NS=1027;PP;RA=4776;RL=8;RPP=14.178;RR=20;RUN=1;ReadPosRankSum=-1.567;SAB=0.53571;SAF=15;S [...]
-20	8012465	rs10595338	TATGA	T	2104.41	PASS	AF=0.03339;BaseQRankSum=10.662;DB;DP=11772;DS;Dels=0.01;FR;FS=7.678;HP=1;HPLen=1;HR=1;HRun=0;HU=A;InbreedingCoeff=0.0266;IndelType=DEL.NumRepetitions_1.EventLength_4.;MQ0Fraction=0.0731;MQRankSum=0.603;NF;NR;PP;ReadPosRankSum=1.276;SC=TGTATGTATGTATGATGTATG;TC;TR=19;TU=ATGT;VQSLOD=4.1376;set=filterInVQSR-2of5;sumGLbyD=6.53
-20	8573999	.	CGTGT	C,CGT,CGTGTGT,TGTGT	45865.96	PASS	AC=458,0,731;AF=0.37727,0.00000,0.60214;AN=1214;BVAR;BaseQRankSum=-6.703;DEL;DP=37714;Dels=0.03;FR;FS=11.079;HP=2;HPLen=1;HR=1;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.7632;IndelType=MIXED;LEN=2;MQ0Fraction=0.0026;MQRankSum=-1.394;NF;NR;PP;RUN=1;ReadPosRankSum=-2.102;SC=TGTGTGTGCGCGTGTGTGTGT;TC;TR=18;TU=GT;VQSLOD=6.1435;set=Intersection;sumGLbyD=3.53
-20	8610455	rs10571111	TTTTC	T	11763.51	PASS	AC=190;AF=0.17056;AN=1114;BaseQRankSum=-14.397;DB;DP=2323;FS=2.321;HRun=0;HaplotypeScore=39.8020;InbreedingCoeff=0.2502;IndelType=DEL.NumRepetitions_2.EventLength_4.;MQ=53.39;MQ0=104;MQ0Fraction=0.0448;MQRankSum=3.519;QD=19.07;ReadPosRankSum=4.150;SB=-4067.02;VQSLOD=5.0554;set=VQSR
-20	9139079	.	ATT	A,AT,ATTT,ATTTT,ATTTTT	8777.90	PASS	AC=23,140,114,69,113;AF=0.01993,0.12132,0.09879,0.05979,0.09792;AN=1154;BVAR;BaseQRankSum=-0.022;DEL;DP=25109;DP4=502,657,278,313;FR;FS=11.929;HP=16;HR=16;HU=T;HaplotypeScore=20.2361;INDEL;INS;InbreedingCoeff=0.5704;IndelType=MULTIALLELIC_INDEL;MQ0=16;MQ0Fraction=0.0067;MQRankSum=2.624;NF;NR;PP;PV4=0.14,1,1,1;QD=1.48;RUN=1;ReadPosRankSum=-0.480;SB=-2354.28;SC=CACCTGGCTAATTTTTTTTTT;TC;TR=16;TU=T;VQSLOD=6.9180;set=Intersection
-20	9862448	.	CT	C	49312	PASS	AA=60;AB=0.96003;ABA=53;ABP=2440.4;ABR=1273;AC=18;AF=0.01461;AN=1232;BL=3516;BR=140;BVAR;BaseQRankSum=-2.056;DEL;DP=11893;Dels=0.01;EL=35;EPP=6.6294;ER=25;FS=1.787;HETAR=396;HOMA=344;HOMR=334;HRun=1;InbreedingCoeff=0.0379;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.92341;LRBP=6772.5;MQ0Fraction=0.0006;MQM=54.267;MQRankSum=-0.907;NS=1074;RA=2990;RL=60;RPP=133.3;RR=0;RUN=1;ReadPosRankSum=-10.579;SAB=0.58333;SAF=35;SAP=6.6294;SAR= [...]
-20	9863736	rs73618103	G	GT	50570.21	PASS	AA=2247;AB=0.48878;ABA=1412;ABP=6.0324;ABR=1350;AC=546;AF=0.44463;AN=1228;BL=86886;BR=95862;BVAR;BaseQRankSum=-23.978;DB;DP=32517;DP4=1125,1133,1017,1048;Dels=0.00;EL=1089;EPP=7.6113;ER=1158;FQ=999;FR;FS=2.529;HETAR=445;HOMA=201;HOMR=393;HP=4;HPLen=4;HR=4;HRun=4;HU=T;INDEL;INS;InbreedingCoeff=0.1393;IndelType=INS.NumRepetitions_4.EventLength_1.RepeatExpansion_T.;KGPilot123;LEN=1;LRB=0.049117;LRBP=960.35;MQ=68.10;MQ0=2;MQ0Fraction=0.0006;MQM=50.931 [...]
-20	10926959	.	AG	A	12239	PASS	AA=65;AB=0.92801;ABA=64;ABP=1417.6;ABR=825;AC=24;AF=0.0264;AN=908;BL=616;BR=3782;BVAR;BaseQRankSum=9.990;DEL;DP=10708;Dels=0.01;EL=37;EPP=5.7163;ER=28;FS=1.652;HETAR=275;HOMA=70;HOMR=724;HRun=1;InbreedingCoeff=0.0102;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.71987;LRBP=4952;MQ0=1;MQ0Fraction=0.0004;MQM=118.82;MQRankSum=1.018;NS=1069;RA=4746;RL=5;RPP=104.07;RR=60;RUN=1;ReadPosRankSum=-12.039;SAB=0.41538;SAF=27;SAP=7.0526;SAR= [...]
-20	11299648	.	TG	T	49315	PASS	AA=62;AB=0.95292;ABA=54;ABP=2046.7;ABR=1093;AC=28;AF=0.0373;AN=750;BL=3126;BR=528;BVAR;BaseQRankSum=-4.929;DEL;DP=10764;Dels=0.01;EL=26;EPP=6.5127;ER=36;FS=3.851;HETAR=366;HOMA=383;HOMR=304;HRun=1;InbreedingCoeff=0.0267;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.711;LRBP=4014.1;MQ0=1;MQ0Fraction=0.0005;MQM=76.468;MQRankSum=1.327;NS=1070;RA=2588;RL=54;RPP=77.121;RR=8;RUN=1;ReadPosRankSum=-12.507;SAB=0.48387;SAF=30;SAP=3.1504;S [...]
-20	11561096	.	CTA	C	999	PASS	AC=2;AF=0.0029;AF1=0.005602;BaseQRankSum=3.190;CI95=0.004425,0.01106;DP=7521;DP4=1998,1794,2,4;Dels=0.00;FQ=999;FR;FS=5.422;HP=3;HPLen=2;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0056;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_TA.;MQ=113.88;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.297;NF;NR;PP;PV4=0.43,0.024,1,1;ReadPosRankSum=1.406;SC=CAATAGTATTCTATGTCAGTC;TC;TR=1;TU=T;VQSLOD=8.6243;set=Intersection;sumGLbyD=21.89
-20	11723671	.	C	CA	1096.60	PASS	AA=35;AB=0.69565;ABA=35;ABP=41.247;ABR=80;AC=10;AF=0.0141;AN=710;BL=2005;BR=1702;BVAR;BaseQRankSum=-3.427;DP=9819;Dels=0.00;EL=20;EPP=4.5614;ER=15;FR;FS=3.814;HETAR=20;HOMA=0;HOMR=1034;HP=8;HPLen=7;HR=7;HRun=7;HU=A;INS;InbreedingCoeff=0.0323;IndelType=INS.NumRepetitions_7.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.081737;LRBP=56.79;MQ0=0;MQ0Fraction=0.0000;MQM=81.057;MQRankSum=0.050;NF;NR;NS=1054;PP;RA=5562;RL=22;RPP=8.0357;RR=13;RUN=1;ReadPosRankSum=-2. [...]
-20	12238835	rs113904674	CTCTTCATGGTCT	C	1813.44	PASS	AA=7;AB=0.73077;ABA=7;ABP=15.037;ABR=19;AC=4;AF=0.0056;AN=712;BL=360;BR=368;BVAR;BaseQRankSum=3.891;DB;DEL;DP=10309;Dels=0.00;EL=4;EPP=3.3205;ER=3;FR;FS=0.000;HETAR=3;HOMA=0;HOMR=1076;HP=1;HPLen=2;HR=2;HRun=0;HU=C;InbreedingCoeff=-0.0381;IndelType=DEL.NumRepetitions_1.EventLength_10orMore.;LEN=12;LRB=0.010989;LRBP=3.2012;MQ0=0;MQ0Fraction=0.0000;MQM=37;MQRankSum=-3.793;NF;NR;NS=1079;PP;RA=6085;RL=4;RPP=3.3205;RR=3;RUN=1;ReadPosRankSum= [...]
-20	12602812	.	AT	A	12344	PASS	AA=47;AB=0.94372;ABA=43;ABP=1309.5;ABR=721;AC=14;AF=0.0196;AN=716;BL=2714;BR=217;BVAR;BaseQRankSum=1.424;DEL;DP=10743;Dels=0.00;EL=24;EPP=3.0565;ER=23;FS=0.629;HETAR=228;HOMA=65;HOMR=769;HRun=1;InbreedingCoeff=0.0233;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.85193;LRBP=4622.3;MQ0Fraction=0.0000;MQM=99.574;MQRankSum=1.901;NS=1080;RA=4839;RL=46;RPP=96.568;RR=1;RUN=1;ReadPosRankSum=-9.906;SAB=0.53191;SAF=25;SAP=3.4261;SAR=22;SR [...]
-20	13600884	.	CTG	C,CTGTG	1278.10	PASS	AA=85;AB=0.77994;ABA=79;ABP=247.38;ABR=280;AC=71,22;AF=0.05907,0.01830;AN=1202;BL=3279;BR=3205;BVAR;BaseQRankSum=8.852;DEL;DP=24185;DP4=1317,931,52,49;Dels=0.03;EL=45;EPP=3.649;ER=40;FQ=999;FR;FS=31.826;HETAR=75;HOMA=4;HOMR=926;HP=2;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1566;IndelType=MULTIALLELIC_INDEL;LEN=2;LRB=0.011413;LRBP=4.8442;MQ=65.06;MQ0Fraction=0.0012;MQM=48.671;MQRankSum=-0.511;NF;NR;NS=1005;PP;PV4=0.18,1,0.39,0.27;RA=3342;RL=3 [...]
-20	13666265	.	T	TATAG	556.88	PASS	AC=21;AF=0.01959;AN=1072;BaseQRankSum=24.958;DP=2706;FS=2.581;HRun=0;HaplotypeScore=25.9952;InbreedingCoeff=0.1419;IndelType=INS.NOVEL_4.;MQ=72.43;MQ0=0;MQ0Fraction=0.0000;MQRankSum=2.888;QD=4.38;ReadPosRankSum=2.552;SB=-417.04;VQSLOD=7.3380;set=VQSR
-20	13861245	rs72422273	C	CTCA	2685.46	PASS	AC=140;AF=0.11589;AN=1208;BaseQRankSum=24.355;DB;DP=2910;FS=6.808;HRun=0;HaplotypeScore=19.3095;InbreedingCoeff=-0.0991;IndelType=INS.NumRepetitions_1.EventLength_3.;MQ=78.25;MQ0=22;MQ0Fraction=0.0076;MQRankSum=3.225;QD=3.64;ReadPosRankSum=2.607;SB=-1861.38;VQSLOD=4.1974;set=VQSR
-20	13865746	.	T	TA,TAA	1416.23	PASS	AA=63;AB=0.80417;ABA=47;ABP=195.87;ABR=193;AC=122,21;AF=0.10133,0.01744;AN=1204;BL=3673;BR=1145;BVAR;BaseQRankSum=-3.336;DP=10513;Dels=0.00;EL=62;EPP=131.27;ER=1;FR;FS=716.583;HETAR=45;HOMA=1;HOMR=998;HP=2;HR=1;HRun=1;HU=A;INS;InbreedingCoeff=0.0814;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.5247;LRBP=2883.3;MQ0=0;MQ0Fraction=0.0000;MQM=56.143;MQRankSum=-1.197;NF;NR;NS=1044;PP;RA=4529;RL=62;RPP=131.27;RR=1;RUN=1;ReadPosRankSum=-12.295;SAB=1;SAF=63;SAP=13 [...]
-20	13881703	.	CTT	C	152.85	PASS	AC=8;AF=0.0093;AN=862;BaseQRankSum=3.941;DP=2063;FS=0.962;HRun=5;HaplotypeScore=24.0313;InbreedingCoeff=0.0790;IndelType=DEL.NumRepetitions_5.EventLength_1.RepeatExpansion_T.;MQ=55.05;MQ0=49;MQ0Fraction=0.0238;MQRankSum=-1.418;QD=3.47;ReadPosRankSum=-0.605;SB=-93.04;VQSLOD=5.3874;set=VQSR
-20	14260090	rs73619828	A	AT	27935	PASS	AA=596;AB=0.59484;ABA=487;ABP=96.922;ABR=715;AC=204;AF=0.17000;AN=1200;BL=21718;BR=28458;BVAR;BaseQRankSum=0.756;DB;DP=23629;DP4=1385,1492,287,328;Dels=0.00;EL=299;EPP=3.0249;ER=297;FQ=999;FR;FS=6.187;HETAR=218;HOMA=38;HOMR=788;HP=9;HPLen=9;HR=9;HRun=9;HU=T;INDEL;INS;InbreedingCoeff=0.0797;IndelType=INS.NumRepetitions_9.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.13433;LRBP=1969;MQ=100.81;MQ0=0;MQ0Fraction=0.0000;MQM=57.084;MQRankSum=2.224;NF;NR;NS [...]
-20	14260558	.	AC	A	238	PASS	AC=1;AF=0.0014;AF1=0.003368;BaseQRankSum=2.868;CI95=0.003106,0.006211;DP=9724;DP4=2075,2329,1,7;Dels=0.00;FQ=106;FR;FS=10.678;HP=1;HPLen=2;HR=2;HRun=1;HU=A;INDEL;InbreedingCoeff=-0.0406;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=114.37;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.862;NF;NR;PP;PV4=0.074,0.0096,0.017,1;ReadPosRankSum=-0.042;SC=ATCAGGAATAACTGTGTGACC;TC;TR=2;TU=A;VQSLOD=8.1618;set=Intersection;sumGLbyD=18.65
-20	14425481	.	GTA	G,GTATA	148.85	PASS	AC=43,23;AF=0.03473,0.01858;AN=1238;BaseQRankSum=6.289;DP=25167;DP4=1800,2021,38,49;FR;FS=9.416;HP=2;HPLen=1;HR=1;HU=T;HaplotypeScore=17.7453;INDEL;InbreedingCoeff=0.0995;IndelType=MULTIALLELIC_INDEL;MQ0=21;MQ0Fraction=0.0058;MQRankSum=-0.200;NF;NR;PP;PV4=0.59,1,0.04,0.023;QD=0.35;ReadPosRankSum=-1.689;SB=-367.50;SC=CTGTGTGTGTGTATATATATA;TC;TR=13;TU=AT;VQSLOD=3.5796;set=filterInVQSR-2of5
-20	14943522	rs11478299	GA	AA,G	1761.24	PASS	AA=117;AB=0.68142;ABA=108;ABP=99.919;ABR=231;AC=0;AF=0.0000;AF1=0.04204;AN=712;BL=4931;BR=5802;BVAR;BaseQRankSum=9.118;CI95=0.02876,0.05752;DB;DEL;DP=13717;DP4=1908,1684,59,58;Dels=0.05;EL=60;EPP=3.1773;ER=57;FQ=81.9;FR;HETAR=56;HOMA=1;HOMR=1011;HP=8;HPLen=8;HR=8;HU=A;INDEL;InbreedingCoeff=0.1264;IndelType=MIXED;LEN=1;LRB=0.081152;LRBP=156.5;MQ=106.93;MQ0=0;MQ0Fraction=0.0000;MQM=96.855;MQRankSum=1.619;NF;NR;NS=1068;PP;PV4=0.57,1,0.0003,1;QD=7. [...]
-20	14974486	.	A	AG	4101.40	PASS	AA=57;AB=0.57143;ABA=51;ABP=8.2839;ABR=68;AC=22;AF=0.01846;AN=1192;BL=2286;BR=2834;BVAR;BaseQRankSum=8.711;DP=20538;DP4=2172,2100,19,13;Dels=0.00;EL=32;EPP=4.877;ER=25;FS=0.517;HETAR=20;HOMA=4;HOMR=1027;HRun=1;INDEL;INS;InbreedingCoeff=0.0677;IndelType=INS.NOVEL_1.Novel_G.;LEN=1;LRB=0.10703;LRBP=130.37;MQ=126.07;MQ0=0;MQ0Fraction=0.0000;MQM=56.088;MQRankSum=-10.756;NS=1051;PV4=0.38,3.5e-51,7.9e-34,1;RA=5203;RL=26;RPP=3.9627;RR=31;RUN=1;ReadPosRankSum=1.283 [...]
-20	15111137	.	GA	G	13533	PASS	AA=98;AB=0.84864;ABA=89;ABP=623.8;ABR=499;AC=47;AF=0.03796;AN=1238;BL=5324;BR=856;BVAR;BaseQRankSum=-11.577;DEL;DP=13384;Dels=0.01;EL=53;EPP=4.4284;ER=45;FS=6.099;HETAR=219;HOMA=845;HOMR=18;HRun=1;InbreedingCoeff=-0.0056;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.72298;LRBP=7017.4;MQ0Fraction=0.0003;MQM=90.449;MQRankSum=1.408;NS=1083;RA=590;RL=87;RPP=130.99;RR=11;RUN=1;ReadPosRankSum=-18.074;SAB=0.55102;SAF=54;SAP=5.2261;SAR= [...]
-20	15283028	.	A	AC,ACACACACACACAC	140844.83	PASS	AA=180;AB=0.61442;ABA=123;ABP=39.285;ABR=196;AC=13,817;AF=0.01111,0.69829;AN=1170;BL=4453;BR=11407;BVAR;BaseQRankSum=24.686;DP=6365;Dels=0.00;EL=124;EPP=58.793;ER=56;FR;FS=10.912;HETAR=87;HOMA=48;HOMR=683;HP=1;HR=1;HRun=1;HU=T;INS;InbreedingCoeff=0.2074;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.43846;LRBP=6624;MQ0Fraction=0.0558;MQM=38.211;MQRankSum=-21.111;NF;NR;NS=818;PP;RA=1732;RL=0;RPP=393.88;RR=180;RUN=1;ReadPosRankSum=-7.620;SAB=0.311 [...]
-20	15361056	.	ATAACT	A	4892.81	PASS	AA=59;AB=0.63576;ABA=55;ABP=27.184;ABR=96;AC=34;AF=0.0487;AN=698;BL=3164;BR=1999;BVAR;BaseQRankSum=3.391;DEL;DP=7080;Dels=0.03;EL=27;EPP=3.9304;ER=32;FR;FS=4.816;HETAR=35;HOMA=6;HOMR=966;HP=2;HPLen=3;HR=3;HRun=0;HU=A;InbreedingCoeff=0.0785;IndelType=DEL.NumRepetitions_1.EventLength_5.;LEN=5;LRB=0.22564;LRBP=573.84;MQ0=0;MQ0Fraction=0.0000;MQM=70.034;MQRankSum=-8.732;NF;NR;NS=1008;PP;RA=3915;RL=42;RPP=26.013;RR=17;RUN=1;ReadPosRankSum=-0.735;SAB=0.44068 [...]
-20	15579507	.	AATTAGTC	A,TATTAGTC	1936.38	PASS	AA=16;AB=0.58974;ABA=16;ABP=5.7386;ABR=23;AC=64;AF=0.05229;AN=1224;BL=699;BR=775;BVAR;BaseQRankSum=-21.390;DEL;DP=21920;DP4=2099,2403,6,6;Dels=0.00;EL=8;EPP=3.0103;ER=8;FR;FS=2.920;HETAR=5;HOMA=0;HOMR=1063;HP=3;HPLen=4;HR=4;HU=A;INDEL;InbreedingCoeff=-0.0143;IndelType=MIXED;LEN=7;LRB=0.05156;LRBP=11.519;MQ=129.49;MQ0=0;MQ0Fraction=0.0000;MQM=51.938;MQRankSum=3.331;NF;NR;NS=1068;PP;PV4=1,0.019,1.3e-07,1;RA=5334;RL=5;RPP=7.8961;RR=11;RUN=1;Rea [...]
-20	15752535	.	CT	C,GT	3775.20	PASS	AA=92;AB=0.78636;ABA=47;ABP=159.71;ABR=173;AC=0;AF=0.0000;AN=608;BL=4955;BR=2380;BVAR;BaseQRankSum=2.910;DEL;DP=3429;Dels=0.04;EL=13;EPP=105.82;ER=79;FR;HETAR=92;HOMA=95;HOMR=544;HP=2;HPLen=2;HR=2;HU=T;InbreedingCoeff=0.0483;IndelType=MIXED;LEN=1;LRB=0.35106;LRBP=1966;MQ0Fraction=0.0232;MQM=35.293;MQRankSum=-2.199;NF;NR;NS=732;PP;QD=4.91;RA=1272;RL=81;RPP=118.66;RR=11;RUN=1;ReadPosRankSum=-1.077;SAB=0.021739;SAF=2;SAP=185.79;SAR=90;SB=-59.51;SC=CAAGACCA [...]
-20	15883060	rs73619850	A	AT	1325.60	PASS	AA=38;AB=0.59302;ABA=35;ABP=9.4742;ABR=51;AC=14;AF=0.0156;AN=896;BL=1078;BR=1638;BVAR;BaseQRankSum=-4.526;DB;DP=19854;DP4=1632,1800,15,20;Dels=0.00;EL=18;EPP=3.2389;ER=20;FR;FS=0.000;HETAR=14;HOMA=1;HOMR=1014;HP=1;HPLen=1;HR=1;HRun=1;HU=T;INDEL;INS;InbreedingCoeff=-0.0131;IndelType=INS.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.20619;LRBP=253.74;MQ=118.40;MQ0=0;MQ0Fraction=0.0000;MQM=56.526;MQRankSum=0.892;NF;NR;NS=1029;PP;PV4=0 [...]
-20	16122099	.	GA	G	12914	PASS	AA=85;AB=0.85915;ABA=80;ABP=639.4;ABR=488;AC=19;AF=0.01542;AN=1232;BL=805;BR=5457;BVAR;BaseQRankSum=-6.084;DEL;DP=13592;Dels=0.00;EL=45;EPP=3.649;ER=40;FS=0.935;HETAR=218;HOMA=841;HOMR=14;HRun=2;InbreedingCoeff=0.0250;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.74289;LRBP=7507.5;MQ0=0;MQ0Fraction=0.0000;MQM=103.01;MQRankSum=2.843;NS=1075;RA=541;RL=2;RPP=170.62;RR=83;RUN=1;ReadPosRankSum=-16.222;SAB=0.49412;SAF=42;SAP=3.0358;SA [...]
-20	16828509	.	G	GT	843.62	PASS	AA=30;AB=0.70103;ABA=29;ABP=37.06;ABR=68;AC=10;AF=0.0140;AN=714;BL=1368;BR=1786;BVAR;BaseQRankSum=-4.061;DP=8682;Dels=0.01;EL=14;EPP=3.2998;ER=16;FR;FS=2.681;HETAR=22;HOMA=1;HOMR=1020;HP=8;HPLen=8;HR=8;HRun=8;HU=T;INS;InbreedingCoeff=0.1389;IndelType=INS.NumRepetitions_8.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.13253;LRBP=123.3;MQ0=0;MQ0Fraction=0.0000;MQM=62.8;MQRankSum=-1.491;NF;NR;NS=1043;PP;RA=4416;RL=11;RPP=7.6428;RR=19;RUN=1;ReadPosRankSum=-1.718; [...]
-20	17470034	.	GC	G	46975	PASS	AA=57;AB=0.96043;ABA=52;ABP=2422.5;ABR=1262;AC=34;AF=0.02773;AN=1226;BL=418;BR=3446;BVAR;BaseQRankSum=-6.250;DEL;DP=12035;Dels=0.00;EL=22;EPP=9.4485;ER=35;FS=1.350;HETAR=416;HOMA=409;HOMR=244;HRun=1;InbreedingCoeff=0.0083;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.78364;LRBP=5155.6;MQ0=0;MQ0Fraction=0.0000;MQM=99.509;MQRankSum=2.192;NS=1076;RA=2396;RL=5;RPP=87.164;RR=52;RUN=1;ReadPosRankSum=-15.199;SAB=0.5614;SAF=32;SAP=4.877 [...]
-20	17471374	.	AGCGGC	A	850.03	PASS	AC=6;AF=0.0085;AF1=0.01301;AN=704;BaseQRankSum=6.259;CI95=0.00885,0.01991;DP=8180;DP4=2215,1878,4,5;Dels=0.01;FQ=131;FS=0.000;HRun=0;INDEL;InbreedingCoeff=0.0009;IndelType=DEL.NumRepetitions_1.EventLength_5.;MQ=104.41;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-5.521;PV4=0.74,0.37,0.0005,1;ReadPosRankSum=2.468;VQSLOD=6.8773;set=Intersection;sumGLbyD=30.85
-20	18433202	rs35582929	G	GA	2506.90	PASS	AA=55;AB=0.5812;ABA=49;ABP=9.7103;ABR=68;AC=20;AF=0.0218;AN=918;BL=2263;BR=2175;BVAR;BaseQRankSum=-6.639;DB;DP=19467;DP4=1845,2365,27,26;Dels=0.00;EL=21;EPP=9.6826;ER=34;FQ=999;FR;FS=5.633;HETAR=16;HOMA=3;HOMR=1045;HP=2;HPLen=3;HR=3;HRun=1;HU=G;INDEL;INS;InbreedingCoeff=0.0700;IndelType=INS.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.019829;LRBP=6.7994;MQ=114.03;MQ0=0;MQ0Fraction=0.0000;MQM=83.345;MQRankSum=1.610;NF;NR;NS=1064;PP [...]
-20	18551314	rs10659122	CA	C,CAA,CAAA,CAAAA,CAAAAA	18810.74	PASS	ABR=243;AC=19,169,216,164,188;AF=0.01816,0.16157,0.20650,0.15679,0.17973;BVAR;BaseQRankSum=-5.742;DB;DP=17637;DP4=136,77,560,237;FR;FS=2.693;HOMA=177;HOMR=299;HP=17;HR=17;HU=A;HaplotypeScore=15.5048;INDEL;INS;InbreedingCoeff=0.8901;IndelType=MULTIALLELIC_INDEL;MQ0=11;MQ0Fraction=0.0069;MQRankSum=1.845;NF;NR;NS=658;PP;PV4=0.08,1,1,1;QD=12.66;RA=673;RUN=1;ReadPosRankSum=0.283;SB=-3514.45;SC=GATTCCATCTCAAAAAAAAAA;SRB=0.63596;SR [...]
-20	18785519	.	G	GTC	415.55	PASS	AC=28;AF=0.0400;AN=700;BaseQRankSum=10.889;DP=1929;FS=8.778;HRun=0;HaplotypeScore=27.6448;InbreedingCoeff=0.0510;IndelType=INS.NOVEL_2.;MQ=61.99;MQ0=36;MQ0Fraction=0.0187;MQRankSum=4.508;QD=3.08;ReadPosRankSum=8.080;SB=-437.03;VQSLOD=4.9313;set=VQSR
-20	20301041	rs35451634	ATATG	A	200.42	PASS	AC=21;AF=0.0449;AN=468;BaseQRankSum=5.251;DB;DP=579;FS=24.013;HRun=0;HaplotypeScore=27.8977;InbreedingCoeff=0.0113;IndelType=DEL.NumRepetitions_1.EventLength_4.;MQ=78.47;MQ0=26;MQ0Fraction=0.0449;MQRankSum=-5.284;QD=3.06;ReadPosRankSum=1.793;SB=-55.76;VQSLOD=5.0981;set=VQSR
-20	20378174	.	TC	T	245.55	PASS	AC=23;AF=0.01879;AN=1224;BaseQRankSum=0.990;DP=3225;FS=10.413;HRun=1;HaplotypeScore=22.6109;InbreedingCoeff=0.0244;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=93.70;MQ0=3;MQ0Fraction=0.0009;MQRankSum=-3.349;QD=1.86;ReadPosRankSum=-7.227;SB=-188.62;VQSLOD=4.2553;set=VQSR
-20	20809160	rs10571503	TAA	AAA,T	3496	PASS	AC=0;AF=0.0000;AN=612;BaseQRankSum=1.968;DB;DP=1092;FR;HP=4;HPLen=3;HR=3;HRun=0;HU=A;HaplotypeScore=26.1253;InbreedingCoeff=0.0603;IndelType=MIXED;MQ=68.98;MQ0=1;MQ0Fraction=0.0009;MQRankSum=1.520;NF;NR;PP;ReadPosRankSum=-4.042;SC=TATATATATATAAATTTAAAT;TC;TR=13;TU=AT;set=filterInVQSR-2of5
-20	22508765	.	CT	C	53877.84	PASS	AA=187;AB=0.78077;ABA=171;ABP=537.09;ABR=609;AC=1017;AF=0.91787;AN=1108;BL=12690;BR=1718;BVAR;BaseQRankSum=13.773;DEL;DP=7430;Dels=0.02;EL=73;EPP=22.53;ER=114;FR;FS=16.352;HETAR=152;HOMA=9;HOMR=786;HP=8;HR=4;HRun=4;HU=T;InbreedingCoeff=0.3885;IndelType=DEL.NumRepetitions_4.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.76152;LRBP=18147;MQ0=0;MQ0Fraction=0.0000;MQM=46.086;MQRankSum=0.971;NF;NR;NS=947;PP;RA=2868;RL=177;RPP=326.86;RR=10;RUN=1;ReadPosRankSum=9. [...]
-20	22555082	rs11477526	AT	A	11503	PASS	AA=530;AB=0.50816;ABA=422;ABP=3.5063;ABR=436;AF=0.1614;AN=700;BL=21453;BR=23313;BVAR;BaseQRankSum=17.562;DB;DEL;DP=25587;DP4=1869,1600,283,201;Dels=0.14;EL=259;EPP=3.6003;ER=271;FQ=999;FR;FS=14.595;HETAR=159;HOMA=41;HOMR=846;HP=3;HPLen=3;HR=3;HRun=3;HU=T;INDEL;InbreedingCoeff=0.0995;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.041549;LRBP=170.83;MQ=95.89;MQ0=0;MQ0Fraction=0.0000;MQM=72.162;MQRankSum=2.564;NF;NR;NS=1046 [...]
-20	22590907	.	A	AC	4204.88	PASS	AA=67;AB=0.592;ABA=51;ABP=12.2;ABR=74;AF=0.0554;AF1=0.0468;AN=560;BL=2277;BR=2389;BVAR;BaseQRankSum=10.968;CI95=0.03759,0.05639;DP=14380;DP4=2514,2018,33,33;Dels=0.00;EL=22;EPP=20.155;ER=45;FQ=999;FR;FS=3.846;HETAR=25;HOMA=4;HOMR=1049;HP=4;HPLen=5;HR=5;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.0719;IndelType=INS.NOVEL_1.Novel_C.;LEN=1;LRB=0.024003;LRBP=8.8481;MQ=110.68;MQ0=0;MQ0Fraction=0.0000;MQM=96.149;MQRankSum=2.668;NF;NR;NS=1078;PP;PV4=0.39,1,0.46,0.36; [...]
-20	22806326	rs11468890	ATTCCATCAC	A	105320.99	PASS	AC=567;AF=0.48795;AN=1162;BVAR;BaseQRankSum=32.858;DB;DEL;DP=26278;DP4=727,796,554,587;Dels=0.30;FQ=999;FR;FS=1.923;HP=3;HPLen=3;HR=2;HRun=0;HU=T;INDEL;InbreedingCoeff=0.2548;IndelType=DEL.NumRepetitions_2.EventLength_9.;LEN=9;MQ=89.42;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-23.545;NF;NR;PP;PV4=0.7,1,1.3e-167,1;RUN=1;ReadPosRankSum=4.384;SC=GGCTGCTCCCATTCCATCACT;TC;TR=2;TU=T;VQSLOD=8.2594;set=Intersection;sumGLbyD=69.81
-20	22999898	rs55966257	CAGGA	C	8019.97	PASS	AA=23;AB=0.57778;ABA=19;ABP=5.3748;ABR=26;AC=214;AF=0.18838;AN=1136;BL=1143;BR=1040;BVAR;BaseQRankSum=29.294;DB;DEL;DP=8216;Dels=0.02;EL=11;EPP=3.1047;ER=12;FS=14.938;HETAR=14;HOMA=2;HOMR=948;HRun=0;InbreedingCoeff=0.0797;IndelType=DEL.NumRepetitions_1.EventLength_4.;LEN=4;LRB=0.047183;LRBP=13.563;MQ0=0;MQ0Fraction=0.0000;MQM=34.783;MQRankSum=-20.301;NS=964;RA=3637;RL=13;RPP=3.86;RR=10;RUN=1;ReadPosRankSum=-24.607;SAB=0.47826;SAF=11;SAP=3.1047; [...]
-20	23385964	rs57723772	GAA	G	8170.95	PASS	AC=257;AF=0.20928;AN=1228;BaseQRankSum=32.220;DB;DP=3291;FS=1.688;HRun=3;HaplotypeScore=22.6739;InbreedingCoeff=0.0171;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_A.;MQ=58.44;MQ0=32;MQ0Fraction=0.0097;MQRankSum=-4.893;QD=6.55;ReadPosRankSum=-35.524;SB=-3631.67;VQSLOD=5.6549;set=VQSR
-20	23534530	.	TA	T	3542.10	PASS	AA=45;AB=0.75658;ABA=37;ABP=89.926;ABR=115;AC=35;AF=0.02991;AN=1170;BL=3090;BR=270;BVAR;BaseQRankSum=-6.892;DEL;DP=8108;Dels=0.00;EL=19;EPP=5.3748;ER=26;FS=1.026;HETAR=76;HOMA=896;HOMR=18;HRun=1;InbreedingCoeff=0.0551;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.83929;LRBP=5142.4;MQ0Fraction=0.0017;MQM=41.578;MQRankSum=0.818;NS=991;RA=203;RL=43;RPP=84.127;RR=2;RUN=1;ReadPosRankSum=-12.923;SAB=0.37778;SAF=17;SAP=8.8491;SAR=28; [...]
-20	23976810	rs5841018	A	ATATTAAT	1782.38	PASS	AF=0.1387;AF1=0.01507;BaseQRankSum=3.717;CI95=0.00188,0.03947;DB;DP=1712;DP4=357,376,7,2;Dels=0.00;FQ=31.1;FS=14.489;HPLen=2;HRun=0;INDEL;InbreedingCoeff=0.1123;IndelType=INS.NumRepetitions_1.EventLength_7.;MQ=49.53;MQ0=2;MQ0Fraction=0.0055;MQRankSum=-4.928;PV4=0.1,1,0.00085,0.016;ReadPosRankSum=-4.456;VQSLOD=5.3140;dbSNP=116;set=Intersection;sumGLbyD=19.98
-20	24222100	.	CTTTTA	C	4219.36	PASS	AA=57;AB=0.59434;ABA=43;ABP=11.205;ABR=63;AF=0.01803;AF1=0.01547;AN=1220;BL=2073;BR=2345;BVAR;BaseQRankSum=7.990;CI95=0.0114,0.02137;DEL;DP=17536;DP4=2140,2346,7,12;Dels=0.01;EL=32;EPP=4.877;ER=25;FQ=104;FS=0.614;HETAR=21;HOMA=4;HOMR=1042;HRun=0;INDEL;InbreedingCoeff=0.1941;IndelType=DEL.NumRepetitions_2.EventLength_5.;LEN=5;LRB=0.061566;LRBP=39.374;MQ=73.32;MQ0Fraction=0.0021;MQM=39.614;MQRankSum=-5.728;NS=1067;PV4=0.37,1.1e-39,3.5e-09,1;RA=5527;RL=28 [...]
-20	24395018	.	AT	A	49310	PASS	AA=146;AB=0.91198;ABA=130;ABP=2180.5;ABR=1347;AC=50;AF=0.04045;AN=1236;BL=587;BR=9625;BVAR;BaseQRankSum=-4.610;DEL;DP=12793;Dels=0.01;EL=54;EPP=24.487;ER=92;FS=22.108;HETAR=485;HOMA=384;HOMR=210;HRun=2;InbreedingCoeff=0.0374;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.88504;LRBP=17373;MQ0=0;MQ0Fraction=0.0000;MQM=102.26;MQRankSum=2.256;NS=1080;RA=2377;RL=1;RPP=311.42;RR=145;RUN=1;ReadPosRankSum=-16.347;SAB=0.63699;SAF=93;SAP=2 [...]
-20	24411517	.	C	CA	246.18	PASS	AF=0.01546;AF1=0.01095;BaseQRankSum=7.832;CI95=0.005698,0.01709;DP=7981;DP4=983,2037,7,7;Dels=0.00;FQ=27.9;FS=18.815;HPLen=3;HRun=3;INDEL;InbreedingCoeff=0.0175;IndelType=INS.NumRepetitions_3.EventLength_1.RepeatExpansion_A.;MQ=60.28;MQ0Fraction=0.0137;MQRankSum=-7.243;PV4=0.25,1,2.7e-05,1;ReadPosRankSum=-0.143;VQSLOD=4.3701;set=Intersection;sumGLbyD=6.56
-20	24421169	.	AG	A	27480	PASS	AA=182;AB=0.8303;ABA=149;ABP=835;ABR=729;AC=89;AF=0.07224;AN=1232;BL=11276;BR=2214;BVAR;BaseQRankSum=-5.447;DEL;DP=11717;Dels=0.01;EL=103;EPP=9.8827;ER=79;FR;FS=15.492;HETAR=343;HOMA=607;HOMR=114;HP=4;HR=1;HRun=1;HU=G;InbreedingCoeff=0.0353;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.67176;LRBP=13222;MQ0=0;MQ0Fraction=0.0000;MQM=88.324;MQRankSum=2.221;NF;NR;NS=1071;PP;RA=1226;RL=169;RPP=293.37;RR=13;RUN=1;ReadPosRankSum=-19.71 [...]
-20	24765537	rs71841337	ATTT	A,AT,ATT,ATTTT,ATTTTT	37852	PASS	AC=13,120,527,51,92;AF=0.01102,0.10169,0.44661,0.04322,0.07797;AN=1180;BVAR;BaseQRankSum=8.172;DB;DEL;DP=39116;DP4=200,331,851,1169;FR;FS=2.394;HP=15;HR=15;HU=T;HaplotypeScore=20.8091;INDEL;INS;InbreedingCoeff=0.4815;IndelType=MULTIALLELIC_INDEL;MQ0=1;MQ0Fraction=0.0003;MQRankSum=4.344;NF;NR;PP;PV4=0.067,1,1,0.1;QD=7.90;RUN=1;ReadPosRankSum=1.798;SB=-8371.96;SC=CTCTGCAACAATTTTTTTTTT;TC;TR=15;TU=T;VQSLOD=9.9679;dbSNP=120;set=Int [...]
-20	25500689	.	A	AATTT	84980.72	PASS	AC=1005;AF=0.89096;AN=1128;BaseQRankSum=17.400;DP=2324;FS=6.721;HRun=0;HaplotypeScore=25.3376;InbreedingCoeff=0.2148;IndelType=INS.NumRepetitions_1.EventLength_4.;MQ=75.19;MQ0=1;MQ0Fraction=0.0004;MQRankSum=-8.221;QD=38.28;ReadPosRankSum=4.504;SB=-34833.07;VQSLOD=4.6038;set=VQSR
-20	25550373	.	GA	G	11251.31	PASS	AA=246;AB=0.42963;ABA=154;ABP=14.624;ABR=116;AC=566;AF=0.6521;AN=868;BL=5230;BR=11845;BVAR;BaseQRankSum=7.418;DEL;DP=8885;Dels=0.02;EL=99;EPP=23.348;ER=147;FR;FS=50.357;HETAR=150;HOMA=849;HOMR=14;HP=1;HR=2;HRun=1;HU=G;InbreedingCoeff=0.1365;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.38741;LRBP=5567.9;MQ0=0;MQ0Fraction=0.0000;MQM=97.561;MQRankSum=0.050;NF;NR;NS=1013;PP;RA=269;RL=75;RPP=84.361;RR=171;RUN=1;ReadPosRankSum=-7. [...]
-20	25903865	.	TTC	T	7459.23	PASS	AC=277;AF=0.23316;AN=1188;BaseQRankSum=31.479;DP=2969;FS=137.723;HRun=0;HaplotypeScore=37.3300;InbreedingCoeff=-0.1755;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_TC.;MQ=53.49;MQ0=50;MQ0Fraction=0.0168;MQRankSum=-25.506;QD=4.70;ReadPosRankSum=-5.913;SB=-1747.98;VQSLOD=5.4731;set=VQSR
-20	25934237	.	C	CCACTT	771.36	PASS	AC=37;AF=0.0426;AN=868;BaseQRankSum=16.331;DP=2253;FS=4.545;HRun=0;HaplotypeScore=29.9764;InbreedingCoeff=-0.0685;IndelType=INS.NOVEL_5.;MQ=48.12;MQ0=87;MQ0Fraction=0.0386;MQRankSum=-12.497;QD=3.37;ReadPosRankSum=-8.428;SB=-297.70;VQSLOD=4.2324;set=VQSR
-20	26054751	rs112967123	TATC	T	33244	PASS	AA=1863;AB=0.79012;ABA=1788;ABP=6231;ABR=6731;AC=227;AF=0.18218;AN=1246;BL=74924;BR=72452;BVAR;BaseQRankSum=32.258;DB;DEL;DP=36404;DS;Dels=0.05;EL=931;EPP=3.0115;ER=932;FR;FS=265.752;HETAR=527;HOMA=2;HOMR=565;HP=1;HR=2;HRun=0;HU=T;InbreedingCoeff=-0.2137;IndelType=DEL.NumRepetitions_2.EventLength_3.;LEN=3;LRB=0.016773;LRBP=93.048;MQ0Fraction=0.0127;MQM=28.797;MQRankSum=-5.329;NF;NR;NS=1094;PP;RA=14604;RL=1014;RPP=34.743;RR=849;RUN=1;ReadPosRankSu [...]
-20	26120452	.	CAG	C	7863.19	PASS	AA=163;AB=0.70489;ABA=157;ABP=196.99;ABR=375;AC=171;AF=0.1908;AN=896;BL=3455;BR=4877;BVAR;BaseQRankSum=25.536;DEL;DP=7014;Dels=0.10;EL=58;EPP=32.438;ER=105;FS=231.723;HETAR=90;HOMA=5;HOMR=387;HRun=0;InbreedingCoeff=-0.1966;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_AG.;LEN=2;LRB=0.17067;LRBP=530;MQ0Fraction=0.0470;MQM=21.951;MQRankSum=-23.449;NS=482;RA=1117;RL=62;RPP=23.273;RR=101;RUN=1;ReadPosRankSum=1.904;SAB=0.37423;SAF=61;SAP=25.404; [...]
-20	26185812	.	AG	A	322.58	PASS	AF=0.0342;BaseQRankSum=3.668;DP=3014;Dels=0.01;FR;FS=10.238;HP=8;HPLen=6;HR=6;HRun=6;HU=G;InbreedingCoeff=0.1504;IndelType=DEL.NumRepetitions_6.EventLength_1.RepeatExpansion_G.;MQ0Fraction=0.0473;MQRankSum=-5.464;NF;NR;PP;ReadPosRankSum=0.536;SC=GGGTGGGTGGAGGGGGGAGGG;TC;TR=6;TU=G;VQSLOD=5.0767;set=Intersection;sumGLbyD=8.46
-20	30963468	.	AGTTT	A	2041.12	PASS	AA=38;AB=0.75694;ABA=35;ABP=85.587;ABR=109;AC=34;AF=0.0377;AN=902;BL=1974;BR=668;BVAR;BaseQRankSum=3.060;DEL;DP=22806;DP4=1997,1747,28,36;Dels=0.02;EL=17;EPP=3.9246;ER=21;FR;FS=16.034;HETAR=29;HOMA=1;HOMR=1009;HP=1;HPLen=1;HR=1;HRun=0;HU=G;INDEL;InbreedingCoeff=0.0752;IndelType=DEL.NumRepetitions_2.EventLength_4.;LEN=4;LRB=0.49432;LRBP=1404.9;MQ=87.17;MQ0Fraction=0.0013;MQM=98.079;MQRankSum=6.021;NF;NR;NS=1039;PP;PV4=0.13,1.5e-07,1,0.051;RA=4052;RL=36;R [...]
-20	31963212	.	AAAAAAAAAAAAG	A	727.15	PASS	AC=5;AF=0.0080;AN=622;BaseQRankSum=4.037;DP=1480;FS=0.000;HRun=0;HaplotypeScore=43.3793;InbreedingCoeff=0.0350;IndelType=DEL.NumRepetitions_1.EventLength_10orMore.;MQ=51.77;MQ0=59;MQ0Fraction=0.0399;MQRankSum=-1.799;QD=22.72;ReadPosRankSum=3.591;SB=-364.04;VQSLOD=5.3166;set=VQSR
-20	31997272	.	CT	C,CTT,CTTT	1837.10	PASS	AA=63;AB=0.77559;ABA=57;ABP=170.57;ABR=197;AC=79,49,30;AF=0.06594,0.04090,0.02504;AN=1198;BL=2372;BR=2640;BVAR;BaseQRankSum=3.277;DP=9050;Dels=0.03;EL=24;EPP=10.766;ER=39;FR;FS=0.303;HETAR=45;HOMA=1;HOMR=981;HP=10;HPLen=10;HR=10;HRun=10;HU=T;INS;InbreedingCoeff=0.2796;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.053472;LRBP=34.128;MQ0Fraction=0.0000;MQM=50.889;MQRankSum=0.610;NF;NR;NS=1027;PP;RA=3776;RL=30;RPP=3.3205;RR=33;RUN=1;ReadPosRankSum=-0.800; [...]
-20	33446974	rs113250263	TAA	T,TA,TAAA	17130.16	PASS	AC=65,417,184;AF=0.05941,0.38117,0.16819;AN=1094;BVAR;BaseQRankSum=3.400;DB;DEL;DP=22362;DP4=221,247,418,524;Dels=0.33;FR;FS=15.409;HP=15;HR=14;HRun=14;HU=A;INDEL;INS;InbreedingCoeff=0.5215;IndelType=MULTIALLELIC_INDEL;MQ=61.32;MQ0Fraction=0.0021;MQRankSum=0.481;NF;NR;PP;PV4=0.33,1,1,1;RUN=1;ReadPosRankSum=-0.056;SC=CTCCGTCTCATAAAAAAAAAA;TC;TR=14;TU=A;VQSLOD=8.0974;dbSNP=132;set=Intersection;sumGLbyD=12.78
-20	33877149	.	C	CT	1784.40	PASS	AA=58;AB=0.73096;ABA=53;ABP=94.289;ABR=144;AC=65;AF=0.05682;AN=1144;BL=3298;BR=1935;BVAR;BaseQRankSum=-2.066;DP=8074;Dels=0.02;EL=22;EPP=10.348;ER=36;FR;FS=11.452;HETAR=47;HOMA=3;HOMR=754;HP=16;HR=12;HRun=12;HU=T;INS;InbreedingCoeff=0.1178;IndelType=INS.NumRepetitions_10orMore.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.26046;LRBP=773.91;MQ0Fraction=0.0165;MQM=52.259;MQRankSum=0.734;NF;NR;NS=804;PP;RA=2141;RL=43;RPP=32.363;RR=15;RUN=1;ReadPosRankSum=-1.27 [...]
-20	34387589	rs112431805	CT	C,CTT	4039.10	PASS	AA=121;AB=0.75368;ABA=117;ABP=268.53;ABR=358;AC=84,139;AF=0.07047,0.11661;AN=1192;BL=5557;BR=3901;BVAR;BaseQRankSum=2.693;DB;DP=10157;Dels=0.03;EL=47;EPP=16.093;ER=74;FR;FS=7.639;HETAR=89;HOMA=2;HOMR=913;HP=13;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.2097;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.17509;LRBP=632.63;MQ0Fraction=0.0000;MQM=49.802;MQRankSum=-0.801;NF;NR;NS=1004;PP;RA=3789;RL=77;RPP=22.554;RR=44;RUN=1;ReadPosRankSum=-2.691;SAB=0.37 [...]
-20	34493409	rs73621682	C	CAG	62288.93	PASS	AA=1069;AB=0.54863;ABA=826;ABP=40.606;ABR=1004;AC=257;AF=0.3640;AN=706;BL=41524;BR=47039;BVAR;BaseQRankSum=-24.248;DB;DP=30195;DP4=1743,1636,614,487;Dels=0.00;EL=582;EPP=21.343;ER=487;FQ=999;FR;FS=5.080;HETAR=298;HOMA=63;HOMR=712;HP=1;HPLen=1;HR=1;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.1437;IndelType=INS.NumRepetitions_2.EventLength_2.RepeatExpansion_AG.;LEN=2;LRB=0.062272;LRBP=748.76;MQ=77.99;MQ0=3;MQ0Fraction=0.0015;MQM=54.446;MQRankSum=0.160 [...]
-20	35957317	.	CTGACT	C,CGACT	4370.96	PASS	ABR=81;AC=22,1;AF=0.0321,0.0015;AF1=0.04523;AN=686;BVAR;BaseQRankSum=7.969;CI95=0.0354,0.05752;DEL;DP=16632;DP4=1942,1815,17,21;Dels=0.03;FQ=999;FR;FS=0.531;HOMA=1;HOMR=998;HP=2;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0587;IndelType=MULTIALLELIC_INDEL;MQ=83.38;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-7.201;NF;NR;NS=1020;PP;PV4=0.42,0.00017,4.5e-12,1;RA=4620;RUN=1;ReadPosRankSum=-1.007;SC=CCTCTCAGCTCTGACTGAGTC;SRB=0.50043;SRF=2312;SRP=3.0178;S [...]
-20	36136198	.	GTGTC	G	2078.76	PASS	AA=35;AB=0.54167;ABA=33;ABP=4.096;ABR=39;AC=17;AF=0.01384;AN=1228;BL=1212;BR=1523;BVAR;BaseQRankSum=6.900;DEL;DP=22483;DP4=1696,2291,9,16;Dels=0.01;EL=9;EPP=20.94;ER=26;FQ=999;FR;FS=3.023;HETAR=13;HOMA=1;HOMR=1061;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1113;IndelType=DEL.NumRepetitions_2.EventLength_4.;LEN=4;LRB=0.11371;LRBP=79.803;MQ=93.98;MQ0=1;MQ0Fraction=0.0003;MQM=83.686;MQRankSum=-1.683;NF;NR;NS=1075;PP;PV4=0.55,1,0.0083,1;RA=5771;R [...]
-20	36250522	.	CA	C	37933	PASS	AA=51;AB=0.95582;ABA=44;ABP=1800.5;ABR=952;AC=23;AF=0.01885;AN=1220;BL=691;BR=3464;BVAR;BaseQRankSum=-2.418;DEL;DP=11998;Dels=0.00;EL=18;EPP=12.59;ER=33;FS=2.307;HETAR=348;HOMA=534;HOMR=164;HRun=1;InbreedingCoeff=0.0763;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.66739;LRBP=4021.7;MQ0=2;MQ0Fraction=0.0006;MQM=53.647;MQRankSum=1.083;NS=1047;RA=1663;RL=2;RPP=97.065;RR=49;RUN=1;ReadPosRankSum=-12.726;SAB=0.68627;SAF=35;SAP=18.381 [...]
-20	36285033	rs34715186	AT	A	39417	PASS	AA=530;AB=0.5406;ABA=447;ABP=16.939;ABR=526;AC=88;AF=0.0950;AN=926;BL=20722;BR=20406;BVAR;BaseQRankSum=15.611;DB;DEL;DP=36713;DP4=2551,2475,236,218;Dels=0.09;EL=241;EPP=12.45;ER=289;FQ=999;FR;FS=1.290;HETAR=141;HOMA=16;HOMR=926;HP=2;HPLen=3;HR=3;HRun=1;HU=A;INDEL;InbreedingCoeff=0.0742;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.0076833;LRBP=8.2825;MQ=104.81;MQ0=0;MQ0Fraction=0.0000;MQM=84.285;MQRankSum=-0.702;NF;NR;N [...]
-20	36384872	.	CTG	C	43532.41	PASS	AC=1213;AF=0.99589;AN=1218;BaseQRankSum=0.802;DP=3208;FS=9.727;HRun=0;HaplotypeScore=46.6153;InbreedingCoeff=0.1085;IndelType=DEL.NumRepetitions_7.EventLength_2.RepeatExpansion_TG.;MQ=58.37;MQ0=50;MQ0Fraction=0.0156;MQRankSum=-1.672;QD=13.57;ReadPosRankSum=2.063;SB=-18894.12;VQSLOD=4.7353;set=VQSR
-20	36542802	.	GTA	G	31310.15	PASS	AA=1481;AB=0.67546;ABA=1378;ABP=1138.4;ABR=2868;AC=437;AF=0.35938;AN=1216;BL=25719;BR=95500;BVAR;BaseQRankSum=9.478;DEL;DP=18068;DS;Dels=0.10;EL=889;EPP=132.34;ER=592;FS=320.726;HETAR=591;HOMA=44;HOMR=378;HRun=0;InbreedingCoeff=-0.4197;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_TA.;LEN=2;LRB=0.57566;LRBP=87231;MQ0Fraction=0.0091;MQM=29.319;MQRankSum=-3.409;NS=1013;RA=4037;RL=3;RPP=3193;RR=1478;RUN=1;ReadPosRankSum=-6.687;SAB=0.40041;SAF [...]
-20	36985025	.	CCA	C	4.57	PASS	AC=0;AF=0.0000;AN=682;BaseQRankSum=4.199;DP=1504;FS=1.036;HRun=0;HaplotypeScore=18.5241;InbreedingCoeff=0.0460;IndelType=DEL.NumRepetitions_6.EventLength_2.RepeatExpansion_CA.;MQ=57.04;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.774;ReadPosRankSum=-2.105;VQSLOD=6.7455;set=VQSR
-20	37139725	.	CAG	C	250.77	PASS	AF=0.0084;AF1=0.0139;BaseQRankSum=4.131;CI95=0.00885,0.01991;DP=7973;DP4=1808,1990,2,7;Dels=0.01;FQ=104;FR;FS=11.160;HP=3;HPLen=2;HR=1;HRun=0;HU=A;INDEL;InbreedingCoeff=-0.0001;IndelType=DEL.NumRepetitions_3.EventLength_2.RepeatExpansion_AG.;MQ=103.71;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-3.378;NF;NR;PP;PV4=0.18,0.0011,0.041,1;ReadPosRankSum=0.605;SC=AGATGGGGAACAGAGAGCAAG;TC;TR=6;TU=AG;VQSLOD=7.0630;set=Intersection;sumGLbyD=12.13
-20	37213224	.	G	GTA	3230.05	PASS	AA=32;AB=0.50769;ABA=32;ABP=3.0437;ABR=33;AC=12;AF=0.0168;AF1=0.02635;AN=714;BL=1271;BR=1743;BVAR;BaseQRankSum=-7.288;CI95=0.02212,0.03319;DP=14304;DP4=2180,2256,13,21;Dels=0.00;EL=20;EPP=7.3532;ER=12;FQ=999;FR;FS=7.863;HETAR=9;HOMA=0;HOMR=1043;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0410;IndelType=INS.NumRepetitions_1.EventLength_2.RepeatExpansion_TA.;LEN=2;LRB=0.1566;LRBP=163.52;MQ=95.56;MQ0=1;MQ0Fraction=0.0005;MQM=51.562;MQRankSum=0. [...]
-20	37282014	.	ATGG	A	2518.52	PASS	AF=0.03519;BaseQRankSum=11.994;DP=24592;DP4=415,3804,8,49;DS;Dels=0.01;FQ=999;FR;FS=2.049;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1028;IndelType=DEL.NumRepetitions_5.EventLength_3.;MQ=51.01;MQ0Fraction=0.0139;MQRankSum=-5.912;NF;NR;PP;PV4=0.27,1,0.22,0.015;ReadPosRankSum=1.781;SC=GGTGGTGATGATGGTGGTGGT;TC;TR=17;TU=GGT;VQSLOD=2.1183;set=filterInVQSR-2of5;sumGLbyD=9.05
-20	37532218	.	GTCCGTCCA	ATCCGTCCA,G	76120.88	PASS	AC=998;AF=0.92924;AN=1074;BaseQRankSum=-2.877;DP=3087;FR;FS=9.889;HP=2;HPLen=2;HR=1;HRun=0;HU=T;HaplotypeScore=71.6244;InbreedingCoeff=-0.0027;IndelType=MIXED;MQ=52.68;MQ0=543;MQ0Fraction=0.1759;MQRankSum=-1.750;NF;NR;PP;QD=24.98;ReadPosRankSum=-0.850;SB=-36635.43;SC=CCGTCCGTCCGTCCGTCCATC;TC;TR=19;TU=CCGT;VQSLOD=5.3068;set=Intersection
-20	37712193	.	AAG	A	2670.33	PASS	AA=106;AB=0.62821;ABA=87;ABP=36.418;ABR=147;AC=53;AF=0.0759;AN=698;BL=4672;BR=4303;BVAR;BaseQRankSum=13.696;DEL;DP=15155;DP4=1340,1852,32,52;Dels=0.06;EL=57;EPP=4.3214;ER=49;FR;FS=0.824;HETAR=43;HOMA=7;HOMR=982;HP=1;HPLen=2;HR=2;HRun=0;HU=A;INDEL;InbreedingCoeff=0.0861;IndelType=DEL.NumRepetitions_3.EventLength_2.RepeatExpansion_AG.;LEN=2;LRB=0.041114;LRBP=35.954;MQ=86.12;MQ0=0;MQ0Fraction=0.0000;MQM=54.236;MQRankSum=-5.745;NF;NR;NS=1034;PP;PV4=0.5,7.3e-2 [...]
-20	37739002	.	T	TCA	1395.38	PASS	AA=16;AB=0.48387;ABA=16;ABP=3.0803;ABR=15;AC=11;AF=0.00950;AN=1158;BL=504;BR=630;BVAR;BaseQRankSum=-3.257;DP=13617;DP4=1660,883,7,5;Dels=0.00;EL=7;EPP=3.5532;ER=9;FR;FS=1.114;HETAR=9;HOMA=0;HOMR=991;HP=1;HPLen=2;HR=2;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0527;IndelType=INS.NumRepetitions_1.EventLength_2.RepeatExpansion_CA.;LEN=2;LRB=0.11111;LRBP=33.411;MQ=88.41;MQ0=0;MQ0Fraction=0.0000;MQM=83.75;MQRankSum=1.713;NF;NR;NS=1000;PP;PV4=0.76,1,1,0.5;RA=3257; [...]
-20	38395256	.	TTGAG	T	633.19	PASS	AF=0.0028;BaseQRankSum=5.667;DP=3839;Dels=0.00;FR;FS=10.238;HP=2;HPLen=3;HR=3;HRun=0;HU=T;InbreedingCoeff=-0.0097;IndelType=DEL.NumRepetitions_1.EventLength_4.;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.276;NF;NR;PP;ReadPosRankSum=-1.016;SC=ATGTGTTTGTTTGAGTATGTT;TC;TR=10;TU=GTTT;VQSLOD=6.4906;set=Intersection;sumGLbyD=10.83
-20	39345038	.	CTGAACCATAATGTG	C,CCCATAATGTG	60744.52	PASS	AA=23;AB=0.67143;ABA=23;ABP=20.878;ABR=47;AC=232,2;AF=0.19366,0.00167;AN=1198;BL=1607;BR=1843;BVAR;BaseQRankSum=30.955;DEL;DP=31490;DP4=1729,2100,265,278;Dels=0.13;EL=6;EPP=14.434;ER=17;FQ=999;FR;FS=1.767;HETAR=18;HOMA=0;HOMR=1015;HP=1;HPLen=2;HR=2;HRun=0;HU=C;INDEL;InbreedingCoeff=0.1991;IndelType=MULTIALLELIC_INDEL;LEN=14;LRB=0.068406;LRBP=38.066;MQ=104.60;MQ0=0;MQ0Fraction=0.0000;MQM=189.83;MQRankSum=-16.579;NF;NR;NS=1033;PP;PV [...]
-20	39418008	.	AG	A	46796	PASS	AA=113;AB=0.9511;ABA=80;ABP=2894.6;ABR=1556;AC=30;AF=0.02412;AN=1244;BL=638;BR=6936;BVAR;BaseQRankSum=7.280;DEL;DP=14307;Dels=0.00;EL=50;EPP=6.2579;ER=63;FR;FS=5.707;HETAR=473;HOMA=361;HOMR=246;HP=3;HR=3;HRun=3;HU=G;InbreedingCoeff=0.0272;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.83153;LRBP=11375;MQ0=0;MQ0Fraction=0.0000;MQM=62.398;MQRankSum=3.530;NF;NR;NS=1089;PP;RA=3000;RL=3;RPP=223.02;RR=110;RUN=1;ReadPosRankSum=-18.601;S [...]
-20	39876961	.	GT	G,GTT,GTTT	2302.10	PASS	ABR=496;AC=45,51,45;AF=0.03664,0.04153,0.03664;AN=1228;BVAR;BaseQRankSum=4.462;DP=37649;DP4=1457,1975,57,59;Dels=0.02;FR;FS=9.938;HOMA=0;HOMR=978;HP=10;HPLen=10;HR=10;HRun=10;HU=T;INDEL;INS;InbreedingCoeff=0.2583;IndelType=MULTIALLELIC_INDEL;MQ=97.28;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.246;NF;NR;NS=1063;PP;PV4=0.15,1,1.9e-09,0.016;RA=5185;RUN=1;ReadPosRankSum=-4.954;SC=AGTTTCTCCGGTTTTTTTTTT;SRB=0.47464;SRF=2461;SRP=31.978;SRR=2724;TC;TR=10;TU=T;V [...]
-20	41013333	.	TC	T	20681	PASS	AA=137;AB=0.89211;ABA=134;ABP=1661.6;ABR=1108;AC=68;AF=0.05601;AN=1214;BL=1091;BR=8981;BVAR;BaseQRankSum=1.354;DEL;DP=12998;Dels=0.01;EL=57;EPP=11.395;ER=80;FS=0.758;HETAR=359;HOMA=100;HOMR=610;HRun=1;InbreedingCoeff=0.0104;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.78336;LRBP=13424;MQ0=1;MQ0Fraction=0.0003;MQM=67.745;MQRankSum=2.563;NS=1072;RA=4447;RL=5;RPP=258.66;RR=132;RUN=1;ReadPosRankSum=-14.092;SAB=0.59124;SAF=81;SAP=12 [...]
-20	41659532	.	GC	G	40544	PASS	AA=42;AB=0.97149;ABA=39;ABP=2644.5;ABR=1329;AC=15;AF=0.0209;AN=716;BL=2531;BR=135;BVAR;BaseQRankSum=-2.537;DEL;DP=12219;Dels=0.00;EL=25;EPP=6.3192;ER=17;FS=2.656;HETAR=374;HOMA=155;HOMR=551;HRun=1;InbreedingCoeff=-0.0270;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.89872;LRBP=4678.9;MQ0=0;MQ0Fraction=0.0000;MQM=103.31;MQRankSum=2.828;NS=1088;RA=4736;RL=41;RPP=85.733;RR=1;RUN=1;ReadPosRankSum=-9.702;SAB=0.57143;SAF=24;SAP=4.8716 [...]
-20	41845580	.	GA	G	49310	PASS	AA=83;AB=0.95258;ABA=69;ABP=2591.6;ABR=1386;AC=46;AF=0.03740;AN=1230;BL=1320;BR=5150;BVAR;BaseQRankSum=-1.121;DEL;DP=13336;Dels=0.00;EL=36;EPP=6.1759;ER=47;FR;FS=0.372;HETAR=442;HOMA=341;HOMR=295;HP=2;HR=3;HRun=1;HU=G;InbreedingCoeff=0.0238;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.59196;LRBP=4926.2;MQ0=0;MQ0Fraction=0.0000;MQM=89.048;MQRankSum=0.897;NF;NR;NS=1080;PP;RA=3006;RL=5;RPP=142.43;RR=78;RUN=1;ReadPosRankSum=-15.412 [...]
-20	42209428	.	GC	G	13163	PASS	AA=89;AB=0.86677;ABA=83;ABP=730.96;ABR=540;AC=39;AF=0.03218;AN=1212;BL=950;BR=5334;BVAR;BaseQRankSum=-10.119;DEL;DP=10692;Dels=0.01;EL=48;EPP=4.2058;ER=41;FS=0.000;HETAR=259;HOMA=727;HOMR=54;HRun=1;InbreedingCoeff=0.0448;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.69764;LRBP=6644.4;MQ0=0;MQ0Fraction=0.0000;MQM=126.55;MQRankSum=4.223;NS=1040;RA=723;RL=12;RPP=106.09;RR=77;RUN=1;ReadPosRankSum=-17.362;SAB=0.39326;SAF=35;SAP=11.81 [...]
-20	42281109	.	T	TAG	2321.12	PASS	AC=181;AF=0.3740;AN=484;BaseQRankSum=8.977;DP=435;FS=17.001;HRun=0;HaplotypeScore=14.6734;InbreedingCoeff=0.2340;IndelType=INS.NOVEL_2.;MQ=53.88;MQ0=47;MQ0Fraction=0.1080;MQRankSum=0.762;QD=12.41;ReadPosRankSum=3.399;SB=-1299.73;VQSLOD=4.8926;set=VQSR
-20	42436117	.	TC	T	38933	PASS	AA=18;AB=0.98435;ABA=17;ABP=2215.9;ABR=1069;AC=15;AF=0.01223;AN=1226;BL=498;BR=428;BVAR;BaseQRankSum=-7.224;DEL;DP=12436;Dels=0.00;EL=1;EPP=33.893;ER=17;FS=2.469;HETAR=303;HOMA=614;HOMR=123;HRun=1;InbreedingCoeff=0.0439;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.075594;LRBP=14.501;MQ0=0;MQ0Fraction=0.0000;MQM=98.611;MQRankSum=1.086;NS=1075;RA=1656;RL=10;RPP=3.4928;RR=8;RUN=1;ReadPosRankSum=-17.765;SAB=0.5;SAF=9;SAP=3.0103;SAR [...]
-20	42682214	.	C	A,CAT	3904.51	PASS	AA=24;AB=0.6383;ABA=17;ABP=10.818;ABR=30;AC=0;AF=0.0000;AN=636;BL=1119;BR=949;BVAR;BaseQRankSum=1.426;DP=6509;Dels=0.00;EL=9;EPP=6.2675;ER=15;FR;HETAR=12;HOMA=3;HOMR=876;HP=2;HPLen=1;HR=1;HRun=0;HU=A;INS;InbreedingCoeff=0.0006;IndelType=MIXED;LEN=2;LRB=0.082205;LRBP=33.356;MQ0Fraction=0.0046;MQM=40.792;MQRankSum=-0.296;NF;NR;NS=891;PP;QD=32.81;RA=2679;RL=15;RPP=6.2675;RR=9;RUN=1;ReadPosRankSum=-1.806;SAB=0.75;SAF=18;SAP=16.039;SAR=6;SB=-924.23;SC=TATACA [...]
-20	42973456	.	CA	C,CAA,CAAA	2675	PASS	AA=90;AB=0.79177;ABA=86;ABP=308.39;ABR=327;AC=77,61,39;AF=0.06492,0.05143,0.03288;AN=1186;BL=2983;BR=4446;BVAR;BaseQRankSum=2.422;DP=9416;Dels=0.03;EL=39;EPP=6.4847;ER=51;FR;FS=31.555;HETAR=75;HOMA=1;HOMR=888;HP=11;HR=11;HRun=11;HU=A;INS;InbreedingCoeff=0.2696;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.19693;LRBP=628.63;MQ0=0;MQ0Fraction=0.0000;MQM=55.567;MQRankSum=1.777;NF;NR;NS=964;PP;RA=3601;RL=37;RPP=9.1869;RR=53;RUN=1;ReadPosRankSum=-4.991;SAB=0.5 [...]
-20	43091870	.	TC	T	2455.60	PASS	AA=120;AB=0.10619;ABA=101;ABP=155.22;ABR=12;AC=42;AF=0.03825;AN=1098;BL=573;BR=8744;BVAR;BaseQRankSum=-13.513;DEL;DP=9139;Dels=0.00;EL=64;EPP=4.1684;ER=56;FS=9.856;HETAR=118;HOMA=820;HOMR=0;HRun=1;InbreedingCoeff=0.0833;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.877;LRBP=15564;MQ0Fraction=0.0017;MQM=45.1;MQRankSum=2.266;NS=938;RA=24;RL=1;RPP=254.97;RR=119;RUN=1;ReadPosRankSum=-15.803;SAB=0.475;SAF=57;SAP=3.6617;SAR=63;SRB=0 [...]
-20	43233648	rs74585029	GA	G,GAA	1504.40	PASS	AA=113;AB=0.78652;ABA=95;ABP=320.31;ABR=350;AC=41,65;AF=0.03394,0.05381;AF1=0.0115;AN=1208;BL=4677;BR=5548;BVAR;BaseQRankSum=6.744;CI95=0.004274,0.01852;DB;DEL;DP=13996;DP4=1736,1549,15,17;Dels=0.03;EL=69;EPP=15.021;ER=44;FQ=14;FR;FS=12.174;HETAR=119;HOMA=15;HOMR=892;HP=11;HPLen=10;HR=10;HRun=10;HU=A;INDEL;InbreedingCoeff=0.2359;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.085183;LRBP=164.12;MQ=89.12;MQ0Fraction=0.0000;MQM=69.867;MQRankSum=2.513;N [...]
-20	43246548	.	AC	A,CC	41579.13	PASS	AA=382;AB=0.72402;ABA=316;ABP=502.11;ABR=829;AC=1197;AF=0.99254;AN=1206;BL=9889;BR=14293;BVAR;BaseQRankSum=1.373;DEL;DP=10477;DS;Dels=0.05;EL=243;EPP=64.494;ER=139;FS=29.162;HETAR=291;HOMA=85;HOMR=624;HPLen=10;InbreedingCoeff=0.1392;IndelType=MIXED;LEN=1;LRB=0.18212;LRBP=1744.6;MQ0Fraction=0.0024;MQM=48.471;MQRankSum=5.726;NS=1001;RA=3138;RL=174;RPP=9.5816;RR=208;RUN=1;ReadPosRankSum=5.755;SAB=0.79843;SAF=305;SAP=298.51;SAR=77;SRB=0.70363;SRF=2208;SRP= [...]
-20	43258646	.	T	TT	1107.17	PASS	AC=97;AF=0.08420;AN=1152;BaseQRankSum=4.525;DP=2345;FS=19.308;HRun=9;HaplotypeScore=13.6276;InbreedingCoeff=0.1299;IndelType=INS.NumRepetitions_10orMore.EventLength_1.RepeatExpansion_T.;MQ=76.70;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.395;QD=2.67;ReadPosRankSum=-4.696;SB=-899.41;VQSLOD=5.4523;set=VQSR
-20	43718299	.	ATTACT	A	5497.06	PASS	AA=56;AB=0.51818;ABA=53;ABP=3.3262;ABR=57;AC=18;AF=0.0251;AF1=0.03729;AN=718;BL=2321;BR=2591;BVAR;BaseQRankSum=11.142;CI95=0.03319,0.04425;DEL;DP=17576;DP4=2460,2692,31,22;Dels=0.02;EL=28;EPP=3.0103;ER=28;FQ=999;FR;FS=9.689;HETAR=15;HOMA=1;HOMR=1068;HP=2;HPLen=2;HR=2;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0448;IndelType=DEL.NumRepetitions_1.EventLength_5.;LEN=5;LRB=0.054967;LRBP=35.238;MQ=96.55;MQ0=0;MQ0Fraction=0.0000;MQM=50.286;MQRankSum=-5.149;NF;NR;NS [...]
-20	43981749	.	A	AAAAAAC,AC	20899.71	PASS	ABR=192;AC=91,0;AF=0.1285,0.0000;AN=708;BVAR;BaseQRankSum=7.858;DP=23372;DP4=1554,1457,55,42;Dels=0.00;FR;FS=0.000;HOMA=4;HOMR=995;HP=6;HPLen=7;HR=7;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.2109;IndelType=MULTIALLELIC_INDEL;MQ=95.59;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-12.081;NF;NR;NS=1051;PP;PV4=0.35,1,8.9e-73,1;RA=5027;RUN=1;ReadPosRankSum=-1.359;SC=TACACTAGCAAAAAAACAAAA;SRB=0.48518;SRF=2439;SRP=12.6;SRR=2588;TC;TR=7;TU=A;VQSLOD=8.0916;set=Interse [...]
-20	43999274	.	TCAAA	T	2948.85	PASS	AA=59;AB=0.59441;ABA=58;ABP=14.08;ABR=85;AC=20;AF=0.0290;AF1=0.04249;AN=690;BL=2277;BR=2436;BVAR;BaseQRankSum=9.320;CI95=0.0354,0.05088;DEL;DP=14599;DP4=2052,2303,21,22;Dels=0.03;EL=32;EPP=3.9304;ER=27;FQ=999;FR;FS=0.000;HETAR=21;HOMA=0;HOMR=1043;HP=2;HPLen=1;HR=1;HRun=0;HU=C;INDEL;InbreedingCoeff=-0.0037;IndelType=DEL.NumRepetitions_1.EventLength_4.;LEN=4;LRB=0.033736;LRBP=14.658;MQ=90.05;MQ0=0;MQ0Fraction=0.0000;MQM=75.339;MQRankSum=-1.294;NF;NR;NS=10 [...]
-20	44098622	.	C	CG	1092.40	PASS	AA=129;AB=0.77301;ABA=74;ABP=214.06;ABR=252;AC=45;AF=0.0455;AN=988;BL=6586;BR=3029;BVAR;BaseQRankSum=2.802;DP=5177;Dels=0.00;EL=122;EPP=225.63;ER=7;FR;FS=355.273;HETAR=66;HOMA=11;HOMR=734;HP=6;HR=4;HRun=4;HU=G;INS;InbreedingCoeff=0.1759;IndelType=INS.NumRepetitions_4.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.36994;LRBP=2860.4;MQ0=0;MQ0Fraction=0.0000;MQM=52.395;MQRankSum=1.946;NF;NR;NS=811;PP;RA=1981;RL=121;RPP=217.95;RR=8;RUN=1;ReadPosRankSum=-6.413;SA [...]
-20	44327637	.	A	AG,AGGGGGG	14351.23	PASS	AC=9,211;AF=0.0103,0.2409;AN=876;BaseQRankSum=15.517;DP=1704;FS=6.768;HaplotypeScore=31.5906;InbreedingCoeff=0.1538;IndelType=MULTIALLELIC_INDEL;MQ=54.64;MQ0=4;MQ0Fraction=0.0023;MQRankSum=-12.691;QD=20.83;ReadPosRankSum=-3.583;SB=-6278.99;VQSLOD=5.1556;set=VQSR
-20	45202636	.	GA	G	13269	PASS	AA=25;AB=0.96162;ABA=18;ABP=871.09;ABR=451;AC=24;AF=0.02013;AN=1192;BL=567;BR=1728;BVAR;BaseQRankSum=-5.361;DEL;DP=10873;Dels=0.00;EL=10;EPP=5.1818;ER=15;FS=0.928;HETAR=169;HOMA=831;HOMR=45;HRun=1;InbreedingCoeff=0.0999;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.50588;LRBP=1278.4;MQ0=0;MQ0Fraction=0.0000;MQM=170.56;MQRankSum=0.161;NS=1049;RA=632;RL=2;RPP=41.315;RR=23;RUN=1;ReadPosRankSum=-14.760;SAB=0.68;SAF=17;SAP=10.046;SAR [...]
-20	45417828	.	TGAGC	T,TGC	4672.90	PASS	ABR=317;AC=69,104;AF=0.05712,0.08609;BVAR;BaseQRankSum=18.527;DEL;DP=11835;DS;FS=184.873;HOMA=48;HOMR=575;HaplotypeScore=65.5875;InbreedingCoeff=0.0599;IndelType=MULTIALLELIC_INDEL;MQ=29.78;MQ0=2988;MQ0Fraction=0.3629;MQRankSum=5.052;NS=713;QD=1.11;RA=1581;RUN=1;ReadPosRankSum=6.574;SB=-2116.87;SRB=0.47502;SRF=751;SRP=11.582;SRR=830;VQSLOD=0.0651;set=filterInVQSR-2of5
-20	45525657	rs66759083	TA	AA,T	49315	PASS	AA=2361;AB=0.45241;ABA=1398;ABP=53.235;ABR=1155;AC=20;AF=0.01701;AN=1176;BL=94913;BR=100886;BVAR;BaseQRankSum=0.740;DB;DEL;DP=30636;DP4=1258,881,1206,999;Dels=0.48;EL=1133;EPP=11.311;ER=1228;FQ=999;FR;FS=7.072;HETAR=503;HOMA=310;HOMR=218;HP=6;HPLen=7;HR=7;HU=T;INDEL;InbreedingCoeff=0.2271;IndelType=MIXED;LEN=1;LRB=0.030506;LRBP=398.68;MQ=102.24;MQ0=0;MQ0Fraction=0.0000;MQM=75.359;MQRankSum=0.148;NF;NR;NS=1031;PP;PV4=0.0064,0,4.6e-23,0.47;RA=2042; [...]
-20	45783456	.	T	TG	2355.68	PASS	AA=64;AB=0.78521;ABA=61;ABP=203.67;ABR=223;AC=15;AF=0.0165;AN=910;BL=815;BR=5486;BVAR;BaseQRankSum=8.593;DP=10348;Dels=0.00;EL=48;EPP=37.754;ER=16;FS=77.861;HETAR=56;HOMA=1;HOMR=970;HRun=1;INS;InbreedingCoeff=-0.0549;IndelType=INS.NOVEL_1.Novel_G.;LEN=1;LRB=0.74131;LRBP=7522.1;MQ0Fraction=0.0122;MQM=44.562;MQRankSum=-1.258;NS=1027;RA=4750;RL=0;RPP=141.98;RR=64;RUN=1;ReadPosRankSum=-7.047;SAB=0.25;SAF=16;SAP=37.754;SAR=48;SRB=0.6;SRF=2850;SRP=415.59;SRR=190 [...]
-20	46517110	.	C	CT	868.55	PASS	AC=15;AF=0.0218;AN=688;BaseQRankSum=8.522;DP=1752;FS=6.570;HRun=0;HaplotypeScore=14.9548;InbreedingCoeff=0.0452;IndelType=INS.NOVEL_1.Novel_T.;MQ=77.73;MQ0=0;MQ0Fraction=0.0000;MQRankSum=3.874;QD=10.98;ReadPosRankSum=-0.733;SB=-396.78;VQSLOD=6.7740;set=VQSR
-20	46629361	.	TTTCTTTC	T,TTTTC	13000.91	PASS	AC=188,107;AF=0.2212,0.1259;AN=850;BaseQRankSum=7.214;DP=1846;FS=14.502;HaplotypeScore=40.8481;InbreedingCoeff=0.3210;IndelType=MULTIALLELIC_INDEL;MQ=50.74;MQ0=79;MQ0Fraction=0.0428;MQRankSum=-6.348;QD=13.59;ReadPosRankSum=3.943;SB=-3581.20;VQSLOD=5.9412;set=VQSR
-20	46951099	.	G	GT	1662.30	PASS	AA=55;AB=0.7713;ABA=51;ABP=145.58;ABR=172;AC=47;AF=0.03923;AN=1198;BL=3288;BR=2434;BVAR;BaseQRankSum=-4.014;DP=27423;DP4=1483,1590,58,42;Dels=0.01;EL=21;EPP=9.6826;ER=34;FR;FS=9.565;HETAR=48;HOMA=0;HOMR=913;HP=16;HPLen=10;HR=10;HRun=10;HU=T;INDEL;INS;InbreedingCoeff=0.0952;IndelType=INS.NumRepetitions_10orMore.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.14925;LRBP=279.78;MQ=70.36;MQ0Fraction=0.0124;MQM=52.545;MQRankSum=0.717;NF;NR;NS=961;PP;PV4=0.067,1,1, [...]
-20	47201076	rs58052846	C	CT	982.16	PASS	AC=50;AF=0.0551;AN=908;BaseQRankSum=12.598;DB;DP=2449;FS=35.648;HRun=0;HaplotypeScore=29.4602;InbreedingCoeff=-0.0542;IndelType=INS.NOVEL_1.Novel_T.;MQ=63.54;MQ0=0;MQ0Fraction=0.0000;MQRankSum=2.196;QD=3.16;ReadPosRankSum=-13.833;SB=-488.19;VQSLOD=6.0429;set=VQSR
-20	47965974	rs60011158	G	GA	999	PASS	AA=21;AB=0.57143;ABA=21;ABP=5.1818;ABR=28;AC=7;AF=0.0101;AF1=0.02061;AN=690;BL=1043;BR=577;BVAR;BaseQRankSum=-3.087;CI95=0.01549,0.02655;DB;DP=14578;DP4=1554,3055,6,17;Dels=0.00;EL=11;EPP=3.1137;ER=10;FQ=999;FR;FS=5.982;HETAR=7;HOMA=0;HOMR=1041;HP=2;HPLen=1;HR=1;HRun=1;HU=A;INDEL;INS;InbreedingCoeff=0.0356;IndelType=INS.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.28765;LRBP=294.09;MQ=80.17;MQ0=0;MQ0Fraction=0.0000;MQM=64.19;MQRankSum [...]
-20	48402974	rs57331436	GA	G	27741	PASS	AA=401;AB=0.5372;ABA=311;ABP=11.089;ABR=361;AC=84;AF=0.1186;AN=708;BL=16591;BR=14776;BVAR;BaseQRankSum=14.621;DB;DEL;DP=30607;DP4=1928,2310,195,225;Dels=0.11;EL=189;EPP=5.8749;ER=212;FQ=999;FR;FS=15.568;HETAR=110;HOMA=30;HOMR=923;HP=4;HPLen=3;HR=1;HRun=3;HU=A;INDEL;InbreedingCoeff=0.1263;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;KGPilot123;LEN=1;LRB=0.057863;LRBP=231.06;MQ=106.68;MQ0=0;MQ0Fraction=0.0000;MQM=63.005;MQRankSum=-2 [...]
-20	49101936	.	C	CT	404.46	PASS	AC=40;AF=0.03559;AN=1124;BaseQRankSum=0.750;DP=2162;FS=14.291;HRun=2;HaplotypeScore=30.9513;InbreedingCoeff=-0.0082;IndelType=INS.NumRepetitions_2.EventLength_1.RepeatExpansion_T.;MQ=49.78;MQ0=113;MQ0Fraction=0.0523;MQRankSum=-1.289;QD=1.94;ReadPosRankSum=-2.041;SB=-385.48;VQSLOD=4.6365;set=VQSR
-20	49731218	.	ATTTTATTTTTTATT	A,ATTTTATT	8398.93	PASS	AF=0.0656,0.0156;AF1=0.0996;BaseQRankSum=13.996;CI95=0.07743,0.1239;DP=6308;DP4=951,1311,23,35;Dels=0.05;FQ=999;FR;FS=12.503;HP=7;HPLen=4;HR=4;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1892;IndelType=MULTIALLELIC_INDEL;MQ=57.61;MQ0Fraction=0.0145;MQRankSum=-5.208;NF;NR;PP;PV4=0.79,1,6.3e-06,0.16;ReadPosRankSum=-2.239;SC=TATTTTATTTATTTTATTTTT;TC;TR=11;TU=ATTT;VQSLOD=4.3191;set=Intersection;sumGLbyD=42.27
-20	49894989	.	TA	T	172.25	PASS	AF=0.0140;BaseQRankSum=7.220;DP=3882;Dels=0.00;FS=17.217;HPLen=2;HRun=1;InbreedingCoeff=0.0531;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;MQ0Fraction=0.0214;MQRankSum=-0.661;ReadPosRankSum=-0.592;VQSLOD=3.0905;set=filterInVQSR-2of5;sumGLbyD=6.60
-20	50010923	rs66516522	C	CT,CTGG	35851	PASS	ABR=555;AC=310,11;AF=0.26451,0.00939;BVAR;BaseQRankSum=10.662;DB;DP=8188;FR;FS=34.411;HOMA=261;HOMR=399;HP=5;HR=6;HU=C;HaplotypeScore=45.1715;INS;InbreedingCoeff=0.2090;IndelType=MULTIALLELIC_INDEL;MQ=72.80;MQ0=0;MQ0Fraction=0.0000;MQRankSum=9.015;NF;NR;NS=831;PP;QD=9.69;RA=1986;RUN=1;ReadPosRankSum=-24.284;SB=-6038.55;SC=TGTCTGTCCCCCCTCAGCACT;SRB=0.45972;SRF=913;SRP=31.001;SRR=1073;TC;TR=6;TU=C;VQSLOD=6.1824;set=Intersection
-20	50228709	rs71192536	TG	T	20517	PASS	AA=924;AB=0.50203;ABA=735;ABP=3.0633;ABR=741;AC=200;AF=0.16502;AN=1212;BL=35460;BR=34197;BVAR;BaseQRankSum=13.810;DB;DEL;DP=32402;DP4=1760,2065,395,449;Dels=0.16;EL=439;EPP=7.9831;ER=485;FQ=999;FR;FS=0.558;HETAR=242;HOMA=63;HOMR=764;HP=5;HPLen=3;HR=3;HRun=3;HU=G;INDEL;InbreedingCoeff=0.1050;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.018132;LRBP=52.738;MQ=105.83;MQ0=0;MQ0Fraction=0.0000;MQM=75.87;MQRankSum=3.895;NF;NR [...]
-20	50236115	.	AGG	A,ACGGG,AG,AGGG	7429.57	PASS	AC=192,13,221,183;AF=0.2115,0.0143,0.2434,0.2015;AN=908;BaseQRankSum=1.045;DP=1177;FS=13.479;HaplotypeScore=11.8294;InbreedingCoeff=0.7959;IndelType=MULTIALLELIC_INDEL;MQ=52.98;MQ0=6;MQ0Fraction=0.0051;MQRankSum=-1.482;QD=7.28;ReadPosRankSum=-2.380;SB=-1229.31;VQSLOD=8.3762;set=VQSR
-20	51589568	.	TAAAC	AAAAC,T	12477.52	PASS	AF=0.27949;BaseQRankSum=-28.122;DP=3777;Dels=0.00;FR;FS=31.799;HP=7;HPLen=4;HR=3;HRun=0;HU=A;InbreedingCoeff=-0.1429;IndelType=MIXED;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.196;NF;NR;PP;ReadPosRankSum=-16.483;SC=AAATTCAAAATAAACAAACAA;TC;TR=18;TU=AAAC;VQSLOD=3.9201;set=filterInVQSR-2of5;sumGLbyD=52.43
-20	51617742	.	TGC	T,TGCGC	1374.91	PASS	AF=0.06000,0.02000;BaseQRankSum=12.051;DP=6231;Dels=0.00;FS=189.609;HPLen=1;HRun=0;InbreedingCoeff=0.0862;IndelType=MULTIALLELIC_INDEL;MQ0Fraction=0.0180;MQRankSum=-2.959;ReadPosRankSum=-5.090;VQSLOD=-2.8715;set=filterInVQSR-2of5;sumGLbyD=3.97
-20	51770354	.	AG	A	1010.90	PASS	AA=26;AB=0.52727;ABA=26;ABP=3.3656;ABR=29;AC=7;AF=0.0097;AF1=0.01637;AN=718;BL=1034;BR=964;BVAR;BaseQRankSum=5.588;CI95=0.01327,0.02212;DEL;DP=16259;DP4=2785,2239,15,10;Dels=0.01;EL=11;EPP=4.3466;ER=15;FQ=999;FR;FS=3.367;HETAR=8;HOMA=0;HOMR=1064;HP=2;HPLen=2;HR=2;HRun=2;HU=G;INDEL;InbreedingCoeff=0.0557;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.035035;LRBP=8.3357;MQ=90.48;MQ0=0;MQ0Fraction=0.0000;MQM=61.346;MQRankSum=-0.01 [...]
-20	51848430	.	AT	A,ATT	999	PASS	AA=39;AB=0.83408;ABA=37;ABP=219.19;ABR=186;AC=14,33;AF=0.0153,0.0359;AF1=0.03062;AN=918;BL=1676;BR=1732;BVAR;BaseQRankSum=3.338;CI95=0.02212,0.03982;DP=14886;DP4=1970,1762,22,31;Dels=0.01;EL=18;EPP=3.5114;ER=21;FQ=999;FR;FS=3.004;HETAR=31;HOMA=0;HOMR=1040;HP=10;HPLen=9;HR=9;HRun=9;HU=T;INDEL;INS;InbreedingCoeff=0.1629;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.016432;LRBP=5.0085;MQ=80.05;MQ0=0;MQ0Fraction=0.0000;MQM=56.667;MQRankSum=0.325;NF;NR;NS=1071;PP;PV [...]
-20	51897203	.	T	TG	8427.20	PASS	AA=237;AB=0.69846;ABA=215;ABP=246.92;ABR=498;AC=117;AF=0.1662;AN=704;BL=14961;BR=5990;BVAR;BaseQRankSum=22.203;DP=9710;Dels=0.00;EL=83;EPP=49.198;ER=154;FR;FS=9.450;HETAR=123;HOMA=9;HOMR=895;HP=5;HPLen=6;HR=6;HRun=0;HU=T;INS;InbreedingCoeff=-0.0513;IndelType=INS.NOVEL_1.Novel_G.;LEN=1;LRB=0.42819;LRBP=8344.3;MQ0Fraction=0.0291;MQM=45.861;MQRankSum=-10.426;NF;NR;NS=1027;PP;RA=4919;RL=210;RPP=309.85;RR=27;RUN=1;ReadPosRankSum=-1.843;SAB=0.29536;SAF=70;SAP=89 [...]
-20	52274070	.	AAG	A	1400.37	PASS	AA=30;AB=0.74227;ABA=25;ABP=52.462;ABR=72;AC=21;AF=0.01756;AN=1196;BL=412;BR=1966;BVAR;BaseQRankSum=6.660;DEL;DP=9362;Dels=0.01;EL=16;EPP=3.2998;ER=14;FS=1.485;HETAR=18;HOMA=2;HOMR=1004;HRun=0;InbreedingCoeff=0.0317;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_AG.;LEN=2;LRB=0.65349;LRBP=2208.2;MQ0Fraction=0.0022;MQM=46.133;MQRankSum=-4.743;NS=1024;RA=3931;RL=2;RPP=51.941;RR=28;RUN=1;ReadPosRankSum=-4.152;SAB=0.4;SAF=12;SAP=5.6161;SAR=18;SR [...]
-20	52351501	.	TAC	T	199.59	PASS	AC=22;AF=0.0238;AN=926;BaseQRankSum=7.874;DP=22911;DP4=2146,1691,26,22;FR;FS=2.898;HP=4;HPLen=3;HR=1;HRun=0;HU=A;HaplotypeScore=18.6111;INDEL;InbreedingCoeff=-0.0326;IndelType=DEL.NumRepetitions_6.EventLength_2.RepeatExpansion_AC.;MQ0=2;MQ0Fraction=0.0007;MQRankSum=1.011;NF;NR;PP;PV4=0.88,0.14,0.16,0.24;QD=1.10;ReadPosRankSum=-1.053;SB=-306.09;SC=GACACACAAATACACACACAC;TC;TR=13;TU=AC;VQSLOD=4.0486;set=filterInVQSR-2of5
-20	52447173	.	CA	C	503.89	PASS	AC=23;AF=0.01891;AN=1216;BaseQRankSum=0.801;DP=3266;FS=2.606;HRun=2;HaplotypeScore=22.1543;InbreedingCoeff=-0.0097;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_A.;MQ=118.02;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.309;QD=2.65;ReadPosRankSum=-7.872;SB=-279.27;VQSLOD=4.1900;set=VQSR
-20	52498650	.	GT	G	24069	PASS	AA=74;AB=0.90594;ABA=57;ABP=870.4;ABR=549;AC=28;AF=0.02333;AN=1200;BL=505;BR=4514;BVAR;BaseQRankSum=-3.837;DEL;DP=9798;Dels=0.01;EL=41;EPP=4.8883;ER=33;FS=4.085;HETAR=209;HOMA=663;HOMR=121;HRun=1;InbreedingCoeff=0.0334;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.79876;LRBP=6956.6;MQ0=2;MQ0Fraction=0.0007;MQM=57.784;MQRankSum=-2.951;NS=995;RA=957;RL=8;RPP=101.72;RR=66;RUN=1;ReadPosRankSum=-14.806;SAB=0.39189;SAF=29;SAP=10.522;S [...]
-20	52823602	rs11469056	CAAA	C,CA,CAA,CAAAA,CAAAAA,CAAAAAA,CAAAAAAA,CAAAAAAAA,CAAAAAAAAA,CAAAAAAAAAA	14515.17	PASS	AC=24,83,246,109,83,19,10,16,22,59;AF=0.02128,0.07358,0.21809,0.09663,0.07358,0.01684,0.00887,0.01418,0.01950,0.05230;AN=1128;BVAR;BaseQRankSum=4.150;DB;DEL;DP=28279;FR;FS=2.021;HP=17;HR=17;HU=A;HaplotypeScore=27.8032;INS;InbreedingCoeff=0.7740;IndelType=MULTIALLELIC_INDEL;MQ=69.00;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.418;NF;NR;PP;QD=7.90;RUN=1;ReadPosRankSum=-3.864;SB=-3244. [...]
-20	53308906	.	CT	C,CTT	2276	PASS	AA=92;AB=0.84453;ABA=81;ABP=540.17;ABR=440;AC=53,81;AF=0.04351,0.06650;AN=1218;BL=3561;BR=4796;BVAR;BaseQRankSum=3.000;DP=11804;Dels=0.02;EL=48;EPP=3.3879;ER=44;FR;FS=13.197;HETAR=69;HOMA=3;HOMR=993;HP=11;HR=10;HRun=10;HU=T;INS;InbreedingCoeff=0.2297;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.14778;LRBP=399.32;MQ0=1;MQ0Fraction=0.0003;MQM=56.348;MQRankSum=3.154;NF;NR;NS=1065;PP;RA=5520;RL=39;RPP=7.6365;RR=53;RUN=1;ReadPosRankSum=-2.140;SAB=0.57609;SAF=53;SA [...]
-20	53334602	.	T	TG,TGG	905.13	PASS	ABR=325;AC=44,22;AF=0.03624,0.01812;BVAR;BaseQRankSum=-4.608;DP=15015;FR;FS=494.901;HOMA=0;HOMR=1004;HP=1;HR=1;HU=G;HaplotypeScore=20.5023;INS;InbreedingCoeff=0.0799;IndelType=MULTIALLELIC_INDEL;MQ=116.70;MQ0=0;MQ0Fraction=0.0000;MQRankSum=8.022;NF;NR;NS=1064;PP;QD=0.35;RA=5690;RUN=1;ReadPosRankSum=-14.522;SB=-311.57;SC=AGCCATTGGCTGTTTCACTGA;SRB=0.40738;SRF=2318;SRP=426.97;SRR=3372;TC;TR=1;TU=G;VQSLOD=-2.3042;set=filterInVQSR-2of5
-20	53729115	.	T	TG	15.48	PASS	AC=1;AF=0.0015;AN=668;BaseQRankSum=-1.001;DP=1711;FS=9.048;HRun=2;HaplotypeScore=12.4681;InbreedingCoeff=-0.0320;IndelType=INS.NumRepetitions_2.EventLength_1.RepeatExpansion_G.;MQ=131.36;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.193;QD=4.57;ReadPosRankSum=0.407;SB=-5.35;VQSLOD=4.8071;set=VQSR
-20	54033830	.	GTATTTTAAAATCA	G	2220.86	PASS	AF=0.0113;BaseQRankSum=5.506;DP=2577;Dels=0.01;FR;FS=6.533;HP=5;HPLen=4;HR=1;HRun=0;HU=T;InbreedingCoeff=0.0032;IndelType=DEL.NumRepetitions_1.EventLength_10orMore.;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.969;NF;NR;PP;ReadPosRankSum=1.322;SC=TCAATATTTTGTATTTTAAAA;TC;TR=1;TU=T;VQSLOD=5.5145;set=Intersection;sumGLbyD=95.65
-20	54375236	.	GT	G	626.13	PASS	AA=40;AB=0.63551;ABA=39;ABP=20.078;ABR=68;AC=18;AF=0.0256;AN=702;BL=1331;BR=1743;BVAR;BaseQRankSum=9.346;DEL;DP=8568;Dels=0.02;EL=26;EPP=10.828;ER=14;FS=0.610;HETAR=21;HOMA=1;HOMR=1035;HRun=1;InbreedingCoeff=-0.0056;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.13403;LRBP=122.92;MQ0=0;MQ0Fraction=0.0000;MQM=67.125;MQRankSum=-2.537;NS=1058;RA=4870;RL=17;RPP=4.9646;RR=23;RUN=1;ReadPosRankSum=-1.229;SAB=0.525;SAF=21;SAP=3.2274;SAR [...]
-20	54457331	.	G	GA	1793.40	PASS	AA=77;AB=0.66667;ABA=74;ABP=56.573;ABR=148;AC=33;AF=0.02687;AN=1228;BL=3834;BR=1154;BVAR;BaseQRankSum=10.572;DP=10230;Dels=0.00;EL=77;EPP=170.21;ER=0;FS=139.433;HETAR=44;HOMA=1;HOMR=1001;HRun=1;INS;InbreedingCoeff=0.0023;IndelType=INS.NOVEL_1.Novel_A.;LEN=1;LRB=0.53729;LRBP=3129.8;MQ0Fraction=0.0095;MQM=4.7013;MQRankSum=-8.116;NS=1046;RA=4009;RL=77;RPP=170.21;RR=0;RUN=1;ReadPosRankSum=-6.026;SAB=1;SAF=77;SAP=170.21;SAR=0;SRB=0.57022;SRF=2286;SRP=174.7;SRR= [...]
-20	54469810	.	CA	C	1697.62	PASS	AA=93;AB=0.63855;ABA=90;ABP=44.53;ABR=159;AC=34;AF=0.0374;AF1=0.01719;AN=908;BL=3242;BR=5839;BVAR;BaseQRankSum=10.425;CI95=0.009317,0.02795;DEL;DP=15197;DP4=2134,1896,56,46;Dels=0.03;EL=34;EPP=17.604;ER=59;FQ=16;FR;FS=9.985;HETAR=41;HOMA=1;HOMR=1011;HP=9;HPLen=8;HR=8;HRun=8;HU=A;INDEL;InbreedingCoeff=-0.0472;IndelType=DEL.NumRepetitions_8.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.28598;LRBP=1615.8;MQ=83.37;MQ0=1;MQ0Fraction=0.0004;MQM=64.075;MQRankSum=3 [...]
-20	54542453	.	GTATA	G,GTA	5109.66	PASS	ABR=112;AC=66,56;AF=0.0682,0.0579;AN=968;BVAR;BaseQRankSum=17.089;DB;DEL;DP=5519;DS;Dels=0.06;FS=99.502;HOMA=15;HOMR=409;HRun=0;InbreedingCoeff=0.1584;IndelType=MULTIALLELIC_INDEL;MQ0Fraction=0.0178;MQRankSum=-6.854;NS=460;RA=864;RUN=1;ReadPosRankSum=0.855;SRB=0.79282;SRF=685;SRP=646.5;SRR=179;VQSLOD=0.6375;set=filterInVQSR-2of5;sumGLbyD=8.53
-20	54629773	.	CA	C	1799.50	PASS	AA=49;AB=0.82707;ABA=46;ABP=250.17;ABR=220;AC=9;AF=0.00746;AN=1206;BL=173;BR=2277;BVAR;BaseQRankSum=5.240;DEL;DP=8557;Dels=0.01;EL=49;EPP=109.41;ER=0;FS=32.359;HETAR=35;HOMA=1;HOMR=325;HRun=1;InbreedingCoeff=0.0892;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.85878;LRBP=3926.6;MQ0Fraction=0.0602;MQM=32.163;MQRankSum=-3.926;NS=361;RA=1091;RL=0;RPP=109.41;RR=49;RUN=1;ReadPosRankSum=-4.512;SAB=0;SAF=0;SAP=109.41;SAR=49;SRB=0.494 [...]
-20	54710245	.	TA	T	999	PASS	AF=0.0084;AF1=0.0148;BaseQRankSum=3.954;CI95=0.00885,0.02212;DP=8043;DP4=2000,1849,10,7;Dels=0.01;FQ=999;FR;FS=0.000;HP=9;HPLen=6;HR=3;HRun=6;HU=A;INDEL;InbreedingCoeff=0.1181;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_A.;MQ=78.51;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.095;NF;NR;PP;PV4=0.63,0.00056,1,1;ReadPosRankSum=-0.448;SC=CAACAAAAAATAAATAAATAA;TC;TR=15;TU=AAAT;VQSLOD=7.8129;set=Intersection;sumGLbyD=19.02
-20	54968173	.	A	AAT,AATAT,AT,ATAT	89535.82	PASS	ABR=994;AC=561,278,2,3;AF=0.50179,0.24866,0.00179,0.00268;AN=1118;BVAR;BaseQRankSum=-2.699;DB;DP=27837;DP4=168,177,1045,866;Dels=0.00;FQ=999;FR;FS=12.472;HOMA=71;HOMR=455;HP=3;HPLen=4;HR=4;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.6391;IndelType=MULTIALLELIC_INDEL;KGPilot123;MQ=80.36;MQ0Fraction=0.0055;MQRankSum=-1.512;NF;NR;NS=913;PP;PV4=0.046,1,1,1;RA=2015;RUN=1;ReadPosRankSum=1.015;SC=GGCCACTTAAAATATATATAT;SRB=0.44864;SRF=904;SRP=49.187;SR [...]
-20	55176688	.	TA	T	421.84	PASS	AF=0.01322;AF1=0.01845;BaseQRankSum=5.383;CI95=0.01282,0.02564;DP=10531;DP4=1975,2017,16,14;Dels=0.01;FQ=91.2;FR;FS=7.401;HP=6;HPLen=5;HR=5;HRun=5;HU=A;INDEL;InbreedingCoeff=0.0829;IndelType=DEL.NumRepetitions_5.EventLength_1.RepeatExpansion_A.;MQ=75.80;MQ0=1;MQ0Fraction=0.0003;MQRankSum=-0.471;NF;NR;PP;PV4=0.72,1,1,1;ReadPosRankSum=0.223;SC=CTGCAAAATATAAAAATTAGG;TC;TR=5;TU=A;VQSLOD=6.6000;set=Intersection;sumGLbyD=12.15
-20	55664086	.	GTT	ATT,G,GT,GTTT	5622.44	PASS	AC=6,71,136;AF=0.00498,0.05887,0.11277;AN=1206;BVAR;BaseQRankSum=3.173;DB;DEL;DP=40384;DP4=1567,1317,54,29;Dels=0.05;FR;FS=1.949;HP=14;HR=11;HRun=11;HU=T;INDEL;INS;InbreedingCoeff=0.3490;IndelType=MIXED;MQ=77.90;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.052;NF;NR;PP;PV4=0.057,1,0.2,1.2e-05;RUN=1;ReadPosRankSum=-13.646;SC=AATTTTATTTGTTTTTTTTTT;TC;TR=11;TU=T;VQSLOD=11.7964;set=Intersection;sumGLbyD=8.09
-20	56045006	.	TG	T	342.15	PASS	AC=72;AF=0.0940;AN=766;BaseQRankSum=4.992;DP=1238;FS=1.460;HRun=7;HaplotypeScore=20.2784;InbreedingCoeff=0.1795;IndelType=DEL.NumRepetitions_7.EventLength_1.RepeatExpansion_G.;MQ=66.42;MQ0=1;MQ0Fraction=0.0008;MQRankSum=-0.937;QD=1.84;ReadPosRankSum=-4.385;SB=-320.83;VQSLOD=5.2383;set=VQSR
-20	56158711	.	AG	A	922.47	PASS	AA=18;AB=0.575;ABA=17;ABP=4.9646;ABR=23;AC=2;AF=0.0028;AN=714;BL=953;BR=808;BVAR;BaseQRankSum=3.129;DEL;DP=10462;Dels=0.01;EL=9;EPP=3.0103;ER=9;FR;FS=8.724;HETAR=4;HOMA=0;HOMR=1058;HP=1;HPLen=2;HR=2;HRun=1;HU=A;InbreedingCoeff=0.0262;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.08234;LRBP=28.936;MQ0=0;MQ0Fraction=0.0000;MQM=55.889;MQRankSum=2.052;NF;NR;NS=1062;PP;RA=6300;RL=9;RPP=3.0103;RR=9;RUN=1;ReadPosRankSum=-0.317;SAB=0.6 [...]
-20	56258618	rs113670927	T	C,TGC,TGTGC,TGTGTGC	37834.99	PASS	ABR=441;AC=11,100,43;AF=0.0123,0.1119,0.0481;AN=894;BVAR;BaseQRankSum=19.514;DB;DP=23173;DP4=541,920,413,579;Dels=0.00;FQ=999;FR;FS=1.238;HOMA=28;HOMR=808;HP=2;HPLen=1;HR=1;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.2154;IndelType=MIXED;MQ=57.25;MQ0Fraction=0.0275;MQRankSum=-6.684;NF;NR;NS=976;PP;PV4=0.023,1,1,1;RA=3294;RUN=1;ReadPosRankSum=11.873;SC=TGCGTGTGTGTGTGTGTGTGT;SRB=0.42441;SRF=1398;SRP=166.5;SRR=1896;TC;TR=30;TU=GT;VQSLO [...]
-20	56395857	.	T	TAGGCAG	6614.22	PASS	AA=30;AB=0.63415;ABA=30;ABP=15.827;ABR=52;AC=14;AF=0.0197;AF1=0.03154;AN=710;BL=991;BR=1813;BVAR;BaseQRankSum=-4.589;CI95=0.02434,0.04204;DP=13879;DP4=1543,1833,12,14;Dels=0.00;EL=14;EPP=3.2998;ER=16;FQ=999;FR;FS=1.482;HETAR=11;HOMA=0;HOMR=1051;HP=1;HPLen=2;HR=2;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0774;IndelType=INS.NumRepetitions_2.EventLength_6.;LEN=6;LRB=0.29315;LRBP=526.27;MQ=90.42;MQ0=0;MQ0Fraction=0.0000;MQM=39.433;MQRankSum=-7.011;NF;NR;NS= [...]
-20	56969289	.	GTTTGT	G	600.69	PASS	AF=0.0056;AF1=0.007726;BaseQRankSum=2.907;CI95=0.004425,0.01327;DP=9643;DP4=1892,1749,6,3;Dels=0.00;FQ=117;FR;FS=16.601;HP=5;HPLen=3;HR=3;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0236;IndelType=DEL.NumRepetitions_3.EventLength_5.;MQ=92.59;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.134;NF;NR;PP;PV4=0.51,1,0.07,0.3;ReadPosRankSum=0.236;SC=TAAGGACGTTGTTTGTTTTGT;TC;TR=10;TU=GTTT;VQSLOD=5.8458;set=Intersection;sumGLbyD=39.51
-20	57187557	.	AG	A,AGG	1486.69	PASS	AA=130;AB=0.55446;ABA=90;ABP=8.2132;ABR=112;AC=56,26;AF=0.0574,0.0266;AN=976;BL=3817;BR=5968;BVAR;BaseQRankSum=5.517;DEL;DP=14174;DP4=925,721,59,48;Dels=0.05;EL=52;EPP=14.302;ER=78;FR;FS=0.917;HETAR=44;HOMA=17;HOMR=864;HP=4;HPLen=4;HR=4;HRun=4;HU=G;INDEL;InbreedingCoeff=0.2856;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.21983;LRBP=1029.8;MQ=91.56;MQ0=0;MQ0Fraction=0.0000;MQM=63.631;MQRankSum=1.900;NF;NR;NS=925;PP;PV4=0.84,1,1,0.39;RA=2746;RL=44;RPP=32.476 [...]
-20	57282771	.	T	TG	506.43	PASS	AA=34;AB=0.70312;ABA=19;ABP=25.946;ABR=45;AC=34;AF=0.0373;AN=912;BL=886;BR=1938;BVAR;BaseQRankSum=3.744;DP=4276;Dels=0.00;EL=18;EPP=3.2658;ER=16;FR;FS=0.639;HETAR=17;HOMA=9;HOMR=737;HP=9;HR=8;HRun=8;HU=G;INS;InbreedingCoeff=0.2149;IndelType=INS.NumRepetitions_8.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.37252;LRBP=853.99;MQ0=0;MQ0Fraction=0.0000;MQM=49.706;MQRankSum=-0.051;NF;NR;NS=763;PP;RA=1822;RL=9;RPP=19.36;RR=25;RUN=1;ReadPosRankSum=-2.111;SAB=0.5588 [...]
-20	57419740	rs11481507	A	AT	82613.57	PASS	AA=3850;AB=0.41404;ABA=1786;ABP=198.63;ABR=1262;AC=919;AF=0.75328;AN=1220;BL=140665;BR=151383;BVAR;BaseQRankSum=-27.490;DB;DP=31794;DP4=588,585,1571,1721;Dels=0.00;EL=1924;EPP=3.0126;ER=1926;FQ=999;FR;FS=2.191;HETAR=482;HOMA=454;HOMR=135;HP=3;HPLen=3;HR=3;HRun=3;HU=T;INDEL;INS;InbreedingCoeff=0.0861;IndelType=INS.NumRepetitions_3.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.036699;LRBP=857.15;MQ=123.92;MQ0=0;MQ0Fraction=0.0000;MQM=91.654;MQRankSu [...]
-20	57558194	.	CT	C,CTT,CTTT	6470.30	PASS	ABR=451;AC=104,161,177;AF=0.08919,0.13808,0.15180;BVAR;BaseQRankSum=1.172;DP=7985;FR;FS=2.202;HOMA=19;HOMR=778;HP=22;HR=15;HU=T;HaplotypeScore=16.1921;INS;InbreedingCoeff=0.6440;IndelType=MULTIALLELIC_INDEL;MQ=69.24;MQ0=27;MQ0Fraction=0.0109;MQRankSum=-0.003;NF;NR;NS=943;PP;QD=2.22;RA=2531;RUN=1;ReadPosRankSum=-0.104;SB=-2096.85;SC=GCCTTTTTTTCTTTTTTTTTT;SRB=0.34848;SRF=882;SRP=507.73;SRR=1649;TC;TR=15;TU=T;VQSLOD=6.5151;set=Intersection
-20	57693627	.	AG	A	1991.90	PASS	AA=52;AB=0.49462;ABA=47;ABP=3.0336;ABR=46;AC=15;AF=0.01227;AN=1222;BL=1902;BR=1478;BVAR;BaseQRankSum=-6.121;DEL;DP=26459;DP4=2647,2873,16,20;Dels=0.01;EL=25;EPP=3.1773;ER=27;FR;FS=3.135;HETAR=15;HOMA=1;HOMR=1064;HP=2;HPLen=3;HR=3;HRun=2;HU=A;INDEL;InbreedingCoeff=0.0866;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.12544;LRBP=118.51;MQ=116.26;MQ0=0;MQ0Fraction=0.0000;MQM=114.65;MQRankSum=1.942;NF;NR;NS=1080;PP;PV4=0.74,6.9e-08 [...]
-20	57716287	.	A	AT	66.47	PASS	AC=6;AF=0.00506;AN=1186;BaseQRankSum=1.369;DP=2744;FS=3.834;HRun=8;HaplotypeScore=11.2046;InbreedingCoeff=0.1196;IndelType=INS.NumRepetitions_8.EventLength_1.RepeatExpansion_T.;MQ=73.00;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-0.086;QD=2.14;ReadPosRankSum=-2.588;SB=-53.80;VQSLOD=4.2080;set=VQSR
-20	58121928	rs73625057	T	TGG	6649.17	PASS	AA=132;AB=0.57854;ABA=110;ABP=16.996;ABR=151;AC=57;AF=0.0617;AN=924;BL=4530;BR=4790;BVAR;BaseQRankSum=-13.456;DB;DP=30353;DP4=2107,2168,61,66;Dels=0.00;EL=67;EPP=3.0761;ER=65;FR;FS=0.708;HETAR=46;HOMA=8;HOMR=1023;HP=3;HPLen=2;HR=2;HRun=2;HU=G;INDEL;INS;InbreedingCoeff=0.1241;IndelType=INS.NumRepetitions_2.EventLength_1.RepeatExpansion_G.;LEN=2;LRB=0.027897;LRBP=18.76;MQ=109.61;MQ0=1;MQ0Fraction=0.0004;MQM=79.833;MQRankSum=-0.699;NF;NR;NS=1077;PP; [...]
-20	58468826	.	ACAAG	A	999	PASS	AF=0.0014;AF1=0.003429;BaseQRankSum=4.082;CI95=0.003106,0.006211;DP=8461;DP4=2500,1817,8,2;Dels=0.01;FQ=999;FR;FS=5.034;HP=2;HPLen=1;HR=1;HRun=0;HU=C;INDEL;InbreedingCoeff=-0.0183;IndelType=DEL.NumRepetitions_1.EventLength_4.;MQ=120.69;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.141;NF;NR;PP;PV4=0.21,1,0.054,1;ReadPosRankSum=2.096;SC=ATCCTGAAACACAAGAAGAAA;TC;TR=5;TU=AC;VQSLOD=7.4928;set=Intersection;sumGLbyD=29.17
-20	58731262	.	TC	T	999	PASS	AA=21;AB=0.48649;ABA=19;ABP=3.069;ABR=18;AC=7;AF=0.0101;AF1=0.01493;AN=694;BL=939;BR=848;BVAR;BaseQRankSum=4.205;CI95=0.01106,0.02212;DEL;DP=12598;DP4=1766,1428,11,15;Dels=0.01;EL=13;EPP=5.5954;ER=8;FQ=999;FR;FS=1.796;HETAR=8;HOMA=1;HOMR=1031;HP=7;HPLen=8;HR=8;HRun=2;HU=T;INDEL;InbreedingCoeff=-0.0030;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.050923;LRBP=13.073;MQ=124.57;MQ0=0;MQ0Fraction=0.0000;MQM=67.905;MQRankSum=1.103;NF;N [...]
-20	59181229	rs11476579	CTT	C,CT,CTTT,CTTTT	7787.17	PASS	AC=19,195,104,91;AF=0.01599,0.16414,0.08754,0.07660;AF1=0.2124;AN=1188;BVAR;BaseQRankSum=6.347;CI95=0.146,0.2743;DB;DEL;DP=26140;DP4=932,880,352,375;Dels=0.13;FQ=85.6;FR;FS=11.914;HP=14;HR=14;HRun=14;HU=T;INDEL;INS;InbreedingCoeff=0.4183;IndelType=MULTIALLELIC_INDEL;MQ=86.88;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.469;NF;NR;PP;PV4=0.17,1,1,1;RUN=1;ReadPosRankSum=-1.055;SC=GGTGAGAAAGCTTTTTTTTTT;TC;TR=14;TU=T;VQSLOD=7.4340;dbSNP=120;set= [...]
-20	59213979	rs112141381	G	GC	9068	PASS	AA=131;AB=0.47115;ABA=110;ABP=4.5136;ABR=98;AF=0.0586;AN=700;BL=5395;BR=5816;BVAR;BaseQRankSum=15.453;DB;DP=23381;DP4=2191,2184,71,49;Dels=0.00;EL=66;EPP=3.0269;ER=65;FR;FS=7.907;HETAR=35;HOMA=5;HOMR=1019;HP=2;HPLen=3;HR=3;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.0283;IndelType=INS.NOVEL_1.Novel_C.;LEN=1;LRB=0.037552;LRBP=37.34;MQ=72.13;MQ0=0;MQ0Fraction=0.0000;MQM=54.496;MQRankSum=0.897;NF;NR;NS=1059;PP;PV4=0.052,1,0.066,1;RA=4976;RL=59;RPP=5.8117;R [...]
-20	59252945	.	CT	C,CTT	557.18	PASS	AA=24;AB=0.84868;ABA=23;ABP=163.53;ABR=129;AC=21,29;AF=0.01759,0.02429;BL=1217;BR=1336;BVAR;BaseQRankSum=5.135;DP=9970;Dels=0.01;EL=13;EPP=3.3722;ER=11;FS=2.302;HETAR=21;HOMA=1;HOMR=1012;HRun=9;INS;InbreedingCoeff=0.1549;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.046612;LRBP=15.055;MQ0=0;MQ0Fraction=0.0000;MQM=67.208;MQRankSum=0.086;NS=1034;RA=4421;RL=11;RPP=3.3722;RR=13;RUN=1;ReadPosRankSum=-1.826;SAB=0.41667;SAF=10;SAP=4.4579;SAR=14;SRB=0.49649;SRF=2195 [...]
-20	60016966	.	CT	C	42650	PASS	AA=37;AB=0.97834;ABA=31;ABP=2847;ABR=1400;AC=15;AF=0.0163;AN=920;BL=2596;BR=778;BVAR;BaseQRankSum=-0.632;DEL;DP=10967;Dels=0.00;EL=14;EPP=7.7641;ER=23;FS=4.094;HETAR=421;HOMA=256;HOMR=385;HRun=1;InbreedingCoeff=-0.0051;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.53883;LRBP=2130.2;MQ0=0;MQ0Fraction=0.0000;MQM=120.3;MQRankSum=-0.911;NS=1072;RA=3413;RL=31;RPP=39.691;RR=6;RUN=1;ReadPosRankSum=-12.062;SAB=0.48649;SAF=18;SAP=3.069;S [...]
-20	60188651	.	AG	A	17624.52	PASS	AA=462;AB=0.76548;ABA=409;ABP=1070.7;ABR=1335;AC=403;AF=0.34444;AN=1170;BL=13877;BR=25909;BVAR;BaseQRankSum=6.180;DEL;DP=9900;Dels=0.08;EL=353;EPP=282.84;ER=109;FR;FS=2699.057;HETAR=346;HOMA=26;HOMR=633;HP=3;HR=4;HRun=1;HU=A;InbreedingCoeff=-0.2900;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.30242;LRBP=7904.3;MQ0Fraction=0.0004;MQM=56.119;MQRankSum=1.644;NF;NR;NS=1005;PP;RA=3521;RL=112;RPP=269.25;RR=350;RUN=1;ReadPosRankSum [...]
-20	60195570	.	GTACATACATACA	ATACATACATACA,G,GTACATACA	20140	PASS	ABR=102;AC=105,2;AF=0.08794,0.00168;AN=1194;BVAR;BaseQRankSum=-28.899;DB;DEL;DP=14347;Dels=0.02;FR;FS=52.125;HOMA=1;HOMR=1006;HP=1;HPLen=1;HR=1;HRun=0;HU=T;InbreedingCoeff=0.0695;IndelType=MIXED;MQ0Fraction=0.0007;MQRankSum=1.957;NF;NR;NS=1035;PP;RA=4759;RUN=1;ReadPosRankSum=-22.252;SAB=0.5;SAP=3.0103;SC=TGATAGATTCGTACATACATA;SRB=0.47615;SRF=2266;SRP=26.522;SRR=2493;TC;TR=21;TU=ACAT;VQSLOD=2.7673;set=filterInVQSR-2of5;sumGL [...]
-20	60670601	rs72127450	AT	A,ATT	6401.59	PASS	AC=177,79;AF=0.16239,0.07248;AF1=0.1602;AN=1090;BVAR;BaseQRankSum=8.618;CI95=0.1106,0.2058;DB;DEL;DP=17508;DP4=1285,1094,313,259;Dels=0.10;FQ=94.1;FR;FS=0.000;HP=12;HR=12;HRun=12;HU=T;INDEL;INS;InbreedingCoeff=0.1076;IndelType=MULTIALLELIC_INDEL;LEN=1;MQ=64.73;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.620;NF;NR;PP;PV4=0.78,1,0.012,1;RUN=1;ReadPosRankSum=-1.294;SC=AGCCAGGCACATTTTTTTTTT;TC;TR=12;TU=T;VQSLOD=6.1650;dbSNP=130;set=Intersection;sumGLbyD=5.80
-20	60685780	.	TC	T	1123.58	PASS	AC=79;AF=0.07655;AN=1032;BaseQRankSum=14.949;DP=2084;FS=23.521;HRun=1;HaplotypeScore=19.7117;InbreedingCoeff=0.1356;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=53.57;MQ0=61;MQ0Fraction=0.0293;MQRankSum=-7.958;QD=4.35;ReadPosRankSum=-13.757;SB=-791.28;VQSLOD=6.3549;set=VQSR
-20	60744906	rs113528167	CG	C	422.53	PASS	AC=48;AF=0.0732;AN=656;BaseQRankSum=17.669;DB;DP=1189;FS=0.356;HRun=1;HaplotypeScore=15.1808;InbreedingCoeff=0.2111;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;MQ=82.83;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-10.455;QD=2.71;ReadPosRankSum=-16.887;SB=-326.46;VQSLOD=7.1707;set=VQSR
-20	60848742	.	CGT	C,CGTGT	999	PASS	AF=0.00980,0.01225;BaseQRankSum=5.597;DP=17065;DP4=1928,2188,17,13;Dels=0.01;FR;HP=1;HPLen=2;HR=2;HRun=0;HU=C;INDEL;InbreedingCoeff=0.2094;IndelType=MULTIALLELIC_INDEL;MQ=115.78;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.281;NF;NR;PP;PV4=0.36,0.4,0.12,0.12;ReadPosRankSum=-1.465;SB=-157.35;SC=TAGACGCTTCCGTGTGTGTGT;TC;TR=11;TU=GT;VQSLOD=1.7100;set=filterInVQSR-2of5;sumGLbyD=16.39
-20	61023668	rs57452309	G	GAGC	6896.67	PASS	AC=115;AF=0.1445;AN=796;BaseQRankSum=12.146;DB;DP=1423;FS=5.070;HRun=0;HaplotypeScore=29.8897;InbreedingCoeff=0.0740;IndelType=INS.NOVEL_3.;MQ=77.02;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-9.005;QD=19.16;ReadPosRankSum=-17.440;SB=-3045.82;VQSLOD=4.5788;set=VQSR
-20	61180519	.	C	CA,CT	1774.30	PASS	ABR=135;AC=27,15;AF=0.02538,0.01410;BVAR;BaseQRankSum=-2.189;DP=8393;FR;FS=27.692;HOMA=2;HOMR=825;HP=6;HPLen=3;HR=3;HU=T;HaplotypeScore=19.5313;INS;InbreedingCoeff=0.0868;IndelType=MULTIALLELIC_INDEL;LEN=1;MQ=56.11;MQ0=172;MQ0Fraction=0.0667;MQRankSum=2.605;NF;NR;NS=854;PP;QD=1.99;RA=2868;RUN=1;ReadPosRankSum=-7.324;SB=-385.54;SC=TTCTTTCTTTCTTTCTTTCTT;SRB=0.32741;SRF=939;SRP=745.08;SRR=1929;TC;TR=69;TU=CTTT;VQSLOD=3.4398;set=filterInVQSR-2of5
-20	61184281	.	AC	A	9798.10	PASS	AA=24;AB=0.96507;ABA=16;ABP=863.43;ABR=442;AC=4;AF=0.00341;AN=1174;BL=349;BR=1039;BVAR;BaseQRankSum=2.048;DEL;DP=10073;Dels=0.00;EL=11;EPP=3.3722;ER=13;FS=2.097;HETAR=141;HOMA=69;HOMR=829;HRun=1;InbreedingCoeff=0.0697;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.49712;LRBP=747.85;MQ0=0;MQ0Fraction=0.0000;MQM=98.042;MQRankSum=1.881;NS=1042;RA=3625;RL=5;RPP=20.744;RR=19;RUN=1;ReadPosRankSum=-8.009;SAB=0.75;SAF=18;SAP=16.039;SAR [...]
-20	62074219	.	C	CTAT,CTGT	2328	PASS	ABR=99;AC=20,6;AF=0.01754,0.00526;BVAR;BaseQRankSum=11.221;DP=9498;DS;FS=4.510;HOMA=15;HOMR=645;HaplotypeScore=82.8868;INS;InbreedingCoeff=0.0880;IndelType=MULTIALLELIC_INDEL;LEN=3;MQ=29.88;MQ0=1378;MQ0Fraction=0.2286;MQRankSum=-5.309;NS=689;QD=0.77;RA=1679;RUN=1;ReadPosRankSum=-3.510;SAR=1;SB=-93.21;SRB=0.70697;SRF=1187;SRP=627.71;SRR=492;VQSLOD=1.8325;set=filterInVQSR-2of5
-20	62304449	.	CA	C,CAA	6680.17	PASS	AC=141,69;AF=0.12567,0.06150;AF1=0.08178;AN=1122;BVAR;BaseQRankSum=9.754;CI95=0.05088,0.1128;DEL;DP=15867;DP4=1252,1289,232,208;Dels=0.10;FQ=52.6;FR;FS=6.576;HP=11;HR=11;HRun=11;HU=A;INDEL;INS;InbreedingCoeff=0.1950;IndelType=MULTIALLELIC_INDEL;LEN=1;MQ=60.48;MQ0Fraction=0.0004;MQRankSum=-0.049;NF;NR;PP;PV4=0.2,1,1,1;RUN=1;ReadPosRankSum=-2.137;SC=GATTCTGTGTCAAAAAAAAAA;TC;TR=11;TU=A;VQSLOD=7.4714;set=Intersection;sumGLbyD=8.36
-20	62804895	rs57769591	CCTT	C	1148	PASS	AC=8;AF=0.0085;AF1=0.002839;AN=938;BaseQRankSum=4.952;CI95=0.002212,0.006637;DB;DP=8889;DP4=2574,1668,4,8;FQ=12.3;FS=2.289;HPLen=3;HRun=0;HaplotypeScore=29.4184;INDEL;InbreedingCoeff=-0.0270;IndelType=DEL.NumRepetitions_1.EventLength_3.;MQ0=876;MQ0Fraction=0.2674;MQRankSum=-0.641;PV4=0.074,1,1,1;QD=1.03;ReadPosRankSum=0.118;SB=-65.30;VQSLOD=6.4881;dbSNP=126;set=Intersection
-20	62907688	.	AAT	A	6629.57	PASS	AC=164;AF=0.13735;AN=1194;BaseQRankSum=27.368;DP=2746;FS=5.985;HRun=0;HaplotypeScore=14.7748;InbreedingCoeff=0.1433;IndelType=DEL.NumRepetitions_2.EventLength_2.RepeatExpansion_AT.;MQ=96.65;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-3.318;QD=10.81;ReadPosRankSum=0.789;SB=-2662.16;VQSLOD=6.1473;set=VQSR
diff --git a/tests/vcf-examples/20.vcf b/tests/vcf-examples/20.vcf
deleted file mode 100644
index e14beb5..0000000
--- a/tests/vcf-examples/20.vcf
+++ /dev/null
@@ -1,307 +0,0 @@
-##fileformat=VCFv4.1
-##INFO=<ID=PacBio,Number=1,Type=String,Description="Status of PacBio for this site">
-##INFO=<ID=Sqnm,Number=1,Type=String,Description="Status of Sequenom for this site">
-##INFO=<ID=Sanger,Number=1,Type=String,Description="Status of Sanger Sequencing for this site">
-##INFO=<ID=NotCalledInValidationSamples,Number=.,Type=Flag,Description="Was not called polymorphic in sequencing for any of the passing validation samples; could still be polymorphic">
-##reference=file:///humgen/1kg/reference/human_g1k_v37.fasta
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	
-20	207414	.	G	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	792106	.	C	G	.	.	PacBio=Poly;Sqnm=NoCall
-20	894031	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	1508892	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	1686745	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	1818886	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	2062981	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	2773229	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	2817761	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	2994966	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	3126723	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	3523369	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	3635082	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	3714080	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	3905791	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	3907250	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	4171994	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	4246375	.	T	C	.	.	PacBio=Poly;Sqnm=NoCall
-20	4375206	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	4434727	.	A	T	.	.	PacBio=NoCall;Sqnm=Mono;Sanger=Mono
-20	4495199	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	4835415	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	4915769	.	T	C	.	.	PacBio=Poly;Sqnm=NoCall
-20	4983198	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	5441171	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	5978029	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	6061317	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	6328925	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	6675461	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	6976115	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	7013349	.	G	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	7039302	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	7638704	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	7688381	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	7726350	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	7733957	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	7850516	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	8095059	.	G	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	8232012	.	T	A	.	.	PacBio=Poly;Sqnm=Poly
-20	8415290	.	A	C	.	.	PacBio=Poly;Sqnm=Poly
-20	8438535	.	T	C	.	.	PacBio=Poly;Sqnm=NoCall
-20	8815233	.	G	A	.	.	PacBio=Mono;Sqnm=NoCall
-20	8953629	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	9237267	.	T	A	.	.	PacBio=Poly;Sqnm=Poly
-20	9744549	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	9780416	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	10252552	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	10314038	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	10757416	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	11087688	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	11094107	.	G	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	11098680	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	11353163	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	11510559	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	11787224	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	11821024	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	11932295	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	11965311	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	12023599	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	12505523	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	12570054	.	A	C	.	.	PacBio=NoCall;Sqnm=Poly
-20	12667452	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	12678271	.	G	A	.	.	PacBio=Poly;Sqnm=Mono
-20	12704885	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	12733996	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	12737269	.	C	T	.	.	PacBio=NoCall;Sqnm=NoCall
-20	12788981	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	12828594	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	12999157	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	13083804	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	13197077	.	G	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	13217896	.	A	G	.	.	PacBio=NoCall;Sqnm=Poly
-20	13276778	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	13375116	.	G	A	.	.	PacBio=Mono;Sqnm=NoCall;NotCalledInValidationSamples
-20	13648056	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	13672895	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	14160159	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	14266815	.	T	A	.	.	PacBio=Poly;Sqnm=Poly
-20	14865143	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	14882868	.	T	G	.	.	PacBio=Poly;Sqnm=Poly
-20	15244725	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	15277072	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	15390867	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	15785205	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	15833020	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	15847620	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	15953253	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	15964434	.	G	C	.	.	PacBio=NoCall;Sqnm=NoCall
-20	16183922	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	16190824	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	16557779	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	16730061	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	16794015	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	17048741	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	17299827	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	17299845	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	17390323	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	17624973	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	17666040	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	17735813	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	17794990	.	A	G	.	.	PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples
-20	17809418	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	17860794	.	C	T	.	.	PacBio=Mono;Sqnm=NoCall
-20	17881936	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	17893097	.	C	G	.	.	PacBio=NoCall;Sqnm=NoCall
-20	18188883	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	18199319	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	18233699	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	18536869	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	18637785	.	T	C	.	.	PacBio=NoCall;Sqnm=Mono;Sanger=Mono;NotCalledInValidationSamples
-20	18763166	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	19102715	.	A	G	.	.	PacBio=NoCall;Sqnm=NoCall
-20	19244609	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	19573719	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	19815613	.	A	G	.	.	PacBio=NoCall;Sqnm=Poly
-20	20511479	.	C	T	.	.	PacBio=Poly;Sqnm=Poly;Sanger=Poly
-20	20639358	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	21278490	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	21297718	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	21418269	.	A	T	.	.	PacBio=Poly;Sqnm=Poly
-20	21560553	.	A	T	.	.	PacBio=Poly;Sqnm=Poly
-20	21618451	.	G	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	21705723	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	22076189	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	22118677	.	T	A	.	.	PacBio=Poly;Sqnm=Poly
-20	22320721	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	22368918	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	23020003	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	23214163	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	23273877	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	23335790	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	23790659	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	23830388	.	T	C	.	.	PacBio=Poly;Sqnm=NoCall
-20	23837678	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	23901081	.	A	C	.	.	PacBio=Poly;Sqnm=Poly
-20	23946361	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	23949242	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	24539119	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	24986457	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	25183729	.	G	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	25277133	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	25292464	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	25528915	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	25851836	.	A	G	.	.	PacBio=NoCall;Sqnm=NoCall
-20	25970163	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	29920798	.	C	T	.	.	PacBio=NoCall;Sqnm=NoCall
-20	30007713	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	30051768	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	30183598	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	30604408	.	G	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	30759940	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	30881454	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	31356560	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	31450036	.	A	G	.	.	PacBio=NoCall;Sqnm=Mono
-20	31589920	.	A	T	.	.	PacBio=Poly;Sqnm=Poly
-20	31922121	.	C	T	.	.	PacBio=NoCall;Sqnm=NoCall
-20	32801430	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	32943975	.	G	T	.	.	PacBio=Mono;Sqnm=Mono
-20	33155812	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	34090682	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	34254080	.	C	T	.	.	PacBio=Mono;Sqnm=NoCall;NotCalledInValidationSamples
-20	34312126	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	34481504	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	34694577	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	35026572	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	35472344	.	T	G	.	.	PacBio=Poly;Sqnm=Poly
-20	35882698	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	36044719	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	36047623	.	C	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	36204890	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	36469514	.	G	C	.	.	PacBio=NoCall;Sqnm=Poly
-20	36840217	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	37460945	.	C	T	.	.	PacBio=Mono;Sqnm=Poly
-20	37665246	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	37732397	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	37874645	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	37958191	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	37996273	.	C	T	.	.	PacBio=Mono;Sqnm=NoCall;NotCalledInValidationSamples
-20	38016547	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	38435682	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	38505534	.	A	T	.	.	PacBio=Poly;Sqnm=Poly
-20	38803278	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	38963803	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	38971986	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	39269586	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	39289390	.	C	A	.	.	PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples
-20	39318956	.	T	A	.	.	PacBio=Poly;Sqnm=Poly
-20	39736197	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	40241339	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	41473555	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	41878576	.	T	G	.	.	PacBio=Poly;Sqnm=Poly
-20	42022716	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	42033671	.	A	C	.	.	PacBio=NoCall;Sqnm=NoCall
-20	42270334	.	C	T	.	.	PacBio=NoCall;Sqnm=NoCall
-20	42449590	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	42521157	.	T	G	.	.	PacBio=Poly;Sqnm=Poly
-20	42624300	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	42984548	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	43200148	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	43425384	.	T	G	.	.	PacBio=Poly;Sqnm=Poly
-20	43521990	.	C	G	.	.	PacBio=Poly;Sqnm=Poly
-20	43565804	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	43591237	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	43805929	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	43866692	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	43902088	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	44478507	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	44768810	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	45151582	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	45414003	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	45776825	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	46454905	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	46823642	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	47001376	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	47079360	.	G	C	.	.	PacBio=Poly;Sqnm=NoCall
-20	47248953	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	47480655	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	47529099	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	47703355	.	A	C	.	.	PacBio=Poly;Sqnm=Poly
-20	47919541	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	48126120	.	A	C	.	.	PacBio=Poly;Sqnm=Poly
-20	48157380	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	48233077	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	48488571	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	48534468	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	48631385	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	48654970	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	48708007	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	48979827	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	49100106	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	49509102	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	49631170	.	G	A	.	.	PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples
-20	50210361	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	50309600	.	C	A	.	.	PacBio=Poly;Sqnm=Poly
-20	50681296	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	50750138	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	51639257	.	G	A	.	.	PacBio=Mono;Sqnm=Poly
-20	51814664	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	51891088	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	52299250	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	52363435	.	G	A	.	.	PacBio=Poly;Sqnm=NoCall
-20	52583941	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	52787584	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	53256945	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	54155398	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	54172374	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	54209446	.	A	G	.	.	PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;Sanger=Poly
-20	54317862	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	54852735	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	54889864	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	55208711	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	55220477	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	55224856	.	G	T	.	.	PacBio=NoCall;Sqnm=NoCall
-20	55441530	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	55585710	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	55630163	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	56031994	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	56316071	.	T	G	.	.	PacBio=Poly;Sqnm=Poly
-20	56366198	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	56703987	.	G	A	.	.	PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;Sanger=Poly
-20	56794829	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	56797026	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	56922427	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	57025102	.	A	T	.	.	PacBio=Poly;Sqnm=Poly
-20	57104529	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	57360225	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	57630386	.	T	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	57754033	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	57956631	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	57997801	.	C	T	.	.	PacBio=Poly;Sqnm=NoCall
-20	58046279	.	C	G	.	.	PacBio=NoCall;Sqnm=NoCall
-20	58186723	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	58214460	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	58317759	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	58491642	.	A	C	.	.	PacBio=Poly;Sqnm=Poly
-20	58560045	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	58629232	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	58805192	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	58869523	.	A	G	.	.	PacBio=Poly;Sqnm=Poly
-20	59337535	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	59441596	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	59445223	.	G	A	.	.	PacBio=NoCall;Sqnm=NoCall
-20	59605846	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	59864395	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	60099821	.	G	T	.	.	PacBio=Poly;Sqnm=Poly
-20	60290551	.	A	G	.	.	PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;Sanger=Poly
-20	60362527	.	G	C	.	.	PacBio=Poly;Sqnm=Poly
-20	60516358	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	60559594	.	C	T	.	.	PacBio=NoCall;Sqnm=Poly
-20	60745115	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	60831300	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	60907675	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	61458191	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	61717607	.	C	T	.	.	PacBio=Mono;Sqnm=Poly
-20	61771154	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	61950497	.	G	A	.	.	PacBio=Poly;Sqnm=Poly
-20	62000091	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
-20	62550780	.	C	T	.	.	PacBio=NoCall;Sqnm=NoCall
-20	62558259	.	T	C	.	.	PacBio=Poly;Sqnm=Poly
-20	62727205	.	C	T	.	.	PacBio=Poly;Sqnm=Poly
diff --git a/tests/vcf-examples/21.vcf b/tests/vcf-examples/21.vcf
deleted file mode 100644
index db6cec6..0000000
--- a/tests/vcf-examples/21.vcf
+++ /dev/null
@@ -1,310 +0,0 @@
-##fileformat=VCFv4.1
-##INFO=<ID=Consensus,Number=1,Type=String,Description="Consensus validation result">
-##INFO=<ID=PacBio,Number=1,Type=String,Description="Status of PacBio for this site">
-##INFO=<ID=Sqnm,Number=1,Type=String,Description="Status of Sequenom for this site">
-##INFO=<ID=Sanger,Number=1,Type=String,Description="Status of Sanger Sequencing for this site">
-##INFO=<ID=NotCalledInValidationSamples,Number=.,Type=Flag,Description="Was not called polymorphic in sequencing for any of the passing validation samples; could still be polymorphic">
-##INFO=<ID=pcr454_ss,Number=1,Type=String,Description="Status of PCR-Roche 454 single-sample experiment for this site">
-##INFO=<ID=pcr454_ps,Number=1,Type=String,Description="Status of PCR-Roche 454 pooled-samples experiment for this site">
-##reference=file:///humgen/1kg/reference/human_g1k_v37.fasta
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
-20	207414	.	G	A	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	792106	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	894031	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	1508892	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	1686745	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	1818886	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	2062981	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	2773229	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	2817761	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	2994966	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	3126723	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	3523369	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	3635082	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	3714080	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	3905791	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	3907250	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	4171994	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	4246375	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	4375206	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	4434727	.	A	T	0	.	Consensus=Mono;PacBio=Mono;Sqnm=Mono;Sanger=Mono;pcr454_ss=NoCall;pcr454_ps=Poly
-20	4495199	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	4835415	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	4915769	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	4983198	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	5441171	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	5978029	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	6061317	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Mono;pcr454_ps=Poly
-20	6328925	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	6675461	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	6976115	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	7013349	.	G	A	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	7039302	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	7638704	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	7688381	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	7726350	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	7733957	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	7850516	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	8095059	.	G	A	0	.	Consensus=Mono;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	8232012	.	T	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	8415290	.	A	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	8438535	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	8815233	.	G	A	0	.	Consensus=Poly;PacBio=Mono;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	8953629	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Mono;pcr454_ps=Poly
-20	9237267	.	T	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	9744549	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	9780416	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	10252552	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	10314038	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	10757416	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	11087688	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	11094107	.	G	A	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	11098680	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	11353163	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	11510559	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	11787224	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	11821024	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	11932295	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	11965311	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	12023599	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	12505523	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	12570054	.	A	C	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	12667452	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	12678271	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Mono;pcr454_ss=Poly;pcr454_ps=Poly
-20	12704885	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	12733996	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	12737269	.	C	T	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	12788981	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	12828594	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	12999157	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	13083804	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	13197077	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	13217896	.	A	G	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	13276778	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	13375116	.	G	A	0	.	Consensus=Mono;PacBio=Mono;Sqnm=NoCall;NotCalledInValidationSamples;pcr454_ss=Mono;pcr454_ps=Mono
-20	13648056	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	13672895	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	14160159	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	14266815	.	T	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	14865143	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	14882868	.	T	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	15244725	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	15277072	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	15390867	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	15785205	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	15833020	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	15847620	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	15953253	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	15964434	.	G	C	0	.	Consensus=NoCall;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	16183922	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	16190824	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	16557779	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	16730061	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	16794015	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	17048741	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	17299827	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	17299845	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	17390323	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	17624973	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	17666040	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	17735813	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	17794990	.	A	G	0	.	Consensus=Mono;PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	17809418	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	17860794	.	C	T	0	.	Consensus=Poly;PacBio=Mono;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	17881936	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	17893097	.	C	G	0	.	Consensus=Mono;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Mono;pcr454_ps=Mono
-20	18188883	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	18199319	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	18233699	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	18536869	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	18637785	.	T	C	0	.	Consensus=Mono;PacBio=NoCall;Sqnm=Mono;Sanger=Mono;NotCalledInValidationSamples;pcr454_ss=Mono;pcr454_ps=Mono
-20	18763166	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	19102715	.	A	G	0	.	Consensus=Mono;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Mono;pcr454_ps=Mono
-20	19244609	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	19573719	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	19815613	.	A	G	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	20511479	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;Sanger=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	20639358	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	21278490	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	21297718	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	21418269	.	A	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	21560553	.	A	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	21618451	.	G	A	0	.	Consensus=NoCall;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	21705723	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	22076189	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	22118677	.	T	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	22320721	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	22368918	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	23020003	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	23214163	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	23273877	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	23335790	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Mono
-20	23790659	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	23830388	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	23837678	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	23901081	.	A	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	23946361	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	23949242	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	24539119	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	24986457	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	25183729	.	G	A	0	.	Consensus=Mono;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Mono;pcr454_ps=Mono
-20	25277133	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	25292464	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	25528915	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	25851836	.	A	G	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	25970163	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	29920798	.	C	T	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	30007713	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	30051768	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	30183598	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	30604408	.	G	A	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	30759940	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	30881454	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=Poly
-20	31356560	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	31450036	.	A	G	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=Mono;pcr454_ss=Poly;pcr454_ps=Poly
-20	31589920	.	A	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	31922121	.	C	T	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	32801430	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	32943975	.	G	T	0	.	Consensus=Mono;PacBio=Mono;Sqnm=Mono;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	33155812	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	34090682	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	34254080	.	C	T	0	.	Consensus=Mono;PacBio=Mono;Sqnm=NoCall;NotCalledInValidationSamples;pcr454_ss=Mono;pcr454_ps=Mono
-20	34312126	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	34481504	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	34694577	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	35026572	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	35472344	.	T	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	35882698	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	36044719	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	36047623	.	C	A	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	36204890	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	36469514	.	G	C	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	36840217	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	37460945	.	C	T	0	.	Consensus=Poly;PacBio=Mono;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	37665246	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	37732397	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	37874645	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	37958191	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	37996273	.	C	T	0	.	Consensus=Mono;PacBio=Mono;Sqnm=NoCall;NotCalledInValidationSamples;pcr454_ss=Mono;pcr454_ps=Mono
-20	38016547	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	38435682	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	38505534	.	A	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	38803278	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	38963803	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	38971986	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	39269586	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	39289390	.	C	A	0	.	Consensus=Mono;PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	39318956	.	T	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=Poly
-20	39736197	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	40241339	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	41473555	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	41878576	.	T	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	42022716	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	42033671	.	A	C	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	42270334	.	C	T	0	.	Consensus=NoCall;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	42449590	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	42521157	.	T	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	42624300	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	42984548	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	43200148	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	43425384	.	T	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	43521990	.	C	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	43565804	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	43591237	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	43805929	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	43866692	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	43902088	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	44478507	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	44768810	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	45151582	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	45414003	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Mono;pcr454_ps=Mono
-20	45776825	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	46454905	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	46823642	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	47001376	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	47079360	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	47248953	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	47480655	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	47529099	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	47703355	.	A	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	47919541	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	48126120	.	A	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	48157380	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	48233077	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	48488571	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	48534468	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	48631385	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	48654970	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	48708007	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	48979827	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	49100106	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	49509102	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	49631170	.	G	A	0	.	Consensus=Mono;PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;pcr454_ss=Mono;pcr454_ps=Mono
-20	50210361	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	50309600	.	C	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	50681296	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	50750138	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	51639257	.	G	A	0	.	Consensus=Poly;PacBio=Mono;Sqnm=Poly;pcr454_ss=Mono;pcr454_ps=Mono
-20	51814664	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	51891088	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	52299250	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	52363435	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	52583941	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	52787584	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	53256945	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	54155398	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	54172374	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=Poly
-20	54209446	.	A	G	0	.	Consensus=Poly;PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;Sanger=Poly;pcr454_ss=Mono;pcr454_ps=Mono
-20	54317862	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	54852735	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	54889864	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	55208711	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	55220477	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	55224856	.	G	T	0	.	Consensus=NoCall;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	55441530	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	55585710	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	55630163	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	56031994	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	56316071	.	T	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	56366198	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	56703987	.	G	A	0	.	Consensus=Poly;PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;Sanger=Poly;pcr454_ss=Mono;pcr454_ps=Mono
-20	56794829	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	56797026	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	56922427	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	57025102	.	A	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	57104529	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	57360225	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	57630386	.	T	A	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	57754033	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	57956631	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	57997801	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	58046279	.	C	G	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	58186723	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	58214460	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	58317759	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	58491642	.	A	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	58560045	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	58629232	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	58805192	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	58869523	.	A	G	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	59337535	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	59441596	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	59445223	.	G	A	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=Poly;pcr454_ps=Poly
-20	59605846	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	59864395	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	60099821	.	G	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	60290551	.	A	G	0	.	Consensus=Poly;PacBio=Mono;Sqnm=Mono;NotCalledInValidationSamples;Sanger=Poly;pcr454_ss=Mono;pcr454_ps=Mono
-20	60362527	.	G	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	60516358	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	60559594	.	C	T	0	.	Consensus=Poly;PacBio=NoCall;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	60745115	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	60831300	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	60907675	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	61458191	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	61717607	.	C	T	0	.	Consensus=Poly;PacBio=Mono;Sqnm=Poly;pcr454_ss=Mono;pcr454_ps=Mono
-20	61771154	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	61950497	.	G	A	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	62000091	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	62550780	.	C	T	0	.	Consensus=NoCall;PacBio=NoCall;Sqnm=NoCall;pcr454_ss=NoCall;pcr454_ps=NoCall
-20	62558259	.	T	C	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
-20	62727205	.	C	T	0	.	Consensus=Poly;PacBio=Poly;Sqnm=Poly;pcr454_ss=Poly;pcr454_ps=Poly
diff --git a/tests/vcf-examples/22.vcf b/tests/vcf-examples/22.vcf
deleted file mode 100644
index ffb2fce..0000000
--- a/tests/vcf-examples/22.vcf
+++ /dev/null
@@ -1,1000 +0,0 @@
-##fileformat=VCFv4.0
-##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
-##FilterLiftedVariants="analysis_type=FilterLiftedVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=null excludeIntervals=null reference_sequence=/local/sequence/reference/BWA_ref/hg19/hg19.fasta rodBind=[/local/scratch/xyliu/0.915136538286792.sorted.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION DBSNP=null downsampling_type=null downsample_to_fraction=null downsample_to_coverage=null baq=OFF baqGapOpenPenalty=40.0 perform [...]
-##INFO=<ID=VC,Number=1,Type=String,Description="Variation Class">
-##INFO=<ID=AC,Number=.,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
-##INFO=<ID=AF,Number=.,Type=Float,Description="Allele Frequency, for each ALT allele, in the same order as listed">
-##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
-##INFO=<ID=DB,Number=0,Type=Flag,Description="dbSNP Membership">
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	NA15029	NA15036	NA15038	NA15056b	NA15072	NA15144C	NA15213_006	NA15215A	NA15216_A2	NA15221b	NA15223_6v2	NA15224_4	NA15226A	NA15227b	NA15236_6	NA15242_005	NA15245v2	NA15268	NA15324_A1	NA15385b	NA15386A	NA15510_A1	NA15590_4	NA15594_005	NA18500b	NA18501	NA18502	NA18503	NA18504	NA18505	NA18506	NA18507	NA18508	NA18515	NA18516	NA18517	NA18521	NA18522	NA18523	NA18524_B1	NA18526_B2	NA18529_B1	NA18532_B1	NA18537_B1	NA18540_B1	NA18542_B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	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	./.	0/1	0/1	0/1	0/0	0/1	0/0	0/1	0/1	0/1	0/0	0/1	0/0	1/1	0/1	0/1	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	./.	0/1	0/1	./.	0/1	0/0	0/0	1/1	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0 [...]
-chr1	25799681	.	CTCTG	C	.	PASS	VC=INDEL;AC=49;AF=0.21;AN=230;refseq.name=NM_018202;refseq.positionType=intron	GT	0/1	./.	1/1	./.	0/1	./.	0/1	0/0	0/0	./.	0/0	0/0	0/0	0/1	0/1	1/1	0/1	./.	./.	0/1	1/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	1/1	./.	1/1	0/0	0/1	1/1	./.	0/1	./.	0/1	./.	0/1	0/1	0/0	1/1	0/1	./.	./.	0/1	./.	1/1	0/1	./.	0/1	1/1	./.	./.	0/1	./.	0/1	./.	./.	1/1	./.	0/1	./.	1/1	./.	0/0	./.	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0 [...]
-chr1	26081170	.	CA	C	.	PASS	VC=INDEL;AC=17;AF=0.06;AN=308;refseq.name=NM_020379;refseq.positionType=intron	GT	0/0	./.	0/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	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/1	0/0	./.	0/0	 [...]
-chr1	27737240	.	A	AT	.	PASS	VC=INDEL;AC=0;AF=0;AN=316;refseq.name=NM_006990;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/ [...]
-chr1	27744410	.	GATCCATG	G	.	PASS	VC=INDEL;AC=166;AF=0.56;AN=296;refseq.name=NM_006990;refseq.positionType=intron	GT	0/0	0/1	0/0	0/1	0/1	0/1	0/0	0/1	0/1	0/1	1/1	0/1	0/0	1/1	0/1	0/0	0/0	1/1	./.	0/1	0/0	./.	0/0	./.	0/1	0/1	0/1	1/1	1/1	0/1	1/1	0/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	0/1	0/0	0/0	0/0	1/1	0/0	0/0	0/1	0/0	0/0	0/0	1/1	1/1	0/0	0/0	./.	1/1	0/1	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/1	1/1	0/0	0/1	0/1	0/0	1/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/1	1/1	1/1	1/1	0/1	1/1	1/1	0/0	0/1	0/1	0/1	0/1	1/1	1/1 [...]
-chr1	28156589	.	G	GGATG	.	PASS	VC=INDEL;AC=127;AF=0.4;AN=314;refseq.name=NM_002713;refseq.positionType=promoter	GT	0/0	0/0	1/1	0/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0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	./.	0/1	./.	0/0	0/0	./.	./.	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	./.	0/0	./.	./.	0/0	./.	./.	./ [...]
-chr1	38077349	.	CTTATCCCCATACTAGTTATTATCGAAACCATCAGCCTACTCATTCAACCAATAGCCCTGGCCGTACGCCTA	C	.	PASS	VC=INDEL;AC=209;AF=0.77;AN=272;refseq.name=NM_001038633;refseq.positionType=intron	GT	0/1	1/1	1/1	1/1	1/1	./.	0/1	0/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	0/0	0/1	0/1	0/1	0/0	1/1	0/1	1/1	1/1	1/1	1/1	1/1	0/0	0/0	0/1	1/1	./.	1/1	./.	0/1	1/1	1/1	1/1	./.	./.	1/1	1/1	1/1	./.	1/1	1/1	1/1	./.	1/1	1/1	1/1	./.	./.	1/1	1/1	./.	0/1	./.	1/1	1/1	0/1	0/1	1/1	./.	1/1	1/1	1/1	0/1	 [...]
-chr1	38392549	.	AT	A	.	PASS	VC=INDEL;AC=0;AF=0;AN=316;refseq.name=NM_005540;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	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/0	0/0	0/0	0/0	0/1	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	1/1	0/0	0/0	0/1	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0 [...]
-chr1	40525320	.	AACACAAGAAC	A	.	PASS	VC=INDEL;AC=21;AF=0.11;AN=196;refseq.name=NM_006367;refseq.positionType=intron	GT	./.	./.	0/0	./.	0/0	0/0	0/0	0/0	./.	./.	0/1	0/0	0/0	0/1	1/1	1/1	0/1	./.	1/1	./.	0/0	1/1	0/0	1/1	0/0	0/0	0/0	./.	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	./.	./.	0/1	./.	0/0	./.	./.	./.	0/0	0/0	./.	./.	0/0	./.	./.	./.	./.	./.	./.	./.	0/0	0/0	./.	./.	./.	0/1	0/1	0/0	./.	./.	./.	./.	./.	0/0	./.	./.	./.	./.	./.	./.	0/0	./.	0/0	./.	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	. [...]
-chr1	40728529	.	TA	T	.	PASS	VC=INDEL;AC=216;AF=0.68;AN=316;refseq.name=NM_005857;refseq.positionType=intron	GT	0/1	0/0	1/1	0/1	0/0	0/1	0/1	0/1	0/1	0/1	0/1	0/0	0/1	1/1	0/1	0/0	0/0	0/1	0/1	0/0	0/1	0/0	0/1	0/0	1/1	1/1	1/1	0/1	1/1	0/1	0/1	1/1	1/1	1/1	1/1	0/1	0/1	1/1	0/0	1/1	0/1	0/1	0/1	1/1	0/1	0/1	1/1	1/1	0/1	0/0	1/1	0/1	0/0	1/1	0/1	0/0	0/1	0/1	0/0	1/1	0/0	0/0	0/0	1/1	0/1	1/1	1/1	0/1	0/1	1/1	0/1	1/1	0/1	1/1	0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1	0/1	1/1	0/1	0/0	1/1	0/1	1/1	1/1	0/1	0/1	0/1	1/1	1/1	0/0	1/1	0/1	0/1	0/1	0/1	1/1	0/0	0/1	1 [...]
-chr1	44327106	.	GCTGTCAGGACTTGTATAGA	G	.	PASS	VC=INDEL;AC=193;AF=0.66;AN=294;refseq.name=NM_006279;refseq.positionType=intron	GT	1/1	0/1	1/1	0/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	0/1	./.	0/0	0/1	1/1	1/1	0/0	0/1	0/1	1/1	0/1	0/0	0/1	0/1	0/1	0/1	0/0	0/0	0/0	1/1	0/1	1/1	0/1	0/1	0/1	0/1	0/1	0/1	1/1	1/1	0/1	0/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	0/1	0/1	./.	1/1	1/1	1/1	1/1	./.	0/1	1/1	1/1	0/1	0/1	1/1	1/1	0/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	0/1	1/1	0/1	0/1	0/0	./.	1/1	./.	1/1	1/1	0/1	1/1	1/1	0/1 [...]
-chr1	44730823	.	G	GGAGA	.	PASS	VC=INDEL;AC=295;AF=0.96;AN=306;refseq.name=NM_024066;refseq.positionType=intron	GT	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	0/1	./.	1/1	1/1	1/1	1/1	0/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/ [...]
-chr1	44881687	.	GCAT	G	.	PAS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=17;AF=0.07;AN=230;refseq.name=NM_002525;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	./.	0/0	0/0	./.	0/1	./.	./.	./.	0/0	./.	./.	0/0	./.	./.	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	./.	0/1	0/0	0/1	0/0	./.	0/0	0/0	0/1	0/0	./.	./.	./.	0/1	0/0	0/0	0/0	./.	0/0	./.	0/0	0/0	0/1	0/1	0/1	./.	0/0	0/0	0/0	./.	./.	./.	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/1	./.	0/0	./.	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0 [...]
-chr1	52798171	.	A	AT	.	PASS	VC=INDEL;AC=307;AF=0.97;AN=316;refseq.name=NM_004799;refseq.positionType=intron	GT	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1 [...]
-chr1	53554533	.	A	AT	.	PASS	VC=INDEL;AC=33;AF=0.11;AN=294;refseq.name=NM_006671;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0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0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	 [...]
-chr1	58413348	.	A	AG	.	PASS	VC=INDEL;AC=50;AF=0.22;AN=226;refseq.name=NM_021080;refseq.positionType=intron	GT	0/0	./.	./.	0/1	0/0	./.	0/1	0/1	0/1	1/1	0/0	./.	./.	0/0	0/1	0/1	0/0	0/0	1/1	0/1	1/1	0/0	0/0	0/1	0/0	./.	./.	0/1	./.	./.	0/1	0/0	0/0	0/0	./.	./.	./.	1/1	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	./.	0/0	0/0	0/0	./.	1/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/1	0/0	0/0	0/0	./.	./.	./.	./.	0/1	0/1	./.	0/0	0/0	0/0	./.	0/0	0/0	0/0	./.	./.	./ [...]
-chr1	58550673	.	CT	C	.	PASS	VC=INDEL;AC=0;AF=0;AN=316;refseq.name=NM_021080;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/ [...]
-chr1	58629900	.	CAGA	C	.	PASS	VC=INDEL;AC=15;AF=0.05;AN=316;refseq.name=NM_021080;refseq.positionType=intron	GT	0/0	0/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/1 [...]
-chr1	63987096	.	ATG	A	.	PASS	VC=INDEL;AC=37;AF=0.18;AN=202;refseq.name=NM_014288;refseq.positionType=intron	GT	./.	0/0	0/1	./.	./.	./.	0/0	0/1	./.	./.	./.	0/0	./.	0/1	0/0	0/1	0/0	./.	0/0	./.	./.	0/1	0/0	0/0	0/0	0/0	0/0	./.	./.	0/1	0/0	./.	0/0	./.	0/1	0/0	./.	0/0	0/0	0/0	0/0	./.	./.	0/0	0/1	0/1	./.	./.	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	./.	0/1	./.	0/0	0/0	./.	./.	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	./.	0/0	0/1	0/0	0/1	0/0	./.	0/1	./.	./.	./.	./.	0/0	./.	./.	./.	0/0	./.	0/0	0/0	./.	. [...]
-chr1	64264921	.	TTGTGTCAT	T	.	PASS	VC=INDEL;AC=136;AF=0.46;AN=298;refseq.name=NM_005012;refseq.positionType=intron	GT	0/0	0/0	0/1	0/1	0/0	1/1	0/0	0/1	0/0	0/0	0/1	0/1	1/1	0/1	0/0	0/0	0/0	0/1	0/1	1/1	0/0	0/0	0/0	0/0	1/1	1/1	1/1	1/1	0/1	0/1	1/1	0/1	1/1	1/1	./.	1/1	0/1	1/1	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/0	./.	0/0	./.	0/0	0/0	0/0	0/1	0/0	0/1	0/0	./.	0/0	0/1	0/0	0/1	0/1	./.	0/1	0/0	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/1	0/1	0/0	0/0	0/1	0/1	0/1	0/0	0/1	0/1	0/0	0/1	0/1	0/1	0/1	1/1	0/1	0/1	1/1	0/1	1/1	1/ [...]
-chr1	64463351	.	GT	G	.	PASS	VC=INDEL;AC=244;AF=0.77;AN=316;refseq.name=NM_005012;refseq.positionType=intron	GT	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	0/1	0/1	0/1	1/1	1/1	1/1	1/1	1/1	0/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C=19;AF=0.06;AN=316;refseq.name=NM_001037341;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/ [...]
-chr1	66952677	.	A	ATC	.	PASS	VC=INDEL;AC=158;AF=0.65;AN=244	GT	0/1	1/1	1/1	0/0	1/1	./.	./.	0/1	0/0	0/1	./.	1/1	0/1	0/1	1/1	0/1	0/1	0/1	1/1	1/1	0/0	./.	0/1	1/1	0/1	0/1	0/1	0/1	1/1	./.	1/1	0/1	0/1	0/1	1/1	./.	0/0	0/0	0/0	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	0/0	0/1	0/0	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	./.	1/1	./.	1/1	1/1	./.	1/1	1/1	0/1	0/1	1/1	0/1	./.	0/0	0/0	1/1	0/1	1/1	./.	0/1	0/1	0/1	./.	0/1	./.	0/1	./.	./.	1/1	0/1	./.	./.	0/1	0/1	0/1	./.	1/1	0/1	0/1	0 [...]
-chr1	67152254	.	ATAATTTCACGA	A	.	PASS	VC=INDEL;AC=9;AF=0.03;AN=316;refseq.name=NM_032291;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0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0	0/0	0/0	0/0	0/ [...]
-chr1	77412672	.	T	TCAAA	.	PASS	VC=INDEL;AC=183;AF=0.58;AN=316;refseq.name=NM_030965;refseq.positionType=intron	GT	0/1	0/1	0/0	1/1	1/1	0/1	0/1	1/1	1/1	0/1	0/1	0/1	0/0	1/1	0/1	0/0	0/1	0/1	1/1	0/1	1/1	0/0	1/1	1/1	0/0	0/0	0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/1	1/1	0/0	0/1	0/1	0/0	0/1	0/1	1/1	1/1	0/1	0/0	0/1	0/0	1/1	0/1	1/1	0/1	0/1	0/1	0/0	1/1	0/1	0/0	0/0	0/1	0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	1/1	0/0	0/0	0/0	1/1	1/1	0/0	0/0	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	0/1	1/1	1/1	0/1	1/ [...]
-chr1	77412677	.	C	CAAAC	.	PASS	VC=INDEL;AC=183;AF=0.58;AN=316;refseq.name=NM_030965;refseq.positionType=intron	GT	0/1	0/1	0/0	1/1	1/1	0/1	0/1	1/1	1/1	0/1	0/1	0/1	0/0	1/1	0/1	0/0	0/1	0/1	1/1	0/1	1/1	0/0	1/1	1/1	0/0	0/0	0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/1	1/1	0/0	0/1	0/1	0/0	0/1	0/1	1/1	1/1	0/1	0/0	0/1	0/0	1/1	0/1	1/1	0/1	0/1	0/1	0/0	1/1	0/1	0/0	0/0	0/1	0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	1/1	0/0	0/0	0/0	1/1	1/1	0/0	0/0	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	0/1	1/1	1/1	0/1	1/ [...]
-chr1	77761353	.	ATTCT	A	.	PASS	VC=INDEL;AC=87;AF=0.28;AN=310;refseq.name=NM_174858;refseq.positionType=intron	GT	0/0	0/0	0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0	0/0	0/0	0/0	0/0 [...]
-chr1	86839425	.	TACTT	T	.	PASS	VC=INDEL;AC=15;AF=0.05;AN=280;refseq.name=NM_001007022;refseq.positionType=intron	GT	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	./.	0/0	./.	0/0	0/1	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	./.	0/0	0/0	./.	0/0	 [...]
-chr1	87558067	.	CACATAC	C	.	PASS	VC=INDEL;AC=285;AF=0.97;AN=294;refseq.name=NM_012262;refseq.positionType=intron	GT	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	./.	1/1	0/1	1/1	1/1	1/1	1/1	0/1	./.	1/1	1/1	1/1	 [...]
-chr1	88184554	.	T	TCA	.	PASS	VC=INDEL;AC=40;AF=0.14;AN=276	GT	0/0	0/0	0/0	0/0	./.	./.	0/1	0/1	0/0	0/1	0/1	0/0	0/0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1/1	0/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	0/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	0/1	0/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	0/1	0/1	0/0	0/1	0/1	1/1	1/1	1/1	1/1	0/1	./.	0/1	0/1	0/1	0/ [...]
-chr1	89147233	.	C	CTG	.	PASS	VC=INDEL;AC=270;AF=0.94;AN=288;refseq.name=NM_006256;refseq.positionType=promoter	GT	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	0/1	0/1	./.	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	./.	1/1	./.	./.	1/1	1/1	0/1	0/1	./.	1/1	1/1	1/1	./.	0/ [...]
-chr1	89147234	.	T	TGT	.	PASS	VC=INDEL;AC=193;AF=0.91;AN=212;refseq.name=NM_006256;refseq.positionType=promoter	GT	./.	1/1	1/1	1/1	./.	./.	1/1	1/1	./.	1/1	./.	./.	1/1	1/1	./.	1/1	./.	./.	./.	./.	./.	1/1	1/1	./.	0/1	1/1	0/1	./.	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	0/1	0/1	./.	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	0/1	./.	./.	./.	1/1	1/1	./.	0/1	./.	1/1	1/1	1/1	./.	0/ [...]
-chr1	90055475	.	TT	T	.	PASS	VC=INDEL;AC=35;AF=0.11;AN=316;refseq.name=NM_015350;refseq.positionType=intron	GT	0/1	0/0	0/0	1/1	0/0	0/1	1/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/1	0/1	0/0	1/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/1	0/0	1/1	0/1	0/1	0/0	0/1	1/1	0/0	0/0	0/0	0/0	0/0	1/1	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/ [...]
-chr1	90055577	.	TATG	T	.	PASS	VC=INDEL;AC=0;AF=0;AN=316;refseq.name=NM_015350;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	 [...]
-chr1	90305331	.	G	GA	.	PASS	VC=INDEL;AC=301;AF=0.95;AN=316;refseq.name=N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0/0	./.	0/1	0/0	0/0	0/0	0/0	./.	./.	0/0	0/0	./.	0/0	0/0	./.	./.	./ [...]
-chr1	97654513	.	GTTAT	G	.	PASS	VC=INDEL;AC=17;AF=0.06;AN=302;refseq.name=NM_000110;refseq.positionType=intron	GT	./.	0/0	0/0	0/0	./.	0/0	./.	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/1	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	./.	0/0	0/1	0/0	0/0	0/0	0/0 [...]
-chr1	97728316	.	AATA	A	.	PASS	VC=INDEL;AC=15;AF=0.05;AN=316;refseq.name=NM_000110;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/1	0/0	0/1	0/1	 [...]
-chr1	97862494	.	TCCT	T	.	PASS	VC=INDEL;AC=47;AF=0.18;AN=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INDEL;AC=54;AF=0.17;AN=312;refseq.name=NM_007269;refseq.positionType=intron	GT	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/0	0/1	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	./.	0/1	0/1	0/0	0/1	0/0	0/0	0/0	./.	0/1	0/1	0 [...]
-chr1	109295955	.	TTA	T	.	PASS	VC=INDEL;AC=57;AF=0.18;AN=310;refseq.name=NM_007269;refseq.positionType=intron	GT	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/0	0/1	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/1	0/1	 [...]
-chr1	109303951	.	GTATAG	G	.	PASS	VC=INDEL;AC=89;AF=0.28;AN=316;refseq.name=NM_007269;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/1	1/1	0/1	0/1	1/1	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/1	1/1	0/1	0/1	1/1	0/0	0/0	1/1	0/0	0/1	0/0	1/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	1/1	1/1	1/1	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/0	0 [...]
-chr1	109429108	.	G	GGAGAAAT	.	PASS	VC=INDEL;AC=33;AF=0.14;AN=234;refseq.name=NM_013296;refseq.positionType=intron	GT	0/1	./.	./.	0/0	0/0	0/0	0/0	0/1	./.	0/1	0/0	./.	0/1	./.	./.	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	./.	0/1	./.	./.	0/1	./.	0/1	0/1	./.	./.	./.	0/1	./.	0/1	./.	0/1	0/1	./.	./.	0/1	./.	0/1	0/1	./.	0/1	0/1	0/1	0/1	0/1	0/1	0/1	0/1	./.	./.	./.	0/1	./.	0/1	./.	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	./.	./.	0/0	./.	0/0 [...]
-chr1	109565068	.	C	CTC	.	PASS	VC=INDEL;AC=304;AF=0.96;AN=316;refseq.name=NM_014969;refseq.positionType=intron	GT	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/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	.	PASS	VC=INDEL;AC=77;AF=0.25;AN=310;refseq.name=NM_007348;refseq.positionType=intron	GT	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/1	0/0	1/1	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/0	0/0	1/1	0/1	1/1	0/1	0/1	0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/1	1/1	0/1	0/1	0/1	0/1	0/0	0/0	0/1	0/0	./.	0/1	0/0	0/1	0/0	0/0	0/1	0/1	0/1	0/0	0/0	0/0	0/1	0/1	0/1	0/0	1/1	1/1	0/0	0/0	0/0	0/1	0/1	1/1	0/0	0/0	0/1	0/1	0/1	0/0	0/1	0/1	0/0	0/0	0/0	0/1	0/1	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0 [...]
-chr1	161826110	.	TT	T	.	PASS	VC=INDEL;AC=0;AF=0;AN=308;refseq.name=NM_007348;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0 [...]
-chr1	162354200	.	AACAC	A	.	PASS	VC=INDEL;AC=32;AF=0.12;AN=262;refseq.name=NM_001085375;refseq.positionType=exon	GT	0/1	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	1/1	1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/0	0/0	0/0	0/0	0/0	0/0 [...]
-chr1	167697899	.	GTG	G	.	PASS	VC=INDEL;AC=50;AF=0.16;AN=316;refseq.name=NM_003953;refseq.positionType=intron	GT	0/0	0/1	1/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/0	0/1	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/1	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/1	 [...]
-chr1	167985326	.	TG	T	.	PASS	VC=INDEL;AC=144;AF=0.49;AN=294;refseq.name=NM_001017977;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/1	0/1	./.	0/1	0/0	0/1	0/0	0/1	0/1	0/0	0/1	0/0	0/0	1/1	0/0	0/1	0/1	1/1	1/1	0/0	0/1	0/1	1/1	./.	0/1	0/1	0/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	1/1	0/1	0/0	0/0	0/0	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/1	0/1	1/1	0/0	0/0	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	0/0	1/1	1/1	./.	1/1	1/1	0/1	0 [...]
-chr1	168053859	.	ACTCA	A	.	PASS	VC=INDEL;AC=11;AF=0.03;AN=316;refseq.name=NM_153832;refseq.positionType=terminator	GT	0/0	0/0	0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0/0	0/1	0/1	0/1	0/0	0/1	0/0	0/0	0/0	1/1	0/1	1/1	0/0	0/1	0/0	1/1	0/1	0/1	0/1	0/0	0/0	0/1	0/1	0/1	0/0	0/0	 [...]
-chr1	173063473	.	A	ATGTC	.	PASS	VC=INDEL;AC=124;AF=0.62;AN=200	GT	0/0	0/1	0/1	./.	0/1	./.	./.	1/1	0/1	0/0	0/1	./.	0/1	1/1	./.	./.	0/0	0/1	0/1	./.	1/1	1/1	0/1	1/1	0/0	1/1	0/0	1/1	./.	1/1	0/0	1/1	1/1	./.	./.	./.	./.	./.	./.	1/1	./.	0/1	./.	1/1	0/1	1/1	./.	1/1	./.	0/1	./.	0/1	1/1	./.	1/1	0/1	./.	0/1	0/1	./.	./.	0/1	0/1	./.	./.	0/1	./.	0/1	./.	./.	0/1	./.	1/1	0/1	./.	1/1	./.	./.	0/1	./.	1/1	1/1	./.	1/1	0/1	./.	./.	0/0	./.	0/1	1/1	1/1	./.	1/1	1/1	0/0	./.	./.	0/1	0/0	./.	./.	1/1	1/1	1/1	1/1	1/ [...]
-chr1	173541560	.	CAA	C	.	PASS	VC=INDEL;AC=233;AF=0.74;AN=316;refseq.name=NM_178527;refseq.positionType=intron	GT	0/0	0/1	1/1	0/0	1/1	1/1	0/1	1/1	1/1	0/0	1/1	1/1	0/1	0/1	0/0	0/1	0/0	0/1	0/1	0/1	0/0	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	0/1	1/1	1/1	1/1	0/1	1/1	0/1	0/1	0/1	1/1	0/1	0/1	1/1	0/0	1/1	0/0	1/1	1/1	1/1	0/1	0/1	0/1	0/1	0/1	1/1	0/0	0/0	0/1	1/1	0/1	0/1	0/0	1/1	1/1	1/1	1/1	0/1	1/1	1/1	0/1	1/1	0/1	1/1	0/1	1/1	0/1	0/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	0/1	1/1	0/0	0/1 [...]
-chr1	173749093	.	T	TC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=INDEL;AC=14;AF=0.04;AN=316;refseq.name=NM_003285;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0 [...]
-chr1	175584762	.	CT	C	.	PASS	VC=INDEL;AC=45;AF=0.14;AN=314;refseq.name=NM_003285;refseq.positionType=intron	GT	0/0	0/0	0/1	0/0	0/0	0/1	1/1	0/1	0/1	0/0	1/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/1	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0 [...]
-chr1	177236388	.	C	CG	.	PASS	VC=INDEL;AC=167;AF=0.54;AN=312;refseq.name=NM_021165;refseq.positionType=intron	GT	1/1	0/1	0/0	0/1	0/1	0/1	1/1	0/1	1/1	0/1	0/1	0/0	1/1	1/1	0/1	1/1	0/1	0/1	0/0	0/1	1/1	1/1	0/1	1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0/0	0/0	 [...]
-chr1	179724329	.	G	GG	.	PASS	VC=INDEL;AC=307;AF=0.97;AN=316;refseq.name=NM_173509;refseq.positionType=intron	GT	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	 [...]
-chr1	179762445	.	GT	G	.	PASS	VC=INDEL;AC=85;AF=0.27;AN=316;refseq.name=NM_173509;refseq.positionType=intron	GT	0/1	0/0	0/0	0/0	0/0	0/0	0/0	1/1	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/1	0/1	0/1	0/1	0/0	0/1	1/1	0/1	1/1	1/1	1/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/0	0/0	0/1	0/0	0/0	0/1	0/1	0/1	0/0	1/1	0/1	1 [...]
-chr1	179762446	.	TT	T	.	PASS	VC=INDEL;AC=85;AF=0.27;AN=316;refseq.name=NM_173509;refseq.positionType=intron	GT	0/1	0/0	0/0	0/0	0/0	0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0	0/0	0/0	0/0	0/0	0 [...]
-chr1	185540897	.	T	TCCAG	.	PASS	VC=INDEL;AC=136;AF=0.48;AN=286	GT	0/0	0/1	0/0	0/1	0/0	./.	0/1	0/1	0/1	0/1	0/0	0/1	./.	1/1	./.	0/1	0/1	0/1	0/0	0/1	./.	0/1	0/1	0/0	1/1	0/1	0/1	1/1	1/1	0/1	0/1	1/1	0/1	0/1	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	./.	0/1	0/1	./.	0/0	0/1	0/0	./.	0/0	0/0	./.	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/1	0/0	0/1	./.	0/0	0/0	0/1	0/1	1/1	1/1	0/1	./.	0/1	1/1	1/1	1/1	./.	0/1	1/1	./.	0/1	0/1	0/1	1/1	1/1	0/0	1/1	0/1	0/1	0/1	1/1	1/1	0/1	0/ [...]
-chr1	185865550	.	C	CAT	.	PASS	VC=INDEL;AC=53;AF=0.17;AN=310;refseq.name=NM_031935;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/1	0/1	0/0	0/1	0/0	0/1	0/0	0/1	0/1	0/1	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/1	0/0	0/0	0/0	./.	0/1	0/0	0/0	0/0	0/1	 [...]
-chr1	186378142	.	CAGTT	C	.	PASS	VC=INDEL;AC=55;AF=0.21;AN=266;refseq.name=NM_017847;refseq.positionType=intron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positionType=intron	GT	1/1	0/0	0/1	1/1	1/1	0/1	0/1	1/1	0/1	1/1	0/0	0/1	0/1	1/1	1/1	0/1	0/1	0/1	1/1	0/1	1/1	1/1	0/1	1/1	1/1	0/1	0/1	1/1	0/1	1/1	0/1	0/0	0/1	0/1	1/1	0/1	0/1	./.	0/0	0/0	0/1	1/1	0/1	0/1	0/1	./.	1/1	0/1	0/1	1/1	1/1	./.	1/1	0/1	0/0	1/1	0/0	1/1	1/1	1/1	0/1	1/1	1/1	0/1	0/1	1/1	./.	1/1	0/0	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	0/0	1/1	0/1	0/0	0/0	0/0	0/1	./.	0/1	0/1	0/1	0/1	./.	0/1	0/0	0/0	0/0	0/0 [...]
-chr1	205036040	.	T	TG	.	PASS	VC=INDEL;AC=69;AF=0.23;AN=302;refseq.name=NM_005076;refseq.positionType=intron	GT	0/1	0/1	0/0	0/0	0/1	0/1	0/1	0/0	0/0	1/1	./.	1/1	0/1	0/1	0/1	0/1	1/1	1/1	0/0	0/1	0/0	0/1	0/0	0/1	./.	0/0	0/1	0/1	0/1	0/0	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	1/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	./.	0/0	0/1	0/0	0/0	0/1	0/1	1/1	0/0	0/0	0/0	0 [...]
-chr1	205036041	.	G	GG	.	PASS	VC=INDEL;AC=71;AF=0.23;AN=310;refseq.name=NM_005076;refseq.positionType=intron	GT	0/1	0/1	0/0	0/0	0/1	0/1	0/1	0/0	0/0	1/1	0/1	1/1	0/1	0/1	0/1	0/1	1/1	1/1	0/0	0/1	0/0	0/1	0/0	0/1	0/1	0/0	0/1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...]
-chr1	207641329	.	TTAAG	T	.	PASS	VC=INDEL;AC=13;AF=0.06;AN=216;refseq.name=NM_001006658;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	./.	./.	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	./.	./.	./.	./.	./.	./.	0/0	./.	0/0	0/1	0/0	./.	0/0	./.	./.	./.	./.	0/0	./.	0/1	./.	0/0	0/0	./.	./.	./.	./.	0/0	0/0	0/1	./.	./.	./.	0/0	0/0	./.	0/0	0/0	./.	0/0	./.	0/0	0/0	0/0	./.	0/0	0/0	0/0	./.	0/1	0/0	0/0	0/1	./. [...]
-chr1	207824638	.	A	AATTC	.	PASS	VC=INDEL;AC=153;AF=0.48;AN=316;refseq.name=NM_175710;refseq.positionType=intron	GT	0/0	0/1	0/0	1/1	0/0	0/1	0/1	1/1	0/1	0/1	1/1	1/1	0/0	0/0	0/0	0/1	0/1	1/1	0/1	0/0	0/0	0/1	0/1	0/0	1/1	1/1	0/1	0/1	1/1	0/1	0/0	1/1	0/1	0/1	0/1	0/1	0/1	0/1	0/1	0/0	0/0	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	1/1	0/0	0/0	0/1	0/0	0/1	0/0	1/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	1/1	0/1	0/0	1/1	0/0	0/0	0/0	0/1	0/0	0/1	1/1	1/1	1/1	0/1	0/1	0/1	0/1	1/1	1/1	0/1	0/1	0/1	0/0	0/1	0 [...]
-chr1	208201207	.	GT	G	.	PASS	VC=INDEL;AC=0;AF=0;AN=316;refseq.name=NM_025179;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0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	0/0	0/0	0/0	0/0	0/0	0/0	0 [...]
-chr1	216835074	.	A	AGTTT	.	PASS	VC=INDEL;AC=89;AF=0.28;AN=316;refseq.name=NM_206594;refseq.positionType=intron	GT	0/0	0/0	0/1	0/0	1/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	1/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	1/1	0/1	0/1	0/0	0/0	0/1	1/1	0/0	0/1	0/1	1/1	0/0	0/1	0/0	0/1	1/1	0/0	0/1	0/1	0/1	1/1	0/0	0/1	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/1	1/1	0/1	0/1	0/1	0/1	1/1	0/0	0/1	0/1	0/0	0/0	0/0	1/1	0/1	0/1	0/1	0/1	0/1	0/1	0/1	0/1	0/0	0/ [...]
-chr1	217026745	.	AA	A	.	PASS	VC=INDEL;AC=13;AF=0.04;AN=304;refseq.name=NM_206594;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0 [...]
-chr1	217057204	.	G	GC	.	PASS	VC=INDEL;AC=231;AF=0.73;AN=316;refseq.name=NM_206594;refseq.positionType=intron	GT	0/1	0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0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	 [...]
-chr1	224264255	.	A	AG	.	PASS	VC=INDEL;AC=150;AF=0.66;AN=228	GT	0/1	1/1	0/1	0/1	1/1	./.	0/1	./.	1/1	1/1	./.	./.	./.	1/1	./.	0/1	0/0	./.	./.	0/1	1/1	0/1	0/1	0/1	./.	0/1	1/1	1/1	1/1	1/1	0/1	./.	1/1	./.	0/1	0/1	0/0	1/1	0/0	1/1	1/1	1/1	./.	1/1	./.	0/1	1/1	./.	0/1	1/1	1/1	1/1	1/1	1/1	./.	0/1	./.	1/1	1/1	0/1	1/1	1/1	./.	0/1	1/1	0/1	1/1	./.	1/1	./.	0/1	1/1	0/0	./.	1/1	1/1	./.	./.	1/1	1/1	0/1	./.	0/0	0/1	0/1	./.	0/0	1/1	0/1	0/1	1/1	./.	1/1	./.	./.	1/1	0/0	0/1	./.	1/1	0/0	./.	0/1	0/0	0/1	./.	./.	1 [...]
-chr1	224264346	.	TGAG	T	.	PASS	VC=INDEL;AC=154;AF=0.63;AN=244	GT	0/1	1/1	0/1	0/1	1/1	./.	./.	1/1	./.	1/1	0/0	1/1	1/1	./.	0/1	./.	0/1	./.	1/1	0/1	1/1	0/1	0/1	./.	0/1	0/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	./.	0/1	0/1	0/0	./.	0/0	1/1	1/1	1/1	0/1	1/1	./.	0/1	1/1	./.	0/1	1/1	1/1	1/1	1/1	1/1	./.	0/1	./.	1/1	1/1	0/1	1/1	1/1	0/1	0/1	./.	./.	./.	0/1	./.	1/1	0/1	./.	0/0	./.	./.	1/1	0/1	./.	1/1	./.	0/1	./.	0/0	0/1	0/1	./.	0/0	1/1	0/1	0/1	./.	1/1	./.	0/1	0/1	1/1	0/0	0/1	./.	1/1	0/0	0/0	0/1	0/0	0/1	1/1	1/1 [...]
-chr1	224833844	.	A	AAGACGTAAGACAGT	.	PASS	VC=INDEL;AC=215;AF=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226913051	.	CACC	C	.	PASS	VC=INDEL;AC=6;AF=0.02;AN=280;refseq.name=NM_002221;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	./.	0/0	./.	0/0	0/0	0/0	0/1	./.	0/1	0/0	0/0	0/0	 [...]
-chr1	227051261	.	G	GC	.	PASS	VC=INDEL;AC=21;AF=0.07;AN=314	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	1/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/ [...]
-chr1	227252431	.	TTTC	T	.	PASS	VC=INDEL;AC=21;AF=0.07;AN=316;refseq.name=NM_003607;refseq.positionType=intron	GT	0/1	1/1	0/0	0/0	0/1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0	./.	0/0	0/1	0/0	0/0	0/0 [...]
-chr1	236848307	.	A	AG	.	PASS	VC=INDEL;AC=62;AF=0.21;AN=300;refseq.name=NM_001103;refseq.positionType=promoter	GT	0/0	0/0	0/1	0/0	0/1	0/1	0/1	0/1	0/1	0/0	0/0	0/0	0/0	0/1	0/1	./.	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/1	0/0	./.	./.	0/0	1/1	0/0	1/1	0/0	0/0	0/0	0/1	0/0	1/1	0/0	0/0	0/1	0/1	0/1	0/0	0/1	0/1	0/1	0/0	0/1	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/1	1/1	1/1	0/0	0/1	0/1	0/0	0/0	0/0	0/0	0/0	0/0 [...]
-chr1	237009685	.	TAGC	T	.	PASS	VC=INDEL;AC=6;AF=0.02;AN=292;refseq.name=NM_000254;refseq.positionType=intron	GT	0/1	0/0	0/0	./.	0/1	0/0	0/0	./.	0/0	0/0	./.	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	./.	 [...]
-chr1	237009687	.	GCAG	G	.	PASS	VC=INDEL;AC=3;AF=0.01;AN=304;refseq.name=NM_000254;refseq.positionType=intron	GT	0/1	0/0	0/0	0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.	PASS	VC=INDEL;AC=180;AF=0.73;AN=248;refseq.name=NM_020066;refseq.positionType=intron	GT	./.	0/1	1/1	./.	1/1	0/1	1/1	1/1	./.	0/1	1/1	0/1	1/1	0/1	./.	0/0	1/1	1/1	0/0	0/1	1/1	1/1	1/1	0/0	1/1	1/1	1/1	./.	./.	./.	0/1	1/1	0/1	1/1	0/1	1/1	1/1	1/1	0/1	./.	0/1	0/1	0/1	./.	0/1	1/1	0/0	1/1	0/1	1/1	0/0	1/1	0/1	0/0	0/1	./.	1/1	1/1	1/1	0/1	0/1	1/1	0/0	1/1	./.	0/0	0/0	0/1	./.	0/1	1/1	1/1	0/1	1/1	1/1	1/1	0/1	0/0	0/1	0/1	1/1	0/1	./.	./.	./.	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	 [...]
-chr1	240750353	.	A	AT	.	PASS	VC=INDEL;AC=1;AF=0;AN=208;refseq.name=NM_022469;refseq.positionType=intron	GT	0/0	0/0	./.	./.	0/0	0/0	./.	./.	./.	0/0	./.	0/0	0/0	0/0	./.	0/0	./.	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	./.	./.	./.	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	./.	./.	0/0	./.	0/0	./.	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	0/0	0/0	0/0	0/0	0/0	0/0	./.	./.	0/0	./.	0/0	./.	0/0	0/0	0/0	./.	./.	0/0	0/0	0/0	./.	./.	0/0	0/0	0/0	./.	0/0	0 [...]
-chr1	241292738	.	CGAC	C	.	PASS	VC=INDEL;AC=16;AF=0.06;AN=254;refseq.name=NM_002924;refseq.positionType=intron	GT	0/0	0/0	0/0	0/0	0/0	./.	0/0	1/1	0/0	0/0	0/1	0/0	0/0	./.	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/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ASS	VC=INDEL;AC=59;AF=0.22;AN=270;refseq.name=NM_152666;refseq.positionType=intron	GT	0/1	./.	0/1	0/0	0/0	0/1	0/1	0/1	1/1	0/0	0/1	0/1	0/1	0/0	0/0	0/0	0/0	0/1	0/1	./.	0/0	0/1	0/0	0/1	0/0	0/1	./.	./.	./.	0/1	0/0	0/0	0/0	0/0	0/0	./.	0/0	0/0	./.	0/0	0/1	0/0	0/0	0/1	0/1	0/0	0/0	0/0	0/0	./.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	./.	0/1	0/1	./.	./.	0/1	0/1	0/0	0/0	0/0	0/1	0/1	0/0	0/1	0/1	0 [...]
-chr1	242281287	.	T	TCT	.	PASS	VC=INDEL;AC=296;AF=0.95;AN=312;refseq.name=NM_152666;refseq.positionType=intron	GT	1/1	0/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	0/1	1/1	1/1	0/1	0/0	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	0/1	1/1	1/1	1/1	1/1	1/1	1/1	./.	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1 [...]
-chr1	242328018	.	CATTACACTACTTTT	C	.	PASS	VC=INDEL;AC=97;AF=0.4;AN=244;refseq.name=NM_152666;refseq.positionType=intron	GT	1/1	0/1	0/1	./.	1/1	0/0	0/1	0/0	1/1	0/1	./.	0/0	./.	0/1	0/0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 [...]
-chr1	246124841	.	A	AAACAGAAG	.	PASS	VC=INDEL;AC=316;AF=1;AN=316;refseq.name=NM_022743;refseq.positionType=intron	GT	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	 [...]
-chr1	246124843	.	A	ACAGAAGAA	.	PASS	VC=INDEL;AC=316;AF=1;AN=316;refseq.name=NM_022743;refseq.positionType=intron	GT	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	1/1	 [...]
-chr1	246149511	.	C	CT	.	PASS	VC=INDEL;AC=69;AF=0.32;AN=214;refseq.name=NM_022743;refseq.positionType=intron	GT	1/1	./.	0/1	0/1	1/1	./.	0/1	1/1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	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	 [...]
-chr2	3424142	.	CGCTGAC	C	.	PASS	VC=INDEL;AC=112;AF=0.46;AN=244;refseq.name=NM_016030;refseq.positionType=intron	GT	0/1	0/1	./.	0/0	0/1	./.	1/1	0/1	0/1	0/0	./.	1/1	0/0	0/1	./.	./.	0/1	0/0	0/0	0/1	./.	0/1	1/1	./.	0/0	0/1	./.	1/1	0/1	0/1	0/1	./.	./.	0/0	0/0	./.	1/1	1/1	1/1	0/0	0/0	0/0	1/1	0/0	0/1	./.	0/0	0/0	0/1	0/0	0/0	0/0	0/0	1/1	0/1	0/1	0/0	0/0	./.	0/0	0/0	0/0	0/0	1/1	0/0	0/1	1/1	0/0	1/1	0/1	1/1	./.	0/0	1/1	0/0	0/0	0/0	0/1	0/0	0/0	./.	0/1	./.	./.	./.	0/1	0/1	1/1	1/1	./.	1/1	./.	0/0	./.	0 [...]
-chr2	3658789	.	ACAAA	A	.	PASS	VC=INDEL;AC=95;AF=0.33;AN=284;refseq.name=NM_024027;refseq.positionType=intron	GT	0/1	0/1	0/0	0/1	0/1	0/1	0/1	./.	0/0	0/1	0/0	0/0	0/1	0/0	./.	0/1	0/1	./.	0/1	0/1	0/1	0/1	0/1	0/1	0/1	0/1	0/0	0/1	0/0	0/1	0/1	0/0	0/1	0/1	0/1	0/1	0/0	0/0	0/0	0/1	0/1	0/1	0/1	0/1	0/1	./.	0/1	0/1	0/1	0/0	0/0	0/1	0/1	0/0	0/1	0/1	0/1	0/1	0/1	0/1	0/0	0/0	0/1	0/1	0/1	0/1	./.	0/1	0/1	0/1	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	0/0	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	1/1	0/0	0/0	0/0	0/0	0/1	0/1	1/1	0/0	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/1	0/1	0/0	0/0 [...]
-chr2	58385307	.	T	TTACT	.	PASS	VC=INDEL;AC=79;AF=0.25;AN=316;refseq.name=NM_006296;refseq.positionType=intron	GT	0/1	0/1	0/1	0/1	0/0	0/0	0/0	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/0	1/1	0/1	0/0	0/1	1/1	0/0	0/0	0/0	0/0	0/1	0/1	0/0	0/0	0/1	0/0	0/1	0/0	1/1	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/1	0/1	0/1	0/1	0/1	0/1	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/1	0/0	0/1	0/0	0/1	0/0	0/0	0/0	1/1	0/0	0/0	0/0	0/0	0/1	0/1	1/1	0/0	0/1	0/1	0/0	0/1	0/0	0/0	0/0	0/1	0/0	0/1	0/1	0/0	0/1	0/1	0/0	0/0 [...]
diff --git a/tests/vcf-examples/23.vcf b/tests/vcf-examples/23.vcf
deleted file mode 100644
index 9c9ed12..0000000
--- a/tests/vcf-examples/23.vcf
+++ /dev/null
@@ -1,419 +0,0 @@
-##fileformat=VCFv4.1
-##ApplyRecalibration="analysis_type=ApplyRecalibration input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/combined.phase1.chr20.raw.indels.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample [...]
-##CombineVariants="analysis_type=CombineVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20:41000001-42000000] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/chr20/AFR/AFR.phase1.chr20.42.raw.indels.vcf, /humgen/gsa-hpprojects/dev/delangel/Phase1Calls/20110608VQSRConsensus/calls/chr20/ASN/ASN.phase1.chr20.42. [...]
-##FILTER=<ID=BothStrands,Description="Variant not seen on both strands">
-##FILTER=<ID=HARD_TO_VALIDATE,Description="MQ0 >= 4 && (MQ0 / (1.0 * DP)) > 0.1">
-##FILTER=<ID=HP10,Description="Variant occurs in long homopolymer run (>10)">
-##FILTER=<ID=HaplotypeScore,Description="HaplotypeScore>20.0">
-##FILTER=<ID=HighCoverage,Description="Coverage at variant site is > 7500">
-##FILTER=<ID=HomopolymerRun,Description="HRun>=15">
-##FILTER=<ID=LongRepeat,Description="Variant occurs in long tandem repeat (as defined by 1kg phase one filters)">
-##FILTER=<ID=LowQual,Description="QUAL<30.0">
-##FILTER=<ID=PP20,Description="Variant posterior phred is < 20">
-##FILTER=<ID=QualByDepth,Description="QD<1.0">
-##FILTER=<ID=StrandBias,Description="SB>=-1.0">
-##FILTER=<ID=TruthSensitivityTranche93.00to94.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.9628 <= x < 4.1824">
-##FILTER=<ID=TruthSensitivityTranche94.00to95.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.7129 <= x < 3.9628">
-##FILTER=<ID=TruthSensitivityTranche95.00to96.00,Description="Truth sensitivity tranche level at VSQ Lod: 3.3717 <= x < 3.7129">
-##FILTER=<ID=TruthSensitivityTranche96.00to97.00,Description="Truth sensitivity tranche level at VSQ Lod: 2.8762 <= x < 3.3717">
-##FILTER=<ID=TruthSensitivityTranche97.00to98.00,Description="Truth sensitivity tranche level at VSQ Lod: 2.2618 <= x < 2.8762">
-##FILTER=<ID=TruthSensitivityTranche98.00to99.00+,Description="Truth sensitivity tranche level at VQS Lod < 1.2907">
-##FILTER=<ID=TruthSensitivityTranche98.00to99.00,Description="Truth sensitivity tranche level at VSQ Lod: 1.2907 <= x < 2.2618">
-##FORMAT=<ID=AA,Number=1,Type=Integer,Description="Alternate allele observations">
-##FORMAT=<ID=AD,Number=.,Type=Integer,Description="Allelic depths for the ref and alt alleles in the order listed">
-##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth (only filtered reads used for calling)">
-##FORMAT=<ID=FT,Number=1,Type=String,Description="Sample Genotype Filter">
-##FORMAT=<ID=GL,Number=3,Type=Integer,Description="Genotype Likelihood, log-scaled likeilhoods of the data given the called genotype for each possible genotype generated from the reference and alternate alleles given the sample ploidy">
-##FORMAT=<ID=GQ,Number=1,Type=Float,Description="Genotype Quality">
-##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
-##FORMAT=<ID=HQ,Number=.,Type=Integer,Description="Haplotype Quality">
-##FORMAT=<ID=PL,Number=3,Type=Float,Description="Normalized, Phred-scaled likelihoods for AA,AB,BB genotypes where A=ref and B=alt; not applicable if site is not biallelic">
-##FORMAT=<ID=RA,Number=1,Type=Integer,Description="Reference allele observations">
-##FORMAT=<ID=SA,Number=1,Type=Integer,Description="Number of alternate observations by strand, delimited by |: [forward]|[reverse]">
-##FORMAT=<ID=SP,Number=1,Type=Integer,Description="Phred-scaled strand bias P-value">
-##FORMAT=<ID=SR,Number=1,Type=Integer,Description="Number of reference observations by strand, delimited by |: [forward]|[reverse]">
-##INFO=<ID=AA,Number=1,Type=Integer,Description="Alternate allele observations">
-##INFO=<ID=AB,Number=1,Type=Float,Description="Allele balance at heterozygous sites: a number between 0 and 1 representing the ratio of reads showing the reference allele to all reads, considering only reads from individuals called as heterozygous">
-##INFO=<ID=ABA,Number=1,Type=Integer,Description="Alternate allele balance count: the number of sequence reads from apparent heterozygotes supporting the alternate allele">
-##INFO=<ID=ABP,Number=1,Type=Float,Description="Allele balance probability at heterozygous sites: Phred-scaled upper-bounds estimate of the probability of observing the deviation between ABR and ABA given E(ABR/ABA) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=ABR,Number=1,Type=Integer,Description="Reference allele balance count: the number of sequence reads from apparent heterozygotes supporting the reference allele">
-##INFO=<ID=AC,Number=.,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
-##INFO=<ID=AF,Number=.,Type=Float,Description="Allele Frequency, for each ALT allele, in the same order as listed">
-##INFO=<ID=AF1,Number=1,Type=Float,Description="Max-likelihood estimate of the site allele frequency of the first ALT allele">
-##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
-##INFO=<ID=BL,Number=1,Type=Integer,Description="Base Pairs Left: number of base pairs in reads supporting the alternate to the left (5') of the alternate allele">
-##INFO=<ID=BR,Number=1,Type=Integer,Description="Base Pairs Right: number of base pairs in reads supporting the alternate to the right (3') of the alternate allele">
-##INFO=<ID=BVAR,Number=0,Type=Flag,Description="The best genotype combination in the posterior is variant (non homozygous).">
-##INFO=<ID=BaseQRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt Vs. Ref base qualities">
-##INFO=<ID=CI95,Number=2,Type=Float,Description="Equal-tail Bayesian credible interval of the site allele frequency at the 95% level">
-##INFO=<ID=CpG,Number=0,Type=Flag,Description="CpG site (either CpG, TpG or CpA)">
-##INFO=<ID=DB,Number=0,Type=Flag,Description="dbSNP Membership">
-##INFO=<ID=DEL,Number=0,Type=Flag,Description="deletion allele">
-##INFO=<ID=DP,Number=1,Type=Integer,Description="Filtered Depth">
-##INFO=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
-##INFO=<ID=DS,Number=0,Type=Flag,Description="Were any of the samples downsampled?">
-##INFO=<ID=Dels,Number=1,Type=Float,Description="Fraction of Reads Containing Spanning Deletions">
-##INFO=<ID=EL,Number=1,Type=Integer,Description="Allele End Left: number of observations of the alternate where the alternate occurs in the left end of the read">
-##INFO=<ID=EPP,Number=1,Type=Float,Description="End Placement Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between EL and ER given E(EL/ER) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=ER,Number=1,Type=Integer,Description="Allele End Right: number of observations of the alternate where the alternate occurs in the right end of the read">
-##INFO=<ID=FQ,Number=1,Type=Float,Description="Phred probability that sample chromosomes are not all the same">
-##INFO=<ID=FR,Number=0,Type=Float,Description="Estimated population frequency">
-##INFO=<ID=FS,Number=1,Type=Float,Description="Phred-scaled p-value using Fisher's exact test to detect strand bias">
-##INFO=<ID=HETAR,Number=1,Type=Integer,Description="Number of individuals heterozygous alternate / reference">
-##INFO=<ID=HOMA,Number=1,Type=Integer,Description="Number of individuals homozygous for the alternate">
-##INFO=<ID=HOMR,Number=1,Type=Integer,Description="Number of individuals homozygous for the reference">
-##INFO=<ID=HP,Number=1,Type=Integer,Description="Homopolmer run length">
-##INFO=<ID=HPLen,Number=1,Type=Integer,Description="Homopolymer length">
-##INFO=<ID=HR,Number=1,Type=Integer,Description="Homopolymer run length">
-##INFO=<ID=HRun,Number=1,Type=Integer,Description="Largest Contiguous Homopolymer Run of Variant Allele In Either Direction">
-##INFO=<ID=HU,Number=1,Type=String,Description="Homopolymer run unit (stranded)">
-##INFO=<ID=HaplotypeScore,Number=1,Type=Float,Description="Consistency of the site with at most two segregating haplotypes">
-##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Not provided in original VCF header">
-##INFO=<ID=INS,Number=0,Type=Flag,Description="insertion allele">
-##INFO=<ID=InbreedingCoeff,Number=1,Type=Float,Description="Inbreeding coefficient as estimated from the genotype likelihoods per-sample when compared against the Hardy-Weinberg expectation">
-##INFO=<ID=IndelType,Number=1,Type=String,Description="Indel type description">
-##INFO=<ID=KGPilot123,Number=0,Type=Flag,Description="1000 Genome discovery all pilots 2010(1,2,3)">
-##INFO=<ID=LEN,Number=1,Type=Integer,Description="allele length">
-##INFO=<ID=LRB,Number=1,Type=Float,Description="((max(BR, BL) / (BR + BL)) - 0.5) * 2 : The proportion of base pairs in reads on one side of the alternate allele relative to total bases, scaled from [0.5,1] to [0,1]">
-##INFO=<ID=LRBP,Number=1,Type=Float,Description="Left-Right Balance Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between BL and BR given E(BR/BL) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=MNP,Number=0,Type=Flag,Description="MNP allele">
-##INFO=<ID=MQ,Number=1,Type=Float,Description="RMS Mapping Quality">
-##INFO=<ID=MQ0,Number=1,Type=Integer,Description="Total Mapping Quality Zero Reads">
-##INFO=<ID=MQ0Fraction,Number=1,Type=Float,Description="Fraction of Mapping Quality Zero Reads">
-##INFO=<ID=MQM,Number=1,Type=Float,Description="Mean mapping quality of observed alternate alleles">
-##INFO=<ID=MQRankSum,Number=1,Type=Float,Description="Z-score From Wilcoxon rank sum test of Alt vs. Ref read mapping qualities">
-##INFO=<ID=NF,Number=0,Type=Integer,Description="Total number of forward reads containing this variant">
-##INFO=<ID=NR,Number=0,Type=Integer,Description="Total number of reads containing this variant">
-##INFO=<ID=NS,Number=1,Type=Integer,Description="Number of samples with data">
-##INFO=<ID=PP,Number=0,Type=Float,Description="Posterior probability (phred scaled) that this variant segregates">
-##INFO=<ID=PV4,Number=4,Type=Float,Description="P-values for strand bias, baseQ bias, mapQ bias and tail distance bias">
-##INFO=<ID=QD,Number=1,Type=Float,Description="Variant Confidence/Quality by Depth">
-##INFO=<ID=RA,Number=1,Type=Integer,Description="Reference allele observations">
-##INFO=<ID=RL,Number=1,Type=Integer,Description="Reads Placed Left: number of reads supporting the alternate balanced to the left (5') of the alternate allele">
-##INFO=<ID=RPP,Number=1,Type=Float,Description="Read Placement Probability: Phred-scaled upper-bounds estimate of the probability of observing the deviation between RPL and RPR given E(RPL/RPR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=RR,Number=1,Type=Integer,Description="Reads Placed Right: number of reads supporting the alternate balanced to the right (3') of the alternate allele">
-##INFO=<ID=RUN,Number=1,Type=Integer,Description="Homopolymer run length: the number of consecutive nucleotides in the reference genome matching the alternate allele prior to the current position">
-##INFO=<ID=ReadPosRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt vs. Ref read position bias">
-##INFO=<ID=SAB,Number=1,Type=Float,Description="Strand bias for the alternate allele: SAF / ( SAF + SAR )">
-##INFO=<ID=SAF,Number=1,Type=Integer,Description="Number of alternate observations on the forward strand">
-##INFO=<ID=SAP,Number=1,Type=Float,Description="Strand balance probability for the alternate allele: Phred-scaled upper-bounds estimate of the probability of observing the deviation between SAF and SAR given E(SAF/SAR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=SAR,Number=1,Type=Integer,Description="Number of alternate observations on the reverse strand">
-##INFO=<ID=SB,Number=1,Type=Float,Description="Strand Bias">
-##INFO=<ID=SC,Number=1,Type=String,Description="Genomic sequence 10 bases either side of variant position">
-##INFO=<ID=SET_INTEGRATION,Number=0,Type=Flag,Description="SET_INTEGRATION Membership">
-##INFO=<ID=SET_WGVQSR,Number=0,Type=Flag,Description="SET_WGVQSR Membership">
-##INFO=<ID=SNP,Number=0,Type=Flag,Description="SNP allele">
-##INFO=<ID=SRB,Number=1,Type=Float,Description="Strand bias for the reference allele: SRF / ( SRF + SRR )">
-##INFO=<ID=SRF,Number=1,Type=Integer,Description="Number of reference observations on the forward strand">
-##INFO=<ID=SRP,Number=1,Type=Float,Description="Strand balance probability for the reference allele: Phred-scaled upper-bounds estimate of the probability of observing the deviation between SRF and SRR given E(SRF/SRR) ~ 0.5, derived using Hoeffding's inequality">
-##INFO=<ID=SRR,Number=1,Type=Integer,Description="Number of reference observations on the reverse strand">
-##INFO=<ID=TC,Number=0,Type=Integer,Description="Total coverage">
-##INFO=<ID=TR,Number=1,Type=Integer,Description="Tandem repeat run length (bp)">
-##INFO=<ID=TS,Number=0,Type=Flag,Description="transition SNP">
-##INFO=<ID=TU,Number=1,Type=String,Description="tandem repeat run unit (stranded)">
-##INFO=<ID=TV,Number=0,Type=Flag,Description="transversion SNP">
-##INFO=<ID=VLD,Number=0,Type=Flag,Description="Is Validated.  This bit is set if the snp has 2+ minor allele count based on frequency or genotype data.">
-##INFO=<ID=VQSLOD,Number=1,Type=Float,Description="Log odds ratio of being a true variant versus being false under the trained gaussian mixture model">
-##INFO=<ID=dbSNP,Number=1,Type=Integer,Description="First SNP Build for RS">
-##INFO=<ID=set,Number=1,Type=String,Description="Source VCF for the merged record in CombineVariants">
-##LeftAlignVariants="analysis_type=LeftAlignVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta rodBind=[/humgen/gsa-scr1/ebanks/ALL.chr20.Oxford.20110407.indels.genotypes.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction= [...]
-##SelectVariants="analysis_type=SelectVariants input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[20] excludeIntervals=null reference_sequence=/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta rodBind=[/humgen/gsa-scr1/delangel/officialCalls/20110201_chr20_phase1_indels/dindel/20110208.chr20.dindel2.ALL.sites.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampli [...]
-##UnifiedGenotyper="analysis_type=UnifiedGenotyper input_file=[/broad/shptmp/delangel/calls/chr20/CHB.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/CHS.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/CLM.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/JPT.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/MXL.phase1.chr20.42.cleaned.bam, /broad/shptmp/delangel/calls/chr20/PUR.phase1.chr20.42.cleaned.bam] sample_metadata=[] re [...]
-##VariantAnnotator="analysis_type=VariantAnnotator input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=null excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[./ALL.chr20.vqsr_2of5_union_sites_for_validation_boosted.vcf] rodToIntervalTrackName=variant BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction=null downsample_to_coverage=null baq=OFF [...]
-##VariantFiltration="analysis_type=VariantFiltration input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=[/humgen/1kg/processing/pipeline_test_bams/chr22_chunked.hg19.intervals] excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[/broad/shptmp/rpoplin/ALL.phase1.chr22.raw.indels.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION DBSNP=null downsampling_type=null downsample_to_fraction=null downsamp [...]
-##commandline="/share/software/freebayes/bin/freebayes --stdin --min-alternate-count 2 --genotype-combo-step-max 20 --genotype-variant-threshold 4 --no-marginals --pvar 0.0001 --indels --mnps --no-filters --binomial-obs-priors --allele-balance-priors --region 20:0..100000 --vcf /d1/data/1000G/20101123/populations/finalised.phase1/integrated/including454/wg/ALL/Pipeline/none//freebayes/freebayes.20:0-100000.baq.20110328.vcf --fasta-reference /d2/data/references/build_37/human_reference_v37.fa"
-##contig=<ID=1,length=249250621,assembly=b37>
-##contig=<ID=10,length=135534747,assembly=b37>
-##contig=<ID=11,length=135006516,assembly=b37>
-##contig=<ID=12,length=133851895,assembly=b37>
-##contig=<ID=13,length=115169878,assembly=b37>
-##contig=<ID=14,length=107349540,assembly=b37>
-##contig=<ID=15,length=102531392,assembly=b37>
-##contig=<ID=16,length=90354753,assembly=b37>
-##contig=<ID=17,length=81195210,assembly=b37>
-##contig=<ID=18,length=78077248,assembly=b37>
-##contig=<ID=19,length=59128983,assembly=b37>
-##contig=<ID=2,length=243199373,assembly=b37>
-##contig=<ID=20,length=63025520,assembly=b37>
-##contig=<ID=21,length=48129895,assembly=b37>
-##contig=<ID=22,length=51304566,assembly=b37>
-##contig=<ID=3,length=198022430,assembly=b37>
-##contig=<ID=4,length=191154276,assembly=b37>
-##contig=<ID=5,length=180915260,assembly=b37>
-##contig=<ID=6,length=171115067,assembly=b37>
-##contig=<ID=7,length=159138663,assembly=b37>
-##contig=<ID=8,length=146364022,assembly=b37>
-##contig=<ID=9,length=141213431,assembly=b37>
-##contig=<ID=GL000191.1,length=106433,assembly=b37>
-##contig=<ID=GL000192.1,length=547496,assembly=b37>
-##contig=<ID=GL000193.1,length=189789,assembly=b37>
-##contig=<ID=GL000194.1,length=191469,assembly=b37>
-##contig=<ID=GL000195.1,length=182896,assembly=b37>
-##contig=<ID=GL000196.1,length=38914,assembly=b37>
-##contig=<ID=GL000197.1,length=37175,assembly=b37>
-##contig=<ID=GL000198.1,length=90085,assembly=b37>
-##contig=<ID=GL000199.1,length=169874,assembly=b37>
-##contig=<ID=GL000200.1,length=187035,assembly=b37>
-##contig=<ID=GL000201.1,length=36148,assembly=b37>
-##contig=<ID=GL000202.1,length=40103,assembly=b37>
-##contig=<ID=GL000203.1,length=37498,assembly=b37>
-##contig=<ID=GL000204.1,length=81310,assembly=b37>
-##contig=<ID=GL000205.1,length=174588,assembly=b37>
-##contig=<ID=GL000206.1,length=41001,assembly=b37>
-##contig=<ID=GL000207.1,length=4262,assembly=b37>
-##contig=<ID=GL000208.1,length=92689,assembly=b37>
-##contig=<ID=GL000209.1,length=159169,assembly=b37>
-##contig=<ID=GL000210.1,length=27682,assembly=b37>
-##contig=<ID=GL000211.1,length=166566,assembly=b37>
-##contig=<ID=GL000212.1,length=186858,assembly=b37>
-##contig=<ID=GL000213.1,length=164239,assembly=b37>
-##contig=<ID=GL000214.1,length=137718,assembly=b37>
-##contig=<ID=GL000215.1,length=172545,assembly=b37>
-##contig=<ID=GL000216.1,length=172294,assembly=b37>
-##contig=<ID=GL000217.1,length=172149,assembly=b37>
-##contig=<ID=GL000218.1,length=161147,assembly=b37>
-##contig=<ID=GL000219.1,length=179198,assembly=b37>
-##contig=<ID=GL000220.1,length=161802,assembly=b37>
-##contig=<ID=GL000221.1,length=155397,assembly=b37>
-##contig=<ID=GL000222.1,length=186861,assembly=b37>
-##contig=<ID=GL000223.1,length=180455,assembly=b37>
-##contig=<ID=GL000224.1,length=179693,assembly=b37>
-##contig=<ID=GL000225.1,length=211173,assembly=b37>
-##contig=<ID=GL000226.1,length=15008,assembly=b37>
-##contig=<ID=GL000227.1,length=128374,assembly=b37>
-##contig=<ID=GL000228.1,length=129120,assembly=b37>
-##contig=<ID=GL000229.1,length=19913,assembly=b37>
-##contig=<ID=GL000230.1,length=43691,assembly=b37>
-##contig=<ID=GL000231.1,length=27386,assembly=b37>
-##contig=<ID=GL000232.1,length=40652,assembly=b37>
-##contig=<ID=GL000233.1,length=45941,assembly=b37>
-##contig=<ID=GL000234.1,length=40531,assembly=b37>
-##contig=<ID=GL000235.1,length=34474,assembly=b37>
-##contig=<ID=GL000236.1,length=41934,assembly=b37>
-##contig=<ID=GL000237.1,length=45867,assembly=b37>
-##contig=<ID=GL000238.1,length=39939,assembly=b37>
-##contig=<ID=GL000239.1,length=33824,assembly=b37>
-##contig=<ID=GL000240.1,length=41933,assembly=b37>
-##contig=<ID=GL000241.1,length=42152,assembly=b37>
-##contig=<ID=GL000242.1,length=43523,assembly=b37>
-##contig=<ID=GL000243.1,length=43341,assembly=b37>
-##contig=<ID=GL000244.1,length=39929,assembly=b37>
-##contig=<ID=GL000245.1,length=36651,assembly=b37>
-##contig=<ID=GL000246.1,length=38154,assembly=b37>
-##contig=<ID=GL000247.1,length=36422,assembly=b37>
-##contig=<ID=GL000248.1,length=39786,assembly=b37>
-##contig=<ID=GL000249.1,length=38502,assembly=b37>
-##contig=<ID=MT,length=16569,assembly=b37>
-##contig=<ID=X,length=155270560,assembly=b37>
-##contig=<ID=Y,length=59373566,assembly=b37>
-##fileDate=2011-03-28
-##filedate=2011-02-08
-##filter="( SNP | MNP ) & ( MQM > 65 | QUAL > 1 ) & ABP < 30 & AB < 0.9 | ( INS | DEL ) & QUAL > 500"
-##phasing=none
-##reference=/lustre/scratch105/projects/g1k/ref/main_project/human_g1k_v37.fasta
-##reference=file:///humgen/1kg/reference/human_g1k_v37.fasta
-##source=Dindel2
-##source=SelectVariants
-##source_20110031.1=/nfs/users/nfs_p/pd3/cvs/vcftools/perl/vcf-annotate -d /nfs/users/nfs_p/pd3/sandbox/hapmap/dbSNP-b132/non-1kg-vld.desc -a /nfs/users/nfs_p/pd3/sandbox/hapmap/dbSNP-b132/non-1kg-vld.tab.gz -c CHROM,FROM,INFO/VLD,INFO/KGPilot123,INFO/dbSNP
-##vcfCTools=filter
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	
-20	458502	.	G	GA	4567.01	PASS	AA=20;AB=0.61111;ABA=14;ABP=6.8707;ABR=22;AC=38;AF=0.0544;AN=698;BL=374;BR=1129;BVAR;BaseQRankSum=13.364;DP=15979;DP4=1882,2188,45,37;Dels=0.00;EL=5;EPP=13.868;ER=15;FR;FS=6.503;HETAR=11;HOMA=2;HOMR=985;HP=1;HPLen=2;HR=2;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.0157;IndelType=INS.NOVEL_1.Novel_A.;LEN=1;LRB=0.50233;LRBP=826.56;MQ=66.16;MQ0Fraction=0.0110;MQM=70.5;MQRankSum=-3.158;NF;NR;NS=998;PP;PV4=0.15,1,0.42,0.15;RA=3173;RL=1;RPP=38.188;RR=19;RUN=1;ReadPosR [...]
-20	573764	.	TA	T	591.51	PASS	AC=91;AF=0.1987;AN=458;BaseQRankSum=0.137;DP=519;FS=3.153;HRun=1;HaplotypeScore=14.0744;InbreedingCoeff=0.1460;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;MQ=48.16;MQ0=26;MQ0Fraction=0.0501;MQRankSum=-1.636;QD=3.63;ReadPosRankSum=-4.140;SB=-408.14;SET_INTEGRATION;SET_WGVQSR;VQSLOD=5.2458;set=VQSR
-20	766143	.	C	CATCTGGTA	5521.70	PASS	AA=24;AB=0.5;ABA=18;ABP=3.0103;ABR=18;AC=14;AF=0.0289;AF1=0.02038;AN=484;BL=655;BR=1542;BVAR;BaseQRankSum=3.801;CI95=0.01549,0.02655;DP=11749;DP4=2222,1998,14,8;Dels=0.00;EL=9;EPP=6.2675;ER=15;FQ=999;FR;FS=2.941;HETAR=9;HOMA=4;HOMR=901;HP=2;HPLen=2;HR=1;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.0515;IndelType=INS.NumRepetitions_1.EventLength_8.;LEN=8;LRB=0.40373;LRBP=780.64;MQ=56.81;MQ0Fraction=0.0253;MQM=22.167;MQRankSum=-4.809;NF;NR;NS=914;PP;PV4=0.39 [...]
-20	997076	rs11467490	CTG	C	15379.78	PASS	AA=195;AB=0.59878;ABA=132;ABP=30.896;ABR=197;AC=173;AF=0.14562;AN=1188;BL=7664;BR=7309;BVAR;BaseQRankSum=21.853;DB;DEL;DP=27127;DP4=1801,2002,241,282;Dels=0.13;EL=100;EPP=3.2887;ER=95;FQ=999;FR;FS=6.591;HETAR=77;HOMA=42;HOMR=815;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1284;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_TG.;LEN=2;LRB=0.023709;LRBP=21.287;MQ=61.18;MQ0Fraction=0.0214;MQM=43.041;MQRankSum=6.886;NF;NR;NS=934 [...]
-20	1042261	rs10597473	CCCTG	C	168658.05	PASS	AA=4481;AB=0.29043;ABA=2128;ABP=1147.1;ABR=871;AC=1172;AF=0.97830;AN=1198;BL=169975;BR=194027;BVAR;BaseQRankSum=4.599;DB;DEL;DP=29418;DP4=29,47,1441,2403;Dels=0.84;EL=2358;EPP=29.772;ER=2123;FR;FS=9.122;HETAR=482;HOMA=559;HOMR=30;HP=2;HPLen=3;HR=3;HRun=0;HU=C;INDEL;InbreedingCoeff=0.0470;IndelType=DEL.NumRepetitions_2.EventLength_4.;LEN=4;LRB=0.066077;LRBP=3454.1;MQ=104.58;MQ0=4;MQ0Fraction=0.0014;MQM=58.257;MQRankSum=-3.368;NF;NR;NS=1071;PP;P [...]
-20	1046297	rs33956316	C	CT,CTT,CTTT	17698	PASS	ABR=408;AC=432,79,230;AF=0.39779,0.07274,0.21179;BVAR;BaseQRankSum=-8.413;DB;DP=15649;DP4=147,199,534,436;FR;FS=11.580;HOMA=97;HOMR=457;HP=20;HR=16;HU=T;HaplotypeScore=16.0590;INDEL;INS;InbreedingCoeff=0.6018;IndelType=MULTIALLELIC_INDEL;KGPilot123;MQ0=19;MQ0Fraction=0.0093;MQRankSum=7.992;NF;NR;NS=767;PP;PV4=6e-05,1,1,1;QD=8.18;RA=1183;RUN=1;ReadPosRankSum=2.684;SB=-6384.08;SC=GGAAAATTTTCTTTTTTTTTT;SET_WGVQSR;SRB=0.40913;SRF=484;SRP=87.859; [...]
-20	1405740	.	T	TA	257.28	PASS	AF=0.0188;BaseQRankSum=-0.745;DP=3769;Dels=0.00;FS=0.742;HPLen=9;HRun=9;InbreedingCoeff=0.0462;IndelType=INS.NumRepetitions_9.EventLength_1.RepeatExpansion_A.;MQ0Fraction=0.0151;MQRankSum=-0.090;ReadPosRankSum=-1.582;SET_INTEGRATION;SET_WGVQSR;VQSLOD=5.6502;set=Intersection;sumGLbyD=6.94
-20	1690501	.	TC	T	27928	PASS	AA=108;AB=0.91372;ABA=100;ABP=1726.1;ABR=1059;AC=35;AF=0.02966;AN=1180;BL=593;BR=6973;BVAR;BaseQRankSum=7.567;DEL;DP=10612;Dels=0.01;EL=50;EPP=4.2971;ER=58;FS=0.000;HETAR=378;HOMA=184;HOMR=477;HRun=1;InbreedingCoeff=0.0495;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.84325;LRBP=11685;MQ0=0;MQ0Fraction=0.0000;MQM=87.361;MQRankSum=4.088;NS=1045;RA=3125;RL=3;RPP=212.2;RR=105;RUN=1;ReadPosRankSum=-13.096;SAB=0.56481;SAF=61;SAP=6.951 [...]
-20	1991285	rs113891396	TAA	T,TA,TAAA,TAAAAA,TAAAAAA,TAAAAAAA,TAAAAAAAA	39235.36	PASS	AC=5,251,20,39,188,52,79;AF=0.0056,0.2789,0.0222,0.0433,0.2089,0.0578,0.0878;AN=900;BVAR;BaseQRankSum=1.124;DB;DEL;DP=54393;DP4=906,772,824,579;Dels=0.21;FR;FS=37.525;HP=12;HR=12;HRun=12;HU=A;INDEL;INS;InbreedingCoeff=0.6891;IndelType=MULTIALLELIC_INDEL;MQ=76.81;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-6.593;NF;NR;PP;PV4=0.0087,1,6.3e-19,1;RUN=1;ReadPosRankSum=-2.184;SC=ATCTGCCACTTAAAAAAAAAA;SET_WGVQSR;TC;TR= [...]
-20	2355911	.	TA	T	11723	PASS	AA=79;AB=0.9393;ABA=57;ABP=1577;ABR=882;AC=38;AF=0.0411;AN=924;BL=644;BR=5536;BVAR;BaseQRankSum=2.434;DEL;DP=9687;Dels=0.00;EL=45;EPP=6.3362;ER=34;FS=3.043;HETAR=321;HOMA=182;HOMR=555;HRun=5;InbreedingCoeff=0.0412;IndelType=DEL.NumRepetitions_5.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.79159;LRBP=8411.9;MQ0=0;MQ0Fraction=0.0000;MQM=70.848;MQRankSum=0.137;NS=1058;RA=3415;RL=3;RPP=149.49;RR=76;RUN=1;ReadPosRankSum=-12.116;SAB=0.44304;SAF=35;SAP=5.2367;SAR=44 [...]
-20	2771621	rs11479849	GT	G,GTT	1605.60	PASS	AA=80;AB=0.79825;ABA=69;ABP=267.24;ABR=273;AC=79,91;AF=0.06551,0.07546;AN=1206;BL=2593;BR=3805;BVAR;BaseQRankSum=7.825;DB;DP=9790;Dels=0.04;EL=37;EPP=3.9875;ER=43;FR;FS=4.751;HETAR=62;HOMA=5;HOMR=958;HP=11;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.2646;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.18943;LRBP=501.57;MQ0=0;MQ0Fraction=0.0000;MQM=52.45;MQRankSum=-0.560;NF;NR;NS=1025;PP;RA=3949;RL=29;RPP=16.148;RR=51;RUN=1;ReadPosRankSum=-2.397;SAB=0.525 [...]
-20	2891235	.	G	GT,GTTT	2869.87	PASS	AC=236,246;AF=0.2803,0.2922;AN=842;BaseQRankSum=8.979;DP=1067;FS=3.911;HaplotypeScore=20.3595;InbreedingCoeff=0.6511;IndelType=MULTIALLELIC_INDEL;MQ=44.86;MQ0=114;MQ0Fraction=0.1068;MQRankSum=-2.273;QD=4.00;ReadPosRankSum=-6.601;SB=-991.85;SET_INTEGRATION;SET_WGVQSR;VQSLOD=5.4379;set=VQSR
-20	3033550	.	TGAG	T	2005.90	PASS	AA=34;AB=0.51429;ABA=34;ABP=3.1344;ABR=36;AC=22;AF=0.0332;AN=662;BL=1374;BR=1649;BVAR;BaseQRankSum=5.192;DEL;DP=14639;DP4=2271,1492,12,21;Dels=0.02;EL=19;EPP=4.0322;ER=15;FR;FS=16.657;HETAR=17;HOMA=0;HOMR=914;HP=1;HPLen=1;HR=1;HRun=0;HU=G;INDEL;InbreedingCoeff=-0.0454;IndelType=DEL.NumRepetitions_1.EventLength_3.;LEN=3;LRB=0.090969;LRBP=57.333;MQ=53.99;MQ0Fraction=0.0304;MQM=46.735;MQRankSum=1.938;NF;NR;NS=931;PP;PV4=0.0068,9.4e-05,1,1;RA=2985;RL=11;RPP=1 [...]
-20	3873327	rs61519218	A	AAG	683.85	PASS	AC=25;AF=0.0313;AN=800;BaseQRankSum=4.839;DB;DP=1718;FS=4.265;HRun=0;HaplotypeScore=20.5789;InbreedingCoeff=0.1055;IndelType=INS.NOVEL_2.;MQ=53.70;MQ0=37;MQ0Fraction=0.0215;MQRankSum=2.468;QD=6.30;ReadPosRankSum=4.254;SB=-403.21;SET_INTEGRATION;SET_WGVQSR;VQSLOD=6.1858;set=VQSR
-20	4028835	.	GC	G	2511.30	PASS	AA=66;AB=0.56954;ABA=65;ABP=9.3521;ABR=86;AC=22;AF=0.01836;AN=1198;BL=2303;BR=2463;BVAR;BaseQRankSum=7.621;DEL;DP=22795;DP4=1714,2774,22,37;Dels=0.02;EL=34;EPP=3.1419;ER=32;FQ=999;FR;FS=2.095;HETAR=21;HOMA=0;HOMR=1050;HP=2;HPLen=2;HR=2;HRun=2;HU=C;INDEL;InbreedingCoeff=0.0125;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.033571;LRBP=14.674;MQ=108.09;MQ0=0;MQ0Fraction=0.0000;MQM=53.318;MQRankSum=5.257;NF;NR;NS=1071;PP;PV4=1,5.4e [...]
-20	4039609	rs67812039	G	GA	43457	PASS	AA=909;AB=0.54639;ABA=572;ABP=26.583;ABR=689;AC=302;AF=0.3455;AN=874;BL=37070;BR=38211;BVAR;BaseQRankSum=20.147;DB;DP=25595;DP4=1483,1374,528,542;Dels=0.00;EL=467;EPP=4.5033;ER=442;FQ=999;FR;FS=5.441;HETAR=243;HOMA=127;HOMR=608;HP=4;HPLen=3;HR=3;HRun=3;HU=A;INDEL;INS;InbreedingCoeff=0.1388;IndelType=INS.NumRepetitions_3.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.015157;LRBP=40.563;MQ=119.50;MQ0=0;MQ0Fraction=0.0000;MQM=83.197;MQRankSum=1.080;NF;NR; [...]
-20	4390056	.	TC	T	49312	PASS	AA=91;AB=0.94353;ABA=86;ABP=2605.4;ABR=1437;AC=39;AF=0.03160;AN=1234;BL=6823;BR=731;BVAR;BaseQRankSum=2.727;DEL;DP=13149;Dels=0.00;EL=41;EPP=4.9431;ER=50;FS=4.002;HETAR=465;HOMA=313;HOMR=292;HRun=3;InbreedingCoeff=0.0326;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.80646;LRBP=10671;MQ0=0;MQ0Fraction=0.0000;MQM=69.824;MQRankSum=-0.903;NS=1073;RA=3078;RL=89;RPP=183.62;RR=2;RUN=1;ReadPosRankSum=-12.526;SAB=0.45055;SAF=41;SAP=4.9431 [...]
-20	4474622	.	TA	T,TAA,TAAA,TAAAA	94522.28	PASS	ABR=114;AC=38,68,16,900;AF=0.03333,0.05965,0.01404,0.78947;AN=1140;BVAR;BaseQRankSum=9.741;DB;DP=16656;Dels=0.00;FR;FS=2.355;HOMA=3;HOMR=936;HP=10;HPLen=10;HR=10;HRun=10;HU=A;INS;InbreedingCoeff=0.4516;IndelType=MULTIALLELIC_INDEL;MQ0=2;MQ0Fraction=0.0008;MQRankSum=-4.096;NF;NR;NS=980;PP;RA=3766;RUN=1;ReadPosRankSum=2.380;SC=AGAAAAAAATTAAAAAAAAAA;SET_WGVQSR;SRB=0.49734;SRF=1873;SRP=3.2409;SRR=1893;TC;TR=10;TU=A;VQSLOD=8.8186;set=Intersection [...]
-20	4824911	.	AC	A	41998.70	PASS	AC=1172;AF=0.97342;AN=1204;BaseQRankSum=8.604;DP=3615;FS=9.934;HRun=1;HaplotypeScore=39.6843;InbreedingCoeff=0.0980;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=129.80;MQ0=1;MQ0Fraction=0.0003;MQRankSum=3.378;QD=11.62;ReadPosRankSum=6.967;SB=-16955.28;VQSLOD=4.2689;set=VQSR
-20	4839897	rs35881880	TAA	T,TA,TAAA,TAAAAA	3906.80	PASS	AC=12,95,137,189;AF=0.01024,0.08106,0.11689,0.16126;AN=1172;BVAR;BaseQRankSum=15.271;DB;DEL;DP=15105;Dels=0.04;FR;FS=43.567;HP=19;HR=13;HRun=13;HU=A;INS;InbreedingCoeff=0.5716;IndelType=MULTIALLELIC_INDEL;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.569;NF;NR;PP;RUN=1;ReadPosRankSum=-13.794;SC=TGTTAAAAAATAAAAAAAAAA;TC;TR=13;TU=A;VQSLOD=8.1773;set=Intersection;sumGLbyD=3.77
-20	5507414	.	G	GCC	439.08	PASS	AC=23;AF=0.01876;AN=1226;BaseQRankSum=3.051;DP=3023;FS=3.636;HRun=1;HaplotypeScore=30.3104;InbreedingCoeff=0.0204;IndelType=INS.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=112.09;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.065;QD=2.85;ReadPosRankSum=-2.709;SB=-302.22;VQSLOD=4.4311;set=VQSR
-20	5609676	.	GA	G,GAA	799.89	PASS	AA=42;AB=0.79096;ABA=37;ABP=133.16;ABR=140;AC=43,65;AF=0.03607,0.05453;AF1=0.02826;AN=1192;BL=1360;BR=2334;BVAR;BaseQRankSum=5.069;CI95=0.01242,0.04037;DP=15610;DP4=1548,2441,21,30;Dels=0.02;EL=18;EPP=4.8716;ER=24;FQ=12.1;FR;FS=0.000;HETAR=36;HOMA=1;HOMR=991;HP=13;HPLen=10;HR=10;HRun=10;HU=A;INDEL;INS;InbreedingCoeff=0.2001;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.26367;LRBP=560.68;MQ=63.29;MQ0Fraction=0.0003;MQM=44.143;MQRankSum=1.755;NF;NR;NS=1028;PP;P [...]
-20	5736211	rs35303106	CT	C,CTT	4384.40	PASS	AA=117;AB=0.71499;ABA=116;ABP=166.4;ABR=291;AC=32,145;AF=0.02712,0.12288;AN=1180;BL=5556;BR=4901;BVAR;BaseQRankSum=2.708;DB;DP=9157;Dels=0.01;EL=54;EPP=4.5136;ER=63;FR;FS=2.802;HETAR=79;HOMA=1;HOMR=837;HP=16;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.1903;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.062637;LRBP=92.1;MQ0Fraction=0.0273;MQM=48.932;MQRankSum=3.654;NF;NR;NS=917;PP;RA=2785;RL=79;RPP=34.209;RR=38;RUN=1;ReadPosRankSum=0.795;SAB=0.5641;SAF=6 [...]
-20	5898626	rs34483659	CAAA	C,CA,CAA,CAAAAA	1140.16	PASS	ABR=34;AC=19,98,56,199;AF=0.0227,0.1172,0.0670,0.2380;AF1=0.08519;BVAR;BaseQRankSum=5.049;CI95=0.03727,0.1273;DB;DEL;DP=5091;DP4=539,408,121,123;FQ=4.43;FR;FS=5.701;HOMA=64;HOMR=156;HP=19;HR=18;HU=A;HaplotypeScore=11.5333;INDEL;InbreedingCoeff=0.7405;IndelType=MULTIALLELIC_INDEL;MQ0=117;MQ0Fraction=0.0986;MQRankSum=6.290;NF;NR;NS=240;PP;PV4=0.043,1,1,0.0087;QD=1.22;RA=204;RUN=1;ReadPosRankSum=-2.684;SB=-1015.09;SC=ACTAAAAATACAAAAAAA [...]
-20	5975126	rs10541892	C	CAG	504.78	PASS	AC=79;AF=0.07004;AN=1128;BaseQRankSum=10.498;DB;DP=2050;FS=38.228;HRun=0;HaplotypeScore=14.1426;InbreedingCoeff=-0.0053;IndelType=INS.NOVEL_2.;MQ=60.40;MQ0=80;MQ0Fraction=0.0390;MQRankSum=5.098;QD=1.63;ReadPosRankSum=-4.851;SB=-590.69;VQSLOD=4.8517;set=VQSR
-20	6040983	rs11087710	A	AAAAAAGAG,AAAAAGAG,AAAAGAG,AAAAGAGAG,AAAGAG,AAAGAGAG,AAGAG,AAGAGAG,AG,AGAG,AGAGAG	66894.55	PASS	ABR=468;AC=80,9,20,136,31,91,33,29,9,3,5;AF=0.0980,0.0110,0.0245,0.1667,0.0380,0.1115,0.0404,0.0355,0.0110,0.0037,0.0061;AN=816;BVAR;BaseQRankSum=-12.470;DB;DP=38726;DP4=426,611,310,472;Dels=0.00;FQ=999;FR;FS=6.635;HOMA=110;HOMR=506;HP=14;HR=15;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.8291;IndelType=MULTIALLELIC_INDEL;KGPilot123;MQ=54.22;MQ0Fraction=0.0168;MQRankSum=-5.3 [...]
-20	7024548	.	G	GAT	5041.27	PASS	AC=123;AF=0.10336;AN=1190;BaseQRankSum=23.097;DP=3045;FS=7.979;HRun=0;HaplotypeScore=15.6967;InbreedingCoeff=0.1062;IndelType=INS.NumRepetitions_5.EventLength_2.RepeatExpansion_AT.;MQ=119.29;MQ0=2;MQ0Fraction=0.0007;MQRankSum=-3.725;QD=8.97;ReadPosRankSum=-1.636;SB=-2257.45;SET_INTEGRATION;SET_WGVQSR;VQSLOD=5.9332;set=VQSR
-20	7484554	.	A	AT	5.09	PASS	AC=0;AF=0.0000;AN=710;BaseQRankSum=-0.696;DP=1862;FS=2.835;HRun=9;HaplotypeScore=13.5425;InbreedingCoeff=0.0567;IndelType=INS.NumRepetitions_9.EventLength_1.RepeatExpansion_T.;MQ=76.92;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.932;ReadPosRankSum=-1.701;VQSLOD=4.3156;set=VQSR
-20	7632194	rs77286341	GAA	AAA,G	5324	PASS	AC=0;AF=0.0000;AN=700;BaseQRankSum=-1.741;DB;DP=1772;FR;HP=4;HPLen=3;HR=3;HRun=0;HU=A;HaplotypeScore=60.1795;InbreedingCoeff=0.0017;IndelType=MIXED;MQ=70.69;MQ0=13;MQ0Fraction=0.0073;MQRankSum=-1.315;NF;NR;PP;ReadPosRankSum=-3.650;SC=GAGAGAGAGAGAAAGGTGTAA;TC;TR=13;TU=AG;set=filterInVQSR-2of5
-20	7767508	rs71329674	G	GA	17914	PASS	AA=415;AB=0.61617;ABA=337;ABP=105.94;ABR=541;AC=141;AF=0.11614;AN=1214;BL=15187;BR=20323;BVAR;BaseQRankSum=-13.946;DB;DP=28222;Dels=0.00;EL=184;EPP=14.569;ER=231;FQ=999;FR;FS=13.296;HETAR=178;HOMA=35;HOMR=822;HP=14;HPLen=9;HR=9;HRun=9;HU=A;INDEL;INS;InbreedingCoeff=0.0714;IndelType=INS.NumRepetitions_9.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.14464;LRBP=1616.1;MQ=89.69;MQ0=1;MQ0Fraction=0.0003;MQM=51.667;MQRankSum=0.664;NF;NR;NS=1035;PP;RA=3707;R [...]
-20	7920261	.	TA	T,TAA	802.15	PASS	AA=28;AB=0.8;ABA=28;ABP=112.45;ABR=112;AC=22,39;AF=0.01836,0.03255;AN=1198;BL=943;BR=1487;BVAR;BaseQRankSum=2.233;DP=10645;Dels=0.01;EL=11;EPP=5.8022;ER=17;FR;FS=1.691;HETAR=20;HOMA=0;HOMR=1007;HP=10;HPLen=9;HR=9;HRun=9;HU=A;INS;InbreedingCoeff=0.2256;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.22387;LRBP=267.46;MQ0=0;MQ0Fraction=0.0000;MQM=57.571;MQRankSum=0.940;NF;NR;NS=1027;PP;RA=4776;RL=8;RPP=14.178;RR=20;RUN=1;ReadPosRankSum=-1.567;SAB=0.53571;SAF=15;S [...]
-20	8012465	rs10595338	TATGA	T	2104.41	PASS	AF=0.03339;BaseQRankSum=10.662;DB;DP=11772;DS;Dels=0.01;FR;FS=7.678;HP=1;HPLen=1;HR=1;HRun=0;HU=A;InbreedingCoeff=0.0266;IndelType=DEL.NumRepetitions_1.EventLength_4.;MQ0Fraction=0.0731;MQRankSum=0.603;NF;NR;PP;ReadPosRankSum=1.276;SC=TGTATGTATGTATGATGTATG;TC;TR=19;TU=ATGT;VQSLOD=4.1376;set=filterInVQSR-2of5;sumGLbyD=6.53
-20	8573999	.	CGTGT	C,CGT,CGTGTGT,TGTGT	45865.96	PASS	AC=458,0,731;AF=0.37727,0.00000,0.60214;AN=1214;BVAR;BaseQRankSum=-6.703;DEL;DP=37714;Dels=0.03;FR;FS=11.079;HP=2;HPLen=1;HR=1;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.7632;IndelType=MIXED;LEN=2;MQ0Fraction=0.0026;MQRankSum=-1.394;NF;NR;PP;RUN=1;ReadPosRankSum=-2.102;SC=TGTGTGTGCGCGTGTGTGTGT;SET_INTEGRATION;SET_WGVQSR;TC;TR=18;TU=GT;VQSLOD=6.1435;set=Intersection;sumGLbyD=3.53
-20	8610455	rs10571111	TTTTC	T	11763.51	PASS	AC=190;AF=0.17056;AN=1114;BaseQRankSum=-14.397;DB;DP=2323;FS=2.321;HRun=0;HaplotypeScore=39.8020;InbreedingCoeff=0.2502;IndelType=DEL.NumRepetitions_2.EventLength_4.;MQ=53.39;MQ0=104;MQ0Fraction=0.0448;MQRankSum=3.519;QD=19.07;ReadPosRankSum=4.150;SB=-4067.02;SET_INTEGRATION;SET_WGVQSR;VQSLOD=5.0554;set=VQSR
-20	9139079	.	ATT	A,AT,ATTT,ATTTT,ATTTTT	8777.90	PASS	AC=23,140,114,69,113;AF=0.01993,0.12132,0.09879,0.05979,0.09792;AN=1154;BVAR;BaseQRankSum=-0.022;DEL;DP=25109;DP4=502,657,278,313;FR;FS=11.929;HP=16;HR=16;HU=T;HaplotypeScore=20.2361;INDEL;INS;InbreedingCoeff=0.5704;IndelType=MULTIALLELIC_INDEL;MQ0=16;MQ0Fraction=0.0067;MQRankSum=2.624;NF;NR;PP;PV4=0.14,1,1,1;QD=1.48;RUN=1;ReadPosRankSum=-0.480;SB=-2354.28;SC=CACCTGGCTAATTTTTTTTTT;SET_WGVQSR;TC;TR=16;TU=T;VQSLOD=6.9180;set=Intersection
-20	9862448	.	CT	C	49312	PASS	AA=60;AB=0.96003;ABA=53;ABP=2440.4;ABR=1273;AC=18;AF=0.01461;AN=1232;BL=3516;BR=140;BVAR;BaseQRankSum=-2.056;DEL;DP=11893;Dels=0.01;EL=35;EPP=6.6294;ER=25;FS=1.787;HETAR=396;HOMA=344;HOMR=334;HRun=1;InbreedingCoeff=0.0379;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.92341;LRBP=6772.5;MQ0Fraction=0.0006;MQM=54.267;MQRankSum=-0.907;NS=1074;RA=2990;RL=60;RPP=133.3;RR=0;RUN=1;ReadPosRankSum=-10.579;SAB=0.58333;SAF=35;SAP=6.6294;SAR= [...]
-20	9863736	rs73618103	G	GT	50570.21	PASS	AA=2247;AB=0.48878;ABA=1412;ABP=6.0324;ABR=1350;AC=546;AF=0.44463;AN=1228;BL=86886;BR=95862;BVAR;BaseQRankSum=-23.978;DB;DP=32517;DP4=1125,1133,1017,1048;Dels=0.00;EL=1089;EPP=7.6113;ER=1158;FQ=999;FR;FS=2.529;HETAR=445;HOMA=201;HOMR=393;HP=4;HPLen=4;HR=4;HRun=4;HU=T;INDEL;INS;InbreedingCoeff=0.1393;IndelType=INS.NumRepetitions_4.EventLength_1.RepeatExpansion_T.;KGPilot123;LEN=1;LRB=0.049117;LRBP=960.35;MQ=68.10;MQ0=2;MQ0Fraction=0.0006;MQM=50.931 [...]
-20	10926959	.	AG	A	12239	PASS	AA=65;AB=0.92801;ABA=64;ABP=1417.6;ABR=825;AC=24;AF=0.0264;AN=908;BL=616;BR=3782;BVAR;BaseQRankSum=9.990;DEL;DP=10708;Dels=0.01;EL=37;EPP=5.7163;ER=28;FS=1.652;HETAR=275;HOMA=70;HOMR=724;HRun=1;InbreedingCoeff=0.0102;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.71987;LRBP=4952;MQ0=1;MQ0Fraction=0.0004;MQM=118.82;MQRankSum=1.018;NS=1069;RA=4746;RL=5;RPP=104.07;RR=60;RUN=1;ReadPosRankSum=-12.039;SAB=0.41538;SAF=27;SAP=7.0526;SAR= [...]
-20	11299648	.	TG	T	49315	PASS	AA=62;AB=0.95292;ABA=54;ABP=2046.7;ABR=1093;AC=28;AF=0.0373;AN=750;BL=3126;BR=528;BVAR;BaseQRankSum=-4.929;DEL;DP=10764;Dels=0.01;EL=26;EPP=6.5127;ER=36;FS=3.851;HETAR=366;HOMA=383;HOMR=304;HRun=1;InbreedingCoeff=0.0267;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.711;LRBP=4014.1;MQ0=1;MQ0Fraction=0.0005;MQM=76.468;MQRankSum=1.327;NS=1070;RA=2588;RL=54;RPP=77.121;RR=8;RUN=1;ReadPosRankSum=-12.507;SAB=0.48387;SAF=30;SAP=3.1504;S [...]
-20	11561096	.	CTA	C	999	PASS	AC=2;AF=0.0029;AF1=0.005602;BaseQRankSum=3.190;CI95=0.004425,0.01106;DP=7521;DP4=1998,1794,2,4;Dels=0.00;FQ=999;FR;FS=5.422;HP=3;HPLen=2;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0056;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_TA.;MQ=113.88;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.297;NF;NR;PP;PV4=0.43,0.024,1,1;ReadPosRankSum=1.406;SC=CAATAGTATTCTATGTCAGTC;SET_INTEGRATION;SET_WGVQSR;TC;TR=1;TU=T;VQSLOD=8.6243;set=Intersection;sumGLbyD=21.89
-20	11723671	.	C	CA	1096.60	PASS	AA=35;AB=0.69565;ABA=35;ABP=41.247;ABR=80;AC=10;AF=0.0141;AN=710;BL=2005;BR=1702;BVAR;BaseQRankSum=-3.427;DP=9819;Dels=0.00;EL=20;EPP=4.5614;ER=15;FR;FS=3.814;HETAR=20;HOMA=0;HOMR=1034;HP=8;HPLen=7;HR=7;HRun=7;HU=A;INS;InbreedingCoeff=0.0323;IndelType=INS.NumRepetitions_7.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.081737;LRBP=56.79;MQ0=0;MQ0Fraction=0.0000;MQM=81.057;MQRankSum=0.050;NF;NR;NS=1054;PP;RA=5562;RL=22;RPP=8.0357;RR=13;RUN=1;ReadPosRankSum=-2. [...]
-20	12238835	rs113904674	CTCTTCATGGTCT	C	1813.44	PASS	AA=7;AB=0.73077;ABA=7;ABP=15.037;ABR=19;AC=4;AF=0.0056;AN=712;BL=360;BR=368;BVAR;BaseQRankSum=3.891;DB;DEL;DP=10309;Dels=0.00;EL=4;EPP=3.3205;ER=3;FR;FS=0.000;HETAR=3;HOMA=0;HOMR=1076;HP=1;HPLen=2;HR=2;HRun=0;HU=C;InbreedingCoeff=-0.0381;IndelType=DEL.NumRepetitions_1.EventLength_10orMore.;LEN=12;LRB=0.010989;LRBP=3.2012;MQ0=0;MQ0Fraction=0.0000;MQM=37;MQRankSum=-3.793;NF;NR;NS=1079;PP;RA=6085;RL=4;RPP=3.3205;RR=3;RUN=1;ReadPosRankSum= [...]
-20	12602812	.	AT	A	12344	PASS	AA=47;AB=0.94372;ABA=43;ABP=1309.5;ABR=721;AC=14;AF=0.0196;AN=716;BL=2714;BR=217;BVAR;BaseQRankSum=1.424;DEL;DP=10743;Dels=0.00;EL=24;EPP=3.0565;ER=23;FS=0.629;HETAR=228;HOMA=65;HOMR=769;HRun=1;InbreedingCoeff=0.0233;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.85193;LRBP=4622.3;MQ0Fraction=0.0000;MQM=99.574;MQRankSum=1.901;NS=1080;RA=4839;RL=46;RPP=96.568;RR=1;RUN=1;ReadPosRankSum=-9.906;SAB=0.53191;SAF=25;SAP=3.4261;SAR=22;SR [...]
-20	13600884	.	CTG	C,CTGTG	1278.10	PASS	AA=85;AB=0.77994;ABA=79;ABP=247.38;ABR=280;AC=71,22;AF=0.05907,0.01830;AN=1202;BL=3279;BR=3205;BVAR;BaseQRankSum=8.852;DEL;DP=24185;DP4=1317,931,52,49;Dels=0.03;EL=45;EPP=3.649;ER=40;FQ=999;FR;FS=31.826;HETAR=75;HOMA=4;HOMR=926;HP=2;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1566;IndelType=MULTIALLELIC_INDEL;LEN=2;LRB=0.011413;LRBP=4.8442;MQ=65.06;MQ0Fraction=0.0012;MQM=48.671;MQRankSum=-0.511;NF;NR;NS=1005;PP;PV4=0.18,1,0.39,0.27;RA=3342;RL=3 [...]
-20	13666265	.	T	TATAG	556.88	PASS	AC=21;AF=0.01959;AN=1072;BaseQRankSum=24.958;DP=2706;FS=2.581;HRun=0;HaplotypeScore=25.9952;InbreedingCoeff=0.1419;IndelType=INS.NOVEL_4.;MQ=72.43;MQ0=0;MQ0Fraction=0.0000;MQRankSum=2.888;QD=4.38;ReadPosRankSum=2.552;SB=-417.04;SET_INTEGRATION;SET_WGVQSR;VQSLOD=7.3380;set=VQSR
-20	13861245	rs72422273	C	CTCA	2685.46	PASS	AC=140;AF=0.11589;AN=1208;BaseQRankSum=24.355;DB;DP=2910;FS=6.808;HRun=0;HaplotypeScore=19.3095;InbreedingCoeff=-0.0991;IndelType=INS.NumRepetitions_1.EventLength_3.;MQ=78.25;MQ0=22;MQ0Fraction=0.0076;MQRankSum=3.225;QD=3.64;ReadPosRankSum=2.607;SB=-1861.38;VQSLOD=4.1974;set=VQSR
-20	13865746	.	T	TA,TAA	1416.23	PASS	AA=63;AB=0.80417;ABA=47;ABP=195.87;ABR=193;AC=122,21;AF=0.10133,0.01744;AN=1204;BL=3673;BR=1145;BVAR;BaseQRankSum=-3.336;DP=10513;Dels=0.00;EL=62;EPP=131.27;ER=1;FR;FS=716.583;HETAR=45;HOMA=1;HOMR=998;HP=2;HR=1;HRun=1;HU=A;INS;InbreedingCoeff=0.0814;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.5247;LRBP=2883.3;MQ0=0;MQ0Fraction=0.0000;MQM=56.143;MQRankSum=-1.197;NF;NR;NS=1044;PP;RA=4529;RL=62;RPP=131.27;RR=1;RUN=1;ReadPosRankSum=-12.295;SAB=1;SAF=63;SAP=13 [...]
-20	13881703	.	CTT	C	152.85	PASS	AC=8;AF=0.0093;AN=862;BaseQRankSum=3.941;DP=2063;FS=0.962;HRun=5;HaplotypeScore=24.0313;InbreedingCoeff=0.0790;IndelType=DEL.NumRepetitions_5.EventLength_1.RepeatExpansion_T.;MQ=55.05;MQ0=49;MQ0Fraction=0.0238;MQRankSum=-1.418;QD=3.47;ReadPosRankSum=-0.605;SB=-93.04;SET_INTEGRATION;SET_WGVQSR;VQSLOD=5.3874;set=VQSR
-20	14260090	rs73619828	A	AT	27935	PASS	AA=596;AB=0.59484;ABA=487;ABP=96.922;ABR=715;AC=204;AF=0.17000;AN=1200;BL=21718;BR=28458;BVAR;BaseQRankSum=0.756;DB;DP=23629;DP4=1385,1492,287,328;Dels=0.00;EL=299;EPP=3.0249;ER=297;FQ=999;FR;FS=6.187;HETAR=218;HOMA=38;HOMR=788;HP=9;HPLen=9;HR=9;HRun=9;HU=T;INDEL;INS;InbreedingCoeff=0.0797;IndelType=INS.NumRepetitions_9.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.13433;LRBP=1969;MQ=100.81;MQ0=0;MQ0Fraction=0.0000;MQM=57.084;MQRankSum=2.224;NF;NR;NS [...]
-20	14260558	.	AC	A	238	PASS	AC=1;AF=0.0014;AF1=0.003368;BaseQRankSum=2.868;CI95=0.003106,0.006211;DP=9724;DP4=2075,2329,1,7;Dels=0.00;FQ=106;FR;FS=10.678;HP=1;HPLen=2;HR=2;HRun=1;HU=A;INDEL;InbreedingCoeff=-0.0406;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=114.37;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.862;NF;NR;PP;PV4=0.074,0.0096,0.017,1;ReadPosRankSum=-0.042;SC=ATCAGGAATAACTGTGTGACC;SET_INTEGRATION;SET_WGVQSR;TC;TR=2;TU=A;VQSLOD=8.1618;set=Intersection;sumGLbyD=18.65
-20	14425481	.	GTA	G,GTATA	148.85	PASS	AC=43,23;AF=0.03473,0.01858;AN=1238;BaseQRankSum=6.289;DP=25167;DP4=1800,2021,38,49;FR;FS=9.416;HP=2;HPLen=1;HR=1;HU=T;HaplotypeScore=17.7453;INDEL;InbreedingCoeff=0.0995;IndelType=MULTIALLELIC_INDEL;MQ0=21;MQ0Fraction=0.0058;MQRankSum=-0.200;NF;NR;PP;PV4=0.59,1,0.04,0.023;QD=0.35;ReadPosRankSum=-1.689;SB=-367.50;SC=CTGTGTGTGTGTATATATATA;SET_WGVQSR;TC;TR=13;TU=AT;VQSLOD=3.5796;set=filterInVQSR-2of5
-20	14943522	rs11478299	GA	AA,G	1761.24	PASS	AA=117;AB=0.68142;ABA=108;ABP=99.919;ABR=231;AC=0;AF=0.0000;AF1=0.04204;AN=712;BL=4931;BR=5802;BVAR;BaseQRankSum=9.118;CI95=0.02876,0.05752;DB;DEL;DP=13717;DP4=1908,1684,59,58;Dels=0.05;EL=60;EPP=3.1773;ER=57;FQ=81.9;FR;HETAR=56;HOMA=1;HOMR=1011;HP=8;HPLen=8;HR=8;HU=A;INDEL;InbreedingCoeff=0.1264;IndelType=MIXED;LEN=1;LRB=0.081152;LRBP=156.5;MQ=106.93;MQ0=0;MQ0Fraction=0.0000;MQM=96.855;MQRankSum=1.619;NF;NR;NS=1068;PP;PV4=0.57,1,0.0003,1;QD=7. [...]
-20	14974486	.	A	AG	4101.40	PASS	AA=57;AB=0.57143;ABA=51;ABP=8.2839;ABR=68;AC=22;AF=0.01846;AN=1192;BL=2286;BR=2834;BVAR;BaseQRankSum=8.711;DP=20538;DP4=2172,2100,19,13;Dels=0.00;EL=32;EPP=4.877;ER=25;FS=0.517;HETAR=20;HOMA=4;HOMR=1027;HRun=1;INDEL;INS;InbreedingCoeff=0.0677;IndelType=INS.NOVEL_1.Novel_G.;LEN=1;LRB=0.10703;LRBP=130.37;MQ=126.07;MQ0=0;MQ0Fraction=0.0000;MQM=56.088;MQRankSum=-10.756;NS=1051;PV4=0.38,3.5e-51,7.9e-34,1;RA=5203;RL=26;RPP=3.9627;RR=31;RUN=1;ReadPosRankSum=1.283 [...]
-20	15111137	.	GA	G	13533	PASS	AA=98;AB=0.84864;ABA=89;ABP=623.8;ABR=499;AC=47;AF=0.03796;AN=1238;BL=5324;BR=856;BVAR;BaseQRankSum=-11.577;DEL;DP=13384;Dels=0.01;EL=53;EPP=4.4284;ER=45;FS=6.099;HETAR=219;HOMA=845;HOMR=18;HRun=1;InbreedingCoeff=-0.0056;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.72298;LRBP=7017.4;MQ0Fraction=0.0003;MQM=90.449;MQRankSum=1.408;NS=1083;RA=590;RL=87;RPP=130.99;RR=11;RUN=1;ReadPosRankSum=-18.074;SAB=0.55102;SAF=54;SAP=5.2261;SAR= [...]
-20	15283028	.	A	AC,ACACACACACACAC	140844.83	PASS	AA=180;AB=0.61442;ABA=123;ABP=39.285;ABR=196;AC=13,817;AF=0.01111,0.69829;AN=1170;BL=4453;BR=11407;BVAR;BaseQRankSum=24.686;DP=6365;Dels=0.00;EL=124;EPP=58.793;ER=56;FR;FS=10.912;HETAR=87;HOMA=48;HOMR=683;HP=1;HR=1;HRun=1;HU=T;INS;InbreedingCoeff=0.2074;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.43846;LRBP=6624;MQ0Fraction=0.0558;MQM=38.211;MQRankSum=-21.111;NF;NR;NS=818;PP;RA=1732;RL=0;RPP=393.88;RR=180;RUN=1;ReadPosRankSum=-7.620;SAB=0.311 [...]
-20	15361056	.	ATAACT	A	4892.81	PASS	AA=59;AB=0.63576;ABA=55;ABP=27.184;ABR=96;AC=34;AF=0.0487;AN=698;BL=3164;BR=1999;BVAR;BaseQRankSum=3.391;DEL;DP=7080;Dels=0.03;EL=27;EPP=3.9304;ER=32;FR;FS=4.816;HETAR=35;HOMA=6;HOMR=966;HP=2;HPLen=3;HR=3;HRun=0;HU=A;InbreedingCoeff=0.0785;IndelType=DEL.NumRepetitions_1.EventLength_5.;LEN=5;LRB=0.22564;LRBP=573.84;MQ0=0;MQ0Fraction=0.0000;MQM=70.034;MQRankSum=-8.732;NF;NR;NS=1008;PP;RA=3915;RL=42;RPP=26.013;RR=17;RUN=1;ReadPosRankSum=-0.735;SAB=0.44068 [...]
-20	15579507	.	AATTAGTC	A,TATTAGTC	1936.38	PASS	AA=16;AB=0.58974;ABA=16;ABP=5.7386;ABR=23;AC=64;AF=0.05229;AN=1224;BL=699;BR=775;BVAR;BaseQRankSum=-21.390;DEL;DP=21920;DP4=2099,2403,6,6;Dels=0.00;EL=8;EPP=3.0103;ER=8;FR;FS=2.920;HETAR=5;HOMA=0;HOMR=1063;HP=3;HPLen=4;HR=4;HU=A;INDEL;InbreedingCoeff=-0.0143;IndelType=MIXED;LEN=7;LRB=0.05156;LRBP=11.519;MQ=129.49;MQ0=0;MQ0Fraction=0.0000;MQM=51.938;MQRankSum=3.331;NF;NR;NS=1068;PP;PV4=1,0.019,1.3e-07,1;RA=5334;RL=5;RPP=7.8961;RR=11;RUN=1;Rea [...]
-20	15752535	.	CT	C,GT	3775.20	PASS	AA=92;AB=0.78636;ABA=47;ABP=159.71;ABR=173;AC=0;AF=0.0000;AN=608;BL=4955;BR=2380;BVAR;BaseQRankSum=2.910;DEL;DP=3429;Dels=0.04;EL=13;EPP=105.82;ER=79;FR;HETAR=92;HOMA=95;HOMR=544;HP=2;HPLen=2;HR=2;HU=T;InbreedingCoeff=0.0483;IndelType=MIXED;LEN=1;LRB=0.35106;LRBP=1966;MQ0Fraction=0.0232;MQM=35.293;MQRankSum=-2.199;NF;NR;NS=732;PP;QD=4.91;RA=1272;RL=81;RPP=118.66;RR=11;RUN=1;ReadPosRankSum=-1.077;SAB=0.021739;SAF=2;SAP=185.79;SAR=90;SB=-59.51;SC=CAAGACCA [...]
-20	15883060	rs73619850	A	AT	1325.60	PASS	AA=38;AB=0.59302;ABA=35;ABP=9.4742;ABR=51;AC=14;AF=0.0156;AN=896;BL=1078;BR=1638;BVAR;BaseQRankSum=-4.526;DB;DP=19854;DP4=1632,1800,15,20;Dels=0.00;EL=18;EPP=3.2389;ER=20;FR;FS=0.000;HETAR=14;HOMA=1;HOMR=1014;HP=1;HPLen=1;HR=1;HRun=1;HU=T;INDEL;INS;InbreedingCoeff=-0.0131;IndelType=INS.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.20619;LRBP=253.74;MQ=118.40;MQ0=0;MQ0Fraction=0.0000;MQM=56.526;MQRankSum=0.892;NF;NR;NS=1029;PP;PV4=0 [...]
-20	16122099	.	GA	G	12914	PASS	AA=85;AB=0.85915;ABA=80;ABP=639.4;ABR=488;AC=19;AF=0.01542;AN=1232;BL=805;BR=5457;BVAR;BaseQRankSum=-6.084;DEL;DP=13592;Dels=0.00;EL=45;EPP=3.649;ER=40;FS=0.935;HETAR=218;HOMA=841;HOMR=14;HRun=2;InbreedingCoeff=0.0250;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.74289;LRBP=7507.5;MQ0=0;MQ0Fraction=0.0000;MQM=103.01;MQRankSum=2.843;NS=1075;RA=541;RL=2;RPP=170.62;RR=83;RUN=1;ReadPosRankSum=-16.222;SAB=0.49412;SAF=42;SAP=3.0358;SA [...]
-20	16828509	.	G	GT	843.62	PASS	AA=30;AB=0.70103;ABA=29;ABP=37.06;ABR=68;AC=10;AF=0.0140;AN=714;BL=1368;BR=1786;BVAR;BaseQRankSum=-4.061;DP=8682;Dels=0.01;EL=14;EPP=3.2998;ER=16;FR;FS=2.681;HETAR=22;HOMA=1;HOMR=1020;HP=8;HPLen=8;HR=8;HRun=8;HU=T;INS;InbreedingCoeff=0.1389;IndelType=INS.NumRepetitions_8.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.13253;LRBP=123.3;MQ0=0;MQ0Fraction=0.0000;MQM=62.8;MQRankSum=-1.491;NF;NR;NS=1043;PP;RA=4416;RL=11;RPP=7.6428;RR=19;RUN=1;ReadPosRankSum=-1.718; [...]
-20	17470034	.	GC	G	46975	PASS	AA=57;AB=0.96043;ABA=52;ABP=2422.5;ABR=1262;AC=34;AF=0.02773;AN=1226;BL=418;BR=3446;BVAR;BaseQRankSum=-6.250;DEL;DP=12035;Dels=0.00;EL=22;EPP=9.4485;ER=35;FS=1.350;HETAR=416;HOMA=409;HOMR=244;HRun=1;InbreedingCoeff=0.0083;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.78364;LRBP=5155.6;MQ0=0;MQ0Fraction=0.0000;MQM=99.509;MQRankSum=2.192;NS=1076;RA=2396;RL=5;RPP=87.164;RR=52;RUN=1;ReadPosRankSum=-15.199;SAB=0.5614;SAF=32;SAP=4.877 [...]
-20	17471374	.	AGCGGC	A	850.03	PASS	AC=6;AF=0.0085;AF1=0.01301;AN=704;BaseQRankSum=6.259;CI95=0.00885,0.01991;DP=8180;DP4=2215,1878,4,5;Dels=0.01;FQ=131;FS=0.000;HRun=0;INDEL;InbreedingCoeff=0.0009;IndelType=DEL.NumRepetitions_1.EventLength_5.;MQ=104.41;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-5.521;PV4=0.74,0.37,0.0005,1;ReadPosRankSum=2.468;SET_INTEGRATION;SET_WGVQSR;VQSLOD=6.8773;set=Intersection;sumGLbyD=30.85
-20	18433202	rs35582929	G	GA	2506.90	PASS	AA=55;AB=0.5812;ABA=49;ABP=9.7103;ABR=68;AC=20;AF=0.0218;AN=918;BL=2263;BR=2175;BVAR;BaseQRankSum=-6.639;DB;DP=19467;DP4=1845,2365,27,26;Dels=0.00;EL=21;EPP=9.6826;ER=34;FQ=999;FR;FS=5.633;HETAR=16;HOMA=3;HOMR=1045;HP=2;HPLen=3;HR=3;HRun=1;HU=G;INDEL;INS;InbreedingCoeff=0.0700;IndelType=INS.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.019829;LRBP=6.7994;MQ=114.03;MQ0=0;MQ0Fraction=0.0000;MQM=83.345;MQRankSum=1.610;NF;NR;NS=1064;PP [...]
-20	18551314	rs10659122	CA	C,CAA,CAAA,CAAAA,CAAAAA	18810.74	PASS	ABR=243;AC=19,169,216,164,188;AF=0.01816,0.16157,0.20650,0.15679,0.17973;BVAR;BaseQRankSum=-5.742;DB;DP=17637;DP4=136,77,560,237;FR;FS=2.693;HOMA=177;HOMR=299;HP=17;HR=17;HU=A;HaplotypeScore=15.5048;INDEL;INS;InbreedingCoeff=0.8901;IndelType=MULTIALLELIC_INDEL;MQ0=11;MQ0Fraction=0.0069;MQRankSum=1.845;NF;NR;NS=658;PP;PV4=0.08,1,1,1;QD=12.66;RA=673;RUN=1;ReadPosRankSum=0.283;SB=-3514.45;SC=GATTCCATCTCAAAAAAAAAA;SET_WGVQSR;SRB [...]
-20	18785519	.	G	GTC	415.55	PASS	AC=28;AF=0.0400;AN=700;BaseQRankSum=10.889;DP=1929;FS=8.778;HRun=0;HaplotypeScore=27.6448;InbreedingCoeff=0.0510;IndelType=INS.NOVEL_2.;MQ=61.99;MQ0=36;MQ0Fraction=0.0187;MQRankSum=4.508;QD=3.08;ReadPosRankSum=8.080;SB=-437.03;SET_INTEGRATION;SET_WGVQSR;VQSLOD=4.9313;set=VQSR
-20	20301041	rs35451634	ATATG	A	200.42	PASS	AC=21;AF=0.0449;AN=468;BaseQRankSum=5.251;DB;DP=579;FS=24.013;HRun=0;HaplotypeScore=27.8977;InbreedingCoeff=0.0113;IndelType=DEL.NumRepetitions_1.EventLength_4.;MQ=78.47;MQ0=26;MQ0Fraction=0.0449;MQRankSum=-5.284;QD=3.06;ReadPosRankSum=1.793;SB=-55.76;SET_INTEGRATION;SET_WGVQSR;VQSLOD=5.0981;set=VQSR
-20	20378174	.	TC	T	245.55	PASS	AC=23;AF=0.01879;AN=1224;BaseQRankSum=0.990;DP=3225;FS=10.413;HRun=1;HaplotypeScore=22.6109;InbreedingCoeff=0.0244;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=93.70;MQ0=3;MQ0Fraction=0.0009;MQRankSum=-3.349;QD=1.86;ReadPosRankSum=-7.227;SB=-188.62;VQSLOD=4.2553;set=VQSR
-20	20809160	rs10571503	TAA	AAA,T	3496	PASS	AC=0;AF=0.0000;AN=612;BaseQRankSum=1.968;DB;DP=1092;FR;HP=4;HPLen=3;HR=3;HRun=0;HU=A;HaplotypeScore=26.1253;InbreedingCoeff=0.0603;IndelType=MIXED;MQ=68.98;MQ0=1;MQ0Fraction=0.0009;MQRankSum=1.520;NF;NR;PP;ReadPosRankSum=-4.042;SC=TATATATATATAAATTTAAAT;TC;TR=13;TU=AT;set=filterInVQSR-2of5
-20	22508765	.	CT	C	53877.84	PASS	AA=187;AB=0.78077;ABA=171;ABP=537.09;ABR=609;AC=1017;AF=0.91787;AN=1108;BL=12690;BR=1718;BVAR;BaseQRankSum=13.773;DEL;DP=7430;Dels=0.02;EL=73;EPP=22.53;ER=114;FR;FS=16.352;HETAR=152;HOMA=9;HOMR=786;HP=8;HR=4;HRun=4;HU=T;InbreedingCoeff=0.3885;IndelType=DEL.NumRepetitions_4.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.76152;LRBP=18147;MQ0=0;MQ0Fraction=0.0000;MQM=46.086;MQRankSum=0.971;NF;NR;NS=947;PP;RA=2868;RL=177;RPP=326.86;RR=10;RUN=1;ReadPosRankSum=9. [...]
-20	22555082	rs11477526	AT	A	11503	PASS	AA=530;AB=0.50816;ABA=422;ABP=3.5063;ABR=436;AF=0.1614;AN=700;BL=21453;BR=23313;BVAR;BaseQRankSum=17.562;DB;DEL;DP=25587;DP4=1869,1600,283,201;Dels=0.14;EL=259;EPP=3.6003;ER=271;FQ=999;FR;FS=14.595;HETAR=159;HOMA=41;HOMR=846;HP=3;HPLen=3;HR=3;HRun=3;HU=T;INDEL;InbreedingCoeff=0.0995;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.041549;LRBP=170.83;MQ=95.89;MQ0=0;MQ0Fraction=0.0000;MQM=72.162;MQRankSum=2.564;NF;NR;NS=1046 [...]
-20	22590907	.	A	AC	4204.88	PASS	AA=67;AB=0.592;ABA=51;ABP=12.2;ABR=74;AF=0.0554;AF1=0.0468;AN=560;BL=2277;BR=2389;BVAR;BaseQRankSum=10.968;CI95=0.03759,0.05639;DP=14380;DP4=2514,2018,33,33;Dels=0.00;EL=22;EPP=20.155;ER=45;FQ=999;FR;FS=3.846;HETAR=25;HOMA=4;HOMR=1049;HP=4;HPLen=5;HR=5;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.0719;IndelType=INS.NOVEL_1.Novel_C.;LEN=1;LRB=0.024003;LRBP=8.8481;MQ=110.68;MQ0=0;MQ0Fraction=0.0000;MQM=96.149;MQRankSum=2.668;NF;NR;NS=1078;PP;PV4=0.39,1,0.46,0.36; [...]
-20	22806326	rs11468890	ATTCCATCAC	A	105320.99	PASS	AC=567;AF=0.48795;AN=1162;BVAR;BaseQRankSum=32.858;DB;DEL;DP=26278;DP4=727,796,554,587;Dels=0.30;FQ=999;FR;FS=1.923;HP=3;HPLen=3;HR=2;HRun=0;HU=T;INDEL;InbreedingCoeff=0.2548;IndelType=DEL.NumRepetitions_2.EventLength_9.;LEN=9;MQ=89.42;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-23.545;NF;NR;PP;PV4=0.7,1,1.3e-167,1;RUN=1;ReadPosRankSum=4.384;SC=GGCTGCTCCCATTCCATCACT;SET_INTEGRATION;SET_WGVQSR;TC;TR=2;TU=T;VQSLOD=8.2594;set=Intersection;sumGLbyD=69.81
-20	22999898	rs55966257	CAGGA	C	8019.97	PASS	AA=23;AB=0.57778;ABA=19;ABP=5.3748;ABR=26;AC=214;AF=0.18838;AN=1136;BL=1143;BR=1040;BVAR;BaseQRankSum=29.294;DB;DEL;DP=8216;Dels=0.02;EL=11;EPP=3.1047;ER=12;FS=14.938;HETAR=14;HOMA=2;HOMR=948;HRun=0;InbreedingCoeff=0.0797;IndelType=DEL.NumRepetitions_1.EventLength_4.;LEN=4;LRB=0.047183;LRBP=13.563;MQ0=0;MQ0Fraction=0.0000;MQM=34.783;MQRankSum=-20.301;NS=964;RA=3637;RL=13;RPP=3.86;RR=10;RUN=1;ReadPosRankSum=-24.607;SAB=0.47826;SAF=11;SAP=3.1047; [...]
-20	23385964	rs57723772	GAA	G	8170.95	PASS	AC=257;AF=0.20928;AN=1228;BaseQRankSum=32.220;DB;DP=3291;FS=1.688;HRun=3;HaplotypeScore=22.6739;InbreedingCoeff=0.0171;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_A.;MQ=58.44;MQ0=32;MQ0Fraction=0.0097;MQRankSum=-4.893;QD=6.55;ReadPosRankSum=-35.524;SB=-3631.67;VQSLOD=5.6549;set=VQSR
-20	23534530	.	TA	T	3542.10	PASS	AA=45;AB=0.75658;ABA=37;ABP=89.926;ABR=115;AC=35;AF=0.02991;AN=1170;BL=3090;BR=270;BVAR;BaseQRankSum=-6.892;DEL;DP=8108;Dels=0.00;EL=19;EPP=5.3748;ER=26;FS=1.026;HETAR=76;HOMA=896;HOMR=18;HRun=1;InbreedingCoeff=0.0551;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.83929;LRBP=5142.4;MQ0Fraction=0.0017;MQM=41.578;MQRankSum=0.818;NS=991;RA=203;RL=43;RPP=84.127;RR=2;RUN=1;ReadPosRankSum=-12.923;SAB=0.37778;SAF=17;SAP=8.8491;SAR=28; [...]
-20	23976810	rs5841018	A	ATATTAAT	1782.38	PASS	AF=0.1387;AF1=0.01507;BaseQRankSum=3.717;CI95=0.00188,0.03947;DB;DP=1712;DP4=357,376,7,2;Dels=0.00;FQ=31.1;FS=14.489;HPLen=2;HRun=0;INDEL;InbreedingCoeff=0.1123;IndelType=INS.NumRepetitions_1.EventLength_7.;MQ=49.53;MQ0=2;MQ0Fraction=0.0055;MQRankSum=-4.928;PV4=0.1,1,0.00085,0.016;ReadPosRankSum=-4.456;VQSLOD=5.3140;dbSNP=116;set=Intersection;sumGLbyD=19.98
-20	24222100	.	CTTTTA	C	4219.36	PASS	AA=57;AB=0.59434;ABA=43;ABP=11.205;ABR=63;AF=0.01803;AF1=0.01547;AN=1220;BL=2073;BR=2345;BVAR;BaseQRankSum=7.990;CI95=0.0114,0.02137;DEL;DP=17536;DP4=2140,2346,7,12;Dels=0.01;EL=32;EPP=4.877;ER=25;FQ=104;FS=0.614;HETAR=21;HOMA=4;HOMR=1042;HRun=0;INDEL;InbreedingCoeff=0.1941;IndelType=DEL.NumRepetitions_2.EventLength_5.;LEN=5;LRB=0.061566;LRBP=39.374;MQ=73.32;MQ0Fraction=0.0021;MQM=39.614;MQRankSum=-5.728;NS=1067;PV4=0.37,1.1e-39,3.5e-09,1;RA=5527;RL=28 [...]
-20	24395018	.	AT	A	49310	PASS	AA=146;AB=0.91198;ABA=130;ABP=2180.5;ABR=1347;AC=50;AF=0.04045;AN=1236;BL=587;BR=9625;BVAR;BaseQRankSum=-4.610;DEL;DP=12793;Dels=0.01;EL=54;EPP=24.487;ER=92;FS=22.108;HETAR=485;HOMA=384;HOMR=210;HRun=2;InbreedingCoeff=0.0374;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.88504;LRBP=17373;MQ0=0;MQ0Fraction=0.0000;MQM=102.26;MQRankSum=2.256;NS=1080;RA=2377;RL=1;RPP=311.42;RR=145;RUN=1;ReadPosRankSum=-16.347;SAB=0.63699;SAF=93;SAP=2 [...]
-20	24411517	.	C	CA	246.18	PASS	AF=0.01546;AF1=0.01095;BaseQRankSum=7.832;CI95=0.005698,0.01709;DP=7981;DP4=983,2037,7,7;Dels=0.00;FQ=27.9;FS=18.815;HPLen=3;HRun=3;INDEL;InbreedingCoeff=0.0175;IndelType=INS.NumRepetitions_3.EventLength_1.RepeatExpansion_A.;MQ=60.28;MQ0Fraction=0.0137;MQRankSum=-7.243;PV4=0.25,1,2.7e-05,1;ReadPosRankSum=-0.143;VQSLOD=4.3701;set=Intersection;sumGLbyD=6.56
-20	24421169	.	AG	A	27480	PASS	AA=182;AB=0.8303;ABA=149;ABP=835;ABR=729;AC=89;AF=0.07224;AN=1232;BL=11276;BR=2214;BVAR;BaseQRankSum=-5.447;DEL;DP=11717;Dels=0.01;EL=103;EPP=9.8827;ER=79;FR;FS=15.492;HETAR=343;HOMA=607;HOMR=114;HP=4;HR=1;HRun=1;HU=G;InbreedingCoeff=0.0353;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.67176;LRBP=13222;MQ0=0;MQ0Fraction=0.0000;MQM=88.324;MQRankSum=2.221;NF;NR;NS=1071;PP;RA=1226;RL=169;RPP=293.37;RR=13;RUN=1;ReadPosRankSum=-19.71 [...]
-20	24765537	rs71841337	ATTT	A,AT,ATT,ATTTT,ATTTTT	37852	PASS	AC=13,120,527,51,92;AF=0.01102,0.10169,0.44661,0.04322,0.07797;AN=1180;BVAR;BaseQRankSum=8.172;DB;DEL;DP=39116;DP4=200,331,851,1169;FR;FS=2.394;HP=15;HR=15;HU=T;HaplotypeScore=20.8091;INDEL;INS;InbreedingCoeff=0.4815;IndelType=MULTIALLELIC_INDEL;MQ0=1;MQ0Fraction=0.0003;MQRankSum=4.344;NF;NR;PP;PV4=0.067,1,1,0.1;QD=7.90;RUN=1;ReadPosRankSum=1.798;SB=-8371.96;SC=CTCTGCAACAATTTTTTTTTT;SET_WGVQSR;TC;TR=15;TU=T;VQSLOD=9.9679;dbSNP= [...]
-20	25500689	.	A	AATTT	84980.72	PASS	AC=1005;AF=0.89096;AN=1128;BaseQRankSum=17.400;DP=2324;FS=6.721;HRun=0;HaplotypeScore=25.3376;InbreedingCoeff=0.2148;IndelType=INS.NumRepetitions_1.EventLength_4.;MQ=75.19;MQ0=1;MQ0Fraction=0.0004;MQRankSum=-8.221;QD=38.28;ReadPosRankSum=4.504;SB=-34833.07;SET_INTEGRATION;SET_WGVQSR;VQSLOD=4.6038;set=VQSR
-20	25550373	.	GA	G	11251.31	PASS	AA=246;AB=0.42963;ABA=154;ABP=14.624;ABR=116;AC=566;AF=0.6521;AN=868;BL=5230;BR=11845;BVAR;BaseQRankSum=7.418;DEL;DP=8885;Dels=0.02;EL=99;EPP=23.348;ER=147;FR;FS=50.357;HETAR=150;HOMA=849;HOMR=14;HP=1;HR=2;HRun=1;HU=G;InbreedingCoeff=0.1365;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.38741;LRBP=5567.9;MQ0=0;MQ0Fraction=0.0000;MQM=97.561;MQRankSum=0.050;NF;NR;NS=1013;PP;RA=269;RL=75;RPP=84.361;RR=171;RUN=1;ReadPosRankSum=-7. [...]
-20	25903865	.	TTC	T	7459.23	PASS	AC=277;AF=0.23316;AN=1188;BaseQRankSum=31.479;DP=2969;FS=137.723;HRun=0;HaplotypeScore=37.3300;InbreedingCoeff=-0.1755;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_TC.;MQ=53.49;MQ0=50;MQ0Fraction=0.0168;MQRankSum=-25.506;QD=4.70;ReadPosRankSum=-5.913;SB=-1747.98;VQSLOD=5.4731;set=VQSR
-20	25934237	.	C	CCACTT	771.36	PASS	AC=37;AF=0.0426;AN=868;BaseQRankSum=16.331;DP=2253;FS=4.545;HRun=0;HaplotypeScore=29.9764;InbreedingCoeff=-0.0685;IndelType=INS.NOVEL_5.;MQ=48.12;MQ0=87;MQ0Fraction=0.0386;MQRankSum=-12.497;QD=3.37;ReadPosRankSum=-8.428;SB=-297.70;VQSLOD=4.2324;set=VQSR
-20	26054751	rs112967123	TATC	T	33244	PASS	AA=1863;AB=0.79012;ABA=1788;ABP=6231;ABR=6731;AC=227;AF=0.18218;AN=1246;BL=74924;BR=72452;BVAR;BaseQRankSum=32.258;DB;DEL;DP=36404;DS;Dels=0.05;EL=931;EPP=3.0115;ER=932;FR;FS=265.752;HETAR=527;HOMA=2;HOMR=565;HP=1;HR=2;HRun=0;HU=T;InbreedingCoeff=-0.2137;IndelType=DEL.NumRepetitions_2.EventLength_3.;LEN=3;LRB=0.016773;LRBP=93.048;MQ0Fraction=0.0127;MQM=28.797;MQRankSum=-5.329;NF;NR;NS=1094;PP;RA=14604;RL=1014;RPP=34.743;RR=849;RUN=1;ReadPosRankSu [...]
-20	26120452	.	CAG	C	7863.19	PASS	AA=163;AB=0.70489;ABA=157;ABP=196.99;ABR=375;AC=171;AF=0.1908;AN=896;BL=3455;BR=4877;BVAR;BaseQRankSum=25.536;DEL;DP=7014;Dels=0.10;EL=58;EPP=32.438;ER=105;FS=231.723;HETAR=90;HOMA=5;HOMR=387;HRun=0;InbreedingCoeff=-0.1966;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_AG.;LEN=2;LRB=0.17067;LRBP=530;MQ0Fraction=0.0470;MQM=21.951;MQRankSum=-23.449;NS=482;RA=1117;RL=62;RPP=23.273;RR=101;RUN=1;ReadPosRankSum=1.904;SAB=0.37423;SAF=61;SAP=25.404; [...]
-20	26185812	.	AG	A	322.58	PASS	AF=0.0342;BaseQRankSum=3.668;DP=3014;Dels=0.01;FR;FS=10.238;HP=8;HPLen=6;HR=6;HRun=6;HU=G;InbreedingCoeff=0.1504;IndelType=DEL.NumRepetitions_6.EventLength_1.RepeatExpansion_G.;MQ0Fraction=0.0473;MQRankSum=-5.464;NF;NR;PP;ReadPosRankSum=0.536;SC=GGGTGGGTGGAGGGGGGAGGG;SET_WGVQSR;TC;TR=6;TU=G;VQSLOD=5.0767;set=Intersection;sumGLbyD=8.46
-20	30963468	.	AGTTT	A	2041.12	PASS	AA=38;AB=0.75694;ABA=35;ABP=85.587;ABR=109;AC=34;AF=0.0377;AN=902;BL=1974;BR=668;BVAR;BaseQRankSum=3.060;DEL;DP=22806;DP4=1997,1747,28,36;Dels=0.02;EL=17;EPP=3.9246;ER=21;FR;FS=16.034;HETAR=29;HOMA=1;HOMR=1009;HP=1;HPLen=1;HR=1;HRun=0;HU=G;INDEL;InbreedingCoeff=0.0752;IndelType=DEL.NumRepetitions_2.EventLength_4.;LEN=4;LRB=0.49432;LRBP=1404.9;MQ=87.17;MQ0Fraction=0.0013;MQM=98.079;MQRankSum=6.021;NF;NR;NS=1039;PP;PV4=0.13,1.5e-07,1,0.051;RA=4052;RL=36;R [...]
-20	31963212	.	AAAAAAAAAAAAG	A	727.15	PASS	AC=5;AF=0.0080;AN=622;BaseQRankSum=4.037;DP=1480;FS=0.000;HRun=0;HaplotypeScore=43.3793;InbreedingCoeff=0.0350;IndelType=DEL.NumRepetitions_1.EventLength_10orMore.;MQ=51.77;MQ0=59;MQ0Fraction=0.0399;MQRankSum=-1.799;QD=22.72;ReadPosRankSum=3.591;SB=-364.04;VQSLOD=5.3166;set=VQSR
-20	31997272	.	CT	C,CTT,CTTT	1837.10	PASS	AA=63;AB=0.77559;ABA=57;ABP=170.57;ABR=197;AC=79,49,30;AF=0.06594,0.04090,0.02504;AN=1198;BL=2372;BR=2640;BVAR;BaseQRankSum=3.277;DP=9050;Dels=0.03;EL=24;EPP=10.766;ER=39;FR;FS=0.303;HETAR=45;HOMA=1;HOMR=981;HP=10;HPLen=10;HR=10;HRun=10;HU=T;INS;InbreedingCoeff=0.2796;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.053472;LRBP=34.128;MQ0Fraction=0.0000;MQM=50.889;MQRankSum=0.610;NF;NR;NS=1027;PP;RA=3776;RL=30;RPP=3.3205;RR=33;RUN=1;ReadPosRankSum=-0.800; [...]
-20	33446974	rs113250263	TAA	T,TA,TAAA	17130.16	PASS	AC=65,417,184;AF=0.05941,0.38117,0.16819;AN=1094;BVAR;BaseQRankSum=3.400;DB;DEL;DP=22362;DP4=221,247,418,524;Dels=0.33;FR;FS=15.409;HP=15;HR=14;HRun=14;HU=A;INDEL;INS;InbreedingCoeff=0.5215;IndelType=MULTIALLELIC_INDEL;MQ=61.32;MQ0Fraction=0.0021;MQRankSum=0.481;NF;NR;PP;PV4=0.33,1,1,1;RUN=1;ReadPosRankSum=-0.056;SC=CTCCGTCTCATAAAAAAAAAA;SET_WGVQSR;TC;TR=14;TU=A;VQSLOD=8.0974;dbSNP=132;set=Intersection;sumGLbyD=12.78
-20	33877149	.	C	CT	1784.40	PASS	AA=58;AB=0.73096;ABA=53;ABP=94.289;ABR=144;AC=65;AF=0.05682;AN=1144;BL=3298;BR=1935;BVAR;BaseQRankSum=-2.066;DP=8074;Dels=0.02;EL=22;EPP=10.348;ER=36;FR;FS=11.452;HETAR=47;HOMA=3;HOMR=754;HP=16;HR=12;HRun=12;HU=T;INS;InbreedingCoeff=0.1178;IndelType=INS.NumRepetitions_10orMore.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.26046;LRBP=773.91;MQ0Fraction=0.0165;MQM=52.259;MQRankSum=0.734;NF;NR;NS=804;PP;RA=2141;RL=43;RPP=32.363;RR=15;RUN=1;ReadPosRankSum=-1.27 [...]
-20	34387589	rs112431805	CT	C,CTT	4039.10	PASS	AA=121;AB=0.75368;ABA=117;ABP=268.53;ABR=358;AC=84,139;AF=0.07047,0.11661;AN=1192;BL=5557;BR=3901;BVAR;BaseQRankSum=2.693;DB;DP=10157;Dels=0.03;EL=47;EPP=16.093;ER=74;FR;FS=7.639;HETAR=89;HOMA=2;HOMR=913;HP=13;HR=11;HRun=11;HU=T;INS;InbreedingCoeff=0.2097;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.17509;LRBP=632.63;MQ0Fraction=0.0000;MQM=49.802;MQRankSum=-0.801;NF;NR;NS=1004;PP;RA=3789;RL=77;RPP=22.554;RR=44;RUN=1;ReadPosRankSum=-2.691;SAB=0.37 [...]
-20	34493409	rs73621682	C	CAG	62288.93	PASS	AA=1069;AB=0.54863;ABA=826;ABP=40.606;ABR=1004;AC=257;AF=0.3640;AN=706;BL=41524;BR=47039;BVAR;BaseQRankSum=-24.248;DB;DP=30195;DP4=1743,1636,614,487;Dels=0.00;EL=582;EPP=21.343;ER=487;FQ=999;FR;FS=5.080;HETAR=298;HOMA=63;HOMR=712;HP=1;HPLen=1;HR=1;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.1437;IndelType=INS.NumRepetitions_2.EventLength_2.RepeatExpansion_AG.;LEN=2;LRB=0.062272;LRBP=748.76;MQ=77.99;MQ0=3;MQ0Fraction=0.0015;MQM=54.446;MQRankSum=0.160 [...]
-20	35957317	.	CTGACT	C,CGACT	4370.96	PASS	ABR=81;AC=22,1;AF=0.0321,0.0015;AF1=0.04523;AN=686;BVAR;BaseQRankSum=7.969;CI95=0.0354,0.05752;DEL;DP=16632;DP4=1942,1815,17,21;Dels=0.03;FQ=999;FR;FS=0.531;HOMA=1;HOMR=998;HP=2;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0587;IndelType=MULTIALLELIC_INDEL;MQ=83.38;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-7.201;NF;NR;NS=1020;PP;PV4=0.42,0.00017,4.5e-12,1;RA=4620;RUN=1;ReadPosRankSum=-1.007;SC=CCTCTCAGCTCTGACTGAGTC;SET_WGVQSR;SRB=0.50043;SRF=2312;S [...]
-20	36136198	.	GTGTC	G	2078.76	PASS	AA=35;AB=0.54167;ABA=33;ABP=4.096;ABR=39;AC=17;AF=0.01384;AN=1228;BL=1212;BR=1523;BVAR;BaseQRankSum=6.900;DEL;DP=22483;DP4=1696,2291,9,16;Dels=0.01;EL=9;EPP=20.94;ER=26;FQ=999;FR;FS=3.023;HETAR=13;HOMA=1;HOMR=1061;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1113;IndelType=DEL.NumRepetitions_2.EventLength_4.;LEN=4;LRB=0.11371;LRBP=79.803;MQ=93.98;MQ0=1;MQ0Fraction=0.0003;MQM=83.686;MQRankSum=-1.683;NF;NR;NS=1075;PP;PV4=0.55,1,0.0083,1;RA=5771;R [...]
-20	36250522	.	CA	C	37933	PASS	AA=51;AB=0.95582;ABA=44;ABP=1800.5;ABR=952;AC=23;AF=0.01885;AN=1220;BL=691;BR=3464;BVAR;BaseQRankSum=-2.418;DEL;DP=11998;Dels=0.00;EL=18;EPP=12.59;ER=33;FS=2.307;HETAR=348;HOMA=534;HOMR=164;HRun=1;InbreedingCoeff=0.0763;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.66739;LRBP=4021.7;MQ0=2;MQ0Fraction=0.0006;MQM=53.647;MQRankSum=1.083;NS=1047;RA=1663;RL=2;RPP=97.065;RR=49;RUN=1;ReadPosRankSum=-12.726;SAB=0.68627;SAF=35;SAP=18.381 [...]
-20	36285033	rs34715186	AT	A	39417	PASS	AA=530;AB=0.5406;ABA=447;ABP=16.939;ABR=526;AC=88;AF=0.0950;AN=926;BL=20722;BR=20406;BVAR;BaseQRankSum=15.611;DB;DEL;DP=36713;DP4=2551,2475,236,218;Dels=0.09;EL=241;EPP=12.45;ER=289;FQ=999;FR;FS=1.290;HETAR=141;HOMA=16;HOMR=926;HP=2;HPLen=3;HR=3;HRun=1;HU=A;INDEL;InbreedingCoeff=0.0742;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.0076833;LRBP=8.2825;MQ=104.81;MQ0=0;MQ0Fraction=0.0000;MQM=84.285;MQRankSum=-0.702;NF;NR;N [...]
-20	36384872	.	CTG	C	43532.41	PASS	AC=1213;AF=0.99589;AN=1218;BaseQRankSum=0.802;DP=3208;FS=9.727;HRun=0;HaplotypeScore=46.6153;InbreedingCoeff=0.1085;IndelType=DEL.NumRepetitions_7.EventLength_2.RepeatExpansion_TG.;MQ=58.37;MQ0=50;MQ0Fraction=0.0156;MQRankSum=-1.672;QD=13.57;ReadPosRankSum=2.063;SB=-18894.12;VQSLOD=4.7353;set=VQSR
-20	36542802	.	GTA	G	31310.15	PASS	AA=1481;AB=0.67546;ABA=1378;ABP=1138.4;ABR=2868;AC=437;AF=0.35938;AN=1216;BL=25719;BR=95500;BVAR;BaseQRankSum=9.478;DEL;DP=18068;DS;Dels=0.10;EL=889;EPP=132.34;ER=592;FS=320.726;HETAR=591;HOMA=44;HOMR=378;HRun=0;InbreedingCoeff=-0.4197;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_TA.;LEN=2;LRB=0.57566;LRBP=87231;MQ0Fraction=0.0091;MQM=29.319;MQRankSum=-3.409;NS=1013;RA=4037;RL=3;RPP=3193;RR=1478;RUN=1;ReadPosRankSum=-6.687;SAB=0.40041;SAF [...]
-20	36985025	.	CCA	C	4.57	PASS	AC=0;AF=0.0000;AN=682;BaseQRankSum=4.199;DP=1504;FS=1.036;HRun=0;HaplotypeScore=18.5241;InbreedingCoeff=0.0460;IndelType=DEL.NumRepetitions_6.EventLength_2.RepeatExpansion_CA.;MQ=57.04;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.774;ReadPosRankSum=-2.105;VQSLOD=6.7455;set=VQSR
-20	37139725	.	CAG	C	250.77	PASS	AF=0.0084;AF1=0.0139;BaseQRankSum=4.131;CI95=0.00885,0.01991;DP=7973;DP4=1808,1990,2,7;Dels=0.01;FQ=104;FR;FS=11.160;HP=3;HPLen=2;HR=1;HRun=0;HU=A;INDEL;InbreedingCoeff=-0.0001;IndelType=DEL.NumRepetitions_3.EventLength_2.RepeatExpansion_AG.;MQ=103.71;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-3.378;NF;NR;PP;PV4=0.18,0.0011,0.041,1;ReadPosRankSum=0.605;SC=AGATGGGGAACAGAGAGCAAG;SET_INTEGRATION;SET_WGVQSR;TC;TR=6;TU=AG;VQSLOD=7.0630;set=Intersection;sumGLbyD=12.13
-20	37213224	.	G	GTA	3230.05	PASS	AA=32;AB=0.50769;ABA=32;ABP=3.0437;ABR=33;AC=12;AF=0.0168;AF1=0.02635;AN=714;BL=1271;BR=1743;BVAR;BaseQRankSum=-7.288;CI95=0.02212,0.03319;DP=14304;DP4=2180,2256,13,21;Dels=0.00;EL=20;EPP=7.3532;ER=12;FQ=999;FR;FS=7.863;HETAR=9;HOMA=0;HOMR=1043;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0410;IndelType=INS.NumRepetitions_1.EventLength_2.RepeatExpansion_TA.;LEN=2;LRB=0.1566;LRBP=163.52;MQ=95.56;MQ0=1;MQ0Fraction=0.0005;MQM=51.562;MQRankSum=0. [...]
-20	37282014	.	ATGG	A	2518.52	PASS	AF=0.03519;BaseQRankSum=11.994;DP=24592;DP4=415,3804,8,49;DS;Dels=0.01;FQ=999;FR;FS=2.049;HP=1;HPLen=1;HR=1;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1028;IndelType=DEL.NumRepetitions_5.EventLength_3.;MQ=51.01;MQ0Fraction=0.0139;MQRankSum=-5.912;NF;NR;PP;PV4=0.27,1,0.22,0.015;ReadPosRankSum=1.781;SC=GGTGGTGATGATGGTGGTGGT;TC;TR=17;TU=GGT;VQSLOD=2.1183;set=filterInVQSR-2of5;sumGLbyD=9.05
-20	37532218	.	GTCCGTCCA	ATCCGTCCA,G	76120.88	PASS	AC=998;AF=0.92924;AN=1074;BaseQRankSum=-2.877;DP=3087;FR;FS=9.889;HP=2;HPLen=2;HR=1;HRun=0;HU=T;HaplotypeScore=71.6244;InbreedingCoeff=-0.0027;IndelType=MIXED;MQ=52.68;MQ0=543;MQ0Fraction=0.1759;MQRankSum=-1.750;NF;NR;PP;QD=24.98;ReadPosRankSum=-0.850;SB=-36635.43;SC=CCGTCCGTCCGTCCGTCCATC;TC;TR=19;TU=CCGT;VQSLOD=5.3068;set=Intersection
-20	37712193	.	AAG	A	2670.33	PASS	AA=106;AB=0.62821;ABA=87;ABP=36.418;ABR=147;AC=53;AF=0.0759;AN=698;BL=4672;BR=4303;BVAR;BaseQRankSum=13.696;DEL;DP=15155;DP4=1340,1852,32,52;Dels=0.06;EL=57;EPP=4.3214;ER=49;FR;FS=0.824;HETAR=43;HOMA=7;HOMR=982;HP=1;HPLen=2;HR=2;HRun=0;HU=A;INDEL;InbreedingCoeff=0.0861;IndelType=DEL.NumRepetitions_3.EventLength_2.RepeatExpansion_AG.;LEN=2;LRB=0.041114;LRBP=35.954;MQ=86.12;MQ0=0;MQ0Fraction=0.0000;MQM=54.236;MQRankSum=-5.745;NF;NR;NS=1034;PP;PV4=0.5,7.3e-2 [...]
-20	37739002	.	T	TCA	1395.38	PASS	AA=16;AB=0.48387;ABA=16;ABP=3.0803;ABR=15;AC=11;AF=0.00950;AN=1158;BL=504;BR=630;BVAR;BaseQRankSum=-3.257;DP=13617;DP4=1660,883,7,5;Dels=0.00;EL=7;EPP=3.5532;ER=9;FR;FS=1.114;HETAR=9;HOMA=0;HOMR=991;HP=1;HPLen=2;HR=2;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0527;IndelType=INS.NumRepetitions_1.EventLength_2.RepeatExpansion_CA.;LEN=2;LRB=0.11111;LRBP=33.411;MQ=88.41;MQ0=0;MQ0Fraction=0.0000;MQM=83.75;MQRankSum=1.713;NF;NR;NS=1000;PP;PV4=0.76,1,1,0.5;RA=3257; [...]
-20	38395256	.	TTGAG	T	633.19	PASS	AF=0.0028;BaseQRankSum=5.667;DP=3839;Dels=0.00;FR;FS=10.238;HP=2;HPLen=3;HR=3;HRun=0;HU=T;InbreedingCoeff=-0.0097;IndelType=DEL.NumRepetitions_1.EventLength_4.;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.276;NF;NR;PP;ReadPosRankSum=-1.016;SC=ATGTGTTTGTTTGAGTATGTT;SET_INTEGRATION;SET_WGVQSR;TC;TR=10;TU=GTTT;VQSLOD=6.4906;set=Intersection;sumGLbyD=10.83
-20	39345038	.	CTGAACCATAATGTG	C,CCCATAATGTG	60744.52	PASS	AA=23;AB=0.67143;ABA=23;ABP=20.878;ABR=47;AC=232,2;AF=0.19366,0.00167;AN=1198;BL=1607;BR=1843;BVAR;BaseQRankSum=30.955;DEL;DP=31490;DP4=1729,2100,265,278;Dels=0.13;EL=6;EPP=14.434;ER=17;FQ=999;FR;FS=1.767;HETAR=18;HOMA=0;HOMR=1015;HP=1;HPLen=2;HR=2;HRun=0;HU=C;INDEL;InbreedingCoeff=0.1991;IndelType=MULTIALLELIC_INDEL;LEN=14;LRB=0.068406;LRBP=38.066;MQ=104.60;MQ0=0;MQ0Fraction=0.0000;MQM=189.83;MQRankSum=-16.579;NF;NR;NS=1033;PP;PV [...]
-20	39418008	.	AG	A	46796	PASS	AA=113;AB=0.9511;ABA=80;ABP=2894.6;ABR=1556;AC=30;AF=0.02412;AN=1244;BL=638;BR=6936;BVAR;BaseQRankSum=7.280;DEL;DP=14307;Dels=0.00;EL=50;EPP=6.2579;ER=63;FR;FS=5.707;HETAR=473;HOMA=361;HOMR=246;HP=3;HR=3;HRun=3;HU=G;InbreedingCoeff=0.0272;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.83153;LRBP=11375;MQ0=0;MQ0Fraction=0.0000;MQM=62.398;MQRankSum=3.530;NF;NR;NS=1089;PP;RA=3000;RL=3;RPP=223.02;RR=110;RUN=1;ReadPosRankSum=-18.601;S [...]
-20	39876961	.	GT	G,GTT,GTTT	2302.10	PASS	ABR=496;AC=45,51,45;AF=0.03664,0.04153,0.03664;AN=1228;BVAR;BaseQRankSum=4.462;DP=37649;DP4=1457,1975,57,59;Dels=0.02;FR;FS=9.938;HOMA=0;HOMR=978;HP=10;HPLen=10;HR=10;HRun=10;HU=T;INDEL;INS;InbreedingCoeff=0.2583;IndelType=MULTIALLELIC_INDEL;MQ=97.28;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.246;NF;NR;NS=1063;PP;PV4=0.15,1,1.9e-09,0.016;RA=5185;RUN=1;ReadPosRankSum=-4.954;SC=AGTTTCTCCGGTTTTTTTTTT;SET_WGVQSR;SRB=0.47464;SRF=2461;SRP=31.978;SRR=2724;TC;T [...]
-20	41013333	.	TC	T	20681	PASS	AA=137;AB=0.89211;ABA=134;ABP=1661.6;ABR=1108;AC=68;AF=0.05601;AN=1214;BL=1091;BR=8981;BVAR;BaseQRankSum=1.354;DEL;DP=12998;Dels=0.01;EL=57;EPP=11.395;ER=80;FS=0.758;HETAR=359;HOMA=100;HOMR=610;HRun=1;InbreedingCoeff=0.0104;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.78336;LRBP=13424;MQ0=1;MQ0Fraction=0.0003;MQM=67.745;MQRankSum=2.563;NS=1072;RA=4447;RL=5;RPP=258.66;RR=132;RUN=1;ReadPosRankSum=-14.092;SAB=0.59124;SAF=81;SAP=12 [...]
-20	41659532	.	GC	G	40544	PASS	AA=42;AB=0.97149;ABA=39;ABP=2644.5;ABR=1329;AC=15;AF=0.0209;AN=716;BL=2531;BR=135;BVAR;BaseQRankSum=-2.537;DEL;DP=12219;Dels=0.00;EL=25;EPP=6.3192;ER=17;FS=2.656;HETAR=374;HOMA=155;HOMR=551;HRun=1;InbreedingCoeff=-0.0270;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.89872;LRBP=4678.9;MQ0=0;MQ0Fraction=0.0000;MQM=103.31;MQRankSum=2.828;NS=1088;RA=4736;RL=41;RPP=85.733;RR=1;RUN=1;ReadPosRankSum=-9.702;SAB=0.57143;SAF=24;SAP=4.8716 [...]
-20	41845580	.	GA	G	49310	PASS	AA=83;AB=0.95258;ABA=69;ABP=2591.6;ABR=1386;AC=46;AF=0.03740;AN=1230;BL=1320;BR=5150;BVAR;BaseQRankSum=-1.121;DEL;DP=13336;Dels=0.00;EL=36;EPP=6.1759;ER=47;FR;FS=0.372;HETAR=442;HOMA=341;HOMR=295;HP=2;HR=3;HRun=1;HU=G;InbreedingCoeff=0.0238;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.59196;LRBP=4926.2;MQ0=0;MQ0Fraction=0.0000;MQM=89.048;MQRankSum=0.897;NF;NR;NS=1080;PP;RA=3006;RL=5;RPP=142.43;RR=78;RUN=1;ReadPosRankSum=-15.412 [...]
-20	42209428	.	GC	G	13163	PASS	AA=89;AB=0.86677;ABA=83;ABP=730.96;ABR=540;AC=39;AF=0.03218;AN=1212;BL=950;BR=5334;BVAR;BaseQRankSum=-10.119;DEL;DP=10692;Dels=0.01;EL=48;EPP=4.2058;ER=41;FS=0.000;HETAR=259;HOMA=727;HOMR=54;HRun=1;InbreedingCoeff=0.0448;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.69764;LRBP=6644.4;MQ0=0;MQ0Fraction=0.0000;MQM=126.55;MQRankSum=4.223;NS=1040;RA=723;RL=12;RPP=106.09;RR=77;RUN=1;ReadPosRankSum=-17.362;SAB=0.39326;SAF=35;SAP=11.81 [...]
-20	42281109	.	T	TAG	2321.12	PASS	AC=181;AF=0.3740;AN=484;BaseQRankSum=8.977;DP=435;FS=17.001;HRun=0;HaplotypeScore=14.6734;InbreedingCoeff=0.2340;IndelType=INS.NOVEL_2.;MQ=53.88;MQ0=47;MQ0Fraction=0.1080;MQRankSum=0.762;QD=12.41;ReadPosRankSum=3.399;SB=-1299.73;SET_INTEGRATION;VQSLOD=4.8926;set=VQSR
-20	42436117	.	TC	T	38933	PASS	AA=18;AB=0.98435;ABA=17;ABP=2215.9;ABR=1069;AC=15;AF=0.01223;AN=1226;BL=498;BR=428;BVAR;BaseQRankSum=-7.224;DEL;DP=12436;Dels=0.00;EL=1;EPP=33.893;ER=17;FS=2.469;HETAR=303;HOMA=614;HOMR=123;HRun=1;InbreedingCoeff=0.0439;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.075594;LRBP=14.501;MQ0=0;MQ0Fraction=0.0000;MQM=98.611;MQRankSum=1.086;NS=1075;RA=1656;RL=10;RPP=3.4928;RR=8;RUN=1;ReadPosRankSum=-17.765;SAB=0.5;SAF=9;SAP=3.0103;SAR [...]
-20	42682214	.	C	A,CAT	3904.51	PASS	AA=24;AB=0.6383;ABA=17;ABP=10.818;ABR=30;AC=0;AF=0.0000;AN=636;BL=1119;BR=949;BVAR;BaseQRankSum=1.426;DP=6509;Dels=0.00;EL=9;EPP=6.2675;ER=15;FR;HETAR=12;HOMA=3;HOMR=876;HP=2;HPLen=1;HR=1;HRun=0;HU=A;INS;InbreedingCoeff=0.0006;IndelType=MIXED;LEN=2;LRB=0.082205;LRBP=33.356;MQ0Fraction=0.0046;MQM=40.792;MQRankSum=-0.296;NF;NR;NS=891;PP;QD=32.81;RA=2679;RL=15;RPP=6.2675;RR=9;RUN=1;ReadPosRankSum=-1.806;SAB=0.75;SAF=18;SAP=16.039;SAR=6;SB=-924.23;SC=TATACA [...]
-20	42973456	.	CA	C,CAA,CAAA	2675	PASS	AA=90;AB=0.79177;ABA=86;ABP=308.39;ABR=327;AC=77,61,39;AF=0.06492,0.05143,0.03288;AN=1186;BL=2983;BR=4446;BVAR;BaseQRankSum=2.422;DP=9416;Dels=0.03;EL=39;EPP=6.4847;ER=51;FR;FS=31.555;HETAR=75;HOMA=1;HOMR=888;HP=11;HR=11;HRun=11;HU=A;INS;InbreedingCoeff=0.2696;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.19693;LRBP=628.63;MQ0=0;MQ0Fraction=0.0000;MQM=55.567;MQRankSum=1.777;NF;NR;NS=964;PP;RA=3601;RL=37;RPP=9.1869;RR=53;RUN=1;ReadPosRankSum=-4.991;SAB=0.5 [...]
-20	43091870	.	TC	T	2455.60	PASS	AA=120;AB=0.10619;ABA=101;ABP=155.22;ABR=12;AC=42;AF=0.03825;AN=1098;BL=573;BR=8744;BVAR;BaseQRankSum=-13.513;DEL;DP=9139;Dels=0.00;EL=64;EPP=4.1684;ER=56;FS=9.856;HETAR=118;HOMA=820;HOMR=0;HRun=1;InbreedingCoeff=0.0833;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.877;LRBP=15564;MQ0Fraction=0.0017;MQM=45.1;MQRankSum=2.266;NS=938;RA=24;RL=1;RPP=254.97;RR=119;RUN=1;ReadPosRankSum=-15.803;SAB=0.475;SAF=57;SAP=3.6617;SAR=63;SRB=0 [...]
-20	43233648	rs74585029	GA	G,GAA	1504.40	PASS	AA=113;AB=0.78652;ABA=95;ABP=320.31;ABR=350;AC=41,65;AF=0.03394,0.05381;AF1=0.0115;AN=1208;BL=4677;BR=5548;BVAR;BaseQRankSum=6.744;CI95=0.004274,0.01852;DB;DEL;DP=13996;DP4=1736,1549,15,17;Dels=0.03;EL=69;EPP=15.021;ER=44;FQ=14;FR;FS=12.174;HETAR=119;HOMA=15;HOMR=892;HP=11;HPLen=10;HR=10;HRun=10;HU=A;INDEL;InbreedingCoeff=0.2359;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.085183;LRBP=164.12;MQ=89.12;MQ0Fraction=0.0000;MQM=69.867;MQRankSum=2.513;N [...]
-20	43246548	.	AC	A,CC	41579.13	PASS	AA=382;AB=0.72402;ABA=316;ABP=502.11;ABR=829;AC=1197;AF=0.99254;AN=1206;BL=9889;BR=14293;BVAR;BaseQRankSum=1.373;DEL;DP=10477;DS;Dels=0.05;EL=243;EPP=64.494;ER=139;FS=29.162;HETAR=291;HOMA=85;HOMR=624;HPLen=10;InbreedingCoeff=0.1392;IndelType=MIXED;LEN=1;LRB=0.18212;LRBP=1744.6;MQ0Fraction=0.0024;MQM=48.471;MQRankSum=5.726;NS=1001;RA=3138;RL=174;RPP=9.5816;RR=208;RUN=1;ReadPosRankSum=5.755;SAB=0.79843;SAF=305;SAP=298.51;SAR=77;SET_INTEGRATION;SET_WGVQS [...]
-20	43258646	.	T	TT	1107.17	PASS	AC=97;AF=0.08420;AN=1152;BaseQRankSum=4.525;DP=2345;FS=19.308;HRun=9;HaplotypeScore=13.6276;InbreedingCoeff=0.1299;IndelType=INS.NumRepetitions_10orMore.EventLength_1.RepeatExpansion_T.;MQ=76.70;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.395;QD=2.67;ReadPosRankSum=-4.696;SB=-899.41;VQSLOD=5.4523;set=VQSR
-20	43718299	.	ATTACT	A	5497.06	PASS	AA=56;AB=0.51818;ABA=53;ABP=3.3262;ABR=57;AC=18;AF=0.0251;AF1=0.03729;AN=718;BL=2321;BR=2591;BVAR;BaseQRankSum=11.142;CI95=0.03319,0.04425;DEL;DP=17576;DP4=2460,2692,31,22;Dels=0.02;EL=28;EPP=3.0103;ER=28;FQ=999;FR;FS=9.689;HETAR=15;HOMA=1;HOMR=1068;HP=2;HPLen=2;HR=2;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0448;IndelType=DEL.NumRepetitions_1.EventLength_5.;LEN=5;LRB=0.054967;LRBP=35.238;MQ=96.55;MQ0=0;MQ0Fraction=0.0000;MQM=50.286;MQRankSum=-5.149;NF;NR;NS [...]
-20	43981749	.	A	AAAAAAC,AC	20899.71	PASS	ABR=192;AC=91,0;AF=0.1285,0.0000;AN=708;BVAR;BaseQRankSum=7.858;DP=23372;DP4=1554,1457,55,42;Dels=0.00;FR;FS=0.000;HOMA=4;HOMR=995;HP=6;HPLen=7;HR=7;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.2109;IndelType=MULTIALLELIC_INDEL;MQ=95.59;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-12.081;NF;NR;NS=1051;PP;PV4=0.35,1,8.9e-73,1;RA=5027;RUN=1;ReadPosRankSum=-1.359;SC=TACACTAGCAAAAAAACAAAA;SET_WGVQSR;SRB=0.48518;SRF=2439;SRP=12.6;SRR=2588;TC;TR=7;TU=A;VQSLOD=8.0916; [...]
-20	43999274	.	TCAAA	T	2948.85	PASS	AA=59;AB=0.59441;ABA=58;ABP=14.08;ABR=85;AC=20;AF=0.0290;AF1=0.04249;AN=690;BL=2277;BR=2436;BVAR;BaseQRankSum=9.320;CI95=0.0354,0.05088;DEL;DP=14599;DP4=2052,2303,21,22;Dels=0.03;EL=32;EPP=3.9304;ER=27;FQ=999;FR;FS=0.000;HETAR=21;HOMA=0;HOMR=1043;HP=2;HPLen=1;HR=1;HRun=0;HU=C;INDEL;InbreedingCoeff=-0.0037;IndelType=DEL.NumRepetitions_1.EventLength_4.;LEN=4;LRB=0.033736;LRBP=14.658;MQ=90.05;MQ0=0;MQ0Fraction=0.0000;MQM=75.339;MQRankSum=-1.294;NF;NR;NS=10 [...]
-20	44098622	.	C	CG	1092.40	PASS	AA=129;AB=0.77301;ABA=74;ABP=214.06;ABR=252;AC=45;AF=0.0455;AN=988;BL=6586;BR=3029;BVAR;BaseQRankSum=2.802;DP=5177;Dels=0.00;EL=122;EPP=225.63;ER=7;FR;FS=355.273;HETAR=66;HOMA=11;HOMR=734;HP=6;HR=4;HRun=4;HU=G;INS;InbreedingCoeff=0.1759;IndelType=INS.NumRepetitions_4.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.36994;LRBP=2860.4;MQ0=0;MQ0Fraction=0.0000;MQM=52.395;MQRankSum=1.946;NF;NR;NS=811;PP;RA=1981;RL=121;RPP=217.95;RR=8;RUN=1;ReadPosRankSum=-6.413;SA [...]
-20	44327637	.	A	AG,AGGGGGG	14351.23	PASS	AC=9,211;AF=0.0103,0.2409;AN=876;BaseQRankSum=15.517;DP=1704;FS=6.768;HaplotypeScore=31.5906;InbreedingCoeff=0.1538;IndelType=MULTIALLELIC_INDEL;MQ=54.64;MQ0=4;MQ0Fraction=0.0023;MQRankSum=-12.691;QD=20.83;ReadPosRankSum=-3.583;SB=-6278.99;VQSLOD=5.1556;set=VQSR
-20	45202636	.	GA	G	13269	PASS	AA=25;AB=0.96162;ABA=18;ABP=871.09;ABR=451;AC=24;AF=0.02013;AN=1192;BL=567;BR=1728;BVAR;BaseQRankSum=-5.361;DEL;DP=10873;Dels=0.00;EL=10;EPP=5.1818;ER=15;FS=0.928;HETAR=169;HOMA=831;HOMR=45;HRun=1;InbreedingCoeff=0.0999;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.50588;LRBP=1278.4;MQ0=0;MQ0Fraction=0.0000;MQM=170.56;MQRankSum=0.161;NS=1049;RA=632;RL=2;RPP=41.315;RR=23;RUN=1;ReadPosRankSum=-14.760;SAB=0.68;SAF=17;SAP=10.046;SAR [...]
-20	45417828	.	TGAGC	T,TGC	4672.90	PASS	ABR=317;AC=69,104;AF=0.05712,0.08609;BVAR;BaseQRankSum=18.527;DEL;DP=11835;DS;FS=184.873;HOMA=48;HOMR=575;HaplotypeScore=65.5875;InbreedingCoeff=0.0599;IndelType=MULTIALLELIC_INDEL;MQ=29.78;MQ0=2988;MQ0Fraction=0.3629;MQRankSum=5.052;NS=713;QD=1.11;RA=1581;RUN=1;ReadPosRankSum=6.574;SB=-2116.87;SRB=0.47502;SRF=751;SRP=11.582;SRR=830;VQSLOD=0.0651;set=filterInVQSR-2of5
-20	45525657	rs66759083	TA	AA,T	49315	PASS	AA=2361;AB=0.45241;ABA=1398;ABP=53.235;ABR=1155;AC=20;AF=0.01701;AN=1176;BL=94913;BR=100886;BVAR;BaseQRankSum=0.740;DB;DEL;DP=30636;DP4=1258,881,1206,999;Dels=0.48;EL=1133;EPP=11.311;ER=1228;FQ=999;FR;FS=7.072;HETAR=503;HOMA=310;HOMR=218;HP=6;HPLen=7;HR=7;HU=T;INDEL;InbreedingCoeff=0.2271;IndelType=MIXED;LEN=1;LRB=0.030506;LRBP=398.68;MQ=102.24;MQ0=0;MQ0Fraction=0.0000;MQM=75.359;MQRankSum=0.148;NF;NR;NS=1031;PP;PV4=0.0064,0,4.6e-23,0.47;RA=2042; [...]
-20	45783456	.	T	TG	2355.68	PASS	AA=64;AB=0.78521;ABA=61;ABP=203.67;ABR=223;AC=15;AF=0.0165;AN=910;BL=815;BR=5486;BVAR;BaseQRankSum=8.593;DP=10348;Dels=0.00;EL=48;EPP=37.754;ER=16;FS=77.861;HETAR=56;HOMA=1;HOMR=970;HRun=1;INS;InbreedingCoeff=-0.0549;IndelType=INS.NOVEL_1.Novel_G.;LEN=1;LRB=0.74131;LRBP=7522.1;MQ0Fraction=0.0122;MQM=44.562;MQRankSum=-1.258;NS=1027;RA=4750;RL=0;RPP=141.98;RR=64;RUN=1;ReadPosRankSum=-7.047;SAB=0.25;SAF=16;SAP=37.754;SAR=48;SRB=0.6;SRF=2850;SRP=415.59;SRR=190 [...]
-20	46517110	.	C	CT	868.55	PASS	AC=15;AF=0.0218;AN=688;BaseQRankSum=8.522;DP=1752;FS=6.570;HRun=0;HaplotypeScore=14.9548;InbreedingCoeff=0.0452;IndelType=INS.NOVEL_1.Novel_T.;MQ=77.73;MQ0=0;MQ0Fraction=0.0000;MQRankSum=3.874;QD=10.98;ReadPosRankSum=-0.733;SB=-396.78;SET_INTEGRATION;SET_WGVQSR;VQSLOD=6.7740;set=VQSR
-20	46629361	.	TTTCTTTC	T,TTTTC	13000.91	PASS	AC=188,107;AF=0.2212,0.1259;AN=850;BaseQRankSum=7.214;DP=1846;FS=14.502;HaplotypeScore=40.8481;InbreedingCoeff=0.3210;IndelType=MULTIALLELIC_INDEL;MQ=50.74;MQ0=79;MQ0Fraction=0.0428;MQRankSum=-6.348;QD=13.59;ReadPosRankSum=3.943;SB=-3581.20;VQSLOD=5.9412;set=VQSR
-20	46951099	.	G	GT	1662.30	PASS	AA=55;AB=0.7713;ABA=51;ABP=145.58;ABR=172;AC=47;AF=0.03923;AN=1198;BL=3288;BR=2434;BVAR;BaseQRankSum=-4.014;DP=27423;DP4=1483,1590,58,42;Dels=0.01;EL=21;EPP=9.6826;ER=34;FR;FS=9.565;HETAR=48;HOMA=0;HOMR=913;HP=16;HPLen=10;HR=10;HRun=10;HU=T;INDEL;INS;InbreedingCoeff=0.0952;IndelType=INS.NumRepetitions_10orMore.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.14925;LRBP=279.78;MQ=70.36;MQ0Fraction=0.0124;MQM=52.545;MQRankSum=0.717;NF;NR;NS=961;PP;PV4=0.067,1,1, [...]
-20	47201076	rs58052846	C	CT	982.16	PASS	AC=50;AF=0.0551;AN=908;BaseQRankSum=12.598;DB;DP=2449;FS=35.648;HRun=0;HaplotypeScore=29.4602;InbreedingCoeff=-0.0542;IndelType=INS.NOVEL_1.Novel_T.;MQ=63.54;MQ0=0;MQ0Fraction=0.0000;MQRankSum=2.196;QD=3.16;ReadPosRankSum=-13.833;SB=-488.19;VQSLOD=6.0429;set=VQSR
-20	47965974	rs60011158	G	GA	999	PASS	AA=21;AB=0.57143;ABA=21;ABP=5.1818;ABR=28;AC=7;AF=0.0101;AF1=0.02061;AN=690;BL=1043;BR=577;BVAR;BaseQRankSum=-3.087;CI95=0.01549,0.02655;DB;DP=14578;DP4=1554,3055,6,17;Dels=0.00;EL=11;EPP=3.1137;ER=10;FQ=999;FR;FS=5.982;HETAR=7;HOMA=0;HOMR=1041;HP=2;HPLen=1;HR=1;HRun=1;HU=A;INDEL;INS;InbreedingCoeff=0.0356;IndelType=INS.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.28765;LRBP=294.09;MQ=80.17;MQ0=0;MQ0Fraction=0.0000;MQM=64.19;MQRankSum [...]
-20	48402974	rs57331436	GA	G	27741	PASS	AA=401;AB=0.5372;ABA=311;ABP=11.089;ABR=361;AC=84;AF=0.1186;AN=708;BL=16591;BR=14776;BVAR;BaseQRankSum=14.621;DB;DEL;DP=30607;DP4=1928,2310,195,225;Dels=0.11;EL=189;EPP=5.8749;ER=212;FQ=999;FR;FS=15.568;HETAR=110;HOMA=30;HOMR=923;HP=4;HPLen=3;HR=1;HRun=3;HU=A;INDEL;InbreedingCoeff=0.1263;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;KGPilot123;LEN=1;LRB=0.057863;LRBP=231.06;MQ=106.68;MQ0=0;MQ0Fraction=0.0000;MQM=63.005;MQRankSum=-2 [...]
-20	49101936	.	C	CT	404.46	PASS	AC=40;AF=0.03559;AN=1124;BaseQRankSum=0.750;DP=2162;FS=14.291;HRun=2;HaplotypeScore=30.9513;InbreedingCoeff=-0.0082;IndelType=INS.NumRepetitions_2.EventLength_1.RepeatExpansion_T.;MQ=49.78;MQ0=113;MQ0Fraction=0.0523;MQRankSum=-1.289;QD=1.94;ReadPosRankSum=-2.041;SB=-385.48;VQSLOD=4.6365;set=VQSR
-20	49731218	.	ATTTTATTTTTTATT	A,ATTTTATT	8398.93	PASS	AF=0.0656,0.0156;AF1=0.0996;BaseQRankSum=13.996;CI95=0.07743,0.1239;DP=6308;DP4=951,1311,23,35;Dels=0.05;FQ=999;FR;FS=12.503;HP=7;HPLen=4;HR=4;HRun=0;HU=T;INDEL;InbreedingCoeff=0.1892;IndelType=MULTIALLELIC_INDEL;MQ=57.61;MQ0Fraction=0.0145;MQRankSum=-5.208;NF;NR;PP;PV4=0.79,1,6.3e-06,0.16;ReadPosRankSum=-2.239;SC=TATTTTATTTATTTTATTTTT;TC;TR=11;TU=ATTT;VQSLOD=4.3191;set=Intersection;sumGLbyD=42.27
-20	49894989	.	TA	T	172.25	PASS	AF=0.0140;BaseQRankSum=7.220;DP=3882;Dels=0.00;FS=17.217;HPLen=2;HRun=1;InbreedingCoeff=0.0531;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;MQ0Fraction=0.0214;MQRankSum=-0.661;ReadPosRankSum=-0.592;SET_INTEGRATION;SET_WGVQSR;VQSLOD=3.0905;set=filterInVQSR-2of5;sumGLbyD=6.60
-20	50010923	rs66516522	C	CT,CTGG	35851	PASS	ABR=555;AC=310,11;AF=0.26451,0.00939;BVAR;BaseQRankSum=10.662;DB;DP=8188;FR;FS=34.411;HOMA=261;HOMR=399;HP=5;HR=6;HU=C;HaplotypeScore=45.1715;INS;InbreedingCoeff=0.2090;IndelType=MULTIALLELIC_INDEL;MQ=72.80;MQ0=0;MQ0Fraction=0.0000;MQRankSum=9.015;NF;NR;NS=831;PP;QD=9.69;RA=1986;RUN=1;ReadPosRankSum=-24.284;SB=-6038.55;SC=TGTCTGTCCCCCCTCAGCACT;SRB=0.45972;SRF=913;SRP=31.001;SRR=1073;TC;TR=6;TU=C;VQSLOD=6.1824;set=Intersection
-20	50228709	rs71192536	TG	T	20517	PASS	AA=924;AB=0.50203;ABA=735;ABP=3.0633;ABR=741;AC=200;AF=0.16502;AN=1212;BL=35460;BR=34197;BVAR;BaseQRankSum=13.810;DB;DEL;DP=32402;DP4=1760,2065,395,449;Dels=0.16;EL=439;EPP=7.9831;ER=485;FQ=999;FR;FS=0.558;HETAR=242;HOMA=63;HOMR=764;HP=5;HPLen=3;HR=3;HRun=3;HU=G;INDEL;InbreedingCoeff=0.1050;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.018132;LRBP=52.738;MQ=105.83;MQ0=0;MQ0Fraction=0.0000;MQM=75.87;MQRankSum=3.895;NF;NR [...]
-20	50236115	.	AGG	A,ACGGG,AG,AGGG	7429.57	PASS	AC=192,13,221,183;AF=0.2115,0.0143,0.2434,0.2015;AN=908;BaseQRankSum=1.045;DP=1177;FS=13.479;HaplotypeScore=11.8294;InbreedingCoeff=0.7959;IndelType=MULTIALLELIC_INDEL;MQ=52.98;MQ0=6;MQ0Fraction=0.0051;MQRankSum=-1.482;QD=7.28;ReadPosRankSum=-2.380;SB=-1229.31;SET_WGVQSR;VQSLOD=8.3762;set=VQSR
-20	51589568	.	TAAAC	AAAAC,T	12477.52	PASS	AF=0.27949;BaseQRankSum=-28.122;DP=3777;Dels=0.00;FR;FS=31.799;HP=7;HPLen=4;HR=3;HRun=0;HU=A;InbreedingCoeff=-0.1429;IndelType=MIXED;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.196;NF;NR;PP;ReadPosRankSum=-16.483;SC=AAATTCAAAATAAACAAACAA;SET_INTEGRATION;SET_WGVQSR;TC;TR=18;TU=AAAC;VQSLOD=3.9201;set=filterInVQSR-2of5;sumGLbyD=52.43
-20	51617742	.	TGC	T,TGCGC	1374.91	PASS	AF=0.06000,0.02000;BaseQRankSum=12.051;DP=6231;Dels=0.00;FS=189.609;HPLen=1;HRun=0;InbreedingCoeff=0.0862;IndelType=MULTIALLELIC_INDEL;MQ0Fraction=0.0180;MQRankSum=-2.959;ReadPosRankSum=-5.090;VQSLOD=-2.8715;set=filterInVQSR-2of5;sumGLbyD=3.97
-20	51770354	.	AG	A	1010.90	PASS	AA=26;AB=0.52727;ABA=26;ABP=3.3656;ABR=29;AC=7;AF=0.0097;AF1=0.01637;AN=718;BL=1034;BR=964;BVAR;BaseQRankSum=5.588;CI95=0.01327,0.02212;DEL;DP=16259;DP4=2785,2239,15,10;Dels=0.01;EL=11;EPP=4.3466;ER=15;FQ=999;FR;FS=3.367;HETAR=8;HOMA=0;HOMR=1064;HP=2;HPLen=2;HR=2;HRun=2;HU=G;INDEL;InbreedingCoeff=0.0557;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.035035;LRBP=8.3357;MQ=90.48;MQ0=0;MQ0Fraction=0.0000;MQM=61.346;MQRankSum=-0.01 [...]
-20	51848430	.	AT	A,ATT	999	PASS	AA=39;AB=0.83408;ABA=37;ABP=219.19;ABR=186;AC=14,33;AF=0.0153,0.0359;AF1=0.03062;AN=918;BL=1676;BR=1732;BVAR;BaseQRankSum=3.338;CI95=0.02212,0.03982;DP=14886;DP4=1970,1762,22,31;Dels=0.01;EL=18;EPP=3.5114;ER=21;FQ=999;FR;FS=3.004;HETAR=31;HOMA=0;HOMR=1040;HP=10;HPLen=9;HR=9;HRun=9;HU=T;INDEL;INS;InbreedingCoeff=0.1629;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.016432;LRBP=5.0085;MQ=80.05;MQ0=0;MQ0Fraction=0.0000;MQM=56.667;MQRankSum=0.325;NF;NR;NS=1071;PP;PV [...]
-20	51897203	.	T	TG	8427.20	PASS	AA=237;AB=0.69846;ABA=215;ABP=246.92;ABR=498;AC=117;AF=0.1662;AN=704;BL=14961;BR=5990;BVAR;BaseQRankSum=22.203;DP=9710;Dels=0.00;EL=83;EPP=49.198;ER=154;FR;FS=9.450;HETAR=123;HOMA=9;HOMR=895;HP=5;HPLen=6;HR=6;HRun=0;HU=T;INS;InbreedingCoeff=-0.0513;IndelType=INS.NOVEL_1.Novel_G.;LEN=1;LRB=0.42819;LRBP=8344.3;MQ0Fraction=0.0291;MQM=45.861;MQRankSum=-10.426;NF;NR;NS=1027;PP;RA=4919;RL=210;RPP=309.85;RR=27;RUN=1;ReadPosRankSum=-1.843;SAB=0.29536;SAF=70;SAP=89 [...]
-20	52274070	.	AAG	A	1400.37	PASS	AA=30;AB=0.74227;ABA=25;ABP=52.462;ABR=72;AC=21;AF=0.01756;AN=1196;BL=412;BR=1966;BVAR;BaseQRankSum=6.660;DEL;DP=9362;Dels=0.01;EL=16;EPP=3.2998;ER=14;FS=1.485;HETAR=18;HOMA=2;HOMR=1004;HRun=0;InbreedingCoeff=0.0317;IndelType=DEL.NumRepetitions_1.EventLength_2.RepeatExpansion_AG.;LEN=2;LRB=0.65349;LRBP=2208.2;MQ0Fraction=0.0022;MQM=46.133;MQRankSum=-4.743;NS=1024;RA=3931;RL=2;RPP=51.941;RR=28;RUN=1;ReadPosRankSum=-4.152;SAB=0.4;SAF=12;SAP=5.6161;SAR=18;SE [...]
-20	52351501	.	TAC	T	199.59	PASS	AC=22;AF=0.0238;AN=926;BaseQRankSum=7.874;DP=22911;DP4=2146,1691,26,22;FR;FS=2.898;HP=4;HPLen=3;HR=1;HRun=0;HU=A;HaplotypeScore=18.6111;INDEL;InbreedingCoeff=-0.0326;IndelType=DEL.NumRepetitions_6.EventLength_2.RepeatExpansion_AC.;MQ0=2;MQ0Fraction=0.0007;MQRankSum=1.011;NF;NR;PP;PV4=0.88,0.14,0.16,0.24;QD=1.10;ReadPosRankSum=-1.053;SB=-306.09;SC=GACACACAAATACACACACAC;SET_INTEGRATION;SET_WGVQSR;TC;TR=13;TU=AC;VQSLOD=4.0486;set=filterInVQSR-2of5
-20	52447173	.	CA	C	503.89	PASS	AC=23;AF=0.01891;AN=1216;BaseQRankSum=0.801;DP=3266;FS=2.606;HRun=2;HaplotypeScore=22.1543;InbreedingCoeff=-0.0097;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_A.;MQ=118.02;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-1.309;QD=2.65;ReadPosRankSum=-7.872;SB=-279.27;VQSLOD=4.1900;set=VQSR
-20	52498650	.	GT	G	24069	PASS	AA=74;AB=0.90594;ABA=57;ABP=870.4;ABR=549;AC=28;AF=0.02333;AN=1200;BL=505;BR=4514;BVAR;BaseQRankSum=-3.837;DEL;DP=9798;Dels=0.01;EL=41;EPP=4.8883;ER=33;FS=4.085;HETAR=209;HOMA=663;HOMR=121;HRun=1;InbreedingCoeff=0.0334;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.79876;LRBP=6956.6;MQ0=2;MQ0Fraction=0.0007;MQM=57.784;MQRankSum=-2.951;NS=995;RA=957;RL=8;RPP=101.72;RR=66;RUN=1;ReadPosRankSum=-14.806;SAB=0.39189;SAF=29;SAP=10.522;S [...]
-20	52823602	rs11469056	CAAA	C,CA,CAA,CAAAA,CAAAAA,CAAAAAA,CAAAAAAA,CAAAAAAAA,CAAAAAAAAA,CAAAAAAAAAA	14515.17	PASS	AC=24,83,246,109,83,19,10,16,22,59;AF=0.02128,0.07358,0.21809,0.09663,0.07358,0.01684,0.00887,0.01418,0.01950,0.05230;AN=1128;BVAR;BaseQRankSum=4.150;DB;DEL;DP=28279;FR;FS=2.021;HP=17;HR=17;HU=A;HaplotypeScore=27.8032;INS;InbreedingCoeff=0.7740;IndelType=MULTIALLELIC_INDEL;MQ=69.00;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.418;NF;NR;PP;QD=7.90;RUN=1;ReadPosRankSum=-3.864;SB=-3244. [...]
-20	53308906	.	CT	C,CTT	2276	PASS	AA=92;AB=0.84453;ABA=81;ABP=540.17;ABR=440;AC=53,81;AF=0.04351,0.06650;AN=1218;BL=3561;BR=4796;BVAR;BaseQRankSum=3.000;DP=11804;Dels=0.02;EL=48;EPP=3.3879;ER=44;FR;FS=13.197;HETAR=69;HOMA=3;HOMR=993;HP=11;HR=10;HRun=10;HU=T;INS;InbreedingCoeff=0.2297;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.14778;LRBP=399.32;MQ0=1;MQ0Fraction=0.0003;MQM=56.348;MQRankSum=3.154;NF;NR;NS=1065;PP;RA=5520;RL=39;RPP=7.6365;RR=53;RUN=1;ReadPosRankSum=-2.140;SAB=0.57609;SAF=53;SA [...]
-20	53334602	.	T	TG,TGG	905.13	PASS	ABR=325;AC=44,22;AF=0.03624,0.01812;BVAR;BaseQRankSum=-4.608;DP=15015;FR;FS=494.901;HOMA=0;HOMR=1004;HP=1;HR=1;HU=G;HaplotypeScore=20.5023;INS;InbreedingCoeff=0.0799;IndelType=MULTIALLELIC_INDEL;MQ=116.70;MQ0=0;MQ0Fraction=0.0000;MQRankSum=8.022;NF;NR;NS=1064;PP;QD=0.35;RA=5690;RUN=1;ReadPosRankSum=-14.522;SB=-311.57;SC=AGCCATTGGCTGTTTCACTGA;SRB=0.40738;SRF=2318;SRP=426.97;SRR=3372;TC;TR=1;TU=G;VQSLOD=-2.3042;set=filterInVQSR-2of5
-20	53729115	.	T	TG	15.48	PASS	AC=1;AF=0.0015;AN=668;BaseQRankSum=-1.001;DP=1711;FS=9.048;HRun=2;HaplotypeScore=12.4681;InbreedingCoeff=-0.0320;IndelType=INS.NumRepetitions_2.EventLength_1.RepeatExpansion_G.;MQ=131.36;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.193;QD=4.57;ReadPosRankSum=0.407;SB=-5.35;SET_INTEGRATION;SET_WGVQSR;VQSLOD=4.8071;set=VQSR
-20	54033830	.	GTATTTTAAAATCA	G	2220.86	PASS	AF=0.0113;BaseQRankSum=5.506;DP=2577;Dels=0.01;FR;FS=6.533;HP=5;HPLen=4;HR=1;HRun=0;HU=T;InbreedingCoeff=0.0032;IndelType=DEL.NumRepetitions_1.EventLength_10orMore.;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.969;NF;NR;PP;ReadPosRankSum=1.322;SC=TCAATATTTTGTATTTTAAAA;SET_INTEGRATION;SET_WGVQSR;TC;TR=1;TU=T;VQSLOD=5.5145;set=Intersection;sumGLbyD=95.65
-20	54375236	.	GT	G	626.13	PASS	AA=40;AB=0.63551;ABA=39;ABP=20.078;ABR=68;AC=18;AF=0.0256;AN=702;BL=1331;BR=1743;BVAR;BaseQRankSum=9.346;DEL;DP=8568;Dels=0.02;EL=26;EPP=10.828;ER=14;FS=0.610;HETAR=21;HOMA=1;HOMR=1035;HRun=1;InbreedingCoeff=-0.0056;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.13403;LRBP=122.92;MQ0=0;MQ0Fraction=0.0000;MQM=67.125;MQRankSum=-2.537;NS=1058;RA=4870;RL=17;RPP=4.9646;RR=23;RUN=1;ReadPosRankSum=-1.229;SAB=0.525;SAF=21;SAP=3.2274;SAR [...]
-20	54457331	.	G	GA	1793.40	PASS	AA=77;AB=0.66667;ABA=74;ABP=56.573;ABR=148;AC=33;AF=0.02687;AN=1228;BL=3834;BR=1154;BVAR;BaseQRankSum=10.572;DP=10230;Dels=0.00;EL=77;EPP=170.21;ER=0;FS=139.433;HETAR=44;HOMA=1;HOMR=1001;HRun=1;INS;InbreedingCoeff=0.0023;IndelType=INS.NOVEL_1.Novel_A.;LEN=1;LRB=0.53729;LRBP=3129.8;MQ0Fraction=0.0095;MQM=4.7013;MQRankSum=-8.116;NS=1046;RA=4009;RL=77;RPP=170.21;RR=0;RUN=1;ReadPosRankSum=-6.026;SAB=1;SAF=77;SAP=170.21;SAR=0;SRB=0.57022;SRF=2286;SRP=174.7;SRR= [...]
-20	54469810	.	CA	C	1697.62	PASS	AA=93;AB=0.63855;ABA=90;ABP=44.53;ABR=159;AC=34;AF=0.0374;AF1=0.01719;AN=908;BL=3242;BR=5839;BVAR;BaseQRankSum=10.425;CI95=0.009317,0.02795;DEL;DP=15197;DP4=2134,1896,56,46;Dels=0.03;EL=34;EPP=17.604;ER=59;FQ=16;FR;FS=9.985;HETAR=41;HOMA=1;HOMR=1011;HP=9;HPLen=8;HR=8;HRun=8;HU=A;INDEL;InbreedingCoeff=-0.0472;IndelType=DEL.NumRepetitions_8.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.28598;LRBP=1615.8;MQ=83.37;MQ0=1;MQ0Fraction=0.0004;MQM=64.075;MQRankSum=3 [...]
-20	54542453	.	GTATA	G,GTA	5109.66	PASS	ABR=112;AC=66,56;AF=0.0682,0.0579;AN=968;BVAR;BaseQRankSum=17.089;DB;DEL;DP=5519;DS;Dels=0.06;FS=99.502;HOMA=15;HOMR=409;HRun=0;InbreedingCoeff=0.1584;IndelType=MULTIALLELIC_INDEL;MQ0Fraction=0.0178;MQRankSum=-6.854;NS=460;RA=864;RUN=1;ReadPosRankSum=0.855;SRB=0.79282;SRF=685;SRP=646.5;SRR=179;VQSLOD=0.6375;set=filterInVQSR-2of5;sumGLbyD=8.53
-20	54629773	.	CA	C	1799.50	PASS	AA=49;AB=0.82707;ABA=46;ABP=250.17;ABR=220;AC=9;AF=0.00746;AN=1206;BL=173;BR=2277;BVAR;BaseQRankSum=5.240;DEL;DP=8557;Dels=0.01;EL=49;EPP=109.41;ER=0;FS=32.359;HETAR=35;HOMA=1;HOMR=325;HRun=1;InbreedingCoeff=0.0892;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_A.;LEN=1;LRB=0.85878;LRBP=3926.6;MQ0Fraction=0.0602;MQM=32.163;MQRankSum=-3.926;NS=361;RA=1091;RL=0;RPP=109.41;RR=49;RUN=1;ReadPosRankSum=-4.512;SAB=0;SAF=0;SAP=109.41;SAR=49;SRB=0.494 [...]
-20	54710245	.	TA	T	999	PASS	AF=0.0084;AF1=0.0148;BaseQRankSum=3.954;CI95=0.00885,0.02212;DP=8043;DP4=2000,1849,10,7;Dels=0.01;FQ=999;FR;FS=0.000;HP=9;HPLen=6;HR=3;HRun=6;HU=A;INDEL;InbreedingCoeff=0.1181;IndelType=DEL.NumRepetitions_3.EventLength_1.RepeatExpansion_A.;MQ=78.51;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.095;NF;NR;PP;PV4=0.63,0.00056,1,1;ReadPosRankSum=-0.448;SC=CAACAAAAAATAAATAAATAA;SET_INTEGRATION;SET_WGVQSR;TC;TR=15;TU=AAAT;VQSLOD=7.8129;set=Intersection;sumGLbyD=19.02
-20	54968173	.	A	AAT,AATAT,AT,ATAT	89535.82	PASS	ABR=994;AC=561,278,2,3;AF=0.50179,0.24866,0.00179,0.00268;AN=1118;BVAR;BaseQRankSum=-2.699;DB;DP=27837;DP4=168,177,1045,866;Dels=0.00;FQ=999;FR;FS=12.472;HOMA=71;HOMR=455;HP=3;HPLen=4;HR=4;HRun=0;HU=A;INDEL;INS;InbreedingCoeff=0.6391;IndelType=MULTIALLELIC_INDEL;KGPilot123;MQ=80.36;MQ0Fraction=0.0055;MQRankSum=-1.512;NF;NR;NS=913;PP;PV4=0.046,1,1,1;RA=2015;RUN=1;ReadPosRankSum=1.015;SC=GGCCACTTAAAATATATATAT;SET_WGVQSR;SRB=0.44864;SRF=904;SR [...]
-20	55176688	.	TA	T	421.84	PASS	AF=0.01322;AF1=0.01845;BaseQRankSum=5.383;CI95=0.01282,0.02564;DP=10531;DP4=1975,2017,16,14;Dels=0.01;FQ=91.2;FR;FS=7.401;HP=6;HPLen=5;HR=5;HRun=5;HU=A;INDEL;InbreedingCoeff=0.0829;IndelType=DEL.NumRepetitions_5.EventLength_1.RepeatExpansion_A.;MQ=75.80;MQ0=1;MQ0Fraction=0.0003;MQRankSum=-0.471;NF;NR;PP;PV4=0.72,1,1,1;ReadPosRankSum=0.223;SC=CTGCAAAATATAAAAATTAGG;SET_INTEGRATION;SET_WGVQSR;TC;TR=5;TU=A;VQSLOD=6.6000;set=Intersection;sumGLbyD=12.15
-20	55664086	.	GTT	ATT,G,GT,GTTT	5622.44	PASS	AC=6,71,136;AF=0.00498,0.05887,0.11277;AN=1206;BVAR;BaseQRankSum=3.173;DB;DEL;DP=40384;DP4=1567,1317,54,29;Dels=0.05;FR;FS=1.949;HP=14;HR=11;HRun=11;HU=T;INDEL;INS;InbreedingCoeff=0.3490;IndelType=MIXED;MQ=77.90;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.052;NF;NR;PP;PV4=0.057,1,0.2,1.2e-05;RUN=1;ReadPosRankSum=-13.646;SC=AATTTTATTTGTTTTTTTTTT;SET_INTEGRATION;SET_WGVQSR;TC;TR=11;TU=T;VQSLOD=11.7964;set=Intersection;sumGLbyD=8.09
-20	56045006	.	TG	T	342.15	PASS	AC=72;AF=0.0940;AN=766;BaseQRankSum=4.992;DP=1238;FS=1.460;HRun=7;HaplotypeScore=20.2784;InbreedingCoeff=0.1795;IndelType=DEL.NumRepetitions_7.EventLength_1.RepeatExpansion_G.;MQ=66.42;MQ0=1;MQ0Fraction=0.0008;MQRankSum=-0.937;QD=1.84;ReadPosRankSum=-4.385;SB=-320.83;VQSLOD=5.2383;set=VQSR
-20	56158711	.	AG	A	922.47	PASS	AA=18;AB=0.575;ABA=17;ABP=4.9646;ABR=23;AC=2;AF=0.0028;AN=714;BL=953;BR=808;BVAR;BaseQRankSum=3.129;DEL;DP=10462;Dels=0.01;EL=9;EPP=3.0103;ER=9;FR;FS=8.724;HETAR=4;HOMA=0;HOMR=1058;HP=1;HPLen=2;HR=2;HRun=1;HU=A;InbreedingCoeff=0.0262;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.08234;LRBP=28.936;MQ0=0;MQ0Fraction=0.0000;MQM=55.889;MQRankSum=2.052;NF;NR;NS=1062;PP;RA=6300;RL=9;RPP=3.0103;RR=9;RUN=1;ReadPosRankSum=-0.317;SAB=0.6 [...]
-20	56258618	rs113670927	T	C,TGC,TGTGC,TGTGTGC	37834.99	PASS	ABR=441;AC=11,100,43;AF=0.0123,0.1119,0.0481;AN=894;BVAR;BaseQRankSum=19.514;DB;DP=23173;DP4=541,920,413,579;Dels=0.00;FQ=999;FR;FS=1.238;HOMA=28;HOMR=808;HP=2;HPLen=1;HR=1;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.2154;IndelType=MIXED;MQ=57.25;MQ0Fraction=0.0275;MQRankSum=-6.684;NF;NR;NS=976;PP;PV4=0.023,1,1,1;RA=3294;RUN=1;ReadPosRankSum=11.873;SC=TGCGTGTGTGTGTGTGTGTGT;SRB=0.42441;SRF=1398;SRP=166.5;SRR=1896;TC;TR=30;TU=GT;VQSLO [...]
-20	56395857	.	T	TAGGCAG	6614.22	PASS	AA=30;AB=0.63415;ABA=30;ABP=15.827;ABR=52;AC=14;AF=0.0197;AF1=0.03154;AN=710;BL=991;BR=1813;BVAR;BaseQRankSum=-4.589;CI95=0.02434,0.04204;DP=13879;DP4=1543,1833,12,14;Dels=0.00;EL=14;EPP=3.2998;ER=16;FQ=999;FR;FS=1.482;HETAR=11;HOMA=0;HOMR=1051;HP=1;HPLen=2;HR=2;HRun=0;HU=T;INDEL;INS;InbreedingCoeff=0.0774;IndelType=INS.NumRepetitions_2.EventLength_6.;LEN=6;LRB=0.29315;LRBP=526.27;MQ=90.42;MQ0=0;MQ0Fraction=0.0000;MQM=39.433;MQRankSum=-7.011;NF;NR;NS= [...]
-20	56969289	.	GTTTGT	G	600.69	PASS	AF=0.0056;AF1=0.007726;BaseQRankSum=2.907;CI95=0.004425,0.01327;DP=9643;DP4=1892,1749,6,3;Dels=0.00;FQ=117;FR;FS=16.601;HP=5;HPLen=3;HR=3;HRun=0;HU=T;INDEL;InbreedingCoeff=0.0236;IndelType=DEL.NumRepetitions_3.EventLength_5.;MQ=92.59;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-2.134;NF;NR;PP;PV4=0.51,1,0.07,0.3;ReadPosRankSum=0.236;SC=TAAGGACGTTGTTTGTTTTGT;SET_INTEGRATION;SET_WGVQSR;TC;TR=10;TU=GTTT;VQSLOD=5.8458;set=Intersection;sumGLbyD=39.51
-20	57187557	.	AG	A,AGG	1486.69	PASS	AA=130;AB=0.55446;ABA=90;ABP=8.2132;ABR=112;AC=56,26;AF=0.0574,0.0266;AN=976;BL=3817;BR=5968;BVAR;BaseQRankSum=5.517;DEL;DP=14174;DP4=925,721,59,48;Dels=0.05;EL=52;EPP=14.302;ER=78;FR;FS=0.917;HETAR=44;HOMA=17;HOMR=864;HP=4;HPLen=4;HR=4;HRun=4;HU=G;INDEL;InbreedingCoeff=0.2856;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.21983;LRBP=1029.8;MQ=91.56;MQ0=0;MQ0Fraction=0.0000;MQM=63.631;MQRankSum=1.900;NF;NR;NS=925;PP;PV4=0.84,1,1,0.39;RA=2746;RL=44;RPP=32.476 [...]
-20	57282771	.	T	TG	506.43	PASS	AA=34;AB=0.70312;ABA=19;ABP=25.946;ABR=45;AC=34;AF=0.0373;AN=912;BL=886;BR=1938;BVAR;BaseQRankSum=3.744;DP=4276;Dels=0.00;EL=18;EPP=3.2658;ER=16;FR;FS=0.639;HETAR=17;HOMA=9;HOMR=737;HP=9;HR=8;HRun=8;HU=G;INS;InbreedingCoeff=0.2149;IndelType=INS.NumRepetitions_8.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.37252;LRBP=853.99;MQ0=0;MQ0Fraction=0.0000;MQM=49.706;MQRankSum=-0.051;NF;NR;NS=763;PP;RA=1822;RL=9;RPP=19.36;RR=25;RUN=1;ReadPosRankSum=-2.111;SAB=0.5588 [...]
-20	57419740	rs11481507	A	AT	82613.57	PASS	AA=3850;AB=0.41404;ABA=1786;ABP=198.63;ABR=1262;AC=919;AF=0.75328;AN=1220;BL=140665;BR=151383;BVAR;BaseQRankSum=-27.490;DB;DP=31794;DP4=588,585,1571,1721;Dels=0.00;EL=1924;EPP=3.0126;ER=1926;FQ=999;FR;FS=2.191;HETAR=482;HOMA=454;HOMR=135;HP=3;HPLen=3;HR=3;HRun=3;HU=T;INDEL;INS;InbreedingCoeff=0.0861;IndelType=INS.NumRepetitions_3.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.036699;LRBP=857.15;MQ=123.92;MQ0=0;MQ0Fraction=0.0000;MQM=91.654;MQRankSu [...]
-20	57558194	.	CT	C,CTT,CTTT	6470.30	PASS	ABR=451;AC=104,161,177;AF=0.08919,0.13808,0.15180;BVAR;BaseQRankSum=1.172;DP=7985;FR;FS=2.202;HOMA=19;HOMR=778;HP=22;HR=15;HU=T;HaplotypeScore=16.1921;INS;InbreedingCoeff=0.6440;IndelType=MULTIALLELIC_INDEL;MQ=69.24;MQ0=27;MQ0Fraction=0.0109;MQRankSum=-0.003;NF;NR;NS=943;PP;QD=2.22;RA=2531;RUN=1;ReadPosRankSum=-0.104;SB=-2096.85;SC=GCCTTTTTTTCTTTTTTTTTT;SET_WGVQSR;SRB=0.34848;SRF=882;SRP=507.73;SRR=1649;TC;TR=15;TU=T;VQSLOD=6.5151;set=Intersection
-20	57693627	.	AG	A	1991.90	PASS	AA=52;AB=0.49462;ABA=47;ABP=3.0336;ABR=46;AC=15;AF=0.01227;AN=1222;BL=1902;BR=1478;BVAR;BaseQRankSum=-6.121;DEL;DP=26459;DP4=2647,2873,16,20;Dels=0.01;EL=25;EPP=3.1773;ER=27;FR;FS=3.135;HETAR=15;HOMA=1;HOMR=1064;HP=2;HPLen=3;HR=3;HRun=2;HU=A;INDEL;InbreedingCoeff=0.0866;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.12544;LRBP=118.51;MQ=116.26;MQ0=0;MQ0Fraction=0.0000;MQM=114.65;MQRankSum=1.942;NF;NR;NS=1080;PP;PV4=0.74,6.9e-08 [...]
-20	57716287	.	A	AT	66.47	PASS	AC=6;AF=0.00506;AN=1186;BaseQRankSum=1.369;DP=2744;FS=3.834;HRun=8;HaplotypeScore=11.2046;InbreedingCoeff=0.1196;IndelType=INS.NumRepetitions_8.EventLength_1.RepeatExpansion_T.;MQ=73.00;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-0.086;QD=2.14;ReadPosRankSum=-2.588;SB=-53.80;SET_INTEGRATION;SET_WGVQSR;VQSLOD=4.2080;set=VQSR
-20	58121928	rs73625057	T	TGG	6649.17	PASS	AA=132;AB=0.57854;ABA=110;ABP=16.996;ABR=151;AC=57;AF=0.0617;AN=924;BL=4530;BR=4790;BVAR;BaseQRankSum=-13.456;DB;DP=30353;DP4=2107,2168,61,66;Dels=0.00;EL=67;EPP=3.0761;ER=65;FR;FS=0.708;HETAR=46;HOMA=8;HOMR=1023;HP=3;HPLen=2;HR=2;HRun=2;HU=G;INDEL;INS;InbreedingCoeff=0.1241;IndelType=INS.NumRepetitions_2.EventLength_1.RepeatExpansion_G.;LEN=2;LRB=0.027897;LRBP=18.76;MQ=109.61;MQ0=1;MQ0Fraction=0.0004;MQM=79.833;MQRankSum=-0.699;NF;NR;NS=1077;PP; [...]
-20	58468826	.	ACAAG	A	999	PASS	AF=0.0014;AF1=0.003429;BaseQRankSum=4.082;CI95=0.003106,0.006211;DP=8461;DP4=2500,1817,8,2;Dels=0.01;FQ=999;FR;FS=5.034;HP=2;HPLen=1;HR=1;HRun=0;HU=C;INDEL;InbreedingCoeff=-0.0183;IndelType=DEL.NumRepetitions_1.EventLength_4.;MQ=120.69;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.141;NF;NR;PP;PV4=0.21,1,0.054,1;ReadPosRankSum=2.096;SC=ATCCTGAAACACAAGAAGAAA;SET_INTEGRATION;SET_WGVQSR;TC;TR=5;TU=AC;VQSLOD=7.4928;set=Intersection;sumGLbyD=29.17
-20	58731262	.	TC	T	999	PASS	AA=21;AB=0.48649;ABA=19;ABP=3.069;ABR=18;AC=7;AF=0.0101;AF1=0.01493;AN=694;BL=939;BR=848;BVAR;BaseQRankSum=4.205;CI95=0.01106,0.02212;DEL;DP=12598;DP4=1766,1428,11,15;Dels=0.01;EL=13;EPP=5.5954;ER=8;FQ=999;FR;FS=1.796;HETAR=8;HOMA=1;HOMR=1031;HP=7;HPLen=8;HR=8;HRun=2;HU=T;INDEL;InbreedingCoeff=-0.0030;IndelType=DEL.NumRepetitions_2.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.050923;LRBP=13.073;MQ=124.57;MQ0=0;MQ0Fraction=0.0000;MQM=67.905;MQRankSum=1.103;NF;N [...]
-20	59181229	rs11476579	CTT	C,CT,CTTT,CTTTT	7787.17	PASS	AC=19,195,104,91;AF=0.01599,0.16414,0.08754,0.07660;AF1=0.2124;AN=1188;BVAR;BaseQRankSum=6.347;CI95=0.146,0.2743;DB;DEL;DP=26140;DP4=932,880,352,375;Dels=0.13;FQ=85.6;FR;FS=11.914;HP=14;HR=14;HRun=14;HU=T;INDEL;INS;InbreedingCoeff=0.4183;IndelType=MULTIALLELIC_INDEL;MQ=86.88;MQ0=0;MQ0Fraction=0.0000;MQRankSum=1.469;NF;NR;PP;PV4=0.17,1,1,1;RUN=1;ReadPosRankSum=-1.055;SC=GGTGAGAAAGCTTTTTTTTTT;SET_WGVQSR;TC;TR=14;TU=T;VQSLOD=7.4340;dbS [...]
-20	59213979	rs112141381	G	GC	9068	PASS	AA=131;AB=0.47115;ABA=110;ABP=4.5136;ABR=98;AF=0.0586;AN=700;BL=5395;BR=5816;BVAR;BaseQRankSum=15.453;DB;DP=23381;DP4=2191,2184,71,49;Dels=0.00;EL=66;EPP=3.0269;ER=65;FR;FS=7.907;HETAR=35;HOMA=5;HOMR=1019;HP=2;HPLen=3;HR=3;HRun=0;HU=G;INDEL;INS;InbreedingCoeff=0.0283;IndelType=INS.NOVEL_1.Novel_C.;LEN=1;LRB=0.037552;LRBP=37.34;MQ=72.13;MQ0=0;MQ0Fraction=0.0000;MQM=54.496;MQRankSum=0.897;NF;NR;NS=1059;PP;PV4=0.052,1,0.066,1;RA=4976;RL=59;RPP=5.8117;R [...]
-20	59252945	.	CT	C,CTT	557.18	PASS	AA=24;AB=0.84868;ABA=23;ABP=163.53;ABR=129;AC=21,29;AF=0.01759,0.02429;BL=1217;BR=1336;BVAR;BaseQRankSum=5.135;DP=9970;Dels=0.01;EL=13;EPP=3.3722;ER=11;FS=2.302;HETAR=21;HOMA=1;HOMR=1012;HRun=9;INS;InbreedingCoeff=0.1549;IndelType=MULTIALLELIC_INDEL;LEN=1;LRB=0.046612;LRBP=15.055;MQ0=0;MQ0Fraction=0.0000;MQM=67.208;MQRankSum=0.086;NS=1034;RA=4421;RL=11;RPP=3.3722;RR=13;RUN=1;ReadPosRankSum=-1.826;SAB=0.41667;SAF=10;SAP=4.4579;SAR=14;SET_WGVQSR;SRB=0.496 [...]
-20	60016966	.	CT	C	42650	PASS	AA=37;AB=0.97834;ABA=31;ABP=2847;ABR=1400;AC=15;AF=0.0163;AN=920;BL=2596;BR=778;BVAR;BaseQRankSum=-0.632;DEL;DP=10967;Dels=0.00;EL=14;EPP=7.7641;ER=23;FS=4.094;HETAR=421;HOMA=256;HOMR=385;HRun=1;InbreedingCoeff=-0.0051;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_T.;LEN=1;LRB=0.53883;LRBP=2130.2;MQ0=0;MQ0Fraction=0.0000;MQM=120.3;MQRankSum=-0.911;NS=1072;RA=3413;RL=31;RPP=39.691;RR=6;RUN=1;ReadPosRankSum=-12.062;SAB=0.48649;SAF=18;SAP=3.069;S [...]
-20	60188651	.	AG	A	17624.52	PASS	AA=462;AB=0.76548;ABA=409;ABP=1070.7;ABR=1335;AC=403;AF=0.34444;AN=1170;BL=13877;BR=25909;BVAR;BaseQRankSum=6.180;DEL;DP=9900;Dels=0.08;EL=353;EPP=282.84;ER=109;FR;FS=2699.057;HETAR=346;HOMA=26;HOMR=633;HP=3;HR=4;HRun=1;HU=A;InbreedingCoeff=-0.2900;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;LEN=1;LRB=0.30242;LRBP=7904.3;MQ0Fraction=0.0004;MQM=56.119;MQRankSum=1.644;NF;NR;NS=1005;PP;RA=3521;RL=112;RPP=269.25;RR=350;RUN=1;ReadPosRankSum [...]
-20	60195570	.	GTACATACATACA	ATACATACATACA,G,GTACATACA	20140	PASS	ABR=102;AC=105,2;AF=0.08794,0.00168;AN=1194;BVAR;BaseQRankSum=-28.899;DB;DEL;DP=14347;Dels=0.02;FR;FS=52.125;HOMA=1;HOMR=1006;HP=1;HPLen=1;HR=1;HRun=0;HU=T;InbreedingCoeff=0.0695;IndelType=MIXED;MQ0Fraction=0.0007;MQRankSum=1.957;NF;NR;NS=1035;PP;RA=4759;RUN=1;ReadPosRankSum=-22.252;SAB=0.5;SAP=3.0103;SC=TGATAGATTCGTACATACATA;SET_INTEGRATION;SRB=0.47615;SRF=2266;SRP=26.522;SRR=2493;TC;TR=21;TU=ACAT;VQSLOD=2.7673;set=filterI [...]
-20	60670601	rs72127450	AT	A,ATT	6401.59	PASS	AC=177,79;AF=0.16239,0.07248;AF1=0.1602;AN=1090;BVAR;BaseQRankSum=8.618;CI95=0.1106,0.2058;DB;DEL;DP=17508;DP4=1285,1094,313,259;Dels=0.10;FQ=94.1;FR;FS=0.000;HP=12;HR=12;HRun=12;HU=T;INDEL;INS;InbreedingCoeff=0.1076;IndelType=MULTIALLELIC_INDEL;LEN=1;MQ=64.73;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.620;NF;NR;PP;PV4=0.78,1,0.012,1;RUN=1;ReadPosRankSum=-1.294;SC=AGCCAGGCACATTTTTTTTTT;SET_WGVQSR;TC;TR=12;TU=T;VQSLOD=6.1650;dbSNP=130;set=Intersectio [...]
-20	60685780	.	TC	T	1123.58	PASS	AC=79;AF=0.07655;AN=1032;BaseQRankSum=14.949;DP=2084;FS=23.521;HRun=1;HaplotypeScore=19.7117;InbreedingCoeff=0.1356;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;MQ=53.57;MQ0=61;MQ0Fraction=0.0293;MQRankSum=-7.958;QD=4.35;ReadPosRankSum=-13.757;SB=-791.28;VQSLOD=6.3549;set=VQSR
-20	60744906	rs113528167	CG	C	422.53	PASS	AC=48;AF=0.0732;AN=656;BaseQRankSum=17.669;DB;DP=1189;FS=0.356;HRun=1;HaplotypeScore=15.1808;InbreedingCoeff=0.2111;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_G.;MQ=82.83;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-10.455;QD=2.71;ReadPosRankSum=-16.887;SB=-326.46;VQSLOD=7.1707;set=VQSR
-20	60848742	.	CGT	C,CGTGT	999	PASS	AF=0.00980,0.01225;BaseQRankSum=5.597;DP=17065;DP4=1928,2188,17,13;Dels=0.01;FR;HP=1;HPLen=2;HR=2;HRun=0;HU=C;INDEL;InbreedingCoeff=0.2094;IndelType=MULTIALLELIC_INDEL;MQ=115.78;MQ0=0;MQ0Fraction=0.0000;MQRankSum=0.281;NF;NR;PP;PV4=0.36,0.4,0.12,0.12;ReadPosRankSum=-1.465;SB=-157.35;SC=TAGACGCTTCCGTGTGTGTGT;SET_INTEGRATION;SET_WGVQSR;TC;TR=11;TU=GT;VQSLOD=1.7100;set=filterInVQSR-2of5;sumGLbyD=16.39
-20	61023668	rs57452309	G	GAGC	6896.67	PASS	AC=115;AF=0.1445;AN=796;BaseQRankSum=12.146;DB;DP=1423;FS=5.070;HRun=0;HaplotypeScore=29.8897;InbreedingCoeff=0.0740;IndelType=INS.NOVEL_3.;MQ=77.02;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-9.005;QD=19.16;ReadPosRankSum=-17.440;SB=-3045.82;VQSLOD=4.5788;set=VQSR
-20	61180519	.	C	CA,CT	1774.30	PASS	ABR=135;AC=27,15;AF=0.02538,0.01410;BVAR;BaseQRankSum=-2.189;DP=8393;FR;FS=27.692;HOMA=2;HOMR=825;HP=6;HPLen=3;HR=3;HU=T;HaplotypeScore=19.5313;INS;InbreedingCoeff=0.0868;IndelType=MULTIALLELIC_INDEL;LEN=1;MQ=56.11;MQ0=172;MQ0Fraction=0.0667;MQRankSum=2.605;NF;NR;NS=854;PP;QD=1.99;RA=2868;RUN=1;ReadPosRankSum=-7.324;SB=-385.54;SC=TTCTTTCTTTCTTTCTTTCTT;SRB=0.32741;SRF=939;SRP=745.08;SRR=1929;TC;TR=69;TU=CTTT;VQSLOD=3.4398;set=filterInVQSR-2of5
-20	61184281	.	AC	A	9798.10	PASS	AA=24;AB=0.96507;ABA=16;ABP=863.43;ABR=442;AC=4;AF=0.00341;AN=1174;BL=349;BR=1039;BVAR;BaseQRankSum=2.048;DEL;DP=10073;Dels=0.00;EL=11;EPP=3.3722;ER=13;FS=2.097;HETAR=141;HOMA=69;HOMR=829;HRun=1;InbreedingCoeff=0.0697;IndelType=DEL.NumRepetitions_1.EventLength_1.RepeatExpansion_C.;LEN=1;LRB=0.49712;LRBP=747.85;MQ0=0;MQ0Fraction=0.0000;MQM=98.042;MQRankSum=1.881;NS=1042;RA=3625;RL=5;RPP=20.744;RR=19;RUN=1;ReadPosRankSum=-8.009;SAB=0.75;SAF=18;SAP=16.039;SAR [...]
-20	62074219	.	C	CTAT,CTGT	2328	PASS	ABR=99;AC=20,6;AF=0.01754,0.00526;BVAR;BaseQRankSum=11.221;DP=9498;DS;FS=4.510;HOMA=15;HOMR=645;HaplotypeScore=82.8868;INS;InbreedingCoeff=0.0880;IndelType=MULTIALLELIC_INDEL;LEN=3;MQ=29.88;MQ0=1378;MQ0Fraction=0.2286;MQRankSum=-5.309;NS=689;QD=0.77;RA=1679;RUN=1;ReadPosRankSum=-3.510;SAR=1;SB=-93.21;SRB=0.70697;SRF=1187;SRP=627.71;SRR=492;VQSLOD=1.8325;set=filterInVQSR-2of5
-20	62304449	.	CA	C,CAA	6680.17	PASS	AC=141,69;AF=0.12567,0.06150;AF1=0.08178;AN=1122;BVAR;BaseQRankSum=9.754;CI95=0.05088,0.1128;DEL;DP=15867;DP4=1252,1289,232,208;Dels=0.10;FQ=52.6;FR;FS=6.576;HP=11;HR=11;HRun=11;HU=A;INDEL;INS;InbreedingCoeff=0.1950;IndelType=MULTIALLELIC_INDEL;LEN=1;MQ=60.48;MQ0Fraction=0.0004;MQRankSum=-0.049;NF;NR;PP;PV4=0.2,1,1,1;RUN=1;ReadPosRankSum=-2.137;SC=GATTCTGTGTCAAAAAAAAAA;SET_WGVQSR;TC;TR=11;TU=A;VQSLOD=7.4714;set=Intersection;sumGLbyD=8.36
-20	62804895	rs57769591	CCTT	C	1148	PASS	AC=8;AF=0.0085;AF1=0.002839;AN=938;BaseQRankSum=4.952;CI95=0.002212,0.006637;DB;DP=8889;DP4=2574,1668,4,8;FQ=12.3;FS=2.289;HPLen=3;HRun=0;HaplotypeScore=29.4184;INDEL;InbreedingCoeff=-0.0270;IndelType=DEL.NumRepetitions_1.EventLength_3.;MQ0=876;MQ0Fraction=0.2674;MQRankSum=-0.641;PV4=0.074,1,1,1;QD=1.03;ReadPosRankSum=0.118;SB=-65.30;SET_INTEGRATION;SET_WGVQSR;VQSLOD=6.4881;dbSNP=126;set=Intersection
-20	62907688	.	AAT	A	6629.57	PASS	AC=164;AF=0.13735;AN=1194;BaseQRankSum=27.368;DP=2746;FS=5.985;HRun=0;HaplotypeScore=14.7748;InbreedingCoeff=0.1433;IndelType=DEL.NumRepetitions_2.EventLength_2.RepeatExpansion_AT.;MQ=96.65;MQ0=0;MQ0Fraction=0.0000;MQRankSum=-3.318;QD=10.81;ReadPosRankSum=0.789;SB=-2662.16;SET_INTEGRATION;SET_WGVQSR;VQSLOD=6.1473;set=VQSR
diff --git a/tests/vcf-examples/24.vcf b/tests/vcf-examples/24.vcf
deleted file mode 100644
index a62e424..0000000
--- a/tests/vcf-examples/24.vcf
+++ /dev/null
@@ -1,724 +0,0 @@
-##fileformat=VCFv4.1
-##INFO=<ID=Sample,Number=1,Type=String,Description="Sample picked for single sample pooled 454-PCR validation">
-##INFO=<ID=GT,Number=1,Type=String,Description="Genotype">
-##INFO=<ID=PCR_454_AR,Number=1,Type=Integer,Description="Number of alternative reads in 454-PCR sequencing data">
-##INFO=<ID=PCR_454_RR,Number=1,Type=Integer,Description="Number of reference reads in 454-PCR sequencing data">
-##reference=file:///humgen/1kg/reference/human_g1k_v37.fasta
-#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO
-20	256726	.	T	A	.	.	Sample=HG00097;GT=0/1;PCR_454_AR=739;PCR_454_RR=885
-20	256726	.	T	A	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=723;PCR_454_RR=714
-20	256726	.	T	A	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=1092;PCR_454_RR=1102
-20	256726	.	T	A	.	.	Sample=HG00112;GT=0/1;PCR_454_AR=947;PCR_454_RR=1005
-20	256726	.	T	A	.	.	Sample=HG00104;GT=1/1;PCR_454_AR=1970;PCR_454_RR=52
-20	257977	.	G	C	.	.	Sample=NA19438;GT=0/1;PCR_454_AR=1312;PCR_454_RR=1123
-20	330407	.	C	G	.	.	Sample=HG00134;GT=0/1;PCR_454_AR=1034;PCR_454_RR=1037
-20	330407	.	C	G	.	.	Sample=HG00148;GT=0/1;PCR_454_AR=840;PCR_454_RR=820
-20	330407	.	C	G	.	.	Sample=HG00151;GT=0/1;PCR_454_AR=952;PCR_454_RR=982
-20	330407	.	C	G	.	.	Sample=HG00358;GT=0/1;PCR_454_AR=880;PCR_454_RR=957
-20	330407	.	C	G	.	.	Sample=HG01277;GT=0/1;PCR_454_AR=914;PCR_454_RR=984
-20	368826	.	G	A	.	.	Sample=NA20346;GT=0/1;PCR_454_AR=632;PCR_454_RR=591
-20	371957	.	G	A	.	.	Sample=HG00150;GT=0/1;PCR_454_AR=403;PCR_454_RR=424
-20	371957	.	G	A	.	.	Sample=NA12287;GT=0/1;PCR_454_AR=401;PCR_454_RR=435
-20	467031	.	T	A	.	.	Sample=NA20510;GT=0/0;PCR_454_AR=5;PCR_454_RR=1763
-20	741858	.	G	A	.	.	Sample=NA18634;GT=0/1;PCR_454_AR=1273;PCR_454_RR=1301
-20	947853	.	C	T	.	.	Sample=HG00578;GT=0/0;PCR_454_AR=0;PCR_454_RR=197
-20	947853	.	C	T	.	.	Sample=NA18861;GT=0/1;PCR_454_AR=40;PCR_454_RR=39
-20	947853	.	C	T	.	.	Sample=NA18868;GT=0/1;PCR_454_AR=88;PCR_454_RR=80
-20	947853	.	C	T	.	.	Sample=NA18870;GT=0/1;PCR_454_AR=66;PCR_454_RR=99
-20	947853	.	C	T	.	.	Sample=NA18917;GT=0/1;PCR_454_AR=96;PCR_454_RR=111
-20	947908	.	C	T	.	.	Sample=NA11993;GT=0/1;PCR_454_AR=598;PCR_454_RR=2114
-20	947908	.	C	T	.	.	Sample=NA18501;GT=0/1;PCR_454_AR=392;PCR_454_RR=1687
-20	947908	.	C	T	.	.	Sample=NA18504;GT=0/1;PCR_454_AR=635;PCR_454_RR=2218
-20	947908	.	C	T	.	.	Sample=NA18505;GT=0/1;PCR_454_AR=1312;PCR_454_RR=1429
-20	947908	.	C	T	.	.	Sample=NA18507;GT=0/1;PCR_454_AR=598;PCR_454_RR=2127
-20	948715	.	T	G	.	.	Sample=NA06989;GT=0/0;PCR_454_AR=4;PCR_454_RR=1252
-20	1144999	.	C	T	.	.	Sample=NA18510;GT=0/1;PCR_454_AR=450;PCR_454_RR=447
-20	1144999	.	C	T	.	.	Sample=NA19172;GT=0/1;PCR_454_AR=541;PCR_454_RR=531
-20	1285858	.	A	C	.	.	Sample=NA19311;GT=0/1;PCR_454_AR=1210;PCR_454_RR=1315
-20	1285932	.	G	A	.	.	Sample=HG00097;GT=0/1;PCR_454_AR=868;PCR_454_RR=867
-20	1285932	.	G	A	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=745;PCR_454_RR=680
-20	1285932	.	G	A	.	.	Sample=HG00126;GT=0/1;PCR_454_AR=780;PCR_454_RR=838
-20	1285932	.	G	A	.	.	Sample=HG00134;GT=0/1;PCR_454_AR=978;PCR_454_RR=944
-20	1285932	.	G	A	.	.	Sample=HG00128;GT=1/1;PCR_454_AR=1499;PCR_454_RR=14
-20	1286090	.	A	G	.	.	Sample=HG00235;GT=0/1;PCR_454_AR=1223;PCR_454_RR=1352
-20	1286090	.	A	G	.	.	Sample=HG00351;GT=0/1;PCR_454_AR=799;PCR_454_RR=823
-20	1286090	.	A	G	.	.	Sample=HG01125;GT=0/1;PCR_454_AR=1167;PCR_454_RR=1149
-20	1286090	.	A	G	.	.	Sample=NA19773;GT=0/1;PCR_454_AR=1070;PCR_454_RR=1130
-20	1546804	.	G	A	.	.	Sample=HG00141;GT=0/1;PCR_454_AR=1174;PCR_454_RR=1231
-20	1546804	.	G	A	.	.	Sample=HG00149;GT=0/1;PCR_454_AR=1029;PCR_454_RR=1050
-20	1546804	.	G	A	.	.	Sample=HG00151;GT=0/1;PCR_454_AR=1135;PCR_454_RR=1034
-20	1546804	.	G	A	.	.	Sample=HG00177;GT=0/1;PCR_454_AR=1063;PCR_454_RR=1118
-20	1546804	.	G	A	.	.	Sample=HG00179;GT=0/1;PCR_454_AR=1118;PCR_454_RR=954
-20	1551579	.	T	G	.	.	Sample=NA20515;GT=0/0;PCR_454_AR=5;PCR_454_RR=1812
-20	1551579	.	T	G	.	.	Sample=NA19466;GT=0/1;PCR_454_AR=1011;PCR_454_RR=1042
-20	1559334	.	C	T	.	.	Sample=NA18941;GT=0/0;PCR_454_AR=1;PCR_454_RR=1193
-20	1615980	.	G	A	.	.	Sample=NA19914;GT=0/1;PCR_454_AR=441;PCR_454_RR=492
-20	1616047	.	C	G	.	.	Sample=NA07048;GT=0/1;PCR_454_AR=508;PCR_454_RR=813
-20	1629751	.	T	C	.	.	Sample=HG00156;GT=0/1;PCR_454_AR=285;PCR_454_RR=282
-20	1896011	.	C	T	.	.	Sample=NA18639;GT=0/0;PCR_454_AR=0;PCR_454_RR=29
-20	1896011	.	C	T	.	.	Sample=NA19314;GT=0/0;PCR_454_AR=0;PCR_454_RR=47
-20	2291684	.	T	C	.	.	Sample=NA19036;GT=0/1;PCR_454_AR=873;PCR_454_RR=1025
-20	2291684	.	T	C	.	.	Sample=NA19347;GT=0/1;PCR_454_AR=1116;PCR_454_RR=1217
-20	2375127	.	G	A	.	.	Sample=NA18615;GT=0/1;PCR_454_AR=1016;PCR_454_RR=1016
-20	2777844	.	T	C	.	.	Sample=NA20819;GT=0/1;PCR_454_AR=908;PCR_454_RR=970
-20	2844678	.	G	A	.	.	Sample=HG00360;GT=0/1;PCR_454_AR=1081;PCR_454_RR=1071
-20	2944927	.	A	T	.	.	Sample=NA12347;GT=0/1;PCR_454_AR=704;PCR_454_RR=752
-20	2969014	.	C	G	.	.	Sample=HG00151;GT=0/1;PCR_454_AR=684;PCR_454_RR=809
-20	2969014	.	C	G	.	.	Sample=NA18511;GT=0/1;PCR_454_AR=666;PCR_454_RR=704
-20	2969014	.	C	G	.	.	Sample=NA18523;GT=0/1;PCR_454_AR=767;PCR_454_RR=802
-20	2969014	.	C	G	.	.	Sample=NA18549;GT=0/1;PCR_454_AR=772;PCR_454_RR=838
-20	2969014	.	C	G	.	.	Sample=NA18858;GT=1/1;PCR_454_AR=1313;PCR_454_RR=8
-20	3026344	.	A	C	.	.	Sample=NA18640;GT=0/1;PCR_454_AR=1652;PCR_454_RR=1336
-20	3128885	.	G	A	.	.	Sample=NA19473;GT=0/1;PCR_454_AR=620;PCR_454_RR=669
-20	3128950	.	G	A	.	.	Sample=NA18624;GT=0/1;PCR_454_AR=570;PCR_454_RR=517
-20	3128950	.	G	A	.	.	Sample=NA18953;GT=0/1;PCR_454_AR=685;PCR_454_RR=700
-20	3128950	.	G	A	.	.	Sample=NA18998;GT=0/1;PCR_454_AR=606;PCR_454_RR=638
-20	3128950	.	G	A	.	.	Sample=NA19076;GT=0/1;PCR_454_AR=663;PCR_454_RR=643
-20	3128950	.	G	A	.	.	Sample=NA19088;GT=0/1;PCR_454_AR=492;PCR_454_RR=472
-20	3171356	.	T	C	.	.	Sample=NA12003;GT=0/0;PCR_454_AR=6;PCR_454_RR=1919
-20	3171356	.	T	C	.	.	Sample=NA12872;GT=0/0;PCR_454_AR=6;PCR_454_RR=2324
-20	3193990	.	G	T	.	.	Sample=NA12815;GT=0/0;PCR_454_AR=0;PCR_454_RR=1570
-20	3193990	.	G	T	.	.	Sample=NA18505;GT=0/0;PCR_454_AR=0;PCR_454_RR=1586
-20	3204083	.	G	A	.	.	Sample=HG00104;GT=0/1;PCR_454_AR=1059;PCR_454_RR=982
-20	3204083	.	G	A	.	.	Sample=HG00118;GT=0/1;PCR_454_AR=1190;PCR_454_RR=1178
-20	3204083	.	G	A	.	.	Sample=HG00122;GT=0/1;PCR_454_AR=1156;PCR_454_RR=1277
-20	3204083	.	G	A	.	.	Sample=HG00099;GT=1/1;PCR_454_AR=2171;PCR_454_RR=12
-20	3204083	.	G	A	.	.	Sample=HG00106;GT=1/1;PCR_454_AR=2027;PCR_454_RR=19
-20	3214580	.	C	T	.	.	Sample=HG00097;GT=0/1;PCR_454_AR=852;PCR_454_RR=784
-20	3214580	.	C	T	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=628;PCR_454_RR=682
-20	3214580	.	C	T	.	.	Sample=HG00129;GT=0/1;PCR_454_AR=869;PCR_454_RR=844
-20	3214580	.	C	T	.	.	Sample=HG00130;GT=0/1;PCR_454_AR=651;PCR_454_RR=767
-20	3214580	.	C	T	.	.	Sample=HG00128;GT=1/1;PCR_454_AR=1378;PCR_454_RR=3
-20	3214802	.	T	C	.	.	Sample=NA18526;GT=0/1;PCR_454_AR=969;PCR_454_RR=1018
-20	3235915	.	T	C	.	.	Sample=HG00560;GT=0/1;PCR_454_AR=795;PCR_454_RR=798
-20	3235915	.	T	C	.	.	Sample=HG00566;GT=0/1;PCR_454_AR=688;PCR_454_RR=650
-20	3235915	.	T	C	.	.	Sample=HG00596;GT=0/1;PCR_454_AR=863;PCR_454_RR=935
-20	3235915	.	T	C	.	.	Sample=HG01124;GT=0/1;PCR_454_AR=802;PCR_454_RR=836
-20	3235915	.	T	C	.	.	Sample=NA18487;GT=0/1;PCR_454_AR=942;PCR_454_RR=968
-20	3274851	.	C	T	.	.	Sample=NA19704;GT=0/1;PCR_454_AR=486;PCR_454_RR=479
-20	3274851	.	C	T	.	.	Sample=NA20334;GT=0/1;PCR_454_AR=512;PCR_454_RR=512
-20	3274851	.	C	T	.	.	Sample=NA20336;GT=0/1;PCR_454_AR=510;PCR_454_RR=440
-20	3324372	.	G	C	.	.	Sample=NA19003;GT=0/1;PCR_454_AR=1902;PCR_454_RR=1898
-20	3362102	.	T	G	.	.	Sample=NA06994;GT=0/0;PCR_454_AR=0;PCR_454_RR=526
-20	3362102	.	T	G	.	.	Sample=NA12249;GT=0/0;PCR_454_AR=0;PCR_454_RR=465
-20	3515923	.	G	A	.	.	Sample=HG00122;GT=0/1;PCR_454_AR=237;PCR_454_RR=261
-20	3515923	.	G	A	.	.	Sample=HG00126;GT=0/1;PCR_454_AR=299;PCR_454_RR=293
-20	3515923	.	G	A	.	.	Sample=HG00130;GT=0/1;PCR_454_AR=307;PCR_454_RR=279
-20	3515923	.	G	A	.	.	Sample=HG00128;GT=1/1;PCR_454_AR=633;PCR_454_RR=4
-20	3515923	.	G	A	.	.	Sample=HG00129;GT=1/1;PCR_454_AR=580;PCR_454_RR=2
-20	3641233	.	G	T	.	.	Sample=NA20773;GT=0/0;PCR_454_AR=3;PCR_454_RR=1477
-20	3650204	.	G	A	.	.	Sample=HG00118;GT=0/1;PCR_454_AR=737;PCR_454_RR=771
-20	3650204	.	G	A	.	.	Sample=HG00126;GT=0/1;PCR_454_AR=518;PCR_454_RR=552
-20	3650204	.	G	A	.	.	Sample=HG00141;GT=0/1;PCR_454_AR=643;PCR_454_RR=668
-20	3650204	.	G	A	.	.	Sample=HG00143;GT=0/1;PCR_454_AR=549;PCR_454_RR=613
-20	3650204	.	G	A	.	.	Sample=HG00148;GT=0/1;PCR_454_AR=708;PCR_454_RR=830
-20	3652397	.	G	A	.	.	Sample=NA18635;GT=0/1;PCR_454_AR=1604;PCR_454_RR=1658
-20	3672827	.	A	T	.	.	Sample=HG00130;GT=0/0;PCR_454_AR=0;PCR_454_RR=941
-20	3672827	.	A	T	.	.	Sample=HG00349;GT=0/0;PCR_454_AR=2;PCR_454_RR=943
-20	3675119	.	G	T	.	.	Sample=NA20544;GT=0/1;PCR_454_AR=577;PCR_454_RR=657
-20	3687329	.	T	C	.	.	Sample=NA18532;GT=0/1;PCR_454_AR=702;PCR_454_RR=746
-20	3842125	.	C	G	.	.	Sample=NA12155;GT=0/1;PCR_454_AR=1193;PCR_454_RR=1178
-20	4680289	.	G	A	.	.	Sample=NA18856;GT=0/1;PCR_454_AR=1335;PCR_454_RR=1278
-20	4680289	.	G	A	.	.	Sample=NA19130;GT=0/1;PCR_454_AR=1273;PCR_454_RR=1286
-20	4680289	.	G	A	.	.	Sample=NA19213;GT=0/1;PCR_454_AR=1305;PCR_454_RR=1241
-20	4680289	.	G	A	.	.	Sample=NA19311;GT=0/1;PCR_454_AR=1332;PCR_454_RR=1400
-20	4680289	.	G	A	.	.	Sample=NA19332;GT=0/1;PCR_454_AR=1272;PCR_454_RR=1275
-20	4848511	.	G	A	.	.	Sample=NA19440;GT=0/0;PCR_454_AR=8;PCR_454_RR=2951
-20	4848511	.	G	A	.	.	Sample=NA19448;GT=0/1;PCR_454_AR=1278;PCR_454_RR=1434
-20	4848511	.	G	A	.	.	Sample=NA19461;GT=0/1;PCR_454_AR=1412;PCR_454_RR=1478
-20	5099300	.	A	G	.	.	Sample=NA19138;GT=0/1;PCR_454_AR=511;PCR_454_RR=496
-20	5903387	.	A	C	.	.	Sample=HG00566;GT=0/1;PCR_454_AR=1400;PCR_454_RR=1384
-20	5903387	.	A	C	.	.	Sample=HG01124;GT=0/1;PCR_454_AR=856;PCR_454_RR=1007
-20	5903387	.	A	C	.	.	Sample=HG01125;GT=0/1;PCR_454_AR=891;PCR_454_RR=816
-20	5903387	.	A	C	.	.	Sample=HG01149;GT=0/1;PCR_454_AR=1011;PCR_454_RR=959
-20	5903387	.	A	C	.	.	Sample=HG01278;GT=0/1;PCR_454_AR=1077;PCR_454_RR=1049
-20	5923222	.	C	T	.	.	Sample=HG00592;GT=0/1;PCR_454_AR=968;PCR_454_RR=950
-20	5923222	.	C	T	.	.	Sample=NA18567;GT=0/1;PCR_454_AR=678;PCR_454_RR=728
-20	5923222	.	C	T	.	.	Sample=NA18602;GT=0/1;PCR_454_AR=926;PCR_454_RR=988
-20	5923222	.	C	T	.	.	Sample=NA18624;GT=0/1;PCR_454_AR=991;PCR_454_RR=963
-20	5923222	.	C	T	.	.	Sample=NA18632;GT=0/1;PCR_454_AR=892;PCR_454_RR=906
-20	5943955	.	G	C	.	.	Sample=HG00565;GT=0/1;PCR_454_AR=259;PCR_454_RR=227
-20	5943955	.	G	C	.	.	Sample=HG00566;GT=0/1;PCR_454_AR=245;PCR_454_RR=235
-20	5943955	.	G	C	.	.	Sample=HG00577;GT=0/1;PCR_454_AR=264;PCR_454_RR=305
-20	5943955	.	G	C	.	.	Sample=HG00578;GT=0/1;PCR_454_AR=210;PCR_454_RR=261
-20	5943955	.	G	C	.	.	Sample=HG00593;GT=0/1;PCR_454_AR=261;PCR_454_RR=238
-20	6015109	.	G	A	.	.	Sample=NA20796;GT=0/1;PCR_454_AR=440;PCR_454_RR=500
-20	6060150	.	C	T	.	.	Sample=NA18961;GT=0/1;PCR_454_AR=384;PCR_454_RR=464
-20	7967973	.	G	A	.	.	Sample=NA19371;GT=0/1;PCR_454_AR=281;PCR_454_RR=506
-20	7967973	.	G	A	.	.	Sample=NA19390;GT=0/1;PCR_454_AR=410;PCR_454_RR=538
-20	8665657	.	G	A	.	.	Sample=NA19740;GT=0/1;PCR_454_AR=724;PCR_454_RR=703
-20	9453955	.	C	A	.	.	Sample=NA20314;GT=0/1;PCR_454_AR=1048;PCR_454_RR=1147
-20	9520132	.	G	A	.	.	Sample=HG00143;GT=0/1;PCR_454_AR=472;PCR_454_RR=583
-20	9520132	.	G	A	.	.	Sample=HG01624;GT=0/1;PCR_454_AR=589;PCR_454_RR=589
-20	9520132	.	G	A	.	.	Sample=NA12046;GT=0/1;PCR_454_AR=688;PCR_454_RR=708
-20	9520132	.	G	A	.	.	Sample=NA18517;GT=0/1;PCR_454_AR=566;PCR_454_RR=585
-20	9520132	.	G	A	.	.	Sample=NA18858;GT=0/1;PCR_454_AR=550;PCR_454_RR=561
-20	9543621	.	C	T	.	.	Sample=HG00097;GT=0/1;PCR_454_AR=499;PCR_454_RR=480
-20	9543621	.	C	T	.	.	Sample=HG00104;GT=0/1;PCR_454_AR=524;PCR_454_RR=480
-20	9543621	.	C	T	.	.	Sample=HG00112;GT=0/1;PCR_454_AR=467;PCR_454_RR=406
-20	9543621	.	C	T	.	.	Sample=HG00099;GT=1/1;PCR_454_AR=1321;PCR_454_RR=9
-20	9543621	.	C	T	.	.	Sample=HG00106;GT=1/1;PCR_454_AR=802;PCR_454_RR=6
-20	9547022	.	G	A	.	.	Sample=NA18924;GT=0/1;PCR_454_AR=853;PCR_454_RR=944
-20	9560813	.	T	C	.	.	Sample=NA12761;GT=0/1;PCR_454_AR=692;PCR_454_RR=734
-20	10030206	.	C	T	.	.	Sample=NA19175;GT=0/1;PCR_454_AR=784;PCR_454_RR=759
-20	10030206	.	C	T	.	.	Sample=NA19380;GT=0/1;PCR_454_AR=781;PCR_454_RR=739
-20	10030206	.	C	T	.	.	Sample=NA19446;GT=0/1;PCR_454_AR=533;PCR_454_RR=540
-20	13098183	.	A	C	.	.	Sample=NA19453;GT=0/1;PCR_454_AR=857;PCR_454_RR=1146
-20	16253907	.	C	A	.	.	Sample=NA19087;GT=0/1;PCR_454_AR=868;PCR_454_RR=854
-20	16254032	.	G	A	.	.	Sample=NA19651;GT=0/1;PCR_454_AR=299;PCR_454_RR=263
-20	16485159	.	T	G	.	.	Sample=NA18625;GT=0/1;PCR_454_AR=160;PCR_454_RR=1004
-20	17474781	.	G	A	.	.	Sample=NA18870;GT=0/1;PCR_454_AR=496;PCR_454_RR=536
-20	17585255	.	C	G	.	.	Sample=NA18528;GT=0/1;PCR_454_AR=370;PCR_454_RR=390
-20	17923814	.	C	T	.	.	Sample=HG00104;GT=0/0;PCR_454_AR=1;PCR_454_RR=1854
-20	17923814	.	C	T	.	.	Sample=HG00126;GT=0/0;PCR_454_AR=1;PCR_454_RR=1724
-20	17928182	.	T	G	.	.	Sample=NA18522;GT=0/1;PCR_454_AR=222;PCR_454_RR=1564
-20	17931030	.	C	G	.	.	Sample=NA20508;GT=0/1;PCR_454_AR=495;PCR_454_RR=446
-20	17933265	.	G	A	.	.	Sample=NA19137;GT=0/1;PCR_454_AR=300;PCR_454_RR=315
-20	17968811	.	C	G	.	.	Sample=NA19222;GT=0/1;PCR_454_AR=150;PCR_454_RR=189
-20	18123396	.	A	G	.	.	Sample=NA20507;GT=0/0;PCR_454_AR=5;PCR_454_RR=2239
-20	18125941	.	T	C	.	.	Sample=NA12006;GT=0/0;PCR_454_AR=2;PCR_454_RR=2354
-20	18125941	.	T	C	.	.	Sample=NA12762;GT=0/0;PCR_454_AR=4;PCR_454_RR=1116
-20	18374912	.	T	A	.	.	Sample=NA19189;GT=0/1;PCR_454_AR=896;PCR_454_RR=888
-20	18440904	.	G	C	.	.	Sample=NA19058;GT=0/1;PCR_454_AR=685;PCR_454_RR=881
-20	19698200	.	C	T	.	.	Sample=NA18574;GT=0/1;PCR_454_AR=1012;PCR_454_RR=1086
-20	20020489	.	T	C	.	.	Sample=NA19000;GT=0/1;PCR_454_AR=459;PCR_454_RR=436
-20	20028425	.	C	T	.	.	Sample=NA20787;GT=0/1;PCR_454_AR=687;PCR_454_RR=739
-20	20033171	.	G	A	.	.	Sample=NA19468;GT=0/0;PCR_454_AR=109;PCR_454_RR=1866
-20	20051634	.	A	G	.	.	Sample=NA19711;GT=0/1;PCR_454_AR=659;PCR_454_RR=2324
-20	20051634	.	A	G	.	.	Sample=NA20126;GT=0/1;PCR_454_AR=687;PCR_454_RR=2379
-20	20177371	.	T	C	.	.	Sample=NA19713;GT=0/1;PCR_454_AR=882;PCR_454_RR=785
-20	21346240	.	C	T	.	.	Sample=HG01125;GT=0/1;PCR_454_AR=707;PCR_454_RR=711
-20	21346240	.	C	T	.	.	Sample=NA18489;GT=0/1;PCR_454_AR=670;PCR_454_RR=648
-20	21346240	.	C	T	.	.	Sample=NA18498;GT=0/1;PCR_454_AR=706;PCR_454_RR=667
-20	21346240	.	C	T	.	.	Sample=NA18502;GT=0/1;PCR_454_AR=698;PCR_454_RR=678
-20	21346240	.	C	T	.	.	Sample=NA18505;GT=1/1;PCR_454_AR=1096;PCR_454_RR=2
-20	21494183	.	C	T	.	.	Sample=HG00128;GT=0/1;PCR_454_AR=556;PCR_454_RR=605
-20	21494183	.	C	T	.	.	Sample=HG00151;GT=0/1;PCR_454_AR=465;PCR_454_RR=425
-20	21494183	.	C	T	.	.	Sample=HG00234;GT=0/1;PCR_454_AR=583;PCR_454_RR=487
-20	21494183	.	C	T	.	.	Sample=HG00355;GT=0/1;PCR_454_AR=608;PCR_454_RR=521
-20	21494183	.	C	T	.	.	Sample=HG00362;GT=0/1;PCR_454_AR=518;PCR_454_RR=577
-20	21687304	.	C	T	.	.	Sample=NA19657;GT=0/1;PCR_454_AR=804;PCR_454_RR=862
-20	23028428	.	C	T	.	.	Sample=NA18970;GT=0/1;PCR_454_AR=360;PCR_454_RR=418
-20	23028637	.	C	G	.	.	Sample=NA18517;GT=0/1;PCR_454_AR=358;PCR_454_RR=374
-20	23028637	.	C	G	.	.	Sample=NA19118;GT=0/1;PCR_454_AR=502;PCR_454_RR=432
-20	23420987	.	G	T	.	.	Sample=NA19076;GT=0/0;PCR_454_AR=20;PCR_454_RR=1732
-20	23420993	.	C	G	.	.	Sample=NA19076;GT=0/0;PCR_454_AR=40;PCR_454_RR=3495
-20	23424637	.	C	T	.	.	Sample=HG00126;GT=0/1;PCR_454_AR=766;PCR_454_RR=721
-20	23424637	.	C	T	.	.	Sample=HG00150;GT=0/1;PCR_454_AR=444;PCR_454_RR=435
-20	23424637	.	C	T	.	.	Sample=HG00247;GT=0/1;PCR_454_AR=510;PCR_454_RR=486
-20	23424637	.	C	T	.	.	Sample=HG00565;GT=0/1;PCR_454_AR=684;PCR_454_RR=609
-20	23424637	.	C	T	.	.	Sample=HG00593;GT=0/1;PCR_454_AR=640;PCR_454_RR=676
-20	23545657	.	A	C	.	.	Sample=NA18924;GT=0/1;PCR_454_AR=767;PCR_454_RR=780
-20	23548918	.	T	C	.	.	Sample=NA18501;GT=0/1;PCR_454_AR=1397;PCR_454_RR=1168
-20	23548918	.	T	C	.	.	Sample=NA18502;GT=0/1;PCR_454_AR=1373;PCR_454_RR=1383
-20	23548918	.	T	C	.	.	Sample=NA18856;GT=0/1;PCR_454_AR=1376;PCR_454_RR=1446
-20	23548918	.	T	C	.	.	Sample=NA18907;GT=0/1;PCR_454_AR=1522;PCR_454_RR=1533
-20	23548918	.	T	C	.	.	Sample=NA19036;GT=0/1;PCR_454_AR=1549;PCR_454_RR=1624
-20	23667793	.	G	T	.	.	Sample=NA11994;GT=0/0;PCR_454_AR=135;PCR_454_RR=1637
-20	23667793	.	G	T	.	.	Sample=NA12400;GT=0/1;PCR_454_AR=651;PCR_454_RR=619
-20	23667793	.	G	T	.	.	Sample=NA18527;GT=0/1;PCR_454_AR=816;PCR_454_RR=732
-20	23667793	.	G	T	.	.	Sample=NA18566;GT=0/1;PCR_454_AR=928;PCR_454_RR=2446
-20	23667793	.	G	T	.	.	Sample=NA19064;GT=0/1;PCR_454_AR=892;PCR_454_RR=2346
-20	23667834	.	A	C	.	.	Sample=NA18510;GT=0/0;PCR_454_AR=27;PCR_454_RR=622
-20	23667834	.	A	C	.	.	Sample=NA18858;GT=0/0;PCR_454_AR=32;PCR_454_RR=615
-20	23731469	.	G	T	.	.	Sample=NA20544;GT=0/1;PCR_454_AR=292;PCR_454_RR=376
-20	23804690	.	A	C	.	.	Sample=NA19749;GT=0/1;PCR_454_AR=1141;PCR_454_RR=1145
-20	23807156	.	G	C	.	.	Sample=HG00129;GT=0/0;PCR_454_AR=0;PCR_454_RR=1447
-20	23807156	.	G	C	.	.	Sample=HG00130;GT=0/0;PCR_454_AR=0;PCR_454_RR=1603
-20	23860201	.	C	T	.	.	Sample=NA18553;GT=0/1;PCR_454_AR=722;PCR_454_RR=657
-20	23965921	.	G	A	.	.	Sample=NA18549;GT=0/0;PCR_454_AR=21;PCR_454_RR=582
-20	23965921	.	G	A	.	.	Sample=NA19000;GT=0/0;PCR_454_AR=19;PCR_454_RR=337
-20	24523782	.	G	A	.	.	Sample=NA19921;GT=0/1;PCR_454_AR=933;PCR_454_RR=1005
-20	24523986	.	C	A	.	.	Sample=HG00104;GT=0/1;PCR_454_AR=1056;PCR_454_RR=1346
-20	24954343	.	G	A	.	.	Sample=NA19146;GT=0/1;PCR_454_AR=1208;PCR_454_RR=1132
-20	25058490	.	T	G	.	.	Sample=NA11830;GT=0/0;PCR_454_AR=5;PCR_454_RR=1757
-20	25187224	.	A	G	.	.	Sample=NA19137;GT=0/1;PCR_454_AR=69;PCR_454_RR=566
-20	25203611	.	T	C	.	.	Sample=NA12006;GT=0/1;PCR_454_AR=1326;PCR_454_RR=1209
-20	25252066	.	A	G	.	.	Sample=NA18637;GT=0/1;PCR_454_AR=1208;PCR_454_RR=1230
-20	25262768	.	G	A	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=920;PCR_454_RR=727
-20	25262768	.	G	A	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=733;PCR_454_RR=613
-20	25262768	.	G	A	.	.	Sample=HG00112;GT=0/1;PCR_454_AR=756;PCR_454_RR=723
-20	25262768	.	G	A	.	.	Sample=HG00130;GT=0/1;PCR_454_AR=854;PCR_454_RR=827
-20	25262768	.	G	A	.	.	Sample=HG00152;GT=0/1;PCR_454_AR=798;PCR_454_RR=764
-20	25277132	.	C	T	.	.	Sample=NA18861;GT=0/1;PCR_454_AR=415;PCR_454_RR=446
-20	25434162	.	C	T	.	.	Sample=NA19346;GT=0/1;PCR_454_AR=566;PCR_454_RR=613
-20	25434162	.	C	T	.	.	Sample=NA19395;GT=0/1;PCR_454_AR=504;PCR_454_RR=531
-20	25439088	.	C	T	.	.	Sample=NA19095;GT=0/0;PCR_454_AR=1;PCR_454_RR=1220
-20	25439088	.	C	T	.	.	Sample=NA19923;GT=0/1;PCR_454_AR=575;PCR_454_RR=834
-20	25457145	.	G	A	.	.	Sample=NA12842;GT=0/1;PCR_454_AR=333;PCR_454_RR=438
-20	25457559	.	G	A	.	.	Sample=NA19159;GT=0/1;PCR_454_AR=1225;PCR_454_RR=1285
-20	25457665	.	C	T	.	.	Sample=NA20341;GT=0/1;PCR_454_AR=627;PCR_454_RR=1348
-20	25459659	.	T	C	.	.	Sample=NA18647;GT=0/0;PCR_454_AR=5;PCR_454_RR=2809
-20	25459659	.	T	C	.	.	Sample=NA18748;GT=0/0;PCR_454_AR=5;PCR_454_RR=2184
-20	25459659	.	T	C	.	.	Sample=HG01274;GT=0/1;PCR_454_AR=1246;PCR_454_RR=1375
-20	25459659	.	T	C	.	.	Sample=NA12275;GT=0/1;PCR_454_AR=1183;PCR_454_RR=1148
-20	25459659	.	T	C	.	.	Sample=NA12718;GT=0/1;PCR_454_AR=1017;PCR_454_RR=1225
-20	25478961	.	G	A	.	.	Sample=HG00104;GT=0/0;PCR_454_AR=1;PCR_454_RR=1933
-20	25478961	.	G	A	.	.	Sample=HG00234;GT=0/0;PCR_454_AR=0;PCR_454_RR=1964
-20	25478961	.	G	A	.	.	Sample=HG00364;GT=0/0;PCR_454_AR=2;PCR_454_RR=1909
-20	25478961	.	G	A	.	.	Sample=HG00593;GT=0/0;PCR_454_AR=2;PCR_454_RR=2173
-20	25478961	.	G	A	.	.	Sample=HG01271;GT=0/0;PCR_454_AR=0;PCR_454_RR=2082
-20	30407977	.	A	G	.	.	Sample=NA12287;GT=0/1;PCR_454_AR=1313;PCR_454_RR=1488
-20	30432438	.	C	T	.	.	Sample=NA19352;GT=0/1;PCR_454_AR=1043;PCR_454_RR=964
-20	30432438	.	C	T	.	.	Sample=NA19654;GT=0/1;PCR_454_AR=937;PCR_454_RR=1465
-20	30432570	.	T	C	.	.	Sample=NA18510;GT=0/1;PCR_454_AR=1224;PCR_454_RR=1413
-20	30432570	.	T	C	.	.	Sample=NA18858;GT=0/1;PCR_454_AR=1050;PCR_454_RR=1052
-20	30432570	.	T	C	.	.	Sample=NA18868;GT=0/1;PCR_454_AR=1087;PCR_454_RR=966
-20	30432570	.	T	C	.	.	Sample=NA18871;GT=0/1;PCR_454_AR=1178;PCR_454_RR=1344
-20	30432570	.	T	C	.	.	Sample=NA18522;GT=1/1;PCR_454_AR=1873;PCR_454_RR=7
-20	30602754	.	C	T	.	.	Sample=NA19749;GT=0/1;PCR_454_AR=63;PCR_454_RR=409
-20	30729618	.	G	A	.	.	Sample=NA11994;GT=0/0;PCR_454_AR=0;PCR_454_RR=1866
-20	30729618	.	G	A	.	.	Sample=NA07037;GT=0/1;PCR_454_AR=1373;PCR_454_RR=1435
-20	30729618	.	G	A	.	.	Sample=NA12058;GT=0/1;PCR_454_AR=963;PCR_454_RR=990
-20	30729618	.	G	A	.	.	Sample=NA12144;GT=0/1;PCR_454_AR=1419;PCR_454_RR=1136
-20	30729618	.	G	A	.	.	Sample=NA12282;GT=0/1;PCR_454_AR=1353;PCR_454_RR=1148
-20	30789767	.	G	A	.	.	Sample=HG00350;GT=0/0;PCR_454_AR=36;PCR_454_RR=553
-20	30897726	.	G	A	.	.	Sample=NA20507;GT=0/0;PCR_454_AR=239;PCR_454_RR=2404
-20	30918043	.	C	T	.	.	Sample=NA19707;GT=0/1;PCR_454_AR=1147;PCR_454_RR=1123
-20	30918043	.	C	T	.	.	Sample=NA20775;GT=0/1;PCR_454_AR=1234;PCR_454_RR=1140
-20	31021429	.	G	C	.	.	Sample=NA18870;GT=0/1;PCR_454_AR=747;PCR_454_RR=929
-20	31021429	.	G	C	.	.	Sample=NA19319;GT=0/1;PCR_454_AR=585;PCR_454_RR=657
-20	31021429	.	G	C	.	.	Sample=NA19445;GT=0/1;PCR_454_AR=531;PCR_454_RR=553
-20	31021429	.	G	C	.	.	Sample=NA20127;GT=0/1;PCR_454_AR=661;PCR_454_RR=679
-20	31021429	.	G	C	.	.	Sample=NA20317;GT=0/1;PCR_454_AR=874;PCR_454_RR=917
-20	31022764	.	C	T	.	.	Sample=NA18498;GT=0/1;PCR_454_AR=1455;PCR_454_RR=1259
-20	31022764	.	C	T	.	.	Sample=NA18507;GT=0/1;PCR_454_AR=1020;PCR_454_RR=972
-20	31022764	.	C	T	.	.	Sample=NA18511;GT=0/1;PCR_454_AR=1339;PCR_454_RR=1297
-20	31022764	.	C	T	.	.	Sample=NA18856;GT=0/1;PCR_454_AR=1582;PCR_454_RR=1572
-20	31022764	.	C	T	.	.	Sample=NA18870;GT=0/1;PCR_454_AR=1642;PCR_454_RR=1613
-20	31024033	.	G	A	.	.	Sample=HG01356;GT=0/1;PCR_454_AR=1045;PCR_454_RR=1002
-20	31024033	.	G	A	.	.	Sample=NA18537;GT=0/1;PCR_454_AR=794;PCR_454_RR=788
-20	31024033	.	G	A	.	.	Sample=NA18557;GT=0/1;PCR_454_AR=830;PCR_454_RR=795
-20	31024033	.	G	A	.	.	Sample=NA18558;GT=0/1;PCR_454_AR=833;PCR_454_RR=878
-20	31024033	.	G	A	.	.	Sample=NA18637;GT=1/1;PCR_454_AR=1528;PCR_454_RR=6
-20	31040782	.	G	A	.	.	Sample=HG00097;GT=0/1;PCR_454_AR=978;PCR_454_RR=1231
-20	31040782	.	G	A	.	.	Sample=HG00179;GT=0/1;PCR_454_AR=1054;PCR_454_RR=993
-20	31040782	.	G	A	.	.	Sample=HG01620;GT=0/1;PCR_454_AR=1091;PCR_454_RR=1111
-20	31040782	.	G	A	.	.	Sample=NA12273;GT=0/1;PCR_454_AR=1073;PCR_454_RR=1182
-20	31040782	.	G	A	.	.	Sample=NA12341;GT=0/1;PCR_454_AR=1102;PCR_454_RR=1318
-20	31375167	.	G	A	.	.	Sample=NA18486;GT=0/1;PCR_454_AR=563;PCR_454_RR=523
-20	31375167	.	G	A	.	.	Sample=NA19113;GT=0/1;PCR_454_AR=628;PCR_454_RR=620
-20	31388076	.	C	T	.	.	Sample=NA18504;GT=0/1;PCR_454_AR=809;PCR_454_RR=773
-20	31388076	.	C	T	.	.	Sample=NA18519;GT=0/1;PCR_454_AR=683;PCR_454_RR=752
-20	31388076	.	C	T	.	.	Sample=NA18856;GT=0/1;PCR_454_AR=1012;PCR_454_RR=1073
-20	31388076	.	C	T	.	.	Sample=NA18917;GT=0/1;PCR_454_AR=888;PCR_454_RR=931
-20	31388076	.	C	T	.	.	Sample=NA18522;GT=1/1;PCR_454_AR=1422;PCR_454_RR=2
-20	31424592	.	C	T	.	.	Sample=NA19146;GT=0/1;PCR_454_AR=237;PCR_454_RR=257
-20	31434427	.	A	G	.	.	Sample=NA11995;GT=0/1;PCR_454_AR=325;PCR_454_RR=325
-20	31604884	.	A	G	.	.	Sample=NA12748;GT=0/1;PCR_454_AR=1098;PCR_454_RR=1153
-20	31606483	.	G	C	.	.	Sample=NA18740;GT=0/1;PCR_454_AR=595;PCR_454_RR=964
-20	31606907	.	G	A	.	.	Sample=NA19753;GT=0/0;PCR_454_AR=0;PCR_454_RR=1627
-20	31606907	.	G	A	.	.	Sample=NA19747;GT=0/1;PCR_454_AR=952;PCR_454_RR=884
-20	31622899	.	A	G	.	.	Sample=NA19038;GT=0/1;PCR_454_AR=196;PCR_454_RR=111
-20	31626754	.	G	A	.	.	Sample=NA18579;GT=0/1;PCR_454_AR=941;PCR_454_RR=902
-20	31643241	.	A	C	.	.	Sample=NA18622;GT=0/1;PCR_454_AR=832;PCR_454_RR=877
-20	31659074	.	G	A	.	.	Sample=NA19449;GT=0/1;PCR_454_AR=915;PCR_454_RR=863
-20	31672711	.	A	G	.	.	Sample=NA20754;GT=0/1;PCR_454_AR=762;PCR_454_RR=820
-20	31680333	.	C	T	.	.	Sample=HG00156;GT=0/1;PCR_454_AR=446;PCR_454_RR=438
-20	31680333	.	C	T	.	.	Sample=HG00235;GT=0/1;PCR_454_AR=525;PCR_454_RR=435
-20	31680333	.	C	T	.	.	Sample=HG01125;GT=0/1;PCR_454_AR=433;PCR_454_RR=415
-20	31680333	.	C	T	.	.	Sample=NA12043;GT=0/1;PCR_454_AR=559;PCR_454_RR=477
-20	31680333	.	C	T	.	.	Sample=NA12046;GT=0/1;PCR_454_AR=364;PCR_454_RR=330
-20	31695565	.	C	T	.	.	Sample=NA19054;GT=0/1;PCR_454_AR=988;PCR_454_RR=944
-20	31889182	.	T	C	.	.	Sample=HG01277;GT=0/1;PCR_454_AR=594;PCR_454_RR=639
-20	31889182	.	T	C	.	.	Sample=HG01278;GT=0/1;PCR_454_AR=533;PCR_454_RR=540
-20	31889182	.	T	C	.	.	Sample=HG01623;GT=0/1;PCR_454_AR=703;PCR_454_RR=668
-20	31889182	.	T	C	.	.	Sample=NA18487;GT=0/1;PCR_454_AR=644;PCR_454_RR=647
-20	31889182	.	T	C	.	.	Sample=NA18486;GT=1/1;PCR_454_AR=1419;PCR_454_RR=15
-20	31890796	.	G	A	.	.	Sample=NA18595;GT=0/1;PCR_454_AR=36;PCR_454_RR=49
-20	31967485	.	T	C	.	.	Sample=NA18757;GT=0/0;PCR_454_AR=4;PCR_454_RR=1506
-20	32162066	.	G	C	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=98;PCR_454_RR=92
-20	32162066	.	G	C	.	.	Sample=NA12282;GT=0/1;PCR_454_AR=72;PCR_454_RR=74
-20	32162066	.	G	C	.	.	Sample=NA12342;GT=0/1;PCR_454_AR=105;PCR_454_RR=134
-20	32162066	.	G	C	.	.	Sample=NA12778;GT=0/1;PCR_454_AR=94;PCR_454_RR=122
-20	32162066	.	G	C	.	.	Sample=NA19773;GT=0/1;PCR_454_AR=84;PCR_454_RR=115
-20	32295637	.	A	G	.	.	Sample=NA19204;GT=0/1;PCR_454_AR=1263;PCR_454_RR=1230
-20	32298533	.	G	A	.	.	Sample=HG01125;GT=0/1;PCR_454_AR=1577;PCR_454_RR=1574
-20	32298533	.	G	A	.	.	Sample=NA18510;GT=0/1;PCR_454_AR=1537;PCR_454_RR=1597
-20	32298533	.	G	A	.	.	Sample=NA18520;GT=0/1;PCR_454_AR=1689;PCR_454_RR=1754
-20	32298533	.	G	A	.	.	Sample=NA19099;GT=0/1;PCR_454_AR=1900;PCR_454_RR=1940
-20	32298533	.	G	A	.	.	Sample=NA19129;GT=0/1;PCR_454_AR=1900;PCR_454_RR=1840
-20	32336754	.	G	A	.	.	Sample=HG00358;GT=0/1;PCR_454_AR=1185;PCR_454_RR=1161
-20	32336754	.	G	A	.	.	Sample=HG00565;GT=0/1;PCR_454_AR=1018;PCR_454_RR=958
-20	32336754	.	G	A	.	.	Sample=HG00595;GT=0/1;PCR_454_AR=1201;PCR_454_RR=1222
-20	32336754	.	G	A	.	.	Sample=NA18532;GT=0/1;PCR_454_AR=1204;PCR_454_RR=1235
-20	32336754	.	G	A	.	.	Sample=NA18542;GT=1/1;PCR_454_AR=2997;PCR_454_RR=11
-20	32358043	.	A	T	.	.	Sample=NA18955;GT=0/1;PCR_454_AR=1050;PCR_454_RR=1022
-20	32881901	.	T	C	.	.	Sample=NA19257;GT=0/1;PCR_454_AR=1007;PCR_454_RR=966
-20	33328321	.	C	T	.	.	Sample=NA18487;GT=0/1;PCR_454_AR=637;PCR_454_RR=629
-20	33328321	.	C	T	.	.	Sample=NA18516;GT=0/1;PCR_454_AR=613;PCR_454_RR=605
-20	33328321	.	C	T	.	.	Sample=NA19044;GT=0/1;PCR_454_AR=629;PCR_454_RR=661
-20	33328321	.	C	T	.	.	Sample=NA19102;GT=0/1;PCR_454_AR=680;PCR_454_RR=625
-20	33328321	.	C	T	.	.	Sample=NA19175;GT=0/1;PCR_454_AR=652;PCR_454_RR=703
-20	33330691	.	C	G	.	.	Sample=NA19189;GT=0/1;PCR_454_AR=604;PCR_454_RR=575
-20	33433247	.	G	A	.	.	Sample=NA11919;GT=0/1;PCR_454_AR=196;PCR_454_RR=195
-20	33447313	.	C	T	.	.	Sample=HG01125;GT=0/1;PCR_454_AR=260;PCR_454_RR=285
-20	33447313	.	C	T	.	.	Sample=NA18504;GT=0/1;PCR_454_AR=231;PCR_454_RR=217
-20	33447313	.	C	T	.	.	Sample=NA18517;GT=0/1;PCR_454_AR=298;PCR_454_RR=311
-20	33447313	.	C	T	.	.	Sample=NA18520;GT=0/1;PCR_454_AR=254;PCR_454_RR=256
-20	33447313	.	C	T	.	.	Sample=NA18522;GT=0/1;PCR_454_AR=286;PCR_454_RR=277
-20	33517251	.	C	T	.	.	Sample=HG00126;GT=0/1;PCR_454_AR=685;PCR_454_RR=676
-20	33517301	.	G	A	.	.	Sample=NA20282;GT=0/1;PCR_454_AR=1082;PCR_454_RR=1076
-20	33523396	.	A	C	.	.	Sample=NA18910;GT=0/1;PCR_454_AR=879;PCR_454_RR=933
-20	33572880	.	C	T	.	.	Sample=NA20516;GT=0/1;PCR_454_AR=935;PCR_454_RR=847
-20	33575007	.	C	T	.	.	Sample=NA19118;GT=0/1;PCR_454_AR=793;PCR_454_RR=659
-20	33575043	.	C	T	.	.	Sample=NA19036;GT=0/1;PCR_454_AR=972;PCR_454_RR=919
-20	33575043	.	C	T	.	.	Sample=NA19308;GT=0/1;PCR_454_AR=801;PCR_454_RR=728
-20	33575043	.	C	T	.	.	Sample=NA19434;GT=0/1;PCR_454_AR=825;PCR_454_RR=915
-20	33575043	.	C	T	.	.	Sample=NA19439;GT=0/1;PCR_454_AR=1001;PCR_454_RR=1073
-20	33575043	.	C	T	.	.	Sample=NA19466;GT=0/1;PCR_454_AR=936;PCR_454_RR=931
-20	33583330	.	A	G	.	.	Sample=HG00097;GT=1/1;PCR_454_AR=651;PCR_454_RR=5
-20	33583330	.	A	G	.	.	Sample=HG00099;GT=1/1;PCR_454_AR=326;PCR_454_RR=0
-20	33583330	.	A	G	.	.	Sample=HG00104;GT=1/1;PCR_454_AR=430;PCR_454_RR=2
-20	33583330	.	A	G	.	.	Sample=HG00106;GT=1/1;PCR_454_AR=613;PCR_454_RR=3
-20	33583330	.	A	G	.	.	Sample=HG00112;GT=1/1;PCR_454_AR=632;PCR_454_RR=6
-20	33584196	.	C	T	.	.	Sample=NA12286;GT=0/1;PCR_454_AR=989;PCR_454_RR=1638
-20	33584196	.	C	T	.	.	Sample=NA12750;GT=0/1;PCR_454_AR=886;PCR_454_RR=1206
-20	33584196	.	C	T	.	.	Sample=NA19750;GT=0/1;PCR_454_AR=1179;PCR_454_RR=1155
-20	33584196	.	C	T	.	.	Sample=NA20807;GT=0/1;PCR_454_AR=1089;PCR_454_RR=1724
-20	33584196	.	C	T	.	.	Sample=NA20826;GT=0/1;PCR_454_AR=1373;PCR_454_RR=1259
-20	33587399	.	G	A	.	.	Sample=NA19328;GT=0/1;PCR_454_AR=893;PCR_454_RR=754
-20	33711732	.	T	A	.	.	Sample=NA19347;GT=0/1;PCR_454_AR=887;PCR_454_RR=946
-20	33874473	.	C	A	.	.	Sample=NA18626;GT=0/1;PCR_454_AR=1001;PCR_454_RR=1012
-20	33874719	.	C	T	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=585;PCR_454_RR=542
-20	33874719	.	C	T	.	.	Sample=HG00141;GT=0/1;PCR_454_AR=499;PCR_454_RR=508
-20	33874719	.	C	T	.	.	Sample=HG00142;GT=0/1;PCR_454_AR=541;PCR_454_RR=540
-20	33874719	.	C	T	.	.	Sample=HG00143;GT=0/1;PCR_454_AR=699;PCR_454_RR=604
-20	33874719	.	C	T	.	.	Sample=HG00156;GT=0/1;PCR_454_AR=722;PCR_454_RR=617
-20	34092317	.	C	A	.	.	Sample=HG00128;GT=0/0;PCR_454_AR=0;PCR_454_RR=1205
-20	34092317	.	C	A	.	.	Sample=HG00266;GT=0/0;PCR_454_AR=3;PCR_454_RR=3354
-20	34218898	.	A	G	.	.	Sample=NA12763;GT=0/1;PCR_454_AR=295;PCR_454_RR=291
-20	34292440	.	T	C	.	.	Sample=NA18639;GT=0/1;PCR_454_AR=481;PCR_454_RR=572
-20	34317286	.	G	A	.	.	Sample=NA19204;GT=0/1;PCR_454_AR=665;PCR_454_RR=705
-20	34611604	.	C	T	.	.	Sample=NA11893;GT=0/1;PCR_454_AR=1180;PCR_454_RR=1243
-20	35060852	.	G	A	.	.	Sample=NA12283;GT=0/1;PCR_454_AR=433;PCR_454_RR=444
-20	35060852	.	G	A	.	.	Sample=NA19676;GT=0/1;PCR_454_AR=368;PCR_454_RR=421
-20	35068262	.	A	C	.	.	Sample=NA20759;GT=0/1;PCR_454_AR=1272;PCR_454_RR=1190
-20	35075140	.	C	T	.	.	Sample=NA19444;GT=0/1;PCR_454_AR=1174;PCR_454_RR=605
-20	35075140	.	C	T	.	.	Sample=NA19448;GT=0/1;PCR_454_AR=1574;PCR_454_RR=932
-20	35075309	.	G	A	.	.	Sample=NA18549;GT=0/1;PCR_454_AR=923;PCR_454_RR=1559
-20	35075309	.	G	A	.	.	Sample=NA19391;GT=0/1;PCR_454_AR=1114;PCR_454_RR=1064
-20	35075309	.	G	A	.	.	Sample=NA19397;GT=0/1;PCR_454_AR=1198;PCR_454_RR=1233
-20	35176551	.	A	G	.	.	Sample=NA20289;GT=0/1;PCR_454_AR=532;PCR_454_RR=1682
-20	35207263	.	G	A	.	.	Sample=HG00234;GT=0/1;PCR_454_AR=235;PCR_454_RR=221
-20	35219406	.	G	C	.	.	Sample=HG00105;GT=0/0;PCR_454_AR=57;PCR_454_RR=585
-20	35219406	.	G	C	.	.	Sample=HG00130;GT=0/0;PCR_454_AR=58;PCR_454_RR=574
-20	35438474	.	G	A	.	.	Sample=NA18642;GT=0/1;PCR_454_AR=1030;PCR_454_RR=1093
-20	35507540	.	G	A	.	.	Sample=NA19740;GT=0/1;PCR_454_AR=466;PCR_454_RR=584
-20	35539699	.	T	C	.	.	Sample=NA12717;GT=0/1;PCR_454_AR=336;PCR_454_RR=421
-20	35812756	.	C	T	.	.	Sample=NA19726;GT=0/1;PCR_454_AR=1085;PCR_454_RR=1070
-20	35944759	.	A	C	.	.	Sample=NA11831;GT=0/0;PCR_454_AR=1;PCR_454_RR=1726
-20	35944759	.	A	C	.	.	Sample=NA11832;GT=0/0;PCR_454_AR=3;PCR_454_RR=1809
-20	36024598	.	C	T	.	.	Sample=NA19682;GT=0/1;PCR_454_AR=677;PCR_454_RR=797
-20	36024598	.	C	T	.	.	Sample=NA20528;GT=0/1;PCR_454_AR=691;PCR_454_RR=703
-20	36030944	.	T	C	.	.	Sample=NA18618;GT=0/0;PCR_454_AR=0;PCR_454_RR=985
-20	36030944	.	T	C	.	.	Sample=NA18626;GT=0/0;PCR_454_AR=2;PCR_454_RR=778
-20	36030944	.	T	C	.	.	Sample=NA18916;GT=0/1;PCR_454_AR=454;PCR_454_RR=444
-20	36030944	.	T	C	.	.	Sample=NA19150;GT=0/1;PCR_454_AR=471;PCR_454_RR=509
-20	36488331	.	A	G	.	.	Sample=NA20340;GT=0/1;PCR_454_AR=1388;PCR_454_RR=1472
-20	36640610	.	C	G	.	.	Sample=NA18508;GT=0/1;PCR_454_AR=985;PCR_454_RR=1026
-20	36641870	.	G	A	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=1062;PCR_454_RR=1095
-20	36641870	.	G	A	.	.	Sample=NA11893;GT=0/1;PCR_454_AR=976;PCR_454_RR=1033
-20	36641870	.	G	A	.	.	Sample=NA12399;GT=0/1;PCR_454_AR=971;PCR_454_RR=973
-20	36641870	.	G	A	.	.	Sample=NA12489;GT=0/1;PCR_454_AR=1107;PCR_454_RR=1037
-20	36641870	.	G	A	.	.	Sample=NA12749;GT=0/1;PCR_454_AR=947;PCR_454_RR=885
-20	36775155	.	A	G	.	.	Sample=NA19067;GT=0/1;PCR_454_AR=771;PCR_454_RR=772
-20	36775233	.	G	A	.	.	Sample=NA19352;GT=0/1;PCR_454_AR=732;PCR_454_RR=723
-20	36784261	.	G	A	.	.	Sample=NA19171;GT=0/1;PCR_454_AR=1197;PCR_454_RR=1200
-20	36841848	.	C	T	.	.	Sample=NA19449;GT=0/1;PCR_454_AR=402;PCR_454_RR=394
-20	36869075	.	G	A	.	.	Sample=NA19185;GT=0/1;PCR_454_AR=1430;PCR_454_RR=1382
-20	36869206	.	C	T	.	.	Sample=NA20287;GT=0/1;PCR_454_AR=584;PCR_454_RR=626
-20	36979308	.	T	A	.	.	Sample=NA11894;GT=0/1;PCR_454_AR=973;PCR_454_RR=1087
-20	37001736	.	C	T	.	.	Sample=NA18987;GT=0/1;PCR_454_AR=122;PCR_454_RR=88
-20	39798902	.	C	T	.	.	Sample=NA18994;GT=0/1;PCR_454_AR=1212;PCR_454_RR=1202
-20	39981307	.	G	T	.	.	Sample=NA18595;GT=0/1;PCR_454_AR=1273;PCR_454_RR=1102
-20	39981307	.	G	T	.	.	Sample=NA18622;GT=0/1;PCR_454_AR=635;PCR_454_RR=623
-20	39981307	.	G	T	.	.	Sample=NA18977;GT=0/1;PCR_454_AR=1251;PCR_454_RR=1141
-20	39981307	.	G	T	.	.	Sample=NA18978;GT=0/1;PCR_454_AR=1286;PCR_454_RR=1331
-20	39981307	.	G	T	.	.	Sample=NA18998;GT=0/1;PCR_454_AR=1174;PCR_454_RR=1225
-20	39986913	.	G	A	.	.	Sample=NA20317;GT=0/1;PCR_454_AR=627;PCR_454_RR=535
-20	39987386	.	G	A	.	.	Sample=NA19437;GT=0/1;PCR_454_AR=989;PCR_454_RR=971
-20	39992390	.	G	A	.	.	Sample=NA18636;GT=0/1;PCR_454_AR=925;PCR_454_RR=969
-20	39993723	.	C	T	.	.	Sample=NA18489;GT=0/1;PCR_454_AR=677;PCR_454_RR=819
-20	39993723	.	C	T	.	.	Sample=NA18505;GT=0/1;PCR_454_AR=603;PCR_454_RR=578
-20	39993723	.	C	T	.	.	Sample=NA18517;GT=0/1;PCR_454_AR=791;PCR_454_RR=747
-20	39993723	.	C	T	.	.	Sample=NA19380;GT=0/1;PCR_454_AR=869;PCR_454_RR=972
-20	39993790	.	G	A	.	.	Sample=NA18871;GT=0/1;PCR_454_AR=2297;PCR_454_RR=2512
-20	40033848	.	A	G	.	.	Sample=HG00559;GT=0/0;PCR_454_AR=6;PCR_454_RR=2130
-20	40050233	.	T	G	.	.	Sample=HG01133;GT=0/0;PCR_454_AR=2;PCR_454_RR=1613
-20	40050233	.	T	G	.	.	Sample=NA18502;GT=0/0;PCR_454_AR=4;PCR_454_RR=1967
-20	40162202	.	T	C	.	.	Sample=NA12874;GT=0/1;PCR_454_AR=171;PCR_454_RR=157
-20	42143783	.	A	G	.	.	Sample=NA20334;GT=0/1;PCR_454_AR=1011;PCR_454_RR=632
-20	42143783	.	A	G	.	.	Sample=NA20336;GT=0/1;PCR_454_AR=1556;PCR_454_RR=492
-20	42196587	.	G	A	.	.	Sample=NA19312;GT=0/1;PCR_454_AR=522;PCR_454_RR=486
-20	42196587	.	G	A	.	.	Sample=NA19383;GT=0/1;PCR_454_AR=693;PCR_454_RR=821
-20	42333997	.	C	T	.	.	Sample=NA19058;GT=0/1;PCR_454_AR=994;PCR_454_RR=994
-20	42680115	.	G	A	.	.	Sample=NA18611;GT=0/1;PCR_454_AR=1042;PCR_454_RR=1086
-20	42747246	.	C	T	.	.	Sample=HG00097;GT=0/1;PCR_454_AR=1132;PCR_454_RR=1174
-20	42747246	.	C	T	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=899;PCR_454_RR=983
-20	42747246	.	C	T	.	.	Sample=HG00112;GT=0/1;PCR_454_AR=901;PCR_454_RR=960
-20	42747246	.	C	T	.	.	Sample=HG00135;GT=0/1;PCR_454_AR=677;PCR_454_RR=680
-20	42747246	.	C	T	.	.	Sample=HG00142;GT=0/1;PCR_454_AR=928;PCR_454_RR=956
-20	42939738	.	C	T	.	.	Sample=NA18611;GT=0/1;PCR_454_AR=1131;PCR_454_RR=984
-20	43243299	.	G	C	.	.	Sample=NA18633;GT=0/1;PCR_454_AR=1194;PCR_454_RR=1277
-20	43255152	.	G	A	.	.	Sample=HG00130;GT=0/0;PCR_454_AR=0;PCR_454_RR=2287
-20	43255152	.	G	A	.	.	Sample=HG00234;GT=0/0;PCR_454_AR=1;PCR_454_RR=2172
-20	43255152	.	G	A	.	.	Sample=NA18618;GT=0/0;PCR_454_AR=2;PCR_454_RR=2266
-20	43255152	.	G	A	.	.	Sample=NA18956;GT=0/0;PCR_454_AR=0;PCR_454_RR=2152
-20	43255152	.	G	A	.	.	Sample=NA19083;GT=0/1;PCR_454_AR=986;PCR_454_RR=974
-20	43723672	.	G	A	.	.	Sample=NA18530;GT=0/1;PCR_454_AR=356;PCR_454_RR=401
-20	43723672	.	G	A	.	.	Sample=NA18622;GT=0/1;PCR_454_AR=449;PCR_454_RR=391
-20	43739354	.	G	A	.	.	Sample=NA18504;GT=0/1;PCR_454_AR=455;PCR_454_RR=1477
-20	43934213	.	G	T	.	.	Sample=HG01345;GT=0/1;PCR_454_AR=1327;PCR_454_RR=1169
-20	44190750	.	T	G	.	.	Sample=HG00143;GT=0/1;PCR_454_AR=898;PCR_454_RR=938
-20	44190750	.	T	G	.	.	Sample=NA12340;GT=0/1;PCR_454_AR=882;PCR_454_RR=872
-20	44424037	.	G	A	.	.	Sample=HG00152;GT=0/1;PCR_454_AR=603;PCR_454_RR=593
-20	44469565	.	C	T	.	.	Sample=NA18549;GT=0/1;PCR_454_AR=999;PCR_454_RR=246
-20	44485866	.	T	A	.	.	Sample=NA12890;GT=0/1;PCR_454_AR=536;PCR_454_RR=596
-20	44506417	.	G	A	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=1320;PCR_454_RR=1305
-20	44506417	.	G	A	.	.	Sample=HG00118;GT=0/1;PCR_454_AR=1559;PCR_454_RR=1533
-20	44506417	.	G	A	.	.	Sample=HG00097;GT=1/1;PCR_454_AR=3211;PCR_454_RR=20
-20	44506417	.	G	A	.	.	Sample=HG00112;GT=1/1;PCR_454_AR=2632;PCR_454_RR=20
-20	44506417	.	G	A	.	.	Sample=HG00122;GT=1/1;PCR_454_AR=2875;PCR_454_RR=6
-20	44506987	.	G	C	.	.	Sample=NA19117;GT=0/1;PCR_454_AR=1387;PCR_454_RR=1532
-20	44511253	.	C	T	.	.	Sample=NA20799;GT=0/1;PCR_454_AR=1286;PCR_454_RR=1280
-20	44519372	.	G	A	.	.	Sample=NA19437;GT=0/0;PCR_454_AR=0;PCR_454_RR=2075
-20	44519372	.	G	A	.	.	Sample=NA19917;GT=0/1;PCR_454_AR=1243;PCR_454_RR=1234
-20	44576246	.	G	A	.	.	Sample=NA18912;GT=0/1;PCR_454_AR=458;PCR_454_RR=2154
-20	44576246	.	G	A	.	.	Sample=NA18924;GT=0/1;PCR_454_AR=1131;PCR_454_RR=1078
-20	44576246	.	G	A	.	.	Sample=NA20276;GT=0/1;PCR_454_AR=860;PCR_454_RR=852
-20	44576246	.	G	A	.	.	Sample=NA20289;GT=0/1;PCR_454_AR=492;PCR_454_RR=2174
-20	44580998	.	T	C	.	.	Sample=NA18566;GT=0/1;PCR_454_AR=877;PCR_454_RR=925
-20	44680318	.	C	G	.	.	Sample=HG00592;GT=0/0;PCR_454_AR=0;PCR_454_RR=3602
-20	44680318	.	C	G	.	.	Sample=HG01139;GT=0/0;PCR_454_AR=1;PCR_454_RR=3510
-20	44856207	.	G	A	.	.	Sample=NA11995;GT=0/1;PCR_454_AR=127;PCR_454_RR=17
-20	44980779	.	G	A	.	.	Sample=NA18553;GT=0/1;PCR_454_AR=993;PCR_454_RR=1022
-20	45919012	.	C	T	.	.	Sample=NA19445;GT=0/1;PCR_454_AR=265;PCR_454_RR=525
-20	46271051	.	C	G	.	.	Sample=NA18486;GT=0/1;PCR_454_AR=754;PCR_454_RR=749
-20	47262594	.	C	A	.	.	Sample=NA20291;GT=0/1;PCR_454_AR=1210;PCR_454_RR=1153
-20	47558430	.	C	T	.	.	Sample=NA20296;GT=0/1;PCR_454_AR=699;PCR_454_RR=682
-20	47733688	.	T	C	.	.	Sample=NA18630;GT=0/0;PCR_454_AR=0;PCR_454_RR=806
-20	47739668	.	G	A	.	.	Sample=NA19036;GT=0/0;PCR_454_AR=1;PCR_454_RR=2292
-20	47886859	.	C	T	.	.	Sample=NA18956;GT=0/0;PCR_454_AR=1;PCR_454_RR=2153
-20	47990798	.	C	G	.	.	Sample=HG00105;GT=0/0;PCR_454_AR=0;PCR_454_RR=387
-20	47990798	.	C	G	.	.	Sample=HG00122;GT=0/0;PCR_454_AR=0;PCR_454_RR=534
-20	48124475	.	C	T	.	.	Sample=NA19257;GT=0/1;PCR_454_AR=628;PCR_454_RR=644
-20	48273201	.	A	C	.	.	Sample=NA19914;GT=0/1;PCR_454_AR=338;PCR_454_RR=323
-20	48713355	.	T	C	.	.	Sample=NA12155;GT=0/0;PCR_454_AR=8;PCR_454_RR=1686
-20	48713355	.	T	C	.	.	Sample=NA12815;GT=0/0;PCR_454_AR=10;PCR_454_RR=1607
-20	49218698	.	C	T	.	.	Sample=NA19338;GT=0/1;PCR_454_AR=776;PCR_454_RR=682
-20	49218698	.	C	T	.	.	Sample=NA19457;GT=0/1;PCR_454_AR=803;PCR_454_RR=759
-20	49219065	.	C	T	.	.	Sample=NA18599;GT=0/1;PCR_454_AR=1018;PCR_454_RR=1080
-20	49354597	.	A	G	.	.	Sample=HG00177;GT=0/1;PCR_454_AR=580;PCR_454_RR=617
-20	49354597	.	A	G	.	.	Sample=NA11829;GT=0/1;PCR_454_AR=778;PCR_454_RR=869
-20	49354597	.	A	G	.	.	Sample=NA20510;GT=0/1;PCR_454_AR=518;PCR_454_RR=631
-20	49354597	.	A	G	.	.	Sample=NA20512;GT=0/1;PCR_454_AR=238;PCR_454_RR=333
-20	49354597	.	A	G	.	.	Sample=NA20586;GT=0/1;PCR_454_AR=562;PCR_454_RR=642
-20	50048925	.	G	C	.	.	Sample=NA20507;GT=0/1;PCR_454_AR=774;PCR_454_RR=809
-20	50051804	.	C	T	.	.	Sample=NA19102;GT=0/1;PCR_454_AR=136;PCR_454_RR=155
-20	50071136	.	C	T	.	.	Sample=NA18637;GT=0/1;PCR_454_AR=334;PCR_454_RR=349
-20	50140178	.	G	A	.	.	Sample=NA18924;GT=0/1;PCR_454_AR=540;PCR_454_RR=481
-20	50140178	.	G	A	.	.	Sample=NA19321;GT=0/1;PCR_454_AR=481;PCR_454_RR=652
-20	50235576	.	G	A	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=982;PCR_454_RR=886
-20	50235576	.	G	A	.	.	Sample=HG00122;GT=0/1;PCR_454_AR=838;PCR_454_RR=717
-20	50235576	.	G	A	.	.	Sample=HG00126;GT=0/1;PCR_454_AR=795;PCR_454_RR=769
-20	50235576	.	G	A	.	.	Sample=HG00135;GT=0/1;PCR_454_AR=972;PCR_454_RR=930
-20	50235576	.	G	A	.	.	Sample=HG00148;GT=0/1;PCR_454_AR=933;PCR_454_RR=931
-20	50310567	.	C	T	.	.	Sample=NA19152;GT=0/1;PCR_454_AR=689;PCR_454_RR=773
-20	50310567	.	C	T	.	.	Sample=NA19377;GT=0/1;PCR_454_AR=736;PCR_454_RR=683
-20	50406859	.	G	A	.	.	Sample=NA19921;GT=0/1;PCR_454_AR=1045;PCR_454_RR=930
-20	50407501	.	A	C	.	.	Sample=HG00118;GT=0/1;PCR_454_AR=569;PCR_454_RR=608
-20	50407508	.	C	T	.	.	Sample=NA20534;GT=0/1;PCR_454_AR=753;PCR_454_RR=2120
-20	50408613	.	A	G	.	.	Sample=NA18487;GT=0/1;PCR_454_AR=637;PCR_454_RR=634
-20	50408613	.	A	G	.	.	Sample=NA18502;GT=0/1;PCR_454_AR=561;PCR_454_RR=553
-20	50408613	.	A	G	.	.	Sample=NA18519;GT=0/1;PCR_454_AR=571;PCR_454_RR=554
-20	50408613	.	A	G	.	.	Sample=NA18908;GT=0/1;PCR_454_AR=731;PCR_454_RR=791
-20	50408613	.	A	G	.	.	Sample=NA18909;GT=0/1;PCR_454_AR=683;PCR_454_RR=634
-20	50803476	.	G	A	.	.	Sample=NA19046;GT=0/1;PCR_454_AR=692;PCR_454_RR=685
-20	50803476	.	G	A	.	.	Sample=NA19375;GT=0/1;PCR_454_AR=735;PCR_454_RR=803
-20	50803476	.	G	A	.	.	Sample=NA19376;GT=0/1;PCR_454_AR=892;PCR_454_RR=831
-20	51872037	.	G	A	.	.	Sample=NA18502;GT=0/1;PCR_454_AR=602;PCR_454_RR=654
-20	51872037	.	G	A	.	.	Sample=NA18504;GT=0/1;PCR_454_AR=717;PCR_454_RR=760
-20	51872037	.	G	A	.	.	Sample=NA18507;GT=0/1;PCR_454_AR=790;PCR_454_RR=822
-20	51872037	.	G	A	.	.	Sample=NA18508;GT=0/1;PCR_454_AR=868;PCR_454_RR=914
-20	51872037	.	G	A	.	.	Sample=NA18501;GT=1/1;PCR_454_AR=1687;PCR_454_RR=5
-20	52192483	.	T	C	.	.	Sample=HG00266;GT=0/1;PCR_454_AR=1044;PCR_454_RR=1029
-20	52198279	.	G	A	.	.	Sample=NA19065;GT=0/1;PCR_454_AR=1001;PCR_454_RR=1070
-20	52561468	.	A	G	.	.	Sample=HG00118;GT=0/1;PCR_454_AR=398;PCR_454_RR=501
-20	52561468	.	A	G	.	.	Sample=HG00126;GT=0/1;PCR_454_AR=228;PCR_454_RR=250
-20	52561468	.	A	G	.	.	Sample=HG00130;GT=0/1;PCR_454_AR=472;PCR_454_RR=535
-20	52561468	.	A	G	.	.	Sample=HG00134;GT=0/1;PCR_454_AR=462;PCR_454_RR=543
-20	52561468	.	A	G	.	.	Sample=HG00143;GT=0/1;PCR_454_AR=355;PCR_454_RR=404
-20	52779394	.	G	T	.	.	Sample=NA20540;GT=0/1;PCR_454_AR=470;PCR_454_RR=557
-20	53205268	.	T	C	.	.	Sample=NA19038;GT=0/1;PCR_454_AR=447;PCR_454_RR=421
-20	53226967	.	G	A	.	.	Sample=NA19462;GT=0/1;PCR_454_AR=770;PCR_454_RR=792
-20	54961540	.	A	T	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=457;PCR_454_RR=411
-20	54961540	.	A	T	.	.	Sample=HG00112;GT=0/1;PCR_454_AR=466;PCR_454_RR=483
-20	54961540	.	A	T	.	.	Sample=HG00134;GT=0/1;PCR_454_AR=480;PCR_454_RR=467
-20	54961540	.	A	T	.	.	Sample=HG00143;GT=0/1;PCR_454_AR=522;PCR_454_RR=458
-20	54961540	.	A	T	.	.	Sample=HG00097;GT=1/1;PCR_454_AR=937;PCR_454_RR=4
-20	54970682	.	C	T	.	.	Sample=NA18912;GT=0/1;PCR_454_AR=683;PCR_454_RR=745
-20	54970682	.	C	T	.	.	Sample=NA19171;GT=0/1;PCR_454_AR=819;PCR_454_RR=792
-20	55021021	.	G	A	.	.	Sample=NA19087;GT=0/1;PCR_454_AR=1018;PCR_454_RR=1144
-20	55108414	.	G	A	.	.	Sample=NA20756;GT=1/1;PCR_454_AR=1220;PCR_454_RR=3
-20	55206884	.	C	T	.	.	Sample=NA19726;GT=0/1;PCR_454_AR=806;PCR_454_RR=864
-20	55206884	.	C	T	.	.	Sample=NA19738;GT=0/1;PCR_454_AR=988;PCR_454_RR=1033
-20	56087684	.	C	T	.	.	Sample=NA18599;GT=0/1;PCR_454_AR=1158;PCR_454_RR=1234
-20	56089789	.	C	T	.	.	Sample=HG01277;GT=0/1;PCR_454_AR=737;PCR_454_RR=779
-20	56137833	.	A	G	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=794;PCR_454_RR=777
-20	56137833	.	A	G	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=1272;PCR_454_RR=1196
-20	56137833	.	A	G	.	.	Sample=HG00097;GT=1/1;PCR_454_AR=1763;PCR_454_RR=4
-20	56137833	.	A	G	.	.	Sample=HG00104;GT=1/1;PCR_454_AR=1726;PCR_454_RR=5
-20	56137833	.	A	G	.	.	Sample=HG00112;GT=1/1;PCR_454_AR=1821;PCR_454_RR=3
-20	57036354	.	C	T	.	.	Sample=NA19080;GT=0/1;PCR_454_AR=1722;PCR_454_RR=1581
-20	57036538	.	C	T	.	.	Sample=NA19248;GT=0/1;PCR_454_AR=1224;PCR_454_RR=902
-20	57415535	.	C	T	.	.	Sample=NA19722;GT=0/1;PCR_454_AR=291;PCR_454_RR=1503
-20	57415601	.	G	A	.	.	Sample=NA20296;GT=0/1;PCR_454_AR=1262;PCR_454_RR=350
-20	57428947	.	G	T	.	.	Sample=NA19311;GT=0/1;PCR_454_AR=1304;PCR_454_RR=553
-20	57572729	.	C	T	.	.	Sample=NA19707;GT=0/1;PCR_454_AR=840;PCR_454_RR=1015
-20	57576684	.	T	G	.	.	Sample=NA18747;GT=0/0;PCR_454_AR=3;PCR_454_RR=1578
-20	57597952	.	C	T	.	.	Sample=NA20529;GT=0/1;PCR_454_AR=816;PCR_454_RR=883
-20	57768304	.	G	A	.	.	Sample=NA20818;GT=0/1;PCR_454_AR=710;PCR_454_RR=535
-20	57769546	.	C	T	.	.	Sample=NA18917;GT=0/0;PCR_454_AR=61;PCR_454_RR=810
-20	57769738	.	A	G	.	.	Sample=NA18527;GT=0/1;PCR_454_AR=799;PCR_454_RR=792
-20	57769738	.	A	G	.	.	Sample=NA18530;GT=0/1;PCR_454_AR=558;PCR_454_RR=527
-20	57769738	.	A	G	.	.	Sample=NA18532;GT=0/1;PCR_454_AR=734;PCR_454_RR=719
-20	57769738	.	A	G	.	.	Sample=NA18545;GT=0/1;PCR_454_AR=524;PCR_454_RR=502
-20	57769738	.	A	G	.	.	Sample=NA18593;GT=0/1;PCR_454_AR=809;PCR_454_RR=835
-20	58444902	.	C	T	.	.	Sample=NA19095;GT=0/1;PCR_454_AR=164;PCR_454_RR=144
-20	58467100	.	C	T	.	.	Sample=NA19324;GT=0/1;PCR_454_AR=312;PCR_454_RR=301
-20	58560056	.	C	T	.	.	Sample=HG00593;GT=0/1;PCR_454_AR=1491;PCR_454_RR=1378
-20	58560056	.	C	T	.	.	Sample=NA18553;GT=0/1;PCR_454_AR=1226;PCR_454_RR=1216
-20	58564005	.	G	A	.	.	Sample=NA19355;GT=0/0;PCR_454_AR=0;PCR_454_RR=2602
-20	58567458	.	A	C	.	.	Sample=HG00143;GT=0/0;PCR_454_AR=1;PCR_454_RR=878
-20	58567458	.	A	C	.	.	Sample=HG00149;GT=0/0;PCR_454_AR=0;PCR_454_RR=883
-20	58571705	.	C	T	.	.	Sample=NA19319;GT=0/1;PCR_454_AR=342;PCR_454_RR=265
-20	60504808	.	C	T	.	.	Sample=NA18639;GT=0/1;PCR_454_AR=1079;PCR_454_RR=1027
-20	60504808	.	C	T	.	.	Sample=NA19921;GT=0/1;PCR_454_AR=914;PCR_454_RR=890
-20	60701482	.	T	A	.	.	Sample=NA19651;GT=0/1;PCR_454_AR=540;PCR_454_RR=612
-20	60708462	.	T	C	.	.	Sample=NA18962;GT=0/1;PCR_454_AR=891;PCR_454_RR=784
-20	60738559	.	G	A	.	.	Sample=NA18965;GT=0/1;PCR_454_AR=1072;PCR_454_RR=896
-20	60838713	.	C	T	.	.	Sample=NA20506;GT=0/1;PCR_454_AR=618;PCR_454_RR=642
-20	60866830	.	A	C	.	.	Sample=NA18923;GT=0/0;PCR_454_AR=0;PCR_454_RR=211
-20	60868936	.	C	T	.	.	Sample=NA19119;GT=0/1;PCR_454_AR=1424;PCR_454_RR=1554
-20	60878814	.	G	A	.	.	Sample=NA18638;GT=0/1;PCR_454_AR=223;PCR_454_RR=1299
-20	60884465	.	G	A	.	.	Sample=NA19681;GT=0/1;PCR_454_AR=928;PCR_454_RR=1002
-20	60885810	.	C	T	.	.	Sample=HG00134;GT=0/0;PCR_454_AR=2;PCR_454_RR=2017
-20	60885810	.	C	T	.	.	Sample=HG00350;GT=0/0;PCR_454_AR=4;PCR_454_RR=1963
-20	60886712	.	T	C	.	.	Sample=NA19438;GT=0/1;PCR_454_AR=929;PCR_454_RR=721
-20	60891010	.	C	T	.	.	Sample=NA19700;GT=0/1;PCR_454_AR=334;PCR_454_RR=389
-20	60893610	.	C	T	.	.	Sample=HG00359;GT=0/0;PCR_454_AR=2;PCR_454_RR=2041
-20	60893610	.	C	T	.	.	Sample=NA19758;GT=0/1;PCR_454_AR=1173;PCR_454_RR=1158
-20	60893636	.	C	T	.	.	Sample=NA20520;GT=0/1;PCR_454_AR=847;PCR_454_RR=1197
-20	60893636	.	C	T	.	.	Sample=NA20540;GT=0/1;PCR_454_AR=776;PCR_454_RR=1355
-20	60893960	.	C	T	.	.	Sample=NA19236;GT=0/1;PCR_454_AR=1310;PCR_454_RR=1388
-20	60897486	.	C	T	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=454;PCR_454_RR=403
-20	60897486	.	C	T	.	.	Sample=HG00122;GT=0/1;PCR_454_AR=465;PCR_454_RR=352
-20	60897486	.	C	T	.	.	Sample=HG00097;GT=1/1;PCR_454_AR=849;PCR_454_RR=3
-20	60897486	.	C	T	.	.	Sample=HG00104;GT=1/1;PCR_454_AR=925;PCR_454_RR=4
-20	60897486	.	C	T	.	.	Sample=HG00118;GT=1/1;PCR_454_AR=799;PCR_454_RR=7
-20	60907674	.	G	A	.	.	Sample=HG00104;GT=0/1;PCR_454_AR=279;PCR_454_RR=228
-20	60907674	.	G	A	.	.	Sample=HG00106;GT=0/1;PCR_454_AR=334;PCR_454_RR=295
-20	60907674	.	G	A	.	.	Sample=HG00097;GT=1/1;PCR_454_AR=739;PCR_454_RR=4
-20	60907674	.	G	A	.	.	Sample=HG00099;GT=1/1;PCR_454_AR=395;PCR_454_RR=3
-20	60907674	.	G	A	.	.	Sample=HG00112;GT=1/1;PCR_454_AR=980;PCR_454_RR=6
-20	60911433	.	A	C	.	.	Sample=NA11920;GT=0/1;PCR_454_AR=341;PCR_454_RR=380
-20	60911433	.	A	C	.	.	Sample=NA20278;GT=0/1;PCR_454_AR=398;PCR_454_RR=444
-20	60913173	.	C	T	.	.	Sample=NA18522;GT=0/1;PCR_454_AR=1062;PCR_454_RR=1032
-20	60920914	.	T	C	.	.	Sample=NA18530;GT=0/1;PCR_454_AR=937;PCR_454_RR=877
-20	60920914	.	T	C	.	.	Sample=NA18873;GT=0/1;PCR_454_AR=791;PCR_454_RR=836
-20	60920914	.	T	C	.	.	Sample=NA19038;GT=0/1;PCR_454_AR=895;PCR_454_RR=857
-20	60920914	.	T	C	.	.	Sample=NA19099;GT=0/1;PCR_454_AR=1115;PCR_454_RR=1150
-20	60920914	.	T	C	.	.	Sample=NA19317;GT=0/1;PCR_454_AR=1165;PCR_454_RR=1206
-20	60927411	.	G	A	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=330;PCR_454_RR=345
-20	60927411	.	G	A	.	.	Sample=HG00112;GT=0/1;PCR_454_AR=389;PCR_454_RR=468
-20	60927411	.	G	A	.	.	Sample=HG00118;GT=0/1;PCR_454_AR=1434;PCR_454_RR=538
-20	60927411	.	G	A	.	.	Sample=HG00097;GT=1/1;PCR_454_AR=993;PCR_454_RR=7
-20	60927411	.	G	A	.	.	Sample=HG00104;GT=1/1;PCR_454_AR=837;PCR_454_RR=8
-20	60937543	.	A	G	.	.	Sample=HG00115;GT=0/0;PCR_454_AR=2;PCR_454_RR=3444
-20	60963387	.	C	T	.	.	Sample=NA18992;GT=0/1;PCR_454_AR=689;PCR_454_RR=728
-20	60986026	.	T	C	.	.	Sample=NA18511;GT=0/1;PCR_454_AR=510;PCR_454_RR=522
-20	60986026	.	T	C	.	.	Sample=NA18520;GT=0/1;PCR_454_AR=384;PCR_454_RR=403
-20	60986026	.	T	C	.	.	Sample=NA18861;GT=0/1;PCR_454_AR=372;PCR_454_RR=432
-20	60986026	.	T	C	.	.	Sample=NA18908;GT=0/1;PCR_454_AR=428;PCR_454_RR=386
-20	60989186	.	G	T	.	.	Sample=HG00351;GT=0/0;PCR_454_AR=0;PCR_454_RR=299
-20	60989186	.	G	T	.	.	Sample=HG00099;GT=0/1;PCR_454_AR=1182;PCR_454_RR=966
-20	60989186	.	G	T	.	.	Sample=HG01344;GT=0/1;PCR_454_AR=654;PCR_454_RR=302
-20	60989186	.	G	T	.	.	Sample=NA12045;GT=0/1;PCR_454_AR=504;PCR_454_RR=534
-20	60989186	.	G	T	.	.	Sample=HG00130;GT=1/1;PCR_454_AR=76;PCR_454_RR=2
-20	60992370	.	C	T	.	.	Sample=NA18917;GT=0/1;PCR_454_AR=598;PCR_454_RR=363
-20	60992370	.	C	T	.	.	Sample=NA19453;GT=0/1;PCR_454_AR=541;PCR_454_RR=677
-20	61288592	.	G	A	.	.	Sample=HG01625;GT=0/1;PCR_454_AR=852;PCR_454_RR=871
-20	61288592	.	G	A	.	.	Sample=NA12383;GT=0/1;PCR_454_AR=794;PCR_454_RR=737
-20	61288592	.	G	A	.	.	Sample=NA19780;GT=0/1;PCR_454_AR=1012;PCR_454_RR=880
-20	61288592	.	G	A	.	.	Sample=NA20508;GT=0/1;PCR_454_AR=913;PCR_454_RR=773
-20	61512157	.	C	T	.	.	Sample=NA18933;GT=0/1;PCR_454_AR=1227;PCR_454_RR=1206
-20	61512157	.	C	T	.	.	Sample=NA18934;GT=0/1;PCR_454_AR=1110;PCR_454_RR=1182
-20	61512157	.	C	T	.	.	Sample=NA19771;GT=0/1;PCR_454_AR=1250;PCR_454_RR=1148
-20	61512982	.	T	A	.	.	Sample=NA18559;GT=0/1;PCR_454_AR=1255;PCR_454_RR=1117
-20	61513433	.	T	C	.	.	Sample=NA20810;GT=0/0;PCR_454_AR=1;PCR_454_RR=550
-20	61525226	.	G	A	.	.	Sample=NA19428;GT=0/1;PCR_454_AR=719;PCR_454_RR=719
-20	61542496	.	G	C	.	.	Sample=NA19648;GT=0/1;PCR_454_AR=237;PCR_454_RR=1305
-20	61574860	.	C	T	.	.	Sample=NA19762;GT=0/1;PCR_454_AR=703;PCR_454_RR=488
-20	61591950	.	T	G	.	.	Sample=HG00106;GT=0/0;PCR_454_AR=2;PCR_454_RR=1219
-20	61591950	.	T	G	.	.	Sample=HG00122;GT=0/0;PCR_454_AR=0;PCR_454_RR=1227
-20	61833992	.	G	A	.	.	Sample=NA18489;GT=0/1;PCR_454_AR=738;PCR_454_RR=786
-20	61833992	.	G	A	.	.	Sample=NA19093;GT=0/1;PCR_454_AR=839;PCR_454_RR=739
-20	61834856	.	G	A	.	.	Sample=NA19041;GT=0/1;PCR_454_AR=389;PCR_454_RR=374
-20	61834856	.	G	A	.	.	Sample=NA19095;GT=0/1;PCR_454_AR=383;PCR_454_RR=364
-20	61834856	.	G	A	.	.	Sample=NA19113;GT=0/1;PCR_454_AR=322;PCR_454_RR=325
-20	61834856	.	G	A	.	.	Sample=NA19318;GT=0/1;PCR_454_AR=434;PCR_454_RR=399
-20	61834856	.	G	A	.	.	Sample=NA19334;GT=0/1;PCR_454_AR=380;PCR_454_RR=343
-20	61943307	.	G	C	.	.	Sample=NA19201;GT=0/1;PCR_454_AR=920;PCR_454_RR=890
-20	61943346	.	G	A	.	.	Sample=NA19758;GT=0/1;PCR_454_AR=683;PCR_454_RR=705
-20	62187372	.	C	G	.	.	Sample=NA19117;GT=0/0;PCR_454_AR=0;PCR_454_RR=963
-20	62187668	.	C	T	.	.	Sample=NA12154;GT=0/1;PCR_454_AR=905;PCR_454_RR=664
-20	62194106	.	C	T	.	.	Sample=NA18910;GT=0/1;PCR_454_AR=1083;PCR_454_RR=1040
-20	62194106	.	C	T	.	.	Sample=NA19338;GT=0/1;PCR_454_AR=784;PCR_454_RR=854
-20	62194106	.	C	T	.	.	Sample=NA19346;GT=0/1;PCR_454_AR=757;PCR_454_RR=817
-20	62194106	.	C	T	.	.	Sample=NA19376;GT=0/1;PCR_454_AR=1152;PCR_454_RR=962
-20	62194106	.	C	T	.	.	Sample=NA19439;GT=0/1;PCR_454_AR=1387;PCR_454_RR=1456
-20	62194211	.	C	A	.	.	Sample=HG00156;GT=0/1;PCR_454_AR=1116;PCR_454_RR=536
-20	62194211	.	C	A	.	.	Sample=NA07051;GT=0/1;PCR_454_AR=2089;PCR_454_RR=259
-20	62194211	.	C	A	.	.	Sample=NA12003;GT=0/1;PCR_454_AR=1330;PCR_454_RR=796
-20	62194290	.	C	T	.	.	Sample=NA19346;GT=0/1;PCR_454_AR=1000;PCR_454_RR=751
-20	62194290	.	C	T	.	.	Sample=NA19351;GT=0/1;PCR_454_AR=901;PCR_454_RR=771
-20	62198552	.	G	C	.	.	Sample=NA20542;GT=0/1;PCR_454_AR=1527;PCR_454_RR=1010
-20	62198883	.	C	T	.	.	Sample=NA19346;GT=0/1;PCR_454_AR=1447;PCR_454_RR=1455
-20	62198883	.	C	T	.	.	Sample=NA19351;GT=0/1;PCR_454_AR=903;PCR_454_RR=1401
-20	62198883	.	C	T	.	.	Sample=NA20340;GT=0/1;PCR_454_AR=843;PCR_454_RR=892
-20	62198960	.	G	A	.	.	Sample=NA20534;GT=0/1;PCR_454_AR=1223;PCR_454_RR=864
-20	62200240	.	G	A	.	.	Sample=NA18910;GT=0/1;PCR_454_AR=1221;PCR_454_RR=1347
-20	62226984	.	G	C	.	.	Sample=HG00559;GT=0/0;PCR_454_AR=2;PCR_454_RR=1774
-20	62226984	.	G	C	.	.	Sample=NA12003;GT=0/0;PCR_454_AR=1;PCR_454_RR=1871
-20	62250734	.	C	T	.	.	Sample=NA19473;GT=0/1;PCR_454_AR=607;PCR_454_RR=722
-20	62297382	.	A	T	.	.	Sample=NA11993;GT=0/0;PCR_454_AR=3;PCR_454_RR=2573
-20	62297382	.	A	T	.	.	Sample=NA19117;GT=0/0;PCR_454_AR=5;PCR_454_RR=1753
-20	62305427	.	G	A	.	.	Sample=HG00104;GT=0/0;PCR_454_AR=10;PCR_454_RR=803
-20	62305427	.	G	A	.	.	Sample=HG00122;GT=0/0;PCR_454_AR=28;PCR_454_RR=1300
-20	62319912	.	G	T	.	.	Sample=HG00128;GT=0/0;PCR_454_AR=1;PCR_454_RR=1911
-20	62319912	.	G	T	.	.	Sample=HG00560;GT=0/0;PCR_454_AR=0;PCR_454_RR=2111
-20	62324258	.	C	G	.	.	Sample=NA18562;GT=0/1;PCR_454_AR=1126;PCR_454_RR=1126
-20	62324622	.	C	G	.	.	Sample=NA18574;GT=0/1;PCR_454_AR=1153;PCR_454_RR=1158
-20	62325731	.	G	A	.	.	Sample=NA18548;GT=0/1;PCR_454_AR=779;PCR_454_RR=2199
-20	62325821	.	G	A	.	.	Sample=NA20278;GT=0/1;PCR_454_AR=819;PCR_454_RR=764
-20	62325821	.	G	A	.	.	Sample=NA20507;GT=0/1;PCR_454_AR=1163;PCR_454_RR=1060
-20	62326150	.	G	A	.	.	Sample=NA18870;GT=0/1;PCR_454_AR=1080;PCR_454_RR=892
-20	62326234	.	C	T	.	.	Sample=HG00128;GT=0/0;PCR_454_AR=0;PCR_454_RR=761
-20	62326234	.	C	T	.	.	Sample=HG00179;GT=0/0;PCR_454_AR=1;PCR_454_RR=1158
-20	62326811	.	G	T	.	.	Sample=HG00149;GT=0/0;PCR_454_AR=0;PCR_454_RR=1467
-20	62326811	.	G	T	.	.	Sample=HG00151;GT=0/0;PCR_454_AR=1;PCR_454_RR=1492
-20	62407154	.	C	T	.	.	Sample=NA18987;GT=0/0;PCR_454_AR=181;PCR_454_RR=2041
-20	62421536	.	C	T	.	.	Sample=NA20521;GT=0/1;PCR_454_AR=856;PCR_454_RR=910
-20	62421536	.	C	T	.	.	Sample=NA20543;GT=0/1;PCR_454_AR=865;PCR_454_RR=854
-20	62593676	.	C	T	.	.	Sample=NA20291;GT=0/1;PCR_454_AR=1038;PCR_454_RR=995
-20	62594479	.	C	T	.	.	Sample=NA19746;GT=0/1;PCR_454_AR=349;PCR_454_RR=347
-20	62595981	.	C	T	.	.	Sample=NA19172;GT=0/1;PCR_454_AR=440;PCR_454_RR=415
-20	62630426	.	C	T	.	.	Sample=NA19428;GT=0/1;PCR_454_AR=1246;PCR_454_RR=1277
-20	62632542	.	C	T	.	.	Sample=NA18501;GT=0/1;PCR_454_AR=1203;PCR_454_RR=1150
-20	62657404	.	C	T	.	.	Sample=NA18612;GT=0/1;PCR_454_AR=1480;PCR_454_RR=1071
-20	62700725	.	G	A	.	.	Sample=NA19020;GT=0/1;PCR_454_AR=832;PCR_454_RR=815
-20	62700725	.	G	A	.	.	Sample=NA19036;GT=0/1;PCR_454_AR=1024;PCR_454_RR=966
-20	62729481	.	C	T	.	.	Sample=NA20276;GT=0/1;PCR_454_AR=401;PCR_454_RR=408
-20	62899302	.	T	C	.	.	Sample=HG00104;GT=0/0;PCR_454_AR=10;PCR_454_RR=871
-20	62899302	.	T	C	.	.	Sample=HG00128;GT=0/0;PCR_454_AR=2;PCR_454_RR=950
diff --git a/tests/vcf-examples/3.vcf b/tests/vcf-examples/3.vcf
deleted file mode 100644
index a3f2e0f..0000000
--- a/tests/vcf-examples/3.vcf
+++ /dev/null
@@ -1,1000 +0,0 @@
-##fileformat=VCFv4.0
-##filedate=2010-06-21
-##reference=NCBI36
-##INFO=<ID=GC, Number=0, Type=Flag, Description="Overlap with Gencode CCDS coding sequence">
-##INFO=<ID=DP, Number=1, Type=Integer, Description="Total number of reads in haplotype window">
-##INFO=<ID=AF, Number=1, Type=Float, Description="Dindel estimated population allele frequency">
-##INFO=<ID=CA, Number=1, Type=String, Description="Pilot 1 callability mask">
-##INFO=<ID=HP, Number=1, Type=Integer, Description="Reference homopolymer tract length">
-##INFO=<ID=NS, Number=1, Type=Integer, Description="Number of samples with data">
-##INFO=<ID=DB, Number=0, Type=Flag, Description="dbSNP membership build 129 - type match and indel sequence length match within 25 bp">
-##INFO=<ID=NR, Number=1, Type=Integer, Description="Number of reads covering non-ref variant on reverse strand">
-##INFO=<ID=NF, Number=1, Type=Integer, Description="Number of reads covering non-ref variant on forward strand">
-##FILTER=<ID=NoQCALL, Description="Variant called by Dindel but not confirmed by QCALL">
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
-1	1000153	.	TCACAC	TC	100	PASS	AF=0.115095;HP=1;NF=16;NR=13;NS=52;CA=0;DP=615
-1	1000906	.	CAG	CG	48	PASS	AF=0.0772696;HP=1;NF=2;NR=9;NS=51;CA=0;DP=281
-1	1000950	rs60561655;-/G	CGG	CG	100	PASS	AF=0.447771;HP=5;DB;NF=10;NR=20;NS=50;CA=M;DP=291
-1	1010786	rs36095298;-/G,mills,venter	AC	AGC	100	PASS	AF=0.774334;HP=1;DB;NF=21;NR=27;NS=51;CA=0;DP=306
-1	1026158	.	TG	TGGGGGG	100	PASS	AF=0.115637;HP=1;NF=5;NR=2;NS=52;CA=0;DP=591
-1	1028860	mills,venter	ACTCC	AC	10	PASS	AF=0.0107751;HP=1;NF=5;NR=4;NS=52;CA=0;DP=522
-1	1040517	.	CA	CAA	100	PASS	AF=0.0577672;HP=1;NF=7;NR=4;NS=52;CA=0;DP=426
-1	1043690	rs5772037;-/G,venter	TG	TGG	100	PASS	AF=0.065857;HP=3;DB;NF=5;NR=8;NS=51;CA=0;DP=427
-1	1049375	.	TA	TACACACCTGAGCACACACACCTGTGCA	100	PASS	AF=0.0808078;HP=1;NF=1;NR=1;NS=51;CA=M;DP=643
-1	1055459	venter	ACC	AC	100	PASS	AF=0.936429;HP=2;NF=13;NR=24;NS=51;CA=M;DP=342
-1	1056251	rs34287831;-/A,venter	CT	CTT	100	PASS	AF=0.725164;HP=1;DB;NF=31;NR=20;NS=52;CA=0;DP=375
-1	1057459	rs55853944;-/AG,venter	CAGG	CG	100	PASS	AF=0.525146;HP=1;DB;NF=16;NR=18;NS=51;CA=0;DP=331
-1	1057537	rs35574593;-/CC,watson	TG	TGGG	100	PASS	AF=0.591248;HP=1;DB;NF=30;NR=12;NS=50;CA=0;DP=341
-1	1058532	rs34990026;-/A	GTT	GT	100	PASS	AF=0.702381;HP=4;DB;NF=29;NR=32;NS=52;CA=0;DP=405
-1	1058695	rs56086046;-/GCCTGCCTGCCCGGCC,watson	CGCCGCCTGCCTGCCCGG	CG	100	PASS	AF=0.601284;HP=1;DB;NF=24;NR=23;NS=51;CA=0;DP=365
-1	1073880	.	AC	ACC	13	PASS	AF=0.0555821;HP=2;NF=1;NR=6;NS=52;CA=0;DP=457
-1	1087270	mills,venter,watson	CCCCAC	CC	100	PASS	AF=0.990156;HP=4;NF=32;NR=27;NS=50;CA=0;DP=339
-1	1088683	rs5772039;-/C,venter	TCC	TC	100	PASS	AF=0.957928;HP=9;DB;NF=31;NR=26;NS=49;CA=0;DP=336
-1	1093553	.	TC	TCAC	100	PASS	AF=0.962343;HP=5;NF=44;NR=17;NS=51;CA=0;DP=324
-1	1111698	rs57346441;-/TG,watson	CA	CTGA	100	PASS	AF=0.0986662;HP=1;DB;NF=8;NR=5;NS=52;CA=0;DP=528
-1	1117471	.	GT	GTT	48	PASS	AF=0.04843;HP=6;NF=20;NR=8;NS=52;CA=0;DP=510
-1	1118641	.	CT	CTTAT	38	PASS	AF=0.0574453;HP=1;NF=5;NR=1;NS=51;CA=0;DP=424
-1	1119225	rs60117456;-/C	AC	ACC	50	PASS	AF=0.0255886;HP=4;DB;NF=8;NR=5;NS=52;CA=0;DP=522
-1	1121774	.	GCTGTTCAGACCTG	GG	100	PASS	AF=0.0749767;HP=1;NF=6;NR=6;NS=51;CA=0;DP=508
-1	1123178	.	AACA	AA	14	PASS	AF=0.0195065;HP=3;NF=2;NR=3;NS=49;CA=0;DP=329
-1	1134362	.	GGAG	GG	100	PASS	AF=0.142028;HP=2;NF=12;NR=17;NS=51;CA=0;DP=407
-1	1140087	.	TCA	TA	19	PASS	AF=0.0635822;HP=1;NF=2;NR=5;NS=51;CA=0;DP=446
-1	1141951	.	CTG	CG	100	PASS	AF=0.100135;HP=1;NF=7;NR=7;NS=52;CA=0;DP=463
-1	1148304	rs34808371;-/GT,venter	GCAC	GC	100	PASS	AF=0.0786699;HP=1;DB;NF=11;NR=18;NS=52;CA=0;DP=687
-1	1148425	rs57524763;-/AC	AACA	AA	100	PASS	AF=0.0744913;HP=2;DB;NF=17;NR=8;NS=51;CA=0;DP=647
-1	1149524	.	GTTTTAT	GT	100	PASS	AF=0.0475567;HP=4;NF=19;NR=14;NS=50;CA=0;DP=395
-1	1150963	.	CGCCACAGACACGGGCCACACACTCCACATG	CG	100	PASS	AF=0.111384;HP=1;NF=46;NR=28;NS=50;CA=0;DP=510
-1	1151863	.	GT	GCT	100	PASS	AF=0.126132;HP=1;NF=8;NR=7;NS=52;CA=0;DP=416
-1	1153674	rs3831195;-/ACAG	GG	GGACAG	18	PASS	AF=0.0388728;HP=2;DB;NF=3;NR=2;NS=51;CA=0;DP=418
-1	1154612	.	GT	GCT	100	PASS	AF=0.0630518;HP=1;NF=7;NR=4;NS=52;CA=0;DP=531
-1	1155143	.	GCAC	GC	100	PASS	AF=0.0991605;HP=1;NF=25;NR=23;NS=52;CA=0;DP=540
-1	1155183	.	CATG	CG	100	PASS	AF=0.0714383;HP=1;NF=5;NR=8;NS=52;CA=0;DP=527
-1	1156953	rs57672822;-/ACCCCGGGA	CCCCCGGGAAC	CC	59	PASS	AF=0.0847102;HP=5;DB;NF=5;NR=8;NS=50;CA=0;DP=312
-1	1164370	.	AA	AACATGCATCCA	100	PASS	AF=0.0550752;HP=2;NF=2;NR=1;NS=51;CA=0;DP=481
-1	1166826	.	AC	ACC	11	PASS	AF=0.0735648;HP=1;NF=1;NR=10;NS=52;CA=0;DP=379
-1	1167781	rs3835300;-/T	CTG	CG	100	PASS	AF=0.0719128;HP=1;DB;NF=3;NR=3;NS=50;CA=0;DP=360
-1	1180776	rs35025185;-/T,mills	CTT	CT	15	PASS	AF=0.0182173;HP=3;DB;NF=5;NR=1;NS=52;CA=0;DP=526
-1	1184391	.	GC	GCAC	16	PASS	AF=0.0187867;HP=1;NF=2;NR=6;NS=51;CA=M;DP=521
-1	1204971	.	TGG	TG	100	PASS	AF=0.0564084;HP=6;NF=11;NR=6;NS=50;CA=0;DP=419
-1	1207801	rs35647244;-/GT,watson	CC	CCAC	100	PASS	AF=0.034013;HP=2;DB;NF=9;NR=4;NS=52;CA=0;DP=624
-1	1213486	.	GTCT	GT	100	PASS	AF=0.504039;HP=1;NF=9;NR=5;NS=50;CA=M;DP=372
-1	1217527	rs3831920;-/CTCA,watson	TTGAGT	TT	100	PASS	AF=0.098042;HP=2;DB;NF=11;NR=14;NS=51;CA=0;DP=444
-1	1224625	.	AGG	AG	40	PASS	AF=0.0395551;HP=5;NF=4;NR=4;NS=51;CA=0;DP=406
-1	1228918	rs35156558;-/GGA,venter	CC	CCCTC	100	PASS	AF=0.999996;HP=5;DB;NF=24;NR=30;NS=49;CA=0;DP=268
-1	1232491	.	CTACCTGACCTTC	CC	13	PASS	AF=0.0510512;HP=1;NF=5;NR=5;NS=52;CA=0;DP=510
-1	1236119	.	CGGCTCTGGGTCACAGGTG	CG	17	PASS	AF=0.0581287;HP=2;NF=6;NR=8;NS=49;CA=M;DP=277
-1	1245266	rs5772041;-/G,venter	TGG	TG	100	PASS	AF=0.928175;HP=4;DB;NF=39;NR=39;NS=52;CA=0;DP=431
-1	1286232	venter,watson	GACA	GA	100	PASS	AF=0.878082;HP=1;NF=31;NR=15;NS=50;CA=0;DP=249
-1	1292184	watson	TG	TGTGTGCAG	100	PASS	AF=0.92351;HP=1;NF=36;NR=17;NS=51;CA=0;DP=633
-1	1475307	rs35008066;-/G,venter	GCC	GC	59	PASS	AF=0.0854422;HP=2;DB;NF=2;NR=3;NS=52;CA=0;DP=372
-1	1476800	rs3835461;-/C	AG	AGG	100	PASS	AF=0.239098;HP=1;DB;NF=13;NR=18;NS=52;CA=0;DP=491
-1	1482738	rs34962853;-/AT,watson	CATA	CA	100	PASS	AF=0.1747;HP=1;DB;NF=28;NR=14;NS=51;CA=0;DP=441
-1	1483969	rs3835460;-/T,mills	CG	CAG	100	PASS	AF=0.180671;HP=5;DB;NF=6;NR=13;NS=52;CA=0;DP=512
-1	1484993	rs35384209;-/CT	CA	CAGA	100	PASS	AF=0.182804;HP=1;DB;NF=9;NR=15;NS=52;CA=0;DP=441
-1	1485720	.	TC	TCGTAC	39	PASS	AF=0.0207216;HP=1;NF=1;NR=3;NS=51;CA=0;DP=498
-1	1487504	rs35885836;-/AGAA,venter,watson	TTTTCT	TT	100	PASS	AF=0.210263;HP=4;DB;NF=16;NR=20;NS=52;CA=0;DP=574
-1	1490348	rs3835459;-/CATGATCCGCCTGCCTT	CAAGGCAGGCGGATCATGA	CA	59	PASS	AF=0.230233;HP=2;DB;NF=5;NR=66;NS=51;CA=M;DP=377
-1	1490873	.	GT	GGGCCCGACGGTGCT	100	PASS	AF=0.133846;HP=1;NF=8;NR=3;NS=52;CA=0;DP=572
-1	1495811	venter	ACC	AC	100	PASS	AF=0.232263;HP=8;NF=12;NR=29;NS=52;CA=0;DP=481
-1	1502734	rs35576478;-/G,venter	AC	ACC	100	PASS	AF=0.221604;HP=4;DB;NF=16;NR=9;NS=51;CA=0;DP=388
-1	1507556	.	AC	ACC	42	PASS	AF=0.0176775;HP=1;NF=1;NR=4;NS=51;CA=0;DP=511
-1	1508235	.	CT	CTT	100	PASS	AF=0.2555;HP=1;NF=18;NR=15;NS=51;CA=0;DP=535
-1	1508689	.	CG	CGG	100	PASS	AF=0.0922424;HP=5;NF=19;NR=17;NS=51;CA=0;DP=568
-1	1510533	.	TTTTGT	TT	100	PASS	AF=0.423696;HP=7;NF=37;NR=39;NS=52;CA=0;DP=387
-1	1511216	.	TA	TAATAATAATAAAA	39	PASS	AF=0.542394;HP=2;NF=7;NR=3;NS=51;CA=0;DP=331
-1	1512041	.	CAAAAGTAAA	CA	33	PASS	AF=0.0333379;HP=4;NF=12;NR=13;NS=52;CA=0;DP=440
-1	1514403	.	TTTTAT	TT	100	PASS	AF=0.771875;HP=5;NF=24;NR=58;NS=50;CA=0;DP=243
-1	1520133	rs34595829;-/GT,venter	GA	GACA	100	PASS	AF=0.432871;HP=1;DB;NF=24;NR=19;NS=52;CA=0;DP=966
-1	1520238	venter,watson	TG	TGAGACAG	100	PASS	AF=0.606404;HP=1;NF=52;NR=36;NS=52;CA=M;DP=847
-1	1520271	.	CA	CAGA	100	PASS	AF=0.169509;HP=1;NF=48;NR=39;NS=52;CA=M;DP=736
-1	1520357	.	CAGAGAGA	CA	100	PASS	AF=0.218715;HP=1;NF=44;NR=30;NS=52;CA=M;DP=708
-1	1520549	.	CAGA	CA	100	PASS	AF=0.257166;HP=1;NF=41;NR=40;NS=52;CA=0;DP=790
-1	1520595	.	CAGA	CA	100	PASS	AF=0.107822;HP=1;NF=52;NR=44;NS=52;CA=M;DP=804
-1	1520983	.	GA	GAGAGAGACA	34	PASS	AF=0.0372679;HP=1;NF=2;NR=3;NS=52;CA=0;DP=610
-1	1521139	.	GA	GAGACA	100	PASS	AF=0.667375;HP=1;NF=10;NR=7;NS=52;CA=M;DP=537
-1	1521387	.	GAGACA	GA	100	PASS	AF=0.361313;HP=1;NF=13;NR=34;NS=52;CA=M;DP=598
-1	1521833	.	GACA	GA	100	PASS	AF=0.193306;HP=1;NF=23;NR=17;NS=52;CA=0;DP=737
-1	1522371	.	CC	CCCTCAGCTGGACTC	100	PASS	AF=0.480499;HP=3;NF=11;NR=12;NS=51;CA=0;DP=535
-1	1530305	.	AG	AGG	15	PASS	AF=0.0737746;HP=3;NF=13;NR=4;NS=51;CA=0;DP=569
-1	1536491	rs36101309;-/GA	ATCT	AT	100	PASS	AF=0.128408;HP=1;DB;NF=22;NR=14;NS=51;CA=0;DP=621
-1	1537805	venter	TT	TCT	100	PASS	AF=0.350404;HP=8;NF=3;NR=18;NS=52;CA=M;DP=419
-1	1539301	.	CAAAAGA	CA	56	PASS	AF=0.0156055;HP=4;NF=9;NR=2;NS=51;CA=0;DP=577
-1	1549566	venter	ATT	AT	100	PASS	AF=0.505899;HP=3;NF=25;NR=27;NS=52;CA=0;DP=451
-1	1554815	.	TGG	TG	100	PASS	AF=0.158582;HP=6;NF=12;NR=6;NS=48;CA=0;DP=271
-1	1575329	.	GCAAC	GC	12	PASS	AF=0.0174116;HP=1;NF=27;NR=21;NS=52;CA=0;DP=554
-1	1575977	rs35072492;-/A	TCC	TC	100	PASS	AF=0.626664;HP=3;DB;NF=23;NR=50;NS=51;CA=0;DP=361
-1	1577203	venter,watson	AA	AAAACA	100	PASS	AF=0.979791;HP=4;NF=59;NR=37;NS=52;CA=0;DP=498
-1	1584062	rs5772057;-/T,venter	CT	CTT	100	PASS	AF=0.992883;HP=1;DB;NF=34;NR=22;NS=46;CA=0;DP=291
-1	1589954	.	TTGT	TT	100	PASS	AF=0.0452889;HP=8;NF=5;NR=13;NS=51;CA=0;DP=424
-1	1611607	venter	ATA	AA	100	PASS	AF=0.528232;HP=1;NF=7;NR=10;NS=50;CA=M;DP=243
-1	1615408	venter	AC	ACGC	100	PASS	AF=0.553544;HP=9;NF=16;NR=20;NS=51;CA=M;DP=247
-1	1618248	.	CTGA	CA	100	PASS	AF=0.0412633;HP=1;NF=5;NR=2;NS=51;CA=0;DP=789
-1	1637509	venter	CG	CTG	100	PASS	AF=0.956642;HP=1;NF=57;NR=41;NS=52;CA=M;DP=533
-1	1637828	rs34259364;-/AT,mills	CG	CATG	100	PASS	AF=0.24683;HP=1;DB;NF=5;NR=57;NS=52;CA=0;DP=744
-1	1638199	.	GA	GATGTTAA	100	PASS	AF=0.962724;HP=1;NF=22;NR=22;NS=52;CA=0;DP=480
-1	1638366	venter	AT	ATT	100	PASS	AF=0.471703;HP=4;NF=50;NR=16;NS=52;CA=0;DP=738
-1	1638469	rs34392519;-/AGC,mills	GA	GAGCA	100	PASS	AF=0.428728;HP=1;DB;NF=34;NR=23;NS=52;CA=0;DP=804
-1	1639339	rs36127854;-/CT,venter	TA	TAGA	100	PASS	AF=0.27562;HP=1;DB;NF=10;NR=15;NS=52;CA=0;DP=961
-1	1639610	.	ATTCTC	AC	59	PASS	AF=0.0697107;HP=2;NF=31;NR=24;NS=52;CA=M;DP=817
-1	1640937	venter	CG	CTCGCTCTGTCACCCAGGCTG	100	PASS	AF=0.639983;HP=2;NF=4;NR=3;NS=52;CA=M;DP=638
-1	1641995	rs34986248;-/ATT,venter,watson	CT	CTTAT	100	PASS	AF=0.924551;HP=2;DB;NF=33;NR=29;NS=52;CA=0;DP=414
-1	1654133	rs34171153;-/ATCG	TA	TATCGA	100	PASS	AF=0.2409;HP=1;DB;NF=10;NR=13;NS=52;CA=0;DP=463
-1	1656307	rs35516110;-/GTTT,venter	GT	GGTTTT	100	PASS	AF=0.686901;HP=6;DB;NF=22;NR=20;NS=51;CA=0;DP=293
-1	1674207	venter	CC	CCCTC	100	PASS	AF=0.303909;HP=3;NF=26;GC;NR=29;NS=52;CA=0;DP=534
-1	1675781	.	TCCCTGGGACCGAAGTCGCCCCAC	TC	100	PASS	AF=0.270579;HP=3;NF=25;NR=24;NS=52;CA=0;DP=473
-1	1679986	rs35357728;-/TG,mills,venter,watson	AA	AACA	100	PASS	AF=0.956895;HP=4;DB;NF=60;NR=58;NS=52;CA=0;DP=520
-1	1684058	.	AAATGA	AA	100	PASS	AF=0.508762;HP=4;NF=48;NR=55;NS=52;CA=0;DP=471
-1	1684177	.	TG	TGGGGGGGG	100	PASS	AF=0.126497;HP=1;NF=5;NR=3;NS=51;CA=0;DP=449
-1	1691268	rs35459537;-/AAAAACAAAAAC,mills,venter	CAAAACAAAAACAA	CA	100	PASS	AF=0.305762;HP=4;DB;NF=54;NR=62;NS=51;CA=0;DP=443
-1	1697760	mills,venter	GAAACA	GA	100	PASS	AF=0.276545;HP=3;NF=21;NR=43;NS=52;CA=0;DP=564
-1	1700966	rs34974144;-/AT,venter	TT	TTGT	100	PASS	AF=0.37365;HP=3;DB;NF=34;NR=30;NS=52;CA=0;DP=445
-1	1715347	.	TG	TGGGGGG	24	PASS	AF=0.0415083;HP=1;NF=4;NR=5;NS=52;CA=0;DP=519
-1	1717050	rs56070879;-/ACAAAAAA,venter	TC	TCAAAAAAAC	100	PASS	AF=0.90619;HP=1;DB;NF=11;NR=7;NS=52;CA=0;DP=442
-1	1729683	.	ACT	AT	100	PASS	AF=0.104273;HP=1;NF=9;NR=11;NS=52;CA=0;DP=587
-1	1729941	rs55730045;-/TTTG,watson	TTTTGT	TT	100	PASS	AF=0.270089;HP=5;DB;NF=25;NR=44;NS=52;CA=M;DP=458
-1	1733706	rs4012956;-/GT,mills,venter	TA	TACA	100	PASS	AF=0.737658;HP=1;DB;NF=58;NR=26;NS=52;CA=M;DP=547
-1	1750193	rs34820549;-/TG,venter	TA	TACA	100	PASS	AF=0.417596;HP=1;DB;NF=42;NR=29;NS=52;CA=0;DP=495
-1	1761838	.	GCAC	GC	17	PASS	AF=0.0186129;HP=1;NF=23;NR=23;NS=52;CA=0;DP=566
-1	1767123	.	TACACACACACACACACACACACACACACACA	TA	100	PASS	AF=0.205885;HP=1;NF=32;NR=32;NS=52;CA=0;DP=560
-1	1767308	.	AG	ATG	12	PASS	AF=0.363076;HP=2;NF=25;NR=12;NS=52;CA=0;DP=611
-1	1768358	.	ACA	AA	11	NoQCALL	AF=0.0311546;HP=1;NF=1;NR=4;NS=52;CA=0;DP=502
-1	1768592	.	AC	ACAACAAAATCCCTTTTTC	100	PASS	AF=0.0974177;HP=1;NF=2;NR=5;NS=52;CA=0;DP=597
-1	1769336	rs34011234;-/TA,venter,watson	CT	CTAT	100	PASS	AF=0.385782;HP=1;DB;NF=21;NR=42;NS=52;CA=0;DP=534
-1	1769673	rs56979938;-/A,venter	AGA	AA	21	PASS	AF=0.232442;HP=1;DB;NF=9;NR=3;NS=52;CA=0;DP=465
-1	1771291	.	TG	TGG	100	PASS	AF=0.18937;HP=2;NF=5;NR=15;NS=52;CA=0;DP=590
-1	1778545	.	TA	TAAA	100	PASS	AF=0.155668;HP=3;NF=5;NR=12;NS=52;CA=0;DP=621
-1	1778604	rs34483468;-/AGCC,venter	GG	GGGCTG	100	PASS	AF=0.135521;HP=4;DB;NF=22;NR=28;NS=52;CA=0;DP=629
-1	1786587	watson	ACCA	AA	26	PASS	AF=0.0677562;HP=2;NF=15;NR=22;NS=52;CA=M;DP=404
-1	1797136	rs59528461;-/C,venter	TCC	TC	100	PASS	AF=0.94689;HP=10;DB;NF=58;NR=57;NS=52;CA=0;DP=531
-1	1797791	rs35226472;-/CT,venter	CG	CGAG	100	PASS	AF=0.383219;HP=1;DB;NF=64;NR=38;NS=52;CA=0;DP=673
-1	1802225	rs34339560;-/A,mills,venter	CAA	CA	100	PASS	AF=0.973419;HP=2;DB;NF=64;NR=71;NS=52;CA=0;DP=635
-1	1802305	.	GGAG	GG	100	PASS	AF=0.273326;HP=2;NF=41;NR=34;NS=52;CA=0;DP=695
-1	1806743	.	TTAGAT	TT	100	PASS	AF=0.179706;HP=2;NF=9;NR=6;NS=52;CA=0;DP=377
-1	1809681	.	AG	AGG	21	PASS	AF=0.133833;HP=2;NF=7;NR=3;NS=52;CA=0;DP=482
-1	1810283	.	AC	ACC	30	PASS	AF=0.0430128;HP=2;NF=4;NR=11;NS=52;CA=0;DP=523
-1	1810555	.	CTTAAT	CT	100	PASS	AF=0.0498379;HP=2;NF=9;NR=7;NS=52;CA=0;DP=521
-1	1812953	rs34135959;-/TCTC	CA	CAGAGA	100	PASS	AF=0.311555;HP=1;DB;NF=6;NR=8;NS=42;CA=0;DP=242
-1	1819911	.	CATG	CG	100	PASS	AF=0.0319085;HP=1;NF=3;NR=6;NS=52;CA=0;DP=765
-1	1819947	rs60517384;-/AAGTTGGATATACACACAT	CACACACATAAGTTGGATATA	CA	100	PASS	AF=0.0935091;HP=1;DB;NF=59;NR=69;NS=52;CA=0;DP=854
-1	1825723	venter	AA	AAAATAAATAAATA	100	PASS	AF=0.348026;HP=4;NF=9;NR=10;NS=52;CA=0;DP=373
-1	1835530	.	GTGAGAGTTGTTG	GG	100	PASS	AF=0.15298;HP=1;NF=12;NR=1;NS=51;CA=0;DP=528
-1	1838692	rs5772055;-/AC,mills	AA	AACA	100	PASS	AF=0.0441449;HP=3;DB;NF=2;NR=3;NS=51;CA=0;DP=360
-1	1843475	rs3039777;-/ACTG,venter,watson	TC	TCTGAC	100	PASS	AF=0.999998;HP=1;DB;NF=38;NR=39;NS=50;CA=0;DP=422
-1	1850674	.	AGG	AG	100	PASS	AF=0.474687;HP=3;NF=7;NR=1;NS=49;CA=0;DP=271
-1	1855740	watson	GT	GTGTAT	100	PASS	AF=0.646893;HP=1;NF=42;NR=28;NS=51;CA=0;DP=653
-1	1856762	.	CACAGG	CG	14	PASS	AF=0.0324715;HP=1;NF=1;NR=2;NS=50;CA=M;DP=379
-1	1857166	.	TACA	TA	100	PASS	AF=0.0531955;HP=1;NF=39;NR=29;NS=52;CA=0;DP=634
-1	1859140	mills	ACACCAGGTCCACCTCTGGACACAGGTCCACCC	AC	100	PASS	AF=0.180806;HP=1;NF=26;NR=15;NS=52;CA=0;DP=672
-1	1859353	rs35385292;-/TC,venter	ACTC	AC	100	PASS	AF=0.493919;HP=1;DB;NF=26;NR=38;NS=52;CA=M;DP=641
-1	1859424	rs34242289;-/CA,venter	TCAG	TG	100	PASS	AF=0.3962;HP=1;DB;NF=40;NR=32;NS=52;CA=M;DP=695
-1	1859520	.	TCAC	TC	100	PASS	AF=0.234548;HP=1;NF=26;NR=23;NS=52;CA=0;DP=729
-1	1859631	rs35205487;-/GA,venter	AC	ACTC	100	PASS	AF=0.347295;HP=1;DB;NF=15;NR=28;NS=52;CA=0;DP=710
-1	1859792	rs34050188;-/AT,watson	CG	CATG	100	PASS	AF=0.715253;HP=1;DB;NF=35;NR=44;NS=52;CA=0;DP=590
-1	1864576	.	CG	CGG	13	PASS	AF=0.0158703;HP=1;NF=3;NR=2;NS=51;CA=0;DP=556
-1	1867274	rs34832935;-/C	TGG	TG	100	PASS	AF=0.304336;HP=8;DB;NF=38;NR=23;NS=51;CA=0;DP=538
-1	1869711	rs56005703;-/ATAT,watson	AA	AATATA	100	PASS	AF=0.652198;HP=3;DB;NF=16;NR=16;NS=51;CA=0;DP=349
-1	1870233	.	TC	TCCCTCCCTTCTTTCCTTCCCTTTCCCTCC	100	PASS	AF=0.408049;HP=2;NF=11;NR=9;NS=52;CA=0;DP=814
-1	1870305	.	CC	CCTTTCCCTCCCTTACTCCTTCCTTCCTTC	100	PASS	AF=0.121733;HP=4;NF=1;NR=5;NS=52;CA=0;DP=680
-1	1870363	.	CT	CTT	100	PASS	AF=0.11398;HP=2;NF=4;NR=6;NS=52;CA=0;DP=680
-1	1870863	rs35875775;-/C,venter	TT	TGT	100	PASS	AF=0.744276;HP=2;DB;NF=43;NR=22;NS=52;CA=0;DP=455
-1	1873164	.	GT	GTT	100	PASS	AF=0.387355;HP=3;NF=20;NR=18;NS=52;CA=0;DP=523
-1	1873889	rs58267869;-/AAGA	AA	AAAAGA	100	PASS	AF=0.252999;HP=5;DB;NF=57;NR=31;NS=52;CA=0;DP=536
-1	1874122	rs35595511;-/T	TAA	TA	100	PASS	AF=0.338059;HP=9;DB;NF=38;NR=38;NS=51;CA=0;DP=519
-1	1876064	watson	AG	AGAGTG	100	PASS	AF=0.0829624;HP=1;NF=6;NR=5;NS=52;CA=0;DP=465
-1	1876204	.	AC	ACAGC	100	PASS	AF=0.256855;HP=1;NF=14;NR=10;NS=52;CA=0;DP=483
-1	1876616	.	GC	GCTGGTGCGCGTC	100	PASS	AF=0.0656988;HP=1;NF=5;NR=2;NS=51;CA=0;DP=420
-1	1876971	rs3838975;-/G	GCC	GC	21	PASS	AF=0.201137;HP=2;DB;NF=15;NR=6;NS=52;CA=0;DP=439
-1	1877704	.	CCTGC	CC	19	PASS	AF=0.0183173;HP=2;NF=7;NR=13;NS=52;CA=0;DP=436
-1	1884832	rs34937714;-/T	CA	CAA	100	PASS	AF=0.254902;HP=3;DB;NF=27;NR=6;NS=52;CA=0;DP=449
-1	1886549	rs3838974;-/T	GG	GAG	100	PASS	AF=0.153123;HP=4;DB;NF=11;NR=10;NS=52;CA=0;DP=456
-1	1889260	rs55954278;-/ATGA	GT	GTGAAT	100	PASS	AF=0.630203;HP=1;DB;NF=12;NR=17;NS=52;CA=0;DP=656
-1	1889311	.	GTGAAT	GT	100	PASS	AF=0.167491;HP=1;NF=33;NR=18;NS=52;CA=0;DP=606
-1	1889402	rs34520694;-/GTGA	AT	ATGAGT	100	PASS	AF=0.306146;HP=1;DB;NF=24;NR=32;NS=52;CA=0;DP=916
-1	1889884	rs56985589;-/G	TGC	TC	100	PASS	AF=0.347999;HP=1;DB;NF=20;NR=28;NS=51;CA=0;DP=537
-1	1889966	rs61233860;-/CCT,watson	TC	TCTCC	100	PASS	AF=0.211403;HP=1;DB;NF=12;NR=14;NS=52;CA=0;DP=554
-1	1892548	.	ACTC	AC	21	PASS	AF=0.0207771;HP=1;NF=4;NR=3;NS=52;CA=0;DP=750
-1	1900826	.	AACA	AA	100	PASS	AF=0.122368;HP=2;NF=13;NR=6;NS=52;CA=M;DP=435
-1	1908846	venter	CT	CTT	100	PASS	AF=0.30139;HP=10;NF=11;NR=28;NS=51;CA=0;DP=350
-1	1910458	.	TGAG	TG	15	PASS	AF=0.0208928;HP=1;NF=23;NR=12;NS=52;CA=0;DP=514
-1	1927207	rs61162553;-/GTTCTCTCTCTCTCTCTCTC,venter	CTCTCTCTCTCTCTCTCTCGTT	CT	100	PASS	AF=0.399955;HP=1;DB;NF=34;NR=47;NS=51;CA=0;DP=427
-1	1929307	rs36066718;-/T	CAA	CA	30	PASS	AF=0.114706;HP=10;DB;NF=24;NR=15;NS=52;CA=0;DP=520
-1	1933578	.	CA	CAAAATAAAATA	100	PASS	AF=0.562689;HP=4;NF=21;NR=28;NS=52;CA=0;DP=359
-1	1947079	rs3831907;-/C	CGG	CG	100	PASS	AF=0.131218;HP=3;DB;NF=4;NR=10;NS=52;CA=0;DP=316
-1	1949721	rs35354651;-/G	GC	GCC	100	PASS	AF=0.218024;HP=1;DB;NF=11;NR=5;NS=51;CA=0;DP=306
-1	1965555	rs56225932;-/CA,venter	TACA	TA	100	PASS	AF=0.743144;HP=1;DB;NF=50;NR=67;NS=52;CA=0;DP=679
-1	1966402	venter,watson	GC	GCCGCC	100	PASS	AF=0.988372;HP=2;NF=36;NR=16;NS=46;CA=0;DP=232
-1	1989567	.	AC	ACC	12	PASS	AF=0.0334278;HP=6;NF=10;NR=9;NS=52;CA=0;DP=367
-1	1992350	.	CA	CACCTGGGCGTGTGA	56	PASS	AF=0.19029;HP=1;NF=6;NR=3;NS=52;CA=0;DP=412
-1	1993852	rs34106910;-/G,venter	GCC	GC	100	PASS	AF=0.178292;HP=2;DB;NF=15;NR=7;NS=51;CA=0;DP=388
-1	1996153	.	GT	GTT	59	PASS	AF=0.126167;HP=8;NF=7;NR=14;NS=51;CA=0;DP=436
-1	2010531	rs35300904;-/C,venter	CA	CGA	100	PASS	AF=0.2131;HP=1;DB;NF=18;NR=7;NS=52;CA=0;DP=418
-1	2019409	rs55716481;-/AGTGACTAAGGTGACCAGG,venter	CA	CAGGTGACCAGGAGTGACTAA	100	PASS	AF=0.901172;HP=1;DB;NF=17;NR=16;NS=52;CA=0;DP=600
-1	2019867	rs58602729;-/CT	CCTC	CC	100	PASS	AF=0.15521;HP=3;DB;NF=6;NR=12;NS=52;CA=0;DP=542
-1	2019961	mills	CGTTTTGTTTTG	CG	100	PASS	AF=0.239816;HP=1;NF=44;NR=59;NS=52;CA=0;DP=513
-1	2027926	.	CT	CTT	100	PASS	AF=0.591615;HP=1;NF=7;NR=4;NS=51;CA=M;DP=262
-1	2028042	.	CT	CTT	100	PASS	AF=0.242884;HP=1;NF=28;NR=12;NS=51;CA=M;DP=738
-1	2031773	.	GA	GGGTA	100	PASS	AF=0.197429;HP=1;NF=15;NR=7;NS=51;CA=0;DP=405
-1	2036771	.	AC	ACCCC	100	PASS	AF=0.173415;HP=3;NF=1;NR=5;NS=52;CA=0;DP=532
-1	2040362	venter	CT	CTT	100	PASS	AF=0.61548;HP=3;NF=31;NR=33;NS=52;CA=0;DP=522
-1	2042747	.	CG	CGGGGG	100	PASS	AF=0.132985;HP=2;NF=11;NR=6;NS=51;CA=0;DP=880
-1	2042976	.	GT	GTTATT	100	PASS	AF=0.225391;HP=2;NF=13;NR=25;NS=51;CA=M;DP=882
-1	2045297	.	GT	GTAGTTATT	36	PASS	AF=0.513037;HP=2;NF=5;NR=16;NS=46;CA=M;DP=269
-1	2048642	rs56348719;-/A	CAG	CG	100	PASS	AF=0.626672;HP=1;DB;NF=15;NR=37;NS=51;CA=0;DP=337
-1	2055895	watson	AT	AATT	100	PASS	AF=0.183323;HP=1;NF=10;NR=14;NS=52;CA=0;DP=511
-1	2058884	watson	GCCTC	GC	100	PASS	AF=0.258368;HP=2;NF=23;NR=18;NS=51;CA=0;DP=533
-1	2068674	.	CTCTAT	CT	100	PASS	AF=0.0693035;HP=1;NF=7;NR=5;NS=52;CA=0;DP=600
-1	2076576	.	GTGAT	GT	100	PASS	AF=0.0691863;HP=1;NF=32;NR=24;NS=52;CA=0;DP=918
-1	2076741	.	GTGAT	GT	49	PASS	AF=0.200249;HP=1;NF=13;NR=21;NS=51;CA=0;DP=758
-1	2076895	.	GTGAT	GT	100	PASS	AF=0.134423;HP=1;NF=21;NR=19;NS=51;CA=0;DP=658
-1	2076954	rs60433546;-/ATG	AA	AATGA	100	PASS	AF=0.310432;HP=2;DB;NF=12;NR=27;NS=52;CA=0;DP=664
-1	2079377	rs3835418;-/T	CT	CTT	100	PASS	AF=0.201153;HP=1;DB;NF=13;NR=15;NS=52;CA=0;DP=451
-1	2081537	rs56068331;-/GTGT	CGTGTG	CG	13	PASS	AF=0.276967;HP=1;DB;NF=58;NR=66;NS=52;CA=0;DP=516
-1	2085600	rs3835419;-/CTGGGCCAACCC	GA	GACCCCTGGGCCAA	100	PASS	AF=0.243746;HP=1;DB;NF=11;NR=6;NS=52;CA=0;DP=535
-1	2087974	.	GCC	GC	15	PASS	AF=0.0623565;HP=8;NF=7;NR=14;NS=52;CA=0;DP=325
-1	2089182	rs34571180;-/CTC,mills,venter	GCCTC	GC	100	PASS	AF=0.116512;HP=2;DB;NF=9;NR=4;NS=51;CA=0;DP=440
-1	2089950	.	CG	CGGGG	100	PASS	AF=0.178382;HP=2;NF=20;NR=7;NS=51;CA=0;DP=444
-1	2091793	rs56317708;-/GATA,venter,watson	AA	AAGATA	100	PASS	AF=0.896718;HP=2;DB;NF=37;NR=55;NS=52;CA=0;DP=525
-1	2094394	watson	TCCACC	TC	100	PASS	AF=0.191274;HP=2;NF=15;NR=11;NS=52;CA=0;DP=554
-1	2099298	.	TG	TGG	100	PASS	AF=0.234547;HP=1;NF=15;NR=4;NS=51;CA=0;DP=434
-1	2101678	.	AGACG	AG	100	PASS	AF=0.0220699;HP=1;NF=10;NR=4;NS=51;CA=0;DP=533
-1	2104518	rs55672189;-/CGTCTC,venter	AG	AGTCTCCG	32	PASS	AF=0.0318159;HP=1;DB;NF=1;NR=2;NS=51;CA=0;DP=303
-1	2110593	rs34825103;-/C	TG	TGG	100	PASS	AF=0.0674605;HP=1;DB;NF=1;NR=4;NS=52;CA=M;DP=336
-1	2114205	.	TT	TTTGT	14	PASS	AF=0.0440601;HP=4;NF=24;NR=27;NS=52;CA=0;DP=414
-1	2118677	rs35613376;-/T,venter	GA	GAA	100	PASS	AF=0.110597;HP=1;DB;NF=4;NR=6;NS=51;CA=0;DP=395
-1	2129208	venter	CGTGTGTGTGTGTGTGTGTGTG	CG	100	PASS	AF=0.312577;HP=1;NF=50;NR=42;NS=51;CA=0;DP=395
-1	2136104	rs34745034;-/AC,venter,watson	CTGT	CT	100	PASS	AF=0.148774;HP=1;DB;NF=9;NR=15;NS=51;CA=0;DP=394
-1	2147798	.	CGG	CG	100	PASS	AF=0.069257;HP=5;NF=3;NR=7;NS=51;CA=0;DP=433
-1	2156467	rs34646035;-/A,venter	GG	GTG	100	PASS	AF=0.0650203;HP=2;DB;NF=3;NR=2;NS=51;CA=0;DP=299
-1	2163248	rs34969427;-/CA,venter,watson	CT	CTGT	59	PASS	AF=0.323344;HP=1;DB;NF=36;NR=42;NS=52;CA=0;DP=622
-1	2168152	rs34184068;-/C	TG	TGG	100	PASS	AF=0.267631;HP=8;DB;NF=12;NR=25;NS=52;CA=0;DP=462
-1	2173905	rs59705675;-/C,venter	GCC	GC	100	PASS	AF=0.519185;HP=4;DB;NF=28;NR=31;NS=52;CA=0;DP=472
-1	2178426	.	ATCTCT	AT	59	PASS	AF=0.0153899;HP=1;NF=1;NR=2;NS=52;CA=0;DP=558
-1	2180516	.	TG	TGGG	15	PASS	AF=0.10873;HP=1;NF=7;NR=3;NS=52;CA=0;DP=495
-1	2193017	rs35691128;-/C,venter	TG	TGG	100	PASS	AF=0.296206;HP=9;DB;NF=9;NR=11;NS=52;CA=0;DP=367
-1	2204648	.	AGGGG	AG	100	PASS	AF=0.0847086;HP=8;NF=9;NR=7;NS=52;CA=0;DP=441
-1	2211603	.	TG	TGGGGGGGGGG	100	PASS	AF=0.176;HP=1;NF=5;NR=9;NS=52;CA=0;DP=507
-1	2211835	rs35471620;-/C,venter	CG	CGG	100	PASS	AF=0.403922;HP=3;DB;NF=20;NR=20;NS=51;CA=0;DP=363
-1	2213004	rs35841716;-/G,mills,venter	TGG	TG	100	PASS	AF=0.938006;HP=7;DB;NF=35;NR=9;NS=52;CA=0;DP=297
-1	2214726	.	GC	GCC	100	PASS	AF=0.415474;HP=9;NF=18;NR=19;NS=51;CA=0;DP=416
-1	2220552	rs35472917;-/C,venter	AGG	AG	100	PASS	AF=0.609848;HP=9;DB;NF=24;NR=22;NS=51;CA=0;DP=385
-1	2221276	.	GC	GCC	23	PASS	AF=0.0895016;HP=2;NF=1;NR=11;NS=50;CA=0;DP=396
-1	2222657	.	AC	ACC	16	PASS	AF=0.0530452;HP=2;NF=1;NR=3;NS=51;CA=0;DP=404
-1	2223900	.	CAGGA	CA	100	PASS	AF=0.105506;HP=1;NF=9;NR=6;NS=52;CA=0;DP=517
-1	2232109	.	CAGG	CG	100	PASS	AF=0.220422;HP=1;NF=14;NR=13;NS=51;CA=0;DP=430
-1	2233476	rs34394327;-/CGTTT,mills,venter,watson	CC	CCGTTTC	100	PASS	AF=0.982218;HP=3;DB;NF=18;NR=31;NS=52;CA=0;DP=378
-1	2238242	rs56200665;-/C,mills	GG	GCG	100	PASS	AF=0.745403;HP=4;DB;NF=37;NR=40;NS=51;CA=0;DP=419
-1	2242260	rs34121936;-/C	AGG	AG	100	PASS	AF=0.107749;HP=4;DB;NF=7;NR=6;NS=51;CA=0;DP=427
-1	2246276	rs61120130;-/TGC,venter	GG	GGCTG	100	PASS	AF=0.447977;HP=3;DB;NF=13;NR=17;NS=51;CA=0;DP=403
-1	2246469	.	TT	TTCCCTCCCTTCCTTCCTTCCCTCCCT	100	PASS	AF=0.0710328;HP=3;NF=8;NR=6;NS=51;CA=B;DP=731
-1	2246586	rs59175712;-/CT	CC	CCTC	100	PASS	AF=0.378253;HP=2;DB;NF=33;NR=29;NS=50;CA=0;DP=515
-1	2248450	rs61135926;-/CACA	AA	AACACA	100	PASS	AF=0.367115;HP=3;DB;NF=24;NR=19;NS=51;CA=0;DP=445
-1	2248486	.	CAGA	CA	100	PASS	AF=0.108968;HP=1;NF=14;NR=11;NS=51;CA=M;DP=382
-1	2248806	rs59142249;-/A	CA	CAA	100	PASS	AF=0.0756571;HP=1;DB;NF=4;NR=12;NS=51;CA=0;DP=728
-1	2255198	.	TGCTGGAAAGAACAG	TG	100	PASS	AF=0.115149;HP=1;NF=9;NR=12;NS=51;CA=0;DP=470
-1	2267148	.	ACACACAGA	AA	100	PASS	AF=0.128331;HP=1;NF=4;NR=6;NS=51;CA=0;DP=681
-1	2268675	.	TG	TGG	10	PASS	AF=0.0406249;HP=1;NF=7;NR=3;NS=52;CA=0;DP=508
-1	2269958	.	GCACGCACACGCAC	GC	40	PASS	AF=0.0297002;HP=1;NF=6;NR=7;NS=50;CA=0;DP=288
-1	2270248	.	CCTG	CG	100	PASS	AF=0.21901;HP=4;NF=14;NR=17;NS=52;CA=0;DP=478
-1	2272049	.	AGGGGTGGCACGG	AG	100	PASS	AF=0.0657391;HP=4;NF=20;NR=19;NS=52;CA=0;DP=465
-1	2272576	rs35424701;-/T	TA	TAA	100	PASS	AF=0.0794139;HP=1;DB;NF=5;NR=5;NS=51;CA=0;DP=426
-1	2273487	.	TAA	TA	10	PASS	AF=0.0158231;HP=10;NF=25;NR=9;NS=51;CA=0;DP=564
-1	2282631	rs59328016;-/G	AG	AGG	100	PASS	AF=0.230902;HP=1;DB;NF=1;NR=6;NS=52;CA=M;DP=310
-1	2282847	rs34534255;-/AG	AC	ACTC	100	PASS	AF=0.108076;HP=1;DB;NF=5;NR=4;NS=50;CA=0;DP=293
-1	2284162	.	CA	CAA	12	PASS	AF=0.0508845;HP=10;NF=7;NR=7;NS=52;CA=0;DP=406
-1	2285124	.	TAAAAA	TA	100	PASS	AF=0.226133;HP=8;NF=14;NR=5;NS=52;CA=0;DP=315
-1	2288255	rs56670882;-/TACATAGAAAAA,venter,watson	CAAAATACATAGAA	CA	100	PASS	AF=0.154865;HP=4;DB;NF=46;NR=50;NS=51;CA=0;DP=466
-1	2291012	venter	ATAATT	AT	100	PASS	AF=0.140631;HP=1;NF=7;NR=9;NS=51;CA=0;DP=365
-1	2292525	rs60502597;-/CACAACAAC,venter	CA	CACAACCACAA	100	PASS	AF=0.411828;HP=1;DB;NF=18;NR=3;NS=52;CA=0;DP=515
-1	2305015	rs35699260;-/T,venter	CAG	CG	100	PASS	AF=0.283002;HP=1;DB;NF=14;NR=17;NS=51;CA=0;DP=451
-1	2310430	.	AA	AAAGA	100	PASS	AF=0.382413;HP=6;NF=20;NR=11;NS=52;CA=0;DP=408
-1	2314333	venter	CG	CGGACGCCAGGCAGAGGACTTCATCCCAGGCTTCAGTGCTCCTG	100	PASS	AF=0.736856;HP=2;NF=1;NR=2;NS=52;CA=0;DP=679
-1	2319273	rs57204595;-/C	ACC	AC	100	PASS	AF=0.125223;HP=2;DB;NF=7;NR=13;NS=52;CA=0;DP=523
-1	2322519	.	TCCT	TT	100	PASS	AF=0.200476;HP=2;NF=2;NR=10;NS=50;CA=0;DP=413
-1	2322562	.	TCCACCCTCC	TC	100	PASS	AF=0.3747;HP=2;NF=8;NR=15;NS=51;CA=0;DP=325
-1	2322680	.	CT	CTT	100	PASS	AF=0.284453;HP=1;NF=26;NR=24;NS=52;CA=M;DP=388
-1	2323804	venter	TC	TCC	100	PASS	AF=0.865363;HP=3;NF=38;NR=47;NS=50;CA=0;DP=438
-1	2325452	.	CG	CGG	39	PASS	AF=0.0242463;HP=3;NF=5;NR=8;NS=51;CA=0;DP=547
-1	2332518	.	GA	GAA	100	PASS	AF=0.0862532;HP=1;NF=5;NR=13;NS=51;CA=0;DP=414
-1	2337697	rs55744642;-/CGACA,venter,watson	GG	GGGACAG	100	PASS	AF=0.867582;HP=3;DB;NF=16;NR=23;NS=51;CA=0;DP=383
-1	2338712	rs34210450;-/AGCTTCCC,mills,venter	GC	GCCCAGCTTC	100	PASS	AF=0.431742;HP=3;DB;NF=24;NR=15;NS=52;CA=0;DP=504
-1	2341261	.	TCC	TC	20	PASS	AF=0.13716;HP=9;NF=4;NR=20;NS=51;CA=0;DP=258
-1	2343280	rs60532031;-/AAAAG,watson	GA	GAAGAAA	100	PASS	AF=0.0544808;HP=2;DB;NF=2;NR=10;NS=49;CA=0;DP=348
-1	2343570	venter	AA	AAAACA	100	PASS	AF=0.0882931;HP=6;NF=28;NR=18;NS=52;CA=0;DP=434
-1	2344468	.	TTTTGT	TT	100	PASS	AF=0.233529;HP=7;NF=49;NR=55;NS=52;CA=0;DP=493
-1	2345597	rs35560781;-/T,venter	TAA	TA	100	PASS	AF=0.501718;HP=6;DB;NF=36;NR=26;NS=52;CA=0;DP=532
-1	2352446	.	CGTG	CG	16	PASS	AF=0.0185013;HP=1;NF=10;NR=25;NS=52;CA=0;DP=432
-1	2352629	rs35263617;-/CA,venter	CG	CGTG	100	PASS	AF=0.4693;HP=1;DB;NF=44;NR=38;NS=51;CA=0;DP=539
-1	2355283	rs35314501;-/G	TC	TCC	100	PASS	AF=0.408524;HP=4;DB;NF=21;NR=18;NS=52;CA=0;DP=436
-1	2356275	rs34090130;-/G,mills	AGG	AG	100	PASS	AF=0.172214;HP=6;DB;NF=16;NR=9;NS=51;CA=0;DP=415
-1	2356753	rs58056215;-/TGGAGGC	TGGCTGGAG	TG	100	PASS	AF=0.178356;HP=2;DB;NF=43;NR=59;NS=51;CA=0;DP=429
-1	2357119	.	TGG	TG	100	PASS	AF=0.179635;HP=6;NF=12;NR=18;NS=52;CA=0;DP=495
-1	2357323	.	TCCCT	TT	100	PASS	AF=0.0931072;HP=3;NF=8;NR=9;NS=52;CA=0;DP=484
-1	2357636	.	CTCCACCTTT	CT	100	PASS	AF=0.252701;HP=1;NF=11;NR=9;NS=47;CA=M;DP=266
-1	2358758	.	CAA	CA	26	PASS	AF=0.0241071;HP=3;NF=1;NR=3;NS=51;CA=0;DP=486
-1	2360543	rs34299371;-/G,venter	GCC	GC	100	PASS	AF=0.460241;HP=7;DB;NF=18;NR=28;NS=51;CA=0;DP=403
-1	2365835	rs35499456;-/A	GT	GTT	100	PASS	AF=0.299753;HP=3;DB;NF=19;NR=20;NS=52;CA=0;DP=431
-1	2370798	.	AAACCA	AA	100	PASS	AF=0.315002;HP=4;NF=56;NR=52;NS=52;CA=0;DP=505
-1	2379981	rs35697743;-/C,venter	TGC	TC	100	PASS	AF=0.0396508;HP=1;DB;NF=1;NR=5;NS=50;CA=0;DP=425
-1	2383170	rs35931789;-/T,venter	CC	CAC	100	PASS	AF=0.441832;HP=7;DB;NF=24;NR=21;NS=52;CA=0;DP=453
-1	2383775	.	ACC	AC	19	PASS	AF=0.0298335;HP=5;NF=6;NR=2;NS=52;CA=0;DP=442
-1	2388741	watson	GCCTTCCTCAC	GC	100	PASS	AF=0.134128;HP=2;NF=6;NR=9;NS=47;CA=0;DP=257
-1	2394261	rs34886292;-/T,venter	CA	CAA	100	PASS	AF=0.640008;HP=1;DB;NF=28;NR=33;NS=51;CA=0;DP=459
-1	2395694	venter	AGG	AG	100	PASS	AF=0.518622;HP=3;NF=29;NR=23;NS=50;CA=0;DP=387
-1	2406522	rs35886782;-/CTCTGGACGCT,venter,watson	TG	TGCTCTCTGGACG	100	PASS	AF=0.531691;HP=1;DB;NF=12;NR=19;NS=51;CA=0;DP=452
-1	2429911	rs3831090;-/AT,mills	TT	TTAT	100	PASS	AF=0.138967;HP=3;DB;NF=24;NR=13;NS=52;CA=0;DP=328
-1	2458287	.	CGTG	CG	100	PASS	AF=0.0696687;HP=1;NF=38;NR=32;NS=52;CA=0;DP=613
-1	2458465	.	AGTG	AG	31	PASS	AF=0.0212179;HP=1;NF=18;NR=32;NS=51;CA=0;DP=600
-1	2460527	.	TG	TGCGGCCCATCTCAG	51	PASS	AF=0.164756;HP=1;NF=1;NR=4;NS=51;CA=0;DP=496
-1	2477778	.	AC	ACCC	100	PASS	AF=0.157812;HP=2;NF=2;NR=11;NS=51;CA=0;DP=389
-1	2501833	rs34000217;-/ATT	AA	AAATA	100	PASS	AF=0.437274;HP=5;DB;NF=19;NR=23;NS=51;CA=0;DP=337
-1	2503512	rs59345997;-/CAAA	AAAACA	AA	100	PASS	AF=0.46764;HP=4;DB;NF=44;NR=29;NS=52;CA=0;DP=456
-1	2506681	.	TG	TGGG	46	PASS	AF=0.310909;HP=9;NF=14;NR=8;NS=51;CA=0;DP=273
-1	2513520	rs5772070;-/G,mills	CGG	CG	100	PASS	AF=0.652792;HP=8;DB;NF=8;NR=34;NS=51;CA=0;DP=275
-1	2517761	.	TGC	TC	100	PASS	AF=0.0839269;HP=1;NF=3;NR=6;NS=50;CA=0;DP=359
-1	2520201	rs34705971;-/C,venter	AG	AGG	100	PASS	AF=0.612406;HP=1;DB;NF=42;NR=46;NS=52;CA=0;DP=518
-1	2521983	.	TCAAACAAACAAAC	TC	100	PASS	AF=0.365407;HP=1;NF=35;NR=29;NS=52;CA=0;DP=501
-1	2522019	.	CT	CTGTT	100	PASS	AF=0.523695;HP=1;NF=28;NR=12;NS=52;CA=0;DP=410
-1	2522313	rs34791736;-/A,venter	CT	CTT	100	PASS	AF=0.621139;HP=1;DB;NF=47;NR=24;NS=52;CA=0;DP=472
-1	2524952	rs35090174;-/CT	ACTC	AC	100	PASS	AF=0.224915;HP=1;DB;NF=19;NR=15;NS=51;CA=0;DP=517
-1	2529806	.	CATA	CA	100	PASS	AF=0.236462;HP=1;NF=22;NR=13;NS=51;CA=0;DP=625
-1	2529841	.	CACATA	CA	100	PASS	AF=0.190786;HP=1;NF=20;NR=19;NS=51;CA=0;DP=663
-1	2530205	rs61132608;-/CATATA,watson	CA	CACATATA	100	PASS	AF=0.547698;HP=1;DB;NF=20;NR=28;NS=52;CA=0;DP=660
-1	2543402	rs5772073;-/GAG,mills	TAGGA	TA	100	PASS	AF=0.24689;HP=1;DB;NF=12;NR=31;NS=52;CA=0;DP=543
-1	2547236	rs58240187;-/AGA,venter,watson	GG	GGAAG	100	PASS	AF=0.531939;HP=2;DB;NF=25;NR=25;NS=52;CA=0;DP=444
-1	2551119	rs35955733;-/CCC,venter,watson	GCCCC	GC	100	PASS	AF=0.606107;HP=9;DB;NF=24;NR=35;NS=52;CA=0;DP=492
-1	2551885	rs36036408;-/AC,venter	CGTG	CG	100	PASS	AF=0.356574;HP=1;DB;NF=39;NR=38;NS=52;CA=0;DP=803
-1	2552076	.	CGTG	CG	100	PASS	AF=0.066645;HP=1;NF=25;NR=15;NS=51;CA=0;DP=782
-1	2552384	.	CTGT	CT	12	PASS	AF=0.0121638;HP=1;NF=13;NR=25;NS=52;CA=0;DP=612
-1	2556252	.	ACACTC	AC	59	PASS	AF=0.143579;HP=1;NF=12;NR=9;NS=49;CA=0;DP=331
-1	2578474	.	CCACACCCCCAG	CG	100	PASS	AF=0.930867;HP=3;NF=16;NR=12;NS=51;CA=M;DP=281
-1	2688911	rs34425096;-/TC,venter	TTCT	TT	100	PASS	AF=0.26327;HP=5;DB;NF=17;NR=12;NS=52;CA=0;DP=451
-1	2691366	rs36213670;-/CTCTGGGCCA,mills,venter	GCTCTGGGCCAC	GC	39	PASS	AF=0.191253;HP=1;DB;NF=21;NR=36;NS=52;CA=0;DP=344
-1	2691723	rs57511628;-/ACCCCAGGAGATCCCTGC	TA	TACCCCAGGAGATCCCTGCA	100	PASS	AF=0.332823;HP=1;DB;NF=6;NR=7;NS=52;CA=0;DP=453
-1	2703254	.	CA	CAA	100	PASS	AF=0.111948;HP=3;NF=8;NR=13;NS=51;CA=0;DP=502
-1	2703885	.	AC	ACC	100	PASS	AF=0.0959517;HP=6;NF=24;NR=11;NS=51;CA=0;DP=531
-1	2725125	rs34936518;-/C,venter	GCT	GT	100	PASS	AF=0.375093;HP=1;DB;NF=33;NR=32;NS=52;CA=0;DP=621
-1	2725735	.	AACACA	AA	24	PASS	AF=0.0139746;HP=2;NF=16;NR=4;NS=51;CA=0;DP=639
-1	2726135	rs34620269;-/CA	GCAC	GC	100	PASS	AF=0.0410325;HP=1;DB;NF=28;NR=22;NS=52;CA=0;DP=626
-1	2726213	.	GC	GCAC	13	PASS	AF=0.0257105;HP=1;NF=8;NR=9;NS=52;CA=0;DP=552
-1	2746483	.	AC	ACC	40	PASS	AF=0.0544668;HP=1;NF=4;NR=12;NS=51;CA=0;DP=544
-1	2747281	.	TG	TGAGAG	100	PASS	AF=0.152256;HP=1;NF=11;NR=8;NS=52;CA=0;DP=855
-1	2754002	rs36202379;-/CTGCTTGT,mills,watson	ATTGTCTGCT	AT	100	PASS	AF=0.260861;HP=2;DB;NF=32;NR=35;NS=52;CA=0;DP=496
-1	2755160	rs34916159;-/A	TA	TAA	100	PASS	AF=0.532865;HP=7;DB;NF=10;NR=34;NS=52;CA=0;DP=533
-1	2755983	.	GCC	GC	100	PASS	AF=0.106339;HP=3;NF=18;NR=26;NS=52;CA=M;DP=700
-1	2765711	.	AA	AAGGAAGGA	100	PASS	AF=0.686149;HP=2;NF=11;NR=8;NS=50;CA=0;DP=364
-1	2765863	.	AG	AGG	100	PASS	AF=0.999885;HP=1;NF=14;NR=36;NS=49;CA=0;DP=364
-1	2765952	.	AG	AGG	100	PASS	AF=0.0789769;HP=1;NF=29;NR=29;NS=51;CA=B;DP=851
-1	2779479	.	TTTTCTTCTCTTTCT	TT	100	PASS	AF=0.712577;HP=4;NF=29;NR=22;NS=50;CA=0;DP=322
-1	2794338	rs34131736;-/T	CTG	CG	100	PASS	AF=0.089184;HP=1;DB;NF=7;NR=4;NS=51;CA=0;DP=440
-1	2801123	.	TCCTCCCCACCCTGAC	TC	48	PASS	AF=0.0412327;HP=2;NF=13;NR=18;NS=51;CA=0;DP=343
-1	2803308	watson	CATG	CG	100	PASS	AF=0.160766;HP=1;NF=23;NR=20;NS=52;CA=0;DP=816
-1	2805468	rs56260225;-/ACAA	AAAACA	AA	100	PASS	AF=0.859977;HP=4;DB;NF=62;NR=35;NS=51;CA=0;DP=433
-1	2806441	rs34966309;-/G	CG	CGG	100	PASS	AF=0.211987;HP=4;DB;NF=20;NR=11;NS=52;CA=0;DP=441
-1	2810388	.	GCC	GC	100	PASS	AF=0.11183;HP=2;NF=8;NR=5;NS=51;CA=0;DP=431
-1	2822166	.	TACATGCACACA	TA	100	PASS	AF=0.150719;HP=1;NF=43;NR=52;NS=52;CA=0;DP=844
-1	2822270	rs59677991;-/GC	GGCG	GG	18	NoQCALL	AF=0.0194725;HP=2;DB;NF=15;NR=5;NS=52;CA=0;DP=806
-1	2822473	.	CACACAC	CC	100	PASS	AF=0.138944;HP=1;NF=6;NR=7;NS=52;CA=0;DP=951
-1	2827616	.	CAAGC	CC	52	PASS	AF=0.132317;HP=2;NF=8;NR=4;NS=51;CA=0;DP=300
-1	2828576	.	CG	CTG	100	PASS	AF=0.168378;HP=1;NF=8;NR=2;NS=52;CA=0;DP=325
-1	2829365	rs35758696;-/A	TAA	TA	100	PASS	AF=0.216995;HP=6;DB;NF=20;NR=20;NS=51;CA=0;DP=531
-1	2833106	.	TG	TGTTGGG	100	PASS	AF=0.237115;HP=1;NF=11;NR=4;NS=52;CA=0;DP=336
-1	2834384	.	AC	ACC	32	PASS	AF=0.0617917;HP=1;NF=3;NR=5;NS=52;CA=0;DP=592
-1	2835704	rs35824541;-/G	AGG	AG	100	PASS	AF=0.188967;HP=3;DB;NF=15;NR=11;NS=52;CA=0;DP=691
-1	2836635	rs56691957;-/AT	CATG	CG	100	PASS	AF=0.126742;HP=1;DB;NF=8;NR=13;NS=52;CA=0;DP=611
-1	2851063	.	ATGTGTGTCT	AT	100	PASS	AF=0.224053;HP=1;NF=34;NR=32;NS=52;CA=0;DP=798
-1	2859183	rs34869376;-/CT	ACTC	AC	100	PASS	AF=0.228335;HP=1;DB;NF=11;NR=14;NS=52;CA=0;DP=446
-1	2859269	rs34009406;-/C	AC	ACC	100	PASS	AF=0.168197;HP=2;DB;NF=8;NR=14;NS=52;CA=0;DP=460
-1	2862455	rs34488344;-/T	GT	GTT	100	PASS	AF=0.140555;HP=10;DB;NF=25;NR=16;NS=52;CA=0;DP=484
-1	2866073	.	AC	ACC	56	PASS	AF=0.0758065;HP=1;NF=2;NR=11;NS=51;CA=0;DP=513
-1	2871504	.	TA	TACTAA	100	PASS	AF=0.128765;HP=1;NF=11;NR=12;NS=52;CA=0;DP=676
-1	2871601	rs60410855;-/TCCA	CC	CCCATC	100	PASS	AF=0.11635;HP=3;DB;NF=19;NR=14;NS=52;CA=0;DP=682
-1	2874709	.	GT	GTT	100	PASS	AF=0.138394;HP=9;NF=8;NR=12;NS=51;CA=0;DP=534
-1	2876814	rs5772089;-/A,mills,venter	GG	GAG	100	PASS	AF=0.999994;HP=10;DB;NF=39;NR=42;NS=50;CA=0;DP=343
-1	2877421	rs35085736;-/C,venter	GC	GCC	100	PASS	AF=0.582204;HP=6;DB;NF=29;NR=37;NS=50;CA=0;DP=426
-1	2881114	.	GG	GTG	100	PASS	AF=0.586283;HP=5;NF=16;NR=5;NS=47;CA=M;DP=256
-1	2883970	.	GG	GCG	16	PASS	AF=0.516075;HP=4;NF=6;NR=2;NS=51;CA=M;DP=332
-1	2885504	.	TCC	TC	29	PASS	AF=0.140908;HP=9;NF=12;NR=8;NS=51;CA=0;DP=353
-1	2886983	.	AG	AGG	50	PASS	AF=0.0436199;HP=3;NF=7;NR=2;NS=50;CA=0;DP=401
-1	2887864	rs57379840;-/T,venter	CG	CTG	100	PASS	AF=0.770236;HP=2;DB;NF=41;NR=25;NS=51;CA=0;DP=375
-1	2892284	.	CAT	CT	100	PASS	AF=0.0885935;HP=1;NF=23;NR=17;NS=52;CA=0;DP=685
-1	2892433	venter	AT	ATCCATCCTCCATCCT	100	PASS	AF=0.814532;HP=1;NF=13;NR=12;NS=52;CA=0;DP=620
-1	2892472	.	CCCATC	CC	100	PASS	AF=0.181828;HP=3;NF=50;NR=61;NS=52;CA=0;DP=633
-1	2899352	.	CTA	CA	100	PASS	AF=0.0433393;HP=1;NF=5;NR=2;NS=51;CA=0;DP=512
-1	2902379	.	TAGA	TA	40	PASS	AF=0.0165292;HP=1;NF=3;NR=2;NS=51;CA=0;DP=476
-1	2903930	rs36097640;-/A	TAA	TA	12	PASS	AF=0.0522384;HP=8;DB;NF=13;NR=15;NS=51;CA=0;DP=535
-1	2907194	rs35693840;-/G	AG	AGG	100	PASS	AF=0.136995;HP=5;DB;NF=14;NR=8;NS=52;CA=0;DP=516
-1	2916313	.	AC	ACC	40	PASS	AF=0.0606632;HP=1;NF=1;NR=13;NS=52;CA=0;DP=529
-1	2923107	.	GA	GGGGGGAA	35	PASS	AF=0.311458;HP=1;NF=1;NR=2;NS=50;CA=0;DP=285
-1	2923994	.	AAGGA	AA	100	PASS	AF=0.136914;HP=3;NF=4;NR=16;NS=52;CA=0;DP=475
-1	2926544	rs58065168;-/G	TG	TGG	100	PASS	AF=0.231871;HP=7;DB;NF=23;NR=13;NS=51;CA=0;DP=445
-1	2927774	.	GTCT	GT	100	PASS	AF=0.039848;HP=1;NF=24;NR=39;NS=52;CA=0;DP=466
-1	2928267	rs4013154;-/TCT	CAGAA	CA	100	PASS	AF=0.176094;HP=1;DB;NF=10;GC;NR=20;NS=52;CA=0;DP=390
-1	2931584	.	GTGGTGTTTTCATT	GT	100	PASS	AF=0.171247;HP=1;NF=23;NR=10;NS=52;CA=0;DP=486
-1	2932462	.	GT	GTGAT	56	PASS	AF=0.766604;HP=1;NF=33;NR=13;NS=52;CA=M;DP=790
-1	2932531	.	GT	GTGGTGAT	56	PASS	AF=0.365205;HP=1;NF=19;NR=4;NS=52;CA=M;DP=738
-1	2938240	rs57953122;-/AAGCC	AC	ACCAAGC	100	PASS	AF=0.229942;HP=2;DB;NF=5;NR=7;NS=52;CA=0;DP=387
-1	2939820	rs35035410;-/C,venter	GCC	GC	100	PASS	AF=0.270114;HP=6;DB;NF=15;NR=21;NS=52;CA=0;DP=477
-1	2940602	.	GA	GAA	100	PASS	AF=0.245189;HP=10;NF=31;NR=30;NS=52;CA=0;DP=516
-1	2941986	.	ACCC	AC	100	PASS	AF=0.242307;HP=10;NF=20;NR=20;NS=52;CA=0;DP=471
-1	2943041	rs34450334;-/G,mills	CGG	CG	100	PASS	AF=0.212427;HP=8;DB;NF=13;NR=12;NS=52;CA=0;DP=523
-1	2943605	rs5772091;-/C,mills	GC	GCC	100	PASS	AF=0.155328;HP=1;DB;NF=7;NR=7;NS=52;CA=0;DP=349
-1	2946559	.	TT	TTGT	100	PASS	AF=0.174249;HP=3;NF=13;NR=14;NS=52;CA=0;DP=596
-1	2948391	.	TT	TTTTTCT	100	PASS	AF=0.137955;HP=5;NF=19;NR=16;NS=52;CA=0;DP=557
-1	2949076	rs33910396;-/G,mills	CG	CGG	100	PASS	AF=0.102902;HP=1;DB;NF=3;NR=8;NS=52;CA=0;DP=413
-1	2950056	.	TC	TCAAACAAAC	100	PASS	AF=0.133966;HP=1;NF=9;NR=9;NS=51;CA=0;DP=587
-1	2950689	rs60031908;-/A	CAA	CA	100	PASS	AF=0.200188;HP=8;DB;NF=20;NR=25;NS=51;CA=0;DP=517
-1	2958314	.	CC	CCCATC	100	PASS	AF=0.190271;HP=3;NF=39;NR=18;NS=52;CA=M;DP=454
-1	2961502	rs60708459;-/T	AT	ATT	100	PASS	AF=0.219472;HP=3;DB;NF=14;NR=16;NS=52;CA=0;DP=460
-1	2968615	.	AG	AGG	100	PASS	AF=0.288912;HP=2;NF=11;NR=13;NS=51;CA=0;DP=324
-1	2982005	.	GT	GGGTT	100	PASS	AF=0.189932;HP=5;NF=6;NR=5;NS=52;CA=0;DP=460
-1	2984462	rs34471979;-/C,venter	TCC	TC	100	PASS	AF=0.423837;HP=2;DB;NF=20;NR=27;NS=51;CA=0;DP=459
-1	2985828	rs5772093;-/TTCGGGG,mills,venter,watson	CT	CTTCGGGGT	100	PASS	AF=0.888966;HP=1;DB;NF=22;NR=15;NS=49;CA=0;DP=372
-1	2987353	.	AGTG	AG	39	PASS	AF=0.0534166;HP=1;NF=13;NR=12;NS=51;CA=0;DP=341
-1	2990018	.	TC	TGC	51	PASS	AF=0.347647;HP=1;NF=9;NR=5;NS=52;CA=0;DP=328
-1	2992552	rs55740340;-/TTGT,mills,venter,watson	CT	CTGTTT	100	PASS	AF=0.633228;HP=1;DB;NF=31;NR=31;NS=52;CA=0;DP=471
-1	2994869	.	TT	TTTAT	48	PASS	AF=0.246512;HP=4;NF=8;NR=15;NS=49;CA=0;DP=238
-1	2996339	rs60239912;-/TCATTCAT	CT	CTCATTCATT	100	PASS	AF=0.288255;HP=1;DB;NF=27;NR=24;NS=52;CA=0;DP=550
-1	2996940	.	TG	TGGG	52	PASS	AF=0.252534;HP=1;NF=5;NR=3;NS=51;CA=0;DP=485
-1	2997430	rs58914207;-/TC	TTCT	TT	17	PASS	AF=0.0239916;HP=3;DB;NF=1;NR=3;NS=51;CA=0;DP=533
-1	2998548	rs3067411;-/GC,mills,watson	TT	TGCT	100	PASS	AF=0.513959;HP=2;DB;NF=16;NR=33;NS=51;CA=0;DP=457
-1	2998746	rs33948447;-/CTGAGGGTAT,mills,watson	CCTGAGGGTATC	CC	100	PASS	AF=0.567187;HP=2;DB;NF=32;NR=26;NS=51;CA=0;DP=446
-1	2998922	rs3067390;-/CA,mills,watson	CTGT	CT	100	PASS	AF=0.344398;HP=1;DB;NF=25;NR=25;NS=52;CA=0;DP=544
-1	3001309	.	TCTTCC	TC	100	PASS	AF=0.122521;HP=1;NF=13;NR=16;NS=51;CA=0;DP=463
-1	3003643	rs34727240;-/A	CA	CAA	100	PASS	AF=0.30407;HP=4;DB;NF=23;NR=14;NS=51;CA=0;DP=462
-1	3003980	.	ATTCT	AT	100	PASS	AF=0.0770408;HP=2;NF=12;NR=8;NS=51;CA=0;DP=436
-1	3015507	rs36215320;-/AATAAT,mills	AAATAATA	AA	100	PASS	AF=0.341849;HP=4;DB;NF=19;NR=21;NS=52;CA=M;DP=287
-1	3020627	.	GC	GCGCGCAC	45	PASS	AF=0.0864166;HP=1;NF=3;NR=4;NS=52;CA=0;DP=675
-1	3020729	.	GCAC	GC	100	PASS	AF=0.270815;HP=1;NF=26;NR=22;NS=52;CA=0;DP=511
-1	3020780	.	GCAC	GC	100	PASS	AF=0.0529136;HP=1;NF=14;NR=13;NS=52;CA=0;DP=580
-1	3020851	rs36140038;-/G,venter	CC	CGC	100	PASS	AF=0.0570603;HP=2;DB;NF=7;NR=8;NS=52;CA=0;DP=580
-1	3020930	.	GCAC	GC	100	PASS	AF=0.0608239;HP=1;NF=21;NR=20;NS=52;CA=0;DP=662
-1	3020996	.	ACT	AT	100	PASS	AF=0.0376658;HP=1;NF=4;NR=2;NS=52;CA=0;DP=646
-1	3021049	rs58793198;-/CA	AA	AACA	100	PASS	AF=0.0822964;HP=2;DB;NF=19;NR=18;NS=52;CA=0;DP=756
-1	3024532	.	TGTGTGCG	TG	100	PASS	AF=0.0453628;HP=1;NF=12;NR=35;NS=51;CA=0;DP=585
-1	3035092	venter,watson	CTCCCACCATGCTACTGGAGACCAT	CT	100	PASS	AF=0.175148;HP=1;NF=41;NR=54;NS=51;CA=0;DP=464
-1	3035605	rs56967751;-/TG,venter,watson	AG	AGTG	100	PASS	AF=0.387697;HP=1;DB;NF=30;NR=25;NS=51;CA=0;DP=671
-1	3035812	.	CGTG	CG	100	PASS	AF=0.051827;HP=1;NF=28;NR=20;NS=51;CA=0;DP=643
-1	3035887	.	ATGT	AT	50	PASS	AF=0.0421027;HP=1;NF=24;NR=34;NS=52;CA=0;DP=556
-1	3036291	rs36033160;-/CCG	CT	CCCGT	100	PASS	AF=0.0605711;HP=1;DB;NF=3;NR=5;NS=51;CA=0;DP=428
-1	3037949	rs34840011;-/A,venter	TA	TAA	100	PASS	AF=0.096326;HP=8;DB;NF=5;NR=6;NS=52;CA=0;DP=462
-1	3046082	rs35271327;-/T	AT	ATT	19	PASS	AF=0.0473995;HP=7;DB;NF=9;NR=8;NS=52;CA=0;DP=430
-1	3049499	.	ACC	AC	27	PASS	AF=0.0269129;HP=3;NF=3;NR=1;NS=51;CA=0;DP=373
-1	3053337	.	TGG	TG	100	PASS	AF=0.205181;HP=7;NF=15;NR=19;NS=52;CA=0;DP=424
-1	3058772	.	TCATCC	TC	100	PASS	AF=0.716787;HP=1;NF=61;NR=51;NS=52;CA=0;DP=435
-1	3069377	.	CATGGT	CT	100	PASS	AF=0.42044;HP=1;NF=3;NR=14;NS=48;CA=M;DP=257
-1	3076481	rs35945121;-/T,mills	ATT	AT	100	PASS	AF=0.33892;HP=10;DB;NF=9;NR=38;NS=52;CA=0;DP=438
-1	3079028	.	TA	TCA	100	PASS	AF=0.0528803;HP=1;NF=5;NR=3;NS=51;CA=0;DP=475
-1	3084256	watson	AGTTTAGATACTG	AG	100	PASS	AF=0.123981;HP=1;NF=18;NR=14;NS=52;CA=0;DP=554
-1	3087172	rs34468831;-/A	GAA	GA	100	PASS	AF=0.0618762;HP=3;DB;NF=2;NR=5;NS=50;CA=0;DP=475
-1	3087517	.	CACACGCAGTCTTA	CA	100	PASS	AF=0.637316;HP=1;NF=41;NR=37;NS=52;CA=0;DP=973
-1	3087777	.	TA	TACA	100	PASS	AF=0.377666;HP=1;NF=43;NR=55;NS=52;CA=M;DP=966
-1	3087871	.	CACGGTCTTA	CA	100	PASS	AF=0.589214;HP=1;NF=16;NR=14;NS=51;CA=0;DP=710
-1	3087938	.	AG	AGTCTTACACAAGCGG	100	PASS	AF=0.469462;HP=1;NF=28;NR=29;NS=52;CA=M;DP=816
-1	3088154	.	GG	GCAG	100	PASS	AF=0.0511127;HP=2;NF=11;NR=10;NS=52;CA=M;DP=894
-1	3088232	rs35125658;-/TT	GG	GCAG	100	PASS	AF=0.0967781;HP=2;DB;NF=3;NR=24;NS=51;CA=M;DP=938
-1	3088301	.	CT	CTTGCACACGCAGTTT	47	PASS	AF=0.0188781;HP=2;NF=5;NR=2;NS=51;CA=M;DP=684
-1	3105704	rs35372326;-/G,mills	CGG	CG	100	PASS	AF=0.0956114;HP=2;DB;NF=6;NR=4;NS=52;CA=0;DP=378
-1	3107408	rs5772098;-/G,mills	AG	AGG	100	PASS	AF=0.107417;HP=5;DB;NF=19;NR=15;NS=52;CA=0;DP=504
-1	3107714	rs34461209;-/G,venter	TG	TGG	100	PASS	AF=0.61875;HP=3;DB;NF=21;NR=28;NS=52;CA=0;DP=454
-1	3108534	rs59512254;-/GA	GGAG	GG	100	PASS	AF=0.184609;HP=2;DB;NF=17;NR=11;NS=52;CA=0;DP=510
-1	3121064	.	TG	TGAG	59	PASS	AF=0.0221492;HP=1;NF=7;NR=3;NS=52;CA=0;DP=555
-1	3131583	rs57750843;-/A	GAA	GA	100	PASS	AF=0.166149;HP=9;DB;NF=21;NR=20;NS=52;CA=0;DP=490
-1	3131742	.	GT	GGGGGGGGGTT	27	PASS	AF=0.243052;HP=3;NF=2;NR=1;NS=49;CA=0;DP=394
-1	3135855	rs34340862;-/TAA,mills	CT	CTAAT	100	PASS	AF=0.183257;HP=1;DB;NF=11;NR=9;NS=51;CA=0;DP=520
-1	3146366	.	GGAG	GG	100	PASS	AF=0.040688;HP=4;NF=13;NR=14;NS=51;CA=0;DP=434
-1	3152159	.	AT	ATT	100	PASS	AF=0.0396994;HP=4;NF=8;NR=9;NS=52;CA=0;DP=489
-1	3157729	venter,watson	AG	AGGGGTGAGGTG	100	PASS	AF=0.830079;HP=4;NF=30;NR=23;NS=51;CA=0;DP=548
-1	3158807	.	AGG	AG	100	PASS	AF=0.705976;HP=6;NF=35;NR=30;NS=52;CA=0;DP=371
-1	3158885	.	CATG	CG	100	PASS	AF=0.09216;HP=1;NF=6;NR=6;NS=51;CA=0;DP=375
-1	3163280	.	CAAAATA	CA	100	PASS	AF=0.148526;HP=4;NF=13;NR=1;NS=49;CA=M;DP=326
-1	3164018	rs5772100;-/A,mills,venter	TAA	TA	100	PASS	AF=0.999998;HP=3;DB;NF=67;NR=69;NS=52;CA=0;DP=511
-1	3174387	.	CAGG	CG	17	PASS	AF=0.0141709;HP=1;NF=1;NR=2;NS=51;CA=0;DP=428
-1	3176024	.	GACAGTCCCAGAGGAGCA	GA	44	PASS	AF=0.0444872;HP=1;NF=3;NR=10;NS=52;CA=M;DP=480
-1	3177102	.	AG	AGAGGAGGACAGTCGGGGAGGACAGTCCCGG	100	PASS	AF=0.346135;HP=1;NF=8;NR=13;NS=52;CA=0;DP=550
-1	3179862	rs35987870;-/GTGG	ATGTGT	AT	100	PASS	AF=0.0762534;HP=1;DB;NF=17;NR=17;NS=51;CA=0;DP=618
-1	3183094	rs33953525;-/GGTGCCGTGAACAGAGCCAGCGAGG,mills	AG	AGGTGCCGTGAACAGAGCCAGCGAGGG	100	PASS	AF=0.665581;HP=2;DB;NF=15;NR=15;NS=52;CA=0;DP=424
-1	3183166	rs35451643;-/C,venter	TCC	TC	100	PASS	AF=0.123295;HP=4;DB;NF=12;NR=6;NS=52;CA=0;DP=460
-1	3184208	rs59663829;-/GCACACACAA	TA	TGCACACACAAA	100	PASS	AF=0.152939;HP=1;DB;NF=4;NR=4;NS=52;CA=0;DP=733
-1	3186299	.	ACC	AC	100	PASS	AF=0.951135;HP=8;NF=16;NR=14;NS=51;CA=0;DP=311
-1	3202609	.	TG	TGGGGGGG	11	PASS	AF=0.122471;HP=1;NF=3;NR=3;NS=52;CA=0;DP=479
-1	3292566	.	TC	TCGGGGTGCCC	12	PASS	AF=0.209628;HP=1;NF=22;NR=17;NS=51;CA=0;DP=462
-1	3292669	.	AAGA	AA	100	PASS	AF=0.312194;HP=8;NF=13;NR=14;NS=51;CA=0;DP=483
-1	3293018	rs35846516;-/A,venter	GAA	GA	100	PASS	AF=0.791047;HP=9;DB;NF=59;NR=44;NS=51;CA=0;DP=507
-1	3293422	rs34150215;-/A,mills,venter	TA	TAA	100	PASS	AF=0.418316;HP=7;DB;NF=27;NR=18;NS=52;CA=0;DP=481
-1	3307979	rs35082175;-/A,venter	CAT	CT	100	PASS	AF=0.379363;HP=1;DB;NF=36;NR=25;NS=52;CA=0;DP=659
-1	3308056	.	CATA	CA	100	PASS	AF=0.0313721;HP=1;NF=4;NR=5;NS=52;CA=0;DP=699
-1	3308306	rs34659426;-/AA	CAAA	CA	100	PASS	AF=0.238591;HP=3;DB;NF=23;NR=22;NS=52;CA=0;DP=732
-1	3308692	.	GC	GCC	100	PASS	AF=0.610676;HP=6;NF=23;NR=26;NS=52;CA=0;DP=447
-1	3309461	.	ACCCTCCTCTGAGTCTTCCTCCCCTTCCCGTGC	AC	100	PASS	AF=0.218197;HP=3;NF=28;NR=41;NS=51;CA=0;DP=430
-1	3313004	.	ATT	AT	18	PASS	AF=0.117282;HP=10;NF=22;NR=12;NS=51;CA=0;DP=407
-1	3315219	rs35154920;-/GT	CG	CGTG	100	PASS	AF=0.407055;HP=1;DB;NF=23;NR=17;NS=52;CA=0;DP=498
-1	3315279	rs34306698;-/AT	CG	CATG	100	PASS	AF=0.27165;HP=1;DB;NF=18;NR=10;NS=51;CA=0;DP=460
-1	3315552	rs61650876;-/ATGT	CATGTG	CG	100	PASS	AF=0.074251;HP=1;DB;NF=10;NR=7;NS=52;CA=0;DP=612
-1	3315608	.	CGTG	CG	44	PASS	AF=0.0200264;HP=1;NF=15;NR=25;NS=52;CA=0;DP=622
-1	3316180	rs34769314;-/GTGA	TGTGAG	TG	100	PASS	AF=0.13026;HP=1;DB;NF=29;NR=21;NS=52;CA=0;DP=930
-1	3316258	rs57503175;-/TGTATGTGCGTGTGTGTGGTGTG	GG	GGTGTGTGGTGTGTGTATGTGCGTG	100	PASS	AF=0.277124;HP=3;DB;NF=3;NR=11;NS=52;CA=0;DP=898
-1	3316338	rs34133894;-/GT	GGTG	GG	100	PASS	AF=0.121606;HP=2;DB;NF=18;NR=27;NS=52;CA=0;DP=901
-1	3316408	.	TGG	TG	100	PASS	AF=0.153074;HP=7;NF=23;NR=10;NS=52;CA=0;DP=898
-1	3316476	rs60842130;-/GTG	TGTGG	TG	43	PASS	AF=0.0151943;HP=1;DB;NF=4;NR=1;NS=52;CA=0;DP=732
-1	3317481	rs34240659;-/AT	CATA	CA	100	PASS	AF=0.127605;HP=1;DB;NF=14;NR=8;NS=52;CA=0;DP=538
-1	3319964	.	ACC	AC	100	PASS	AF=0.0511239;HP=5;NF=12;NR=4;NS=52;CA=0;DP=505
-1	3327173	rs56093721;-/A,venter	TAA	TA	100	PASS	AF=0.89527;HP=9;DB;NF=37;NR=68;NS=52;CA=0;DP=540
-1	3328302	.	AG	AGGGGGG	53	PASS	AF=0.124625;HP=2;NF=13;NR=2;NS=52;CA=0;DP=585
-1	3335208	.	CGG	CG	100	PASS	AF=0.0438559;HP=2;NF=3;NR=3;NS=52;CA=0;DP=448
-1	3335551	rs34869178;-/T	CTC	CC	100	PASS	AF=0.0947355;HP=1;DB;NF=4;NR=8;NS=52;CA=0;DP=487
-1	3342021	rs34485545;-/A	TA	TAA	100	PASS	AF=0.154806;HP=9;DB;NF=25;NR=23;NS=52;CA=0;DP=444
-1	3347098	venter	CG	CAG	100	PASS	AF=0.931731;HP=1;NF=49;NR=54;NS=52;CA=0;DP=497
-1	3348129	rs55866341;-/G,venter	CG	CGG	100	PASS	AF=0.883294;HP=1;DB;NF=55;NR=55;NS=52;CA=0;DP=521
-1	3352897	.	AA	ACA	46	PASS	AF=0.0385898;HP=6;NF=2;NR=6;NS=51;CA=0;DP=407
-1	3353821	rs34792713;-/T	AT	ATT	36	PASS	AF=0.0290672;HP=1;DB;NF=3;NR=3;NS=52;CA=0;DP=428
-1	3356271	.	TTCCT	TT	15	PASS	AF=0.00990969;HP=3;NF=1;NR=1;NS=52;CA=0;DP=537
-1	3356391	rs4018597;-/TA	TT	TTAT	100	PASS	AF=0.0517593;HP=2;DB;NF=13;NR=11;NS=52;CA=0;DP=475
-1	3356436	rs5772104;-/GT	CGTG	CG	100	PASS	AF=0.82813;HP=1;DB;NF=59;NR=53;NS=51;CA=0;DP=449
-1	3356871	.	CATG	CG	26	PASS	AF=0.0193592;HP=1;NF=1;NR=3;NS=51;CA=0;DP=430
-1	3359412	rs34037774;-/G,venter	TGG	TG	59	PASS	AF=0.0301496;HP=2;DB;NF=4;NR=5;NS=52;CA=0;DP=451
-1	3370575	rs35597752;-/TG,venter,watson	CTGT	CT	100	PASS	AF=0.760154;HP=1;DB;NF=43;NR=36;NS=52;CA=0;DP=405
-1	3372018	rs34109718;-/G,venter	CGG	CG	100	PASS	AF=0.891318;HP=3;DB;NF=46;NR=36;NS=51;CA=0;DP=349
-1	3383745	rs57207202;-/C	AC	ACC	100	PASS	AF=0.182529;HP=4;DB;NF=9;NR=7;NS=47;CA=D;DP=229
-1	3384084	rs5772105;-/G,mills,venter	CG	CGG	100	PASS	AF=0.937697;HP=2;DB;NF=49;NR=47;NS=50;CA=0;DP=457
-1	3385833	rs5772106;-/CC,mills,venter,watson	ACCC	AC	100	PASS	AF=0.778535;HP=5;DB;NF=33;NR=14;NS=51;CA=0;DP=418
-1	3387275	rs56102150;-/TC,venter	CC	CCTC	100	PASS	AF=0.999995;HP=4;DB;NF=16;NR=36;NS=50;CA=0;DP=364
-1	3388739	rs58188396;-/GGGGGGCGGGTAGCC	GG	GGGGGGGCGGGTAGCCG	40	PASS	AF=0.263678;HP=7;DB;NF=3;NR=2;NS=48;CA=0;DP=326
-1	3393157	.	AAAAAATA	AA	100	PASS	AF=0.0549314;HP=6;NF=23;NR=18;NS=51;CA=0;DP=468
-1	3393524	.	GGTGTG	GG	23	PASS	AF=0.017751;HP=2;NF=1;NR=19;NS=49;CA=0;DP=266
-1	3409800	.	AAGA	AA	100	PASS	AF=0.0431791;HP=3;NF=1;NR=8;NS=51;CA=0;DP=643
-1	3410131	rs58666986;-/GTGT	ATGTGT	AT	100	PASS	AF=0.0433727;HP=1;DB;NF=7;NR=13;NS=52;CA=0;DP=603
-1	3411485	rs60864742;-/ACACCGGTAGCAAGGCA,mills	ACACCGGTAGCAAGGCACC	AC	100	PASS	AF=0.0858716;HP=1;DB;NF=8;NR=17;NS=52;CA=0;DP=523
-1	3417374	.	GCACACGCCCCCACCC	GC	20	PASS	AF=0.0294079;HP=1;NF=4;NR=3;NS=50;CA=0;DP=447
-1	3429498	rs56204236;-/G	CG	CGG	100	PASS	AF=0.596026;HP=10;DB;NF=6;NR=7;NS=51;CA=0;DP=322
-1	3435396	.	CACAGA	CA	100	PASS	AF=0.0433621;HP=1;NF=2;NR=6;NS=52;CA=0;DP=457
-1	3442767	rs36106109;-/G	CG	CGG	100	PASS	AF=0.112939;HP=5;DB;NF=5;NR=6;NS=50;CA=0;DP=369
-1	3451064	rs36030995;-/C	GC	GCC	100	PASS	AF=0.385449;HP=5;DB;NF=22;NR=12;NS=50;CA=0;DP=388
-1	3456931	rs35289361;-/G	AG	AGG	100	PASS	AF=0.0676076;HP=4;DB;NF=11;NR=9;NS=52;CA=0;DP=554
-1	3467274	watson	GGGCTG	GG	100	PASS	AF=0.132596;HP=3;NF=16;NR=12;NS=51;CA=0;DP=428
-1	3475422	rs61428836;-/G	TG	TGG	100	PASS	AF=0.0480433;HP=3;DB;NF=6;NR=10;NS=52;CA=0;DP=468
-1	3482055	.	CA	CGTCTTATA	100	PASS	AF=0.593516;HP=1;NF=10;NR=11;NS=49;CA=M;DP=256
-1	3482413	mills,watson	TCTCC	TC	100	PASS	AF=0.414589;HP=1;NF=24;NR=32;NS=51;CA=0;DP=496
-1	3485140	venter,watson	CCAAC	CC	100	PASS	AF=0.714294;HP=2;NF=21;NR=32;NS=52;CA=0;DP=460
-1	3486991	rs35452084;-/G,venter	AGG	AG	100	PASS	AF=0.744909;HP=4;DB;NF=15;NR=35;NS=50;CA=0;DP=363
-1	3492812	.	CGTG	CG	14	PASS	AF=0.0148914;HP=1;NF=22;NR=26;NS=51;CA=0;DP=585
-1	3494290	.	AC	ACAGGACCGGCC	100	PASS	AF=0.117184;HP=1;NF=2;NR=22;NS=52;CA=0;DP=464
-1	3496820	rs34860893;-/C,mills,venter	ACC	AC	100	PASS	AF=0.924032;HP=7;DB;NF=33;NR=48;NS=52;CA=0;DP=386
-1	3504928	rs36094767;-/C,venter	TC	TCC	100	PASS	AF=0.786142;HP=4;DB;NF=23;NR=43;NS=51;CA=0;DP=405
-1	3511572	rs3072238;-/TCAC,venter	ACACTC	AC	100	PASS	AF=0.160871;HP=1;DB;NF=22;NR=22;NS=52;CA=0;DP=824
-1	3511789	rs59801836;-/CTCA,watson	ACACTC	AC	100	PASS	AF=0.620819;HP=1;DB;NF=54;NR=52;NS=52;CA=0;DP=740
-1	3511919	.	TACA	TA	100	PASS	AF=0.049568;HP=1;NF=20;NR=22;NS=52;CA=0;DP=729
-1	3511980	rs57128321;-/ACTC,venter,watson	AC	ACACTC	100	PASS	AF=0.937206;HP=1;DB;NF=63;NR=38;NS=52;CA=0;DP=712
-1	3512089	rs61705210;-/TCACAC,venter,watson	AACTCACA	AA	100	PASS	AF=0.658764;HP=3;DB;NF=65;NR=52;NS=52;CA=0;DP=808
-1	3516936	rs60239345;-/CA,venter	CG	CCAG	100	PASS	AF=0.999997;HP=1;DB;NF=52;NR=26;NS=52;CA=0;DP=391
-1	3519155	rs35740208;-/G,venter	AGG	AG	100	PASS	AF=0.108418;HP=3;DB;NF=7;NR=11;NS=51;CA=0;DP=505
-1	3523781	rs56339243;-/GGCTCC,venter,watson	AC	ACCGGCTC	100	PASS	AF=0.603986;HP=3;DB;NF=20;NR=23;NS=52;CA=0;DP=449
-1	3526023	.	GGCACTTCCCGCCCCCGTCACCCCTGCCGCCATG	GG	100	PASS	AF=0.227609;HP=2;NF=10;NR=15;NS=52;CA=0;DP=454
-1	3526486	rs35020651;-/C,venter	TC	TCC	100	PASS	AF=0.389171;HP=3;DB;NF=32;NR=20;NS=52;CA=0;DP=470
-1	3530060	.	TGG	TG	100	PASS	AF=0.033793;HP=3;NF=6;NR=1;NS=52;CA=0;DP=540
-1	3531966	rs3838971;-/C	TG	TGG	100	PASS	AF=0.155382;HP=6;DB;NF=14;NR=11;NS=49;CA=0;DP=292
-1	3534095	rs35816205;-/A,mills,venter	TAA	TA	100	PASS	AF=0.160054;HP=3;DB;NF=9;NR=10;NS=52;CA=0;DP=455
-1	3535035	rs58849058;-/TCTGGGAGCTCCTCCCCCT,venter,watson	GTTCTGGGAGCTCCTCCCCCT	GT	100	PASS	AF=0.609724;HP=2;DB;NF=50;NR=48;NS=52;CA=0;DP=487
-1	3535985	.	CCAAAC	CC	100	PASS	AF=0.116123;HP=2;NF=10;NR=13;NS=51;CA=0;DP=553
-1	3536124	rs55905548;-/GGCG,venter,watson	CCGGGC	CC	100	PASS	AF=0.45742;HP=3;DB;NF=28;NR=31;NS=51;CA=0;DP=499
-1	3543853	.	TC	TCC	100	PASS	AF=0.156605;HP=6;NF=12;NR=13;NS=52;CA=0;DP=527
-1	3549495	.	AC	ACCCCC	34	PASS	AF=0.0959154;HP=1;NF=1;NR=3;NS=52;CA=0;DP=496
-1	3553372	rs34514629;-/C,venter	GCA	GA	100	PASS	AF=0.652107;HP=1;DB;NF=45;NR=47;NS=52;CA=0;DP=551
-1	3556485	rs3831025;-/CAGCCTGC,venter,watson	AGCAGGCTGC	AC	100	PASS	AF=0.38103;HP=1;DB;NF=13;NR=9;NS=49;CA=0;DP=292
-1	3556883	.	CA	CATA	14	PASS	AF=0.0221011;HP=1;NF=9;NR=13;NS=50;CA=0;DP=436
-1	3563429	.	CG	CGGGGG	56	PASS	AF=0.17049;HP=2;NF=3;NR=7;NS=52;CA=0;DP=586
-1	3564334	rs3034639;-/GT,mills	GA	GACA	100	PASS	AF=0.227635;HP=1;DB;NF=10;NR=13;NS=50;CA=0;DP=364
-1	3564964	rs5772113;-/G	TGG	TG	100	PASS	AF=0.220888;HP=2;DB;NF=11;NR=18;NS=50;CA=0;DP=408
-1	3565238	venter	GGTCTCCTACAGTCATATTTTGGGGTGACGTATTCTAG	GG	100	PASS	AF=0.145422;HP=2;NF=1;NR=10;NS=52;CA=M;DP=323
-1	3566253	rs57149403;-/GTCCAGC	AC	ACGTCCAGC	100	PASS	AF=0.0476733;HP=1;DB;NF=3;NR=3;NS=52;CA=0;DP=363
-1	3567114	.	ATG	AG	100	PASS	AF=0.0358982;HP=1;NF=3;NR=5;NS=52;CA=0;DP=555
-1	3568146	rs3034606;-/TA	GTAT	GT	100	PASS	AF=0.533957;HP=1;DB;NF=12;NR=29;NS=51;CA=0;DP=247
-1	3570893	rs34305694;-/C	TCC	TC	100	PASS	AF=0.0467251;HP=2;DB;NF=5;NR=3;NS=52;CA=0;DP=443
-1	3574939	.	CG	CGTGTGTG	23	PASS	AF=0.401022;HP=1;NF=46;NR=32;NS=52;CA=0;DP=481
-1	3586002	.	ACTC	AC	100	PASS	AF=0.157197;HP=1;NF=17;NR=24;NS=52;CA=0;DP=691
-1	3586231	rs61542341;-/GTCTCT	CTCTCTGT	CT	12	PASS	AF=0.0310208;HP=1;DB;NF=1;NR=11;NS=52;CA=M;DP=400
-1	3586281	.	CTTT	CT	21	PASS	AF=0.115475;HP=3;NF=1;NR=3;NS=51;CA=M;DP=469
-1	3589610	rs57492244;-/G	TGG	TG	100	PASS	AF=0.0691843;HP=7;DB;NF=11;NR=8;NS=51;CA=0;DP=527
-1	3593995	rs57765962;-/AT,watson	AATG	AG	100	PASS	AF=0.127015;HP=2;DB;NF=10;NR=8;NS=52;CA=0;DP=423
-1	3603570	.	GCGGGGCCCACCTCGCACCCGCGGCCCACGTCGCACCC	GC	100	PASS	AF=0.0758905;HP=1;NF=8;NR=12;NS=51;CA=0;DP=414
-1	3606881	rs5772119;-/A,venter	TAG	TG	100	PASS	AF=0.333638;HP=1;DB;NF=12;NR=36;NS=51;CA=0;DP=522
-1	3618309	rs3841787;-/TG,watson	CATG	CG	100	PASS	AF=0.219932;HP=1;DB;NF=14;NR=14;NS=50;CA=0;DP=449
-1	3619353	venter	GCCCCTGCC	GC	100	PASS	AF=0.290838;HP=4;NF=18;NR=8;NS=51;CA=0;DP=322
-1	3629994	rs35939665;-/CTGC,mills,venter,watson	TCTGCC	TC	100	PASS	AF=0.953969;HP=1;DB;NF=43;NR=31;NS=51;CA=0;DP=364
-1	3630547	rs35380007;-/A,venter	TA	TAA	100	PASS	AF=0.373122;HP=2;DB;NF=20;NR=12;NS=51;CA=0;DP=293
-1	3632819	rs61728692;-/CGGA	GT	GCGGAT	100	PASS	AF=0.63605;HP=1;DB;NF=18;NR=3;NS=48;CA=0;DP=238
-1	3632891	.	GGATTG	GG	46	PASS	AF=0.024415;HP=2;NF=4;NR=2;NS=49;CA=0;DP=381
-1	3633325	.	CG	CGATGGATGGGTGG	100	PASS	AF=0.870192;HP=1;NF=3;NR=4;NS=52;CA=0;DP=751
-1	3635416	rs3034587;-/CTCTCT,mills,venter	AA	AAGAGAGA	100	PASS	AF=0.707697;HP=3;DB;NF=37;NR=27;NS=52;CA=0;DP=538
-1	3643833	.	AC	ACCC	25	PASS	AF=0.0664372;HP=1;NF=3;NR=3;NS=51;CA=0;DP=511
-1	3648954	rs3216059;-/G	AG	AGG	100	PASS	AF=0.42719;HP=4;DB;NF=35;NR=35;NS=51;CA=0;DP=551
-1	3660684	.	GA	GCA	100	PASS	AF=0.136632;HP=1;NF=2;NR=10;NS=49;CA=0;DP=480
-1	3663009	rs35440871;-/AA	CAAG	CG	100	PASS	AF=0.2595;HP=2;DB;NF=19;NR=14;NS=51;CA=0;DP=498
-1	3665663	rs60798590;-/TATTTAAAAAT,watson	CA	CAATTATTTAAAA	33	PASS	AF=0.0338921;HP=2;DB;NF=8;NR=3;NS=51;CA=0;DP=388
-1	3665995	.	TTTGAAACT	TT	33	PASS	AF=0.00986571;HP=4;NF=1;NR=3;NS=52;CA=0;DP=507
-1	3668078	.	AGG	AG	100	PASS	AF=0.341281;HP=8;NF=21;NR=29;NS=52;CA=0;DP=467
-1	3677245	rs36002367;-/AG	AAGA	AA	100	PASS	AF=0.137474;HP=3;DB;NF=6;NR=10;NS=52;CA=0;DP=521
-1	3680208	.	TG	TGG	10	PASS	AF=0.0239017;HP=1;NF=7;NR=5;NS=51;CA=0;DP=448
-1	3681294	venter	CC	CGCAC	100	PASS	AF=0.200075;HP=8;NF=7;NR=2;NS=50;CA=0;DP=245
-1	3682989	rs35616712;-/C	TCC	TC	100	PASS	AF=0.0813904;HP=3;DB;NF=9;NR=3;NS=51;CA=0;DP=447
-1	3684305	venter	CG	CGG	100	PASS	AF=0.0596707;HP=3;NF=4;NR=6;NS=51;CA=0;DP=416
-1	3686623	rs35661250;-/AG	CA	CAGA	100	PASS	AF=0.0609898;HP=1;DB;NF=5;NR=6;NS=52;CA=0;DP=626
-1	3691009	rs35756038;-/A,venter	CAA	CA	100	PASS	AF=0.444393;HP=2;DB;NF=24;NR=32;NS=52;CA=0;DP=562
-1	3696676	.	CCTG	CG	100	PASS	AF=0.102585;HP=4;NF=7;NR=6;NS=52;CA=0;DP=502
-1	3697316	rs34679063;-/C,venter	GC	GCC	100	PASS	AF=0.8246;HP=1;DB;NF=51;NR=32;NS=52;CA=0;DP=438
-1	3704105	.	TT	TTAATTTTTATATTAACCGTGTTAATAT	100	PASS	AF=0.377269;HP=2;NF=17;NR=26;NS=52;CA=0;DP=476
-1	3708451	watson	TG	TGGAGG	43	PASS	AF=0.0406373;HP=2;NF=3;NR=4;NS=52;CA=0;DP=587
-1	3710853	rs35447451;-/G,venter	AG	AGG	100	PASS	AF=0.272856;HP=4;DB;NF=25;NR=31;NS=52;CA=0;DP=507
-1	3711553	rs36007194;-/T	AT	ATT	100	PASS	AF=0.093968;HP=10;DB;NF=11;NR=13;NS=52;CA=0;DP=515
-1	3712668	rs35364504;-/GA,venter	GGAG	GG	100	PASS	AF=0.369523;HP=5;DB;NF=18;NR=34;NS=51;CA=0;DP=320
-1	3713867	venter	TTTTATTTAT	TT	100	PASS	AF=0.301438;HP=5;NF=21;NR=36;NS=49;CA=0;DP=294
-1	3714365	rs58666367;-/CTCAT,venter,watson	GA	GATCTCA	100	PASS	AF=0.431722;HP=1;DB;NF=24;NR=17;NS=52;CA=0;DP=484
-1	3721514	rs3838969;-/A,venter	CG	CTG	100	PASS	AF=0.472733;HP=2;DB;NF=27;NR=26;NS=52;CA=0;DP=461
-1	3726918	rs34085838;-/G	CG	CGG	100	PASS	AF=0.242958;HP=1;DB;NF=17;NR=14;NS=52;CA=0;DP=479
-1	3728638	rs61301856;-/GA,venter,watson	TGAG	TG	100	PASS	AF=0.446341;HP=1;DB;NF=54;NR=33;NS=52;CA=0;DP=666
-1	3729131	rs56900717;-/A	TT	TAT	100	PASS	AF=0.489357;HP=2;DB;NF=33;NR=22;NS=52;CA=0;DP=466
-1	3733293	rs5772126;-/G,venter	TG	TGG	100	PASS	AF=0.701257;HP=2;DB;NF=17;NR=26;NS=51;CA=0;DP=451
-1	3733413	.	CA	CAA	100	PASS	AF=0.107016;HP=5;NF=12;NR=16;NS=52;CA=0;DP=523
-1	3735276	venter	TA	TAAA	100	PASS	AF=0.491527;HP=1;NF=29;NR=33;NS=52;CA=0;DP=477
-1	3737219	rs61056063;-/A	AGA	AA	11	PASS	AF=0.205567;HP=1;DB;NF=13;NR=6;NS=51;CA=0;DP=431
-1	3740075	rs35801288;-/C	ACA	AA	100	PASS	AF=0.438207;HP=1;DB;NF=35;NR=12;NS=52;CA=0;DP=395
-1	3741588	rs34966926;-/T,venter	GT	GTT	100	PASS	AF=0.212825;HP=10;DB;NF=21;NR=22;NS=51;CA=0;DP=541
-1	3748510	mills	TTTTTTAT	TT	53	PASS	AF=0.0323102;HP=7;NF=21;NR=15;NS=51;CA=0;DP=420
-1	3759325	.	CG	CGGCCAAGGAG	100	PASS	AF=0.391954;HP=2;NF=19;NR=18;NS=52;CA=0;DP=465
-1	3759824	.	CG	CGGG	22	PASS	AF=0.0355289;HP=5;NF=4;NR=8;NS=52;CA=0;DP=591
-1	3760224	rs61309375;-/A,venter	CAG	CG	100	PASS	AF=0.303624;HP=1;DB;NF=27;NR=13;NS=51;CA=0;DP=447
-1	3773150	.	CTT	CT	12	NoQCALL	AF=0.0786801;HP=2;NF=1;NR=9;NS=52;CA=0;DP=540
-1	3774838	.	GT	GTT	11	PASS	AF=0.0109686;HP=1;NF=2;NR=1;NS=52;CA=0;DP=492
-1	3774974	venter	CG	CTG	100	PASS	AF=0.552417;HP=1;NF=26;NR=38;NS=52;CA=0;DP=559
-1	3776839	.	TGG	TG	100	PASS	AF=0.0926011;HP=3;NF=5;NR=5;NS=52;CA=0;DP=441
-1	3780438	venter	CT	CTTT	100	PASS	AF=0.113197;HP=2;NF=10;NR=13;NS=52;CA=0;DP=654
-1	3780687	rs34664006;-/G	TGT	TT	50	PASS	AF=0.0614825;HP=1;DB;NF=4;NR=8;NS=50;CA=M;DP=299
-1	3784253	venter	ACTGTGCCGGCTTTCTATTC	AC	100	PASS	AF=0.0567473;HP=1;NF=81;NR=75;NS=52;CA=0;DP=627
-1	3786092	.	TACTCA	TA	100	PASS	AF=0.0330531;HP=1;NF=1;NR=6;NS=52;CA=0;DP=497
-1	3788460	rs35600694;-/ATA,watson	CA	CAATA	100	PASS	AF=0.42686;HP=1;DB;NF=20;NR=17;NS=51;CA=0;DP=533
-1	3788666	rs34172576;-/T,venter	GT	GTT	100	PASS	AF=0.481873;HP=1;DB;NF=26;NR=12;NS=52;CA=0;DP=409
-1	3804956	rs60302317;-/CAACA	AACAACA	AA	46	PASS	AF=0.0866272;HP=2;DB;NF=6;NR=2;NS=52;CA=M;DP=556
-1	3805210	rs58663935;-/AAAG	CA	CAAAGA	100	PASS	AF=0.0920558;HP=3;DB;NF=9;NR=2;NS=52;CA=0;DP=523
-1	3805480	.	GAA	GA	55	PASS	AF=0.0675729;HP=8;NF=13;NR=11;NS=52;CA=0;DP=539
-1	3805914	.	CCAGACACTGGCACCCCCCTTC	CC	100	PASS	AF=0.0288464;HP=2;NF=5;NR=4;NS=52;CA=0;DP=613
-1	3806447	rs35704040;-/C,mills	GCC	GC	100	PASS	AF=0.0700176;HP=6;DB;NF=4;NR=8;NS=52;CA=0;DP=350
-1	3807398	rs35759189;-/G,venter	AGG	AG	100	PASS	AF=0.324114;HP=3;DB;NF=21;NR=8;NS=50;CA=0;DP=355
-1	3808303	venter	GT	GTTCTTTTCTTT	100	PASS	AF=0.475205;HP=2;NF=19;NR=9;NS=52;CA=0;DP=264
-1	3809301	.	TACA	TA	100	PASS	AF=0.028676;HP=1;NF=26;NR=22;NS=52;CA=0;DP=553
-1	3813066	rs34938659;-/T	ATT	AT	100	PASS	AF=0.131264;HP=2;DB;NF=8;NR=6;NS=52;CA=0;DP=521
-1	3814885	.	TCACACACACACACACAC	TC	34	PASS	AF=0.149965;HP=1;NF=6;NR=2;NS=52;CA=M;DP=644
-1	3818483	.	AC	ACC	29	PASS	AF=0.0676027;HP=3;NF=1;NR=7;NS=50;CA=0;DP=412
-1	3820456	.	TGG	TG	12	PASS	AF=0.0215117;HP=4;NF=5;NR=1;NS=51;CA=0;DP=417
-1	3824944	.	GCTC	GC	100	PASS	AF=0.174164;HP=1;NF=9;NR=17;NS=50;CA=0;DP=277
-1	3825911	.	CG	CGGGGGG	100	PASS	AF=0.29134;HP=2;NF=24;NR=12;NS=52;CA=0;DP=514
-1	3827024	.	TTCCCT	TT	16	PASS	AF=0.0318298;HP=2;NF=34;NR=70;NS=51;CA=M;DP=394
-1	3827604	.	TG	TGG	40	PASS	AF=0.0159039;HP=1;NF=2;NR=5;NS=52;CA=0;DP=571
-1	3833062	watson	TC	TCCACC	100	PASS	AF=0.312659;HP=2;NF=17;NR=16;NS=52;CA=0;DP=463
-1	3833266	venter,watson	AT	ATCAGT	100	PASS	AF=0.497122;HP=1;NF=10;NR=19;NS=51;CA=0;DP=412
-1	3833395	.	CTATCTT	CT	24	PASS	AF=0.0218407;HP=1;NF=7;NR=3;NS=50;CA=0;DP=400
-1	3833485	.	GTCTAT	GT	100	PASS	AF=0.417779;HP=1;NF=11;NR=12;NS=50;CA=0;DP=323
-1	3833578	watson	TTATCT	TT	100	PASS	AF=0.329625;HP=2;NF=27;NR=26;NS=51;CA=0;DP=388
-1	3833880	watson	CA	CATCTA	100	PASS	AF=0.347946;HP=1;NF=11;NR=13;NS=52;CA=0;DP=458
-1	3906706	.	TGG	TG	100	PASS	AF=0.149111;HP=3;NF=11;NR=9;NS=52;CA=0;DP=498
-1	3907565	rs34088401;-/C,mills	TCC	TC	100	PASS	AF=0.191109;HP=6;DB;NF=11;NR=14;NS=51;CA=0;DP=478
-1	3909253	.	AC	ACC	100	PASS	AF=0.0974891;HP=2;NF=10;NR=9;NS=52;CA=0;DP=591
-1	3909917	rs35302885;-/T,venter	CTT	CT	100	PASS	AF=0.766256;HP=7;DB;NF=45;NR=61;NS=52;CA=0;DP=605
-1	3916501	rs55698528;-/A,venter	GA	GAA	100	PASS	AF=0.624637;HP=1;DB;NF=37;NR=28;NS=52;CA=0;DP=488
-1	3920626	rs59758170;-/TAAATAAATA	AATAAATAAATA	AA	100	PASS	AF=0.276985;HP=3;DB;NF=6;NR=6;NS=50;CA=M;DP=308
-1	3923069	.	TCG	TG	100	PASS	AF=0.224119;HP=1;NF=23;NR=7;NS=52;CA=0;DP=488
-1	3925431	rs34400281;-/T,venter	CTT	CT	100	PASS	AF=0.372459;HP=2;DB;NF=14;NR=10;NS=51;CA=0;DP=500
-1	3933527	.	ATTCCCCACAGTGTCTATGGGGACTCTAGCACGGTCAGGGACCCT	AT	100	PASS	AF=0.0367516;HP=2;NF=29;NR=33;NS=51;CA=0;DP=622
-1	3934862	venter	GCAC	GC	100	PASS	AF=0.565308;HP=1;NF=47;NR=42;NS=51;CA=0;DP=648
-1	3935044	.	TCAC	TC	40	PASS	AF=0.0156518;HP=1;NF=25;NR=8;NS=52;CA=0;DP=717
-1	3937578	rs56700097;-/A,venter	TG	TAG	100	PASS	AF=0.540707;HP=1;DB;NF=40;NR=17;NS=52;CA=0;DP=392
-1	3938627	rs58820377;-/ATAG	TTAGAT	TT	100	PASS	AF=0.0846429;HP=2;DB;NF=10;NR=11;NS=52;CA=0;DP=489
-1	3945777	.	CAGA	CA	100	PASS	AF=0.442957;HP=1;NF=49;NR=35;NS=52;CA=M;DP=511
-1	3967107	venter	GAGAA	GA	100	PASS	AF=0.226936;HP=1;NF=10;NR=15;NS=52;CA=0;DP=543
-1	3971955	rs56102422;-/T	AT	ATT	100	PASS	AF=0.275646;HP=10;DB;NF=12;NR=15;NS=52;CA=0;DP=477
-1	3973109	rs56883229;-/T,venter	ATT	AT	100	PASS	AF=0.374332;HP=8;DB;NF=7;NR=38;NS=52;CA=0;DP=398
-1	3974590	.	ATT	AT	100	PASS	AF=0.373956;HP=8;NF=19;NR=19;NS=51;CA=0;DP=352
-1	3976220	.	TTCCAGCTGTTGGACTGGCAAACAGT	TT	100	PASS	AF=0.155908;HP=3;NF=51;NR=67;NS=52;CA=0;DP=702
-1	3983232	.	GC	GCC	100	PASS	AF=0.153929;HP=3;NF=2;NR=12;NS=51;CA=0;DP=479
-1	3989673	rs34117538;-/T	CTT	CT	100	PASS	AF=0.138005;HP=7;DB;NF=10;NR=16;NS=52;CA=0;DP=480
-1	3991472	.	GT	GTT	41	PASS	AF=0.0921994;HP=10;NF=23;NR=19;NS=52;CA=0;DP=490
-1	3995340	.	GAATA	GA	100	PASS	AF=0.126804;HP=2;NF=18;NR=25;NS=51;CA=0;DP=456
-1	3995701	rs35842317;-/A	GA	GAA	100	PASS	AF=0.287765;HP=3;DB;NF=16;NR=28;NS=52;CA=0;DP=515
-1	3998289	rs34690250;-/C	AT	ATT	31	PASS	AF=0.0505667;HP=1;DB;NF=5;NR=6;NS=50;CA=0;DP=373
-1	3998556	rs35439065;-/C,venter	AC	ACC	100	PASS	AF=0.152989;HP=1;DB;NF=17;NR=4;NS=52;CA=0;DP=565
-1	4003805	.	CCCTTC	CC	100	PASS	AF=0.497734;HP=3;NF=13;NR=9;NS=52;CA=M;DP=357
-1	4004467	.	TA	TAA	100	PASS	AF=0.178845;HP=10;NF=39;NR=12;NS=52;CA=0;DP=482
-1	4005161	.	AAGA	AA	10	PASS	AF=0.109604;HP=8;NF=5;NR=3;NS=52;CA=0;DP=418
-1	4009724	.	GGAGAGGGAGAAG	GG	100	PASS	AF=0.0443217;HP=4;NF=7;NR=9;NS=51;CA=0;DP=347
-1	4010638	rs59300943;-/T	CT	CTT	100	PASS	AF=0.238748;HP=5;DB;NF=17;NR=13;NS=52;CA=0;DP=424
-1	4018608	.	GGGAG	GG	14	PASS	AF=0.0210215;HP=3;NF=11;NR=22;NS=52;CA=0;DP=439
-1	4020045	rs60135555;-/AAA,venter	TA	TAAAA	55	PASS	AF=0.669408;HP=9;DB;NF=19;NR=3;NS=52;CA=0;DP=315
-1	4021381	.	CTGGGAAC	CC	26	PASS	AF=0.0682584;HP=1;NF=1;NR=7;NS=52;CA=0;DP=500
-1	4022270	.	TG	TCG	59	PASS	AF=0.0269606;HP=6;NF=2;NR=3;NS=52;CA=0;DP=522
-1	4022431	rs58149124;-/CC,watson	TC	TCCC	100	PASS	AF=0.833755;HP=1;DB;NF=29;NR=41;NS=52;CA=0;DP=574
-1	4024133	rs56013829;-/GTCA,venter	ACAGTC	AC	100	PASS	AF=0.444062;HP=1;DB;NF=29;NR=25;NS=52;CA=0;DP=599
-1	4024168	rs56372495;-/AC,venter	TCAC	TC	100	PASS	AF=0.370935;HP=1;DB;NF=14;NR=39;NS=52;CA=0;DP=645
-1	4024408	rs55816119;-/TT,watson	TC	TCAC	100	PASS	AF=0.479654;HP=1;DB;NF=17;NR=29;NS=52;CA=0;DP=726
-1	4024524	.	ACTC	AC	100	PASS	AF=0.220192;HP=1;NF=11;NR=5;NS=52;CA=0;DP=721
-1	4024673	.	TT	TTCACT	100	PASS	AF=0.173855;HP=2;NF=11;NR=13;NS=52;CA=0;DP=887
-1	4024704	.	TCAG	TG	100	PASS	AF=0.0291681;HP=1;NF=6;NR=1;NS=52;CA=0;DP=750
-1	4024735	venter	TC	TCAC	100	PASS	AF=0.247468;HP=1;NF=19;NR=5;NS=52;CA=0;DP=775
-1	4024928	.	CTCAGT	CT	100	PASS	AF=0.0974879;HP=1;NF=11;NR=7;NS=52;CA=0;DP=919
-1	4025065	.	TCAC	TC	100	PASS	AF=0.273013;HP=1;NF=7;NR=12;NS=52;CA=0;DP=714
-1	4025127	.	ACTC	AC	100	PASS	AF=0.380734;HP=1;NF=17;NR=20;NS=52;CA=M;DP=574
-1	4025165	.	TC	TCACTCAC	100	PASS	AF=0.0820414;HP=1;NF=1;NR=9;NS=52;CA=M;DP=574
-1	4025232	watson	TC	TCAC	100	PASS	AF=0.631924;HP=1;NF=15;NR=11;NS=52;CA=M;DP=459
-1	4025339	.	TTCACT	TT	53	PASS	AF=0.159738;HP=2;NF=17;NR=14;NS=51;CA=0;DP=609
-1	4025399	.	CA	CATA	100	PASS	AF=0.0862676;HP=1;NF=4;NR=7;NS=52;CA=0;DP=506
-1	4025472	.	CA	CATTTA	39	PASS	AF=0.0270865;HP=1;NF=2;NR=1;NS=52;CA=0;DP=538
-1	4025543	venter,watson	TC	TCAC	100	PASS	AF=0.26036;HP=1;NF=9;NR=12;NS=52;CA=0;DP=482
-1	4025589	.	AC	ACTC	53	PASS	AF=0.0696821;HP=1;NF=1;NR=1;NS=52;CA=0;DP=575
-1	4025678	watson	TACTCA	TA	100	PASS	AF=0.299176;HP=1;NF=14;NR=7;NS=52;CA=0;DP=549
-1	4025718	.	CATT	CT	100	PASS	AF=0.0815807;HP=1;NF=8;NR=6;NS=52;CA=0;DP=570
-1	4025810	watson	TC	TCAC	100	PASS	AF=0.240222;HP=1;NF=8;NR=8;NS=52;CA=0;DP=442
-1	4025920	.	ACTCACACTC	AC	15	PASS	AF=0.0440807;HP=1;NF=5;NR=6;NS=52;CA=0;DP=439
-1	4025988	.	ATCACT	AT	100	PASS	AF=0.115745;HP=1;NF=7;NR=3;NS=52;CA=M;DP=409
-1	4026021	.	ATTCGC	AC	19	PASS	AF=0.0230633;HP=2;NF=4;NR=4;NS=52;CA=0;DP=408
-1	4026091	.	ACAGTC	AC	100	PASS	AF=0.239672;HP=1;NF=10;NR=12;NS=52;CA=0;DP=418
-1	4026188	.	GTCACTCGTT	GT	100	PASS	AF=0.0942528;HP=1;NF=17;NR=15;NS=51;CA=M;DP=704
-1	4026243	.	AC	ACTCACTC	100	PASS	AF=0.0701669;HP=1;NF=8;NR=2;NS=52;CA=0;DP=852
-1	4026341	.	AC	ACTC	100	PASS	AF=0.180464;HP=1;NF=7;NR=12;NS=52;CA=0;DP=797
-1	4026433	.	AC	ACTCACAGTC	100	PASS	AF=0.0755971;HP=1;NF=10;NR=4;NS=52;CA=0;DP=727
-1	4026489	.	CCACTC	CC	100	PASS	AF=0.152175;HP=2;NF=20;NR=14;NS=52;CA=0;DP=896
-1	4026521	.	AT	ACT	18	PASS	AF=0.0348752;HP=1;NF=8;NR=8;NS=52;CA=0;DP=896
-1	4026676	.	ACACTC	AC	100	PASS	AF=0.345964;HP=1;NF=25;NR=27;NS=52;CA=0;DP=805
-1	4026745	.	ACTC	AC	100	PASS	AF=0.277096;HP=1;NF=6;NR=11;NS=52;CA=0;DP=625
-1	4026831	.	AC	ACTC	100	PASS	AF=0.158736;HP=1;NF=13;NR=9;NS=52;CA=0;DP=585
-1	4026904	.	TACTCA	TA	59	PASS	AF=0.094457;HP=1;NF=7;NR=4;NS=52;CA=0;DP=594
-1	4026996	.	TT	TTCACT	100	PASS	AF=0.0816069;HP=2;NF=19;NR=16;NS=52;CA=0;DP=668
-1	4027100	watson	GT	GTCACT	100	PASS	AF=0.51624;HP=1;NF=22;NR=20;NS=52;CA=0;DP=958
-1	4027153	.	AC	ACTCACACTC	100	PASS	AF=0.221157;HP=1;NF=11;NR=7;NS=52;CA=0;DP=694
-1	4027249	.	ACACTCGCTCAGTC	AC	100	PASS	AF=0.191741;HP=1;NF=20;NR=16;NS=52;CA=0;DP=528
-1	4027301	.	TCAC	TC	100	PASS	AF=0.21653;HP=1;NF=6;NR=9;NS=52;CA=0;DP=511
-1	4027378	.	TT	TTCACT	100	PASS	AF=0.23813;HP=2;NF=19;NR=16;NS=52;CA=0;DP=565
-1	4027440	.	TT	TTCACT	100	PASS	AF=0.351897;HP=2;NF=28;NR=13;NS=52;CA=0;DP=736
-1	4031776	venter,watson	GC	GCTGCTCC	100	PASS	AF=0.57914;HP=1;NF=17;NR=13;NS=52;CA=0;DP=475
-1	4046995	rs60127181;-/ATG,watson	GC	GGATC	100	PASS	AF=0.863384;HP=1;DB;NF=37;NR=32;NS=51;CA=0;DP=427
-1	4053051	.	AC	AACC	10	PASS	AF=0.0731381;HP=1;NF=2;NR=3;NS=52;CA=0;DP=453
-1	4056743	rs57501900;-/T,venter	ATT	AT	100	PASS	AF=0.863012;HP=6;DB;NF=63;NR=45;NS=52;CA=0;DP=485
-1	4078234	venter,watson	CTGCCTGTGTGAGCAAGAT	CT	100	PASS	AF=0.308447;HP=1;NF=26;NR=18;NS=52;CA=0;DP=484
-1	4080449	rs35774756;-/T	GTT	GT	100	PASS	AF=0.285891;HP=2;DB;NF=20;NR=24;NS=51;CA=0;DP=526
-1	4082493	rs35701497;-/G	CGG	CG	100	PASS	AF=0.277913;HP=4;DB;NF=14;NR=16;NS=52;CA=0;DP=416
-1	4086137	.	CA	CTA	100	PASS	AF=0.0260425;HP=1;NF=4;NR=2;NS=52;CA=0;DP=569
-1	4088196	.	TTCT	TT	100	PASS	AF=0.0658972;HP=3;NF=67;NR=77;NS=51;CA=B;DP=647
-1	4091673	rs56198003;-/TTA	GTTAT	GT	100	PASS	AF=0.0274099;HP=2;DB;NF=4;NR=7;NS=52;CA=0;DP=489
-1	4093407	rs35442233;-/G,venter	TGG	TG	100	PASS	AF=0.056726;HP=4;DB;NF=4;NR=5;NS=51;CA=0;DP=432
-1	4097902	rs5772141;-/ATT,mills,venter,watson	CA	CATTA	100	PASS	AF=0.999995;HP=1;DB;NF=38;NR=34;NS=52;CA=0;DP=432
-1	4106716	.	AC	ACACACACACACGC	100	PASS	AF=0.316911;HP=1;NF=1;NR=1;NS=52;CA=0;DP=601
-1	4114274	rs60603556;-/CAT,watson	AATCA	AA	100	PASS	AF=0.135224;HP=3;DB;NF=17;NR=9;NS=51;CA=0;DP=587
-1	4114592	rs56285575;-/ACA,venter	AAACA	AA	100	PASS	AF=0.254759;HP=3;DB;NF=21;NR=18;NS=52;CA=0;DP=554
-1	4114812	.	TTAT	TT	33	PASS	AF=0.14738;HP=3;NF=5;NR=4;NS=52;CA=0;DP=411
-1	4114996	.	AA	AATTATTA	11	PASS	AF=0.228122;HP=2;NF=26;NR=29;NS=49;CA=0;DP=276
-1	4120825	.	GAA	GA	43	PASS	AF=0.147904;HP=2;NF=11;NR=17;NS=51;CA=0;DP=328
-1	4121802	.	ATGT	AT	11	PASS	AF=0.0113836;HP=1;NF=24;NR=16;NS=52;CA=0;DP=570
-1	4131826	.	ATTGTTT	AT	100	PASS	AF=0.999996;HP=2;NF=38;NR=35;NS=52;CA=0;DP=456
-1	4134659	rs35271731;-/G	TG	TGG	100	PASS	AF=0.417516;HP=5;DB;NF=21;NR=19;NS=52;CA=0;DP=429
-1	4139315	rs35859581;-/T,venter	GT	GTT	100	PASS	AF=0.371694;HP=2;DB;NF=12;NR=16;NS=52;CA=0;DP=444
-1	4144542	.	CAA	CA	100	PASS	AF=0.0915309;HP=2;NF=7;NR=8;NS=52;CA=M;DP=461
-1	4149378	rs35644791;-/CCT,venter,watson	AC	ACCTC	100	PASS	AF=0.955034;HP=2;DB;NF=35;NR=24;NS=52;CA=0;DP=461
-1	4150078	.	ATC	AC	100	PASS	AF=0.0248618;HP=1;NF=3;NR=1;NS=52;CA=0;DP=489
-1	4158176	rs61115653;-/A	CA	CAA	100	PASS	AF=0.109858;HP=9;DB;NF=9;NR=8;NS=52;CA=0;DP=480
-1	4158371	rs35550030;-/G	AGA	AA	100	PASS	AF=0.282272;HP=1;DB;NF=22;NR=13;NS=52;CA=0;DP=508
-1	4160853	.	AG	AGTG	100	PASS	AF=0.883963;HP=1;NF=52;NR=40;NS=52;CA=0;DP=475
-1	4163479	rs35439066;-/T,venter	ATT	AT	100	PASS	AF=0.421487;HP=7;DB;NF=35;NR=40;NS=52;CA=0;DP=580
-1	4165518	rs5772143;-/A,mills	CAT	CT	100	PASS	AF=0.0997002;HP=1;DB;NF=8;NR=9;NS=52;CA=0;DP=569
-1	4168412	.	TG	TGG	100	PASS	AF=0.0597927;HP=5;NF=7;NR=5;NS=50;CA=0;DP=411
-1	4174019	.	CCTTTC	CC	100	PASS	AF=0.223832;HP=2;NF=5;NR=11;NS=51;CA=M;DP=369
-1	4176371	rs5772145;-/GGGCT,mills,venter,watson	GG	GGGGCTG	100	PASS	AF=0.965127;HP=4;DB;NF=37;NR=39;NS=51;CA=0;DP=577
-1	4180359	rs35134459;-/T,venter	CG	CTG	100	PASS	AF=0.994644;HP=2;DB;NF=70;NR=40;NS=52;CA=0;DP=510
-1	4198168	.	GCCATTTACATCCCACC	GC	100	PASS	AF=0.0947023;HP=2;NF=47;NR=53;NS=52;CA=0;DP=625
-1	4203370	.	TCAC	TC	22	PASS	AF=0.151126;HP=1;NF=40;NR=22;NS=51;CA=0;DP=481
-1	4224147	.	ATGT	AT	100	PASS	AF=0.459042;HP=1;NF=45;NR=57;NS=52;CA=0;DP=508
-1	4236168	venter,watson	GT	GTCCTGTT	100	PASS	AF=0.465028;HP=1;NF=21;NR=21;NS=51;CA=0;DP=473
-1	4238553	.	TAG	TG	100	PASS	AF=0.0884036;HP=1;NF=3;NR=3;NS=52;CA=0;DP=313
-1	4243904	.	TG	TGGGGG	28	PASS	AF=0.177328;HP=1;NF=6;NR=9;NS=52;CA=0;DP=598
-1	4252300	.	AATTTA	AA	27	PASS	AF=0.0160294;HP=2;NF=16;NR=12;NS=52;CA=0;DP=550
-1	4256051	.	CC	CCTCAC	100	PASS	AF=0.423907;HP=2;NF=10;NR=6;NS=52;CA=M;DP=450
-1	4256251	rs56817136;-/AATCCATC	TC	TCATCAATCC	27	PASS	AF=0.483921;HP=1;DB;NF=24;NR=28;NS=52;CA=M;DP=501
-1	4256338	rs59859709;-/CCAT	CCCATC	CC	100	PASS	AF=0.420087;HP=3;DB;NF=47;NR=73;NS=52;CA=0;DP=510
-1	4258560	rs35749795;-/G,venter	TGG	TG	100	PASS	AF=0.563751;HP=3;DB;NF=30;NR=43;NS=52;CA=0;DP=533
-1	4270968	rs5772150;-/A,mills,venter	TAA	TA	100	PASS	AF=0.863858;HP=2;DB;NF=66;NR=65;NS=52;CA=0;DP=554
-1	4272781	rs34523387;-/CA,venter,watson	TCAC	TC	100	PASS	AF=0.221206;HP=1;DB;NF=55;NR=32;NS=52;CA=0;DP=555
-1	4276688	rs56762609;-/A	CA	CAA	25	PASS	AF=0.0168189;HP=4;DB;NF=5;NR=7;NS=52;CA=0;DP=567
-1	4278344	rs33957131;-/A,mills	TAT	TT	100	PASS	AF=0.260307;HP=1;DB;NF=13;NR=14;NS=52;CA=M;DP=390
-1	4280264	rs35972891;-/G,venter	TG	TGG	100	PASS	AF=0.36321;HP=6;DB;NF=16;NR=21;NS=52;CA=0;DP=487
-1	4280920	rs3058085;-/AGA,mills,venter,watson	AT	ATCTT	100	PASS	AF=0.75024;HP=1;DB;NF=34;NR=50;NS=52;CA=0;DP=518
-1	4281851	rs59086076;-/TTGT	CTGTTT	CT	100	PASS	AF=0.15371;HP=1;DB;NF=12;NR=13;NS=52;CA=0;DP=454
-1	4287207	rs3986843;-/CCT	CA	CAGGA	100	PASS	AF=0.100002;HP=1;DB;NF=8;NR=1;NS=52;CA=0;DP=451
-1	4289708	.	GTGTTAG	GG	37	PASS	AF=0.0904846;HP=1;NF=3;NR=9;NS=52;CA=0;DP=447
-1	4291813	.	CGC	CC	41	PASS	AF=0.05598;HP=1;NF=1;NR=9;NS=52;CA=0;DP=504
-1	4291856	rs33950418;-/C,mills	ACA	AA	53	PASS	AF=0.0424203;HP=1;DB;NF=2;NR=10;NS=52;CA=M;DP=504
-1	4292024	rs33982329;-/CA,mills	CG	CATG	100	PASS	AF=0.0974178;HP=1;DB;NF=14;NR=14;NS=52;CA=0;DP=697
-1	4296830	.	CTT	CT	100	PASS	AF=0.101792;HP=2;NF=15;NR=4;NS=52;CA=0;DP=805
-1	4298115	rs34054009;-/G,venter	AG	AGG	100	PASS	AF=0.314255;HP=2;DB;NF=25;NR=10;NS=52;CA=0;DP=565
-1	4310246	rs35999105;-/A	TA	TAA	100	PASS	AF=0.229765;HP=5;DB;NF=23;NR=13;NS=52;CA=0;DP=488
-1	4310305	venter	GA	GAA	39	PASS	AF=0.078696;HP=9;NF=15;NR=5;NS=52;CA=0;DP=455
-1	4312461	.	GAAAGAAA	GA	24	PASS	AF=0.0372797;HP=3;NF=23;NR=6;NS=52;CA=M;DP=401
-1	4313453	.	GG	GTG	23	PASS	AF=0.026167;HP=2;NF=2;NR=5;NS=52;CA=0;DP=614
-1	4315016	rs34078493;-/T,venter	CT	CTT	100	PASS	AF=0.459017;HP=1;DB;NF=25;NR=37;NS=52;CA=0;DP=493
-1	4316236	rs35864764;-/TC	ATCT	AT	100	PASS	AF=0.164629;HP=1;DB;NF=18;NR=15;NS=52;CA=0;DP=434
-1	4317119	rs35907112;-/AG	AAGA	AA	100	PASS	AF=0.210583;HP=3;DB;NF=19;NR=13;NS=52;CA=0;DP=652
-1	4319781	rs34098980;-/AAAAA,mills,venter	CC	CAAAAAC	100	PASS	AF=0.451406;HP=2;DB;NF=9;NR=1;NS=52;CA=0;DP=605
-1	4323411	.	GT	GTT	41	PASS	AF=0.0448346;HP=6;NF=4;NR=5;NS=52;CA=0;DP=498
-1	4326343	.	CG	CGGGGGGGGGGG	100	PASS	AF=0.212625;HP=2;NF=5;NR=11;NS=52;CA=0;DP=475
-1	4329138	.	GTGAT	GT	47	PASS	AF=0.0168095;HP=1;NF=35;NR=37;NS=52;CA=0;DP=675
-1	4329500	venter	ATGGTGATGGT	AT	100	PASS	AF=0.0491;HP=1;NF=35;NR=49;NS=52;CA=0;DP=718
-1	4333035	.	CCACTC	CC	100	PASS	AF=0.0536691;HP=2;NF=18;NR=17;NS=52;CA=0;DP=614
-1	4333090	.	CCCATC	CC	100	PASS	AF=0.896174;HP=3;NF=52;NR=56;NS=52;CA=0;DP=564
-1	4333868	rs34013096;-/CCAT	AC	ACCATC	100	PASS	AF=0.411752;HP=2;DB;NF=63;NR=59;NS=52;CA=0;DP=556
-1	4352929	.	TAA	TA	100	PASS	AF=0.0606075;HP=5;NF=10;NR=5;NS=51;CA=0;DP=422
-1	4360308	.	CAA	CA	100	PASS	AF=0.160821;HP=3;NF=12;NR=13;NS=52;CA=0;DP=502
-1	4360675	rs55750624;-/A	GAA	GA	100	PASS	AF=0.209252;HP=2;DB;NF=18;NR=10;NS=52;CA=0;DP=456
-1	4362123	rs57250327;-/AAATT	TA	TAATTAA	100	PASS	AF=0.202867;HP=2;DB;NF=23;NR=24;NS=52;CA=0;DP=404
-1	4372014	rs34773421;-/A,venter	TAA	TA	100	PASS	AF=0.507594;HP=2;DB;NF=43;NR=31;NS=52;CA=0;DP=496
-1	4373092	.	CATTTA	CA	100	PASS	AF=0.155807;HP=1;NF=19;NR=10;NS=52;CA=0;DP=440
-1	4375952	.	TCT	TT	100	PASS	AF=0.0215948;HP=1;NF=3;NR=2;NS=52;CA=0;DP=530
-1	4376164	rs57973702;-/TG,venter	CG	CGTG	100	PASS	AF=0.555727;HP=1;DB;NF=33;NR=60;NS=52;CA=0;DP=552
-1	4382255	.	GT	GTT	100	PASS	AF=0.134524;HP=8;NF=12;NR=14;NS=52;CA=0;DP=445
-1	4382929	.	CG	CGCCGTGCCCTGCTCAG	100	PASS	AF=0.293977;HP=1;NF=3;NR=1;NS=52;CA=0;DP=423
-1	4386769	rs34696074;-/G	TGG	TG	100	PASS	AF=0.524405;HP=3;DB;NF=43;NR=31;NS=51;CA=0;DP=586
-1	4386900	rs35831569;-/GTGA,watson	TG	TGTGAG	100	PASS	AF=0.786341;HP=1;DB;NF=49;NR=47;NS=52;CA=0;DP=728
-1	4387089	rs35106948;-/GA,venter,watson	TGAG	TG	100	PASS	AF=0.76407;HP=1;DB;NF=42;NR=48;NS=52;CA=0;DP=730
-1	4398343	rs56075652;-/AGCTAG,mills,venter,watson	GGAGCTAG	GG	100	PASS	AF=0.850798;HP=2;DB;NF=51;NR=52;NS=52;CA=0;DP=535
-1	4403445	.	ATC	AC	100	PASS	AF=0.0257077;HP=1;NF=3;NR=3;NS=52;CA=0;DP=579
-1	4413424	.	GGAAG	GG	100	PASS	AF=0.0911622;HP=2;NF=13;NR=11;NS=52;CA=0;DP=539
-1	4415363	rs35655214;-/A,mills,venter	CAA	CA	100	PASS	AF=0.279808;HP=10;DB;NF=16;NR=13;NS=52;CA=0;DP=623
-1	4419729	rs34301403;-/T,venter	CT	CTT	100	PASS	AF=0.276688;HP=3;DB;NF=23;NR=17;NS=52;CA=0;DP=491
-1	4429935	.	ACC	AC	100	PASS	AF=0.121066;HP=2;NF=8;NR=7;NS=52;CA=0;DP=509
-1	4432975	rs35185885;-/TTAT,venter	TT	TTTTAT	100	PASS	AF=0.370788;HP=4;DB;NF=7;NR=50;NS=51;CA=0;DP=329
-1	4433724	.	AC	ACC	100	PASS	AF=0.191535;HP=2;NF=16;NR=17;NS=52;CA=0;DP=609
-1	4434361	.	GA	GATGATATTGAAA	100	PASS	AF=0.175787;HP=1;NF=8;NR=5;NS=52;CA=0;DP=496
-1	4439328	rs55695069;-/TGTG,watson	TGTGAG	TG	100	PASS	AF=0.115075;HP=1;DB;NF=13;NR=10;NS=51;CA=0;DP=510
-1	4444447	.	GC	GCC	100	PASS	AF=0.126735;HP=1;NF=8;NR=6;NS=52;CA=0;DP=442
-1	4444562	watson	TTCG	TG	100	PASS	AF=0.167206;HP=3;NF=13;NR=9;NS=52;CA=0;DP=477
-1	4448379	rs55971665;-/A,venter	GAA	GA	100	PASS	AF=0.999997;HP=5;DB;NF=29;NR=34;NS=51;CA=0;DP=398
-1	4456774	rs34368344;-/CTCA,watson	TCTCAC	TC	100	PASS	AF=0.4985;HP=1;DB;NF=46;NR=35;NS=52;CA=0;DP=679
-1	4456823	.	TT	TTTTCTCTCT	100	PASS	AF=0.281015;HP=3;NF=18;NR=7;NS=52;CA=0;DP=566
-1	4460399	.	CAGA	CA	17	PASS	AF=0.0162627;HP=1;NF=4;NR=1;NS=52;CA=0;DP=437
-1	4461064	.	TG	TGGG	100	PASS	AF=0.136493;HP=8;NF=11;NR=12;NS=52;CA=0;DP=516
-1	4461120	.	GAGTCA	GA	100	PASS	AF=0.106497;HP=1;NF=4;NR=10;NS=52;CA=0;DP=513
-1	4462914	rs35786528;-/T,venter	GTT	GT	100	PASS	AF=0.636288;HP=9;DB;NF=46;NR=44;NS=52;CA=0;DP=457
-1	4464201	rs35933446;-/G	AGC	AC	100	PASS	AF=0.0422945;HP=1;DB;NF=3;NR=5;NS=52;CA=0;DP=559
-1	4465553	rs33984734;-/C,mills,venter	GCC	GC	100	PASS	AF=0.832437;HP=3;DB;NF=43;NR=36;NS=52;CA=0;DP=507
-1	4465878	rs55781312;-/GAACA,watson	TACAGAA	TA	100	PASS	AF=0.547352;HP=1;DB;NF=48;NR=55;NS=52;CA=0;DP=612
-1	4466414	rs34356738;-/T,venter	AT	ATT	100	PASS	AF=0.0343632;HP=4;DB;NF=5;NR=2;NS=52;CA=0;DP=523
-1	4468803	.	CT	CTTTTCTTTTCTTT	100	PASS	AF=0.185641;HP=2;NF=2;NR=1;NS=51;CA=0;DP=271
-1	4469024	.	TT	TTGTGT	26	PASS	AF=0.65093;HP=2;NF=51;NR=54;NS=51;CA=0;DP=465
-1	4470162	rs34280110;-/T,venter	CT	CTT	100	PASS	AF=0.19103;HP=3;DB;NF=13;NR=16;NS=52;CA=0;DP=581
-1	4472390	rs35540877;-/AAG	TAAGA	TA	100	PASS	AF=0.0513799;HP=2;DB;NF=4;NR=3;NS=52;CA=0;DP=531
-1	4481812	rs34806922;-/A,venter	GAA	GA	100	PASS	AF=0.0356083;HP=3;DB;NF=4;NR=4;NS=52;CA=0;DP=576
-1	4482705	.	CA	CATCTA	100	PASS	AF=0.203301;HP=1;NF=34;NR=52;NS=50;CA=M;DP=382
-1	4482808	.	CTA	CA	16	PASS	AF=0.0550307;HP=1;NF=1;NR=1;NS=51;CA=M;DP=356
-1	4482848	rs5772166;-/TCTCTCTC,mills	ATCTCTCTCT	AT	100	PASS	AF=0.561639;HP=1;DB;NF=52;NR=17;NS=51;CA=M;DP=311
-1	4484471	rs3059158;-/CT,mills,watson	AG	ACTG	100	PASS	AF=0.497825;HP=1;DB;NF=31;NR=34;NS=52;CA=0;DP=538
-1	4486660	rs34976033;-/CCCT,mills,venter,watson	GCTCCC	GC	100	PASS	AF=0.593551;HP=1;DB;NF=42;NR=55;NS=52;CA=0;DP=566
-1	4486840	rs35808993;-/A,venter	GAT	GT	100	PASS	AF=0.0446408;HP=1;DB;NF=4;NR=4;NS=52;CA=0;DP=539
-1	4495865	watson	TGACCT	TT	100	PASS	AF=0.477912;HP=1;NF=15;NR=22;NS=52;CA=0;DP=386
-1	4498895	.	TAAACTCA	TA	100	PASS	AF=0.365307;HP=3;NF=30;NR=28;NS=52;CA=0;DP=561
-1	4499763	.	TT	TTTTAGTTTAGTTTAGTTTAGTTTAGT	15	PASS	AF=0.437504;HP=4;NF=5;NR=8;NS=51;CA=0;DP=440
-1	4500994	rs57293099;-/A,venter	GG	GAG	19	PASS	AF=0.533167;HP=5;DB;NF=26;NR=15;NS=51;CA=0;DP=466
-1	4501978	rs34937816;-/T,mills,venter	GT	GTT	100	PASS	AF=0.677682;HP=1;DB;NF=47;NR=42;NS=52;CA=0;DP=475
-1	4504724	venter,watson	TAGACA	TA	100	PASS	AF=0.381777;HP=1;NF=34;NR=33;NS=52;CA=0;DP=728
-1	4504861	venter	TACAGAGAGAGACAGAGAGA	TA	100	PASS	AF=0.208225;HP=1;NF=42;NR=31;NS=52;CA=0;DP=820
-1	4506249	rs56013880;-/T,mills,venter	GC	GTC	100	PASS	AF=0.652109;HP=2;DB;NF=41;NR=48;NS=52;CA=0;DP=522
-1	4506287	venter	TAG	TG	100	PASS	AF=0.348604;HP=1;NF=23;NR=27;NS=52;CA=0;DP=534
-1	4510123	rs35963445;-/C,venter	TC	TCC	100	PASS	AF=0.750939;HP=6;DB;NF=32;NR=50;NS=52;CA=0;DP=488
-1	4511427	rs34235356;-/T,venter	AT	ATT	100	PASS	AF=0.559297;HP=8;DB;NF=40;NR=27;NS=52;CA=0;DP=549
-1	4512561	rs57315980;-/GAG	TGGAG	TG	100	PASS	AF=0.0276885;HP=2;DB;NF=7;NR=4;NS=52;CA=0;DP=581
-1	4512788	rs56318426;-/GGATAGTGTG	TC	TGTGTGGGATAC	100	PASS	AF=0.145759;HP=1;DB;NF=7;NR=6;NS=52;CA=0;DP=570
-1	4513234	rs5772168;-/ATCA,venter,watson	TA	TATCAA	100	PASS	AF=0.761132;HP=1;DB;NF=45;NR=38;NS=52;CA=0;DP=478
-1	4513552	rs34248962;-/G,venter	CTC	CC	100	PASS	AF=0.397344;HP=1;DB;NF=19;NR=21;NS=52;CA=0;DP=502
-1	4518079	.	CTTTATGTCAAC	CC	31	PASS	AF=0.0537494;HP=3;NF=13;NR=6;NS=52;CA=0;DP=567
-1	4519870	.	CATAA	CA	100	PASS	AF=0.156873;HP=1;NF=25;NR=19;NS=52;CA=0;DP=518
-1	4520552	venter,watson	ATATT	AT	100	PASS	AF=0.0454741;HP=1;NF=13;NR=21;NS=52;CA=0;DP=523
-1	4524683	rs60936673;-/A,venter	GAC	GC	100	PASS	AF=0.0433734;HP=1;DB;NF=5;NR=1;NS=51;CA=0;DP=407
-1	4531795	.	CG	CGAGCAGATAG	100	PASS	AF=0.0529244;HP=1;NF=2;NR=3;NS=52;CA=0;DP=598
-1	4533811	rs61232512;-/TCCCTCCTGGACAGCCAGG,watson	TCCTCCTGGACAGCCAGGTCC	TC	100	PASS	AF=0.455665;HP=2;DB;NF=9;NR=12;NS=52;CA=0;DP=455
-1	4535415	rs34971058;-/C,mills,venter	GC	GCC	100	PASS	AF=0.872856;HP=1;DB;NF=71;NR=50;NS=52;CA=0;DP=585
-1	4540778	rs5772169;-/T,mills	CTG	CG	100	PASS	AF=0.129616;HP=1;DB;NF=9;NR=6;NS=52;CA=0;DP=518
-1	4541031	.	TT	TTTTCT	100	PASS	AF=0.0665496;HP=6;NF=18;NR=24;NS=51;CA=0;DP=371
-1	4541492	rs5772170;-/G,mills,venter	TG	TGG	100	PASS	AF=0.912727;HP=3;DB;NF=57;NR=39;NS=52;CA=0;DP=454
-1	4542962	.	CC	CCTCTCTCTCTC	100	PASS	AF=0.767807;HP=2;NF=57;NR=35;NS=52;CA=0;DP=481
-1	4544333	rs3059964;-/CT,venter	ACTC	AC	100	PASS	AF=0.941425;HP=1;DB;NF=54;NR=73;NS=52;CA=0;DP=591
-1	4547027	rs34146010;-/C	ACC	AC	100	PASS	AF=0.974502;HP=2;DB;NF=55;NR=74;NS=52;CA=0;DP=535
-1	4547927	rs34056554;-/T,venter	ATT	AT	100	PASS	AF=0.867021;HP=3;DB;NF=7;NR=12;NS=51;CA=0;DP=398
-1	4551259	rs34018288;-/TG,venter,watson	CT	CTGT	100	PASS	AF=0.964821;HP=1;DB;NF=25;NR=27;NS=52;CA=0;DP=445
-1	4552887	.	GT	GTCT	100	PASS	AF=0.155774;HP=1;NF=6;NR=7;NS=52;CA=0;DP=507
-1	4556585	rs3833958;-/GGGCT,venter	GA	GAGCCCA	100	PASS	AF=0.248571;HP=1;DB;NF=9;NR=9;NS=52;CA=0;DP=416
-1	4558195	rs58248788;-/T,venter	ATT	AT	100	PASS	AF=0.949748;HP=4;DB;NF=38;NR=18;NS=51;CA=0;DP=446
-1	4558625	.	AGA	AA	100	PASS	AF=0.105248;HP=1;NF=12;NR=4;NS=52;CA=0;DP=526
-1	4570630	.	GT	GGGTTT	14	PASS	AF=0.0570941;HP=1;NF=4;NR=2;NS=52;CA=0;DP=480
-1	4574298	.	GC	GAC	41	PASS	AF=0.0333335;HP=2;NF=1;NR=4;NS=52;CA=0;DP=497
-1	4574507	.	TT	TTCCTCTAATGCT	100	PASS	AF=0.406213;HP=2;NF=13;NR=8;NS=52;CA=0;DP=437
-1	4577694	rs33988719;-/G,mills,venter	TG	TGG	100	PASS	AF=0.999997;HP=1;DB;NF=52;NR=28;NS=52;CA=0;DP=381
-1	4578235	.	TAT	TT	26	PASS	AF=0.292482;HP=1;NF=8;NR=14;NS=51;CA=0;DP=330
-1	4580634	.	ATAAAATA	AA	100	PASS	AF=0.328083;HP=1;NF=11;NR=4;NS=51;CA=M;DP=372
-1	4581760	.	CTT	CT	100	PASS	AF=0.0551414;HP=2;NF=4;NR=7;NS=52;CA=0;DP=578
-1	4583153	rs35427335;-/CA,venter,watson	GCAC	GC	100	PASS	AF=0.0310016;HP=1;DB;NF=3;NR=4;NS=52;CA=0;DP=483
-1	4586257	rs34899280;-/T	GTC	GC	100	PASS	AF=0.311452;HP=1;DB;NF=16;NR=8;NS=51;CA=0;DP=441
-1	4589959	venter,watson	GG	GGGCCTG	100	PASS	AF=0.0494854;HP=3;NF=3;NR=4;NS=52;CA=0;DP=469
-1	4590830	rs34057361;-/GCAAAGC,mills,venter,watson	TGCAAAGCG	TG	100	PASS	AF=0.739178;HP=1;DB;NF=42;NR=52;NS=50;CA=0;DP=465
-1	4595540	rs56784481;-/T	TCT	TT	53	PASS	AF=0.154234;HP=1;DB;NF=7;NR=21;NS=52;CA=0;DP=439
-1	4596270	.	AC	ACGCTGAGGCTGCAGCACCCCTCGTGGAGC	100	PASS	AF=0.171201;HP=1;NF=6;NR=1;NS=52;CA=0;DP=498
-1	4600396	rs36042545;-/AT,venter	CATA	CA	100	PASS	AF=0.185579;HP=1;DB;NF=24;NR=23;NS=52;CA=0;DP=357
-1	4603645	rs60786353;-/C,venter	AC	ACC	100	PASS	AF=0.999998;HP=1;DB;NF=76;NR=57;NS=52;CA=0;DP=571
-1	4607282	.	GTGAT	GT	100	PASS	AF=0.287968;HP=1;NF=38;NR=26;NS=52;CA=0;DP=810
-1	4607435	.	GTGAT	GT	100	PASS	AF=0.347474;HP=1;NF=39;NR=53;NS=52;CA=0;DP=674
-1	4611309	.	CGTGTG	CG	100	PASS	AF=0.311775;HP=1;NF=38;NR=31;NS=52;CA=0;DP=486
-1	4621966	rs35610947;-/GT	TTGT	TT	100	PASS	AF=0.252136;HP=3;DB;NF=41;NR=42;NS=52;CA=0;DP=612
-1	4623256	rs59174221;-/CTCCAGAAAGCAC	GGAAAGCACCTCCAG	GG	100	PASS	AF=0.248792;HP=2;DB;NF=24;NR=28;NS=52;CA=0;DP=458
-1	4623618	rs60584333;-/GTGTCGGGAGCAGAGACTG,venter	GC	GCTGGTGTCGGGAGCAGAGAC	100	PASS	AF=0.624955;HP=1;DB;NF=8;NR=16;NS=51;CA=0;DP=518
-1	4628242	rs56871532;-/TG,venter,watson	CTGT	CT	100	PASS	AF=0.630417;HP=1;DB;NF=46;NR=41;NS=52;CA=0;DP=605
-1	4631325	watson	GAGGACATA	GA	100	PASS	AF=0.0694082;HP=1;NF=14;NR=10;NS=51;CA=0;DP=388
-1	4633949	.	TCC	TC	100	PASS	AF=0.223776;HP=7;NF=13;NR=4;NS=51;CA=0;DP=492
-1	4637510	.	TAAA	TA	18	PASS	AF=0.0428857;HP=9;NF=13;NR=6;NS=52;CA=0;DP=456
-1	4639728	.	GGTGTGTGTGTGTGTG	GG	56	PASS	AF=0.223403;HP=3;NF=39;NR=66;NS=51;CA=0;DP=466
-1	4645583	rs59275910;-/G,venter	AG	AGG	100	PASS	AF=0.999998;HP=1;DB;NF=41;NR=59;NS=51;CA=0;DP=416
-1	4649824	.	CTT	CT	100	PASS	AF=0.0615007;HP=2;NF=3;NR=3;NS=52;CA=0;DP=371
-1	4653490	.	GAG	GG	19	PASS	AF=0.016501;HP=1;NF=1;NR=2;NS=52;CA=0;DP=448
-1	4654099	rs3086606;-/GTCTGCA,mills	CC	CCAGTCTGC	100	PASS	AF=0.299705;HP=2;DB;NF=11;NR=10;NS=52;CA=0;DP=440
-1	4655877	rs58828516;-/G	TG	TGG	100	PASS	AF=0.083803;HP=6;DB;NF=13;NR=14;NS=52;CA=0;DP=553
-1	4656096	rs34592768;-/G,mills	TGG	TG	100	PASS	AF=0.0586852;HP=2;DB;NF=6;NR=4;NS=52;CA=0;DP=486
-1	4656943	.	GGTGTG	GG	53	PASS	AF=0.0156574;HP=2;NF=15;NR=18;NS=52;CA=0;DP=804
-1	4668803	.	CTT	CT	39	PASS	AF=0.0748695;HP=8;NF=8;NR=6;NS=52;CA=0;DP=401
-1	4670089	rs34058244;-/AC,venter	GA	GACA	100	PASS	AF=0.471432;HP=1;DB;NF=47;NR=39;NS=52;CA=0;DP=789
-1	4670383	rs35737766;-/TCAC,watson	ACACTC	AC	100	PASS	AF=0.331554;HP=1;DB;NF=20;NR=35;NS=52;CA=0;DP=609
-1	4676654	.	AGATG	AG	10	PASS	AF=0.011049;HP=1;NF=15;NR=18;NS=52;CA=0;DP=617
-1	4684590	.	TCCTGCACCTGCTGTGCCCCTGGCTCCCAGCACC	TC	100	PASS	AF=0.0368566;HP=2;NF=13;NR=7;NS=52;CA=0;DP=543
-1	4689505	.	TC	TCTGTCCTCTCTCCTAGCTCTGGTGCCCTGAGATGC	100	PASS	AF=0.355136;HP=1;NF=2;NR=3;NS=52;CA=0;DP=597
-1	4693342	rs3835539;-/TTCA	CC	CCATTC	100	PASS	AF=0.307703;HP=2;DB;NF=60;NR=61;NS=52;CA=0;DP=594
-1	4695582	venter	TGTGAGG	TG	100	PASS	AF=0.630317;HP=1;NF=17;NR=29;NS=52;CA=0;DP=408
-1	4700273	.	GCCT	GT	51	PASS	AF=0.154012;HP=2;NF=3;NR=3;NS=52;CA=0;DP=402
-1	4700727	rs34897087;-/A,venter	CG	CGG	13	PASS	AF=0.0702045;HP=8;DB;NF=22;NR=6;NS=51;CA=M;DP=305
-1	4702014	rs34592315;-/AA,venter	TAAA	TA	100	PASS	AF=0.183045;HP=3;DB;NF=9;NR=20;NS=52;CA=0;DP=551
-1	4702135	.	GCC	GC	100	PASS	AF=0.132917;HP=5;NF=18;NR=10;NS=52;CA=0;DP=561
-1	4702842	rs3835540;-/GAC	TGACG	TG	100	PASS	AF=0.333162;HP=1;DB;NF=25;NR=19;NS=52;CA=0;DP=517
-1	4703849	rs35422518;-/TCTCCAGGC,mills,venter,watson	AGCTCTCCAGG	AG	100	PASS	AF=0.461699;HP=1;DB;NF=52;NR=39;NS=52;CA=0;DP=558
-1	4704242	.	ATT	AT	100	PASS	AF=0.124811;HP=6;NF=16;NR=12;NS=52;CA=0;DP=518
-1	4704545	.	GCACAC	GC	43	PASS	AF=0.374122;HP=1;NF=68;NR=46;NS=52;CA=0;DP=586
-1	4709952	rs55677440;-/GT	TT	TTGT	100	PASS	AF=0.111566;HP=3;DB;NF=37;NR=55;NS=52;CA=0;DP=757
-1	4712998	rs35177072;-/CTC,mills,venter,watson	TCTCC	TC	100	PASS	AF=0.409205;HP=1;DB;NF=23;NR=30;NS=52;CA=0;DP=527
-1	4714785	rs3835541;-/A,venter	CAA	CA	100	PASS	AF=0.207747;HP=2;DB;NF=12;NR=9;NS=52;CA=0;DP=525
-1	4715739	.	GT	GTT	100	PASS	AF=0.0593871;HP=1;NF=4;NR=4;NS=52;CA=0;DP=486
-1	4717874	rs33969697;-/C,mills,venter	TCA	TA	100	PASS	AF=0.644689;HP=1;DB;NF=37;NR=47;NS=52;CA=0;DP=521
-1	4720164	rs5772181;-/GA,mills,venter,watson	TG	TGAG	100	PASS	AF=0.660601;HP=1;DB;NF=60;NR=61;NS=52;CA=0;DP=723
-1	4725394	venter	AG	AGAGAGACATGAGTGAAGAAGG	100	PASS	AF=0.486541;HP=1;NF=34;NR=40;NS=52;CA=0;DP=600
-1	4726136	rs35816653;-/T,venter	CT	CTT	100	PASS	AF=0.325542;HP=7;DB;NF=25;NR=33;NS=52;CA=0;DP=561
-1	4728249	rs35594902;-/TGTT	CT	CTGTTT	100	PASS	AF=0.236832;HP=1;DB;NF=16;NR=16;NS=52;CA=0;DP=595
-1	4730619	rs56688128;-/AAGGC,venter,watson	ACAAGGC	AC	100	PASS	AF=0.197783;HP=1;DB;NF=14;NR=10;NS=52;CA=0;DP=450
-1	4738491	.	ATCTCTCTCTCTCTCTCTCTCT	AT	100	PASS	AF=0.109332;HP=1;NF=34;NR=36;NS=52;CA=0;DP=556
-1	4743143	rs34960969;-/T,venter	ATT	AT	100	PASS	AF=0.443382;HP=2;DB;NF=27;NR=29;NS=51;CA=0;DP=521
-1	4750482	.	AC	ACC	44	PASS	AF=0.0773717;HP=1;NF=1;NR=10;NS=52;CA=0;DP=532
-1	4751808	.	CC	CTC	100	PASS	AF=0.287743;HP=6;NF=22;NR=19;NS=52;CA=0;DP=549
-1	4753639	rs56735073;-/G	AG	AGG	100	PASS	AF=0.354197;HP=6;DB;NF=26;NR=25;NS=52;CA=0;DP=499
-1	4756338	.	TGG	TG	100	PASS	AF=0.145276;HP=6;NF=12;NR=22;NS=52;CA=0;DP=505
-1	4756654	.	CTGT	CT	100	PASS	AF=0.0253358;HP=1;NF=2;NR=3;NS=52;CA=0;DP=502
-1	4768227	rs34482713;-/A,venter	CAC	CC	100	PASS	AF=0.624286;HP=1;DB;NF=16;NR=29;NS=52;CA=0;DP=382
-1	4769408	rs3030792;-/CA,venter	TC	TCAC	100	PASS	AF=0.564397;HP=1;DB;NF=37;NR=45;NS=51;CA=0;DP=550
-1	4771107	rs59952959;-/TTATCGGTGGTTT	ATTATCGGTGGTTTC	AC	100	PASS	AF=0.43732;HP=2;DB;NF=24;NR=26;NS=52;CA=0;DP=437
-1	4771150	.	AGGCAGAGGATTTAGGGGGCAGTGAAACTA	AA	100	PASS	AF=0.365014;HP=2;NF=25;NR=17;NS=51;CA=0;DP=446
-1	4773228	.	AACA	AA	100	PASS	AF=0.358433;HP=4;NF=49;NR=37;NS=51;CA=0;DP=403
-1	4779293	rs35799766;-/A,venter	GAA	GA	100	PASS	AF=0.620558;HP=4;DB;NF=40;NR=44;NS=52;CA=0;DP=539
-1	4783405	.	TACGTATATACATATACA	TA	100	PASS	AF=0.346752;HP=1;NF=20;NR=40;NS=52;CA=0;DP=331
-1	4784171	.	TA	TAAGA	100	PASS	AF=0.058761;HP=2;NF=4;NR=4;NS=52;CA=0;DP=522
-1	4787548	rs35350740;-/CA,mills	AACA	AA	100	PASS	AF=0.294238;HP=3;DB;NF=43;NR=40;NS=52;CA=0;DP=565
-1	4790642	rs5772184;-/T,venter	ATT	AT	100	PASS	AF=0.360239;HP=10;DB;NF=23;NR=25;NS=52;CA=0;DP=544
-1	4794867	.	AATA	AA	59	PASS	AF=0.0541594;HP=2;NF=6;NR=24;NS=52;CA=0;DP=316
-1	4794934	.	CT	CTCTCTTT	21	PASS	AF=0.322809;HP=1;NF=7;NR=9;NS=50;CA=M;DP=241
-1	4800829	rs35005833;-/C,venter	TC	TCC	100	PASS	AF=0.404199;HP=5;DB;NF=48;NR=15;NS=52;CA=0;DP=479
-1	4806476	.	GC	GCC	100	PASS	AF=0.0973173;HP=6;NF=8;NR=8;NS=52;CA=M;DP=398
-1	4808450	rs34573971;-/A,venter	GAA	GA	100	PASS	AF=0.332411;HP=9;DB;NF=26;NR=22;NS=52;CA=0;DP=474
-1	4809140	rs60726929;-/TCCA,venter,watson	TC	TCATCC	100	PASS	AF=0.348085;HP=1;DB;NF=49;NR=32;NS=52;CA=0;DP=579
-1	4810276	rs3030822;-/TAGT,watson	ATAGTT	AT	100	PASS	AF=0.242205;HP=1;DB;NF=27;NR=13;NS=52;CA=0;DP=582
-1	4831434	.	TA	TACCACACACACA	100	PASS	AF=0.49717;HP=1;NF=18;NR=17;NS=52;CA=0;DP=675
-1	4831567	rs34042090;-/CA	CCAC	CC	100	PASS	AF=0.535527;HP=4;DB;NF=52;NR=45;NS=52;CA=0;DP=738
-1	4833596	rs35226825;-/T	AT	ATT	100	PASS	AF=0.237481;HP=5;DB;NF=19;NR=19;NS=52;CA=0;DP=498
-1	4839967	.	TCCTGCCAGCCGGGGGC	TC	100	PASS	AF=0.0394386;HP=2;NF=5;NR=2;NS=52;CA=0;DP=565
-1	4840948	rs59349393;-/AAACCACATCCCTTGAACT	GACTAAACCACATCCCTTGAA	GA	100	PASS	AF=0.144437;HP=1;DB;NF=16;NR=17;NS=52;CA=0;DP=578
-1	4846284	rs36118323;-/T,venter	CT	CTT	100	PASS	AF=0.130437;HP=7;DB;NF=12;NR=15;NS=52;CA=0;DP=415
-1	4855247	venter	GA	GACACA	100	PASS	AF=0.301971;HP=1;NF=19;NR=3;NS=52;CA=0;DP=635
-1	4864897	venter	AT	ATT	100	PASS	AF=0.215684;HP=6;NF=17;NR=20;NS=52;CA=0;DP=450
-1	4865373	rs34273857;-/A,venter	CA	CAA	100	PASS	AF=0.169967;HP=6;DB;NF=17;NR=15;NS=52;CA=0;DP=533
diff --git a/tests/vcf-examples/4.vcf b/tests/vcf-examples/4.vcf
deleted file mode 100644
index 65ed14e..0000000
--- a/tests/vcf-examples/4.vcf
+++ /dev/null
@@ -1,318 +0,0 @@
-##fileformat=VCFv4.1
-##INFO=<ID=BCM.AC,Number=1,Type=Integer,Description="Allele count from BCM's (sequencing-based) genotypes subsetted to the 383 validation samples">
-##INFO=<ID=DB,Number=0,Type=Flag,Description="dbSNP Membership">
-##INFO=<ID=SEQUENOM.AC,Number=1,Type=Integer,Description="Allele count from Sequenom genotyping">
-##INFO=<ID=SRC,Number=1,Type=String,Description="Type of SNPs submitted for validation; VQSR refers to preliminary consensus set, not the final one">
-##INFO=<ID=PQ,Number=1,Type=Integer,Description="BWA mapping quality of the PCR primers">
-##FILTER=<ID=AMBIGUOUS_SEQUENOM_CALLS,Description="Possible Sequenom miscalls based on manual review of cluster plots">
-##FILTER=<ID=HIGH_NO_CALL_RATE,Description="Extremely high no-call rate">
-##FILTER=<ID=INCORRECT_SEQUENOM_CALLS,Description="Clear Sequenom miscalls that cannot easily be fixed based on manual review of cluster plots">
-##FILTER=<ID=NOT_DESIGNED,Description="Primer not designed">
-##FILTER=<ID=NOT_TYPED,Description="Not typed">
-##FILTER=<ID=POLYMORPHIC_SAMPLES_FAILED,Description="All polymorphic samples from sequencing were no-called">
-##FILTER=<ID=POSSIBLE_PROBE_FAILURE,Description="Suspicious genotyping based on nearby SNPs">
-##FILTER=<ID=PQ10,Description="PQ<10">
-##fileDate=20110524
-##reference=ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/human_g1k_v37.fasta.gz
-##source=EricBanksValidationQC;fromGoncaloAbecasisValidationSelection
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	HG00127	HG00128	HG00136	HG00137	HG00138	HG00139	HG00152	HG00156	HG00234	HG00235	HG00237	HG00242	HG00244	HG00262	HG01055	HG01079	NA19138	NA18974	NA18523	NA12717	NA19209	NA18577	NA18973	NA18943	NA12873	NA18623	NA18622	NA18948	NA19171	NA19204	NA06994	NA18563	NA18547	NA18861	NA18608	NA12282	NA12751	NA18959	NA19331	NA19453	NA20537	NA12046	NA20515	NA20516	NA20521	NA20524	NA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	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/ [...]
-20	62918298	.	G	A	33	NOT_DESIGNED	SRC=VQSR+2-OF-7
-20	62961477	.	T	C	17	AMBIGUOUS_SEQUENOM_CALLS;PQ10	SEQUENOM.AC=0;SRC=VQSR+2-OF-7;PQ=0	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0 [...]
diff --git a/tests/vcf-examples/5.vcf b/tests/vcf-examples/5.vcf
deleted file mode 100644
index a23ed89..0000000
--- a/tests/vcf-examples/5.vcf
+++ /dev/null
@@ -1,1000 +0,0 @@
-##fileformat=VCFv4.0
-##fileDate=2011-07-18
-##source=Platypus_Version_0.1
-##platypusOptions={'bamFiles': ['/data/lindah/illumina_projects/rimmer_indels/AllData.bam'], 'labels': None, 'refFile': '/ib/groups/bsg/scratch/rimmer/Genomes/human_g1k_v37_ebv.fa', 'maxHaplotypes': 256, 'maxSize': 250, 'parseNCBI': 0, 'ploidy': 2, 'bufferSize': 1000000, 'nCPU': 1, 'minFlank': 3, 'minPosterior': 5, 'logFileName': 'log.txt', 'regions': ['20'], 'processRegionSize': 30000000, 'maxVariants': 8, 'maxReads': 5000000, 'genIndels': 1, 'minReads': 2, 'dataType': 'population', 'mi [...]
-##INFO=<ID=FR,Number=0,Type=Float,Description="Estimated population frequency">
-##INFO=<ID=HP,Number=1,Type=Integer,Description="Homopolmer run length">
-##INFO=<ID=TR,Number=0,Type=Integer,Description="Total number of reads containing this variant">
-##INFO=<ID=PP,Number=0,Type=Float,Description="Posterior probability (phred scaled) that this variant segregates">
-##INFO=<ID=NF,Number=0,Type=Integer,Description="Total number of forward reads containing this variant">
-##INFO=<ID=SC,Number=1,Type=String,Description="Genomic sequence 10 bases either side of variant position">
-##INFO=<ID=NR,Number=0,Type=Integer,Description="Total number of reverse reads containing this variant">
-##INFO=<ID=TC,Number=0,Type=Integer,Description="Total coverage at this locus">
-##FILTER=<ID=sb,Description="Variant not seen at least once on both strands">
-##FILTER=<ID=pp10,Description="Posterior probability phred-score is less than 10">
-##FILTER=<ID=pp5,Description="Posterior probability phred-score is less than 5">
-##FILTER=<ID=hp10,Description="Inside a homopolymer of length greater than 10">
-##FORMAT=<ID=GT,Number=1,Type=String,Description="Unphased genotypes">
-##FORMAT=<ID=FT,Number=1,Type=String,Description="Sample Genotype Filter">
-##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype quality, as Phred score">
-##FORMAT=<ID=HQ,Number=.,Type=Integer,Description="Haplotype Quality">
-##FORMAT=<ID=GL,Number=.,Type=Float,Description="Genotype log-likelihoods (log10) for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites">
-##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read depth at this position for this sample">
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	AllData.bam
-20	67500	.	T	TTGGTATCTAG	.	PASS	FR=0.5;HP=2;NF=6;NR=2;PP=100.0;SC=CCTGATTTCCTTGGTATTAAA;TC=20;TR=8	GT:GL:GQ	0/1:-198.02,-21.47,-166.02:100
-20	69506	.	G	GAC,GACACAC	.	PASS	FR=0.5,0.5;HP=1;NF=1,3;NR=1,0;PP=44.0,72.0;SC=TGGACACGTGGACACACACAC;TC=20;TR=2,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	70484	.	CTCTT	C	.	PASS	FR=0.5;HP=2;NF=13;NR=3;PP=100.0;SC=GTCTATGTCTCTCTTTCTCTT;TC=31;TR=16	GT:GL:GQ	0/1:-189.04,-24.53,-147.47:100
-20	72104	.	TA	T	.	PASS	FR=0.5;HP=4;NF=9;NR=10;PP=100.0;SC=TTTAAGTCTGTAAAACCATAC;TC=39;TR=19	GT:GL:GQ	0/1:-173.69,-34.04,-169.85:100
-20	74729	.	G	GT	.	PASS	FR=0.5;HP=9;NF=4;NR=4;PP=100.0;SC=AAGTTTTTTGGTTTTTTTTTA;TC=29;TR=8	GT:GL:GQ	0/1:-83.86,-25.71,-59.16:100
-20	117309	.	G	GCAGGATTTCAT	.	PASS	FR=0.5;HP=1;NF=4;NR=4;PP=100.0;SC=CAGGATTTCTGCAGGATTTCA;TC=25;TR=8	GT:GL:GQ	0/1:-259.57,-46.67,-146.18:100
-20	119645	.	G	GT	.	PASS	FR=1.0;HP=5;NF=6;NR=5;PP=100.0;SC=TTGTTTGTTTGTTGTTGTTGT;TC=16;TR=11	GT:GL:GQ	1/1:-157.48,-18.84,-7.1:77
-20	120122	.	A	AAG	.	PASS	FR=1.0;HP=6;NF=10;NR=8;PP=100.0;SC=ATAAAGAAAAAAATTTTAAAA;TC=27;TR=18	GT:GL:GQ	1/1:-266.98,-24.1,-5.49:100
-20	120750	.	C	CAATT	.	PASS	FR=1.0;HP=6;NF=10;NR=10;PP=100.0;SC=TTTTATAAAACAATTGAGACT;TC=21;TR=20	GT:GL:GQ	1/1:-319.22,-18.71,-2.07:100
-20	122806	.	T	TTA	.	PASS	FR=0.5;HP=2;NF=8;NR=7;PP=100.0;SC=CAGAAAAGAATTATATATATA;TC=29;TR=15	GT:GL:GQ	0/1:-181.3,-19.86,-96.14:100
-20	126155	.	GCAAA	G	.	PASS	FR=0.5;HP=1;NF=5;NR=5;PP=100.0;SC=GCAATGTGCGGCAAACAAAGG;TC=32;TR=10	GT:GL:GQ	0/1:-122.73,-27.0,-209.16:100
-20	126310	.	ACC	A	.	PASS	FR=0.5;HP=5;NF=3;NR=8;PP=100.0;SC=GATGGCTCCTACCCCCGTTTC;TC=26;TR=11	GT:GL:GQ	0/1:-153.97,-42.91,-110.82:100
-20	131505	.	CTCT	C	.	PASS	FR=1.0;HP=2;NF=11;NR=11;PP=100.0;SC=TACTTGTGATCTCTTGTCTTT;TC=24;TR=22	GT:GL:GQ	1/1:-487.46,-251.24,-235.3:100
-20	131948	.	C	CCA	.	PASS	FR=1.0;HP=1;NF=2;NR=11;PP=100.0;SC=TTATCTTACACCACACACACA;TC=27;TR=13	GT:GL:GQ	1/1:-201.6,-36.32,-23.94:100
-20	135116	.	T	TTTGCATTCACAGGAAGACTATAAATA	.	PASS	FR=1.0;HP=2;NF=2;NR=1;PP=100.0;SC=TCTAGAGAAGTGCTCTCCAAT;TC=15;TR=3	GT:GL:GQ	1/1:-603.73,-461.77,-448.12:100
-20	135119	.	TC	T	.	PASS	FR=1.0;HP=2;NF=2;NR=2;PP=100.0;SC=AGAGAAGTGCTCTCCAATAGA;TC=21;TR=4	GT:GL:GQ	1/1:-603.73,-576.89,-572.06:100
-20	137518	.	GTA	G	.	PASS	FR=0.5005;HP=2;NF=5;NR=5;PP=100.0;SC=GTGTGTGTGTGTATATATATA;TC=21;TR=10	GT:GL:GQ	1/0:-210.61,-46.97,-32.7:29
-20	138178	.	GC	G	.	PASS	FR=1.0;HP=3;NF=21;NR=5;PP=100.0;SC=CTTCTGGAAAGCCTGGCCATG;TC=29;TR=26	GT:GL:GQ	1/1:-267.55,-29.21,-9.21:100
-20	138570	.	ATATGTGTGTG	ATG,A	.	PASS	FR=0.5,0.5;HP=2;NF=6,2;NR=9,2;PP=100.0,10.0;SC=TCAAATATATATATGTGTGTG;TC=28;TR=15,4	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:65
-20	140396	.	TTTG	T	.	PASS	FR=1.0;HP=2;NF=15;NR=4;PP=100.0;SC=AGGTTTTTGCTTTGTTGTTGT;TC=34;TR=19	GT:GL:GQ	1/1:-246.82,-30.67,-15.42:100
-20	144832	.	C	CT	.	PASS	FR=1.0;HP=3;NF=12;NR=22;PP=100.0;SC=TCCTAAAACTCTTGTAATATC;TC=35;TR=34	GT:GL:GQ	1/1:-541.89,-322.78,-299.72:100
-20	144884	.	CCTT	C	.	PASS	FR=1.0;HP=1;NF=9;NR=16;PP=100.0;SC=TGTAATGACACCTTCTTTTTC;TC=29;TR=25	GT:GL:GQ	1/1:-590.4,-430.25,-411.02:100
-20	145257	.	G	GC	.	PASS	FR=1.0;HP=2;NF=11;NR=8;PP=100.0;SC=ATGGTGGCAGGGCCTGTAATC;TC=21;TR=19	GT:GL:GQ	1/1:-258.74,-106.61,-91.83:100
-20	153298	.	T	TTC	.	PASS	FR=1.0;HP=2;NF=13;NR=17;PP=100.0;SC=CAGGATTTCTTTGTTTTAAGA;TC=34;TR=30	GT:GL:GQ	1/1:-447.58,-228.67,-205.19:100
-20	160111	.	A	AT	.	PASS	FR=1.0;HP=10;NF=8;NR=9;PP=100.0;SC=GAGCTCTTGAATTTTTTTTTT;TC=25;TR=17	GT:GL:GQ	1/1:-115.49,-38.32,-28.08:85
-20	163607	.	A	AAT	.	PASS	FR=1.0;HP=2;NF=12;NR=14;PP=100.0;SC=ACATTAAATGATTCAAATGAT;TC=31;TR=26	GT:GL:GQ	1/1:-308.34,-35.98,-14.5:100
-20	163741	.	T	TACACAC	.	PASS	FR=0.5243;HP=1;NF=13;NR=6;PP=100.0;SC=GAACCCTCTGTACACACACAC;TC=28;TR=19	GT:GL:GQ	0/1:-416.01,-75.48,-55.48:13
-20	164279	.	G	GAAAAC	.	PASS	FR=0.5;HP=8;NF=1;NR=1;PP=100.0;SC=GAAAAGAAAAGAAAAGAAAAC;TC=34;TR=2	GT:GL:GQ	0/1:-492.01,-428.61,-448.28:100
-20	164284	.	G	GAAAAC,C	.	PASS	FR=0.5,0.5;HP=8;NF=5,10;NR=11,9;PP=100.0,100.0;SC=GAAAAGAAAAGAAAACTCATC;TC=33;TR=16,19	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	176386	.	CGTGTGT	C	.	PASS	FR=1.0;HP=2;NF=3;NR=2;PP=100.0;SC=TAATCCCATTCGTGTGTGTGT;TC=25;TR=5	GT:GL:GQ	1/1:-176.18,-68.1,-61.92:77
-20	179735	.	TTAAAA	T	.	PASS	FR=0.5;HP=1;NF=4;NR=4;PP=100.0;SC=ACCTTTGATCTTAAAATAAAA;TC=27;TR=8	GT:GL:GQ	0/1:-142.0,-61.37,-164.64:100
-20	218255	.	A	AG	.	PASS	FR=0.5;HP=1;NF=5;NR=3;PP=100.0;SC=TGCTCACTGCAATAAAAAGAA;TC=17;TR=8	GT:GL:GQ	0/1:-99.61,-20.66,-85.67:100
-20	222539	.	C	CA	.	PASS	FR=0.5;HP=2;NF=1;NR=9;PP=100.0;SC=TACCCAGCTACTTCTCTTAAG;TC=31;TR=10	GT:GL:GQ	0/1:-113.51,-40.72,-197.06:100
-20	230058	.	CAT	C	.	PASS	FR=0.5;HP=1;NF=6;NR=2;PP=100.0;SC=GACTCCATCTCATAAAAAAAA;TC=33;TR=8	GT:GL:GQ	0/1:-215.64,-148.07,-177.0:100
-20	236459	.	G	GAT	.	PASS	FR=0.5001;HP=2;NF=1;NR=1;PP=100.0;SC=TTGGAATACAGATATATATAT;TC=14;TR=2	GT:GL:GQ	0/1:-82.0,-46.74,-54.25:35
-20	237649	.	CAGAT	C	.	PASS	FR=0.5;HP=2;NF=1;NR=1;PP=79.0;SC=AGATAGATGACAGATAGATAG;TC=23;TR=2	GT:GL:GQ	0/1:-209.52,-180.44,-254.54:100
-20	237816	.	A	AT	.	PASS	FR=0.5;HP=4;NF=4;NR=7;PP=100.0;SC=CATTTTCATCATTTTAATAAC;TC=32;TR=11	GT:GL:GQ	0/1:-124.3,-28.61,-145.84:100
-20	243223	.	C	CT	.	PASS	FR=0.5;HP=1;NF=12;NR=4;PP=100.0;SC=ATCTGTGTGACTGTGATCAAA;TC=33;TR=16	GT:GL:GQ	0/1:-191.55,-34.68,-144.05:100
-20	246483	.	T	TTAAA	.	PASS	FR=0.5;HP=1;NF=3;NR=4;PP=100.0;SC=AGACTCCATCTTAAATAAATA;TC=25;TR=7	GT:GL:GQ	0/1:-110.34,-17.05,-40.1:100
-20	251373	.	ACTT	A	.	PASS	FR=0.5;HP=2;NF=1;NR=4;PP=100.0;SC=TTGCTCCAGCACTTCTTCTGG;TC=19;TR=5	GT:GL:GQ	0/1:-99.2,-52.91,-150.48:100
-20	271135	.	G	GC	.	PASS	FR=1.0;HP=2;NF=3;NR=4;PP=100.0;SC=AAGACCGAGGGCGACCTCGAG;TC=16;TR=7	GT:GL:GQ	1/1:-163.65,-94.48,-85.08:78
-20	286648	.	TAAATA	T	.	PASS	FR=0.5;HP=6;NF=5;NR=5;PP=100.0;SC=TCTAAATAAATAAATAAAAGG;TC=22;TR=10	GT:GL:GQ	0/1:-240.51,-100.72,-176.05:100
-20	299585	.	AC	A	.	PASS	FR=1.0;HP=2;NF=4;NR=7;PP=21.0;SC=ACAGGGAGAGACCTTGTCGAA;TC=14;TR=11	GT:GL:GQ	1/1:-152.36,-140.91,-138.05:46
-20	334317	.	TC	T	.	PASS	FR=1.0;HP=6;NF=9;NR=8;PP=100.0;SC=CCTGGATCCTTCCCCCCTTCT;TC=24;TR=17	GT:GL:GQ	1/1:-177.37,-48.79,-33.34:100
-20	337392	.	ACC	A	.	PASS	FR=0.5;HP=6;NF=5;NR=1;PP=100.0;SC=CCTTGTTACCACCCCTCCCTG;TC=19;TR=6	GT:GL:GQ	0/1:-91.61,-45.67,-115.7:100
-20	340044	.	GCAC	G	.	PASS	FR=0.5;HP=1;NF=2;NR=5;PP=100.0;SC=ATGAAGGCTGGCACCACCAGT;TC=22;TR=7	GT:GL:GQ	0/1:-122.54,-28.81,-115.11:100
-20	343323	.	A	ATG	.	PASS	FR=0.5;HP=2;NF=8;NR=4;PP=100.0;SC=GATAAACAGGATGTCCACCAG;TC=23;TR=12	GT:GL:GQ	0/1:-150.99,-48.03,-125.5:100
-20	346702	.	AGCCTCCCAAAGGAG	A	.	PASS	FR=0.5;HP=1;NF=4;NR=3;PP=100.0;SC=CACCCACCTCAGCCTCCCAAA;TC=17;TR=7	GT:GL:GQ	0/1:-191.1,-120.01,-173.49:100
-20	347858	.	A	AAAACAAAC	.	PASS	FR=0.5;HP=4;NF=2;NR=1;PP=100.0;SC=TCCGTCTCCAAAAACAAACAA;TC=22;TR=3	GT:GL:GQ	0/1:-270.04,-201.07,-226.88:100
-20	347878	.	A	AAAAC	.	PASS	FR=0.5;HP=3;NF=2;NR=1;PP=100.0;SC=AAAAAACAAAACAAACAAACA;TC=22;TR=3	GT:GL:GQ	0/1:-258.23,-262.98,-327.72:100
-20	348365	.	G	GT	.	PASS	FR=0.5;HP=2;NF=5;NR=4;PP=100.0;SC=ACGGCCCATGGGATCGAATAG;TC=19;TR=9	GT:GL:GQ	0/1:-127.12,-35.07,-72.46:100
-20	349321	.	ACT	A	.	PASS	FR=0.5;HP=3;NF=10;NR=3;PP=100.0;SC=CCAGGCCTCCACTCTCTGCTG;TC=20;TR=13	GT:GL:GQ	0/1:-183.61,-95.19,-129.48:100
-20	355549	.	A	AC	.	PASS	FR=1.0;HP=10;NF=12;NR=9;PP=100.0;SC=AACAACAACAAAAAAAAAAAC;TC=24;TR=21	GT:GL:GQ	1/1:-171.74,-97.15,-84.12:100
-20	356670	.	T	TCAAA	.	PASS	FR=0.5;HP=3;NF=4;NR=2;PP=100.0;SC=AGACACTGCCTCAAAAAAACA;TC=16;TR=6	GT:GL:GQ	0/1:-204.44,-131.78,-155.8:100
-20	356675	.	A	AAAAC	.	PASS	FR=1.0;HP=6;NF=2;NR=3;PP=100.0;SC=CTGCCTCAAAAAAACAAACAA;TC=17;TR=5	GT:GL:GQ	1/1:-201.68,-85.68,-76.1:85
-20	358147	.	CA	C	.	PASS	FR=1.0;HP=4;NF=10;NR=5;PP=100.0;SC=TGGGATTTGACAAACCCAGCT;TC=18;TR=15	GT:GL:GQ	1/1:-150.87,-32.16,-20.25:100
-20	360927	.	TAA	T	.	PASS	FR=1.0;HP=7;NF=4;NR=7;PP=100.0;SC=ATGTGCTTTATAAAAAAGGGG;TC=18;TR=11	GT:GL:GQ	1/1:-185.94,-114.38,-104.3:84
-20	380790	.	C	CT	.	PASS	FR=1.0;HP=3;NF=16;NR=12;PP=100.0;SC=CACCACACCCCGACCCTAATT;TC=32;TR=28	GT:GL:GQ	1/1:-323.67,-24.71,-1.84:100
-20	385989	.	T	TA	.	PASS	FR=0.5;HP=7;NF=7;NR=4;PP=100.0;SC=AGATTTTTTTTAAAAAACTCT;TC=29;TR=11	GT:GL:GQ	0/1:-131.67,-23.75,-80.28:100
-20	386575	.	GTTCT	G	.	PASS	FR=0.5;HP=3;NF=2;NR=3;PP=100.0;SC=TGATAAGAATGTTCTTTCTTT;TC=24;TR=5	GT:GL:GQ	0/1:-109.28,-29.71,-86.14:100
-20	387657	.	G	GA	.	PASS	FR=1.0;HP=8;NF=13;NR=19;PP=100.0;SC=ATGCTGAGAAGAAAAAATGAA;TC=38;TR=32	GT:GL:GQ	1/1:-284.64,-52.81,-28.53:100
-20	396023	.	A	AAAAC	.	PASS	FR=1.0;HP=4;NF=9;NR=9;PP=100.0;SC=AAAAAAAACAAAAACAAACAA;TC=25;TR=18	GT:GL:GQ	1/1:-279.26,-33.44,-17.73:100
-20	403158	.	GA	G	.	PASS	FR=0.5;HP=2;NF=4;NR=7;PP=89.0;SC=ATCTATGAAGGAAGGACAGCA;TC=20;TR=11	GT:GL:GQ	0/1:-137.87,-107.23,-160.58:100
-20	405057	.	A	AC	.	PASS	FR=0.5;HP=2;NF=5;NR=4;PP=100.0;SC=AAACACATACACAGACCTCCT;TC=25;TR=9	GT:GL:GQ	0/1:-136.78,-33.82,-124.47:100
-20	421805	.	T	TCCA	.	PASS	FR=0.5;HP=2;NF=2;NR=4;PP=100.0;SC=AGAACACATTTCCAACTAAAC;TC=29;TR=6	GT:GL:GQ	0/1:-108.14,-30.52,-185.93:100
-20	425206	.	GTTTT	G	.	PASS	FR=0.5;HP=7;NF=2;NR=7;PP=100.0;SC=TTGTTTGTTTGTTTTGTTTTT;TC=25;TR=9	GT:GL:GQ	0/1:-158.57,-21.01,-100.22:100
-20	430158	.	GA	G	.	PASS	FR=0.5;HP=3;NF=2;NR=4;PP=100.0;SC=AGAGTCGCTTGAAACCCAGGA;TC=16;TR=6	GT:GL:GQ	0/1:-74.97,-35.93,-74.51:100
-20	434939	.	G	GA	.	PASS	FR=0.5;HP=10;NF=6;NR=2;PP=100.0;SC=AAGAAAAAAGGAAAAAAAAAA;TC=22;TR=8	GT:GL:GQ	0/1:-99.4,-65.02,-85.64:92
-20	436981	.	TTTCATCCA	T	.	PASS	FR=0.5;HP=2;NF=1;NR=2;PP=100.0;SC=AGGTGTGTCCTTTCATCCATT;TC=27;TR=3	GT:GL:GQ	0/1:-88.19,-26.08,-154.96:100
-20	525046	.	G	GT	.	PASS	FR=0.5;HP=10;NF=5;NR=8;PP=100.0;SC=AAAATACAGTGTTTTTTTTTC;TC=33;TR=13	GT:GL:GQ	0/1:-160.44,-103.25,-141.37:100
-20	538639	.	C	CA	.	PASS	FR=1.0;HP=9;NF=14;NR=9;PP=100.0;SC=ACCACCACAACAAAAAAACCC;TC=36;TR=23	GT:GL:GQ	1/1:-261.69,-66.02,-42.16:100
-20	539756	.	G	GT	.	PASS	FR=0.5;HP=1;NF=6;NR=2;PP=100.0;SC=AATGTGAGCAGTCTAGGTAAA;TC=24;TR=8	GT:GL:GQ	0/1:-130.62,-70.51,-165.77:100
-20	540198	.	T	TG	.	PASS	FR=1.0;HP=1;NF=9;NR=16;PP=100.0;SC=AGAGTCGCTGTTATTAAAACC;TC=26;TR=25	GT:GL:GQ	1/1:-262.05,-37.69,-19.11:100
-20	545849	.	A	AT	.	PASS	FR=1.0;HP=9;NF=6;NR=13;PP=100.0;SC=CTCTGGACTGATTTTTTTTTA;TC=24;TR=19	GT:GL:GQ	1/1:-225.47,-140.74,-126.39:100
-20	555243	.	C	CT	.	PASS	FR=0.5;HP=1;NF=3;NR=4;PP=100.0;SC=TTGGGGCCTCCTGGGTCCCAG;TC=23;TR=7	GT:GL:GQ	0/1:-124.01,-59.66,-144.99:100
-20	559298	.	TACAC	T	.	PASS	FR=0.5081;HP=1;NF=1;NR=1;PP=100.0;SC=GGCACACATGTACACACACAC;TC=20;TR=2	GT:GL:GQ	0/1:-95.31,-59.31,-62.75:17
-20	570945	.	A	AACAC	.	PASS	FR=1.0;HP=1;NF=7;NR=2;PP=100.0;SC=AGAAGGCAATAACACACACAC;TC=28;TR=9	GT:GL:GQ	1/1:-281.44,-73.27,-58.53:100
-20	576287	.	T	TTTA	.	PASS	FR=1.0;HP=3;NF=2;NR=9;PP=100.0;SC=CTGGAAAAGTTTTATTATTAT;TC=26;TR=11	GT:GL:GQ	1/1:-188.46,-27.21,-14.74:100
-20	593205	.	AG	A	.	PASS	FR=0.5;HP=6;NF=2;NR=2;PP=100.0;SC=GGGAGTGCGGAGGGGACTCCT;TC=14;TR=4	GT:GL:GQ	0/1:-90.79,-21.16,-46.9:100
-20	635817	.	C	CAGAAAAAAA	.	PASS	FR=1.0;HP=1;NF=6;NR=7;PP=100.0;SC=GAGACTCTCTCAGAAAAAAAA;TC=23;TR=13	GT:GL:GQ	1/1:-318.1,-28.61,-13.35:100
-20	666340	.	AAATAATAATAAT	AAATAAT,A	.	PASS	FR=0.5,0.5;HP=2;NF=1,2;NR=3,3;PP=100.0,100.0;SC=ATACAAATACAAATAATAATA;TC=16;TR=4,5	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	671463	.	AGTGT	A	.	PASS	FR=1.0;HP=1;NF=6;NR=2;PP=100.0;SC=CATGCATGCAAGTGTGTGTGT;TC=25;TR=8	GT:GL:GQ	1/1:-248.41,-147.67,-140.04:63
-20	675799	.	G	GTA	.	PASS	FR=0.5;HP=2;NF=7;NR=3;PP=100.0;SC=TAATGAACATGTATATATACA;TC=20;TR=10	GT:GL:GQ	0/1:-154.12,-35.67,-66.33:100
-20	704073	.	CTCT	C	.	PASS	FR=0.5;HP=3;NF=3;NR=3;PP=100.0;SC=CTTCATTCTTCTCTTTTCTTT;TC=20;TR=6	GT:GL:GQ	0/1:-159.89,-91.96,-171.96:100
-20	704111	.	C	CTTTCT	.	PASS	FR=0.5;HP=4;NF=2;NR=3;PP=100.0;SC=TTCCTCCTCTCTTTGTCTAGT;TC=20;TR=5	GT:GL:GQ	0/1:-189.74,-115.92,-237.08:100
-20	714136	.	TA	T	.	PASS	FR=1.0;HP=2;NF=12;NR=13;PP=100.0;SC=CTGTGGTTGTTAACTGTAGTC;TC=30;TR=25	GT:GL:GQ	1/1:-253.68,-26.24,-6.67:100
-20	715254	.	G	GGT,GGTGTGT	.	PASS	FR=0.5,0.5;HP=1;NF=3,4;NR=0,1;PP=57.0,100.0;SC=ATAGTTTATAGGTGTGTGTGT;TC=23;TR=3,5	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	715847	.	C	CA	.	PASS	FR=1.0;HP=7;NF=10;NR=6;PP=100.0;SC=GGCTCCGTCTCAAAAAAATAA;TC=26;TR=16	GT:GL:GQ	1/1:-157.25,-40.0,-26.17:100
-20	718268	.	A	AAATAAT	.	PASS	FR=0.5;HP=3;NF=1;NR=1;PP=81.0;SC=AAAAAATACAAAATAATAATA;TC=15;TR=2	GT:GL:GQ	0/1:-64.86,-29.69,-87.73:100
-20	724447	.	A	AG	.	PASS	FR=0.5;HP=2;NF=12;NR=9;PP=100.0;SC=GGGTGTTGTGAGACTGATTGA;TC=42;TR=21	GT:GL:GQ	0/1:-229.53,-40.83,-188.06:100
-20	726275	.	CAGA	C	.	PASS	FR=0.5;HP=3;NF=10;NR=10;PP=100.0;SC=ACATATATAACAGAAGGAGAG;TC=41;TR=20	GT:GL:GQ	0/1:-286.26,-52.94,-197.08:100
-20	728851	.	CT	C	.	PASS	FR=0.5;HP=1;NF=5;NR=1;PP=21.0;SC=GATCACACCACTGCAGTCCAG;TC=22;TR=6	GT:GL:GQ	0/1:-200.76,-185.85,-212.48:67
-20	732117	.	CTTTATTTTAT	C	.	PASS	FR=0.9998;HP=4;NF=1;NR=1;PP=80.0;SC=TCAGGTATGTCTTTATTTTAT;TC=14;TR=2	GT:GL:GQ	1/1:-96.6,-68.07,-66.69:34
-20	739616	.	CGTGTGTGT	C	.	PASS	FR=1.0;HP=1;NF=4;NR=4;PP=100.0;SC=TAAAAGTGCTCGTGTGTGTGT;TC=20;TR=8	GT:GL:GQ	1/1:-222.59,-24.43,-16.81:63
-20	744662	.	A	ACAGGTCAAT	.	PASS	FR=0.5;HP=1;NF=3;NR=4;PP=100.0;SC=AAAGGACAAGACAGATCCCTG;TC=16;TR=7	GT:GL:GQ	0/1:-105.45,-32.23,-150.03:100
-20	746855	.	A	AG	.	PASS	FR=1.0;HP=1;NF=9;NR=5;PP=100.0;SC=CTGGGATTACAGTGTGAGCCA;TC=22;TR=14	GT:GL:GQ	1/1:-242.45,-177.27,-167.62:80
-20	747680	.	A	ATAG	.	PASS	FR=0.5;HP=1;NF=3;NR=3;PP=100.0;SC=CTTGTTGGTAATAGCAAGTTA;TC=17;TR=6	GT:GL:GQ	0/1:-177.8,-96.72,-120.09:100
-20	755106	.	C	CA	.	PASS	FR=1.0;HP=3;NF=7;NR=15;PP=100.0;SC=GCTGAGAGGTCAAACCACAAA;TC=27;TR=22	GT:GL:GQ	1/1:-255.81,-41.84,-23.33:100
-20	757564	.	T	TG	.	PASS	FR=0.5;HP=3;NF=3;NR=1;PP=78.0;SC=GGTGGAGCCATGGGTGTCAAA;TC=10;TR=4	GT:GL:GQ	0/1:-67.44,-38.36,-58.29:89
-20	757919	.	A	AC	.	PASS	FR=0.5;HP=9;NF=3;NR=9;PP=100.0;SC=AAAAAACAAAAAAAAAACACC;TC=27;TR=12	GT:GL:GQ	0/1:-172.2,-112.42,-144.61:100
-20	762893	.	G	GA	.	PASS	FR=1.0;HP=6;NF=8;NR=9;PP=100.0;SC=TCTTGGGGGGGAAAAAATGGG;TC=24;TR=17	GT:GL:GQ	1/1:-215.19,-64.36,-48.0:100
-20	782496	.	CAAATAAAT	C	.	PASS	FR=0.5;HP=3;NF=2;NR=1;PP=100.0;SC=GACTCTGCCTCAAATAAATAA;TC=17;TR=3	GT:GL:GQ	0/1:-87.5,-27.65,-92.5:100
-20	786252	.	AAG	A	.	PASS	FR=1.0;HP=5;NF=4;NR=13;PP=100.0;SC=TTAATTAAAAAAGATATTGCA;TC=19;TR=17	GT:GL:GQ	1/1:-216.25,-31.31,-17.45:100
-20	786764	.	T	TA	.	PASS	FR=1.0;HP=3;NF=17;NR=12;PP=100.0;SC=ACTATATATATAATATATTTT;TC=33;TR=29	GT:GL:GQ	1/1:-388.27,-147.23,-125.36:100
-20	787870	.	T	TTTTATTTATTTATTTATTTA	.	PASS	FR=1.0;HP=3;NF=2;NR=1;PP=100.0;SC=ATATCAAGCATTTTATTTATT;TC=19;TR=3	GT:GL:GQ	1/1:-317.88,-65.36,-53.59:99
-20	787893	.	T	TATTTATTTA	.	PASS	FR=0.5;HP=4;NF=1;NR=1;PP=100.0;SC=TTTATTTATTTTTGAGATGGA;TC=20;TR=2	GT:GL:GQ	0/1:-356.98,-227.18,-263.76:5
-20	789767	.	T	TA	.	PASS	FR=1.0;HP=10;NF=8;NR=5;PP=100.0;SC=CAAAGCCAATTAAAAAAAAAA;TC=29;TR=13	GT:GL:GQ	1/1:-124.57,-44.47,-30.25:100
-20	795148	.	T	TTTTA	.	PASS	FR=1.0;HP=4;NF=9;NR=1;PP=100.0;SC=ATAAGTTTATTTTTATTTATT;TC=16;TR=10	GT:GL:GQ	1/1:-136.44,-12.46,-4.83:63
-20	797336	.	GA	G	.	PASS	FR=1.0;HP=10;NF=18;NR=11;PP=100.0;SC=CCATTTATGTGAAAAAAAAAA;TC=35;TR=29	GT:GL:GQ	1/1:-156.82,-42.02,-20.72:100
-20	801157	.	T	TTTC	.	PASS	FR=1.0;HP=6;NF=1;NR=6;PP=100.0;SC=CTTCTCTTTCTTTTTTTCTTT;TC=13;TR=7	GT:GL:GQ	1/1:-142.57,-41.24,-32.92:92
-20	825082	.	TGCCCAGGTC	T	.	PASS	FR=0.5;HP=1;NF=5;NR=1;PP=100.0;SC=CTGCTCAGGTTGCCCAGGTCG;TC=8;TR=6	GT:GL:GQ	1/0:-180.72,-60.67,-71.61:61
-20	833239	.	ACT	A	.	PASS	FR=0.5;HP=1;NF=3;NR=5;PP=100.0;SC=GGAGAAATAGACTCTCTCTCT;TC=21;TR=8	GT:GL:GQ	0/1:-96.13,-31.34,-89.12:100
-20	835500	.	TTGTG	T	.	PASS	FR=1.0;HP=2;NF=8;NR=2;PP=100.0;SC=GTGTTTGTGTTTGTGTGTGTG;TC=29;TR=10	GT:GL:GQ	1/1:-258.26,-62.01,-52.79:77
-20	855678	.	TC	T	.	PASS	FR=0.5;HP=2;NF=3;NR=5;PP=100.0;SC=TCTTTTTCTTTCTTTTTTTTC;TC=28;TR=8	GT:GL:GQ	0/1:-124.38,-62.93,-124.85:100
-20	860945	.	A	AG	.	PASS	FR=0.5;HP=6;NF=2;NR=6;PP=100.0;SC=GTATATTAAGAGGGGGTGAAA;TC=23;TR=8	GT:GL:GQ	0/1:-96.52,-33.16,-85.46:100
-20	863148	.	C	CTAT	.	PASS	FR=0.5;HP=2;NF=3;NR=12;PP=100.0;SC=CCAGAGAAGGCTATTGCTCTC;TC=37;TR=15	GT:GL:GQ	0/1:-223.19,-48.7,-208.9:100
-20	899789	.	CTCTT	C	.	PASS	FR=0.5;HP=3;NF=1;NR=3;PP=100.0;SC=TTTCCTTCTTCTCTTTCTTTC;TC=21;TR=4	GT:GL:GQ	0/1:-62.34,-23.94,-85.48:100
-20	900698	.	T	TC	.	PASS	FR=1.0;HP=4;NF=11;NR=5;PP=100.0;SC=AGGAAGGCAGTCCCCTTTCCT;TC=29;TR=16	GT:GL:GQ	1/1:-292.54,-113.13,-95.49:100
-20	902060	.	T	TG,G	.	PASS	FR=0.5,0.5;HP=5;NF=2,7;NR=2,4;PP=100.0,100.0;SC=TTGACTGCCCTCCTCCACTTT;TC=19;TR=4,11	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	909945	.	TTATGG	TTGG,T	.	PASS	FR=0.5,0.5;HP=2;NF=10,8;NR=5,5;PP=100.0,100.0;SC=TTAGTTTAGTTTATGGTATCC;TC=32;TR=15,13	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	913303	.	A	AT	.	PASS	FR=1.0;HP=10;NF=9;NR=4;PP=100.0;SC=AGATTTAAAGATTTTTTTTTT;TC=21;TR=13	GT:GL:GQ	1/1:-227.97,-180.37,-171.35:75
-20	922916	.	A	AT	.	PASS	FR=1.0;HP=6;NF=2;NR=1;PP=27.0;SC=TTATTTATTTATTTATTTTTT;TC=7;TR=3	GT:GL:GQ	1/1:-68.71,-54.63,-52.11:41
-20	933970	.	GTTAT	G	.	PASS	FR=1.0;HP=4;NF=5;NR=5;PP=100.0;SC=CAGGCTAATTGTTATTTATTT;TC=24;TR=10	GT:GL:GQ	1/1:-169.08,-10.86,-0.46:87
-20	934153	.	A	AT	.	PASS	FR=1.0;HP=7;NF=4;NR=5;PP=100.0;SC=ATTTTTTTGTATTTTTTAATA;TC=11;TR=9	GT:GL:GQ	1/1:-123.08,-66.05,-59.03:57
-20	945474	.	CAT	C	.	PASS	FR=1.0;HP=2;NF=2;NR=6;PP=100.0;SC=CACACACACACATATATATAT;TC=31;TR=8	GT:GL:GQ	1/1:-229.9,-58.37,-41.73:100
-20	954102	.	A	ATTGT	.	PASS	FR=0.5;HP=6;NF=4;NR=1;PP=100.0;SC=TGTTTGTTTTATTGTTTGTTT;TC=30;TR=5	GT:GL:GQ	0/1:-77.28,-28.19,-134.91:100
-20	972071	.	A	AT	.	PASS	FR=0.5;HP=8;NF=7;NR=5;PP=100.0;SC=ATTAAAAAAGATTTTTTTTGT;TC=27;TR=12	GT:GL:GQ	0/1:-76.99,-19.47,-57.49:100
-20	995685	.	CAAAT	C	.	PASS	FR=1.0;HP=3;NF=3;NR=2;PP=100.0;SC=AACTCTATCTCAAATAAATAA;TC=15;TR=5	GT:GL:GQ	1/1:-96.06,-12.82,-6.68:77
-20	1000562	.	TTTCA	T	.	PASS	FR=0.5;HP=2;NF=10;NR=1;PP=100.0;SC=TCACCCTTTCTTTCATTCACT;TC=23;TR=11	GT:GL:GQ	0/1:-127.76,-31.92,-110.25:100
-20	1005659	.	CTCAG	C	.	PASS	FR=1.0;HP=3;NF=15;NR=6;PP=100.0;SC=AACAAACAAACTCAGTCTGTC;TC=34;TR=21	GT:GL:GQ	1/1:-379.32,-49.71,-26.34:100
-20	1018266	.	CAAT	C	.	PASS	FR=1.0;HP=4;NF=10;NR=7;PP=100.0;SC=GAAGTAACAACAATAATAATA;TC=26;TR=17	GT:GL:GQ	1/1:-307.78,-61.51,-42.82:100
-20	1023817	.	C	CCCT	.	PASS	FR=1.0;HP=3;NF=7;NR=3;PP=100.0;SC=CAGTGCCCACCCCTCCTCTCC;TC=22;TR=10	GT:GL:GQ	1/1:-230.45,-50.55,-37.14:100
-20	1024121	.	A	AT	.	PASS	FR=1.0;HP=6;NF=5;NR=3;PP=100.0;SC=CGGGTCAGGCATTTTTTATCA;TC=16;TR=8	GT:GL:GQ	1/1:-95.55,-28.09,-20.26:65
-20	1042261	.	CCCTG	C	.	PASS	FR=1.0;HP=2;NF=10;NR=10;PP=100.0;SC=CCAAACCCAACCCTGCCTGGC;TC=25;TR=20	GT:GL:GQ	1/1:-365.29,-133.94,-117.57:100
-20	1050585	.	AT	A	.	PASS	FR=1.0;HP=10;NF=9;NR=15;PP=100.0;SC=TTCTAATTCCATTTTTTTTTT;TC=33;TR=24	GT:GL:GQ	1/1:-288.37,-205.98,-189.27:100
-20	1059991	.	G	GAATT	.	PASS	FR=1.0;HP=2;NF=10;NR=6;PP=100.0;SC=AACATTTGTTGAATTAATTAA;TC=25;TR=16	GT:GL:GQ	1/1:-290.89,-32.75,-16.81:100
-20	1072882	.	CAG	C	.	PASS	FR=0.5;HP=6;NF=5;NR=6;PP=100.0;SC=ATCAGAAAAACAGAGACCACA;TC=23;TR=11	GT:GL:GQ	0/1:-124.42,-26.5,-135.46:100
-20	1084744	.	TG	T	.	PASS	FR=1.0;HP=5;NF=9;NR=12;PP=100.0;SC=ACCATAAATGTGGGGCTACTG;TC=23;TR=21	GT:GL:GQ	1/1:-326.86,-192.89,-179.07:100
-20	1100621	.	TAG	T	.	PASS	FR=0.5;HP=4;NF=6;NR=3;PP=100.0;SC=GCTTCTCAAATAGAGTCTTAA;TC=23;TR=9	GT:GL:GQ	0/1:-166.5,-71.13,-124.84:100
-20	1105206	.	C	CAT	.	PASS	FR=1.0;HP=1;NF=15;NR=11;PP=100.0;SC=AATTTATCCACGTGTACCAGA;TC=32;TR=26	GT:GL:GQ	1/1:-427.57,-192.92,-171.28:100
-20	1114638	.	C	CTCTT	.	PASS	FR=1.0;HP=4;NF=9;NR=17;PP=100.0;SC=TGTGTCCTCTCTTTGTATTTG;TC=34;TR=26	GT:GL:GQ	1/1:-420.88,-72.2,-49.92:100
-20	1118278	.	GAA	G	.	PASS	FR=1.0;HP=5;NF=13;NR=8;PP=100.0;SC=AGAAAAGGGAGAAAAGGAGGC;TC=24;TR=21	GT:GL:GQ	1/1:-206.9,-16.17,-0.92:100
-20	1127807	.	TCATCATCATCATCAC	T	.	PASS	FR=0.5;HP=1;NF=2;NR=3;PP=100.0;SC=ATCATCATCATCATCATCATC;TC=18;TR=5	GT:GL:GQ	1/0:-246.11,-143.41,-171.3:100
-20	1133620	.	GC	G	.	PASS	FR=1.0;HP=3;NF=17;NR=8;PP=100.0;SC=TAAGGACCAAGCCCTGTTTAT;TC=28;TR=25	GT:GL:GQ	1/1:-266.52,-52.99,-34.3:100
-20	1162839	.	AG	A	.	PASS	FR=0.5;HP=10;NF=1;NR=6;PP=100.0;SC=GGGGTGGGGGAGGGGGTAGAA;TC=27;TR=7	GT:GL:GQ	0/1:-154.34,-117.72,-158.43:100
-20	1165265	.	TACAC	T	.	PASS	FR=1.0;HP=1;NF=2;NR=1;PP=100.0;SC=CACACGCGCGTACACACACAC;TC=13;TR=3	GT:GL:GQ	1/1:-65.7,-24.93,-20.64:52
-20	1168799	.	T	TAC	.	PASS	FR=0.5;HP=3;NF=1;NR=3;PP=100.0;SC=ATATATATAATACACACACAC;TC=33;TR=4	GT:GL:GQ	0/1:-146.28,-74.63,-149.77:100
-20	1194678	.	A	AT	.	PASS	FR=1.0;HP=8;NF=13;NR=12;PP=100.0;SC=TACAAGATTAATTTTTTTTGT;TC=37;TR=25	GT:GL:GQ	1/1:-428.37,-300.25,-279.55:89
-20	1195705	.	AAAG	A	.	PASS	FR=1.0;HP=2;NF=10;NR=12;PP=100.0;SC=AGAGATGGCCAAAGAAGACAT;TC=27;TR=22	GT:GL:GQ	1/1:-481.8,-237.54,-219.64:100
-20	1200593	.	GA	G	.	PASS	FR=0.5;HP=5;NF=7;NR=5;PP=100.0;SC=TTTTTTAAAAGATCAACAAAA;TC=31;TR=12	GT:GL:GQ	0/1:-291.7,-258.36,-302.47:100
-20	1202056	.	C	CT	.	PASS	FR=0.5;HP=6;NF=2;NR=1;PP=73.0;SC=TTCTTTCTTTCTTTCTTTCTT;TC=17;TR=3	GT:GL:GQ	0/1:-78.02,-50.24,-96.3:100
-20	1217230	.	C	CT	.	PASS	FR=0.5;HP=3;NF=6;NR=7;PP=100.0;SC=TGAATCTGAACTTTCTCTATT;TC=29;TR=13	GT:GL:GQ	0/1:-136.34,-37.11,-139.78:100
-20	1238533	.	TATC	T	.	PASS	FR=0.5;HP=1;NF=6;NR=8;PP=100.0;SC=ATTCCCTTATTATCCTTTTAA;TC=32;TR=14	GT:GL:GQ	0/1:-203.0,-27.66,-145.09:100
-20	1258183	.	GTGTC	G	.	PASS	FR=0.5;HP=2;NF=9;NR=7;PP=100.0;SC=CTGTGCATGTGTGTCTGTGTG;TC=40;TR=16	GT:GL:GQ	0/1:-393.66,-270.04,-334.02:100
-20	1258199	.	C	CTG	.	PASS	FR=1.0;HP=2;NF=10;NR=8;PP=100.0;SC=GTGTGTGTATCTGTGTGTGTG;TC=39;TR=18	GT:GL:GQ	1/1:-443.43,-273.82,-255.93:100
-20	1258268	.	C	CTG	.	PASS	FR=1.0;HP=1;NF=14;NR=7;PP=100.0;SC=GTATGTGTGCCTGTGTGTGTG;TC=36;TR=21	GT:GL:GQ	1/1:-385.28,-210.98,-205.13:73
-20	1258437	.	GTGTGCCTGTGTGTGTC	G	.	PASS	FR=0.5;HP=2;NF=3;NR=4;PP=100.0;SC=GCCTGTGTATGTGTGCCTGTG;TC=40;TR=7	GT:GL:GQ	0/1:-300.85,-170.75,-363.46:100
-20	1258704	.	C	CTGTT	.	PASS	FR=0.5;HP=2;NF=6;NR=3;PP=100.0;SC=GTGTGTGTGTCTGTGTGTGTA;TC=34;TR=9	GT:GL:GQ	0/1:-182.12,-58.28,-233.67:100
-20	1270442	.	CA	C	.	PASS	FR=1.0;HP=2;NF=5;NR=12;PP=100.0;SC=CACTGCACTCCAAGCCTAGGT;TC=17;TR=17	GT:GL:GQ	1/1:-162.61,-26.2,-14.46:98
-20	1272295	.	CTCTGT	C	.	PASS	FR=1.0;HP=1;NF=13;NR=7;PP=100.0;SC=CCAAGTTCTGCTCTGTTGATT;TC=25;TR=20	GT:GL:GQ	1/1:-389.78,-103.27,-85.17:100
-20	1272815	.	C	CATAG	.	PASS	FR=1.0;HP=2;NF=11;NR=10;PP=100.0;SC=TAGTCTAAGGCATAGCATCCT;TC=27;TR=21	GT:GL:GQ	1/1:-368.78,-50.48,-32.46:100
-20	1291149	.	GCAA	G	.	PASS	FR=0.5;HP=1;NF=2;NR=3;PP=100.0;SC=CCTGGATACAGCAACAACAGT;TC=25;TR=5	GT:GL:GQ	0/1:-151.35,-93.7,-185.23:100
-20	1292033	.	C	CTTGT	.	PASS	FR=0.5;HP=2;NF=7;NR=5;PP=100.0;SC=CTTACATTTGCTTGTTTGATA;TC=29;TR=12	GT:GL:GQ	0/1:-444.32,-314.49,-337.3:100
-20	1292718	.	GT	G	.	PASS	FR=1.0;HP=8;NF=9;NR=3;PP=100.0;SC=TAATTTTTTAGTTTTTTTTGT;TC=17;TR=12	GT:GL:GQ	1/1:-140.26,-85.11,-76.3:73
-20	1292776	.	T	TA	.	PASS	FR=1.0;HP=1;NF=14;NR=10;PP=100.0;SC=CTCCTGGACTTAGTGATCCTC;TC=25;TR=24	GT:GL:GQ	1/1:-310.19,-119.02,-102.21:100
-20	1303648	.	A	AG	.	PASS	FR=0.5;HP=4;NF=6;NR=2;PP=100.0;SC=GGCAACACTCACCCGGCTGAG;TC=19;TR=8	GT:GL:GQ	0/1:-115.57,-32.83,-76.0:100
-20	1312294	.	A	AT	.	PASS	FR=1.0;HP=7;NF=5;NR=6;PP=100.0;SC=CACCTGGCTAATTTTTTTATT;TC=17;TR=11	GT:GL:GQ	1/1:-196.82,-109.27,-98.21:93
-20	1318554	.	TCCCACAGAGAAGTCC	T	.	PASS	FR=1.0;HP=3;NF=5;NR=4;PP=100.0;SC=ACCTAAGCATTCCCACAGAGA;TC=12;TR=9	GT:GL:GQ	1/1:-228.16,-15.45,-7.14:62
-20	1322791	.	G	GCACACA,GCACACACA	.	PASS	FR=0.5,0.5;HP=1;NF=3,3;NR=0,4;PP=43.0,100.0;SC=GAGAACAAATGCACACACACA;TC=18;TR=3,7	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	1333430	.	C	CT	.	PASS	FR=1.0;HP=2;NF=18;NR=9;PP=100.0;SC=ATGAAGGTGACTTCTCAGGTG;TC=32;TR=27	GT:GL:GQ	1/1:-276.34,-27.55,-7.09:100
-20	1342649	.	AT	A	.	PASS	FR=1.0;HP=6;NF=17;NR=10;PP=100.0;SC=AGTGTATGAGATTTTTTGTTA;TC=29;TR=27	GT:GL:GQ	1/1:-209.72,-24.22,-4.14:100
-20	1349439	.	C	CCCT	.	PASS	FR=0.5;HP=4;NF=2;NR=6;PP=100.0;SC=CCCACATTCCCCCTCCTCTGA;TC=22;TR=8	GT:GL:GQ	0/1:-157.47,-56.31,-133.86:100
-20	1358694	.	C	CAGTTTGGGCACTAACACCTACTT	.	PASS	FR=0.5;HP=1;NF=4;NR=1;PP=100.0;SC=CTATACGGGTCAGTTTGGGCA;TC=19;TR=5	GT:GL:GQ	0/1:-272.45,-105.91,-212.24:100
-20	1364390	.	G	GA	.	PASS	FR=1.0;HP=2;NF=9;NR=6;PP=100.0;SC=GATCAAGTGGGAGATCACTTG;TC=25;TR=15	GT:GL:GQ	1/1:-334.68,-154.31,-139.66:100
-20	1369478	.	CG	C	.	PASS	FR=0.5;HP=2;NF=7;NR=4;PP=100.0;SC=TAAAAACCAACGAGGCTCCAC;TC=23;TR=11	GT:GL:GQ	0/1:-184.87,-113.86,-180.77:100
-20	1372404	.	GA	G	.	PASS	FR=1.0;HP=7;NF=8;NR=5;PP=100.0;SC=GAGGGAGTGGGAAAAAAAGAG;TC=17;TR=13	GT:GL:GQ	1/1:-147.21,-77.38,-68.31:75
-20	1379453	.	C	CTG	.	PASS	FR=1.0;HP=2;NF=4;NR=11;PP=100.0;SC=TGCCAGGACTCTCCTCGCTGT;TC=19;TR=15	GT:GL:GQ	1/1:-192.19,-47.83,-35.2:100
-20	1381135	.	AG	A	.	PASS	FR=0.5;HP=2;NF=3;NR=5;PP=100.0;SC=CTTGAGGACAAGGCATTATAG;TC=26;TR=8	GT:GL:GQ	0/1:-99.07,-46.56,-212.4:100
-20	1386382	.	AGAG	A	.	PASS	FR=0.5;HP=3;NF=7;NR=1;PP=100.0;SC=ACTAATTAAAAGAGAACCCTG;TC=26;TR=8	GT:GL:GQ	0/1:-184.22,-117.09,-276.56:100
-20	1389225	.	CGTGTGT	C	.	PASS	FR=1.0;HP=1;NF=1;NR=1;PP=100.0;SC=TATGAAGACTCGTGTGTGTGT;TC=12;TR=2	GT:GL:GQ	1/1:-80.8,-37.12,-33.18:48
-20	1392633	.	AT	A	.	PASS	FR=0.5;HP=9;NF=8;NR=5;PP=100.0;SC=AAGCCAACACATTTTTTTTTC;TC=29;TR=13	GT:GL:GQ	0/1:-142.17,-103.31,-156.4:100
-20	1399660	.	A	AAAAAC	.	PASS	FR=0.5;HP=2;NF=1;NR=7;PP=100.0;SC=TGTTTATGTTAGAAACAAAAC;TC=28;TR=8	GT:GL:GQ	0/1:-237.24,-123.87,-245.2:100
-20	1401887	.	T	TC	.	PASS	FR=0.5;HP=6;NF=3;NR=5;PP=100.0;SC=TGACTTTTTTTCTCCCTGAGA;TC=26;TR=8	GT:GL:GQ	0/1:-140.81,-26.64,-103.7:100
-20	1403888	.	G	GT	.	PASS	FR=0.5;HP=1;NF=3;NR=5;PP=100.0;SC=CAGAGAGGGCGTAAGATTGGA;TC=18;TR=8	GT:GL:GQ	0/1:-134.33,-94.6,-144.84:100
-20	1411174	.	G	GT	.	PASS	FR=1.0;HP=1;NF=14;NR=18;PP=100.0;SC=TTCCAACAGTGACAAGGGTTT;TC=34;TR=32	GT:GL:GQ	1/1:-370.91,-42.86,-18.85:100
-20	1411544	.	TG	T	.	PASS	FR=0.5;HP=4;NF=7;NR=2;PP=36.0;SC=ATTTATAAAATGTTTTTGTTG;TC=28;TR=9	GT:GL:GQ	0/1:-275.92,-257.59,-310.84:82
-20	1420200	.	CT	C	.	PASS	FR=1.0;HP=2;NF=13;NR=7;PP=100.0;SC=AAGATGGAACCTTAAGTTCAA;TC=24;TR=20	GT:GL:GQ	1/1:-229.24,-45.08,-29.19:100
-20	1421627	.	GC	G	.	PASS	FR=1.0;HP=4;NF=12;NR=6;PP=100.0;SC=GGAGCCCAACGCCCATTTAAA;TC=24;TR=18	GT:GL:GQ	1/1:-219.35,-32.03,-15.65:100
-20	1428402	.	A	ATCTAT	.	PASS	FR=0.5;HP=2;NF=6;NR=3;PP=100.0;SC=AATAGCTGATATCAGTTAAGG;TC=30;TR=9	GT:GL:GQ	0/1:-414.87,-348.43,-419.1:100
-20	1428454	.	TC	T	.	PASS	FR=0.5;HP=2;NF=11;NR=7;PP=100.0;SC=TTACACCGACTCTGTGCAGGT;TC=37;TR=18	GT:GL:GQ	0/1:-456.05,-415.06,-465.1:100
-20	1448428	.	AC	A	.	PASS	FR=1.0;HP=2;NF=12;NR=6;PP=100.0;SC=ACGGTAAACAACCTTCCCGCG;TC=21;TR=18	GT:GL:GQ	1/1:-289.43,-190.83,-179.1:98
-20	1450561	.	A	AAATAAT	.	PASS	FR=1.0;HP=8;NF=6;NR=4;PP=100.0;SC=CTGTCTCAAAAAAAAATAATA;TC=23;TR=10	GT:GL:GQ	1/1:-324.02,-170.06,-160.02:94
-20	1454025	.	GCACACACGCA	G	.	PASS	FR=1.0;HP=1;NF=5;NR=3;PP=100.0;SC=ACGCACACATGCACACACGCA;TC=23;TR=8	GT:GL:GQ	1/1:-298.98,-49.31,-43.52:72
-20	1455718	.	AC	A	.	PASS	FR=0.5;HP=8;NF=5;NR=3;PP=100.0;SC=TGGTGGTAGCACCCCCCCAGG;TC=26;TR=8	GT:GL:GQ	0/1:-122.23,-68.33,-113.23:100
-20	1466298	.	C	CCA	.	PASS	FR=0.5;HP=1;NF=3;NR=2;PP=100.0;SC=CACACACACACCACACACACA;TC=25;TR=5	GT:GL:GQ	0/1:-174.97,-31.68,-40.82:42
-20	1470727	.	TG	T	.	PASS	FR=1.0;HP=4;NF=9;NR=10;PP=100.0;SC=CAACAATCATTGGGGAATATT;TC=24;TR=19	GT:GL:GQ	1/1:-243.08,-66.7,-50.7:100
-20	1473489	.	ATAATT	A	.	PASS	FR=0.5;HP=2;NF=13;NR=9;PP=100.0;SC=TTACTTACAAATAATTTTATT;TC=35;TR=22	GT:GL:GQ	0/1:-297.03,-26.79,-121.41:100
-20	1475430	.	C	CTCT	.	PASS	FR=0.5;HP=3;NF=5;NR=7;PP=100.0;SC=CTCATTTCTTCTCTTTTCATT;TC=31;TR=12	GT:GL:GQ	0/1:-179.5,-26.21,-143.42:100
-20	1477952	.	AGTCTACACGT	A	.	PASS	FR=0.5;HP=1;NF=1;NR=2;PP=100.0;SC=TTGTCTTTTCAGTCTACACGT;TC=26;TR=3	GT:GL:GQ	0/1:-132.31,-83.49,-272.8:100
-20	1485444	.	TGAGAGAGA	T	.	PASS	FR=0.5;HP=2;NF=1;NR=2;PP=100.0;SC=TGTGTGTGTGTGAGAGAGAGA;TC=17;TR=3	GT:GL:GQ	1/0:-294.27,-239.82,-244.87:100
-20	1498426	.	G	GA	.	PASS	FR=1.0;HP=6;NF=18;NR=13;PP=100.0;SC=TACAACGGAAGAAAAGCCTAA;TC=33;TR=31	GT:GL:GQ	1/1:-335.62,-79.86,-57.15:100
-20	1499276	.	TGAGA	T	.	PASS	FR=0.5;HP=2;NF=4;NR=2;PP=100.0;SC=TCAAAGTGAATGAGAGAGAGG;TC=23;TR=6	GT:GL:GQ	0/1:-190.39,-128.87,-245.46:100
-20	1500650	.	A	AG	.	PASS	FR=1.0;HP=1;NF=9;NR=8;PP=100.0;SC=AAGGAGCAGCAGTTCTGAGAG;TC=19;TR=17	GT:GL:GQ	1/1:-187.24,-32.97,-19.25:100
-20	1510246	.	CA	C	.	PASS	FR=1.0;HP=10;NF=15;NR=6;PP=100.0;SC=AACTCTGTCTCAAAAAAAAAA;TC=29;TR=21	GT:GL:GQ	1/1:-113.89,-25.37,-8.27:100
-20	1510966	.	C	CTA	.	PASS	FR=1.0;HP=2;NF=10;NR=3;PP=100.0;SC=TTTTATCTCTCTGTGTCATTT;TC=21;TR=13	GT:GL:GQ	1/1:-215.34,-14.55,0.0:100
-20	1512623	.	TTGTC	T	.	PASS	FR=0.5;HP=1;NF=2;NR=7;PP=100.0;SC=ACTCCATAGATTGTCTGGGTA;TC=27;TR=9	GT:GL:GQ	0/1:-204.17,-64.36,-220.46:100
-20	1516154	.	A	AAG	.	PASS	FR=0.5;HP=1;NF=9;NR=1;PP=100.0;SC=GTTTTATAAGAAGAGAGAGAG;TC=28;TR=10	GT:GL:GQ	0/1:-197.81,-103.51,-159.44:100
-20	1524117	.	G	GTGA	.	PASS	FR=1.0;HP=2;NF=12;NR=14;PP=100.0;SC=TGGGATCAGGGTATTCCCTTC;TC=27;TR=26	GT:GL:GQ	1/1:-368.49,-35.51,-15.43:100
-20	1525024	.	CT	C	.	PASS	FR=0.5;HP=7;NF=3;NR=3;PP=96.0;SC=CCTTCTTTGTCTTTTTTGATC;TC=18;TR=6	GT:GL:GQ	0/1:-53.12,-20.94,-98.55:100
-20	1525853	.	G	GT	.	PASS	FR=0.5;HP=5;NF=7;NR=4;PP=100.0;SC=CCTGAAGTGTGTTTTCCAACT;TC=29;TR=11	GT:GL:GQ	0/1:-133.05,-52.13,-148.67:100
-20	1597255	.	TG	T	.	PASS	FR=0.5;HP=2;NF=13;NR=3;PP=100.0;SC=GTAAAAGTACTGGAAGAAAAG;TC=39;TR=16	GT:GL:GQ	0/1:-269.31,-182.14,-334.79:100
-20	1627288	.	ATTTGT	A	.	PASS	FR=0.5;HP=3;NF=4;NR=2;PP=100.0;SC=ACTTTTTTTCATTTGTTTTGT;TC=20;TR=6	GT:GL:GQ	0/1:-133.15,-70.66,-175.26:100
-20	1629280	.	T	TAATAAAATAA	.	PASS	FR=0.5;HP=3;NF=1;NR=4;PP=100.0;SC=ACTTAAAGTATAATAAAATAA;TC=18;TR=5	GT:GL:GQ	0/1:-155.63,-27.66,-95.67:100
-20	1648829	.	CTTTCTTTTTCTTTTCT	C	.	PASS	FR=0.5;HP=6;NF=1;NR=1;PP=74.0;SC=TTCTTTCTTTCTTTCTTTTTC;TC=20;TR=2	GT:GL:GQ	0/1:-191.4,-160.88,-232.59:100
-20	1653387	.	T	TTTG	.	PASS	FR=0.5;HP=2;NF=2;NR=7;PP=100.0;SC=CGGCCAATCATTTGTTGTTGT;TC=25;TR=9	GT:GL:GQ	0/1:-189.9,-54.75,-106.65:100
-20	1656519	.	GT	G	.	PASS	FR=0.5;HP=9;NF=4;NR=5;PP=100.0;SC=GAGCTGCACTGTTTTTTTTCT;TC=20;TR=9	GT:GL:GQ	0/1:-62.34,-19.97,-47.7:100
-20	1658890	.	ACT	A	.	PASS	FR=0.5;HP=2;NF=6;NR=2;PP=100.0;SC=CATGTGATACACTGTGGGCCC;TC=27;TR=8	GT:GL:GQ	0/1:-198.65,-163.08,-324.51:100
-20	1660493	.	AT	A	.	PASS	FR=0.5;HP=1;NF=6;NR=5;PP=100.0;SC=CATTTGGGAGATGCTATTACC;TC=31;TR=11	GT:GL:GQ	0/1:-160.86,-59.8,-177.36:100
-20	1661355	.	TG	T	.	PASS	FR=0.5;HP=1;NF=6;NR=7;PP=100.0;SC=GAAAAACACATGATTATCCAT;TC=34;TR=13	GT:GL:GQ	0/1:-171.31,-99.84,-269.81:100
-20	1661478	.	G	GT	.	PASS	FR=0.5;HP=9;NF=7;NR=5;PP=100.0;SC=ATACTTTCTTGTTTTTTTGGC;TC=35;TR=12	GT:GL:GQ	0/1:-150.06,-61.16,-108.32:100
-20	1661816	.	C	CA	.	PASS	FR=0.5;HP=1;NF=1;NR=6;PP=100.0;SC=AATTTGCAATCATACAGAAAG;TC=24;TR=7	GT:GL:GQ	0/1:-96.53,-29.07,-136.56:100
-20	1662592	.	GATATAACTA	G	.	PASS	FR=0.5;HP=1;NF=4;NR=5;PP=100.0;SC=TATGGATATGGATATAACTAA;TC=23;TR=9	GT:GL:GQ	0/1:-238.09,-62.84,-220.35:100
-20	1665050	.	A	ATG	.	PASS	FR=0.5;HP=2;NF=6;NR=6;PP=100.0;SC=ATACACACATATATATATGTA;TC=34;TR=12	GT:GL:GQ	0/1:-151.91,-67.61,-244.28:100
-20	1667770	.	TG	T	.	PASS	FR=0.5;HP=6;NF=5;NR=5;PP=100.0;SC=AGGGTTATGATGGGGGGAGAA;TC=29;TR=10	GT:GL:GQ	0/1:-75.51,-17.52,-115.09:100
-20	1674714	.	A	AT	.	PASS	FR=1.0;HP=6;NF=12;NR=9;PP=100.0;SC=AAGGAGAATCATTTTTTCTTA;TC=26;TR=21	GT:GL:GQ	1/1:-198.16,-29.36,-11.98:100
-20	1679689	.	TACACAC	TACACACACAC,T	.	PASS	FR=0.5,0.5;HP=3;NF=2,1;NR=0,1;PP=100.0,100.0;SC=TTAGATGCCCTACACACACAC;TC=23;TR=2,2	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	1680048	.	G	GA	.	PASS	FR=0.5;HP=9;NF=4;NR=9;PP=100.0;SC=GAAAACAACAGAAAAAAAACT;TC=30;TR=13	GT:GL:GQ	0/1:-157.3,-90.19,-130.66:100
-20	1680109	.	GA	G	.	PASS	FR=0.5;HP=4;NF=9;NR=8;PP=100.0;SC=AACAGCAAGAGAAATTATAAA;TC=32;TR=17	GT:GL:GQ	0/1:-210.03,-97.05,-217.17:100
-20	1682621	.	A	AT	.	PASS	FR=1.0;HP=3;NF=18;NR=11;PP=100.0;SC=AATATATCATATTACACAGTG;TC=31;TR=29	GT:GL:GQ	1/1:-304.45,-32.07,-10.59:100
-20	1683112	.	T	TC	.	PASS	FR=1.0;HP=2;NF=6;NR=11;PP=100.0;SC=CAAACCCTCTTCCTATACCAC;TC=23;TR=17	GT:GL:GQ	1/1:-265.19,-181.47,-172.55:74
-20	1683153	.	CA	C	.	PASS	FR=0.5;HP=2;NF=5;NR=7;PP=100.0;SC=GCAGCAGCTGCAAGAAGTCTC;TC=22;TR=12	GT:GL:GQ	0/1:-291.99,-237.27,-279.09:100
-20	1683250	.	ATAGCTCTACCAGT	A	.	PASS	FR=0.5;HP=1;NF=5;NR=4;PP=100.0;SC=AGTTCGAATCATAGCTCTACC;TC=22;TR=9	GT:GL:GQ	0/1:-267.9,-88.45,-154.18:100
-20	1683813	.	C	CT	.	PASS	FR=0.5;HP=6;NF=12;NR=13;PP=100.0;SC=AAGAGAATGTCTTTTTAAAAT;TC=53;TR=25	GT:GL:GQ	0/1:-327.36,-122.23,-224.07:100
-20	1683959	.	C	CA	.	PASS	FR=0.5;HP=8;NF=4;NR=9;PP=100.0;SC=TCAACAATGACAAAAAAAGCA;TC=24;TR=13	GT:GL:GQ	0/1:-130.55,-27.62,-42.34:66
-20	1684576	.	A	AATGTATAATAC	.	PASS	FR=0.5;HP=2;NF=5;NR=4;PP=96.0;SC=ATACTGTTTAAATATTTCCTG;TC=24;TR=9	GT:GL:GQ	0/1:-370.23,-353.25,-494.05:100
-20	1688002	.	AAAAC	A	.	PASS	FR=1.0;HP=3;NF=4;NR=6;PP=100.0;SC=ACTCCCTCTCAAAACAAACAA;TC=22;TR=10	GT:GL:GQ	1/1:-132.2,-18.69,-9.78:74
-20	1690549	.	CCT	C	.	PASS	FR=0.5;HP=3;NF=6;NR=6;PP=100.0;SC=GAAATCTTCCCCTGTCTGTGA;TC=32;TR=12	GT:GL:GQ	0/1:-184.81,-148.16,-332.53:100
-20	1694183	.	CT	C	.	PASS	FR=0.5;HP=3;NF=8;NR=5;PP=100.0;SC=TATACAAAGACTTTATAACCA;TC=29;TR=13	GT:GL:GQ	0/1:-144.04,-44.56,-141.78:100
-20	1699510	.	T	TCCCA	.	PASS	FR=0.5;HP=3;NF=10;NR=2;PP=100.0;SC=AATGTCTCATTCCCACATCCT;TC=19;TR=12	GT:GL:GQ	0/1:-164.23,-17.54,-74.37:100
-20	1701571	.	TTAAAATAAAA	T	.	PASS	FR=0.5;HP=4;NF=5;NR=2;PP=100.0;SC=CATCTCAAAATTAAAATAAAA;TC=21;TR=7	GT:GL:GQ	0/1:-177.13,-95.66,-194.53:100
-20	1716144	.	A	AGTGT	.	PASS	FR=0.5;HP=8;NF=3;NR=4;PP=100.0;SC=GGTTTTTTTTAGTGTGTGTGT;TC=23;TR=7	GT:GL:GQ	0/1:-151.21,-52.44,-109.8:100
-20	1719870	.	TG	T	.	PASS	FR=0.5;HP=1;NF=3;NR=11;PP=100.0;SC=ATCAAACCTCTGTGGGAGAGA;TC=27;TR=14	GT:GL:GQ	0/1:-146.54,-22.92,-111.48:100
-20	1721789	.	GT	G	.	PASS	FR=0.5;HP=9;NF=6;NR=4;PP=100.0;SC=GCACTTGGGAGTTTTTTTTTC;TC=23;TR=10	GT:GL:GQ	0/1:-60.27,-22.43,-60.17:100
-20	1722316	.	CCTTT	C	.	PASS	FR=1.0;HP=2;NF=2;NR=1;PP=100.0;SC=TTTCTCTCTTCCTTTCTTTCT;TC=7;TR=3	GT:GL:GQ	1/1:-85.7,-30.24,-25.46:57
-20	1727042	.	T	TA	.	PASS	FR=1.0;HP=2;NF=10;NR=8;PP=100.0;SC=AATTAAATTATATAGAGGAAG;TC=20;TR=18	GT:GL:GQ	1/1:-223.19,-104.73,-92.26:100
-20	1728298	.	G	GT	.	PASS	FR=1.0;HP=4;NF=11;NR=14;PP=100.0;SC=AAGAACAGAGGTTTTAAGCAT;TC=28;TR=25	GT:GL:GQ	1/1:-297.24,-94.99,-75.97:100
-20	1730788	.	T	TGATA	.	PASS	FR=1.0;HP=3;NF=3;NR=6;PP=100.0;SC=AGATGATAAATGATAGATAGA;TC=36;TR=9	GT:GL:GQ	1/1:-190.89,-23.51,-13.12:87
-20	1731625	.	CA	C	.	PASS	FR=1.0;HP=9;NF=5;NR=8;PP=100.0;SC=GACTCCATCTCAAAAAAAAAG;TC=23;TR=13	GT:GL:GQ	1/1:-93.68,-29.69,-18.4:95
-20	1734082	.	AAAAAT	A	.	PASS	FR=0.5;HP=4;NF=6;NR=3;PP=100.0;SC=CAATAGCTATAAAAATAAAAT;TC=38;TR=9	GT:GL:GQ	0/1:-124.98,-23.78,-220.83:100
-20	1738324	.	T	TC	.	PASS	FR=1.0;HP=3;NF=7;NR=10;PP=100.0;SC=ACACTCCTTTTCCTTCATGAT;TC=22;TR=17	GT:GL:GQ	1/1:-213.69,-47.59,-33.85:100
-20	1738519	.	A	AG	.	PASS	FR=1.0;HP=1;NF=13;NR=11;PP=100.0;SC=CTGTCAAACTAGCCTCTGGCT;TC=29;TR=24	GT:GL:GQ	1/1:-269.52,-42.45,-23.17:100
-20	1741051	.	T	TAA	.	PASS	FR=1.0;HP=1;NF=12;NR=12;PP=100.0;SC=TAAATATATATGACTATTTTT;TC=35;TR=24	GT:GL:GQ	1/1:-395.96,-52.09,-26.1:100
-20	1745352	.	A	ACAATAATCACATCAAAGAT	.	PASS	FR=1.0;HP=2;NF=4;NR=8;PP=100.0;SC=CAAGACCATTACACTAATCAC;TC=17;TR=12	GT:GL:GQ	1/1:-425.27,-43.37,-23.58:100
-20	1746606	.	GTA	G	.	PASS	FR=1.0;HP=2;NF=1;NR=4;PP=100.0;SC=ATATATATGTGTATATATATA;TC=9;TR=5	GT:GL:GQ	1/1:-98.72,-49.48,-45.34:50
-20	1768362	.	G	GAA	.	PASS	FR=1.0;HP=2;NF=7;NR=14;PP=100.0;SC=TAGAGTGATGGAAGAGACTGG;TC=27;TR=21	GT:GL:GQ	1/1:-269.69,-41.32,-23.11:100
-20	1778684	.	A	AGTGCTT	.	PASS	FR=0.5;HP=2;NF=1;NR=1;PP=83.0;SC=ATTGCCCTCCATTGGAGGCTG;TC=14;TR=2	GT:GL:GQ	1/0:-256.33,-220.54,-244.27:69
-20	1833292	.	TA	T	.	PASS	FR=0.5;HP=3;NF=5;NR=5;PP=100.0;SC=ATATTATGTATAATCTCAATT;TC=25;TR=10	GT:GL:GQ	0/1:-147.42,-89.75,-210.06:100
-20	1848829	.	CTTTTCT	C	.	PASS	FR=1.0;HP=8;NF=6;NR=15;PP=100.0;SC=CTTTTCTTTTCTTTTCTTTTC;TC=25;TR=21	GT:GL:GQ	1/1:-409.42,-172.01,-156.56:100
-20	1848853	.	CTT	C	.	PASS	FR=0.5;HP=4;NF=3;NR=4;PP=100.0;SC=CTTTCTTTCTCTTTCTTTCTT;TC=26;TR=7	GT:GL:GQ	0/1:-469.4,-397.68,-416.1:83
-20	1848877	.	C	CTT	.	PASS	FR=0.9999;HP=4;NF=2;NR=1;PP=100.0;SC=TTCTTTCTTTCTCTTTCTTTC;TC=26;TR=3	GT:GL:GQ	1/1:-373.17,-284.63,-280.27:37
-20	1852149	.	CCA	C	.	PASS	FR=0.5;HP=1;NF=4;NR=1;PP=100.0;SC=CACCCCCTCTCCACACACACA;TC=23;TR=5	GT:GL:GQ	0/1:-139.51,-90.17,-161.53:100
-20	1855569	.	AACACAC	A	.	PASS	FR=1.0;HP=1;NF=7;NR=3;PP=100.0;SC=GTCACTCTACAACACACACAC;TC=14;TR=10	GT:GL:GQ	1/1:-159.46,-18.21,-11.49:84
-20	1857852	.	TC	T	.	PASS	FR=1.0;HP=6;NF=4;NR=19;PP=100.0;SC=CCCGTGTCCATCCCCCCTGTA;TC=58;TR=23	GT:GL:GQ	1/1:-667.45,-637.23,-632.11:63
-20	1857976	.	G	GT	.	PASS	FR=1.0;HP=5;NF=12;NR=1;PP=100.0;SC=GCTTTGTTTTGTCAGTTGTTT;TC=22;TR=13	GT:GL:GQ	1/1:-196.6,-28.45,-14.03:100
-20	1872437	.	AT	A	.	PASS	FR=0.5;HP=2;NF=2;NR=4;PP=100.0;SC=TCCCTGGCTAATTCCCCCCAC;TC=23;TR=6	GT:GL:GQ	0/1:-111.11,-55.77,-134.66:100
-20	1890990	.	CTT	C	.	PASS	FR=1.0;HP=5;NF=11;NR=12;PP=100.0;SC=TGTTTCATTACTTTTTAACTT;TC=24;TR=23	GT:GL:GQ	1/1:-245.45,-38.39,-20.54:100
-20	1895466	.	T	TATAG	.	PASS	FR=1.0;HP=1;NF=11;NR=5;PP=100.0;SC=AGATTAGAATTAGCCCAGCTC;TC=24;TR=16	GT:GL:GQ	1/1:-500.31,-454.72,-448.18:79
-20	1895484	.	ACT	A	.	PASS	FR=1.0;HP=1;NF=14;NR=4;PP=52.0;SC=CTCAGATGTGACTCTTCCAGA;TC=23;TR=18	GT:GL:GQ	1/1:-454.69,-436.37,-433.13:53
-20	1912065	.	AC	A	.	PASS	FR=0.5;HP=2;NF=7;NR=8;PP=100.0;SC=TGCCTTCATCACTGTTCCCAT;TC=25;TR=15	GT:GL:GQ	0/1:-166.95,-40.53,-113.76:100
-20	1930288	.	TAAG	T	.	PASS	FR=0.5;HP=2;NF=9;NR=4;PP=100.0;SC=TATAAGTTGTTAAGAAGAAAA;TC=31;TR=13	GT:GL:GQ	0/1:-196.67,-58.02,-140.92:100
-20	1940722	.	GTT	G	.	PASS	FR=0.5;HP=2;NF=6;NR=7;PP=100.0;SC=AAAAACCCAGGTTATATATAC;TC=25;TR=13	GT:GL:GQ	0/1:-178.3,-32.72,-93.72:100
-20	1940980	.	G	GA	.	PASS	FR=0.5;HP=3;NF=5;NR=3;PP=100.0;SC=AACTACTCAGGGGCTGAGATG;TC=20;TR=8	GT:GL:GQ	0/1:-91.81,-43.36,-126.02:100
-20	1941170	.	A	AC	.	PASS	FR=0.5;HP=1;NF=10;NR=2;PP=100.0;SC=ATACCTGTATAGAAAAAAAGT;TC=31;TR=12	GT:GL:GQ	0/1:-250.35,-208.27,-291.77:100
-20	1943171	.	T	TG	.	PASS	FR=0.5;HP=7;NF=1;NR=1;PP=56.0;SC=AGGGGAAGCCTGGGGGGGTTG;TC=19;TR=2	GT:GL:GQ	0/1:-65.38,-41.58,-85.08:100
-20	1949783	.	C	CT	.	PASS	FR=0.5;HP=10;NF=3;NR=4;PP=100.0;SC=GTGCTGAGCCCTTTTTTTTTT;TC=26;TR=7	GT:GL:GQ	0/1:-82.34,-46.95,-63.27:73
-20	1959266	.	A	ATG	.	PASS	FR=0.5;HP=2;NF=3;NR=4;PP=100.0;SC=CAACCTGAATATGTGTGTGTG;TC=24;TR=7	GT:GL:GQ	0/1:-140.42,-42.47,-66.02:100
-20	1967894	.	GATGA	G	.	PASS	FR=0.5;HP=2;NF=2;NR=4;PP=100.0;SC=TTGAGTGATTGATGAATGAAT;TC=24;TR=6	GT:GL:GQ	0/1:-113.7,-41.87,-83.28:100
-20	1977448	.	A	ACACACACACG	.	PASS	FR=0.5;HP=1;NF=1;NR=1;PP=100.0;SC=ACACACACACATAGAAGGCCA;TC=32;TR=2	GT:GL:GQ	0/1:-253.96,-71.96,-163.76:100
-20	1996777	.	CT	C	.	PASS	FR=0.5;HP=2;NF=4;NR=7;PP=100.0;SC=GTGTTTTAGGCTGTTATTTCA;TC=21;TR=11	GT:GL:GQ	0/1:-127.06,-33.79,-125.68:100
-20	1997708	.	CAT	C	.	PASS	FR=0.5;HP=2;NF=5;NR=4;PP=100.0;SC=CACACACACACATACAAAATA;TC=31;TR=9	GT:GL:GQ	0/1:-145.15,-85.85,-245.36:100
-20	2004765	.	T	TG	.	PASS	FR=0.5;HP=1;NF=2;NR=2;PP=76.0;SC=AGGATTTTTCTATCAGTCCAC;TC=12;TR=4	GT:GL:GQ	0/1:-54.31,-25.7,-84.4:100
-20	2034931	.	G	GTTC	.	PASS	FR=0.5;HP=2;NF=6;NR=4;PP=100.0;SC=AGATAGGTAAGTTCTTCCCCA;TC=24;TR=10	GT:GL:GQ	0/1:-162.21,-52.77,-146.87:100
-20	2035677	.	AACACAC	AAC,A	.	PASS	FR=0.5,0.5;HP=2;NF=2,3;NR=0,2;PP=39.0,100.0;SC=TTTTATAATAAACACACACAC;TC=29;TR=2,5	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:88
-20	2050099	.	AATTG	A	.	PASS	FR=0.5;HP=2;NF=10;NR=5;PP=100.0;SC=TCTTATTCTTAATTGATCTAA;TC=35;TR=15	GT:GL:GQ	0/1:-259.54,-91.86,-224.89:100
-20	2052246	.	AC	A	.	PASS	FR=0.5;HP=1;NF=3;NR=6;PP=100.0;SC=GGTCCCAGCTACTCAGGAGGC;TC=19;TR=9	GT:GL:GQ	0/1:-113.96,-44.77,-115.57:100
-20	2053863	.	C	CA	.	PASS	FR=0.5;HP=9;NF=3;NR=4;PP=96.0;SC=ACTAAAAATACAAAAAAAATA;TC=16;TR=7	GT:GL:GQ	0/1:-46.07,-13.04,-34.97:98
-20	2054845	.	AAAGAGGAAAAAG	A	.	PASS	FR=0.5;HP=4;NF=7;NR=1;PP=100.0;SC=AAAAGAGGAAAAAGAGGAAAA;TC=27;TR=8	GT:GL:GQ	0/1:-251.05,-86.54,-294.87:100
-20	2055452	.	AAAGG	A	.	PASS	FR=0.5;HP=4;NF=4;NR=4;PP=100.0;SC=AAGAAAAGAAAAAGGAAGGAA;TC=27;TR=8	GT:GL:GQ	0/1:-227.92,-152.39,-281.38:100
-20	2077127	.	AAC	A	.	PASS	FR=0.5;HP=3;NF=1;NR=3;PP=97.0;SC=TCTCTACTAAAACACACACAC;TC=17;TR=4	GT:GL:GQ	0/1:-57.31,-24.65,-94.33:100
-20	2078747	.	CCT	C	.	PASS	FR=0.5;HP=3;NF=3;NR=2;PP=100.0;SC=AGAAAATTCCCCTGTGGCCCT;TC=15;TR=5	GT:GL:GQ	0/1:-78.54,-32.73,-103.05:100
-20	2120509	.	AAAGGT	A	.	PASS	FR=0.5;HP=2;NF=8;NR=1;PP=100.0;SC=CTGAAATGAGAAAGGTAAGGA;TC=19;TR=9	GT:GL:GQ	0/1:-189.27,-90.48,-174.84:100
-20	2122413	.	CT	C	.	PASS	FR=0.5;HP=4;NF=3;NR=8;PP=100.0;SC=GTAACCTACCCTTTTCCACCT;TC=23;TR=11	GT:GL:GQ	0/1:-132.75,-34.8,-69.03:100
-20	2126052	.	T	TCTATGTGA	.	PASS	FR=0.5;HP=2;NF=3;NR=1;PP=100.0;SC=CATTTCCGTTTCTATGTGACC;TC=22;TR=4	GT:GL:GQ	0/1:-179.74,-76.1,-178.95:100
-20	2131707	.	T	TGG	.	PASS	FR=0.5;HP=2;NF=7;NR=1;PP=100.0;SC=CCCTGTTGCCTGACCTGAGCC;TC=20;TR=8	GT:GL:GQ	0/1:-145.56,-92.76,-163.87:100
-20	2153043	.	C	CTTTATTTA	.	PASS	FR=0.5;HP=3;NF=1;NR=2;PP=100.0;SC=GGTGACATCACTTTATTTATT;TC=21;TR=3	GT:GL:GQ	0/1:-97.11,-28.78,-48.32:87
-20	2155932	.	C	CAT	.	PASS	FR=0.5;HP=7;NF=4;NR=3;PP=100.0;SC=AATTAAAAAACATATATATAT;TC=32;TR=7	GT:GL:GQ	0/1:-176.17,-66.01,-150.43:100
-20	2160585	.	AT	A	.	PASS	FR=0.5;HP=7;NF=9;NR=11;PP=100.0;SC=GTTTTTAAATATTTTTTAATT;TC=41;TR=20	GT:GL:GQ	0/1:-237.9,-137.73,-264.06:100
-20	2162113	.	A	ATT	.	PASS	FR=0.5;HP=1;NF=2;NR=4;PP=100.0;SC=TATCAGGAATAATTTTTTTTT;TC=25;TR=6	GT:GL:GQ	0/1:-145.37,-128.61,-213.61:100
-20	2165761	.	GTTAT	G	.	PASS	FR=0.5;HP=3;NF=4;NR=1;PP=100.0;SC=CTAATAACCTGTTATTTATTT;TC=28;TR=5	GT:GL:GQ	0/1:-79.63,-28.99,-73.78:100
-20	2171122	.	CAAACA	C	.	PASS	FR=0.5;HP=4;NF=4;NR=1;PP=100.0;SC=AACAAACAGACAAACAAAACA;TC=18;TR=5	GT:GL:GQ	0/1:-113.12,-57.95,-91.54:100
-20	2171346	.	TA	T	.	PASS	FR=0.5;HP=8;NF=4;NR=5;PP=100.0;SC=AATTTTTTTTTAAAATCCTTA;TC=20;TR=9	GT:GL:GQ	0/1:-174.43,-122.88,-194.49:100
-20	2171402	.	T	TA	.	PASS	FR=0.5;HP=2;NF=3;NR=1;PP=92.0;SC=TGATTGATCCTAACTTAATGA;TC=23;TR=4	GT:GL:GQ	0/1:-112.12,-79.99,-224.63:100
-20	2198337	.	AAG	A	.	PASS	FR=0.5;HP=2;NF=17;NR=3;PP=100.0;SC=CAACCAAAGAAAGAATGGGAG;TC=38;TR=20	GT:GL:GQ	0/1:-234.35,-51.22,-161.95:100
-20	2199055	.	G	GCCACACACTTCTAAA	.	PASS	FR=0.5;HP=2;NF=2;NR=5;PP=100.0;SC=AGGGGGAAGTGCCATCAGATG;TC=20;TR=7	GT:GL:GQ	0/1:-318.25,-129.11,-238.35:100
-20	2199168	.	T	TG	.	PASS	FR=0.5;HP=9;NF=3;NR=6;PP=100.0;SC=TGAGATTTGGTGGGGGGGACA;TC=37;TR=9	GT:GL:GQ	0/1:-144.44,-70.03,-129.92:100
-20	2209336	.	A	AGTG	.	PASS	FR=0.5;HP=1;NF=4;NR=1;PP=100.0;SC=GCTGGAGTGCAGTGGTACAAT;TC=18;TR=5	GT:GL:GQ	0/1:-105.48,-46.83,-99.81:100
-20	2215492	.	T	TA	.	PASS	FR=1.0;HP=1;NF=17;NR=16;PP=100.0;SC=TGGATGAACGTATTTATTTAA;TC=37;TR=33	GT:GL:GQ	1/1:-589.49,-315.53,-293.02:100
-20	2215506	.	G	GT	.	PASS	FR=1.0;HP=3;NF=18;NR=13;PP=100.0;SC=TATTTAACCAGTTTCTCTTGA;TC=36;TR=31	GT:GL:GQ	1/1:-602.79,-346.63,-325.98:100
-20	2216792	.	CAG	C	.	PASS	FR=0.5;HP=1;NF=6;NR=7;PP=100.0;SC=TGCGTTCATGCAGTTTATGGG;TC=25;TR=13	GT:GL:GQ	0/1:-181.42,-37.01,-108.03:100
-20	2217535	.	CCT	C	.	PASS	FR=0.5;HP=1;NF=6;NR=6;PP=100.0;SC=CATTGCATCACCTGCCTCTGA;TC=32;TR=12	GT:GL:GQ	0/1:-224.94,-75.19,-157.78:100
-20	2218702	.	CA	C	.	PASS	FR=0.5;HP=1;NF=3;NR=5;PP=100.0;SC=AATCACGACTCATTGTAGCCT;TC=18;TR=8	GT:GL:GQ	0/1:-111.7,-55.95,-90.25:100
-20	2221607	.	TTTTCTTTCTTTCTTTTTCC	T	.	PASS	FR=0.5;HP=4;NF=4;NR=2;PP=100.0;SC=AAAGTTTTCTTTTTCTTTCTT;TC=29;TR=6	GT:GL:GQ	0/1:-196.61,-29.28,-142.76:100
-20	2241427	.	AAAAC	A	.	PASS	FR=1.0;HP=4;NF=4;NR=3;PP=100.0;SC=CTTGTCTCTAAAAACAAACAA;TC=19;TR=7	GT:GL:GQ	1/1:-166.73,-37.97,-27.83:84
-20	2263098	.	TG	T	.	PASS	FR=1.0;HP=4;NF=5;NR=5;PP=100.0;SC=TGACGGATGGTGGAGTGAGAA;TC=12;TR=10	GT:GL:GQ	1/1:-115.83,-17.15,-8.29:71
-20	2278675	.	A	ATGAATGGCACT	.	PASS	FR=1.0;HP=4;NF=8;NR=9;PP=100.0;SC=ACTCTGAAAAATGGTCACAGA;TC=18;TR=17	GT:GL:GQ	1/1:-567.99,-218.0,-199.44:100
-20	2280081	.	C	CT	.	PASS	FR=1.0;HP=3;NF=15;NR=9;PP=100.0;SC=TAACTTCATGCGGCTCCACCC;TC=30;TR=24	GT:GL:GQ	1/1:-287.69,-60.5,-41.43:100
-20	2280751	.	TA	T	.	PASS	FR=1.0;HP=10;NF=11;NR=3;PP=100.0;SC=AGACTCCATTTAAAAAAAAAA;TC=22;TR=14	GT:GL:GQ	1/1:-139.24,-88.42,-77.92:88
-20	2280882	.	A	AAAAG	.	PASS	FR=1.0;HP=6;NF=2;NR=2;PP=100.0;SC=AAGAAAGAAAAAAAGAAAGAA;TC=21;TR=4	GT:GL:GQ	1/1:-160.24,-78.2,-70.5:63
-20	2285898	.	AGTCACTG	A	.	PASS	FR=1.0;HP=1;NF=9;NR=3;PP=100.0;SC=CCAAGTCTCTAGTCACTGGTT;TC=19;TR=12	GT:GL:GQ	1/1:-272.68,-30.42,-16.26:99
-20	2287002	.	TAAG	T	.	PASS	FR=1.0;HP=2;NF=12;NR=8;PP=100.0;SC=GAAAAATCTCTAAGAAGGCTC;TC=24;TR=20	GT:GL:GQ	1/1:-245.61,-20.38,-4.14:100
-20	2294297	.	A	ACT	.	PASS	FR=1.0;HP=2;NF=5;NR=3;PP=100.0;SC=AATCACACACACTCTCTCTCT;TC=24;TR=8	GT:GL:GQ	1/1:-199.54,-41.84,-28.04:100
-20	2297084	.	AT	A	.	PASS	FR=1.0;HP=2;NF=10;NR=7;PP=100.0;SC=GGTGGCACGCATTAACACCAG;TC=18;TR=17	GT:GL:GQ	1/1:-184.14,-27.34,-14.78:100
-20	2297605	.	CT	C	.	PASS	FR=0.5;HP=3;NF=4;NR=6;PP=100.0;SC=CAATCATGGCCTTTGGCTTCC;TC=24;TR=10	GT:GL:GQ	0/1:-137.24,-29.13,-84.17:100
-20	2298589	.	C	CAT,T	.	PASS	FR=0.5,0.5;HP=1;NF=5,2;NR=2,3;PP=100.0,100.0;SC=ATATATATATCATATATATAT;TC=23;TR=7,5	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	2316853	.	G	GC	.	PASS	FR=1.0;HP=4;NF=3;NR=6;PP=100.0;SC=TCACCCTGTAGCCCCTGTGCC;TC=15;TR=9	GT:GL:GQ	1/1:-147.72,-38.92,-28.94:83
-20	2318317	.	GATCACACC	G	.	PASS	FR=1.0;HP=2;NF=8;NR=8;PP=100.0;SC=AGTGAGCCGAGATCACACCAC;TC=22;TR=16	GT:GL:GQ	1/1:-356.42,-104.52,-90.96:100
-20	2318716	.	AG	A	.	PASS	FR=1.0;HP=3;NF=13;NR=4;PP=100.0;SC=CACTCAGAGCAGGGCACCGAT;TC=26;TR=17	GT:GL:GQ	1/1:-256.21,-181.8,-170.54:94
-20	2323655	.	A	AT	.	PASS	FR=1.0;HP=8;NF=11;NR=9;PP=100.0;SC=AGGAAAAAAAAACACTGATGT;TC=31;TR=20	GT:GL:GQ	1/1:-290.56,-28.0,-5.91:100
-20	2326944	.	G	GA	.	PASS	FR=1.0;HP=5;NF=6;NR=12;PP=100.0;SC=AGATACAGAGGAAAAATGAAG;TC=25;TR=18	GT:GL:GQ	1/1:-204.47,-32.24,-15.14:100
-20	2329825	.	T	TC	.	PASS	FR=1.0;HP=1;NF=16;NR=4;PP=100.0;SC=ATATGGGTTGTCTTTGAGACT;TC=22;TR=20	GT:GL:GQ	1/1:-212.37,-32.28,-17.55:100
-20	2334719	.	CTAT	C	.	PASS	FR=1.0;HP=3;NF=14;NR=16;PP=100.0;SC=TTCCCAGGTTCTATTATGTAG;TC=36;TR=30	GT:GL:GQ	1/1:-368.57,-33.34,-9.9:100
-20	2335944	.	C	CTG	.	PASS	FR=1.0;HP=4;NF=10;NR=19;PP=100.0;SC=GCTGAGAAAACTATATCCAAA;TC=34;TR=29	GT:GL:GQ	1/1:-370.96,-31.85,-8.29:100
-20	2340299	.	TTGTC	T	.	PASS	FR=1.0;HP=2;NF=10;NR=15;PP=100.0;SC=ATCCTGTAGGTTGTCTGTTTA;TC=27;TR=25	GT:GL:GQ	1/1:-327.39,-42.17,-22.8:100
-20	2342117	.	T	TG	.	PASS	FR=1.0;HP=5;NF=14;NR=14;PP=100.0;SC=TGCTTATTTTTTCCACTTAAT;TC=32;TR=28	GT:GL:GQ	1/1:-450.6,-326.69,-308.08:100
-20	2344369	.	TAAG	T	.	PASS	FR=1.0;HP=2;NF=13;NR=10;PP=100.0;SC=TGAGAGGTGGTAAGAAGAAGA;TC=36;TR=23	GT:GL:GQ	1/1:-351.7,-76.99,-56.29:100
-20	2344451	.	G	GAGGA	.	PASS	FR=1.0;HP=2;NF=12;NR=3;PP=100.0;SC=ACACCCAACAGAGGAAGGTTA;TC=20;TR=15	GT:GL:GQ	1/1:-372.02,-158.89,-145.61:100
-20	2344539	.	T	TTTTGTTTG	.	PASS	FR=1.0;HP=3;NF=8;NR=4;PP=100.0;SC=ACTACCCCAGTTTTGTTTGTT;TC=23;TR=12	GT:GL:GQ	1/1:-243.77,-36.7,-24.92:99
-20	2345269	.	TCCTGGC	T	.	PASS	FR=1.0;HP=2;NF=7;NR=13;PP=100.0;SC=ATCGAGACCATCCTGGCTAAC;TC=21;TR=20	GT:GL:GQ	1/1:-260.12,-24.22,-9.67:100
-20	2346660	.	T	TAATAAATAAATAAATA	.	PASS	FR=1.0;HP=3;NF=3;NR=4;PP=100.0;SC=CAATTCCTTATAATAAATAAA;TC=13;TR=7	GT:GL:GQ	1/1:-305.93,-18.69,-7.6:93
-20	2352930	.	AC	A	.	PASS	FR=1.0;HP=2;NF=10;NR=8;PP=100.0;SC=TTTCAGGCCTACCTCTCAAGC;TC=21;TR=18	GT:GL:GQ	1/1:-216.23,-90.38,-78.46:100
-20	2362643	.	C	CTG	.	PASS	FR=1.0;HP=3;NF=11;NR=8;PP=100.0;SC=AAGAACTTGTCTTAGATGCTG;TC=21;TR=19	GT:GL:GQ	1/1:-259.19,-87.0,-72.75:100
-20	2379170	.	TC	T	.	PASS	FR=0.5;HP=4;NF=1;NR=3;PP=99.0;SC=AGCTTGGGCTTCCCCACAATA;TC=23;TR=4	GT:GL:GQ	0/1:-84.89,-51.93,-137.5:100
-20	2401510	.	ATGT	A	.	PASS	FR=0.5;HP=2;NF=2;NR=4;PP=100.0;SC=CATTATATGGATGTACACAGT;TC=23;TR=6	GT:GL:GQ	0/1:-138.83,-80.65,-217.86:100
-20	2406090	.	AACT	A	.	PASS	FR=0.5;HP=3;NF=8;NR=7;PP=100.0;SC=GTTGCCACAAAACTTCAATTT;TC=36;TR=15	GT:GL:GQ	0/1:-277.31,-158.31,-369.27:100
-20	2407722	.	A	AT	.	PASS	FR=0.5;HP=9;NF=4;NR=11;PP=100.0;SC=AATTGCTATAATTTTTTTTTC;TC=38;TR=15	GT:GL:GQ	0/1:-112.13,-34.3,-69.71:100
-20	2409340	.	C	CAATA	.	PASS	FR=0.5;HP=2;NF=4;NR=3;PP=100.0;SC=CATAATAAATCAATCAATAAA;TC=22;TR=7	GT:GL:GQ	0/1:-189.45,-43.56,-132.72:100
-20	2409613	.	G	GCA	.	PASS	FR=0.5;HP=1;NF=6;NR=4;PP=57.0;SC=GGGATTATAGGCACAACACCA;TC=25;TR=10	GT:GL:GQ	0/1:-231.71,-206.44,-319.84:100
-20	2411731	.	CAG	C	.	PASS	FR=0.5;HP=1;NF=1;NR=2;PP=36.0;SC=GTGGATGAGCCAGAGAGAAGT;TC=13;TR=3	GT:GL:GQ	0/1:-55.56,-36.89,-120.4:84
-20	2414786	.	G	GA	.	PASS	FR=1.0;HP=8;NF=8;NR=10;PP=100.0;SC=GAAGCTTTCAGAAAAAAACCC;TC=23;TR=18	GT:GL:GQ	1/1:-173.45,-78.53,-65.46:100
-20	2418166	.	GTGTT	G	.	PASS	FR=0.5;HP=1;NF=1;NR=4;PP=100.0;SC=CACCTGGCTAGTGTTTGTTTG;TC=21;TR=5	GT:GL:GQ	0/1:-134.79,-72.62,-117.78:100
-20	2425523	.	A	ATTTATTTTATTTTAT	.	PASS	FR=0.5;HP=7;NF=3;NR=2;PP=100.0;SC=ATTTTATTTTATTTATTTTAT;TC=23;TR=5	GT:GL:GQ	0/1:-149.61,-12.23,-46.02:100
-20	2425934	.	T	TA	.	PASS	FR=0.5;HP=8;NF=8;NR=4;PP=67.0;SC=TTAATCAATTTAAAAAAAATG;TC=25;TR=12	GT:GL:GQ	0/1:-160.28,-133.72,-162.95:100
-20	2430943	.	ATGTG	A	.	PASS	FR=0.5;HP=1;NF=1;NR=1;PP=100.0;SC=GTGCGTGTGCATGTGTGTGTG;TC=29;TR=2	GT:GL:GQ	0/1:-164.1,-78.49,-99.2:92
-20	2433931	.	TC	T	.	PASS	FR=0.5;HP=5;NF=1;NR=1;PP=26.0;SC=CCCTGGAAGCTCCCCTTTGTG;TC=10;TR=2	GT:GL:GQ	0/1:-34.79,-18.58,-53.81:73
-20	2436455	.	A	AAAAAAG,AAAAAG	.	PASS	FR=0.5,0.5;HP=9;NF=3,3;NR=1,4;PP=50.0,100.0;SC=CTACCAAAAAAAAAAGAAAAG;TC=25;TR=4,7	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	2436835	.	A	AC	.	PASS	FR=0.5;HP=1;NF=7;NR=8;PP=100.0;SC=ACAATGATGTACATTTTTCAG;TC=37;TR=15	GT:GL:GQ	0/1:-177.52,-36.56,-198.23:100
-20	2448573	.	CCT	C	.	PASS	FR=0.5;HP=2;NF=6;NR=5;PP=100.0;SC=CCCATGCCACCCTGTTTTAGC;TC=34;TR=11	GT:GL:GQ	0/1:-159.22,-114.6,-320.68:100
-20	2450954	.	CA	C	.	PASS	FR=0.5;HP=2;NF=1;NR=4;PP=100.0;SC=CAAACTTCCGCAAGTCTGAGC;TC=22;TR=5	GT:GL:GQ	0/1:-106.22,-51.15,-126.38:100
-20	2452700	.	TAAAAAAGAA	T	.	PASS	FR=0.5;HP=6;NF=4;NR=5;PP=100.0;SC=TTTCTTGGATTAAAAAAGAAA;TC=32;TR=9	GT:GL:GQ	0/1:-216.2,-29.76,-153.35:100
-20	2458350	.	G	GA	.	PASS	FR=0.5;HP=3;NF=4;NR=6;PP=100.0;SC=CAAGGTGGGAGAATTGCTTGA;TC=27;TR=10	GT:GL:GQ	0/1:-156.97,-38.22,-122.55:100
-20	2477736	.	A	AT	.	PASS	FR=0.5;HP=10;NF=4;NR=3;PP=100.0;SC=AAAAAAAAAAATTTTACCATC;TC=23;TR=7	GT:GL:GQ	0/1:-89.51,-39.15,-127.81:100
-20	2498012	.	GTA	G	.	PASS	FR=0.5;HP=2;NF=3;NR=6;PP=100.0;SC=GTATATGTGTGTATATATATA;TC=22;TR=9	GT:GL:GQ	0/1:-140.02,-17.32,-103.73:100
-20	2516178	.	GA	G	.	PASS	FR=0.5;HP=8;NF=3;NR=5;PP=100.0;SC=GTTTAATTGGGAAAAAAAATA;TC=17;TR=8	GT:GL:GQ	0/1:-52.67,-14.95,-45.28:100
-20	2520604	.	T	TAGCA	.	PASS	FR=0.5;HP=4;NF=4;NR=3;PP=100.0;SC=CTCCCGCAAATAGCACACAAG;TC=20;TR=7	GT:GL:GQ	0/1:-194.0,-75.16,-105.67:100
-20	2522684	.	G	GA	.	PASS	FR=0.5;HP=7;NF=5;NR=6;PP=83.0;SC=TTTCTTATTTGAAAAAAACTT;TC=31;TR=11	GT:GL:GQ	0/1:-153.71,-123.52,-187.08:100
-20	2523586	.	T	TA	.	PASS	FR=1.0;HP=4;NF=11;NR=6;PP=100.0;SC=TTTTTCTTTTTAAAACAAAAT;TC=23;TR=17	GT:GL:GQ	1/1:-179.22,-18.0,-3.45:100
-20	2526468	.	GAAGA	G	.	PASS	FR=0.5001;HP=2;NF=2;NR=4;PP=100.0;SC=AGAGGAAGAGGAAGAAAGAAA;TC=25;TR=6	GT:GL:GQ	0/1:-210.76,-128.72,-136.62:37
-20	2526552	.	A	AAG	.	PASS	FR=0.5;HP=6;NF=5;NR=8;PP=100.0;SC=GAAAGAAAGAAAAAAAGAAAG;TC=30;TR=13	GT:GL:GQ	0/1:-215.19,-78.8,-144.35:100
-20	2527129	.	G	GTTGGGCATAAGCTGTAGATC	.	PASS	FR=0.5;HP=2;NF=3;NR=1;PP=100.0;SC=AACCTGCAGAGTTGGGCATAA;TC=18;TR=4	GT:GL:GQ	0/1:-243.57,-136.91,-199.82:100
-20	2534184	.	T	TGTTTTGTGTGAC	.	PASS	FR=0.5;HP=1;NF=5;NR=9;PP=100.0;SC=GATACAGGTCTGTTTTTGTCT;TC=31;TR=14	GT:GL:GQ	0/1:-444.44,-61.75,-181.17:100
-20	2546156	.	TGG	T	.	PASS	FR=0.5;HP=3;NF=4;NR=12;PP=100.0;SC=CCCAAAGTGCTGGGATTACAG;TC=31;TR=16	GT:GL:GQ	0/1:-172.01,-63.37,-146.93:100
-20	2568176	.	G	GT	.	PASS	FR=1.0;HP=10;NF=12;NR=9;PP=100.0;SC=ATTTGGGAATGTTTTTTTTTA;TC=27;TR=21	GT:GL:GQ	1/1:-116.08,-18.72,-6.68:100
-20	2577356	.	A	AAT	.	PASS	FR=0.5;HP=6;NF=1;NR=2;PP=100.0;SC=ATCAGAAAAAAATATATATGT;TC=26;TR=3	GT:GL:GQ	0/1:-199.48,-88.19,-98.9:49
-20	2579040	.	C	CTTTATTTA	.	PASS	FR=0.5;HP=3;NF=1;NR=2;PP=100.0;SC=CTTGCCTCTACTTTATTTATT;TC=16;TR=3	GT:GL:GQ	0/1:-103.59,-10.59,-52.57:100
-20	2586119	.	GGA	G	.	PASS	FR=0.5;HP=1;NF=2;NR=1;PP=30.0;SC=GCATGTGCATGGAGAGAGAGA;TC=23;TR=3	GT:GL:GQ	0/1:-35.49,-18.23,-170.44:77
-20	2594696	.	A	AT	.	PASS	FR=0.5;HP=8;NF=2;NR=7;PP=100.0;SC=TTTCTGTCACATTTTTTTTCG;TC=24;TR=9	GT:GL:GQ	0/1:-70.9,-30.05,-77.99:100
-20	2597210	.	TAAAG	T	.	PASS	FR=0.5;HP=7;NF=2;NR=2;PP=100.0;SC=GAAAGGAAAATAAAGAAGGAG;TC=20;TR=4	GT:GL:GQ	0/1:-85.33,-27.89,-144.98:100
-20	2611781	.	A	ATATCT	.	PASS	FR=0.5;HP=1;NF=8;NR=8;PP=100.0;SC=ATTATAATTAATATAACAAAC;TC=31;TR=16	GT:GL:GQ	0/1:-408.96,-183.07,-309.58:100
-20	2613623	.	T	TTTG	.	PASS	FR=0.5;HP=3;NF=2;NR=2;PP=100.0;SC=CTTCCATGGGTTTGTTGTTGT;TC=18;TR=4	GT:GL:GQ	0/1:-165.53,-112.66,-139.53:100
-20	2613971	.	TA	T	.	PASS	FR=0.5;HP=4;NF=4;NR=7;PP=100.0;SC=CTTGGACACATAAACAGCCCT;TC=27;TR=11	GT:GL:GQ	0/1:-121.36,-29.89,-140.29:100
-20	2614405	.	T	TGGGTAGG	.	PASS	FR=0.5;HP=3;NF=2;NR=2;PP=52.0;SC=ACTACAGAACTGGGTAGGGGA;TC=30;TR=4	GT:GL:GQ	0/1:-185.89,-156.26,-363.71:100
-20	2616002	.	C	CT	.	PASS	FR=0.5;HP=4;NF=5;NR=5;PP=100.0;SC=ACCTCCACCTCCCCCTCTCAG;TC=22;TR=10	GT:GL:GQ	0/1:-182.46,-117.29,-171.16:100
-20	2617861	.	C	CCT	.	PASS	FR=0.5;HP=2;NF=2;NR=5;PP=100.0;SC=ATGGTGAACCCGTCTCTACTA;TC=17;TR=7	GT:GL:GQ	0/1:-111.22,-36.32,-97.76:100
-20	2625967	.	TGAG	T	.	PASS	FR=0.5;HP=1;NF=2;NR=3;PP=100.0;SC=CTGAGTAGGCTGAGGAGGAGG;TC=15;TR=5	GT:GL:GQ	0/1:-133.1,-85.47,-137.74:100
-20	2627766	.	TTTTATTTA	T	.	PASS	FR=0.5;HP=3;NF=1;NR=1;PP=86.0;SC=ACTGAATTTATTTTATTTATT;TC=19;TR=2	GT:GL:GQ	0/1:-102.46,-70.95,-132.69:100
-20	2630436	.	T	TACC	.	PASS	FR=0.5;HP=2;NF=6;NR=5;PP=100.0;SC=ACATGCCAGGTACACCATTGT;TC=23;TR=11	GT:GL:GQ	0/1:-159.47,-31.83,-143.4:100
-20	2634285	.	CTG	C	.	PASS	FR=0.5;HP=1;NF=3;NR=15;PP=100.0;SC=CTTGTGGGCACTGTAGTGACA;TC=29;TR=18	GT:GL:GQ	0/1:-229.42,-26.07,-86.72:100
-20	2641823	.	C	CTG	.	PASS	FR=0.5;HP=5;NF=2;NR=2;PP=100.0;SC=ATTGCATTTTCTGTGTGTGTG;TC=21;TR=4	GT:GL:GQ	0/1:-96.78,-48.19,-99.13:100
-20	2643833	.	G	GAAATGCAAT	.	PASS	FR=0.5;HP=4;NF=9;NR=2;PP=100.0;SC=TGGTATTCCAGAAATGCAATG;TC=31;TR=11	GT:GL:GQ	0/1:-379.88,-109.48,-180.95:100
-20	2650007	.	T	TACACACACACACACACAC	.	PASS	FR=1.0;HP=1;NF=3;NR=1;PP=100.0;SC=ACCCTTTTCTTACACACACAC;TC=19;TR=4	GT:GL:GQ	1/1:-231.82,-84.82,-75.66:76
-20	2650235	.	C	CT	.	PASS	FR=1.0;HP=9;NF=12;NR=9;PP=100.0;SC=TTTATTGGGCCTTTTTTTTTG;TC=28;TR=21	GT:GL:GQ	1/1:-325.44,-296.08,-289.77:79
-20	2656886	.	AT	A	.	PASS	FR=1.0;HP=6;NF=17;NR=6;PP=100.0;SC=ATAAATAATAATTTTTTAAAA;TC=29;TR=23	GT:GL:GQ	1/1:-339.94,-246.4,-231.12:100
-20	2663020	.	G	GGAA	.	PASS	FR=1.0;HP=1;NF=8;NR=7;PP=100.0;SC=AAGAGGAAGAGGAAGAAGACA;TC=28;TR=15	GT:GL:GQ	1/1:-408.26,-206.61,-189.41:100
-20	2665268	.	TA	T	.	PASS	FR=1.0;HP=8;NF=2;NR=1;PP=43.0;SC=TATGCAGCCATAAAAAAATGA;TC=4;TR=3	GT:GL:GQ	1/1:-20.74,-4.04,-1.38:43
-20	2665956	.	AG	A	.	PASS	FR=1.0;HP=1;NF=9;NR=5;PP=100.0;SC=CCCAGGCTATAGTGCAGTGGC;TC=16;TR=14	GT:GL:GQ	1/1:-156.94,-33.67,-23.62:84
-20	2666401	.	TA	T	.	PASS	FR=0.5;HP=2;NF=8;NR=7;PP=100.0;SC=ACTTTTCTATTAAGAAACGCA;TC=38;TR=15	GT:GL:GQ	0/1:-158.74,-28.32,-160.06:100
-20	2668149	.	A	ATG	.	PASS	FR=0.5;HP=2;NF=1;NR=2;PP=100.0;SC=ATATATATATATGTGTGTGTG;TC=17;TR=3	GT:GL:GQ	0/1:-54.4,-18.57,-68.0:100
-20	2671350	.	GTA	G	.	PASS	FR=1.0;HP=2;NF=8;NR=5;PP=100.0;SC=ATATATATGTGTATATATATA;TC=23;TR=13	GT:GL:GQ	1/1:-348.62,-348.37,-348.16:60
-20	2676135	.	C	CAG	.	PASS	FR=0.5;HP=1;NF=6;NR=2;PP=100.0;SC=TGCTGGGATGCAGAGGGCTTC;TC=17;TR=8	GT:GL:GQ	0/1:-189.45,-108.27,-131.01:100
-20	2678198	.	A	AAAAG	.	PASS	FR=1.0;HP=10;NF=1;NR=2;PP=100.0;SC=CTCAAAAAAAAAAAGAAAGAA;TC=16;TR=3	GT:GL:GQ	1/1:-113.89,-62.27,-58.08:51
-20	2691794	.	AAAT	A	.	PASS	FR=1.0;HP=3;NF=2;NR=4;PP=100.0;SC=ACCCTGTCTAAAATAATAATA;TC=12;TR=6	GT:GL:GQ	1/1:-83.97,-10.76,-5.22:69
-20	2713483	.	C	CAG	.	PASS	FR=0.5;HP=2;NF=7;NR=1;PP=100.0;SC=TTTTTTGAGACGGAATTATAA;TC=28;TR=8	GT:GL:GQ	0/1:-114.91,-36.16,-205.08:100
-20	2717474	.	A	ACAAAGGTCTC	.	PASS	FR=1.0;HP=2;NF=9;NR=5;PP=100.0;SC=AGTCATAAGGACAAAGGACCC;TC=17;TR=14	GT:GL:GQ	1/1:-343.26,-32.05,-17.5:94
-20	2724519	.	AG	A	.	PASS	FR=0.5;HP=3;NF=6;NR=7;PP=100.0;SC=CCAGATATTTAGGGTGTCCAT;TC=28;TR=13	GT:GL:GQ	0/1:-149.48,-35.03,-149.61:100
-20	2734607	.	C	CCCCCTTGGTTTTGAAACTTT	.	PASS	FR=1.0;HP=4;NF=2;NR=4;PP=100.0;SC=TCTGTGGGCACCCCCTTGGGC;TC=12;TR=6	GT:GL:GQ	1/1:-301.3,-108.37,-98.31:100
-20	2742852	.	C	CCAGCAATCCTCAGT	.	PASS	FR=0.5;HP=1;NF=1;NR=5;PP=100.0;SC=CTCAATAGCACCTGAGGATGA;TC=16;TR=6	GT:GL:GQ	0/1:-233.59,-35.77,-130.91:100
-20	2766949	.	C	CT	.	PASS	FR=1.0;HP=10;NF=5;NR=10;PP=100.0;SC=ACTTCATTCCCTTTTTTTTTT;TC=28;TR=15	GT:GL:GQ	1/1:-134.68,-37.76,-21.4:100
-20	2782855	.	AC	A	.	PASS	FR=1.0;HP=4;NF=3;NR=8;PP=100.0;SC=AATCACTTGTACCCCGGGGGC;TC=25;TR=11	GT:GL:GQ	1/1:-262.64,-187.36,-174.92:100
-20	2789088	.	AC	A	.	PASS	FR=1.0;HP=9;NF=1;NR=4;PP=100.0;SC=CAAAAAAAAAACCAAAAAACA;TC=13;TR=5	GT:GL:GQ	1/1:-119.81,-36.46,-27.82:89
-20	2796485	.	C	CCTTTT	.	PASS	FR=0.5;HP=4;NF=1;NR=4;PP=100.0;SC=CATCAGGCCCCCTTTTCTCCT;TC=18;TR=5	GT:GL:GQ	0/1:-128.25,-42.55,-123.81:100
-20	2797764	.	AG	A	.	PASS	FR=1.0;HP=3;NF=1;NR=4;PP=100.0;SC=CTGCCTTGGCAGGGCCCAGAC;TC=14;TR=5	GT:GL:GQ	1/1:-134.46,-67.08,-59.42:63
-20	2834884	.	T	TAC	.	PASS	FR=0.5;HP=1;NF=2;NR=1;PP=100.0;SC=ACCCCGTCTCTACACACACAC;TC=22;TR=3	GT:GL:GQ	0/1:-64.62,-28.32,-80.82:100
-20	2849974	.	AT	A	.	PASS	FR=0.5;HP=10;NF=4;NR=6;PP=99.0;SC=TTGGTTTGCAATTTTTTTTTT;TC=36;TR=10	GT:GL:GQ	0/1:-66.95,-34.01,-107.66:100
-20	2850721	.	ACT	A	.	PASS	FR=0.5;HP=1;NF=4;NR=4;PP=100.0;SC=CCAGTGAAAGACTCTTGGGGT;TC=17;TR=8	GT:GL:GQ	0/1:-88.06,-17.99,-74.67:100
-20	2858849	.	GT	G	.	PASS	FR=0.5;HP=8;NF=1;NR=5;PP=52.0;SC=GACAGCTGTAGTTTTTTTTAA;TC=15;TR=6	GT:GL:GQ	0/1:-33.96,-11.94,-50.39:98
-20	2867547	.	AT	A	.	PASS	FR=0.5;HP=6;NF=5;NR=6;PP=100.0;SC=AAATAAAAAAATGTAGTATCT;TC=32;TR=11	GT:GL:GQ	0/1:-115.49,-28.1,-161.94:100
-20	2880787	.	C	CCT	.	PASS	FR=0.5;HP=1;NF=4;NR=5;PP=100.0;SC=GAAAAATCTGCCTCCTTTTTT;TC=27;TR=9	GT:GL:GQ	0/1:-140.77,-68.5,-172.28:100
-20	2890657	.	C	CAT	.	PASS	FR=0.5003;HP=1;NF=2;NR=1;PP=100.0;SC=TATCATATATCATATATAATC;TC=5;TR=3	GT:GL:GQ	0/1:-44.82,-3.47,-10.33:32
-20	2890805	.	CAT	C	.	PASS	FR=0.5017;HP=1;NF=1;NR=6;PP=100.0;SC=TACTATACGTCATATATAATA;TC=9;TR=7	GT:GL:GQ	0/1:-87.98,-14.06,-19.03:24
-20	2894312	.	CTTATT	C	.	PASS	FR=0.5;HP=4;NF=3;NR=5;PP=100.0;SC=GTGCTGTGTTCTTATTTTATC;TC=22;TR=8	GT:GL:GQ	0/1:-141.94,-29.98,-159.98:100
-20	2896142	.	T	TTATC	.	PASS	FR=1.0;HP=2;NF=9;NR=10;PP=100.0;SC=TAAGAGTTCTTTATTCTGATA;TC=30;TR=19	GT:GL:GQ	1/1:-399.17,-94.52,-74.73:100
-20	2912364	.	T	TTG	.	PASS	FR=0.5004;HP=1;NF=1;NR=1;PP=75.0;SC=GGGTCTTGGCTTGTGTGTGTG;TC=20;TR=2	GT:GL:GQ	0/1:-121.99,-92.59,-99.11:31
-20	2926228	.	GGTGTGTGT	G	.	PASS	FR=0.5;HP=1;NF=1;NR=9;PP=100.0;SC=ATAATTGGCAGGTGTGTGTGT;TC=27;TR=10	GT:GL:GQ	0/1:-233.62,-33.54,-77.33:100
-20	2937307	.	AAAATAAAT	A	.	PASS	FR=0.5;HP=4;NF=3;NR=3;PP=100.0;SC=TCAGTAAATAAAAATAAATAA;TC=17;TR=6	GT:GL:GQ	0/1:-165.86,-12.93,-101.78:100
-20	2950624	.	T	TAATA,TAATAAATAAATA	.	PASS	FR=0.5,0.5;HP=5;NF=5,2;NR=2,2;PP=100.0,100.0;SC=TCTAAATAAATAATAAATAAA;TC=24;TR=7,4	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	2966530	.	CTTGTTTGT	CTTGT,C	.	PASS	FR=0.5,0.5;HP=2;NF=1,1;NR=2,1;PP=100.0,27.0;SC=CAGCTGTCTCCTTGTTTGTTT;TC=22;TR=3,2	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:80
-20	2973326	.	T	TTTAGGGTTTTTC	.	PASS	FR=0.5;HP=4;NF=1;NR=5;PP=100.0;SC=CATATCCAAATATTACGATTC;TC=15;TR=6	GT:GL:GQ	0/0:-275.74,-159.4,-213.4:3
-20	2977781	.	CATAT	C	.	PASS	FR=0.5;HP=5;NF=3;NR=6;PP=100.0;SC=TGTGAGAAAACATATGTGGGA;TC=26;TR=9	GT:GL:GQ	0/1:-131.98,-30.22,-206.04:100
-20	2979576	.	T	TTATTA	.	PASS	FR=0.5;HP=2;NF=2;NR=5;PP=100.0;SC=TATTTATAATTTATTATATAT;TC=21;TR=7	GT:GL:GQ	0/1:-148.89,-17.32,-97.42:100
-20	2982245	.	CT	C	.	PASS	FR=0.5;HP=3;NF=8;NR=4;PP=100.0;SC=CTGTGGAAATCTTATGTGAAG;TC=27;TR=12	GT:GL:GQ	0/1:-126.56,-21.8,-132.46:100
-20	2982823	.	CA	C	.	PASS	FR=1.0;HP=7;NF=10;NR=9;PP=100.0;SC=TTCCATCTGACAAAAAATTGG;TC=21;TR=19	GT:GL:GQ	1/1:-196.74,-95.2,-82.42:100
-20	2989926	.	AT	A	.	PASS	FR=0.5;HP=10;NF=2;NR=5;PP=29.0;SC=GAGTTGTGTGATTTTTTTTTT;TC=36;TR=7	GT:GL:GQ	0/1:-66.0,-49.11,-118.97:76
-20	3005541	.	TC	T	.	PASS	FR=0.5;HP=5;NF=7;NR=7;PP=100.0;SC=AGCAGTTTTTTCTGTAAGAGC;TC=32;TR=14	GT:GL:GQ	0/1:-167.85,-53.03,-186.47:100
-20	3007694	.	A	AGGT	.	PASS	FR=0.5;HP=3;NF=4;NR=5;PP=100.0;SC=CCAGGGCCTGAGGTGGGAGCA;TC=22;TR=9	GT:GL:GQ	0/1:-162.22,-42.91,-117.4:100
-20	3012419	.	C	CTGTT	.	PASS	FR=0.5;HP=2;NF=5;NR=3;PP=100.0;SC=CCTCCTTACTCTGTGTGTTTT;TC=26;TR=8	GT:GL:GQ	0/1:-154.4,-24.26,-143.38:100
-20	3022136	.	GAATT	G	.	PASS	FR=0.5;HP=7;NF=8;NR=1;PP=100.0;SC=AAAAGAAAAAGAATTAATTAA;TC=20;TR=9	GT:GL:GQ	1/0:-190.17,-78.0,-90.9:100
-20	3039218	.	GT	G	.	PASS	FR=1.0;HP=5;NF=12;NR=13;PP=100.0;SC=TGTTGTTGTTGTTTGTTTGTT;TC=29;TR=25	GT:GL:GQ	1/1:-226.7,-48.88,-31.11:100
-20	3042034	.	T	TA	.	PASS	FR=1.0;HP=10;NF=5;NR=14;PP=100.0;SC=AAGACACTGATAAAAAAAAAT;TC=25;TR=19	GT:GL:GQ	1/1:-125.74,-31.3,-15.65:100
-20	3047853	.	A	ATTCCCCCATT	.	PASS	FR=0.5;HP=2;NF=6;NR=1;PP=100.0;SC=ACTCCCTCTCATTCCCCCATT;TC=20;TR=7	GT:GL:GQ	0/1:-258.31,-36.83,-99.91:100
-20	3050529	.	A	AT	.	PASS	FR=0.5;HP=10;NF=4;NR=1;PP=23.0;SC=GCAAAAAAAAAAATTTTTATT;TC=22;TR=5	GT:GL:GQ	0/1:-257.11,-262.46,-292.84:73
-20	3050531	.	A	ATTT,T	.	PASS	FR=0.5,0.5;HP=10;NF=3,13;NR=0,6;PP=97.0,100.0;SC=AAAAAAAAAAATTTTTATTTT;TC=22;TR=3,19	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	3051123	.	A	AT	.	PASS	FR=0.5;HP=6;NF=2;NR=1;PP=69.0;SC=TCAAGAAAAAAATATATATAT;TC=17;TR=3	GT:GL:GQ	0/1:-107.95,-81.12,-160.4:100
-20	3058938	.	C	CTT	.	PASS	FR=1.0;HP=2;NF=19;NR=9;PP=100.0;SC=ACTGGATACTCTGAACTCCTA;TC=30;TR=28	GT:GL:GQ	1/1:-404.4,-115.7,-94.26:100
-20	3060201	.	C	CAAT	.	PASS	FR=0.5;HP=4;NF=13;NR=9;PP=100.0;SC=ACAAAGTCAACAATAATTCAT;TC=44;TR=22	GT:GL:GQ	0/1:-325.42,-43.13,-189.79:100
-20	3062903	.	T	TC	.	PASS	FR=0.5;HP=3;NF=1;NR=5;PP=94.0;SC=TCCAGGCCTTTCCCTCTCTGC;TC=19;TR=6	GT:GL:GQ	0/1:-95.35,-62.58,-147.62:100
-20	3072606	.	A	AAGG	.	PASS	FR=1.0;HP=5;NF=4;NR=4;PP=100.0;SC=CCAAGTAAAAAAGGGCGGGGG;TC=22;TR=8	GT:GL:GQ	1/1:-220.94,-78.12,-65.62:100
-20	3126086	.	CCT	TCT,C	.	PASS	FR=0.5,0.5;HP=7;NF=1,1;NR=3,1;PP=8.0,36.0;SC=GCCTTTTTTTCCTTTTTTTTT;TC=19;TR=4,2	GT:GL:GQ	2/1:-1.0,-1.0,-1.0:42
-20	3159346	.	C	CA	.	PASS	FR=1.0;HP=2;NF=3;NR=12;PP=100.0;SC=GCTGGGACTACGGCATTTACT;TC=15;TR=15	GT:GL:GQ	1/1:-149.15,-11.32,-0.92:87
-20	3161722	.	C	CAGAT,CAGATAGAT	.	PASS	FR=0.5,0.5;HP=2;NF=2,1;NR=2,2;PP=35.0,42.0;SC=GATAGATAGACAGATAGATAG;TC=18;TR=4,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:99
-20	3161783	.	CTA	C	.	PASS	FR=1.0;HP=2;NF=9;NR=7;PP=100.0;SC=TTTTATATATCTATATATATA;TC=25;TR=16	GT:GL:GQ	1/1:-263.89,-139.12,-127.54:97
-20	3162560	.	CAT	C	.	PASS	FR=0.5369;HP=2;NF=1;NR=3;PP=100.0;SC=CACACACACACATGGTCCATG;TC=6;TR=4	GT:GL:GQ	0/1:-84.99,-50.52,-52.5:11
-20	3169476	.	T	TTTG	.	PASS	FR=0.5;HP=3;NF=5;NR=9;PP=100.0;SC=AATGTTTACTTTTAATAAACT;TC=35;TR=14	GT:GL:GQ	0/1:-273.66,-64.07,-202.46:100
-20	3169541	.	A	AT	.	PASS	FR=0.5;HP=7;NF=5;NR=9;PP=100.0;SC=AGGATCATAGATTTTTTTCCT;TC=23;TR=14	GT:GL:GQ	0/1:-204.2,-123.3,-145.94:100
-20	3172618	.	GACAC	G	.	PASS	FR=0.7893;HP=1;NF=3;NR=1;PP=100.0;SC=TTGCTCCCCTGACACACACAC;TC=16;TR=4	GT:GL:GQ	1/1:-154.29,-100.95,-101.25:3
-20	3172771	.	C	CAT	.	PASS	FR=1.0;HP=1;NF=13;NR=6;PP=100.0;SC=CCGAGACACACGAGTGGTAAT;TC=24;TR=19	GT:GL:GQ	1/1:-267.07,-44.87,-28.98:100
-20	3177159	.	T	TA	.	PASS	FR=1.0;HP=5;NF=6;NR=3;PP=87.0;SC=CTGTCTCCACTAAAAATACAA;TC=15;TR=9	GT:GL:GQ	1/1:-169.92,-142.98,-139.57:56
-20	3177517	.	C	CAT	.	PASS	FR=1.0;HP=2;NF=15;NR=10;PP=100.0;SC=TAATAAATAACGTTACTGGAT;TC=26;TR=25	GT:GL:GQ	1/1:-294.64,-37.59,-18.88:100
-20	3188342	.	A	AAACAACAACAACAAC	.	PASS	FR=0.5;HP=3;NF=2;NR=2;PP=100.0;SC=CTCCATCTCAAAACAACAACA;TC=17;TR=4	GT:GL:GQ	0/1:-131.35,-46.51,-82.74:100
-20	3192138	.	T	TTTTGTTTGTTTG	.	PASS	FR=0.5;HP=3;NF=3;NR=1;PP=99.0;SC=TTTTGTTTTGTTTTGTTTGTT;TC=17;TR=4	GT:GL:GQ	0/1:-79.23,-33.31,-124.52:100
-20	3192798	.	C	CAG	.	PASS	FR=0.5;HP=2;NF=2;NR=6;PP=100.0;SC=GCCTGGGTGACAGAGAGAGAG;TC=20;TR=8	GT:GL:GQ	0/1:-108.84,-41.85,-123.5:100
-20	3198551	.	G	GTT	.	PASS	FR=0.5;HP=2;NF=1;NR=2;PP=63.0;SC=AGTTTTTGTGGGTTTTTTTTT;TC=22;TR=3	GT:GL:GQ	0/1:-111.88,-112.41,-193.71:91
-20	3202220	.	GTGGC	G	.	PASS	FR=0.5;HP=2;NF=2;NR=5;PP=100.0;SC=TGTCCCGGGTGTGGCTGGCGA;TC=19;TR=7	GT:GL:GQ	0/1:-150.53,-63.82,-136.14:100
-20	3276659	.	CT	C	.	PASS	FR=1.0;HP=3;NF=5;NR=6;PP=100.0;SC=ACATCGGGAACTTTCGGTTTC;TC=16;TR=11	GT:GL:GQ	1/1:-135.26,-24.21,-14.73:79
-20	3290980	.	A	AAAAG	.	PASS	FR=0.9998;HP=4;NF=1;NR=1;PP=30.0;SC=AAGAGAAAGAAAAAGAAAGAA;TC=7;TR=2	GT:GL:GQ	1/1:-37.89,-18.65,-17.26:34
-20	3313547	.	G	GGTGT	.	PASS	FR=1.0;HP=1;NF=1;NR=3;PP=100.0;SC=GTGTGCGTGTGGTGTGTGTGT;TC=20;TR=4	GT:GL:GQ	1/1:-194.22,-148.74,-144.19:56
-20	3314333	.	G	GT	.	PASS	FR=1.0;HP=10;NF=9;NR=9;PP=100.0;SC=CTTATTAAAGGTTTTTTTTTT;TC=34;TR=18	GT:GL:GQ	1/1:-126.24,-28.85,-19.8:75
-20	3317061	.	G	GT	.	PASS	FR=1.0;HP=10;NF=5;NR=7;PP=100.0;SC=GTTTTGTTCAGTTTTTTTTTT;TC=20;TR=12	GT:GL:GQ	1/1:-81.13,-22.72,-13.12:80
-20	3318622	.	TATAAAATATATAATAC	T	.	PASS	FR=0.5;HP=2;NF=3;NR=5;PP=100.0;SC=ATATATAATATATAAAATATA;TC=21;TR=8	GT:GL:GQ	1/0:-309.41,-50.93,-55.49:45
-20	3320964	.	AGTTT	A	.	PASS	FR=1.0;HP=1;NF=6;NR=12;PP=100.0;SC=AATCATACCTAGTTTGTACTA;TC=22;TR=18	GT:GL:GQ	1/1:-403.07,-167.86,-153.33:100
-20	3320971	.	A	AC	.	PASS	FR=1.0;HP=1;NF=6;NR=13;PP=100.0;SC=CCTAGTTTGTACTATAAAAAA;TC=19;TR=19	GT:GL:GQ	1/1:-403.07,-261.66,-248.63:100
-20	3323678	.	AT	A	.	PASS	FR=1.0;HP=5;NF=3;NR=1;PP=100.0;SC=TCTGATGATTATTTCTATTGC;TC=28;TR=4	GT:GL:GQ	1/1:-575.25,-570.95,-570.67:100
-20	3323683	.	T	TAAA	.	PASS	FR=1.0;HP=1;NF=13;NR=11;PP=100.0;SC=TGATTATTTCTATTGCTGTGC;TC=29;TR=24	GT:GL:GQ	1/1:-597.36,-560.99,-550.34:86
-20	3323709	.	T	TA	.	PASS	FR=1.0;HP=2;NF=16;NR=21;PP=100.0;SC=CATGTTCATTTGTTAGGTCCC;TC=38;TR=37	GT:GL:GQ	1/1:-694.83,-570.91,-558.14:100
-20	3325237	.	TACACACAC	T	.	PASS	FR=1.0;HP=2;NF=4;NR=2;PP=100.0;SC=TACACACACATACACACACAC;TC=33;TR=6	GT:GL:GQ	1/1:-276.44,-185.04,-177.42:63
-20	3332481	.	TTTTA	T	.	PASS	FR=1.0;HP=3;NF=7;NR=10;PP=100.0;SC=GTTTGTGTTATTTTATTTATT;TC=28;TR=17	GT:GL:GQ	1/1:-276.75,-43.8,-27.83:100
-20	3333166	.	TCA	T	.	PASS	FR=1.0;HP=1;NF=9;NR=10;PP=100.0;SC=TGGCTGTCATTCACATTCCAG;TC=22;TR=19	GT:GL:GQ	1/1:-222.99,-23.7,-9.78:100
-20	3333493	.	T	TTA	.	PASS	FR=1.0;HP=2;NF=6;NR=7;PP=100.0;SC=TTCAAAATATTTATATATATA;TC=27;TR=13	GT:GL:GQ	1/1:-272.96,-96.81,-86.7:65
-20	3336192	.	G	GC	.	PASS	FR=1.0;HP=2;NF=5;NR=10;PP=100.0;SC=CTGCACTCCAGCCTGGGTGAC;TC=18;TR=15	GT:GL:GQ	1/1:-163.64,-31.05,-19.12:100
-20	3338276	.	G	GCTTAT	.	PASS	FR=1.0;HP=1;NF=8;NR=10;PP=100.0;SC=CACCCATCCAGCTTTATCTTT;TC=23;TR=18	GT:GL:GQ	1/1:-329.33,-26.75,-8.74:100
-20	3345587	.	C	CT	.	PASS	FR=1.0;HP=6;NF=1;NR=10;PP=100.0;SC=CCTTCTTTTCCTTTTTTCTTT;TC=27;TR=11	GT:GL:GQ	1/1:-267.74,-155.91,-141.96:100
-20	3346020	.	TTTTATTTA	T	.	PASS	FR=1.0;HP=3;NF=7;NR=6;PP=100.0;SC=TTTGATAACATTTTATTTATT;TC=29;TR=13	GT:GL:GQ	1/1:-347.46,-36.68,-23.65:100
-20	3349612	.	T	TA	.	PASS	FR=1.0;HP=2;NF=8;NR=3;PP=100.0;SC=ACCCCATTTCTCTAAAAATAC;TC=11;TR=11	GT:GL:GQ	1/1:-135.85,-60.43,-52.97:61
-20	3377965	.	G	GTTTTGTT	.	PASS	FR=1.0;HP=8;NF=3;NR=2;PP=100.0;SC=TTTTTGTTTTGTTTTGTTTTT;TC=16;TR=5	GT:GL:GQ	1/1:-157.49,-62.9,-56.59:79
-20	3378366	.	TG	T	.	PASS	FR=1.0;HP=10;NF=6;NR=4;PP=100.0;SC=AGATTTTTTTTGGGGGGGGGG;TC=22;TR=10	GT:GL:GQ	1/1:-84.99,-30.32,-19.67:66
-20	3382249	.	T	TA	.	PASS	FR=1.0;HP=2;NF=7;NR=9;PP=100.0;SC=AATTATTATCTTTCATTCAAT;TC=19;TR=16	GT:GL:GQ	1/1:-178.1,-44.13,-31.76:100
-20	3382515	.	TC	T	.	PASS	FR=1.0;HP=6;NF=2;NR=10;PP=100.0;SC=TGGGGAGGGCTCCCCCGCCCC;TC=19;TR=12	GT:GL:GQ	1/1:-132.42,-42.62,-32.12:88
-20	3398847	.	T	TAC	.	PASS	FR=0.5;HP=2;NF=2;NR=1;PP=82.0;SC=AATAACAACATACACACACAC;TC=26;TR=3	GT:GL:GQ	0/1:-87.09,-56.01,-103.69:100
-20	3418279	.	TACACACACAC	T	.	PASS	FR=0.5;HP=3;NF=2;NR=1;PP=100.0;SC=CACACGAGGGTACACACACAC;TC=17;TR=3	GT:GL:GQ	0/1:-117.7,-66.19,-77.13:50
-20	3419562	.	TACAC	T	.	PASS	FR=0.5;HP=2;NF=2;NR=2;PP=100.0;SC=TCAAAATACATACACACACAC;TC=29;TR=4	GT:GL:GQ	0/1:-141.17,-79.46,-166.16:100
-20	3426771	.	T	TC	.	PASS	FR=1.0;HP=1;NF=13;NR=10;PP=100.0;SC=TTGCAGAAACTGACAAAATAG;TC=25;TR=23	GT:GL:GQ	1/1:-297.92,-207.29,-192.68:100
-20	3439128	.	AT	A	.	PASS	FR=1.0;HP=4;NF=4;NR=3;PP=100.0;SC=TGTCTCAAAAATATATATATA;TC=13;TR=7	GT:GL:GQ	1/1:-127.06,-48.08,-43.43:57
-20	3439712	.	CATTTATTTATTT	CATTTATTT,C	.	PASS	FR=0.5,0.5;HP=1;NF=2,5;NR=1,1;PP=100.0,100.0;SC=AACATAAAATCATTTATTTAT;TC=23;TR=3,6	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	3441674	.	G	GA	.	PASS	FR=0.5;HP=7;NF=13;NR=3;PP=100.0;SC=TTCTTATTAGGAAAAAAACCA;TC=23;TR=16	GT:GL:GQ	0/1:-122.74,-20.86,-35.93:68
-20	3456629	.	CA	C	.	PASS	FR=0.5;HP=8;NF=3;NR=5;PP=100.0;SC=TCCTCACTACCAAAAAAAAGA;TC=22;TR=8	GT:GL:GQ	0/1:-62.73,-25.03,-67.91:100
-20	3462307	.	A	ATTC	.	PASS	FR=0.5;HP=2;NF=7;NR=2;PP=100.0;SC=TAAATTTTTAATTAAGTTTTC;TC=17;TR=9	GT:GL:GQ	0/1:-213.54,-117.72,-169.88:100
-20	3465413	.	G	GTTA	.	PASS	FR=0.5;HP=3;NF=4;NR=7;PP=100.0;SC=TATATTTCCAGTTTAGGTCTC;TC=32;TR=11	GT:GL:GQ	0/1:-171.48,-39.39,-198.21:100
-20	3465556	.	AATT	A	.	PASS	FR=0.5;HP=3;NF=3;NR=3;PP=100.0;SC=TGGATTTTAAAATTATTATTA;TC=23;TR=6	GT:GL:GQ	0/1:-128.2,-26.49,-64.94:100
-20	3467027	.	TTTTCC	T	.	PASS	FR=0.5;HP=3;NF=3;NR=10;PP=100.0;SC=GTTGTTTTTCTTTTCCTTTTT;TC=35;TR=13	GT:GL:GQ	0/1:-205.57,-36.22,-212.27:100
-20	3468732	.	AT	A	.	PASS	FR=0.5;HP=1;NF=7;NR=3;PP=100.0;SC=GTTGGCTAACATGTTCCCTGC;TC=24;TR=10	GT:GL:GQ	0/1:-129.57,-23.07,-107.21:100
-20	3472426	.	T	TA	.	PASS	FR=0.5;HP=1;NF=4;NR=5;PP=100.0;SC=CCCCAAAACTTATCTAAGTAT;TC=30;TR=9	GT:GL:GQ	0/1:-164.9,-36.91,-163.8:100
-20	3473769	.	TTGTGTGTGTG	TTGTGTGTG,T	.	PASS	FR=0.5,0.5;HP=2;NF=3,2;NR=1,0;PP=100.0,100.0;SC=GTACGTTTGTTTGTGTGTGTG;TC=10;TR=4,2	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	3489906	.	C	CAG	.	PASS	FR=0.5;HP=3;NF=7;NR=5;PP=100.0;SC=TGTAATGAGTCAAATATTGAA;TC=30;TR=12	GT:GL:GQ	0/1:-218.47,-143.39,-285.84:100
-20	3495915	.	T	TG	.	PASS	FR=0.5;HP=1;NF=8;NR=2;PP=100.0;SC=GTGTTACCATTCTAGAGATGA;TC=24;TR=10	GT:GL:GQ	0/1:-170.31,-150.44,-250.52:100
-20	3509359	.	CTAAAA	C	.	PASS	FR=0.5;HP=1;NF=7;NR=9;PP=100.0;SC=CCCCTTGAACCTAAAATAAAA;TC=36;TR=16	GT:GL:GQ	0/1:-259.32,-75.45,-201.38:100
-20	3516100	.	GA	G	.	PASS	FR=0.5;HP=2;NF=4;NR=5;PP=100.0;SC=AACATTACTTGATAACCTTTC;TC=24;TR=9	GT:GL:GQ	0/1:-89.87,-17.09,-134.48:100
-20	3517232	.	T	TA	.	PASS	FR=0.5;HP=4;NF=5;NR=10;PP=100.0;SC=TTTATTCATTTAAAAGCAACA;TC=33;TR=15	GT:GL:GQ	0/1:-148.46,-23.56,-134.17:100
-20	3518135	.	TTG	T	.	PASS	FR=0.5;HP=1;NF=2;NR=7;PP=100.0;SC=TATTTTTTTCTTGTTTTTTTT;TC=24;TR=9	GT:GL:GQ	0/1:-164.48,-76.63,-118.93:100
-20	3520111	.	TGAGAAACAGAAA	T	.	PASS	FR=0.5;HP=1;NF=6;NR=4;PP=100.0;SC=GTCAAATACTTGAGAAACAGA;TC=30;TR=10	GT:GL:GQ	0/1:-291.42,-56.72,-205.51:100
-20	3533082	.	C	CTA	.	PASS	FR=0.5;HP=6;NF=5;NR=7;PP=100.0;SC=CCAGATGTCCCCCCCAGTTAA;TC=28;TR=12	GT:GL:GQ	0/1:-172.54,-164.36,-281.23:100
-20	3536203	.	CA	C	.	PASS	FR=0.5;HP=5;NF=5;NR=1;PP=100.0;SC=TGGTAGACCACAAAACAAAAT;TC=20;TR=6	GT:GL:GQ	0/1:-93.07,-22.5,-78.34:100
-20	3549166	.	A	AT	.	PASS	FR=0.5;HP=7;NF=6;NR=5;PP=100.0;SC=ACTCAAAAAAAATATATTTCA;TC=27;TR=11	GT:GL:GQ	0/1:-132.66,-26.81,-119.92:100
-20	3550790	.	AT	A	.	PASS	FR=0.5;HP=10;NF=9;NR=3;PP=100.0;SC=AATTGTCTCAATTTTTTTTTT;TC=36;TR=12	GT:GL:GQ	0/1:-95.8,-54.46,-109.39:100
-20	3554405	.	TTTTA	T	.	PASS	FR=0.5;HP=3;NF=5;NR=3;PP=100.0;SC=TTTTATTTTATTTTATTTATT;TC=28;TR=8	GT:GL:GQ	0/1:-169.52,-76.02,-126.65:100
-20	3557342	.	G	GTCTATCTATCTATCTATCTA,GTCTGTCTGTCTATCTA	.	PASS	FR=0.5,0.5;HP=2;NF=0,1;NR=2,1;PP=100.0,100.0;SC=CTGTCTGTCTGTCTATCTATC;TC=14;TR=2,2	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	3577359	.	AACTTT	A	.	PASS	FR=0.5;HP=3;NF=8;NR=4;PP=100.0;SC=GTTCTCTTAAAACTTTACTTT;TC=28;TR=12	GT:GL:GQ	0/1:-187.21,-26.31,-190.0:100
-20	3587084	.	A	ACT	.	PASS	FR=0.5;HP=2;NF=5;NR=2;PP=100.0;SC=TTCTCTCTTCACTGTTTCCTG;TC=27;TR=7	GT:GL:GQ	0/1:-175.39,-93.87,-225.08:100
-20	3587106	.	TGTG	T	.	PASS	FR=0.5;HP=1;NF=4;NR=3;PP=100.0;SC=ATGTGGGACTTGTGGTGCCAC;TC=26;TR=7	GT:GL:GQ	0/1:-197.29,-142.58,-281.02:100
-20	3597598	.	AT	A	.	PASS	FR=0.5;HP=5;NF=5;NR=7;PP=29.0;SC=CAAGGATCGCATTTTTATCCC;TC=39;TR=12	GT:GL:GQ	0/1:-225.54,-208.64,-370.51:76
-20	3599489	.	G	GGTT	.	PASS	FR=0.5;HP=1;NF=6;NR=4;PP=100.0;SC=TGGTGGTGGTGGTTTTGTTTC;TC=28;TR=10	GT:GL:GQ	0/1:-173.69,-38.78,-110.57:100
-20	3601166	.	T	TAC	.	PASS	FR=0.5;HP=1;NF=1;NR=5;PP=100.0;SC=GTACTGGGATTAGGCGTGAGC;TC=23;TR=6	GT:GL:GQ	0/1:-99.56,-38.65,-114.14:100
-20	3607044	.	TAAAAA	T	.	PASS	FR=0.5;HP=5;NF=6;NR=1;PP=100.0;SC=TTTTCTCTCTTAAAAAGAAAA;TC=23;TR=7	GT:GL:GQ	0/1:-96.17,-24.47,-167.72:100
-20	3608928	.	A	AAG	.	PASS	FR=0.5;HP=2;NF=6;NR=2;PP=100.0;SC=GAAAACTAGAAAGAAACTTCT;TC=32;TR=8	GT:GL:GQ	0/1:-96.19,-24.02,-201.47:100
-20	3610589	.	G	GT	.	PASS	FR=0.5;HP=7;NF=7;NR=8;PP=100.0;SC=ATCATTCTGAGTTTTTTTATT;TC=36;TR=15	GT:GL:GQ	0/1:-148.28,-61.67,-123.51:100
-20	3612124	.	A	AC	.	PASS	FR=0.5;HP=1;NF=5;NR=1;PP=100.0;SC=GTCTGTTGAGACTGTGTCCTA;TC=17;TR=6	GT:GL:GQ	0/1:-86.01,-27.19,-97.39:100
-20	3627840	.	C	CA	.	PASS	FR=0.5;HP=6;NF=4;NR=7;PP=100.0;SC=CTCAACTGTGCAAAAAACAAA;TC=27;TR=11	GT:GL:GQ	0/1:-99.01,-25.59,-91.79:100
-20	3627925	.	A	ATTAAC	.	PASS	FR=0.5;HP=2;NF=2;NR=9;PP=100.0;SC=AGTCAGATGAATTGTTTTCAT;TC=29;TR=11	GT:GL:GQ	0/1:-210.42,-38.37,-176.36:100
-20	3635158	.	A	AT	.	PASS	FR=0.5;HP=2;NF=8;NR=5;PP=100.0;SC=CAAGAAAGCCATAGACCGGAA;TC=23;TR=13	GT:GL:GQ	0/1:-191.76,-111.36,-148.51:100
-20	3642221	.	TTC	T	.	PASS	FR=1.0;HP=2;NF=12;NR=3;PP=100.0;SC=TCGCCACCATTTCTCCAGAAC;TC=20;TR=15	GT:GL:GQ	1/1:-312.08,-172.82,-161.67:43
-20	3643129	.	TC	T	.	PASS	FR=1.0;HP=9;NF=4;NR=4;PP=100.0;SC=CGGGGTGGTATCCCCCCCCCA;TC=20;TR=8	GT:GL:GQ	1/1:-89.01,-45.99,-37.4:71
-20	3645120	.	AAAAC	A	.	PASS	FR=1.0;HP=5;NF=1;NR=4;PP=100.0;SC=TTTTTTTTAAAAAACAAACAA;TC=18;TR=5	GT:GL:GQ	1/1:-88.2,-13.8,-7.58:77
-20	3650540	.	A	ACACCACC	.	PASS	FR=1.0;HP=1;NF=3;NR=4;PP=100.0;SC=CCAGGCTCTGACAGCAGCCTG;TC=12;TR=7	GT:GL:GQ	1/1:-183.63,-21.64,-13.12:68
-20	3664603	.	AG	A	.	PASS	FR=1.0;HP=6;NF=3;NR=9;PP=100.0;SC=TTCTGTAGACAGGGGGGTCTC;TC=16;TR=12	GT:GL:GQ	1/1:-110.02,-26.49,-16.31:85
-20	3667748	.	C	CG	.	PASS	FR=1.0;HP=2;NF=12;NR=5;PP=100.0;SC=AAAGTTCACCCGCCCCCAACT;TC=24;TR=17	GT:GL:GQ	1/1:-221.42,-44.79,-28.21:100
-20	3677095	.	T	TGCTG	.	PASS	FR=1.0;HP=1;NF=4;NR=13;PP=100.0;SC=GGAGGCCTTCTGCTGGCTGGA;TC=22;TR=17	GT:GL:GQ	1/1:-297.16,-58.83,-44.05:100
-20	3685444	.	A	AT	.	PASS	FR=1.0;HP=7;NF=6;NR=4;PP=100.0;SC=TTGTTTTTTAATTTTTTTGTA;TC=15;TR=10	GT:GL:GQ	1/1:-93.4,-15.67,-6.68:75
-20	3699376	.	AAAAT	A	.	PASS	FR=1.0;HP=5;NF=4;NR=2;PP=100.0;SC=CAAAAAATAAAAAATAAATAA;TC=21;TR=6	GT:GL:GQ	1/1:-124.16,-19.34,-11.28:66
-20	3700024	.	TTTAC	T	.	PASS	FR=0.5;HP=2;NF=3;NR=4;PP=100.0;SC=TATTTATTTATTTACTTACTT;TC=22;TR=7	GT:GL:GQ	0/1:-142.54,-24.82,-34.29:44
-20	3702676	.	C	CT	.	PASS	FR=1.0;HP=9;NF=9;NR=6;PP=100.0;SC=ATATGTTGAACTTTTTTTTTA;TC=20;TR=15	GT:GL:GQ	1/1:-102.25,-23.87,-11.51:100
-20	3703373	.	GAATA	G	.	PASS	FR=1.0;HP=3;NF=3;NR=4;PP=100.0;SC=TATACATGGAGAATAAATAAA;TC=24;TR=7	GT:GL:GQ	1/1:-129.84,-26.73,-19.11:63
-20	3705235	.	G	GGAAA	.	PASS	FR=1.0;HP=3;NF=3;NR=2;PP=100.0;SC=AAGAAAGAAAGGAAAGAAATA;TC=24;TR=5	GT:GL:GQ	1/1:-319.51,-157.83,-145.36:98
-20	3717704	.	AAAATAAATAAATAAAT	AAAATAAATAAAT,A	.	PASS	FR=0.5,0.5;HP=4;NF=1,0;NR=1,2;PP=100.0,55.0;SC=CTCTGCCTCAAAAATAAATAA;TC=12;TR=2,2	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	3719488	.	AGT	A	.	PASS	FR=0.5;HP=2;NF=4;NR=6;PP=100.0;SC=TCTGTGAGTGAGTGTGTGTGT;TC=28;TR=10	GT:GL:GQ	0/1:-149.53,-25.54,-102.21:100
-20	3736407	.	CCCCCAGCCCAGTGG	C	.	PASS	FR=0.5;HP=4;NF=3;NR=1;PP=100.0;SC=AGCTGATCGACCCCCAGCCCA;TC=22;TR=4	GT:GL:GQ	0/1:-177.03,-114.74,-207.47:100
-20	3740620	.	GCA	G	.	PASS	FR=1.0;HP=1;NF=4;NR=6;PP=100.0;SC=ACTCACACATGCACACACACA;TC=17;TR=10	GT:GL:GQ	1/1:-154.32,-36.11,-25.75:86
-20	3751453	.	G	GT	.	PASS	FR=1.0;HP=6;NF=1;NR=1;PP=100.0;SC=CAAACACACGGTTTTTTGTTT;TC=25;TR=2	GT:GL:GQ	1/1:-234.3,-199.49,-191.92:62
-20	3752464	.	A	AACAC,AACACAC	.	PASS	FR=0.5,0.5;HP=3;NF=4,3;NR=3,3;PP=100.0,100.0;SC=AAAAAGAGAAAACACACACAC;TC=29;TR=7,6	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	3755004	.	G	GACA	.	PASS	FR=1.0;HP=2;NF=1;NR=7;PP=100.0;SC=GACAGAGTGAGACATCTCATA;TC=13;TR=8	GT:GL:GQ	1/1:-134.63,-25.28,-17.61:63
-20	3768789	.	A	AAAAG	.	PASS	FR=0.5;HP=8;NF=4;NR=3;PP=100.0;SC=ATCTCAAAAAAAAAGAAAGAA;TC=28;TR=7	GT:GL:GQ	0/1:-141.47,-38.74,-119.72:100
-20	3770324	.	T	TAATAATA	.	PASS	FR=0.5;HP=8;NF=1;NR=2;PP=29.0;SC=GGCCAAAAAATAATAATAAAT;TC=11;TR=3	GT:GL:GQ	0/1:-67.44,-43.02,-52.14:42
-20	3774219	.	AATTTT	A	.	PASS	FR=0.5;HP=1;NF=2;NR=3;PP=100.0;SC=GGTTTTAGAGAATTTTATTTT;TC=20;TR=5	GT:GL:GQ	0/1:-126.4,-91.22,-154.58:100
-20	3775162	.	GTT	G	.	PASS	FR=0.5;HP=10;NF=3;NR=6;PP=100.0;SC=TCTCGGGGCAGTTTTTTTTTT;TC=26;TR=9	GT:GL:GQ	0/1:-103.9,-68.26,-117.09:100
-20	3776005	.	C	CA	.	PASS	FR=0.5;HP=8;NF=1;NR=4;PP=23.0;SC=GACTCCATCCCAAAAAAAACA;TC=14;TR=5	GT:GL:GQ	0/1:-145.51,-129.15,-148.62:73
-20	3776021	.	AAAC	A	.	PASS	FR=0.5;HP=3;NF=3;NR=1;PP=100.0;SC=AAACAAAACAAAACAAAAAGA;TC=21;TR=4	GT:GL:GQ	0/1:-163.41,-119.44,-232.96:100
-20	3780857	.	T	TGGACTGGAGACCTGGTGCTAG	.	PASS	FR=0.5;HP=6;NF=4;NR=1;PP=100.0;SC=TACTCCCCCCTGGACTGGGGG;TC=10;TR=5	GT:GL:GQ	0/1:-153.98,-19.16,-34.72:70
-20	3786892	.	C	CT	.	PASS	FR=1.0;HP=4;NF=10;NR=2;PP=100.0;SC=CTTGTCCCTTCTTCTCCCAAT;TC=16;TR=12	GT:GL:GQ	1/1:-171.33,-64.44,-53.38:92
-20	3787614	.	CAT	C	.	PASS	FR=1.0;HP=2;NF=11;NR=13;PP=100.0;SC=AGTGCACACACATGTCAGGCA;TC=30;TR=24	GT:GL:GQ	1/1:-451.43,-312.17,-297.5:100
-20	3789927	.	C	CCCG	.	PASS	FR=1.0;HP=2;NF=2;NR=10;PP=100.0;SC=AGTTACCACGCGCTCTCTTTC;TC=17;TR=12	GT:GL:GQ	1/1:-241.99,-120.76,-110.7:78
-20	3790246	.	ATATAT	A	.	PASS	FR=1.0;HP=8;NF=5;NR=2;PP=92.0;SC=TCAAAAAAAAATATATATATA;TC=14;TR=7	GT:GL:GQ	1/1:-198.37,-176.0,-172.1:52
-20	3795480	.	AGGCGTGAGCCACCGCGCCC	A	.	PASS	FR=0.5;HP=2;NF=2;NR=2;PP=100.0;SC=CTGGGATTACAGGCGTGAGCC;TC=12;TR=4	GT:GL:GQ	0/1:-109.14,-46.17,-99.46:100
-20	3824585	.	TTTTAC	T	.	PASS	FR=1.0;HP=3;NF=18;NR=4;PP=100.0;SC=AGATGATTTATTTTACTTTAT;TC=28;TR=22	GT:GL:GQ	1/1:-337.35,-36.39,-16.32:100
-20	3843259	.	A	AT	.	PASS	FR=0.5;HP=10;NF=3;NR=7;PP=100.0;SC=AGTTTTCCAAATTTTTTTTTT;TC=31;TR=10	GT:GL:GQ	0/1:-80.23,-37.02,-73.45:100
-20	3859483	.	TCACACACACA	TCA,T	.	PASS	FR=0.5,0.5;HP=1;NF=1,2;NR=1,1;PP=100.0,85.0;SC=TGAGACTCTGTCACACACACA;TC=21;TR=2,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	3860757	.	AAAAC	A	.	PASS	FR=0.5;HP=4;NF=5;NR=2;PP=100.0;SC=GTCTCTACTAAAAACAAACAA;TC=18;TR=7	GT:GL:GQ	0/1:-108.81,-21.22,-75.5:100
-20	3860858	.	GC	G	.	PASS	FR=0.5;HP=1;NF=5;NR=1;PP=100.0;SC=AACCCAGGAGGCGGAGCTTGT;TC=16;TR=6	GT:GL:GQ	0/1:-84.65,-31.03,-99.29:100
-20	3865910	.	A	AGGC	.	PASS	FR=0.5;HP=3;NF=8;NR=4;PP=100.0;SC=TCTGTCACCCAGGCTCAAGTT;TC=27;TR=12	GT:GL:GQ	0/1:-249.42,-106.14,-180.19:100
-20	3873092	.	TTTTA	T	.	PASS	FR=1.0;HP=5;NF=6;NR=8;PP=100.0;SC=ACTAAATCTTTTTTATTTATT;TC=25;TR=14	GT:GL:GQ	1/1:-225.87,-50.85,-37.99:100
-20	3879882	.	AGT	A	.	PASS	FR=1.0;HP=1;NF=4;NR=4;PP=100.0;SC=GCAGTGATGTAGTGTAGGCTC;TC=17;TR=8	GT:GL:GQ	1/1:-213.63,-128.83,-121.45:61
-20	3882311	.	TTTTG	T	.	PASS	FR=1.0;HP=3;NF=15;NR=11;PP=100.0;SC=AAGTCAGTACTTTTGTTTATT;TC=29;TR=26	GT:GL:GQ	1/1:-341.87,-21.25,-0.46:100
-20	3883619	.	GACACACACACACACAC	G	.	PASS	FR=0.5013;HP=2;NF=4;NR=1;PP=100.0;SC=GATGTGTATAGACACACACAC;TC=14;TR=5	GT:GL:GQ	0/1:-204.43,-28.1,-33.39:25
-20	3885810	.	GACTGCACC	G	.	PASS	FR=1.0;HP=1;NF=4;NR=7;PP=100.0;SC=CATCGCTTGTGACTGCACCAC;TC=19;TR=11	GT:GL:GQ	1/1:-301.58,-43.69,-32.0:95
-20	3899973	.	T	TTGA	.	PASS	FR=1.0;HP=3;NF=18;NR=6;PP=100.0;SC=AGAAAAACCCTTGAACATTCC;TC=30;TR=24	GT:GL:GQ	1/1:-376.13,-29.44,-7.6:100
-20	3900864	.	T	TA	.	PASS	FR=1.0;HP=10;NF=11;NR=11;PP=100.0;SC=AAGTTAACCTTAAAAAAAAAA;TC=30;TR=22	GT:GL:GQ	1/1:-160.94,-53.86,-35.6:100
-20	3929292	.	G	GA	.	PASS	FR=1.0;HP=1;NF=16;NR=6;PP=100.0;SC=TACATACCAGGATAACTGTTG;TC=29;TR=22	GT:GL:GQ	1/1:-330.17,-190.24,-173.09:100
-20	3930806	.	T	TGACTGG	.	PASS	FR=1.0;HP=2;NF=7;NR=14;PP=100.0;SC=CCTTGTATAGTGATGAATGTG;TC=26;TR=21	GT:GL:GQ	1/1:-450.24,-61.65,-40.95:100
-20	3945171	.	A	AT	.	PASS	FR=1.0;HP=10;NF=7;NR=12;PP=100.0;SC=TTTTCAAGTAATTTTTTTTTT;TC=29;TR=19	GT:GL:GQ	1/1:-126.38,-32.45,-22.97:79
-20	3956227	.	C	CA	.	PASS	FR=1.0;HP=5;NF=12;NR=13;PP=100.0;SC=ATTGTGTTCTCAAAAAGATAT;TC=28;TR=25	GT:GL:GQ	1/1:-249.31,-33.1,-13.35:100
-20	3965697	.	AACC	A	.	PASS	FR=1.0;HP=1;NF=9;NR=9;PP=100.0;SC=GAACAACAACAACCACAACAA;TC=26;TR=18	GT:GL:GQ	1/1:-461.94,-340.35,-326.48:100
-20	3971557	.	G	GTTCCATGATAACAT	.	PASS	FR=1.0;HP=2;NF=12;NR=8;PP=100.0;SC=ATTTGGCACAGTTCCATGATA;TC=27;TR=20	GT:GL:GQ	1/1:-553.38,-41.98,-23.08:100
-20	3990695	.	CACAAACAA	C	.	PASS	FR=1.0;HP=1;NF=6;NR=4;PP=100.0;SC=GAGACCCTGTCACAAACAAAC;TC=23;TR=10	GT:GL:GQ	1/1:-176.37,-39.86,-31.94:65
-20	3995386	.	GCACACA	G	.	PASS	FR=1.0;HP=2;NF=1;NR=1;PP=100.0;SC=ACTTGAATGCGCACACACACA;TC=18;TR=2	GT:GL:GQ	1/1:-95.82,-46.66,-41.67:61
-20	4008931	.	C	CTCTT	.	PASS	FR=1.0;HP=2;NF=1;NR=4;PP=100.0;SC=TCTCATCTCTCTGTCTTTCTC;TC=9;TR=5	GT:GL:GQ	1/1:-127.43,-46.42,-40.22:77
-20	4021562	.	C	CGA	.	PASS	FR=1.0;HP=2;NF=8;NR=2;PP=100.0;SC=GAAGAGAAAGCGAGAGAGAGA;TC=21;TR=10	GT:GL:GQ	1/1:-216.37,-85.41,-73.73:98
-20	4025709	.	TGA	T	.	PASS	FR=1.0;HP=2;NF=12;NR=9;PP=100.0;SC=AAATACATAATGAGAGAGAGA;TC=26;TR=21	GT:GL:GQ	1/1:-247.4,-21.57,-4.6:100
-20	4035810	.	T	TGTTTGTATTACA	.	PASS	FR=1.0;HP=2;NF=10;NR=4;PP=100.0;SC=TAGCTGGGCATGGTGGCGGGT;TC=15;TR=14	GT:GL:GQ	1/1:-361.94,-174.62,-163.57:92
-20	4042278	.	A	AT	.	PASS	FR=1.0;HP=2;NF=7;NR=15;PP=100.0;SC=AAACACATAAATCTCTCTCTC;TC=29;TR=22	GT:GL:GQ	1/1:-269.48,-66.17,-47.18:100
-20	4044153	.	C	CA	.	PASS	FR=1.0;HP=6;NF=8;NR=10;PP=100.0;SC=GCCCCAGGGACGGGGGGCTGG;TC=21;TR=18	GT:GL:GQ	1/1:-167.11,-27.75,-13.35:100
-20	4048870	.	AGAGTTATCTTGCCTGAG	A	.	PASS	FR=0.5;HP=4;NF=9;NR=5;PP=100.0;SC=CACGTGCCCCAGAGTTATCTT;TC=24;TR=14	GT:GL:GQ	1/0:-626.63,-331.02,-449.96:74
-20	4050067	.	A	AT	.	PASS	FR=1.0;HP=8;NF=14;NR=11;PP=100.0;SC=TAAGTTTTAAATTTTTTTTGT;TC=36;TR=25	GT:GL:GQ	1/1:-400.71,-316.84,-301.94:100
-20	4052527	.	A	AT	.	PASS	FR=1.0;HP=1;NF=15;NR=9;PP=100.0;SC=CTAAGCATGAAGTGGTCTCAG;TC=27;TR=24	GT:GL:GQ	1/1:-335.51,-240.21,-229.69:88
-20	4057207	.	G	GT	.	PASS	FR=1.0;HP=3;NF=17;NR=11;PP=100.0;SC=TAGATTATTTGGTTTTTTTTT;TC=40;TR=28	GT:GL:GQ	1/1:-398.27,-278.49,-261.61:100
-20	4057861	.	T	TTTCC	.	PASS	FR=1.0;HP=4;NF=8;NR=13;PP=100.0;SC=CTGATGATTTTTATGTTTTCT;TC=33;TR=21	GT:GL:GQ	1/1:-430.04,-131.81,-113.85:100
-20	4058335	.	T	TATTA	.	PASS	FR=1.0;HP=2;NF=14;NR=5;PP=100.0;SC=TTAATATGTTTATTATACATA;TC=19;TR=19	GT:GL:GQ	1/1:-424.99,-369.88,-364.34:69
-20	4060198	.	CTCTT	C	.	PASS	FR=0.5;HP=3;NF=8;NR=6;PP=100.0;SC=TTCTATTGTTCTCTTTGTTTT;TC=37;TR=14	GT:GL:GQ	0/1:-273.47,-128.98,-306.0:100
-20	4060592	.	C	CTTTA	.	PASS	FR=0.5;HP=3;NF=4;NR=8;PP=100.0;SC=ATAATTTTTGCTTTATTTATT;TC=31;TR=12	GT:GL:GQ	0/1:-163.9,-38.86,-129.26:100
-20	4070170	.	GTA	G	.	PASS	FR=0.5;HP=2;NF=3;NR=2;PP=100.0;SC=GTGTGTGTGTGTATATATATA;TC=25;TR=5	GT:GL:GQ	0/1:-276.88,-237.9,-267.79:100
-20	4070252	.	A	ATGTATATATG	.	PASS	FR=1.0;HP=2;NF=3;NR=1;PP=100.0;SC=GTGTGTATATATGTATATATG;TC=16;TR=4	GT:GL:GQ	1/1:-231.61,-30.38,-18.61:81
-20	4070382	.	ATATGTGTGTGTG	A	.	PASS	FR=1.0;HP=2;NF=1;NR=2;PP=100.0;SC=ATGTGTATATATATGTGTGTG;TC=25;TR=3	GT:GL:GQ	1/1:-347.8,-231.66,-223.35:51
-20	4070396	.	GTGTGTGTGTGTGTATATATATATATA	G	.	PASS	FR=0.5;HP=2;NF=4;NR=4;PP=100.0;SC=GTGTGTGTGTGTGTGTGTGTG;TC=18;TR=8	GT:GL:GQ	1/0:-384.34,-235.32,-225.8:62
-20	4071341	.	CA	C	.	PASS	FR=0.5026;HP=9;NF=5;NR=5;PP=100.0;SC=CTGATTATGGCAAAAAAAAAC;TC=20;TR=10	GT:GL:GQ	0/1:-155.5,-119.13,-123.71:22
-20	4071895	.	G	GT	.	PASS	FR=0.5;HP=8;NF=3;NR=3;PP=72.0;SC=TGGGACCTTTGTTTTTGCAAA;TC=22;TR=6	GT:GL:GQ	0/1:-127.95,-100.32,-170.75:100
-20	4074739	.	G	GA	.	PASS	FR=0.5;HP=9;NF=2;NR=4;PP=75.0;SC=ACTACATCTCGAAAAAAAAAG;TC=16;TR=6	GT:GL:GQ	0/1:-104.75,-76.46,-99.49:100
-20	4077346	.	ATATTAT	A	.	PASS	FR=0.5;HP=1;NF=2;NR=2;PP=100.0;SC=TATGAGGACAATATTATTATT;TC=23;TR=4	GT:GL:GQ	0/1:-62.56,-10.62,-98.18:100
-20	4092195	.	G	GTCAGCCAGAGAGGCTC	.	PASS	FR=1.0;HP=1;NF=7;NR=5;PP=100.0;SC=AGGTAAGACAGTCAGCCAGAG;TC=21;TR=12	GT:GL:GQ	1/1:-408.88,-45.59,-29.88:100
-20	4092421	.	A	AT	.	PASS	FR=0.5;HP=4;NF=5;NR=6;PP=100.0;SC=CTGGCAGCAGATTTTCCCTTA;TC=31;TR=11	GT:GL:GQ	0/1:-137.54,-52.61,-154.29:100
-20	4095639	.	T	TATAC	.	PASS	FR=0.5;HP=2;NF=3;NR=6;PP=100.0;SC=TATATATATATACACACACAT;TC=30;TR=9	GT:GL:GQ	0/1:-239.61,-67.33,-166.02:100
-20	4096614	.	T	TG	.	PASS	FR=0.5;HP=1;NF=3;NR=8;PP=100.0;SC=TTTGATGGCTTGTGAAGCCCA;TC=42;TR=11	GT:GL:GQ	0/1:-166.13,-48.49,-243.23:100
-20	4099234	.	C	CTCT	.	PASS	FR=1.0;HP=1;NF=2;NR=7;PP=100.0;SC=CTTCTTCTTCCTCTTCTTCCT;TC=17;TR=9	GT:GL:GQ	1/1:-213.81,-121.18,-113.85:91
-20	4106279	.	C	CA	.	PASS	FR=1.0;HP=4;NF=9;NR=14;PP=100.0;SC=ATGATCCACCCCCTTGGCCTC;TC=27;TR=23	GT:GL:GQ	1/1:-261.7,-33.57,-14.72:100
-20	4106498	.	AC	A	.	PASS	FR=0.5;HP=3;NF=4;NR=6;PP=100.0;SC=ACCCGCCACCACGTCAAGCTA;TC=17;TR=10	GT:GL:GQ	0/1:-151.03,-63.2,-86.55:100
-20	4107003	.	T	TCTAA	.	PASS	FR=0.5;HP=2;NF=4;NR=9;PP=100.0;SC=TGGAGGTAACTCTAGGACATA;TC=28;TR=13	GT:GL:GQ	0/1:-216.14,-60.6,-196.15:100
-20	4108348	.	A	AC	.	PASS	FR=1.0;HP=3;NF=9;NR=6;PP=100.0;SC=TTCTATGGAAAAGAGCAGTCA;TC=22;TR=15	GT:GL:GQ	1/1:-263.65,-164.58,-152.76:96
-20	4111438	.	CA	C	.	PASS	FR=1.0;HP=2;NF=13;NR=9;PP=100.0;SC=GGTGATCACACAGGGGCATGG;TC=27;TR=22	GT:GL:GQ	1/1:-393.14,-310.63,-301.96:68
-20	4111530	.	T	TG	.	PASS	FR=1.0;HP=1;NF=13;NR=14;PP=100.0;SC=CATCAAAACTTGCAGAAGTAT;TC=30;TR=27	GT:GL:GQ	1/1:-576.34,-531.28,-526.81:55
-20	4112367	.	TA	T	.	PASS	FR=0.5;HP=2;NF=7;NR=2;PP=100.0;SC=AGACTTTAGTTAATAATAATA;TC=25;TR=9	GT:GL:GQ	0/1:-105.53,-48.17,-185.05:100
-20	4124037	.	TACAC	TAC,T	.	PASS	FR=0.5,0.5;HP=2;NF=0,1;NR=6,6;PP=100.0,100.0;SC=TGTATGTGTATACACACACAC;TC=29;TR=6,7	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	4165244	.	C	CAG	.	PASS	FR=0.5;HP=3;NF=9;NR=7;PP=100.0;SC=TAAAACTCAACAGTTATATTT;TC=28;TR=16	GT:GL:GQ	0/1:-164.36,-34.34,-133.84:100
-20	4189405	.	A	AGTGTTCT	.	PASS	FR=1.0;HP=1;NF=8;NR=19;PP=100.0;SC=TGATCACAGAAGTGTTGAATG;TC=31;TR=27	GT:GL:GQ	1/1:-510.65,-52.94,-31.94:100
-20	4193006	.	T	TA	.	PASS	FR=1.0;HP=9;NF=5;NR=11;PP=100.0;SC=TGTGTTTGATTAAAAAAAAAT;TC=25;TR=16	GT:GL:GQ	1/1:-189.06,-113.86,-103.2:89
-20	4204545	.	CAACAGGTTT	C	.	PASS	FR=0.5;HP=3;NF=5;NR=5;PP=100.0;SC=TTTCAATTTACAACAGGTTTA;TC=29;TR=10	GT:GL:GQ	0/1:-264.93,-66.16,-208.86:100
-20	4210072	.	T	TA	.	PASS	FR=0.5;HP=5;NF=7;NR=3;PP=100.0;SC=GGAAGGAAGATGGGGGCGAGT;TC=33;TR=10	GT:GL:GQ	0/1:-169.78,-122.55,-232.56:100
-20	4211685	.	T	TTTTCTTTC	.	PASS	FR=1.0;HP=4;NF=3;NR=1;PP=100.0;SC=CTTTCTTTCTTTTTCTTTCTT;TC=17;TR=4	GT:GL:GQ	1/1:-163.69,-62.85,-59.76:50
-20	4222606	.	TG	T,AG	.	PASS	FR=0.5,0.5;HP=2;NF=14,3;NR=8,0;PP=72.0,7.0;SC=CAGCACAGCCTGATGGCTCTG;TC=29;TR=22,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:41
-20	4223993	.	CG	C	.	PASS	FR=1.0;HP=4;NF=10;NR=1;PP=100.0;SC=CTGGGCTCCTCGGGGCATCCG;TC=14;TR=11	GT:GL:GQ	1/1:-180.73,-119.68,-111.91:64
-20	4255571	.	TGAAA	T	.	PASS	FR=1.0;HP=1;NF=5;NR=4;PP=100.0;SC=AGGTATGCTCTGAAAGGAAGA;TC=15;TR=9	GT:GL:GQ	1/1:-155.75,-66.2,-58.38:79
-20	4260218	.	C	CA	.	PASS	FR=0.5;HP=3;NF=1;NR=9;PP=100.0;SC=CTGGTCTCCCCAGCATCTAGT;TC=27;TR=10	GT:GL:GQ	0/1:-138.73,-38.26,-150.01:100
-20	4280077	.	G	GTGA	.	PASS	FR=0.5;HP=1;NF=2;NR=4;PP=100.0;SC=GATGTCTTTGGTGATGATGAT;TC=23;TR=6	GT:GL:GQ	0/1:-118.58,-26.45,-67.22:100
-20	4300671	.	G	GT	.	PASS	FR=1.0;HP=9;NF=9;NR=7;PP=100.0;SC=TATTTTTTAAGTTTTTTTTTC;TC=22;TR=16	GT:GL:GQ	1/1:-112.49,-30.96,-17.5:100
-20	4305010	.	C	CCTGT	.	PASS	FR=1.0;HP=1;NF=9;NR=14;PP=100.0;SC=AGGTTTGGCTCCTGTCTGACA;TC=27;TR=23	GT:GL:GQ	1/1:-478.98,-124.12,-105.32:100
-20	4306264	.	GT	G	.	PASS	FR=0.5;HP=3;NF=7;NR=4;PP=100.0;SC=ACAATATAAGGTTTACTTCAA;TC=24;TR=11	GT:GL:GQ	0/1:-115.0,-27.63,-111.62:100
-20	4310291	.	T	TC	.	PASS	FR=1.0;HP=1;NF=20;NR=9;PP=100.0;SC=CTCCTACGTGTCATGCCAGCT;TC=32;TR=29	GT:GL:GQ	1/1:-333.81,-66.33,-44.4:100
-20	4310977	.	GC	G	.	PASS	FR=0.5;HP=1;NF=14;NR=6;PP=100.0;SC=CCTGAAACTGGCGTAATTTAT;TC=41;TR=20	GT:GL:GQ	0/1:-231.9,-39.91,-159.66:100
-20	4321071	.	A	AG	.	PASS	FR=0.5;HP=5;NF=3;NR=2;PP=100.0;SC=AAGTCAAATCAGGGGGAGGAA;TC=19;TR=5	GT:GL:GQ	0/1:-50.11,-15.88,-71.26:100
-20	4322091	.	CA	C	.	PASS	FR=0.5;HP=1;NF=11;NR=7;PP=100.0;SC=GCCGTGTGTCCAGCCAAAACT;TC=33;TR=18	GT:GL:GQ	0/1:-210.17,-46.06,-156.61:100
-20	4329185	.	TC	T	.	PASS	FR=0.5;HP=1;NF=8;NR=2;PP=100.0;SC=AATTCTAGGTTCTTTCTCTCA;TC=28;TR=10	GT:GL:GQ	0/1:-148.46,-71.81,-182.2:100
-20	4330761	.	GGTGTGTGT	G	.	PASS	FR=1.0;HP=3;NF=1;NR=3;PP=100.0;SC=TAATTCATGGGGTGTGTGTGT;TC=30;TR=4	GT:GL:GQ	1/1:-224.07,-44.24,-35.58:72
-20	4332044	.	TG	T	.	PASS	FR=1.0;HP=6;NF=5;NR=2;PP=57.0;SC=TTTGTTTTTTTGTTTTTTTTT;TC=24;TR=7	GT:GL:GQ	1/1:-226.96,-113.86,-100.61:42
-20	4343821	.	TA	T	.	PASS	FR=0.5;HP=8;NF=5;NR=8;PP=100.0;SC=CATTTTTTTTTAAAATTTTTG;TC=35;TR=13	GT:GL:GQ	1/0:-274.8,-111.87,-90.41:100
-20	4349378	.	A	AT	.	PASS	FR=0.5;HP=3;NF=11;NR=7;PP=100.0;SC=TTTTGAAGGCATTTCCAGGGT;TC=27;TR=18	GT:GL:GQ	0/1:-181.47,-28.52,-69.89:100
-20	4366637	.	AAAAC	A	.	PASS	FR=1.0;HP=3;NF=8;NR=10;PP=100.0;SC=AAAACAAAACAAAACAAACAA;TC=29;TR=18	GT:GL:GQ	1/1:-255.42,-38.69,-23.59:100
-20	4378952	.	A	AAAC	.	PASS	FR=1.0;HP=2;NF=5;NR=8;PP=100.0;SC=CAAAACAAACAAACAACAACA;TC=26;TR=13	GT:GL:GQ	1/1:-242.03,-34.58,-19.38:100
-20	4380979	.	CACAT	C	.	PASS	FR=1.0;HP=2;NF=6;NR=6;PP=100.0;SC=CACACACACACACATACAAGC;TC=29;TR=12	GT:GL:GQ	1/1:-310.99,-41.83,-21.18:100
-20	4381267	.	T	TGTGTATTGTGGA	.	PASS	FR=1.0;HP=2;NF=4;NR=9;PP=100.0;SC=GACAGCCTCCTTCAACAAAAA;TC=23;TR=13	GT:GL:GQ	1/1:-573.3,-462.6,-447.82:96
-20	4381268	.	TC	T	.	PASS	FR=1.0;HP=1;NF=4;NR=9;PP=100.0;SC=ACAGCCTCCTTCAACAAAAAA;TC=27;TR=13	GT:GL:GQ	1/1:-573.3,-567.48,-566.42:96
-20	4384878	.	TAGAC	T	.	PASS	FR=0.5;HP=4;NF=7;NR=6;PP=100.0;SC=ATGGAAGAAATAGACAGAGAG;TC=32;TR=13	GT:GL:GQ	0/1:-215.18,-58.15,-186.03:100
-20	4390996	.	ACT	A	.	PASS	FR=0.5;HP=1;NF=5;NR=4;PP=100.0;SC=AACACTCGAGACTCTCCAGCT;TC=25;TR=9	GT:GL:GQ	0/1:-160.6,-43.63,-115.25:100
-20	4392384	.	T	TTG	.	PASS	FR=0.5;HP=1;NF=2;NR=1;PP=100.0;SC=GGGAATATAGTTGTGTGTGTG;TC=26;TR=3	GT:GL:GQ	0/1:-141.31,-92.22,-156.97:100
-20	4403198	.	CGT	CGTGT,C	.	PASS	FR=0.5,0.5;HP=2;NF=3,3;NR=2,0;PP=100.0,91.0;SC=TGTGTGTGTGCGTGTGTGTGT;TC=16;TR=5,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	4418283	.	TCC	T	.	PASS	FR=1.0;HP=5;NF=9;NR=17;PP=100.0;SC=TGAAAAATGCTCCCCAGGTTT;TC=26;TR=26	GT:GL:GQ	1/1:-235.22,-17.92,0.0:100
-20	4422138	.	A	AAGAGGCAAGGCTTCCCCACATGCTCAGAATGG,G	.	PASS	FR=0.5,0.5;HP=1;NF=2,3;NR=0,5;PP=100.0,87.0;SC=CTACAGAAAGATGATGGAGGT;TC=14;TR=2,8	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:23
-20	4422142	.	T	TG	.	PASS	FR=1.0;HP=2;NF=8;NR=6;PP=100.0;SC=AGAAAGATGATGGAGGTACTA;TC=19;TR=14	GT:GL:GQ	1/1:-319.37,-289.62,-286.77:23
-20	4427312	.	A	AGCTTCTAT	.	PASS	FR=0.5;HP=2;NF=1;NR=1;PP=100.0;SC=TGTATAATAGAGTCCAGAGTC;TC=11;TR=2	GT:GL:GQ	1/0:-513.43,-441.06,-437.62:42
-20	4431651	.	TA	T	.	PASS	FR=0.5;HP=5;NF=9;NR=13;PP=100.0;SC=TCTAGACCCTTAAAAATAACA;TC=34;TR=22	GT:GL:GQ	0/1:-196.04,-30.01,-107.67:100
-20	4438168	.	T	TTACACAAATGTAACCTATGTAACAA	.	PASS	FR=0.5;HP=1;NF=2;NR=3;PP=100.0;SC=CCTGCACATGTACCCTTGAAC;TC=16;TR=5	GT:GL:GQ	0/1:-418.07,-256.53,-367.22:100
-20	4439599	.	GT	G	.	PASS	FR=0.5;HP=2;NF=11;NR=12;PP=100.0;SC=TGTGGGGAGAGTTAGCAAGAG;TC=36;TR=23	GT:GL:GQ	0/1:-329.81,-228.22,-300.4:100
-20	4442338	.	CTTTATTTTATTTTAT	CTTTATTTTAT,C	.	PASS	FR=0.5,0.5;HP=3;NF=2,1;NR=0,3;PP=100.0,100.0;SC=AAGTATCTAACTTTATTTTAT;TC=21;TR=2,4	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	4445547	.	T	TAA	.	PASS	FR=1.0;HP=1;NF=18;NR=22;PP=100.0;SC=TGTTTCCAGTTGTTATACTTT;TC=39;TR=40	GT:GL:GQ	1/1:-459.22,-244.89,-221.84:100
-20	4452980	.	TACAC	T	.	PASS	FR=1.0;HP=2;NF=1;NR=2;PP=100.0;SC=TTAATTCTTATACACACACAC;TC=21;TR=3	GT:GL:GQ	1/1:-75.87,-32.41,-30.31:43
-20	4460649	.	G	GA	.	PASS	FR=0.5;HP=9;NF=5;NR=8;PP=100.0;SC=TTTCCTCGGAGAAAAAAAACA;TC=39;TR=13	GT:GL:GQ	0/1:-191.57,-119.31,-159.65:100
-20	4462152	.	GGTCAATGTTATAAACTTTGC	G	.	PASS	FR=0.5;HP=2;NF=6;NR=5;PP=100.0;SC=CTACTTCTTGGGTCAATGTTA;TC=18;TR=11	GT:GL:GQ	1/0:-501.72,-174.1,-171.31:67
-20	4462516	.	T	TTC	.	PASS	FR=0.5;HP=1;NF=16;NR=1;PP=100.0;SC=GGGTTTAAAGTTCTCTAATGA;TC=41;TR=17	GT:GL:GQ	0/1:-181.56,-38.08,-223.18:100
-20	4462799	.	C	CTT	.	PASS	FR=0.5;HP=1;NF=1;NR=1;PP=100.0;SC=TCTTCTTCGTCCTTTTTTTTT;TC=36;TR=2	GT:GL:GQ	0/1:-520.7,-504.74,-499.84:81
-20	4465737	.	TG	T	.	PASS	FR=1.0;HP=2;NF=9;NR=18;PP=100.0;SC=CTCCTTGACATGGACTGAGAA;TC=27;TR=27	GT:GL:GQ	1/1:-258.03,-34.15,-15.14:100
-20	4468340	.	TA	T	.	PASS	FR=0.5;HP=10;NF=5;NR=2;PP=57.0;SC=ATATATATATTAAAAAAAAAA;TC=21;TR=7	GT:GL:GQ	0/1:-41.89,-18.73,-52.45:100
-20	4469569	.	C	CT	.	PASS	FR=0.5;HP=4;NF=3;NR=6;PP=100.0;SC=CAAGTAAAGACTTTTGATTGT;TC=23;TR=9	GT:GL:GQ	0/1:-113.7,-24.95,-84.55:100
-20	4474613	.	GA	G	.	PASS	FR=0.5;HP=8;NF=4;NR=6;PP=100.0;SC=ATTAGGAACAGAAAAAAATTA;TC=37;TR=10	GT:GL:GQ	0/1:-311.99,-245.02,-353.92:100
-20	4474629	.	A	AAAT	.	PASS	FR=0.5;HP=9;NF=11;NR=5;PP=100.0;SC=AATTAAAAAAAAAATATACAC;TC=32;TR=16	GT:GL:GQ	0/1:-322.36,-111.27,-187.62:100
-20	4475883	.	AT	A	.	PASS	FR=0.5;HP=5;NF=1;NR=3;PP=100.0;SC=AAATATATATATTTTAATATA;TC=14;TR=4	GT:GL:GQ	0/1:-74.26,-40.07,-92.44:100
-20	4481373	.	A	AG	.	PASS	FR=1.0;HP=1;NF=5;NR=6;PP=100.0;SC=TCTTTTTTCAAGTTTTTAGCT;TC=13;TR=11	GT:GL:GQ	1/1:-84.43,-9.42,-0.46:74
-20	4484587	.	T	TA	.	PASS	FR=0.5;HP=9;NF=4;NR=9;PP=100.0;SC=TCTCTGATTTTAAAAAAAAAG;TC=46;TR=13	GT:GL:GQ	0/1:-163.36,-92.55,-141.98:100
-20	4487527	.	TG	T	.	PASS	FR=0.5006;HP=5;NF=8;NR=7;PP=100.0;SC=TACTAGGGGCTGGGGGCAGGG;TC=34;TR=15	GT:GL:GQ	0/1:-421.09,-350.88,-356.92:29
-20	4492336	.	C	CA	.	PASS	FR=1.0;HP=1;NF=11;NR=14;PP=100.0;SC=ACATTCTTGCCACCTTTGGTA;TC=27;TR=25	GT:GL:GQ	1/1:-281.59,-90.33,-72.03:100
-20	4493592	.	C	CG	.	PASS	FR=1.0;HP=2;NF=20;NR=17;PP=100.0;SC=GCATTTTGGACATCTCACCCT;TC=39;TR=37	GT:GL:GQ	1/1:-454.89,-182.56,-157.87:100
-20	4497462	.	TTA	T	.	PASS	FR=0.5;HP=2;NF=2;NR=2;PP=88.0;SC=TAAATCAACTTTATATATATA;TC=14;TR=4	GT:GL:GQ	1/0:-149.41,-117.69,-112.45:46
-20	4500613	.	G	GC	.	PASS	FR=1.0;HP=2;NF=12;NR=13;PP=100.0;SC=ATGCCCAAGGGTGTCCCAGAG;TC=29;TR=25	GT:GL:GQ	1/1:-293.02,-49.83,-29.64:100
-20	4502874	.	CT	C	.	PASS	FR=1.0;HP=4;NF=11;NR=7;PP=100.0;SC=TACAGCCCTTCTTGGGAGCCC;TC=24;TR=18	GT:GL:GQ	1/1:-204.97,-36.44,-20.43:100
-20	4512447	.	AAAACAAAC	AAAAC,A	.	PASS	FR=0.5,0.5;HP=3;NF=3,4;NR=0,1;PP=100.0,100.0;SC=ACTCCATCTCAAAACAAACAA;TC=20;TR=3,5	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	4519983	.	GA	G	.	PASS	FR=0.5;HP=3;NF=7;NR=13;PP=100.0;SC=TCCAAACTAAGACAGGTATTA;TC=36;TR=20	GT:GL:GQ	0/1:-201.76,-27.24,-148.43:100
-20	4524299	.	AGTGTGT	A	.	PASS	FR=0.5;HP=3;NF=2;NR=1;PP=100.0;SC=TCTGTGCTTTAGTGTGTGTGT;TC=28;TR=3	GT:GL:GQ	0/1:-144.55,-75.64,-138.78:100
-20	4530940	.	CTT	C	.	PASS	FR=0.5002;HP=6;NF=2;NR=9;PP=80.0;SC=TTCTTTCTTTCTTTCTCTCTC;TC=25;TR=11	GT:GL:GQ	0/1:-323.77,-294.9,-301.87:33
-20	4541935	.	A	AGAG	.	PASS	FR=0.5;HP=2;NF=8;NR=4;PP=100.0;SC=GTGGCAGATTAGAGGAGACAT;TC=32;TR=12	GT:GL:GQ	0/1:-211.5,-48.19,-198.54:100
-20	4547067	.	G	GA	.	PASS	FR=0.5116;HP=10;NF=5;NR=1;PP=100.0;SC=TATAGAGAGAGAAAAAAAAAC;TC=18;TR=6	GT:GL:GQ	0/1:-156.12,-119.31,-122.4:16
-20	4553580	.	GT	G	.	PASS	FR=0.5;HP=10;NF=1;NR=1;PP=71.0;SC=TTTTGTTTTTGTTTTTGTTTT;TC=17;TR=2	GT:GL:GQ	1/0:-197.42,-152.57,-154.01:100
-20	4553925	.	T	TC	.	PASS	FR=1.0;HP=1;NF=7;NR=5;PP=100.0;SC=CGGCCCCTCTTCACTTTTAAG;TC=16;TR=12	GT:GL:GQ	1/1:-135.25,-18.29,-7.82:87
-20	4560578	.	C	CCTTA	.	PASS	FR=1.0;HP=1;NF=11;NR=12;PP=100.0;SC=ATGTTATATACCTTTTAGAGA;TC=32;TR=23	GT:GL:GQ	1/1:-416.23,-42.65,-19.11:100
-20	4566007	.	G	GC	.	PASS	FR=0.5;HP=1;NF=9;NR=3;PP=100.0;SC=AGCTGGGGCTGACTCATCTGA;TC=27;TR=12	GT:GL:GQ	0/1:-150.18,-87.47,-213.89:100
-20	4572622	.	T	TA	.	PASS	FR=0.5;HP=1;NF=5;NR=4;PP=100.0;SC=AAAGGGGTGCTAGGAATTCCA;TC=21;TR=9	GT:GL:GQ	0/1:-105.47,-33.77,-107.56:100
-20	4580659	.	ATTG	A	.	PASS	FR=0.5;HP=3;NF=9;NR=11;PP=100.0;SC=AATAATTTATATTGTTATTAT;TC=41;TR=20	GT:GL:GQ	0/1:-343.69,-136.17,-313.1:100
-20	4580822	.	AAC	A	.	PASS	FR=0.5;HP=1;NF=7;NR=7;PP=100.0;SC=TATCTTACATAACAGTGTATC;TC=27;TR=14	GT:GL:GQ	0/1:-159.59,-31.47,-183.78:100
-20	4589159	.	TAC	T	.	PASS	FR=0.5;HP=1;NF=5;NR=5;PP=100.0;SC=CACACACACGTACACACACAC;TC=25;TR=10	GT:GL:GQ	0/1:-134.67,-33.29,-88.29:100
-20	4590266	.	T	TCTGGCC	.	PASS	FR=0.5;HP=3;NF=3;NR=4;PP=100.0;SC=GCTGGCAGCCTCTGGCCCTGG;TC=20;TR=7	GT:GL:GQ	0/1:-180.62,-56.12,-103.3:100
-20	4613873	.	T	TATA	.	PASS	FR=0.5;HP=3;NF=6;NR=2;PP=100.0;SC=CTCTTTCTTTTATAATAATAA;TC=26;TR=8	GT:GL:GQ	0/1:-121.23,-16.51,-65.45:100
-20	4616453	.	G	GAGTAGA	.	PASS	FR=0.5;HP=3;NF=5;NR=7;PP=100.0;SC=CACAGAGTAGGGGTTCAATAA;TC=22;TR=12	GT:GL:GQ	0/1:-211.56,-25.38,-113.94:100
-20	4617264	.	G	GAGAA	.	PASS	FR=0.5;HP=2;NF=3;NR=1;PP=100.0;SC=GAAAGCAAGAGAGAAAGAAGA;TC=22;TR=4	GT:GL:GQ	0/1:-126.22,-46.88,-138.67:100
-20	4617272	.	AG	A	.	PASS	FR=0.5;HP=1;NF=1;NR=3;PP=20.0;SC=GAGAGAAAGAAGAGAAGAGAA;TC=22;TR=4	GT:GL:GQ	0/1:-134.04,-119.35,-223.11:66
-20	4617303	.	G	GAGGA	.	PASS	FR=0.5;HP=2;NF=2;NR=3;PP=100.0;SC=GGGAGGGAGAGAGGAAGGAAG;TC=19;TR=5	GT:GL:GQ	0/1:-154.78,-90.63,-135.29:100
-20	4655424	.	G	GA	.	PASS	FR=0.5;HP=8;NF=13;NR=4;PP=100.0;SC=GTTCTTTAGAGAAAAAAAGAT;TC=30;TR=17	GT:GL:GQ	0/1:-186.33,-114.25,-152.75:100
-20	4668235	.	AT	A	.	PASS	FR=0.5;HP=10;NF=12;NR=5;PP=100.0;SC=TAGGAAATAGATTTTTTTTTT;TC=33;TR=17	GT:GL:GQ	0/1:-91.71,-31.87,-60.05:100
-20	4673330	.	C	CTTT	.	PASS	FR=0.5;HP=5;NF=6;NR=8;PP=100.0;SC=TGAAGAAAATCTTTTCTTCCT;TC=24;TR=14	GT:GL:GQ	0/1:-183.35,-23.94,-71.42:100
-20	4684173	.	TG	T	.	PASS	FR=0.5;HP=1;NF=5;NR=1;PP=100.0;SC=CAGGCACAGTTGCTCACGCCT;TC=17;TR=6	GT:GL:GQ	0/1:-81.87,-25.35,-94.89:100
-20	4691383	.	CA	C	.	PASS	FR=1.0;HP=2;NF=14;NR=12;PP=100.0;SC=TGGGGTCATCCAAGCATGGCT;TC=29;TR=26	GT:GL:GQ	1/1:-259.65,-39.57,-19.54:100
-20	4692075	.	C	CA	.	PASS	FR=0.5;HP=9;NF=5;NR=3;PP=95.0;SC=AGTAATTGGACAAAAAAAACA;TC=26;TR=8	GT:GL:GQ	0/1:-67.83,-34.9,-96.78:100
-20	4704696	.	A	ATG	.	PASS	FR=0.5;HP=2;NF=5;NR=3;PP=100.0;SC=ATATGTATATATGTGTGTGTA;TC=30;TR=8	GT:GL:GQ	0/1:-168.25,-105.64,-257.19:100
-20	4706654	.	GTGCCATCA	G	.	PASS	FR=1.0;HP=2;NF=7;NR=4;PP=100.0;SC=TTACAGGTGTGTGCCATCATG;TC=17;TR=11	GT:GL:GQ	1/1:-236.92,-30.58,-21.39:67
-20	4727159	.	C	CATTTTATTTT	.	PASS	FR=1.0;HP=1;NF=2;NR=4;PP=100.0;SC=ATAGCATTTGCATTTTATTTT;TC=27;TR=6	GT:GL:GQ	1/1:-510.26,-402.24,-397.15:63
-20	4735780	.	T	TTTCTTTCTTTCTTTCTTTCTTTCTTTC,C	.	PASS	FR=0.5,0.5;HP=3;NF=0,5;NR=3,16;PP=100.0,100.0;SC=CCTTTCTTTCTTTTCTTTCTT;TC=27;TR=3,21	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	4737530	.	T	TA	.	PASS	FR=1.0;HP=1;NF=11;NR=14;PP=100.0;SC=TTAAATGTATTGAGGCTCATT;TC=26;TR=25	GT:GL:GQ	1/1:-245.38,-21.97,-3.97:100
-20	4737701	.	T	TTGA	.	PASS	FR=1.0;HP=1;NF=12;NR=7;PP=100.0;SC=ACTTTCTGTCTTGACCTGTCT;TC=19;TR=19	GT:GL:GQ	1/1:-227.02,-18.69,-5.52:100
-20	4741155	.	G	GGA	.	PASS	FR=1.0;HP=1;NF=5;NR=11;PP=100.0;SC=AACACACCAGGTGTGTCAAAA;TC=22;TR=16	GT:GL:GQ	1/1:-218.41,-31.08,-15.98:100
-20	4743693	.	G	GTTAA	.	PASS	FR=1.0;HP=2;NF=6;NR=7;PP=100.0;SC=AGCCCAGGAGGTTAAGTCTGC;TC=16;TR=13	GT:GL:GQ	1/1:-225.23,-59.89,-50.88:75
-20	4743774	.	A	AAAATAAAT	.	PASS	FR=1.0;HP=5;NF=4;NR=3;PP=100.0;SC=AAAAGGAGAAAAAATAAATAA;TC=16;TR=7	GT:GL:GQ	1/1:-319.93,-209.77,-203.54:78
-20	4748739	.	A	ACTAT	.	PASS	FR=1.0;HP=1;NF=12;NR=7;PP=100.0;SC=TCTTTCACCAACTATTTTCAC;TC=23;TR=19	GT:GL:GQ	1/1:-501.66,-334.66,-319.16:100
-20	4761877	.	T	TG	.	PASS	FR=0.5;HP=8;NF=1;NR=4;PP=100.0;SC=ACAGATATTTTGGGGGGGGCA;TC=23;TR=5	GT:GL:GQ	0/1:-97.23,-58.4,-90.76:100
-20	4768475	.	A	AAGGGACT	.	PASS	FR=1.0;HP=2;NF=7;NR=8;PP=100.0;SC=CAGGGGTCCAAAGGCACCTTA;TC=23;TR=15	GT:GL:GQ	1/1:-372.13,-36.56,-17.94:100
-20	4783543	.	CATAT	C	.	PASS	FR=0.5;HP=2;NF=1;NR=2;PP=100.0;SC=TATATATATACATATATATAT;TC=23;TR=3	GT:GL:GQ	0/1:-115.71,-29.18,-62.14:100
-20	4794428	.	CGT	C	.	PASS	FR=0.5;HP=3;NF=3;NR=2;PP=100.0;SC=CAGTGTGTGGCGTGTGTGTGT;TC=28;TR=5	GT:GL:GQ	0/1:-119.46,-68.74,-106.78:100
-20	4796034	.	TACC	T	.	PASS	FR=0.5;HP=1;NF=7;NR=5;PP=100.0;SC=TATCTGAGGCTACCACCACCC;TC=27;TR=12	GT:GL:GQ	0/1:-222.6,-98.55,-189.77:100
-20	4802486	.	G	GCC	.	PASS	FR=0.5;HP=2;NF=5;NR=4;PP=100.0;SC=GACTGCCACAGCCTAGGCATC;TC=24;TR=9	GT:GL:GQ	0/1:-135.36,-38.11,-126.44:100
-20	4803072	.	CT	C	.	PASS	FR=0.5;HP=1;NF=1;NR=5;PP=100.0;SC=GTGCACGCAGCTGTTGAGAGG;TC=15;TR=6	GT:GL:GQ	0/1:-82.81,-37.85,-91.55:100
-20	4823348	.	AT	A	.	PASS	FR=1.0;HP=8;NF=17;NR=7;PP=100.0;SC=AATATTTTCCATTTTTTTTGA;TC=32;TR=24	GT:GL:GQ	1/1:-298.64,-180.3,-160.97:100
-20	4850186	.	GAC	G	.	PASS	FR=0.5;HP=1;NF=3;NR=2;PP=49.0;SC=ATCTCCAAATGACACACACAC;TC=34;TR=5	GT:GL:GQ	0/1:-186.75,-165.14,-349.63:96
-20	4880132	.	AGCTCAATGCCTTCTGC	A	.	PASS	FR=1.0;HP=1;NF=3;NR=4;PP=100.0;SC=CAAACGGCGCAGCTCAATGCC;TC=17;TR=7	GT:GL:GQ	1/1:-255.52,-55.88,-53.61:44
-20	4883735	.	G	GGA	.	PASS	FR=1.0;HP=1;NF=13;NR=18;PP=100.0;SC=GGTGAAAAGAGTAATTCTAAA;TC=34;TR=31	GT:GL:GQ	1/1:-361.9,-346.05,-342.67:97
-20	4886527	.	GA	G	.	PASS	FR=0.5;HP=3;NF=5;NR=6;PP=100.0;SC=ACTCTACTGAGAAGAACAGAT;TC=19;TR=11	GT:GL:GQ	0/1:-166.67,-86.72,-123.24:100
-20	4892485	.	AATTT	A	.	PASS	FR=0.5;HP=1;NF=2;NR=7;PP=100.0;SC=TTTATTTATGAATTTATTTAT;TC=34;TR=9	GT:GL:GQ	0/1:-148.07,-23.75,-121.86:100
-20	4922648	.	CTAAACTAACT	C	.	PASS	FR=0.5;HP=5;NF=1;NR=10;PP=100.0;SC=TCTATATTTTCTAAACTAACT;TC=33;TR=11	GT:GL:GQ	0/1:-284.06,-37.14,-228.78:100
-20	4942899	.	C	CA	.	PASS	FR=0.5;HP=7;NF=4;NR=3;PP=100.0;SC=ACCCCCGCCCCAAAAAAACAG;TC=28;TR=7	GT:GL:GQ	0/1:-99.42,-46.78,-95.55:100
-20	4947451	.	G	GTTTGA	.	PASS	FR=0.5;HP=4;NF=4;NR=4;PP=100.0;SC=ACTTTTGATAGTTTTACACAC;TC=18;TR=8	GT:GL:GQ	0/1:-283.81,-185.62,-217.52:100
-20	4947582	.	TG	T	.	PASS	FR=0.5;HP=4;NF=9;NR=4;PP=100.0;SC=GATTACATGATGGGGAGCAGG;TC=22;TR=13	GT:GL:GQ	0/1:-139.84,-55.72,-119.49:100
-20	4947775	.	T	TA	.	PASS	FR=0.5;HP=6;NF=8;NR=4;PP=100.0;SC=GAAATCTAAATAAACACAGGG;TC=24;TR=12	GT:GL:GQ	0/1:-128.76,-21.0,-91.02:100
-20	4949766	.	CTT	C	.	PASS	FR=0.5;HP=3;NF=8;NR=4;PP=100.0;SC=GAGTTTCCCTCTTGTTACCCA;TC=25;TR=12	GT:GL:GQ	0/1:-147.72,-32.95,-112.56:100
-20	4954109	.	G	GGACTT	.	PASS	FR=0.5;HP=2;NF=4;NR=8;PP=100.0;SC=ATGGCTGGAAGGACTTAACTA;TC=30;TR=12	GT:GL:GQ	0/1:-203.74,-23.32,-169.48:100
-20	4965192	.	C	CT	.	PASS	FR=0.5;HP=2;NF=5;NR=3;PP=100.0;SC=GAGCAAGACTCTGTCTCAAAA;TC=26;TR=8	GT:GL:GQ	0/1:-134.47,-59.87,-111.38:100
-20	4969015	.	AG	A	.	PASS	FR=1.0;HP=8;NF=4;NR=5;PP=100.0;SC=TGGGAAACCGAGGGGGGGCCA;TC=12;TR=9	GT:GL:GQ	1/1:-67.79,-12.99,-5.52:61
-20	4970270	.	C	CTTAATAT	.	PASS	FR=0.5;HP=1;NF=4;NR=1;PP=100.0;SC=TGCAGTGAGCCATGATCTTGC;TC=22;TR=5	GT:GL:GQ	0/1:-247.44,-164.56,-281.24:100
-20	4972366	.	TCA	TCACACA,T	.	PASS	FR=0.5,0.5;HP=2;NF=1,0;NR=1,2;PP=100.0,49.0;SC=AGACTCCGTTTCACACACACA;TC=15;TR=2,2	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:97
-20	4979252	.	ATGAGG	A	.	PASS	FR=0.5;HP=1;NF=5;NR=2;PP=100.0;SC=AAATGAATTAATGAGGTGAGG;TC=24;TR=7	GT:GL:GQ	0/1:-146.48,-63.04,-172.38:100
-20	4985646	.	A	AAAAT	.	PASS	FR=0.5;HP=4;NF=2;NR=1;PP=100.0;SC=CTCCGTCTCAAAAATAAATAA;TC=22;TR=3	GT:GL:GQ	0/1:-69.57,-20.73,-73.7:100
-20	4987193	.	T	TTTTA	.	PASS	FR=1.0;HP=3;NF=5;NR=7;PP=100.0;SC=GTAAAAGCCATTTTATTTATT;TC=33;TR=12	GT:GL:GQ	1/1:-198.93,-19.38,-8.29:93
-20	5003823	.	C	CA	.	PASS	FR=1.0;HP=2;NF=2;NR=1;PP=69.0;SC=CTCAGCCTCCCAGTAGCTGGG;TC=5;TR=3	GT:GL:GQ	1/1:-35.46,-12.52,-9.15:55
-20	5006924	.	GTATATATATGTGTA	G	.	PASS	FR=0.5;HP=2;NF=3;NR=1;PP=100.0;SC=ATGTATATATGTATATATATG;TC=17;TR=4	GT:GL:GQ	0/1:-102.23,-17.74,-69.04:100
-20	5019857	.	C	CT	.	PASS	FR=1.0;HP=1;NF=5;NR=1;PP=100.0;SC=CACCCCTGCACTCCAGCCTGG;TC=10;TR=6	GT:GL:GQ	1/1:-78.84,-38.79,-34.59:51
-20	5021323	.	T	TC	.	PASS	FR=1.0;HP=10;NF=8;NR=5;PP=100.0;SC=CTTTTTTTTTTTCAATGGCAA;TC=18;TR=13	GT:GL:GQ	1/1:-164.3,-19.64,-6.44:82
-20	5021471	.	G	GA	.	PASS	FR=1.0;HP=1;NF=11;NR=14;PP=100.0;SC=ACATAATGCTGGTTAAAGAGG;TC=33;TR=25	GT:GL:GQ	1/1:-406.51,-306.39,-293.23:100
-20	5033824	.	G	GTATA	.	PASS	FR=1.0;HP=8;NF=6;NR=6;PP=100.0;SC=CCAAAAAAAAGTATATATATA;TC=19;TR=12	GT:GL:GQ	1/1:-293.31,-92.78,-80.65:100
-20	5034013	.	GGCAT	G	.	PASS	FR=1.0;HP=1;NF=8;NR=10;PP=100.0;SC=ATGACAGCCAGGCATGGGGGC;TC=24;TR=18	GT:GL:GQ	1/1:-275.61,-34.13,-17.26:100
-20	5044461	.	A	AAATTTTTAT	.	PASS	FR=1.0;HP=4;NF=13;NR=12;PP=100.0;SC=GTTAACTTGGAAAAATTTCTA;TC=29;TR=25	GT:GL:GQ	1/1:-660.59,-158.53,-137.22:100
-20	5058110	.	G	GGGGGCT	.	PASS	FR=1.0;HP=2;NF=6;NR=6;PP=100.0;SC=CAACATTTTGGGAGGTGGGTG;TC=14;TR=12	GT:GL:GQ	1/1:-206.1,-87.92,-82.33:69
-20	5062840	.	AAAG	A	.	PASS	FR=1.0;HP=4;NF=12;NR=4;PP=100.0;SC=AATTTTTTAAAAAGAAGAAGA;TC=21;TR=16	GT:GL:GQ	1/1:-217.23,-55.74,-43.97:99
-20	5079870	.	AAATAAATAAATCAATC	A	.	PASS	FR=0.5;HP=2;NF=4;NR=6;PP=100.0;SC=ATAAATAAATAAATAAATAAA;TC=24;TR=10	GT:GL:GQ	1/0:-419.18,-202.82,-208.38:27
-20	5094493	.	T	TA	.	PASS	FR=1.0;HP=1;NF=7;NR=16;PP=100.0;SC=AAAATGAACTTACTACTGGAC;TC=26;TR=23	GT:GL:GQ	1/1:-300.98,-148.38,-131.87:100
-20	5097837	.	AC	A	.	PASS	FR=1.0;HP=1;NF=15;NR=5;PP=100.0;SC=TAAAGGTTATACGCCTAACTT;TC=25;TR=20	GT:GL:GQ	1/1:-243.65,-32.97,-15.65:100
-20	5100990	.	AAG	A	.	PASS	FR=1.0;HP=1;NF=10;NR=6;PP=100.0;SC=TTGCAGCCTGAAGAGAGTACA;TC=18;TR=16	GT:GL:GQ	1/1:-198.64,-18.46,-5.29:100
-20	5105482	.	C	CATTTTAGG	.	PASS	FR=1.0;HP=2;NF=6;NR=11;PP=100.0;SC=GTTCAGACCACATGTTATCCA;TC=22;TR=17	GT:GL:GQ	1/1:-471.45,-181.5,-164.38:100
-20	5118209	.	A	AT	.	PASS	FR=0.5;HP=8;NF=3;NR=2;PP=100.0;SC=TTTAAGTCTTATTTTTTCAAA;TC=16;TR=5	GT:GL:GQ	0/1:-55.51,-21.15,-68.35:100
-20	5145860	.	A	AC	.	PASS	FR=0.5;HP=5;NF=6;NR=2;PP=100.0;SC=TTTTTTGGAAACCCCCGTATT;TC=29;TR=8	GT:GL:GQ	0/1:-81.29,-28.9,-130.37:100
-20	5150896	.	G	GC	.	PASS	FR=0.5;HP=3;NF=2;NR=5;PP=100.0;SC=ACCTCGCTGTGCCCAGAGGAG;TC=17;TR=7	GT:GL:GQ	0/1:-79.22,-17.13,-53.13:100
-20	5156258	.	CCT	C	.	PASS	FR=0.5093;HP=2;NF=6;NR=6;PP=100.0;SC=ATGGTGAAACCCTGTCTCTAC;TC=16;TR=12	GT:GL:GQ	0/1:-101.9,-26.13,-29.44:17
-20	5156432	.	AAAAC	A	.	PASS	FR=0.5;HP=3;NF=5;NR=3;PP=100.0;SC=ACTCCATCTCAAAACAAACAA;TC=23;TR=8	GT:GL:GQ	0/1:-98.71,-15.69,-97.38:100
-20	5173014	.	C	CA	.	PASS	FR=1.0;HP=2;NF=8;NR=13;PP=100.0;SC=GAAGGGGGGTCTAGGAAGCCG;TC=22;TR=21	GT:GL:GQ	1/1:-250.84,-61.97,-47.15:100
-20	5178081	.	C	CCT	.	PASS	FR=0.5;HP=1;NF=5;NR=6;PP=100.0;SC=AGAGGTCAGCCGTGTCTGCCC;TC=22;TR=11	GT:GL:GQ	0/1:-193.35,-72.27,-102.13:100
-20	5181165	.	C	CA	.	PASS	FR=0.5;HP=8;NF=1;NR=6;PP=91.0;SC=TTAGACACAACAAAAAAGAGA;TC=22;TR=7	GT:GL:GQ	0/1:-61.45,-29.38,-90.08:100
-20	5187401	.	A	AC	.	PASS	FR=0.5;HP=6;NF=4;NR=3;PP=100.0;SC=TTTTCATGTCACCCCCGAGGT;TC=17;TR=7	GT:GL:GQ	0/1:-139.03,-104.99,-121.15:73
-20	5187831	.	G	GAATC	.	PASS	FR=0.5;HP=5;NF=5;NR=3;PP=100.0;SC=TGAAAGGAAAGAAGCATGTTT;TC=22;TR=8	GT:GL:GQ	0/1:-144.73,-26.29,-132.63:100
-20	5192127	.	A	AATT	.	PASS	FR=0.5;HP=3;NF=2;NR=7;PP=100.0;SC=AATGTGTTAAAATTATATAAG;TC=32;TR=9	GT:GL:GQ	0/1:-228.5,-119.37,-283.27:100
-20	5212592	.	TA	T	.	PASS	FR=1.0;HP=9;NF=20;NR=10;PP=100.0;SC=CCTGCCATATTAAAAAAAAAC;TC=39;TR=30	GT:GL:GQ	1/1:-191.03,-64.37,-41.93:100
-20	5223122	.	TA	T	.	PASS	FR=0.5;HP=2;NF=2;NR=4;PP=100.0;SC=GAATAAGACCTAGTATTTGCT;TC=11;TR=6	GT:GL:GQ	0/1:-63.8,-25.4,-69.29:100
-20	5234499	.	AAC	A	.	PASS	FR=0.5;HP=1;NF=1;NR=1;PP=25.0;SC=GTGCCTTCACAACACACACAC;TC=26;TR=2	GT:GL:GQ	0/1:-75.14,-59.09,-216.84:72
-20	5236854	.	A	AATTAT	.	PASS	FR=1.0;HP=1;NF=17;NR=9;PP=100.0;SC=AAAAGACATGAATTATCATTA;TC=29;TR=26	GT:GL:GQ	1/1:-427.74,-26.55,-5.07:100
-20	5240296	.	CT	C	.	PASS	FR=0.5;HP=1;NF=7;NR=6;PP=100.0;SC=AATTGATACACTACAATGGCC;TC=39;TR=13	GT:GL:GQ	0/1:-220.75,-129.27,-297.86:100
-20	5242946	.	A	AC	.	PASS	FR=0.5;HP=3;NF=6;NR=5;PP=100.0;SC=AGCTGGAACCACTGTTGTGGA;TC=22;TR=11	GT:GL:GQ	0/1:-141.29,-37.29,-109.65:100
-20	5246342	.	GC	G	.	PASS	FR=0.5;HP=7;NF=6;NR=8;PP=100.0;SC=AACCGAGACAGCCCCCCCTTT;TC=21;TR=14	GT:GL:GQ	0/1:-107.74,-25.34,-35.96:49
-20	5247531	.	T	TTGCAGTAGAGAAACTCCC	.	PASS	FR=0.5;HP=1;NF=3;NR=5;PP=100.0;SC=TTGCAGGTTATTGCAGTAGAG;TC=31;TR=8	GT:GL:GQ	0/1:-296.8,-101.13,-189.63:100
-20	5251109	.	ACTCTCTCTCTCTCTCTCT	A	.	PASS	FR=0.5;HP=1;NF=3;NR=2;PP=37.0;SC=CATCCAGTGTACTCTCTCTCT;TC=27;TR=5	GT:GL:GQ	0/1:-322.05,-299.54,-356.33:100
-20	5251154	.	G	GTGTA	.	PASS	FR=0.5;HP=2;NF=1;NR=4;PP=100.0;SC=CTCTGTGTGTGTGTATGTGTG;TC=19;TR=5	GT:GL:GQ	0/1:-297.98,-257.24,-280.47:100
-20	5256228	.	GAAAAAC	G	.	PASS	FR=0.5;HP=5;NF=8;NR=3;PP=100.0;SC=CAAATGTTTTGAAAAACAAAA;TC=29;TR=11	GT:GL:GQ	0/1:-159.47,-21.9,-134.38:100
-20	5256836	.	CT	C	.	PASS	FR=0.5;HP=10;NF=4;NR=7;PP=58.0;SC=TCTCAACTCACTTTTTTTTTT;TC=23;TR=11	GT:GL:GQ	0/1:-145.3,-121.72,-154.45:100
-20	5260631	.	G	GA	.	PASS	FR=0.5;HP=9;NF=6;NR=2;PP=100.0;SC=TTTAATGAAGGAAAAAAAAAT;TC=25;TR=8	GT:GL:GQ	0/1:-133.97,-86.93,-109.55:100
-20	5261161	.	ACT	A	.	PASS	FR=0.5;HP=2;NF=9;NR=8;PP=100.0;SC=CTTGAATGAAACTTATCTAAC;TC=33;TR=17	GT:GL:GQ	0/1:-246.04,-189.54,-319.81:100
-20	5275657	.	CAAAATAACTATTACAAATAACA	C	.	PASS	FR=0.5;HP=6;NF=2;NR=1;PP=100.0;SC=TCAAACATAACAAAATAACTA;TC=27;TR=3	GT:GL:GQ	0/1:-135.83,-52.75,-276.31:100
-20	5277471	.	C	CCTT	.	PASS	FR=0.5;HP=1;NF=11;NR=5;PP=100.0;SC=GTATCCATGTCCTAGGGTACA;TC=27;TR=16	GT:GL:GQ	0/1:-278.16,-87.4,-130.16:100
-20	5278336	.	TA	T	.	PASS	FR=0.5;HP=4;NF=3;NR=6;PP=100.0;SC=TTGAACTCTTTAAAAGTTTGA;TC=24;TR=9	GT:GL:GQ	0/1:-132.29,-83.79,-178.99:100
-20	5280465	.	TTG	T	.	PASS	FR=0.5;HP=4;NF=6;NR=8;PP=100.0;SC=GATGGGGTTTTTGGCCATGTT;TC=30;TR=14	GT:GL:GQ	0/1:-161.14,-49.68,-168.09:100
-20	5280839	.	T	TATA	.	PASS	FR=0.5;HP=1;NF=9;NR=3;PP=100.0;SC=ACCACAAATGTATAATACAAA;TC=30;TR=12	GT:GL:GQ	0/1:-228.47,-89.38,-201.59:100
-20	5285786	.	T	TG	.	PASS	FR=0.5;HP=1;NF=3;NR=2;PP=21.0;SC=GGCTAATCAGTTCACTCTAAG;TC=24;TR=5	GT:GL:GQ	0/1:-80.46,-64.62,-184.45:71
-20	5289619	.	GA	G	.	PASS	FR=0.5;HP=1;NF=9;NR=5;PP=100.0;SC=GAAGATCTAGGATGAAGCTGG;TC=22;TR=14	GT:GL:GQ	0/1:-219.59,-148.82,-190.02:100
-20	5291220	.	TGATCA	T	.	PASS	FR=0.5;HP=2;NF=6;NR=6;PP=100.0;SC=GTTTAGAACCTGATCAGAGAA;TC=27;TR=12	GT:GL:GQ	0/1:-284.71,-179.16,-294.64:100
-20	5291304	.	G	GACTTATGGGGAGCTGGGGTATAAATACCCCAGCTCCCTCCT	.	PASS	FR=0.5;HP=1;NF=1;NR=1;PP=100.0;SC=CCTCATCAATGACCTCCCACC;TC=8;TR=2	GT:GL:GQ	0/1:-488.84,-441.13,-506.41:71
-20	5293792	.	ATG	A	.	PASS	FR=0.5;HP=3;NF=6;NR=12;PP=100.0;SC=TACAATTATTATGTGTCAATT;TC=42;TR=18	GT:GL:GQ	0/1:-201.09,-30.39,-231.82:100
-20	5303337	.	CAGCT	C	.	PASS	FR=0.5;HP=2;NF=7;NR=7;PP=100.0;SC=AAATGTCACACAGCTAGCTGG;TC=32;TR=14	GT:GL:GQ	0/1:-273.85,-111.21,-258.62:100
-20	5313928	.	TA	T	.	PASS	FR=0.5;HP=10;NF=9;NR=8;PP=100.0;SC=ATACAGTTGATAAAAAAAAAC;TC=39;TR=17	GT:GL:GQ	0/1:-100.8,-36.94,-107.23:100
-20	5316589	.	GT	G	.	PASS	FR=1.0;HP=2;NF=7;NR=11;PP=100.0;SC=GAATATCTGGGTAAAATTTAA;TC=22;TR=18	GT:GL:GQ	1/1:-227.4,-66.98,-52.55:100
-20	5320851	.	AT	A	.	PASS	FR=0.5;HP=6;NF=5;NR=10;PP=100.0;SC=ATCTCAATAGATTTTTTAAAA;TC=39;TR=15	GT:GL:GQ	0/1:-177.77,-103.88,-250.39:100
-20	5323468	.	GA	G	.	PASS	FR=0.5;HP=10;NF=2;NR=4;PP=85.0;SC=GGCAACAAAAGAAAAAATAGA;TC=23;TR=6	GT:GL:GQ	0/1:-61.27,-31.53,-121.44:100
-20	5326511	.	G	GT	.	PASS	FR=0.5;HP=9;NF=11;NR=2;PP=100.0;SC=TTGATTCAAAGTTTTTTTTTA;TC=29;TR=13	GT:GL:GQ	0/1:-178.07,-139.61,-153.82:64
-20	5326660	.	T	TA	.	PASS	FR=0.5;HP=8;NF=4;NR=6;PP=100.0;SC=CTTTATCCTTTAAAAAAAATC;TC=26;TR=10	GT:GL:GQ	0/1:-181.43,-128.15,-159.02:100
-20	5328799	.	CA	C	.	PASS	FR=1.0;HP=4;NF=10;NR=6;PP=100.0;SC=AACCACCTTCCAAAATGTGGA;TC=20;TR=16	GT:GL:GQ	1/1:-179.33,-21.23,-7.37:100
-20	5351875	.	T	TACACACAC	.	PASS	FR=0.5;HP=6;NF=1;NR=1;PP=38.0;SC=ATCTTAAAAATACACACACAC;TC=12;TR=2	GT:GL:GQ	0/1:-48.31,-20.86,-63.23:100
-20	5354510	.	G	GGC	.	PASS	FR=0.5;HP=1;NF=5;NR=5;PP=100.0;SC=CCTCCTCCCTGCAGAGCTCCT;TC=28;TR=10	GT:GL:GQ	0/1:-148.18,-38.3,-173.54:100
-20	5373349	.	A	AATTT	.	PASS	FR=0.5;HP=6;NF=1;NR=2;PP=96.0;SC=CTAATTTTTTAATTTTTTTTT;TC=20;TR=3	GT:GL:GQ	0/1:-100.6,-64.12,-96.6:100
-20	5390447	.	C	CA	.	PASS	FR=0.5;HP=6;NF=4;NR=5;PP=100.0;SC=CATTAGCATACAAAAACCATC;TC=26;TR=9	GT:GL:GQ	0/1:-88.65,-28.46,-120.44:100
-20	5408475	.	AAAAC	A	.	PASS	FR=0.5;HP=4;NF=4;NR=5;PP=100.0;SC=CTCTGTCTCAAAAACAAACAA;TC=29;TR=9	GT:GL:GQ	0/1:-128.94,-29.02,-144.52:100
-20	5410361	.	G	GA	.	PASS	FR=1.0;HP=9;NF=6;NR=7;PP=100.0;SC=CTGGGTTGGGGAAAAAAAAAG;TC=25;TR=13	GT:GL:GQ	1/1:-119.78,-34.18,-19.33:100
-20	5419440	.	CTCCCTGTG	C	.	PASS	FR=0.5;HP=3;NF=1;NR=4;PP=100.0;SC=TGTTGTTCCCCTCCCTGTGTC;TC=19;TR=5	GT:GL:GQ	0/1:-128.97,-30.52,-125.82:100
-20	5432204	.	A	AG	.	PASS	FR=0.5;HP=8;NF=2;NR=3;PP=100.0;SC=AAAGAAAGAGAAAAAAAAAGG;TC=19;TR=5	GT:GL:GQ	0/1:-83.51,-76.05,-116.49:100
-20	5432394	.	G	GT	.	PASS	FR=1.0;HP=5;NF=9;NR=14;PP=100.0;SC=TTCCTCAATTGAAAAATCTTA;TC=26;TR=23	GT:GL:GQ	1/1:-328.05,-211.91,-196.14:100
-20	5435136	.	GAGAAAA	G	.	PASS	FR=0.5;HP=3;NF=3;NR=6;PP=44.0;SC=AAAAAAAGGGGAGAAAAAGAA;TC=24;TR=9	GT:GL:GQ	0/1:-190.59,-169.15,-271.82:96
-20	5435153	.	A	ATTT	.	PASS	FR=0.5;HP=8;NF=4;NR=10;PP=100.0;SC=AGAAAAAAAAATTTTAATGTT;TC=22;TR=14	GT:GL:GQ	0/1:-325.96,-275.2,-333.88:100
-20	5435908	.	G	GTTAAT	.	PASS	FR=0.5;HP=2;NF=5;NR=2;PP=100.0;SC=ACCAGGCCCAGTTATTTTTTG;TC=16;TR=7	GT:GL:GQ	0/1:-176.12,-112.78,-176.63:100
-20	5443418	.	A	ACAGGGGCAC	.	PASS	FR=0.5;HP=4;NF=3;NR=1;PP=100.0;SC=GCTTTGTCCCACAGCCTGATG;TC=15;TR=4	GT:GL:GQ	0/1:-94.87,-42.4,-160.11:100
-20	5443724	.	C	CT	.	PASS	FR=0.5;HP=3;NF=6;NR=4;PP=38.0;SC=GTTACCTTTCCCCTGAGATGC;TC=20;TR=10	GT:GL:GQ	0/1:-163.73,-143.91,-199.73:89
-20	5452897	.	G	GA	.	PASS	FR=0.5;HP=10;NF=2;NR=2;PP=26.0;SC=TCAGTCAGAAGAAAAAAAATT;TC=15;TR=4	GT:GL:GQ	0/1:-34.37,-17.3,-53.75:77
-20	5460271	.	C	CA	.	PASS	FR=0.5;HP=10;NF=2;NR=2;PP=67.0;SC=ACCCCTGTCTCAAAAAAAAAA;TC=21;TR=4	GT:GL:GQ	0/1:-56.83,-30.33,-56.83:100
-20	5473577	.	A	AGT	.	PASS	FR=0.5;HP=2;NF=2;NR=8;PP=100.0;SC=AACTGAGCAGAGTTCCTTTTT;TC=29;TR=10	GT:GL:GQ	0/1:-165.26,-86.94,-217.65:100
-20	5475853	.	CTTATTTAT	CTTATTTATTTAT,C	.	PASS	FR=0.5,0.5;HP=4;NF=1,1;NR=2,2;PP=100.0,100.0;SC=GAAGGCTCTTCTTATTTATTT;TC=18;TR=3,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	5485434	.	C	CT	.	PASS	FR=0.5001;HP=10;NF=4;NR=1;PP=63.0;SC=TTTTTATCTTCTTTTTTTTCC;TC=9;TR=5	GT:GL:GQ	0/1:-37.99,-12.58,-20.26:36
-20	5518456	.	C	CG	.	PASS	FR=0.5;HP=7;NF=7;NR=6;PP=100.0;SC=GTGACAAATGCGGGGGGTCTT;TC=27;TR=13	GT:GL:GQ	0/1:-115.32,-28.55,-76.08:100
-20	5546352	.	A	AAG	.	PASS	FR=1.0;HP=1;NF=13;NR=12;PP=100.0;SC=AAGTAGTCACAAGCTGTGATT;TC=26;TR=25	GT:GL:GQ	1/1:-322.1,-20.79,0.0:100
-20	5596481	.	TTATG	T	.	PASS	FR=1.0;HP=2;NF=4;NR=4;PP=100.0;SC=TGCTACTGGTTTATGTATGTA;TC=20;TR=8	GT:GL:GQ	1/1:-167.17,-32.77,-22.47:86
-20	5596891	.	ATGTGTGTG	A	.	PASS	FR=1.0;HP=2;NF=3;NR=4;PP=100.0;SC=AATTTGGGGTATGTGTGTGTG;TC=23;TR=7	GT:GL:GQ	1/1:-241.36,-45.12,-34.38:90
-20	5600458	.	A	AG	.	PASS	FR=1.0;HP=2;NF=3;NR=3;PP=100.0;SC=TCTTGACCTGAGTGATACACC;TC=16;TR=6	GT:GL:GQ	1/1:-146.08,-65.05,-55.59:79
-20	5613790	.	GA	G	.	PASS	FR=1.0;HP=4;NF=11;NR=9;PP=100.0;SC=CATGATTTCTGAAAACAAGCT;TC=26;TR=20	GT:GL:GQ	1/1:-222.44,-43.9,-26.57:100
-20	5624959	.	C	CCTCCTTACCCT	.	PASS	FR=0.5;HP=1;NF=1;NR=1;PP=100.0;SC=AACTTGTCCACCTCCATTACC;TC=28;TR=2	GT:GL:GQ	0/1:-225.26,-176.16,-303.27:100
-20	5627592	.	AT	A	.	PASS	FR=0.5;HP=6;NF=4;NR=3;PP=100.0;SC=TCTCAAAAAAATAATAAAGTT;TC=19;TR=7	GT:GL:GQ	0/1:-112.89,-28.55,-78.51:100
-20	5629324	.	T	TTAC	.	PASS	FR=0.5;HP=1;NF=3;NR=3;PP=100.0;SC=ATTATTACTATTATTATTATT;TC=26;TR=6	GT:GL:GQ	1/0:-227.05,-75.82,-72.8:100
-20	5635153	.	TGGAATATGAAAGAG	T	.	PASS	FR=1.0;HP=2;NF=7;NR=11;PP=100.0;SC=CAAGCCTGTTTGGAATATGAA;TC=27;TR=18	GT:GL:GQ	1/1:-490.0,-56.65,-38.89:100
-20	5635246	.	T	TTGTGTG,TTGTGTGTG	.	PASS	FR=0.5,0.5;HP=1;NF=2,0;NR=2,3;PP=100.0,100.0;SC=AAAATGAATATTGTGTGTGTG;TC=22;TR=4,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	5644716	.	GTCTCTCTCTCTC	G	.	PASS	FR=1.0;HP=1;NF=1;NR=6;PP=100.0;SC=ATGAGACCTCGTCTCTCTCTC;TC=22;TR=7	GT:GL:GQ	1/1:-261.18,-61.24,-58.02:52
-20	5654462	.	C	CGTGTGTGTGTGTGT	.	PASS	FR=0.5;HP=1;NF=3;NR=1;PP=100.0;SC=TATACATATACGTGTGTGTGT;TC=16;TR=4	GT:GL:GQ	0/1:-129.11,-28.26,-136.2:100
-20	5654661	.	AAAAAAATTTTTTTTGCTT	A	.	PASS	FR=0.5;HP=6;NF=7;NR=3;PP=100.0;SC=ATTTTTTGCCAAAAAAATTTT;TC=21;TR=10	GT:GL:GQ	0/1:-264.68,-158.41,-268.38:100
-20	5655925	.	ACG	A	.	PASS	FR=0.5047;HP=2;NF=4;NR=3;PP=100.0;SC=TTGCATGCGCACGCGCGCACA;TC=34;TR=7	GT:GL:GQ	0/1:-234.34,-106.46,-110.43:20
-20	5674501	.	T	TTTTG	.	PASS	FR=0.5;HP=4;NF=2;NR=2;PP=100.0;SC=AGATTTAGATTTTTGTTTGTT;TC=22;TR=4	GT:GL:GQ	0/1:-64.3,-21.33,-64.69:100
-20	5691054	.	A	AC	.	PASS	FR=0.5;HP=6;NF=4;NR=5;PP=100.0;SC=GTATAGTGAGACCCCCCATCT;TC=18;TR=9	GT:GL:GQ	0/1:-137.75,-89.82,-120.86:100
-20	5696589	.	AAAG	A	.	PASS	FR=0.5;HP=2;NF=3;NR=9;PP=100.0;SC=AGAAAACCATAAAGAAGAGAA;TC=35;TR=12	GT:GL:GQ	0/1:-142.07,-32.31,-238.04:100
-20	5706639	.	T	TA	.	PASS	FR=0.5;HP=9;NF=5;NR=2;PP=98.0;SC=TTGTCTCAATTAAAAAAAAAT;TC=31;TR=7	GT:GL:GQ	0/1:-60.75,-27.2,-75.24:100
-20	5707109	.	A	ATTTTTCCC	.	PASS	FR=0.5;HP=7;NF=2;NR=2;PP=100.0;SC=TGCCCAGCTGATTTTTTTAAA;TC=15;TR=4	GT:GL:GQ	0/1:-95.63,-40.43,-104.52:100
-20	5740635	.	T	TAC,TACAC	.	PASS	FR=0.5,0.5;HP=2;NF=3,1;NR=7,4;PP=100.0,100.0;SC=TGTATTTTTATACACACACAC;TC=23;TR=10,5	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	5747768	.	ATTTTC	ATTTTCTTTTC,A	.	PASS	FR=0.5,0.5;HP=4;NF=1,4;NR=1,1;PP=100.0,100.0;SC=CTCCATTCACATTTTCTTTTC;TC=17;TR=2,5	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	5754003	.	A	AT	.	PASS	FR=0.5;HP=9;NF=6;NR=4;PP=100.0;SC=AGAGAGTGGAATTTTTTTTTG;TC=33;TR=10	GT:GL:GQ	0/1:-69.42,-30.04,-87.94:100
-20	5762289	.	A	AT	.	PASS	FR=0.5;HP=8;NF=2;NR=3;PP=95.0;SC=CTGCCCAGCTATTTTTTTGTA;TC=13;TR=5	GT:GL:GQ	0/1:-43.82,-10.94,-28.53:79
-20	5767540	.	AGATCATTT	A	.	PASS	FR=1.0;HP=2;NF=5;NR=6;PP=100.0;SC=TTCTCAAGCCAGATCATTTGA;TC=16;TR=11	GT:GL:GQ	1/1:-333.85,-224.08,-215.75:69
-20	5768941	.	AGTT	A	.	PASS	FR=0.5;HP=1;NF=4;NR=9;PP=100.0;SC=TATATTCAGTAGTTGTTGTTT;TC=21;TR=13	GT:GL:GQ	0/1:-159.07,-13.83,-29.97:73
-20	5771896	.	CAAATAAATA	C	.	PASS	FR=1.0;HP=3;NF=11;NR=5;PP=100.0;SC=AAAATCTTAGCAAATAAATAA;TC=26;TR=16	GT:GL:GQ	1/1:-433.86,-58.29,-43.98:62
-20	5778212	.	AAAG	A	.	PASS	FR=1.0;HP=5;NF=6;NR=12;PP=100.0;SC=CCATCTCAAAAAAGAAGAAGA;TC=23;TR=18	GT:GL:GQ	1/1:-251.53,-37.12,-21.87:100
-20	5781503	.	GCGTA	G	.	PASS	FR=1.0;HP=1;NF=9;NR=6;PP=100.0;SC=GTGTGTGTGTGCGTATGTCTA;TC=23;TR=15	GT:GL:GQ	1/1:-450.31,-256.77,-243.2:93
-20	5788895	.	C	CAGCCTGGGTGACAG	.	PASS	FR=1.0;HP=1;NF=3;NR=6;PP=100.0;SC=CACTGCACTCCAGCAAGACTC;TC=11;TR=9	GT:GL:GQ	1/1:-304.26,-23.03,-12.43:73
-20	5798352	.	CTGGCATTA	C	.	PASS	FR=0.5;HP=1;NF=1;NR=3;PP=100.0;SC=CTGGCTGTGCCTGGCATTATG;TC=29;TR=4	GT:GL:GQ	1/0:-390.33,-302.72,-305.99:100
-20	5798359	.	T	TGC	.	PASS	FR=0.5;HP=1;NF=6;NR=6;PP=100.0;SC=TGCCTGGCATTATGACTTAGT;TC=26;TR=12	GT:GL:GQ	0/1:-390.33,-366.98,-362.46:100
-20	5807781	.	T	TG	.	PASS	FR=1.0;HP=3;NF=7;NR=3;PP=100.0;SC=TGAGTGGGCGTGGCACCCACA;TC=10;TR=10	GT:GL:GQ	1/1:-98.15,-11.06,-4.14:57
-20	5808542	.	C	CT	.	PASS	FR=1.0;HP=3;NF=16;NR=16;PP=100.0;SC=ATCATTCACTCTTGTGGGTAG;TC=33;TR=32	GT:GL:GQ	1/1:-408.08,-203.57,-182.32:100
-20	5808967	.	T	TGTGTAGTAG	.	PASS	FR=1.0;HP=2;NF=7;NR=18;PP=100.0;SC=CTTAGAACAGTGTGATAGGTC;TC=28;TR=25	GT:GL:GQ	1/1:-678.96,-93.79,-70.92:100
-20	5809144	.	TTGA	T	.	PASS	FR=1.0;HP=1;NF=10;NR=16;PP=100.0;SC=GAGTCATTTCTTGATGACTCC;TC=34;TR=26	GT:GL:GQ	1/1:-408.43,-70.02,-46.73:100
-20	5809747	.	CCTGGGCTCA	C	.	PASS	FR=1.0;HP=1;NF=13;NR=15;PP=100.0;SC=GGTCTCAACTCCTGGGCTCAA;TC=33;TR=28	GT:GL:GQ	1/1:-583.71,-71.8,-56.82:48
-20	5810527	.	G	GA	.	PASS	FR=1.0;HP=9;NF=9;NR=9;PP=100.0;SC=TCTTCTTTAGGAAAAAAAAAC;TC=26;TR=18	GT:GL:GQ	1/1:-296.92,-216.99,-203.12:100
-20	5820132	.	A	AAGATAGAT,AAGATAGATAGAT	.	PASS	FR=0.5,0.5;HP=2;NF=4,2;NR=2,6;PP=100.0,100.0;SC=ATTAGATAGAAAGATAGATAG;TC=36;TR=6,8	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	5822610	.	A	AAAG	.	PASS	FR=0.5;HP=2;NF=4;NR=6;PP=100.0;SC=GACTATGGAGAAAGAGAACAT;TC=30;TR=10	GT:GL:GQ	0/1:-160.25,-33.5,-176.54:100
-20	5830758	.	C	CAATAATAAT	.	PASS	FR=1.0;HP=2;NF=2;NR=2;PP=100.0;SC=GACCCCGTCTCAATAATAATA;TC=8;TR=4	GT:GL:GQ	1/1:-112.77,-19.78,-14.93:60
-20	5848219	.	C	CAAAAT	.	PASS	FR=1.0;HP=7;NF=10;NR=13;PP=100.0;SC=ATTAAACACTCAAAAAAATAA;TC=29;TR=23	GT:GL:GQ	1/1:-431.75,-125.0,-103.09:100
-20	5848530	.	A	AAT	.	PASS	FR=1.0;HP=1;NF=13;NR=10;PP=100.0;SC=ATATATATAGAATATATATAT;TC=33;TR=23	GT:GL:GQ	1/1:-409.72,-328.74,-317.3:96
-20	5850230	.	A	AT	.	PASS	FR=1.0;HP=6;NF=1;NR=1;PP=100.0;SC=TAATTTTTGCATTTTTTGTTT;TC=22;TR=2	GT:GL:GQ	1/1:-134.01,-105.23,-98.33:86
-20	5854908	.	A	AATTTTATTTT	.	PASS	FR=1.0;HP=3;NF=3;NR=7;PP=100.0;SC=CATATACTTTAATTTTATTTT;TC=28;TR=10	GT:GL:GQ	1/1:-352.01,-27.1,-12.2:100
-20	5856355	.	CTAAA	C	.	PASS	FR=1.0;HP=4;NF=2;NR=2;PP=100.0;SC=GACCCTATTTCTAAATAAATA;TC=15;TR=4	GT:GL:GQ	1/1:-57.0,-6.23,-2.76:42
-20	5860647	.	TGAG	T	.	PASS	FR=1.0;HP=4;NF=8;NR=6;PP=100.0;SC=AGAAAGAAAATGAGGAGCGAA;TC=18;TR=14	GT:GL:GQ	1/1:-182.28,-15.91,-4.13:99
-20	5879792	.	CAA	C	.	PASS	FR=1.0;HP=10;NF=14;NR=15;PP=100.0;SC=ACAATAACATCAAAAAAAAAA;TC=39;TR=29	GT:GL:GQ	1/1:-170.66,-28.34,-5.76:100
-20	5898748	.	GAA	G	.	PASS	FR=1.0;HP=2;NF=5;NR=5;PP=100.0;SC=AGCCAAGATTGAACTCCATTG;TC=13;TR=10	GT:GL:GQ	1/1:-132.95,-97.25,-91.93:66
-20	5900669	.	G	GC	.	PASS	FR=0.5;HP=1;NF=4;NR=2;PP=100.0;SC=CATGACAGATGCATTTCCCTG;TC=15;TR=6	GT:GL:GQ	0/1:-72.42,-12.46,-72.17:100
-20	5911588	.	TCA	T	.	PASS	FR=0.5;HP=2;NF=6;NR=1;PP=100.0;SC=CTGGCAAATCTCACACACACA;TC=19;TR=7	GT:GL:GQ	0/1:-115.11,-26.04,-76.51:100
-20	5923828	.	CAGAGAGAATACATGCTTA	C	.	PASS	FR=0.5;HP=1;NF=3;NR=5;PP=100.0;SC=TGTATTCTTCCAGAGAGAATA;TC=22;TR=8	GT:GL:GQ	0/1:-297.99,-115.43,-361.46:100
-20	5928403	.	T	TA	.	PASS	FR=0.5;HP=2;NF=3;NR=2;PP=100.0;SC=ACCTAGGTGCTTTGAAACACT;TC=18;TR=5	GT:GL:GQ	0/1:-52.7,-18.59,-121.61:100
-20	5930573	.	A	AG	.	PASS	FR=0.5;HP=3;NF=4;NR=4;PP=100.0;SC=ACAGGTGATTAGGGTGTGGAG;TC=26;TR=8	GT:GL:GQ	0/1:-121.38,-46.04,-144.61:100
-20	5932104	.	C	CT	.	PASS	FR=0.5;HP=2;NF=5;NR=6;PP=100.0;SC=TCTTTATTTACTTGTATACTT;TC=20;TR=11	GT:GL:GQ	0/1:-138.34,-48.83,-107.16:100
-20	5934084	.	GGTGT	GGT,G	.	PASS	FR=0.5,0.5;HP=3;NF=1,2;NR=3,2;PP=100.0,100.0;SC=TCTCATGAGGGGTGTGTGTGT;TC=32;TR=4,4	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	5938650	.	A	AT	.	PASS	FR=0.5;HP=3;NF=3;NR=6;PP=100.0;SC=TTTTCCTTAAATTTCTTTTTT;TC=36;TR=9	GT:GL:GQ	0/1:-182.01,-137.8,-289.15:100
-20	5939638	.	G	GT	.	PASS	FR=0.5;HP=7;NF=8;NR=7;PP=100.0;SC=ATTAGTGTCTGTTTTTTACCT;TC=37;TR=15	GT:GL:GQ	0/1:-244.24,-166.31,-240.23:100
-20	5946414	.	TTTTACTTCTTAGAGTATGC	T	.	PASS	FR=0.5;HP=3;NF=2;NR=4;PP=100.0;SC=TAAGTGCTGGTTTTACTTCTT;TC=34;TR=6	GT:GL:GQ	0/1:-213.07,-102.23,-466.92:100
-20	5948421	.	CATT	C	.	PASS	FR=0.5;HP=1;NF=6;NR=8;PP=100.0;SC=CTAGTTGAGTCATTGTAGGGA;TC=25;TR=14	GT:GL:GQ	0/1:-180.5,-26.28,-114.93:100
-20	5958367	.	TATA	T	.	PASS	FR=0.5;HP=2;NF=1;NR=12;PP=100.0;SC=TAAATCAGGATATAATAATAC;TC=28;TR=13	GT:GL:GQ	0/1:-168.03,-21.02,-138.69:100
-20	5958971	.	AT	A	.	PASS	FR=0.5;HP=8;NF=7;NR=10;PP=100.0;SC=ATTTGTGATCATTTTTTTTAA;TC=36;TR=17	GT:GL:GQ	0/1:-190.15,-122.85,-187.1:100
-20	5972522	.	TC	T	.	PASS	FR=0.5;HP=2;NF=3;NR=8;PP=100.0;SC=AGTTTTCATCTCTTCAGCTTC;TC=35;TR=11	GT:GL:GQ	0/1:-138.05,-67.95,-261.75:100
-20	5974701	.	T	TTTTG	.	PASS	FR=0.5;HP=6;NF=12;NR=8;PP=100.0;SC=TTAGCTTGATTTTTTTCAGCT;TC=40;TR=20	GT:GL:GQ	0/1:-282.01,-46.13,-199.33:100
-20	5979818	.	CTA	C	.	PASS	FR=0.5;HP=1;NF=4;NR=2;PP=100.0;SC=CACACACACACTATATAGAGT;TC=23;TR=6	GT:GL:GQ	0/1:-148.54,-97.12,-217.3:100
-20	5979861	.	T	TAG	.	PASS	FR=0.5;HP=1;NF=1;NR=6;PP=100.0;SC=GTATATATACTAGTGTGTATA;TC=23;TR=7	GT:GL:GQ	0/1:-206.33,-148.87,-246.11:100
-20	5979921	.	ATATATATTATATATAC	A	.	PASS	FR=0.5;HP=2;NF=2;NR=3;PP=100.0;SC=TCTATAAAGTATATATATTAT;TC=15;TR=5	GT:GL:GQ	0/1:-143.6,-52.22,-114.36:100
-20	5980041	.	CTATA	C	.	PASS	FR=0.5;HP=1;NF=6;NR=4;PP=100.0;SC=TATATATACACTATATATAGT;TC=35;TR=10	GT:GL:GQ	0/1:-130.29,-26.74,-240.87:100
-20	5982833	.	CTT	C	.	PASS	FR=0.5;HP=5;NF=2;NR=5;PP=100.0;SC=GCAATGCACTCTTTTGCTTAC;TC=22;TR=7	GT:GL:GQ	0/1:-154.07,-87.47,-142.2:100
-20	5984269	.	CTT	C	.	PASS	FR=0.5;HP=5;NF=6;NR=7;PP=100.0;SC=AATCCTTTCTCTTTTCACGTT;TC=31;TR=13	GT:GL:GQ	0/1:-161.92,-47.17,-162.99:100
-20	5986173	.	A	ATAATT	.	PASS	FR=0.5;HP=3;NF=9;NR=5;PP=100.0;SC=AAAATTTAAAATAAAAACTAT;TC=31;TR=14	GT:GL:GQ	0/1:-275.95,-89.41,-205.85:100
-20	5997120	.	T	TGTGTGA	.	PASS	FR=0.5;HP=2;NF=2;NR=2;PP=100.0;SC=TGTGTGTGTGTGAGTTTTCTT;TC=20;TR=4	GT:GL:GQ	0/1:-128.89,-41.21,-139.69:100
-20	5999929	.	G	GTTA	.	PASS	FR=0.5;HP=5;NF=7;NR=6;PP=100.0;SC=CTTTTGACCAGTTTTTAAGTT;TC=34;TR=13	GT:GL:GQ	0/1:-145.72,-26.46,-192.55:100
-20	6013970	.	C	CG	.	PASS	FR=0.5;HP=4;NF=4;NR=1;PP=100.0;SC=TTAGTAGAGACGGGGTTTCAC;TC=18;TR=5	GT:GL:GQ	0/1:-76.07,-30.4,-70.18:100
-20	6019907	.	TTGTGTGTGTGTGTGTG	T	.	PASS	FR=0.5;HP=2;NF=1;NR=1;PP=100.0;SC=GCAGTTTTGTTTGTGTGTGTG;TC=27;TR=2	GT:GL:GQ	0/1:-146.39,-89.3,-170.65:100
-20	6052252	.	CT	C	.	PASS	FR=1.0;HP=2;NF=5;NR=9;PP=100.0;SC=ATCCCCAGCCCTTCCTGGCTT;TC=21;TR=14	GT:GL:GQ	1/1:-166.42,-15.59,-2.3:100
-20	6054897	.	T	TG	.	PASS	FR=1.0;HP=3;NF=4;NR=7;PP=100.0;SC=TGGGCAAGGCTGGGAAGGAAG;TC=16;TR=11	GT:GL:GQ	1/1:-170.6,-33.42,-22.33:90
-20	6056042	.	T	TA	.	PASS	FR=1.0;HP=2;NF=8;NR=17;PP=100.0;SC=ACATCAAGTATATACGGTACA;TC=29;TR=25	GT:GL:GQ	1/1:-301.61,-48.56,-28.73:100
-20	6163149	.	CATTT	C	.	PASS	FR=1.0;HP=1;NF=11;NR=10;PP=100.0;SC=AACCTCTGAGCATTTATTTCA;TC=24;TR=21	GT:GL:GQ	1/1:-265.47,-16.86,-0.92:100
-20	6169158	.	C	CT	.	PASS	FR=1.0;HP=1;NF=11;NR=21;PP=100.0;SC=AATTGCAAGACCTTAAGAACC;TC=38;TR=32	GT:GL:GQ	1/1:-377.27,-55.22,-28.98:100
-20	6186522	.	G	GC	.	PASS	FR=1.0;HP=6;NF=10;NR=10;PP=100.0;SC=TAAAAAATGTGTTTTTAATCA;TC=21;TR=20	GT:GL:GQ	1/1:-309.42,-177.87,-163.8:100
-20	6186628	.	C	CA	.	PASS	FR=0.5;HP=3;NF=5;NR=12;PP=100.0;SC=TTCATCACCTCAAACATTTAT;TC=33;TR=17	GT:GL:GQ	0/1:-173.72,-30.0,-131.16:100
-20	6189872	.	C	CCTT	.	PASS	FR=0.5;HP=1;NF=1;NR=10;PP=100.0;SC=CTTCCTCCCTCCTTTCCCTCT;TC=26;TR=11	GT:GL:GQ	0/1:-217.8,-111.28,-184.18:100
-20	6190124	.	C	CTT	.	PASS	FR=0.5;HP=2;NF=2;NR=4;PP=92.0;SC=TCCTGCCTCTCTCTTTCCTCC;TC=16;TR=6	GT:GL:GQ	0/1:-129.79,-96.5,-151.55:100
-20	6190921	.	A	AT	.	PASS	FR=0.5;HP=2;NF=5;NR=4;PP=100.0;SC=CCATAAGTACATTAAAAAAAA;TC=24;TR=9	GT:GL:GQ	0/1:-121.19,-85.53,-104.7:86
-20	6202427	.	C	CT	.	PASS	FR=1.0;HP=6;NF=6;NR=13;PP=100.0;SC=GAAATCCTTTCTTTCCCCCTA;TC=20;TR=19	GT:GL:GQ	1/1:-165.74,-14.09,-0.92:100
-20	6211244	.	GT	G	.	PASS	FR=0.5;HP=10;NF=5;NR=6;PP=100.0;SC=TTGATTTCCAGTTTTTTTTTT;TC=33;TR=11	GT:GL:GQ	0/1:-97.67,-63.78,-117.4:100
-20	6217057	.	T	TA	.	PASS	FR=0.5;HP=2;NF=4;NR=7;PP=100.0;SC=TCTCTACAACTAACCATCAAC;TC=33;TR=11	GT:GL:GQ	0/1:-151.16,-56.84,-189.09:100
-20	6227811	.	TTTTTCTTTTC	T	.	PASS	FR=0.5;HP=6;NF=3;NR=2;PP=100.0;SC=TATACTGCTTTTTTTCTTTTC;TC=28;TR=5	GT:GL:GQ	0/1:-171.28,-80.47,-279.48:100
-20	6228139	.	TA	T	.	PASS	FR=0.5;HP=8;NF=6;NR=7;PP=100.0;SC=ACTGGTTGTTTAAAAAAAACA;TC=27;TR=13	GT:GL:GQ	0/1:-101.53,-37.68,-71.46:100
-20	6229361	.	G	GTA	.	PASS	FR=0.5;HP=2;NF=7;NR=5;PP=100.0;SC=TGCTTTTGAAGTATACCTTTA;TC=28;TR=12	GT:GL:GQ	0/1:-168.24,-128.05,-263.48:100
-20	6232719	.	T	TA	.	PASS	FR=1.0;HP=4;NF=10;NR=14;PP=100.0;SC=CGTACCTCAATAAGTACTGTT;TC=26;TR=24	GT:GL:GQ	1/1:-246.13,-19.86,-1.84:100
-20	6235756	.	T	TA	.	PASS	FR=0.5;HP=10;NF=4;NR=2;PP=51.0;SC=ATATAAAAGTTAAAAAAAAAA;TC=22;TR=6	GT:GL:GQ	0/1:-59.89,-37.16,-67.02:100
-20	6242610	.	GCAGACC	G	.	PASS	FR=0.5;HP=1;NF=7;NR=3;PP=100.0;SC=ACTGGGAGAGGCAGACCCACC;TC=27;TR=10	GT:GL:GQ	0/1:-180.6,-46.65,-174.85:100
-20	6245977	.	A	AT	.	PASS	FR=0.5;HP=6;NF=7;NR=5;PP=100.0;SC=CTTAGTTTTCATTTTTTAGCA;TC=29;TR=12	GT:GL:GQ	0/1:-149.75,-66.4,-136.45:100
-20	6258987	.	CT	C	.	PASS	FR=0.5;HP=6;NF=4;NR=10;PP=100.0;SC=GTATGTTCTTCTTTTGTCCCC;TC=34;TR=14	GT:GL:GQ	0/1:-185.84,-121.45,-268.81:100
-20	6272029	.	T	TA	.	PASS	FR=0.5;HP=3;NF=4;NR=9;PP=100.0;SC=TAATAGCTGGTAAACCCAACC;TC=39;TR=13	GT:GL:GQ	0/1:-151.49,-56.11,-226.05:100
-20	6293812	.	G	GA	.	PASS	FR=1.0;HP=7;NF=15;NR=12;PP=100.0;SC=GGAAAAGAAAGAAAAGAAAAA;TC=35;TR=27	GT:GL:GQ	1/1:-393.29,-260.24,-242.04:100
-20	6296458	.	T	TA	.	PASS	FR=1.0;HP=8;NF=5;NR=17;PP=100.0;SC=GAAAGCACAATTTTTTTTTCT;TC=39;TR=22	GT:GL:GQ	1/1:-284.36,-128.48,-104.71:100
-20	6304002	.	A	ATG	.	PASS	FR=1.0;HP=2;NF=6;NR=5;PP=100.0;SC=ATATATATATATATGTGTGTG;TC=30;TR=11	GT:GL:GQ	1/1:-328.64,-256.07,-245.8:100
-20	6307745	.	GTA	G	.	PASS	FR=1.0;HP=3;NF=4;NR=7;PP=100.0;SC=TATATATGTTGTATATATATA;TC=16;TR=11	GT:GL:GQ	1/1:-114.94,-15.25,-6.19:75
-20	6307849	.	TATATATATGGTATATATATC	T	.	PASS	FR=0.5034;HP=1;NF=2;NR=2;PP=100.0;SC=ATATATGGTGTATATATATGG;TC=11;TR=4	GT:GL:GQ	0/1:-108.24,-70.67,-74.96:21
-20	6307908	.	TG	T	.	PASS	FR=0.5;HP=2;NF=3;NR=4;PP=100.0;SC=ATATCATATATGGTGTATATA;TC=21;TR=7	GT:GL:GQ	0/1:-127.13,-92.55,-148.07:100
-20	6308166	.	G	GTA,GTATA	.	PASS	FR=0.5,0.5;HP=2;NF=2,1;NR=0,3;PP=86.0,100.0;SC=GTGTGTGTGTGTATATATATA;TC=16;TR=2,4	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	6308279	.	G	GTA	.	PASS	FR=1.0;HP=2;NF=5;NR=4;PP=100.0;SC=TATATATGGTGTATATATATA;TC=12;TR=9	GT:GL:GQ	1/1:-129.24,-92.18,-87.75:54
-20	6308322	.	GTGTGTGTATATATATATATATATA	G	.	PASS	FR=1.0;HP=2;NF=1;NR=2;PP=88.0;SC=ATGTATGTGTGTGTGTGTATA;TC=16;TR=3	GT:GL:GQ	1/1:-227.62,-141.11,-132.99:40
-20	6319701	.	G	GGT	.	PASS	FR=0.5;HP=1;NF=1;NR=5;PP=100.0;SC=GAGTCTATGTGGTGTGTGTGT;TC=19;TR=6	GT:GL:GQ	0/1:-99.44,-38.84,-115.36:100
-20	6345189	.	G	GT	.	PASS	FR=0.5;HP=8;NF=8;NR=3;PP=100.0;SC=ATTGTTTTCAGTTTTTTTTCT;TC=31;TR=11	GT:GL:GQ	0/1:-92.31,-34.03,-73.88:100
-20	6346428	.	C	CTCTGTATG	.	PASS	FR=0.5;HP=4;NF=5;NR=1;PP=45.0;SC=TATTCTCTATCTTTAATTTAA;TC=31;TR=6	GT:GL:GQ	0/1:-234.84,-191.03,-405.18:86
-20	6349738	.	TAC	T	.	PASS	FR=0.5;HP=1;NF=2;NR=1;PP=86.0;SC=GACACATACGTACACACACAC;TC=15;TR=3	GT:GL:GQ	0/1:-95.85,-65.71,-99.67:100
-20	6364214	.	ACTCTT	A	.	PASS	FR=0.5;HP=3;NF=5;NR=10;PP=100.0;SC=TCTTTACAAAACTCTTCTAGA;TC=36;TR=15	GT:GL:GQ	0/1:-210.3,-34.68,-236.21:100
-20	6373382	.	TCTACCTAC	T	.	PASS	FR=1.0;HP=1;NF=9;NR=8;PP=100.0;SC=ATTTCCTCTATCTACCTACCT;TC=38;TR=17	GT:GL:GQ	1/1:-510.97,-41.39,-20.72:100
-20	6384835	.	TACACACAC	TAC,T	.	PASS	FR=0.5,0.5;HP=2;NF=2,2;NR=7,1;PP=100.0,51.0;SC=GGATGACACATACACACACAC;TC=32;TR=9,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	6390974	.	TAA	T	.	PASS	FR=1.0;HP=3;NF=19;NR=16;PP=100.0;SC=CTGCCTACCTTAAACACATAA;TC=42;TR=35	GT:GL:GQ	1/1:-376.88,-34.87,-5.52:100
-20	6401100	.	A	AT	.	PASS	FR=1.0;HP=9;NF=15;NR=9;PP=100.0;SC=TTCAAAAAGCATTTTTTTTTG;TC=34;TR=24	GT:GL:GQ	1/1:-148.27,-28.49,-8.51:100
-20	6406758	.	C	CT	.	PASS	FR=1.0;HP=7;NF=4;NR=16;PP=100.0;SC=TCTCTCCCCTCTTTTTTCTCC;TC=31;TR=20	GT:GL:GQ	1/1:-235.73,-83.65,-66.42:100
-20	6410888	.	CAGGGCTTGGCCCTGGAGT	C	.	PASS	FR=0.5;HP=1;NF=2;NR=4;PP=100.0;SC=TTCTCCACTCCAGGGCTTGGC;TC=24;TR=6	GT:GL:GQ	0/1:-188.53,-25.15,-199.92:100
-20	6426272	.	T	TCTC,TTTC	.	PASS	FR=0.5,0.5;HP=1;NF=11,6;NR=5,5;PP=100.0,100.0;SC=TTAAAAATTATCTCATTTCCT;TC=28;TR=16,11	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	6428681	.	CA	C	.	PASS	FR=0.5009;HP=2;NF=4;NR=5;PP=100.0;SC=GGTGGGCCACCAACAGTGTCT;TC=20;TR=9	GT:GL:GQ	0/1:-312.7,-243.18,-248.77:27
-20	6430456	.	A	AT	.	PASS	FR=0.5;HP=10;NF=10;NR=6;PP=100.0;SC=TAATATTTAAATTTTTTTTTT;TC=35;TR=16	GT:GL:GQ	0/1:-143.54,-83.39,-119.6:100
-20	6438083	.	TA	T	.	PASS	FR=0.5;HP=7;NF=2;NR=8;PP=100.0;SC=AACAGATATATAAAAAATGCT;TC=21;TR=10	GT:GL:GQ	0/1:-86.86,-14.54,-78.87:100
-20	6441903	.	C	CT	.	PASS	FR=0.5;HP=9;NF=10;NR=11;PP=100.0;SC=AAATTAAATACTTTTTTTTTA;TC=43;TR=21	GT:GL:GQ	0/1:-221.48,-121.14,-137.31:73
-20	6443155	.	TTA	T	.	PASS	FR=0.5005;HP=5;NF=2;NR=2;PP=100.0;SC=AAACAGTTTTTTATATATATA;TC=14;TR=4	GT:GL:GQ	0/1:-162.1,-119.94,-126.23:30
-20	6443546	.	G	GTA	.	PASS	FR=0.5;HP=2;NF=1;NR=2;PP=100.0;SC=ATATATATGTGTATATATATA;TC=14;TR=3	GT:GL:GQ	0/1:-156.72,-103.24,-116.61:61
-20	6447485	.	C	CA	.	PASS	FR=0.5;HP=3;NF=4;NR=13;PP=100.0;SC=TTTTGAATTTCAAATATTTTC;TC=38;TR=17	GT:GL:GQ	0/1:-255.09,-105.01,-200.26:100
-20	6448179	.	TAATAA	T	.	PASS	FR=0.5;HP=5;NF=3;NR=4;PP=100.0;SC=TATCTCGAAATAATAAAATAA;TC=36;TR=7	GT:GL:GQ	0/1:-185.97,-96.1,-256.82:100
-20	6456952	.	ATT	AT,A	.	PASS	FR=0.5,0.5;HP=10;NF=7,8;NR=4,5;PP=100.0,100.0;SC=CAATGATGTCATTTTTTTTTT;TC=27;TR=11,13	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	6458185	.	GA	G	.	PASS	FR=0.5;HP=10;NF=11;NR=4;PP=100.0;SC=AAATAAAAATGAAAAAAAAAA;TC=48;TR=15	GT:GL:GQ	0/1:-255.96,-202.85,-273.91:100
-20	6459292	.	G	GA	.	PASS	FR=0.5;HP=10;NF=2;NR=6;PP=49.0;SC=TATCCTATCAGAAAAAAAAAC;TC=30;TR=8	GT:GL:GQ	0/1:-83.74,-61.52,-111.1:99
-20	6473904	.	TAGGTGAAATTTTCTTTTCTGTTTTTTTAA	T	.	PASS	FR=0.5;HP=1;NF=2;NR=1;PP=100.0;SC=TCCCTAATTCTAGGTGAAATT;TC=25;TR=3	GT:GL:GQ	0/1:-202.85,-99.33,-502.66:100
-20	6481086	.	T	TTGTC	.	PASS	FR=1.0;HP=2;NF=7;NR=5;PP=100.0;SC=TTGTTCCTCTTTGTCAGAGCA;TC=21;TR=12	GT:GL:GQ	1/1:-268.34,-19.84,-4.6:100
-20	6488178	.	CTTG	C	.	PASS	FR=1.0;HP=2;NF=13;NR=13;PP=100.0;SC=AAGCTACTTGCTTGTTGTTGA;TC=32;TR=26	GT:GL:GQ	1/1:-335.98,-26.27,-4.81:100
-20	6520175	.	C	CTT	.	PASS	FR=1.0;HP=3;NF=12;NR=17;PP=100.0;SC=TTACTTAAGACTTTCTATTGA;TC=35;TR=29	GT:GL:GQ	1/1:-362.42,-32.47,-7.59:100
-20	6524976	.	GACTAC	G	.	PASS	FR=1.0;HP=2;NF=12;NR=13;PP=100.0;SC=CTATGAAATTGACTACACTAC;TC=32;TR=25	GT:GL:GQ	1/1:-403.49,-65.81,-45.47:100
-20	6531643	.	GT	G	.	PASS	FR=1.0;HP=4;NF=17;NR=11;PP=100.0;SC=CAGATAAAGTGTTTAATTCAT;TC=31;TR=28	GT:GL:GQ	1/1:-281.56,-58.08,-38.11:100
-20	6544912	.	CAGAT	CAGATAGATAGATAGAT,C	.	PASS	FR=0.5,0.5;HP=1;NF=1,1;NR=4,1;PP=100.0,100.0;SC=TATTCACTGCCAGATAGATAG;TC=24;TR=5,2	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	6548435	.	A	AAGAG	.	PASS	FR=1.0;HP=2;NF=5;NR=8;PP=100.0;SC=GAGAAACAGAAAGAGAGAGAG;TC=33;TR=13	GT:GL:GQ	1/1:-316.58,-47.12,-29.98:100
-20	6549783	.	C	CTT	.	PASS	FR=1.0;HP=9;NF=3;NR=10;PP=100.0;SC=TGGTCCAGGCCTTTTTTTTTG;TC=24;TR=13	GT:GL:GQ	1/1:-145.52,-61.65,-53.62:66
-20	6553955	.	TTATA	T	.	PASS	FR=1.0;HP=3;NF=12;NR=6;PP=100.0;SC=ATTTTACATTTTATATATATA;TC=30;TR=18	GT:GL:GQ	1/1:-272.92,-35.6,-20.34:100
-20	6563467	.	CTAGGTAGGTAGG	C	.	PASS	FR=1.0;HP=1;NF=3;NR=6;PP=100.0;SC=ACATGCATTCCTAGGTAGGTA;TC=22;TR=9	GT:GL:GQ	1/1:-367.98,-150.14,-139.95:85
-20	6565618	.	CGTGT	C	.	PASS	FR=1.0;HP=2;NF=4;NR=3;PP=100.0;SC=TGTGTGTGTTCGTGTGTGTGT;TC=19;TR=7	GT:GL:GQ	1/1:-220.73,-126.68,-119.85:85
-20	6565651	.	G	GTA	.	PASS	FR=0.5286;HP=2;NF=3;NR=2;PP=100.0;SC=GTGTATATGTGTATATATATA;TC=16;TR=5	GT:GL:GQ	0/1:-258.66,-193.34,-195.57:12
-20	6585232	.	C	CT	.	PASS	FR=1.0;HP=2;NF=15;NR=16;PP=100.0;SC=ACAAACCCATCTCCTAAAATC;TC=33;TR=31	GT:GL:GQ	1/1:-314.24,-29.76,-6.91:100
-20	6590623	.	C	CCTGCTT	.	PASS	FR=1.0;HP=1;NF=17;NR=14;PP=100.0;SC=AGAGTTATCTCCTGCTGTCAT;TC=32;TR=31	GT:GL:GQ	1/1:-527.33,-38.07,-14.51:100
-20	6603635	.	C	CA	.	PASS	FR=1.0;HP=4;NF=12;NR=8;PP=100.0;SC=TTAGTCAAGCCAAAATCACAT;TC=27;TR=20	GT:GL:GQ	1/1:-325.58,-214.53,-199.34:100
-20	6609608	.	CTT	C	.	PASS	FR=1.0;HP=3;NF=10;NR=9;PP=100.0;SC=TGTTTTGATGCTTTCTGGCTT;TC=27;TR=19	GT:GL:GQ	1/1:-576.75,-576.47,-576.51:100
-20	6609611	.	T	TGGAGGAGGA	.	PASS	FR=1.0;HP=2;NF=9;NR=9;PP=100.0;SC=TTTGATGCTTTCTGGCTTGGA;TC=23;TR=18	GT:GL:GQ	1/1:-576.75,-311.9,-294.35:100
-20	6644452	.	C	CTGTAG	.	PASS	FR=1.0;HP=1;NF=14;NR=16;PP=100.0;SC=ATAAAAGGCACTGTAGCATAG;TC=35;TR=30	GT:GL:GQ	1/1:-563.91,-35.77,-9.44:100
-20	6647434	.	A	ATC	.	PASS	FR=1.0;HP=2;NF=4;NR=14;PP=100.0;SC=GGATACTGAGATTCTAAGTAG;TC=21;TR=18	GT:GL:GQ	1/1:-241.28,-23.07,-7.83:100
-20	6655343	.	T	TG	.	PASS	FR=1.0;HP=6;NF=6;NR=9;PP=100.0;SC=AGTCTAAAGATTTTTTTCTGG;TC=18;TR=15	GT:GL:GQ	1/1:-141.83,-27.31,-14.91:95
-20	6655876	.	GTATATA	GTA,G	.	PASS	FR=0.5,0.5;HP=1;NF=8,2;NR=11,1;PP=100.0,58.0;SC=TACATATATAGTATATATATA;TC=31;TR=19,3	GT:GL:GQ	1/2:-1.0,-1.0,-1.0:100
-20	6664331	.	C	CTG	.	PASS	FR=1.0;HP=5;NF=5;NR=10;PP=100.0;SC=GGTTTAAAAACTGTGTGTGTG;TC=30;TR=15	GT:GL:GQ	1/1:-232.49,-35.13,-29.16:74
-20	6668238	.	CT	C	.	PASS	FR=1.0;HP=10;NF=7;NR=15;PP=100.0;SC=ACTGGAGAAACTTTTTTTTTT;TC=30;TR=22	GT:GL:GQ	1/1:-332.94,-279.88,-269.29:89
-20	6677392	.	CTGTGTG	C	.	PASS	FR=0.5;HP=2;NF=1;NR=6;PP=100.0;SC=GTGTGTGGCCCTGTGTGTGTG;TC=24;TR=7	GT:GL:GQ	0/1:-156.67,-56.12,-128.5:100
-20	6687137	.	CAT	C	.	PASS	FR=1.0;HP=2;NF=12;NR=13;PP=100.0;SC=ATAAGATCCACATGAGACAAT;TC=26;TR=25	GT:GL:GQ	1/1:-279.85,-22.16,-4.14:100
-20	6690400	.	T	TG	.	PASS	FR=1.0;HP=2;NF=22;NR=8;PP=100.0;SC=TTAATACATTTGTATGCCCTG;TC=31;TR=30	GT:GL:GQ	1/1:-315.1,-40.57,-19.1:100
-20	6694813	.	GAA	G	.	PASS	FR=1.0;HP=6;NF=5;NR=4;PP=100.0;SC=AAGAAAGAAAGAAAGAGAAAG;TC=13;TR=9	GT:GL:GQ	1/1:-119.78,-18.28,-9.43:64
-20	6717401	.	G	GA	.	PASS	FR=1.0;HP=10;NF=14;NR=6;PP=100.0;SC=CTCTCTTAAGGAAAAAAAAAA;TC=27;TR=20	GT:GL:GQ	1/1:-134.21,-33.86,-20.0:100
-20	6723994	.	A	AAC	.	PASS	FR=1.0;HP=4;NF=10;NR=3;PP=100.0;SC=CACATACAAAAACACACACAC;TC=23;TR=13	GT:GL:GQ	1/1:-174.48,-22.71,-13.76:74
-20	6746236	.	C	CTTAT	.	PASS	FR=0.5;HP=2;NF=2;NR=4;PP=100.0;SC=CTGGAGACTACTTATTTATTT;TC=23;TR=6	GT:GL:GQ	0/1:-115.46,-26.87,-109.86:100
-20	6759758	.	A	AAT	.	PASS	FR=0.5;HP=2;NF=2;NR=3;PP=100.0;SC=TAAATACATAAATATATATAT;TC=21;TR=5	GT:GL:GQ	0/1:-98.2,-23.97,-51.3:100
-20	6765134	.	A	AACAC	.	PASS	FR=0.5;HP=1;NF=2;NR=5;PP=100.0;SC=TTGAGAATCTAACACACACAC;TC=25;TR=7	GT:GL:GQ	0/1:-145.56,-56.64,-151.12:100
diff --git a/tests/vcf-examples/6.vcf b/tests/vcf-examples/6.vcf
deleted file mode 100644
index fa039b1..0000000
--- a/tests/vcf-examples/6.vcf
+++ /dev/null
@@ -1,278 +0,0 @@
-##fileformat=VCFv4.1
-##INFO=<ID=CallsetAC,Number=.,Type=Integer,Description="">
-##INFO=<ID=CallsetAC2,Number=.,Type=Integer,Description="">
-##INFO=<ID=HW_VIOLATION,Number=0,Type=Flag,Description="Genotypes violate Hardy-Weinberg">
-##INFO=<ID=SEQUENCING.AC,Number=1,Type=Integer,Description="Allele count from sequencing-based genotypes over all samples">
-##INFO=<ID=SEQUENOM.AC,Number=1,Type=Integer,Description="Allele count from Sequenom genotyping">
-##INFO=<ID=Groups,Number=.,Type=String,Description="Center that called this variant">
-##INFO=<ID=HR,Number=1,Type=Integer,Description="Homopolymer run length">
-##INFO=<ID=TR,Number=1,Type=Integer,Description="Tandem repeat run length (bp)">
-##INFO=<ID=TU,Number=1,Type=String,Description="tandem repeat run unit (stranded)">
-##INFO=<ID=HU,Number=1,Type=String,Description="Homopolymer run unit (stranded)">
-##INFO=<ID=IH,Number=1,Type=Character,Description="Indel hotspot: estimated local rate exceeds SNP rate">
-##INFO=<ID=Set,Number=1,Type=String,Description="Set from which this site was chosen for validation">
-##FILTER=<ID=AMBIGUOUS_SEQUENOM_CALLS,Description="Possible Sequenom miscalls based on manual review of cluster plots">
-##FILTER=<ID=INCORRECT_SEQUENOM_CALLS,Description="Clear Sequenom miscalls based on manual review of cluster plots">
-##FILTER=<ID=TOO_MANY_ALT_ALLELES,Description="Extremely high value (many times more or greater than 700) for SEQUENOM.AC given the SEQUENCING.AC">
-##fileDate=20110531
-##reference=ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/human_g1k_v37.fasta.gz
-##source=EricBanksValidationQC;fromGertonLunterValidationSelection
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	HG00127	HG00128	HG00136	HG00137	HG00138	HG00139	HG00152	HG00156	HG00234	HG00235	HG00237	HG00242	HG00244	HG00262	HG01055	HG01079	NA19138	NA18974	NA18523	NA12717	NA19209	NA18577	NA18973	NA18943	NA12873	NA18623	NA18622	NA18948	NA19171	NA19204	NA06994	NA18563	NA18547	NA18861	NA18608	NA18995	NA10851	NA18976	NA18603	NA19200	HG01204	HG01191	HG01101	HG00146	HG00306	NA18985	HG00160	HG00635	HG00372	HG00357	HG00634	NA18541	NA18950	NA19759	HG00351	HG0025 [...]
-20	669442	.	TG	T	99	PASS	SEQUENCING.AC=101;CallSetAC=116,128,155,72,71;CallSetAC2=2,2,2,2,2;Groups=BC,BI,DINDEL,OX,SAMTOOLS;HR=7;HU=G;IH=1;TR=7;TU=G;Set=SAMTOOLS;SEQUENOM.AC=54	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	1/1	0/0	0/1	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	 [...]
-20	676148	.	A	AC	99	PASS	SEQUENCING.AC=3;CallSetAC=0,0,3,0,0;CallSetAC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SEQUENCING.AC=26;CallSetAC=29,49,32,20,30;CallSetAC2=0,1,2,1,1;Groups=BC,BI,DINDEL,OX,SAMTOOLS;HR=4;HU=C;IH=0;TR=4;TU=C;Set=SAMTOOLS;SEQUENOM.AC=27	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	1/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/1	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/ [...]
diff --git a/tests/vcf-examples/7.vcf b/tests/vcf-examples/7.vcf
deleted file mode 100644
index 33e3ca7..0000000
--- a/tests/vcf-examples/7.vcf
+++ /dev/null
@@ -1,317 +0,0 @@
-##fileformat=VCFv4.1
-##INFO=<ID=BCM.AC,Number=1,Type=Integer,Description="Allele count from BCM's (sequencing-based) genotypes subsetted to the 383 validation samples">
-##INFO=<ID=DB,Number=0,Type=Flag,Description="dbSNP Membership">
-##INFO=<ID=HW_VIOLATION,Number=0,Type=Flag,Description="Genotypes violate Hardy-Weinberg">
-##INFO=<ID=SEQUENOM.AC,Number=1,Type=Integer,Description="Allele count from Sequenom genotyping">
-##INFO=<ID=SRC,Number=1,Type=String,Description="Type of SNPs submitted for validation; VQSR refers to preliminary consensus set, not the final one">
-##FILTER=<ID=AMBIGUOUS_SEQUENOM_CALLS,Description="Possible Sequenom miscalls based on manual review of cluster plots">
-##FILTER=<ID=DUPLICATE_MAPPING,Description="Site did not map uniquely in the genome">
-##FILTER=<ID=HIGH_NO_CALL_RATE,Description="Extremely high no-call rate">
-##FILTER=<ID=INCORRECT_SEQUENOM_CALLS,Description="Clear Sequenom miscalls that cannot easily be fixed based on manual review of cluster plots">
-##FILTER=<ID=NOT_DESIGNED,Description="Site did not design or genotype">
-##FILTER=<ID=POLYMORPHIC_SAMPLES_FAILED,Description="All polymorphic samples from sequencing were no-called">
-##FILTER=<ID=POSSIBLE_PROBE_FAILURE,Description="Suspicious genotyping based on nearby SNPs">
-##fileDate=20110524
-##reference=ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/human_g1k_v37.fasta.gz
-##source=EricBanksValidationQC;fromGoncaloAbecasisValidationSelection
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	HG00127	HG00128	HG00136	HG00137	HG00138	HG00139	HG00152	HG00156	HG00234	HG00235	HG00237	HG00242	HG00244	HG00262	HG01055	HG01079	NA19138	NA18974	NA18523	NA12717	NA19209	NA18577	NA18973	NA18943	NA12873	NA18623	NA18622	NA18948	NA19171	NA19204	NA06994	NA18563	NA18547	NA18861	NA18608	NA12282	NA12751	NA18959	NA19331	NA19453	NA20537	NA12046	NA20515	NA20516	NA20521	NA20524	NA20528	NA20759	NA20768	NA20769	NA20774	NA20775	NA20783	NA20787	NA20790	NA2080 [...]
-20	82176	rs11906362	T	C	318	NOT_DESIGNED	BCM.AC=16;DB;SRC=VQSR+2-OF-7
-20	249843	rs112456910	C	T	1304	PASS	BCM.AC=14;DB;SEQUENOM.AC=12;SRC=VQSR+INTERSECTION	GT	0/0	0/0	0/0	.	0/0	0/0	0/0	0/0	0/0	.	0/0	.	0/0	0/0	0/0	.	0/0	0/0	0/0	0/0	0/0	.	0/0	0/0	0/0	0/0	0/0	.	0/0	0/0	0/0	0/0	.	.	0/0	.	.	0/0	0/0	0/0	0/0	0/0	.	0/0	0/0	.	0/0	.	0/0	0/0	.	.	.	0/0	.	0/0	0/0	.	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	.	0/0	0/0	0/0	.	.	0/0	0/1	.	.	0/0	0/0	.	0/0	.	.	.	0/0	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0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	 [...]
-20	62918298	.	G	A	33	NOT_DESIGNED	SRC=VQSR+2-OF-7
-20	62961477	.	T	C	17	AMBIGUOUS_SEQUENOM_CALLS	SEQUENOM.AC=0;SRC=VQSR+2-OF-7	GT	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0 [...]
diff --git a/tests/vcf-examples/8.vcf b/tests/vcf-examples/8.vcf
deleted file mode 100644
index 4ec2daf..0000000
--- a/tests/vcf-examples/8.vcf
+++ /dev/null
@@ -1,84 +0,0 @@
-##fileformat=VCFv4.0
-##FILTER=<ID=HardyWeinbergViolation,Description="The validation is in Hardy-Weinberg violation">
-##FILTER=<ID=HighNoCallRate,Description="The validation no-call rate is too high">
-##FILTER=<ID=TooManyHomVars,Description="The validation homozygous variant rate is too high">
-##INFO=<ID=AC,Number=1,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
-##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
-##INFO=<ID=HW,Number=1,Type=Float,Description="Phred-scaled Hardy-Weinberg violation p-value">
-##INFO=<ID=HetPct,Number=1,Type=Float,Description="Percent of heterozygous genotypes">
-##INFO=<ID=HomRefPct,Number=1,Type=Float,Description="Percent of homozygous reference genotypes">
-##INFO=<ID=HomVarPct,Number=1,Type=Float,Description="Percent homozygous variant genotypes">
-##INFO=<ID=NoCallPct,Number=1,Type=Float,Description="Percent of no-calls">
-##ValidationMetrics_HardyWeinbergViolations="25 (8%)"
-##ValidationMetrics_HomVarViolations="0 (0%)"
-##ValidationMetrics_NoCallViolations="13 (4%)"
-##ValidationMetrics_PolymorphicPassingRecords="195 (75%)"
-##ValidationMetrics_RecordsPassingFilters="258 (87%)"
-##ValidationMetrics_RecordsProcessed=296
-##ValidationMetrics_SamplesAssayed=383
-##VariantValidationAssessor="analysis_type=VariantValidationAssessor input_file=[] sample_metadata=[] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=null excludeIntervals=null reference_sequence=/humgen/1kg/reference/human_g1k_v37.fasta rodBind=[rawData/plink.renamed.sorted.fixed.vcf] rodToIntervalTrackName=null BTI_merge_rule=UNION nonDeterministicRandomSeed=false DBSNP=null downsampling_type=null downsample_to_fraction=null downsample_to_coverage=null baq=OFF baqGap [...]
-##source=PLINK
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	HG00127	HG00128	HG00136	HG00137	HG00138	HG00139	HG00152	HG00156	HG00234	HG00235	HG00237	HG00242	HG00244	HG00262	HG01055	HG01079	NA19138	NA18974	NA18523	NA12717	NA19209	NA18577	NA18973	NA18943	NA12873	NA18623	NA18622	NA18948	NA19171	NA19204	NA06994	NA18563	NA18547	NA18861	NA18608	NA18995	NA10851	NA18976	NA18603	NA19200	HG01204	HG01191	HG01101	HG00146	HG00306	NA18985	HG00160	HG00635	HG00372	HG00357	HG00634	NA18541	NA18950	NA19759	HG00351	HG0025 [...]
-20	676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0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	0/0	 [...]
diff --git a/tests/vcf-examples/9.vcf b/tests/vcf-examples/9.vcf
deleted file mode 100644
index e0d112c..0000000
--- a/tests/vcf-examples/9.vcf
+++ /dev/null
@@ -1,1000 +0,0 @@
-##fileformat=VCFv4.0
-#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	DNA_pool_A
-chr1	1281168	.	A	G	14	.	DP=37;AF1=0.6243;CI95=0.5,1;DP4=4,0,6,0;MQ=15;PV4=1,0.027,1,1	PL:GT:GQ	43,0,4:0/1:6
-chr1	1281205	.	T	C	26	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	58,9,0:1/1:63
-chr1	1281206	.	G	C	25	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	57,9,0:1/1:63
-chr1	1922737	.	G	C	13.2	.	DP=21;AF1=1;CI95=1,1;DP4=0,0,0,21;MQ=22	PL:GT:GQ	46,63,0:1/1:99
-chr1	21197513	.	A	G	55.1	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=41	PL:GT:GQ	88,21,0:1/1:84
-chr1	21343209	.	T	C	5.45	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=14	PL:GT:GQ	37,51,0:1/1:99
-chr1	22097362	.	T	C	4.75	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	35,9,0:1/1:63
-chr1	22254012	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	22650927	.	G	A	48.1	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=24	PL:GT:GQ	81,21,0:1/1:84
-chr1	23535401	.	C	T	40.4	.	DP=25;AF1=1;CI95=0.5,1;DP4=0,16,0,5;MQ=19;PV4=1,0.2,1,1	PL:GT:GQ	73,13,0:1/1:65
-chr1	23543855	.	T	C	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=44	PL:GT:GQ	82,18,0:1/1:90
-chr1	24245107	.	C	G	32	.	DP=4;AF1=0.5001;CI95=0.5,0.5;DP4=0,2,0,2;MQ=36;PV4=1,1,1,1	PL:GT:GQ	62,0,35:0/1:38
-chr1	24274412	.	G	C	39.5	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=32	PL:GT:GQ	72,12,0:1/1:72
-chr1	36529832	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr1	37788090	.	A	G	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr1	43120440	.	C	T	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=49;PV4=1,1,1,1	PL:GT:GQ	64,0,31:0/1:34
-chr1	43980466	.	C	T	43	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=19	PL:GT:GQ	76,45,0:1/1:99
-chr1	46047795	.	T	C	29.1	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=31	PL:GT:GQ	62,18,0:1/1:90
-chr1	48860309	.	C	T	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=46	PL:GT:GQ	141,18,0:1/1:90
-chr1	49415599	.	T	C	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	34,6,0:1/1:49
-chr1	51601816	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	51955459	.	G	C	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr1	68479569	.	T	G	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	43,6,0:1/1:49
-chr1	69032455	.	A	G	15.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	47,9,0:1/1:63
-chr1	71888225	.	G	T	9.31	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr1	72381528	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr1	82004013	.	A	G	37.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	70,12,0:1/1:72
-chr1	86289622	.	C	T	18	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	50,9,0:1/1:63
-chr1	90267663	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=45	PL:GT:GQ	54,9,0:1/1:63
-chr1	92699542	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr1	94867317	.	G	A	26.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	58,6,0:1/1:49
-chr1	96428713	.	C	G	3.98	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=27	PL:GT:GQ	33,6,0:1/1:49
-chr1	100466329	.	G	C	4.85	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=22	PL:GT:GQ	36,18,0:1/1:90
-chr1	101909281	.	G	A	70	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=4,0,5,0;MQ=46;PV4=1,1,0.096,1	PL:GT:GQ	100,0,88:0/1:91
-chr1	106216572	.	T	A	22	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,16,0;MQ=21	PL:GT:GQ	55,48,0:1/1:99
-chr1	107901770	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	40,6,0:1/1:49
-chr1	108431179	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=41	PL:GT:GQ	155,24,0:1/1:96
-chr1	112005344	.	C	T	99	.	DP=52;AF1=1;CI95=1,1;DP4=7,0,27,0;MQ=44;PV4=1,1,1,1	PL:GT:GQ	196,25,0:1/1:99
-chr1	116625452	.	C	T	36	.	DP=44;AF1=0.5;CI95=0.5,0.5;DP4=0,23,0,20;MQ=49;PV4=1,2.3e-69,0.42,1	PL:GT:GQ	66,0,179:0/1:69
-chr1	118060710	.	G	T	6.98	.	DP=8;AF1=0.4999;CI95=0.5,0.5;DP4=4,0,3,0;MQ=47;PV4=1,0.0071,1,1	PL:GT:GQ	36,0,73:0/1:39
-chr1	118198177	.	A	G	15.9	.	DP=23;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	47,6,0:1/1:49
-chr1	118586346	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr1	120809555	.	G	A	20	.	DP=8;AF1=0.5;CI95=0.5,0.5;DP4=6,0,2,0;MQ=46;PV4=1,1,1,1	PL:GT:GQ	50,0,106:0/1:53
-chr1	130723110	.	C	A	20.7	.	DP=8;AF1=0.5939;CI95=0.5,1;DP4=0,6,0,2;MQ=26;PV4=1,1,1,1	PL:GT:GQ	50,0,5:0/1:7
-chr1	133979895	.	T	C	14.9	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	46,6,0:1/1:49
-chr1	134977940	.	C	T	30	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=38;PV4=1,1,0.26,1	PL:GT:GQ	60,0,31:0/1:34
-chr1	141768589	.	G	A	18.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=4,0,4,0;MQ=51;PV4=1,2.7e-05,1,1	PL:GT:GQ	48,0,100:0/1:51
-chr1	141768590	.	G	A	22	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=2,0,4,0;MQ=50;PV4=1,0.0033,1,1	PL:GT:GQ	52,0,40:0/1:43
-chr1	146506051	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=43	PL:GT:GQ	76,9,0:1/1:63
-chr1	150997009	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr1	162915612	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	168455400	.	A	G	4.12	.	DP=28;AF1=1;CI95=1,1;DP4=0,0,0,27;MQ=10	PL:GT:GQ	35,81,0:1/1:99
-chr1	172784744	.	T	C	17.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	49,6,0:1/1:49
-chr1	183627307	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	185789457	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr1	187081827	.	T	C	4.77	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=17	PL:GT:GQ	36,30,0:1/1:99
-chr1	188468339	.	C	T	33	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=24	PL:GT:GQ	66,39,0:1/1:99
-chr1	188595435	.	C	T	41.8	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr1	188670561	.	G	C	3.55	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=18	PL:GT:GQ	34,27,0:1/1:99
-chr1	188924877	.	G	A	6.2	.	DP=10;AF1=0.9999;CI95=0.5,1;DP4=2,0,3,0;MQ=21;PV4=1,1,1,0.3	PL:GT:GQ	35,3,0:1/1:41
-chr1	190536295	.	G	A	68	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,36,0;MQ=18	PL:GT:GQ	101,108,0:1/1:99
-chr1	191129408	.	T	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr1	195937816	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr1	198857619	.	T	C	89	.	DP=61;AF1=0.5;CI95=0.5,0.5;DP4=0,38,0,17;MQ=30;PV4=1,0.032,1,1	PL:GT:GQ	119,0,139:0/1:99
-chr1	199057483	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	44,6,0:1/1:49
-chr1	200133619	.	G	C	5.83	.	DP=49;AF1=1;CI95=0.5,1;DP4=2,0,8,0;MQ=17;PV4=1,0.059,1,0.2	PL:GT:GQ	37,12,0:1/1:72
-chr1	200729661	.	A	T	36	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=27	PL:GT:GQ	69,42,0:1/1:99
-chr1	201374519	.	T	C	69.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=39	PL:GT:GQ	102,12,0:1/1:72
-chr1	202811668	.	G	A	20.2	.	DP=4;AF1=0.5163;CI95=0.5,1;DP4=0,1,0,3;MQ=24;PV4=1,1,1,1	PL:GT:GQ	50,0,12:0/1:15
-chr1	202960650	.	C	T	16.6	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=27	PL:GT:GQ	49,12,0:1/1:72
-chr1	205686638	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr1	205949857	.	A	G	3.14	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=21	PL:GT:GQ	33,15,0:1/1:75
-chr1	209806643	.	A	G	13.2	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=21	PL:GT:GQ	46,24,0:1/1:96
-chr1	209871501	.	C	T	25	.	DP=12;AF1=0.5;CI95=0.5,0.5;DP4=5,0,4,0;MQ=41;PV4=1,7.7e-06,1,1	PL:GT:GQ	55,0,84:0/1:58
-chr1	211051323	.	G	A	99	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=49	PL:GT:GQ	176,24,0:1/1:96
-chr1	211389716	.	C	T	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	43,6,0:1/1:49
-chr1	211868415	.	G	A	3.54	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=14	PL:GT:GQ	34,33,0:1/1:99
-chr1	211914531	.	C	T	84.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,1,0,4;MQ=46;PV4=1,1,1,1	PL:GT:GQ	116,7,0:1/1:57
-chr1	214691313	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr1	215184650	.	C	T	40.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	72,6,0:1/1:49
-chr1	215995258	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr1	217031394	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr1	217986960	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	76,9,0:1/1:63
-chr1	218086681	.	A	G	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=34	PL:GT:GQ	142,27,0:1/1:99
-chr1	218546019	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr1	218632417	.	G	T	17.1	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=26	PL:GT:GQ	50,21,0:1/1:84
-chr1	218833355	.	C	G	23	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=5,0,2,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	53,0,63:0/1:56
-chr1	219303186	.	T	C	7.79	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,25;MQ=12	PL:GT:GQ	40,75,0:1/1:99
-chr1	219517634	.	G	A	26.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=42	PL:GT:GQ	59,12,0:1/1:72
-chr1	219590158	.	T	C	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	33,12,0:1/1:72
-chr1	219709853	.	A	T	99	.	DP=124;AF1=0.5;CI95=0.5,0.5;DP4=80,0,41,0;MQ=44;PV4=1,0.26,1,1	PL:GT:GQ	143,0,156:0/1:99
-chr1	222457988	.	A	G	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=23	PL:GT:GQ	42,6,0:1/1:49
-chr1	222477914	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr1	223010233	.	A	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr1	223796360	.	G	A	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=21	PL:GT:GQ	37,6,0:1/1:49
-chr1	224273784	.	A	T	14.2	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=15	PL:GT:GQ	47,30,0:1/1:99
-chr1	224454685	.	C	T	46.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=32	PL:GT:GQ	79,15,0:1/1:75
-chr1	224514706	.	G	C	21	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,38,0;MQ=19	PL:GT:GQ	54,114,0:1/1:99
-chr1	224515793	.	C	T	99	.	DP=26;AF1=1;CI95=1,1;DP4=0,0,26,0;MQ=45	PL:GT:GQ	211,78,0:1/1:99
-chr1	224692969	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	40,6,0:1/1:49
-chr1	225607249	.	A	G	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=45;PV4=1,1,0,1	PL:GT:GQ	64,0,31:0/1:34
-chr1	226923918	.	C	A	29.1	.	DP=52;AF1=1;CI95=0.5,1;DP4=0,2,0,10;MQ=27;PV4=1,1,1,1	PL:GT:GQ	62,18,0:1/1:90
-chr1	227125189	.	T	C	56.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=41	PL:GT:GQ	89,12,0:1/1:72
-chr1	227133712	.	A	T	20.1	.	DP=26;AF1=0.5;CI95=0.5,0.5;DP4=11,0,10,0;MQ=23;PV4=1,1,0.48,1	PL:GT:GQ	50,0,39:0/1:42
-chr1	227943954	.	G	C	47	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=37	PL:GT:GQ	79,9,0:1/1:63
-chr1	227943974	.	G	A	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=34	PL:GT:GQ	66,12,0:1/1:72
-chr1	228067480	.	A	G	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=45	PL:GT:GQ	75,15,0:1/1:75
-chr1	228067510	.	A	G	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=45	PL:GT:GQ	140,15,0:1/1:75
-chr1	228088778	.	C	T	6.79	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=23	PL:GT:GQ	37,6,0:1/1:49
-chr1	228117888	.	A	C	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	45,6,0:1/1:49
-chr1	228139641	.	T	C	44.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	77,12,0:1/1:72
-chr1	228577146	.	T	C	26	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,14;MQ=22;PV4=1,1,1,0.027	PL:GT:GQ	56,0,77:0/1:59
-chr1	229001369	.	C	A	45	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	77,9,0:1/1:63
-chr1	229001386	.	C	T	8.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	39,6,0:1/1:49
-chr1	229348080	.	T	C	18.1	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=40;PV4=1,0.33,0.17,0.33	PL:GT:GQ	48,0,31:0/1:34
-chr1	229439710	.	C	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=32	PL:GT:GQ	66,12,0:1/1:72
-chr1	229655149	.	T	C	30	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=30	PL:GT:GQ	63,24,0:1/1:96
-chr1	229660873	.	C	G	81	.	DP=28;AF1=0.5;CI95=0.5,0.5;DP4=0,20,0,7;MQ=36;PV4=1,1,1,1	PL:GT:GQ	111,0,120:0/1:99
-chr2a	3661005	.	C	G	24	.	DP=13;AF1=0.5001;CI95=0.5,0.5;DP4=7,0,4,0;MQ=27;PV4=1,1.1e-05,1,1	PL:GT:GQ	54,0,34:0/1:37
-chr2a	4140063	.	G	A	81	.	DP=26;AF1=0.6671;CI95=0.5,1;DP4=18,0,8,0;MQ=24;PV4=1,8.3e-09,1,1	PL:GT:GQ	110,0,3:0/1:5
-chr2a	4248440	.	T	C	20	.	DP=28;AF1=0.5;CI95=0.5,0.5;DP4=11,0,7,0;MQ=25;PV4=1,1,0.47,1	PL:GT:GQ	50,0,92:0/1:53
-chr2a	4707656	.	A	G	63	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	95,9,0:1/1:63
-chr2a	5194801	.	G	A	7.59	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=24	PL:GT:GQ	38,6,0:1/1:49
-chr2a	14111103	.	A	G	7.84	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=20	PL:GT:GQ	40,21,0:1/1:84
-chr2a	17799746	.	A	G	11.3	.	DP=5;AF1=0.5001;CI95=0.5,0.5;DP4=0,3,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	41,0,35:0/1:37
-chr2a	24728910	.	G	A	45.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=28	PL:GT:GQ	78,15,0:1/1:75
-chr2a	29627939	.	G	T	5.44	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=27	PL:GT:GQ	36,9,0:1/1:63
-chr2a	31373164	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr2a	33935228	.	T	C	41.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr2a	36311856	.	G	A	99	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,0,29;MQ=44	PL:GT:GQ	213,87,0:1/1:99
-chr2a	39281204	.	T	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr2a	41087565	.	C	T	74.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=38	PL:GT:GQ	107,12,0:1/1:72
-chr2a	45574768	.	C	A	11.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=18	PL:GT:GQ	43,9,0:1/1:63
-chr2a	55464464	.	T	C	26.1	.	DP=7;AF1=0.9966;CI95=0.5,1;DP4=5,0,2,0;MQ=26;PV4=1,1,1,1	PL:GT:GQ	55,1,0:1/1:23
-chr2a	63107673	.	T	A	70.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=34	PL:GT:GQ	103,12,0:1/1:72
-chr2a	63141732	.	A	T	22.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	54,6,0:1/1:49
-chr2a	63141910	.	G	A	3.41	.	DP=16;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr2a	63141911	.	C	T	9.55	.	DP=16;AF1=0.5031;CI95=0.5,0.5;DP4=0,2,0,3;MQ=33;PV4=1,0.43,1,1	PL:GT:GQ	39,0,19:0/1:22
-chr2a	63143543	.	C	T	28	.	DP=18;AF1=1;CI95=1,1;DP4=0,1,0,17;MQ=16;PV4=1,1,1,1	PL:GT:GQ	61,42,0:1/1:99
-chr2a	66419805	.	G	A	3.69	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	34,15,0:1/1:75
-chr2a	66563922	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr2a	67719136	.	C	T	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	71,6,0:1/1:49
-chr2a	72781453	.	A	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr2a	76733211	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr2a	78190502	.	A	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr2a	85021209	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr2a	88554861	.	A	T	39	.	DP=74;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,4;MQ=46;PV4=1,1,1,1	PL:GT:GQ	69,0,92:0/1:72
-chr2a	88554877	.	A	G	92	.	DP=90;AF1=0.5;CI95=0.5,0.5;DP4=0,23,0,13;MQ=41;PV4=1,0.3,1,1	PL:GT:GQ	122,0,128:0/1:99
-chr2a	88824857	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr2a	93546675	.	C	T	26	.	DP=6;AF1=0.5;CI95=0.5,0.5;DP4=4,0,2,0;MQ=46;PV4=1,1,1,1	PL:GT:GQ	56,0,87:0/1:59
-chr2a	94788853	.	A	G	34.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	67,15,0:1/1:75
-chr2a	96738146	.	T	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr2a	102737384	.	A	G	12.3	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,18,0;MQ=11	PL:GT:GQ	45,54,0:1/1:99
-chr2a	103407172	.	A	G	35	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=19	PL:GT:GQ	68,24,0:1/1:96
-chr2a	105774580	.	T	G	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=30	PL:GT:GQ	135,39,0:1/1:99
-chr2a	106376301	.	C	G	24.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=19	PL:GT:GQ	57,18,0:1/1:90
-chr2a	106376315	.	C	T	8.75	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=19	PL:GT:GQ	41,18,0:1/1:90
-chr2a	112422267	.	C	T	30	.	DP=20;AF1=0.5;CI95=0.5,0.5;DP4=14,0,5,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	60,0,131:0/1:63
-chr2b	3049384	.	A	C	14.9	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	3049385	.	G	C	14.9	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	3049406	.	C	G	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=36	PL:GT:GQ	135,18,0:1/1:90
-chr2b	4213802	.	T	C	89.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr2b	5022895	.	G	A	66	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=49	PL:GT:GQ	99,30,0:1/1:99
-chr2b	6037666	.	G	T	56	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=17	PL:GT:GQ	89,39,0:1/1:99
-chr2b	13656952	.	G	A	19.2	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=21	PL:GT:GQ	52,18,0:1/1:90
-chr2b	15026944	.	A	G	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	37,6,0:1/1:49
-chr2b	23362613	.	A	G	5.64	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	37,15,0:1/1:75
-chr2b	45947861	.	C	G	68	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=50	PL:GT:GQ	101,33,0:1/1:99
-chr2b	46597824	.	T	C	65.6	.	DP=39;AF1=0.5939;CI95=0.5,1;DP4=23,0,10,0;MQ=22;PV4=1,0.014,1,1	PL:GT:GQ	95,0,5:0/1:7
-chr2b	49665191	.	G	T	34.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=37	PL:GT:GQ	67,21,0:1/1:84
-chr2b	61001546	.	A	G	48	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=26	PL:GT:GQ	81,24,0:1/1:96
-chr2b	88502851	.	T	C	4.77	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,2;MQ=37;PV4=1,1,0.46,1	PL:GT:GQ	33,0,34:0/1:33
-chr2b	91675431	.	C	T	30	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=27	PL:GT:GQ	63,24,0:1/1:96
-chr2b	91870148	.	T	G	67	.	DP=14;AF1=1;CI95=1,1;DP4=0,1,0,13;MQ=47;PV4=1,1,1,1	PL:GT:GQ	100,31,0:1/1:99
-chr2b	97066826	.	G	A	20.1	.	DP=9;AF1=0.5001;CI95=0.5,0.5;DP4=0,6,0,2;MQ=31;PV4=1,1,1,1	PL:GT:GQ	50,0,35:0/1:38
-chr2b	97670822	.	G	A	4.85	.	DP=6;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=18	PL:GT:GQ	36,18,0:1/1:90
-chr2b	102773175	.	A	G	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	49,9,0:1/1:63
-chr2b	109805532	.	T	C	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=45	PL:GT:GQ	176,24,0:1/1:96
-chr2b	110841448	.	A	G	11.1	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	42,6,0:1/1:49
-chr2b	123217025	.	T	C	31.5	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=37	PL:GT:GQ	64,12,0:1/1:72
-chr2b	123263214	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	43,9,0:1/1:63
-chr2b	127747292	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=52	PL:GT:GQ	100,9,0:1/1:63
-chr2b	130121958	.	A	G	89.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	122,15,0:1/1:75
-chr2b	130253633	.	A	G	14.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr2b	130692761	.	C	T	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=51	PL:GT:GQ	82,18,0:1/1:90
-chr2b	130743365	.	A	G	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=42	PL:GT:GQ	140,15,0:1/1:75
-chr2b	131553874	.	A	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=37	PL:GT:GQ	43,9,0:1/1:63
-chr2b	131716894	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=40	PL:GT:GQ	137,24,0:1/1:96
-chr2b	131716936	.	G	A	99	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=36	PL:GT:GQ	173,36,0:1/1:99
-chr2b	131716952	.	A	G	99	.	DP=22;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,14;MQ=36;PV4=1,1,1,1	PL:GT:GQ	152,0,43:0/1:46
-chr2b	133360184	.	C	T	99	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,20;MQ=32	PL:GT:GQ	163,60,0:1/1:99
-chr2b	133644741	.	T	A	16.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=27	PL:GT:GQ	49,15,0:1/1:75
-chr2b	133720595	.	T	C	41	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=29	PL:GT:GQ	74,36,0:1/1:99
-chr2b	133727192	.	C	T	19.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	52,15,0:1/1:75
-chr2b	133727260	.	G	A	3.56	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=18	PL:GT:GQ	34,24,0:1/1:95
-chr2b	133800294	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=23	PL:GT:GQ	40,6,0:1/1:49
-chr2b	134582754	.	A	C	56.1	.	DP=37;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=36	PL:GT:GQ	89,21,0:1/1:84
-chr2b	134582763	.	G	C	78	.	DP=37;AF1=1;CI95=1,1;DP4=0,0,0,36;MQ=34	PL:GT:GQ	111,108,0:1/1:99
-chr2b	134809668	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr3	527814	.	C	G	46	.	DP=9;AF1=0.5;CI95=0.5,0.5;DP4=6,0,3,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	76,0,106:0/1:79
-chr3	559510	.	G	A	38	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=10,0,17,0;MQ=28;PV4=1,1,0.014,1	PL:GT:GQ	68,0,111:0/1:71
-chr3	879433	.	T	G	32	.	DP=4;AF1=0.5001;CI95=0.5,0.5;DP4=2,0,2,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	62,0,34:0/1:37
-chr3	1809645	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr3	3235812	.	C	T	7.59	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	38,6,0:1/1:49
-chr3	3250176	.	A	G	83	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=32	PL:GT:GQ	116,24,0:1/1:96
-chr3	5049073	.	T	A	99	.	DP=25;AF1=0.5;CI95=0.5,0.5;DP4=16,0,9,0;MQ=39;PV4=1,1,1,1	PL:GT:GQ	136,0,129:0/1:99
-chr3	5142874	.	G	A	99	.	DP=38;AF1=1;CI95=1,1;DP4=0,0,38,0;MQ=28	PL:GT:GQ	179,114,0:1/1:99
-chr3	5554864	.	T	C	3.54	.	DP=7;AF1=0.4999;CI95=0.5,0.5;DP4=0,4,0,3;MQ=27;PV4=1,1,1,1	PL:GT:GQ	31,0,35:0/1:33
-chr3	5749648	.	G	A	21.2	.	DP=26;AF1=0.7303;CI95=0.5,1;DP4=0,7,0,7;MQ=26;PV4=1,0.16,1,0.17	PL:GT:GQ	50,0,2:0/1:3
-chr3	16451708	.	A	T	71.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=38	PL:GT:GQ	104,15,0:1/1:75
-chr3	23410276	.	G	A	99	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	140,15,0:1/1:75
-chr3	51368824	.	A	G	28	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	60,9,0:1/1:63
-chr3	53000453	.	A	G	54	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=19	PL:GT:GQ	87,30,0:1/1:99
-chr3	53000463	.	A	G	54	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=19	PL:GT:GQ	87,30,0:1/1:99
-chr3	59077423	.	C	T	77.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=33	PL:GT:GQ	110,15,0:1/1:75
-chr3	60040501	.	T	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	43,9,0:1/1:63
-chr3	64203481	.	A	G	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	66,12,0:1/1:72
-chr3	67947441	.	C	T	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr3	76372631	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	76,9,0:1/1:63
-chr3	80611316	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr3	81554381	.	G	T	17.6	.	DP=24;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=26	PL:GT:GQ	50,12,0:1/1:72
-chr3	87614647	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr3	93900455	.	A	T	11.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=13	PL:GT:GQ	44,15,0:1/1:75
-chr3	96174457	.	A	G	4.11	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=24	PL:GT:GQ	34,9,0:1/1:63
-chr3	96215569	.	A	C	3.41	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr3	96587998	.	A	C	7.08	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,6,0;MQ=17	PL:GT:GQ	39,18,0:1/1:90
-chr3	99711220	.	A	C	12.8	.	DP=11;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	42,2,0:1/1:37
-chr3	99789741	.	C	G	99	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=47	PL:GT:GQ	210,51,0:1/1:99
-chr3	103667651	.	A	C	3.98	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	33,6,0:1/1:49
-chr3	104604896	.	G	C	55	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	87,9,0:1/1:63
-chr3	104997217	.	G	A	33.1	.	DP=18;AF1=1;CI95=1,1;DP4=1,0,16,0;MQ=34;PV4=1,3e-10,0.17,0.36	PL:GT:GQ	66,19,0:1/1:76
-chr3	106097816	.	A	G	28	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=26	PL:GT:GQ	61,45,0:1/1:99
-chr3	106822259	.	G	C	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=50	PL:GT:GQ	140,15,0:1/1:75
-chr3	109946413	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	44,6,0:1/1:49
-chr3	121238963	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr3	126248567	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	45,6,0:1/1:49
-chr3	129733836	.	A	G	6.2	.	DP=4;AF1=0.5003;CI95=0.5,0.5;DP4=1,0,3,0;MQ=43;PV4=1,0.02,0.31,1	PL:GT:GQ	35,0,28:0/1:30
-chr3	131372785	.	C	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=34	PL:GT:GQ	76,9,0:1/1:63
-chr3	132290987	.	C	T	22	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=45	PL:GT:GQ	54,9,0:1/1:63
-chr3	136054421	.	C	T	73	.	DP=82;AF1=1;CI95=1,1;DP4=0,0,78,0;MQ=28	PL:GT:GQ	106,235,0:1/1:99
-chr3	141075246	.	G	A	30.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=41	PL:GT:GQ	62,6,0:1/1:49
-chr3	141075262	.	T	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=41	PL:GT:GQ	73,6,0:1/1:49
-chr3	141430649	.	G	T	81.8	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,1,0,4;MQ=41;PV4=1,0.34,1,0.25	PL:GT:GQ	113,6,0:1/1:49
-chr3	143617747	.	G	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	54,9,0:1/1:63
-chr3	163576128	.	C	T	5.6	.	DP=4;AF1=0.7302;CI95=0.5,1;DP4=2,0,2,0;MQ=23;PV4=1,1,1,1	PL:GT:GQ	33,0,2:0/1:3
-chr3	163839828	.	A	G	4.45	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=26	PL:GT:GQ	35,12,0:1/1:72
-chr3	175839340	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr3	190193258	.	G	T	3.98	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	33,6,0:1/1:49
-chr3	190777007	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr3	190970350	.	A	G	61	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=37	PL:GT:GQ	94,30,0:1/1:99
-chr3	198686408	.	G	A	36.6	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,1,0,16;MQ=25;PV4=1,1,0.026,1	PL:GT:GQ	69,11,0:1/1:66
-chr3	199277478	.	T	C	3.61	.	DP=6;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=21	PL:GT:GQ	34,18,0:1/1:90
-chr3	199780181	.	G	T	77	.	DP=45;AF1=0.5;CI95=0.5,0.5;DP4=0,35,0,10;MQ=33;PV4=1,1,1,1	PL:GT:GQ	107,0,114:0/1:99
-chr3	199889335	.	A	C	9.54	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=18	PL:GT:GQ	42,24,0:1/1:96
-chr3	200018161	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr4	195475	.	A	G	13	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	44,6,0:1/1:49
-chr4	639141	.	C	A	14.9	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	46,6,0:1/1:49
-chr4	639152	.	C	T	15.2	.	DP=17;AF1=0.5016;CI95=0.5,0.5;DP4=0,2,0,2;MQ=33;PV4=1,1,1,1	PL:GT:GQ	45,0,22:0/1:25
-chr4	986497	.	G	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=33	PL:GT:GQ	163,30,0:1/1:99
-chr4	986516	.	C	T	55.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=37	PL:GT:GQ	88,21,0:1/1:84
-chr4	1207485	.	A	C	14.9	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	46,6,0:1/1:49
-chr4	1323502	.	G	A	13.2	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=22	PL:GT:GQ	46,33,0:1/1:99
-chr4	1613521	.	G	A	89	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,16,0;MQ=32	PL:GT:GQ	122,48,0:1/1:99
-chr4	1748790	.	C	T	38	.	DP=21;AF1=0.5005;CI95=0.5,0.5;DP4=6,0,8,0;MQ=40;PV4=1,0.09,1,1	PL:GT:GQ	68,0,27:0/1:30
-chr4	2255732	.	T	C	99	.	DP=29;AF1=1;CI95=1,1;DP4=0,0,28,0;MQ=31	PL:GT:GQ	186,84,0:1/1:99
-chr4	3010159	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr4	3545023	.	A	G	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=38	PL:GT:GQ	145,27,0:1/1:99
-chr4	3586344	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr4	3879337	.	A	G	16.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	49,12,0:1/1:72
-chr4	3940733	.	A	G	47.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	80,15,0:1/1:75
-chr4	4410338	.	T	C	13.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=31	PL:GT:GQ	46,15,0:1/1:75
-chr4	4796408	.	T	C	41	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=17	PL:GT:GQ	74,48,0:1/1:99
-chr4	4796414	.	A	G	11.3	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,15;MQ=17	PL:GT:GQ	44,45,0:1/1:99
-chr4	6436959	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr4	9494256	.	T	C	3.41	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=37	PL:GT:GQ	32,6,0:1/1:49
-chr4	24881479	.	G	A	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	46,9,0:1/1:63
-chr4	26128644	.	A	G	23	.	DP=18;AF1=0.5006;CI95=0.5,0.5;DP4=8,0,10,0;MQ=22;PV4=1,1,1,1	PL:GT:GQ	53,0,26:0/1:29
-chr4	42109100	.	G	A	17.1	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	49,9,0:1/1:63
-chr4	42309652	.	C	T	68	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr4	46913966	.	C	T	9.08	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=16	PL:GT:GQ	41,12,0:1/1:72
-chr4	50335142	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr4	51658550	.	C	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr4	58258023	.	T	C	26	.	DP=5;AF1=0.5002;CI95=0.5,0.5;DP4=0,3,0,2;MQ=34;PV4=1,1,1,0.05	PL:GT:GQ	56,0,32:0/1:35
-chr4	59219112	.	C	A	42.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=50	PL:GT:GQ	75,12,0:1/1:72
-chr4	62746067	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr4	67404338	.	G	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=39	PL:GT:GQ	66,12,0:1/1:72
-chr4	73353380	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr4	73946294	.	G	C	4.77	.	DP=51;AF1=0.4999;CI95=0.5,0.5;DP4=0,5,0,3;MQ=40;PV4=1,0.19,0.37,0.11	PL:GT:GQ	33,0,64:0/1:36
-chr4	79607484	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr4	82337365	.	G	C	90	.	DP=54;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=28	PL:GT:GQ	123,48,0:1/1:99
-chr4	82653801	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	34,9,0:1/1:63
-chr4	87130164	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	43,9,0:1/1:63
-chr4	87130176	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	43,9,0:1/1:63
-chr4	91459729	.	C	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr4	96130778	.	G	C	99	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,0,19;MQ=45	PL:GT:GQ	211,57,0:1/1:99
-chr4	100709417	.	A	G	45.1	.	DP=16;AF1=0.505;CI95=0.5,0.5;DP4=12,0,4,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	75,0,17:0/1:20
-chr4	107276770	.	C	T	70	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,6;MQ=31;PV4=1,1,1,1	PL:GT:GQ	100,0,97:0/1:98
-chr4	115327550	.	G	C	42	.	DP=67;AF1=1;CI95=1,1;DP4=0,1,0,66;MQ=35;PV4=1,3.2e-24,0.13,1	PL:GT:GQ	75,162,0:1/1:99
-chr4	136558502	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr4	159572459	.	G	A	15.1	.	DP=126;AF1=0.5;CI95=0.5,0.5;DP4=0,69,0,57;MQ=39;PV4=1,4.1e-96,0.077,1	PL:GT:GQ	45,0,175:0/1:48
-chr4	174968484	.	G	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	40,6,0:1/1:49
-chr4	175030633	.	T	C	14.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=29	PL:GT:GQ	47,18,0:1/1:90
-chr4	183410027	.	G	T	6.2	.	DP=31;AF1=0.5003;CI95=0.5,0.5;DP4=2,0,2,0;MQ=45;PV4=1,0.035,1,0.21	PL:GT:GQ	35,0,28:0/1:30
-chr4	190907368	.	T	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=50	PL:GT:GQ	66,12,0:1/1:72
-chr4	192175690	.	A	G	76.8	.	DP=7;AF1=0.95;CI95=0.5,1;DP4=0,3,0,4;MQ=35;PV4=1,1,1,1	PL:GT:GQ	105,0,0:1/1:10
-chr4	192673268	.	G	A	14.2	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=22	PL:GT:GQ	47,27,0:1/1:99
-chr4	192943966	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr4	195460104	.	C	G	23.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=19	PL:GT:GQ	56,24,0:1/1:96
-chr4	198277830	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr5	170098	.	A	G	13	.	DP=12;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	44,6,0:1/1:49
-chr5	395814	.	T	C	4.77	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,2;MQ=36;PV4=1,1,0.48,1	PL:GT:GQ	33,0,33:0/1:33
-chr5	414024	.	T	A	10.4	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=20	PL:GT:GQ	42,9,0:1/1:63
-chr5	496767	.	T	C	13.9	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr5	805676	.	C	G	45	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=32	PL:GT:GQ	78,51,0:1/1:99
-chr5	1252896	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr5	1418370	.	G	A	3.65	.	DP=8;AF1=0.7301;CI95=0.5,1;DP4=4,0,4,0;MQ=13;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr5	1494911	.	G	C	62	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=46	PL:GT:GQ	95,24,0:1/1:96
-chr5	1494932	.	C	T	6.98	.	DP=8;AF1=0.5001;CI95=0.5,0.5;DP4=1,0,2,0;MQ=46;PV4=1,0.1,0.077,1	PL:GT:GQ	36,0,31:0/1:33
-chr5	1506037	.	T	C	24.1	.	DP=24;AF1=1;CI95=0.5,1;DP4=11,0,13,0;MQ=16;PV4=1,1,1,1	PL:GT:GQ	55,5,0:1/1:46
-chr5	1509406	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	73,6,0:1/1:49
-chr5	1733649	.	A	G	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,25;MQ=47	PL:GT:GQ	212,75,0:1/1:99
-chr5	1747304	.	A	G	12.3	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=19	PL:GT:GQ	45,36,0:1/1:99
-chr5	1747308	.	C	A	44	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=19	PL:GT:GQ	77,36,0:1/1:99
-chr5	3519783	.	C	T	21.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=18	PL:GT:GQ	54,24,0:1/1:96
-chr5	4101593	.	A	G	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=43	PL:GT:GQ	102,12,0:1/1:72
-chr5	7204332	.	T	A	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=24	PL:GT:GQ	34,6,0:1/1:49
-chr5	11510398	.	A	C	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=51;PV4=1,1,0,1	PL:GT:GQ	64,0,31:0/1:34
-chr5	15406720	.	T	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	36,6,0:1/1:49
-chr5	25152417	.	C	A	10.9	.	DP=28;AF1=0.5718;CI95=0.5,1;DP4=0,2,0,6;MQ=25;PV4=1,1,0.21,1	PL:GT:GQ	40,0,6:0/1:8
-chr5	39072637	.	A	G	35.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=50	PL:GT:GQ	68,15,0:1/1:75
-chr5	46022699	.	G	A	44	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=35	PL:GT:GQ	76,9,0:1/1:63
-chr5	55664181	.	C	G	10.4	.	DP=8;AF1=0.9999;CI95=0.5,1;DP4=3,0,5,0;MQ=18;PV4=1,1,1,1	PL:GT:GQ	40,3,0:1/1:41
-chr5	56253386	.	T	C	50.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=36	PL:GT:GQ	83,21,0:1/1:84
-chr5	56253447	.	C	T	42.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=45	PL:GT:GQ	75,12,0:1/1:72
-chr5	71950166	.	G	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr5	72703090	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	40,6,0:1/1:49
-chr5	73570280	.	G	T	5.45	.	DP=41;AF1=1;CI95=1,1;DP4=0,0,41,0;MQ=15	PL:GT:GQ	37,123,0:1/1:99
-chr5	73701762	.	G	T	40.8	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	72,6,0:1/1:49
-chr5	76956867	.	T	C	10.2	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	41,6,0:1/1:49
-chr5	79097961	.	C	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	54,9,0:1/1:63
-chr5	87026167	.	T	C	22	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr5	97680525	.	T	C	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=23	PL:GT:GQ	33,12,0:1/1:72
-chr5	100674737	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr5	105389966	.	T	C	3.52	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=15	PL:GT:GQ	33,9,0:1/1:63
-chr5	109998341	.	A	C	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr5	120629105	.	C	T	6.79	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	37,6,0:1/1:49
-chr5	128383954	.	C	T	23	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=0,5,0,5;MQ=48;PV4=1,3.3e-07,1,1	PL:GT:GQ	53,0,98:0/1:56
-chr5	133925142	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr5	135375404	.	T	C	11.8	.	DP=6;AF1=1;CI95=0.5,1;DP4=1,0,3,0;MQ=31;PV4=1,0.03,1,1	PL:GT:GQ	42,4,0:1/1:45
-chr5	136498281	.	T	G	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr5	136717285	.	A	G	82.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	115,12,0:1/1:72
-chr5	136910734	.	G	A	62	.	DP=19;AF1=1;CI95=1,1;DP4=0,1,0,13;MQ=23;PV4=1,1,1,1	PL:GT:GQ	95,31,0:1/1:99
-chr5	141208149	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr5	148056348	.	C	A	37.1	.	DP=4;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=38;PV4=1,1,1,1	PL:GT:GQ	66,1,0:1/1:23
-chr5	151941534	.	G	T	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=34	PL:GT:GQ	79,12,0:1/1:72
-chr5	159967229	.	G	C	22.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	55,12,0:1/1:72
-chr5	174024541	.	T	G	29.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	59,2,0:1/1:37
-chr5	175525290	.	A	G	3.27	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=20	PL:GT:GQ	33,12,0:1/1:72
-chr5	175988954	.	A	C	14.2	.	DP=23;AF1=0.5;CI95=0.5,0.5;DP4=0,6,0,4;MQ=47;PV4=1,1,0.2,1	PL:GT:GQ	44,0,76:0/1:47
-chr5	176782226	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr5	179132834	.	C	G	99	.	DP=28;AF1=1;CI95=1,1;DP4=0,0,0,28;MQ=41	PL:GT:GQ	207,84,0:1/1:99
-chr5	180155809	.	G	C	3.01	.	DP=36;AF1=0.4997;CI95=0.5,0.5;DP4=25,0,9,0;MQ=35;PV4=1,1e-15,1,1	PL:GT:GQ	30,0,121:0/1:33
-chr5	181282819	.	T	G	38.3	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,2,0,9;MQ=23;PV4=1,1,1,1	PL:GT:GQ	71,14,0:1/1:70
-chr5	182426125	.	G	C	29	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=26	PL:GT:GQ	61,9,0:1/1:63
-chr5	182443682	.	G	A	3.69	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=21	PL:GT:GQ	34,15,0:1/1:75
-chr5	183008993	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr5	183312016	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr6_cox_hap1	519146	.	G	A	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=30	PL:GT:GQ	49,9,0:1/1:63
-chr6_cox_hap1	687497	.	A	G	33	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=2,0,4,0;MQ=35;PV4=1,0.0016,1,1	PL:GT:GQ	63,3,0:1/1:41
-chr6_qbl_hap2	120066	.	T	C	99	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	139,27,0:1/1:99
-chr6	277954	.	C	T	53	.	DP=41;AF1=1;CI95=1,1;DP4=4,0,37,0;MQ=19;PV4=1,1,0.3,1	PL:GT:GQ	86,49,0:1/1:99
-chr6	593158	.	A	G	4.61	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	34,6,0:1/1:49
-chr6	2865562	.	T	G	25	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=23	PL:GT:GQ	58,27,0:1/1:99
-chr6	3751403	.	G	A	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=32	PL:GT:GQ	75,15,0:1/1:75
-chr6	3884989	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr6	4127278	.	A	T	13.9	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr6	5887783	.	C	G	99	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=34	PL:GT:GQ	142,21,0:1/1:84
-chr6	5887811	.	C	T	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=34	PL:GT:GQ	88,21,0:1/1:84
-chr6	6937170	.	G	C	99	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,0,47;MQ=28	PL:GT:GQ	157,141,0:1/1:99
-chr6	7262317	.	C	T	13.2	.	DP=50;AF1=0.5;CI95=0.5,0.5;DP4=21,0,9,0;MQ=36;PV4=1,4e-05,0.17,0.26	PL:GT:GQ	43,0,158:0/1:46
-chr6	7533214	.	A	G	10.4	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=26	PL:GT:GQ	42,9,0:1/1:63
-chr6	20979907	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=38	PL:GT:GQ	76,9,0:1/1:63
-chr6	22321632	.	A	G	41	.	DP=5;AF1=0.5004;CI95=0.5,0.5;DP4=1,0,3,0;MQ=46;PV4=1,0.24,0.19,0.33	PL:GT:GQ	71,0,28:0/1:31
-chr6	25352296	.	G	A	7.8	.	DP=4;AF1=0.5003;CI95=0.5,0.5;DP4=0,1,0,3;MQ=38;PV4=1,1,0.16,1	PL:GT:GQ	37,0,28:0/1:30
-chr6	26298040	.	T	A	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=48;PV4=1,1,0.21,0.33	PL:GT:GQ	64,0,31:0/1:34
-chr6	33428755	.	G	A	70	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=32	PL:GT:GQ	103,27,0:1/1:99
-chr6	39512099	.	G	A	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=50	PL:GT:GQ	88,21,0:1/1:84
-chr6	39961094	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr6	40452120	.	A	G	40.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	72,6,0:1/1:49
-chr6	43204766	.	A	G	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=51	PL:GT:GQ	176,24,0:1/1:96
-chr6	52696512	.	C	T	70	.	DP=76;AF1=0.5;CI95=0.5,0.5;DP4=0,34,0,42;MQ=18;PV4=1,0.11,1,1	PL:GT:GQ	100,0,51:0/1:54
-chr6	53785550	.	A	G	99	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=46	PL:GT:GQ	190,30,0:1/1:99
-chr6	53897484	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr6	57038290	.	C	T	10.2	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	41,6,0:1/1:49
-chr6	62925087	.	G	C	35	.	DP=5;AF1=0.5008;CI95=0.5,0.5;DP4=1,0,4,0;MQ=36;PV4=1,1,0.2,1	PL:GT:GQ	65,0,25:0/1:28
-chr6	62925094	.	T	C	25.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=36	PL:GT:GQ	58,15,0:1/1:75
-chr6	70834405	.	G	A	72.1	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=29	PL:GT:GQ	105,21,0:1/1:84
-chr6	71026058	.	C	T	48.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=42	PL:GT:GQ	81,18,0:1/1:90
-chr6	74420752	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	76,9,0:1/1:63
-chr6	77498624	.	T	C	16.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	48,6,0:1/1:49
-chr6	80416836	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr6	113611590	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=46	PL:GT:GQ	100,9,0:1/1:63
-chr6	119308431	.	T	C	38.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=40	PL:GT:GQ	71,12,0:1/1:72
-chr6	151758592	.	T	C	3.07	.	DP=17;AF1=0.9966;CI95=0.5,1;DP4=0,8,0,9;MQ=13;PV4=1,1,1,1	PL:GT:GQ	29,1,0:1/1:23
-chr6	151759358	.	A	G	99	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=12,0,15,0;MQ=44;PV4=1,1,1,0.19	PL:GT:GQ	171,0,128:0/1:99
-chr6	154741755	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr6	161061053	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=52	PL:GT:GQ	40,6,0:1/1:49
-chr6	161474189	.	C	T	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	36,6,0:1/1:49
-chr6	164304657	.	C	T	10.4	.	DP=63;AF1=0.5;CI95=0.5,0.5;DP4=0,29,0,19;MQ=22;PV4=1,7.7e-11,1,0.049	PL:GT:GQ	40,0,37:0/1:38
-chr6	164703105	.	T	C	99	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=40	PL:GT:GQ	165,30,0:1/1:99
-chr6	167518328	.	A	G	78	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=27,0,14,0;MQ=33;PV4=1,0.026,0.43,0.056	PL:GT:GQ	108,0,149:0/1:99
-chr6	169906323	.	G	A	41.8	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr6	171893912	.	G	A	69.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=33	PL:GT:GQ	102,15,0:1/1:75
-chr6	173631604	.	A	G	6.98	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=4,0,3,0;MQ=37;PV4=1,0.069,1,1	PL:GT:GQ	36,0,34:0/1:35
-chr7	835856	.	C	T	27.5	.	DP=13;AF1=0.9998;CI95=0.5,1;DP4=4,0,6,0;MQ=23;PV4=1,0.46,1,1	PL:GT:GQ	57,2,0:1/1:37
-chr7	1046005	.	C	T	11.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=36	PL:GT:GQ	43,9,0:1/1:63
-chr7	1564339	.	C	T	71	.	DP=66;AF1=0.5;CI95=0.5,0.5;DP4=36,0,24,0;MQ=29;PV4=1,1,0.35,1	PL:GT:GQ	101,0,134:0/1:99
-chr7	1806266	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr7	1936013	.	G	T	7.77	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=17	PL:GT:GQ	39,9,0:1/1:63
-chr7	2319532	.	C	A	4.11	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=14	PL:GT:GQ	34,9,0:1/1:63
-chr7	2682121	.	C	T	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr7	3248116	.	T	C	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=37;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr7	3624766	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	40,6,0:1/1:49
-chr7	5291140	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=37	PL:GT:GQ	45,6,0:1/1:49
-chr7	5314457	.	C	A	3.56	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=18	PL:GT:GQ	34,24,0:1/1:95
-chr7	5595072	.	T	A	79	.	DP=13;AF1=0.5;CI95=0.5,0.5;DP4=8,0,5,0;MQ=31;PV4=1,1,1,1	PL:GT:GQ	109,0,57:0/1:60
-chr7	5646060	.	G	C	7.79	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=10	PL:GT:GQ	40,30,0:1/1:99
-chr7	6056816	.	C	G	7.08	.	DP=6;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=23;PV4=1,1,1,1	PL:GT:GQ	35,1,0:1/1:23
-chr7	6412641	.	C	T	40	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=33	PL:GT:GQ	73,33,0:1/1:99
-chr7	6766874	.	A	G	34.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=43	PL:GT:GQ	67,15,0:1/1:75
-chr7	8482729	.	C	T	5.08	.	DP=16;AF1=0.8276;CI95=0.5,1;DP4=3,0,3,0;MQ=22;PV4=1,1,1,0.19	PL:GT:GQ	32,0,1:1/1:5
-chr7	9238362	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr7	9687781	.	G	A	33	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=0,16,0,12;MQ=48;PV4=1,6.5e-38,1,1	PL:GT:GQ	63,0,170:0/1:66
-chr7	9752803	.	A	T	14.2	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=18	PL:GT:GQ	47,27,0:1/1:99
-chr7	10240910	.	T	C	45.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	78,12,0:1/1:72
-chr7	11046187	.	C	T	86.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=47	PL:GT:GQ	119,12,0:1/1:72
-chr7	11548207	.	C	G	14.6	.	DP=13;AF1=1;CI95=0.5,1;DP4=6,1,0,5;MQ=18;PV4=0.015,1,1,1	PL:GT:GQ	46,7,0:1/1:57
-chr7	11580317	.	C	T	42	.	DP=12;AF1=1;CI95=1,1;DP4=0,1,0,10;MQ=22;PV4=1,1,1,1	PL:GT:GQ	75,23,0:1/1:92
-chr7	11585384	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr7	13498356	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	73,6,0:1/1:49
-chr7	13500887	.	G	A	15.1	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=22	PL:GT:GQ	48,30,0:1/1:99
-chr7	13827079	.	C	T	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	36,6,0:1/1:49
-chr7	14403976	.	T	G	59	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=39	PL:GT:GQ	92,24,0:1/1:96
-chr7	14756588	.	A	G	44	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=5,0,10,0;MQ=44;PV4=1,5.3e-18,1,1	PL:GT:GQ	74,0,70:0/1:72
-chr7	14756619	.	T	G	44	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=5,0,10,0;MQ=44;PV4=1,6.4e-10,1,1	PL:GT:GQ	74,0,70:0/1:72
-chr7	36734598	.	A	C	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	42,6,0:1/1:49
-chr7	36734599	.	A	T	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	42,6,0:1/1:49
-chr7	36734603	.	G	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=40	PL:GT:GQ	40,6,0:1/1:49
-chr7	40634921	.	A	C	55	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=39	PL:GT:GQ	88,39,0:1/1:99
-chr7	48271285	.	A	T	73	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=25	PL:GT:GQ	106,30,0:1/1:99
-chr7	56264700	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr7	62326003	.	C	A	26.1	.	DP=35;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=28	PL:GT:GQ	59,18,0:1/1:90
-chr7	109468934	.	T	G	5.13	.	DP=10;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=39;PV4=1,0.031,1,1	PL:GT:GQ	33,2,0:1/1:37
-chr7	110208327	.	C	G	16.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	48,6,0:1/1:49
-chr7	125654934	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=27	PL:GT:GQ	34,9,0:1/1:63
-chr7	125770209	.	A	C	32	.	DP=31;AF1=0.5;CI95=0.5,0.5;DP4=11,0,13,0;MQ=34;PV4=1,0.00017,0.16,0.22	PL:GT:GQ	62,0,105:0/1:65
-chr7	125770265	.	G	C	36	.	DP=16;AF1=0.5;CI95=0.5,0.5;DP4=0,5,0,5;MQ=48;PV4=1,0.0047,0.016,0.035	PL:GT:GQ	66,0,110:0/1:69
-chr7	126687042	.	A	G	21.1	.	DP=36;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=22	PL:GT:GQ	54,21,0:1/1:84
-chr7	132292897	.	G	T	99	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=43	PL:GT:GQ	167,21,0:1/1:84
-chr7	132334562	.	A	C	23	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=23	PL:GT:GQ	56,30,0:1/1:99
-chr7	132431838	.	C	T	13.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=1,0,4,0;MQ=23;PV4=1,1,1,1	PL:GT:GQ	44,5,0:1/1:46
-chr7	136324945	.	T	C	13.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	46,12,0:1/1:72
-chr7	136957634	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr7	141746871	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	40,6,0:1/1:49
-chr7	146831870	.	C	T	4.77	.	DP=14;AF1=0.5003;CI95=0.5,0.5;DP4=1,0,3,0;MQ=37;PV4=1,0.0029,0.28,1	PL:GT:GQ	33,0,28:0/1:30
-chr7	147142770	.	T	C	45	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=31	PL:GT:GQ	77,9,0:1/1:63
-chr7	147713906	.	C	T	4.77	.	DP=8;AF1=0.5002;CI95=0.5,0.5;DP4=2,0,4,0;MQ=35;PV4=1,8.9e-06,0.48,0.27	PL:GT:GQ	33,0,29:0/1:31
-chr7	148742642	.	G	A	68	.	DP=14;AF1=0.5032;CI95=0.5,0.5;DP4=4,0,10,0;MQ=28;PV4=1,1,1,1	PL:GT:GQ	98,0,19:0/1:22
-chr7	148879148	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr7	149484407	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr7	152444478	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	44,6,0:1/1:49
-chr7	154106613	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=51	PL:GT:GQ	100,9,0:1/1:63
-chr7	154776891	.	G	T	14.4	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	47,15,0:1/1:75
-chr7	155882061	.	A	C	29	.	DP=24;AF1=0.502;CI95=0.5,0.5;DP4=0,1,0,4;MQ=46;PV4=1,0.018,0.15,0.29	PL:GT:GQ	59,0,21:0/1:24
-chr7	155956844	.	G	C	23	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,4;MQ=38;PV4=1,1,0.38,1	PL:GT:GQ	53,0,103:0/1:56
-chr7	156277694	.	G	A	62	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=46	PL:GT:GQ	95,24,0:1/1:96
-chr7	156720588	.	T	C	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr7	156807649	.	T	C	3.01	.	DP=30;AF1=0.4997;CI95=0.5,0.5;DP4=0,4,0,3;MQ=43;PV4=1,0.16,0.15,1	PL:GT:GQ	30,0,72:0/1:33
-chr7	157331292	.	G	T	43.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=34	PL:GT:GQ	76,21,0:1/1:84
-chr7	157382957	.	T	C	33.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	66,12,0:1/1:72
-chr8	556382	.	A	G	37.1	.	DP=5;AF1=0.9966;CI95=0.5,1;DP4=2,0,3,0;MQ=31;PV4=1,1,1,1	PL:GT:GQ	66,1,0:1/1:23
-chr8	1661673	.	T	C	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr8	7379751	.	C	A	6.24	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=19	PL:GT:GQ	38,21,0:1/1:84
-chr8	8160505	.	A	T	68.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	101,12,0:1/1:72
-chr8	8160508	.	C	T	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	57,12,0:1/1:72
-chr8	16781011	.	A	G	55.5	.	DP=9;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=34	PL:GT:GQ	88,12,0:1/1:72
-chr8	18716499	.	A	T	20	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=0,4,0,2;MQ=29;PV4=1,1,1,1	PL:GT:GQ	50,0,52:0/1:51
-chr8	23326483	.	A	G	60	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=47	PL:GT:GQ	92,9,0:1/1:63
-chr8	25842819	.	T	A	12	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	43,6,0:1/1:49
-chr8	26300279	.	T	C	34	.	DP=44;AF1=1;CI95=1,1;DP4=0,0,41,0;MQ=21	PL:GT:GQ	67,123,0:1/1:99
-chr8	29673470	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	73,6,0:1/1:49
-chr8	29673473	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=41	PL:GT:GQ	40,6,0:1/1:49
-chr8	31685466	.	C	T	34	.	DP=17;AF1=0.5;CI95=0.5,0.5;DP4=10,0,5,0;MQ=28;PV4=1,0.072,1,0.36	PL:GT:GQ	64,0,50:0/1:53
-chr8	37378739	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr8	51325952	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr8	59221963	.	G	A	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr8	62764995	.	T	G	20	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=32	PL:GT:GQ	52,9,0:1/1:63
-chr8	63157426	.	C	G	41.6	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,7,0,15;MQ=19;PV4=1,1,1,0.25	PL:GT:GQ	74,11,0:1/1:66
-chr8	68710444	.	G	A	30	.	DP=5;AF1=0.6671;CI95=0.5,1;DP4=3,0,2,0;MQ=32;PV4=1,1,1,1	PL:GT:GQ	59,0,3:0/1:5
-chr8	76416560	.	G	A	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=46	PL:GT:GQ	122,12,0:1/1:72
-chr8	81425275	.	T	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=50	PL:GT:GQ	100,9,0:1/1:63
-chr8	89842286	.	G	C	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=30	PL:GT:GQ	34,6,0:1/1:49
-chr8	100926281	.	G	A	38	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	70,9,0:1/1:63
-chr8	102746002	.	G	C	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr8	107850176	.	C	T	43.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=45	PL:GT:GQ	76,18,0:1/1:90
-chr8	109966441	.	T	C	27.3	.	DP=9;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=38	PL:GT:GQ	60,15,0:1/1:75
-chr8	118811716	.	G	T	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=50	PL:GT:GQ	155,18,0:1/1:90
-chr8	119440254	.	A	T	58.5	.	DP=5;AF1=0.8277;CI95=0.5,1;DP4=2,0,3,0;MQ=34;PV4=1,1,1,0.14	PL:GT:GQ	87,0,1:1/1:5
-chr8	121236024	.	G	A	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	71,6,0:1/1:49
-chr8	125489079	.	C	T	13	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr8	128502549	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr8	128502551	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr8	130951113	.	G	A	4.61	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=19	PL:GT:GQ	34,6,0:1/1:49
-chr8	135307123	.	G	A	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	36,6,0:1/1:49
-chr8	138814155	.	C	T	57.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	90,18,0:1/1:90
-chr8	140566111	.	A	G	18.1	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=15	PL:GT:GQ	51,36,0:1/1:99
-chr8	141586480	.	T	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr8	143376712	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr8	150662729	.	T	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr8	150741294	.	A	G	25.1	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=34	PL:GT:GQ	58,18,0:1/1:90
-chr8	150975618	.	A	G	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr8	151580103	.	T	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=20	PL:GT:GQ	36,6,0:1/1:49
-chr8	151634410	.	G	T	48	.	DP=17;AF1=0.5;CI95=0.5,0.5;DP4=0,12,0,5;MQ=39;PV4=1,0.072,1,1	PL:GT:GQ	78,0,125:0/1:81
-chr8	151709267	.	G	A	91.1	.	DP=8;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,7;MQ=40;PV4=1,1,0.28,0.37	PL:GT:GQ	121,0,16:0/1:19
-chr8	152636420	.	G	A	8.75	.	DP=3;AF1=0.9966;CI95=0.5,1;DP4=0,1,0,2;MQ=30;PV4=1,1,1,1	PL:GT:GQ	37,1,0:1/1:23
-chr8	152706967	.	G	A	3.01	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=16	PL:GT:GQ	33,30,0:1/1:99
-chr8	152786522	.	T	C	80.1	.	DP=16;AF1=0.5102;CI95=0.5,0.5;DP4=0,4,0,12;MQ=31;PV4=1,0.25,1,1	PL:GT:GQ	110,0,14:0/1:17
-chr8	152863132	.	T	G	5.44	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=30	PL:GT:GQ	36,9,0:1/1:63
-chr9	23235268	.	C	T	12	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	43,6,0:1/1:49
-chr9	26391176	.	T	C	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	47,6,0:1/1:49
-chr9	26868232	.	C	G	63	.	DP=20;AF1=0.5025;CI95=0.5,0.5;DP4=7,0,13,0;MQ=22;PV4=1,0.2,1,0.44	PL:GT:GQ	93,0,20:0/1:23
-chr9	34223668	.	C	T	22	.	DP=16;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,7;MQ=27;PV4=1,0.14,0.34,1	PL:GT:GQ	52,0,79:0/1:55
-chr9	39696645	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr9	40654130	.	T	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr9	41145321	.	T	G	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	79,12,0:1/1:72
-chr9	42273483	.	G	A	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr9	55633192	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	58705807	.	T	C	70	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=24	PL:GT:GQ	103,30,0:1/1:99
-chr9	61697149	.	C	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	63152790	.	A	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr9	63703913	.	C	G	90.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=38	PL:GT:GQ	123,21,0:1/1:84
-chr9	65116068	.	T	C	70	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=49	PL:GT:GQ	103,39,0:1/1:99
-chr9	71266598	.	C	A	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	33,6,0:1/1:49
-chr9	73188677	.	G	T	52	.	DP=294;AF1=1;CI95=1,1;DP4=44,0,245,0;MQ=33;PV4=1,0.28,0.0092,1	PL:GT:GQ	85,147,0:1/1:99
-chr9	78854179	.	G	T	22	.	DP=97;AF1=0.5;CI95=0.5,0.5;DP4=21,0,12,0;MQ=44;PV4=1,0.02,0.032,0.0033	PL:GT:GQ	52,0,158:0/1:55
-chr9	82964679	.	A	C	13.2	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=36	PL:GT:GQ	45,9,0:1/1:63
-chr9	84124545	.	G	T	57	.	DP=11;AF1=0.5;CI95=0.5,0.5;DP4=2,0,3,0;MQ=49;PV4=1,1,0.024,1	PL:GT:GQ	87,0,59:0/1:62
-chr9	86552862	.	C	T	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=26	PL:GT:GQ	47,15,0:1/1:75
-chr9	87548941	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr9	89021101	.	G	A	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr9	90447825	.	G	A	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	40,6,0:1/1:49
-chr9	92462035	.	C	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	40,6,0:1/1:49
-chr9	93077294	.	T	G	5.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=31	PL:GT:GQ	36,9,0:1/1:63
-chr9	93998137	.	G	A	68	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=46	PL:GT:GQ	100,9,0:1/1:63
-chr9	93998148	.	C	T	21.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=36	PL:GT:GQ	54,15,0:1/1:75
-chr9	95028964	.	C	A	99	.	DP=83;AF1=0.5;CI95=0.5,0.5;DP4=0,57,0,26;MQ=32;PV4=1,9.3e-08,1,0.092	PL:GT:GQ	134,0,120:0/1:99
-chr9	103829155	.	A	G	33	.	DP=96;AF1=1;CI95=1,1;DP4=0,0,96,0;MQ=16	PL:GT:GQ	66,255,0:1/1:99
-chr9	104981331	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	73,6,0:1/1:49
-chr9	111070656	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr9	117395657	.	T	C	16.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	49,15,0:1/1:75
-chr9	117718907	.	A	G	46.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=29	PL:GT:GQ	79,18,0:1/1:90
-chr9	119149161	.	T	C	3.14	.	DP=65;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	33,15,0:1/1:75
-chr9	124528802	.	G	A	78	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=25	PL:GT:GQ	111,39,0:1/1:99
-chr9	126707903	.	G	A	26	.	DP=37;AF1=0.5;CI95=0.5,0.5;DP4=0,21,0,8;MQ=46;PV4=1,2.6e-07,0.21,0.42	PL:GT:GQ	56,0,175:0/1:59
-chr9	128700686	.	C	G	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	66,12,0:1/1:72
-chr9	129084077	.	G	A	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr9	129116900	.	A	T	20	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	52,9,0:1/1:63
-chr9	130290720	.	C	G	21.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=42	PL:GT:GQ	53,6,0:1/1:49
-chr9	130306057	.	C	G	71	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=28	PL:GT:GQ	104,42,0:1/1:99
-chr9	130528990	.	G	A	99	.	DP=31;AF1=1;CI95=1,1;DP4=0,0,31,0;MQ=27	PL:GT:GQ	174,93,0:1/1:99
-chr9	130529002	.	A	T	7.79	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=15	PL:GT:GQ	40,33,0:1/1:99
-chr9	130639996	.	A	G	8.44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	39,6,0:1/1:49
-chr9	130704890	.	A	G	3.27	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=26	PL:GT:GQ	33,12,0:1/1:72
-chr9	130708345	.	G	A	13.3	.	DP=11;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=38;PV4=1,0.096,1,1	PL:GT:GQ	42,1,0:1/1:23
-chr9	131001601	.	T	A	3.98	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	33,6,0:1/1:49
-chr9	131058539	.	T	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	44,6,0:1/1:49
-chr9	131808965	.	C	T	42	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	75,27,0:1/1:99
-chr9	132551867	.	C	T	17.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	49,9,0:1/1:63
-chr9	132685120	.	A	G	4.75	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	35,9,0:1/1:63
-chr9	133175050	.	A	G	18.1	.	DP=30;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=20	PL:GT:GQ	51,51,0:1/1:99
-chr9	133584978	.	A	G	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,25,0;MQ=45	PL:GT:GQ	212,75,0:1/1:99
-chr9	133661895	.	A	G	99	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=31	PL:GT:GQ	138,42,0:1/1:99
-chr9	133670376	.	T	C	68	.	DP=19;AF1=1;CI95=1,1;DP4=0,1,0,16;MQ=39;PV4=1,1.4e-20,1,1	PL:GT:GQ	101,39,0:1/1:99
-chr9	133843777	.	T	C	99	.	DP=9;AF1=0.5129;CI95=0.5,0.5;DP4=1,0,8,0;MQ=43;PV4=1,1,1,1	PL:GT:GQ	154,0,13:0/1:16
-chr9	134017265	.	G	C	3.27	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=13	PL:GT:GQ	33,12,0:1/1:72
-chr9	134105563	.	T	C	34.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=39	PL:GT:GQ	67,18,0:1/1:90
-chr9	134608906	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr9	134861929	.	T	A	9.49	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	41,9,0:1/1:63
-chr10	796662	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	54,9,0:1/1:63
-chr10	1216716	.	T	A	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr10	1220781	.	G	A	21	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=18	PL:GT:GQ	54,27,0:1/1:99
-chr10	1225208	.	T	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=47	PL:GT:GQ	100,9,0:1/1:63
-chr10	1727946	.	T	C	14.2	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=27	PL:GT:GQ	47,21,0:1/1:84
-chr10	5986542	.	T	C	83	.	DP=93;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=39	PL:GT:GQ	116,30,0:1/1:99
-chr10	6436277	.	G	A	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	36,6,0:1/1:49
-chr10	7704114	.	C	A	35	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=0,2,0,4;MQ=29;PV4=1,0.27,1,0.27	PL:GT:GQ	65,3,0:1/1:41
-chr10	10881734	.	A	G	9.52	.	DP=9;AF1=0.5;CI95=0.5,0.5;DP4=4,0,5,0;MQ=42;PV4=1,0.0026,0.14,1	PL:GT:GQ	39,0,91:0/1:42
-chr10	13099383	.	G	A	27.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	60,12,0:1/1:72
-chr10	15764077	.	G	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=40	PL:GT:GQ	43,9,0:1/1:63
-chr10	18091502	.	T	C	47	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	79,9,0:1/1:63
-chr10	19645913	.	A	T	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	47,6,0:1/1:49
-chr10	22845062	.	C	T	18.1	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=18	PL:GT:GQ	51,21,0:1/1:84
-chr10	28282802	.	T	C	69	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,12,0;MQ=42	PL:GT:GQ	102,36,0:1/1:99
-chr10	28496872	.	T	G	8.44	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	39,6,0:1/1:49
-chr10	32746793	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	73,6,0:1/1:49
-chr10	41437604	.	T	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr10	43051239	.	C	T	6.98	.	DP=3;AF1=0.5001;CI95=0.5,0.5;DP4=1,0,2,0;MQ=40;PV4=1,0.33,0.33,1	PL:GT:GQ	36,0,31:0/1:33
-chr10	44455192	.	C	T	4.41	.	DP=6;AF1=0.8276;CI95=0.5,1;DP4=0,3,0,3;MQ=21;PV4=1,1,1,1	PL:GT:GQ	31,0,1:1/1:5
-chr10	48387336	.	A	G	13	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr10	51561705	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr10	51561712	.	C	G	39.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	71,6,0:1/1:49
-chr10	55617954	.	G	A	8.44	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	39,6,0:1/1:49
-chr10	55718281	.	T	A	3.41	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=32	PL:GT:GQ	32,6,0:1/1:49
-chr10	55888771	.	T	C	23.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	56,12,0:1/1:72
-chr10	56025569	.	C	G	34.1	.	DP=3;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,2;MQ=39;PV4=1,1,1,1	PL:GT:GQ	64,0,16:0/1:19
-chr10	57384943	.	G	T	84	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=16,0,13,0;MQ=26;PV4=1,0.015,1,1	PL:GT:GQ	114,0,110:0/1:99
-chr10	59873077	.	T	G	49	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=42	PL:GT:GQ	82,24,0:1/1:96
-chr10	61329572	.	C	T	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	47,6,0:1/1:49
-chr10	63790636	.	T	G	32.1	.	DP=19;AF1=1;CI95=1,1;DP4=1,0,10,0;MQ=28;PV4=1,0.14,1,1	PL:GT:GQ	65,22,0:1/1:88
-chr10	64466048	.	C	G	18.2	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=28	PL:GT:GQ	51,18,0:1/1:90
-chr10	65053440	.	G	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=39	PL:GT:GQ	153,30,0:1/1:99
-chr10	65407358	.	C	G	84.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	117,15,0:1/1:75
-chr10	65605291	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr10	66104447	.	T	C	99	.	DP=47;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,21;MQ=34;PV4=1,1,0.15,1	PL:GT:GQ	136,0,162:0/1:99
-chr10	82160859	.	G	C	99	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,13;MQ=36	PL:GT:GQ	153,39,0:1/1:99
-chr10	82198579	.	C	T	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr10	87086290	.	A	G	4.13	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=17	PL:GT:GQ	35,27,0:1/1:99
-chr10	89550621	.	T	G	74	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,0,45;MQ=45	PL:GT:GQ	107,135,0:1/1:99
-chr10	92325046	.	G	A	42.3	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=45	PL:GT:GQ	75,15,0:1/1:75
-chr10	94488050	.	A	G	5.46	.	DP=4;AF1=0.5;CI95=0.5,0.5;DP4=2,0,2,0;MQ=43;PV4=1,0.16,1,1	PL:GT:GQ	34,0,34:0/1:34
-chr10	95024815	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr10	95466306	.	G	A	53	.	DP=7;AF1=0.6671;CI95=0.5,1;DP4=0,4,0,3;MQ=33;PV4=1,1,1,1	PL:GT:GQ	82,0,3:0/1:5
-chr10	100256777	.	T	G	3.83	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=23	PL:GT:GQ	34,12,0:1/1:72
-chr10	101510485	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr10	101530760	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr10	101879744	.	T	C	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=44	PL:GT:GQ	54,9,0:1/1:63
-chr10	102147276	.	G	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=33	PL:GT:GQ	43,9,0:1/1:63
-chr10	102642248	.	T	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr10	107666616	.	T	C	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=43	PL:GT:GQ	40,6,0:1/1:49
-chr10	108319945	.	C	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	43,9,0:1/1:63
-chr10	109734371	.	G	A	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr10	112870604	.	C	T	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=36	PL:GT:GQ	79,12,0:1/1:72
-chr10	115304673	.	T	C	11.3	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr10	119380588	.	G	A	14.2	.	DP=4;AF1=0.502;CI95=0.5,0.5;DP4=1,0,3,0;MQ=43;PV4=1,0.18,0.32,1	PL:GT:GQ	44,0,21:0/1:24
-chr10	123063756	.	C	T	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=23	PL:GT:GQ	46,9,0:1/1:63
-chr10	128424770	.	T	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	45,6,0:1/1:49
-chr10	131229204	.	T	C	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr10	132420570	.	G	C	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr10	132528066	.	C	T	99	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,19,0;MQ=42	PL:GT:GQ	213,57,0:1/1:99
-chr10	132644619	.	G	A	19.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=23	PL:GT:GQ	52,15,0:1/1:75
-chr10	132707581	.	G	C	9.11	.	DP=51;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=25;PV4=1,1,1,1	PL:GT:GQ	38,2,0:1/1:37
-chr10	133026892	.	T	C	55.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=44	PL:GT:GQ	88,18,0:1/1:90
-chr11	768033	.	T	C	33.5	.	DP=4;AF1=0.8277;CI95=0.5,1;DP4=0,2,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	62,0,1:1/1:5
-chr11	768042	.	T	C	33.5	.	DP=6;AF1=0.8277;CI95=0.5,1;DP4=0,2,0,2;MQ=32;PV4=1,1,1,1	PL:GT:GQ	62,0,1:1/1:5
-chr11	874568	.	G	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	66,12,0:1/1:72
-chr11	1009210	.	T	C	4	.	DP=70;AF1=0.6241;CI95=0.5,1;DP4=0,3,0,8;MQ=24;PV4=1,1,0.5,1	PL:GT:GQ	31,0,4:0/1:6
-chr11	1016692	.	C	T	27	.	DP=39;AF1=1;CI95=1,1;DP4=0,0,0,38;MQ=22	PL:GT:GQ	60,114,0:1/1:99
-chr11	1034477	.	A	G	66	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	98,9,0:1/1:63
-chr11	1074037	.	G	A	4.13	.	DP=9;AF1=0.5001;CI95=0.5,0.5;DP4=4,0,5,0;MQ=24;PV4=1,1,0.43,1	PL:GT:GQ	32,0,30:0/1:31
-chr11	1556298	.	G	A	11.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=33	PL:GT:GQ	44,12,0:1/1:72
-chr11	1824777	.	T	C	27	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=28	PL:GT:GQ	60,30,0:1/1:99
-chr11	3395801	.	C	T	22	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	54,9,0:1/1:63
-chr11	3411901	.	G	A	4.75	.	DP=17;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=29	PL:GT:GQ	35,9,0:1/1:63
-chr11	3731606	.	A	C	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr11	3783855	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr11	3967636	.	A	G	4.29	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=24	PL:GT:GQ	35,15,0:1/1:75
-chr11	4385618	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr11	4424365	.	T	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr11	5295586	.	C	T	3.01	.	DP=52;AF1=0.4997;CI95=0.5,0.5;DP4=33,0,10,0;MQ=29;PV4=1,0.0045,0.3,0.17	PL:GT:GQ	30,0,131:0/1:33
-chr11	6157144	.	C	G	45.1	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=35	PL:GT:GQ	78,21,0:1/1:84
-chr11	6352044	.	C	T	18	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=31	PL:GT:GQ	50,9,0:1/1:63
-chr11	6767356	.	T	C	9.63	.	DP=3;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=29;PV4=1,1,1,1	PL:GT:GQ	38,1,0:1/1:23
-chr11	6999404	.	G	C	21	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=37	PL:GT:GQ	53,9,0:1/1:63
-chr11	9120930	.	C	G	17.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr11	9373125	.	T	C	19.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	51,6,0:1/1:49
-chr11	9585101	.	C	T	67	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=45	PL:GT:GQ	100,42,0:1/1:99
-chr11	10266192	.	A	C	14.3	.	DP=22;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=27	PL:GT:GQ	47,18,0:1/1:90
-chr11	10303263	.	T	C	8.64	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,17;MQ=18	PL:GT:GQ	41,51,0:1/1:99
-chr11	10420170	.	T	C	35	.	DP=17;AF1=1;CI95=1,1;DP4=0,1,0,15;MQ=28;PV4=1,0.12,1,0.4	PL:GT:GQ	68,36,0:1/1:99
-chr11	10912169	.	G	A	99	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=49	PL:GT:GQ	155,18,0:1/1:90
-chr11	11315826	.	T	G	6.29	.	DP=27;AF1=1;CI95=1,1;DP4=0,0,0,6;MQ=19	PL:GT:GQ	38,18,0:1/1:90
-chr11	11603859	.	A	C	22	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,9,0,6;MQ=34;PV4=1,9.5e-13,0.22,1	PL:GT:GQ	52,0,115:0/1:55
-chr11	11700034	.	C	T	33	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=30	PL:GT:GQ	66,27,0:1/1:99
-chr11	11822758	.	G	A	15.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,3;MQ=38;PV4=1,0.18,1,1	PL:GT:GQ	45,0,88:0/1:48
-chr11	11976636	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=24	PL:GT:GQ	54,9,0:1/1:63
-chr11	14380517	.	C	G	16.1	.	DP=10;AF1=0.5;CI95=0.5,0.5;DP4=5,0,5,0;MQ=48;PV4=1,2.1e-05,0.13,1	PL:GT:GQ	46,0,113:0/1:49
-chr11	14419212	.	A	G	91.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=38	PL:GT:GQ	124,18,0:1/1:90
-chr11	14846792	.	A	G	55	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=19	PL:GT:GQ	88,33,0:1/1:99
-chr11	15494556	.	C	T	99	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=22,0,14,0;MQ=34;PV4=1,0.0071,1,1	PL:GT:GQ	146,0,159:0/1:99
-chr11	16262879	.	A	C	16.1	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=0,1,0,3;MQ=43;PV4=1,0.061,0.24,0.33	PL:GT:GQ	46,0,28:0/1:31
-chr11	21514947	.	T	C	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=41	PL:GT:GQ	57,12,0:1/1:72
-chr11	22532576	.	C	G	28	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,0,17;MQ=17	PL:GT:GQ	61,51,0:1/1:99
-chr11	23529238	.	G	T	4.29	.	DP=13;AF1=0.5334;CI95=0.5,1;DP4=1,0,3,0;MQ=37;PV4=1,1,0.34,0.21	PL:GT:GQ	32,0,9:0/1:12
-chr11	24249554	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr11	24853167	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=51	PL:GT:GQ	73,6,0:1/1:49
-chr11	33353903	.	T	C	24.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=36	PL:GT:GQ	57,15,0:1/1:75
-chr11	35126569	.	T	C	24.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	57,12,0:1/1:72
-chr11	35132248	.	C	T	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr11	35155482	.	T	C	68	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=46	PL:GT:GQ	101,66,0:1/1:99
-chr11	52494088	.	T	C	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=37	PL:GT:GQ	140,27,0:1/1:99
-chr11	57899943	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr11	62261460	.	G	T	19.1	.	DP=15;AF1=0.5;CI95=0.5,0.5;DP4=0,7,0,5;MQ=27;PV4=1,1.1e-06,1,1	PL:GT:GQ	49,0,58:0/1:51
-chr11	67456049	.	C	T	39.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=19	PL:GT:GQ	72,18,0:1/1:90
-chr11	68509708	.	C	G	3.65	.	DP=9;AF1=0.7301;CI95=0.5,1;DP4=0,5,0,4;MQ=17;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr11	70115115	.	T	A	99	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=49	PL:GT:GQ	140,15,0:1/1:75
-chr11	72643951	.	T	C	70	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=39	PL:GT:GQ	103,66,0:1/1:99
-chr11	72647930	.	G	A	36	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=0,1,0,3;MQ=41;PV4=1,1,0.3,1	PL:GT:GQ	66,0,28:0/1:31
-chr11	73330148	.	C	T	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr11	81720893	.	A	G	5.83	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=19	PL:GT:GQ	37,12,0:1/1:72
-chr11	83813797	.	A	G	23.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	56,12,0:1/1:72
-chr11	85949488	.	C	A	54	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=37	PL:GT:GQ	87,42,0:1/1:99
-chr11	87634829	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=51	PL:GT:GQ	40,6,0:1/1:49
-chr11	90913093	.	A	T	35.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	67,6,0:1/1:49
-chr11	93793348	.	G	A	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=31	PL:GT:GQ	139,24,0:1/1:96
-chr11	100802294	.	T	C	16.6	.	DP=21;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=35	PL:GT:GQ	49,12,0:1/1:72
-chr11	107455449	.	C	T	8.44	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=26	PL:GT:GQ	39,6,0:1/1:49
-chr11	111344355	.	A	G	69.5	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=43	PL:GT:GQ	102,12,0:1/1:72
-chr11	111611115	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr11	113050466	.	G	C	6.02	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=30	PL:GT:GQ	36,6,0:1/1:49
-chr11	114332544	.	T	C	3.54	.	DP=17;AF1=0.4999;CI95=0.5,0.5;DP4=0,4,0,5;MQ=37;PV4=1,0.32,0.13,1	PL:GT:GQ	31,0,37:0/1:33
-chr11	114332549	.	G	A	3.54	.	DP=17;AF1=0.4998;CI95=0.5,0.5;DP4=0,9,0,8;MQ=36;PV4=1,3.1e-10,0.088,1	PL:GT:GQ	31,0,127:0/1:34
-chr11	114843578	.	G	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr11	115580279	.	A	G	99	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,15,0;MQ=48	PL:GT:GQ	190,45,0:1/1:99
-chr11	116434328	.	G	A	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	50,12,0:1/1:72
-chr11	125914161	.	A	G	20.8	.	DP=7;AF1=0.95;CI95=0.5,1;DP4=3,0,4,0;MQ=38;PV4=1,0.074,1,1	PL:GT:GQ	49,0,0:1/1:10
-chr11	125917089	.	C	T	12.3	.	DP=41;AF1=0.5;CI95=0.5,0.5;DP4=0,28,0,12;MQ=44;PV4=1,4.7e-25,1,1	PL:GT:GQ	42,0,167:0/1:45
-chr11	127194100	.	A	G	60	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=49	PL:GT:GQ	93,24,0:1/1:96
-chr12	70856	.	G	A	27.5	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	60,12,0:1/1:72
-chr12	153693	.	T	C	52.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=38	PL:GT:GQ	85,15,0:1/1:75
-chr12	924547	.	C	G	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	69,6,0:1/1:49
-chr12	1555916	.	G	A	7.18	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	39,15,0:1/1:75
-chr12	1919860	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr12	2283756	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=34	PL:GT:GQ	45,6,0:1/1:49
-chr12	2805983	.	G	C	12.7	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=35	PL:GT:GQ	45,12,0:1/1:72
-chr12	6088203	.	T	C	72.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=37	PL:GT:GQ	105,15,0:1/1:75
-chr12	7099460	.	G	C	10.8	.	DP=6;AF1=0.8277;CI95=0.5,1;DP4=3,0,3,0;MQ=26;PV4=1,0.027,1,1	PL:GT:GQ	39,0,1:1/1:5
-chr12	7099464	.	G	A	13.3	.	DP=6;AF1=0.9966;CI95=0.5,1;DP4=2,0,3,0;MQ=28;PV4=1,0.16,1,1	PL:GT:GQ	42,1,0:1/1:23
-chr12	7198516	.	T	G	4.61	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	34,6,0:1/1:49
-chr12	23331895	.	C	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr12	28209020	.	T	G	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	47,15,0:1/1:75
-chr12	30074073	.	C	T	32.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	64,6,0:1/1:49
-chr12	30563452	.	T	C	25	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	57,9,0:1/1:63
-chr12	30563453	.	A	G	25	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=46	PL:GT:GQ	57,9,0:1/1:63
-chr12	30563464	.	C	A	78.8	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,2,0,5;MQ=34;PV4=1,0.29,1,1	PL:GT:GQ	110,6,0:1/1:49
-chr12	31505085	.	G	A	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr12	34041336	.	G	A	5.46	.	DP=5;AF1=0.5;CI95=0.5,0.5;DP4=2,0,2,0;MQ=36;PV4=1,1,0.48,0.21	PL:GT:GQ	34,0,34:0/1:34
-chr12	49003648	.	C	G	42	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=39	PL:GT:GQ	75,24,0:1/1:96
-chr12	51280690	.	G	A	69	.	DP=98;AF1=0.5;CI95=0.5,0.5;DP4=13,0,18,0;MQ=45;PV4=1,1,0.051,1	PL:GT:GQ	99,0,84:0/1:87
-chr12	69206633	.	T	C	17.1	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=17	PL:GT:GQ	50,33,0:1/1:99
-chr12	80417253	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr12	86633033	.	C	T	34	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=0,1,0,2;MQ=43;PV4=1,1,0.33,1	PL:GT:GQ	64,0,31:0/1:34
-chr12	98097274	.	C	T	47.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=31	PL:GT:GQ	80,15,0:1/1:75
-chr12	105269319	.	C	T	19	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=26	PL:GT:GQ	51,9,0:1/1:63
-chr12	109053425	.	G	A	9.53	.	DP=8;AF1=0.5012;CI95=0.5,0.5;DP4=2,0,6,0;MQ=25;PV4=1,1,0.19,1	PL:GT:GQ	39,0,23:0/1:26
-chr12	111904540	.	A	G	3.41	.	DP=65;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	32,6,0:1/1:49
-chr12	115038686	.	T	C	15.2	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=27	PL:GT:GQ	48,21,0:1/1:84
-chr12	115039419	.	A	G	4.11	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=30	PL:GT:GQ	34,9,0:1/1:63
-chr12	115103890	.	G	A	66	.	DP=39;AF1=1;CI95=1,1;DP4=0,0,0,38;MQ=49	PL:GT:GQ	99,114,0:1/1:99
-chr12	115833830	.	G	A	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr12	116361873	.	T	G	6.34	.	DP=5;AF1=0.7302;CI95=0.5,1;DP4=0,2,0,2;MQ=23;PV4=1,1,1,1	PL:GT:GQ	34,0,2:0/1:3
-chr12	123583527	.	G	A	14.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	46,9,0:1/1:63
-chr12	124115330	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=38	PL:GT:GQ	76,9,0:1/1:63
-chr12	125062296	.	G	A	41.8	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr12	126718106	.	A	G	8.76	.	DP=50;AF1=0.5163;CI95=0.5,1;DP4=2,0,6,0;MQ=26;PV4=1,0.33,0.37,1	PL:GT:GQ	38,0,12:0/1:15
-chr12	133348311	.	G	A	24	.	DP=18;AF1=0.5;CI95=0.5,0.5;DP4=14,0,3,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	54,0,118:0/1:57
-chr12	134494475	.	C	T	28	.	DP=18;AF1=0.6671;CI95=0.5,1;DP4=8,0,10,0;MQ=18;PV4=1,1,1,1	PL:GT:GQ	57,0,3:0/1:5
-chr12	134831761	.	C	T	41.3	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=27	PL:GT:GQ	74,15,0:1/1:75
-chr12	134992770	.	A	C,T	84	.	DP=47;AF1=1;CI95=1,1;DP4=0,0,26,0;MQ=29	PL:GT:GQ	117,72,114,0,44,114:1/1:99
-chr12	135261117	.	G	A	49.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	82,18,0:1/1:90
-chr12	135261144	.	A	G	99	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=46	PL:GT:GQ	155,18,0:1/1:90
-chr12	135460302	.	G	A	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,23,0;MQ=40	PL:GT:GQ	198,69,0:1/1:99
-chr12	135463758	.	A	G	83	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,16;MQ=26	PL:GT:GQ	116,48,0:1/1:99
-chr12	135523325	.	G	A	99	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=26	PL:GT:GQ	136,66,0:1/1:99
-chr12	135782401	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr12	135795472	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr13	18040027	.	G	C	42	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=33	PL:GT:GQ	74,9,0:1/1:63
-chr13	19494625	.	G	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	73,6,0:1/1:49
-chr13	20121126	.	A	G	15.1	.	DP=36;AF1=0.5;CI95=0.5,0.5;DP4=25,0,9,0;MQ=36;PV4=1,1,0.13,1	PL:GT:GQ	45,0,153:0/1:48
-chr13	21536703	.	A	G	9.31	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr13	23160035	.	G	T	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	33,6,0:1/1:49
-chr13	23476554	.	C	A	6.79	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=52	PL:GT:GQ	37,6,0:1/1:49
-chr13	26632967	.	C	G	32	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=34	PL:GT:GQ	65,27,0:1/1:99
-chr13	26790010	.	T	C	89.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=35	PL:GT:GQ	122,15,0:1/1:75
-chr13	36083571	.	T	C	43	.	DP=84;AF1=1;CI95=1,1;DP4=1,0,37,0;MQ=16;PV4=1,1,1,0.3	PL:GT:GQ	76,99,0:1/1:99
-chr13	44432419	.	C	T	3.58	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=19	PL:GT:GQ	34,21,0:1/1:84
-chr13	46592359	.	T	C	16.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	48,6,0:1/1:49
-chr13	52764657	.	A	T	3.14	.	DP=32;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=22	PL:GT:GQ	33,15,0:1/1:75
-chr13	53084193	.	C	T	9.11	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=0,1,0,2;MQ=29;PV4=1,1,1,1	PL:GT:GQ	38,2,0:1/1:37
-chr13	57763228	.	C	T	45	.	DP=555;AF1=1;CI95=1,1;DP4=2,0,21,0;MQ=23;PV4=1,0.00021,1,0.3	PL:GT:GQ	78,45,0:1/1:99
-chr13	73857921	.	G	C	31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	63,9,0:1/1:63
-chr13	76718001	.	G	A	59	.	DP=4;AF1=0.5004;CI95=0.5,0.5;DP4=1,0,3,0;MQ=45;PV4=1,1,0.12,1	PL:GT:GQ	89,0,28:0/1:31
-chr13	100912695	.	A	T	23	.	DP=22;AF1=0.5;CI95=0.5,0.5;DP4=0,16,0,6;MQ=31;PV4=1,0.029,1,0.35	PL:GT:GQ	53,0,103:0/1:56
-chr13	101332001	.	G	C	21	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,23,0;MQ=21	PL:GT:GQ	54,69,0:1/1:99
-chr13	102637334	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr13	102895627	.	C	T	63	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=48	PL:GT:GQ	96,27,0:1/1:99
-chr13	103830322	.	T	C	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr13	112842448	.	G	A	39	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=27	PL:GT:GQ	72,27,0:1/1:99
-chr13	113310291	.	C	T	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=43	PL:GT:GQ	66,12,0:1/1:72
-chr13	114775162	.	A	G	80	.	DP=17;AF1=1;CI95=1,1;DP4=0,0,17,0;MQ=21	PL:GT:GQ	113,51,0:1/1:99
-chr13	115267482	.	A	G	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr13	116068676	.	C	T	3.83	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=27	PL:GT:GQ	34,12,0:1/1:72
-chr13	116455918	.	A	G	33	.	DP=29;AF1=0.5;CI95=0.5,0.5;DP4=13,0,15,0;MQ=42;PV4=1,1.8e-20,0.3,1	PL:GT:GQ	63,0,146:0/1:66
-chr13	116765012	.	G	A	30.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	62,6,0:1/1:49
-chr13	116779773	.	C	T	17.1	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=27,0,11,0;MQ=24;PV4=1,4.5e-35,1,1	PL:GT:GQ	47,0,106:0/1:50
-chr13	116779791	.	C	T	57	.	DP=38;AF1=0.5;CI95=0.5,0.5;DP4=24,0,14,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	87,0,103:0/1:90
-chr14	20159250	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=39	PL:GT:GQ	43,9,0:1/1:63
-chr14	23510676	.	T	C	52	.	DP=22;AF1=1;CI95=1,1;DP4=0,0,22,0;MQ=32	PL:GT:GQ	85,66,0:1/1:99
-chr14	24735256	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr14	29525577	.	G	A	21	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=16	PL:GT:GQ	54,27,0:1/1:99
-chr14	36186389	.	C	T	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=20	PL:GT:GQ	37,6,0:1/1:49
-chr14	36186394	.	A	G	6.79	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=20	PL:GT:GQ	37,6,0:1/1:49
-chr14	37440609	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr14	40432807	.	A	G	18.6	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=23	PL:GT:GQ	51,12,0:1/1:72
-chr14	59466268	.	T	C	15.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=25	PL:GT:GQ	47,9,0:1/1:63
-chr14	61368162	.	G	T	7.18	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=17	PL:GT:GQ	39,15,0:1/1:75
-chr14	65152922	.	G	A	92	.	DP=33;AF1=0.5;CI95=0.5,0.5;DP4=0,18,0,15;MQ=36;PV4=1,0.059,0.35,1	PL:GT:GQ	122,0,144:0/1:99
-chr14	69749148	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=25	PL:GT:GQ	40,6,0:1/1:49
-chr14	74877658	.	C	T	45	.	DP=48;AF1=1;CI95=1,1;DP4=0,1,0,12;MQ=36;PV4=1,0.02,1,0.39	PL:GT:GQ	78,28,0:1/1:99
-chr14	75546678	.	C	T	19.2	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=17	PL:GT:GQ	52,18,0:1/1:90
-chr14	76439185	.	T	C	67.1	.	DP=7;AF1=0.505;CI95=0.5,0.5;DP4=0,1,0,6;MQ=33;PV4=1,1,0.056,0.29	PL:GT:GQ	97,0,17:0/1:20
-chr14	77313295	.	T	A	99	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=48	PL:GT:GQ	191,30,0:1/1:99
-chr14	77673422	.	G	A	11.5	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=24	PL:GT:GQ	44,18,0:1/1:90
-chr14	78646125	.	T	C	99	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=40	PL:GT:GQ	153,24,0:1/1:96
-chr14	91702449	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr14	91769842	.	G	A	63	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=47	PL:GT:GQ	95,9,0:1/1:63
-chr14	91775899	.	C	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	73,6,0:1/1:49
-chr14	91775924	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr14	93482918	.	A	C	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr14	93665819	.	C	T	75	.	DP=7;AF1=0.5002;CI95=0.5,0.5;DP4=0,3,0,4;MQ=42;PV4=1,1,1,1	PL:GT:GQ	105,0,31:0/1:34
-chr14	95422276	.	A	G	55.1	.	DP=7;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=45	PL:GT:GQ	88,21,0:1/1:84
-chr14	95731986	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr14	96045464	.	A	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=33	PL:GT:GQ	44,6,0:1/1:49
-chr14	97172020	.	C	T	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=51	PL:GT:GQ	100,9,0:1/1:63
-chr14	100515480	.	A	G	6.98	.	DP=3;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=45;PV4=1,0.14,0.085,0.33	PL:GT:GQ	36,0,30:0/1:32
-chr14	100770214	.	A	T	8.69	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=16	PL:GT:GQ	41,21,0:1/1:84
-chr14	101258303	.	G	A	82	.	DP=15;AF1=1;CI95=1,1;DP4=0,0,15,0;MQ=26	PL:GT:GQ	115,45,0:1/1:99
-chr14	101701492	.	C	G	66	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,10,0;MQ=49	PL:GT:GQ	99,30,0:1/1:99
-chr14	102113772	.	T	C	3.98	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=30	PL:GT:GQ	33,6,0:1/1:49
-chr14	102751431	.	A	C	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr14	103708033	.	A	G	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,0,12;MQ=27	PL:GT:GQ	141,36,0:1/1:99
-chr14	104744582	.	G	A	3.52	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	33,9,0:1/1:63
-chr14	105989100	.	C	T	3.14	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	33,15,0:1/1:75
-chr14	105989162	.	C	T	3.65	.	DP=12;AF1=0.7301;CI95=0.5,1;DP4=0,6,0,6;MQ=15;PV4=1,1,1,1	PL:GT:GQ	30,0,2:0/1:3
-chr14	106234810	.	G	A	25.3	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=39	PL:GT:GQ	58,15,0:1/1:75
-chr14	106995572	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr14	107283057	.	T	C	5.5	.	DP=8;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=20	PL:GT:GQ	37,21,0:1/1:84
-chr14	107285319	.	T	C	33	.	DP=36;AF1=1;CI95=1,1;DP4=0,0,0,35;MQ=22	PL:GT:GQ	66,105,0:1/1:99
-chr14	107640449	.	A	G	11.8	.	DP=7;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=36	PL:GT:GQ	44,12,0:1/1:72
-chr15	20082092	.	T	G	18.3	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=24	PL:GT:GQ	51,15,0:1/1:75
-chr15	22955884	.	T	C	67	.	DP=12;AF1=1;CI95=1,1;DP4=0,0,12,0;MQ=48	PL:GT:GQ	100,36,0:1/1:99
-chr15	22971987	.	A	G	5.29	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=22	PL:GT:GQ	35,6,0:1/1:49
-chr15	23233324	.	C	A	47	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,14,0;MQ=31	PL:GT:GQ	80,42,0:1/1:99
-chr15	25175286	.	C	T	36.5	.	DP=3;AF1=0.9998;CI95=0.5,1;DP4=1,0,2,0;MQ=42;PV4=1,1,1,1	PL:GT:GQ	66,2,0:1/1:37
-chr15	25385709	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=48	PL:GT:GQ	40,6,0:1/1:49
-chr15	27372396	.	A	G	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=40	PL:GT:GQ	76,9,0:1/1:63
-chr15	35998093	.	C	T	9.53	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,9,0;MQ=17	PL:GT:GQ	42,27,0:1/1:99
-chr15	36716538	.	C	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr15	36793360	.	G	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=42	PL:GT:GQ	76,9,0:1/1:63
-chr15	53783097	.	A	G	10.5	.	DP=31;AF1=1;CI95=1,1;DP4=0,0,7,0;MQ=16	PL:GT:GQ	43,21,0:1/1:84
-chr15	54180175	.	C	T	10.4	.	DP=7;AF1=0.5001;CI95=0.5,0.5;DP4=4,0,3,0;MQ=27;PV4=1,1.2e-05,1,1	PL:GT:GQ	40,0,32:0/1:34
-chr15	54939306	.	C	T	99	.	DP=34;AF1=0.5;CI95=0.5,0.5;DP4=0,18,0,16;MQ=49;PV4=1,1,0.18,1	PL:GT:GQ	172,0,181:0/1:99
-chr15	59377916	.	C	T	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr15	59685961	.	G	C	68	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=36	PL:GT:GQ	101,33,0:1/1:99
-chr15	60306384	.	A	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr15	60345642	.	G	C	14.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	46,6,0:1/1:49
-chr15	60367387	.	G	A	13.2	.	DP=6;AF1=0.5001;CI95=0.5,0.5;DP4=3,0,3,0;MQ=34;PV4=1,0.098,0.24,1	PL:GT:GQ	43,0,35:0/1:37
-chr15	60367446	.	C	T	44	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	76,9,0:1/1:63
-chr15	61763755	.	G	A	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=45	PL:GT:GQ	100,9,0:1/1:63
-chr15	61831362	.	C	G	11.3	.	DP=5;AF1=0.5;CI95=0.5,0.5;DP4=0,2,0,3;MQ=30;PV4=1,0.00077,0.47,1	PL:GT:GQ	41,0,42:0/1:41
-chr15	63978880	.	G	C	60	.	DP=6;AF1=0.9999;CI95=0.5,1;DP4=2,0,4,0;MQ=35;PV4=1,1,1,1	PL:GT:GQ	90,3,0:1/1:41
-chr15	64342445	.	A	G	12.2	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=18	PL:GT:GQ	44,9,0:1/1:63
-chr15	65424859	.	T	C	11.3	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=21	PL:GT:GQ	44,30,0:1/1:99
-chr15	65603698	.	C	T	60	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	92,9,0:1/1:63
-chr15	67005078	.	G	A	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr15	71133512	.	G	C	22.3	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=25	PL:GT:GQ	55,15,0:1/1:75
-chr15	72619009	.	A	G	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr15	73272688	.	C	T	70.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=39	PL:GT:GQ	103,15,0:1/1:75
-chr15	73699335	.	T	A	99	.	DP=9;AF1=1;CI95=1,1;DP4=0,0,0,9;MQ=45	PL:GT:GQ	175,27,0:1/1:99
-chr15	74513352	.	C	T	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,10;MQ=37	PL:GT:GQ	139,30,0:1/1:99
-chr15	75540536	.	G	A	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr15	75822537	.	C	A	17.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=23	PL:GT:GQ	50,15,0:1/1:75
-chr15	78554005	.	T	C	12	.	DP=18;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=46	PL:GT:GQ	43,6,0:1/1:49
-chr15	80089369	.	G	A	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=28	PL:GT:GQ	40,6,0:1/1:49
-chr15	83089149	.	C	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=33	PL:GT:GQ	40,6,0:1/1:49
-chr15	86839307	.	T	C	90.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=43	PL:GT:GQ	123,15,0:1/1:75
-chr15	89836258	.	T	C	99	.	DP=10;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=39	PL:GT:GQ	141,24,0:1/1:96
-chr15	89837706	.	G	A	4.13	.	DP=8;AF1=0.4998;CI95=0.5,0.5;DP4=0,4,0,4;MQ=30;PV4=1,1,0.25,1	PL:GT:GQ	32,0,59:0/1:35
-chr15	89857648	.	T	C	99	.	DP=27;AF1=0.5;CI95=0.5,0.5;DP4=8,0,8,0;MQ=40;PV4=1,1,0.3,1	PL:GT:GQ	133,0,130:0/1:99
-chr15	89864228	.	A	C	32	.	DP=4;AF1=0.5002;CI95=0.5,0.5;DP4=2,0,2,0;MQ=42;PV4=1,1,1,1	PL:GT:GQ	62,0,31:0/1:34
-chr15	91261235	.	G	A	7.8	.	DP=4;AF1=0.5002;CI95=0.5,0.5;DP4=1,0,2,0;MQ=44;PV4=1,1,0.32,1	PL:GT:GQ	37,0,30:0/1:32
-chr16	256990	.	A	C	10.4	.	DP=16;AF1=0.5008;CI95=0.5,0.5;DP4=4,0,3,0;MQ=23;PV4=1,0.34,1,1	PL:GT:GQ	40,0,25:0/1:28
-chr16	260794	.	T	C	3.01	.	DP=19;AF1=0.4999;CI95=0.5,0.5;DP4=13,0,2,0;MQ=24;PV4=1,1,1,1	PL:GT:GQ	30,0,32:0/1:31
-chr16	419905	.	A	G	7.9	.	DP=5;AF1=0.9966;CI95=0.5,1;DP4=0,2,0,3;MQ=22;PV4=1,1,1,1	PL:GT:GQ	36,1,0:1/1:23
-chr16	824086	.	T	C	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=48	PL:GT:GQ	54,9,0:1/1:63
-chr16	1085063	.	C	T	52	.	DP=12;AF1=0.5;CI95=0.5,0.5;DP4=6,0,6,0;MQ=42;PV4=1,1,0.014,1	PL:GT:GQ	82,0,128:0/1:85
-chr16	1221305	.	T	C	54	.	DP=7;AF1=0.5;CI95=0.5,0.5;DP4=0,3,0,3;MQ=40;PV4=1,1,1,1	PL:GT:GQ	84,0,60:0/1:63
-chr16	1411728	.	A	G	32.3	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=35	PL:GT:GQ	65,15,0:1/1:75
-chr16	1443197	.	C	G	64	.	DP=26;AF1=1;CI95=1,1;DP4=0,0,25,0;MQ=36	PL:GT:GQ	97,75,0:1/1:99
-chr16	1478746	.	A	T	32	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,8,0;MQ=28	PL:GT:GQ	65,24,0:1/1:96
-chr16	1514438	.	A	C	45	.	DP=49;AF1=1;CI95=1,1;DP4=0,0,48,0;MQ=26	PL:GT:GQ	78,144,0:1/1:99
-chr16	1601989	.	T	C	99	.	DP=13;AF1=1;CI95=1,1;DP4=0,0,13,0;MQ=29	PL:GT:GQ	133,39,0:1/1:99
-chr16	2043883	.	C	T	30	.	DP=33;AF1=1;CI95=1,1;DP4=0,0,0,33;MQ=14	PL:GT:GQ	63,99,0:1/1:99
-chr16	2137470	.	A	C	39	.	DP=38;AF1=0.5016;CI95=0.5,0.5;DP4=4,0,6,0;MQ=34;PV4=1,0.02,1,1	PL:GT:GQ	69,0,22:0/1:25
-chr16	2537260	.	A	G	99	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=40	PL:GT:GQ	177,33,0:1/1:99
-chr16	2564737	.	T	C	99	.	DP=25;AF1=1;CI95=1,1;DP4=0,0,0,22;MQ=41	PL:GT:GQ	199,66,0:1/1:99
-chr16	2612605	.	A	T	62.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=28	PL:GT:GQ	95,15,0:1/1:75
-chr16	2704518	.	G	A	41	.	DP=48;AF1=0.5;CI95=0.5,0.5;DP4=0,17,0,12;MQ=48;PV4=1,1.9e-23,0.24,0.034	PL:GT:GQ	71,0,175:0/1:74
-chr16	3274307	.	G	T	68	.	DP=39;AF1=0.5;CI95=0.5,0.5;DP4=0,30,0,8;MQ=37;PV4=1,1,1,1	PL:GT:GQ	98,0,138:0/1:99
-chr16	5467292	.	G	C	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	69,6,0:1/1:49
-chr16	10079145	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr16	11483702	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	40,6,0:1/1:49
-chr16	12038227	.	A	T	23	.	DP=47;AF1=0.5;CI95=0.5,0.5;DP4=0,22,0,23;MQ=32;PV4=1,4.4e-66,0.47,0.028	PL:GT:GQ	53,0,135:0/1:56
-chr16	21336880	.	G	C	55	.	DP=35;AF1=0.5;CI95=0.5,0.5;DP4=0,12,0,19;MQ=47;PV4=1,5.6e-21,1,1	PL:GT:GQ	85,0,121:0/1:88
-chr16	21980241	.	C	T	16.1	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=29	PL:GT:GQ	48,9,0:1/1:63
-chr16	23275383	.	C	G	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	44,6,0:1/1:49
-chr16	27546495	.	G	T	25	.	DP=35;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=43	PL:GT:GQ	57,9,0:1/1:63
-chr16	27700399	.	A	T	17.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=17	PL:GT:GQ	50,12,0:1/1:72
-chr16	28021935	.	A	G	18.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=23	PL:GT:GQ	51,15,0:1/1:75
-chr16	29070016	.	G	T	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr16	29478618	.	C	T	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=42	PL:GT:GQ	43,9,0:1/1:63
-chr16	29718140	.	C	T	46.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=31	PL:GT:GQ	79,15,0:1/1:75
-chr16	30700759	.	T	C	17.1	.	DP=14;AF1=1;CI95=1,1;DP4=0,0,0,14;MQ=14	PL:GT:GQ	50,42,0:1/1:99
-chr16	35139103	.	A	G	46.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=37	PL:GT:GQ	79,12,0:1/1:72
-chr16	35473348	.	G	A	3.83	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	34,12,0:1/1:72
-chr16	36213667	.	A	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	73,6,0:1/1:49
-chr16	36705528	.	G	A	14.4	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=32	PL:GT:GQ	47,15,0:1/1:75
-chr16	43831353	.	C	T	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=42	PL:GT:GQ	102,12,0:1/1:72
-chr16	44715166	.	A	C	25	.	DP=18;AF1=1;CI95=1,1;DP4=0,0,0,8;MQ=32	PL:GT:GQ	58,24,0:1/1:96
-chr16	44957661	.	T	C	7.03	.	DP=23;AF1=1;CI95=1,1;DP4=0,0,0,7;MQ=18	PL:GT:GQ	39,21,0:1/1:84
-chr16	44958698	.	C	T	42.3	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=49	PL:GT:GQ	75,15,0:1/1:75
-chr16	44959163	.	T	C	33.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=48	PL:GT:GQ	66,12,0:1/1:72
-chr16	45167959	.	C	T	4.45	.	DP=16;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=24	PL:GT:GQ	35,12,0:1/1:72
-chr16	50254956	.	C	T	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=36	PL:GT:GQ	45,6,0:1/1:49
-chr16	52383122	.	A	C	46.5	.	DP=19;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=42	PL:GT:GQ	79,12,0:1/1:72
-chr16	55978159	.	C	T	10.7	.	DP=20;AF1=0.5336;CI95=0.5,1;DP4=2,0,5,0;MQ=35;PV4=1,0.038,1,0.059	PL:GT:GQ	40,0,9:0/1:12
-chr16	61358878	.	T	A	15.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=32	PL:GT:GQ	47,6,0:1/1:49
-chr16	61392487	.	G	A	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	44,6,0:1/1:49
-chr16	61621603	.	G	T	6.59	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=22	PL:GT:GQ	38,12,0:1/1:72
-chr16	69120890	.	G	C	51.3	.	DP=36;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=42	PL:GT:GQ	84,15,0:1/1:75
-chr16	70778219	.	A	G	21.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=39	PL:GT:GQ	53,6,0:1/1:49
-chr16	71899519	.	T	C	40	.	DP=11;AF1=1;CI95=1,1;DP4=0,0,11,0;MQ=33	PL:GT:GQ	73,33,0:1/1:99
-chr16	72079251	.	A	G	11.3	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=41	PL:GT:GQ	43,9,0:1/1:63
-chr16	72093003	.	G	C	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr16	72672428	.	A	G	68	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=49	PL:GT:GQ	100,9,0:1/1:63
-chr16	72864515	.	A	G	13.9	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=35	PL:GT:GQ	45,6,0:1/1:49
-chr16	72890560	.	G	A	47.1	.	DP=10;AF1=0.5064;CI95=0.5,0.5;DP4=0,1,0,7;MQ=49;PV4=1,0.0019,0.0033,1	PL:GT:GQ	77,0,16:0/1:19
-chr16	73048929	.	A	G	6.29	.	DP=4;AF1=0.9966;CI95=0.5,1;DP4=1,0,2,0;MQ=27;PV4=1,1,1,0.33	PL:GT:GQ	34,1,0:1/1:23
-chr16	73177179	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr16	73191468	.	C	T	69.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=40	PL:GT:GQ	102,12,0:1/1:72
-chr16	73367439	.	A	C	7.41	.	DP=36;AF1=1;CI95=0.5,1;DP4=0,2,0,13;MQ=26;PV4=1,1,0.027,1	PL:GT:GQ	37,4,0:1/1:45
-chr16	74259316	.	C	T	89.5	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=49	PL:GT:GQ	122,12,0:1/1:72
-chr16	75271450	.	C	G	6.99	.	DP=15;AF1=0.5015;CI95=0.5,0.5;DP4=0,1,0,3;MQ=44;PV4=1,0.065,0.31,1	PL:GT:GQ	36,0,22:0/1:25
-chr16	76199870	.	G	A	26	.	DP=14;AF1=0.5;CI95=0.5,0.5;DP4=8,0,6,0;MQ=47;PV4=1,1.2e-06,0.32,1	PL:GT:GQ	56,0,141:0/1:59
-chr16	77723692	.	A	G	89.5	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=50	PL:GT:GQ	122,12,0:1/1:72
-chr17	165875	.	G	A	40.8	.	DP=11;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=42	PL:GT:GQ	72,6,0:1/1:49
-chr17	1443809	.	C	G	9.31	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=50	PL:GT:GQ	40,6,0:1/1:49
-chr17	1618253	.	C	T	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=39	PL:GT:GQ	54,9,0:1/1:63
-chr17	2815309	.	T	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	40,6,0:1/1:49
-chr17	3537486	.	T	G	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=50	PL:GT:GQ	73,6,0:1/1:49
-chr17	3734367	.	C	A	23.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=36	PL:GT:GQ	56,12,0:1/1:72
-chr17	5634764	.	T	C	13	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=35	PL:GT:GQ	44,6,0:1/1:49
-chr17	6408090	.	C	G	3.54	.	DP=5;AF1=0.4998;CI95=0.5,0.5;DP4=3,0,2,0;MQ=40;PV4=1,1,0.36,1	PL:GT:GQ	31,0,66:0/1:34
-chr17	7089723	.	A	G	9.31	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=47	PL:GT:GQ	40,6,0:1/1:49
-chr17	8731503	.	G	C	11.1	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	42,6,0:1/1:49
-chr17	9282935	.	T	C,G	24.5	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=40	PL:GT:GQ	57,12,61,0,3,61:1/1:72
-chr17	17284831	.	T	C	29	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,3;MQ=25	PL:GT:GQ	61,9,0:1/1:63
-chr17	18439515	.	G	A	4.11	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=25	PL:GT:GQ	34,9,0:1/1:63
-chr17	18602146	.	C	T	4.76	.	DP=20;AF1=1;CI95=1,1;DP4=0,0,0,11;MQ=16	PL:GT:GQ	36,33,0:1/1:99
-chr17	19427888	.	C	T	57	.	DP=104;AF1=0.5;CI95=0.5,0.5;DP4=45,0,29,0;MQ=39;PV4=1,2.2e-12,1,1	PL:GT:GQ	87,0,131:0/1:90
-chr17	19604159	.	T	C	9.31	.	DP=5;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=45	PL:GT:GQ	40,6,0:1/1:49
-chr17	19610366	.	C	T	13	.	DP=13;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=48	PL:GT:GQ	44,6,0:1/1:49
-chr17	20484706	.	C	G	51	.	DP=35;AF1=0.5001;CI95=0.5,0.5;DP4=0,11,0,21;MQ=21;PV4=1,0.39,0.49,1	PL:GT:GQ	81,0,36:0/1:39
-chr17	20555720	.	A	G	26.3	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,5;MQ=28	PL:GT:GQ	59,15,0:1/1:75
-chr17	24328984	.	A	C	15.4	.	DP=34;AF1=1;CI95=0.5,1;DP4=0,0,5,0;MQ=25	PL:GT:GQ	48,15,0:1/1:75
-chr17	26237090	.	G	A	41.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=44	PL:GT:GQ	73,6,0:1/1:49
-chr17	28394766	.	C	A	13.9	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=31	PL:GT:GQ	45,6,0:1/1:49
-chr17	31218277	.	A	G	3.62	.	DP=38;AF1=0.5161;CI95=0.5,0.5;DP4=0,1,0,2;MQ=38;PV4=1,0.26,1,1	PL:GT:GQ	31,0,12:0/1:15
-chr17	31254021	.	C	T	15.1	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=35	PL:GT:GQ	47,9,0:1/1:63
-chr17	32516798	.	G	A	37.8	.	DP=2;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=49	PL:GT:GQ	69,6,0:1/1:49
-chr17	32600253	.	A	G	16.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	49,12,0:1/1:72
-chr17	34255214	.	G	C	19.2	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=21	PL:GT:GQ	52,18,0:1/1:90
-chr17	34365900	.	T	C	93.1	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=38	PL:GT:GQ	126,18,0:1/1:90
-chr17	35380386	.	A	T	6.79	.	DP=44;AF1=1;CI95=0.5,1;DP4=0,0,0,2;MQ=46	PL:GT:GQ	37,6,0:1/1:49
-chr17	41993344	.	C	T	64	.	DP=41;AF1=1;CI95=1,1;DP4=0,0,0,41;MQ=16	PL:GT:GQ	97,123,0:1/1:99
-chr17	42128201	.	A	G	4.13	.	DP=5;AF1=0.4998;CI95=0.5,0.5;DP4=0,2,0,2;MQ=52;PV4=1,0.0041,1,1	PL:GT:GQ	32,0,62:0/1:35
-chr17	42984490	.	C	A	56	.	DP=33;AF1=0.5001;CI95=0.5,0.5;DP4=6,0,12,0;MQ=42;PV4=1,0.004,1,1	PL:GT:GQ	86,0,34:0/1:37
-chr17	43419457	.	G	A	99	.	DP=16;AF1=1;CI95=1,1;DP4=0,0,0,14;MQ=45	PL:GT:GQ	185,42,0:1/1:99
-chr17	43421225	.	A	G	65.1	.	DP=31;AF1=1;CI95=0.5,1;DP4=0,6,0,17;MQ=43;PV4=1,0.004,1,1	PL:GT:GQ	98,18,0:1/1:90
-chr17	45206897	.	G	A	22	.	DP=3;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=47	PL:GT:GQ	54,9,0:1/1:63
-chr17	45381302	.	T	C	18.6	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,0,4;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr17	45530812	.	C	A	3.54	.	DP=6;AF1=0.4998;CI95=0.5,0.5;DP4=0,3,0,2;MQ=40;PV4=1,1,0.37,1	PL:GT:GQ	31,0,58:0/1:34
-chr17	50242633	.	G	A	44	.	DP=42;AF1=0.5;CI95=0.5,0.5;DP4=0,25,0,13;MQ=32;PV4=1,0.084,0.14,1	PL:GT:GQ	74,0,154:0/1:77
-chr17	51275317	.	G	A	14.9	.	DP=10;AF1=1;CI95=0.5,1;DP4=0,0,2,0;MQ=31	PL:GT:GQ	46,6,0:1/1:49
-chr17	52325530	.	C	T	29	.	DP=19;AF1=1;CI95=1,1;DP4=0,0,0,18;MQ=24	PL:GT:GQ	62,54,0:1/1:99
-chr17	52411748	.	T	G	18.6	.	DP=4;AF1=1;CI95=0.5,1;DP4=0,0,4,0;MQ=25	PL:GT:GQ	51,12,0:1/1:72
-chr17	53190746	.	C	G	62.1	.	DP=20;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=40	PL:GT:GQ	95,18,0:1/1:90
-chr17	58289916	.	T	C	18.2	.	DP=8;AF1=1;CI95=0.5,1;DP4=0,0,0,6;MQ=22	PL:GT:GQ	51,18,0:1/1:90
-chr17	59796875	.	C	T	42	.	DP=6;AF1=1;CI95=0.5,1;DP4=0,0,3,0;MQ=35	PL:GT:GQ	74,9,0:1/1:63
diff --git a/tests/vcf-examples/issue85.vcf b/tests/vcf-examples/issue85.vcf
deleted file mode 100644
index 31695cc..0000000
--- a/tests/vcf-examples/issue85.vcf
+++ /dev/null
@@ -1,26 +0,0 @@
-##fileformat=VCFv4.1
-##samtoolsVersion=0.1.18 (r982:295)
-##INFO=<ID=DP,Number=1,Type=Integer,Description="Raw read depth">
-##INFO=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
-##INFO=<ID=MQ,Number=1,Type=Integer,Description="Root-mean-square mapping quality of covering reads">
-##INFO=<ID=FQ,Number=1,Type=Float,Description="Phred probability of all samples being the same">
-##INFO=<ID=AF1,Number=1,Type=Float,Description="Max-likelihood estimate of the first ALT allele frequency (assuming HWE)">
-##INFO=<ID=AC1,Number=1,Type=Float,Description="Max-likelihood estimate of the first ALT allele count (no HWE assumption)">
-##INFO=<ID=G3,Number=3,Type=Float,Description="ML estimate of genotype frequencies">
-##INFO=<ID=HWE,Number=1,Type=Float,Description="Chi^2 based HWE test P-value based on G3">
-##INFO=<ID=CLR,Number=1,Type=Integer,Description="Log ratio of genotype likelihoods with and without the constraint">
-##INFO=<ID=UGT,Number=1,Type=String,Description="The most probable unconstrained genotype configuration in the trio">
-##INFO=<ID=CGT,Number=1,Type=String,Description="The most probable constrained genotype configuration in the trio">
-##INFO=<ID=PV4,Number=4,Type=Float,Description="P-values for strand bias, baseQ bias, mapQ bias and tail distance bias">
-##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Indicates that the variant is an INDEL.">
-##INFO=<ID=PC2,Number=2,Type=Integer,Description="Phred probability of the nonRef allele frequency in group1 samples being larger (,smaller) than in group2.">
-##INFO=<ID=PCHI2,Number=1,Type=Float,Description="Posterior weighted chi^2 P-value for testing the association between group1 and group2 samples.">
-##INFO=<ID=QCHI2,Number=1,Type=Integer,Description="Phred scaled PCHI2.">
-##INFO=<ID=PR,Number=1,Type=Integer,Description="# permutations yielding a smaller PCHI2.">
-##INFO=<ID=VDB,Number=1,Type=Float,Description="Variant Distance Bias">
-##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
-##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
-##FORMAT=<ID=GL,Number=3,Type=Float,Description="Likelihoods for RR,RA,AA genotypes (R=ref,A=alt)">
-##FORMAT=<ID=DP,Number=1,Type=Integer,Description="# high-quality bases">
-##FORMAT=<ID=SP,Number=1,Type=Integer,Description="Phred-scaled strand bias P-value">
-##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods">

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pysam.git



More information about the debian-med-commit mailing list